gunk-dev/the-valley

ida-4557af7-spec-driven-iteration.md

source632d2985a3a8main's published tip history
2.9 KiB · Rendered
1---
2type: idea
3id: ida-4557af7
4status: exploring
5title: "Spec-driven iteration: capture a tight spec and let it drive implementation over time"
6created: 2026-07-15
7source: owner noodle — captured imperfect on purpose ("even if it's imperfect, it's there to be polished")
8---
9
10# Spec-driven iteration
11
12**Owner framing, close to verbatim.** The current work is prototyping; long-term, the project may
13want to capture and iterate a _tight spec_ for the-valley, and use the spec to drive implementation
14iteration over time.
15
16**Proof of pattern, already shipped.** The CUE host schema is spec-driven development in one corner:
17[schema/valley.cue](../../schema/valley.cue) is "the canonical domain model … deliberately not Nix"
18([roadmap](../../design/roadmap.md)), the installers are implementations consuming it, `cue vet` at
19build time is the conformance gate, and [[ida-b9f646c]]
20([ida-b9f646c-nix-backend-not-substrate.md](./ida-b9f646c-nix-backend-not-substrate.md)) pins the
21implementability floor: every schema realizable by a shell script on Debian. The generalization:
22what CUE does for the host declaration, some checkable spec should do for each component as it
23hardens — the event log's wire format, the attestation's claim structure, the integrator's
24invariants. The roadmap's CUE-schemas cross-cutting thread
25([roadmap § cross-cutting threads](../../design/roadmap.md#cross-cutting-threads)) is the first
26planned instance.
27
28**Agent-era economics.** When implementation labor is cheap and regenerable (agents), the artifacts
29worth hand-polishing are the spec and its conformance suite; implementations become derived,
30re-derivable, even disposable. This extends the repo's re-derivation discipline — requirements
31re-derived from the ladder ([[oc-49555c7]],
32[oc-49555c7-requirements-from-ladder.md](../outcomes/oc-49555c7-requirements-from-ladder.md)),
33roadmap re-derived from requirements ([[oc-2fbcd7b]],
34[oc-2fbcd7b-roadmap-rederived.md](../outcomes/oc-2fbcd7b-roadmap-rederived.md)) — one layer down:
35code re-derived from spec, with the conformance suite as the integrator's gate for regenerated
36implementations.
37
38**The tension to hold.** The ladder's own rule is anti-big-spec-upfront: acceptance detail arrives
39only when a rung becomes top priority. So the likely landing is _not_ one grand spec but a spec per
40component, at the moment it crosses from prototype to load-bearing. Prototyping and spec-driven are
41phases of each _part_, not of the project.
42
43## Open questions
44
45- Language and form per spec kind: CUE for data shapes; what for behavior and invariants?
46- Where conformance suites live and who runs them — the integrator's gate?
47- How spec changes are governed — they are the highest-leverage changes in the repo.
48- Relation to the change model ([[ida-93e4f91]],
49 [ida-93e4f91-changes-not-branches.md](./ida-93e4f91-changes-not-branches.md)): does a spec change
50 invalidate pending changes against implementations of that spec?