~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0
210 lines · 11.0 KB Raw History

name: docs description: Write or edit Monolith's README, docs/README.md or the guides in docs/guide/ (and compat/ and bench/ READMEs when touched). Use for any change to those pages, a voice pass, or a new guide. Not for spec/, which keeps its own voice.

Writing the README and the guides

Read this before writing or editing README.md, docs/README.md or a page in docs/guide/. It's adapted from marco's docs/_style.md (github.com/jazware/marco), which is vlpds's and vlRelay's.

spec/ isn't covered. The spec is what the server is built from, it's cited section by section by the harness, and it says what is in its own register. The guides are for people running the server or calling it, and they link the spec for the detail.

Where the pages go

  • Every .md under docs/ is a page of the site (docs-site/content.mjs). docs/README.md is its overview, and each page's title is its first # heading. The guides appear in the order docs/README.md lists them.
  • cd docs-site && npm run build fails on a link to a file or heading that isn't there, a method spec/PDS.md lists under no page, or a variable the spec names in no table. Run it after every page you touch.
  • Nothing private: no hostnames, IPs, home paths or real DIDs and handles besides the project's own (chadtmiller.com, knotless.dev). Use pds.example.com, alice.pds.example.com, did:plc:aaaa….

Current version only

The pages describe the server in the tree (AGENTS.md says the same).

  • No history: no "used to", "no longer", "now does", "was changed", and no comparison with an earlier Monolith. "Clients still speak 2025-06-18" is fine, since it's about the clients.
  • No plans, sessions or tracker numbers. A limitation is stated as how the server behaves today ("resolveHandle answers only its own accounts' handles"), and goes in the README's "Known gaps".
  • No rejected designs. If a page needs the reason, give the current one in a sentence.

Shapes

The README

The front door. Someone who reads only it should know what Monolith is, why they'd run it, how to start, and where to read on. In this order:

  1. # Monolith, then one line saying what it is.
  2. One or two short paragraphs: what it is and what sets it apart, with the numbers that make the case (from bench/RESULTS.md and compat/RESULTS.md, with where they came from). Not how it came to be built: how a change is made is AGENTS.md's, linked from Contributing.
  3. ## Highlights: 4-7 bullets, each one thing a reader would choose it for, ending → [Page](link). A bullet may open with a bold term, since it's a reference list of named things.
  4. ## Quickstart: the shortest path that runs, as commands, then a link to Getting started for the rest.
  5. ## Docs: a two-column table of every guide and the reference pages, with what's in each in a few words.
  6. ## Layout: a table of the top-level directories and crates, one line each. The detail lives in the page that owns it (the spec, AGENTS.md, a crate's lib.rs), so link or name it.
  7. ## Development: the few commands a contributor needs first, then a link to Contributing.
  8. ## Known gaps. AGENTS.md cites this heading, so keep it.

A guide

  1. # Title, then one or two short paragraphs saying what the reader ends up with and what they need. Don't list the sections, since the headings already do.
  2. ## sections, one task each, in the order a reader does them. Lead with the command or table, then explain it.
  3. Every command runnable as written, with pds.example.com and friends as placeholders. Every default with its variable (PDS_PORT, 2583).
  4. Detail links out to the spec page that owns it rather than repeating it.
  5. A short ## Next at the end of a guide that leads somewhere.

docs/README.md lists every guide with what's in it, then the spec and reference pages.

Voice

Write like an engineer explaining the server to another engineer: conversational, direct, concrete.

