Skip to content

How the Book Works

The Book is the single source of truth for everyone working in network-access — engineers, agents, and future collaborators. It answers the questions a new person or a fresh agent would ask: what are we building, how does it fit together, what decisions have been made and why, and how do we work day to day. It is explicitly modeled on handbook-first practice (GitLab, Oxide), Diátaxis, and MADR/ADR supersession discipline.

This page explains how the Book itself is structured, maintained, and protected.

The three layers

The repo has three distinct layers, each with a different purpose and a different relationship to git:

notes/ (gitignored, local) ── SCRATCH ── raw thinking, brainstorm specs,
│ plan drafts, research, experiment logs
│ ⇧ deliberate PROMOTION (skill-assisted, PR-reviewed)
docs/ (git, curated) ── THE BOOK ── Diátaxis-organized single source of
│ truth; built into a Starlight site + llms.txt
│ read-first / maintained-by
AGENTS.md + .claude/ ── THE SCHEMA ── the constitution: how agents read and
tend the Book (rules, skills, hooks)

notes/ is where thinking happens. It is gitignored and never committed. Superpowers plans, research spikes, brainstorm specs — they all land in notes/. docs/ is where truth lives. It is curated, git-controlled, and protected by gates. The schema layer (AGENTS.md, .claude/settings.json, .claude/skills/) is the constitution that tells agents how to read and tend the Book.

The anti-corruption boundary is the notes/docs/ crossing. Nothing crosses it by accident. Crossing it is an act — a promotion PR, described below.

Canon vs. scratch

Everything in docs/ is canon: peer-reviewed, single-homed, machine-checked. Every page has one home and one owner. Contradictions cannot silently coexist because there is only one place to look.

Everything in notes/ is scratch: disposable, local, unreviewed. Drafts belong in notes/specs/. Research spikes belong in notes/research/. Plans belong in notes/plans/. When a draft reaches a verdict worth keeping — when it has been distilled, reviewed, and made permanent — it gets promoted into the Book. When it does not, it is discarded or left in notes/ without consequence.

This boundary is what keeps the Book sacred while many sessions run in parallel. Agents cannot silently corrupt canon because canon-writing is blocked or warned; the only sanctioned path into docs/ is through a deliberate skill invocation and a PR.

The rooms (Diátaxis)

Canon markdown is organized by Diátaxis register — each page serves exactly one purpose. The rooms are:

RoomRegisterHolds
Start Here (/start-here/)tutorial / explanationThe narrative: what we’re building, why, the arc. Show-not-tell onboarding.
Vision & Principles (/vision/)explanationNorth star, principles, invariants, tradeoffs, whys and why-nots.
Architecture (/architecture/)referenceReality Kernel, data model, topology engine, agent runtime — each links its ADR.
Decisions (ADRs) (/adrs/)reference + explanationArchitecture Decision Records, governed by ADR-0000.
How We Work (/how-we-work/)how-toRunbooks: deploy, JIRA sync, the agent dev loop, how to promote a note, how to write an ADR, how the Book works.
Patterns & Conventions (/patterns/)referenceDos/don’ts, coding patterns, gotchas (Vinxi class-fields trap, PUBLIC_ env prefix, etc.).
Domain Knowledge (/domain-knowledge/)tutorialThe fiber and oil-gas domain courses.
Experiments & Results (/experiments/)explanationConcluded spikes promoted from notes/ when they reach a verdict.

ADRs deliberately straddle reference (the decision) and explanation (the why). Keep those registers clearly separated within each ADR record. See /adrs/ for the current index.

The lifecycle skills

Every mutation of canon goes through a deliberate, skill-assisted path. The lifecycle skills are the Book’s machinery:

SkillIntent
book-promoteDistill a notes/ draft into a canon page in the right room; update the room index; open a promotion PR.
book-newAuthor a fresh canon page directly (no notes draft); wire frontmatter, Diátaxis register, room index.
book-updateRevise an existing canon page in place, keeping cross-refs and the room index coherent. ADRs are exempt — use book-adr to supersede.
book-retireDeliberately remove or deprecate a page; record why; update back-links and the index. Prefer supersede-and-link over silent deletion.
book-adrScaffold a new ADR; update the README index; wire supersession links bidirectionally.
book-lintHealth check: broken links, orphan pages, missing frontmatter, ADR supersession integrity.
bookMeta-skill: loads “how the Book works” so any agent self-grounds before editing canon.

The set is extensible. The rule is: every add, update, or delete of a canon page happens through one of these skills, never silently.

See AGENTS.md for the full skills table and the invariants.

Promotion: scratch → canon

Promotion is the ritual that crosses the anti-corruption boundary. The typical flow:

  1. Draft lands in notes/specs/ or notes/research/ (never committed).
  2. The author invokes book-promote with the draft as input.
  3. The skill distills the draft into canon prose — no spec scaffolding, no open questions, no “Status: Approved” headers. Pure narrative in the author’s voice.
  4. The skill files the page into the correct Diátaxis room, adds frontmatter, and updates the room’s index.md.
  5. book-lint runs on the staged changes. Any broken links, missing frontmatter, or ADR integrity failures block the commit.
  6. The change ships via PR with keeper review (see Governance below).

The source in notes/ is never committed. The Book only ever contains the distillate.

The enforcement layer

Convention rots. AGENTS.md is context, not enforcement. Deterministic gates, committed to git, enforce the guarantees team-wide across two tiers:

  • Claude hooks in committed .claude/settings.json — every teammate’s Claude Code session.
  • Git pre-commit via committed core.hooksPath — every commit, any tool (Claude, Cursor, human, CI).
#GuaranteeMechanismMode
1Accepted ADRs are immutable — supersede, never editPreToolUse (Edit/Write) on docs/adrs/NNNN-*.mdblock → use book-adr
2notes/ never enters git.gitignore + pre-commit rejecting staged notes/**block
3Writing canon is deliberatePreToolUse on docs/** injects a reminder: this is canon; prefer book-promote; scratch goes to notes/nudge
4Every session self-groundsSessionStart prints read-first order and the canon/scratch ruleinject
5No mess lands (dead links, orphans, ADR gaps)Stop hook + pre-commit run book-lint if docs/** changedwarn in-session / block on hard failures at commit
6Constitution stays leanPostToolUse on AGENTS.md/CLAUDE.md warns if > ~200 lineswarn

Hard blocks (#1, #2, #5) cover the irreversible and mess-making moves. Nudges (#3, #4, #6) cover the frictionless guidance. Strict where it counts; low friction elsewhere — so nobody disables it.

Governance

The Book has a single keeper: Nikhil, enforced via CODEOWNERS on docs/, AGENTS.md, and CLAUDE.md. Every change to canon requires a keeper review before merge.

The operating principle is handbook-first: if it is not in the Book, it is not canon. Everything enters via PR. Nothing enters by accident.

For concurrent agent work: agents isolate in notes/ or worktrees, never auto-write canon, and the keeper compacts into the Book via reviewed PRs. Facts are never auto-merged.

For architecture decisions specifically, see the ADR supersession discipline documented in /adrs/ (ADR-0000).