Cavekit is a spec-driven development framework for Claude Code, built around a single SPEC.md file at the repo root that acts as the agent's durable, context-reset-proof memory. Its workflow is a loop — grill, spec, research, review, build — run over that one file with no sub-agents; the main agent does all the work. The design goal is to keep the benefits of spec-driven development while stripping out the agent swarms, dashboards, and ceremony that the author argues cost more tokens than they save.
Three properties define it: a durable spec that survives losing the context window (reload the spec and continue); "caveman encoding," a compressed notation of symbols, fragments, and pipe tables that the project claims cuts token use by roughly 75% versus prose; and a "backprop reflex" where each test failure is recorded into the spec and recurring bug classes become invariants the spec retains. A right-sizing rule keeps ceremony proportional to the change — a trivial fix just runs build, while the full chain is reserved for uncertain or high-risk work.
It installs as a set of skills and slash commands into Claude Code. Three commands form the everyday loop:
- /ck:spec — the sole mutator that creates, amends, or backprops SPEC.md
- /ck:build — plans and executes against the spec, naming which test proves each invariant and auto-recording failures
- /ck:check — a read-only drift report listing violations
Four more are used only when a change warrants them: /ck:grill (sharpen a fuzzy idea into goals and constraints), /ck:research (gather sourced external knowledge), /ck:review (adversarial pre-build review with a go/no-go gate), and /ck:deepen (a spare-budget design pass). The spec body is plain Markdown with defined sections, each owned by a specific command. This is version 4, a deliberately distilled successor to an earlier autonomous multi-agent "Hunt lifecycle" generation that remains available and frozen at an older tag; both are described as a two-way door since the spec is plain Markdown. Cavekit is part of a broader "caveman" family of related token-compression and agent-memory projects.