diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 41e07e4..2c72dc7 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -4,7 +4,7 @@ You are an expert GitHub Agentic Workflow generator. You help users create produ ## Your Knowledge -Use the committed pattern library as the source of truth: `patterns/manifest.json` plus `patterns/archetypes/*.json` generated on 2026-09-28 from 563 source repos, 345 active workflows, and 929 total workflows scanned. The current wizard manifest lists 31 user-facing archetypes; the `custom` archetype exists as a supporting pattern file and is intentionally not exposed as a HOW-step archetype. +Use the committed pattern library as the source of truth: `patterns/manifest.json` plus `patterns/archetypes/*.json` generated on 2026-09-28 from 563 source repos, 345 active workflows, and 929 total workflows scanned. The current wizard manifest lists 32 user-facing archetypes; the `custom` archetype exists as a supporting pattern file and is intentionally not exposed as a HOW-step archetype. ### Key Data Points @@ -24,7 +24,7 @@ Use the committed pattern library as the source of truth: `patterns/manifest.jso - `custom` is hidden from the wizard archetype cards but retained for matching and profile data. Best observed custom profiles are schedule + create-pull-request + noop at 95.2% (n=21), schedule + create-issue + noop + threat-detection at 83.9%, and schedule + create-issue + noop at 80.0%. **Curated archetypes without empirical runs yet (`count: 0`):** -- accessibility-expert, agent-cost-tracker, backlog-drip, batched-ci-doctor, ci-failure-triage, code-health-auditor, community-digest, contribution-guidelines-checker, issue-hierarchy-manager, link-checker, linter-applier, linter-miner, linter-refiner, linter-workflows, nitpick-reviewer, performance-nut, pr-fix-assistant, pr-iteration-loop, repo-qa-assistant, security-scanner, user-simulator. +- accessibility-expert, agent-cost-tracker, backlog-drip, batched-ci-doctor, ci-failure-triage, code-health-auditor, community-digest, contribution-guidelines-checker, issue-hierarchy-manager, link-checker, linter-applier, linter-miner, linter-refiner, linter-workflows, nitpick-reviewer, performance-nut, pr-fix-assistant, pr-iteration-loop, repo-qa-assistant, responsive-docs-tester, security-scanner, user-simulator. - Keep these archetypes available. They are newer curated patterns and should not be removed simply because they have no measured success rate. **Trigger combo risk:** diff --git a/patterns/archetypes/responsive-docs-tester.json b/patterns/archetypes/responsive-docs-tester.json new file mode 100644 index 0000000..0322b8e --- /dev/null +++ b/patterns/archetypes/responsive-docs-tester.json @@ -0,0 +1,37 @@ +{ + "id": "responsive-docs-tester", + "label": "Responsive Docs Tester", + "description": "Build and serve a local web app or docs site, then test it with Playwright across mobile, tablet, and desktop viewports on a recurring schedule", + "success_rate": null, + "count": 0, + "recommended_triggers": [ + { + "type": "schedule", + "config": {} + } + ], + "recommended_safe_outputs": [ + "issues" + ], + "recommended_tools": [ + "create-issue" + ], + "timeout_minutes": 30, + "prompt_style": "phase-based", + "size_range_bytes": [ + 4000, + 8000 + ], + "top_repos": [], + "tips": [ + "Build and start the app or docs site locally in a pre-step, then poll localhost until the server responds before Playwright navigates to it", + "Test a small, named set of representative viewports (e.g. one mobile, one tablet, one desktop size) rather than an open-ended device list", + "Use playwright-cli commands in bash (browser_resize, browser_navigate, browser_snapshot) instead of installing Playwright as an npm dependency", + "Check navigation usability, content overflow, image sizing, and basic accessibility (headings, alt text, contrast) at each viewport, not just that the page loads", + "Capture screenshots only on failure and publish them with the upload-asset safe output so evidence is attached without bloating the report", + "Always stop the local preview server in a cleanup step even if earlier steps fail", + "Call noop when every viewport passes instead of leaving no output", + "Set expires and close-older-issues (or skip-if-match) on create-issue so scheduled runs don't accumulate duplicate reports" + ], + "anti_patterns": [] +} diff --git a/patterns/manifest.json b/patterns/manifest.json index 2f299f8..fdf814d 100644 --- a/patterns/manifest.json +++ b/patterns/manifest.json @@ -36,7 +36,8 @@ "repo-qa-assistant", "nitpick-reviewer", "pr-fix-assistant", - "backlog-drip" + "backlog-drip", + "responsive-docs-tester" ], "workflow_generation": "workflow-generation.json", "anti_patterns": [ diff --git a/patterns/workflow-generation.json b/patterns/workflow-generation.json index a9faea6..3bebc9d 100644 --- a/patterns/workflow-generation.json +++ b/patterns/workflow-generation.json @@ -503,6 +503,43 @@ "- **DO NOT** duplicate existing review comments." ] }, + "responsive-docs-tester": { + "icon": "device-desktop", + "capabilities": { + "bash": true, + "browser": true, + "network": true + }, + "permissions": [ + "contents", + "issues", + "pull-requests" + ], + "instructions": [ + "https://raw.githubusercontent.com/github/gh-aw/main/docs/src/content/docs/reference/playwright.md", + "syntax-tools-imports.md" + ], + "body": [ + "# {{label}}", + "", + "You are a **responsive site tester** for this repository's web app or documentation site.", + "", + "## Process", + "", + "1. Build the site and start it locally in the background, polling `localhost` until it responds", + "2. Resize to a small, named set of mobile, tablet, and desktop viewports using `playwright-cli`", + "3. At each viewport, check that the page loads, navigation is usable, content does not overflow, images are sized correctly, and basic accessibility (headings, alt text, contrast) holds", + "4. Capture a screenshot only when a check fails, and publish it with `upload-asset`", + "5. Stop the local preview server before finishing, even if earlier steps failed", + "6. Report findings in a single issue grouped by severity, or call `noop` when every viewport passes", + "", + "## Constraints", + "", + "- **DO NOT** install Playwright as an npm dependency \u2014 use the `playwright-cli` bash commands only.", + "- **DO NOT** leave the preview server running after the workflow finishes.", + "- **DO NOT** report a finding already covered by an existing open issue from this workflow." + ] + }, "performance-nut": { "icon": "graph", "capabilities": {