Skip to content

Read a page as its active HTML beside page state, and drop page state's construction tree - #1311

Merged
max-sixty merged 2 commits into
mainfrom
agent-aaf064734eb188d37
Sep 27, 2026
Merged

max-sixty merged 2 commits into
mainfrom
agent-aaf064734eb188d37

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

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 nightly render parity test compares the browser with state's accepted
    decision and with data_bindings and each source's value file.
  • The version check refusal for a misplaced card says to write it where the
    user's move left it.

🤖 Generated with Claude Code

…'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 leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@max-sixty
max-sixty merged commit dcfe9b2 into main Sep 27, 2026
5 checks passed
@max-sixty
max-sixty deleted the agent-aaf064734eb188d37 branch September 27, 2026 12:36
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>
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