| 1 | # The-valley knowledge graph |
| 2 | |
| 3 | This directory holds the project's ideas, decisions, bugs, and outcomes as Markdown files. The graph |
| 4 | travels with the repository, uses its history, and changes through the same integration path as |
| 5 | code. |
| 6 | |
| 7 | A node's status describes its role in the design. A decided requirement may still need |
| 8 | implementation. An exploring idea or open risk is material for review, rather than a commitment to a |
| 9 | finished design. |
| 10 | |
| 11 | ## Reading the graph |
| 12 | |
| 13 | Start with the subject relevant to the work, then follow links to its supporting decisions and open |
| 14 | questions. |
| 15 | |
| 16 | | Subject | Starting points | |
| 17 | | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 18 | | Product interface and migration | [Project interface](./ideas/ida-23aa413-project-surfaces-are-derived-views.md), [cosmo migration](./outcomes/oc-87deec8-valley-can-host-cosmo.md) | |
| 19 | | Projects, valleys, and hosts | [Valley definition](./decisions/dcr-8f069dd-valley-is-the-unit.md), [governing state](./decisions/dcr-2965320-valley-is-its-repository.md), [host isolation](./decisions/dcr-9b5da04-hosts-serve-isolated-valleys.md) | |
| 20 | | Policy and identity | [Policy composition](./decisions/dcr-f41f718-declared-verification-policy.md), [approval requirements](./decisions/dcr-9c75283-substrate-adoption-and-the-core.md), [identity registry](./decisions/dcr-b87f6e8-identity-is-a-governed-registry.md) | |
| 21 | | Contributions and verification | [Change identity](./ideas/ida-93e4f91-changes-not-branches.md), [attestations](./decisions/dcr-0de694f-phase2-attestation-shape.md), [evidence transfer](./decisions/dcr-439b771-integration-occ-over-content-addressed-evidence.md) | |
| 22 | | Outcomes and agent work | [Scheduling](./ideas/ida-eac723e-outcome-dag.md), [stalled work](./ideas/ida-3145b7a-demand-pressure.md), [Klaus requirements](./ideas/ida-594df79-klaus-s3-requirements-oracle.md) | |
| 23 | | Learning from work | [Run provenance](./ideas/ida-45178f6-agent-identity-is-provenance.md), [feedback loops](./ideas/ida-5a59fef-one-plumbing-for-every-loop.md), [reconstructing design reasoning](./ideas/ida-f83d7ba-theory-revival-accelerator.md) | |
| 24 | |
| 25 | The full collections are [ideas](./ideas/), [decisions](./decisions/), [bugs](./bugs/), and |
| 26 | [outcomes](./outcomes/). |
| 27 | |
| 28 | ## Files and metadata |
| 29 | |
| 30 | Each node has its own file with YAML frontmatter and a Markdown body: |
| 31 | |
| 32 | ```yaml |
| 33 | --- |
| 34 | type: idea |
| 35 | id: ida-eac723e |
| 36 | status: adopted |
| 37 | title: Schedule work from outcomes and their dependencies |
| 38 | created: 2026-07-02 |
| 39 | source: PR #1 |
| 40 | --- |
| 41 | ``` |
| 42 | |
| 43 | The required fields identify the node and its status. The optional `source` records where the |
| 44 | content came from. [schema/node.cue](../schema/node.cue) is the checkable definition. |
| 45 | |
| 46 | | Type | Directory | ID prefix | Status values | |
| 47 | | -------- | ------------ | --------- | --------------------------------------------------------------------- | |
| 48 | | Outcome | `outcomes/` | `oc-` | `open`, `in-progress`, `done`, `abandoned` | |
| 49 | | Bug | `bugs/` | `bd-` | `open`, `closed` | |
| 50 | | Idea | `ideas/` | `ida-` | `raw`, `exploring`, `adopted`, `graduated`, `superseded`, `discarded` | |
| 51 | | Decision | `decisions/` | `dcr-` | `proposed`, `decided`, `superseded` | |
| 52 | |
| 53 | An ID consists of the type prefix and the first seven hexadecimal characters of the slug's SHA-256 |
| 54 | hash. The filename is `<id>-<slug>.md`. |
| 55 | |
| 56 | ```sh |
| 57 | printf '%s' '<slug>' | sha256sum | cut -c1-7 |
| 58 | ``` |
| 59 | |
| 60 | The lint enforces this derivation for nodes created after 2026-08-05. Earlier IDs keep their |
| 61 | existing values and are checked for shape and uniqueness. Editing a title does not rename a node or |
| 62 | change its ID. |
| 63 | |
| 64 | ## Relationships |
| 65 | |
| 66 | Outcome nodes must carry `blocked_by`, a list of node IDs. Any node type may block an outcome. A |
| 67 | blocker clears at a terminal state for its type, as defined in |
| 68 | [[dcr-593d3d1]](decisions/dcr-593d3d1-ideas-are-transitional.md): |
| 69 | |
| 70 | | Type | States that clear a blocker | |
| 71 | | -------- | -------------------------------------- | |
| 72 | | Idea | `graduated`, `superseded`, `discarded` | |
| 73 | | Decision | `decided`, `superseded` | |
| 74 | | Bug | `closed` | |
| 75 | | Outcome | `done`, `abandoned` | |
| 76 | |
| 77 | An adopted idea has been accepted but still awaits graduation. It remains a blocker. |
| 78 | |
| 79 | Ideas and decisions may carry `supersedes`, listing the IDs they replace. Each listed node must have |
| 80 | status `superseded`. The surviving node declares the relationship, and the replaced node directs |
| 81 | readers to the current material. |
| 82 | |
| 83 | A graduated idea must carry `graduated_into`. It names either a decision ID or a repository-relative |
| 84 | Markdown path containing the developed design. This field is allowed exactly when the idea has |
| 85 | status `graduated`. |
| 86 | |
| 87 | Other relationships, including proposed completion and discussion edges, use prose links until the |
| 88 | schema supports them. Node IDs can be linked as `[[ida-eac723e]]`; ordinary relative Markdown links |
| 89 | also work. |
| 90 | |
| 91 | ## Writing and revising nodes |
| 92 | |
| 93 | Open with a plain paragraph saying what the node proposes, decides, requires, or reports. Context, |
| 94 | reasoning, consequences, and open questions follow as needed. [AGENTS.md](../AGENTS.md) defines the |
| 95 | writing standard and document levels. |
| 96 | |
| 97 | The graph presents current understanding. Git preserves the history of how that understanding |
| 98 | developed. |
| 99 | |
| 100 | When a claim changes, restate it where it appears. Do not leave an earlier assertion followed by an |
| 101 | update that retracts it. Preserve the reason for the current design; remove discussion of discarded |
| 102 | alternatives unless it contains a distinct insight that still needs a home. |
| 103 | |
| 104 | Where a decision replaces another, update the relevant references and examples in the same change. A |
| 105 | superseded node should identify its replacement before a reader encounters an obsolete rule. |
| 106 | |
| 107 | For conflicting claims, use `git blame` on the claims themselves to establish which was written |
| 108 | later. A formatting sweep does not make an old claim new. Recency helps identify the current |
| 109 | decision but does not establish correctness. Resolve the conflict so the documents give a coherent |
| 110 | account. |
| 111 | |
| 112 | Use a project voice. Refer to participants by role, and keep names out of node prose and `source` |
| 113 | fields. External authors and prior art may be cited. |
| 114 | |
| 115 | Paragraphs are hard-wrapped at 100 characters by the repository formatter. `nix run .#fmt` applies |
| 116 | the format, and `prose-format` checks it. |
| 117 | |
| 118 | ## Editing and validation |
| 119 | |
| 120 | Creating a node or changing its status is a repository change. Ordinary file tools provide listing |
| 121 | and search; Git provides history. |
| 122 | |
| 123 | The `knowledge-lint` check validates frontmatter, IDs, filenames, typed relationships, wiki links, |
| 124 | graduation destinations, and relative links. Supersession targets must have the corresponding |
| 125 | status. The check runs without an integrator and can provide required evidence for integration under |
| 126 | the project's policy. |
| 127 | |
| 128 | The flake exports this check as `lib.knowledgeLint` so another project can validate its graph using |
| 129 | the same implementation. [flake.nix](../flake.nix) documents the consuming interface. |
| 130 | [[ida-a9e274c]](ideas/ida-a9e274c-mandated-checks-come-from-the-instance.md) explains the source of |
| 131 | valley-mandated checks. |
| 132 | |
| 133 | Structural checks cannot establish that a node is clear, correct, or implemented. Those judgments |
| 134 | remain part of review. |