Skip to content

[Phase 3] Plan/apply split: apply consumes the dry-run's authoritative plan.json #604

Description

@github-actions

Story

As a maintainer who reviewed a dry-run plan,
I want the apply run to load the exact plan.json the dry-run produced (optionally human-edited) instead of re-planning from scratch,
so that the preview binds the result — what a maintainer reviewed is what materializes.

Acceptance Criteria

  1. The dry-run produces an authoritative plan.json artifact (already uploaded today) that the apply run can be pointed at, and apply-plan.sh applies it without a re-plan (apply-plan.sh already reads PLAN_PATH).
  2. A documented mechanism lets a maintainer supply the reviewed plan.json to the apply run (workflow input / artifact handoff — chosen and documented; see open_questions).
  3. When a plan.json is supplied, the LLM planning step is skipped (no re-plan); validate-plan.py and apply-plan.sh still run on the supplied artifact.
  4. Backward path preserved: with no supplied plan, behavior is unchanged (Bob plans, then applies).
  5. scripts/initiative-planner/README.md and docs/initiatives/idea-to-initiative-pipeline.md describe the plan -> review -> apply split and where the human review point sits.

Tasks / Subtasks

Dev Notes

  • apply-plan.sh already consumes PLAN_PATH (apply-plan.sh:30-35) — the missing piece is letting the apply run LOAD a prior artifact instead of regenerating it. The dry-run already uploads plan.json at .github/workflows/initiative-planner.yml:178-186.
  • This is discussion 💡 Adversarial Plan-Critic + Structural Gates for the Initiative-Planner (Bob) #593's explicit follow-on ("once the critic is trusted") — hence blocked by the critic story (id 6).
  • Decide the handoff: a workflow_dispatch input pointing at a prior run/artifact to download vs a committed plan file. Artifact retention + cross-run download is the likely path — see open_questions.
  • Keep the inert-epic discipline: even a human-reviewed plan still materializes WITHOUT initiative:auto (apply-plan.sh enforces this).
  • Update both docs so the pipeline diagram in docs/initiatives/idea-to-initiative-pipeline.md reflects the new review point.

Project Structure Notes

Primarily a workflow + docs change; apply-plan.sh already supports loading an arbitrary PLAN_PATH. Sequenced last because it only pays off once the critic-improved plan is worth pinning.

References

  • .github/workflows/initiative-planner.yml#L178-L186
  • scripts/initiative-planner/apply-plan.sh#L30-L35
  • scripts/initiative-planner/README.md
  • docs/initiatives/idea-to-initiative-pipeline.md

Likely target surface

  • .github/workflows/initiative-planner.yml
  • scripts/initiative-planner/README.md
  • docs/initiatives/idea-to-initiative-pipeline.md

Story prepared by the BMAD Scrum Master (Bob) for epic #597. Status: ready-for-dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev-leadFor dev-lead agent pickupinitiativeEpic / initiative tracking issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions