Repository navigation
feat: the host is the ledger of a lane, goal mode (#79, #99) - #102
Conversation
A lane's state is its pull request, read fresh. What only the coordinator
knows lives in one lanes file per repository, out of tree at
${XDG_STATE_HOME:-~/.local/state}/ytstack/repos/<repo key>/LANES.md,
resolved by yt_lanes_file for every reader (frontier, stop lint, upkeep,
status --phases, finish-lane route, coordinate/finish-lane/lane-retro
preambles).
- ytstack-frontier where | migrate | snapshot; a repo LANES.md without a
snapshot: key stays the lanes file until migrate (LANES_MIGRATE in the
coordinate preamble)
- finish-lane bundles roadmap tick, decisions and the milestone snapshot
on the lane branch before the push
- ytstack-upkeep: bookkeeping section, days with more than 3 merged PRs
that changed only .ytstack/ (local refs)
- coordinate 0.8.0, finish-lane 0.8.0, lane-retro 0.2.1,
spawn-milestone-team 0.5.3; DECISIONS, spec, docs, CHANGELOG
- tests isolate XDG_STATE_HOME; widen a timing-sensitive heartbeat check
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ytstack-goal set <M###>|"<sentence>" writes a goal marker out of tree (<session home>/<id>/goal). The Stop hook holds the stop while the goal is open, naming open slices, the milestone's exit criteria, missing files and failed checks, and lets it through for an asked question, a recorded blocker (ytstack-goal block), a running lane or a PR watched for this session, or a reached bound (--until, --rounds), said once. Inside a hook-continued turn it blocks again only after a tool call in the transcript, so it cannot loop; a standing or lint block comes first. - ytstack-goal set | status (runs --check) | block | clear | hook - coordinate 0.9.0: sets the current milestone as the goal (--if-unset), checklist item 14 clears it; Codex uses its native /goal - DECISIONS, spec, coordinator-format "Goal mode", docs/codex.md, CHANGELOG - spec dependencies verified_at moved (git-ctx resolver only, no dependency change) Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11082acd28
ℹ️ 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".
| elif printf '%s' "${YT_STDIN:-}" | grep -Eq '"stop_hook_active"[[:space:]]*:[[:space:]]*true'; then | ||
| ACTIVE=true |
There was a problem hiding this comment.
Parse the transcript in the no-jq fallback
On a Claude Code installation without jq, this branch detects stop_hook_active but leaves TRANSCRIPT empty. goal_check consequently calls ytstack-goal hook without --transcript, whose active path returns pass, so after the first goal block the agent can stop even after making another tool call while the goal remains open. Parse transcript_path through the supported Python fallback as well.
Useful? React with 👍 / 👎.
| # goal mode (issue #99): the current milestone becomes the session's goal | ||
| has "$s: without a session id no goal" "$OUT" "GOAL: ytstack-goal: no session id" | ||
| PRE_SID=goal-s1 run_pre "$P" "$WT" | ||
| hasnt "$s: with a session id the goal is tried" "$OUT" "GOAL: ytstack-goal: no session id" |
There was a problem hiding this comment.
Define the negative assertion helper before using it
When this case runs, hasnt is not defined anywhere in the test script. Because the suite uses set -uo pipefail without -e, the resulting command not found does not increment FAIL, and the intended assertion is silently skipped; a regression that still emits the no-session message with a session ID can therefore pass this test.
Useful? React with 👍 / 👎.
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. |
tests/codex_plugin_test.py allows another host's name only in shell comments; the goal lines now say "a host with its own /goal". Co-Authored-By: Claude Opus 5.5 <[email protected]>
- yt_lanes_file is the unified resolver (also for PR #101's callers): out-of-tree file, else the main checkout's LANES.md, else <yt_dir>'s (no snapshots), else the out-of-tree path; prints the path and sets YT_LANES_FILE/YT_LANES_SOURCE - migrate takes the main checkout's copy, refuses while a worktree's copy differs, marks both; migrate --from <old path|key> for a moved checkout; where says how to recover - goal: coordinate sets --rounds 30; ytstack-goal calls do not re-arm; the stop goes through once every open slice waits for a person; a stale or unreadable running row is no background work; any Stop-hook block leaves its transcript offset; scan at most 2 MB; --if-unset replaces a reached goal; hooks/stop prints through python without jq before a message counts as said - upkeep: merge-commit subjects no longer give "##N" - docs: QUICKSTART, README, coordinator-format example, evals note Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve against #101: keep the unified yt_lanes_file (out of tree first, then the main checkout's non-snapshot LANES.md) and drop #101's duplicate; keep both CHANGELOG sections and DECISIONS entries; spec row and test lists carry both idle-said and goal mode. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Changes
#79: the host is the ledger of a lane (commit 94836d8)
${XDG_STATE_HOME:-~/.local/state}/ytstack/repos/<repo key>/LANES.md, next to the coordinate marker and keyed like the automatic handoff. Every linked worktree reads the same file.yt_lanes_fileinhooks/lib/git-ctx.sh, serves every reader:ytstack-frontier, the Stop hook's lanes lint,ytstack-upkeep(report and--worktrees),ytstack-status --phases,ytstack-finish-lane route, and the preambles ofcoordinate,finish-laneandlane-retro.ytstack-frontier where | migrate | snapshot.finish-laneStep 3 now puts what lasts on the lane's branch before the push: the roadmap tick, the lane's DECISIONS/spec lines, and the snapshot in a milestone's last lane.ytstack-upkeephas a newbookkeepingsection: UTC days of the last 7 with more than 3 merged PRs that changed only.ytstack/. It reads local refs only (first-parent history of origin's default branch) and makes noghcall.questions/andstanding/stay in the repo.#99: goal mode (commit 11082ac)
ytstack-goal set <M###>|"<sentence>" [--check cmd] [--file path] [--until UTC] [--rounds N] [--if-unset], plusstatus(runs the checks),block "<why>"/block --clear,clear, andhook. The marker lives out of tree at<session home>/<id>/goal.hooks/stoppart 5 holds the stop while the goal is open. The block names the open slices, up to 3 exit criteria fromM###-CONTEXT.md, missing files and failed or unrun checks.runninglane, a PR the PR watch watches for this session while its worker ticks, or a reached bound. The bound and a reached goal are each said once.stop_hook_active) the goal is the only part that runs. It blocks again only when the transcript shows atool_useafter its last block, and never when there is no transcript. If a standing or lint block already holds the same stop, the goal adds no second block.coordinate0.9.0 sets the current milestone as the goal with--if-unset(GOAL:line) and clears it in checklist item 14. On Codex it points to the native/goal; ytstack registers no Stop hook there.Skill versions: coordinate 0.7.2 -> 0.9.0, finish-lane 0.7.1 -> 0.8.0, lane-retro 0.2.0 -> 0.2.1, spawn-milestone-team 0.5.2 -> 0.5.3.
Decisions
Two new DECISIONS entries (2026-11-16):
LANES.mdis a snapshot (issue coordinate: tracking files in the repo cost one PR per bookkeeping step #79)"Notable choices:
yt_state_base, becauseCLAUDE_PLUGIN_DATAreaches hooks only.statusruns the checks and records the results.Migration
Nothing changes until you migrate. An existing repo
.ytstack/LANES.mdwithout asnapshot:key stays the lanes file as long as no out-of-tree file exists, and the coordinate preamble printsLANES_MIGRATE.ytstack-frontier migratecopies the file out of tree and addssnapshot: <UTC>to the repo copy. A snapshot is never read as the lanes file again; commit it with the next lane or remove it there.On a new machine with only a snapshot,
migratecopies the snapshot (held rows have to be checked against their PRs), or the rows can be rebuilt from the PRs and branches.Verification
python3 bin/ytstack-check: OK (9 pre-existing warnings; none new)bin/ytstack-spec lint: 0 failures, 0 warnings.bin/ytstack-spec drift: no area to look atbash tests/run-all.sh(macOS bash 3.2): ALL SUITES PASSED, 37 suites. Includes frontier 228, upkeep 168, goal 52 (new), skill-preambles 769+, hooks-coordinate 91, status 66bash tests/run-all.sh --linuxfrom agit archive HEADexport (bash 5.3, alpine): ALL SUITES PASSEDhooks/session-startnot touched): 9437 chars on startup, 9485 after compactNot done
ytstack-standing addstill opens its one standing PR per UTC day; this PR does not move standing entries onto lane branches.hooks/teammate-idleis not touched. PR fix: teammate-idle counts only the lane's own scope and says it once (#97, #98) #101, still open, makes it read.ytstack/LANES.mddirectly. Once fix: teammate-idle counts only the lane's own scope and says it once (#97, #98) #101 is on main, that reader needs to go throughyt_lanes_file.Closes #79
Closes #99
🤖 Generated with Claude Code