Bug-to-spec protocol that records root causes in §B and adds §V invariants so failures cannot recur.

CCM score
76 of 100
skills.sh installs
2.6K
GitHub stars
1.2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the six-step backprop flow: trace the failure, analyze, propose a spec change, generate a test, verify the fix, and log the commit
  • Includes a §B row template and a §V invariant template, with worked examples for refund idempotency and parameterized queries
  • Enforces a rule that every invariant ships with a failing test named after it, such as TestV7_RefundIdempotent
  • Designed for test failures, bug reports, post-mortems, and explicit requests where a spec should record the cause

Install

$ npx -y skills add juliusbrussee/cavekit --skill backprop -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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 /build verification.
  • User reports bug.
  • Post-mortem after production incident.
  • /check flags 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

Details

Repository
github.com/juliusbrussee/cavekit
Categories
Debugging, Testing & QA
First seen
May 16, 2026

More from juliusbrussee/cavekit

All 5

Similar to Backprop

More Debugging