174 lines
5.4 KiB
YAML
174 lines
5.4 KiB
YAML
name: comparative-plan
|
|
version: 1
|
|
description: "3-way comparative planning: two models plan independently, cross-review, then synthesize"
|
|
|
|
params:
|
|
required:
|
|
task_description:
|
|
type: string
|
|
description: "What to plan — the task or feature to design"
|
|
project_id:
|
|
type: string
|
|
description: "Target project identifier"
|
|
optional:
|
|
model_a:
|
|
type: string
|
|
default: null
|
|
description: "Override model A endpoint (auto-selected from registry if omitted)"
|
|
model_b:
|
|
type: string
|
|
default: null
|
|
description: "Override model B endpoint (auto-selected from registry if omitted)"
|
|
best_practices:
|
|
type: list
|
|
default:
|
|
- api-design
|
|
- spec-driven-development
|
|
- test-driven-development
|
|
- security-architecture
|
|
description: "Best practice topics to review against"
|
|
repo:
|
|
type: string
|
|
default: null
|
|
description: "Git repo URL to clone for context (optional)"
|
|
|
|
nodes:
|
|
plan_a:
|
|
name: "Plan A"
|
|
prompt: |
|
|
Create a detailed implementation plan for the following task:
|
|
|
|
{{ task_description }}
|
|
|
|
## Instructions
|
|
- Follow spec-driven development methodology
|
|
- Structure your plan with: Overview, Phases, Files to create/modify, Test strategy, Dependencies
|
|
- Be specific about data models, API contracts, and interfaces
|
|
- Consider security, error handling, and edge cases
|
|
- Write your final plan to /workspace/project/output.md
|
|
harness: planning/v1
|
|
requirements:
|
|
min_scores:
|
|
complexity: 7
|
|
spec_adherence: 8
|
|
|
|
plan_b:
|
|
name: "Plan B"
|
|
prompt: |
|
|
Create a detailed implementation plan for the following task:
|
|
|
|
{{ task_description }}
|
|
|
|
## Instructions
|
|
- Follow spec-driven development methodology
|
|
- Structure your plan with: Overview, Phases, Files to create/modify, Test strategy, Dependencies
|
|
- Be specific about data models, API contracts, and interfaces
|
|
- Consider security, error handling, and edge cases
|
|
- Write your final plan to /workspace/project/output.md
|
|
harness: planning/v1
|
|
requirements:
|
|
min_scores:
|
|
complexity: 7
|
|
spec_adherence: 8
|
|
|
|
review_a_of_b:
|
|
name: "Review: A reviews B's plan"
|
|
depends_on: [plan_a, plan_b]
|
|
prompt: |
|
|
You are reviewing an implementation plan against best practices.
|
|
|
|
## Best Practices to Check Against
|
|
Read and apply these best practice topics: {{ best_practices | join(', ') }}
|
|
|
|
## Plan to Review
|
|
The following plan was produced by another model. Review it critically.
|
|
|
|
<<ARTIFACT:plan_b:output>>
|
|
|
|
## Instructions
|
|
1. Read each relevant best practice file from /best-practices/
|
|
2. Check the plan against each practice
|
|
3. List specific, numbered improvement points
|
|
4. For each point, cite which best practice it violates or could better follow
|
|
5. Be concrete — say what should change, not just that something is wrong
|
|
|
|
Write your review to /workspace/project/output.md
|
|
harness: planning/v1
|
|
requirements:
|
|
min_scores:
|
|
spec_adherence: 8
|
|
|
|
review_b_of_a:
|
|
name: "Review: B reviews A's plan"
|
|
depends_on: [plan_a, plan_b]
|
|
prompt: |
|
|
You are reviewing an implementation plan against best practices.
|
|
|
|
## Best Practices to Check Against
|
|
Read and apply these best practice topics: {{ best_practices | join(', ') }}
|
|
|
|
## Plan to Review
|
|
The following plan was produced by another model. Review it critically.
|
|
|
|
<<ARTIFACT:plan_a:output>>
|
|
|
|
## Instructions
|
|
1. Read each relevant best practice file from /best-practices/
|
|
2. Check the plan against each practice
|
|
3. List specific, numbered improvement points
|
|
4. For each point, cite which best practice it violates or could better follow
|
|
5. Be concrete — say what should change, not just that something is wrong
|
|
|
|
Write your review to /workspace/project/output.md
|
|
harness: planning/v1
|
|
requirements:
|
|
min_scores:
|
|
spec_adherence: 8
|
|
|
|
synthesize:
|
|
name: "Synthesize final plan"
|
|
depends_on: [review_a_of_b, review_b_of_a]
|
|
prompt: |
|
|
You are synthesizing a final implementation plan from two competing plans and their cross-reviews.
|
|
|
|
## Original Task
|
|
{{ task_description }}
|
|
|
|
## Plan A
|
|
<<ARTIFACT:plan_a:output>>
|
|
|
|
## Plan B
|
|
<<ARTIFACT:plan_b:output>>
|
|
|
|
## Review of Plan B (by the model that wrote Plan A)
|
|
<<ARTIFACT:review_a_of_b:output>>
|
|
|
|
## Review of Plan A (by the model that wrote Plan B)
|
|
<<ARTIFACT:review_b_of_a:output>>
|
|
|
|
## Instructions
|
|
1. Identify the strongest elements from each plan
|
|
2. Address all improvement points raised in both reviews
|
|
3. Synthesize a single, improved plan that combines the best of both
|
|
4. Structure: Overview, Phases, Files, Test strategy, Dependencies
|
|
5. Flag any unresolved disagreements between the reviews
|
|
|
|
Write the final synthesized plan to /workspace/project/output.md
|
|
harness: planning/v1
|
|
requirements:
|
|
min_scores:
|
|
complexity: 8
|
|
spec_adherence: 9
|
|
creativity: 7
|
|
|
|
scoring:
|
|
type: comparative_review
|
|
reviews:
|
|
- review_node: review_a_of_b
|
|
scored_model_node: plan_b
|
|
dimension: spec_adherence
|
|
- review_node: review_b_of_a
|
|
scored_model_node: plan_a
|
|
dimension: spec_adherence
|
|
method: fewer_improvement_points_wins
|