# Lessons — ch.0 full rebuild (2026-06-11)

**Context:** The original ch.0 dry-run (2026-06-09) predated most pipeline amendments: main-session orchestration ruling, kai_intent step enrichment, schema v1.1, the dialogue layer, the newcomer voice register, and the per-chapter validator. Rather than retrofit, ch.0 was torn down completely (commit `c20ceb1`: 3 repo files, canvases.md entries, 9 MemPalace drawers, 16 KG triples incl. cross-chapter — per Dmitry ruling both edge classes were invalidated) and re-extracted from scratch under the current contract.

## What was emitted, and why

Fresh read of Go Pro Introduction (PDF pp.9–11, 18 physical paragraphs) reproduced the historical shape exactly — this was a genuine re-derivation, not a copy (extractor was barred from the old snapshot in `exports/`):

- **2 user_states** — `S-luck-seeker`, `S-skill-committed` (global carry-through ids, contract-locked by ch.1)
- **4 principles** — P-00-01 skills-not-luck (core thesis), P-00-02 decision+practice, P-00-03 internal locus, P-00-04 treat-like-business
- **3 anti_patterns** — AP-00-01 angle-seeking, AP-00-02 blame externalisation, AP-00-03 lottery-ticket signup
- **8 within-chapter edges**, 0 loops / 0 scripts / 0 dialogues (framework-only chapter; the luck→skill transition is a narrative decision moment, an open forward-reference to a future onboarding chapter, not a loop)
- **12 gap-list entries**, 5 validation scenarios, 0 cross-chapter links (forward edges into ch.1 are owned by ch.1 — division of ownership preserved)

