docs(corpus): add docs/authoring.md — the rules for writing docs here

So a session or agent that creates or edits documentation does it consistently
with the corpus, not against it. Codifies what the migration learned, each rule
tied to the failure it fixes:

1. Link the canon, never copy it (the anti-drift law — "7 families" survived in
   three docs because they re-transcribed instead of linking).
2. Every doc belongs to one stratum (E0-E5 / process); where each kind lives.
3. Reference docs are timeless — hand-offs, dated status and hardcoded catalogs
   go to process/ or become pointers.
4. One source per concern; two docs on a subject get distinct stated roles.
5. Frontmatter convention.
6. Sections cited by §N are load-bearing — stub-split, never silently renumber;
   verify moved links resolve.
7. English target; code comments always English.
8. Naming (rfc-* / design-*), markdown relative links, pre-commit checklist.

Wired into docs/README.md ("I want to… write a doc" + a note after the strata).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
active-uix
dev 4 months ago
parent 7193756a06
commit cc51535356

@ -40,6 +40,10 @@ The corpus is organized in layers of permanence, not by folder:
| **E5 — module reference** | per-artifact docs | `arts/*/README`, `libs/*`, `svrs/*` |
| **process** | ephemeral (hand-offs, snapshots, audits) | `docs/process/` — never a source of truth |
Writing or editing docs? The conventions that keep this corpus drift-free —
link the canon, don't copy it; keep reference docs timeless; one source per
concern — are in [`docs/authoring.md`](./authoring.md).
## Reading order for a fresh start
1. **[`src/uix/README.md`](../src/uix/README.md)** — the thesis: the four layers, what makes it different, what it is not.
@ -108,6 +112,7 @@ and the server-authoritative engines in `src/svrs/`.
| Theme it / add a token | `eidos/THEMING.md` + `eidos/TSC.md` |
| Understand why a decision was made | `docs/decisions.md` → the relevant RFC / `LIBRO_VARIACIONES` |
| Use a runtime artifact (auth, cache, http, …) | `arts/README.md` + `src/arts/{name}/README.md` |
| **Write or edit documentation** | [`docs/authoring.md`](./authoring.md) — the authoring rules |
## Authoritative sources & rules

@ -0,0 +1,136 @@
---
title: Documentation Authoring Rules
type: guide
audience: human + agent
authority: canonical — how docs in this corpus are written and edited
status: current
---
# Documentation Authoring Rules
How to create and edit documentation in this repo. These rules exist because the
corpus is meant to read as a coherent, drift-free reference (and a future book) —
not as an accreting pile of notes. Read [`docs/README.md`](./README.md) first for
the map; this file is the *how-to-write* layer.
The rules are not aesthetic. Each one fixes a failure that actually happened
during the corpus migration.
## 1. Link the canon — never copy it
**The one law.** If you need to state a family, an intent, a verb, a size, a
color role, or any other canonical value, **link the canon** — do not paste a
copy.
- Semantic vocabulary → link [`CANON.md`](./CANON.md).
- Token scope / color model → link [`eidos/TSC.md`](../src/uix/eidos/TSC.md) and `THEMING.md §25`.
- A second copy is a future drift. This is literal: "7 families" survived in
three docs for weeks after the canon moved to 8, because each doc had
re-transcribed the list instead of linking it.
The doctrine fixes the *doctrine*; the code fixes the *numbers*. When a value
lives in code (per-family holds, channel signatures, full verb lists), **link
the `file:symbol`**, don't snapshot it into prose.
## 2. Every doc belongs to one stratum
Decide the stratum before you write; it decides where the file goes and how
timeless it must read.
| Stratum | Kind of doc | Lives in |
| --- | --- | --- |
| **E0 — orientation** | entry point, glossary | `docs/README.md`, `docs/glossary.md` |
| **E1 — architecture** | how the layers fit | `src/uix/active_architecture.md`, per-layer `README.md` (in-place) |
| **E2 — canon** | fixed vocabulary / contracts | `docs/CANON.md`, `eidos/TSC.md` |
| **E3 — decisions / RFC** | why a thing is built this way | `docs/decisions.md` + the RFC / design files |
| **E4 — guides** | how to do a thing | `soma/COMPONENT_GUIDE.md`, `eidos/THEMING_GUIDE.md` |
| **E5 — module reference** | per-artifact docs | `src/arts/{name}/README.md` (in-place) |
| **process** | hand-offs, snapshots, audits | `docs/process/` — ephemeral, never a source of truth |
Layer and module reference stay **in-place** next to the code. Cross-cutting
orientation, canon, decisions and process live under `docs/`.
## 3. Reference docs are timeless
E0–E5 docs must read as if written today, forever.
- **No session hand-offs inside a reference doc.** "Handoff 2026-05-14",
"Correcciones del engine (2026-06-01)", "Estado actual" blocks belong in
`docs/process/`, not at the top of a README. Extract them.
- **No fragile numbers or dates in prose.** "66 components", "as of 2026-05-15"
rot. Convert relative dates to absolute, and prefer pointing at the live
source over stamping a count.
- **Don't hardcode catalogs.** A list of "implemented components" drifts the day
the next one ships. Point at the directory tree / the morfos / the registry
instead.
## 4. One source per concern
If two docs would say the same thing, one **owns** it and the other **links** it.
- Don't duplicate content across docs (the transcription chain, the layer split,
"what soma is not" lived in 4+ places). Pick the canonical home; everywhere
else links it.
- Two docs about the same subject must have **distinct roles**, stated in their
headers. Examples that shipped: `soma/README` (onboarding) vs
`SOMA_ARCHITECTURE` (deep reference); `COMPONENT_GUIDE` (build steps) vs
`COMPONENT_COMPLETION_CHECKLIST` (machine-audited acceptance).
- Never write a doc whose only content is re-exporting/redirecting another —
merge it, or make it a one-line pointer with a clear reason.
## 5. Frontmatter
Canon, index and reference docs open with YAML frontmatter:
```yaml
---
title: <Doc title>
type: canon | index | guide | reference | notes
audience: human + agent
authority: <one line: what makes this authoritative or navigational>
status: current
# optional:
source: <where the content was extracted from>
related: { ... }
---
```
Match the shape of [`CANON.md`](./CANON.md) / [`decisions.md`](./decisions.md).
## 6. Editing rules
- **Sections cited by number are load-bearing.** If a doc's `§N` is referenced
elsewhere in the corpus or in code comments, **do not renumber it**. To split
or shrink such a doc, use the **stub pattern**: leave a numbered pointer-stub
in the slot and move the content out (see THEMING → `TSC.md` / `THEMING_GUIDE.md`
/ `THEMING_NOTES.md`). Renumbering means sweeping every citation in the same
pass — only do that deliberately.
- **Fix links when you move content, and verify they resolve.** A wrong relative
path is silent (`soma/layers/GESTURES.md` vs the real `layers/gesture/GESTURES.md`).
- **Surgical.** Touch only what the task needs. Don't "improve" adjacent docs in
the same edit.
## 7. Language
- Target language is **English** (the migration is gradual; some layer docs are
still Spanish). When editing an existing doc, match its language — don't mix
two languages inside one doc.
- **Code comments are always English** (project-wide rule), including comments
inside fenced code blocks in docs.
## 8. Naming
- New decision/RFC/design docs: `rfc-{topic}.md` / `design-{subsystem}.md`
(kebab). The legacy `*_ENGINE_RFC.md` / `DESIGN_*.md` names are kept only
because they are cited as provenance across the code; don't add more in the
old shape.
- Markdown links, relative paths.
## Before you commit a doc
- [ ] Stratum chosen; file in the right place (in-place vs `docs/`).
- [ ] No canonical value copied — linked instead.
- [ ] No hand-off / dated-status / hardcoded catalog in a reference doc.
- [ ] Frontmatter present (for canon/index/reference).
- [ ] No `§N` renumbered that something cites; links verified to resolve.
- [ ] New doc wired into [`docs/README.md`](./README.md) if it's a top-level entry.

