gather → reviewers(並列5) → supervise → COMPLETE のフローで、PR情報とリンクIssueを収集後、 5つの専門レビュワーが並列にレビューし、supervisorが統合サマリーを出力する。 review-only と review-fix-minimal は pr-review に置き換えて削除。
226 lines
6.3 KiB
YAML
226 lines
6.3 KiB
YAML
name: pr-review
|
||
description: PR多角レビュー - 5つの観点から並列にPRをレビューし、統合結果を出力する
|
||
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
|
||
allowed_tools:
|
||
- Read
|
||
- Glob
|
||
- Grep
|
||
- Bash
|
||
- WebSearch
|
||
- WebFetch
|
||
instruction: gather-pr
|
||
output_contracts:
|
||
report:
|
||
- name: 00-pr-info.md
|
||
format: pr-gather
|
||
rules:
|
||
- condition: PR情報の収集完了
|
||
next: reviewers
|
||
- condition: PR番号が特定できない、情報不足
|
||
next: ABORT
|
||
appendix: |
|
||
確認事項:
|
||
- {質問1}
|
||
- {質問2}
|
||
|
||
- name: reviewers
|
||
parallel:
|
||
- name: arch-review
|
||
edit: false
|
||
persona: architecture-reviewer
|
||
policy: review
|
||
knowledge: architecture
|
||
allowed_tools:
|
||
- Read
|
||
- Glob
|
||
- Grep
|
||
- Bash
|
||
- WebSearch
|
||
- WebFetch
|
||
instruction: review-arch
|
||
output_contracts:
|
||
report:
|
||
- name: 01-architecture-review.md
|
||
format: architecture-review
|
||
rules:
|
||
- condition: approved
|
||
- condition: needs_fix
|
||
|
||
- name: security-review
|
||
edit: false
|
||
persona: security-reviewer
|
||
policy: review
|
||
knowledge: security
|
||
allowed_tools:
|
||
- Read
|
||
- Glob
|
||
- Grep
|
||
- Bash
|
||
- WebSearch
|
||
- WebFetch
|
||
instruction: review-security
|
||
output_contracts:
|
||
report:
|
||
- name: 02-security-review.md
|
||
format: security-review
|
||
rules:
|
||
- condition: approved
|
||
- condition: needs_fix
|
||
|
||
- name: qa-review
|
||
edit: false
|
||
persona: qa-reviewer
|
||
policy:
|
||
- review
|
||
- qa
|
||
allowed_tools:
|
||
- Read
|
||
- Glob
|
||
- Grep
|
||
- Bash
|
||
- WebSearch
|
||
- WebFetch
|
||
instruction: review-qa
|
||
output_contracts:
|
||
report:
|
||
- name: 03-qa-review.md
|
||
format: qa-review
|
||
rules:
|
||
- condition: approved
|
||
- condition: needs_fix
|
||
|
||
- name: testing-review
|
||
edit: false
|
||
persona: testing-reviewer
|
||
policy:
|
||
- review
|
||
- testing
|
||
allowed_tools:
|
||
- Read
|
||
- Glob
|
||
- Grep
|
||
- Bash
|
||
- WebSearch
|
||
- WebFetch
|
||
instruction: review-test
|
||
output_contracts:
|
||
report:
|
||
- name: 04-testing-review.md
|
||
format: testing-review
|
||
rules:
|
||
- condition: approved
|
||
- condition: needs_fix
|
||
|
||
- name: requirements-review
|
||
edit: false
|
||
persona: requirements-reviewer
|
||
policy: review
|
||
allowed_tools:
|
||
- Read
|
||
- Glob
|
||
- Grep
|
||
- Bash
|
||
- WebSearch
|
||
- WebFetch
|
||
instruction: review-requirements
|
||
output_contracts:
|
||
report:
|
||
- name: 05-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
|
||
allowed_tools:
|
||
- Read
|
||
- Glob
|
||
- Grep
|
||
- WebSearch
|
||
- WebFetch
|
||
pass_previous_response: false
|
||
rules:
|
||
- condition: レビュー統合完了
|
||
next: COMPLETE
|
||
instruction_template: |
|
||
## レビュー結果
|
||
{previous_response}
|
||
|
||
**これはPRレビュー専用ピースです。** テスト実行やビルドは行わないでください。
|
||
レビュー結果を統合し、最終サマリーを作成する役割です。
|
||
|
||
**やること:**
|
||
1. Report Directory内の全レビューレポートを読む
|
||
- `00-pr-info.md`(PR情報)
|
||
- `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
|
||
# PRレビューサマリー
|
||
|
||
## 総合判定: 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` なしの指摘は無効
|
||
```
|