Skip to content

Diagram/text integration: diagrams replace reflection prints, trim whole-dump notebooks - #25

Merged
mzargham merged 37 commits into
mainfrom
diagram-text-integration
Oct 2, 2026
Merged

mzargham merged 37 commits into
mainfrom
diagram-text-integration

Conversation

@mzargham

@mzargham mzargham commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Removes the construction-zone reflection-print duplication (every construct-introducing notebook assembled TOASTER_INCREMENT and printed it a second time right after printing each fragment individually) across Ch1-Ch8 and Ch10. The chapter's own diagram, or a short model.find()/model.query() confirmation where no diagram exists, now occupies that seam slot instead.
  • Trims the five whole-chapter-dump notebooks (Ch2-03, Ch3-03, Ch4-03, Ch5-01, Ch6-03), each of which used to print() the entire cumulative model file, to only the text their chapter's own diagram can't show. Ch5-01's residual is "none" — its diagram already covered everything structurally.
  • Renames chapters/ch08-checking/01-invariant-def.ipynb to 01-assert-constraint-def.ipynb (its heading was already corrected to "assert constraint" in an earlier pass; the filename hadn't caught up), updating all 6 live references.
  • Syncs index.md heading case/separator drift across Ch5, Ch6, Ch8, Ch10.
  • Updates tutorial-style-guide, toaster-recipe, and toaster-review-protocol skills so TOASTER_INCREMENT is documented as assigned-not-printed, including for judgment-record tag anchors — closing the exact contradiction every notebook fix above was otherwise violating.
  • Closes a real Phase-A coverage gap found mid-build: ch06/02-second-level.ipynb had its own un-surveyed reflection-print duplication, now fixed the same way.
  • One reader-facing gap found by a simulated-learner spot-check (Ch5's ApplyHeat lookup losing its only grounding once the dump was removed) is fixed with a one-sentence bridge pointing to Chapter 4's own existing action-flow diagram, rather than reopening the removed excerpt.

Process

Two-phase: a 9-agent read-only survey (decisions/diagram-text-integration-survey.md) produced the literal before/after content for every cell touched; a 9-task implementation plan (docs/superpowers/plans/2026-10-02-diagram-text-integration-phase-b-plan.md) then executed each chapter as its own contract — independent worktree, builder on Sonnet 5, reviewer on Opus 5.5, merged only after an independent PASS. Every chapter's notebooks were executed end-to-end (jupyter nbconvert --execute) as part of that review, and the five dump-trimmed chapters each got an additional simulated-learner reader-comprehension spot-check.

Test plan

  • uv run pytest tests/ glossary/tests/ -q — 444 passed, 7 deselected (verified after every merge)
  • uv run python scripts/check_construction.py --check — clean after every merge
  • Every touched notebook executes end-to-end with zero cell errors
  • Every Pattern-2 trim's printed excerpt verified byte-for-byte against the live models/chNN-cumulative.sysml
  • simulated-learner spot-check on all 5 whole-dump-trim chapters (Ch2, Ch3, Ch4, Ch5, Ch6) — PASS
  • Local MyST build (npx mystmd start --execute) — 59 pages built, server serves 200s

mzargham and others added 30 commits October 2, 2026 09:41
…ompaction

Addresses two findings: Phase 2's own diagram-survey table shows 14 of 16
placements were 'add' not 'replace', so dense text stayed in place next
to every new diagram; every construction notebook prints its own
assembled increment twice (once per fragment, once again as a
'reflection'). Scopes a harness-driven, two-phase fix (survey, then
implementation) with explicit model/role discipline per DL-090's own
lesson, folds in four already-identified cleanup items, and states the
plan-sequencing requirement needed to stay durable across a context
compaction.
…ect grep

The original draft claimed Ch2/Ch3/Ch5/Ch8/Ch10 without checking each one;
a repo-wide grep for the literal print(source) cell shows the real list is
Ch2-03, Ch3-03, Ch4-03, Ch5-01, Ch6-03. Neither Ch8-01 nor Ch10-01 has this
pattern at all. Caught before Phase A's own agents would have been sent out
on a false premise.
Fully self-contained -- every agent's dispatch prompt is written out in
full, not described, per writing-plans' own no-placeholder rule. States
explicitly, on disk, that completing this plan triggers writing Phase B's
own plan next, so the instruction survives a context compaction.
Nine parallel read-only chapter agents surveyed Ch1-Ch8 and Ch10 against
the two target patterns. Orchestrator spot-checked 3 of 5 Pattern-2
proposals against the real committed SVGs (Ch2, Ch4, Ch6) -- all confirmed
exact. Eight cross-chapter open questions surfaced, most load-bearing: every
proposed fix in this survey contradicts tutorial-style-guide/SKILL.md's own
"print TOASTER_INCREMENT as the reflection" rule, which needs one
centralized skill-editor-gated fix before Phase B, not independent
rediscovery per chapter. Also corrects a factual error found in
decisions/diagram-survey.md (ch05's claimed "triple-dump" does not exist in
the real files).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…conflicts

Both the construction-zone reflection print and the judgment-record tag
reprint are ruled to be the same defect this redesign already targets, not
sanctioned exceptions. Both edits trip skill-editor's own multi-archetype
escalation row regardless of the ACE's ruling on the substance, so both
entries stay PENDING until Z confirms the exact replacement wording. No
skill file has been touched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Z-confirmed wording. Applies Z's already-approved Decisions 1-2 (diagram/
text integration redesign) to the construction-zone reflection print and
the judgment-record tag-anchor print, both of which this skill text had
required and which every Phase A survey proposal now contradicts.
- decisions/log.md: DL-092 and DL-093 bodies still said "no edit has
  been made" / "PENDING Z's wording confirmation" after their headers
  were flipped to COMPLETE by fbdbc1d. Both now say the edit was made,
  citing fbdbc1d.
- toaster-recipe/SKILL.md: the Pattern-B seam-cell sentence still
  pointed at "the TOASTER_INCREMENT string" as what the reader sees,
  which is stale now that TOASTER_INCREMENT is assigned, not printed.
  Points instead at the already-printed fragment variables and the
  diagram/confirmation query that fills the reflection role.
…pter contracts

Fully self-contained -- every chapter task's acceptance criteria quote the
Phase A survey's own literal cell content verbatim, plus the two
DL-093-resolved judgment-tag fixes the survey itself held back as open
questions. Uses this project's own CONTRACT.md-per-worktree harness
(builder sonnet / reviewer opus), not writing-plans' generic two options,
per spec Decision 5.
…emoval on 01-model-navigation; index.md heading sync
…ant-def to 01-assert-constraint-def; index.md separator fix
… full removal on 01-model-navigation; index.md heading sync
…-invariant-def to 01-assert-constraint-def; index.md separator fix
….find() confirmation added to 01-calc-energy
…n 03-stopping-judgment; index.md heading sync
… trim on 03-stopping-judgment; 02-second-level Phase A coverage gap closed; index.md heading sync
…ation escalation closed (premise was false, no fix needed)
… DL-096 corrects DL-095 (2 Ch3 seam cells really are stale, follow-up contract dispatched)
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@mzargham
mzargham merged commit 8c98f49 into main Oct 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant