gunk-dev/the-valley

README.md

source4c55e5bb434cmain's published tip history
7.9 KiB · Rendered
1# The-valley knowledge graph
2
3This directory holds the project's ideas, decisions, bugs, and outcomes as Markdown files. The graph
4travels with the repository, uses its history, and changes through the same integration path as
5code.
6
7A node's status describes its role in the design. A decided requirement may still need
8implementation. An exploring idea or open risk is material for review, rather than a commitment to a
9finished design.
10
11## Reading the graph
12
13Start with the subject relevant to the work, then follow links to its supporting decisions and open
14questions.
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
25The full collections are [ideas](./ideas/), [decisions](./decisions/), [bugs](./bugs/), and
26[outcomes](./outcomes/).
27
28## Files and metadata
29
30Each node has its own file with YAML frontmatter and a Markdown body:
31
32```yaml
33---
34type: idea
35id: ida-eac723e
36status: adopted
37title: Schedule work from outcomes and their dependencies
38created: 2026-07-02
39source: PR #1
40---
41```
42
43The required fields identify the node and its status. The optional `source` records where the
44content 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
53An ID consists of the type prefix and the first seven hexadecimal characters of the slug's SHA-256
54hash. The filename is `<id>-<slug>.md`.
55
56```sh
57printf '%s' '<slug>' | sha256sum | cut -c1-7
58```
59
60The lint enforces this derivation for nodes created after 2026-08-05. Earlier IDs keep their
61existing values and are checked for shape and uniqueness. Editing a title does not rename a node or
62change its ID.
63
64## Relationships
65
66Outcome nodes must carry `blocked_by`, a list of node IDs. Any node type may block an outcome. A
67blocker 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
77An adopted idea has been accepted but still awaits graduation. It remains a blocker.
78
79Ideas and decisions may carry `supersedes`, listing the IDs they replace. Each listed node must have
80status `superseded`. The surviving node declares the relationship, and the replaced node directs
81readers to the current material.
82
83A graduated idea must carry `graduated_into`. It names either a decision ID or a repository-relative
84Markdown path containing the developed design. This field is allowed exactly when the idea has
85status `graduated`.
86
87Other relationships, including proposed completion and discussion edges, use prose links until the
88schema supports them. Node IDs can be linked as `[[ida-eac723e]]`; ordinary relative Markdown links
89also work.
90
91## Writing and revising nodes
92
93Open with a plain paragraph saying what the node proposes, decides, requires, or reports. Context,
94reasoning, consequences, and open questions follow as needed. [AGENTS.md](../AGENTS.md) defines the
95writing standard and document levels.
96
97The graph presents current understanding. Git preserves the history of how that understanding
98developed.
99
100When a claim changes, restate it where it appears. Do not leave an earlier assertion followed by an
101update that retracts it. Preserve the reason for the current design; remove discussion of discarded
102alternatives unless it contains a distinct insight that still needs a home.
103
104Where a decision replaces another, update the relevant references and examples in the same change. A
105superseded node should identify its replacement before a reader encounters an obsolete rule.
106
107For conflicting claims, use `git blame` on the claims themselves to establish which was written
108later. A formatting sweep does not make an old claim new. Recency helps identify the current
109decision but does not establish correctness. Resolve the conflict so the documents give a coherent
110account.
111
112Use a project voice. Refer to participants by role, and keep names out of node prose and `source`
113fields. External authors and prior art may be cited.
114
115Paragraphs are hard-wrapped at 100 characters by the repository formatter. `nix run .#fmt` applies
116the format, and `prose-format` checks it.
117
118## Editing and validation
119
120Creating a node or changing its status is a repository change. Ordinary file tools provide listing
121and search; Git provides history.
122
123The `knowledge-lint` check validates frontmatter, IDs, filenames, typed relationships, wiki links,
124graduation destinations, and relative links. Supersession targets must have the corresponding
125status. The check runs without an integrator and can provide required evidence for integration under
126the project's policy.
127
128The flake exports this check as `lib.knowledgeLint` so another project can validate its graph using
129the 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
131valley-mandated checks.
132
133Structural checks cannot establish that a node is clear, correct, or implemented. Those judgments
134remain part of review.