gunk-dev/the-valley

roadmap.md

sourcee01c23ce7dd3main's published tip history
30.7 KiB · Rendered
1# Roadmap
2
3The other design docs describe the design space. This is the plan. It exists to **incrementally
4validate the design** — not to commit to it. It sits downstream of the
5[scenario ladder](./user-scenarios.md): the ladder says what must become true for a user, and in
6what order; this document says what gets built to make each rung true, and how each claim gets
7checked. Where phases and rungs disagree, the rungs win.
8
9## The shape of the plan
10
11The design is a stack of claims: git-as-event-source, signed-local-checks-instead-of-CI, pull-based
12integration, reactive controllers, transparency-backed trust, a knowledge graph. Each is
13falsifiable. The roadmap turns each into a phase you can actually run and check.
14
15Four rules govern every phase:
16
171. **Independently valuable.** The phase ships something worth having even if the next phase never
18 happens. Phase 0 is durable self-hosting; you'd want that regardless of whether attestations ever
19 exist.
202. **Independently stoppable.** You can stop after any phase and be left with a coherent system, not
21 a half-wired one.
223. **Validates exactly one distinct claim.** A phase that validates two claims can't tell you
23 _which_ one broke.
244. **Serves a rung.** Every phase names the rung(s) of the [ladder](./user-scenarios.md#the-ladder)
25 it builds toward; a phase no rung demands has no business on this page. One rung may take several
26 phases — each still validates its own claim, and the rung is established at the last of their
27 gates.
28
29Heavy iteration on the later phases is expected, and that's a **feature, not a risk**. The point of
30validating Phase 1 before building Phase 3 is that Phase 3 gets designed against a spine that has
31actually run. This is a living document, re-derived against the ladder as rungs and reality move. It
32will be wrong in places, and the plan is structured so that being wrong is cheap. The ladder's own
33discipline applies here too: a phase serving a far rung stays thin until that rung is the top
34priority.
35
36**Sequencing is by validation gate, not calendar date.** There are no time estimates here on
37purpose. Each phase is done when its exit criteria are checkable and checked — "validated when …",
38not "shipped by …".
39
40## Phases at a glance
41
42| Phase | Ships | Rung | Validates | Gate |
43| ----- | --------------------------------------- | ----------------------- | ------------------------------------------------------- | --------------------------------------------------------------------- |
44| 0 | Repos off GitHub, durably; knowledge v0 | S1 | Self-hosting is durable enough to trust | Verified restore + a week off GitHub for the pilot |
45| 1 | The event log | S2 (1 of 3) | git-as-event-source; "a log, not a workflow engine" | `valley tail` shows real ref updates as events |
46| 2 | Signed local attestations | S2 (2 of 3) | The contributor protocol's ergonomics | `nix run .#attest` replaces "wait for CI" for real work |
47| 3 | The integrator | S2 established | Pull-based integration; staleness-as-failure-mode | You stop pushing to `main` directly, even solo |
48| 4 | Agents as first-class authors | S3 established | The pipeline holds with no human in it | A dispatched change lands unsupervised, attributed to the agent's key |
49| 5 | Effectful reactions | S4 established | Reactive controllers replace push-based CI/CD | commit→build→deploy→notify is one queryable history |
50| 6 | Trust backstop | S3 hardened; S5 enabled | The security model (~SLSA-3 for purity-claiming checks) | An untrusted-signer change lands only via the trust flow |
51| 7 | Feedback & incident memory | S6 established | Review is feedback; incidents are memory | An incident files its own node; review happens with no PR object |
52
53S7 (strangers) has no phase, deliberately: it is
54[explicitly deferred, maybe never](./user-scenarios.md#the-ladder) — the trust model should degrade
55toward it gracefully, not build for it. Requirements need 7 (_Demand-shaped work_,
56[requirements.md](./requirements.md)) is likewise phase-less, deliberately: phases serve rungs (rule
574), and need 7 derives from the README's outcome-engine framing rather than a rung — though Phase 4
58(dispatch targets an outcome node) and Phase 5 (a landed change closes the outcome it serves)
59partially serve it.
60
61The named systems, all pilot instances: **klaus** (agent dispatch, run budget), **armstrong** (the
62Go controller that becomes the effectful-reactions successor), **tesseract**
63([transparency-dev/tesseract](https://github.com/transparency-dev/tesseract), the Tessera-backed
64tlog), **cosmo** (the operator's NixOS infra — the consumer that installs this repo's host module),
65and **classic-laddie** (the pilot host: a box on the operator's tailnet, already running the klaus
66webhook relay; it hosts every server-side phase below first). Hostnames are pilot detail, not
67design: the durable content of this plan is portable, and what any host serves is declared in the
68host schema this repo ships ([schema/valley.cue](../schema/valley.cue)).
69
70---
71
72## Phase 0 — MVP: repos off GitHub
73
74**This is the priority.** Everything downstream is developed against it.
75
76**Rung:
77[S1 — my repos live on my infrastructure and I can never lose them](./user-scenarios.md#s1--my-repos-live-on-my-infrastructure-and-i-can-never-lose-them).**
78The rung's acceptance checklist is this phase's gate.
79
80**Goal.** Get the crown-jewel git data off GitHub and onto infrastructure you control, durably
81enough that you'd trust it with the only copy — before there's ever only one copy.
82
83**What gets built — and what already is.** Hosting only. Bare git over SSH on a host the operator
84controls (the pilot host: classic-laddie). The first artifacts are shipped: a CUE host schema
85([schema/valley.cue](../schema/valley.cue)) declaring what a valley host serves — projects, each
86with a git store and push mirrors — and a `valley-host` NixOS module ([flake.nix](../flake.nix))
87that installs a host from that declaration; cosmo consumes the module for the pilot host (in
88flight). The schema is the domain model and is deliberately not Nix: the NixOS module is one
89installer consuming it, and any other installer can consume the same file. Identity is Tailscale
90ACLs + SSH keys ([architecture.md](./architecture.md)'s _Hosting_ and _Identity / access_ rows,
91nothing more). **No bus, no attestations, no integrator.** The contributor — one solo dev — pushes
92directly to `main`. `cgit` or similar for browsing if wanted. The integrator and the protected-ref
93invariant arrive in [Phase 3](#phase-3--the-integrator); pushing straight to `main` now is correct,
94not a shortcut.
95
96The Tailscale identity layer is deliberately thin — thin enough to swap later, so it is an
97acceptable v1 choice, not a lock-in. When identity needs to grow (untrusted contributors, agent
98keys), it grows in [Phase 6](#phase-6--trust-backstop).
99
100**Knowledge v0 ships in this phase.** S1's knowledge increment: issues, outcomes, ideas, and
101decisions live with the repo as plain markdown files — a directory convention, not a system. No
102indexer, no events; the schemas are documentation until there's an integrator to enforce them.
103Instantiated at [.the-valley/](../.the-valley/README.md). The graph grows one increment per rung
104from here — agents write it ([Phase 4](#phase-4--agents-as-first-class-authors)), it becomes
105observable ([Phase 5](#phase-5--effectful-reactions-armstrong-as-controller)), incidents file into
106it ([Phase 7](#phase-7--feedback--incident-memory)) — so no later phase "builds the knowledge
107graph".
108
109**Durability is part of the MVP, not an afterthought.** The git data is the crown jewel; losing it
110is the one unrecoverable failure. The target is 3-2-1: primary bare repos on the valley host,
111replicated offsite, with **GitHub retained as a transitional mirror** during migration — three
112copies early on. The mechanism is decided
113([dcr-d7952bc](../.the-valley/decisions/dcr-d7952bc-phase0-replication-github-transitional.md) — it
114was this document's open question): two complementary layers.
115
116| Layer | Mechanism | What it gets you |
117| ---------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
118| Live replication | Push-triggered git-native mirror to an independent live remote | Pushed = replicated: a hot second remote you can `git fetch` from directly; git-native, trivially verifiable |
119| Offsite depth | Periodic encrypted backup of the bare-repo dir (restic-style) to offsite storage | Encrypted, deduplicated point-in-time history, independent of the live remotes |
120
121Block-level replication (ZFS send) was considered and rejected for now: it ties restore to a
122matching filesystem on the far end, and it is not a live git remote. For the pilot, the live second
123remote is GitHub — the transitional mirror — and offsite depth is a Hetzner Storage Box; a dedicated
124sovereign live remote is deferred until GitHub exit. Light RPO/RTO framing, per the rung: pushed
125work is in at least two independent places within minutes, one offsite; restore from the offsite
126copy within a day — and no copy counts until a restore from it has been _performed and verified_.
127
128**Migration strategy: mirror-first, then cut over.** Mirrors are declared config, not a manual
129dual-push: the host declaration's per-project `mirrors` field replicates every push to the primary
130out to each mirror URL — deletions propagated, best-effort, a dead mirror never rejects the primary
131push. GitHub stays declared as one such mirror while confidence builds; the canonical `origin` flips
132per-repo once it's earned. The same field is the public-exposure mechanism later — migration
133dual-push and publishing are one mechanism. Reversible at every step; supports iteration.
134
135**Pilot: the-valley itself.** the-valley's own repo is the first off GitHub — dogfooding, low
136stakes, and every later phase is developed against it. Later repos roll out after the pilot proves
137the workflow.
138
139**The design claim it validates.** Self-hosted bare git on the operator's existing infrastructure is
140durable and ergonomic enough to be the canonical home for real work — the premise
141([requirements.md](./requirements.md)) that hosting lock-in is the only thing GitHub does well, and
142it's swappable.
143
144**Exit criteria.** The rung owns them:
145[S1's acceptance checklist](./user-scenarios.md#s1--my-repos-live-on-my-infrastructure-and-i-can-never-lose-them)
146— canonical origin flipped; every push verifiably in two independent places; one restore performed
147and verified; a week of real human _and_ agent work without GitHub, including an agent change
148landing end to end in direct-push mode; a real issue worked and closed as an in-repo node; a
149repeatable migration-plus-restore runbook.
150
151**Links.** [architecture.md](./architecture.md) (_Hosting_, _Identity / access_ rows),
152[schema/valley.cue](../schema/valley.cue), [examples/host.cue](../examples/host.cue).
153
154**Open questions.** One remains from this phase: Phase-0 identity being Tailscale-ACL-based (thin,
155swappable) — see [Open questions](#open-questions). The replication mechanism was the other and is
156decided above.
157
158---
159
160## Phase 1 — The event log (the spine)
161
162**Rung: [S2](./user-scenarios.md#the-ladder), first of three phases.** No rung demands a bus for its
163own sake; this phase exists because everything S2 needs — attested checks, an integrator — runs on
164events, and the projection claim is worth isolating (rule 3: if it's awkward here, everything
165downstream inherits the problem).
166
167**Goal.** Make git a source of events. Nothing reacts yet — this phase only proves the events are
168real and legible.
169
170**What gets built.** NATS JetStream on the valley host. A `post-receive` hook projecting ref updates
171into bus events: `ref-updated` now, `attestation-published` / `integration-requested` later (per
172[contribute.md](./contribute.md)). A dumb `valley tail` inspector to watch events scroll by. That's
173it. No subscriber acts on anything.
174
175**The design claim it validates.** git-as-event-source — that ref updates project cleanly onto a
176log, and that a log is the right substrate ("a log, not a workflow engine" —
177[architecture.md](./architecture.md)).
178
179**A note on durability.** The bus is the source of truth only for _ephemeral cross-system events_.
180Per-repo events (refs, attestations, integration requests) are durable in git itself; the bus is a
181projection that can be rebuilt. This is the resolution of the old "the log is a single point of
182failure" question ([openquestions.md](./openquestions.md), _Resolved_).
183
184**Exit criteria.**
185
186- A push to the valley host produces a `ref-updated` event visible in `valley tail` within seconds.
187- Rebuilding the stream from scratch (replay the repo's refs) reproduces the same events — the
188 projection is deterministic.
189
190**Validated 2026-07-17**, live on the pilot host: a branch push produced its `ref-updated` on the
191bus within a second, the payload's object id matching the pushed commit; two full replays of the
192pilot repo's refs produced identical event sets. Known limits carried as bug nodes:
193[bd-d853d9c](../.the-valley/bugs/bd-d853d9c-bus-unauthenticated.md) (authorization gates any acting
194consumer or wider listener) and [bd-500adf7](../.the-valley/bugs/bd-500adf7-bus-shares-git-user.md)
195(service user isolation before network reachability).
196
197**Links.** [architecture.md](./architecture.md) (_a log, not a workflow engine_),
198[contribute.md](./contribute.md).
199
200---
201
202## Phase 2 — Attestations (verification MVP)
203
204**Rung: [S2](./user-scenarios.md#the-ladder), second of three.** The rung's hardest demand — checks
205run where the work was written, trustworthy enough to integrate against — enters here as ergonomics;
206the adversarial half of "trustworthy" is [Phase 6](#phase-6--trust-backstop)'s.
207
208**Goal.** Replace "wait for CI" with "signed local check" for real day-to-day work.
209
210**What gets built.** A `nix run .#attest` helper that: runs the repo's canonical checks (Nix
211derivations, in the reference implementation); composes the attestation
212([contribute.md](./contribute.md) / [verification.md](./verification.md)), recording _what check
213ran, on what tree, with what result_; SSH-signs it with the same key as the commit signature; stores
214it as `refs/the-valley/attestations/<sha>`; pushes atomically ([contribute.md](./contribute.md)).
215Purity is a claim tied to a runner kind — the `nix` runner claims it strongly — not a property the
216schema assumes.
217
218Checks-as-derivations is the reference implementation, not the contract. The attestation schema must
219stay implementable by other runner kinds, so a non-Nix runner is an added backend later, never a
220migration.
221
222**Deferred to [Phase 6](#phase-6--trust-backstop):** the Tessera tlog and witness re-derivation.
223Phase 2 is _just local signed attestations_ — the ergonomics of the protocol, without the trust
224backstop. This is the right cut: the protocol has to feel good before the security layer is worth
225building on top of it.
226
227**The design claim it validates.** The contributor protocol's ergonomics — that a signed local check
228is a pleasant, fast substitute for a CI gate, produced by native git plus one helper
229([contribute.md](./contribute.md)).
230
231**Exit criteria.**
232
233- Real changes to the-valley land with an attestation ref alongside every commit.
234- The push is one atomic native-git command; no wrapper.
235- The user prefers this to CI for the pilot repo — the ergonomic claim holds in practice, not just
236 in theory.
237
238**Links.** [contribute.md](./contribute.md), [verification.md](./verification.md).
239
240---
241
242## Phase 3 — The integrator
243
244**Rung: [S2](./user-scenarios.md#the-ladder) — established at this gate.** Push, and seconds later
245it's integrated; the operator never waits for CI, even solo.
246
247**Goal.** Stop writing `main` by hand. Route every change through a request-and-react flow, even
248solo.
249
250**What gets built.** Two things:
251
252- **The structural invariant.** The one-line `pre-receive` hook: only the integrator key writes
253 `refs/heads/<protected>`; attestation refs are create-only; everything else is open
254 ([contribute.md](./contribute.md), _The one invariant_; [architecture.md](./architecture.md), _The
255 one structural git invariant_).
256- **The integrator controller.** Pull-based, subscribing to `integration-requested`. Verifies
257 signature + attestation + (for now, self-) trust, does FF/rebase into `main`, emits outcome events
258 ([architecture.md](./architecture.md), _a pull-based integrator_). Merge-queue semantics fall out
259 for free. The required attestation set is a function of the diff, not of the contributor's claim
260 about it: policy maps path classes to required checks — code takes the full suite, knowledge-only
261 changes (`.the-valley/**`) take signature plus knowledge lint, mixed commits take the max of
262 everything touched. That is also what keeps knowledge-node changes cheap through the same
263 protected path: one invariant, proportionate checks.
264
265The integrator is designed around **change objects** — a diff targeting a stream, with identity
266stable across rebases — rather than branches, per the adopted direction in
267[ida-93e4f91](../.the-valley/ideas/ida-93e4f91-changes-not-branches.md).
268
269This is where the user **stops pushing directly to `main`** and goes through the request flow, even
270as the only contributor. That's the whole point — the flow has to be tolerable at N=1 before it's
271asked to hold at N>1.
272
273**The design claim it validates.** The controller pattern and the core integration claim — that a
274pull-based integrator is a better shape than a `pre-receive` gate, and that staleness is the right
275unified failure mode ([architecture.md](./architecture.md)).
276
277**Exit criteria.**
278
279- Direct pushes to `refs/heads/main` are rejected by the hook; only the integrator key succeeds.
280- A change lands via `integration-requested` → `integration-succeeded` with no manual ref write.
281- A stale case (rebase would change the tree) surfaces as one `request-stale` event, not a rejection
282 or a retry storm.
283
284**Links.** [architecture.md](./architecture.md) (_a pull-based integrator_, _The one structural git
285invariant_).
286
287**New open questions.** Integrator self-integration — the integrator is code in a repo; how does
288_its_ changes get integrated? Already tracked in [openquestions.md](./openquestions.md) (_Identity &
289trust bootstrapping_). Phase 3 is where the chicken-and-egg becomes concrete.
290
291---
292
293## Phase 4 — Agents as first-class authors
294
295**Rung: [S3](./user-scenarios.md#the-ladder) — established here; its attribution claim is hardened
296by [Phase 6](#phase-6--trust-backstop).**
297
298**Goal.** An agent's change lands with the same guarantees as the operator's, attributed to the
299agent that made it, with no human babysitting the pipeline.
300
301**What gets built.** Deliberately thin — the integration flow is unchanged from Phase 3, and that's
302the point:
303
304- **Per-agent identity.** Each agent signs commits and attestations with its own key. Attribution
305 lives in the git objects and the log, not in a platform sidecar; the landed history distinguishes
306 the agent's work from the operator's.
307- **Dispatch against the graph.** klaus dispatch targets an outcome node, not a GitHub issue, and
308 agents read and write knowledge nodes as part of the work — S3's knowledge increment. The
309 convention is already live in [.the-valley/](../.the-valley/README.md); this phase makes it the
310 pipeline's shape instead of a habit.
311
312This phase retires S1's interim mode — agents pushing a branch for the operator to review and merge
313by hand
314([user-scenarios.md § S1](./user-scenarios.md#s1--my-repos-live-on-my-infrastructure-and-i-can-never-lose-them)).
315Feeling that mode's pain was this phase's motivation, by design.
316
317**The design claim it validates.** The pipeline holds with no human in it: a non-human author lands
318with the same guarantees, and attribution is recorded, not inferred. What this phase deliberately
319does not claim: that attribution can't be forged — signature-based attribution is only as strong as
320key custody until the tlog lands ([Phase 6](#phase-6--trust-backstop)). For one operator and their
321own agents, that is the honest cut.
322
323**Exit criteria.**
324
325- A klaus-dispatched change lands via `integration-requested` → `integration-succeeded` with no
326 human action between dispatch and landing.
327- The landed history attributes the change to the agent's own key, distinguishable from the
328 operator's.
329- The dispatch's target is an outcome node in the repo, and the work reads and writes knowledge
330 nodes end to end.
331
332- A klaus-dispatched change lands via `integration-requested` → `integration-succeeded` with no
333 human action between dispatch and landing.
334- The landed history attributes the change to the agent's own key, distinguishable from the
335 operator's.
336- The dispatch's target is an outcome node in the repo, and the work reads and writes knowledge
337 nodes end to end.
338
339**Links.** [architecture.md](./architecture.md) (_Identity / access_ row),
340[scenarios.md #2](./scenarios.md) (klaus-style agent change),
341[user-scenarios.md](./user-scenarios.md).
342
343---
344
345## Phase 5 — Effectful reactions (armstrong-as-controller)
346
347**Rung: [S4](./user-scenarios.md#the-ladder) — established here**, including its knowledge
348increment: knowledge changes become observable events, and a landed change can close the outcome it
349serves.
350
351**Goal.** Prove the causality chain end to end: a commit becomes a build becomes a deploy becomes a
352notification, all as reactions on the log.
353
354**What gets built.** armstrong subscribes to `integration-succeeded` → `nix build` the artifact
355derivation → deploy / notify ([scenarios.md #1](./scenarios.md)). This is the controller-shaped
356successor to the current Actions-based armstrong — the same tool, inverted from push-based pipeline
357to reactive subscriber. Alongside it, the knowledge graph joins the causal record: node changes
358surface on the bus like any ref update, and a landing can flip the outcome node it serves to done —
359the graph stops being write-only.
360
361**The design claim it validates.** Reactive controllers replace push-based CI/CD, and the causality
362chain (commit → build → deploy → notify) is _one queryable history_ rather than seven disconnected
363job UIs ([architecture.md](./architecture.md), _Components_ and _a log, not a workflow engine_).
364
365**Exit criteria.**
366
367- An integration into `main` triggers a build and a deploy with no workflow file — only a
368 subscriber.
369- The full chain for a given commit is reconstructable from the log alone.
370- A landed change closes the outcome node it serves, and that closure is visible in the log like any
371 other event.
372
373**Links.** [architecture.md](./architecture.md) (_Components_),
374[scenarios.md #1 and #6](./scenarios.md).
375
376---
377
378## Phase 6 — Trust backstop
379
380**Rungs: [S3](./user-scenarios.md#the-ladder) hardened, [S5](./user-scenarios.md#the-ladder)
381enabled.** Attribution gains non-repudiation — "can't be waved through or forged" now holds
382adversarially — and trust becomes grantable, bounded, and revocable, which is what lets a second
383human land a change without anything platform-shaped. S5 counts as established when a real
384collaborator lands a real change through this machinery.
385
386**Goal.** Make attestations trustworthy under adversarial or multi-party conditions, not just
387convenient.
388
389**What gets built.**
390
391- **Transparency log.** Tessera-backed tlog publication of attestations via tesseract, with
392 inclusion proofs appended as a sidecar ([contribute.md](./contribute.md)).
393- **Witness re-derivation.** A re-verifier that re-derives any attestation whose runner kind claims
394 purity and emits confirm/deny events.
395- **Trust controller.** Scores per signer from confirm rates, with revocation
396 ([architecture.md](./architecture.md), _attestation with revocation_).
397
398Together these enable the untrusted-contributor and agent-identity scenarios that Phase 2's
399local-only attestations can't.
400
401**The design claim it validates.** The security model — roughly SLSA Level 3 for purity-claiming
402checks, plus non-repudiation from the tlog ([verification.md](./verification.md), _The mechanism
403stack_). Purity is the runner kind's claim, carried in the attestation schema — the `nix` runner is
404the reference implementation of a strong claim, and the model degrades honestly for runners that
405claim less.
406
407**Exit criteria.**
408
409- Every attestation lands in the tlog with a verifiable inclusion proof.
410- A deliberately-wrong purity-claiming attestation is caught by the witness and lowers the signer's
411 trust score.
412- An untrusted signer's change integrates _only_ via the trust flow
413 ([scenarios.md #4](./scenarios.md)), never by default.
414
415**Links.** [verification.md](./verification.md), [contribute.md](./contribute.md),
416[scenarios.md #2 and #4](./scenarios.md).
417
418---
419
420## Phase 7 — Feedback & incident memory
421
422**Rung: [S6](./user-scenarios.md#the-ladder) — established here.** It also completes S4's feedback
423story: who needs to know about which event, without a firehose.
424
425**Goal.** Unbundle review — the last GitHub-shaped interaction — from the vendor UI, and make
426incidents part of the project's durable memory.
427
428**What gets built.**
429
430- **Threads.** Derived views over events, scoped to a change or chain
431 ([architecture.md](./architecture.md), _review is observability + feedback_). PR-as-thread — the
432 "PR" becomes a named query, not a stored object.
433- **Priority/attention router.** The routing subsystem that decides who needs to know about which
434 event ([architecture.md](./architecture.md), same section).
435- **Incident memory.** S6's knowledge increment: an incident files its own node, attributing the
436 regression to the change that caused it — with the attribution carrying its uncertainty honestly,
437 because a confidently wrong answer is worse than none — and linking the revert. The war story
438 becomes a queryable record.
439
440There is no "build the knowledge graph" item here: the graph arrived one increment per rung — plain
441files ([Phase 0](#phase-0--mvp-repos-off-github)), agent-written
442([Phase 4](#phase-4--agents-as-first-class-authors)), observable
443([Phase 5](#phase-5--effectful-reactions-armstrong-as-controller)), incident-filing (here) — exactly
444as the ladder grows it.
445
446**The design claim it validates.** Observability + project-knowledge unbundling — that review is a
447special case of feedback, incidents are a special case of knowledge, and both belong to one history
448rather than scattered across issues, wikis, and heads ([architecture.md](./architecture.md),
449_Observability & feedback_, _Project knowledge_ rows).
450
451**Exit criteria.**
452
453- A change accrues discussion, an approval, and an outcome as one chronology with no PR object
454 anywhere.
455- The router surfaces one genuinely high-priority event to a human without a firehose.
456- A bad deploy — real or gamedayed — ends as an incident node with attribution, stated uncertainty,
457 and a link to the revert.
458
459**Links.** [architecture.md](./architecture.md) (_review is observability + feedback_, _project
460knowledge is a typed-node graph_), [scenarios.md #3 and #4](./scenarios.md).
461
462**New open questions.** None new here — but note the _priority-layer architecture_ question
463([openquestions.md](./openquestions.md), _Attention, routing, and threads_) is the hardest new
464bottleneck the whole design creates, and Phase 7 is where it stops being hypothetical.
465
466---
467
468## Cross-cutting threads
469
470Some things aren't a phase; they run through all of them.
471
472- **CUE schemas.** One schema language across the system. Event schemas are shared across producers
473 and consumers, reused from armstrong — minimal in Phase 1, growing a field or a type each phase.
474 Host config already speaks it ([schema/valley.cue](../schema/valley.cue), shipped in Phase 0);
475 knowledge-node frontmatter and verification policy are candidates to follow. Schema evolution is a
476 standing concern, not a phase — tracked in [openquestions.md](./openquestions.md) (_Storage,
477 retention, and evolution_).
478- **The `valley` CLI.** A thin tool that accretes one verb per phase — `valley migrate` (0),
479 `valley tail` (1), `valley attest` or the `nix run .#attest` helper (2), `valley browse` (7). It
480 stays thin on purpose: the contributor protocol is native-git-first
481 ([contribute.md](./contribute.md)), so the CLI is convenience, never the critical path. Anything
482 `valley` does, plain git and `nix` can do.
483- **Durability as a standing priority.** Phase 0 makes it explicit, but it never stops mattering.
484 The durable substrate is git objects + attestation refs + the tlog — all replicable, all
485 externally witnessable. The bus is the one replaceable component: lose it and rebuild it from git.
486 Every phase should preserve that property — if a phase makes the bus load-bearing for durable
487 state, that's a design smell to catch.
488- **Portability as a standing constraint.** Nix is a backend, not the substrate: portable schemas
489 from day 0, portable implementations on demand. Every schema this plan ships — host config,
490 events, attestations, knowledge nodes — must be implementable without Nix; the NixOS module and
491 checks-as-derivations are reference implementations, never the contract. The review heuristic: a
492 field only Nix can produce is a leak.
493
494## Open questions
495
496This document originally raised two; one is now decided, one remains open:
497
498- **Offsite replication mechanism — decided**
499 ([dcr-d7952bc](../.the-valley/decisions/dcr-d7952bc-phase0-replication-github-transitional.md)).
500 Push-triggered git-native mirroring to an independent live remote (pushed = replicated) — during
501 migration that remote is GitHub, with the dedicated sovereign live remote deferred until GitHub
502 exit — plus periodic encrypted restic-style backup for offsite depth; block-level replication (ZFS
503 send) rejected for now. Details in [Phase 0](#phase-0--mvp-repos-off-github).
504- **Phase-0 identity is Tailscale-ACL-based** (_Identity & trust bootstrapping_). Thin by design and
505 swappable; the open question is _when_ it has to grow and into what — likely driven by
506 [Phase 6](#phase-6--trust-backstop). _Origin: roadmap.md._
507
508Everything else this roadmap touches is already tracked in [openquestions.md](./openquestions.md) —
509integrator self-integration, the priority-layer architecture, attestation expiry vs. cache
510retention, agent identity, and schema evolution all surface at specific phases above.