| 1 | # User scenarios |
| 2 | |
| 3 | The docs are layered: premise ([README](../../README.md)) → requirements |
| 4 | ([requirements.md](./requirements.md)) → architecture ([architecture.md](./architecture.md)) → |
| 5 | design. This document sits at the requirements layer: an escalating ladder of user scenarios, |
| 6 | ordered by actors and trust, that the requirements fall out of. It is strictly problem-space — what |
| 7 | a user experiences and needs, with zero mechanisms. |
| 8 | |
| 9 | A scenario gets acceptance-level detail only when it becomes the top priority; each rung is fleshed |
| 10 | out as the project builds toward it, never sooner. Right now only S1 is detailed. |
| 11 | |
| 12 | ## The ladder |
| 13 | |
| 14 | Each rung adds actors or removes trust. Each names its knowledge-graph increment — the slice of the |
| 15 | [project-knowledge need](./requirements.md) that rung forces into existence, because the knowledge |
| 16 | substrate grows with the scenarios rather than arriving as a system. |
| 17 | |
| 18 | | Id | Scenario | Anchored in | Knowledge increment | |
| 19 | | --- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------- | |
| 20 | | S1 | My repos live on my infrastructure and I can never lose them. | the-valley itself as the pilot | Issues, outcomes, ideas, and decisions live with the repo as plain files | |
| 21 | | S2 | I push, and seconds later it's integrated; I never wait for CI. | Daily solo work | None new | |
| 22 | | S3 | I dispatch an agent; its change lands with the same guarantees, attributably, unsupervised. | klaus, the operator's daily agent-orchestration tool | Agents read and write knowledge nodes; dispatch targets an outcome node, not a GitHub issue | |
| 23 | | S4 | Builds, deploys, and notifications just happen; "why did X occur" is answerable from one history. | cosmo (NixOS infra), reel-life (a deployed service) | Knowledge changes become observable events; a landed change can close the outcome it serves | |
| 24 | | S5 | A second, semi-trusted human lands a change without me granting them anything platform-shaped. | The first collaborator | None new | |
| 25 | | S6 | A bad deploy gets attributed, reverted, and remembered. | A reel-life regression | Incidents file their own knowledge nodes, with attribution | |
| 26 | | S7 | Strangers contribute safely. | Nothing — explicitly deferred, maybe never | — | |
| 27 | |
| 28 | ## S1 — my repos live on my infrastructure and I can never lose them |
| 29 | |
| 30 | **The narrative.** Daily life looks almost exactly like today. Clone, edit, push — same git, same |
| 31 | agents, same habits. The difference is where the pushes go: the canonical copy of every repo sits on |
| 32 | hardware the operator controls, and within minutes of integrating, work exists in at least two |
| 33 | independent places, one of them offsite. GitHub fades to a mirror nobody thinks about. If the |
| 34 | primary box dies, everything comes back from the offsite copy within a day — and that claim has been |
| 35 | tested, not assumed. Meanwhile the project's issues, ideas, and decisions travel with the repo as |
| 36 | files, cloned and backed up by the same motion that protects the code. |
| 37 | |
| 38 | **Scope decisions already made.** |
| 39 | |
| 40 | - **Hosting only.** Bare repos on the operator's existing tailnet box (classic-laddie). Direct push |
| 41 | to `main` is correct at this rung — there is no integrator yet, and feeling its absence is S2 and |
| 42 | S3's job to motivate. |
| 43 | - **Mirror-first migration.** Dual-push with GitHub retained as a transitional mirror; the canonical |
| 44 | origin flips per-repo once confidence is earned. Reversible at every step. |
| 45 | - **Durability means "integrated = replicated".** RPO ≈ 0 for integrated work: every change |
| 46 | integrated into the primary is in at least two independent locations within minutes, one of them |
| 47 | offsite (during migration, the GitHub mirror). The mirror publishes integrated history only, so an |
| 48 | in-flight topic branch has offsite depth from the periodic backup alone until it integrates |
| 49 | ([dcr-24d62f7](../.the-valley/decisions/dcr-24d62f7-publication-mirror-not-review-queue.md)). RTO |
| 50 | is relaxed: full restore within a day from the offsite copy. A restore must be _performed and |
| 51 | verified_ before S1 counts as done — configured is not done. The mechanism is decided |
| 52 | ([dcr-d7952bc](../.the-valley/decisions/dcr-d7952bc-phase0-replication-github-transitional.md)); |
| 53 | the chosen layers live in [roadmap Phase 0](./roadmap.md#phase-0--mvp-repos-off-github), not here. |
| 54 | - **Agents keep working — direct-push interim mode.** klaus agents today work GitHub-PR-shaped. |
| 55 | During S1 they operate degraded: push a branch to classic-laddie, the operator reviews the diff |
| 56 | and merges by hand — the operator _is_ the integrator, manually. This is deliberate: that pain is |
| 57 | the validation signal that motivates the integrator rung. S1 is not done if agent-driven |
| 58 | development on the pilot repo has to pause. |
| 59 | - **Knowledge v0 — a directory convention, not a system.** Issues, outcomes, ideas, and decisions |
| 60 | are plain markdown files in the repo. Creating an issue is a commit; closing one is a commit; |
| 61 | listing is `ls`; search is `grep`; history is `git log`. No indexer, no events; the convention is |
| 62 | checked, not enforced — the flake's knowledge lint vets every node, and nothing stops a broken |
| 63 | graph from landing until there is an integrator. The pilot repo's open design questions and review |
| 64 | findings become the seed content (a follow-up, not part of establishing this rung). The convention |
| 65 | is now instantiated at [.the-valley/](../.the-valley/README.md). |
| 66 | |
| 67 | **Acceptance criteria.** S1 holds when every box is checked — by looking, not by reviewing |
| 68 | configuration: |
| 69 | |
| 70 | - [x] the-valley's canonical origin is classic-laddie; GitHub is a mirror. |
| 71 | - [x] Every integrated change is present in at least two independent locations within minutes, |
| 72 | verified by checking both, not by trusting the config; an in-flight branch waits on the |
| 73 | periodic offsite backup |
| 74 | ([dcr-24d62f7](../.the-valley/decisions/dcr-24d62f7-publication-mirror-not-review-queue.md)). |
| 75 | - [x] One full restore from the offsite copy has been performed and verified. |
| 76 | - [ ] A week of real work — human _and_ agent — on the pilot repo without touching GitHub. |
| 77 | - [x] A klaus agent change lands end to end via direct-push mode. |
| 78 | - [x] At least one real issue is opened, worked, and closed as an in-repo node — including one agent |
| 79 | dispatched against a node instead of a GitHub issue. |
| 80 | - [ ] The migration-plus-restore runbook exists and is repeatable for the next repo. |
| 81 | |
| 82 | ## The rest of the ladder |
| 83 | |
| 84 | One paragraph per rung. None carry acceptance criteria yet; each gets them when it becomes the top |
| 85 | priority, informed by what the rungs below it taught. |
| 86 | |
| 87 | **S2 — I push, and seconds later it's integrated; I never wait for CI.** The feedback loop that |
| 88 | governs daily work drops from minutes on someone else's infrastructure to seconds on the operator's |
| 89 | own. This is the largest quality-of-life change in the whole design and the reason unbundling is |
| 90 | worth it at N=1. The hardest thing it demands: checks run where the work was written have to be |
| 91 | trustworthy enough to integrate against — a verifiable claim, not a hope. |
| 92 | |
| 93 | **S3 — I dispatch an agent; its change lands with the same guarantees, attributably, unsupervised.** |
| 94 | klaus dispatches agents daily; today their output funnels through GitHub-shaped review. At this rung |
| 95 | an agent's change lands with the same guarantees as the operator's own, attributable to the agent |
| 96 | that made it, with no human babysitting the pipeline. It matters because agents author a growing |
| 97 | share of the work and are the first users of most of this system. Hardest demand: attribution for a |
| 98 | non-human author — knowing afterwards exactly who did what, in a way that can't be waved through or |
| 99 | forged. |
| 100 | |
| 101 | **S4 — Builds, deploys, and notifications just happen; "why did X occur" is answerable from one |
| 102 | history.** A change lands and its consequences — build, deploy to cosmo-managed infra, a reel-life |
| 103 | release, a notification — follow without anyone kicking anything. When something surprising happens, |
| 104 | "why" is answered from one history instead of reconstructed across disconnected tools. Hardest |
| 105 | demand: keeping causality queryable — the chain from change to effect must survive as a record, not |
| 106 | as tribal memory. |
| 107 | |
| 108 | **S5 — A second, semi-trusted human lands a change without me granting them anything |
| 109 | platform-shaped.** The first collaborator arrives: trusted enough to invite, not trusted blindly. |
| 110 | They land a change without the operator creating accounts, assigning roles, or administering a |
| 111 | platform. It matters as the first test that the system holds at N=2 and that trust is grantable, |
| 112 | bounded, and revocable — the [requirements](./requirements.md) promise for small teams. Hardest |
| 113 | demand: giving a second person exactly enough — access that is easy to grant, easy to limit, and |
| 114 | easy to take back. |
| 115 | |
| 116 | **S6 — A bad deploy gets attributed, reverted, and remembered.** A reel-life deploy goes bad. The |
| 117 | system attributes the regression to the change that caused it, reverts, and remembers: the incident |
| 118 | becomes part of the project's durable memory instead of a war story. Hardest demand: attribution |
| 119 | under uncertainty — monitoring rarely _knows_ which change is at fault, and a confidently wrong |
| 120 | answer is worse than none. |
| 121 | |
| 122 | **S7 — Strangers contribute safely.** Unknown contributors land changes without endangering |
| 123 | anything. Explicitly deferred, maybe never — public-social scale and spam resistance are |
| 124 | [non-goals](./requirements.md). It stays on the ladder because it is the limit the trust model |
| 125 | should degrade toward gracefully, not a target being built for. |