1bit.systems

Spec-driven development workflow (1bit systems)


phase: verified owner: cartograph ---

Spec-driven development workflow (1bit systems)

1bit systems runs on a spec-first loop. Every crate / kernel / service integration lands with a docs/wiki/Crate-*.md (or docs/wiki/Why-*.md) spec BEFORE code. Code implements the spec. Tests verify the spec. Agents are briefed against the spec, not ad-hoc prose.

Inspired by BMAD-Method (docs.bmad-method.org) phase gates + Kiro / Spec-Kit specification patterns. We skip the frameworks (Rule A — no extra runtime deps). The markdown-plus-clangd-plus-tests workflow already gives spec → code → verification; we borrow only the phase tags + agent routing.

Four phases

PhaseContentGate to next phaseDefault reviewer specialist
analysisProblem statement, invariants, non-goalsInvariants + interface shape approved in reviewmagistrate
solutioningAPI signatures, file layout, test matrixTest matrix covers every invariantcartograph
implementationSpec-cross-ref per commit, TODO listAll TODOs closed, green tests, clippy cleananvil (kernel) / scribe (prose)
verifiedBench + parity numbers, shadow-burnin passedNever — this is the end statesentinel

Every docs/wiki/Crate-*.md carries a YAML frontmatter block at the top:

---
phase: analysis | solutioning | implementation | verified
owner: <specialist-name>          # who owns review at this phase
blocks: [Crate-foo, Crate-bar]    # optional: downstream specs that can't advance until this one verifies
---

Phase transitions

Promotion is a commit. The commit message pattern:

spec(<crate>): promote from <old> → <new> — <reason>

Examples:

If a spec needs to go BACK a phase (discovered-constraint rewrites the design), commit message says spec(<crate>): demote from <old> → <new> — <reason>. Demotions are normal; they're a sign the spec is learning.

Required sections per phase

analysis (minimum viable spec):

solutioning adds:

implementation adds:

verified adds:

Agent briefs quote the spec

When I spawn a background agent (research or build), the prompt points at the spec file rather than re-describing the problem. Agents diff their output against the spec sections. Example prompt framing:

Implement crates/1bit-helm/src/view/mod.rs per docs/wiki/Crate-1bit-helm.md § Interface. Keep invariants §2 + §3 green. Non-goals in §5 are out of scope.

Retroactive application

Modules already in tree without a matching spec file get one the next time they're touched. Currently unspec'd (as of 2026-04-20):

Well-spec'd (templates for the above):

What we DON'T do

Cross-refs