| 1 | # the-valley |
| 2 | |
| 3 | the-valley is a software change, verification, and planning system for teams where humans and |
| 4 | autonomous agents build together. Like a valley, it is the low place where streams of work meet and |
| 5 | settle into `main`. |
| 6 | |
| 7 | ## How a change moves |
| 8 | |
| 9 | 1. **Author** — A person or agent commits work locally, inspects the checks the change requires |
| 10 | (`valley checks`), and marks the change **ready** (`valley ready`). |
| 11 | 2. **Review** — An operator inspects ready changes (`valley pending`, `valley review <change>`). |
| 12 | When a change has an earlier **approved version**, `valley review` compares the active version |
| 13 | against it: a clean restack prints a short summary with any landings between the two bases and |
| 14 | pages nothing; a version that changed files pages the comparison (the files whose change differs, |
| 15 | the range-diff, and the shown version's diff of those files); and when no comparison is |
| 16 | available, it pages the full diff (`[v]iew full diff` is available at the prompt in every case). |
| 17 | 3. **Approve** — A principal holding the `request` grant approves the change |
| 18 | (`valley approve <change>`, or `[a]pprove` inside `valley review`), running and signing the |
| 19 | required checks and writing an integration request that binds that exact commit for integration. |
| 20 | 4. **Integrate** — When the host's integrator is enabled and `main` is protected, the integrator |
| 21 | verifies signed check evidence against the two-layer CUE policy (instance floor + optional |
| 22 | project policy), integrates the change into `main`, countersigns the evidence with a transfer |
| 23 | statement, and writes an outcome record (`land`, `stale`, `reject`, `refused-not-ready`, |
| 24 | `refused-merge`, `voided-withdrawn`, or `failed`). |
| 25 | |
| 26 | ## Quick tour |
| 27 | |
| 28 | ```sh |
| 29 | valley plan # view the live plan graph (knots) |
| 30 | valley checks # list checks required for your diff |
| 31 | valley ready --stamp # stamp a Change-Id, push, and mark v1 ready |
| 32 | valley pending # list ready changes and what each awaits |
| 33 | valley review kqxm # inspect the diff (and interactively approve) |
| 34 | ``` |
| 35 | |
| 36 | ## Prerequisites and current limitations |
| 37 | |
| 38 | - **Prerequisites:** On the client, the bundled environment from this flake (`nix develop` or the |
| 39 | flake package, providing `valley`, `valley-go`, `attest`, `cue`, `git`, `ssh`, `coreutils`, and |
| 40 | `less` for interactive review) and `nix` with flakes enabled; on the server, a NixOS host running |
| 41 | `services.valley`. |
| 42 | - **Configuration vs. guarantees:** Sealing `main` against direct SSH pushes, restricting who holds |
| 43 | the `request` grant, and enabling the integrator or identity compiler are host configuration |
| 44 | choices in `valley.cue` and `services.valley`. |
| 45 | - **Not built yet:** The automatic host restacker service (`restack` reports are validated and |
| 46 | displayed, and the read-only planner `valley-restacker once --report-only` is implemented, but the |
| 47 | write pass and host service are not built yet, so authors restack manually with `valley rebase`), |
| 48 | automatic approval carry across restacks, skipping already-attested checks during |
| 49 | `valley approve`, hardware-key (`sk-*`) touch-bound approval envelopes, and crash-safe atomic |
| 50 | multi-ref landing transactions. |
| 51 | - **Finding the live plan:** The project's roadmap and open questions live in the plan graph |
| 52 | (`refs/the-valley/knots`), viewed by running `valley plan` against a clone of the valley host. The |
| 53 | host's mirror publisher sends only `main` and tags (`refs/heads/main` and `refs/tags/*`), so |
| 54 | cloning from a push mirror (such as GitHub) does not fetch the host's plan graph or change |
| 55 | records. |
| 56 | |
| 57 | ## Documentation |
| 58 | |
| 59 | - **[Concepts and glossary](./docs/concepts.md)** — Why the-valley is shaped this way, core |
| 60 | concepts, and every term defined. |
| 61 | - **[Architecture](./docs/architecture.md)** — Component design, verification policy, identity |
| 62 | compilation, and executable checks. |
| 63 | - **[Security](./docs/security.md)** — Threat model, trust boundaries, and rollout gates. |
| 64 | - **[Archive](./archive/)** and **[Research](./research/)** — Historical design exploration |
| 65 | (`dcr-*`, `ida-*`, `bd-*`, `oc-*`) and foundational notes. |