
Backprop
When a test fails or a bug surfaces, most workflows fix the code and move on. This skill does something different: it traces the root cause, asks whether a new invariant would prevent recurrence, and appends both a bug log entry and a testable rule to your spec. You get a §B row documenting what broke, a §V invariant stating the new constraint, a test that enforces it, and the fix itself, all in one commit. The discipline is simple: bugs should update the specification, not just the implementation. If you're doing specification-driven development or want your project's spec to actually grow smarter over time instead of rotting, this automates the feedback loop that plan-then-execute skips.
- skills.sh installs
- 2.6K
- GitHub stars
- 1.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add juliusbrussee/cavekit --skill backprop --agent claude-codeInstalls into .claude/skills of the current project.
Files
backprop — bug → spec
Plan-then-execute fixes the code & forgets. SDD fixes the code AND edits spec so recurrence is impossible. That edit is backprop.
WHEN TO BACKPROP
- Test failed at
/buildverification. - User reports bug.
- Post-mortem after production incident.
/checkflags VIOLATE with root cause found.
SIX STEPS
1. TRACE
Read failure output / bug report. Find exact file:line of wrong behavior. Name root cause in one caveman sentence.
2. ANALYZE
Ask three questions:
- Would a new §V invariant catch this class of bug? (most common: yes)
- Is §I wrong — did spec claim shape the code cannot deliver? (sometimes)
- Is §T wrong — did we build the wrong thing? (rare but real)
3. PROPOSE
Draft the spec change. Never skip §B; §V/§I/§T are case-by-case.
Template:
§B row: B<next>|<date>|<root cause>|V<N>
§V line: V<next>: <testable rule that would have caught it>
Example:
§B row: B3|2026-04-20|refund job ran twice on retry|V7
§V line: V7: ∀ refund → idempotency key check before charge reversal
Sponsors
Details
- Repository
- github.com/juliusbrussee/cavekit
- Categories
- Testing & QA, Debugging, Productivity & Planning
- First seen
- May 16, 2026