takt/builtins/ja/pieces/review.yaml
2026-03-06 09:16:14 +09:00

240 lines
6.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: review
description: 多角レビュー - 5つの観点から並列にコード変更をレビューし、統合結果を出力する
piece_config:
provider_options:
codex:
network_access: true
opencode:
network_access: true
max_movements: 10
initial_movement: gather
movements:
- name: gather
edit: false
persona: planner
provider_options:
claude:
allowed_tools:
- Read
- Glob
- Grep
- Bash
- WebSearch
- WebFetch
instruction: gather-review
output_contracts:
report:
- name: review-target.md
format: review-gather
rules:
- condition: レビュー対象の情報収集完了
next: reviewers
- condition: レビュー対象を特定できない、情報不足
next: ABORT
appendix: |
確認事項:
- {質問1}
- {質問2}
- name: reviewers
parallel:
- name: arch-review
edit: false
persona: architecture-reviewer
policy: review
knowledge: architecture
provider_options:
claude:
allowed_tools:
- Read
- Glob
- Grep
- Bash
- WebSearch
- WebFetch
instruction: review-arch
output_contracts:
report:
- name: architecture-review.md
format: architecture-review
rules:
- condition: approved
- condition: needs_fix
- name: security-review
edit: false
persona: security-reviewer
policy: review
knowledge: security
provider_options:
claude:
allowed_tools:
- Read
- Glob
- Grep
- Bash
- WebSearch
- WebFetch
instruction: review-security
output_contracts:
report:
- name: security-review.md
format: security-review
rules:
- condition: approved
- condition: needs_fix
- name: qa-review
edit: false
persona: qa-reviewer
policy:
- review
- qa
provider_options:
claude:
allowed_tools:
- Read
- Glob
- Grep
- Bash
- WebSearch
- WebFetch
instruction: review-qa
output_contracts:
report:
- name: qa-review.md
format: qa-review
rules:
- condition: approved
- condition: needs_fix
- name: testing-review
edit: false
persona: testing-reviewer
policy:
- review
- testing
provider_options:
claude:
allowed_tools:
- Read
- Glob
- Grep
- Bash
- WebSearch
- WebFetch
instruction: review-test
output_contracts:
report:
- name: testing-review.md
format: testing-review
rules:
- condition: approved
- condition: needs_fix
- name: requirements-review
edit: false
persona: requirements-reviewer
policy: review
provider_options:
claude:
allowed_tools:
- Read
- Glob
- Grep
- Bash
- WebSearch
- WebFetch
instruction: review-requirements
output_contracts:
report:
- name: requirements-review.md
format: requirements-review
rules:
- condition: approved
- condition: needs_fix
rules:
- condition: all("approved")
next: supervise
- condition: any("needs_fix")
next: supervise
- name: supervise
edit: false
persona: supervisor
policy: review
provider_options:
claude:
allowed_tools:
- Read
- Glob
- Grep
- WebSearch
- WebFetch
pass_previous_response: false
rules:
- condition: レビュー統合完了
next: COMPLETE
instruction: |
## レビュー結果
{previous_response}
**これはレビュー専用ピースです。** テスト実行やビルドは行わないでください。
レビュー結果を統合し、最終サマリーを作成する役割です。
**やること:**
1. Report Directory内の全レビューレポートを読む
- `00-review-target.md`(レビュー対象情報)
- `01-architecture-review.md`(アーキテクチャレビュー)
- `02-security-review.md`(セキュリティレビュー)
- `03-qa-review.md`QAレビュー
- `04-testing-review.md`(テストレビュー)
- `05-requirements-review.md`(要件充足レビュー)
2. 5つのレビュー結果を統合
3. 統合レビューサマリーと総合判定を作成
output_contracts:
report:
- name: review-summary.md
format: |
```markdown
# レビューサマリー
## 総合判定: APPROVE / REJECT
## サマリー
{2-3文で全レビュー結果を統合}
## レビュー結果
| レビュー | 結果 | 主要な発見 |
|---------|------|-----------|
| アーキテクチャ | APPROVE/REJECT | {概要} |
| セキュリティ | APPROVE/REJECT | {概要} |
| QA | APPROVE/REJECT | {概要} |
| テスト | APPROVE/REJECT | {概要} |
| 要件充足 | APPROVE/REJECT | {概要} |
## 今回の指摘new
| # | finding_id | 重大度 | ソース | 場所 | 問題 | 修正案 |
|---|------------|--------|--------|------|------|--------|
| 1 | SUM-NEW-src-file-L42 | High | セキュリティ | `file:line` | 説明 | 提案 |
## 継続指摘persists
| # | finding_id | ソース | 前回根拠 | 今回根拠 | 問題 |
|---|------------|--------|----------|----------|------|
| 1 | SUM-PERSIST-src-file-L77 | アーキテクチャ | `file:line` | `file:line` | 説明 |
## 解消済みresolved
| finding_id | ソース | 解消根拠 |
|------------|--------|----------|
| SUM-RESOLVED-src-file-L10 | QA | `file:line` |
## 改善提案
- {全レビューからの統合提案}
## REJECT判定条件
- `new` または `persists` が1件以上ある場合のみ REJECT 可
- `finding_id` なしの指摘は無効
```