gunk-dev/the-valley

AGENTS.md

sourcefe48b06af1c9main's published tip history
7.3 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- The repository names no deployment. Code, tests, fixtures, examples, docs, commit messages, and
25 knots never name a real host, project, person, account, address, or domain of anyone who runs the
26 valley. Use neutral names: projects `app` and `site`, the instance `valley`, hosts `valley-host`
27 and `workstation`, principals `operator` and `alice`, the domain `example.org`, and addresses from
28 the documentation range 192.0.2.0/24. Deployment specifics are configuration that a consuming
29 project supplies and documents.
30
31The test for every paragraph: could an engineer new to this repo read it once and correctly say it
32back?
33
34## Document altitudes
35
36The docs are layered. Each document stays at its altitude:
37
381. **Premise** — [README.md](./README.md). What this is, how a change moves, and where to read next.
39 No mechanisms.
402. **Purpose and principles** — [docs/purpose.md](./docs/purpose.md). The operator's goals, the
41 principles that govern the system, ownership boundaries, and what makes a change fitting or
42 unfitting.
433. **Concepts and glossary** — [docs/concepts.md](./docs/concepts.md). Core concepts and every
44 project term defined before mechanism.
454. **Guide** — [docs/guide.md](./docs/guide.md). Setup and everyday workflows for authors,
46 reviewers, planners, administrators, and contributors.
475. **Reference** — [docs/reference.md](./docs/reference.md). CLI commands, environment variables,
48 ref layout, wire formats, JSON outputs, and CUE schemas.
496. **Architecture and security** — [docs/architecture.md](./docs/architecture.md) and
50 [docs/security.md](./docs/security.md). What runs in production, how each gate along the path of
51 a change protects the hosts, and which executable check verifies each guarantee.
527. **Archive** — [archive/design/](./archive/design/) and
53 [archive/.the-valley/](./archive/.the-valley/). Read-only historical exploration and
54 knowledge-graph nodes kept so stable node IDs (`dcr-*`, `ida-*`, `bd-*`, `oc-*`) cited in code,
55 schemas, and commit history continue to resolve.
56
57When you find detail at the wrong altitude, move it down rather than piling on. Prune elaboration
58freely — mechanics, taxonomies, and formats can be re-derived, and deleted text lives in git
59history. Never silently compress insight: a conceptual move or reframe does not re-derive on demand.
60
61## Knowledge-graph nodes
62
63Historical knowledge-graph nodes live under [archive/.the-valley/](./archive/.the-valley/), with
64node mechanics — types, IDs, frontmatter, and linking — defined in
65[archive/.the-valley/README.md](./archive/.the-valley/README.md). Each node opens with one plain
66paragraph stating the idea, decision, bug, or outcome, followed by context, implications, and open
67questions.
68
69`archive/.the-valley/` is frozen, read-only history, and nothing checks it against today's schema.
70Design decisions are recorded directly in [docs/architecture.md](./docs/architecture.md) and
71[docs/security.md](./docs/security.md). A question that is still open lives in the project's plan
72graph as a `question` knot, owned by whoever has to answer it. When its answer settles something
73about the design, the answer enters these docs through a change, and the knot links that change.
74
75## Documentation style and verification
76
771. **Simple language, one new idea per sentence.** Lead every section with a plain statement of what
78 the thing is in ordinary words before qualifying it. Split sentences that stack abstractions.
792. **Meaning before mechanism.** Say what a concept or command accomplishes for the reader before
80 explaining git refs, CUE unification, or Nix derivations.
813. **Example before abstraction.** In guides and reference material, show a concrete command or a
82 short snippet before edge-case rules or schema tables.
834. **Separate three kinds of claim.** Label code guarantees `implemented`, instance configuration
84 `deployment choice`, and mechanisms that do not work yet `not built`. Never present a deployment
85 choice or an unbuilt plan as a code guarantee. Configuration includes `valley.cue`,
86 `services.valley`, `policy/`, and `identity/`.
875. **Carry a claim-to-code checklist.** Every documentation slice brief and change description must
88 list each factual claim added or modified, its kind, and an exact `file:line` citation verified
89 against HEAD before review. The checklist lives in a slice brief and the change description, not
90 in the docs themselves.
916. **Present tense, no transition narration.** Describe what HEAD does today. Live plans and open
92 questions belong in `valley plan` (`refs/the-valley/knots`), not in prose docs. Do not compare
93 the-valley to other platforms; positioning is the operator's to write.
947. **Use the project's vocabulary.** A change's recorded state is `draft`, `ready`, or `withdrawn`.
95 A version is `approved` when an integration request names it, and `submitted` once it has landed.
96 Never call a change a PR, <!-- prose-allow: vocabulary --> pull request, or branch; a git branch
97 may carry a change. A change **requires** checks; it never owes <!-- prose-allow: vocabulary -->
98 them. A plan item is never an issue, ticket, <!-- prose-allow: vocabulary --> or knowledgebase
99 entry; it is a **knot** in the **plan graph**. Operational refs (`refs/the-valley/*`) are
100 **project storage**, distinct from **the source** (`main` and release tags).
1018. **Keep the Taoist wink at thresholds.** One light sentence can introduce the valley as the low
102 place where streams of work converge, or knots as records named for knotted cords before writing.
103 Keep metaphor out of procedures, error messages, and security invariants.
104
105The `prose-format` check enforces the parts of rules 5, 6 and 7 that a pattern can catch: it fails
106on a source path followed by a line number anywhere, and, outside fenced code blocks, on common
107transition phrases and on the words rule 7 bans. To allow a legitimate use, such as quoting a banned
108word, put `<!-- prose-allow: <rule> -->` on its line, where the rule is `line-number`, `narration`
109or `vocabulary`; the marker allows that one rule on that line only.