Skip to content

Commit 9bba95d

Browse files
committed
docs(record): the implementation record for the documentation architecture
What the measurements say afterwards, what the review pass found, what the work found while building the examples, and what is open with the reason each is open rather than late. The review section is the part worth keeping: fourteen cross-references in two languages were left pointing at section numbers that had moved with their sections, and every heading-structure and bilingual-parity check stayed green throughout, because neither is a check about meaning. A mechanical move keeps every structure valid and leaves the prose pointing at the old shape.
1 parent 43c6db4 commit 9bba95d

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

.agents/docs/2026-09-08-documentation-architecture-three-trees.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,3 +459,112 @@ from the earlier plan and is where its example work rejoins.
459459
corrected in place by later measurement, which is how their own value was
460460
preserved. Making that a named, dated block at the end — rather than an edit
461461
in the body — would keep both properties.
462+
463+
---
464+
465+
## 12. Implementation record, 2026-09-08
466+
467+
Shipped as PR #590 on `docs/architecture-three-trees`. Stages 1, 2, 3, 5 and 6
468+
of §8 are done; stage 4 (translating the specifications) and stage 7 (SPEC-005 /
469+
SPEC-006) are not, and §12.4 says why.
470+
471+
### 12.1 What the measurements say afterwards
472+
473+
| surface | before | after |
474+
|---|---|---|
475+
| `docs/05-mcpp-toml.md` | 3,129 lines | 1,626 |
476+
| largest chapter | 3,129 | 1,218 (`07`) |
477+
| `.agents/docs/README.md` | one heading | generated, 313 lines over 269 records |
478+
| user chapters citing a design record | 9 | 0 |
479+
| specifications listed on the front page | 2 of 4 | 4 of 4 |
480+
| stale `docs/NN-*.md` citations | 6 | 0 |
481+
| manifest keys with no example | 13 | 7 |
482+
| `build.mcpp` API names used by an example | 10 of 38 | 12 of 38 |
483+
| structure rules enforced in CI | 0 | 9 |
484+
485+
The seven manifest keys still uncovered are the ones §3.2 classifies as a code
486+
block rather than an example — `[hooks]`, `scan_overrides`, `cxx_runtime`,
487+
`module_extensions`, `platforms`, `[feature-xlings]`**plus two the plan
488+
intended to cover and did not**, for reasons worth stating rather than
489+
carrying forward as debt:
490+
491+
- `[resources]` compiles on PE targets only, and a declared file must exist on
492+
every target. An example for it would add a binary `.ico` to the tree and
493+
then assert nothing on the two platforms most of this repository's CI runs
494+
on. It belongs to a Windows-facing example, which does not exist yet.
495+
- `[runtime]` is the provider-neutral runtime contract a prebuilt library
496+
declares. §4.2 folded it into the publishing example, which is blocked
497+
(§12.4).
498+
499+
### 12.2 What the review pass found
500+
501+
Read as rendered text rather than as a diff, which is the rule the skill states
502+
for exactly this reason:
503+
504+
**Fourteen cross-references, in both languages, left pointing at section numbers
505+
that had moved with their sections.** `§2.8.1` cited from inside the chapter
506+
that now contains it; `§2.13` cited from the chapter that now *is* it; `§2.14`
507+
cited from the chapter it moved to. Every heading structure stayed valid and the
508+
bilingual parity check stayed green throughout, because neither of those is a
509+
check about meaning.
510+
511+
> A mechanical move keeps every structure valid and leaves the prose pointing at
512+
> the old shape. The checks cannot see it; a reader can.
513+
514+
**Chapter 17's "Related chapters" ended up mid-chapter**, and its own bullet for
515+
`05` said "every manifest key, including `[xlings]`" — the one claim the move
516+
made false.
517+
518+
**Two rules were written in the skill and not applied.** Chapter 22 had no
519+
"Current limitations" while the skill calls that section mandatory. And "every
520+
document states which rung it is on" was followed by no chapter and is not
521+
useful to a reader; it became "a `Related documents` line naming the rung above
522+
and below", which is what the chapters actually do and what carries the
523+
gradient. A rule nothing follows is worse than no rule, because it makes the
524+
skill unfalsifiable.
525+
526+
### 12.3 What the work found in the implementation
527+
528+
Three defects met while building `12-a-new-device-language`, each now in its
529+
README because a rule author will meet all three:
530+
531+
- An action's command runs from the **build directory**, so a rule joins
532+
`manifest_dir()` to the package-root-relative paths `device_sources()` gives.
533+
- A pipeline's exit status is its last command's. The first `toyc` summed with
534+
`… | paste -sd+ - | bc`; when an earlier stage produced nothing `bc` still
535+
exited 0, `set -e` never fired, and the program compiled, linked, ran and
536+
printed `0`.
537+
- **The compiler is a declared input.** Without it, editing `toyc.sh` left every
538+
edge clean and the artifact kept the previous compiler's bytes.
539+
540+
And one in the tooling: `mcpp emit xpkg` produces a descriptor that
541+
`mcpp xpkg parse` rejects for a package keeping its own `mcpp.toml` — the
542+
emitted `mcpp` segment carries `manifest = "mcpp.toml"` and no `sources` list,
543+
and the validator requires one. Isolated by adding the list by hand, which makes
544+
it validate. Recorded in `docs/21` as a limitation; not fixed in a documentation
545+
change.
546+
547+
`build_examples.sh` refused all four new example roots for being in neither
548+
`BUILD` nor `SKIP`. That is the denominator discipline working, and it is the
549+
same shape §7 gives the coverage check.
550+
551+
### 12.4 What is open, and why each is open rather than late
552+
553+
**The specifications' language** (§6.2, §11.1). English primary with a 简体中文
554+
mirror is the recommendation and is 1,156 lines of translation. It is an open
555+
question in this document, and translating before it is answered is the wrong
556+
order. What did ship is the half that is not a question: the register rules now
557+
cover `docs/specs/`, which they were exempt from by a glob rather than by a
558+
decision.
559+
560+
**SPEC-005 and SPEC-006** (§6.1). Each is a promotion of text that exists and
561+
each is its own review.
562+
563+
**A publishing round-trip example** (§4.3, B3). Blocked on the emit/parse
564+
mismatch above: the loop it would teach cannot be shown end to end while the
565+
descriptor `mcpp emit xpkg` writes is one `mcpp xpkg parse` refuses.
566+
`[resources]` and `[runtime]` were to be folded into that track and are
567+
therefore still uncovered.
568+
569+
**14.7's `--no-accel` diagnostic and L0 of the rule ladder** are unaffected by
570+
this batch and remain where the heterogeneous plan records them.

0 commit comments

Comments
 (0)