
Defect driven specification
Guides agents to turn each bug into a named, tested spec before fixing it
Defect driven specification is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 6
- Last commit
- License
- Apache-2.0
- Listing updated
Similar skills
About Defect driven specification
This is a reference rulebook for handling bug-driven changes. It lays out a loop in which a reported defect is first written down as an explicit invariant, then captured as a scenario tagged as a known defect, and only then fixed, so the corrected behavior stays specified and enforced over time.
The rulebook defines three annotation tags for scenarios: one for behavior believed to be a bug, one for behavior that looks wrong but is deliberate, and one for behavior whose correctness cannot be determined. Each tag comes with a comment convention, such as BUG, LIKELY INTENT and ACTUAL for known defects, or RATIONALE for accepted risks. It also describes how annotations should be treated as work items, with counts trending toward zero and unresolved ambiguities reviewed within a set window.
The skill is described as loaded into context by other planning and change workflows rather than invoked directly. It notes that annotation form varies by specification level and gives an example audit configuration with limits on known-defect counts and the maximum age of unverified intent. It has no scripts and sets no tool permissions.
When your agent uses it
Every bug becomes a spec before it becomes a fix — the defect-driven loop with @known-defect, @accepted-risk, @unverified-intent annotations. L1+ reference rulebook.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (4 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the fff plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add zerotechdebt/ffflow
/plugin install fff@ffflowOr copy only this skill to ~/.claude/skills/defect-driven-specification:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/defect-driven-specification &&
cp -R "$tmp/plugin/skills/defect-driven-specification" ~/.claude/skills/defect-driven-specification &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/defect-driven-specification inside it instead.
Copy the skill folder to ~/.agents/skills/defect-driven-specification to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/defect-driven-specification &&
cp -R "$tmp/plugin/skills/defect-driven-specification" ~/.agents/skills/defect-driven-specification &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/defect-driven-specification inside it instead.
Copy the skill folder to ~/.cursor/skills/defect-driven-specification to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/defect-driven-specification &&
cp -R "$tmp/plugin/skills/defect-driven-specification" ~/.cursor/skills/defect-driven-specification &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/defect-driven-specification inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/zerotechdebt/ffflow.git --path plugin/skills/defect-driven-specificationOr copy the folder to ~/.gemini/skills/defect-driven-specification yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/defect-driven-specification:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/defect-driven-specification &&
cp -R "$tmp/plugin/skills/defect-driven-specification" ~/.copilot/skills/defect-driven-specification &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/defect-driven-specification inside it instead.
Get the folder:
git clone --depth 1 https://github.com/zerotechdebt/ffflow.gitThen copy ffflow/plugin/skills/defect-driven-specification into your agent's skills folder as defect-driven-specification. Agents that support SKILL.md read one folder per skill.
What it does
- Invariant-first bug workflow
- Lays out a step-by-step loop that starts by naming the violated invariant before any code change.
- Defect annotation tags
- Defines three tags for known defects, accepted risks and unverified intent, each with a comment format.
- Annotation hygiene rules
- Explains how annotation counts and ages should be tracked and resolved as work items.
- Per-level annotation forms
- Shows how annotations are written across specification levels from inline comments to Gherkin tags.
- Anti-pattern checklist
- Lists common mistakes such as fixing bugs without recording the invariant or misusing accepted-risk tags.
Good for
- Write a spec entry for a bug before fixing it
- Tag a failing scenario as a known defect
- Document why a surprising behavior is intentional
- Flag ambiguous behavior for stakeholder review
- Set up audit limits on known-defect counts
Defect driven specification FAQ
Does Defect driven specification run any scripts or tools?
No. It has no scripts and is described as a reference rulebook that other workflows load as context, not a tool that is invoked directly.
Which workflows load Defect driven specification?
The skill says it is loaded as context by plan-chat, characterize and work-issue when a bug-driven change is in scope.
What are the three annotation tags?
@known-defect marks behavior believed to be a bug, @accepted-risk marks intentional behavior that looks wrong, and @unverified-intent marks behavior whose correctness is unclear.
Is there a default review window for unverified intent?
Yes, the rulebook's default is 30 days, and the example audit configuration sets an age limit in days for these tags.
How do I install Defect driven specification in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/defect-driven-specification to use it in all your projects, or to .claude/skills/defect-driven-specification in one project. Or install the fff plugin, which includes it: /plugin marketplace add zerotechdebt/ffflow, then /plugin install fff@ffflow.
Does Defect driven specification run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Defect driven specification?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Defect driven specification?
The closest alternatives to Defect driven specification are Spec first development, Bug hunt, Spec driven development, Spec driven development and Total specification.
Where this comes from
- Description: from the skill's own SKILL.md.
More from zerotechdebt/ffflow

Onboards a project onto FFFlow: config, stack setup, then a phased roadmap
- Open source
- 6 GitHub stars
- Developer tools

Runs keep-honest audits on a project and reports drift, stale docs and tech debt
- Open source
- 6 GitHub stars
- Developer tools

Runs another interactive skill unattended, making routine choices from project context
- Open source
- 6 GitHub stars
- Developer tools

Lists and validates the adapter cartridges that FFFlow ports load in a project
- Open source
- 6 GitHub stars
- Developer tools

Extracts a behavioral spec from an unspecified codebase and plans characterization tests
- Open source
- 6 GitHub stars
- Developer tools

Adds GitHub Actions workflows that run FFFlow quality gates on pull requests
- Open source
- 6 GitHub stars
- Developer tools



