fix-runner
Skill3 starsChanged 5 months agoMITView on GitHub
Specialized, lightweight corrector dispatched by the evaluator on FAIL, or by qa-preflight after a feature is done. Reads the structured evaluation-report.json (both producers write the same schema), applies the minimal fix for the reported problem, locally revalidates the failing gate/test, commits (one commit per correction), records the attempt in progress.json, and returns control to whoever dispatched it. Does not implement new features, does not orchestrate the attempt loop, and does not decide ABORTED. Never invoked directly by a human.
In this repository23 other files it gives its agents.
- architecture-analyzerSkill
- claude-switch-accountSkill
- coupling-mapSkill
- deep-analyzerSkill
- e2e-test-validatorSkill
- e2e-test-writerSkill
- evaluatorSkill
- gate-builderSkill
- handoff-writerSkill
- implement-featureSkill
- integration-test-validatorSkill
- integration-test-writerSkill
- monorepo-unit-test-validatorSkill
- monorepo-unit-test-writerSkill
- pabx-design-systemSkill
- pabx-e2e-test-validatorSkill
- pabx-e2e-test-writerSkill
- playwright-cliSkill
- prd-writerSkill
- qa-preflightSkill
- spec-writerSkill
- unit-test-validatorSkill
- unit-test-writerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 8 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
NOT its job — the evaluator routes those to the matching test-writer (confirmed by the matching test-validator).
- Very specific: line 26
If no report path is given, auto-discover the feature's evaluation-report.json in docs/<feature-id>-<kebab>/ and lastEvaluationReport in …
- Distinctive: line 29
If no error report can be found, abort: "fix-runner requires an evaluation-report from the evaluator or from qa-preflight."
- Very specific: line 49
Read the evaluation-report.json: each failures[] entry — kind, ref, message, location, evidence.
- Very specific: line 51
Read the section, in the project's gate documentation (GATES.md or its equivalent), of every declared gate whose scope the fix touches — …
- Very specific: line 52
Read progress.json to know the feature and the current attempt.
- Very specific: line 53
Read spec.md/plan.md lazily, only for the slice needed to understand the fix.
- Very specific: line 58
If the report has multiple failures[], address them together only if they are part of the same root cause.
- Very specific: line 63
Run specifically the gate/test that failed (from the report's ref/location), not the whole suite — a cheap smoke check to avoid returning …
- Distinctive: line 64
If it still fails, adjust within the same error's scope and re-run.
- Very specific: line 75
Update progress.json: record that a correction was applied for the current attempt (e.g.
- Distinctive: line 77
"correction applied — re-evaluate F<ID>": when the local revalidation passed and the commit was made, OR
- Distinctive: line 78
"not resolved — <reason>": when the fix could not be made within scope (no commit).
- Distinctive: line 96
Do opportunistic refactoring outside the reported error.
- Very specific: line 100
Write CLEAN/FAIL/PENDING/ABORTED into progress.json or increment attempt.
- Distinctive: line 101
Use git add -A / git add ..
- Distinctive: line 102
Read the codebase with a broad upfront sweep — read lazily, scoped to the fix.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fix Runner
A surgical corrector. When the evaluator returns FAIL, it dispatches fix-runner with a structured error report. fix-runner fixes only the reported problem, with the smallest footprint, then hands control back to the evaluator to re-confirm. It is deliberately smaller and more focused than implement-feature: it corrects, it does not build.
Base docs:
https://github.com/dayvisonassis/sdd-skills/blob/main/docs/Skill_Fix_Runner.md(full rationale),https://github.com/dayvisonassis/sdd-skills/blob/main/docs/Contrato_de_Feature.md(contract criteria),https://github.com/dayvisonassis/sdd-skills/blob/main/docs/Fluxo_SDD_e_Implementacao_das_Skills.md(flow, handoff, progress.json). Report schema:../evaluator/references/evaluation-report-schema.md.
This skill is stateless about the loop. The evaluator owns the attempt counter, the limit N, and the ABORTED decision. fix-runner performs one correction per invocation.
Scope — code, not tests. fix-runner corrects production code for failures the evaluator
classifies as kind: gate or kind: observable-criterion. Test failures (kind: test) are
NOT its job — the evaluator routes those to the matching test-writer (confirmed by the matching
test-validator). If a report handed to fix-runner contains only kind: test failures, return
"not resolved — test failures must be routed to a test-writer" without touching code.
INPUT
- Target feature (ID) and the path to
evaluation-report.json— passed by theevaluator(on FAIL) or byqa-preflight(after the feature is done). Both write the same schema, and the on-disk report is the source of truth either way. - If no report path is given, auto-discover the feature's
evaluation-report.jsonindocs/<feature-id>-<kebab>/andlastEvaluationReportinprogress.json. - Auto-discovers: the feature's
contract.mdandprogress.json. Readsspec.md/plan.mdlazily, only for the context the fix needs.
If no error report can be found, abort: "fix-runner requires an evaluation-report from the evaluator or from qa-preflight."
OUTPUT
- A minimal code correction for the reported failure(s).
- One commit per correction —
fix(F<ID>): <error summary>(or the repo's style). Stage only the touched files. - A light update to
progress.jsonrecording that a correction was applied for the currentattempt(does NOT decide the state). - A signal back to the evaluator: "correction applied — re-evaluate F
<ID>" or "not resolved —<reason>". - The fix-runner does not emit a CLEAN/FAIL verdict — the evaluator re-confirms.
EXECUTION STEPS
Step 1: Resolve Input
- Resolve the target feature and locate the
evaluation-report.json(from the passed path, or auto-discover viaprogress.json'slastEvaluationReport). No report → abort.
Step 2: Load Minimal Context
- Read the
evaluation-report.json: eachfailures[]entry —kind,ref,message,location,evidence. - For each failure, re-read only the violated criterion/gate (
ref) incontract.md, so the fix conforms to the contract rather than guessing. - Read the section, in the project's gate documentation (
GATES.mdor its equivalent), of every declared gate whose scope the fix touches — not only the failing one: it states what the gate rejects and the accepted pattern the fix must follow. - Read
progress.jsonto know the feature and the currentattempt. - Read
spec.md/plan.mdlazily, only for the slice needed to understand the fix. No broad codebase sweep.
Step 3: Apply the Minimal Correction
- Fix exclusively the reported cause(s), with the smallest footprint. No opportunistic refactoring, no "while I'm here" improvements, no scope beyond the report.
- If the report has multiple
failures[], address them together only if they are part of the same root cause; otherwise fix what the report lists, in order. - Record what was changed and why (for the commit message and the handoff signal).
Step 4: Local Revalidation
- Run specifically the gate/test that failed (from the report's
ref/location), not the whole suite — a cheap smoke check to avoid returning an obviously broken fix. - If it still fails, adjust within the same error's scope and re-run. Do not expand scope to unrelated problems.
- Browser gates (e2e or visual) run against the dev server, not the files on disk. Before re-running one, confirm in the dev server's log that the rebuild after your edit finished successfully — a failed build keeps serving the previous bundle with HTTP 200. A
429or every case on the sign-in screen is the auth rate limit, not your fix: stop re-running and return "correction applied (local revalidation skipped: environment —<which>)". Every run spends logins. - This local check does NOT replace the evaluator — the evaluator re-confirms against the whole contract afterward.
Step 5: Commit
- One commit, staging only the files touched by this correction. Message:
fix(F<ID>): <error summary>(or match the repo's recent commit style). - No
git add -A/git add .. Commit on the current branch — never create or switch branches. Do not skip hooks.
Step 6: Return to the Evaluator
- Update
progress.json: record that a correction was applied for the currentattempt(e.g. a note/timestamp). Do not set CLEAN/FAIL/PENDING/ABORTED and do not incrementattempt— those belong to the evaluator. - Signal back:
- "correction applied — re-evaluate F
<ID>" when the local revalidation passed and the commit was made, OR - "not resolved —
<reason>" when the fix could not be made within scope (no commit). - "not resolved — needs an allowlist decision:
<why>" when the only way to clear a finding is a gate exception, which is a human decision (definition in../evaluator/references/evaluation-report-schema.md, "Gate exceptions"). No commit for it. Name each finding as the gate prints it (file, message and code), and say which of the categories the gate's section accepts it falls in: the evaluator checks the claim. Never for a failure markedexceptionRefused: a human already refused that exception, so correct it or return an ordinary "not resolved". - Account for every failure in the report: fixed, claimed, or not resolved. When one invocation does more than one of these, send the signals together. The evaluator counts the committed correction.
- "correction applied — re-evaluate F
RULES
Always:
- Act only from an evaluation-report — produced by the
evaluatoror byqa-preflight. - Re-read the violated criterion/gate (
ref) incontract.mdbefore fixing, so the fix conforms. - Fix only the reported cause, with the smallest possible footprint.
- Locally revalidate the failing gate/test before returning.
- Make one commit per invocation, staging only the touched files.
- Hand control back to the evaluator for re-confirmation.
Never:
- Implement new features or widen the contract's scope.
- Do opportunistic refactoring outside the reported error.
- Make a gate exception of any kind (an allowlist or baseline entry, a raised ratchet, an edited gate rule or runner, an inline disable) — that is a human decision. When the only way out is one, return "not resolved — needs an allowlist decision:
<why>". - Make a gate pass by hiding the pattern it rejects from its detection: renaming the handle it recognises, wrapping the call in a helper it cannot see, or moving the code out of its scanned path. The fix is the accepted pattern in the gate's section.
- Count attempts, decide ABORTED, or emit a CLEAN/FAIL verdict (the evaluator's job).
- Write CLEAN/FAIL/PENDING/ABORTED into
progress.jsonor incrementattempt. - Use
git add -A/git add .; skip hooks; create or switch branches. - Read the codebase with a broad upfront sweep — read lazily, scoped to the fix.
Edge Cases
No evaluation-report found: abort — the fix-runner needs the evaluator's report to act.
Report references a ref not found in contract.md: fix from the report's message/location/evidence, and note the missing contract reference in the return signal so the evaluator/spec-writer can reconcile.
kind: qa-finding: this is the expected shape, not an anomaly — the finding is a real defect that no contract criterion covered, and its ref is the QA case id that found it (e.g. CT-ACESSIBILIDADE-002). Fix from message/location/evidence and do not report a missing contract reference. Everything else is unchanged: minimal footprint, local revalidation, one commit.
Fix can't be made within scope (the real cause is outside the reported failure, or requires a spec/contract change): do not stretch scope. Return "not resolved — <reason>" without committing, so the evaluator can decide (re-evaluate, PENDING, or eventually ABORTED).
Local revalidation can't run in this environment (missing toolchain/browser): make the minimal fix the report implies, commit, and return "correction applied (local revalidation skipped: <reason>) — re-evaluate F<ID>" so the evaluator runs the authoritative check.
Multiple unrelated failures in one report: fix each within its own scope; if one is unresolvable, fix the others, commit, and return a combined signal noting which remain.
Working tree has unrelated changes: stage only the files this correction touched; leave everything else untouched.
Commit-message style inconsistent in recent history: fall back to fix(F<ID>): <error summary>.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

