gunk-dev/the-valley

roadmap.md

sourceefa8bd044aedmain's published tip history
30.8 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 main and the tags out to
130each mirror URL on every push to the primary — deletions propagated, best-effort, a dead mirror
131never rejects the primary push. A mirror publishes what has been integrated, so topic branches
132awaiting review stay on the primary. GitHub stays declared as one such mirror while confidence
133builds; the canonical `origin` flips per-repo once it's earned. The same field is the
134public-exposure mechanism later — migration dual-push and publishing are one mechanism. Reversible
135at every step; supports iteration.
136
137**Pilot: the-valley itself.** the-valley's own repo is the first off GitHub — dogfooding, low
138stakes, and every later phase is developed against it. Later repos roll out after the pilot proves
139the workflow.
140
141**The design claim it validates.** Self-hosted bare git on the operator's existing infrastructure is
142durable and ergonomic enough to be the canonical home for real work — the premise
143([requirements.md](./requirements.md)) that hosting lock-in is the only thing GitHub does well, and
144it's swappable.
145
146**Exit criteria.** The rung owns them:
147[S1's acceptance checklist](./user-scenarios.md#s1--my-repos-live-on-my-infrastructure-and-i-can-never-lose-them)
148— canonical origin flipped; every push verifiably in two independent places; one restore performed
149and verified; a week of real human _and_ agent work without GitHub, including an agent change
150landing end to end in direct-push mode; a real issue worked and closed as an in-repo node; a
151repeatable migration-plus-restore runbook.
152
153**Links.** [architecture.md](./architecture.md) (_Hosting_, _Identity / access_ rows),
154[schema/valley.cue](../schema/valley.cue), [examples/host.cue](../examples/host.cue).
155
156**Open questions.** One remains from this phase: Phase-0 identity being Tailscale-ACL-based (thin,
157swappable) — see [Open questions](#open-questions). The replication mechanism was the other and is
158decided above.
159
160---
161
162## Phase 1 — The event log (the spine)
163
164**Rung: [S2](./user-scenarios.md#the-ladder), first of three phases.** No rung demands a bus for its
165own sake; this phase exists because everything S2 needs — attested checks, an integrator — runs on
166events, and the projection claim is worth isolating (rule 3: if it's awkward here, everything
167downstream inherits the problem).
168
169**Goal.** Make git a source of events. Nothing reacts yet — this phase only proves the events are
170real and legible.
171
172**What gets built.** NATS JetStream on the valley host. A `post-receive` hook projecting ref updates
173into bus events: `ref-updated` now, `attestation-published` / `integration-requested` later (per
174[contribute.md](./contribute.md)). A dumb `valley tail` inspector to watch events scroll by. That's
175it. No subscriber acts on anything.
176
177**The design claim it validates.** git-as-event-source — that ref updates project cleanly onto a
178log, and that a log is the right substrate ("a log, not a workflow engine" —
179[architecture.md](./architecture.md)).
180
181**A note on durability.** The bus is the source of truth only for _ephemeral cross-system events_.
182Per-repo events (refs, attestations, integration requests) are durable in git itself; the bus is a
183projection that can be rebuilt. This is the resolution of the old "the log is a single point of
184failure" question ([openquestions.md](./openquestions.md), _Resolved_).
185
186**Exit criteria.**
187
188- A push to the valley host produces a `ref-updated` event visible in `valley tail` within seconds.
189- Rebuilding the stream from scratch (replay the repo's refs) reproduces the same events — the
190 projection is deterministic.
191
192**Validated 2026-07-17**, live on the pilot host: a branch push produced its `ref-updated` on the
193bus within a second, the payload's object id matching the pushed commit; two full replays of the
194pilot repo's refs produced identical event sets. Known limits carried as bug nodes:
195[bd-d853d9c](../.the-valley/bugs/bd-d853d9c-bus-unauthenticated.md) (authorization gates any acting
196consumer or wider listener) and [bd-500adf7](../.the-valley/bugs/bd-500adf7-bus-shares-git-user.md)
197(service user isolation before network reachability).
198
199**Links.** [architecture.md](./architecture.md) (_a log, not a workflow engine_),
200[contribute.md](./contribute.md).
201
202---
203
204## Phase 2 — Attestations (verification MVP)
205
206**Rung: [S2](./user-scenarios.md#the-ladder), second of three.** The rung's hardest demand — checks
207run where the work was written, trustworthy enough to integrate against — enters here as ergonomics;
208the adversarial half of "trustworthy" is [Phase 6](#phase-6--trust-backstop)'s.
209
210**Goal.** Replace "wait for CI" with "signed local check" for real day-to-day work.
211
212**What gets built.** A `nix run .#attest` helper that: runs the repo's canonical checks (Nix
213derivations, in the reference implementation); composes the attestation
214([contribute.md](./contribute.md) / [verification.md](./verification.md)), recording _what check
215ran, on what tree, with what result_; SSH-signs it with the same key as the commit signature; stores
216it as `refs/the-valley/attestations/<sha>`; pushes atomically ([contribute.md](./contribute.md)).
217Purity is a claim tied to a runner kind — the `nix` runner claims it strongly — not a property the
218schema assumes.
219
220Checks-as-derivations is the reference implementation, not the contract. The attestation schema must
221stay implementable by other runner kinds, so a non-Nix runner is an added backend later, never a
222migration.
223
224**Deferred to [Phase 6](#phase-6--trust-backstop):** the Tessera tlog and witness re-derivation.
225Phase 2 is _just local signed attestations_ — the ergonomics of the protocol, without the trust
226backstop. This is the right cut: the protocol has to feel good before the security layer is worth
227building on top of it.
228
229**The design claim it validates.** The contributor protocol's ergonomics — that a signed local check
230is a pleasant, fast substitute for a CI gate, produced by native git plus one helper
231([contribute.md](./contribute.md)).
232
233**Exit criteria.**
234
235- Real changes to the-valley land with an attestation ref alongside every commit.
236- The push is one atomic native-git command; no wrapper.
237- The user prefers this to CI for the pilot repo — the ergonomic claim holds in practice, not just
238 in theory.
239
240**Links.** [contribute.md](./contribute.md), [verification.md](./verification.md).
241
242---
243
244## Phase 3 — The integrator
245
246**Rung: [S2](./user-scenarios.md#the-ladder) — established at this gate.** Push, and seconds later
247it's integrated; the operator never waits for CI, even solo.
248
249**Goal.** Stop writing `main` by hand. Route every change through a request-and-react flow, even
250solo.
251
252**What gets built.** Two things:
253
254- **The structural invariant.** The one-line `pre-receive` hook: only the integrator key writes
255 `refs/heads/<protected>`; attestation refs are create-only; everything else is open
256 ([contribute.md](./contribute.md), _The one invariant_; [architecture.md](./architecture.md), _The
257 one structural git invariant_).
258- **The integrator controller.** Pull-based, subscribing to `integration-requested`. Verifies
259 signature + attestation + (for now, self-) trust, does FF/rebase into `main`, emits outcome events
260 ([architecture.md](./architecture.md), _a pull-based integrator_). Merge-queue semantics fall out
261 for free. The required attestation set is a function of the diff, not of the contributor's claim
262 about it: policy maps path classes to required checks — code takes the full suite, knowledge-only
263 changes (`.the-valley/**`) take signature plus knowledge lint, mixed commits take the max of
264 everything touched. That is also what keeps knowledge-node changes cheap through the same
265 protected path: one invariant, proportionate checks.
266
267The integrator is designed around **change objects** — a diff targeting a stream, with identity
268stable across rebases — rather than branches, per the adopted direction in
269[ida-93e4f91](../.the-valley/ideas/ida-93e4f91-changes-not-branches.md).
270
271This is where the user **stops pushing directly to `main`** and goes through the request flow, even
272as the only contributor. That's the whole point — the flow has to be tolerable at N=1 before it's
273asked to hold at N>1.
274
275**The design claim it validates.** The controller pattern and the core integration claim — that a
276pull-based integrator is a better shape than a `pre-receive` gate, and that staleness is the right
277unified failure mode ([architecture.md](./architecture.md)).
278
279**Exit criteria.**
280
281- Direct pushes to `refs/heads/main` are rejected by the hook; only the integrator key succeeds.
282- A change lands via `integration-requested` → `integration-succeeded` with no manual ref write.
283- A stale case (rebase would change the tree) surfaces as one `request-stale` event, not a rejection
284 or a retry storm.
285
286**Links.** [architecture.md](./architecture.md) (_a pull-based integrator_, _The one structural git
287invariant_).
288
289**New open questions.** Integrator self-integration — the integrator is code in a repo; how does
290_its_ changes get integrated? Already tracked in [openquestions.md](./openquestions.md) (_Identity &
291trust bootstrapping_). Phase 3 is where the chicken-and-egg becomes concrete.
292
293---
294
295## Phase 4 — Agents as first-class authors
296
297**Rung: [S3](./user-scenarios.md#the-ladder) — established here; its attribution claim is hardened
298by [Phase 6](#phase-6--trust-backstop).**
299
300**Goal.** An agent's change lands with the same guarantees as the operator's, attributed to the
301agent that made it, with no human babysitting the pipeline.
302
303**What gets built.** Deliberately thin — the integration flow is unchanged from Phase 3, and that's
304the point:
305
306- **Per-agent identity.** Each agent signs commits and attestations with its own key. Attribution
307 lives in the git objects and the log, not in a platform sidecar; the landed history distinguishes
308 the agent's work from the operator's.
309- **Dispatch against the graph.** klaus dispatch targets an outcome node, not a GitHub issue, and
310 agents read and write knowledge nodes as part of the work — S3's knowledge increment. The
311 convention is already live in [.the-valley/](../.the-valley/README.md); this phase makes it the
312 pipeline's shape instead of a habit.
313
314This phase retires S1's interim mode — agents pushing a branch for the operator to review and merge
315by hand
316([user-scenarios.md § S1](./user-scenarios.md#s1--my-repos-live-on-my-infrastructure-and-i-can-never-lose-them)).
317Feeling that mode's pain was this phase's motivation, by design.
318
319**The design claim it validates.** The pipeline holds with no human in it: a non-human author lands
320with the same guarantees, and attribution is recorded, not inferred. What this phase deliberately
321does not claim: that attribution can't be forged — signature-based attribution is only as strong as
322key custody until the tlog lands ([Phase 6](#phase-6--trust-backstop)). For one operator and their
323own agents, that is the honest cut.
324
325**Exit criteria.**
326
327- A klaus-dispatched change lands via `integration-requested` → `integration-succeeded` with no
328 human action between dispatch and landing.
329- The landed history attributes the change to the agent's own key, distinguishable from the
330 operator's.
331- The dispatch's target is an outcome node in the repo, and the work reads and writes knowledge
332 nodes end to end.
333
334- A klaus-dispatched change lands via `integration-requested` → `integration-succeeded` with no
335 human action between dispatch and landing.
336- The landed history attributes the change to the agent's own key, distinguishable from the
337 operator's.
338- The dispatch's target is an outcome node in the repo, and the work reads and writes knowledge
339 nodes end to end.
340
341**Links.** [architecture.md](./architecture.md) (_Identity / access_ row),
342[scenarios.md #2](./scenarios.md) (klaus-style agent change),
343[user-scenarios.md](./user-scenarios.md).
344
345---
346
347## Phase 5 — Effectful reactions (armstrong-as-controller)
348
349**Rung: [S4](./user-scenarios.md#the-ladder) — established here**, including its knowledge
350increment: knowledge changes become observable events, and a landed change can close the outcome it
351serves.
352
353**Goal.** Prove the causality chain end to end: a commit becomes a build becomes a deploy becomes a
354notification, all as reactions on the log.
355
356**What gets built.** armstrong subscribes to `integration-succeeded` → `nix build` the artifact
357derivation → deploy / notify ([scenarios.md #1](./scenarios.md)). This is the controller-shaped
358successor to the current Actions-based armstrong — the same tool, inverted from push-based pipeline
359to reactive subscriber. Alongside it, the knowledge graph joins the causal record: node changes
360surface on the bus like any ref update, and a landing can flip the outcome node it serves to done —
361the graph stops being write-only.
362
363**The design claim it validates.** Reactive controllers replace push-based CI/CD, and the causality
364chain (commit → build → deploy → notify) is _one queryable history_ rather than seven disconnected
365job UIs ([architecture.md](./architecture.md), _Components_ and _a log, not a workflow engine_).
366
367**Exit criteria.**
368
369- An integration into `main` triggers a build and a deploy with no workflow file — only a
370 subscriber.
371- The full chain for a given commit is reconstructable from the log alone.
372- A landed change closes the outcome node it serves, and that closure is visible in the log like any
373 other event.
374
375**Links.** [architecture.md](./architecture.md) (_Components_),
376[scenarios.md #1 and #6](./scenarios.md).
377
378---
379
380## Phase 6 — Trust backstop
381
382**Rungs: [S3](./user-scenarios.md#the-ladder) hardened, [S5](./user-scenarios.md#the-ladder)
383enabled.** Attribution gains non-repudiation — "can't be waved through or forged" now holds
384adversarially — and trust becomes grantable, bounded, and revocable, which is what lets a second
385human land a change without anything platform-shaped. S5 counts as established when a real
386collaborator lands a real change through this machinery.
387
388**Goal.** Make attestations trustworthy under adversarial or multi-party conditions, not just
389convenient.
390
391**What gets built.**
392
393- **Transparency log.** Tessera-backed tlog publication of attestations via tesseract, with
394 inclusion proofs appended as a sidecar ([contribute.md](./contribute.md)).
395- **Witness re-derivation.** A re-verifier that re-derives any attestation whose runner kind claims
396 purity and emits confirm/deny events.
397- **Trust controller.** Scores per signer from confirm rates, with revocation
398 ([architecture.md](./architecture.md), _attestation with revocation_).
399
400Together these enable the untrusted-contributor and agent-identity scenarios that Phase 2's
401local-only attestations can't.
402
403**The design claim it validates.** The security model — roughly SLSA Level 3 for purity-claiming
404checks, plus non-repudiation from the tlog ([verification.md](./verification.md), _The mechanism
405stack_). Purity is the runner kind's claim, carried in the attestation schema — the `nix` runner is
406the reference implementation of a strong claim, and the model degrades honestly for runners that
407claim less.
408
409**Exit criteria.**
410
411- Every attestation lands in the tlog with a verifiable inclusion proof.
412- A deliberately-wrong purity-claiming attestation is caught by the witness and lowers the signer's
413 trust score.
414- An untrusted signer's change integrates _only_ via the trust flow
415 ([scenarios.md #4](./scenarios.md)), never by default.
416
417**Links.** [verification.md](./verification.md), [contribute.md](./contribute.md),
418[scenarios.md #2 and #4](./scenarios.md).
419
420---
421
422## Phase 7 — Feedback & incident memory
423
424**Rung: [S6](./user-scenarios.md#the-ladder) — established here.** It also completes S4's feedback
425story: who needs to know about which event, without a firehose.
426
427**Goal.** Unbundle review — the last GitHub-shaped interaction — from the vendor UI, and make
428incidents part of the project's durable memory.
429
430**What gets built.**
431
432- **Threads.** Derived views over events, scoped to a change or chain
433 ([architecture.md](./architecture.md), _review is observability + feedback_). PR-as-thread — the
434 "PR" becomes a named query, not a stored object.
435- **Priority/attention router.** The routing subsystem that decides who needs to know about which
436 event ([architecture.md](./architecture.md), same section).
437- **Incident memory.** S6's knowledge increment: an incident files its own node, attributing the
438 regression to the change that caused it — with the attribution carrying its uncertainty honestly,
439 because a confidently wrong answer is worse than none — and linking the revert. The war story
440 becomes a queryable record.
441
442There is no "build the knowledge graph" item here: the graph arrived one increment per rung — plain
443files ([Phase 0](#phase-0--mvp-repos-off-github)), agent-written
444([Phase 4](#phase-4--agents-as-first-class-authors)), observable
445([Phase 5](#phase-5--effectful-reactions-armstrong-as-controller)), incident-filing (here) — exactly
446as the ladder grows it.
447
448**The design claim it validates.** Observability + project-knowledge unbundling — that review is a
449special case of feedback, incidents are a special case of knowledge, and both belong to one history
450rather than scattered across issues, wikis, and heads ([architecture.md](./architecture.md),
451_Observability & feedback_, _Project knowledge_ rows).
452
453**Exit criteria.**
454
455- A change accrues discussion, an approval, and an outcome as one chronology with no PR object
456 anywhere.
457- The router surfaces one genuinely high-priority event to a human without a firehose.
458- A bad deploy — real or gamedayed — ends as an incident node with attribution, stated uncertainty,
459 and a link to the revert.
460
461**Links.** [architecture.md](./architecture.md) (_review is observability + feedback_, _project
462knowledge is a typed-node graph_), [scenarios.md #3 and #4](./scenarios.md).
463
464**New open questions.** None new here — but note the _priority-layer architecture_ question
465([openquestions.md](./openquestions.md), _Attention, routing, and threads_) is the hardest new
466bottleneck the whole design creates, and Phase 7 is where it stops being hypothetical.
467
468---
469
470## Cross-cutting threads
471
472Some things aren't a phase; they run through all of them.
473
474- **CUE schemas.** One schema language across the system. Event schemas are shared across producers
475 and consumers, reused from armstrong — minimal in Phase 1, growing a field or a type each phase.
476 Host config already speaks it ([schema/valley.cue](../schema/valley.cue), shipped in Phase 0);
477 knowledge-node frontmatter and verification policy are candidates to follow. Schema evolution is a
478 standing concern, not a phase — tracked in [openquestions.md](./openquestions.md) (_Storage,
479 retention, and evolution_).
480- **The `valley` CLI.** A thin tool that accretes one verb per phase — `valley migrate` (0),
481 `valley tail` (1), `valley attest` or the `nix run .#attest` helper (2), `valley browse` (7). It
482 stays thin on purpose: the contributor protocol is native-git-first
483 ([contribute.md](./contribute.md)), so the CLI is convenience, never the critical path. Anything
484 `valley` does, plain git and `nix` can do.
485- **Durability as a standing priority.** Phase 0 makes it explicit, but it never stops mattering.
486 The durable substrate is git objects + attestation refs + the tlog — all replicable, all
487 externally witnessable. The bus is the one replaceable component: lose it and rebuild it from git.
488 Every phase should preserve that property — if a phase makes the bus load-bearing for durable
489 state, that's a design smell to catch.
490- **Portability as a standing constraint.** Nix is a backend, not the substrate: portable schemas
491 from day 0, portable implementations on demand. Every schema this plan ships — host config,
492 events, attestations, knowledge nodes — must be implementable without Nix; the NixOS module and
493 checks-as-derivations are reference implementations, never the contract. The review heuristic: a
494 field only Nix can produce is a leak.
495
496## Open questions
497
498This document originally raised two; one is now decided, one remains open:
499
500- **Offsite replication mechanism — decided**
501 ([dcr-d7952bc](../.the-valley/decisions/dcr-d7952bc-phase0-replication-github-transitional.md)).
502 Push-triggered git-native mirroring to an independent live remote (pushed = replicated) — during
503 migration that remote is GitHub, with the dedicated sovereign live remote deferred until GitHub
504 exit — plus periodic encrypted restic-style backup for offsite depth; block-level replication (ZFS
505 send) rejected for now. Details in [Phase 0](#phase-0--mvp-repos-off-github).
506- **Phase-0 identity is Tailscale-ACL-based** (_Identity & trust bootstrapping_). Thin by design and
507 swappable; the open question is _when_ it has to grow and into what — likely driven by
508 [Phase 6](#phase-6--trust-backstop). _Origin: roadmap.md._
509
510Everything else this roadmap touches is already tracked in [openquestions.md](./openquestions.md) —
511integrator self-integration, the priority-layer architecture, attestation expiry vs. cache
512retention, agent identity, and schema evolution all surface at specific phases above.