The slot-to-semantics contract held with zero deviations, so **no ch.1 reconcile patch was needed** — all ch.1 references (S-* carry-through, P-00-NN depends_on targets, AP-00-NN pairings, Scenario 6's P-00-03) verified intact against the rebuilt chapter.

## Differences vs the original dry-run

1. **All wording re-authored.** Bodies, voice drafts, criteria — fresh language under the ratified persona (incl. the blind-spot "we"-disambiguation rule applied preventively; zero voice flags survived two adversarial passes).
2. **Paragraph anchors converged with the original.** After the pass-1 renumbering fix (see below), the rebuild's source_ref anchors landed on exactly the original dry-run's paragraph numbers (P-00-02 = p.10 para.11, angle = p.10 para.13, realisation = p.11 para.14, decision = p.11 para.15) — independent convergence on the book's physical-paragraph count, a good sign both reads were faithful.
3. **Gap list is 12 entries vs the original 18.** Not lost coverage — different accounting: the rebuild gap-lists only non-emitted paragraphs (18 physical − 6 emitted = 12); the original dry-run's 18 included finer-grained sub-beat entries.
4. **Schema v1.1 conformance machine-verified:** `tools/validate-chapter.py` 27/27 CLEAN (the dry-run predated the validator entirely).
5. **Adversarial rigor:** 2 independent passes (7 + 2 flags, all resolved-fix) vs the dry-run's compromised self-administered pass. The >20%-nodes re-run rule fired for the first time and earned its keep — pass 2 caught 2 real issues pass 1 missed (a mental-state over-attribution in AP-00-03, a tag-boundary miss).

## Pipeline insights (candidate protocol amendments — Dmitry to ratify; locked protocols not edited)

1. **Cross-page paragraph numbering needs codifying in `extraction.md §3`.** The extractor promoted the p.9→p.10 continuation of para.7 to its own number, shifting every downstream anchor by +1; the fix cost a full renumber cascade. Proposed rule: *paragraph numbers follow the book's physical paragraphs; a paragraph spanning a page break keeps one number, anchored to the page where it begins.* Registered in the blind-spot register.
2. **`recap` vs `anecdote` boundary needs one sentence in `extraction.md §5`.** Two independent reviewers prescribed opposite tags for the same paragraph (the convention "hit by lightning" scene). Ratified resolution, matching the ch.1 Harvey Mackay precedent: *`recap` is reserved for summary-function paragraphs; an autobiographical scene that restates existing artifacts = `anecdote` + a note naming the restated artifact ids.* Registered in the blind-spot register.
3. **`tools/validate-chapter.py` still loads `schema/v1.0.json`** (hardcoded SCHEMA_PATH). Equivalent to v1.1 for ch.0 (v1.1 only adds Dialogue), but the path should be bumped before ch.2 — ch.2+ will have dialogues that v1.0 cannot validate. Queued as a small tool fix.
4. **Orchestration contract worked cleanly end-to-end:** extractor (opus, Phases 1–3) → controller-dispatched adversarial Explore (sonnet, Phase 4) → resolver (sonnet, Phase 5) → controller micro-resolution for the 2-line pass-2 fixes → single sonnet subagent for Phases 7+7b. The controller applying trivial pass-2 fixes directly (instead of a third subagent round-trip) is a reasonable efficiency carve-out; chapter-workflow Phase 5 names the controller as the tool, so this is protocol-consistent.
5. **Teardown→rebuild KG round-trip:** cross-chapter triples (ch.0 node ↔ ch.1 node) were invalidated in teardown and restored in Phase 7b per Dmitry's ruling. Lesson for future chapter rebuilds: Phase 7b of the rebuilt chapter owns restoring OTHER chapters' carry-through edges that the teardown invalidated — list them explicitly in the teardown commit so nothing silently drops.
6. **Environment notes:** `Read` cannot rasterise the Go Pro PDF here (`pdftoppm` missing) — `pdftotext -layout` fallback is reliable and already canon in chapter-workflow Phase 2. `python` is at `C:\Python313\python.exe` (not on PATH). The `figma-use` skill is not in the subagent skill registry (`Unknown skill`) — ToolSearch schema loading works as fallback; canvas populated in a single `use_figma` call with no quota issues on the Pro plan.

## Scope-extension addendum (same day, 2026-06-11 — Dmitry ruling: ch.0 = pp.9–28)

After the rebuild landed, Dmitry challenged the chapter's substance: the thesis "network marketing can and should be your profession" was missing. Re-verification against the PDF confirmed the thesis lives in book chs.1–3 (pp.12–28: Perfect-Career-List, five-careers teardown, New Economy, Go-Pro decision, skills hand-off) — extracted NOWHERE, while ch.1's pre-flight comment falsely claimed those framing chapters were "folded into ch.00 scope already". Dmitry ruled: extend ch.0 to pp.9–28 additively.

**What the extension added (all under the same 4-pass adversarial regime):**
- `S-evaluating-career-frame` (new state — the pre-commitment deliberation stage), `L-00-01` (Perfect-Career-List walk), `L-00-02` (Go-Pro decision — THE inflection loop, finally closing the long-open S-luck-seeker → S-skill-committed forward-reference), `P-00-05..08` (better-way frame, New-Economy, poser/amateur/professional taxonomy-as-lesson, earn-while-you-learn), `AP-00-04` (passion-without-skill / "ignorance on fire"), `D-00-01/02` (dialogues, newcomer register), scenarios 6–9, 105 net new gap entries, 1 cross-chapter link (`L-00-02 precedes L-01-01`).
- Collision discipline held: no poser/amateur states (ch.1 owns the operational mappings); book chs.2–3 wrong-behaviour material gap-listed as restatements of AP-00-01/02/03 and P-00-03.
- Final chapter shape: 3 states / 2 loops / 8 principles / 4 anti-patterns / 0 scripts / 2 dialogues; 131 physical paragraphs, 117 gap + 14 emitted, continuity machine-verified; validator 145/145 CLEAN.
- Adversarial totals for the day: **18 flags, 4 passes (7+2 rebuild, 7+2 extension), 17 resolved-fix + 1 resolved-deliberate** (para.128 upline-declaration template kept as gap restatement — no loop-step anchor; Roma sign-off needed before canonising that call as a script).
- Deferred by design: the social-esteem-cost cluster (paras.88–96 area) gap-listed as `forward-reference` — resilience/handling-negativity material for a later chapter's pre-flight.

**New pipeline lessons from the extension:**
1. **List-blocks fold into their introducing paragraph.** The extractor split two four-step lists into standalone paragraphs, inflating the count by 2 and shifting every downstream anchor. Caught by the reviewer at the p.18/p.19 boundary; fixed by absorption + full −2 cascade. Now in the blind-spot register; same codification candidate as the cross-page rule (extraction.md §3).
2. **Resolver cascades must be specified as global.** The resolver limited the renumber cascade to the flag's local range (63–79), leaving the ≥80 zone inconsistent; the controller had to finish the cascade by script (71 lines). Instruction lesson: a renumber disposition must say "cascade to end of chapter", never "minimal affected range".
3. **Source_ref re-anchoring creates dual-listings.** Both re-anchors (P-00-05→para.55, P-00-07→para.101) left stale gap entries for the newly-emitted paragraphs. Recovery rule registered: after any re-anchor, check the gap list for the new anchor paragraph and delete its entry (extraction.md §5 multi-artifact rule).
4. **Scripted verification paid for itself twice**: the para-continuity checker (1..131, gap∪emitted, overlap=∅) caught both dual-listings instantly; recommend folding a continuity check into validate-chapter.py alongside the v1.1 path bump + dialogues parsing (queued before ch.2).

## Artifacts (final, post-extension)

- Chapter: `chapters/00-intro.md` — pp.9–28, 3 states / 2 loops / 8 principles / 4 anti-patterns / 0 scripts / 2 dialogues, 9 scenarios (status: draft; adversarial 18 flags resolved across 4 passes / 0 unresolved; Dmitry editorial + Roma + Maks pending)
- Flag log: `protocols/adversarial-flags-ch.00.md` (4 passes, dispositions + controller addenda inline)
- FigJam main: `m2vzT3LKLe2FPEsevvlENs` (v4 — rebuild + scope extension, updated in place; ch.1 v2 conventions, loops row, 25 colored edges, sidebar with persona + 9 scenarios, cross-chapter block)
- FigJam dialogues: `h6du5mamlxEoOeAbj1Ylk5` (v1 — D-00-01/D-00-02 chat-style lanes for Roma operational review)
- MemPalace: 17 drawers for ch.0 (`kai_coach_kb` 19→36 across the day) + 2 in-place updates (S-luck-seeker, S-skill-committed); KG 176→209 triples (16 rebuild incl. 8 cross-chapter restores + 17 extension incl. `L-00-02 precedes L-01-01`)
