agentleFS
vatevstoilvatevstoil/claude-self-learning-os/skills/fix-flow/SKILL.md

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).

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
  1. Very specific:

    Read the project graph FIRST (cheap context): {{WIKI_PATH}}\<Project>\graph\knowledge_graph.json — check critical_rules for a known gotcha …

    line 25
  2. Distinctive:

    If GitNexus has no data for the repo, fall back to a single targeted Grep for callers.

    line 31
  3. Distinctive:

    Keep the change minimal and reversible.

    line 39
  4. Distinctive:

    Run the project's real check (never claim "fixed" without running it):

    line 42
  5. Very specific:

    If the bug was non-obvious, append a dated one-liner to {{WIKI_PATH}}\<Project>\wiki\sources\learnings.md (or .ai/learnings.md).

    line 49
  6. Very specific:

    If it hit a 2nd project → promote to _shared/patterns.md.

    line 51
  7. Very specific:

    If worth cross-session recall: python3 ~/.claude/scripts/pinecone.py save <NS> <id> "<gotcha>".

    line 52
  8. Distinctive:

    If it's a recurring class of mistake → ask: "Да обновя ли CLAUDE.md с това правило?" (Boris pattern).

    line 53

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

SituationUse
Known fix to apply in a projectfix-flow (this)
Unknown root cause / mysterious bugsystematic-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 — check critical_rules for a known gotcha before touching code.

2. IMPACT — what will break (BEFORE editing)

  • GitNexus MCP: impact({target: "<symbol/function>", minConf: 0.8}). 1 impact() ≈ 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 relevant pytest / endpoint curl
  • TS/React: npx tsc --noEmit and/or npm run build
  • Confirm the original symptom is gone (re-trigger it). Paste the passing output.
  • This is the verification-before-completion rule: 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.