Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-08-31 from 223 source repos, 175 active workflows, and 671 total workflows scanned. The current wizard manifest lists 29 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-08-31 from 223 source repos, 175 active workflows, and 671 total workflows scanned. The current wizard manifest lists 30 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

Expand All @@ -23,7 +23,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, 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-iteration-loop, repo-qa-assistant, security-scanner, skill-pr-reviewer, user-simulator.
- accessibility-expert, agent-cost-tracker, 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, skill-pr-reviewer, 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:**
Expand Down
40 changes: 40 additions & 0 deletions patterns/archetypes/pr-fix-assistant.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"id": "pr-fix-assistant",
"label": "PR Fix Assistant",
"description": "Fix a failing pull request on demand via slash command by pushing corrections directly to its branch",
"success_rate": null,
"count": 0,
"recommended_triggers": [
{
"type": "slash_command",
"config": {}
},
{
"type": "reaction",
"config": {}
}
],
"recommended_safe_outputs": [
"pull-requests"
],
"recommended_tools": [
"push-to-pull-request-branch"
],
"timeout_minutes": 20,
"prompt_style": "role-steps",
"size_range_bytes": [
2000,
6000
],
"top_repos": [],
"tips": [
"Use push-to-pull-request-branch instead of create-pull-request \u2014 the fix belongs on the existing PR branch, not a new one",
"Set required-title-prefix or required-labels on push-to-pull-request-branch so pushes are restricted to PRs this workflow is meant to touch",
"Analyze failing CI logs to identify the root cause before making any change; run tests and formatters locally to verify the fix before pushing",
"Add a comment summarizing the change and reason once the fix is pushed, so reviewers can see what happened without re-reading the diff",
"Use tools.github.min-integrity: none since a maintainer-invoked slash command already establishes trust for the triggering PR",
"Pair with reaction: \"eyes\" so the requester gets immediate acknowledgement while the agent works",
"Do NOT open a second pull request or push to unrelated branches \u2014 scope every change to the triggering PR only"
],
"anti_patterns": []
}
3 changes: 2 additions & 1 deletion patterns/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"contribution-guidelines-checker",
"link-checker",
"repo-qa-assistant",
"nitpick-reviewer"
"nitpick-reviewer",
"pr-fix-assistant"
],
"workflow_generation": "workflow-generation.json",
"anti_patterns": [
Expand Down
46 changes: 46 additions & 0 deletions patterns/workflow-generation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,52 @@
"- **DO NOT** retry links already recorded as unfixable in cache memory without new evidence."
]
},
"pr-fix-assistant": {
"icon": "git-pull-request",
"capabilities": {
"bash": true,
"github_toolsets": true
},
"permissions": [
"contents",
"pull-requests"
],
"github_toolsets": [
"repos",
"pull_requests",
"actions"
],
"instructions": [
"safe-outputs-management.md"
],
"trigger_overrides": {
"slash_command": {
"yaml": "slash_command:\n name: {{name}}\n events: [pull_request_comment]",
"description": "on a slash command left as a pull request comment"
}
},
"body": [
"# {{label}}",
"",
"You are an **on-demand pull request fixer** for this repository, invoked by a slash command.",
"",
"## Process",
"",
"1. Read the pull request, the invoking comment, and the logs from any failing check runs",
"2. Identify the root cause of the failure or the requested change",
"3. Check out the pull request branch and implement the fix",
"4. Run the repository's tests and formatters to verify the fix before pushing",
"5. Push the fix to the pull request branch with `push-to-pull-request-branch`",
"6. Add a comment summarizing the change and why it was made",
"",
"## Constraints",
"",
"- **DO NOT** open a new pull request \u2014 push the fix to the existing branch instead.",
"- **DO NOT** push to any branch other than the triggering pull request's branch.",
"- **DO NOT** push a change that has not been verified by the repository's own tests or formatters."
],
"min_integrity": "none"
},
"repo-qa-assistant": {
"icon": "comment-discussion",
"capabilities": {
Expand Down
2 changes: 1 addition & 1 deletion test/copilot-instructions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('copilot instructions pattern guidance', () => {
}

expect(empirical).toHaveLength(9);
expect(curated).toHaveLength(20);
expect(curated).toHaveLength(21);
for (const id of empirical) expect(instructions).toContain(`\`${id}\``);
for (const id of curated) expect(instructions).toContain(id);
expect(instructions).toContain('`custom` is hidden from the wizard archetype cards');
Expand Down