Repository navigation
Let a Formalize subagent work a package of related leaves, and find handoffs to other sessions in Git - #513
Conversation
…doffs on the claim board A subagent keeps its worktree for a package of related leaves the lead confirms together, taking each once work context shows it ready, instead of waiting for the lead to dispatch each leaf. With claims, each session leads from its own clone and checks git worktree list before dispatching; workers name their branch with claim acquire --note, now documented, so claim list locates a candidate handed off to another session when the report is lost. No message grants ownership or completes a leaf. Part of #434.
… lapse without a report A worker's handoff branch goes to another session only when the lead hands it there and the request covers pushing. Without the report, the integrator waits for the lease to lapse, reads the note, and acquires under its own ID, so a lost delivery never becomes permission. Only the first leaf of a package carries phase and assumes, since a later leaf's assumes shrink as earlier leaves are proved. The topology check looks for the shared branch in another worktree, which an earlier run of the same session never causes. The CLI test also checks that the note was stored.
…en leaves to the lead A candidate handed to another session goes to an origin branch whose name ends with the leaf's article_id, so git ls-remote finds it after the lease and its note are gone. A package subagent holds only the leaf it has taken; when it stops, the rest of the package returns to the lead. The CLI reference says the note key is absent, not empty, after an acquire without --note.
|
Review at 5804e71: merge. This is a static review, the first on this PR. It checks the new prose against Notes
Posted by Claude Code (session jackmccarthy-e8). |
Fixes #434.
Problem
#434 (from the recovery report in #426, sections 3 and 4) describes three failures in a long Formalize run:
Change
Wording only, plus documentation for a flag that already exists. Each acceptance box:
skills/formalize/SKILL.md, a subagent may keep its worktree for a package of related leaves (such as one container's) that the lead confirms together. It holds only the leaf it has taken, takes the next oncework contextshows it ready after integrating, and at the first leaf that isn't ready the rest of the package returns to the lead. This replaces Add Formalize wording for #434, #435, #466 and #483 #488's per-leaf dispatch. Jack's 10-26 comment on this issue let a subagent "take several related ready leaves in sequence"; now the subagent goes on to the next leaf of a package the lead confirmed, without waiting for a new dispatch. Readiness is still derived, never authored.claim_target,article_revision,open_statementsandrevision. Only the first leaf also getsphaseandassumes; a later one takes them from the first read that shows it ready, because underopen_statements: alloweditsassumesshrink as earlier package leaves are proved.lake exe cache getruns once per package.skills/formalize/references/claims.md("Worker IDs and the board"), a session leads from its own clone. Ifgit worktree listshows the shared branch checked out in another worktree, the lead asks the user first.--notenaming the worktree's branch on every acquire.originon a branch whose name ends with the leaf'sarticle_id.git ls-remote --heads originto continue it. Then it acquires under its own ID.claim cleanupor another worker's acquire can erase it. The branch name still finds the candidate after that. A lost report therefore costs at most one lease term (25 minutes by default) and never becomes permission.Not adopted
This PR declines three items from the issue's deliverable list rather than deferring them. Jack's 10-26 comment described them as waiting for the freeze to end; Jack decides whether these reasons stand.
lake exe cache get, andwork import-impactdoes not count a build made in another clone or worktree.Public surface added
None. The CLI's commands and flags are unchanged against main. The branch-name ending is a convention, not a new ref layout.
The existing surface below is now documented in
autoform_cli/README.mdand so becomes a contract:autoform claim acquire --note TEXT, in--helpsince v2.0 but never in the README: it stores free text in each lease, and Formalize uses it to name the worker's branch.notekey in the JSONclaim listprints, which was already printed from the lease.renewkeeps it. The key is absent, not empty, after an acquire without--note.Docs
skills/formalize/SKILL.mdskills/formalize/references/claims.mdautoform_cli/README.mdCHANGELOG.mdVerification
tests/test_claims.py: a single-target acquire with--noteshows the note inclaim list, and the owner's next acquire without--noteleaves nonotekey. The existing CLI round trip already covers a multi-target--noteandrenewkeeping it.article_id, a lost report waits for the lapse, and a package returns its untaken leaves to the lead.tests/test_doc_budgets.py,tests/test_skill_examples.py(links, anchors, parse checks of documented commands, safety rules), and the note and round-trip tests intests/test_claims.py.ruff checkis clean. No Lean is involved; CI runs the full suite.Posted by Claude Code (session cove-343224054).