Repository navigation
Closed
Description
Context
A long coordinator session (ytstack:coordinate, one v2 plan with ~250 rows, dozens of parallel lanes as subagents, ~40 PRs merged in one day) ran on a machine with ytstack 0.9.0 installed. Asked to apply the OpenAI "software factory" ideas, the coordinator first hand-built its own variants (a babysitter subagent, a home-made L/S/H review tiering, an ad-hoc release post-check) before noticing that 0.7–0.9 already ship them: risk routing (ytstack-risk, REVIEW.md, auto_merge, merge_by: risk), PR watch (0.8), ytstack-watch release, signals/incident, review-lessons (0.9). The capabilities exist; the usage is not explicit enough for an agent to pick them up unprompted.
Observed gaps
coordinatedoes not point at the new tools. Its checklist namesfinish-laneandytstack-watch, but not: runytstack-risk floor/routebefore a merge, register every open PR with PR watch, runytstack-watch releaseafter a production release, route incidents throughsignals. A coordinator that merges itself (project rule: "the coordinator merges every PR once gates are met") never passes throughfinish-lane, so none of the risk routing applies.- PR watch misses PRs opened by subagents.
pr_watch=onand the worker are installed, yetytstack-pr-watch statusshowed zero watches for the repository although ~40 PRs were opened there that day, all by subagents in.worktrees/<name>. Registration seems tied to the session that rangh pr create; subagent PRs (and PRs reopened later) are not registered to the coordinating session. Coordinator mode needs "watch every open PR of this repo for me" (register --all-openor similar). - No prompt when the risk gate is not configured. The repo has
.ytstack/spec/with 8 area files but noREVIEW.md, noauto_merge, nomerge_byin PREFERENCES. Nothing told the agent that risk routing is therefore off;ytstack-upkeep/ the SessionStart block could say "risk routing not configured: everything goes to a person". - Version awareness after compaction. The compacted summary and earlier skill loads referenced the 0.7.0 cache path; the agent kept using 0.7.0 docs while 0.9.0 was installed. A SessionStart line "ytstack X.Y installed; new since your last load: …" (from CHANGELOG) would close that.
- Plans outside
.ytstack/are invisible to the frontier. The project's v2 plan lives inplans/*.mdtables, soytstack-frontiersaw nothing and lanes were tracked by hand inLANES.md.adopt-brownfield/reconcilecould detect a large external plan and offer the migration into milestones/slices (the project is doing that now by hand).
Suggested changes
coordinate: an explicit "Factory tools" step listingytstack-risk route(per merge, also when the coordinator merges itself), PR watch registration of all open PRs,ytstack-watch releaseper production release,signals/incident,review-lessonsafter merges.- PR watch: coordinator registration for all open PRs of a repository, including subagent-opened ones.
- Upkeep/SessionStart: warn when risk routing, PR watch or release config is absent although the project would use it; show "new in this version" once after an upgrade.
reconcile/adopt-brownfield: detect and offer migrating an external plan directory into milestone artifacts.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels
Activity
lx-0 commentedon Nov 14, 2026
Addition: the setup guide has the same gap.
README.mdlists the tools well as a reference ("Coordinating many lanes" table,merge_byin "Dialing ceremony"), butQUICKSTART.mdhas no setup steps for them. A project that adopts ytstack (or upgrades from ≤0.6) gets no walkthrough for:.ytstack/spec/REVIEW.md(lenses, own reviewers),auto_mergeper area file,merge_by: risk, then verifying withytstack-risk check/ a dryrouteon a recent PR;ytstack-pr-watch enable+install-worker(incl. the asdf/mise shim caveat from 0.8.2), and how a coordinator registers PRs that subagents opened;RUNTIME.md"Release" and "Signals" sections, soytstack-watch releaseandsignal-intakework;ytstack-upkeepon a schedule.Suggestion: a "Setting up the factory tools" section in QUICKSTART (greenfield and brownfield/upgrade variants), plus an "upgrading from 0.x" checklist generated from the CHANGELOG. Field note for the README's "nothing has run against a real host yet": on 2026-11-14 a coordinator on a large repo dispatched two production releases with signed-image admission and per-release post-checks done by hand; those steps match what
ytstack-watch release+ RUNTIME "Release" are meant to automate, so it is a good first real-host candidate.lx-0 commentedon Nov 14, 2026
Field finding from the first real REVIEW.md setup (context-mcp #1715, ytstack 0.9.0):
ytstack-risk routecan never returnunattendedin a repo where agents may not write in the main checkout and a ruleset binds reviews to the head. The route reads the review round line from the plan file in the main checkout; committing that line on the PR branch moves the head, which invalidates both the round line (pinned to the old head) and any head-bound review the host requires (here a review-gate that counts only reviews on the current head). Every route therefore ends asperson, fail-safe but defeatingmerge_by: risk. Suggestion: letrouteread the round from the host (the review itself: its commit_id, author and verdict line) instead of a file the PR must change, or keep round lines in a ref outside the PR branch (e.g. a notes ref).fix: PR watch register --all-open for coordinators (#54 part 2) (#56)
lx-0 commentedon Nov 14, 2026
Field check with 0.9.1 on a long coordinator run:
ytstack-pr-watch register --repo <repo> --all-openregistered the 9 open PRs that subagents had opened (0 foreign), and the worker heartbeat was 77 s old. That closes the gap for this setup. One remaining wish: the coordinator only learns the registration result when it runs the command itself, so registering again after each subagent PR (or a hook ongh pr createinside subagents) would make it automatic.🤖 Generated with Claude Code
lx-0 commentedon Nov 14, 2026
Clarification to my comment above: this coordinator session started before ytstack had the PR-watch hooks, so a missing auto-registration of subagent PRs here is the documented 'running sessions keep their hooks' case, not a defect. No hook change needed from this observation. The real test is the next coordinator session (started on 0.9.1): a subagent PR opened there should appear in
ytstack-pr-watch statuswithout--all-open. I will report that result here.🤖 Generated with Claude Code
fix: PR watch qualifies a bare Claude session id and heals stuck watc…
M031: factory tools explicit (risk route from the host, coordinator f…
M032 + M033: incident to lesson loop, upstream feedback channel (#67)
lx-0 commentedon Nov 15, 2026
Shipped in 0.9.1/0.9.2 (subagent PRs, session spelling) and 0.11.0 (M031, PR #66):
coordinateStep 7 "Run the factory tools" incl. the risk route before every merge, one-step rotation withytstack-pr-watch handover,ytstack-risk route --prreads the round from the review on the host (the context-mcp #1715 case routesunattended), session-start notices for tools that are off and a version notice after a plugin update, QUICKSTART setup guide and upgrade checklist,bin/ytstack-planswith the external-plan question inreconcile/adopt-brownfield.🤖 Generated with Claude Code