Files
stack/docs/plans/2026-08-10-docs-structure-readme.md
T
veronica 12d5258e20 docs(W4): apply fred's six contract decisions from PR #1350 comment 23693
A - docs/README.md:149-190 rewritten. It prescribed a competing front-matter schema
    (title/type/audience/status/source_of_truth) adopted by 4 of 128 live documents. Two
    documented conventions in one repo is the defect this pass removes, so the README now
    documents the contract and the 4 files convert in the same commit: `type` dropped
    (kind replaces it), `title`/`audience`/`source_of_truth` kept.
B - source-of-truth leaves the kind enum, which is now 6 values, and returns as an orthogonal
    boolean. kind was carrying two independent facts. docs/requirements/native-kanban-sot.md
    is stamped `kind: spec` + `source_of_truth: true`, which is what it always was.
C - status gains `completed`. Applied to the two executed plans, on artifact evidence rather
    than on their own say-so: --purpose push|merge ships in ci-queue-wait.sh, and every section
    the README plan specifies exists in docs/README.md today.
D - kind follows content, never filename. docs/native-kanban-sot/TASKS.md is `kind: spec`
    because its body says "a build plan, not a task tracker". The name stays wrong; that is a
    rename and it is out of scope here.
E - the contract covers .md only, written into the README as a decision with vision's
    YAML.parse measurement as the reason, so the omission does not read as an oversight.
F - channel-protocol.md guide -> spec. Applied, with a correction the reviewer should see: the
    ruling cites "7 normative MUSTs" and there are ZERO uppercase RFC2119 terms in that file.
    Control: the identical grep returns 25 lines in docs/requirements/native-kanban-sot.md. The
    citation half of the finding does hold and is larger than stated. Consequence recorded in
    the worklist: the file's own banner now contradicts its header.

Verified: 128 live .md under docs/ (127 baseline + this PR's worklist), 107 stamped, 0 invalid
kinds, 17 operator-held + 3 supersede-stamp deferrals + 1 generated = 21 unstamped. 107+21=128.
Control: the verifier reports valid=False when a kind is corrupted to `nonsense`, so the
0-invalid result is a real result. prettier --check clean across docs/.
2026-08-20 19:58:17 -05:00

141 lines
5.4 KiB
Markdown

---
kind: spec
status: completed
---
# Documentation Structure README Implementation Plan
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
**Goal:** Replace the starter `docs/README.md` with the normative documentation structure, placement rules, source-of-truth policy, and Obsidian-compatible navigation conventions approved for Mosaic Stack.
**Architecture:** Keep `docs/README.md` as the root documentation atlas and authoring contract. Use audience books for current user, administrator, and developer content; keep API contracts and operational artifacts in dedicated directories; retain `_old_structure/` as a read-only migration quarantine. Do not move or rewrite existing documentation in this slice.
**Tech Stack:** Markdown, YAML front matter examples, Obsidian wikilinks, relative Markdown links, Prettier.
---
### Task 1: Write the documentation structure contract
**Files:**
- Modify: `docs/README.md`
- Reference: `docs/plans/2026-08-10-docs-information-architecture-design.md`
**Step 1: Confirm the approved design and current transition constraints**
Verify that the README preserves these decisions:
- `docs/mosaic-stack/` is not a target content directory.
- `docs/README.md` is the documentation atlas and placement contract.
- Existing files are not moved or rewritten yet.
- `_old_structure/` is read-only migration quarantine.
- Root control files, audience books, API, reports, tasks, plans, scratchpads, releases, archive, and assets have distinct responsibilities.
**Step 2: Replace the starter README**
Write `docs/README.md` with these sections:
1. Purpose and scope.
2. Reader entry points.
3. Complete target directory tree, including the optional `.obsidian/` vault configuration boundary and the workflow-only `plans/` directory.
4. Root control document responsibilities.
5. Guide book responsibilities and chapter rules.
6. Artifact directory responsibilities.
7. Placement matrix for agents.
8. Source-of-truth and precedence rules.
9. Page naming and front matter conventions.
10. Obsidian wikilink and Git-hosted Markdown link conventions.
11. Authoring workflow for new or changed documentation.
12. Migration rules for `_old_structure/`, legacy root files, and repository references.
13. Current transitional exceptions and explicit non-goals.
Use future target paths as a blueprint, but clearly label directories that are not populated yet so readers do not mistake the blueprint for completed migration.
**Step 3: Preserve the existing Obsidian configuration boundary**
Document `.obsidian/` as optional vault metadata only. Do not place Markdown content, scratchpads, reports, or source-of-truth files under it, and do not modify its existing files in this task.
**Step 4: Keep the README portable**
Use ordinary relative Markdown links for indexes and Git-hosted navigation. Use Obsidian wikilinks for graph-oriented relationships such as `Related`, `Depends on`, and `Referenced by`. Do not make a current navigation path depend solely on a Git-host-incompatible wikilink.
**Step 5: Review the resulting document**
Check that an agent can answer all of these without inspecting another file:
- Where does a user guide go?
- Where does an admin runbook go?
- Where does architecture or an RFC go?
- Where does an API contract go?
- Where does an active scratchpad go?
- Where does a review or QA report go?
- Where does an approved design or implementation plan go?
- Which files are normative, working notes, evidence, or historical?
- What may be added directly under `docs/`?
**Step 6: Commit only the README**
Because `docs/GETTING_STARTED.md` is an unrelated pre-staged deletion, stage and commit only `docs/README.md`:
```bash
git add docs/README.md
git commit --only docs/README.md -m "docs: codify documentation structure"
```
Expected: the commit contains only the README change; the existing staged deletion and orchestrator state remain outside the commit.
### Task 2: Verify the README-only change
**Files:**
- Verify: `docs/README.md`
**Step 1: Run Markdown formatting validation**
Run:
```bash
pnpm exec prettier --check docs/README.md
```
Expected: Prettier reports the file is formatted.
**Step 2: Run whitespace validation**
Run:
```bash
git diff --check HEAD^ -- docs/README.md
```
Expected: no whitespace errors.
**Step 3: Validate required structural anchors**
Run a focused search or script confirming the README names:
- `PRD.md`, `TASKS.md`, and `SITEMAP.md`;
- `USER-GUIDE/`, `ADMIN-GUIDE/`, `DEVELOPER-GUIDE/`, and `API/`;
- `reports/`, `tasks/`, `plans/`, `scratchpads/`, `releases/`, `archive/`, and `assets/`;
- `_old_structure/` as read-only quarantine;
- `docs/mosaic-stack/` as retired/non-authoring;
- Obsidian wikilinks and Git-compatible Markdown links.
Expected: all anchors are present and no section instructs agents to create content under `docs/mosaic-stack/`.
**Step 4: Confirm scope isolation**
Run:
```bash
git status --short
git show --stat --oneline HEAD
```
Expected: the new commit contains only `docs/README.md`; pre-existing `.mosaic/orchestrator/*`, `docs/GETTING_STARTED.md`, and `docs/.obsidian/` states remain untouched.
**Step 5: Record verification evidence**
Update the task scratchpad at `docs/scratchpads/DOCS-IA-001.md` with commands, results, known transitional gaps, and the next migration slice. Do not modify active `docs/TASKS.md`; its single-writer policy belongs to the orchestrator.