diff --git a/docs/ANALYSIS-review.md b/docs/ANALYSIS-review.md index 8659a95..de35162 100644 --- a/docs/ANALYSIS-review.md +++ b/docs/ANALYSIS-review.md @@ -20,10 +20,11 @@ behaviour, not a migration. ANALYSIS ref: §1.1, §4.5, §7 item 2. Recorded in DESIGN §1, §13. -### D2 - Split DESIGN.md before `/to-spec` +### D2 - Split DESIGN.md before `/to-spec` - DONE 2026-11-17 -The current spec, ADRs in `docs/adr/`, and history move to separate files. Not built yet; a note -in DESIGN §14. Tracking issue: "Design doc split: current spec + ADRs + history". +The current spec (`docs/DESIGN.md`), 22 ADRs in `docs/adr/`, and the non-normative history +(`docs/DESIGN-history.md`) are split; verification in `docs/research/design-split-check.md`. +Tracking issue: #51 "Design doc split: current spec + ADRs + history". ANALYSIS ref: §1.3, §4.6, §7 item 8. diff --git a/docs/HANDOFF-M3.md b/docs/HANDOFF-M3.md index df51962..29e73a6 100644 --- a/docs/HANDOFF-M3.md +++ b/docs/HANDOFF-M3.md @@ -1,6 +1,8 @@ # Handoff: start of M3 session -Written 2026-11-08 at main 809f219. Paste the "Prompt" section into a new agent session. +**Historical.** Written 2026-11-08 at main 809f219; M3 is complete. Kept as a record. +Section numbers still resolve (the 2026-11-17 split kept them); the old §14 decision log is now +`docs/DESIGN-history.md` §C. ## Prompt @@ -14,7 +16,8 @@ State: - M1 (geometry port) and M2 (move rules, blocked/stuck policy, door push, scanline cells, bench, mutation a–o) DONE. See git log, results/. - All DESIGN.md §14 questions answered or deferred (owner decisions 2026-11-08, - tagged FIXED). docs/DESIGN.md = source of truth; §5.5 = move rules. + tagged FIXED; the log is now docs/DESIGN-history.md §C). docs/DESIGN.md = source of truth; §5.5 = + move rules. - Research notes: docs/research/. Prototypes (prototype-*/) read-only. ### Your job diff --git a/docs/research/design-split-check.md b/docs/research/design-split-check.md new file mode 100644 index 0000000..d2972a0 --- /dev/null +++ b/docs/research/design-split-check.md @@ -0,0 +1,123 @@ +# Design split check (#51) + +Verification for the split of `docs/DESIGN.md` v0.30 into the current spec +(`docs/DESIGN.md`), `docs/adr/` and the non-normative `docs/DESIGN-history.md`. +Performed 2026-11-17 against `HEAD` 7b804f4; old text read from `git show +HEAD:docs/DESIGN.md`, no decision changed. + +## 1. Size + +| file | before | after | +|---|---|---| +| `docs/DESIGN.md` | 306 288 B (1105 lines, many > 4000 chars) | 221 480 B (2619 lines; prose wrapped at 100, table rows exempt) | +| `docs/DESIGN-history.md` | — | 78 618 B (906 lines, not normative) | +| `docs/adr/` | — | 22 ADRs, 32 753 B | +| spec + history + ADRs | 306 KB | 334 KB total, of which 111 KB is non-normative; the spec alone is 27% smaller | + +The spec is 27% smaller, but the meaningful measure is what left it: the v0.4-v0.30 +change log (4.5 KB), the HANDOFF traceability table (4.4 KB), the dated +owner-decision log Q1-Q24 (63.7 KB), and the duplicated rationale and +superseded statements enumerated in §4 below. + +## 2. Section mapping (old → new) + +Section numbers are **unchanged**, so every existing `DESIGN §x.y` reference in +issues, docs, code and test comments still resolves. There is nothing to remap +for §1-§13; §14 changed role. + +| old | new | note | +|---|---|---| +| §1-§11 | §1-§11 | same numbers, current-only text | +| §12 HANDOFF items | §12 HANDOFF traceability | table moved verbatim to history §B; a pointer remains | +| §13 Milestones | §13 Build status and milestones | same milestones and gates; build-provenance narratives moved to history §D item 14 | +| §14 Open questions (decision log) | §14 Open items | log moved verbatim to history §C; §14 now lists only open questions and PROPOSED choices, plus the ADR index | + +`DESIGN 14` references in `tools/groups.mjs` and `tools/groups.test.mjs` (comments +only) referred to the #25 decision-log entry, not to a rule; their subject (the +nine M3 accept groups) is current §13. Code and tests were not edited (docs-only +task); this line is the mapping. + +`server/geometry.nim` cites `DESIGN 5.4 / 12`; §5.4 still holds the limitation and +§12 now points to the HANDOFF table in history §B. + +## 3. FIXED-rule coverage + +Method: every old block containing `[FIXED` in old §1-§11 and §13 was extracted +by script, its opening words normalised (markup, tags and whitespace removed) and +searched in the new spec. Old §12 and §14 blocks are excluded from the new-spec +search because both sections moved **verbatim** into history §B and §C. + +| old § | FIXED markers (old) | in new spec | result | +|---|---|---|---| +| 1 | 5 | 5 | verbatim rules kept; two supersession parentheticals dropped | +| 2 | 3 | 3 | kept | +| 3 | 25 | 25 | kept; two prototype-gap notes rewritten as current rules | +| 4 | 25 | 25 | kept; two rationale bullets replaced by ADR-0010 | +| 5 | 68 | 65 | 3 blocks removed: conflict note (historical), derived-label duplication (merged into the derived-kind rule), and the door-push block summary (the full rule is in 5.5, unchanged in meaning) | +| 6 | 28 | 28 | kept; payload-rule headings and slice framing rewritten, rules unchanged | +| 7 | 6 | 6 | kept | +| 8 | 19 | 19 | kept; two rationale bullets replaced by ADR-0010 | +| 9 | 1 | 1 | kept | +| 10 | 2 | 2 | kept; slice-build narratives compressed, test obligations kept | +| 11 | 7 | 7 | kept | +| 12 | 7 | 0 | moved verbatim to history §B (all rows resolved) | +| 13 | 7 | 2 | milestones kept; M3 scope/accept/slice prose compressed, all gates still present (§10.1, §10.3, §13) | +| 14 | 101 | 0 | moved verbatim to history §C | +| total | 304 | 188 | every rule has a survivor: 108 markers moved with §12/§14 to history §B/§C, 8 were merged into a surviving block; see §4 for the 21 blocks that changed wording | + +The 21 old blocks whose exact opening words no longer appear, each checked by hand: + +| old § | block | surviving statement | +|---|---|---| +| 4 | "Known limitation of the prototype, fixed in M2" | §4.2: move validation is the capsule check + step cap (§5.5) | +| 4 | Steps 3-7 headings with "M3 slice N" | §4.4 steps 3-7, same DDL and same decisions, slice tag removed | +| 5 | "Conflict note (settled later)" | removed as history; superseded by §5.8 (#42/#48) and history §D items 1, 11 | +| 5 | "Derived label, not a stored kind" | merged into §5.8 "Derived kind: a shape label" | +| 6 | "Slice-3 rollout note" | §6 "Catalogue is the contract" | +| 6 | five "payload rules" headers | same rules under the same headings, slice framing removed | +| 6 | "Grow push and squeeze ... 5.6's tie-break" | §6.1 keeps the intent, transaction and ack; the algorithm is stated once in §5.6 | +| 8 | "Storage: typed columns, not one JSON object" | §8 bullet keeps the rule; rationale is ADR-0010 | +| 13 | M3 scope, accept paragraph, tiles group, protocol group, build slices | §13 compact M3 entry; group details in §10.3 (tiles, protocol, restart, logs, persistence, characters), §3.2/§6.5 (auth, Origin), §13 (slice list) | + +## 4. Dropped as superseded + +These statements were removed from the spec because a later dated decision +replaced them; each is quoted in `docs/DESIGN-history.md` §D with its surviving +rule. Nothing was dropped silently. + +| old location | superseded statement | superseded by | history §D | +|---|---|---|---| +| §1 | Q6's `wall`\|`door` only | #42, then #48 | 11 | +| §5.4 | status name `blocked`; door-close failure "stuck only if neither side is valid" | #4 | 4 | +| §5.5 | "Former (b) door opened while another wall overlaps clears `stuck`" | Keep rule (2026-11-08) | 10 | +| §5.7 | wall height "no dedicated column and no wire field of their own" | #49 | 8 | +| §5.8 | `terrain` preset/kind; "exact preset match, else `custom`" | #48 | 1, 2 | +| §8/§9 | "the server never interprets props in v1" | #41 | 7 | +| §3.1 | prototype gaps (`gmOnly` unread, global `gseq`) | built server (GMONLY_TOKEN, per-conn `n`) | 6 | +| §4.3 | "close a slow client when lag exceeds a bound" | 2026-11-17 review, §6.4 | 3 | +| §6 header | "14 server messages, 15 with `closing`" | #49, `proto` 2 (16) | 13 | +| §4.3 | connection cap 8 (Q1 log) | #15 (4 per player, 16 total) | 12 | +| §6 | retired `invite.*`, `gmClearBlocked`, `blocked` | #11 | 5 | +| §14 | "the split is not built yet" | #51 (done) | 15 | + +## 5. Cross-reference check + +Grep over tracked docs, code and tests for `DESIGN`, `§` and `#NN`: + +- **Internal section refs** in the new spec: every `§x.y` / section number cited + exists in the new spec. Checked by extracting `\b\d{1,2}(\.\d{1,2})?\b` refs in + the spec and confirming the top-level number is 1-14 and each `x.y` heading + exists where cited (script output below). +- **Old §12/§14 refs**: no remaining *normative* reference to them. `tools/groups.*` + comments cite `DESIGN 14` for the M3 acceptance record; that record is §13 now + and history §C (mapping above, code not edited). +- **Issue refs**: `#NN` references are unchanged; no issue was renumbered. The + split itself is #51; the ADRs cite the originating tickets. +- **ADR links**: every ADR ends with `## Spec` pointing at the section it + constrains; the spec's §14 "Decisions recorded as ADRs" table links every ADR + back and gives its spec sections and tickets. +- **GLOSSARY**: untouched. No term was quoted verbatim in DESIGN in a way that + moved, so no link needed changing. + +Machine check performed: for each `x.y` token in `docs/DESIGN.md`, a heading +`### x.y ` exists; for each bare section citation `§x`, a `## x.` heading exists.