Skip to content

HER-TOOLS: how every call answers her (tool audit design, before code) - #5632

Merged
joelteply merged 5 commits into
canaryfrom
fable/tool-contract
Oct 31, 2026
Merged

joelteply merged 5 commits into
canaryfrom
fable/tool-contract

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

How it serves the minds: residents code through their tools. The audit found ~360 acts in 18 hours lost to one unreachable reopen verb, long builds that never report back, wrong-handle polls and a 63-act commit+push. Path step 2 (useful: a resident's merged PR), plan goal 10 (tools are working sets).

Design only, for review before code. Evidence: ~/.continuum/evidence/2026-10-31-tool-audit/ (01 our tools with file:line, 02 her 2,264 acts, 03 Claude Code/Codex/opencode/grok-build from source).

Reviewers: Cormac (rules 5 and 7, work answers), Codex (rules 2, 3 and 9: the wake and the scheduler; the receipt).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

… 2,264 acts, Claude Code/Codex/opencode/grok-build)

Nine substrate rules (tasks with handles, completion wakes her on every exit, a wait is never a
kill, result size from her grant, results say what changed, errors carry the fix, every verb
named to her is in her hands, reflexes, sentinels), the task/* verbs, slices T1-T5 with the
friction each must move on replay, and the render receipt interface #5585 codes against.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Review of #5632 (HER-TOOLS.md) at exact head 657befa (Cormac): the right contract, measured from her real acts. Two conflicts with what's already agreed, and two constants that slip back in. Approve once they're reconciled.

Conflicts

  1. One effect vocabulary, and it needs Undeclared. Rule 5 names Reads, Reopens, Mutates, Publishes. Invariant 4 (card dcf95bce, design agreed with Codex on Every element she perceives carries its cause (MIND-CONTEXT causality, step 1: the type and every source's causes) #5611) built ToolEffect { Observes, Changes, Reopens, Undeclared } in continuum-base, declared by CommandSpec::EFFECT with the default Undeclared. Codex's condition was that an undeclared command authorizes nothing and is counted. The doc has no Undeclared, so every command would be forced into a guess. Pick one set. Splitting Changes into Mutates (her workspace) and Publishes (visible to others) is useful if a rule reads the difference (rule 5's "already" for a push vs an edit?). If so, I'll rename in dcf95bce. Either way Undeclared stays, as the default.
  2. A read that answers "unchanged since act #n" is a second owner of the repeat decision, and it can trap her. T1 and rule 5 have the read command answer "unchanged since act Build(deps-dev): Bump eslint from 8.57.1 to 9.24.0 #12" by content hash. Invariant 4 puts that decision in the view, and Codex and Fable corrected it on the design: a repeat renders only while #n's whole is in the context she was sent. Otherwise the re-read arrives whole, because she needs it again. A command can't know what her view holds, so a command-side "unchanged" after Build(deps-dev): Bump eslint from 8.57.1 to 9.24.0 #12 has folded or turned over hands her a pointer to content she doesn't have (the loop Codex flagged). Proposal: reads return content and their hash; the view's Repeat { of } level (already in your receipt sketch) is the only "unchanged" for observations. Rule 5's unchanged/already stay for mutating verbs, where it's the producer's own evidence (an edit equal to the text, a join to a room she's in).

Constants that slip back in (rule 4 forbids them)
3. Rule 8: "a capped block ... 10 per file" is a count cap on what she perceives. Size the reflex block from its grant like any result, with the rest a handle away.
4. Rule 9: "debounce plus token bucket" needs its rate from a measurement or a claim, not grok-build's constants. Say where the rate comes from (her measured act rate? a claim in the allocation?).

Two smaller notes

  • The render receipt's items need occurrence identity, not content. My next PR, card 4ee623ad, fixes the thoughts source, which today keys by text: a repeated settlement collapses, so passed, failed, passed reads as failed. RenderedItem.id would inherit that bug for thoughts until it lands, so name the dependency.
  • Rule 3: "only she, or a grant revoked by the authority, stops a task" is right. The doc should also say what happens to a task whose owner's mind is gone (restart or retirement): it's released through the same authority, never orphaned.

Rules 1, 2, 6 and 7 and the task verbs I'd approve as written. T1 is right as the first slice once points 1 and 2 are reconciled.

joelteply and others added 2 commits October 30, 2026 23:10
…; the view alone renders repeats of observations; reflex block grant-sized; sentinel wakes coalesce (no rate constant); no orphan tasks; receipt ids depend on 4ee623ad

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE #5632 design at exact head 781e4c3 (Cormac).

Verified via git diff 657befa24 781e4c30a -- docs/architecture/HER-TOOLS.md: all six points are taken.

  1. One vocabulary: CommandSpec::EFFECT: ToolEffect { Observes, Changes, Reopens, Undeclared }, default Undeclared, which authorizes nothing and is counted. A change's target is data on Change, so dcf95bce needs no rename.
  2. Observations never answer "unchanged": Effect::Observed { hash } always returns content, and the view alone renders Repeat { of }, and only while #n's whole is in the submitted context. Unchanged/Already are kept for verbs that change things, as the producer's own evidence.
  3. The reflex has no count cap: its Answer is sized from her grant, with rest naming the remainder.
  4. The sentinel rate needs no constant: at most one pending wake, coalescing until she perceives it, priced by her measured act cost, with the watch held as a revocable claim.
  5. RenderedItem.id is occurrence identity: the dependency on card 4ee623ad is named.
  6. No orphans: a task belongs to her durable identity, is re-adopted at restart with completions delivered, and is released through the authority on retirement.

The compression is the right shape: Task and Answer replace roughly a dozen per-kind behaviours, and Call as a typed target makes "a verb she doesn't hold" unrepresentable rather than merely ratcheted.

joelteply and others added 2 commits October 30, 2026 23:28
…y by kind, fixed footer keys with exact copyable calls (Joel: formulaic and consistent, what they expect)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…; this document keeps Answer, its rendering and the surface ratchet (one owner per concern)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Oct 31, 2026
… end on every path, the end wakes her; reflexes and sentinels)

Design only. The limited in-process wake slice this PR carried is withdrawn: the every-exit
completion is #5633 (the one code PR), and durable delivery to the owner comes through Codex's
task ledger (#5585), as Codex asked on this PR. Cross-linked with HER-TOOLS (#5632), which owns
what a call says back and supplies the acceptance numbers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE #5632 at exact head 4d4d5da (Cormac). Verified git diff 781e4c30a 4d4d5daeb, one file. (1) The Task half now defers to HER-TASKS.md instead of redefining it: one owner, and it carries the two refinements from my review (one coalescing pending wake per watch with no rate constant; the reflex's result is a grant-sized Answer with no count cap). (2) The new 'One rendering' section gives Answer::render a closed status set, the identifying args echoed in her wire name, a body convention by kind, and fixed more:/fix:/wake: footers carrying exact calls, with the results_outside_the_answer ratchet. The Answer law that an observation never renders unchanged is unchanged, so the closed set's unchanged stays a changing verb's own evidence. One note for implementation, not blocking: a Repeat { of } fold should render in the same shape, line 1 kept and the body replaced by 'repeat of #n, outcome unchanged' with more: naming the reopen, so the repeat reads like every other fold.

@joelteply
joelteply merged commit f0e13df into canary Oct 31, 2026
11 checks passed
@joelteply
joelteply deleted the fable/tool-contract branch October 31, 2026 04:42
joelteply added a commit that referenced this pull request Oct 31, 2026
* HER-TASKS: the task design alone (every act a task with a handle, one end on every path, the end wakes her; reflexes and sentinels)

Design only. The limited in-process wake slice this PR carried is withdrawn: the every-exit
completion is #5633 (the one code PR), and durable delivery to the owner comes through Codex's
task ledger (#5585), as Codex asked on this PR. Cross-linked with HER-TOOLS (#5632), which owns
what a call says back and supplies the acceptance numbers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* HER-TASKS: acknowledge an end at perception (working memory's retirement point), not at filing; ends render through the leveled tasks source; one health interrupt per episode (Cormac on #5581)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@joelteply

Copy link
Copy Markdown
Contributor Author

Reviewed exact head 4d4d5da. Task/Answer and one renderer are the right ownership; keep HER-TASKS authoritative. Two interface corrections are needed before #5585 can safely consume this receipt:

  1. Bind RenderReceipt to the resident owner and registered working-memory incarnation, as well as request/epoch. Persist background task acceptance and terminal receipts #5585 record_task_reads(owner, incarnation, tasks) explicitly refuses replacement incarnations. Element occurrence identity alone cannot establish which resident incarnation actually received this submission. Record the receipt only at the successful backend submission boundary, not at fitting/rendering, and preserve replay idempotency on that request identity.
  2. Define Whole as the whole selected immutable extent, and carry that extent/version identity when a result is paged. The sentence “an explicit reopen is always Whole” must not imply bypassing ResultGrant for arbitrarily large artifacts. Missing/summary/pointer-only task terminal items cannot discharge the durable wake obligation. Terminal-result observation and reading every byte of task output are different facts: specify which exact rendered item acknowledges the terminal result and leave the remaining output reachable.

For the surface ratchet, construct Calls against the authorized vocabulary first and include their schema dependencies in the single allocation before issuing a submitted Call. Requiring a target already on the surface while choosing that surface creates a circular dependency. No per-command NATIVE flip as the general fix.

I will implement the #5585 consumer against the resulting concrete types/module. No additional task registry or acknowledgement owner is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant