refactor: expert → dual リネーム、未使用ピース削除、default 統合
- expert/expert-mini/expert-cqrs/expert-cqrs-mini を dual 系にリネーム (「フルスタック」→「フロントエンド+バックエンド」に説明も修正) - expert-supervisor ペルソナを dual-supervisor にリネーム - passthrough, structural-reform ピースを削除 - default-mini, default-test-first-mini を default に統合 - coding-pitfalls ナレッジの主要項目を coding ポリシーに移動し削除 - implement/plan インストラクションにセルフチェック・コーダー指針を追加 - builtin カタログに不足していた terraform, takt-default 系を追加 - deep-research をカテゴリに追加
This commit is contained in:
parent
658aebfcee
commit
532b1961a7
@ -463,12 +463,12 @@ Example category config:
|
||||
```yaml
|
||||
piece_categories:
|
||||
Development:
|
||||
pieces: [default, default-mini]
|
||||
pieces: [default]
|
||||
children:
|
||||
Backend:
|
||||
pieces: [expert-cqrs]
|
||||
pieces: [dual-cqrs]
|
||||
Frontend:
|
||||
pieces: [expert]
|
||||
pieces: [dual]
|
||||
Research:
|
||||
pieces: [research, magi]
|
||||
show_others_category: true
|
||||
|
||||
@ -124,12 +124,10 @@ Rules determine the next movement. `COMPLETE` ends the piece successfully, `ABOR
|
||||
|
||||
| Piece | Use Case |
|
||||
|-------|----------|
|
||||
| `default-mini` | Quick fixes. Lightweight plan → implement → parallel review → fix loop. |
|
||||
| `default-test-first-mini` | Test-first development. Write tests first, then implement to pass them. |
|
||||
| `default` | Standard development. Test-first with AI antipattern review and parallel review (architecture + supervisor). |
|
||||
| `frontend-mini` | Frontend-focused mini configuration. |
|
||||
| `backend-mini` | Backend-focused mini configuration. |
|
||||
| `expert-mini` | Expert-level mini configuration. |
|
||||
| `default` | Serious development. Multi-stage review with parallel reviewers. Used for TAKT's own development. |
|
||||
| `dual-mini` | Frontend + backend mini configuration. |
|
||||
|
||||
See the [Builtin Catalog](./docs/builtin-catalog.md) for all pieces and personas.
|
||||
|
||||
|
||||
@ -41,6 +41,15 @@ Small / Medium / Large
|
||||
- **Rationale**: {Reason for the choice}
|
||||
```
|
||||
|
||||
**Pre-completion self-check (required):**
|
||||
Before running build and tests, verify the following:
|
||||
- If new parameters/fields were added, grep to confirm they are actually passed from call sites
|
||||
- For any `??`, `||`, `= defaultValue` usage, confirm fallback is truly necessary
|
||||
- Verify no replaced code/exports remain after refactoring
|
||||
- Verify no features outside the task specification were added
|
||||
- Verify no if/else blocks call the same function with only argument differences
|
||||
- Verify new code matches existing implementation patterns (API call style, type definition style, etc.)
|
||||
|
||||
**Required output (include headings)**
|
||||
## Work results
|
||||
- {Summary of actions taken}
|
||||
|
||||
@ -40,6 +40,15 @@ Small / Medium / Large
|
||||
- **Rationale**: {Reason for the choice}
|
||||
```
|
||||
|
||||
**Pre-completion self-check (required):**
|
||||
Before running build and tests, verify the following:
|
||||
- If new parameters/fields were added, grep to confirm they are actually passed from call sites
|
||||
- For any `??`, `||`, `= defaultValue` usage, confirm fallback is truly necessary
|
||||
- Verify no replaced code/exports remain after refactoring
|
||||
- Verify no features outside the task specification were added
|
||||
- Verify no if/else blocks call the same function with only argument differences
|
||||
- Verify new code matches existing implementation patterns (API call style, type definition style, etc.)
|
||||
|
||||
**Required output (include headings)**
|
||||
## Work results
|
||||
- {Summary of actions taken}
|
||||
|
||||
@ -19,3 +19,7 @@ For small tasks, skip the design sections in the report.
|
||||
4. Determine file structure and design patterns (if needed)
|
||||
5. Decide on the implementation approach
|
||||
- Verify the implementation approach does not violate knowledge/policy constraints
|
||||
6. Include the following in coder implementation guidelines:
|
||||
- Existing implementation patterns to reference (file:line). Always cite when similar processing already exists
|
||||
- Impact area of changes. Especially when adding new parameters, enumerate all call sites that need wiring
|
||||
- Anti-patterns to watch for in this specific task (if applicable)
|
||||
|
||||
@ -321,3 +321,6 @@ function formatPercentage(value: number): string { ... }
|
||||
- **Replaced code surviving after refactoring** - Remove replaced code and exports. Do not keep unless explicitly told to
|
||||
- **Workarounds that bypass safety mechanisms** - If the root fix is correct, no additional bypass is needed
|
||||
- **Direct tool execution bypassing project scripts** - `npx tool` and similar bypass the lockfile, causing version mismatches. Look for project-defined scripts (npm scripts, Makefile, etc.) first. Only consider direct execution when no script exists
|
||||
- **Missing wiring** - When adding new parameters or fields, grep the entire call chain to verify. If callers do not pass the value, `options.xxx ?? fallback` always uses the fallback
|
||||
- **Redundant conditionals** - When if/else calls the same function with only argument differences, unify using ternary operators or spread syntax
|
||||
- **Copy-paste patterns** - Before writing new code, grep for existing implementations of the same kind and follow the existing pattern. Do not introduce your own style
|
||||
|
||||
@ -1,20 +1,17 @@
|
||||
piece_categories:
|
||||
🚀 Quick Start:
|
||||
pieces:
|
||||
- default-mini
|
||||
- default
|
||||
- frontend-mini
|
||||
- backend-mini
|
||||
- default
|
||||
- compound-eye
|
||||
⚡ Mini:
|
||||
pieces:
|
||||
- default-mini
|
||||
- default-test-first-mini
|
||||
- frontend-mini
|
||||
- backend-mini
|
||||
- backend-cqrs-mini
|
||||
- expert-mini
|
||||
- expert-cqrs-mini
|
||||
- dual-mini
|
||||
- dual-cqrs-mini
|
||||
🎨 Frontend:
|
||||
pieces:
|
||||
- frontend
|
||||
@ -25,18 +22,15 @@ piece_categories:
|
||||
- backend-mini
|
||||
- backend-cqrs
|
||||
- backend-cqrs-mini
|
||||
🔧 Expert:
|
||||
🔧 Dual:
|
||||
pieces:
|
||||
- expert
|
||||
- expert-mini
|
||||
- expert-cqrs
|
||||
- expert-cqrs-mini
|
||||
- dual
|
||||
- dual-mini
|
||||
- dual-cqrs
|
||||
- dual-cqrs-mini
|
||||
🏗️ Infrastructure:
|
||||
pieces:
|
||||
- terraform
|
||||
🛠️ Refactoring:
|
||||
pieces:
|
||||
- structural-reform
|
||||
🔍 Review:
|
||||
pieces:
|
||||
- review
|
||||
@ -44,9 +38,6 @@ piece_categories:
|
||||
pieces:
|
||||
- unit-test
|
||||
- e2e-test
|
||||
✅ Test First:
|
||||
pieces:
|
||||
- default-test-first-mini
|
||||
🎵 TAKT Development:
|
||||
pieces:
|
||||
- takt-default
|
||||
@ -54,6 +45,7 @@ piece_categories:
|
||||
Others:
|
||||
pieces:
|
||||
- research
|
||||
- deep-research
|
||||
- magi
|
||||
show_others_category: true
|
||||
others_category_name: Others
|
||||
|
||||
@ -235,7 +235,7 @@ movements:
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
|
||||
@ -231,7 +231,7 @@ movements:
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
|
||||
@ -1,219 +0,0 @@
|
||||
name: default-mini
|
||||
description: Mini development piece (plan -> implement -> parallel review -> fix if needed -> complete)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
network_access: true
|
||||
opencode:
|
||||
network_access: true
|
||||
max_movements: 20
|
||||
initial_movement: plan
|
||||
movements:
|
||||
- name: plan
|
||||
edit: false
|
||||
persona: planner
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
rules:
|
||||
- condition: Requirements are clear and implementation is possible
|
||||
next: implement
|
||||
- condition: User is asking a question (not an implementation task)
|
||||
next: COMPLETE
|
||||
- condition: Requirements are unclear, insufficient information
|
||||
next: ABORT
|
||||
instruction: plan
|
||||
output_contracts:
|
||||
report:
|
||||
- name: plan.md
|
||||
format: plan
|
||||
- name: implement
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_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:
|
||||
report:
|
||||
- name: coder-scope.md
|
||||
format: coder-scope
|
||||
- name: coder-decisions.md
|
||||
format: coder-decisions
|
||||
- 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:
|
||||
report:
|
||||
- name: ai-review.md
|
||||
format: ai-review
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: supervisor
|
||||
policy: review
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction: supervise
|
||||
rules:
|
||||
- condition: All checks passed
|
||||
- condition: Requirements unmet, tests failing
|
||||
output_contracts:
|
||||
report:
|
||||
- name: supervisor-validation.md
|
||||
format: supervisor-validation
|
||||
- name: summary.md
|
||||
format: summary
|
||||
use_judge: false
|
||||
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
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_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
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_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
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
pass_previous_response: false
|
||||
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
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: Supervisor's issues fixed
|
||||
next: reviewers
|
||||
- condition: Cannot proceed, insufficient info
|
||||
next: implement
|
||||
instruction: fix-supervisor
|
||||
@ -1,254 +0,0 @@
|
||||
name: default-test-first-mini
|
||||
description: Test-first development piece (plan -> write tests -> implement -> parallel review -> fix if needed -> complete)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
network_access: true
|
||||
opencode:
|
||||
network_access: true
|
||||
max_movements: 25
|
||||
initial_movement: plan
|
||||
movements:
|
||||
- name: plan
|
||||
edit: false
|
||||
persona: planner
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
rules:
|
||||
- condition: Requirements are clear and implementation is possible
|
||||
next: write_tests
|
||||
- condition: User is asking a question (not an implementation task)
|
||||
next: COMPLETE
|
||||
- condition: Requirements are unclear, insufficient information
|
||||
next: ABORT
|
||||
instruction: plan
|
||||
output_contracts:
|
||||
report:
|
||||
- name: plan.md
|
||||
format: plan
|
||||
- name: write_tests
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: write-tests-first
|
||||
rules:
|
||||
- condition: Tests written successfully
|
||||
next: implement
|
||||
- condition: Cannot proceed because the test target is not implemented yet, so skip test writing
|
||||
next: implement
|
||||
- condition: Cannot proceed with test creation
|
||||
next: ABORT
|
||||
- condition: User input required because there are items to confirm with the user
|
||||
next: write_tests
|
||||
requires_user_input: true
|
||||
interactive_only: true
|
||||
output_contracts:
|
||||
report:
|
||||
- name: test-scope.md
|
||||
format: coder-scope
|
||||
- name: test-decisions.md
|
||||
format: coder-decisions
|
||||
- name: implement
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: implement-after-tests
|
||||
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:
|
||||
report:
|
||||
- name: coder-scope.md
|
||||
format: coder-scope
|
||||
- name: coder-decisions.md
|
||||
format: coder-decisions
|
||||
- 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:
|
||||
report:
|
||||
- name: ai-review.md
|
||||
format: ai-review
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: supervisor
|
||||
policy: review
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction: supervise
|
||||
rules:
|
||||
- condition: All checks passed
|
||||
- condition: Requirements unmet, tests failing
|
||||
output_contracts:
|
||||
report:
|
||||
- name: supervisor-validation.md
|
||||
format: supervisor-validation
|
||||
- name: summary.md
|
||||
format: summary
|
||||
use_judge: false
|
||||
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
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_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
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_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
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
pass_previous_response: false
|
||||
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
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: Supervisor's issues fixed
|
||||
next: reviewers
|
||||
- condition: Cannot proceed, insufficient info
|
||||
next: implement
|
||||
instruction: fix-supervisor
|
||||
@ -1,5 +1,5 @@
|
||||
name: default
|
||||
description: Test-first development piece (plan → write tests → implement → AI review → 3-parallel review → fix → supervise → complete)
|
||||
description: Test-first development piece (plan → write tests → implement → AI antipattern review → parallel review → complete)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
@ -68,7 +68,6 @@ movements:
|
||||
- coding
|
||||
- testing
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -106,7 +105,6 @@ movements:
|
||||
- testing
|
||||
session: refresh
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -118,6 +116,7 @@ movements:
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: implement-after-tests
|
||||
rules:
|
||||
- condition: Implementation complete
|
||||
next: ai_review
|
||||
@ -129,7 +128,6 @@ movements:
|
||||
next: implement
|
||||
requires_user_input: true
|
||||
interactive_only: true
|
||||
instruction: implement-after-tests
|
||||
output_contracts:
|
||||
report:
|
||||
- name: coder-scope.md
|
||||
@ -148,12 +146,12 @@ movements:
|
||||
- Grep
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction: ai-review
|
||||
rules:
|
||||
- condition: No AI-specific issues
|
||||
next: reviewers
|
||||
- condition: AI-specific issues found
|
||||
next: ai_fix
|
||||
instruction: ai-review
|
||||
output_contracts:
|
||||
report:
|
||||
- name: ai-review.md
|
||||
@ -166,7 +164,6 @@ movements:
|
||||
- testing
|
||||
session: refresh
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -178,38 +175,22 @@ movements:
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: ai-fix
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: AI issues fixed
|
||||
next: ai_review
|
||||
- condition: No fix needed (verified target files/spec)
|
||||
next: ai_no_fix
|
||||
- condition: Cannot proceed, insufficient info
|
||||
next: ai_no_fix
|
||||
instruction: ai-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
|
||||
- condition: Cannot proceed with fixes
|
||||
next: reviewers
|
||||
- name: reviewers
|
||||
parallel:
|
||||
- name: arch-review
|
||||
edit: false
|
||||
persona: architecture-reviewer
|
||||
policy: review
|
||||
knowledge:
|
||||
- architecture
|
||||
- backend
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
@ -224,50 +205,32 @@ movements:
|
||||
report:
|
||||
- name: architect-review.md
|
||||
format: architecture-review
|
||||
- name: qa-review
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: qa-reviewer
|
||||
policy:
|
||||
- review
|
||||
- qa
|
||||
persona: supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction: supervise
|
||||
rules:
|
||||
- condition: approved
|
||||
- condition: needs_fix
|
||||
instruction: review-qa
|
||||
- condition: All checks passed
|
||||
- condition: Requirements unmet, tests failing, build errors
|
||||
output_contracts:
|
||||
report:
|
||||
- name: qa-review.md
|
||||
format: qa-review
|
||||
- name: testing-review
|
||||
edit: false
|
||||
persona: testing-reviewer
|
||||
policy:
|
||||
- review
|
||||
- testing
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
rules:
|
||||
- condition: approved
|
||||
- condition: needs_fix
|
||||
instruction: review-test
|
||||
output_contracts:
|
||||
report:
|
||||
- name: testing-review.md
|
||||
format: testing-review
|
||||
- name: supervisor-validation.md
|
||||
format: supervisor-validation
|
||||
- name: summary.md
|
||||
format: summary
|
||||
use_judge: false
|
||||
rules:
|
||||
- condition: all("approved")
|
||||
next: supervise
|
||||
- condition: any("needs_fix")
|
||||
- condition: all("approved", "All checks passed")
|
||||
next: COMPLETE
|
||||
- condition: any("needs_fix", "Requirements unmet, tests failing, build errors")
|
||||
next: fix
|
||||
- name: fix
|
||||
edit: true
|
||||
@ -276,7 +239,6 @@ movements:
|
||||
- coding
|
||||
- testing
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -288,35 +250,10 @@ movements:
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: fix
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: Fix complete
|
||||
next: reviewers
|
||||
- condition: Cannot proceed, insufficient info
|
||||
next: plan
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: All checks passed
|
||||
next: COMPLETE
|
||||
- condition: Requirements unmet, tests failing, build errors
|
||||
next: plan
|
||||
instruction: supervise
|
||||
output_contracts:
|
||||
report:
|
||||
- name: supervisor-validation.md
|
||||
format: supervisor-validation
|
||||
- name: summary.md
|
||||
format: summary
|
||||
use_judge: false
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: expert-cqrs-mini
|
||||
description: CQRS+ES Expert-focused mini development piece (plan -> implement -> parallel review -> fix if needed -> complete)
|
||||
name: dual-cqrs-mini
|
||||
description: CQRS+ES frontend + backend mini development piece (plan -> implement -> parallel review -> fix if needed -> complete) with CQRS+ES knowledge injection
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
@ -99,7 +99,7 @@ movements:
|
||||
format: ai-review
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
knowledge:
|
||||
- frontend
|
||||
@ -1,5 +1,5 @@
|
||||
name: expert-cqrs
|
||||
description: CQRS+ES, Frontend, Security, QA Expert Review
|
||||
name: dual-cqrs
|
||||
description: Frontend + backend development piece (CQRS+ES specialized) with CQRS+ES, frontend, security, and QA reviews with fix loops
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
@ -271,7 +271,7 @@ movements:
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -1,5 +1,5 @@
|
||||
name: expert-mini
|
||||
description: Expert-focused mini development piece (plan -> implement -> parallel review -> fix if needed -> complete)
|
||||
name: dual-mini
|
||||
description: Frontend + backend mini development piece (plan -> implement -> parallel review -> fix if needed -> complete) with frontend + backend knowledge injection
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
@ -97,7 +97,7 @@ movements:
|
||||
format: ai-review
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
knowledge:
|
||||
- frontend
|
||||
@ -1,5 +1,5 @@
|
||||
name: expert
|
||||
description: Architecture, Frontend, Security, QA Expert Review
|
||||
name: dual
|
||||
description: Frontend + backend development piece with architecture, frontend, security, and QA reviews with fix loops
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
@ -267,7 +267,7 @@ movements:
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -250,7 +250,7 @@ movements:
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
name: passthrough
|
||||
description: Single-agent thin wrapper. Pass task directly to coder as-is.
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
network_access: true
|
||||
opencode:
|
||||
network_access: true
|
||||
max_movements: 10
|
||||
initial_movement: execute
|
||||
movements:
|
||||
- name: execute
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
rules:
|
||||
- condition: Task complete
|
||||
next: COMPLETE
|
||||
- condition: Cannot proceed
|
||||
next: ABORT
|
||||
- condition: User input required
|
||||
next: execute
|
||||
requires_user_input: true
|
||||
interactive_only: true
|
||||
instruction_template: |
|
||||
Do the task.
|
||||
output_contracts:
|
||||
report:
|
||||
- name: summary.md
|
||||
format: summary
|
||||
use_judge: false
|
||||
@ -1,488 +0,0 @@
|
||||
name: structural-reform
|
||||
description: Full project review and structural reform - iterative codebase restructuring with staged file splits
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
network_access: true
|
||||
opencode:
|
||||
network_access: true
|
||||
max_movements: 50
|
||||
initial_movement: review
|
||||
loop_monitors:
|
||||
- cycle:
|
||||
- implement
|
||||
- fix
|
||||
threshold: 3
|
||||
judge:
|
||||
persona: supervisor
|
||||
instruction_template: |
|
||||
The implement -> reviewers -> fix loop has repeated {cycle_count} times for the current reform target.
|
||||
|
||||
Review the reports from each cycle and determine whether this loop
|
||||
is making progress or repeating the same issues.
|
||||
|
||||
**Reports to reference:**
|
||||
- Architect review: {report:architect-review.md}
|
||||
- QA review: {report:qa-review.md}
|
||||
|
||||
**Judgment criteria:**
|
||||
- Are review findings being addressed in each fix cycle?
|
||||
- Are the same issues recurring without resolution?
|
||||
- Is the implementation converging toward approval?
|
||||
rules:
|
||||
- condition: Healthy (making progress toward approval)
|
||||
next: implement
|
||||
- condition: Unproductive (same issues recurring, no convergence)
|
||||
next: next_target
|
||||
movements:
|
||||
- name: review
|
||||
edit: false
|
||||
persona: architecture-reviewer
|
||||
policy: review
|
||||
knowledge:
|
||||
- architecture
|
||||
- backend
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction_template: |
|
||||
## Piece Status
|
||||
- Iteration: {iteration}/{max_movements} (piece-wide)
|
||||
- Movement Iteration: {movement_iteration} (times this movement has run)
|
||||
- Movement: review (full project review)
|
||||
|
||||
## User Request
|
||||
{task}
|
||||
|
||||
## Instructions
|
||||
Conduct a comprehensive structural review of the entire project codebase.
|
||||
|
||||
**Focus areas:**
|
||||
1. **God Classes/Functions**: Files exceeding 300 lines, classes with multiple responsibilities
|
||||
2. **Coupling**: Circular dependencies, tight coupling between modules
|
||||
3. **Cohesion**: Low-cohesion modules mixing unrelated concerns
|
||||
4. **Testability**: Untestable code due to tight coupling or side effects
|
||||
5. **Layer violations**: Wrong dependency directions, domain logic in adapters
|
||||
6. **DRY violations**: Duplicated logic across 3+ locations
|
||||
|
||||
**For each issue found, report:**
|
||||
- File path and line count
|
||||
- Problem category (God Class, Low Cohesion, etc.)
|
||||
- Severity (Critical / High / Medium)
|
||||
- Specific responsibilities that should be separated
|
||||
- Dependencies that would be affected by splitting
|
||||
|
||||
**Output format:**
|
||||
|
||||
```markdown
|
||||
# Full Project Structural Review
|
||||
|
||||
## Summary
|
||||
- Total files reviewed: N
|
||||
- Issues found: N (Critical: N, High: N, Medium: N)
|
||||
|
||||
## Critical Issues
|
||||
|
||||
### 1. {File path} ({line count} lines)
|
||||
- **Problem**: {category}
|
||||
- **Severity**: Critical
|
||||
- **Responsibilities found**:
|
||||
1. {responsibility 1}
|
||||
2. {responsibility 2}
|
||||
- **Proposed split**:
|
||||
- `{new-file-1}.ts`: {responsibility}
|
||||
- `{new-file-2}.ts`: {responsibility}
|
||||
- **Affected dependents**: {files that import this module}
|
||||
|
||||
## High Priority Issues
|
||||
...
|
||||
|
||||
## Medium Priority Issues
|
||||
...
|
||||
|
||||
## Dependency Graph Concerns
|
||||
- {circular dependencies, layering violations}
|
||||
|
||||
## Recommended Reform Order
|
||||
1. {file} - {reason for priority}
|
||||
2. {file} - {reason for priority}
|
||||
```
|
||||
rules:
|
||||
- condition: Full review is complete with findings
|
||||
next: plan_reform
|
||||
- condition: No structural issues found
|
||||
next: COMPLETE
|
||||
output_contracts:
|
||||
report:
|
||||
- name: full-review.md
|
||||
format: |
|
||||
```markdown
|
||||
# Full Project Structural Review
|
||||
|
||||
## Summary
|
||||
- Total files reviewed: {N}
|
||||
- Issues found: {N} (Critical: {N}, High: {N}, Medium: {N})
|
||||
|
||||
## Critical Issues
|
||||
|
||||
### 1. {File path} ({line count} lines)
|
||||
- **Problem**: {category}
|
||||
- **Severity**: Critical
|
||||
- **Responsibilities found**:
|
||||
1. {responsibility 1}
|
||||
2. {responsibility 2}
|
||||
- **Proposed split**:
|
||||
- `{new-file-1}.ts`: {responsibility}
|
||||
- `{new-file-2}.ts`: {responsibility}
|
||||
- **Affected dependents**: {files that import this module}
|
||||
|
||||
## High Priority Issues
|
||||
- {Issue}
|
||||
|
||||
## Medium Priority Issues
|
||||
- {Issue}
|
||||
|
||||
## Dependency Graph Concerns
|
||||
- {circular dependencies, layering violations}
|
||||
|
||||
## Recommended Reform Order
|
||||
1. {file} - {reason for priority}
|
||||
2. {file} - {reason for priority}
|
||||
```
|
||||
- name: plan_reform
|
||||
edit: false
|
||||
persona: planner
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction_template: |
|
||||
## Piece Status
|
||||
- Iteration: {iteration}/{max_movements} (piece-wide)
|
||||
- Movement Iteration: {movement_iteration} (times this movement has run)
|
||||
- Movement: plan_reform (reform plan creation)
|
||||
|
||||
## User Request
|
||||
{task}
|
||||
|
||||
## Full Review Results
|
||||
{previous_response}
|
||||
|
||||
## Additional User Inputs
|
||||
{user_inputs}
|
||||
|
||||
## Instructions
|
||||
Based on the full review results, create a concrete reform execution plan.
|
||||
|
||||
**Planning principles:**
|
||||
- One file split per iteration (keep changes manageable)
|
||||
- Order by dependency: split leaf nodes first, then work inward
|
||||
- Each split must leave tests and build passing
|
||||
- No backward compatibility concerns (per user instruction)
|
||||
|
||||
**For each reform target, specify:**
|
||||
1. Target file and current line count
|
||||
2. Proposed new files with responsibilities
|
||||
3. Expected changes to imports in dependent files
|
||||
4. Test strategy (new tests needed, existing tests to update)
|
||||
5. Risk assessment (what could break)
|
||||
|
||||
**Output format:**
|
||||
|
||||
```markdown
|
||||
# Structural Reform Plan
|
||||
|
||||
## Reform Targets (ordered by execution priority)
|
||||
|
||||
### Target 1: {file path}
|
||||
- **Current state**: {line count} lines, {N} responsibilities
|
||||
- **Proposed split**:
|
||||
| New file | Responsibility | Estimated lines |
|
||||
|----------|---------------|-----------------|
|
||||
| `{path}` | {responsibility} | ~{N} |
|
||||
- **Dependent files**: {list of files that import this}
|
||||
- **Test plan**: {what tests to add/update}
|
||||
- **Risk**: {Low/Medium/High} - {description}
|
||||
|
||||
### Target 2: {file path}
|
||||
...
|
||||
|
||||
## Execution Order Rationale
|
||||
{Why this order minimizes risk and dependency conflicts}
|
||||
|
||||
## Success Criteria
|
||||
- All tests pass after each split
|
||||
- Build succeeds after each split
|
||||
- No file exceeds 300 lines
|
||||
- Each file has single responsibility
|
||||
```
|
||||
rules:
|
||||
- condition: Reform plan is complete and ready to execute
|
||||
next: implement
|
||||
- condition: No actionable reforms identified
|
||||
next: COMPLETE
|
||||
- condition: Requirements unclear, need user input
|
||||
next: ABORT
|
||||
appendix: |
|
||||
Clarifications needed:
|
||||
- {Question 1}
|
||||
- {Question 2}
|
||||
output_contracts:
|
||||
report:
|
||||
- name: reform-plan.md
|
||||
format: plan
|
||||
- name: implement
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
session: refresh
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: implement
|
||||
rules:
|
||||
- condition: Implementation complete
|
||||
next: reviewers
|
||||
- condition: Cannot proceed, insufficient info
|
||||
next: reviewers
|
||||
- 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: 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: 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: verify
|
||||
- condition: any("needs_fix")
|
||||
next: fix
|
||||
- name: fix
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge:
|
||||
- backend
|
||||
- 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_reform
|
||||
instruction: fix
|
||||
- name: verify
|
||||
edit: false
|
||||
persona: supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction_template: |
|
||||
## Piece Status
|
||||
- Iteration: {iteration}/{max_movements} (piece-wide)
|
||||
- Movement Iteration: {movement_iteration} (times this movement has run)
|
||||
- Movement: verify (build and test verification)
|
||||
|
||||
## Instructions
|
||||
Verify that the current reform step has been completed successfully.
|
||||
|
||||
**Verification checklist:**
|
||||
1. **Build**: Run the build command and confirm it passes
|
||||
2. **Tests**: Run the test suite and confirm all tests pass
|
||||
3. **File sizes**: Confirm no new file exceeds 300 lines
|
||||
4. **Single responsibility**: Confirm each new file has a clear, single purpose
|
||||
5. **Import consistency**: Confirm all imports are updated correctly
|
||||
|
||||
**Report format:**
|
||||
|
||||
```markdown
|
||||
# Verification Results
|
||||
|
||||
## Result: PASS / FAIL
|
||||
|
||||
| Check | Status | Details |
|
||||
|-------|--------|---------|
|
||||
| Build | PASS/FAIL | {output summary} |
|
||||
| Tests | PASS/FAIL | {N passed, N failed} |
|
||||
| File sizes | PASS/FAIL | {any file > 300 lines} |
|
||||
| Single responsibility | PASS/FAIL | {assessment} |
|
||||
| Import consistency | PASS/FAIL | {any broken imports} |
|
||||
|
||||
## Issues (if FAIL)
|
||||
1. {issue description}
|
||||
```
|
||||
rules:
|
||||
- condition: All verifications passed
|
||||
next: next_target
|
||||
- condition: Verification failed
|
||||
next: fix
|
||||
output_contracts:
|
||||
report:
|
||||
- name: verification.md
|
||||
format: validation
|
||||
- name: next_target
|
||||
edit: false
|
||||
persona: planner
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction_template: |
|
||||
## Piece Status
|
||||
- Iteration: {iteration}/{max_movements} (piece-wide)
|
||||
- Movement Iteration: {movement_iteration} (times this movement has run)
|
||||
- Movement: next_target (progress check and next target selection)
|
||||
|
||||
## Original Reform Plan
|
||||
{report:reform-plan.md}
|
||||
|
||||
## Latest Verification
|
||||
{previous_response}
|
||||
|
||||
## Instructions
|
||||
Assess the progress of the structural reform and determine the next action.
|
||||
|
||||
**Steps:**
|
||||
1. Review the reform plan and identify which targets have been completed
|
||||
2. Check the current codebase state against the plan
|
||||
3. Determine if there are remaining reform targets
|
||||
|
||||
**Output format:**
|
||||
|
||||
```markdown
|
||||
# Reform Progress
|
||||
|
||||
## Completed Targets
|
||||
| # | Target | Status |
|
||||
|---|--------|--------|
|
||||
| 1 | {file} | Completed |
|
||||
| 2 | {file} | Completed |
|
||||
|
||||
## Remaining Targets
|
||||
| # | Target | Priority |
|
||||
|---|--------|----------|
|
||||
| 3 | {file} | Next |
|
||||
| 4 | {file} | Pending |
|
||||
|
||||
## Next Action
|
||||
- **Target**: {next file to reform}
|
||||
- **Plan**: {brief description of the split}
|
||||
|
||||
## Overall Progress
|
||||
{N}/{total} targets completed. Estimated remaining iterations: {N}
|
||||
```
|
||||
rules:
|
||||
- condition: More reform targets remain
|
||||
next: implement
|
||||
- condition: All reform targets completed
|
||||
next: COMPLETE
|
||||
output_contracts:
|
||||
report:
|
||||
- name: progress.md
|
||||
format: |
|
||||
```markdown
|
||||
# Reform Progress
|
||||
|
||||
## Completed Targets
|
||||
| # | Target | Status |
|
||||
|---|--------|--------|
|
||||
| 1 | {file} | Completed |
|
||||
|
||||
## Remaining Targets
|
||||
| # | Target | Priority |
|
||||
|---|--------|----------|
|
||||
| 2 | {file} | Next |
|
||||
|
||||
## Next Action
|
||||
- **Target**: {next file to reform}
|
||||
- **Plan**: {brief description of the split}
|
||||
|
||||
## Overall Progress
|
||||
{N}/{total} targets completed. Estimated remaining iterations: {N}
|
||||
```
|
||||
@ -1,5 +1,5 @@
|
||||
name: takt-default-team-leader
|
||||
description: TAKT development piece with team leader (plan → write tests → team-leader implement → AI review → 5-parallel review → fix → supervise → complete)
|
||||
description: TAKT development piece with team leader (plan → write tests → team-leader implement → AI antipattern review → 5-parallel review → fix → supervise → complete)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: takt-default
|
||||
description: TAKT development piece (plan → write tests → implement → AI review → 5-parallel review → fix → supervise → complete)
|
||||
description: TAKT development piece (plan → write tests → implement → AI antipattern review → 5-parallel review → fix → supervise → complete)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# supervise -- Final Verification Instruction Template
|
||||
|
||||
> **Purpose**: Run tests/builds, verify all review results, give final approval
|
||||
> **Agent**: supervisor, expert-supervisor
|
||||
> **Agent**: supervisor, dual-supervisor
|
||||
> **Reports**: Validation + Summary (format embedded in template)
|
||||
|
||||
---
|
||||
@ -11,7 +11,7 @@
|
||||
```
|
||||
Run tests, verify builds, and perform final approval.
|
||||
|
||||
{Customize: Review pass status -- for expert pieces where all reviews have passed}
|
||||
{Customize: Review pass status -- for dual pieces where all reviews have passed}
|
||||
## Previous Reviews Summary
|
||||
Reaching this movement means all of the following reviews have been APPROVED:
|
||||
{Customize: Actual review list}
|
||||
|
||||
@ -49,4 +49,4 @@ All other sections are the same across pieces.
|
||||
| minimal | AI Review, Supervisor |
|
||||
| coding | AI Review, Architecture |
|
||||
| default | Architecture Design, AI Review, Architect Review, QA, Supervisor |
|
||||
| expert | AI Review, Architecture, Frontend, Security, QA, Supervisor |
|
||||
| dual | AI Review, Architecture, Frontend, Security, QA, Supervisor |
|
||||
|
||||
@ -41,6 +41,15 @@ Small / Medium / Large
|
||||
- **理由**: {選んだ理由}
|
||||
```
|
||||
|
||||
**実装完了前の自己チェック(必須):**
|
||||
ビルドとテストを実行する前に、以下を確認してください:
|
||||
- 新しいパラメータ/フィールドを追加した場合、grep で呼び出し元から実際に渡されているか確認した
|
||||
- `??`, `||`, `= defaultValue` を使った箇所で、フォールバックが本当に必要か確認した
|
||||
- リファクタリングで置き換えたコード・エクスポートが残っていないか確認した
|
||||
- タスク指示書にない機能を追加していないか確認した
|
||||
- if/else で同一関数を呼び出し、引数の差異のみになっていないか確認した
|
||||
- 新しいコードが既存の実装パターン(API呼び出し方式、型定義方式等)と一致しているか確認した
|
||||
|
||||
**必須出力(見出しを含める)**
|
||||
## 作業結果
|
||||
- {実施内容の要約}
|
||||
|
||||
@ -40,6 +40,15 @@ Small / Medium / Large
|
||||
- **理由**: {選んだ理由}
|
||||
```
|
||||
|
||||
**実装完了前の自己チェック(必須):**
|
||||
ビルドとテストを実行する前に、以下を確認してください:
|
||||
- 新しいパラメータ/フィールドを追加した場合、grep で呼び出し元から実際に渡されているか確認した
|
||||
- `??`, `||`, `= defaultValue` を使った箇所で、フォールバックが本当に必要か確認した
|
||||
- リファクタリングで置き換えたコード・エクスポートが残っていないか確認した
|
||||
- タスク指示書にない機能を追加していないか確認した
|
||||
- if/else で同一関数を呼び出し、引数の差異のみになっていないか確認した
|
||||
- 新しいコードが既存の実装パターン(API呼び出し方式、型定義方式等)と一致しているか確認した
|
||||
|
||||
**必須出力(見出しを含める)**
|
||||
## 作業結果
|
||||
- {実施内容の要約}
|
||||
|
||||
@ -25,3 +25,7 @@
|
||||
5. ファイル構成・設計パターンを決定する(必要な場合)
|
||||
6. 実装アプローチを決める
|
||||
- 実装アプローチがナレッジ・ポリシーの制約に違反しないか照合する
|
||||
7. Coder向けの実装ガイドラインに以下を含めること:
|
||||
- 参照すべき既存実装パターン(ファイル:行)。同種の処理が既にある場合は必ず示す
|
||||
- 変更の影響範囲。特に新しいパラメータを追加する場合、配線が必要な全箇所を列挙する
|
||||
- このタスクで特に注意すべきアンチパターン(該当するものがあれば)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Expert Supervisor
|
||||
# Dual Supervisor
|
||||
|
||||
あなたは監督者です。すべてのレビューを統括し、最終的なリリース可否を判断します。
|
||||
|
||||
@ -321,3 +321,6 @@ function formatPercentage(value: number): string { ... }
|
||||
- **リファクタリング後の旧コード残存** - 置き換えたコード・エクスポートは削除する。明示的に残すよう指示されない限り残さない
|
||||
- **安全機構を迂回するワークアラウンド** - 根本修正が正しいなら追加の迂回は不要
|
||||
- **プロジェクトスクリプトを迂回するツール直接実行** - `npx tool` 等の直接実行は lockfile を迂回しバージョン不一致を起こす。プロジェクトが定義したスクリプト(npm scripts, Makefile 等)を探して使う。見つからない場合のみ直接実行を検討する
|
||||
- **配線忘れ** - 新しいパラメータやフィールドを追加したら、grep で呼び出しチェーン全体を確認する。呼び出し元が値を渡していないと `options.xxx ?? fallback` で常にフォールバックが使われる
|
||||
- **冗長な条件分岐** - if/else で同一関数を呼び出し引数の差異のみの場合、三項演算子やスプレッド構文で統一する
|
||||
- **コピペパターン** - 新しいコードを書く前に同種の既存実装を grep で確認し、既存パターンに合わせる。独自の書き方を持ち込まない
|
||||
|
||||
@ -1,20 +1,17 @@
|
||||
piece_categories:
|
||||
🚀 クイックスタート:
|
||||
pieces:
|
||||
- default-mini
|
||||
- default
|
||||
- frontend-mini
|
||||
- backend-mini
|
||||
- default
|
||||
- compound-eye
|
||||
⚡ Mini:
|
||||
pieces:
|
||||
- default-mini
|
||||
- default-test-first-mini
|
||||
- frontend-mini
|
||||
- backend-mini
|
||||
- backend-cqrs-mini
|
||||
- expert-mini
|
||||
- expert-cqrs-mini
|
||||
- dual-mini
|
||||
- dual-cqrs-mini
|
||||
🎨 フロントエンド:
|
||||
pieces:
|
||||
- frontend
|
||||
@ -25,18 +22,15 @@ piece_categories:
|
||||
- backend-mini
|
||||
- backend-cqrs
|
||||
- backend-cqrs-mini
|
||||
🔧 エキスパート:
|
||||
🔧 デュアル:
|
||||
pieces:
|
||||
- expert
|
||||
- expert-mini
|
||||
- expert-cqrs
|
||||
- expert-cqrs-mini
|
||||
- dual
|
||||
- dual-mini
|
||||
- dual-cqrs
|
||||
- dual-cqrs-mini
|
||||
🏗️ インフラストラクチャ:
|
||||
pieces:
|
||||
- terraform
|
||||
🛠️ リファクタリング:
|
||||
pieces:
|
||||
- structural-reform
|
||||
🔍 レビュー:
|
||||
pieces:
|
||||
- review
|
||||
@ -44,9 +38,6 @@ piece_categories:
|
||||
pieces:
|
||||
- unit-test
|
||||
- e2e-test
|
||||
✅ テストファースト:
|
||||
pieces:
|
||||
- default-test-first-mini
|
||||
🎵 TAKT開発:
|
||||
pieces:
|
||||
- takt-default
|
||||
@ -54,6 +45,7 @@ piece_categories:
|
||||
その他:
|
||||
pieces:
|
||||
- research
|
||||
- deep-research
|
||||
- magi
|
||||
show_others_category: true
|
||||
others_category_name: その他
|
||||
|
||||
@ -235,7 +235,7 @@ movements:
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
|
||||
@ -231,7 +231,7 @@ movements:
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
|
||||
@ -1,219 +0,0 @@
|
||||
name: default-mini
|
||||
description: Mini開発ピース(plan → implement → 並列レビュー → 修正 → 完了)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
network_access: true
|
||||
opencode:
|
||||
network_access: true
|
||||
max_movements: 20
|
||||
initial_movement: plan
|
||||
movements:
|
||||
- name: plan
|
||||
edit: false
|
||||
persona: planner
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
rules:
|
||||
- condition: 要件が明確で実装可能
|
||||
next: implement
|
||||
- condition: ユーザーが質問をしている(実装タスクではない)
|
||||
next: COMPLETE
|
||||
- condition: 要件が不明確、情報不足
|
||||
next: ABORT
|
||||
instruction: plan
|
||||
output_contracts:
|
||||
report:
|
||||
- name: plan.md
|
||||
format: plan
|
||||
- name: implement
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: implement
|
||||
rules:
|
||||
- condition: 実装が完了した
|
||||
next: reviewers
|
||||
- condition: 実装を進行できない
|
||||
next: ABORT
|
||||
- condition: ユーザーへの確認事項があるためユーザー入力が必要
|
||||
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: 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: AI特有の問題なし
|
||||
- condition: AI特有の問題あり
|
||||
output_contracts:
|
||||
report:
|
||||
- name: ai-review.md
|
||||
format: ai-review
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: supervisor
|
||||
policy: review
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction: supervise
|
||||
rules:
|
||||
- condition: すべて問題なし
|
||||
- condition: 要求未達成、テスト失敗、ビルドエラー
|
||||
output_contracts:
|
||||
report:
|
||||
- name: supervisor-validation.md
|
||||
format: supervisor-validation
|
||||
- name: summary.md
|
||||
format: summary
|
||||
use_judge: false
|
||||
rules:
|
||||
- condition: all("AI特有の問題なし", "すべて問題なし")
|
||||
next: COMPLETE
|
||||
- condition: all("AI特有の問題あり", "要求未達成、テスト失敗、ビルドエラー")
|
||||
next: fix_both
|
||||
- condition: any("AI特有の問題あり")
|
||||
next: ai_fix
|
||||
- condition: any("要求未達成、テスト失敗、ビルドエラー")
|
||||
next: supervise_fix
|
||||
- name: fix_both
|
||||
parallel:
|
||||
- name: ai_fix_parallel
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
rules:
|
||||
- condition: AI問題の修正完了
|
||||
- condition: 修正不要(指摘対象ファイル/仕様の確認済み)
|
||||
- condition: 判断できない、情報不足
|
||||
instruction: ai-fix
|
||||
- name: supervise_fix_parallel
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
rules:
|
||||
- condition: 監督者の指摘に対する修正が完了した
|
||||
- condition: 修正を進行できない
|
||||
instruction: fix-supervisor
|
||||
rules:
|
||||
- condition: all("AI問題の修正完了", "監督者の指摘に対する修正が完了した")
|
||||
next: reviewers
|
||||
- condition: any("修正不要(指摘対象ファイル/仕様の確認済み)", "判断できない、情報不足", "修正を進行できない")
|
||||
next: implement
|
||||
- name: ai_fix
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: AI問題の修正完了
|
||||
next: reviewers
|
||||
- condition: 修正不要(指摘対象ファイル/仕様の確認済み)
|
||||
next: implement
|
||||
- condition: 判断できない、情報不足
|
||||
next: implement
|
||||
instruction: ai-fix
|
||||
- name: supervise_fix
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: 監督者の指摘に対する修正が完了した
|
||||
next: reviewers
|
||||
- condition: 修正を進行できない
|
||||
next: implement
|
||||
instruction: fix-supervisor
|
||||
@ -1,254 +0,0 @@
|
||||
name: default-test-first-mini
|
||||
description: Test-First開発ピース(plan → テスト作成 → implement → 並列レビュー → 修正 → 完了)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
network_access: true
|
||||
opencode:
|
||||
network_access: true
|
||||
max_movements: 25
|
||||
initial_movement: plan
|
||||
movements:
|
||||
- name: plan
|
||||
edit: false
|
||||
persona: planner
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
rules:
|
||||
- condition: 要件が明確で実装可能
|
||||
next: write_tests
|
||||
- condition: ユーザーが質問をしている(実装タスクではない)
|
||||
next: COMPLETE
|
||||
- condition: 要件が不明確、情報不足
|
||||
next: ABORT
|
||||
instruction: plan
|
||||
output_contracts:
|
||||
report:
|
||||
- name: plan.md
|
||||
format: plan
|
||||
- name: write_tests
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: write-tests-first
|
||||
rules:
|
||||
- condition: テスト作成が完了した
|
||||
next: implement
|
||||
- condition: テスト対象が未実装のためテスト作成をスキップする
|
||||
next: implement
|
||||
- condition: テスト作成を進行できない
|
||||
next: ABORT
|
||||
- condition: ユーザーへの確認事項があるためユーザー入力が必要
|
||||
next: write_tests
|
||||
requires_user_input: true
|
||||
interactive_only: true
|
||||
output_contracts:
|
||||
report:
|
||||
- name: test-scope.md
|
||||
format: coder-scope
|
||||
- name: test-decisions.md
|
||||
format: coder-decisions
|
||||
- name: implement
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: implement-after-tests
|
||||
rules:
|
||||
- condition: 実装が完了した
|
||||
next: reviewers
|
||||
- condition: 実装を進行できない
|
||||
next: ABORT
|
||||
- condition: ユーザーへの確認事項があるためユーザー入力が必要
|
||||
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: 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: AI特有の問題なし
|
||||
- condition: AI特有の問題あり
|
||||
output_contracts:
|
||||
report:
|
||||
- name: ai-review.md
|
||||
format: ai-review
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: supervisor
|
||||
policy: review
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction: supervise
|
||||
rules:
|
||||
- condition: すべて問題なし
|
||||
- condition: 要求未達成、テスト失敗、ビルドエラー
|
||||
output_contracts:
|
||||
report:
|
||||
- name: supervisor-validation.md
|
||||
format: supervisor-validation
|
||||
- name: summary.md
|
||||
format: summary
|
||||
use_judge: false
|
||||
rules:
|
||||
- condition: all("AI特有の問題なし", "すべて問題なし")
|
||||
next: COMPLETE
|
||||
- condition: all("AI特有の問題あり", "要求未達成、テスト失敗、ビルドエラー")
|
||||
next: fix_both
|
||||
- condition: any("AI特有の問題あり")
|
||||
next: ai_fix
|
||||
- condition: any("要求未達成、テスト失敗、ビルドエラー")
|
||||
next: supervise_fix
|
||||
- name: fix_both
|
||||
parallel:
|
||||
- name: ai_fix_parallel
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
rules:
|
||||
- condition: AI問題の修正完了
|
||||
- condition: 修正不要(指摘対象ファイル/仕様の確認済み)
|
||||
- condition: 判断できない、情報不足
|
||||
instruction: ai-fix
|
||||
- name: supervise_fix_parallel
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
rules:
|
||||
- condition: 監督者の指摘に対する修正が完了した
|
||||
- condition: 修正を進行できない
|
||||
instruction: fix-supervisor
|
||||
rules:
|
||||
- condition: all("AI問題の修正完了", "監督者の指摘に対する修正が完了した")
|
||||
next: reviewers
|
||||
- condition: any("修正不要(指摘対象ファイル/仕様の確認済み)", "判断できない、情報不足", "修正を進行できない")
|
||||
next: implement
|
||||
- name: ai_fix
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: AI問題の修正完了
|
||||
next: reviewers
|
||||
- condition: 修正不要(指摘対象ファイル/仕様の確認済み)
|
||||
next: implement
|
||||
- condition: 判断できない、情報不足
|
||||
next: implement
|
||||
instruction: ai-fix
|
||||
- name: supervise_fix
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: 監督者の指摘に対する修正が完了した
|
||||
next: reviewers
|
||||
- condition: 修正を進行できない
|
||||
next: implement
|
||||
instruction: fix-supervisor
|
||||
@ -1,5 +1,5 @@
|
||||
name: default
|
||||
description: テスト先行開発ピース(計画 → テスト作成 → 実装 → AIレビュー → 3並列レビュー → 修正 → 監督 → 完了)
|
||||
description: テスト先行開発ピース(計画 → テスト作成 → 実装 → AIアンチパターンレビュー → 並列レビュー → 完了)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
@ -68,7 +68,6 @@ movements:
|
||||
- coding
|
||||
- testing
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -106,7 +105,6 @@ movements:
|
||||
- testing
|
||||
session: refresh
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -118,6 +116,7 @@ movements:
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: implement-after-tests
|
||||
rules:
|
||||
- condition: 実装完了
|
||||
next: ai_review
|
||||
@ -129,7 +128,6 @@ movements:
|
||||
next: implement
|
||||
requires_user_input: true
|
||||
interactive_only: true
|
||||
instruction: implement-after-tests
|
||||
output_contracts:
|
||||
report:
|
||||
- name: coder-scope.md
|
||||
@ -148,12 +146,12 @@ movements:
|
||||
- Grep
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction: ai-review
|
||||
rules:
|
||||
- condition: AI特有の問題なし
|
||||
next: reviewers
|
||||
- condition: AI特有の問題あり
|
||||
next: ai_fix
|
||||
instruction: ai-review
|
||||
output_contracts:
|
||||
report:
|
||||
- name: ai-review.md
|
||||
@ -166,7 +164,6 @@ movements:
|
||||
- testing
|
||||
session: refresh
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -178,38 +175,22 @@ movements:
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: ai-fix
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: AI問題の修正完了
|
||||
- condition: AI Reviewerの指摘に対する修正が完了した
|
||||
next: ai_review
|
||||
- condition: 修正不要(指摘対象ファイル/仕様の確認済み)
|
||||
next: ai_no_fix
|
||||
- condition: 判断できない、情報不足
|
||||
next: ai_no_fix
|
||||
instruction: ai-fix
|
||||
- name: ai_no_fix
|
||||
edit: false
|
||||
persona: architecture-reviewer
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
rules:
|
||||
- condition: ai_reviewの指摘が妥当(修正すべき)
|
||||
next: ai_fix
|
||||
- condition: ai_fixの判断が妥当(修正不要)
|
||||
next: reviewers
|
||||
instruction: arbitrate
|
||||
- condition: 修正を進行できない
|
||||
next: reviewers
|
||||
- name: reviewers
|
||||
parallel:
|
||||
- name: arch-review
|
||||
edit: false
|
||||
persona: architecture-reviewer
|
||||
policy: review
|
||||
knowledge:
|
||||
- architecture
|
||||
- backend
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
@ -224,50 +205,32 @@ movements:
|
||||
report:
|
||||
- name: architect-review.md
|
||||
format: architecture-review
|
||||
- name: qa-review
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: qa-reviewer
|
||||
policy:
|
||||
- review
|
||||
- qa
|
||||
persona: supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction: supervise
|
||||
rules:
|
||||
- condition: approved
|
||||
- condition: needs_fix
|
||||
instruction: review-qa
|
||||
- condition: すべて問題なし
|
||||
- condition: 要求未達成、テスト失敗、ビルドエラー
|
||||
output_contracts:
|
||||
report:
|
||||
- name: qa-review.md
|
||||
format: qa-review
|
||||
- name: testing-review
|
||||
edit: false
|
||||
persona: testing-reviewer
|
||||
policy:
|
||||
- review
|
||||
- testing
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
rules:
|
||||
- condition: approved
|
||||
- condition: needs_fix
|
||||
instruction: review-test
|
||||
output_contracts:
|
||||
report:
|
||||
- name: testing-review.md
|
||||
format: testing-review
|
||||
- name: supervisor-validation.md
|
||||
format: supervisor-validation
|
||||
- name: summary.md
|
||||
format: summary
|
||||
use_judge: false
|
||||
rules:
|
||||
- condition: all("approved")
|
||||
next: supervise
|
||||
- condition: any("needs_fix")
|
||||
- condition: all("approved", "すべて問題なし")
|
||||
next: COMPLETE
|
||||
- condition: any("needs_fix", "要求未達成、テスト失敗、ビルドエラー")
|
||||
next: fix
|
||||
- name: fix
|
||||
edit: true
|
||||
@ -276,7 +239,6 @@ movements:
|
||||
- coding
|
||||
- testing
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -288,35 +250,10 @@ movements:
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: fix
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: 修正完了
|
||||
next: reviewers
|
||||
- condition: 判断できない、情報不足
|
||||
next: plan
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: すべて問題なし
|
||||
next: COMPLETE
|
||||
- condition: 要求未達成、テスト失敗、ビルドエラー
|
||||
next: plan
|
||||
instruction: supervise
|
||||
output_contracts:
|
||||
report:
|
||||
- name: supervisor-validation.md
|
||||
format: supervisor-validation
|
||||
- name: summary.md
|
||||
format: summary
|
||||
use_judge: false
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: expert-cqrs-mini
|
||||
description: CQRS+ES Expert向けMini開発ピース(plan → implement → 並列レビュー → 修正 → 完了)
|
||||
name: dual-cqrs-mini
|
||||
description: CQRS+ES フロントエンド+バックエンド向けMini開発ピース(plan → implement → 並列レビュー → 修正 → 完了)。CQRS+ESナレッジ注入付き。
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
@ -99,7 +99,7 @@ movements:
|
||||
format: ai-review
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
knowledge:
|
||||
- frontend
|
||||
@ -1,5 +1,5 @@
|
||||
name: expert-cqrs
|
||||
description: CQRS+ES・フロントエンド・セキュリティ・QA専門家レビュー
|
||||
name: dual-cqrs
|
||||
description: フロントエンド+バックエンド開発ピース(CQRS+ES特化)(CQRS+ES・フロントエンド・セキュリティ・QAレビューと修正ループ付き)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
@ -271,7 +271,7 @@ movements:
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -1,5 +1,5 @@
|
||||
name: expert-mini
|
||||
description: Expert向けMini開発ピース(plan → implement → 並列レビュー → 修正 → 完了)
|
||||
name: dual-mini
|
||||
description: フロントエンド+バックエンド向けMini開発ピース(plan → implement → 並列レビュー → 修正 → 完了)。フロントエンド+バックエンドのナレッジ注入付き。
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
@ -97,7 +97,7 @@ movements:
|
||||
format: ai-review
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
knowledge:
|
||||
- frontend
|
||||
@ -1,5 +1,5 @@
|
||||
name: expert
|
||||
description: アーキテクチャ・フロントエンド・セキュリティ・QA専門家レビュー
|
||||
name: dual
|
||||
description: フロントエンド+バックエンド開発ピース(アーキテクチャ・フロントエンド・セキュリティ・QAレビューと修正ループ付き)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
@ -267,7 +267,7 @@ movements:
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
@ -250,7 +250,7 @@ movements:
|
||||
instruction: fix
|
||||
- name: supervise
|
||||
edit: false
|
||||
persona: expert-supervisor
|
||||
persona: dual-supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
name: passthrough
|
||||
description: Single-agent thin wrapper. Pass task directly to coder as-is.
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
network_access: true
|
||||
opencode:
|
||||
network_access: true
|
||||
max_movements: 10
|
||||
initial_movement: execute
|
||||
movements:
|
||||
- name: execute
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
rules:
|
||||
- condition: タスク完了
|
||||
next: COMPLETE
|
||||
- condition: 進行できない
|
||||
next: ABORT
|
||||
- condition: ユーザー入力が必要
|
||||
next: execute
|
||||
requires_user_input: true
|
||||
interactive_only: true
|
||||
instruction_template: |
|
||||
タスクをこなしてください。
|
||||
output_contracts:
|
||||
report:
|
||||
- name: summary.md
|
||||
format: summary
|
||||
use_judge: false
|
||||
@ -1,488 +0,0 @@
|
||||
name: structural-reform
|
||||
description: プロジェクト全体レビューと構造改革 - 段階的なファイル分割による反復的コードベース再構築
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
network_access: true
|
||||
opencode:
|
||||
network_access: true
|
||||
max_movements: 50
|
||||
initial_movement: review
|
||||
loop_monitors:
|
||||
- cycle:
|
||||
- implement
|
||||
- fix
|
||||
threshold: 3
|
||||
judge:
|
||||
persona: supervisor
|
||||
instruction_template: |
|
||||
implement → reviewers → fix のループが現在の改革ターゲットに対して {cycle_count} 回繰り返されました。
|
||||
|
||||
各サイクルのレポートを確認し、このループが進捗しているか、
|
||||
同じ問題を繰り返しているかを判断してください。
|
||||
|
||||
**参照するレポート:**
|
||||
- アーキテクチャレビュー: {report:architect-review.md}
|
||||
- QAレビュー: {report:qa-review.md}
|
||||
|
||||
**判断基準:**
|
||||
- 各修正サイクルでレビュー指摘が解消されているか
|
||||
- 同じ問題が解決されずに繰り返されていないか
|
||||
- 実装が承認に向かって収束しているか
|
||||
rules:
|
||||
- condition: 健全(承認に向けて進捗あり)
|
||||
next: implement
|
||||
- condition: 非生産的(同じ問題が繰り返され、収束なし)
|
||||
next: next_target
|
||||
movements:
|
||||
- name: review
|
||||
edit: false
|
||||
persona: architecture-reviewer
|
||||
policy: review
|
||||
knowledge:
|
||||
- architecture
|
||||
- backend
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction_template: |
|
||||
## ピースステータス
|
||||
- イテレーション: {iteration}/{max_movements}(ピース全体)
|
||||
- ムーブメントイテレーション: {movement_iteration}(このムーブメントの実行回数)
|
||||
- ムーブメント: review(プロジェクト全体レビュー)
|
||||
|
||||
## ユーザーリクエスト
|
||||
{task}
|
||||
|
||||
## 指示
|
||||
プロジェクトのコードベース全体に対して、包括的な構造レビューを実施してください。
|
||||
|
||||
**重点領域:**
|
||||
1. **God Class/Function**: 300行を超えるファイル、複数の責務を持つクラス
|
||||
2. **結合度**: 循環依存、モジュール間の密結合
|
||||
3. **凝集度**: 無関係な関心事が混在した低凝集モジュール
|
||||
4. **テスタビリティ**: 密結合や副作用によるテスト困難なコード
|
||||
5. **レイヤー違反**: 依存方向の誤り、アダプター層にドメインロジック
|
||||
6. **DRY違反**: 3箇所以上の重複ロジック
|
||||
|
||||
**発見した問題ごとに報告:**
|
||||
- ファイルパスと行数
|
||||
- 問題カテゴリ(God Class、低凝集など)
|
||||
- 深刻度(Critical / High / Medium)
|
||||
- 分離すべき具体的な責務
|
||||
- 分割により影響を受ける依存先
|
||||
|
||||
**出力フォーマット:**
|
||||
|
||||
```markdown
|
||||
# プロジェクト全体構造レビュー
|
||||
|
||||
## サマリー
|
||||
- レビュー対象ファイル数: N
|
||||
- 検出された問題: N(Critical: N, High: N, Medium: N)
|
||||
|
||||
## Critical Issues
|
||||
|
||||
### 1. {ファイルパス}({行数}行)
|
||||
- **問題**: {カテゴリ}
|
||||
- **深刻度**: Critical
|
||||
- **検出された責務**:
|
||||
1. {責務1}
|
||||
2. {責務2}
|
||||
- **分割提案**:
|
||||
- `{新ファイル1}.ts`: {責務}
|
||||
- `{新ファイル2}.ts`: {責務}
|
||||
- **影響を受ける依存先**: {このモジュールをインポートしているファイル}
|
||||
|
||||
## High Priority Issues
|
||||
...
|
||||
|
||||
## Medium Priority Issues
|
||||
...
|
||||
|
||||
## 依存グラフの懸念事項
|
||||
- {循環依存、レイヤー違反}
|
||||
|
||||
## 推奨改革順序
|
||||
1. {ファイル} - {優先理由}
|
||||
2. {ファイル} - {優先理由}
|
||||
```
|
||||
rules:
|
||||
- condition: 全体レビューが完了し、問題が検出された
|
||||
next: plan_reform
|
||||
- condition: 構造的な問題は見つからなかった
|
||||
next: COMPLETE
|
||||
output_contracts:
|
||||
report:
|
||||
- name: full-review.md
|
||||
format: |
|
||||
```markdown
|
||||
# 全体構造レビュー
|
||||
|
||||
## サマリー
|
||||
- レビュー対象ファイル数: {N}
|
||||
- 問題件数: {N}(Critical: {N}, High: {N}, Medium: {N})
|
||||
|
||||
## Critical な問題
|
||||
|
||||
### 1. {ファイルパス}({行数} lines)
|
||||
- **問題カテゴリ**: {category}
|
||||
- **重大度**: Critical
|
||||
- **含まれている責務**:
|
||||
1. {responsibility 1}
|
||||
2. {responsibility 2}
|
||||
- **分割案**:
|
||||
- `{new-file-1}.ts`: {responsibility}
|
||||
- `{new-file-2}.ts`: {responsibility}
|
||||
- **影響を受ける依存側**: {このモジュールをimportしているファイル}
|
||||
|
||||
## High 優先の問題
|
||||
- {Issue}
|
||||
|
||||
## Medium 優先の問題
|
||||
- {Issue}
|
||||
|
||||
## 依存グラフ上の懸念
|
||||
- {循環依存・レイヤ違反 など}
|
||||
|
||||
## 推奨リファクタ順序
|
||||
1. {file} - {優先理由}
|
||||
2. {file} - {優先理由}
|
||||
```
|
||||
- name: plan_reform
|
||||
edit: false
|
||||
persona: planner
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction_template: |
|
||||
## ピースステータス
|
||||
- イテレーション: {iteration}/{max_movements}(ピース全体)
|
||||
- ムーブメントイテレーション: {movement_iteration}(このムーブメントの実行回数)
|
||||
- ムーブメント: plan_reform(改革計画策定)
|
||||
|
||||
## ユーザーリクエスト
|
||||
{task}
|
||||
|
||||
## 全体レビュー結果
|
||||
{previous_response}
|
||||
|
||||
## ユーザー追加入力
|
||||
{user_inputs}
|
||||
|
||||
## 指示
|
||||
全体レビュー結果を基に、具体的な改革実行計画を策定してください。
|
||||
|
||||
**計画の原則:**
|
||||
- 1イテレーションにつき1ファイルの分割(変更を管理可能に保つ)
|
||||
- 依存順に実行:まずリーフノードを分割し、内側に向かって進む
|
||||
- 各分割後にテストとビルドが通ること
|
||||
- 後方互換は不要(ユーザー指示通り)
|
||||
|
||||
**各改革ターゲットについて指定:**
|
||||
1. 対象ファイルと現在の行数
|
||||
2. 提案する新ファイルと責務
|
||||
3. 依存先ファイルのインポート変更予定
|
||||
4. テスト戦略(新規テスト、既存テストの更新)
|
||||
5. リスク評価(何が壊れる可能性があるか)
|
||||
|
||||
**出力フォーマット:**
|
||||
|
||||
```markdown
|
||||
# 構造改革計画
|
||||
|
||||
## 改革ターゲット(実行優先順)
|
||||
|
||||
### ターゲット1: {ファイルパス}
|
||||
- **現状**: {行数}行、{N}個の責務
|
||||
- **分割提案**:
|
||||
| 新ファイル | 責務 | 推定行数 |
|
||||
|----------|------|---------|
|
||||
| `{パス}` | {責務} | ~{N} |
|
||||
- **依存先ファイル**: {このモジュールをインポートしているファイル一覧}
|
||||
- **テスト計画**: {追加・更新すべきテスト}
|
||||
- **リスク**: {Low/Medium/High} - {説明}
|
||||
|
||||
### ターゲット2: {ファイルパス}
|
||||
...
|
||||
|
||||
## 実行順序の根拠
|
||||
{この順序がリスクと依存関係の競合を最小化する理由}
|
||||
|
||||
## 成功基準
|
||||
- 各分割後に全テストが通る
|
||||
- 各分割後にビルドが成功する
|
||||
- 300行を超えるファイルがない
|
||||
- 各ファイルが単一責務を持つ
|
||||
```
|
||||
rules:
|
||||
- condition: 改革計画が完成し、実行可能な状態
|
||||
next: implement
|
||||
- condition: 実行可能な改革が特定されなかった
|
||||
next: COMPLETE
|
||||
- condition: 要件が不明確、ユーザー入力が必要
|
||||
next: ABORT
|
||||
appendix: |
|
||||
確認事項:
|
||||
- {質問1}
|
||||
- {質問2}
|
||||
output_contracts:
|
||||
report:
|
||||
- name: reform-plan.md
|
||||
format: plan
|
||||
- name: implement
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
session: refresh
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
instruction: implement
|
||||
rules:
|
||||
- condition: 実装完了
|
||||
next: reviewers
|
||||
- condition: 判断できない、情報不足
|
||||
next: reviewers
|
||||
- condition: ユーザー入力が必要
|
||||
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: 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: 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: verify
|
||||
- condition: any("needs_fix")
|
||||
next: fix
|
||||
- name: fix
|
||||
edit: true
|
||||
persona: coder
|
||||
policy:
|
||||
- coding
|
||||
- testing
|
||||
knowledge:
|
||||
- backend
|
||||
- architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Edit
|
||||
- Write
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
required_permission_mode: edit
|
||||
pass_previous_response: false
|
||||
rules:
|
||||
- condition: 修正完了
|
||||
next: reviewers
|
||||
- condition: 判断できない、情報不足
|
||||
next: plan_reform
|
||||
instruction: fix
|
||||
- name: verify
|
||||
edit: false
|
||||
persona: supervisor
|
||||
policy: review
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction_template: |
|
||||
## ピースステータス
|
||||
- イテレーション: {iteration}/{max_movements}(ピース全体)
|
||||
- ムーブメントイテレーション: {movement_iteration}(このムーブメントの実行回数)
|
||||
- ムーブメント: verify(ビルド・テスト検証)
|
||||
|
||||
## 指示
|
||||
現在の改革ステップが正常に完了したことを検証してください。
|
||||
|
||||
**検証チェックリスト:**
|
||||
1. **ビルド**: ビルドコマンドを実行し、成功することを確認
|
||||
2. **テスト**: テストスイートを実行し、全テストが通ることを確認
|
||||
3. **ファイルサイズ**: 新しいファイルが300行を超えていないことを確認
|
||||
4. **単一責務**: 各新ファイルが明確な単一の目的を持つことを確認
|
||||
5. **インポート整合性**: すべてのインポートが正しく更新されていることを確認
|
||||
|
||||
**レポートフォーマット:**
|
||||
|
||||
```markdown
|
||||
# 検証結果
|
||||
|
||||
## 結果: PASS / FAIL
|
||||
|
||||
| チェック項目 | 状態 | 詳細 |
|
||||
|------------|------|------|
|
||||
| ビルド | PASS/FAIL | {出力サマリー} |
|
||||
| テスト | PASS/FAIL | {N passed, N failed} |
|
||||
| ファイルサイズ | PASS/FAIL | {300行超のファイルの有無} |
|
||||
| 単一責務 | PASS/FAIL | {評価} |
|
||||
| インポート整合性 | PASS/FAIL | {壊れたインポートの有無} |
|
||||
|
||||
## 問題点(FAILの場合)
|
||||
1. {問題の説明}
|
||||
```
|
||||
rules:
|
||||
- condition: すべての検証に合格
|
||||
next: next_target
|
||||
- condition: 検証に失敗
|
||||
next: fix
|
||||
output_contracts:
|
||||
report:
|
||||
- name: verification.md
|
||||
format: validation
|
||||
- name: next_target
|
||||
edit: false
|
||||
persona: planner
|
||||
knowledge: architecture
|
||||
allowed_tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- WebSearch
|
||||
- WebFetch
|
||||
instruction_template: |
|
||||
## ピースステータス
|
||||
- イテレーション: {iteration}/{max_movements}(ピース全体)
|
||||
- ムーブメントイテレーション: {movement_iteration}(このムーブメントの実行回数)
|
||||
- ムーブメント: next_target(進捗確認と次ターゲット選択)
|
||||
|
||||
## 改革計画
|
||||
{report:reform-plan.md}
|
||||
|
||||
## 最新の検証結果
|
||||
{previous_response}
|
||||
|
||||
## 指示
|
||||
構造改革の進捗を評価し、次のアクションを決定してください。
|
||||
|
||||
**手順:**
|
||||
1. 改革計画を確認し、完了したターゲットを特定
|
||||
2. 現在のコードベースの状態を計画と照合
|
||||
3. 残りの改革ターゲットがあるか判断
|
||||
|
||||
**出力フォーマット:**
|
||||
|
||||
```markdown
|
||||
# 改革進捗
|
||||
|
||||
## 完了ターゲット
|
||||
| # | ターゲット | 状態 |
|
||||
|---|----------|------|
|
||||
| 1 | {ファイル} | 完了 |
|
||||
| 2 | {ファイル} | 完了 |
|
||||
|
||||
## 残りターゲット
|
||||
| # | ターゲット | 優先度 |
|
||||
|---|----------|-------|
|
||||
| 3 | {ファイル} | 次 |
|
||||
| 4 | {ファイル} | 保留 |
|
||||
|
||||
## 次のアクション
|
||||
- **ターゲット**: {次に改革するファイル}
|
||||
- **計画**: {分割の概要}
|
||||
|
||||
## 全体進捗
|
||||
{N}/{合計}ターゲット完了。残りの推定イテレーション数: {N}
|
||||
```
|
||||
rules:
|
||||
- condition: まだ改革ターゲットが残っている
|
||||
next: implement
|
||||
- condition: すべての改革ターゲットが完了
|
||||
next: COMPLETE
|
||||
output_contracts:
|
||||
report:
|
||||
- name: progress.md
|
||||
format: |
|
||||
```markdown
|
||||
# 改修進捗
|
||||
|
||||
## 完了ターゲット
|
||||
| # | ターゲット | 状態 |
|
||||
|---|------------|------|
|
||||
| 1 | {file} | Completed |
|
||||
|
||||
## 残ターゲット
|
||||
| # | ターゲット | 優先度 |
|
||||
|---|------------|--------|
|
||||
| 2 | {file} | Next |
|
||||
|
||||
## 次アクション
|
||||
- **対象**: {next file to reform}
|
||||
- **実施計画**: {brief description of the split}
|
||||
|
||||
## 全体進捗
|
||||
{N}/{total} targets completed. 推定残り反復: {N}
|
||||
```
|
||||
@ -1,5 +1,5 @@
|
||||
name: takt-default-team-leader
|
||||
description: TAKT開発ピース(チームリーダー版)(計画 → テスト作成 → チームリーダー実装 → AIレビュー → 5並列レビュー → 修正 → 監督 → 完了)
|
||||
description: TAKT開発ピース(チームリーダー版)(計画 → テスト作成 → チームリーダー実装 → AIアンチパターンレビュー → 5並列レビュー → 修正 → 監督 → 完了)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: takt-default
|
||||
description: TAKT開発ピース(計画 → テスト作成 → 実装 → AIレビュー → 5並列レビュー → 修正 → 監督 → 完了)
|
||||
description: TAKT開発ピース(計画 → テスト作成 → 実装 → AIアンチパターンレビュー → 5並列レビュー → 修正 → 監督 → 完了)
|
||||
piece_config:
|
||||
provider_options:
|
||||
codex:
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# supervise — 最終検証 instruction テンプレート
|
||||
|
||||
> **用途**: テスト・ビルド実行、全レビュー結果の確認、最終承認
|
||||
> **使用エージェント**: supervisor, expert-supervisor
|
||||
> **使用エージェント**: supervisor, dual-supervisor
|
||||
> **レポート**: Validation + Summary(フォーマットをテンプレート内に埋め込み)
|
||||
|
||||
---
|
||||
@ -11,7 +11,7 @@
|
||||
```
|
||||
テスト実行、ビルド確認、最終承認を行ってください。
|
||||
|
||||
{カスタマイズ: レビュー通過状況 — expert ピースなど全レビュー通過後の場合}
|
||||
{カスタマイズ: レビュー通過状況 — dual ピースなど全レビュー通過後の場合}
|
||||
## Previous Reviews Summary
|
||||
このムーブメントに到達したということは、以下のレビューがすべてAPPROVEされています:
|
||||
{カスタマイズ: 実際のレビュー一覧}
|
||||
|
||||
@ -49,4 +49,4 @@ npm run build
|
||||
| minimal | AI Review, Supervisor |
|
||||
| coding | AI Review, Architecture |
|
||||
| default | Architecture Design, AI Review, Architect Review, QA, Supervisor |
|
||||
| expert | AI Review, Architecture, Frontend, Security, QA, Supervisor |
|
||||
| dual | AI Review, Architecture, Frontend, Security, QA, Supervisor |
|
||||
|
||||
@ -136,12 +136,10 @@ movements:
|
||||
|
||||
| Piece | 用途 |
|
||||
|-------|------|
|
||||
| `default-mini` | ちょっとした修正向けです。計画 → 実装 → 並列レビュー → 修正の軽量構成です。 |
|
||||
| `default-test-first-mini` | テストファースト開発向けです。テストを先に書き、それを通す実装を行います。 |
|
||||
| `default` | 標準の開発 piece です。テスト先行+AIアンチパターンレビュー+並列レビュー(アーキテクチャ+スーパーバイザー)の構成です。 |
|
||||
| `frontend-mini` | フロントエンド向けの mini 構成です。 |
|
||||
| `backend-mini` | バックエンド向けの mini 構成です。 |
|
||||
| `expert-mini` | エキスパート向けの mini 構成です。 |
|
||||
| `default` | 本格的な開発向けです。並列レビュアーによる多段階レビューが付いています。TAKT 自身の開発にも使用しています。 |
|
||||
| `dual-mini` | フロントエンド+バックエンド向けの mini 構成です。 |
|
||||
|
||||
全ピース・ペルソナの一覧は [Builtin Catalog](./builtin-catalog.ja.md) を参照してください。
|
||||
|
||||
|
||||
@ -8,12 +8,10 @@ TAKT に同梱されているすべてのビルトイン piece と persona の
|
||||
|
||||
| Piece | 推奨用途 |
|
||||
|----------|-----------------|
|
||||
| `default-mini` | ちょっとした修正向けです。計画 → 実装 → 並列レビュー → 修正の軽量構成です。 |
|
||||
| `default` | 標準の開発 piece です。テスト先行+AIアンチパターンレビュー+並列レビュー(アーキテクチャ+スーパーバイザー)の構成です。計画 → テスト作成 → 実装 → AIアンチパターンレビュー → 並列レビュー → 完了。 |
|
||||
| `frontend-mini` | フロントエンド向けの mini 構成です。 |
|
||||
| `backend-mini` | バックエンド向けの mini 構成です。 |
|
||||
| `expert-mini` | エキスパート向けの mini 構成です。 |
|
||||
| `default-test-first-mini` | テストファースト開発向けです。テストを先に書き、それを通す実装を行います。 |
|
||||
| `default` | 本格的な開発向けです。並列レビュアーによる多段階レビューが付いています。TAKT 自身の開発にも使用しています。 |
|
||||
| `dual-mini` | フロントエンド+バックエンド向けの mini 構成です。 |
|
||||
|
||||
## 全ビルトイン Piece 一覧
|
||||
|
||||
@ -21,31 +19,27 @@ TAKT に同梱されているすべてのビルトイン piece と persona の
|
||||
|
||||
| カテゴリ | Piece | 説明 |
|
||||
|---------|----------|-------------|
|
||||
| 🚀 クイックスタート | `default-mini` | ミニ開発 piece: plan -> implement -> 並列レビュー (AI antipattern + supervisor) -> 必要に応じて修正。レビュー付き軽量版。 |
|
||||
| 🚀 クイックスタート | `default` | 標準の開発 piece です。テスト先行+AIアンチパターンレビュー+並列レビュー(アーキテクチャ+スーパーバイザー)の構成です。計画 → テスト作成 → 実装 → AIアンチパターンレビュー → 並列レビュー → 完了。 |
|
||||
| | `frontend-mini` | ミニフロントエンド piece: plan -> implement -> 並列レビュー (AI antipattern + supervisor)。フロントエンドナレッジ注入付き。 |
|
||||
| | `backend-mini` | ミニバックエンド piece: plan -> implement -> 並列レビュー (AI antipattern + supervisor)。バックエンドナレッジ注入付き。 |
|
||||
| | `default-test-first-mini` | テストファースト開発 piece: plan -> テスト作成 -> 実装 -> 並列レビュー -> 必要に応じて修正 -> 完了。 |
|
||||
| | `default` | フル開発 piece: plan -> implement -> AI review -> 並列レビュー (architect + QA) -> supervisor 承認。各レビュー段階に修正ループあり。 |
|
||||
| | `compound-eye` | マルチモデルレビュー: 同じ指示を Claude と Codex に同時送信し、両方のレスポンスを統合。 |
|
||||
| ⚡ Mini | `backend-cqrs-mini` | ミニ CQRS+ES piece: plan -> implement -> 並列レビュー (AI antipattern + supervisor)。CQRS+ES ナレッジ注入付き。 |
|
||||
| | `expert-mini` | ミニエキスパート piece: plan -> implement -> 並列レビュー (AI antipattern + expert supervisor)。フルスタックナレッジ注入付き。 |
|
||||
| | `expert-cqrs-mini` | ミニ CQRS+ES エキスパート piece: plan -> implement -> 並列レビュー (AI antipattern + expert supervisor)。CQRS+ES ナレッジ注入付き。 |
|
||||
| | `dual-mini` | ミニデュアル piece: plan -> implement -> 並列レビュー (AI antipattern + expert supervisor)。フロントエンド+バックエンドナレッジ注入付き。 |
|
||||
| | `dual-cqrs-mini` | ミニ CQRS+ES デュアル piece: plan -> implement -> 並列レビュー (AI antipattern + expert supervisor)。CQRS+ES ナレッジ注入付き。 |
|
||||
| 🎨 フロントエンド | `frontend` | フロントエンド特化開発 piece。React/Next.js に焦点を当てたレビューとナレッジ注入付き。 |
|
||||
| ⚙️ バックエンド | `backend` | バックエンド特化開発 piece。バックエンド、セキュリティ、QA エキスパートレビュー付き。 |
|
||||
| | `backend-cqrs` | CQRS+ES 特化バックエンド開発 piece。CQRS+ES、セキュリティ、QA エキスパートレビュー付き。 |
|
||||
| 🔧 エキスパート | `expert` | フルスタック開発 piece: architecture、frontend、security、QA レビューと修正ループ付き。 |
|
||||
| | `expert-cqrs` | フルスタック開発 piece (CQRS+ES 特化): CQRS+ES、frontend、security、QA レビューと修正ループ付き。 |
|
||||
| 🏗️ インフラストラクチャ | `terraform` | Terraform IaC 開発 piece: plan → implement → 並列レビュー → supervisor 検証 → 修正 → 完了。 |
|
||||
| 🛠️ リファクタリング | `structural-reform` | プロジェクト全体のレビューと構造改革: 段階的なファイル分割による反復的なコードベース再構築。 |
|
||||
| 🔧 デュアル | `dual` | フロントエンド+バックエンド開発 piece: architecture、frontend、security、QA レビューと修正ループ付き。 |
|
||||
| | `dual-cqrs` | フロントエンド+バックエンド開発 piece (CQRS+ES 特化): CQRS+ES、frontend、security、QA レビューと修正ループ付き。 |
|
||||
| 🏗️ インフラストラクチャ | `terraform` | Terraform IaC 開発 piece: plan → implement → 並列レビュー → 監督検証 → 修正 → 完了。 |
|
||||
| 🔍 レビュー | `review` | 多角コードレビュー: PR/ブランチ/作業中の差分を自動判定し、5つの並列観点(arch/security/QA/testing/requirements)からレビューして統合結果を出力。 |
|
||||
| 🧪 テスト | `unit-test` | ユニットテスト特化 piece: テスト分析 -> テスト実装 -> レビュー -> 修正。 |
|
||||
| | `e2e-test` | E2E テスト特化 piece: E2E 分析 -> E2E 実装 -> レビュー -> 修正 (Vitest ベースの E2E フロー)。 |
|
||||
| 🎵 TAKT 開発 | `takt-default` | TAKT 開発 piece: plan → テスト作成 → implement → AI レビュー → 5並列レビュー → 修正 → supervise → 完了。 |
|
||||
| | `takt-default-team-leader` | TAKT 開発 piece (team leader 版): plan → テスト作成 → team-leader implement → AI レビュー → 5並列レビュー → 修正 → supervise → 完了。 |
|
||||
| 🎵 TAKT開発 | `takt-default` | TAKT 開発 piece: 計画 → テスト作成 → 実装 → AIアンチパターンレビュー → 5並列レビュー → 修正 → 監督 → 完了。 |
|
||||
| | `takt-default-team-leader` | TAKT 開発 piece(チームリーダー版): 計画 → テスト作成 → チームリーダー実装 → AIアンチパターンレビュー → 5並列レビュー → 修正 → 監督 → 完了。 |
|
||||
| その他 | `research` | リサーチ piece: planner -> digger -> supervisor。質問せずに自律的にリサーチを実行。 |
|
||||
| | `deep-research` | ディープリサーチ piece: plan -> dig -> analyze -> supervise。発見駆動型の調査で、浮上した疑問を多角的に分析。 |
|
||||
| | `magi` | エヴァンゲリオンにインスパイアされた合議システム。3つの AI persona (MELCHIOR, BALTHASAR, CASPER) が分析・投票。 |
|
||||
| | `passthrough` | 最薄ラッパー。タスクを coder にそのまま渡す。レビューなし。 |
|
||||
|
||||
`takt switch` で piece をインタラクティブに切り替えできます。
|
||||
|
||||
@ -64,7 +58,7 @@ TAKT に同梱されているすべてのビルトイン piece と persona の
|
||||
| **security-reviewer** | セキュリティ脆弱性の評価 |
|
||||
| **conductor** | Phase 3 判定スペシャリスト: レポート/レスポンスを読み取りステータスタグを出力 |
|
||||
| **supervisor** | 最終検証、承認 |
|
||||
| **expert-supervisor** | エキスパートレベルの最終検証と包括的なレビュー統合 |
|
||||
| **dual-supervisor** | 複数専門レビューの統合検証とリリース可否判断 |
|
||||
| **research-planner** | リサーチタスクの計画とスコープ定義 |
|
||||
| **research-analyzer** | リサーチ結果の解釈と追加調査計画 |
|
||||
| **research-digger** | 深掘り調査と情報収集 |
|
||||
@ -72,6 +66,11 @@ TAKT に同梱されているすべてのビルトイン piece と persona の
|
||||
| **test-planner** | テスト戦略の分析と包括的なテスト計画 |
|
||||
| **testing-reviewer** | テスト重視のコードレビューとインテグレーションテスト要件分析 |
|
||||
| **requirements-reviewer** | 要件仕様と準拠性のレビュー |
|
||||
| **terraform-coder** | Terraform IaC の実装 |
|
||||
| **terraform-reviewer** | Terraform IaC のレビュー |
|
||||
| **melchior** | MAGI 合議システム: MELCHIOR-1(科学者の観点) |
|
||||
| **balthasar** | MAGI 合議システム: BALTHASAR-2(母親の観点) |
|
||||
| **casper** | MAGI 合議システム: CASPER-3(女性の観点) |
|
||||
| **pr-commenter** | レビュー結果を GitHub PR コメントとして投稿 |
|
||||
|
||||
## カスタム Persona
|
||||
|
||||
@ -8,12 +8,10 @@ A comprehensive catalog of all builtin pieces and personas included with TAKT.
|
||||
|
||||
| Piece | Recommended Use |
|
||||
|----------|-----------------|
|
||||
| `default-mini` | Quick fixes. Lightweight plan → implement → parallel review → fix loop. |
|
||||
| `default` | Standard development. Test-first with AI antipattern review and parallel review (architecture + supervisor). plan → write_tests → implement → AI antipattern review → parallel review → complete. |
|
||||
| `frontend-mini` | Frontend-focused mini configuration. |
|
||||
| `backend-mini` | Backend-focused mini configuration. |
|
||||
| `expert-mini` | Expert-level mini configuration. |
|
||||
| `default-test-first-mini` | Test-first development. Write tests first, then implement to pass them. |
|
||||
| `default` | Serious development. Multi-stage review with parallel reviewers. Used for TAKT's own development. |
|
||||
| `dual-mini` | Frontend + backend mini configuration. |
|
||||
|
||||
## All Builtin Pieces
|
||||
|
||||
@ -21,31 +19,27 @@ Organized by category.
|
||||
|
||||
| Category | Piece | Description |
|
||||
|----------|----------|-------------|
|
||||
| 🚀 Quick Start | `default-mini` | Mini development piece: plan -> implement -> parallel review (AI antipattern + supervisor) -> fix if needed. Lightweight with review. |
|
||||
| 🚀 Quick Start | `default` | Standard development. Test-first with AI antipattern review and parallel review (architecture + supervisor). plan → write_tests → implement → AI antipattern review → parallel review → complete. |
|
||||
| | `frontend-mini` | Mini frontend piece: plan -> implement -> parallel review (AI antipattern + supervisor) with frontend knowledge injection. |
|
||||
| | `backend-mini` | Mini backend piece: plan -> implement -> parallel review (AI antipattern + supervisor) with backend knowledge injection. |
|
||||
| | `default-test-first-mini` | Test-first development piece: plan -> write tests -> implement -> parallel review -> fix if needed -> complete. |
|
||||
| | `default` | Full development piece: plan -> implement -> AI review -> parallel review (architect + QA) -> supervisor approval. Includes fix loops at each review stage. |
|
||||
| | `compound-eye` | Multi-model review: sends the same instruction to Claude and Codex simultaneously, then synthesizes both responses. |
|
||||
| ⚡ Mini | `backend-cqrs-mini` | Mini CQRS+ES piece: plan -> implement -> parallel review (AI antipattern + supervisor) with CQRS+ES knowledge injection. |
|
||||
| | `expert-mini` | Mini expert piece: plan -> implement -> parallel review (AI antipattern + expert supervisor) with full-stack knowledge injection. |
|
||||
| | `expert-cqrs-mini` | Mini CQRS+ES expert piece: plan -> implement -> parallel review (AI antipattern + expert supervisor) with CQRS+ES knowledge injection. |
|
||||
| | `dual-mini` | Mini dual piece: plan -> implement -> parallel review (AI antipattern + expert supervisor) with frontend + backend knowledge injection. |
|
||||
| | `dual-cqrs-mini` | Mini CQRS+ES dual piece: plan -> implement -> parallel review (AI antipattern + expert supervisor) with CQRS+ES knowledge injection. |
|
||||
| 🎨 Frontend | `frontend` | Frontend-specialized development piece with React/Next.js focused reviews and knowledge injection. |
|
||||
| ⚙️ Backend | `backend` | Backend-specialized development piece with backend, security, and QA expert reviews. |
|
||||
| | `backend-cqrs` | CQRS+ES-specialized backend development piece with CQRS+ES, security, and QA expert reviews. |
|
||||
| 🔧 Expert | `expert` | Full-stack development piece: architecture, frontend, security, QA reviews with fix loops. |
|
||||
| | `expert-cqrs` | Full-stack development piece (CQRS+ES specialized): CQRS+ES, frontend, security, QA reviews with fix loops. |
|
||||
| 🔧 Dual | `dual` | Frontend + backend development piece: architecture, frontend, security, QA reviews with fix loops. |
|
||||
| | `dual-cqrs` | Frontend + backend development piece (CQRS+ES specialized): CQRS+ES, frontend, security, QA reviews with fix loops. |
|
||||
| 🏗️ Infrastructure | `terraform` | Terraform IaC development piece: plan → implement → parallel review → supervisor validation → fix → complete. |
|
||||
| 🛠️ Refactoring | `structural-reform` | Full project review and structural reform: iterative codebase restructuring with staged file splits. |
|
||||
| 🔍 Review | `review` | Multi-perspective code review: auto-detects PR/branch/working diff, reviews from 5 parallel perspectives (arch/security/QA/testing/requirements), outputs consolidated results. |
|
||||
| 🧪 Testing | `unit-test` | Unit test focused piece: test analysis -> test implementation -> review -> fix. |
|
||||
| | `e2e-test` | E2E test focused piece: E2E analysis -> E2E implementation -> review -> fix (Vitest-based E2E flow). |
|
||||
| 🎵 TAKT Development | `takt-default` | TAKT development piece: plan → write tests → implement → AI review → 5-parallel review → fix → supervise → complete. |
|
||||
| | `takt-default-team-leader` | TAKT development piece with team leader: plan → write tests → team-leader implement → AI review → 5-parallel review → fix → supervise → complete. |
|
||||
| 🎵 TAKT Development | `takt-default` | TAKT development piece: plan → write tests → implement → AI antipattern review → 5-parallel review → fix → supervise → complete. |
|
||||
| | `takt-default-team-leader` | TAKT development piece with team leader: plan → write tests → team-leader implement → AI antipattern review → 5-parallel review → fix → supervise → complete. |
|
||||
| Others | `research` | Research piece: planner -> digger -> supervisor. Autonomously executes research without asking questions. |
|
||||
| | `deep-research` | Deep research piece: plan -> dig -> analyze -> supervise. Discovery-driven investigation that follows emerging questions with multi-perspective analysis. |
|
||||
| | `magi` | Deliberation system inspired by Evangelion. Three AI personas (MELCHIOR, BALTHASAR, CASPER) analyze and vote. |
|
||||
| | `passthrough` | Thinnest wrapper. Pass task directly to coder as-is. No review. |
|
||||
|
||||
Use `takt switch` to switch pieces interactively.
|
||||
|
||||
@ -64,7 +58,7 @@ Use `takt switch` to switch pieces interactively.
|
||||
| **security-reviewer** | Security vulnerability assessment |
|
||||
| **conductor** | Phase 3 judgment specialist: reads reports/responses and outputs status tags |
|
||||
| **supervisor** | Final validation, approval |
|
||||
| **expert-supervisor** | Expert-level final validation with comprehensive review integration |
|
||||
| **dual-supervisor** | Multi-review integration validation and release readiness judgment |
|
||||
| **research-planner** | Research task planning and scope definition |
|
||||
| **research-analyzer** | Research result interpretation and additional investigation planning |
|
||||
| **research-digger** | Deep investigation and information gathering |
|
||||
@ -72,6 +66,11 @@ Use `takt switch` to switch pieces interactively.
|
||||
| **test-planner** | Test strategy analysis and comprehensive test planning |
|
||||
| **testing-reviewer** | Testing-focused code review with integration test requirements analysis |
|
||||
| **requirements-reviewer** | Requirements specification and compliance review |
|
||||
| **terraform-coder** | Terraform IaC implementation |
|
||||
| **terraform-reviewer** | Terraform IaC review |
|
||||
| **melchior** | MAGI deliberation system: MELCHIOR-1 (scientist perspective) |
|
||||
| **balthasar** | MAGI deliberation system: BALTHASAR-2 (mother perspective) |
|
||||
| **casper** | MAGI deliberation system: CASPER-3 (woman perspective) |
|
||||
| **pr-commenter** | Posts review findings as GitHub PR comments |
|
||||
|
||||
## Custom Personas
|
||||
|
||||
@ -173,6 +173,6 @@ TAKT は AI API(Claude または OpenAI)を使用するため、特に CI/CD
|
||||
|
||||
- **API 使用量の監視**: 予期しない請求を避けるため、AI provider で課金アラートを設定してください。
|
||||
- **`--quiet` モードの使用**: 出力量は削減されますが、API 呼び出し回数は減りません。
|
||||
- **適切な piece の選択**: シンプルな piece(例: `default-mini`)はマルチステージの piece(例: 並列レビュー付きの `default`)よりも API 呼び出しが少なくなります。
|
||||
- **適切な piece の選択**: シンプルな piece はマルチステージの piece(例: 並列レビュー付きの `default`)よりも API 呼び出しが少なくなります。
|
||||
- **CI トリガーの制限**: 意図しない実行を防ぐため、条件付きトリガー(例: `if: contains(github.event.comment.body, '@takt')`)を使用してください。
|
||||
- **`--provider mock` でのテスト**: CI パイプラインの開発中は mock provider を使用して、実際の API コストを回避してください。
|
||||
|
||||
@ -173,6 +173,6 @@ TAKT uses AI APIs (Claude or OpenAI), which can incur significant costs, especia
|
||||
|
||||
- **Monitor API usage**: Set up billing alerts with your AI provider to avoid unexpected charges.
|
||||
- **Use `--quiet` mode**: Reduces output volume but does not reduce API calls.
|
||||
- **Choose appropriate pieces**: Simpler pieces (e.g., `default-mini`) use fewer API calls than multi-stage pieces (e.g., `default` with parallel reviews).
|
||||
- **Choose appropriate pieces**: Simpler pieces use fewer API calls than multi-stage pieces (e.g., `default` with parallel reviews).
|
||||
- **Limit CI triggers**: Use conditional triggers (e.g., `if: contains(github.event.comment.body, '@takt')`) to prevent unintended executions.
|
||||
- **Test with `--provider mock`**: Use mock provider during CI pipeline development to avoid real API costs.
|
||||
|
||||
@ -103,7 +103,7 @@ Proceed with these task instructions? (Y/n) y
|
||||
takt --task "Fix bug"
|
||||
|
||||
# piece を指定
|
||||
takt --task "Add authentication" --piece expert
|
||||
takt --task "Add authentication" --piece dual
|
||||
|
||||
# PR を自動作成
|
||||
takt --task "Fix bug" --auto-pr
|
||||
@ -121,7 +121,7 @@ takt #6
|
||||
takt --issue 6
|
||||
|
||||
# Issue + piece 指定
|
||||
takt #6 --piece expert
|
||||
takt #6 --piece dual
|
||||
|
||||
# Issue + PR 自動作成
|
||||
takt #6 --auto-pr
|
||||
|
||||
@ -103,7 +103,7 @@ Use the `--task` option to skip interactive mode and execute directly.
|
||||
takt --task "Fix bug"
|
||||
|
||||
# Specify piece
|
||||
takt --task "Add authentication" --piece expert
|
||||
takt --task "Add authentication" --piece dual
|
||||
|
||||
# Auto-create PR
|
||||
takt --task "Fix bug" --auto-pr
|
||||
@ -121,7 +121,7 @@ takt #6
|
||||
takt --issue 6
|
||||
|
||||
# Issue + piece specification
|
||||
takt #6 --piece expert
|
||||
takt #6 --piece dual
|
||||
|
||||
# Issue + auto-create PR
|
||||
takt #6 --auto-pr
|
||||
|
||||
@ -73,7 +73,7 @@ interactive_preview_movements: 3 # インタラクティブモードでの move
|
||||
|
||||
# ビルトイン piece フィルタリング(省略可)
|
||||
# builtin_pieces_enabled: true # false ですべてのビルトインを無効化
|
||||
# disabled_builtins: [magi, passthrough] # 特定のビルトイン piece を無効化
|
||||
# disabled_builtins: [magi] # 特定のビルトイン piece を無効化
|
||||
|
||||
# pipeline 実行設定(省略可)
|
||||
# ブランチ名、コミットメッセージ、PR 本文をカスタマイズ
|
||||
@ -369,9 +369,9 @@ piece_categories:
|
||||
pieces: [default, simple]
|
||||
children:
|
||||
Backend:
|
||||
pieces: [expert-cqrs]
|
||||
pieces: [dual-cqrs]
|
||||
Frontend:
|
||||
pieces: [expert]
|
||||
pieces: [dual]
|
||||
Research:
|
||||
pieces: [research, magi]
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ interactive_preview_movements: 3 # Movement previews in interactive mode (0-10,
|
||||
|
||||
# Builtin piece filtering (optional)
|
||||
# builtin_pieces_enabled: true # Set false to disable all builtins
|
||||
# disabled_builtins: [magi, passthrough] # Disable specific builtin pieces
|
||||
# disabled_builtins: [magi] # Disable specific builtin pieces
|
||||
|
||||
# Pipeline execution configuration (optional)
|
||||
# Customize branch names, commit messages, and PR body.
|
||||
@ -369,9 +369,9 @@ piece_categories:
|
||||
pieces: [default, simple]
|
||||
children:
|
||||
Backend:
|
||||
pieces: [expert-cqrs]
|
||||
pieces: [dual-cqrs]
|
||||
Frontend:
|
||||
pieces: [expert]
|
||||
pieces: [dual]
|
||||
Research:
|
||||
pieces: [research, magi]
|
||||
|
||||
|
||||
@ -71,20 +71,19 @@ describe('default piece parallel reviewers movement', () => {
|
||||
const reviewersMovement = piece!.movements.find((s) => s.name === 'reviewers');
|
||||
expect(reviewersMovement).toBeDefined();
|
||||
expect(reviewersMovement!.parallel).toBeDefined();
|
||||
expect(reviewersMovement!.parallel).toHaveLength(3);
|
||||
expect(reviewersMovement!.parallel).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('should have arch-review, qa-review, and testing-review as parallel sub-movements', () => {
|
||||
it('should have arch-review and supervise as parallel sub-movements', () => {
|
||||
const piece = getBuiltinPiece('default', process.cwd());
|
||||
const reviewersMovement = piece!.movements.find((s) => s.name === 'reviewers')!;
|
||||
const subMovementNames = reviewersMovement.parallel!.map((s) => s.name);
|
||||
|
||||
expect(subMovementNames).toContain('arch-review');
|
||||
expect(subMovementNames).toContain('qa-review');
|
||||
expect(subMovementNames).toContain('testing-review');
|
||||
expect(subMovementNames).toContain('supervise');
|
||||
});
|
||||
|
||||
it('should have aggregate conditions on the reviewers parent movement', () => {
|
||||
it('should have multi-condition aggregate rules on the reviewers parent movement', () => {
|
||||
const piece = getBuiltinPiece('default', process.cwd());
|
||||
const reviewersMovement = piece!.movements.find((s) => s.name === 'reviewers')!;
|
||||
|
||||
@ -93,25 +92,37 @@ describe('default piece parallel reviewers movement', () => {
|
||||
|
||||
const allRule = reviewersMovement.rules!.find((r) => r.isAggregateCondition && r.aggregateType === 'all');
|
||||
expect(allRule).toBeDefined();
|
||||
expect(allRule!.aggregateConditionText).toBe('approved');
|
||||
expect(allRule!.next).toBe('supervise');
|
||||
// Multi-condition aggregate: first condition is always 'approved' (both en/ja)
|
||||
expect(Array.isArray(allRule!.aggregateConditionText)).toBe(true);
|
||||
expect((allRule!.aggregateConditionText as string[])[0]).toBe('approved');
|
||||
expect(allRule!.next).toBe('COMPLETE');
|
||||
|
||||
const anyRule = reviewersMovement.rules!.find((r) => r.isAggregateCondition && r.aggregateType === 'any');
|
||||
expect(anyRule).toBeDefined();
|
||||
expect(anyRule!.aggregateConditionText).toBe('needs_fix');
|
||||
// Multi-condition aggregate: first condition is always 'needs_fix' (both en/ja)
|
||||
expect(Array.isArray(anyRule!.aggregateConditionText)).toBe(true);
|
||||
expect((anyRule!.aggregateConditionText as string[])[0]).toBe('needs_fix');
|
||||
expect(anyRule!.next).toBe('fix');
|
||||
});
|
||||
|
||||
it('should have matching conditions on sub-movements for aggregation', () => {
|
||||
it('should have arch-review sub-movement with approved/needs_fix conditions', () => {
|
||||
const piece = getBuiltinPiece('default', process.cwd());
|
||||
const reviewersMovement = piece!.movements.find((s) => s.name === 'reviewers')!;
|
||||
|
||||
for (const subMovement of reviewersMovement.parallel!) {
|
||||
expect(subMovement.rules).toBeDefined();
|
||||
const conditions = subMovement.rules!.map((r) => r.condition);
|
||||
expect(conditions).toContain('approved');
|
||||
expect(conditions).toContain('needs_fix');
|
||||
}
|
||||
const archReview = reviewersMovement.parallel!.find((s) => s.name === 'arch-review')!;
|
||||
expect(archReview.rules).toBeDefined();
|
||||
const conditions = archReview.rules!.map((r) => r.condition);
|
||||
expect(conditions).toContain('approved');
|
||||
expect(conditions).toContain('needs_fix');
|
||||
});
|
||||
|
||||
it('should have supervise sub-movement with 2 conditions', () => {
|
||||
const piece = getBuiltinPiece('default', process.cwd());
|
||||
const reviewersMovement = piece!.movements.find((s) => s.name === 'reviewers')!;
|
||||
|
||||
const supervise = reviewersMovement.parallel!.find((s) => s.name === 'supervise')!;
|
||||
expect(supervise.rules).toBeDefined();
|
||||
expect(supervise.rules).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('should have ai_review transitioning to reviewers movement', () => {
|
||||
@ -155,8 +166,8 @@ describe('default piece parallel reviewers movement', () => {
|
||||
const archReview = reviewersMovement.parallel!.find((s) => s.name === 'arch-review')!;
|
||||
expect(archReview.persona).toContain('architecture-reviewer');
|
||||
|
||||
const qaReview = reviewersMovement.parallel!.find((s) => s.name === 'qa-review')!;
|
||||
expect(qaReview.persona).toContain('qa-reviewer');
|
||||
const supervise = reviewersMovement.parallel!.find((s) => s.name === 'supervise')!;
|
||||
expect(supervise.persona).toContain('supervisor');
|
||||
});
|
||||
|
||||
it('should have output contracts configured on sub-movements', () => {
|
||||
@ -166,8 +177,8 @@ describe('default piece parallel reviewers movement', () => {
|
||||
const archReview = reviewersMovement.parallel!.find((s) => s.name === 'arch-review')!;
|
||||
expect(archReview.outputContracts).toBeDefined();
|
||||
|
||||
const qaReview = reviewersMovement.parallel!.find((s) => s.name === 'qa-review')!;
|
||||
expect(qaReview.outputContracts).toBeDefined();
|
||||
const supervise = reviewersMovement.parallel!.find((s) => s.name === 'supervise')!;
|
||||
expect(supervise.outputContracts).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
@ -221,10 +232,10 @@ describe('loadPiece (builtin fallback)', () => {
|
||||
expect(piece).toBeNull();
|
||||
});
|
||||
|
||||
it('should load builtin pieces like default-mini, research, e2e-test', () => {
|
||||
const mini = loadPiece('default-mini', process.cwd());
|
||||
expect(mini).not.toBeNull();
|
||||
expect(mini!.name).toBe('default-mini');
|
||||
it('should load builtin pieces like default, research, e2e-test', () => {
|
||||
const defaultPiece = loadPiece('default', process.cwd());
|
||||
expect(defaultPiece).not.toBeNull();
|
||||
expect(defaultPiece!.name).toBe('default');
|
||||
|
||||
const research = loadPiece('research', process.cwd());
|
||||
expect(research).not.toBeNull();
|
||||
@ -253,7 +264,6 @@ describe('listPieces (builtin fallback)', () => {
|
||||
it('should include builtin pieces', () => {
|
||||
const pieces = listPieces(testDir);
|
||||
expect(pieces).toContain('default');
|
||||
expect(pieces).toContain('default-mini');
|
||||
expect(pieces).toContain('e2e-test');
|
||||
});
|
||||
|
||||
@ -281,7 +291,6 @@ describe('loadAllPieces (builtin fallback)', () => {
|
||||
it('should include builtin pieces in the map', () => {
|
||||
const pieces = loadAllPieces(testDir);
|
||||
expect(pieces.has('default')).toBe(true);
|
||||
expect(pieces.has('default-mini')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -170,7 +170,7 @@ describe('Piece Loader IT: agent path resolution', () => {
|
||||
});
|
||||
|
||||
it('should resolve relative agent paths from piece YAML location', () => {
|
||||
const config = loadPiece('default-mini', testDir);
|
||||
const config = loadPiece('default', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
for (const movement of config!.movements) {
|
||||
@ -203,7 +203,7 @@ describe('Piece Loader IT: rule syntax parsing', () => {
|
||||
rmSync(testDir, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
it('should parse all() aggregate conditions from default piece', () => {
|
||||
it('should parse all() multi-condition aggregate from default piece', () => {
|
||||
const config = loadPiece('default', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
@ -213,15 +213,17 @@ describe('Piece Loader IT: rule syntax parsing', () => {
|
||||
);
|
||||
expect(reviewersStep).toBeDefined();
|
||||
|
||||
// Should have aggregate rules
|
||||
// Should have aggregate rules with multi-condition (array)
|
||||
const allRule = reviewersStep!.rules?.find(
|
||||
(r) => r.isAggregateCondition && r.aggregateType === 'all',
|
||||
);
|
||||
expect(allRule).toBeDefined();
|
||||
expect(allRule!.aggregateConditionText).toBe('approved');
|
||||
// Multi-condition aggregate: all("approved", "All checks passed")
|
||||
expect(Array.isArray(allRule!.aggregateConditionText)).toBe(true);
|
||||
expect((allRule!.aggregateConditionText as string[])[0]).toBe('approved');
|
||||
});
|
||||
|
||||
it('should parse any() aggregate conditions from default piece', () => {
|
||||
it('should parse any() multi-condition aggregate from default piece', () => {
|
||||
const config = loadPiece('default', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
@ -233,11 +235,13 @@ describe('Piece Loader IT: rule syntax parsing', () => {
|
||||
(r) => r.isAggregateCondition && r.aggregateType === 'any',
|
||||
);
|
||||
expect(anyRule).toBeDefined();
|
||||
expect(anyRule!.aggregateConditionText).toBe('needs_fix');
|
||||
// Multi-condition aggregate: any("needs_fix", "...")
|
||||
expect(Array.isArray(anyRule!.aggregateConditionText)).toBe(true);
|
||||
expect((anyRule!.aggregateConditionText as string[])[0]).toBe('needs_fix');
|
||||
});
|
||||
|
||||
it('should parse standard rules with next movement', () => {
|
||||
const config = loadPiece('default-mini', testDir);
|
||||
const config = loadPiece('default', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
const implementStep = config!.movements.find((s) => s.name === 'implement');
|
||||
@ -265,14 +269,14 @@ describe('Piece Loader IT: piece config validation', () => {
|
||||
});
|
||||
|
||||
it('should set max_movements from YAML', () => {
|
||||
const config = loadPiece('default-mini', testDir);
|
||||
const config = loadPiece('default', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
expect(typeof config!.maxMovements).toBe('number');
|
||||
expect(config!.maxMovements).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
it('should set initial_movement from YAML', () => {
|
||||
const config = loadPiece('default-mini', testDir);
|
||||
const config = loadPiece('default', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
expect(typeof config!.initialMovement).toBe('string');
|
||||
|
||||
@ -295,16 +299,16 @@ describe('Piece Loader IT: piece config validation', () => {
|
||||
}
|
||||
}
|
||||
|
||||
// expert: implement movement should have edit: true
|
||||
const expertConfig = loadPiece('expert', testDir);
|
||||
expect(expertConfig).not.toBeNull();
|
||||
const implementStep = expertConfig!.movements.find((s) => s.name === 'implement');
|
||||
// dual: implement movement should have edit: true
|
||||
const dualConfig = loadPiece('dual', testDir);
|
||||
expect(dualConfig).not.toBeNull();
|
||||
const implementStep = dualConfig!.movements.find((s) => s.name === 'implement');
|
||||
expect(implementStep).toBeDefined();
|
||||
expect(implementStep!.edit).toBe(true);
|
||||
});
|
||||
|
||||
it('should set passPreviousResponse from YAML', () => {
|
||||
const config = loadPiece('default-mini', testDir);
|
||||
const config = loadPiece('default', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
// At least some movements should have passPreviousResponse set
|
||||
@ -342,8 +346,8 @@ describe('Piece Loader IT: parallel movement loading', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('should load 4 parallel reviewers from expert piece', () => {
|
||||
const config = loadPiece('expert', testDir);
|
||||
it('should load 4 parallel reviewers from dual piece', () => {
|
||||
const config = loadPiece('dual', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
const parallelStep = config!.movements.find(
|
||||
@ -380,8 +384,8 @@ describe('Piece Loader IT: report config loading', () => {
|
||||
expect(planStep!.outputContracts).toBeDefined();
|
||||
});
|
||||
|
||||
it('should load multi-report config from expert piece', () => {
|
||||
const config = loadPiece('expert', testDir);
|
||||
it('should load multi-report config from dual piece', () => {
|
||||
const config = loadPiece('dual', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
// implement movement has multi-output contracts: [Scope, Decisions]
|
||||
@ -622,138 +626,6 @@ movements:
|
||||
});
|
||||
});
|
||||
|
||||
describe('Piece Loader IT: structural-reform piece', () => {
|
||||
let testDir: string;
|
||||
|
||||
beforeEach(() => {
|
||||
testDir = createTestDir();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
rmSync(testDir, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
it('should load structural-reform with 7 movements', () => {
|
||||
const config = loadPiece('structural-reform', testDir);
|
||||
|
||||
expect(config).not.toBeNull();
|
||||
expect(config!.name).toBe('structural-reform');
|
||||
expect(config!.movements.length).toBe(7);
|
||||
expect(config!.maxMovements).toBe(50);
|
||||
expect(config!.initialMovement).toBe('review');
|
||||
});
|
||||
|
||||
it('should have expected movement names in order', () => {
|
||||
const config = loadPiece('structural-reform', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
const movementNames = config!.movements.map((m) => m.name);
|
||||
expect(movementNames).toEqual([
|
||||
'review',
|
||||
'plan_reform',
|
||||
'implement',
|
||||
'reviewers',
|
||||
'fix',
|
||||
'verify',
|
||||
'next_target',
|
||||
]);
|
||||
});
|
||||
|
||||
it('should have review as read-only with instruction_template', () => {
|
||||
const config = loadPiece('structural-reform', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
const review = config!.movements.find((m) => m.name === 'review');
|
||||
expect(review).toBeDefined();
|
||||
expect(review!.edit).not.toBe(true);
|
||||
expect(review!.instructionTemplate).toBeDefined();
|
||||
expect(review!.instructionTemplate).toContain('{task}');
|
||||
});
|
||||
|
||||
it('should have implement with edit: true and session: refresh', () => {
|
||||
const config = loadPiece('structural-reform', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
const implement = config!.movements.find((m) => m.name === 'implement');
|
||||
expect(implement).toBeDefined();
|
||||
expect(implement!.edit).toBe(true);
|
||||
expect(implement!.session).toBe('refresh');
|
||||
});
|
||||
|
||||
it('should have 2 parallel reviewers (arch-review and qa-review)', () => {
|
||||
const config = loadPiece('structural-reform', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
const reviewers = config!.movements.find(
|
||||
(m) => m.parallel && m.parallel.length > 0,
|
||||
);
|
||||
expect(reviewers).toBeDefined();
|
||||
expect(reviewers!.parallel!.length).toBe(2);
|
||||
|
||||
const subNames = reviewers!.parallel!.map((s) => s.name);
|
||||
expect(subNames).toContain('arch-review');
|
||||
expect(subNames).toContain('qa-review');
|
||||
});
|
||||
|
||||
it('should have aggregate rules on reviewers movement', () => {
|
||||
const config = loadPiece('structural-reform', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
const reviewers = config!.movements.find(
|
||||
(m) => m.parallel && m.parallel.length > 0,
|
||||
);
|
||||
expect(reviewers).toBeDefined();
|
||||
|
||||
const allRule = reviewers!.rules?.find(
|
||||
(r) => r.isAggregateCondition && r.aggregateType === 'all',
|
||||
);
|
||||
expect(allRule).toBeDefined();
|
||||
expect(allRule!.aggregateConditionText).toBe('approved');
|
||||
expect(allRule!.next).toBe('verify');
|
||||
|
||||
const anyRule = reviewers!.rules?.find(
|
||||
(r) => r.isAggregateCondition && r.aggregateType === 'any',
|
||||
);
|
||||
expect(anyRule).toBeDefined();
|
||||
expect(anyRule!.aggregateConditionText).toBe('needs_fix');
|
||||
expect(anyRule!.next).toBe('fix');
|
||||
});
|
||||
|
||||
it('should have verify movement with instruction_template', () => {
|
||||
const config = loadPiece('structural-reform', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
const verify = config!.movements.find((m) => m.name === 'verify');
|
||||
expect(verify).toBeDefined();
|
||||
expect(verify!.edit).not.toBe(true);
|
||||
expect(verify!.instructionTemplate).toBeDefined();
|
||||
});
|
||||
|
||||
it('should have next_target movement routing to implement or COMPLETE', () => {
|
||||
const config = loadPiece('structural-reform', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
const nextTarget = config!.movements.find((m) => m.name === 'next_target');
|
||||
expect(nextTarget).toBeDefined();
|
||||
expect(nextTarget!.edit).not.toBe(true);
|
||||
|
||||
const nextValues = nextTarget!.rules?.map((r) => r.next);
|
||||
expect(nextValues).toContain('implement');
|
||||
expect(nextValues).toContain('COMPLETE');
|
||||
});
|
||||
|
||||
it('should have loop_monitors for implement-fix cycle', () => {
|
||||
const config = loadPiece('structural-reform', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
expect(config!.loopMonitors).toBeDefined();
|
||||
expect(config!.loopMonitors!.length).toBe(1);
|
||||
|
||||
const monitor = config!.loopMonitors![0]!;
|
||||
expect(monitor.cycle).toEqual(['implement', 'fix']);
|
||||
expect(monitor.threshold).toBe(3);
|
||||
expect(monitor.judge).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Piece Loader IT: invalid YAML handling', () => {
|
||||
let testDir: string;
|
||||
|
||||
@ -98,7 +98,7 @@ function createEngine(config: PieceConfig, dir: string, task: string): PieceEngi
|
||||
});
|
||||
}
|
||||
|
||||
describe('Piece Patterns IT: default-mini piece', () => {
|
||||
describe('Piece Patterns IT: default piece (happy path)', () => {
|
||||
let testDir: string;
|
||||
|
||||
beforeEach(() => {
|
||||
@ -111,37 +111,43 @@ describe('Piece Patterns IT: default-mini piece', () => {
|
||||
rmSync(testDir, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
it('should complete: plan → implement → reviewers (parallel: ai_review + supervise) → COMPLETE', async () => {
|
||||
const config = loadPiece('default-mini', testDir);
|
||||
it('should complete: plan → write_tests → implement → ai_review → reviewers (parallel: arch-review + supervise) → COMPLETE', async () => {
|
||||
const config = loadPiece('default', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
setMockScenario([
|
||||
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible.' },
|
||||
{ persona: 'coder', status: 'done', content: 'Implementation complete.' },
|
||||
{ persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues.' },
|
||||
{ persona: 'supervisor', status: 'done', content: 'All checks passed.' },
|
||||
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementable' },
|
||||
{ persona: 'coder', status: 'done', content: 'Tests written successfully' },
|
||||
{ persona: 'coder', status: 'done', content: 'Implementation complete' },
|
||||
{ persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues' },
|
||||
{ persona: 'architecture-reviewer', status: 'done', content: 'approved' },
|
||||
{ persona: 'supervisor', status: 'done', content: 'All checks passed' },
|
||||
]);
|
||||
|
||||
const engine = createEngine(config!, testDir, 'Test task');
|
||||
const state = await engine.run();
|
||||
|
||||
expect(state.status).toBe('completed');
|
||||
expect(state.iteration).toBe(3);
|
||||
expect(state.iteration).toBe(5);
|
||||
});
|
||||
|
||||
it('should ABORT when implement cannot proceed', async () => {
|
||||
const config = loadPiece('default-mini', testDir);
|
||||
it('should route implement → ai_review even when implement cannot proceed', async () => {
|
||||
const config = loadPiece('default', testDir);
|
||||
|
||||
setMockScenario([
|
||||
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible.' },
|
||||
{ persona: 'coder', status: 'done', content: 'Cannot proceed, insufficient info.' },
|
||||
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementable' },
|
||||
{ persona: 'coder', status: 'done', content: 'Tests written successfully' },
|
||||
{ persona: 'coder', status: 'done', content: 'Cannot proceed, insufficient info' },
|
||||
{ persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues' },
|
||||
{ persona: 'architecture-reviewer', status: 'done', content: 'approved' },
|
||||
{ persona: 'supervisor', status: 'done', content: 'All checks passed' },
|
||||
]);
|
||||
|
||||
const engine = createEngine(config!, testDir, 'Vague task');
|
||||
const state = await engine.run();
|
||||
|
||||
expect(state.status).toBe('aborted');
|
||||
expect(state.iteration).toBe(2);
|
||||
expect(state.status).toBe('completed');
|
||||
expect(state.iteration).toBe(5);
|
||||
});
|
||||
|
||||
});
|
||||
@ -231,7 +237,7 @@ describe('Piece Patterns IT: default piece (parallel reviewers)', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Piece Patterns IT: default-test-first-mini piece', () => {
|
||||
describe('Piece Patterns IT: default piece (write_tests skip path)', () => {
|
||||
let testDir: string;
|
||||
|
||||
beforeEach(() => {
|
||||
@ -245,14 +251,15 @@ describe('Piece Patterns IT: default-test-first-mini piece', () => {
|
||||
});
|
||||
|
||||
it('should continue to implement when tests cannot be written because target is not implemented', async () => {
|
||||
const config = loadPiece('default-test-first-mini', testDir);
|
||||
const config = loadPiece('default', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
setMockScenario([
|
||||
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible' },
|
||||
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementable' },
|
||||
{ persona: 'coder', status: 'done', content: 'Cannot proceed because the test target is not implemented yet, so skip test writing' },
|
||||
{ persona: 'coder', status: 'done', content: 'Implementation complete' },
|
||||
{ persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues' },
|
||||
{ persona: 'architecture-reviewer', status: 'done', content: 'approved' },
|
||||
{ persona: 'supervisor', status: 'done', content: 'All checks passed' },
|
||||
]);
|
||||
|
||||
@ -395,7 +402,7 @@ describe('Piece Patterns IT: review piece', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Piece Patterns IT: expert piece (4 parallel reviewers)', () => {
|
||||
describe('Piece Patterns IT: dual piece (4 parallel reviewers)', () => {
|
||||
let testDir: string;
|
||||
|
||||
beforeEach(() => {
|
||||
@ -409,7 +416,7 @@ describe('Piece Patterns IT: expert piece (4 parallel reviewers)', () => {
|
||||
});
|
||||
|
||||
it('should complete with all("approved") in 4-parallel review', async () => {
|
||||
const config = loadPiece('expert', testDir);
|
||||
const config = loadPiece('dual', testDir);
|
||||
expect(config).not.toBeNull();
|
||||
|
||||
setMockScenario([
|
||||
@ -422,10 +429,10 @@ describe('Piece Patterns IT: expert piece (4 parallel reviewers)', () => {
|
||||
{ persona: 'security-reviewer', status: 'done', content: '[SECURITY-REVIEW:1]\n\napproved' },
|
||||
{ persona: 'qa-reviewer', status: 'done', content: '[QA-REVIEW:1]\n\napproved' },
|
||||
// Supervisor
|
||||
{ persona: 'expert-supervisor', status: 'done', content: '[SUPERVISE:1]\n\nAll validations pass.' },
|
||||
{ persona: 'dual-supervisor', status: 'done', content: '[SUPERVISE:1]\n\nAll validations pass.' },
|
||||
]);
|
||||
|
||||
const engine = createEngine(config!, testDir, 'Expert review task');
|
||||
const engine = createEngine(config!, testDir, 'Dual review task');
|
||||
const state = await engine.run();
|
||||
|
||||
expect(state.status).toBe('completed');
|
||||
|
||||
@ -280,17 +280,20 @@ describe('Pipeline Modes IT: --task + --piece name (builtin)', () => {
|
||||
rmSync(testDir, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
it('should load and execute builtin minimal piece by name', async () => {
|
||||
it('should load and execute builtin default piece by name', async () => {
|
||||
// Flow: plan → write_tests → implement → ai_review → reviewers(arch-review + supervise) → COMPLETE
|
||||
setMockScenario([
|
||||
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible.' },
|
||||
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementable' },
|
||||
{ persona: 'coder', status: 'done', content: 'Tests written successfully' },
|
||||
{ persona: 'coder', status: 'done', content: 'Implementation complete' },
|
||||
{ persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues' },
|
||||
{ persona: 'architecture-reviewer', status: 'done', content: 'approved' },
|
||||
{ persona: 'supervisor', status: 'done', content: 'All checks passed' },
|
||||
]);
|
||||
|
||||
const exitCode = await executePipeline({
|
||||
task: 'Add a feature',
|
||||
piece: 'default-mini',
|
||||
piece: 'default',
|
||||
autoPr: false,
|
||||
skipGit: true,
|
||||
cwd: testDir,
|
||||
|
||||
@ -227,19 +227,21 @@ describe('Pipeline Integration Tests', () => {
|
||||
});
|
||||
|
||||
it('should complete pipeline with piece name + skip-git + mock scenario', async () => {
|
||||
// Use builtin 'default-mini' piece
|
||||
// Use builtin 'default' piece
|
||||
// persona field: extractPersonaName result (from .md filename)
|
||||
// tag in content: [MOVEMENT_NAME:N] where MOVEMENT_NAME is the movement name uppercased
|
||||
// Flow: plan → write_tests → implement → ai_review → reviewers(arch-review + supervise) → COMPLETE
|
||||
setMockScenario([
|
||||
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible.' },
|
||||
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementable' },
|
||||
{ persona: 'coder', status: 'done', content: 'Tests written successfully' },
|
||||
{ persona: 'coder', status: 'done', content: 'Implementation complete' },
|
||||
{ persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues' },
|
||||
{ persona: 'architecture-reviewer', status: 'done', content: 'approved' },
|
||||
{ persona: 'supervisor', status: 'done', content: 'All checks passed' },
|
||||
]);
|
||||
|
||||
const exitCode = await executePipeline({
|
||||
task: 'Add a hello world function',
|
||||
piece: 'default-mini',
|
||||
piece: 'default',
|
||||
autoPr: false,
|
||||
skipGit: true,
|
||||
cwd: testDir,
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Tests for expert/expert-cqrs piece parallel review structure.
|
||||
* Tests for dual/dual-cqrs piece parallel review structure.
|
||||
*
|
||||
* Validates that:
|
||||
* - expert and expert-cqrs pieces load successfully via loadPiece
|
||||
* - dual and dual-cqrs pieces load successfully via loadPiece
|
||||
* - The reviewers movement is a parallel movement with expected sub-movements
|
||||
* - ai_review routes to reviewers (not individual review movements)
|
||||
* - fix movement routes back to reviewers
|
||||
@ -13,12 +13,12 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { loadPiece } from '../infra/config/index.js';
|
||||
|
||||
describe('expert piece parallel structure', () => {
|
||||
const piece = loadPiece('expert', process.cwd());
|
||||
describe('dual piece parallel structure', () => {
|
||||
const piece = loadPiece('dual', process.cwd());
|
||||
|
||||
it('should load successfully', () => {
|
||||
expect(piece).not.toBeNull();
|
||||
expect(piece!.name).toBe('expert');
|
||||
expect(piece!.name).toBe('dual');
|
||||
});
|
||||
|
||||
it('should have a reviewers parallel movement', () => {
|
||||
@ -94,12 +94,12 @@ describe('expert piece parallel structure', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('expert-cqrs piece parallel structure', () => {
|
||||
const piece = loadPiece('expert-cqrs', process.cwd());
|
||||
describe('dual-cqrs piece parallel structure', () => {
|
||||
const piece = loadPiece('dual-cqrs', process.cwd());
|
||||
|
||||
it('should load successfully', () => {
|
||||
expect(piece).not.toBeNull();
|
||||
expect(piece!.name).toBe('expert-cqrs');
|
||||
expect(piece!.name).toBe('dual-cqrs');
|
||||
});
|
||||
|
||||
it('should have a reviewers parallel movement', () => {
|
||||
Loading…
x
Reference in New Issue
Block a user