Repository navigation
feat: who decides: escalation policy, question class and context gate (#78) - #93
Conversation
) yt_prefs reads escalate: as a comma separated subset of violation, deviation, irreversible, secret, spend (default all five) into YT_PREF_ESCALATE. An invalid item warns and reads as all five, so a typo never takes a class away from the person. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ytstack-questions new --decides needs --because <item> (escalate list or reserved) and writes class: escalation; --info <who> writes class: info. ask refuses a question whose Context has no Source: or Purpose: line. check validates class and because; files without them stay valid and read as escalation. ytstack-upkeep writes its report as class info. The format and the Who decides list live in docs/ux/coordinator-format.md, with line 6 of the operating checklist. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#78) coordinate Step 8: what the plan or a standing entry does not reserve, the coordinator decides and records in DECISIONS.md; a plan line reserves only with verdict, approval or sign-off. The preamble prints ESCALATE and the class of each waiting question. reassess-roadmap, lesson and review-lessons write their questions as reserved with Source and Purpose; init-project and README carry the new key. 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]>
The area lists hooks/lib/git-ctx.sh for the vendor resolution; the new escalate preference does not touch it. 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: 52db7bb991
ℹ️ 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".
| # the project's list of today. | ||
| cls=$(fm "$f" class); why=$(fm "$f" because) | ||
| case "$cls" in | ||
| ''|info) ;; |
There was a problem hiding this comment.
Reject escalation reasons on info questions
When a user manually edits or creates an info question with because: deviation (or any other valid escalation reason), check reports the file as valid because this branch imposes no constraint on why, and the later allow-list check accepts the reason. This contradicts the new format, where info decides nothing and must use because: none, and lets contradictory metadata reach the coordinator as info (deviation); require because to be unset/none for this class.
Useful? React with 👍 / 👎.
…g purpose (#78) Review of PR #93: the case reset Source too, so it passed without the section guard. Mutation check: removing 'on &&' in context_names now fails it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…both (#78) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…fo (#78) Co-Authored-By: Claude Opus 5.5 <[email protected]>
The coordinate injection is close to its 9500 cap and the checklist is never cut. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Both sides kept: main's DECISIONS entries first, one CHANGELOG [Unreleased], coordinate 0.7.1 (above 0.6.3 and 0.7.0). 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]>
…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]>
…, no PR closes, rotation (#82, #83) (#94) * feat: parked lane status; the open-PR cap counts PRs ready for review (#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]> * feat: hooks read a stale checkout from origin and keep a coordinator 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]> * feat: coordinate and finish-lane never close a lane PR; every round runs 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]> * docs: spec, DECISIONS and CHANGELOG for the coordinator path (#82, #83) Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs: host-adapters names the Bash matcher and the uncovered hints; dependencies verified (#82, #83) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: YT_BIN line yields when the using-ytstack body was cut (#82) 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]> * fix: read origin's STATE.md only when strictly behind and unedited; skip 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]> * fix: coordinate hints read commands, not text; red main per workflow 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]> * fix: the open-PR cap limits opening, never a merge (PR #94 review) 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]> * docs: spec, DECISIONS and CHANGELOG for the PR #94 review fixes Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs: dependencies area verified against the lib change (PR #94 review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs: dependencies area verified after the merge (only lib additions, no gstack) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: standing lines stay the last block cut; the using-ytstack tail yields 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]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
What changes
A coordinator now decides what no plan line and no standing entry reserves, and records it in
DECISIONS.md. A person gets a question only for an item of a closed list, and every question names where it comes from and what it is for.escalate:inPREFERENCES.md(hooks/lib/git-ctx.sh,YT_PREF_ESCALATE): a comma separated subset ofviolation, deviation, irreversible, secret, spend, default all five. An invalid item warns and reads as all five (likemerge_by: a typo never takes a class away from the person).reserved(a plan line that says verdict, approval or sign-off, or a standing entry) always holds.bin/ytstack-questions): new files carryclass: escalation|infoandbecause:.new --decides <who>needs--because <item>and refuses an item that is not on the project's list (exit 64, with "decide it yourself and record it in DECISIONS.md").new --info <who>asks for a fact and decides nothing.checkvalidatesclassandbecause.newwritesSource:andPurpose:lines under## Context;askrefuses a question while either has no value (a<placeholder>is none).--because/--info, and the reason in the AskUserQuestion re-ground. The preamble printsESCALATEand the class of each waiting question. Line 6 of the operating checklist (injected after every compaction) carries the rule.Callers updated:
ytstack-upkeep --questionwrites its report asclass: infowith Source and Purpose;reassess-roadmapgates,lessonandreview-lessonsproposals write--because reserved.init-projecttemplate and README carry the key; this repo'sPREFERENCES.mdsets the full list.Decisions
class/becausestay valid and read asescalation;checkvalidates an item against all six, not against today's project list.askrequires Source/Purpose also for old files (that is the point of the gate).decides:keeps its name for both classes: underinfoit is the person asked for the fact.escalate:can only narrow the five; more goes into a plan line or a standing entry.Verification (on the merged head 52db7bb)
bash tests/run-all.sh: ALL SUITES PASSED (35 suites; ytstack-questions 102, git-ctx 177, skill-preambles 737, ytstack-upkeep 159, 0 failed)bash tests/run-all.sh --linuxfrom agit archiveexport: ALL SUITES PASSEDpython3 bin/ytstack-check: OK (10 warnings, all pre-existing recommended-section warnings plus none from this change)bin/ytstack-spec lint: 0 failures, 0 warnings;bin/ytstack-spec drift: no area to look atbin/ytstack-questions checkon this repo's ownQ001(written before this change):questions ok: 1 file(s)Codex review is at its usage limit; an independent review runs separately.
Closes #78
🤖 Generated with Claude Code