Skip to content

fix: preserve workflow handoffs across branches - #414

Closed
malikrohail wants to merge 1 commit into
garrytan:mainfrom
malikrohail:malikrohail/fix-workflow-handoff-state
Closed

malikrohail wants to merge 1 commit into
garrytan:mainfrom
malikrohail:malikrohail/fix-workflow-handoff-state

Conversation

@malikrohail

Copy link
Copy Markdown
Contributor

Summary

Fixes the still-open root causes from #280 that make multi-step workflows lose context when skills run on different branches.

What changed

  • Add bin/gstack-find-artifact to resolve the best design doc or CEO plan for the current repo/branch
  • Make gstack-review-log write to a project-scoped reviews.jsonl in addition to the legacy branch file
  • Make gstack-review-read prefer the project-scoped log and fall back to all legacy per-branch logs when needed
  • Update /plan-eng-review to load both the current design doc and the active CEO plan via the helper instead of branch-fragile globs
  • Update /plan-ceo-review and /autoplan to use the shared design-doc lookup helper
  • Add behavioral tests covering cross-branch review visibility, legacy log fallback, branch-aware design doc lookup, and CEO plan lookup

Why this fixes the bug

Current main already has the narrow /review logging fix, but workflow continuity still breaks because:

  • review discovery is effectively branch-scoped
  • design doc lookup still depends on branch-specific filenames
  • /plan-eng-review has no direct CEO-plan discovery path

This PR moves those handoffs to project scope and gives the planning skills a shared artifact lookup path instead of ad hoc globs.

Verification

  • bun run gen:skill-docs
  • bun run gen:skill-docs --host codex
  • bun run gen:skill-docs --dry-run
  • bun test test/workflow-handoff.test.ts
  • bun test

Refs #280

@time-attack

time-attack commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

@malikrohail Rewrite this to resolve current conflicts, restore validation and enqueue behavior, and prevent reviews from unrelated branches from clearing ship readiness.

@capy-ai

capy-ai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Thanks for digging into #280. Design-doc lookup now goes through a shared helper with project-scoped fallback, and we keep review logs branch-scoped so unrelated branches can't clear ship readiness, so we're closing this. A focused PR for CEO-plan discovery in /plan-eng-review would be welcome.

@capy-ai capy-ai Bot closed this Oct 8, 2026
garrytan pushed a commit that referenced this pull request Oct 15, 2026
/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 #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 #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 #280

Co-Authored-By: Claude Opus 5.5 <[email protected]>
garrytan pushed a commit that referenced this pull request Oct 15, 2026
/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 #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 #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 #280

Co-Authored-By: Claude Opus 5.5 <[email protected]>
garrytan pushed a commit that referenced this pull request Oct 16, 2026
/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 #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 #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 #280

Co-Authored-By: Claude Opus 5.5 <[email protected]>
garrytan pushed a commit that referenced this pull request Oct 16, 2026
/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 #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 #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 #280

Co-Authored-By: Claude Opus 5.5 <[email protected]>
garrytan pushed a commit that referenced this pull request Oct 16, 2026
/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 #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 #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 #280

Co-Authored-By: Claude Opus 5.5 <[email protected]>
garrytan pushed a commit that referenced this pull request Oct 16, 2026
/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 #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 #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 #280

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants