| 1 | # Roadmap |
| 2 | |
| 3 | The roadmap develops the-valley through useful increments and tests the claims behind each one. The |
| 4 | [user scenarios](./user-scenarios.md) define what must become possible. Phases describe the work and |
| 5 | evidence needed to support them. |
| 6 | |
| 7 | The immediate product priorities are a usable interface for improving the-valley and moving the |
| 8 | projects in `gunk-dev/` and `patflynn/` off GitHub. The |
| 9 | [interface proposal](../.the-valley/ideas/ida-23aa413-project-surfaces-are-derived-views.md) and |
| 10 | [Cosmo migration outcome](../.the-valley/outcomes/oc-87deec8-valley-can-host-cosmo.md) identify work |
| 11 | toward those priorities. Their minimum scope and ordering remain to be selected alongside the open |
| 12 | design problems. |
| 13 | |
| 14 | ## How phases are used |
| 15 | |
| 16 | Each phase should: |
| 17 | |
| 18 | 1. Deliver something useful even if no later phase is built. |
| 19 | 2. Leave a coherent system that can continue to be used. |
| 20 | 3. Test one main design claim, so a failed validation is understandable. |
| 21 | 4. Serve a named user scenario. |
| 22 | |
| 23 | A scenario may require several phases. If the implementation plan no longer serves the scenario, |
| 24 | revise the plan. Later phases remain less detailed until experience makes their requirements |
| 25 | concrete. |
| 26 | |
| 27 | Completion depends on observed exit criteria. A component's existence is not enough to mark its |
| 28 | phase complete. The plan uses validation gates rather than calendar estimates. |
| 29 | |
| 30 | ## Phases at a glance |
| 31 | |
| 32 | | Phase | Delivers | Scenario | Main validation | |
| 33 | | ----- | -------------------------------------------------------------- | -------------------------------- | ----------------------------------------------------------------------------- | |
| 34 | | 0 | Durable self-hosted repositories and initial project knowledge | S1 | Verified restore and a week of real work without GitHub | |
| 35 | | 1 | Git ref-event projection and inspection | Supports S2 and later automation | Real ref updates are visible; current-state projection is reproducible | |
| 36 | | 2 | Signed local check evidence | S2 | The contributor protocol works well for daily changes | |
| 37 | | 3 | Request-based integration | S2 | Protected history advances through evaluated requests | |
| 38 | | 4 | Agent contributions with recorded provenance | S3 | Authorized dispatched work lands without further supervision | |
| 39 | | 5 | Builds, deployments, and notifications as reactions | S4 | Their causal history is recoverable and queryable | |
| 40 | | 6 | Independent verification and a trust process | Hardens S3; supports S5 | False claims are detected and unknown signers follow explicit admission rules | |
| 41 | | 7 | Discussion, attention routing, and incident memory | S6; extends S4 | Review and incident recovery use a durable shared record | |
| 42 | |
| 43 | S7, contribution by strangers, has no phase. It remains deferred. |
| 44 | |
| 45 | Outcome-based work also extends beyond this sequence. Phase 4 assigns work to an outcome, and Phase |
| 46 | 5 records completion, but a general scheduler still needs its own design. |
| 47 | |
| 48 | ## Current state |
| 49 | |
| 50 | The initial hosting, mirroring, and restore exercise have been performed. S1 still has unchecked |
| 51 | criteria: a recorded week of independent daily work and a repeatable migration and restore runbook. |
| 52 | |
| 53 | Phase 1 has a recorded live validation from 2026-07-17. Local attestations and the integrator are |
| 54 | implemented, and the contributor CLI can submit evidence and a request. Identity compilation and |
| 55 | policy composition have also been added. Their presence does not mark every Phase 2, 3, or 6 |
| 56 | criterion complete. |
| 57 | |
| 58 | The remaining sections retain the validation sequence and distinguish initial arrangements from the |
| 59 | current workflow. [Contributor protocol](./contribute.md) is the operational guide for submitting a |
| 60 | change now. |
| 61 | |
| 62 | The initial deployment uses classic-laddie as the host and Cosmo as the NixOS configuration project |
| 63 | that installs it. Klaus supplies the existing agent workflow. Armstrong is the proposed controller |
| 64 | for external effects, and a Tessera-backed log is the proposed transparency component. These are |
| 65 | reference choices, not requirements that every deployment use the same hosts or tools. |
| 66 | |
| 67 | ## Phase 0 — durable self-hosting |
| 68 | |
| 69 | This phase serves [S1](./user-scenarios.md#s1--repositories-under-my-control-and-recoverable). It |
| 70 | establishes the canonical home and recovery process on which later work depends. |
| 71 | |
| 72 | ### Delivery |
| 73 | |
| 74 | Bare Git repositories are served over SSH on infrastructure the operator controls. The CUE |
| 75 | [host schema](../schema/valley.cue) declares projects, publication mirrors, and backup policy. The |
| 76 | [NixOS module](../flake.nix) installs the reference host from that declaration. Other installers can |
| 77 | consume the same schema. |
| 78 | |
| 79 | The initial workflow used direct pushes to `main`. Agents could push a topic branch for manual |
| 80 | review and integration. This kept agent work usable before the integrator existed. That arrangement |
| 81 | is historical; protected projects now use the [request workflow](./contribute.md). |
| 82 | |
| 83 | Project knowledge begins as Markdown files containing bugs, outcomes, ideas, and decisions. The |
| 84 | [graph conventions](../.the-valley/README.md) and node schema define their format. Initially, lint |
| 85 | could report invalid content without preventing a direct push. The integrator later makes required |
| 86 | graph checks part of the admission policy. |
| 87 | |
| 88 | ### Replication and migration |
| 89 | |
| 90 | The initial durability design combines three copies: the primary repositories, an independent live |
| 91 | mirror, and periodic encrypted offsite backup. GitHub serves as the transitional live mirror. The |
| 92 | [replication decision](../.the-valley/decisions/dcr-d7952bc-phase0-replication-github-transitional.md) |
| 93 | records this choice. |
| 94 | |
| 95 | The host's per-project `mirrors` list controls publication. Replication publishes `main` and tags, |
| 96 | propagates their deletions, and removes other branch heads on the mirror. It does not publish |
| 97 | pending topic branches or modify a hosting service's separate namespaces. Replication is |
| 98 | best-effort: an unavailable mirror does not reject a push to the primary. |
| 99 | |
| 100 | The durability requirement is therefore an operational result to verify. Integrated work must reach |
| 101 | at least two independent locations, one offsite, within minutes. Pending work has periodic backup |
| 102 | depth until it integrates. Recovery from the offsite copy must complete within a day and must have |
| 103 | been tested. |
| 104 | |
| 105 | Migration starts by establishing copies and checking recovery. The canonical remote then changes per |
| 106 | repository as confidence is earned. A publication mirror can remain during the transition or serve a |
| 107 | later public view. Adding another mirrored project still needs the |
| 108 | [credential decision](../.the-valley/ideas/ida-a0e5d03-second-mirror-identity.md). |
| 109 | |
| 110 | The-valley itself is the pilot. Later projects reuse the verified workflow and add their own |
| 111 | verification, automation, and consumer-access requirements. |
| 112 | |
| 113 | ### Validation |
| 114 | |
| 115 | The phase is complete when every item in |
| 116 | [S1's acceptance checklist](./user-scenarios.md#acceptance-criteria) is satisfied. The claim is that |
| 117 | self-hosting can be the reliable and practical home for everyday work. |
| 118 | |
| 119 | ## Phase 1 — the event log |
| 120 | |
| 121 | This phase tests Git ref updates as a useful source of observable events. It supports S2 and the |
| 122 | later automation scenarios; the current integrator can also reconcile directly from Git. |
| 123 | |
| 124 | ### Delivery |
| 125 | |
| 126 | A `post-receive` hook projects ref updates onto NATS JetStream. The event vocabulary includes |
| 127 | ordinary ref changes and the attestation and request namespaces as those appear. `valley tail` |
| 128 | displays events. No automated effect is required to validate this first step. |
| 129 | |
| 130 | Git remains authoritative for repository state. Replaying current refs rebuilds the corresponding |
| 131 | projection. It does not recreate every past update or any external event absent from Git. |
| 132 | |
| 133 | ### Validation |
| 134 | |
| 135 | - A real push produces a `ref-updated` event visible within seconds, with the expected object ID. |
| 136 | - Repeated projection of the same repository refs produces identical event sets. |
| 137 | |
| 138 | This was validated on the pilot host on **2026-07-17**: a branch push appeared within a second, and |
| 139 | two full ref replays produced identical sets. |
| 140 | |
| 141 | Two limits remain explicit: |
| 142 | [bus authorization](../.the-valley/bugs/bd-d853d9c-bus-unauthenticated.md) is needed before an |
| 143 | automated consumer trusts events to act, and |
| 144 | [service isolation](../.the-valley/bugs/bd-500adf7-bus-shares-git-user.md) is needed before wider |
| 145 | network access. Full history retention is separate work. |
| 146 | |
| 147 | ## Phase 2 — local attestations |
| 148 | |
| 149 | This phase tests whether signed local verification is a practical daily workflow for S2. |
| 150 | |
| 151 | ### Delivery |
| 152 | |
| 153 | The `attest` helper runs checks over a committed tree, composes one statement per check, signs the |
| 154 | statements with the host's key, and stores them by subject digest and signer. Native atomic push |
| 155 | publishes the relevant refs. |
| 156 | |
| 157 | [Verification](./verification.md) defines pure and effectful claims, the exact text and signature |
| 158 | formats, and the helper's commands. The Nix runner is the reference implementation. Other runners |
| 159 | must be able to satisfy the same portable statement contract. |
| 160 | |
| 161 | External transparency publication and witness re-verification are deferred to Phase 6. Local |
| 162 | attestations establish attributable claims, not independent proof that a recognized signer executed |
| 163 | them honestly. |
| 164 | |
| 165 | ### Validation |
| 166 | |
| 167 | - Real changes carry evidence for their required checks and the trees checked. |
| 168 | - Publication uses native atomic Git push. |
| 169 | - Daily use shows that this is preferable to waiting for a separate CI service. |
| 170 | |
| 171 | The helper is implemented. The practical preference and sustained-use criteria still require |
| 172 | explicit validation. |
| 173 | |
| 174 | ## Phase 3 — the integrator |
| 175 | |
| 176 | This phase completes the intended S2 workflow: submit a verified change and have it integrated |
| 177 | promptly when its evidence remains applicable. |
| 178 | |
| 179 | ### Delivery |
| 180 | |
| 181 | Receive hooks restrict protected refs and prevent contributors from rewriting attestation refs. The |
| 182 | integrator reads requests, derives required checks from governing policy, verifies the evidence, and |
| 183 | applies the delta. It publishes the resulting outcome. |
| 184 | |
| 185 | The current controller polls request refs. Event consumption is not required for that |
| 186 | implementation. [Integration](./integration.md) defines its reconciliation loop, evidence-transfer |
| 187 | rules, and commit point. |
| 188 | |
| 189 | Checks are selected from all path classes touched by the diff. A knowledge change therefore takes |
| 190 | the same protected path as code while requiring only the checks its governing policy selects. The |
| 191 | [policy decision](../.the-valley/decisions/dcr-f41f718-declared-verification-policy.md) defines this |
| 192 | behavior. |
| 193 | |
| 194 | A change is a delta targeting a stream. The branch carries it. If the target moves, evidence can |
| 195 | still transfer per check when its inputs remain valid. A changed tree alone is not a reason to |
| 196 | repeat every check. |
| 197 | |
| 198 | ### Validation |
| 199 | |
| 200 | - Direct contributor pushes to protected `main` are rejected. |
| 201 | - A request leads to integration without a manual protected-ref write. |
| 202 | - A conflict or stale-evidence case produces a useful `request-stale` result naming the work that |
| 203 | needs refreshing, without repeated unchanged announcements. |
| 204 | - Invalid evidence is distinguished from stale evidence. |
| 205 | |
| 206 | The integrator and review submission path exist. The |
| 207 | [check-definition gap](../.the-valley/bugs/bd-eaefe82-check-definitions-come-from-the-branch.md) and |
| 208 | [contention risk](../.the-valley/bugs/bd-c324184-occ-starvation-under-contention.md) still need to |
| 209 | be addressed when assessing the integration guarantee. |
| 210 | |
| 211 | Changes to the integrator itself also require the bootstrap, approval, and recovery procedures |
| 212 | described in [open questions](./openquestions.md#identity-approval-and-bootstrap). |
| 213 | |
| 214 | ## Phase 4 — agent contributions |
| 215 | |
| 216 | This phase serves S3. A dispatched change follows the same integration process as human work, with |
| 217 | the agent run and its authority recorded. |
| 218 | |
| 219 | It follows usable attestations and integration from Phases 2 and 3. Any dispatch consumer acting on |
| 220 | bus events also depends on authenticated events. |
| 221 | |
| 222 | ### Delivery |
| 223 | |
| 224 | Klaus assigns work to an outcome node and agents read and update the graph as part of their work. |
| 225 | Dispatch needs answers about required checks, conflicts, review or approval, and whether a request |
| 226 | can land. Those answers must come from valley records and policy. |
| 227 | |
| 228 | An agent run has no signing key or registry entry of its own. The host signs provenance naming the |
| 229 | run's harness, model, prompt and context digests, and recorded delegation. The |
| 230 | [provenance design](../.the-valley/ideas/ida-45178f6-agent-identity-is-provenance.md) describes that |
| 231 | record. |
| 232 | |
| 233 | The current helper accepts provenance supplied by a caller. Automatic collection and verification of |
| 234 | delegated authority remain work for this phase and the trust design. |
| 235 | |
| 236 | Unattended integration applies where policy authorizes it. The |
| 237 | [core approval decision](../.the-valley/decisions/dcr-9c75283-substrate-adoption-and-the-core.md) |
| 238 | permits exemptions for ordinary work but retains physical approval for policy changes. Agent support |
| 239 | must preserve those requirements. |
| 240 | |
| 241 | ### Validation |
| 242 | |
| 243 | - A Klaus-dispatched change lands without human action between dispatch and landing when the |
| 244 | applicable policy permits it. |
| 245 | - The accepted record identifies the agent run through signed provenance and distinguishes it from |
| 246 | human-authored work. |
| 247 | - The assignment names an outcome node, and the work reads and writes knowledge nodes end to end. |
| 248 | |
| 249 | The claim is that the contribution workflow supports unattended authorized work. The accuracy of the |
| 250 | recorded provenance still depends on its producer and key custody. A later transparency log can |
| 251 | preserve the statement's publication; it cannot make false provenance true. |
| 252 | |
| 253 | ## Phase 5 — effectful reactions |
| 254 | |
| 255 | This phase serves S4: builds, deployments, and notifications follow changes, and their causes can be |
| 256 | reconstructed. |
| 257 | |
| 258 | ### Delivery |
| 259 | |
| 260 | The proposed Armstrong controller reacts to an integrated change, builds the required artifact, and |
| 261 | performs the configured deployment and notification. Controllers own these reactions independently. |
| 262 | |
| 263 | Knowledge changes join the same record. A change that satisfies an outcome can update that node |
| 264 | through the governed contribution path. Landing a commit alone does not establish that every outcome |
| 265 | it mentions is complete; completion links and evaluation need a concrete design. |
| 266 | |
| 267 | This phase must also choose durable storage for external-effect history. The bus cannot remain the |
| 268 | only unprotected copy of records required to explain deployments. |
| 269 | |
| 270 | ### Validation |
| 271 | |
| 272 | - Integration causes a build and deployment through a controller without manual coordination. |
| 273 | - The chain for a selected commit is reconstructable from the shared history. |
| 274 | - A change that completes an outcome records that completion, and the history connects the two. |
| 275 | |
| 276 | The minimum automation needed to migrate a project may be smaller than the full phase. |
| 277 | [Cosmo's migration outcome](../.the-valley/outcomes/oc-87deec8-valley-can-host-cosmo.md) |
| 278 | distinguishes moving existing configuration and consumers from building a general deployment |
| 279 | controller. |
| 280 | |
| 281 | ## Phase 6 — trust backstop |
| 282 | |
| 283 | This phase strengthens S3 and supports S5, contribution by an invited collaborator whose claims are |
| 284 | not accepted solely because they arrived. |
| 285 | |
| 286 | ### Delivery |
| 287 | |
| 288 | The proposed design adds: |
| 289 | |
| 290 | - External attestation publication with a verifiable inclusion proof. |
| 291 | - Independent witnesses that rerun pure checks and report agreement or divergence. |
| 292 | - A trust process that determines admission, restrictions, and revocation from evidence. |
| 293 | |
| 294 | A Tessera-backed transparency log is the current proposed publication mechanism. The trust |
| 295 | controller still needs rules for new signers, sampling, thresholds, and response to divergence. |
| 296 | |
| 297 | The identity registry and compiler provide part of the access machinery now. They do not replace |
| 298 | these verification and trust decisions. |
| 299 | |
| 300 | ### Validation |
| 301 | |
| 302 | - Every attestation is published to the log with a verifiable inclusion proof. |
| 303 | - A deliberately false pure-check claim is detected by independent verification and affects the |
| 304 | signer's standing under an explicit rule. |
| 305 | - An unknown signer's change enters only through the defined trust process. |
| 306 | - A real invited collaborator contributes through that process with bounded, revocable access. |
| 307 | |
| 308 | These observations would test particular guarantees. They do not establish an assurance level from |
| 309 | the names of the mechanisms alone. |
| 310 | |
| 311 | [Verification](./verification.md#trust-and-limits) explains the residual risks. In particular, the |
| 312 | [post-landing recovery problem](../.the-valley/bugs/bd-e63bac8-cascading-revocation-on-divergence.md) |
| 313 | needs an answer for accepted work and external effects; revoking a key does not undo them. |
| 314 | |
| 315 | ## Phase 7 — feedback and incident memory |
| 316 | |
| 317 | This phase serves S6 and develops the attention and discussion parts of S4. |
| 318 | |
| 319 | ### Delivery |
| 320 | |
| 321 | Views collect discussion, evidence, approvals, and outcomes for a change or causal chain. Their |
| 322 | records remain usable independently of a pull-request page. |
| 323 | |
| 324 | An attention router selects events that need a person's response. The |
| 325 | [outcome scheduler](../.the-valley/ideas/ida-eac723e-outcome-dag.md) chooses work; it does not |
| 326 | replace this routing decision. |
| 327 | |
| 328 | An incident creates durable project knowledge linking the observed failure, suspected cause, |
| 329 | uncertainty, and recovery. Attribution must distinguish evidence from inference. |
| 330 | |
| 331 | The graph already exists. This phase adds feedback and incident behavior to the files, agent use, |
| 332 | and recorded changes introduced earlier. The first product interface can expose those existing |
| 333 | records before the full routing and incident system is ready. |
| 334 | |
| 335 | ### Validation |
| 336 | |
| 337 | - A change's discussion, approval, and outcome are readable as one chronology. |
| 338 | - The router brings an event requiring action to the appropriate person without overwhelming them |
| 339 | with unrelated events. |
| 340 | - A real or deliberately exercised bad deployment produces an incident record with attribution, |
| 341 | stated uncertainty, and a link to the revert or other recovery. |
| 342 | |
| 343 | Attention routing remains a substantive design problem in |
| 344 | [open questions](./openquestions.md#attention-and-work-scheduling). |
| 345 | |
| 346 | ## Work across phases |
| 347 | |
| 348 | **Schemas and compatibility.** CUE already describes host declarations, events, graph nodes, |
| 349 | attestations, identity, and verification policy. New behavior must define how records are validated |
| 350 | and how older producers and consumers remain compatible. Conformance examples are part of that |
| 351 | contract. |
| 352 | |
| 353 | **CLI and product interface.** The CLI currently provides commands including `pending`, `review`, |
| 354 | `checks`, `tail`, and `replay`. The native contribution protocol remains available to other clients. |
| 355 | The [CLI graduation proposal](../.the-valley/decisions/dcr-2aa1a12-valley-cli-graduation.md) is |
| 356 | unresolved; continued prototype growth is not already an approved replacement for its lifecycle |
| 357 | rules. A product interface should expose the same state and operations to people and agents. |
| 358 | |
| 359 | **Durability.** Every new store needs a recovery and retention contract. Git refs preserve |
| 360 | repository state, but historical ref transitions, run records, deployment events, and later |
| 361 | transparency records need their own explicit treatment. A rebuildable view must not be mistaken for |
| 362 | the only copy of required history. |
| 363 | |
| 364 | **Portability.** Nix and NixOS are reference backends. Schemas and observable behavior must remain |
| 365 | implementable elsewhere. A field that only one backend can produce needs examination before it |
| 366 | becomes part of a shared contract. |
| 367 | |
| 368 | **Operational experience.** Migration and daily use should reveal which parts are costly or |
| 369 | confusing. Feed those findings into the graph and revise the next increment. The aim is useful |
| 370 | software and a development process that can keep improving with it. |