Repository navigation
feat: coordinator stays on the path: stale-checkout hooks, loop hints, no PR closes, rotation (#82, #83) - #94
Conversation
…#83) ytstack-frontier set <lane> --status parked holds a lane whose pull request waits open, for a cap or a person; upkeep lists it as held and ytstack-status counts it in review. The open-prs gate of ytstack-finish-lane counts open pull requests that are not drafts and fails when more than 100 are open. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…on its path (#82, #83) #82: on the default branch behind origin/<default> (local refs, no fetch) SessionStart and Stop read the pointer and Next action from origin's STATE.md and say how far behind the checkout is (yt_behind_origin). The Stop task reminder is said once per session and pointer, never in a coordinate session, and a pointer older than YT_POINTER_STALE_DAYS (3) days is STATE lint W10 instead. The Next action is no longer cut for the 10,000-char cap: the using-ytstack body yields last, with a pointer to its file. A manual handoff older than the automatic one is listed as older. #83, coordinate mode only, hints never denies: pre-tool-use-agent (now also on Bash) on an Agent dispatch without isolation, on gh pr merge and on gh pr close; pre-compact counts compactions beside the marker, SessionStart says "Compaction N of this coordinator: ... rotate now", Stop repeats it once per compaction from the second; post-tool-use-bash notes ytstack:lesson when gh run list --branch <default> shows a failed run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uns ytstack-frontier check (#83) coordinate 0.7.0 and finish-lane 0.6.0: a hard-gate sentence against closing, reopening to retrigger or deleting the branch of a lane's pull request (a cap waits as parked, a check reruns with gh run rerun); the cap counts pull requests ready for review. coordinate Step 5 starts every round of the loop with ytstack-frontier check and acts on each stale: line (exit 2) before any new dispatch; Step 12 names the compaction line. The operating checklist gets the loop check and the merge/close rule; coordinator-format documents parked and the new hooks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ependencies verified (#82, #83) Co-Authored-By: Claude Opus 5.5 <[email protected]>
The body cut stops at a line end and can leave room; the YT_BIN line still does not take it, as issue #85 decided for the Next action. Found by the Linux run (shorter temp paths). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts in DECISIONS, CHANGELOG and two spec areas kept both sides; finish-lane goes to 0.7.0 on top of #88's 0.6.0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b52c68f76
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| n=$(git -C "$top" rev-list --count "HEAD..$r" 2>/dev/null) | ||
| case "$n" in ''|0|*[!0-9]*) return 0 ;; esac |
There was a problem hiding this comment.
Do not treat a diverged default branch as only behind
When the local default branch has unpushed commits and origin/<default> also has commits absent locally, rev-list HEAD..$r is nonzero even though neither ref is an ancestor of the other. This classifies the diverged checkout as stale, causes SessionStart and Stop to substitute the remote STATE.md and suppress local lint/reminders, and recommends git merge --ff-only, which cannot succeed. Check that HEAD is an ancestor of the remote ref before enabling this behind-only behavior; otherwise report the divergence without replacing local state.
Useful? React with 👍 / 👎.
…kip user scope (PR #94 review) yt_behind_origin now needs a .ytstack inside the checkout whose STATE.md origin has (user scope and an untracked STATE.md stay out entirely), and hands out origin's copy only when HEAD is an ancestor of origin/<default>, origin changed STATE.md since the merge base and the working tree's copy is HEAD's. Diverged or edited with an origin change: SessionStart reads the local file and says "N ahead, M behind", no --ff-only. Stop prunes old session dirs that only hold stop-said when it makes a new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and repo; compactions counted anywhere (PR #94 review) pre-tool-use-agent finds gh pr merge/close per line and segment, after assignments, if/then, wrappers, env, xargs and gh -R/--repo, and ignores quoted text and comments. post-tool-use-bash counts only the newest run of each workflow and only origin's repository under --repo/-R. pre-compact counts a coordinator's compaction before the .ytstack exit. The status test keeps an in-review row beside the parked one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With closing a lane PR forbidden, an open-prs gate on merge deadlocks. gates and merge drop --max-open; open-pr --max-open opens a draft at the cap (drafts do not count) and says so. coordinate dispatches no new implement lane at the cap; a parked PR leaves the count with gh pr ready --undo and comes back with gh pr ready. The two new checklist lines are shorter. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Kept both sides: the operating checklist has #93's line 6 and this branch's lines as 7 and 8; DECISIONS with main's entries first; spec lines combined. coordinate 0.7.2 and finish-lane 0.7.1, a patch above both sides. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… no gstack) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ields before them With #93's checklist line a coordinate session near the cap lost its standing list to the pointer line while the directive's tail stayed. The order is now: ..., closing line, using-ytstack body (with a pointer to the file), standing pointer last, as #74 decided. The Next action is still never cut. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore: move the gstack-derived skills' upstream baseline to v1.99.5.0 bin/ytstack-gstack-diff --stat reported office-hours, plan-ceo-review, retro and ship behind v1.99.5.0. The upstream change only renames /autoplan to /plan-eng-review in next-step recommendations and examples. ytstack has no autoplan and already names ytstack:plan-eng-review, so no method change is folded in; the baseline moves for all six skills (plan-eng-review and document-release had no upstream change) and each skill's metadata.version gets a patch bump. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore: release 0.12.0 Manifests (Claude Code, marketplace, Codex, Kimi), README badge and status, QUICKSTART upgrade line from 0.11.x, CHANGELOG section 0.12.0 with a summary line and compare link. Covers PRs #77, #87-#94 (issues #70, #72-#76, #78, #81-#86, #91). Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore: spec areas: skills verified at the gstack v1.99.5.0 baseline; host-adapters verified at the 0.12.0 manifests Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore: STATE and ROADMAP for 0.12.0: what shipped outside milestones, next action, open issues Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore: KNOWLEDGE: eval record for release 0.12.0 (13 cases, all 1.00, $6.37) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
What changes
#82 -- a stale checkout and a reminder said forever
yt_behind_origin(lib): on the default branch behindorigin/<default>(local refs only, never a fetch), SessionStart and Stop read pointer and Next action fromgit show origin/<default>:.ytstack/STATE.mdand say "N commit(s) behind" withgit merge --ff-only. The disk STATE lint waits while behind.hooks/stop: the task reminder is said once per (session, pointer) (stop-saidunder the session home), never in a coordinate session, and a pointer whoselast_updatedis older thanYT_POINTER_STALE_DAYS(3) days is new STATE lint W10 instead of a stop message. The behind message is said once per origin head, also in coordinate mode.hooks/session-start: the Next action excerpt is no longer cut for the 10,000-char cap. The cap order after feat: coordinate mode: standing instructions and enforced operating path (#72-#76) #87 was standing->3, Next action cut, factory, minimal-code, closing, Next action regained, standing pointer. Now: standing->3, factory, minimal-code, closing, standing pointer, and last theusing-ytstackbody is cut at a line end with a pointer to its file. YT_BIN yields when the body was cut.#83 -- the coordinator loop (coordinate mode only, hints, never denies)
hooks/pre-tool-use-agent(matcher nowAgent|Task|SendMessage|Bash): anAgentdispatch that is no lookup and has noisolation->isolation: "worktree"; Bashgh pr merge->ytstack-finish-lane merge --at <reviewed head>; Bashgh pr close-> a cap waits (--status parked), CI reruns withgh run rerun.hooks/pre-compactcounts compactions beside the coordinate marker; SessionStart after a compaction saysCompaction N of this coordinator: ytstack:coordinate Step 12, rotate now; from the second compaction Stop says it too, once per compaction.hooks/post-tool-use-bash:gh run list --branch <default>(or-b) whose output shows a failed run (tab form, JSONconclusion, terminalX) -> one note to runytstack:lesson, once per distinct failure set.ytstack-frontier: new held statusparked(PR waits open for a cap or a person); upkeep lists it as held,ytstack-statuscounts it in review.ytstack-finish-lane gates --max-open: counts open PRs that are ready for review (drafts not counted); more than 100 open fails as unreadable.coordinate0.7.0: HARD-GATE sentence (never close, reopen-to-retrigger or delete the branch of a lane PR; a cap waits asparked; CI reruns withgh run rerun); Step 5 starts every round of the loop withytstack-frontier checkand acts on eachstale:line (exit 2) before any new dispatch; Step 6 cap counts ready PRs, waiting lane isparked; Step 12 names the compaction line. Step 7 untouched.finish-lane0.7.0 (on top of feat: spec delta in briefs and finish-lane, plan-first briefs, reconcile task-plan skeletons (#75, #76) #88's 0.6.0): the same HARD-GATE sentence and the cap rule only.Coverage: all hints are Claude Code only; Codex runs only the PR watch on Bash and has no ytstack hook on its subagent tools, Kimi has no session id for the marker. The skill text carries the rules there (spec host-adapters, hooks-and-state, coordinator-format).
Decisions
DECISIONS 2026-11-15 "Hooks read a stale checkout from origin, say a reminder once per session and pointer, and keep a coordinator on its path with hints, not denies (issues #82, #83)": no fetch in hooks; once per pointer plus lint W10; Next action before the directive body in the budget; advisory hints, not denies (a close may be the person's wish);
parkedas a new held status.Verification
bash tests/run-all.sh(macOS bash 3.2): ALL SUITES PASSEDbash tests/run-all.sh --linuxfrom agit archiveexport: ALL SUITES PASSEDpython3 bin/ytstack-check: OK (9 warnings, same as main)bin/ytstack-spec lint: 0 failures, 0 warnings;bin/ytstack-spec drift: no area to look atCodex review quota is exhausted; an independent review runs separately.
Closes #82
Closes #83
🤖 Generated with Claude Code