fix-flow
Skill4 starsChanged 5 months agoMITView on GitHub
Safe, project-aware fix workflow for the 4-layer ecosystem. Enforces impact-check BEFORE editing, surgical change, verify AFTER, and logs the gotcha — so fixes don't break other things and the lesson is captured. Use when the user says 'поправи', 'оправи', 'fix this', 'счупи се', 'fix the bug/error', or asks to fix anything in a project under {{CODE_PATH}}. NOT for finding an unknown root cause (use systematic-debugging first).
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- dev-wikiSkill
- four-layer-initSkill
- graphifySkill
- improve-loopSkill
- kb-ingestSkill
- skill-creatorSkill
- token-optimizerSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Read the project graph FIRST (cheap context): {{WIKI_PATH}}\<Project>\graph\knowledge_graph.json — check critical_rules for a known gotcha …
- Distinctive: line 31
If GitNexus has no data for the repo, fall back to a single targeted Grep for callers.
- Distinctive: line 39
Keep the change minimal and reversible.
- Distinctive: line 42
Run the project's real check (never claim "fixed" without running it):
- Very specific: line 49
If the bug was non-obvious, append a dated one-liner to {{WIKI_PATH}}\<Project>\wiki\sources\learnings.md (or .ai/learnings.md).
- Very specific: line 51
If it hit a 2nd project → promote to _shared/patterns.md.
- Very specific: line 52
If worth cross-session recall: python3 ~/.claude/scripts/pinecone.py save <NS> <id> "<gotcha>".
- Distinctive: line 53
If it's a recurring class of mistake → ask: "Да обновя ли CLAUDE.md с това правило?" (Boris pattern).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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-flow — Safe project fix workflow
Codifies the global CLAUDE.md discipline (tools first, grep last · impact before
change · verify · record correction) into a repeatable 5-step fix loop. This is the
execution guardrail — it assumes you already know WHAT to fix. If the root cause
is unknown, run systematic-debugging first, then come back here to apply the fix.
When to use vs not
| Situation | Use |
| Known fix to apply in a project | fix-flow (this) |
| Unknown root cause / mysterious bug | systematic-debugging first |
The 5 steps (do them in order, don't skip)
1. UNDERSTAND — pin the target
- Restate the bug in one line + the exact symptom (error text, wrong behavior).
- Define "done": the concrete, verifiable success condition.
- Read the project graph FIRST (cheap context):
{{WIKI_PATH}}\<Project>\graph\knowledge_graph.json— checkcritical_rulesfor a known gotcha before touching code.
2. IMPACT — what will break (BEFORE editing)
- GitNexus MCP:
impact({target: "<symbol/function>", minConf: 0.8}). 1impact()≈ 500 tokens, replaces ~10 Grep+Read (~50k tokens). Always prefer. - If GitNexus has no data for the repo, fall back to a single targeted Grep for callers.
- Output: list the call sites / dependents the fix could affect. If the blast radius is large, surface it to the user before proceeding.
3. FIX — surgical edit
- Touch ONLY what the fix requires (Karpathy: surgical edits). No drive-by refactors.
- Respect the project's
critical_rules(e.g. static routes before/{id}, tenant-isolation field, soft-delete filter, money column type). - Keep the change minimal and reversible.
4. VERIFY — evidence before claiming done
Run the project's real check (never claim "fixed" without running it):
- Python/FastAPI:
python -m py_compile <file>then the relevantpytest/ endpoint curl - TS/React:
npx tsc --noEmitand/ornpm run build - Confirm the original symptom is gone (re-trigger it). Paste the passing output.
- This is the
verification-before-completionrule: evidence, not assertion.
5. LOG — capture the lesson (only if novel)
- If the bug was non-obvious, append a dated one-liner to
{{WIKI_PATH}}\<Project>\wiki\sources\learnings.md(or.ai/learnings.md). - If it hit a 2nd project → promote to
_shared/patterns.md. - If worth cross-session recall:
python3 ~/.claude/scripts/pinecone.py save <NS> <id> "<gotcha>". - If it's a recurring class of mistake → ask: "Да обновя ли CLAUDE.md с това правило?" (Boris pattern).
Output to the user
Report in this shape (concise, Bulgarian per global rules):
Проблем: <one line>
Impact: <N call sites checked — safe / affected: ...>
Fix: <what changed, which file:line>
Verify: <command run → passing output>
Logged: <learnings.md / pinecone / none (trivial)>Anti-patterns (do NOT)
- ❌ Edit before running
impact()— you may silently break a caller. - ❌ Claim "fixed" without running the verify command.
- ❌ Bundle unrelated refactors into the fix.
- ❌ Re-grep the whole codebase when the graph + impact() answer it.
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.

