Repository navigation
Write the chief-of-staff record with commands and give status one verdict - #182
Merged
Merged
Conversation
Chiefs spent a third of their tool calls hand-editing program.json, guessed timestamps, and missed idle owners. record.py now records each event (start, report, answer, resolve, land, wait) with its own clock, refuses an uncommitted record, validates, commits, and renders. status reads PRs from gh and owner threads from the T3 CLI and lists what to do now; --turn-end fails while open work is orphaned or the page is behind the record. Owner reports open with a JSON block that report reads. The renderer turns ISO times in prose into time elements the page localizes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
status now applies every forge fact before it validates, so row order no longer decides which facts stay. A retargeted base resets readiness like a moved head, and a landing whose PRs merge in separate runs lands. A released landing no longer covers an idle owner, and turn-end fails on an uncommitted record. Release refuses a layer stacked on unreleased work. Pasted choices match labels the page reflows. Report waits are validated. Scrap-or-rebase answers go through the hand write, and a kept dirty buffer is checked before it is committed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
status now raises each row toward its forge facts in ID order until nothing moves, so a rejected change holds back only its own row. A first-recorded head or base unverifies readiness. A Need covers idle work only when it halts it or the work waits on it at its stop. Reports cannot record merges or terminal states; status reads those at the forge. start keeps a recorded owner's plumbing and refuses another owner without --replace. A failed commit restores the file, and a failed render says the record changed. Turn-end guidance matches the code and leaves the page to a new chief after a move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A report must repeat each merged layer unchanged, so it cannot swap a merged layer's PR for an open one. When status sees a head or base move whose facts the rules reject, it still withdraws readiness on the recorded row, so the chief is not told to release stale work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
status ends with exactly one verdict: runnable (start, release, idle owner, an answer not yet applied, or a quick Need whose recommended option halts unprovisional work), working, waiting (each Need, wait, and blocker with its age from the record's UTC times), or done. It prints a digest of those facts without times, --json prints them as one object, and --exit-code maps the verdicts to 0, 3, 4, and 5. Turn-end also fails while the verdict is runnable. Answers now carry applied: false until the new applied command records that the affected owners have them. The field is optional and omitted from the page revision, so existing programs keep validating. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A ready layer whose observed status no longer meets its finish line's readiness, including a closed PR under a live dependent, now loses readiness even when the facts themselves need a hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Orphaned work is now runnable, so the verdict and turn-end agree. A reversible Need is one whose recommended option sets the new optional reversible flag; it counts as runnable only for startable work not provisional on that exact decision. Waiting wins over done while a wait remains, a recorded blocker covers an idle owner, and the digest carries open rows' forge facts but not read-error text. Readiness lapses by the finish line's rule for drafts too, and the fallback note names the candidate it kept. Reopen and withdraw drop applied. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A row counts as a provisional start only when every Need that halts it recommends a reversible option. Orphan lines keep a stable reason so the digest ignores reader error text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 15, 2026
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.
Summary
Chief of Staff now writes its program record with commands instead of hand edits. A new script,
skills/chief-of-staff/scripts/record.py, handles each event (report, answer, resolve, start, land, wait, applied). Every event command:A record with uncommitted changes is refused, and the diff is shown.
statusreads gh and T3, updates state, and gives the program one verdict.--turn-endfails while work could still run. This makes the record deterministic and makes "nothing left to do" checkable.startrecord.py start --state program.json --work W4 --owner "Search owner" --session t3-thread://… --mode delegatedreportrecord.py report --state program.json --work W1(reads the JSON block at the top ofreports/W1.md, or stdin)answerrecord.py answer --state program.json --decision W1-D7 --option 2 --source "user, 14:02 message", or--pastedwith a page prompt on stdinresolverecord.py resolve --state program.json --decision W3-D2 --option 1 --basis "AGENTS.md says…; reversible by revert"appliedrecord.py applied --state program.json --decision W1-D7landrecord.py land --state program.json --work W1,W2, then--landing L2 --to submitted/landed/withdrawn --note …waitrecord.py wait --state program.json --on "CI on #181" --event "checks finish" --work W1, or--clearstatusrecord.py status --state program.json [--json] [--exit-code] [--turn-end]Verdict
statusprints exactly one verdict, in text and with--json:With
--exit-code, the exit codes are done 0, waiting 3, working 4, and runnable 5. Adigestchanges only when the verdict, its items, or the open rows' state and layer facts change. Timestamps and reader error text do not change it. A heartbeat can compare digests cheaply; the heartbeat itself is PR 2.--turn-endcommits nothing. It passes only when the record is clean, the page matches the record, and the verdict is not runnable.Other changes
<time datetime>, so the page shows local times.page: behind record <commit>when the published page is behind the record.program-state.md,SKILL.md,decisions.md,hosting.md, andowner-kickoff.mdnow use the commands.SOURCES.mdrecords the local difference.Decisions to check
reversible: true, instead of inferring it fromweight: quickplus a recommended option. Quick describes how hard a question is to answer, not whether a choice can be undone. A Need counts as runnable only when:answerrecords the user's choice (needs--source).resolverecords the chief's own call (needs--basis). An answer getsapplied: falseuntilappliedclears it, so an answer that has not been acted on stays runnable. Decisions answered before this change count as applied.Evidence
python3 scripts/check.py: passed, 108 chief-of-staff tests (52 intest_record.py). The new tests use fakeghandt3readers and check record diffs path by path. They cover each verdict, the reversible-Need cases (including a second Need that is not reversible), exit codes, digest stability, and the turn-end rules. Before landing, the new tests were run against broken versions of the code, and they failed.example-statein a temp git repo, checking 12 assertions (start, report, answer/resolve, land, wait, dirty refusal, status, turn-end, publish flag, prose times, applied, verdict output). All 12 passed on cbe638e. The repairs since then are covered by unit tests. I called the real gh and T3 readers once, against PR Use any existing asc profile, not only a Keychain one #181 and a live thread, and both outputs parsed. Gap: no real program has run on these commands yet.Merge Danger
Two-way door. The change is limited to
skills/chief-of-staff/. The schema stays backward compatible:appliedandreversibleare optional, and existing records validate unchanged. A revert restores hand-written records. After a revert, the old validator rejects the new optional keys:appliedon decisions andreversibleon options. To roll back a live record, runappliedon pending answers and drop anyreversiblekeys.🤖 Generated with Claude Code