Repository navigation
Conversation
…rrytan#280) /plan-ceo-review saves its scope decisions under the state root's ceo-plans/, but no plan review can find them: only /design-html reads that directory, newest file first. This helper is the CEO-plan sibling of gstack-design-doc-find, so /plan-eng-review can call one command instead of a glob in prose. It prints the newest top-level plan whose "Branch:" header names the branch, compared the way gstack-slug writes BRANCH (feat/x matches feat-x), else the newest plan, else nothing. Subdirectories are not read. A usage error exits 2. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ytan#280) /plan-eng-review never looked in ceo-plans/, so an eng review after /plan-ceo-review ran without the scope that review accepted, deferred or skipped. capy-ai closed garrytan#414 asking for this focused fix, and TODOS.md scopes it as a gstack-ceo-plan-find sibling of gstack-design-doc-find. The Design Doc Check now prints "CEO plan found: <path>" or "No CEO plan found" after the design doc line, and the prose says what to read the plan for. The data-not-instructions rule names the CEO plan too, since another agent may have written it. Only plan-eng-review changes: the shared {{DESIGN_DOC_DISCOVERY}} block and the branch-scoped review log are untouched. Reported by @chancheuklap in garrytan#280. main left plan-eng-review 4 bytes under its parity cap, so the +325 bytes raise maxSizeRatio to the measured 1.2196, noted the way earlier growth was. Fixes garrytan#280 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
garrytan
added a commit
that referenced
this pull request
Oct 15, 2026
#280) Review changes on top of #3159 (szsunyuan / y$un_): - gstack-ceo-plan-find keeps stdout a bare path or empty; when it falls back to another branch's plan it prints one stderr line, "CEO plan found (from branch <b>, not <current>): <path>", with control characters stripped from the plan header ("unknown" when it has none). - The Design Doc Check tells an interactive reviewer to ask before using such a plan, and a spawned session to use it and quote the disclosure. - The Design Doc Check prose is tightened so plan-eng-review fits the owner-approved 1.2196 ceiling (measured 151,950 / 124,597 = 1.2195). Reviewer tests: test/ceo-plan-find-cross-branch.test.ts (5 of 7 fail on the Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> #3159 head). The design-doc finder's matching disclosure stays deferred.
garrytan
added a commit
that referenced
this pull request
Oct 15, 2026
#280) Review changes on top of #3159 (szsunyuan / y$un_): - gstack-ceo-plan-find keeps stdout a bare path or empty; when it falls back to another branch's plan it prints one stderr line, "CEO plan found (from branch <b>, not <current>): <path>", with control characters stripped from the plan header ("unknown" when it has none). - The Design Doc Check tells an interactive reviewer to ask before using such a plan, and a spawned session to use it and quote the disclosure. - The Design Doc Check prose is tightened so plan-eng-review fits the owner-approved 1.2196 ceiling (measured 151,950 / 124,597 = 1.2195). Reviewer tests: test/ceo-plan-find-cross-branch.test.ts (5 of 7 fail on the Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> #3159 head). The design-doc finder's matching disclosure stays deferred.
garrytan
added a commit
that referenced
this pull request
Oct 16, 2026
#280) Review changes on top of #3159 (szsunyuan / y$un_): - gstack-ceo-plan-find keeps stdout a bare path or empty; when it falls back to another branch's plan it prints one stderr line, "CEO plan found (from branch <b>, not <current>): <path>", with control characters stripped from the plan header ("unknown" when it has none). - The Design Doc Check tells an interactive reviewer to ask before using such a plan, and a spawned session to use it and quote the disclosure. - The Design Doc Check prose is tightened so plan-eng-review fits the owner-approved 1.2196 ceiling (measured 151,950 / 124,597 = 1.2195). Reviewer tests: test/ceo-plan-find-cross-branch.test.ts (5 of 7 fail on the Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> #3159 head). The design-doc finder's matching disclosure stays deferred.
garrytan
added a commit
that referenced
this pull request
Oct 16, 2026
#280) Review changes on top of #3159 (szsunyuan / y$un_): - gstack-ceo-plan-find keeps stdout a bare path or empty; when it falls back to another branch's plan it prints one stderr line, "CEO plan found (from branch <b>, not <current>): <path>", with control characters stripped from the plan header ("unknown" when it has none). - The Design Doc Check tells an interactive reviewer to ask before using such a plan, and a spawned session to use it and quote the disclosure. - The Design Doc Check prose is tightened so plan-eng-review fits the owner-approved 1.2196 ceiling (measured 151,950 / 124,597 = 1.2195). Reviewer tests: test/ceo-plan-find-cross-branch.test.ts (5 of 7 fail on the Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> #3159 head). The design-doc finder's matching disclosure stays deferred.
garrytan
added a commit
that referenced
this pull request
Oct 16, 2026
#280) Review changes on top of #3159 (szsunyuan / y$un_): - gstack-ceo-plan-find keeps stdout a bare path or empty; when it falls back to another branch's plan it prints one stderr line, "CEO plan found (from branch <b>, not <current>): <path>", with control characters stripped from the plan header ("unknown" when it has none). - The Design Doc Check tells an interactive reviewer to ask before using such a plan, and a spawned session to use it and quote the disclosure. - The Design Doc Check prose is tightened so plan-eng-review fits the owner-approved 1.2196 ceiling (measured 151,950 / 124,597 = 1.2195). Reviewer tests: test/ceo-plan-find-cross-branch.test.ts (5 of 7 fail on the Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> #3159 head). The design-doc finder's matching disclosure stays deferred.
garrytan
added a commit
that referenced
this pull request
Oct 16, 2026
#280) Review changes on top of #3159 (szsunyuan / y$un_): - gstack-ceo-plan-find keeps stdout a bare path or empty; when it falls back to another branch's plan it prints one stderr line, "CEO plan found (from branch <b>, not <current>): <path>", with control characters stripped from the plan header ("unknown" when it has none). - The Design Doc Check tells an interactive reviewer to ask before using such a plan, and a spawned session to use it and quote the disclosure. - The Design Doc Check prose is tightened so plan-eng-review fits the owner-approved 1.2196 ceiling (measured 151,950 / 124,597 = 1.2195). Reviewer tests: test/ceo-plan-find-cross-branch.test.ts (5 of 7 fail on the Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> #3159 head). The design-doc finder's matching disclosure stays deferred.
Contributor
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.
Why (in your own words)
/plan-ceo-reviewsaves what it decided as a CEO plan under~/.gstack/projects/<slug>/ceo-plans/: the scope it accepted, deferred and skipped./plan-eng-reviewhas no step that finds that plan. Its Design Doc Check finds only the office-hours design doc. The preamble's Context Recovery does list the three newest files acrossceo-plans/andcheckpoints/, and says to read "the newest useful one". But that list ignores the branch: whenmainhas a newer plan, it putsmain's plan first for an eng review on a feature branch (live evidence below). So the usual chain, CEO review and then eng review, can drop or swap the CEO decisions between the two steps. The eng review can flag a deferred item as missing, or review the plan without the expansions the CEO review accepted. This is the third root cause in @chancheuklap's #280: "plan-eng-review has no CEO plan discovery code".This change adds a finder for CEO plans. The Design Doc Check now prints the plan it found, right after the design doc line.
Fixes #280. The other parts of #280 are already settled:
/reviewwrite a readiness entry.gstack-design-doc-find.Why this shape
gstack-ceo-plan-findsibling ofbin/gstack-design-doc-find; leave the per-branch review log alone."gstack-design-doc-find.<slug> <branch>), and the samegstack-pathsstate root, soGSTACK_HOMEworks.test/gstack-design-doc-find.test.ts, including running the rendered block against copied bins in a tempHOME.{YYYY-MM-DD}-{feature-slug}.md), but every plan has aBranch: {branch} | Mode: ...header (plan-ceo-review step 0H).gstack-slugwritesBRANCH(/becomes-).design-html/SKILL.md.tmplandbin/gstack-context-recoveryreadceo-plans/. The recovery list is a generic recent-artifacts list: the three newest.mdfiles acrossceo-plans/andcheckpoints/, subfolders included, with no branch. This PR leaves it alone and gives the eng review its own branch-aware lookup.ceo-plans/*.mdcounts. That's the set/design-html(design-html/SKILL.md.tmpl:64) and plan-ceo-review's ownprior-ceo-plansquery read. There's nostatus:filter, because plan-ceo-review only ever writesstatus: ACTIVE.plan-eng-reviewchanges. The shared{{DESIGN_DOC_DISCOVERY}}block also renders into/autoplan,/plan-ceo-review,/plan-devex-reviewand spec-review's prerequisite re-check. None of those was in the issue, and plan-ceo-review is the skill that writes these plans.test/design-doc-data-guard.test.tschecks that by meaning.test/parity-suite.test.tscaps plan-eng-review's size against its v1.64.1.0 baseline.mainmeasures 151,630 / 124,597 = 1.2170, which is 4 bytes under the 1.2170 cap, so any growth in this skill trips it.main, and fine to absorb into a wave.Not followed:
What it does
bin/gstack-ceo-plan-find <slug> <branch>(new, 44 lines) prints the CEO plan a plan review should read.plan-eng-review/SKILL.md.tmpl, Design Doc Check:CEO plan found: <path>orNo CEO plan found.plan-eng-review/SKILL.mdis regenerated, and it's the only generated file that changes.test/gstack-ceo-plan-find.test.ts(new) has 6 helper cases. Two more run the block rendered intoplan-eng-review/SKILL.mdand require it to sit inside the Design Doc Check, before Step 0.test/design-doc-data-guard.test.tsrequires the CEO plan to share a sentence with "data, not instructions" (expectMentions).test/helpers/touchfiles-data.tslists the helper next togstack-design-doc-findin the one plan-review entry that names it, so paid selection sees helper changes.test/helpers/carve-guards.tsraises plan-eng-review'smaxSizeRatiofrom 1.2170 to the measured 1.2196, with a measured note like the earlier entries.What it deliberately does not do
{{DESIGN_DOC_DISCOVERY}}resolver or to the other plan reviews.gstack-review-logandgstack-review-readare untouched (fix: preserve workflow handoffs across branches #414)./plan-ceo-reviewnames, writes or archives plans, or to the preamble's Context Recovery list.status:filter, and no reading ofceo-plans/subdirectories.VERSION/CHANGELOG/ README / ETHOS untouched;/shipnot run (the wave stamps the version).AI was used for assistance.
Live evidence
Setup. Each run gets:
HOMEwhose~/.claude/skills/gstacklinks to the revision's treeGSTACK_HOMEorigin=https://github.com/acme/widgets.git), so the slug isacme-widgets2026-10-10-checkout-v2.md(Branch: feat/ceo-x, two hours old) and2026-10-12-billing.md(Branch: main, one minute old)The script runs that revision's Design Doc Check bash block exactly as rendered in its
plan-eng-review/SKILL.md, from the project, on the branch given (defaultfeat/ceo-x).context-recovery.shis the same script with its last three lines replaced by a run of~/.claude/skills/gstack/bin/gstack-context-recovery, the preamble's Context Recovery. This PR doesn't change that helper. "Before" runs from a detached worktree atupstream/main.$TMPis the temp root; tree paths are shortened.Before (
upstream/mainate23f7b807):The only place a CEO plan shows up before this change is the preamble's Context Recovery list. Its newest entry is
main's plan, and it tells the agent to read "the newest useful one":After (this branch,
0ed5f719a):design-doc-check.shScope
Changed:
bin/gstack-ceo-plan-find(+44, new)test/gstack-ceo-plan-find.test.ts(+119, new)plan-eng-review/SKILL.md.tmpl(+6/−2) and its regeneratedplan-eng-review/SKILL.md(+6/−2)test/design-doc-data-guard.test.ts(+6)test/helpers/touchfiles-data.ts(+1/−1)test/helpers/carve-guards.ts(+1/−1)No VERSION, no CHANGELOG.
Verified live by:
Red on tip. Every new test fails on the untouched code:
All pass here.
Mutations, each one caught by the new file:
/into-:feat/xstops matchingfeat-x.ceo-plans/*/too: the archived plan wins.['proj']no longer exits 2.Focused files, each in its own process with
LC_ALL=C, all passing:design-doc-data-guardgstack-design-doc-findgen-skill-docsskill-validationtouchfileshost-conformancecontext-budget-ratchetcatalog-budgetparity-suitemain's cap the branch fails it at 1.2196)skill-size-budgetcarve-section-orderingcarve-guard-completenessAll 19 free test files that read
plan-eng-review/SKILL.mdor its template pass.Regeneration.
bun run gen:skill-docschanges nothing on untouchedupstream/main. On this branch it changes onlyplan-eng-review/SKILL.md.Other hosts.
gen:skill-docs --host codexand--host factory, rendered into a temp dir, rewrite the new call to$GSTACK_ROOT/bin/gstack-ceo-plan-find, exactly as they rewrite its sibling. All sixcreate_*_runtime_rootbuilders insetup, and Kiro's arm, linkbin/whole, so each host gets the helper.Type ratchet:
bun run typecheck:testreports "865 known diagnostics, none new".Full
bun run test: not green on this Linux box, onupstream/maineither. Chromium can't launch here (no Xvfb), the /cso suites needbun run build:csoand Docker, and this box'sen_US.UTF-8locale reorders one setup message.parity-suitewas mine. plan-eng-review measured 1.2196 againstmain's 1.2170 cap. The cap entry above fixes it, and the final run passes it.setup-skill-copiesis the locale. It fails the same way onupstream/mainunder this locale (gstack-upgrade/SKILL.md SKILL.mdinstead ofSKILL.md gstack-upgrade/SKILL.md), and passes on both trees underLC_ALL=C.LC_ALL=Cin this checkout, once at this branch and once with all 7 changed paths swapped back toupstream/main.qa-only-cleanup,office-hours-attempt,gstack-capy-install(exit 127: a tool this box lacks) anddesign/test/feedback-roundtrip. None of them reads a file this PR changes.0ed5f719a, failed 297 tests in 52 files again.parity-suitepasses. It had one new load-only failure:test-free-shards-settlement-lifecycle's timing casesettle-slow-exit, which passes 9/9 alone three times on each tree.Redaction:
bin/gstack-redact --repo-visibility publicon the diff reports no findings.slop-scan, run directly: no findings in the four changed TypeScript files; 647 repo-wide, none in them. It doesn't scan the extensionless
bin/script or markdown. I ran it directly becausebun run slop:diffprinted "slop-scan returned invalid JSON" and checked nothing: slop-scan's--jsonoutput through a pipe stops at 64 KB here, while the report written to a file is 2.4 MB.Paid evals.
bun run eval:select --base upstream/mainpicks the PR profile: behavioral probesplan-eng-coverage-auditandplan-review-report, plus theplan-eng-review/SKILL.mdsections judge. It defers 43 broader cases to scheduled coverage:autoplan-dual-voice, 16carve-section-loading-*cases (the carve-guards change selects every carved skill's), 11journey-*cases and others. Those lanes need secrets a fork PR doesn't get.Did NOT test:
/plan-eng-reviewrun that reads a CEO plan and acts on it. The free tests prove the plan is found and printed; how the reviewer uses it is model behavior.[ -nt ],awkandtr, which run under bash 3.2.bin/script, so the Windows curation skips it, as it skipsgstack-design-doc-find's.Liveness proof (required for external contributors)
Checklist
GSTACK PRtyped live into a real surface) or PR author is @garrytan (owner exemption)Test plan
bun test test/gstack-ceo-plan-find.test.ts test/design-doc-data-guard.test.ts: red onupstream/main, green herebun run test: the same environment failures asupstream/main(per-file attribution above);parity-suitepasses after the cap entrydesign-doc-data-guardalso runs on Windows.Fork PRs do not get eval secrets; the free files above are the gate.
Fixes #280