speckit-bugfix-patch
Skill1 starsChanged 3 days agoApache-2.0View on GitHub
Surgically update spec, plan, and tasks to address the reported bug
In this repository28 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- autopilot-supervisorSkill
- reclaim-diskSkill
- speckit-analyzeSkill
- speckit-autopilotSkill
- speckit-bugfix-reportSkill
- speckit-bugfix-switchSkill
- speckit-bugfix-verifySkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-convergeSkill
- speckit-docguard-diagnoseSkill
- speckit-docguard-fixSkill
- speckit-docguard-generateSkill
- speckit-docguard-guardSkill
- speckit-docguard-reviewSkill
- speckit-docguard-scoreSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
- speckit-tdd-planSkill
- speckit-tdd-runSkill
- speckit-tdd-setupSkill
- speckit-tdd-verifySkill
- visual-passSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 8 are distinctive, and 4 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.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Verify a spec-kit project exists by checking for .specify/ directory
- Very specific: line 30
Check for bug reports in specs/{feature}/bugs/ — if a bug ID is provided, load that report
- Very specific: line 31
If no bug report exists, inform the user and suggest running /speckit.bugfix.report first
- Distinctive: line 35
Load bug context: Read the relevant bug report and all spec artifacts:
- Distinctive: line 51
Add missing requirements under the affected user story
- Distinctive: line 53
Add success criteria for untested flows
- Distinctive: line 54
Update assumptions if dependencies changed
- Distinctive: line 55
Add a bugfix note:
- Distinctive: line 61
Update affected sections with new context
- Distinctive: line 62
Add complexity notes for newly discovered edge cases
- Very specific: line 72
Mark false completions: Add ⚠️ Reopened prefix to task description
- Distinctive: line 73
Update Wave DAG: If present, regenerate to include new tasks
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Bugfix Patch Skill
Patch Spec Artifacts
Surgically update spec.md, plan.md, and tasks.md to address a reported bug — adds missing requirements, fixes conflicts, reopens false completions, and adds new tasks. Minimal changes only, never regenerates from scratch.
User Input
$ARGUMENTSYou MUST consider the user input before proceeding (if not empty). The user may specify a bug report to patch (e.g., "BUG-001") or describe the fix directly.
Prerequisites
- Verify a spec-kit project exists by checking for
.specify/directory - Locate the current feature's spec directory
- Check for bug reports in
specs/{feature}/bugs/— if a bug ID is provided, load that report - If no bug report exists, inform the user and suggest running
/speckit.bugfix.reportfirst
Outline
- Load bug context: Read the relevant bug report and all spec artifacts:
- Bug report:
specs/{feature}/bugs/BUG-{NNN}.md(if specified) - Required:
spec.md, and at least one ofplan.mdortasks.md - Optional:
research.md,data-model.md
- Bug report:
Determine patches: Based on the bug type, plan minimal changes:
Bug Type spec.md Patch plan.md Patch tasks.md Patch Spec gap Add missing requirement to affected user story Add implementation note to relevant section Add new task(s) for the missing requirement Spec conflict Resolve conflict with strikethrough on superseded text + new clarified requirement Update affected section Update affected task descriptions Implementation drift Add clarification note to requirement No change (plan was correct) Reopen drifted task with correction note Untested flow Add success criterion for the edge case Add edge case to complexity tracking Add verification task Dependency issue Update assumption about external dependency Update technical context Add dependency investigation task - Patch spec.md:
- Add missing requirements under the affected user story
- Mark conflicting text with
~~strikethrough~~and reason - Add success criteria for untested flows
- Update assumptions if dependencies changed
- Add a bugfix note:
**Bugfix**: [DATE] — [BUG-NNN] [Brief description of what was patched]
- Patch plan.md (if it exists):
- Update affected sections with new context
- Add complexity notes for newly discovered edge cases
- Preserve all existing content — only add or annotate
- Add a bugfix note:
**Bugfix**: [DATE] — [BUG-NNN] Updated from bugfix patch
- Patch tasks.md (if it exists):
- Add new tasks: Assign next sequential IDs, proper dependencies, and story labels
- Reopen tasks: Change
[x]back to[ ]with a note:(reopened — BUG-NNN) - Mark false completions: Add
⚠️ Reopenedprefix to task description - Update Wave DAG: If present, regenerate to include new tasks
- Add a bugfix note:
**Bugfix**: [DATE] — [BUG-NNN] Updated from bugfix patch
- Update bug report: Mark the bug report file as patched:
**Status**: Patched **Patched**: [DATE] - Report: Output a summary:
- What changed in each artifact
- How many requirements were added or updated
- How many tasks were added or reopened
- Suggest next step:
/speckit.bugfix.verifyto confirm consistency, then/speckit.implementto apply the code fix
Rules
- Surgical updates only — never regenerate artifacts from scratch, only modify affected sections
- Never delete content — use strikethrough for superseded text, preserve history
- Preserve formatting — match existing artifact style exactly
- Track changes — always add bugfix notes with dates and bug IDs
- Reopen, don't delete tasks — falsely completed tasks get reopened, not removed
- Require bug report — if no bug report or user description is provided, refuse to patch and suggest
/speckit.bugfix.reportfirst - Minimal changes — change only what is necessary to address the specific bug
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.

