From supergraph
Plan-aware auto-fix loop that runs tests, lint, format, and graph checks after coding. Updates plan task status. Use after execute/tdd.
How this skill is triggered — by the user, by Claude, or both
Slash command
/supergraph:fixThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Plan-aware auto-fix loop. Ensure tests pass, lint clean, format applied, graph risks handled.
Plan-aware auto-fix loop. Ensure tests pass, lint clean, format applied, graph risks handled.
/supergraph:fix | /supergraph:fix plan auth-login | /supergraph:fix plan auth-login task 2
"🔧 /supergraph:fix — starting auto-fix loop..."
0 plans → skip | 1 → use | >1 → ask | plan <slug> → match.
Read ## Environment Context, fix scoped task or all in-progress/stuck tasks.
Read from plan ## Environment Context or .supergraph-env (set by /supergraph:scan). Missing → STOP, run scan first.
Missing command → skip phase, report as SKIP.
git diff --name-only && git diff --cached --name-only
Graph: get_minimal_context_tool(), get_impact_radius_tool(files=[changed], depth=3), query_graph(query_type="tests", target=each_file).
No changed files and no in-progress/stuck tasks → STOP: nothing to fix.
Before starting the fix loop, triage IDE-level errors with Serena:
for each changed_file:
mcp__serena__get_diagnostics_for_file(file=changed_file)
Fix any type errors found before entering the loop — reduces iterations by catching obvious errors early. Skip if Serena unavailable.
At iteration start: "🔧 Fix iteration N/3 — running tests..."
| Phase | Action |
|---|---|
| Reproduce | Smallest failing command + expected vs actual. Classify: assertion / crash / timeout / env / data pollution / race. |
| Tests | Run targeted tests (from graph) else $TEST_CMD. FAIL → trace to root cause, fix source. Don't modify tests unless demonstrably wrong. |
| Serena fix | After source fix: mcp__serena__get_diagnostics_for_file(file=<fixed_file>) — confirm fix didn't introduce new type errors before re-running suite. For body fixes: prefer mcp__serena__replace_symbol_body(symbol=<fn>). For renames: mcp__serena__rename_symbol(old, new). Skip if Serena unavailable. |
| Format+Lint | $FORMAT_CMD then $LINT_CMD. If format changed files → re-run lint. |
| Graph | detect_changes_tool(), get_surprising_connections_tool(), get_knowledge_gaps_tool(), refactor_tool(action="dead_code"). CRITICAL → fix. WARNING → fix or record. |
| Decide | All clean → break. Tests/lint fail → continue loop. |
Status: completedstuck + append STUCK log## Auto-Fix Report
- Iterations: N/3 | Tests: PASS|FAIL|SKIP | Lint: PASS|FAIL|SKIP | Format: PASS|SKIP
- Graph: PASS|WARNING|CRITICAL | Plan status: updated|none
- Issues: [list or "none"]
Next: /supergraph:verify → /supergraph:review
git add -Amcp__serena__replace_symbol_body for body fixes and mcp__serena__rename_symbol for renames when Serena is availablenpx claudepluginhub datit309/supergraph --plugin supergraphIteratively reviews code for critical issues with code-reviewer, auto-fixes via fixer agent, verifies tests pass, repeats up to 5 cycles until clean.
Automates fixes for Evaluate-Loop failures: parses evaluator reports, creates tasks in plan.md, executes with git commits, verifies locally, and triggers re-evaluation up to 5 cycles.