Skip to content

Draw the hooks module apart from Leaf's Python in How it works' forks material - #6548

Merged
max-sixty merged 1 commit into
mainfrom
agent-a42602f09ae6a0b08
Nov 20, 2026
Merged

max-sixty merged 1 commit into
mainfrom
agent-a42602f09ae6a0b08

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

How it works drew Leaf as one participant in its fork sequences, so the round trips between Leaf's Python and Leaf's Claude Code hooks module showed nowhere. This draws them apart:

  • Take sequence (Forks tab, #take-sequence): the page server and leaf hook (Leaf's Python) and the hooks module, line fork, working fork and main thread (in Claude Code), each arrow labelled with what crosses. Its caption says which half writes what.
  • Turn-end check (Workflow tab, #turn-end-sequence): a sequence of its own, drawn the same way.
  • #forks-carrier, after the forks map: the module only carries out Python's instructions (carrier.py), so a change to a fork changes only the Python. carrier.py joins the sources.
  • Anatomy timeline: the Leaf lane splits into Leaf's Python and the hooks module, whose lane holds its fork calls and run-end reports at the times the 19:38 run's Claude Code debug log recorded. The line and working fork lanes now use the forks' own times from that log rather than when Python noted them, which had put a run's end after the module reported it; two prose figures follow (15.6 s, 1.5 s).

The forks map is unchanged.

To check: the take sequence is now about 1,020 px tall at the column's width, against 520 before, and scrolls sideways in its box on a phone. The module's times, like the timeline's other times since #6489, come from the run's recording rather than checked-in data.

From open item #30 on the fork-messages page, where Max picked building it.

Tests: tests/model/test_product_page.py, dev/tests/model/test_product_page.py, the product-preview test in dev/tests/model/test_interact_preview.py; leaf page check --render on the docs preview is clean apart from advice it already gave. Each diagram was looked at as Firefox draws it, light and dark, at desktop and phone widths.

This was written by Claude Code on behalf of max-sixty

… material

How it works drew Leaf as one participant in the take sequence, so the round
trips between Leaf's hooks module and Leaf's Python showed nowhere. Now:

- The take sequence (Forks tab) has a participant for each process: the page
  server and `leaf hook`, grouped as Leaf's Python, and the hooks module, the
  line fork, the working fork and the main thread, grouped as in Claude Code.
  Each arrow says what crosses, from the follower's report through
  `$.model.fork`, `$.agent.spawn` and the run's end. Its caption says which
  half writes what, in place of "Leaf here is its Python and its hooks module
  together".
- The turn-end check's section on the Workflow tab gains a sequence drawn the
  same way, from the main thread's turn ending to the lines Leaf queues for it.
- A paragraph after the forks map says the module only carries out Python's
  instructions, and why: a session's module is often older than its Python, so
  a change to a fork changes only the Python. `carrier.py` joins the topic's
  sources.
- The anatomy timeline's Leaf lane splits into Leaf's Python and the hooks
  module. The module's lane holds its fork calls and run-end reports at the
  times Claude Code's debug log recorded in the 19:38 run. The line fork and
  working fork lanes take the forks' own times from that log (the
  `$.model.fork` call's duration; `agent_completion`), where they had used the
  moments Python noted them, which put a run's end after the module had
  reported it. The prose follows: the first run ended at 15.6 s, and the
  second line fork took 1.5 s.

The forks map is unchanged. A page rule draws the sequences' groups as grey
grounds without an outline, which otherwise read as extra lifelines.

Max picked building this on the fork-messages page (open item 30 there), from
drafts drawn there.
@max-sixty
max-sixty merged commit 1d5d872 into main Nov 20, 2026
5 checks passed
@max-sixty
max-sixty deleted the agent-a42602f09ae6a0b08 branch November 20, 2026 02:47
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.

2 participants