Skip to content

[Phase 2] Register plan_json artifact type (plan rubric + structured-findings channel) #614

Description

@github-actions

Story

As a initiative-planner (Bob) and Epic #597's plan critic,
I want a plan_json artifact type registered with the fixed plan rubric and a structured-findings output channel,
so that an initiative plan.json can be reviewed by the same review brain before it is materialized.

Acceptance Criteria

  1. A plan_json entry is added to the rubric registry mapping to a plan rubric (the fixed critic checklist) and a structured-findings output channel (machine-readable findings, not GitHub PR comments).
  2. The content_ref adapter accepts a plan.json path and presents it to the rubric, reusing scripts/engine.sh model routing.
  3. The output channel emits structured findings the planner can consume before apply-plan.sh materializes the epic/DAG.
  4. pr_diff behavior is untouched (the Story 3 guard stays green); plan_json is purely additive.
  5. bats coverage exercises plan_json resolution and a sample plan producing findings; the new test is registered in the lint.yml bats list.

Tasks / Subtasks

Dev Notes

  • The plan rubric is Epic Initiative: Adversarial plan-critic + structural gates for the initiative-planner (Bob) #597's 'fixed critic rubric.' Structural invariants already exist in scripts/initiative-planner/validate-plan.py (unique ids, no dangling/self edges, acyclic, entry point) and plan.schema.json — the rubric should layer adversarial/semantic critique (grounding, reference resolution, AC testability) on top, not re-implement the validator.
  • Output channel differs fundamentally from pr_diff: plans are consumed by the planner (apply-plan.sh runs after validate-plan.py), so emit machine-readable findings JSON, NOT a GitHub review. Do not invoke post-pr-review.sh for plan_json.
  • This satisfies/re-scopes [Phase 2] Adversarial plan-critic pass against the fixed rubric #603 ('Adversarial plan-critic pass against the fixed rubric') to 'invoke the review agent with the plan rubric' rather than forking a bespoke critic — coordinate so [Phase 2] Adversarial plan-critic pass against the fixed rubric #603 consumes this capability, not a parallel implementation.
  • Reuse scripts/engine.sh model routing (run_agentic / deep tier); do not introduce a separate model selector.

Project Structure Notes

New rubric prompt under prompts/ (e.g. prompts/plan-review.md); registry entry + adapter in scripts/lib/; consumer wiring near scripts/initiative-planner/. Keep the structured-findings channel separate from post-pr-review.sh.

References

  • scripts/initiative-planner/plan.schema.json
  • scripts/initiative-planner/validate-plan.py
  • scripts/initiative-planner/apply-plan.sh
  • scripts/engine.sh#run_agentic
  • prompts/deep-review.md
  • tests/test_initiative_planner.bats

Likely target surface

  • prompts/plan-review.md
  • scripts/lib/review-registry.sh
  • scripts/initiative-planner/
  • tests/

Story prepared by the BMAD Scrum Master (Bob) for epic #610. 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