build
juliusbrussee/cavekit
Plan-then-execute implementation against SPEC.md with automatic backprop on failure.
What is build?
The build skill reads your SPEC.md, plans implementation of specified tasks, executes them with verification, and automatically invokes backprop to update invariants when tests fail. Use it when you're ready to implement tasks defined in your spec.
- Parses SPEC.md and executes tasks by status (`.` pending, `~` in-progress, `x` complete)
- Generates implementation plans that cite all applicable §V invariants and §I interfaces
- Runs verification commands (tests, builds, lints) as the external oracle for task completion
- Automatically invokes backprop skill on test/build failure to update invariants before retrying
- Tracks task progress by flipping status cells and committing after each task completes
How to install build
npx skills add https://github.com/juliusbrussee/cavekit --skill build- SPEC.md must exist in the project root (defers to spec skill if missing)
- FORMAT.md optional but recommended for consistent formatting
- §R (external facts), §V (invariants), §I (interfaces), and §T (tasks) sections in SPEC.md
How to use build
- 1.Ensure SPEC.md exists with tasks defined in §T section
- 2.Invoke build with a task selector: `build §T.3`, `build --next`, or `build --all`
- 3.Review the generated plan and confirm (or skip for trivial tasks)
- 4.Build executes tasks in order, running verification commands after each
- 5.If verification fails, backprop is auto-invoked to update invariants; build resumes against updated spec
- 6.Check SPEC.md status cells to see progress (`.` pending, `~` in-progress, `x` complete)
Use cases
- Implement a specific task from your spec: `build §T.3`
- Continue from where you left off: `build --next`
- Execute all pending tasks in order: `build --all`
- Build the entire spec when ready: `run the build`
- Developers using spec-driven development with SPEC.md
- Teams that need deterministic, single-threaded implementation with automatic failure recovery
- Projects requiring invariant-based verification and backpropagation on test failures
build FAQ
The build skill will tell you to invoke the spec skill first to create it. Build cannot proceed without a spec.
When a test or build fails, backprop analyzes whether the failure is a code bug, spec error, or unspecified edge case. If the spec is wrong or incomplete, it updates §V invariants and §B (memory) before build resumes.
No. The plan phase requires you to name the exact tests/acceptance criteria from your spec that prove each invariant. Build runs those named tests as the verification oracle.
No. Build is single-threaded and native—no swarm, no parallel workers. It executes tasks sequentially in order.
`.` = pending, `~` = in-progress (flipped when task starts), `x` = complete (flipped when verification passes). Only build modifies these; other spec edits go through the spec skill.
Full instructions (SKILL.md)
Source of truth, from juliusbrussee/cavekit.
name: build
description: |
Plan-then-execute implementation against SPEC.md. Native single-thread
loop, no sub-agents. On test or build failure, auto-invokes the backprop
skill before retrying — a failed verification always considers whether
a new §V invariant would prevent recurrence. Triggers when the user asks
to build, implement, execute the spec, or tackle a specific §T task
(build §T.3, build --next, implement next task, run the build).
Expects SPEC.md to exist; if not, defers to the spec skill.
build — implement spec
Single-thread native plan→execute. You are main Claude. No swarm.
LOAD
- Read
SPEC.md. If missing → tell user to invoke the spec skill first. Stop. - Read
FORMAT.mdonce if not loaded. - Read §R if present — external facts the build must honor, ⊥ re-derive or contradict.
- Parse invocation args:
§T.n→ that task only--next→ lowest-numbered row with status.or~--allor empty → every.row in §T order
High blast radius (shared module, auth, data, money, public §I)? Run /review first. Trivial & reversible? Skip planning ceremony, just do step EXECUTE.
PLAN
Native plan mode — you delegate to it, you do not reinvent task breakdown. For chosen task(s):
- Cite every §V invariant that applies. Plan must respect all.
- Cite every §I interface touched. Plan must preserve shape.
- List files to create / edit.
- Verification contract — name the EXACT test(s) / acceptance criteria that prove each §V touched. Which test, not "add tests". "Do TDD" alone backfires; the spec says what to check. Each §V touched → a named test that fails first.
- Name verification command (test, build, lint) — this is the external oracle. Green = done; ⊥ "looks done".
Show plan. Wait for user OK unless auto mode.
EXECUTE
Per task in order:
- Flip §T.n status cell
.→~. Just write to SPEC.md. - Edit code per plan.
- Run verification command.
- Pass → flip
~→x. Next task. - Fail → invoke backprop skill. Do NOT retry blindly.
FAIL → BACKPROP
On test/build failure:
- Read failure output.
- Ask: is failure (a) my code bug, (b) spec wrong, or (c) unspecified edge case?
- If (a) → fix code, re-run. No spec change.
- If (b) or (c) → invoke spec skill with
bug: <cause>first, let it update §V and §B, then resume build against updated spec.
Rule: never silently fix root-cause without considering backprop. §B is the memory that stops recurrence.
WRITE POLICY
- Only flip §T status. No other SPEC.md edits from build.
- Other spec edits → invoke spec skill.
- Commit after each §T completes. Message:
T<n>: <goal line>+ §V cites.
VERIFICATION
Task x only if:
- Verification command (the oracle) exits 0.
- Every §V touched has its named test from the verification contract, and it passes.
- No §V invariant regressed (run full test suite at end).
NON-GOALS
- No sub-agents. No parallel workers. Main thread only.
- No progress dashboards.
cat SPEC.md | grep §Tis the dashboard. - No speculative work beyond chosen task scope.
Related skills
More from juliusbrussee/cavekit and the wider catalog.

caveman
Token-efficient spec encoding for SPEC.md—cuts prose ~75% while preserving precision.

check
Read-only drift detector that diffs SPEC.md against code and reports violations without making changes.

spec
Create and maintain SPEC.md—the single source of truth for project goals, constraints, invariants, and bugs.

backprop
Trace bugs to root cause and edit specs to prevent recurrence.

cavecrew
Delegate to compressed subagents—investigator, builder, reviewer—to keep main context lean across long sessions.

caveman
Cut token usage ~75% with caveman-mode responses — full technical accuracy, zero fluff