| 1 | # .the-valley — knowledge v0 |
| 2 | |
| 3 | The knowledge-graph convention from |
| 4 | [user-scenarios.md § S1](../design/user-scenarios.md#s1--my-repos-live-on-my-infrastructure-and-i-can-never-lose-them): |
| 5 | **a directory convention, not a system**. Issues, outcomes, ideas, and decisions live with the repo |
| 6 | as plain files, cloned and backed up by the same motion that protects the code. |
| 7 | |
| 8 | ## The convention |
| 9 | |
| 10 | One file per node. Each file is markdown with YAML frontmatter carrying the structured layer: |
| 11 | |
| 12 | ```yaml |
| 13 | --- |
| 14 | type: idea # outcome | bug | idea | decision |
| 15 | id: ida-eac723e # <prefix>-<short hash> |
| 16 | status: adopted # see enums below |
| 17 | title: One-line human title |
| 18 | created: 2026-07-02 |
| 19 | source: PR #1 # optional — where the content came from |
| 20 | --- |
| 21 | ``` |
| 22 | |
| 23 | One typed edge exists now: **outcome nodes carry `blocked_by`** (a list of node ids) in frontmatter, |
| 24 | because the live outcome-DAG experiment |
| 25 | ([ideas/ida-3145b7a-demand-pressure.md](./ideas/ida-3145b7a-demand-pressure.md)) requires it. The |
| 26 | other typed edges (`closes`, `supersedes`, …) come later; until then, prose links in the body are |
| 27 | enough. |
| 28 | |
| 29 | ## Types, directories, prefixes |
| 30 | |
| 31 | | Type | Directory | Prefix | Status enum | |
| 32 | | -------- | ------------ | ------- | ------------------------------------------------- | |
| 33 | | outcome | `outcomes/` | `oc-*` | `open` \| `in-progress` \| `done` \| `abandoned` | |
| 34 | | bug | `bugs/` | `bd-*` | `open` \| `closed` | |
| 35 | | idea | `ideas/` | `ida-*` | `raw` \| `exploring` \| `adopted` \| `superseded` | |
| 36 | | decision | `decisions/` | `dcr-*` | `proposed` \| `decided` \| `superseded` | |
| 37 | |
| 38 | IDs are short and hash-derived (e.g. first 7 hex chars of a hash of the slug) — coordination-free, |
| 39 | at the cost of prettiness. Filenames are `<id>-<slug>.md`. |
| 40 | |
| 41 | ## Writing a node |
| 42 | |
| 43 | **The graph at any commit presents the design as it stands now.** It carries no history of how the |
| 44 | thinking got there. That history is in git history, and only there. |
| 45 | |
| 46 | - **Restate, don't accrete.** When thinking evolves, rewrite the node as the cleanest statement of |
| 47 | current understanding. No Addendum, Update, Revision or Correction sections, ever, and no |
| 48 | superseded framing left standing beside its replacement. |
| 49 | - **A node never defines the design by contrast with an earlier or rejected version of itself.** No |
| 50 | "not one", no "rather than", no "as described above, but actually". A decision node records what |
| 51 | was decided, not the options weighed against it. |
| 52 | - **Rationale stays; deliberation goes.** This is the distinction that makes the rule above usable. |
| 53 | A reason stated as a property of the current design belongs in the node; a record of a fork being |
| 54 | weighed and settled does not. When unsure, state the reason positively as a fact about the design |
| 55 | rather than as a comparison against something not chosen. |
| 56 | - **A node must not assert something and then correct itself later in the same document.** State it |
| 57 | correctly where a reader meets it first. A reader who stops halfway must not be left with the |
| 58 | superseded version. |
| 59 | - **Replacing something includes deleting what it replaces, in the same change.** This covers the |
| 60 | files a node points at as much as its prose — a superseded example left beside its replacement is |
| 61 | the same defect as a superseded paragraph. |
| 62 | |
| 63 | Two rules that govern the design documents govern nodes identically, and are stated once, where they |
| 64 | already live: |
| 65 | |
| 66 | - **Disembodied voice** — [AGENTS.md](../AGENTS.md), writing standard. A node speaks about |
| 67 | the-valley itself: no names, no second person, no reference to project participants. Roles are |
| 68 | fine, as are external prior art and its authors. Frontmatter `source:` follows the same rule; it |
| 69 | names a date and a venue, never a person. |
| 70 | - **Prose format** — [[ida-1ec03b1]] |
| 71 | ([ideas/ida-1ec03b1-path-scoped-verification-policy.md](./ideas/ida-1ec03b1-path-scoped-verification-policy.md)). |
| 72 | Markdown prose is filled paragraphs hard-wrapped at 100 characters. `nix run .#fmt` rewraps; the |
| 73 | flake's `prose-format` check enforces it. |
| 74 | |
| 75 | ## The interface |
| 76 | |
| 77 | - **Creating a node is a commit.** Closing one is a commit that flips `status`. |
| 78 | - **Listing is `ls`. Search is `grep`. History is `git log`.** |
| 79 | - No indexer, no events, no validation. **The schemas above are documentation, not enforcement** — |
| 80 | nothing checks them until there is an integrator to enforce them. |