Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Description
Story
As a maintainer reviewing a freshly planned initiative,
I want open-questions to carry the stories they affect, and have apply-plan withhold ready-for-dev from those stories while flagging the epic,
so that contested decisions block release to dev-lead until a maintainer resolves them, instead of flowing through baked into acceptance criteria.
Acceptance Criteria
- plan.schema.json changes
open_questionsitems from bare strings to objects with a requiredquestionstring and anaffected_story_idsarray of local story ids. - validate-plan.py rejects an open_question whose
affected_story_idsreferences a story id not present in the plan (mirroring the existing dangling-edge check), and the bats fixture is updated to the new object shape so existing tests pass. - apply-plan.sh labels each affected story
planning:needs-inputand does NOT stamp itready-for-dev(the per-story status line at apply-plan.sh:80 becomes conditional); stories not referenced by any open-question are unchanged. - apply-plan.sh labels the epic with a gate label (e.g.
initiative:needs-input) so a maintainer sees resolution is required beforeinitiative:auto, and the discussion summary lists each open question with its affected story numbers. - New bats cases prove: an affected story carries
planning:needs-inputand omitsready-for-dev; an unaffected story is unchanged; the epic carries the gate label.
Tasks / Subtasks
- Change the open_questions schema in plan.schema.json to an array of
{question, affected_story_ids}objects. (AC: test issue from agent #1) - Extend validate-plan.py to validate affected_story_ids against the story id set, reusing the existing id-existence pattern. (AC: Go-live improvements for PR review agent #2)
- Make the story status/label logic in apply-plan.sh conditional on whether the story is referenced by an open-question; add the
planning:needs-inputstory label and theinitiative:needs-inputepic label. (AC: Add @claude delegation, auto-merge, and rebase handling #3, Optimize review: small-PR and incremental fast paths #4) - Render each open question with its affected story numbers in the discussion summary. (AC: Optimize review: small-PR and incremental fast paths #4)
- Update the bats fixture to the object shape and add the gate-label cases. (AC: Go-live improvements for PR review agent #2, feat: add Copilot engine support via REVIEW_ENGINE toggle #5)
Dev Notes
- Today open_questions is
string[](plan.schema.json) rendered as a flat list in the discussion comment at apply-plan.sh:122; the bats fixture at tests/test_initiative_planner.bats:35 uses the string form — update it to the object form or downstream tests break. - Story status is a hard-coded line
Status: ready-for-devappended at apply-plan.sh:80, and a test asserts it at tests/test_initiative_planner.bats:130 — make it conditional and update that assertion. - Reuse the id-existence loop in validate-plan.py:62-70 (the blocked_by dangling-edge check) for affected_story_ids.
- The labels
planning:needs-inputandinitiative:needs-inputlikely do NOT exist in the repo yet — see open_questions. create_issue posts torepos/{repo}/issueswith a labels array (lib/mutations.sh:62-67); the labels must exist in the repo label set first. - hands_off stories already withhold auto-release via
initiative:hold(apply-plan.sh:82-85); this is the ANALOGOUS gate for unresolved questions — keep the two mechanisms distinct.
Project Structure Notes
Touches the schema/validator/apply trio together; this is the schema-shape change so the fixture in tests must move in lockstep. New labels are repo configuration, not code.
References
- scripts/initiative-planner/plan.schema.json
- scripts/initiative-planner/validate-plan.py#L62-L70
- scripts/initiative-planner/apply-plan.sh#L80-L125
- tests/test_initiative_planner.bats#L35-L130
Likely target surface
scripts/initiative-planner/plan.schema.jsonscripts/initiative-planner/validate-plan.pyscripts/initiative-planner/apply-plan.shtests/test_initiative_planner.bats
Story prepared by the BMAD Scrum Master (Bob) for epic #597. Status: ready-for-dev.
Metadata
Metadata
Assignees
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Activity
don-petry commentedon Jun 14, 2026
Dev-Lead Implementation Plan
Issue: #600 — [Phase 1] Open-questions-as-gate: withhold ready-for-dev on affected stories
Scope
Add
affected_story_idstoopen_questionsso apply-plan withholdsready-for-devand stampsplanning:needs-inputon contested stories, flags the epic withinitiative:needs-input, and lists each question's affected story numbers in the discussion summary.Reconciliation note
Since this story was written, #682 evolved
open_questionsintooneOf[string, {question, blocking}]. Rather than reverting to bare strings, I will keep that shape and ADD an optionalaffected_story_idsarray to the object branch — preserving the blocking gate and existing tests. The blocking gate (creates nothing) and this needs-input gate (withholds per-story release) stay distinct, analogous tohands_off/initiative:hold.Implementation Checklist
plan.schema.json: addaffected_story_ids(int array, default []) to the open_questions object branch + update descriptionvalidate-plan.py: rejectaffected_story_idsreferencing a story id absent from the plan (mirrors the dangling blocked_by check)apply-plan.sh: precompute affected story-id set; make the per-story status line + labels conditional (planning:needs-input, withholdready-for-dev); addinitiative:needs-inputto the epic when any story is affected; render each open question with its affected story numbers in the discussion summarytests/test_initiative_planner.bats: move base fixtureopen_questionsto object shapeTests to Write
affected_story_idsplanning:needs-inputand omitsready-for-devready-for-dev, no needs-input label)initiative:needs-inputgate labelTest Command
bats tests/test_initiative_planner.batsandpython3 scripts/initiative-planner/validate-plan.py <plan>Out-of-code follow-up
The repo label set must gain
planning:needs-inputandinitiative:needs-input(repo configuration, not code) for the live path to apply them.don-petry commentedon Jun 14, 2026
Dev-Lead: Implementation Complete
Plan Execution
plan.schema.json: added optionalaffected_story_ids(int array, default[]) to theopen_questionsobject branch + updated description (AC test issue from agent #1)validate-plan.py: rejects anaffected_story_idsentry that references a story id absent from the plan, mirroring the danglingblocked_bycheck (AC Go-live improvements for PR review agent #2)apply-plan.sh: precomputes the affected story-id set; the per-story status line + labels are now conditional (planning:needs-input,ready-for-devwithheld); the epic gainsinitiative:needs-inputwhen any story is affected; the discussion summary renders each open question with its affected story numbers (AC Add @claude delegation, auto-merge, and rebase handling #3, Optimize review: small-PR and incremental fast paths #4)tests/test_initiative_planner.bats: base fixtureopen_questionsmoved to object shape; new validator + apply-plan gate cases added (AC Go-live improvements for PR review agent #2, feat: add Copilot engine support via REVIEW_ENGINE toggle #5)Reconciliation note
The story was authored against a bare-
string[]open_questions, but #682 has since evolved it intooneOf[string, {question, blocking}]. Rather than reverting to bare strings (which would break the blocking gate and existing tests), I kept that shape and added the optionalaffected_story_idsto the object branch. The blocking gate (creates nothing) and this needs-input gate (materializes but withholds per-story release) remain distinct — the analogue ofhands_off/initiative:hold.Test Results
Required repo lint (
.dev-lead/scripts/dev-lead-lint.sh): all checks passed (shellcheck on 51 files + 4 agent profiles).Files Changed
scripts/initiative-planner/plan.schema.json:affected_story_idsadded to the open_questions object branchscripts/initiative-planner/validate-plan.py: dangling-affected_story_idssemantic check + docstring invariantscripts/initiative-planner/apply-plan.sh: needs-input gate — conditional story status/labels, epic gate label, summary renders affected story numberstests/test_initiative_planner.bats: fixture moved to object shape; 7 new cases (2 validator, 5 apply-plan)Notes
planning:needs-inputandinitiative:needs-inputfor the live (non-DRY_RUN) path to apply them — this is repo configuration, not code, and is out of scope for this change.create_issueposts alabelsarray torepos/{repo}/issues, which requires the labels to pre-exist.blocking:trueopen questions are unaffected;affected_story_idsis optional with a[]default, so existing plans validate unchanged.unique) before labelling.don-petry commentedon Jun 14, 2026
Superseded by #682 → shipped in #707 (merged to
main).#682/#707 implemented the open-questions gate as a hard, all-or-nothing block: if the plan carries any
blocking:trueopen question,apply-plan.shcreates zero issues and posts the questions back to the source discussion — rather than this issue's design of materializing the epic but withholdingready-for-devon the affected stories.Closing as a duplicate of #682.
Generated by Claude Code