Repository navigation
Read a page as its active HTML beside page state, and drop page state's construction tree - #1311
Merged
Merged
Conversation
…'s construction tree
`leaf page state` no longer prints `content` or `content_source`. The page's
document is the HTML `active.file` names; `state` lists each standing user move
over it with the words, choice or place it carries; `source.live` and
`source.error` say whether `index.html` is the live revision; `data_bindings`
and `data/<source>.json` hold external values. `authoring-revisions.md` ("Read
before editing"), `serving-pages.md` and `page-authoring.md` read the page that
way, and a moved card is written where its move in `state` left it, ordered by
rank, with `version check` naming the place when a version misses it.
Why: in the paired check recorded in `notes/agent-usability-evals.md`, agents
reading the active HTML beside the compact state passed every check the tree
arm passed on `resume`, `constructs` and `board`, including a user-rewritten
draft, a stale measured figure and cards folded by rank with one move undone.
The tree was most of `page state`'s output: 122,280 bytes against 10,360
without it on `command-hub`, 24,422 against 4,755 on the reading fixture.
This change, run against its base on the same three cases ×3, passed all 90
checks in both arms ($12.55, `notes/usability-eval/results/change.json`).
`leaf thread read` keeps its construction reading of a thread's frozen markup,
which has no file of its own; `construction.py` now serves only that reading.
`scripts/record-demo.py` folds the demo board through `folded_positions`
rather than the tree. The harness drops its `--without-tree` arm, which the
tree's removal makes moot.
Behaviour that moved, by test:
- `test_page_state_lists_each_user_move_over_the_active_html` replaces the
tree test: `page state` has no `content`, `state` holds every move's detail,
and a rejected candidate leaves the active revision alone.
- `test_page_state_names_each_bound_source_and_its_failures` replaces the
input-binding test with `data_bindings` and `data.errors`.
- The board-order tests read the fold the page draws (`folded_positions` over
the active revision) instead of the tree.
- The deferred-manifest test reads the browser's data delivery, the other
consumer of `data_manifest`.
- The frozen-construction test keeps only its `leaf thread read` half.
- The `version check` refusal for a misplaced card says to write it where the
user's move left it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leaf-agent
reviewed
Sep 27, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
test_inspection_and_browser_share_retirement_and_bound_input_origins still indexes inspection["content"] after calling leaf page state. The new command output omits that key, so the focused browser test fails with KeyError: 'content' at tests/test_render_projection.py:180. Please adapt this test to the active HTML plus state and data_bindings contract so the everyday gate can pass. I reproduced it with uv run pytest tests/test_render_projection.py::test_inspection_and_browser_share_retirement_and_bound_input_origins -q -n0.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leaf-agent
approved these changes
Sep 27, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 28, 2026
…ng-leaf (#1371) `evals/README.md` held the suite's method and a Record table of every A/B. The table grew to two thirds of the file in three days and repeated each fix's commit message. Nothing said when a case measured during a fix should stay, so cases that passed on both arms stayed too: 6 of the 15 have never told two wordings apart. This change sets the rule for new cases and records where each old one stands; removing the six is a separate decision. - **Method** moves to `/developing-leaf`, "Score a guidance change", where the repo keeps its workflows, trimmed to what an agent running or adding a case needs. It runs A/Bs through `leaf-dev guidance-ab` (#1366), which no longer prints a Record row. - **Rule for adding a case:** it pins a clause no case pins, and it separated two arms, with the base failing most runs and the change passing every run, or a blunter draft failing a guardrail the change passes. That is usually one case per problem, rarely more than two. A case both arms passed goes in the commit message instead. - **History:** each case's Record history is now a comment at the top of its `case.yaml`: where it came from, and base against change at named commits. The rows for A/Bs that kept no case live in their commit messages (#1311, #1332). `tags` stay the suite's categories. - `AGENTS.md`, `dev/AGENTS.md` and `leaf_dev/harness.py` point at the new section. #1363's rows are in its three cases' comments. Two unopened branches that add rows will conflict on the deleted file; their rows move the same way. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
leaf page stateno longer printscontentorcontent_source. The page'sdocument is the HTML
active.filenames;statelists each standing user moveover it with the words, choice or place it carries;
source.liveandsource.errorsay whetherindex.htmlis the live revision;data_bindingsand
data/<source>.jsonhold external values.authoring-revisions.md("Readbefore editing"),
serving-pages.mdandpage-authoring.mdread the page thatway, and a moved card is written where its move in
stateleft it, ordered byrank, with
version checknaming the place when a version misses it.Why: in the paired check recorded in
notes/agent-usability-evals.md, agentsreading the active HTML beside the compact state passed every check the tree
arm passed on
resume,constructsandboard, including a user-rewrittendraft, a stale measured figure and cards folded by rank with one move undone.
The tree was most of
page state's output: 122,280 bytes against 10,360without it on
command-hub, 24,422 against 4,755 on the reading fixture.This change, run against its base on the same three cases ×3, passed all 90
checks in both arms ($12.55,
notes/usability-eval/results/change.json).leaf thread readkeeps its construction reading of a thread's frozen markup,which has no file of its own;
construction.pynow serves only that reading.scripts/record-demo.pyfolds the demo board throughfolded_positionsrather than the tree. The harness drops its
--without-treearm, which thetree's removal makes moot.
Behaviour that moved, by test:
test_page_state_lists_each_user_move_over_the_active_htmlreplaces thetree test:
page statehas nocontent,stateholds every move's detail,and a rejected candidate leaves the active revision alone.
test_page_state_names_each_bound_source_and_its_failuresreplaces theinput-binding test with
data_bindingsanddata.errors.folded_positionsoverthe active revision) instead of the tree.
consumer of
data_manifest.leaf thread readhalf.state's accepteddecision and with
data_bindingsand each source's value file.version checkrefusal for a misplaced card says to write it where theuser's move left it.
🤖 Generated with Claude Code