Working in this repository #
Most of the-valley is prose: design documents and knowledge-graph nodes. How you write is most of
the work.
Writing standard #
Write clearly, simply, and without compression that would tax a knowledgeable software engineer.
- Lead with the plain statement. Say what the thing is in ordinary words before qualifying,
justifying, or elaborating it.
- One new idea per sentence. Density is fine when restating what the reader already knows; a new
concept gets its own sentence.
- Unpack rather than compress. If a sentence stacks abstractions or asks the reader to infer an
unstated step, spell it out. Two plain sentences beat one dense one.
- Use existing vocabulary. Coin a term only when the document defines it at first use and needs it
repeatedly. Prefer concrete words to abstract ones.
- Anything a reader must act on — requirements, acceptance criteria, plans, decision records — gets
the plainest register of all.
- When capturing someone else's idea, keep their words wherever they are clear enough to stand.
- The docs speak from the project, never about its participants. State a position as the project's
own, and refer to people only by role (the integrator, the instance's human operator). Prior art
and external authors may be cited freely.
- The repository names no deployment. Code, tests, fixtures, examples, docs, commit messages, and
knots never name a real host, project, person, account, address, or domain of anyone who runs the
valley. Use neutral names: projects
app and site, the instance valley, hosts valley-host
and workstation, principals operator and alice, the domain example.org, and addresses from
the documentation range 192.0.2.0/24. Deployment specifics are configuration that a consuming
project supplies and documents.
The test for every paragraph: could an engineer new to this repo read it once and correctly say it
back?
the-valley is software that other operators run, on hosts of any size, for projects of any shape.
The deployment that motivates a change is one user among many. Build the mechanism that serves all
of them, not the fix that fits the hosts in front of you.
- Derive behaviour from what the host and the project declare or measure, never from constants tuned
to one deployment. Read capacity, such as CPUs and memory limits, from the system or from a
documented option. Choose defaults that are safe on a small host and still scale on a large one.
- Prefer a general mechanism to a special case. A fix that works only because of one project's
checks, one host's memory, or one workload's timing is a workaround. Find the mechanism that holds
whatever those numbers are, or state the limit as a documented constraint.
- Make limits visible to the people who hit them. When a host lacks the capacity for what is asked,
say so in output or telemetry, rather than failing in a way that is hard to trace, such as a
killed process or a stalled queue.
- Give every option an operator may need to change a default, a documented meaning, and guidance on
how to size it.
- Treat measurements from a real deployment as evidence for a change, cited in its message and knots
without naming the deployment. They are never design constants.
For example, a lock that lets one evaluation run at a time is safe on one host and wasteful on
another. Admitting evaluations by the memory budget the host declares serves both.
Document altitudes #
The docs are layered. Each document stays at its altitude:
- Premise — README.md. What this is, how a change moves, and where to read next.
No mechanisms.
- Purpose and principles — docs/purpose.md. The operator's goals, the
principles that govern the system, ownership boundaries, and what makes a change fitting or
unfitting.
- Concepts and glossary — docs/concepts.md. Core concepts and every
project term defined before mechanism.
- Guide — docs/guide.md. Setup and everyday workflows for authors,
reviewers, planners, administrators, and contributors.
- Reference — docs/reference.md. CLI commands, environment variables,
ref layout, wire formats, JSON outputs, and CUE schemas.
- Architecture and security — docs/architecture.md and
docs/security.md. What runs in production, how each gate along the path of
a change protects the hosts, and which executable check verifies each guarantee.
- Archive — archive/design/ and
archive/.the-valley/. Read-only historical exploration and
knowledge-graph nodes kept so stable node IDs (
dcr-*, ida-*, bd-*, oc-*) cited in code,
schemas, and commit history continue to resolve.
When you find detail at the wrong altitude, move it down rather than piling on. Prune elaboration
freely — mechanics, taxonomies, and formats can be re-derived, and deleted text lives in git
history. Never silently compress insight: a conceptual move or reframe does not re-derive on demand.
Knowledge-graph nodes #
Historical knowledge-graph nodes live under archive/.the-valley/, with
node mechanics — types, IDs, frontmatter, and linking — defined in
archive/.the-valley/README.md. Each node opens with one plain
paragraph stating the idea, decision, bug, or outcome, followed by context, implications, and open
questions.
archive/.the-valley/ is frozen, read-only history, and nothing checks it against today's schema.
Design decisions are recorded directly in docs/architecture.md and
docs/security.md. A question that is still open lives in the project's plan
graph as a question knot, owned by whoever has to answer it. When its answer settles something
about the design, the answer enters these docs through a change, and the knot links that change.
Documentation style and verification #
- Simple language, one new idea per sentence. Lead every section with a plain statement of what
the thing is in ordinary words before qualifying it. Split sentences that stack abstractions.
- Meaning before mechanism. Say what a concept or command accomplishes for the reader before
explaining git refs, CUE unification, or Nix derivations.
- Example before abstraction. In guides and reference material, show a concrete command or a
short snippet before edge-case rules or schema tables.
- Separate three kinds of claim. Label code guarantees
implemented, instance configuration
deployment choice, and mechanisms that do not work yet not built. Never present a deployment
choice or an unbuilt plan as a code guarantee. Configuration includes valley.cue,
services.valley, policy/, and identity/.
- Carry a claim-to-code checklist. Every documentation slice brief and change description must
list each factual claim added or modified, its kind, and an exact
file:line citation verified
against HEAD before review. The checklist lives in a slice brief and the change description, not
in the docs themselves.
- Present tense, no transition narration. Describe what HEAD does today. Live plans and open
questions belong in
valley plan (refs/the-valley/knots), not in prose docs. Do not compare
the-valley to other platforms; positioning is the operator's to write.
- Use the project's vocabulary. A change's recorded state is
draft, ready, or withdrawn.
A version is approved when an integration request names it, and submitted once it has landed.
Never call a change a PR, <!-- prose-allow: vocabulary --> pull request, or branch; a git branch
may carry a change. A change requires checks; it never owes <!-- prose-allow: vocabulary -->
them. A plan item is never an issue, ticket, <!-- prose-allow: vocabulary --> or knowledgebase
entry; it is a knot in the plan graph. Operational refs (refs/the-valley/*) are
project storage, distinct from the source (main and release tags).
- Keep the Taoist wink at thresholds. One light sentence can introduce the valley as the low
place where streams of work converge, or knots as records named for knotted cords before writing.
Keep metaphor out of procedures, error messages, and security invariants.
The prose-format check enforces the parts of rules 5, 6 and 7 that a pattern can catch: it fails
on a source path followed by a line number anywhere, and, outside fenced code blocks, on common
transition phrases and on the words rule 7 bans. To allow a legitimate use, such as quoting a banned
word, put <!-- prose-allow: <rule> --> on its line, where the rule is line-number, narration
or vocabulary; the marker allows that one rule on that line only.