What the voice is

  • Plain declarative sentences, one idea each. Most run 12-25 words.

  • Conversational connectives. "So", "Since", "That means", "In that case". Sentences don't link up with semicolons.

  • Contractions everywhere. it's, don't, can't, isn't, there's, that's.

  • Person. The reader is "you" ("If you run the binary…"). The server is the subject of mechanism sentences ("The server checks…", "pds serve reads…"). No "I".

  • Concrete before abstract. The scenario with its numbers first, then the mechanism. When a term needs a definition, give it in one sentence and then an example.

  • Numbers do the arguing. Round numbers with units, and where they came from in a few words (measured in the benchmark, the spec's limit).

  • Trade-offs said plainly. The cost, the number, why it's fine.

  • Paragraphs of 1-4 sentences.

  • Parentheses for asides: a variable, a default, a spec page.

  • Modern English word order. Monolith's older pages lean on habits that read as stilted. Fix these on sight:

    HabitLooks likeDo instead
    "as" for "such as" or "like""a tag pins one, as …:0.2.0""such as", "like", "for example", or a colon before the example
    Fronted "Of X,""Of OAuth, no account pages.""There are no OAuth account pages."
    "alone" for "only""the binary alone", "for /mcp alone""only the binary", "only for /mcp"
    "no one" / "nothing" as a subject to dodge a verb"as no one, the account with it""then, without the admin password, create the account"
    "that is to""the device that is to hold the passkey""the device that'll hold the passkey"
    "is" as the only verb in a table's header`Variable
    Bare noun phrases for statements"its labels name its version" is fine, "No sign-up from the page." isn'tFull sentences with a subject and verb
    Inverted conditionals"With it set, the CLI calls as the admin""When it's set, the CLI calls as the admin"

Banned patterns

Search for each of these on every page you touch.

PatternLooks likeDo instead
Semicolon splice"That is the latest version; a tag pins one."Two sentences, or join with "and", "but" or "so".
Em dash or -- aside"the log — and only the log — is durable"Parentheses, a comma, or a second sentence.
"X, not Y" flourish"with its password session, not an app password or an OAuth token"Say X. Mention Y in its own sentence only if readers would assume it ("An app password or an OAuth token can't do this.").
Colon chains"It takes a token: the tokens XRPC takes, …: …"One colon per sentence, and only to introduce a list, code or an example.
Rule-of-three lists"fast, cheap and simple"Keep the items that carry information.
Abstract nouns for actions"the persistence of", "the handling of"The verb: "stores", "handles".
Fillercrucially, importantly, in practice, it's worth noting, notably, essentially, robust, seamless, under the hood, first-class, by design, "the key insight", "this is where X comes in"Delete it. If the sentence falls apart, rewrite it.
Bold lead-in on prose bullets"- Fail-stop. When a node…"Plain bullets. Bold a term at its definition, a real warning, or the names in a reference list (README highlights).
Bold or italics for emphasis"the log is the database"Put the phrase first, or the stressed word last.
One-line paragraph for drama"Nothing else." on its ownFold it into the paragraph it concludes.
Narrating the page"This guide covers…", "In this section we'll look at"Delete it and start with the content.
Stacked qualifiers"about ~", "usually typically"One qualifier, or none.
Exclamation marksNone.

Mechanical pass

Apply these in order to every paragraph, list item and table cell you edit.

  1. Replace every semicolon in prose with a period or with "and", "but" or "so".
  2. Replace every em dash or double hyphen used as punctuation.
  3. More than one colon in a sentence: split it. A colon that isn't introducing a list, code or an example: make it a period or "because"/"so".
  4. Find ", not " and "rather than". Keep one only when it corrects a real misconception.
  5. Fix the habits in the table under "What the voice is".
  6. Delete filler words, then re-read the sentence.
  7. Use contractions.
  8. Split any sentence over ~35 words, or with more than two clauses joined by commas.
  9. Make the actor the subject: "is acknowledged by the server" becomes "the server acknowledges".
  10. Delete sentences that describe the page instead of the server.
  11. Read it aloud. If you wouldn't say it to a coworker, rewrite it.

Length comes out about the same. If a page grows by more than ~10%, something got explained twice.

Before and after

Before: That is the latest version; a tag pins one, as knotless.dev/chadtmiller.com/monolith:0.2.0. The image is the pds binary alone, on Debian slim, run as a user of its own, with its data on the volume /data.

After: That's the latest version. A tag pins one, such as knotless.dev/chadtmiller.com/monolith:0.2.0. The image holds only the pds binary on Debian slim. It runs as its own user and keeps its data on the volume /data.

Before: As the admin, make an invite code; then, as no one, the account with it.

After: Make an invite code as the admin, then create the account with it.

Before: Of OAuth, no account pages (/account): an account lists and ends its OAuth sessions and devices with pds oauth … instead.

After: There are no OAuth account pages (/account). An account lists and ends its OAuth sessions and devices with pds oauth … instead.

What a voice pass must not change

A voice pass changes wording. Check each of these before committing:

  • Facts. Every number, unit, default, variable, flag, metric, error name, file path and version stays as it is. If a sentence goes, its fact moves to another sentence or is already on the page.
  • Nothing new. Don't add a claim, number or feature that isn't on the page, in the spec or in the code. If something reads wrong, flag it rather than fixing it in prose.
  • Headings. Others cite them, and anchors are made from them. Leave them as they are. If one must change, update every link and citation in the same commit: rg -n 'guide/<page>.md' . finds the links, and the citations are quoted, as (docs/guide/contributing.md, "The code gates") in harness/ and AGENTS.md.
  • Links. Every link stays and points to the same target.
  • Code blocks and inline code are untouched.

Avoiding duplication

  • Each fact has one home. The spec owns what the server does, the guides own how to run and call it, bench/ and compat/ own the measurements, AGENTS.md owns how a change is made. Other pages state it in a clause and link there.
  • When a change in behaviour updates the spec, update the guide that tells people about it in the same pull (AGENTS.md).