# Lessons-learned — ch.1 Finding Prospects (2026-06-09)

## Time spent (rough)
- Extractor (Phases 1-3): ~55 min
- Adversarial review (Phase 4): ~30 min
- Resolution + P-01-04 follow-up (Phase 5): ~25 min
- Post-flight + FigJam + MemPalace/KG (Phases 6-7-7b): ~25 min
- **Total controller wall-clock: ~2h 15m** (well within 2-3h target per chapter)

## Chapter metrics
- **Nodes:** 19 (4 states inc. 1 carry-through, 5 loops, 4 principles, 5 anti-patterns inc. AP-01-05 added in Phase 5, 1 script)
- **Edges:** 43 KG triples emitted (44th withheld — L-01-05 precedes L-02-XX forward-ref)
- **Cross-chapter edges:** 6 (to ch.0)
- **Gap-list:** 22 entries (all canonical tags)
- **Validation scenarios:** 6
- **Adversarial flags:** 9 raised → 9 resolved-fix (0 deliberate)
- **MemPalace:** 18 new drawers + carry-through preserved (ch.0 S-skill-committed drawer untouched)

## Retroactive triples pending

- `L-01-05 precedes L-02-XX` — withheld because L-02-XX is a placeholder for an unextracted ch.2 node. When ch.2 extraction completes and the target id resolves, this triple must be emitted in ch.2's Phase 7b as a retroactive triple from ch.1.

## Pipeline frictions surfaced (7 items)

### From extractor (Phases 1-3):

1. **Sub-paragraph numbering convention.** Extractor used `para.10b`, `para.10c` for sub-paragraph beats (e.g., anecdote inside a structural paragraph). Convention not in `extraction.md §3` or §5. **Amendment applied:** documented in extraction.md (see below).

2. **Multi-artifact source paragraph precedence.** One paragraph (p.32 para.20) yielded 4 artifacts (P-01-04, AP-01-04, L-01-05, Sc-01-01). The precedence rule in extraction.md §5 doesn't address multi-artifact restatement. Heuristic followed: prefer anti-pattern tag (action-relevant) over principle. **Amendment applied:** codified in extraction.md.

3. **Loop `steps:` field dual-purpose.** Serves audit structure AND script-attachment anchor. Template doesn't say which is primary. **Amendment applied:** added a one-line note to templates/_chapter.md.

4. **Phase 6 schema validation gap.** Should check scenario-text id references, not just `linked_*` fields. Currently no explicit check that scenarios cite only existing node ids. **Amendment applied:** added a check item to chapter-workflow.md Phase 6.

### From Phase 6-7-7b (controller dispatch):

5. **FigJam metadata tool incompatibility.** `mcp__claude_ai_Figma__get_metadata` rejects FigJam URLs (`/board/`). Visual verification cannot be machine-verified for FigJam canvases — only human-inspect after opening URL. **Amendment applied:** added standing note in chapter-workflow.md Phase 7.

6. **Retroactive forward-reference KG triples.** Ch.1's `L-01-05 precedes L-02-XX` triple cannot be emitted until ch.2 resolves L-02-XX. The KG triple is correctly withheld; when ch.2 extraction completes, the triple needs retroactive emission. **Amendment applied:** added explicit step to chapter-workflow.md Phase 7b.

7. **MemPalace drawer tag-merge limitation.** `add_drawer` has no tag-merge capability. Ch.0 S-skill-committed drawer remains tagged `[ch-0, ...]` only — no `ch-01` added. KG triples referencing S-skill-committed work regardless. **Not amended** — accepted as a known v0 limitation; will revisit if tooling supports tag-merge in future.

## Surprises
- Ch.1 first real chapter with all 5 node types co-emitted. Pipeline held.
- Adversarial reviewer DISAGREED with extractor's concern #4 — produced a real new node (AP-01-05). The dispute-resolution pattern (extractor flags pre-emptively, reviewer evaluates independently, Dmitry rules) worked cleanly.
- Voice register held: zero negative-vocab phrases across 19 nodes. Persona doc is doing its job.
- Time per chapter trending down: ch.0 dry-run was ~115 min; ch.1 was ~135 min total (controller + extractor combined, but only ~55 min extractor — the rest is orchestration). Should converge toward ~90-100 min per chapter by ch.3.

## Recommendation
- **Ready for ch.2** (Inviting). All amendments applied. Validators (Roma + Maks) can be pinged on ch.0 + ch.1 in parallel with ch.2 extraction.
- No protocol re-runs needed. The 9-flag resolution did not introduce new ambiguity per the resolver's Phase 4 re-run check.

---

## 2026-06-10 — Post-handoff amendments

Following Terry's gap analysis (2026-06-10, response in `syncs/2026-06-10-terry-gap-response.md`), the following pipeline amendments were applied retroactively to ch.1 (and forward to ch.2+):

- Loop steps enriched with `kai_intent` (required) + `script_ref` (optional)
- Script schema gains `requires_variants` field (default `[kr, jp, ru, vn]`)
- Chapter-workflow Phase 6 validates against `schema/v1.0.json`
- Schema published at `schema/v1.0.json`

KR/JP/RU/VN variants are deferred to a batched workstream after all 7 EN chapters land (Dmitry's decision (ii), not per-chapter).

---

## 2026-06-11 — Dialogue layer introduced (Roma operational review blocker)

Roma operational-truth review (2026-06-11) flagged that the structural graph alone is hard to walk for a non-technical operational reviewer; he wants to see what Kai actually SAYS. Dmitry approved adding a dialogue layer as a new node type.

Amendments:
- New `dialogue` node type (D-XX-YY) with `turns` array — see `templates/_chapter.md` # dialogues section.
- Schema bumped v1.0 → v1.1 (additive; no breaking changes for Terry's transpiler).
- Voice persona §Newcomer register shift added — concrete + imperative + repeat + confirm, triggered by `voice_context_tags: [newcomer]`.
- Ch.1 retrofitted with 5 dialogues (D-01-01 through D-01-05) covering all 5 loops + key anti-pattern correction moments (AP-01-02, AP-01-03, AP-01-04, AP-01-05).
- New FigJam board: "Ch.1 Dialogue Walkthrough" — Roma's review surface.

Product insight from Dmitry: newcomers need under-explanation, not over-explanation. Voice register shift codifies this.

Forward to ch.2: dialogue authoring is now part of the per-chapter pipeline. Each chapter emits 5-8 dialogues covering its loops + anti-pattern moments. Adds ~2-3 hours per chapter; offset by the reviewer-clarity gain.
