gunk-dev/the-valley

AGENTS.md

source83edb7c4180fmain's published tip history
6.8 KiB · Rendered
1# Working in this repository
2
3Most of the-valley is prose: design documents and knowledge-graph nodes. How you write is most of
4the work.
5
6## Writing standard
7
8Write clearly, simply, and without compression that would tax a knowledgeable software engineer.
9
10- Lead with the plain statement. Say what the thing is in ordinary words before qualifying,
11 justifying, or elaborating it.
12- One new idea per sentence. Density is fine when restating what the reader already knows; a new
13 concept gets its own sentence.
14- Unpack rather than compress. If a sentence stacks abstractions or asks the reader to infer an
15 unstated step, spell it out. Two plain sentences beat one dense one.
16- Use existing vocabulary. Coin a term only when the document defines it at first use and needs it
17 repeatedly. Prefer concrete words to abstract ones.
18- Anything a reader must act on — requirements, acceptance criteria, plans, decision records — gets
19 the plainest register of all.
20- When capturing someone else's idea, keep their words wherever they are clear enough to stand.
21- The docs speak from the project, never about its participants. State a position as the project's
22 own, and refer to people only by role (the integrator, the instance's human operator). Prior art
23 and external authors may be cited freely.
24
25The test for every paragraph: could an engineer new to this repo read it once and correctly say it
26back?
27
28## Document altitudes
29
30The docs are layered. Each document stays at its altitude:
31
321. **Premise** — [README.md](./README.md). What this is, how a change moves, and where to read next.
33 No mechanisms.
342. **Purpose and principles** — [docs/purpose.md](./docs/purpose.md). The operator's goals, the
35 principles that govern the system, ownership boundaries, and what makes a change fitting or
36 unfitting.
373. **Concepts and glossary** — [docs/concepts.md](./docs/concepts.md). Core concepts and every
38 project term defined before mechanism.
394. **Guide** — [docs/guide.md](./docs/guide.md). Setup and everyday workflows for authors,
40 reviewers, planners, administrators, and contributors.
415. **Reference** — [docs/reference.md](./docs/reference.md). CLI commands, environment variables,
42 ref layout, wire formats, JSON outputs, and CUE schemas.
436. **Architecture and security** — [docs/architecture.md](./docs/architecture.md) and
44 [docs/security.md](./docs/security.md). What runs in production, how each gate along the path of
45 a change protects the hosts, and which executable check verifies each guarantee.
467. **Archive** — [archive/design/](./archive/design/) and
47 [archive/.the-valley/](./archive/.the-valley/). Read-only historical exploration and
48 knowledge-graph nodes kept so stable node IDs (`dcr-*`, `ida-*`, `bd-*`, `oc-*`) cited in code,
49 schemas, and commit history continue to resolve.
50
51When you find detail at the wrong altitude, move it down rather than piling on. Prune elaboration
52freely — mechanics, taxonomies, and formats can be re-derived, and deleted text lives in git
53history. Never silently compress insight: a conceptual move or reframe does not re-derive on demand.
54
55## Knowledge-graph nodes
56
57Historical knowledge-graph nodes live under [archive/.the-valley/](./archive/.the-valley/), with
58node mechanics — types, IDs, frontmatter, and linking — defined in
59[archive/.the-valley/README.md](./archive/.the-valley/README.md). Each node opens with one plain
60paragraph stating the idea, decision, bug, or outcome, followed by context, implications, and open
61questions.
62
63`archive/.the-valley/` is frozen, read-only history, and nothing checks it against today's schema.
64Design decisions are recorded directly in [docs/architecture.md](./docs/architecture.md) and
65[docs/security.md](./docs/security.md). A question that is still open lives in the project's plan
66graph as a `question` knot, owned by whoever has to answer it. When its answer settles something
67about the design, the answer enters these docs through a change, and the knot links that change.
68
69## Documentation style and verification
70
711. **Simple language, one new idea per sentence.** Lead every section with a plain statement of what
72 the thing is in ordinary words before qualifying it. Split sentences that stack abstractions.
732. **Meaning before mechanism.** Say what a concept or command accomplishes for the reader before
74 explaining git refs, CUE unification, or Nix derivations.
753. **Example before abstraction.** In guides and reference material, show a concrete command or a
76 short snippet before edge-case rules or schema tables.
774. **Separate three kinds of claim.** Label code guarantees `implemented`, instance configuration
78 `deployment choice`, and mechanisms that do not work yet `not built`. Never present a deployment
79 choice or an unbuilt plan as a code guarantee. Configuration includes `valley.cue`,
80 `services.valley`, `policy/`, and `identity/`.
815. **Carry a claim-to-code checklist.** Every documentation slice brief and change description must
82 list each factual claim added or modified, its kind, and an exact `file:line` citation verified
83 against HEAD before review. The checklist lives in a slice brief and the change description, not
84 in the docs themselves.
856. **Present tense, no transition narration.** Describe what HEAD does today. Live plans and open
86 questions belong in `valley plan` (`refs/the-valley/knots`), not in prose docs. Do not compare
87 the-valley to other platforms; positioning is the operator's to write.
887. **Use the project's vocabulary.** A change's recorded state is `draft`, `ready`, or `withdrawn`.
89 A version is `approved` when an integration request names it, and `submitted` once it has landed.
90 Never call a change a PR, <!-- prose-allow: vocabulary --> pull request, or branch; a git branch
91 may carry a change. A change **requires** checks; it never owes <!-- prose-allow: vocabulary -->
92 them. A plan item is never an issue, ticket, <!-- prose-allow: vocabulary --> or knowledgebase
93 entry; it is a **knot** in the **plan graph**. Operational refs (`refs/the-valley/*`) are
94 **project storage**, distinct from **the source** (`main` and release tags).
958. **Keep the Taoist wink at thresholds.** One light sentence can introduce the valley as the low
96 place where streams of work converge, or knots as records named for knotted cords before writing.
97 Keep metaphor out of procedures, error messages, and security invariants.
98
99The `prose-format` check enforces the parts of rules 5, 6 and 7 that a pattern can catch: it fails
100on a source path followed by a line number anywhere, and, outside fenced code blocks, on common
101transition phrases and on the words rule 7 bans. To allow a legitimate use, such as quoting a banned
102word, put `<!-- prose-allow: <rule> -->` on its line, where the rule is `line-number`, `narration`
103or `vocabulary`; the marker allows that one rule on that line only.