Skip to content

feat(council): add review-plan skill for external plan review before execution #120

@rube-de

Description

@rube-de

Context

There is no standalone skill for reviewing implementation plans using external AI consultants before execution begins. The superpowers pipeline (brainstormingwriting-plansexecuting-plans) transitions directly from plan writing to execution with no external validation step. Plans may contain stale file paths, flawed assumptions, YAGNI violations, or missed edge cases that fresh-context consultants would catch.

Issue #114 adds opt-in council review to the CDT auto-task workflow specifically. This skill provides the same capability as a standalone, reusable skill that any workflow can invoke — superpowers pipeline, CDT auto-task, manual invocation, or custom workflows.

Task

Create a new council:review-plan skill that:

  1. Locates the plan file (argument, docs/plans/ discovery, or conversation context)
  2. Verifies plan assumptions against the codebase (file existence, line numbers, API signatures, duplication)
  3. Launches gemini-consultant and codex-consultant agents in parallel with a hole-poking prompt
  4. Deduplicates and synthesizes findings
  5. Presents a structured verdict: Ready / Needs Revision / Needs Discussion

Acceptance Criteria

  • VERIFY: Skill file exists at plugins/council/skills/review-plan/SKILL.md
  • VERIFY: Skill frontmatter includes name: review-plan and a description that triggers after plan writing
  • VERIFY: Skill auto-discovers plan files from docs/plans/ when no argument is provided (most recently modified .md)
  • VERIFY: Skill accepts an explicit plan file path as argument
  • VERIFY: Codebase verification step checks: files exist, line numbers match, APIs valid, no duplicate implementations, tests don't already exist
  • VERIFY: Skill launches gemini-consultant and codex-consultant in parallel using the Agent tool
  • VERIFY: Consultant prompt explicitly frames the task as "find problems, not validate"
  • VERIFY: Consultant prompt includes the plan content AND codebase verification results
  • VERIFY: Consultants rate findings by severity: Critical (blocks execution) / Warning (should address) / Note (nice to know)
  • VERIFY: Findings are deduplicated — if both consultants flag the same issue, it's merged with higher confidence
  • VERIFY: Consultant disagreements are presented separately
  • VERIFY: Output uses structured format: Codebase Verification → Critical → Warnings → Notes → Disagreements → Verdict
  • VERIFY: Verdict is one of: Ready to execute / Needs revision / Needs discussion
  • VERIFY: "Ready" verdict offers execution handoff (subagent-driven or parallel session)
  • VERIFY: "Needs revision" lists specific changes and asks user whether to revise or proceed with known risks
  • VERIFY: bun scripts/validate-plugins.mjs passes

Implementation Guide

Files to Create

  • plugins/council/skills/review-plan/SKILL.md — The skill definition

Approach

  1. Create plugins/council/skills/review-plan/ directory
  2. Create SKILL.md with frontmatter:
    name: review-plan
    description: >-
      Review implementation plans using external AI consultants before execution begins.
      Use automatically after writing plans (superpowers:writing-plans) or when the user says
      "review plan", "check my plan", "sanity check the plan", "review the plan before executing".
      Verifies plan assumptions against codebase, launches consultants to find flaws,
      and presents a verdict.
    allowed-tools: [Bash, Read, Grep, Glob, Agent, AskUserQuestion]
    user-invocable: true
  3. Skill body follows this workflow:
    • Step 1: Locate plan — Check argument, then ls -t docs/plans/*.md | head -1, then conversation context
    • Step 2: Codebase verification — Glob/Grep/Read to validate all paths, line numbers, and API references in the plan
    • Step 3: Launch consultants — Agent tool with gemini-consultant and codex-consultant in parallel, same prompt to both
    • Step 4: Synthesize — Deduplicate, surface disagreements, merge confidence
    • Step 5: Present — Structured output with verdict
    • Step 6: Decision — Route to execution or revision

Patterns to Follow

  • Council skill (plugins/council/skills/council/SKILL.md) for consultant dispatch pattern and rate limit handling
  • Council reference (plugins/council/skills/council-reference/SKILL.md) for structured response format
  • The consultant agents (plugins/council/agents/gemini-consultant.md, codex-consultant.md) for invocation pattern

Consultant Prompt Template

You are reviewing an implementation plan before execution begins.
Your job is to find problems, not validate.

**The plan:**
[full plan content]

**Codebase verification findings:**
[results from Step 2]

Review critically:
1. Flawed assumptions — What does the plan assume that might be wrong?
2. Missing edge cases — What failure modes or inputs aren't handled?
3. Simpler alternatives — Is there a significantly simpler approach to any task?
4. Dependency risks — What could break between tasks? What ordering issues exist?
5. Security/performance — Any red flags the plan doesn't address?
6. Scope creep — Is the plan doing more than necessary? YAGNI violations?

For each finding, rate severity: Critical / Warning / Note.

Scope

In Scope

  • New council:review-plan skill
  • Codebase verification against plan contents
  • Parallel consultant dispatch (gemini + codex)
  • Finding deduplication and synthesis
  • Structured verdict output

Out of Scope

Dependencies

Complexity Hint

  • Subsystems touched: council plugin (1 new skill file)
  • Structural changes: New skill directory, no modifications to existing files
  • Estimated scope: Small — single SKILL.md file following established council patterns

Definition of Done

  • Implementation complete
  • bun scripts/validate-plugins.mjs passes
  • PR approved and merged

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions