AgentSkillsCN

plan-review

依据 DDD/OOP 原则对计划进行架构审查。采用多模型评估(Opus + Sonnet)来衡量设计质量。在计划 lint 通过后运行。

SKILL.md
--- frontmatter
name: plan-review
description: Architectural review of plans against DDD/OOP principles. Uses multi-model evaluation (Opus + Sonnet) to assess design quality. Run after plan-lint passes.

Plan Review

Overview

Reviews implementation plans for architectural quality — evaluates design decisions against DDD and OOP principles using multi-model review.

Announce at start: "Using ddd-workflow:plan-review for architectural evaluation."

When to Use

Use this skill when you have an implementation plan that needs review before coding begins. The skill will:

  • Dispatch reviews to Opus and Sonnet sub-agents in parallel
  • Synthesize feedback highlighting consensus issues (flagged by both models)

Criteria References

This review applies criteria from:

  • criteria/ddd-checklist.md — Domain modeling, bounded contexts, tactical patterns
  • criteria/oop-checklist.md — SRP, composition, patterns, dependency injection

Execution Process

Step 1: Prepare the Review Prompt

  1. Identify the plan content to review (file path or inline content)
  2. Read the prompt template from prompts/plan_review.txt
  3. Build the full prompt by replacing {plan_content} and {context} placeholders

Step 2: Dispatch Sub-agents in Parallel

CRITICAL: Dispatch BOTH sub-agents in a SINGLE message with TWO Task tool calls.

Opus sub-agent:

code
Tool: Task
subagent_type: "general-purpose"
model: "opus"
prompt: |
  You are reviewing an implementation plan for architectural quality.

  <review-prompt>
  [INSERT FULL PROMPT WITH PLAN CONTENT HERE]
  </review-prompt>

  Provide your complete review following the Required Output Format in the prompt.
  Return your review directly - do not write to any files.

Sonnet sub-agent:

code
Tool: Task
subagent_type: "general-purpose"
model: "sonnet"
prompt: |
  You are reviewing an implementation plan for architectural quality.

  <review-prompt>
  [INSERT FULL PROMPT WITH PLAN CONTENT HERE]
  </review-prompt>

  Provide your complete review following the Required Output Format in the prompt.
  Return your review directly - do not write to any files.

Step 3: Synthesize Findings

After both sub-agents return, synthesize their reviews:

  1. Identify consensus issues - Problems flagged by BOTH models (highest priority)
  2. Identify unique insights - Valid points raised by only one model
  3. Remove duplicates - Consolidate overlapping feedback
  4. Categorize - Group into Critical Issues, Suggestions, Nitpicks

Step 4: Present Synthesis to User

Output format:

markdown
## Plan Review Synthesis

**Models consulted:** Claude Opus, Claude Sonnet

### Critical Issues
For each issue, note: [BOTH AGREE] or [ONE MODEL]
- Issue description
- Location in plan
- Recommendation

### Suggestions
- Suggestion with consensus level

### Nitpicks
- Minor issues

### Consensus Summary
- X issues flagged by both models
- Y unique insights from individual models

### Overall Assessment
2-3 sentences on architectural strengths and primary risks.

Evaluation Criteria

The review evaluates plans against these criteria (detailed in prompts/plan_review.txt):

1. Object Oriented Design

  • Are design patterns used correctly and only where justified?
  • Is abstraction meaningful or just layering for its own sake?
  • Are encapsulation and dependency direction correct?
  • Are SOLID principles followed in practice, not just in theory?

2. Single Responsibility Principle

  • Does each class or module do exactly one job?
  • Are responsibilities explicit and non overlapping?
  • Are there any god objects, managers, or classes with mixed concerns?

3. Domain Driven Design

  • Are bounded contexts explicitly defined and enforced?
  • Are entities, value objects, aggregates, and domain services correctly modeled?
  • Is the ubiquitous language consistent across layers?
  • Is infrastructure cleanly separated from domain logic?

4. Maintainability and Debuggability

  • Is execution flow easy to trace during runtime?
  • Are side effects controlled and visible?
  • Is error handling intentional and consistent?
  • Will failures be easy to locate and diagnose?

5. Extensibility

  • Is the system open for extension and closed for modification?
  • Are extension points explicit and intentional?
  • Is there unnecessary abstraction or speculative generality?

Output on Success

markdown
## Plan Review: PASSED ✓

**Models consulted:** Claude Opus, Claude Sonnet

### Critical Issues
None

### Suggestions
- [Minor suggestions if any]

### Overall Assessment
The plan demonstrates sound architectural principles with clear separation
of concerns and appropriate pattern usage. Ready for implementation.

Modifying This Skill

  • Change review prompt: Edit prompts/plan_review.txt
  • Change criteria: Edit criteria/ddd-checklist.md or criteria/oop-checklist.md