- phase-runner: レポートを上書きせずタイムスタンプ付きで同ディレクトリに保存し、fix が過去指摘の傾向を追跡できるよう改善
- output-contracts: persists/reopened/family_tag フィールドを追加してレビュー指摘の継続性を明示
- pieces: 全ビルトインピースに reviewers↔fix の loop_monitors を追加し、発散ループを自動検知
- fix.md: 過去レポートの参照方法を「Glob で {レポート名}.* を検索、最大2件読む」と具体化
- loop-monitor-reviewers-fix.md: ループモニタ判定用の共通インストラクションを新規追加
331 lines
7.5 KiB
YAML
331 lines
7.5 KiB
YAML
name: dual
|
|
description: Frontend + backend development piece with architecture, frontend, security, and QA reviews with fix loops
|
|
piece_config:
|
|
provider_options:
|
|
codex:
|
|
network_access: true
|
|
opencode:
|
|
network_access: true
|
|
max_movements: 30
|
|
initial_movement: plan
|
|
loop_monitors:
|
|
- cycle:
|
|
- ai_review
|
|
- ai_fix
|
|
threshold: 3
|
|
judge:
|
|
persona: supervisor
|
|
instruction_template: loop-monitor-ai-fix
|
|
rules:
|
|
- condition: Healthy (making progress)
|
|
next: ai_review
|
|
- condition: Unproductive (same findings repeated or fixes not reflected)
|
|
next: ai_no_fix
|
|
- cycle:
|
|
- reviewers
|
|
- fix
|
|
threshold: 3
|
|
judge:
|
|
persona: supervisor
|
|
instruction_template: loop-monitor-reviewers-fix
|
|
rules:
|
|
- condition: converging (findings decreasing, fixes applied)
|
|
next: reviewers
|
|
- condition: unproductive (same findings repeating)
|
|
next: supervise
|
|
movements:
|
|
- name: plan
|
|
edit: false
|
|
persona: planner
|
|
knowledge:
|
|
- frontend
|
|
- backend
|
|
- architecture
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction: plan
|
|
rules:
|
|
- condition: Task analysis and planning is complete
|
|
next: implement
|
|
- condition: Requirements are unclear and planning cannot proceed
|
|
next: ABORT
|
|
output_contracts:
|
|
report:
|
|
- name: plan.md
|
|
format: plan
|
|
- name: implement
|
|
edit: true
|
|
persona: coder
|
|
policy:
|
|
- coding
|
|
- testing
|
|
session: refresh
|
|
knowledge:
|
|
- frontend
|
|
- backend
|
|
- security
|
|
- architecture
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Write
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction: implement
|
|
rules:
|
|
- condition: Implementation is complete
|
|
next: ai_review
|
|
- condition: No implementation (report only)
|
|
next: ai_review
|
|
- condition: Cannot proceed with implementation
|
|
next: ai_review
|
|
- condition: User input required
|
|
next: implement
|
|
requires_user_input: true
|
|
interactive_only: true
|
|
output_contracts:
|
|
report:
|
|
- name: coder-scope.md
|
|
format: coder-scope
|
|
- name: coder-decisions.md
|
|
format: coder-decisions
|
|
- name: ai_review
|
|
edit: false
|
|
persona: ai-antipattern-reviewer
|
|
policy:
|
|
- review
|
|
- ai-antipattern
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction: ai-review
|
|
rules:
|
|
- condition: No AI-specific issues found
|
|
next: reviewers
|
|
- condition: AI-specific issues detected
|
|
next: ai_fix
|
|
output_contracts:
|
|
report:
|
|
- name: ai-review.md
|
|
format: ai-review
|
|
- name: ai_fix
|
|
edit: true
|
|
persona: coder
|
|
policy:
|
|
- coding
|
|
- testing
|
|
session: refresh
|
|
knowledge:
|
|
- frontend
|
|
- backend
|
|
- security
|
|
- architecture
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Write
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction: ai-fix
|
|
pass_previous_response: false
|
|
rules:
|
|
- condition: AI Reviewer's issues have been fixed
|
|
next: ai_review
|
|
- condition: No fix needed (verified target files/spec)
|
|
next: ai_no_fix
|
|
- condition: Unable to proceed with fixes
|
|
next: ai_no_fix
|
|
- name: ai_no_fix
|
|
edit: false
|
|
persona: architecture-reviewer
|
|
policy: review
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
rules:
|
|
- condition: ai_review's findings are valid (fix required)
|
|
next: ai_fix
|
|
- condition: ai_fix's judgment is valid (no fix needed)
|
|
next: reviewers
|
|
instruction: arbitrate
|
|
- name: reviewers
|
|
parallel:
|
|
- name: arch-review
|
|
edit: false
|
|
persona: architecture-reviewer
|
|
policy: review
|
|
knowledge:
|
|
- architecture
|
|
- backend
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- WebSearch
|
|
- WebFetch
|
|
rules:
|
|
- condition: approved
|
|
- condition: needs_fix
|
|
instruction: review-arch
|
|
output_contracts:
|
|
report:
|
|
- name: architect-review.md
|
|
format: architecture-review
|
|
- name: frontend-review
|
|
edit: false
|
|
persona: frontend-reviewer
|
|
policy: review
|
|
knowledge: frontend
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- WebSearch
|
|
- WebFetch
|
|
rules:
|
|
- condition: approved
|
|
- condition: needs_fix
|
|
instruction: review-frontend
|
|
output_contracts:
|
|
report:
|
|
- name: frontend-review.md
|
|
format: frontend-review
|
|
- name: security-review
|
|
edit: false
|
|
persona: security-reviewer
|
|
policy: review
|
|
knowledge: security
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- WebSearch
|
|
- WebFetch
|
|
rules:
|
|
- condition: approved
|
|
- condition: needs_fix
|
|
instruction: review-security
|
|
output_contracts:
|
|
report:
|
|
- name: security-review.md
|
|
format: security-review
|
|
- name: qa-review
|
|
edit: false
|
|
persona: qa-reviewer
|
|
policy:
|
|
- review
|
|
- qa
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- WebSearch
|
|
- WebFetch
|
|
rules:
|
|
- condition: approved
|
|
- condition: needs_fix
|
|
instruction: review-qa
|
|
output_contracts:
|
|
report:
|
|
- name: qa-review.md
|
|
format: qa-review
|
|
rules:
|
|
- condition: all("approved")
|
|
next: supervise
|
|
- condition: any("needs_fix")
|
|
next: fix
|
|
- name: fix
|
|
edit: true
|
|
persona: coder
|
|
policy:
|
|
- coding
|
|
- testing
|
|
knowledge:
|
|
- frontend
|
|
- backend
|
|
- security
|
|
- architecture
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Write
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
required_permission_mode: edit
|
|
pass_previous_response: false
|
|
rules:
|
|
- condition: Fix complete
|
|
next: reviewers
|
|
- condition: Cannot proceed, insufficient info
|
|
next: plan
|
|
instruction: fix
|
|
- name: supervise
|
|
edit: false
|
|
persona: dual-supervisor
|
|
policy: review
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction: supervise
|
|
pass_previous_response: false
|
|
rules:
|
|
- condition: All validations pass and ready to merge
|
|
next: COMPLETE
|
|
- condition: Issues detected during final review
|
|
next: fix_supervisor
|
|
output_contracts:
|
|
report:
|
|
- name: supervisor-validation.md
|
|
format: supervisor-validation
|
|
- name: summary.md
|
|
format: summary
|
|
use_judge: false
|
|
- name: fix_supervisor
|
|
edit: true
|
|
persona: coder
|
|
policy:
|
|
- coding
|
|
- testing
|
|
knowledge:
|
|
- frontend
|
|
- backend
|
|
- security
|
|
- architecture
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Write
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction: fix-supervisor
|
|
pass_previous_response: false
|
|
rules:
|
|
- condition: Supervisor's issues have been fixed
|
|
next: supervise
|
|
- condition: Unable to proceed with fixes
|
|
next: plan
|