Add pickup and prepare subcommands to bin/handoff #1542
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1542
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
/os:pickupspends tool calls on work that a script can do. A pickup reads the file, edits the log line, runsbin/handoff complete, and sends anExploreagent to checkProgressrows. The user asked on 2026-11-04 to move this work into dynamic context injection, so that the facts are in the skill text before the model starts./os:handoffhas a smaller cost of the same kind. Its injectedstatusoutput is 44 lines and 4.9 KB in cc-os. The writer uses three of those lines:now,new_path, anddefault_project.Reproduce
n/a: feature ticket. Measured on main
21b5ebde:bin/handoff status --project-root . | wc -lcprints 44 lines and 4903 bytes.Approach
Add two subcommands to
bin/handoff. Each prints all that its skill needs. Each skill calls its subcommand once by injection.Facts about injection, tested with
claude -pscratch skills on 2026-11-04:"$ARGUMENTS[0]"expands to the first word, and to an empty string with no arguments. An apostrophe in a later word does no harm."$0"stays unsubstituted with no arguments, so the shell expands it to/usr/bin/zsh. Do not use it.${CLAUDE_PROJECT_DIR}and${CLAUDE_SESSION_ID}expand inside the command.2>&1 || trueon each injected line, so that the model sees the error text.$ARGUMENTS, or the notes after the path are lost.os-backlogis onPATHduring injection.handoff pickup [PATH] --project-root ROOT --session ID:activelines and changes no file. It does not expire files.error: <path>: no such file, then theactivelines, and exits 1.completed_atwhen it is empty, and add- <now> picked up by <ID>at the end of## Session log. Add that section if it is absent. A second run with the same ID changes no file.## Progresssection, or from the whole file when that section is absent.Live state output, one line per reference, then the repository lines:
Tickets match
(?<![\w/-])#(\d+). Commits match\b[0-9a-f]{7,40}\band print only when git knows the token as a commit, or when the token holds a digit. Paths are backticked tokens that hold a/. Runos-backlog issue-show Nonce per ticket from the project root.handoff prepare --project-root ROOT --session ID:statusdoes.now,new_path,default_project,branch, onestatus:line per changed file, and the five latest commits ascommit:lines.picked up by <ID>, also printparent: <path>and oneparent_log: <line>for each line of its## Session log.activeorcompletedlines.statusandcompletedo not change.Required work:
pickupsubcommand — check: presentdef pickupinplugins/os/lib/handoff/cli.rbpreparesubcommand — check: presentdef prepareinplugins/os/lib/handoff/cli.rb/os:pickup, inject the subcommand output and remove sections 1 to 3 (read, claim, Explore). The skill keeps$ARGUMENTSin its body, keeps the no-handoff branch (print theactivelines, ask which, end the turn), prints the table, and acts. A row with no fact getsunknown. — check: absentExploreinplugins/os/skills/pickup/SKILL.md/os:handoff, injectprepareand use itsparentlines inIf this session began from a handoff. Remove thecompletestep: pickup already stamps the file. — check: presentbin/handoff prepareinplugins/os/skills/handoff/SKILL.mdpickupandhandofflines inplugins/os/CLAUDE.md— check: presenthandoff prepareinplugins/os/CLAUDE.mdplugins/os/references/frontmatter-registry.md— check: presentbin/handoff pickupinplugins/os/references/frontmatter-registry.mddocs/implementation-status/os.md— check: presenthandoff prepareindocs/implementation-status/os.mdRejected: keep the
Exploreagent — each fact it reads is a fixed command, so the agent adds cost and no judgment. A row about a named session has no fixed command. The model decides that row from the ticket and commit lines, or printsunknown.Rejected: only print live state and leave the claim to the model — the claim needs no judgment, and it costs one Read, one Edit, and one Bash call.
Acceptance criteria
pickup PATH --session Sruns, then the file has acompleted_atstamp and apicked up by Slog line, and the output holds the file text with that line.## Session logsection, whenpickupruns, then the file ends with that section and the log line.pickup PATH --session Sruns again, then the file bytes do not change and the output still holds the file text and live state.pickupruns, then the firstcompleted_atstays and the file gains a second log line.pickupruns, then the output holds theactivelines, nocompletedlines, and no file changes.pickupruns, then the output names the path, holds theactivelines, and the exit status is 1.## Progressrow that names#7, a known commit, and a`lib/a.rb`path, whenpickupruns, then the output has one live-state line for each.pickupruns, then that ticket's line saysunknown, the claim still happens, and the exit status is 0.pickupruns, then the output has no line for that word.prepare --session Sruns, then the output names that file asparentand prints its log lines.prepareruns, then the output has noparentline, and it holdsnow,new_path, anddefault_project.prepareruns, then the file is deleted.Owner sketch
Non-goals
/os:wrapchanges. Cross-repo references such asdecision-model#11. Any change to the file shape.Origin
/os:pickupplugins/os/skills/pickup/SKILL.md, commit3c1a12ac)VERDICT: CREATE
Work started on branch ticket-1542.
Resolution
Done: bin/handoff gains pickup and prepare; /os:pickup and /os:handoff inject them; pickup no longer uses Read, Edit, complete, or an Explore agent.
Evidence: main
02640283; plugins/os suite 216 runs, 0 failures; rubocop clean; live claude -p /os:pickup claimed the file and printed the table with 0 tool calls. Hand-finished after implementation 228 ended verdict:error; one design audit run, findings fixed or answered on this ticket's report.Follow-ups: contract-auditor verdict gap captured separately through /os-backlog:capture