| 1 | # the-valley |
| 2 | |
| 3 | > "Whatever." |
| 4 | |
| 5 | A space to rethink developer workflow and source management from scratch. |
| 6 | |
| 7 | This is not a project to "move off GitHub." That framing is too narrow. The question is: **what |
| 8 | would source management look like if designed today**, with AI agents as first-class authors and no |
| 9 | assumption that a single platform should own hosting, identity, CI, artifacts, review, and |
| 10 | automation? |
| 11 | |
| 12 | ## The pain |
| 13 | |
| 14 | GitHub bundles every concern of source management — from hosting through verification to project |
| 15 | knowledge; [archive/design/architecture.md](./archive/design/architecture.md) tables them one by one |
| 16 | — and does several of them poorly enough that unbundling looks attractive: |
| 17 | |
| 18 | - **CI is slow and YAML-shaped.** The feedback loop that matters most runs in minutes on someone |
| 19 | else's infrastructure, configured in a language nobody chose. |
| 20 | - **The pull request conflates four things** — coordination, gating, record, and notification — and |
| 21 | the bundle serves each worse than a mechanism designed for it would. |
| 22 | - **Agents are second-class.** The platform is built around a human clicking through a web UI. An AI |
| 23 | agent authoring changes, reading project knowledge, or reacting to events is an afterthought |
| 24 | bolted on through APIs designed for something else. |
| 25 | - **Project knowledge has no home.** Issues, wikis, docs, scratch files, and heads — scattered, |
| 26 | unstructured, and invisible to the agents doing a growing share of the work. |
| 27 | |
| 28 | ## The promise |
| 29 | |
| 30 | Compose small tools over a durable substrate you own. Each concern gets the mechanism it deserves |
| 31 | instead of the bundle's compromise, and everything that matters survives the loss of any one host. |
| 32 | |
| 33 | ## Where this goes |
| 34 | |
| 35 | At its most general, the-valley is a **recursive, transparent outcome-production engine**: its unit |
| 36 | of work is the outcome — a thing someone wants to exist that does not yet — and its job is to |
| 37 | complete the dependency graph outcomes form, transparently |
| 38 | ([ida-eac723e](./archive/.the-valley/ideas/ida-eac723e-outcome-dag.md) carries the full sketch). The |
| 39 | software development lifecycle is the v1 reference implementation, not the boundary: everything |
| 40 | above is how the engine gets pointed at code first. Recursive includes the engine itself — |
| 41 | the-valley builds the-valley. |
| 42 | |
| 43 | ## Constraints |
| 44 | |
| 45 | - **Open source.** |
| 46 | - **Minimal.** Prefer composing small tools over building a platform. |
| 47 | - **Nix-native.** Builds, verification, and artifacts run as derivations in the reference |
| 48 | implementation — Nix is a backend, not the substrate, and every schema stays portable beyond it |
| 49 | ([ida-b9f646c](./archive/.the-valley/ideas/ida-b9f646c-nix-backend-not-substrate.md)). |
| 50 | - **Decentralized where possible.** Accept centralization only where ordering or coordination |
| 51 | genuinely require it, and be explicit about it. |
| 52 | |
| 53 | ## Status |
| 54 | |
| 55 | Phase 0 in progress. The repo ships its first artifacts: the CUE schema defining what a valley host |
| 56 | declares — its projects, their push mirrors, and the durability policy for its data |
| 57 | ([`schema/valley.cue`](./schema/valley.cue), with an example in |
| 58 | [`examples/host.cue`](./examples/host.cue)) — and a NixOS module ([`flake.nix`](./flake.nix)) that |
| 59 | installs a valley host from that declaration. Phase 1's spine is landing: the host module can run an |
| 60 | event bus onto which every push's ref updates are projected as events |
| 61 | ([`schema/events.cue`](./schema/events.cue)), watchable with `valley tail`. The knowledge-graph |
| 62 | convention has a checkable form as well: [`schema/node.cue`](./schema/node.cue) describes a node's |
| 63 | frontmatter, and the flake exposes the lint that enforces it as `lib.knowledgeLint`, so any project |
| 64 | can instantiate the same check over its own tree from a flake input. The plan of record is |
| 65 | [`docs/roadmap.md`](./docs/roadmap.md). |
| 66 | |
| 67 | ## The docs |
| 68 | |
| 69 | - [`docs/purpose.md`](./docs/purpose.md) — purpose and principles. |
| 70 | - [`docs/architecture.md`](./docs/architecture.md) — the-valley as deployed: what runs, and the life |
| 71 | of a change. |
| 72 | - [`docs/security.md`](./docs/security.md) — security and rollouts: the gates along the path a |
| 73 | change takes, the trust roots, and the residual risks. |
| 74 | - [`docs/roadmap.md`](./docs/roadmap.md) — the milestones, what each unlocks, what is deferred, and |
| 75 | the open decisions. |
| 76 | - [`archive/`](./archive/) — the earlier design documents and knowledge graph, kept read-only so the |
| 77 | node ids cited in code still resolve. |
| 78 | - [`bin/valley`](./bin/valley) — the integrator's CLI: the Phase 0 verbs (`pending`, `review`) as a |
| 79 | plain shell script, accreting one verb per phase per the roadmap's CLI thread. `valley checks` |
| 80 | derives the checks a change owes from the declared verification policy, and only reports them. The |
| 81 | policy it composes is this project's own layer at `policy/project` and the floor of the valley |
| 82 | named at [`policy/valley`](./policy/valley), fetched from that valley's repository. Both are read |
| 83 | from the tip of the branch the change targets, never from your checkout, which is what the |
| 84 | integrator reads — so the answer is the same from any branch, however stale. It also groups the |
| 85 | owed checks by their declared cost. `valley approve` and `valley rebase` do what review's keys do, |
| 86 | for front ends that show a change their own way, and `valley status --json` gives them the |
| 87 | change's status as a versioned JSON object. `valley ready`, `valley unready` and `valley withdraw` |
| 88 | record a change's versions and whether it is ready, a draft or withdrawn, under a change ID that |
| 89 | survives rebases. Every verb names a change by that ID, by its short handle, or by its branch. |
| 90 | `valley approve --head` approves exactly the head a front end showed, and the integrator lands |
| 91 | nothing for a change that is not ready. |