mirror of
https://github.com/github/awesome-copilot.git
synced 2026-07-14 01:51:02 +00:00
2.4 KiB
2.4 KiB
Step 5: Apply fixes
Sub-agent type: general-purpose, one sub-agent per finding,
parallel max 5 concurrent; budget: 5 min each. If step 4 returned
more than 5 fix rows, the parent runs step 5 in waves of ≤5.
Inputs
Per sub-agent (one finding per invocation):
thread_id,file,linefrom step 3.- The finding
summaryand Copilot's suggested fix (if any). - The triage
rationalefrom step 4 — the agent already decided this is afix; this sub-agent only implements it.
Return contract
{ thread_id, files_touched, summary, status }
Where status ∈ complete | partial | blocked and summary is
a one-line description of the change.
Procedure
- Discover repo conventions for the area being edited — first.
Before writing any code, read:
.github/instructions/*.mdwhoseapplyToglob matches the file's path,.github/skills/,AGENTS.md,CONTRIBUTING.md,- neighbor-file patterns in the same directory and recent commits touching similar files.
- Apply the fix in line with those conventions.
- Return
files_touched+ a one-linesummary+status.
Gotchas
- Max 5 concurrent fix sub-agents. The cap prevents fix-fanout chaos; the parent merges results and reconciles file conflicts between waves before step 6.
- Never invent a generic answer that contradicts repo practice. That's the "elephant in school" anti-pattern — a Copilot suggestion in isolation looks right but breaks the project's lint, format, spell-check, license-header, or framework conventions. The discovery step is mandatory, not optional.
- One finding per sub-agent. Fixes that need to touch the same file get serialized by the parent between waves — don't merge multiple findings into one sub-agent invocation.
- Project policy beats Copilot suggestion. If discovery surfaces a documented convention (spell-check allowlist mechanism, lint suppression style, etc.) that contradicts the suggested fix, follow the convention and reflect that in the reply body drafted in step 8 (see 04-triage.md).
- Push back with written rationale if implementing the fix would
over-engineer the design for a hypothetical edge case — flip the
triage to
declineand returnstatus: blockedwith the rationale so step 8 drafts the right reply.