Repository navigation
Description
Problem
The Initiative Planner ("Bob", .github/workflows/initiative-planner.yml) always materializes an epic + sub-issue DAG, even when the source idea still has unanswered, plan-blocking questions. When an idea is approved (or re-dispatched) before its scope is fully clarified, Bob plans anyway, records what he couldn't resolve in open_questions, and ships the whole inert epic. The human is then left to manually close the epic and every sub-issue and re-run planning once the questions are answered.
This has now happened twice in one day:
- discussion MCP-Powered CI Review Enhancement — Standard #650 → epic Initiative: MCP-powered CI review enrichment (optional, graceful-degrading) #659 (+5 stories [Phase 1] Add optional MCP-config passthrough to the Claude review engine #660–[Phase 3] Pilot MCP enrichment on one downstream repo and measure before rollout #664) — closed as not-planned, re-planned.
- discussion Initiative: adopt tag-based release pinning for ALL reusable workflows (extend the dev-lead/pr-review standard org-wide) #666 → epic Initiative: tag-based release pinning for all first-party reusable workflows #667 (+8 stories [Phase 1] Enumerate & classify every first-party reusable-workflow pin #668–[Phase 4] Org-wide rollout: promote the standard to .github and repin downstream consumers #675) — closed as not-planned, re-planned.
Each cleanup is 6–9 manual issue closures. The cost scales with story count and recurs every time scope isn't fully settled at approval time.
Root cause
By design Bob is non-interactive and "never blocks on prompts" (prompts/bmad/scrum-master.md). Unresolved items are routed to an open_questions array (scripts/initiative-planner/plan.schema.json) — but that array is treated as advisory output only:
apply-plan.shmaterializes the epic + stories regardless of whetheropen_questionsis empty, then appends the questions as an "Open questions for review" comment on the discussion (scripts/initiative-planner/apply-plan.sh:122).- Nothing inspects
open_questionsto decide whether to materialize at all.
So "I have open questions" and "here is a finished, ready-for-dev plan" are emitted simultaneously, which is contradictory and generates throwaway issues.
Desired behavior
Bob must not materialize a plan while he has blocking open questions. Specifically:
- If the emitted plan's
open_questionsis non-empty (or, better, contains any item flagged required/blocking),apply-plan.shshould not create the epic or stories. - Instead it should post the open questions back to the source discussion (the same comment it posts today, minus the "epic created" framing) and exit cleanly — making clear the idea is not yet plannable and planning will resume once the questions are answered.
- Re-running after the questions are answered then produces the real epic/DAG. (Today's manual flow — close everything, answer, re-dispatch — becomes: answer, re-dispatch.)
DRY_RUNsemantics unchanged.
Open design questions for this fix
- Blocking vs. non-blocking questions. Not every
open_questionsitem should halt planning (some are "nice to confirm"). Options: (a) treat any open question as blocking; (b) add a per-question severity/blockingflag to the schema and only halt on blocking ones. (b) is more precise but a schema change. - Where to enforce — in
apply-plan.sh(a hard gate, consistent with how it already enforces the no-initiative:autorule), in the prompt (ask Bob to self-abort), or both. A script-level gate is the only one that can't be reasoned around by the model. - Signal back to the human — discussion comment only, or also a workflow annotation / non-zero-but-not-failing exit so the run is visibly "needs answers" rather than "succeeded."
Acceptance criteria
- A plan with blocking open questions creates zero issues (verified in dry-run and live).
- The open questions are posted back to the source discussion with clear "not yet planned — answer these to proceed" framing.
- A plan with no blocking open questions materializes exactly as today.
- The gate is covered by
tests/test_initiative_planner.bats(the existing test home), mirroring how theinitiative:autoinvariant is tested. - AGENTS.md /
scripts/initiative-planner/README.mddocument the new gate.
References
.github/workflows/initiative-planner.ymlscripts/initiative-planner/apply-plan.sh(esp. theopen_questionsrendering at L122)scripts/initiative-planner/plan.schema.json(open_questions)prompts/bmad/scrum-master.md(non-interactive adaptation; "Unresolved items go inopen_questions, not guesses")tests/test_initiative_planner.bats- Incidents: MCP-Powered CI Review Enhancement — Standard #650→Initiative: MCP-powered CI review enrichment (optional, graceful-degrading) #659, Initiative: adopt tag-based release pinning for ALL reusable workflows (extend the dev-lead/pr-review standard org-wide) #666→Initiative: tag-based release pinning for all first-party reusable workflows #667 (both closed as not-planned)
Activity
don-petry commentedon Jun 14, 2026
Scope addition — trigger Bob on discussion comments
The gate above only closes half the loop (Bob stops when he has open questions). The other half is resuming automatically once the questions are answered. So this revision should also make the planner re-plan when a new comment is posted on an approved Ideas discussion.
Target flow:
Implementation notes / caveats (must be handled)
on: discussion_comment: types: [created]in.github/workflows/initiative-planner.yml.claude-code-actionaborts ondiscussion/discussion_commentevent contexts ("Unsupported event type") — that's exactly why the currentidea:approvedpath runs throughredispatch.sh→workflow_dispatch. The comment trigger must go through the same bridge (resolve the discussion number fromgithub.event.discussion.number, re-dispatch underworkflow_dispatch). RequiresGH_PAT_WORKFLOWS(aGITHUB_TOKEN-fired dispatch never starts a run).apply-plan.sh). A naive comment trigger would make him re-plan in response to his own comment → infinite loop. Must ignore comments authored by the bot /github-actions[bot](and ideally only the<!-- initiative-planner -->marker comments).Ideasand carriesidea:approved(don't plan every comment on every random discussion). Consider also limiting to maintainer authors.concurrencygroup is keyed on discussion number and already prevents overlapping plans for the same discussion — good, but confirm a flurry of comments coalesces rather than queueing N plans.tests/test_initiative_planner_redispatch.batsto cover the comment-event → redispatch path and the bot-author / unapproved-discussion skip cases.This is part of the same revision as the gate — they're two halves of one "answer-in-a-comment → auto re-plan" workflow and should land together.
Generated by Claude Code
don-petry commentedon Jun 14, 2026
Dev-Lead Implementation Plan
Issue: #682 — initiative-planner: Bob materializes a plan even when he has unresolved open questions — should gate, not guess
Scope
Add a script-level hard gate in
apply-plan.shso that when a plan contains any blocking open question, Bob creates zero issues, posts the questions back to the source discussion with "not yet planned" framing, and exits cleanly.Design decisions
blockingflag to the schema. Plain-stringopen_questionsremain non-blocking (backward compatible — the existing test fixture and live plans keep materializing). Only items shaped{"question": "...", "blocking": true}halt planning. This preserves current behavior and avoids treating every advisory question as a stop.apply-plan.sh(the only gate the model can't reason around), mirroring the existinginitiative:autoinvariant. The Bob prompt is also updated to make the flag intentional.GITHUB_STEP_SUMMARY+ a::warning::annotation, with a cleanexit 0(DRY_RUN semantics unchanged).Implementation Checklist
scripts/initiative-planner/plan.schema.json— allowopen_questionsitems to be a string OR{question, blocking}objectscripts/initiative-planner/apply-plan.sh— add blocking-gate before epic creation; normalize open_questions rendering in the existing summary pathscripts/initiative-planner/README.md— document the new gate (Invariants)AGENTS.md— brief note on the gateprompts/bmad/scrum-master.md— note theblockingflag semanticsTests to Write (tests/test_initiative_planner.bats)
blockingflagTest Command
bats tests/test_initiative_planner.batsandbash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Jun 14, 2026
Dev-Lead: Implementation Complete
Plan Execution
blockingflag toplan.schema.jsonopen_questions(issue option b) — plain strings stay advisory/non-blocking, objects{"question":"...","blocking":true}are plan-blocking. Chosen over "treat any question as blocking" so the existing fixture/live plans keep materializing and only true blockers halt.apply-plan.sh(before epic creation, mirroring theinitiative:autoinvariant): if any blocking question is present it creates zero issues, posts the questions back to the source discussion with "Not yet planned" framing, emits a::warning::+ step summary, and exits0.DRY_RUNsemantics unchanged.open_questionsrendering in the summary path to normalize string|object forms.README.md,AGENTS.md, andprompts/bmad/scrum-master.md.initiative:autotest.Test Results
Files Changed
scripts/initiative-planner/plan.schema.json:open_questionsitems now accept a string OR{question, blocking}object.scripts/initiative-planner/apply-plan.sh: blocking open-questions gate (zero issues + discussion comment + warning/step-summary + clean exit); normalized open_questions rendering in the existing summary.scripts/initiative-planner/README.md,AGENTS.md,prompts/bmad/scrum-master.md: document the gate + flag semantics.tests/test_initiative_planner.bats: 4 new tests (schema accepts blocking flag; gate creates zero issues & exits 0; gate posts questions to discussion; non-blocking does not gate).Acceptance Criteria
tests/test_initiative_planner.bats, mirroring theinitiative:autoinvariant.AGENTS.md/README.mddocument the gate.Notes
open_questions(incl. the existing test fixture) are unaffected — onlyblocking:trueobjects gate.0(clean) rather than non-zero so the workflow step doesn't fail; visibility comes from the::warning::annotation + step summary.don-petry commentedon Jun 14, 2026
✅ Design decision — resolves the "blocking vs. non-blocking questions" open item
Adopt approach (b): classify every open question as
requiredoroptional, and gate only onrequired. This supersedes the corresponding "Open design question" and acceptance-criteria bullets above.Schema (
scripts/initiative-planner/plan.schema.json)Replace the flat
open_questions: string[]with objects carrying a severity:A single array with a
requiredboolean is preferred over two arrays (less churn, easier to render). For back-compat, a bare string item should be treated as optional.validate-plan.pymust accept the new shape.Gate (
scripts/initiative-planner/apply-plan.sh)requiredquestion → create ZERO issues. Post the required questions back to the source discussion as a clear "⛔ Not yet plannable — answer these to proceed" comment, and exit cleanly (non-failing). This is the hard gate.optionalquestions through unchanged as the "Open questions for review" checklist on the inert epic / discussion — they are advisory and get confirmed by the human beforeinitiative:auto.Classification guidance (
prompts/bmad/scrum-master.md)Bob must tag each open question:
required— he cannot ground a correct plan without the answer: unresolved scope, a decision that changes the story set or the DAG, or an ambiguous deliverable.optional— scope-boundary notes, "confirm X is tracked under epic #N", assumed-sane defaults, cross-repo follow-ups: things that belong in the activation review, not the build.Why this split (concrete evidence)
Today's #666 re-plan converged on 5 open questions that were all optional (out-of-repo scope, "confirm parent epic #495", assumed admin release path). A blanket "any open question blocks" gate would have deadlocked a perfectly buildable plan. Required/optional is precisely what makes the gate usable instead of a permanent stall.
Acceptance criteria (supersede the matching bullets above)
requiredquestion creates zero issues (verified dry-run and live), and posts the required questions to the discussion.optionalquestions materializes as today, with the optional questions surfaced as the review checklist.validate-plan.pyaccept the new object shape and back-compat bare strings (as optional).tests/test_initiative_planner.batscovers both paths (required-blocks-zero-issues, optional-does-not-block).scripts/initiative-planner/README.mddocument the required/optional gate.Generated by Claude Code
feat: implement issue #682 — initiative-planner blocking open-questio…
feat: implement issue #682 — initiative-planner blocking open-questio…
feat: implement issue #682 — initiative-planner blocking open-questio…
feat: implement issue #682 — initiative-planner blocking open-questio…
feat: implement issue #682 — initiative-planner blocking open-questio…