## 概要
仕様ドキュメント `/Users/m_naruse/work/git/takt/task_planning/output-contracts-and-quality-gates.md` に基づき、YAML構造の変更を実装する。
---
## タスク一覧
### 【高】トップレベル構造の変更
- 現在の `output_contracts` を `report_formats` にリネーム
- レポートテンプレート定義として機能させる
### 【高】Movement内の output_contracts 構造変更
- 各 movement の `output_contracts` が直接レポート配列を持つ構造に変更
- `output_contracts.report` の `report` キーを廃止
**変更後の構造:**
```yaml
report_formats: # トップレベル(テンプレート定義)
plan: ...
movements:
- name: plan
output_contracts: # 直接配列(reportキー不要)
- name: 00-plan.md
format: plan
```
### 【中】quality_gates の実装
- エージェントへの通達として機能させる(自動検証は将来実装)
- Movement完了時にエージェントが参照できる形式で定義
---
## 制約(ユーザー明示)
- 後方互換性は不要
---
## 確認方法
- 既存のピース定義YAMLが新構造でパースできること
- テストが通ること
192 lines
5.0 KiB
YAML
192 lines
5.0 KiB
YAML
name: review-fix-minimal
|
|
description: Review and fix piece for existing code (starts with review, no implementation)
|
|
max_iterations: 20
|
|
policies:
|
|
coding: ../policies/coding.md
|
|
review: ../policies/review.md
|
|
testing: ../policies/testing.md
|
|
ai-antipattern: ../policies/ai-antipattern.md
|
|
personas:
|
|
coder: ../personas/coder.md
|
|
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
|
|
supervisor: ../personas/supervisor.md
|
|
instructions:
|
|
implement: ../instructions/implement.md
|
|
review-ai: ../instructions/review-ai.md
|
|
ai-fix: ../instructions/ai-fix.md
|
|
supervise: ../instructions/supervise.md
|
|
fix-supervisor: ../instructions/fix-supervisor.md
|
|
initial_movement: reviewers
|
|
movements:
|
|
- name: implement
|
|
edit: true
|
|
persona: coder
|
|
policy:
|
|
- coding
|
|
- testing
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Write
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
permission_mode: edit
|
|
instruction: implement
|
|
rules:
|
|
- condition: Implementation complete
|
|
next: reviewers
|
|
- condition: Cannot proceed, insufficient info
|
|
next: ABORT
|
|
- condition: User input required because there are items to confirm with the user
|
|
next: implement
|
|
requires_user_input: true
|
|
interactive_only: true
|
|
output_contracts:
|
|
- Scope: 01-coder-scope.md
|
|
- Decisions: 02-coder-decisions.md
|
|
- name: reviewers
|
|
parallel:
|
|
- name: ai_review
|
|
edit: false
|
|
persona: ai-antipattern-reviewer
|
|
policy:
|
|
- review
|
|
- ai-antipattern
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction: review-ai
|
|
rules:
|
|
- condition: No AI-specific issues
|
|
- condition: AI-specific issues found
|
|
output_contracts:
|
|
- name: 03-ai-review.md
|
|
format: ai-review
|
|
- name: supervise
|
|
edit: false
|
|
persona: supervisor
|
|
policy: review
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction: supervise
|
|
rules:
|
|
- condition: All checks passed
|
|
- condition: Requirements unmet, tests failing
|
|
output_contracts:
|
|
- Validation: 05-supervisor-validation.md
|
|
- Summary: summary.md
|
|
rules:
|
|
- condition: all("No AI-specific issues", "All checks passed")
|
|
next: COMPLETE
|
|
- condition: all("AI-specific issues found", "Requirements unmet, tests failing")
|
|
next: fix_both
|
|
- condition: any("AI-specific issues found")
|
|
next: ai_fix
|
|
- condition: any("Requirements unmet, tests failing")
|
|
next: supervise_fix
|
|
- name: fix_both
|
|
parallel:
|
|
- name: ai_fix_parallel
|
|
edit: true
|
|
persona: coder
|
|
policy:
|
|
- coding
|
|
- testing
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
permission_mode: edit
|
|
rules:
|
|
- condition: AI Reviewer's issues fixed
|
|
- condition: No fix needed (verified target files/spec)
|
|
- condition: Cannot proceed, insufficient info
|
|
instruction: ai-fix
|
|
- name: supervise_fix_parallel
|
|
edit: true
|
|
persona: coder
|
|
policy:
|
|
- coding
|
|
- testing
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
permission_mode: edit
|
|
rules:
|
|
- condition: Supervisor's issues fixed
|
|
- condition: Cannot proceed, insufficient info
|
|
instruction: fix-supervisor
|
|
rules:
|
|
- condition: all("AI Reviewer's issues fixed", "Supervisor's issues fixed")
|
|
next: reviewers
|
|
- condition: any("No fix needed (verified target files/spec)", "Cannot proceed, insufficient info")
|
|
next: implement
|
|
- name: ai_fix
|
|
edit: true
|
|
persona: coder
|
|
policy:
|
|
- coding
|
|
- testing
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Write
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
permission_mode: edit
|
|
rules:
|
|
- condition: AI Reviewer's issues fixed
|
|
next: reviewers
|
|
- condition: No fix needed (verified target files/spec)
|
|
next: implement
|
|
- condition: Cannot proceed, insufficient info
|
|
next: implement
|
|
instruction: ai-fix
|
|
- name: supervise_fix
|
|
edit: true
|
|
persona: coder
|
|
policy:
|
|
- coding
|
|
- testing
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Write
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
permission_mode: edit
|
|
rules:
|
|
- condition: Supervisor's issues fixed
|
|
next: reviewers
|
|
- condition: Cannot proceed, insufficient info
|
|
next: implement
|
|
instruction: fix-supervisor
|
|
report_formats:
|
|
ai-review: ../output-contracts/ai-review.md
|