@ -39,6 +39,7 @@ permanente/efímero, drift, dos idiomas.
- **Fase 4 (3/3) — THEMING split (stubs)**: `THEMING.md` 2571→1930 L, partido renumber-safe en 3 docs-estrato: `eidos/TSC.md` (E2, §7+§18), `eidos/THEMING_GUIDE.md` (E4, §8+§9), `eidos/THEMING_NOTES.md` (E3, §15+§17). THEMING conserva stubs-puntero numerados → las 34 secciones y todas las citas `§N` del corpus/código sobreviven; §16 + `## Referencias` + §20-34 quedan in-place. Además §14 motion saneado (contradicción con eidos-motion.md). **Fase 4 cerrada.**
- **Fase 5 (1/n) — entrada E0**: nuevo `docs/README.md` — puerta única del corpus (lo pidió el usuario: "necesario para que los agentes empiecen y para cada sesión nueva"). Contiene: orientación de 60 seg, los 7 estratos, orden de lectura, mapa de docs por estrato (E1-E5 + process) y atajos task-oriented ("I want to…"). **Cableado desde `CLAUDE.md`** ("Start here", arriba de Reference Documents) para que toda sesión/agente lo lea primero. Todos los enlaces verificados. Pendiente del E0: solo adelgazar `CLAUDE.md` (ver Diferido).
- **Fase 5 (2/n) — glosario**: nuevo `docs/glossary.md` — el vocabulario inventado (las capas, morfo, soma, sema, eidos) definido en una línea cada término + puntero a la fuente autoritativa; el subset semántico (family/intent/verb/channel) **apunta a CANON, no se recopia** (sin drift). Enganchado en `docs/README.md` (estrato E0 + orden de lectura).
- **Fase 5 (3/n) — reglas de autoría de doc**: nuevo `docs/authoring.md` — cómo se crea/edita documentación en el corpus, codificando lo que aprendió la migración: (1) linkear el canon, nunca copiarlo (la ley anti-drift); (2) cada doc tiene un estrato + dónde va; (3) docs de referencia atemporales (hand-offs/fechas/catálogos hardcoded → process o puntero); (4) una fuente por concern (roles distintos si hay 2 docs del mismo tema); (5) frontmatter; (6) ediciones renumber-safe (stub pattern para `§N` citadas, verificar links); (7) idioma EN; (8) naming `rfc-*`/`design-*`; + checklist pre-commit. Cada regla cita el fallo real que arregla. Enganchado en `docs/README.md` ("I want to… write a doc" + nota tras los estratos).
## PENDIENTE

Loading…
Cancel
Save

Powered by TurnKey Linux.