agentleFS
wheslleyrimarwheslleyrimar/BuildCLI-Agents/.claude/skills/patch/SKILL.md

patch

Skill3 starsChanged 11 days agoMITView on GitHub

Fix a defect on the smallest context footprint — one band, the affected files. Add --trace to file a defect blueprint.

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the description and pin down the affected file(s).

    line 25
  2. Distinctive:

    Read the affected file(s), and no more of them than the defect requires.

    line 34
  3. Very specific:

    When --trace is passed:

    line 41
  4. Very specific:

    Write a short brief.md: summary, root cause hypothesis, affected files, acceptance criterion (the defect no longer reproduces), owning band.

    line 45
  5. Very specific:

    Never read context.md whole.

    line 66
  6. Distinctive:

    Do not tidy the surrounding code unless the untidiness is the defect.

    line 67

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “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

Patch

Arguments

Defect description and/or file path(s). Add --trace to file a defect blueprint alongside the fix.

Output

Code fix + root cause. With --trace: also blueprints/defects/<slug>/brief.md and a moved .buildcli/active.

Goal

Diagnose and repair with the least context that can do the job. Load the one band that owns the broken code. Nothing beyond it.

Steps

  1. Read the arguments:
    • --trace present → file a defect blueprint before fixing (see Trace mode).
    • Otherwise → fix directly, no blueprint artifacts.
  2. Read the description and pin down the affected file(s).
  3. Route to a band by file path or symptom:
    • API, service, auth, middleware → [band:service]
    • component, page, client state, routing → [band:interface]
    • migration, model, query, schema → [band:store]
    • test file → [band:verify]
    • pipeline, infra, environment config → [band:delivery]
  4. Load only that band: .buildcli/runtime/bcx band <name>. Never the whole file — with the harness enforced, that read is blocked.
  5. Read the affected file(s), and no more of them than the defect requires.
  6. Name the root cause. If you are not sure, state the hypothesis before changing anything.
  7. Apply the minimal fix that resolves it without side effects.
  8. Flag any risk or follow-up that lands in another band.

Trace mode (--trace)

When --trace is passed:

  1. Build a kebab-case slug from the description.
  2. Create blueprints/defects/<slug>/.
  3. Write a short brief.md: summary, root cause hypothesis, affected files, acceptance criterion (the defect no longer reproduces), owning band.
  4. Run .buildcli/runtime/bcx active blueprints/defects/<slug>.
  5. Fix as normal.
  6. Once fixed, update brief.md with the confirmed root cause and what changed.

Reach for --trace when:

  • The defect spans several files or resisted a first diagnosis.
  • You want it tracked next to features for the release notes.
  • The root cause is surprising and worth writing down.

Output

  • The fixed file(s)
  • Root cause: one sentence
  • Fix summary: what changed and why
  • Cross-band flags, if the fix ripples
  • With --trace: the path to blueprints/defects/<slug>/brief.md

Rules

  • Never read context.md whole. One band.
  • Do not tidy the surrounding code unless the untidiness is the defect.
  • Root cause still unclear after reading the file? Ask. Do not guess in code.
  • A fix that spans bands is not one fix. Flag it and split it.
  • --trace is opt-in. A one-line typo fix does not need a blueprint.

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.

Reviews can't be read right now.

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.