Merge pull request #279 from nrslib/release/v0.17.0

Release v0.17.0
This commit is contained in:
nrs 2026-02-15 12:04:36 +09:00 committed by GitHub
commit 90c026ef18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
103 changed files with 2684 additions and 857 deletions

View File

@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [0.17.0] - 2026-02-15
### Added
- **mini ピースシリーズ**: `default-mini``frontend-mini``backend-mini``backend-cqrs-mini` を追加 — `coding`/`minimal` の後継として、並列レビューAI アンチパターン+スーパーバイザー)付きの軽量開発ピースを提供
- ピースカテゴリに「⚡ Mini」カテゴリを追加
- `supervisor-validation` 出力契約を追加 — 要件充足チェックテーブルRequirements Fulfillment Checkで要件ごとにコード根拠を提示する形式
- `getJudgmentReportFiles()`: `use_judge` フラグにより Phase 3 ステータス判定の対象レポートをフィルタリング可能に
- Output contract に finding_id トラッキングを追加new/persists/resolved セクションによる指摘の追跡)
### Changed
- **BREAKING: `coding` ピースと `minimal` ピースを削除** — mini ピースシリーズに置き換え。`coding``default-mini``minimal``default-mini` への移行を推奨
- **BREAKING: Output contract を item 形式に統一**`use_judge`boolean`format`stringフィールドを必須化し、`OutputContractLabelPath`label:path 形式)を廃止
- ランタイム環境ディレクトリを `.runtime` から `.takt/.runtime` に移動
- スーパーバイザーの要件充足検証を強化: 要件を個別に抽出し、コードfile:lineに対して1件ずつ検証する方式に変更 — 「おおむね完了」は APPROVE の根拠にならない
### Fixed
- クローン/worktree ディレクトリの削除にリトライ機構を追加(`maxRetries: 3`, `retryDelay: 200`)— ファイルロックによる一時的な削除失敗を軽減
### Internal
- `review-summary` 出力契約を削除(`supervisor-validation` に統合)
- 全ビルトインピース、e2e フィクスチャ、テストを output contract の新形式に更新
## [0.16.0] - 2026-02-15
### Added

View File

@ -304,7 +304,7 @@ takt reset categories
| Piece | Recommended Use |
|----------|-----------------|
| `default` | Serious development tasks. Used for TAKT's own development. Multi-stage review with parallel reviews (architect + security). |
| `minimal` | Simple fixes and straightforward tasks. Minimal piece with basic review. |
| `default-mini` | Simple fixes and straightforward tasks. Lightweight piece with AI antipattern review + supervisor. |
| `review-fix-minimal` | Review & fix piece. Specialized for iterative improvement based on review feedback. |
| `research` | Investigation and research. Autonomously executes research without asking questions. |
@ -460,13 +460,15 @@ TAKT includes multiple builtin pieces:
| Piece | Description |
|----------|-------------|
| `default` | Full development piece: plan → implement → AI review → parallel review (architect + QA) → supervisor approval. Includes fix loops at each review stage. |
| `minimal` | Quick piece: plan → implement → review → supervisor. Minimal steps for fast iteration. |
| `default-mini` | Mini development piece: plan → implement → parallel review (AI antipattern + supervisor) → fix if needed. Lightweight with review. |
| `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. |
| `backend-cqrs-mini` | Mini CQRS+ES piece: plan → implement → parallel review (AI antipattern + supervisor) with CQRS+ES knowledge injection. |
| `review-fix-minimal` | Review-focused piece: review → fix → supervisor. For iterative improvement based on review feedback. |
| `research` | Research piece: planner → digger → supervisor. Autonomously executes research without asking questions. |
| `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. |
| `magi` | Deliberation system inspired by Evangelion. Three AI personas (MELCHIOR, BALTHASAR, CASPER) analyze and vote. |
| `coding` | Lightweight development piece: planner → implement → parallel review (AI antipattern + architecture) → fix. Fast feedback loop without supervisor. |
| `passthrough` | Thinnest wrapper. Pass task directly to coder as-is. No review. |
| `compound-eye` | Multi-model review: sends the same instruction to Claude and Codex simultaneously, then synthesizes both responses. |
| `review-only` | Read-only code review piece that makes no changes. |

View File

@ -4,7 +4,11 @@ Run tests, verify the build, and perform final approval.
1. Whether the plan and implementation results are consistent
2. Whether findings from each review movement have been addressed
3. Whether each task spec requirement has been achieved
- Do not rely on the plan report's judgment; independently verify each requirement against actual code (file:line)
- Extract requirements one by one from the task spec
- For each requirement, identify the implementing code (file:line)
- Verify the code actually fulfills the requirement (read the file, run the test)
- Do not rely on the plan report's judgment; independently verify each requirement
- If any requirement is unfulfilled, REJECT
**Report verification:** Read all reports in the Report Directory and
check for any unaddressed improvement suggestions.
@ -15,10 +19,22 @@ check for any unaddressed improvement suggestions.
## Result: APPROVE / REJECT
## Requirements Fulfillment Check
Extract requirements from the task spec and verify each one individually against actual code.
| # | Requirement (extracted from task spec) | Met | Evidence (file:line) |
|---|---------------------------------------|-----|---------------------|
| 1 | {requirement 1} | ✅/❌ | `src/file.ts:42` |
| 2 | {requirement 2} | ✅/❌ | `src/file.ts:55` |
- If any ❌ exists, REJECT is mandatory
- ✅ without evidence is invalid (must verify against actual code)
- Do not rely on plan report's judgment; independently verify each requirement
## Verification Summary
| Item | Status | Verification method |
|------|--------|-------------------|
| Requirements met | ✅ | Cross-checked with requirements list |
| Tests | ✅ | `npm test` (N passed) |
| Build | ✅ | `npm run build` succeeded |
| Functional check | ✅ | Main flows verified |

View File

@ -14,12 +14,26 @@
| Context fit | ✅ | - |
| Scope | ✅ | - |
## Issues (if REJECT)
| # | Category | Location | Issue |
|---|----------|----------|-------|
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
## Current Iteration Findings (new)
| # | finding_id | Category | Location | Issue | Fix Suggestion |
|---|------------|----------|----------|-------|----------------|
| 1 | AI-NEW-src-file-L23 | Hallucinated API | `src/file.ts:23` | Non-existent method | Replace with existing API |
## Carry-over Findings (persists)
| # | finding_id | Previous Evidence | Current Evidence | Issue | Fix Suggestion |
|---|------------|-------------------|------------------|-------|----------------|
| 1 | AI-PERSIST-src-file-L42 | `src/file.ts:42` | `src/file.ts:42` | Still unresolved | Apply prior fix plan |
## Resolved Findings (resolved)
| finding_id | Resolution Evidence |
|------------|---------------------|
| AI-RESOLVED-src-file-L10 | `src/file.ts:10` no longer contains the issue |
## Rejection Gate
- REJECT is valid only when at least one finding exists in `new` or `persists`
- Findings without `finding_id` are invalid
```
**Cognitive load reduction rules:**
- No issues → Summary sentence + checklist only (10 lines or fewer)
- Issues found → + Issues in table format (25 lines or fewer)
- No issues → Summary sentence + checklist + empty finding sections (10 lines or fewer)
- Issues found → include table rows only for impacted sections (30 lines or fewer)

View File

@ -14,22 +14,28 @@
- [x] Dead code
- [x] Call chain verification
## Previous Open Findings
| finding_id | Previous Status | Current Status (new/persists/resolved) | Evidence |
|------------|-----------------|-----------------------------------------|----------|
| ARCH-EXAMPLE-src-file-L42 | open | persists | `src/file.ts:42` |
## Issues (if REJECT)
| # | finding_id | Status (new/persists) | Scope | Location | Issue | Fix Suggestion |
|---|------------|-----------------------|-------|----------|-------|----------------|
| 1 | ARCH-EXAMPLE-src-file-L42 | new | In-scope | `src/file.ts:42` | Issue description | Fix approach |
## Current Iteration Findings (new)
| # | finding_id | Scope | Location | Issue | Fix Suggestion |
|---|------------|-------|----------|-------|----------------|
| 1 | ARCH-NEW-src-file-L42 | In-scope | `src/file.ts:42` | Issue description | Fix approach |
Scope: "In-scope" (fixable in this change) / "Out-of-scope" (existing issue, non-blocking)
## Existing Issues (reference, non-blocking)
- {Record of existing issues unrelated to the current change}
## Carry-over Findings (persists)
| # | finding_id | Previous Evidence | Current Evidence | Issue | Fix Suggestion |
|---|------------|-------------------|------------------|-------|----------------|
| 1 | ARCH-PERSIST-src-file-L77 | `src/file.ts:77` | `src/file.ts:77` | Still unresolved | Apply prior fix plan |
## Resolved Findings (resolved)
| finding_id | Resolution Evidence |
|------------|---------------------|
| ARCH-RESOLVED-src-file-L10 | `src/file.ts:10` now satisfies the rule |
## Rejection Gate
- REJECT is valid only when at least one finding exists in `new` or `persists`
- Findings without `finding_id` are invalid
```
**Cognitive load reduction rules:**
- APPROVE → Summary only (5 lines or fewer)
- REJECT → Issues in table format (30 lines or fewer)
- REJECT → Include only relevant finding rows (30 lines or fewer)

View File

@ -15,13 +15,22 @@
| Documentation | ✅ | - |
| Maintainability | ✅ | - |
## Previous Open Findings
| finding_id | Previous Status | Current Status (new/persists/resolved) | Evidence |
|------------|-----------------|-----------------------------------------|----------|
| QA-EXAMPLE-src-file-L42 | open | persists | `src/file.ts:42` |
## Current Iteration Findings (new)
| # | finding_id | Category | Location | Issue | Fix Suggestion |
|---|------------|----------|----------|-------|----------------|
| 1 | QA-NEW-src-test-L42 | Testing | `src/test.ts:42` | Missing negative test | Add failure-path test |
## Issues (if REJECT)
| # | finding_id | Status (new/persists) | Category | Issue | Fix Suggestion |
|---|------------|-----------------------|----------|-------|----------------|
| 1 | QA-EXAMPLE-src-file-L42 | new | Testing | Issue description | Fix approach |
## Carry-over Findings (persists)
| # | finding_id | Previous Evidence | Current Evidence | Issue | Fix Suggestion |
|---|------------|-------------------|------------------|-------|----------------|
| 1 | QA-PERSIST-src-test-L77 | `src/test.ts:77` | `src/test.ts:77` | Still flaky | Stabilize assertion & setup |
## Resolved Findings (resolved)
| finding_id | Resolution Evidence |
|------------|---------------------|
| QA-RESOLVED-src-test-L10 | `src/test.ts:10` now covers error path |
## Rejection Gate
- REJECT is valid only when at least one finding exists in `new` or `persists`
- Findings without `finding_id` are invalid
```

View File

@ -1,23 +0,0 @@
```markdown
# Review Summary
## Overall Verdict: APPROVE / REJECT
## Summary
{Integrate all review results in 2-3 sentences}
## Review Results
| Review | Result | Key Findings |
|--------|--------|-------------|
| Architecture | APPROVE/REJECT | {Overview} |
| Security | APPROVE/REJECT | {Overview} |
| AI Anti-pattern | APPROVE/REJECT | {Overview} |
## Critical Issues
| # | Severity | Source | Location | Issue |
|---|----------|--------|----------|-------|
| 1 | High | Security | `file:line` | Description |
## Improvement Suggestions
- {Consolidated suggestions from all reviews}
```

View File

@ -13,16 +13,30 @@
| Data Protection | ✅ | - |
| Dependencies | ✅ | - |
## Vulnerabilities (if REJECT)
| # | Severity | Type | Location | Fix Suggestion |
|---|----------|------|----------|----------------|
| 1 | High | SQLi | `src/db.ts:42` | Use parameterized queries |
## Current Iteration Findings (new)
| # | finding_id | Severity | Type | Location | Issue | Fix Suggestion |
|---|------------|----------|------|----------|-------|----------------|
| 1 | SEC-NEW-src-db-L42 | High | SQLi | `src/db.ts:42` | Raw query string | Use parameterized queries |
## Carry-over Findings (persists)
| # | finding_id | Previous Evidence | Current Evidence | Issue | Fix Suggestion |
|---|------------|-------------------|------------------|-------|----------------|
| 1 | SEC-PERSIST-src-auth-L18 | `src/auth.ts:18` | `src/auth.ts:18` | Weak validation persists | Harden validation |
## Resolved Findings (resolved)
| finding_id | Resolution Evidence |
|------------|---------------------|
| SEC-RESOLVED-src-db-L10 | `src/db.ts:10` now uses bound parameters |
## Warnings (non-blocking)
- {Security recommendations}
## Rejection Gate
- REJECT is valid only when at least one finding exists in `new` or `persists`
- Findings without `finding_id` are invalid
```
**Cognitive load reduction rules:**
- No issues → Checklist only (10 lines or fewer)
- Warnings present → + Warnings in 1-2 lines (15 lines or fewer)
- Vulnerabilities found → + Table format (30 lines or fewer)
- Warnings only → + Warnings in 1-2 lines (15 lines or fewer)
- Vulnerabilities found → + finding tables (30 lines or fewer)

View File

@ -0,0 +1,48 @@
```markdown
# Final Validation Results
## Result: APPROVE / REJECT
## Requirements Fulfillment Check
Extract requirements from the task spec and verify each one individually against actual code.
| # | Requirement (extracted from task spec) | Met | Evidence (file:line) |
|---|---------------------------------------|-----|---------------------|
| 1 | {requirement 1} | ✅/❌ | `src/file.ts:42` |
| 2 | {requirement 2} | ✅/❌ | `src/file.ts:55` |
- If any ❌ exists, REJECT is mandatory
- ✅ without evidence is invalid (must verify against actual code)
- Do not rely on plan report's judgment; independently verify each requirement
## Validation Summary
| Item | Status | Verification Method |
|------|--------|-------------------|
| Tests | ✅ | `npm test` (N passed) |
| Build | ✅ | `npm run build` succeeded |
| Functional check | ✅ | Main flow verified |
## Current Iteration Findings (new)
| # | finding_id | Item | Evidence | Reason | Required Action |
|---|------------|------|----------|--------|-----------------|
| 1 | VAL-NEW-src-file-L42 | Requirement mismatch | `file:line` | Description | Fix required |
## Carry-over Findings (persists)
| # | finding_id | Previous Evidence | Current Evidence | Reason | Required Action |
|---|------------|-------------------|------------------|--------|-----------------|
| 1 | VAL-PERSIST-src-file-L77 | `file:line` | `file:line` | Still unresolved | Apply fix |
## Resolved Findings (resolved)
| finding_id | Resolution Evidence |
|------------|---------------------|
| VAL-RESOLVED-src-file-L10 | `file:line` now passes validation |
## Deliverables
- Created: {Created files}
- Modified: {Modified files}
## Rejection Gate
- REJECT is valid only when at least one finding exists in `new` or `persists`
- Findings without `finding_id` are invalid
```

View File

@ -11,12 +11,26 @@
| Build | ✅ | `npm run build` succeeded |
| Functional check | ✅ | Main flow verified |
## Current Iteration Findings (new)
| # | finding_id | Item | Evidence | Reason | Required Action |
|---|------------|------|----------|--------|-----------------|
| 1 | VAL-NEW-src-file-L42 | Requirement mismatch | `file:line` | Description | Fix required |
## Carry-over Findings (persists)
| # | finding_id | Previous Evidence | Current Evidence | Reason | Required Action |
|---|------------|-------------------|------------------|--------|-----------------|
| 1 | VAL-PERSIST-src-file-L77 | `file:line` | `file:line` | Still unresolved | Apply fix |
## Resolved Findings (resolved)
| finding_id | Resolution Evidence |
|------------|---------------------|
| VAL-RESOLVED-src-file-L10 | `file:line` now passes validation |
## Deliverables
- Created: {Created files}
- Modified: {Modified files}
## Incomplete Items (if REJECT)
| # | Item | Reason |
|---|------|--------|
| 1 | {Item} | {Reason} |
## Rejection Gate
- REJECT is valid only when at least one finding exists in `new` or `persists`
- Findings without `finding_id` are invalid
```

View File

@ -36,12 +36,12 @@ You are the **human proxy** in the automated piece. Before approval, verify the
## Verification Perspectives
### 1. Requirements Fulfillment
### 1. Requirements Fulfillment (Most Critical)
- Are **all** original task requirements met?
- Verify all requirements individually; do NOT APPROVE if any single requirement is unfulfilled
- Can it **actually** do what was claimed?
- Are implicit requirements (naturally expected behavior) met?
- Are there overlooked requirements?
- "Mostly done" or "main parts complete" is NOT grounds for APPROVE. All requirements must be fulfilled
**Note**: Don't take Coder's "complete" at face value. Actually verify.

View File

@ -1,23 +1,31 @@
piece_categories:
🚀 Quick Start:
pieces:
- default-mini
- frontend-mini
- backend-mini
- default
- passthrough
- coding
- minimal
- compound-eye
⚡ Mini:
pieces:
- default-mini
- frontend-mini
- backend-mini
- backend-cqrs-mini
🎨 Frontend:
pieces:
- frontend
- frontend-mini
⚙️ Backend:
pieces:
- backend
- backend-mini
- backend-cqrs
- backend-cqrs-mini
🔧 Expert:
Full Stack:
pieces:
- expert
- expert-cqrs
pieces:
- expert
- expert-cqrs
🛠️ Refactoring:
pieces:
- structural-reform

View File

@ -0,0 +1,247 @@
name: backend-cqrs-mini
description: CQRS+ES-focused 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:
- backend
- cqrs-es
- security
- 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: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
policy:
- coding
- testing
knowledge:
- backend
- cqrs-es
- security
- 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: 03-ai-review.md
format: ai-review
- name: supervise
edit: false
persona: supervisor
policy: review
knowledge:
- backend
- cqrs-es
- security
- 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:
- backend
- cqrs-es
- security
- 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:
- backend
- cqrs-es
- security
- 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:
- backend
- cqrs-es
- security
- 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:
- backend
- cqrs-es
- security
- 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

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
movements:
@ -65,8 +64,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -111,6 +112,7 @@ movements:
- WebSearch
- WebFetch
instruction: ai-fix
pass_previous_response: false
rules:
- condition: AI Reviewer's issues have been fixed
next: ai_review
@ -220,6 +222,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: Fix complete
next: reviewers
@ -237,6 +240,7 @@ movements:
- WebSearch
- WebFetch
instruction: supervise
pass_previous_response: false
rules:
- condition: All validations pass and ready to merge
next: COMPLETE
@ -244,8 +248,11 @@ movements:
next: fix_supervisor
output_contracts:
report:
- Validation: 07-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
- name: fix_supervisor
edit: true
persona: coder
@ -267,6 +274,7 @@ movements:
- WebSearch
- WebFetch
instruction: fix-supervisor
pass_previous_response: false
rules:
- condition: Supervisor's issues have been fixed
next: supervise

View File

@ -0,0 +1,240 @@
name: backend-mini
description: Backend-focused 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:
- backend
- security
- 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: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
policy:
- coding
- testing
knowledge:
- backend
- security
- 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: 03-ai-review.md
format: ai-review
- name: supervise
edit: false
persona: supervisor
policy: review
knowledge:
- backend
- security
- 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:
- backend
- security
- 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:
- backend
- security
- 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:
- backend
- security
- 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:
- backend
- security
- 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

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
movements:
@ -64,8 +63,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -109,6 +110,7 @@ movements:
- WebSearch
- WebFetch
instruction: ai-fix
pass_previous_response: false
rules:
- condition: AI Reviewer's issues have been fixed
next: ai_review
@ -217,6 +219,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: Fix complete
next: reviewers
@ -234,6 +237,7 @@ movements:
- WebSearch
- WebFetch
instruction: supervise
pass_previous_response: false
rules:
- condition: All validations pass and ready to merge
next: COMPLETE
@ -241,8 +245,11 @@ movements:
next: fix_supervisor
output_contracts:
report:
- Validation: 07-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
- name: fix_supervisor
edit: true
persona: coder
@ -263,6 +270,7 @@ movements:
- WebSearch
- WebFetch
instruction: fix-supervisor
pass_previous_response: false
rules:
- condition: Supervisor's issues have been fixed
next: supervise

View File

@ -1,141 +0,0 @@
name: coding
description: Lightweight development piece with planning and parallel reviews (plan -> implement -> parallel review -> 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 implementable
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: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
policy:
- coding
- testing
session: refresh
knowledge: architecture
allowed_tools:
- Read
- Glob
- Grep
- Edit
- Write
- Bash
- WebSearch
- WebFetch
required_permission_mode: edit
rules:
- condition: Implementation complete
next: reviewers
- condition: Implementation not started (report only)
next: reviewers
- condition: Cannot determine, insufficient information
next: reviewers
- condition: User input required
next: implement
requires_user_input: true
interactive_only: true
instruction: implement
output_contracts:
report:
- Scope: 02-coder-scope.md
- Decisions: 03-coder-decisions.md
- name: reviewers
parallel:
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
policy:
- review
- ai-antipattern
allowed_tools:
- Read
- Glob
- Grep
- WebSearch
- WebFetch
rules:
- condition: No AI-specific issues
- condition: AI-specific issues found
instruction: ai-review
output_contracts:
report:
- name: 04-ai-review.md
format: ai-review
- name: arch-review
edit: false
persona: architecture-reviewer
policy: review
knowledge: architecture
allowed_tools:
- Read
- Glob
- Grep
- WebSearch
- WebFetch
rules:
- condition: approved
- condition: needs_fix
instruction: review-arch
output_contracts:
report:
- name: 05-architect-review.md
format: architecture-review
rules:
- condition: all("No AI-specific issues", "approved")
next: COMPLETE
- condition: any("AI-specific issues found", "needs_fix")
next: fix
- name: fix
edit: true
persona: coder
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
- Grep
- Edit
- Write
- Bash
- WebSearch
- WebFetch
required_permission_mode: edit
rules:
- condition: Fix complete
next: reviewers
- condition: Cannot determine, insufficient information
next: ABORT
instruction: fix

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 10
initial_movement: evaluate
movements:
@ -30,7 +29,27 @@ movements:
- condition: failed
output_contracts:
report:
- name: 01-claude.md
- name: claude-review.md
format: |
```markdown
# Claude Review Result
## Conclusion
{One-line conclusion}
## Key Findings
- {finding 1}
- {finding 2}
## Evidence
- {file:line and rationale}
## Risks / Caveats
- {risk}
## Recommended Next Step
- {action}
```
- name: codex-eye
edit: false
persona: coder
@ -49,11 +68,30 @@ movements:
- condition: failed
output_contracts:
report:
- name: 02-codex.md
- name: codex-review.md
format: |
```markdown
# Codex Review Result
## Conclusion
{One-line conclusion}
## Key Findings
- {finding 1}
- {finding 2}
## Evidence
- {file:line and rationale}
## Risks / Caveats
- {risk}
## Recommended Next Step
- {action}
```
rules:
- condition: any("done")
next: synthesize
- name: synthesize
edit: false
persona: supervisor
@ -70,8 +108,8 @@ movements:
**Tasks:**
1. Read reports in the Report Directory
- `01-claude.md` (Claude's response)
- `02-codex.md` (Codex's response)
- `claude-review.md` (Claude's response)
- `codex-review.md` (Codex's response)
Note: If one report is missing (model failed), synthesize from the available report only
2. If both reports exist, compare and clarify:
- Points of agreement
@ -109,4 +147,32 @@ movements:
```
output_contracts:
report:
- Summary: 03-synthesis.md
- name: synthesis.md
format: |
```markdown
# Multi-Model Review Synthesis
## Conclusion
{Synthesized conclusion}
## Response Status
| Model | Status |
|-------|--------|
| Claude | ✅ / ❌ |
| Codex | ✅ / ❌ |
## Agreements
- {Points where both models agree}
## Disagreements
| Topic | Claude | Codex |
|-------|--------|-------|
| {topic} | {Claude's view} | {Codex's view} |
## Unique Findings
- **Claude only:** {Points only Claude mentioned}
- **Codex only:** {Points only Codex mentioned}
## Overall Assessment
{Overall assessment considering both responses}
```

View File

@ -1,21 +1,44 @@
name: minimal
description: Minimal development piece (implement -> parallel review -> fix if needed -> complete)
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: implement
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: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -38,8 +61,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: reviewers
parallel:
- name: ai_review
@ -66,6 +91,7 @@ movements:
edit: false
persona: supervisor
policy: review
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -79,8 +105,11 @@ movements:
- condition: Requirements unmet, tests failing
output_contracts:
report:
- Validation: 05-supervisor-validation.md
- Summary: summary.md
- 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
@ -98,6 +127,7 @@ movements:
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -118,6 +148,7 @@ movements:
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -142,6 +173,7 @@ movements:
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -152,6 +184,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: AI Reviewer's issues fixed
next: reviewers
@ -166,6 +199,7 @@ movements:
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -176,6 +210,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: Supervisor's issues fixed
next: reviewers

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
loop_monitors:
@ -62,7 +61,6 @@ movements:
report:
- name: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
@ -97,9 +95,10 @@ movements:
instruction: implement
output_contracts:
report:
- Scope: 02-coder-scope.md
- Decisions: 03-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -122,7 +121,6 @@ movements:
report:
- name: 04-ai-review.md
format: ai-review
- name: ai_fix
edit: true
persona: coder
@ -143,6 +141,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: AI issues fixed
next: ai_review
@ -151,7 +150,6 @@ movements:
- condition: Cannot proceed, insufficient info
next: ai_no_fix
instruction: ai-fix
- name: ai_no_fix
edit: false
persona: architecture-reviewer
@ -166,7 +164,6 @@ movements:
- condition: ai_fix's judgment is valid (no fix needed)
next: reviewers
instruction: arbitrate
- name: reviewers
parallel:
- name: arch-review
@ -215,7 +212,6 @@ movements:
next: supervise
- condition: any("needs_fix")
next: fix
- name: fix
edit: true
persona: coder
@ -235,13 +231,13 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: Fix complete
next: reviewers
- condition: Cannot proceed, insufficient info
next: plan
instruction: fix
- name: supervise
edit: false
persona: supervisor
@ -253,6 +249,7 @@ movements:
- Bash
- WebSearch
- WebFetch
pass_previous_response: false
rules:
- condition: All checks passed
next: COMPLETE
@ -261,5 +258,8 @@ movements:
instruction: supervise
output_contracts:
report:
- Validation: 07-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 20
initial_movement: plan_test
loop_monitors:
@ -65,7 +64,6 @@ movements:
report:
- name: 00-test-plan.md
format: test-plan
- name: implement_test
edit: true
persona: coder
@ -100,9 +98,10 @@ movements:
instruction: implement-e2e-test
output_contracts:
report:
- Scope: 02-coder-scope.md
- Decisions: 03-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -125,7 +124,6 @@ movements:
report:
- name: 04-ai-review.md
format: ai-review
- name: ai_fix
edit: true
persona: coder
@ -146,6 +144,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: AI issues fixed
next: ai_review
@ -154,7 +153,6 @@ movements:
- condition: Cannot proceed, insufficient info
next: ai_no_fix
instruction: ai-fix
- name: ai_no_fix
edit: false
persona: architecture-reviewer
@ -169,7 +167,6 @@ movements:
- condition: ai_fix's judgment is valid (no fix needed)
next: review_test
instruction: arbitrate
- name: review_test
edit: false
persona: qa-reviewer
@ -192,7 +189,6 @@ movements:
report:
- name: 05-qa-review.md
format: qa-review
- name: fix
edit: true
persona: coder
@ -213,13 +209,13 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: Fix complete
next: review_test
- condition: Cannot proceed, insufficient info
next: plan_test
instruction: fix
- name: supervise
edit: false
persona: supervisor
@ -231,6 +227,7 @@ movements:
- Bash
- WebSearch
- WebFetch
pass_previous_response: false
rules:
- condition: All checks passed
next: COMPLETE
@ -239,5 +236,8 @@ movements:
instruction: supervise
output_contracts:
report:
- Validation: 06-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
loop_monitors:
@ -79,8 +78,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -126,6 +127,7 @@ movements:
- WebSearch
- WebFetch
instruction: ai-fix
pass_previous_response: false
rules:
- condition: AI Reviewer's issues have been fixed
next: ai_review
@ -255,6 +257,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: Fix complete
next: reviewers
@ -272,6 +275,7 @@ movements:
- WebSearch
- WebFetch
instruction: supervise
pass_previous_response: false
rules:
- condition: All validations pass and ready to merge
next: COMPLETE
@ -279,8 +283,11 @@ movements:
next: fix_supervisor
output_contracts:
report:
- Validation: 08-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
- name: fix_supervisor
edit: true
persona: coder
@ -303,6 +310,7 @@ movements:
- WebSearch
- WebFetch
instruction: fix-supervisor
pass_previous_response: false
rules:
- condition: Supervisor's issues have been fixed
next: supervise

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
loop_monitors:
@ -78,8 +77,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -124,6 +125,7 @@ movements:
- WebSearch
- WebFetch
instruction: ai-fix
pass_previous_response: false
rules:
- condition: AI Reviewer's issues have been fixed
next: ai_review
@ -252,6 +254,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: Fix complete
next: reviewers
@ -269,6 +272,7 @@ movements:
- WebSearch
- WebFetch
instruction: supervise
pass_previous_response: false
rules:
- condition: All validations pass and ready to merge
next: COMPLETE
@ -276,8 +280,11 @@ movements:
next: fix_supervisor
output_contracts:
report:
- Validation: 08-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
- name: fix_supervisor
edit: true
persona: coder
@ -299,6 +306,7 @@ movements:
- WebSearch
- WebFetch
instruction: fix-supervisor
pass_previous_response: false
rules:
- condition: Supervisor's issues have been fixed
next: supervise

View File

@ -0,0 +1,240 @@
name: frontend-mini
description: Frontend-focused 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:
- frontend
- security
- 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: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
policy:
- coding
- testing
knowledge:
- frontend
- security
- 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: 03-ai-review.md
format: ai-review
- name: supervise
edit: false
persona: supervisor
policy: review
knowledge:
- frontend
- security
- 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:
- frontend
- security
- 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:
- frontend
- security
- 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:
- frontend
- security
- 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:
- frontend
- security
- 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

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
movements:
@ -64,8 +63,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -109,6 +110,7 @@ movements:
- WebSearch
- WebFetch
instruction: ai-fix
pass_previous_response: false
rules:
- condition: AI Reviewer's issues have been fixed
next: ai_review
@ -236,6 +238,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: Fix complete
next: reviewers
@ -253,6 +256,7 @@ movements:
- WebSearch
- WebFetch
instruction: supervise
pass_previous_response: false
rules:
- condition: All validations pass and ready to merge
next: COMPLETE
@ -260,8 +264,11 @@ movements:
next: fix_supervisor
output_contracts:
report:
- Validation: 08-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
- name: fix_supervisor
edit: true
persona: coder
@ -282,6 +289,7 @@ movements:
- WebSearch
- WebFetch
instruction: fix-supervisor
pass_previous_response: false
rules:
- condition: Supervisor's issues have been fixed
next: supervise

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 5
initial_movement: melchior
movements:

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 10
initial_movement: execute
movements:
@ -39,4 +38,6 @@ movements:
Do the task.
output_contracts:
report:
- Summary: summary.md
- name: summary.md
format: summary
use_judge: false

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 10
initial_movement: plan
movements:
@ -109,6 +108,7 @@ movements:
Evaluate the research results and determine if they adequately answer the original request.
**Important**: If there are issues, include specific instructions for the Planner.
pass_previous_response: false
rules:
- condition: Research results adequately answer the original request
next: COMPLETE

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 20
initial_movement: reviewers
movements:
@ -38,8 +37,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: reviewers
parallel:
- name: ai_review
@ -79,8 +80,11 @@ movements:
- condition: Requirements unmet, tests failing
output_contracts:
report:
- Validation: 05-supervisor-validation.md
- Summary: summary.md
- 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
@ -152,6 +156,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: AI Reviewer's issues fixed
next: reviewers
@ -176,6 +181,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: Supervisor's issues fixed
next: reviewers

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 10
initial_movement: plan
movements:
@ -119,6 +118,7 @@ movements:
- Grep
- WebSearch
- WebFetch
pass_previous_response: false
rules:
- condition: approved, PR comment requested
next: pr-comment
@ -169,7 +169,45 @@ movements:
```
output_contracts:
report:
- Review Summary: 04-review-summary.md
- name: review-summary.md
format: |
```markdown
# Review Summary
## Overall Verdict: APPROVE / REJECT
## Summary
{Integrate all review results in 2-3 sentences}
## Review Results
| Review | Result | Key Findings |
|--------|--------|-------------|
| Architecture | APPROVE/REJECT | {Overview} |
| Security | APPROVE/REJECT | {Overview} |
| AI Anti-pattern | APPROVE/REJECT | {Overview} |
## Current Iteration Findings (new)
| # | finding_id | Severity | Source | Location | Issue | Fix Suggestion |
|---|------------|----------|--------|----------|-------|----------------|
| 1 | SUM-NEW-src-file-L42 | High | Security | `file:line` | Description | Suggestion |
## Carry-over Findings (persists)
| # | finding_id | Source | Previous Evidence | Current Evidence | Issue |
|---|------------|--------|-------------------|------------------|-------|
| 1 | SUM-PERSIST-src-file-L77 | Architecture | `file:line` | `file:line` | Description |
## Resolved Findings (resolved)
| finding_id | Source | Resolution Evidence |
|------------|--------|---------------------|
| SUM-RESOLVED-src-file-L10 | QA | `file:line` |
## Improvement Suggestions
- {Consolidated suggestions from all reviews}
## Rejection Gate
- REJECT is valid only when at least one finding exists in `new` or `persists`
- Findings without `finding_id` are invalid
```
- name: pr-comment
edit: false
persona: pr-commenter
@ -195,14 +233,14 @@ movements:
- `01-architect-review.md` (Architecture review)
- `02-security-review.md` (Security review)
- `03-ai-review.md` (AI antipattern review)
- `04-review-summary.md` (Consolidated summary)
- `review-summary.md` (Consolidated summary)
3. Filter findings by severity and post inline comments for Critical/High/Medium
4. Post a summary comment with the following format:
```
## Automated Review Summary
{Overall verdict and summary from 04-review-summary.md}
{Overall verdict and summary from review-summary.md}
### Review Results
| Review | Result |

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 50
initial_movement: review
loop_monitors:
@ -118,8 +117,41 @@ movements:
next: COMPLETE
output_contracts:
report:
- name: 00-full-review.md
- 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
@ -206,7 +238,6 @@ movements:
report:
- name: 01-reform-plan.md
format: plan
- name: implement
edit: true
persona: coder
@ -239,9 +270,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 02-coder-scope.md
- Decisions: 03-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: reviewers
parallel:
- name: arch-review
@ -290,7 +322,6 @@ movements:
next: verify
- condition: any("needs_fix")
next: fix
- name: fix
edit: true
persona: coder
@ -310,13 +341,13 @@ movements:
- 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
@ -371,7 +402,6 @@ movements:
report:
- name: 06-verification.md
format: validation
- name: next_target
edit: false
persona: planner
@ -434,4 +464,25 @@ movements:
next: COMPLETE
output_contracts:
report:
- name: 07-progress.md
- 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}
```

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 20
initial_movement: plan_test
loop_monitors:
@ -65,7 +64,6 @@ movements:
report:
- name: 00-test-plan.md
format: test-plan
- name: implement_test
edit: true
persona: coder
@ -100,9 +98,10 @@ movements:
instruction: implement-test
output_contracts:
report:
- Scope: 02-coder-scope.md
- Decisions: 03-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -125,7 +124,6 @@ movements:
report:
- name: 04-ai-review.md
format: ai-review
- name: ai_fix
edit: true
persona: coder
@ -146,6 +144,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: AI issues fixed
next: ai_review
@ -154,7 +153,6 @@ movements:
- condition: Cannot proceed, insufficient info
next: ai_no_fix
instruction: ai-fix
- name: ai_no_fix
edit: false
persona: architecture-reviewer
@ -169,7 +167,6 @@ movements:
- condition: ai_fix's judgment is valid (no fix needed)
next: review_test
instruction: arbitrate
- name: review_test
edit: false
persona: qa-reviewer
@ -192,7 +189,6 @@ movements:
report:
- name: 05-qa-review.md
format: qa-review
- name: fix
edit: true
persona: coder
@ -213,13 +209,13 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: Fix complete
next: review_test
- condition: Cannot proceed, insufficient info
next: plan_test
instruction: fix
- name: supervise
edit: false
persona: supervisor
@ -231,6 +227,7 @@ movements:
- Bash
- WebSearch
- WebFetch
pass_previous_response: false
rules:
- condition: All checks passed
next: COMPLETE
@ -239,5 +236,8 @@ movements:
instruction: supervise
output_contracts:
report:
- Validation: 06-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false

View File

@ -4,7 +4,11 @@
1. 計画と実装結果が一致しているか
2. 各レビュームーブメントの指摘が対応されているか
3. タスク指示書の各要件が達成されているか
- 計画レポートの判断を鵜呑みにせず、要件ごとに実コード(ファイル:行)で独立照合する
- タスク指示書から要件を1つずつ抽出する
- 各要件について、実装されたコード(ファイル:行)を特定する
- コードが要件を満たしていることを実際に確認する(ファイルを読む、テストを実行する)
- 計画レポートの判断を鵜呑みにせず、要件ごとに独立照合する
- 充足していない要件が1つでもあれば REJECT する
**レポートの確認:** Report Directory内の全レポートを読み、
未対応の改善提案がないか確認してください。
@ -15,10 +19,22 @@
## 結果: APPROVE / REJECT
## 要件充足チェック
タスク指示書から要件を抽出し、各要件を実コードで個別に検証する。
| # | 要件(タスク指示書から抽出) | 充足 | 根拠(ファイル:行) |
|---|---------------------------|------|-------------------|
| 1 | {要件1} | ✅/❌ | `src/file.ts:42` |
| 2 | {要件2} | ✅/❌ | `src/file.ts:55` |
- ❌ が1件でもある場合は REJECT 必須
- 根拠なしの ✅ は無効(実コードで確認すること)
- 計画レポートの判断を鵜呑みにせず、要件ごとに独立照合する
## 検証サマリー
| 項目 | 状態 | 確認方法 |
|------|------|---------|
| 要求充足 | ✅ | 要求リストと照合 |
| テスト | ✅ | `npm test` (N passed) |
| ビルド | ✅ | `npm run build` 成功 |
| 動作確認 | ✅ | 主要フロー確認 |

View File

@ -14,12 +14,26 @@
| コンテキスト適合 | ✅ | - |
| スコープ | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 場所 | 問題 |
|---|---------|------|------|
| 1 | 幻覚API | `src/file.ts:23` | 存在しないメソッド |
## 今回の指摘new
| # | finding_id | カテゴリ | 場所 | 問題 | 修正案 |
|---|------------|---------|------|------|--------|
| 1 | AI-NEW-src-file-L23 | 幻覚API | `src/file.ts:23` | 存在しないメソッド | 実在APIへ置換 |
## 継続指摘persists
| # | finding_id | 前回根拠 | 今回根拠 | 問題 | 修正案 |
|---|------------|----------|----------|------|--------|
| 1 | AI-PERSIST-src-file-L42 | `src/file.ts:42` | `src/file.ts:42` | 未解消 | 既存修正方針を適用 |
## 解消済みresolved
| finding_id | 解消根拠 |
|------------|----------|
| AI-RESOLVED-src-file-L10 | `src/file.ts:10` に該当問題なし |
## REJECT判定条件
- `new` または `persists` が1件以上ある場合のみ REJECT 可
- `finding_id` なしの指摘は無効
```
**認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内
- 問題なし → サマリー + チェック表 + 空の指摘セクション10行以内
- 問題あり → 該当セクションのみ行追加30行以内)

View File

@ -14,22 +14,28 @@
- [x] デッドコード
- [x] 呼び出しチェーン検証
## 前回Open Findings
| finding_id | 前回状態 | 今回状態(new/persists/resolved) | 根拠 |
|------------|----------|----------------------------------|------|
| ARCH-EXAMPLE-src-file-L42 | open | persists | `src/file.ts:42` |
## 問題点REJECTの場合
| # | finding_id | 状態(new/persists) | スコープ | 場所 | 問題 | 修正案 |
|---|------------|--------------------|---------|------|------|--------|
| 1 | ARCH-EXAMPLE-src-file-L42 | new | スコープ内 | `src/file.ts:42` | 問題の説明 | 修正方法 |
## 今回の指摘new
| # | finding_id | スコープ | 場所 | 問題 | 修正案 |
|---|------------|---------|------|------|--------|
| 1 | ARCH-NEW-src-file-L42 | スコープ内 | `src/file.ts:42` | 問題の説明 | 修正方法 |
スコープ: 「スコープ内」(今回修正可能)/ 「スコープ外」(既存問題・非ブロッキング)
## 既存問題(参考・非ブロッキング)
- {既存問題の記録。今回の変更と無関係な問題}
## 継続指摘persists
| # | finding_id | 前回根拠 | 今回根拠 | 問題 | 修正案 |
|---|------------|----------|----------|------|--------|
| 1 | ARCH-PERSIST-src-file-L77 | `src/file.ts:77` | `src/file.ts:77` | 未解消 | 既存修正方針を適用 |
## 解消済みresolved
| finding_id | 解消根拠 |
|------------|----------|
| ARCH-RESOLVED-src-file-L10 | `src/file.ts:10` は規約を満たす |
## REJECT判定条件
- `new` または `persists` が1件以上ある場合のみ REJECT 可
- `finding_id` なしの指摘は無効
```
**認知負荷軽減ルール:**
- APPROVE → サマリーのみ5行以内
- REJECT → 問題点を表形式で30行以内
- REJECT → 該当指摘のみ表で記載30行以内

View File

@ -15,13 +15,22 @@
| ドキュメント | ✅ | - |
| 保守性 | ✅ | - |
## 前回Open Findings
| finding_id | 前回状態 | 今回状態(new/persists/resolved) | 根拠 |
|------------|----------|----------------------------------|------|
| QA-EXAMPLE-src-file-L42 | open | persists | `src/file.ts:42` |
## 今回の指摘new
| # | finding_id | カテゴリ | 場所 | 問題 | 修正案 |
|---|------------|---------|------|------|--------|
| 1 | QA-NEW-src-test-L42 | テスト | `src/test.ts:42` | 異常系テスト不足 | 失敗系ケースを追加 |
## 問題点REJECTの場合
| # | finding_id | 状態(new/persists) | カテゴリ | 問題 | 修正案 |
|---|------------|--------------------|---------|------|--------|
| 1 | QA-EXAMPLE-src-file-L42 | new | テスト | 問題の説明 | 修正方法 |
## 継続指摘persists
| # | finding_id | 前回根拠 | 今回根拠 | 問題 | 修正案 |
|---|------------|----------|----------|------|--------|
| 1 | QA-PERSIST-src-test-L77 | `src/test.ts:77` | `src/test.ts:77` | 不安定なまま | アサーションとセットアップを安定化 |
## 解消済みresolved
| finding_id | 解消根拠 |
|------------|----------|
| QA-RESOLVED-src-test-L10 | `src/test.ts:10` で異常系が網羅済み |
## REJECT判定条件
- `new` または `persists` が1件以上ある場合のみ REJECT 可
- `finding_id` なしの指摘は無効
```

View File

@ -1,23 +0,0 @@
```markdown
# レビューサマリー
## 総合判定: APPROVE / REJECT
## サマリー
{2-3文で全レビュー結果を統合}
## レビュー結果
| レビュー | 結果 | 主要な発見 |
|---------|------|-----------|
| アーキテクチャ | APPROVE/REJECT | {概要} |
| セキュリティ | APPROVE/REJECT | {概要} |
| AIアンチパターン | APPROVE/REJECT | {概要} |
## 要注意の問題
| # | 重大度 | ソース | 場所 | 問題 |
|---|--------|--------|------|------|
| 1 | High | セキュリティ | `file:line` | 説明 |
## 改善提案
- {全レビューからの統合提案}
```

View File

@ -13,16 +13,30 @@
| データ保護 | ✅ | - |
| 依存関係 | ✅ | - |
## 脆弱性REJECTの場合
| # | 重大度 | 種類 | 場所 | 修正案 |
|---|--------|------|------|--------|
| 1 | High | SQLi | `src/db.ts:42` | パラメータ化クエリを使用 |
## 今回の指摘new
| # | finding_id | 重大度 | 種類 | 場所 | 問題 | 修正案 |
|---|------------|--------|------|------|------|--------|
| 1 | SEC-NEW-src-db-L42 | High | SQLi | `src/db.ts:42` | 生SQL文字列 | パラメータ化クエリを使用 |
## 警告(ブロッキングではない)
## 継続指摘persists
| # | finding_id | 前回根拠 | 今回根拠 | 問題 | 修正案 |
|---|------------|----------|----------|------|--------|
| 1 | SEC-PERSIST-src-auth-L18 | `src/auth.ts:18` | `src/auth.ts:18` | 未解消 | バリデーションを強化 |
## 解消済みresolved
| finding_id | 解消根拠 |
|------------|----------|
| SEC-RESOLVED-src-db-L10 | `src/db.ts:10` はバインド変数化済み |
## 警告(非ブロッキング)
- {セキュリティに関する推奨事項}
## REJECT判定条件
- `new` または `persists` が1件以上ある場合のみ REJECT 可
- `finding_id` なしの指摘は無効
```
**認知負荷軽減ルール:**
- 問題なし → チェック表のみ10行以内
- 警告あり → + 警告を1-2行15行以内
- 脆弱性あり → + 表形式で30行以内
- 警告のみ → + 警告1-2行15行以内
- 脆弱性あり → + 指摘30行以内

View File

@ -0,0 +1,48 @@
```markdown
# 最終検証結果
## 結果: APPROVE / REJECT
## 要件充足チェック
タスク指示書から要件を抽出し、各要件を実コードで個別に検証する。
| # | 要件(タスク指示書から抽出) | 充足 | 根拠(ファイル:行) |
|---|---------------------------|------|-------------------|
| 1 | {要件1} | ✅/❌ | `src/file.ts:42` |
| 2 | {要件2} | ✅/❌ | `src/file.ts:55` |
- ❌ が1件でもある場合は REJECT 必須
- 根拠なしの ✅ は無効(実コードで確認すること)
- 計画レポートの判断を鵜呑みにせず、要件ごとに独立照合する
## 検証サマリー
| 項目 | 状態 | 確認方法 |
|------|------|---------|
| テスト | ✅ | `npm test` (N passed) |
| ビルド | ✅ | `npm run build` 成功 |
| 動作確認 | ✅ | 主要フロー確認 |
## 今回の指摘new
| # | finding_id | 項目 | 根拠 | 理由 | 必要アクション |
|---|------------|------|------|------|----------------|
| 1 | VAL-NEW-src-file-L42 | 要求不一致 | `file:line` | 説明 | 修正が必要 |
## 継続指摘persists
| # | finding_id | 前回根拠 | 今回根拠 | 理由 | 必要アクション |
|---|------------|----------|----------|------|----------------|
| 1 | VAL-PERSIST-src-file-L77 | `file:line` | `file:line` | 未解消 | 修正継続 |
## 解消済みresolved
| finding_id | 解消根拠 |
|------------|----------|
| VAL-RESOLVED-src-file-L10 | `file:line` は検証条件を満たす |
## 成果物
- 作成: {作成したファイル}
- 変更: {変更したファイル}
## REJECT判定条件
- `new` または `persists` が1件以上ある場合のみ REJECT 可
- `finding_id` なしの指摘は無効
```

View File

@ -11,12 +11,26 @@
| ビルド | ✅ | `npm run build` 成功 |
| 動作確認 | ✅ | 主要フロー確認 |
## 今回の指摘new
| # | finding_id | 項目 | 根拠 | 理由 | 必要アクション |
|---|------------|------|------|------|----------------|
| 1 | VAL-NEW-src-file-L42 | 要求不一致 | `file:line` | 説明 | 修正が必要 |
## 継続指摘persists
| # | finding_id | 前回根拠 | 今回根拠 | 理由 | 必要アクション |
|---|------------|----------|----------|------|----------------|
| 1 | VAL-PERSIST-src-file-L77 | `file:line` | `file:line` | 未解消 | 修正継続 |
## 解消済みresolved
| finding_id | 解消根拠 |
|------------|----------|
| VAL-RESOLVED-src-file-L10 | `file:line` は検証条件を満たす |
## 成果物
- 作成: {作成したファイル}
- 変更: {変更したファイル}
## 未完了項目REJECTの場合
| # | 項目 | 理由 |
|---|------|------|
| 1 | {項目} | {理由} |
## REJECT判定条件
- `new` または `persists` が1件以上ある場合のみ REJECT 可
- `finding_id` なしの指摘は無効
```

View File

@ -43,10 +43,12 @@
### 検証観点
**要求の充足:**
- 元のタスク要求がすべて満たされているか
**要求の充足(最重要):**
- 全要件を個別に検証し、1件でも未充足なら APPROVE しない
- 「~もできる」と言っていたことが本当にできるか
- 暗黙の要求(当然期待される動作)が満たされているか
- 「概ね完了」「主要部分は完了」は APPROVE の根拠にならない。全要件の充足が必要
**動作確認(実際に実行する):**

View File

@ -1,23 +1,31 @@
piece_categories:
🚀 クイックスタート:
pieces:
- default-mini
- frontend-mini
- backend-mini
- default
- passthrough
- coding
- minimal
- compound-eye
⚡ Mini:
pieces:
- default-mini
- frontend-mini
- backend-mini
- backend-cqrs-mini
🎨 フロントエンド:
pieces:
- frontend
- frontend-mini
⚙️ バックエンド:
pieces:
- backend
- backend-mini
- backend-cqrs
- backend-cqrs-mini
🔧 エキスパート:
フルスタック:
pieces:
- expert
- expert-cqrs
pieces:
- expert
- expert-cqrs
🛠️ リファクタリング:
pieces:
- structural-reform

View File

@ -0,0 +1,247 @@
name: backend-cqrs-mini
description: CQRS+ES向け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:
- backend
- cqrs-es
- security
- 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: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
policy:
- coding
- testing
knowledge:
- backend
- cqrs-es
- security
- 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: 03-ai-review.md
format: ai-review
- name: supervise
edit: false
persona: supervisor
policy: review
knowledge:
- backend
- cqrs-es
- security
- 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:
- backend
- cqrs-es
- security
- 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:
- backend
- cqrs-es
- security
- 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:
- backend
- cqrs-es
- security
- 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:
- backend
- cqrs-es
- security
- 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

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
movements:
@ -65,8 +64,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -111,6 +112,7 @@ movements:
- WebSearch
- WebFetch
instruction: ai-fix
pass_previous_response: false
rules:
- condition: AI Reviewerの指摘に対する修正が完了した
next: ai_review
@ -220,6 +222,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: 修正が完了した
next: reviewers
@ -237,6 +240,7 @@ movements:
- WebSearch
- WebFetch
instruction: supervise
pass_previous_response: false
rules:
- condition: すべての検証が完了し、マージ可能な状態である
next: COMPLETE
@ -244,8 +248,11 @@ movements:
next: fix_supervisor
output_contracts:
report:
- Validation: 07-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
- name: fix_supervisor
edit: true
persona: coder
@ -267,6 +274,7 @@ movements:
- WebSearch
- WebFetch
instruction: fix-supervisor
pass_previous_response: false
rules:
- condition: 監督者の指摘に対する修正が完了した
next: supervise

View File

@ -0,0 +1,240 @@
name: backend-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:
- backend
- security
- 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: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
policy:
- coding
- testing
knowledge:
- backend
- security
- 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: 03-ai-review.md
format: ai-review
- name: supervise
edit: false
persona: supervisor
policy: review
knowledge:
- backend
- security
- 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:
- backend
- security
- 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:
- backend
- security
- 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:
- backend
- security
- 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:
- backend
- security
- 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

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
movements:
@ -64,8 +63,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -109,6 +110,7 @@ movements:
- WebSearch
- WebFetch
instruction: ai-fix
pass_previous_response: false
rules:
- condition: AI Reviewerの指摘に対する修正が完了した
next: ai_review
@ -217,6 +219,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: 修正が完了した
next: reviewers
@ -234,6 +237,7 @@ movements:
- WebSearch
- WebFetch
instruction: supervise
pass_previous_response: false
rules:
- condition: すべての検証が完了し、マージ可能な状態である
next: COMPLETE
@ -241,8 +245,11 @@ movements:
next: fix_supervisor
output_contracts:
report:
- Validation: 07-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
- name: fix_supervisor
edit: true
persona: coder
@ -263,6 +270,7 @@ movements:
- WebSearch
- WebFetch
instruction: fix-supervisor
pass_previous_response: false
rules:
- condition: 監督者の指摘に対する修正が完了した
next: supervise

View File

@ -1,141 +0,0 @@
name: coding
description: Lightweight development piece with planning and parallel reviews (plan -> implement -> parallel review -> 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: 要件が明確で実装可能
next: implement
- condition: ユーザーが質問をしている(実装タスクではない)
next: COMPLETE
- condition: 要件が不明確、情報不足
next: ABORT
instruction: plan
output_contracts:
report:
- name: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
policy:
- coding
- testing
session: refresh
knowledge: architecture
allowed_tools:
- Read
- Glob
- Grep
- Edit
- Write
- Bash
- WebSearch
- WebFetch
required_permission_mode: edit
rules:
- condition: 実装完了
next: reviewers
- condition: 実装未着手(レポートのみ)
next: reviewers
- condition: 判断できない、情報不足
next: reviewers
- condition: ユーザー入力が必要
next: implement
requires_user_input: true
interactive_only: true
instruction: implement
output_contracts:
report:
- Scope: 02-coder-scope.md
- Decisions: 03-coder-decisions.md
- name: reviewers
parallel:
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
policy:
- review
- ai-antipattern
allowed_tools:
- Read
- Glob
- Grep
- WebSearch
- WebFetch
rules:
- condition: AI特有の問題なし
- condition: AI特有の問題あり
instruction: ai-review
output_contracts:
report:
- name: 04-ai-review.md
format: ai-review
- name: arch-review
edit: false
persona: architecture-reviewer
policy: review
knowledge: architecture
allowed_tools:
- Read
- Glob
- Grep
- WebSearch
- WebFetch
rules:
- condition: approved
- condition: needs_fix
instruction: review-arch
output_contracts:
report:
- name: 05-architect-review.md
format: architecture-review
rules:
- condition: all("AI特有の問題なし", "approved")
next: COMPLETE
- condition: any("AI特有の問題あり", "needs_fix")
next: fix
- name: fix
edit: true
persona: coder
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
- Grep
- Edit
- Write
- Bash
- WebSearch
- WebFetch
required_permission_mode: edit
rules:
- condition: 修正完了
next: reviewers
- condition: 判断できない、情報不足
next: ABORT
instruction: fix

View File

@ -6,10 +6,8 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 10
initial_movement: evaluate
movements:
- name: evaluate
parallel:
@ -30,8 +28,27 @@ movements:
- condition: failed
output_contracts:
report:
- name: 01-claude.md
- name: claude-review.md
format: |
```markdown
# Claudeレビュー結果
## 結論
{1行結論}
## 主要な指摘
- {finding 1}
- {finding 2}
## 根拠
- {file:line と理由}
## リスク / 注意点
- {risk}
## 推奨次アクション
- {action}
```
- name: codex-eye
edit: false
persona: coder
@ -49,11 +66,30 @@ movements:
- condition: failed
output_contracts:
report:
- name: 02-codex.md
- name: codex-review.md
format: |
```markdown
# Codexレビュー結果
## 結論
{1行結論}
## 主要な指摘
- {finding 1}
- {finding 2}
## 根拠
- {file:line と理由}
## リスク / 注意点
- {risk}
## 推奨次アクション
- {action}
```
rules:
- condition: any("done")
next: synthesize
- name: synthesize
edit: false
persona: supervisor
@ -70,8 +106,8 @@ movements:
**やること:**
1. Report Directory 内のレポートを読む
- `01-claude.md`Claude の回答)
- `02-codex.md`Codex の回答)
- `claude-review.md`Claude の回答)
- `codex-review.md`Codex の回答)
※ 片方が存在しない場合(エラーで失敗した場合)、存在するレポートのみで統合する
2. 両方のレポートがある場合は比較し、以下を明示する
- 一致している点
@ -109,4 +145,32 @@ movements:
```
output_contracts:
report:
- Summary: 03-synthesis.md
- name: synthesis.md
format: |
```markdown
# 複数モデルレビュー統合
## 結論
{統合結論}
## 応答状況
| モデル | 状態 |
|--------|------|
| Claude | ✅ / ❌ |
| Codex | ✅ / ❌ |
## 一致点
- {両者が一致した点}
## 相違点
| 論点 | Claude | Codex |
|------|--------|-------|
| {topic} | {Claudeの見解} | {Codexの見解} |
## 片側のみの指摘
- **Claudeのみ:** {Claudeのみが言及}
- **Codexのみ:** {Codexのみが言及}
## 総合評価
{両者を踏まえた総合評価}
```

View File

@ -1,21 +1,44 @@
name: minimal
description: Minimal development piece (implement -> parallel review -> fix if needed -> complete)
name: default-mini
description: Mini開発ピースplan → implement → 並列レビュー → 修正 → 完了)
piece_config:
provider_options:
codex:
network_access: true
opencode:
network_access: true
max_movements: 20
initial_movement: implement
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: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -38,8 +61,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: reviewers
parallel:
- name: ai_review
@ -66,6 +91,7 @@ movements:
edit: false
persona: supervisor
policy: review
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -79,8 +105,11 @@ movements:
- condition: 要求未達成、テスト失敗、ビルドエラー
output_contracts:
report:
- Validation: 05-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
rules:
- condition: all("AI特有の問題なし", "すべて問題なし")
next: COMPLETE
@ -98,6 +127,7 @@ movements:
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -118,6 +148,7 @@ movements:
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -142,6 +173,7 @@ movements:
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -152,6 +184,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: AI問題の修正完了
next: reviewers
@ -166,6 +199,7 @@ movements:
policy:
- coding
- testing
knowledge: architecture
allowed_tools:
- Read
- Glob
@ -176,6 +210,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: 監督者の指摘に対する修正が完了した
next: reviewers

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
loop_monitors:
@ -62,7 +61,6 @@ movements:
report:
- name: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
@ -97,9 +95,10 @@ movements:
instruction: implement
output_contracts:
report:
- Scope: 02-coder-scope.md
- Decisions: 03-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -122,7 +121,6 @@ movements:
report:
- name: 04-ai-review.md
format: ai-review
- name: ai_fix
edit: true
persona: coder
@ -143,6 +141,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: AI問題の修正完了
next: ai_review
@ -151,7 +150,6 @@ movements:
- condition: 判断できない、情報不足
next: ai_no_fix
instruction: ai-fix
- name: ai_no_fix
edit: false
persona: architecture-reviewer
@ -166,7 +164,6 @@ movements:
- condition: ai_fixの判断が妥当修正不要
next: reviewers
instruction: arbitrate
- name: reviewers
parallel:
- name: arch-review
@ -215,7 +212,6 @@ movements:
next: supervise
- condition: any("needs_fix")
next: fix
- name: fix
edit: true
persona: coder
@ -235,13 +231,13 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: 修正完了
next: reviewers
- condition: 判断できない、情報不足
next: plan
instruction: fix
- name: supervise
edit: false
persona: supervisor
@ -253,6 +249,7 @@ movements:
- Bash
- WebSearch
- WebFetch
pass_previous_response: false
rules:
- condition: すべて問題なし
next: COMPLETE
@ -261,5 +258,8 @@ movements:
instruction: supervise
output_contracts:
report:
- Validation: 07-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 20
initial_movement: plan_test
loop_monitors:
@ -65,7 +64,6 @@ movements:
report:
- name: 00-test-plan.md
format: test-plan
- name: implement_test
edit: true
persona: coder
@ -100,9 +98,10 @@ movements:
instruction: implement-e2e-test
output_contracts:
report:
- Scope: 02-coder-scope.md
- Decisions: 03-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -125,7 +124,6 @@ movements:
report:
- name: 04-ai-review.md
format: ai-review
- name: ai_fix
edit: true
persona: coder
@ -146,6 +144,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: AI問題の修正完了
next: ai_review
@ -154,7 +153,6 @@ movements:
- condition: 判断できない、情報不足
next: ai_no_fix
instruction: ai-fix
- name: ai_no_fix
edit: false
persona: architecture-reviewer
@ -169,7 +167,6 @@ movements:
- condition: ai_fixの判断が妥当修正不要
next: review_test
instruction: arbitrate
- name: review_test
edit: false
persona: qa-reviewer
@ -192,7 +189,6 @@ movements:
report:
- name: 05-qa-review.md
format: qa-review
- name: fix
edit: true
persona: coder
@ -213,13 +209,13 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: 修正完了
next: review_test
- condition: 判断できない、情報不足
next: plan_test
instruction: fix
- name: supervise
edit: false
persona: supervisor
@ -231,6 +227,7 @@ movements:
- Bash
- WebSearch
- WebFetch
pass_previous_response: false
rules:
- condition: すべて問題なし
next: COMPLETE
@ -239,5 +236,8 @@ movements:
instruction: supervise
output_contracts:
report:
- Validation: 06-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
loop_monitors:
@ -79,8 +78,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -126,6 +127,7 @@ movements:
- WebSearch
- WebFetch
instruction: ai-fix
pass_previous_response: false
rules:
- condition: AI Reviewerの指摘に対する修正が完了した
next: ai_review
@ -255,6 +257,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: 修正が完了した
next: reviewers
@ -272,6 +275,7 @@ movements:
- WebSearch
- WebFetch
instruction: supervise
pass_previous_response: false
rules:
- condition: すべての検証が完了し、マージ可能な状態である
next: COMPLETE
@ -279,8 +283,11 @@ movements:
next: fix_supervisor
output_contracts:
report:
- Validation: 08-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
- name: fix_supervisor
edit: true
persona: coder
@ -303,6 +310,7 @@ movements:
- WebSearch
- WebFetch
instruction: fix-supervisor
pass_previous_response: false
rules:
- condition: 監督者の指摘に対する修正が完了した
next: supervise

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
loop_monitors:
@ -78,8 +77,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -124,6 +125,7 @@ movements:
- WebSearch
- WebFetch
instruction: ai-fix
pass_previous_response: false
rules:
- condition: AI Reviewerの指摘に対する修正が完了した
next: ai_review
@ -252,6 +254,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: 修正が完了した
next: reviewers
@ -269,6 +272,7 @@ movements:
- WebSearch
- WebFetch
instruction: supervise
pass_previous_response: false
rules:
- condition: すべての検証が完了し、マージ可能な状態である
next: COMPLETE
@ -276,8 +280,11 @@ movements:
next: fix_supervisor
output_contracts:
report:
- Validation: 08-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
- name: fix_supervisor
edit: true
persona: coder
@ -299,6 +306,7 @@ movements:
- WebSearch
- WebFetch
instruction: fix-supervisor
pass_previous_response: false
rules:
- condition: 監督者の指摘に対する修正が完了した
next: supervise

View File

@ -0,0 +1,240 @@
name: frontend-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:
- frontend
- security
- 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: 00-plan.md
format: plan
- name: implement
edit: true
persona: coder
policy:
- coding
- testing
knowledge:
- frontend
- security
- 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: 03-ai-review.md
format: ai-review
- name: supervise
edit: false
persona: supervisor
policy: review
knowledge:
- frontend
- security
- 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:
- frontend
- security
- 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:
- frontend
- security
- 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:
- frontend
- security
- 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:
- frontend
- security
- 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

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 30
initial_movement: plan
movements:
@ -64,8 +63,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -109,6 +110,7 @@ movements:
- WebSearch
- WebFetch
instruction: ai-fix
pass_previous_response: false
rules:
- condition: AI Reviewerの指摘に対する修正が完了した
next: ai_review
@ -236,6 +238,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: 修正が完了した
next: reviewers
@ -253,6 +256,7 @@ movements:
- WebSearch
- WebFetch
instruction: supervise
pass_previous_response: false
rules:
- condition: すべての検証が完了し、マージ可能な状態である
next: COMPLETE
@ -260,8 +264,11 @@ movements:
next: fix_supervisor
output_contracts:
report:
- Validation: 08-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
- name: fix_supervisor
edit: true
persona: coder
@ -282,6 +289,7 @@ movements:
- WebSearch
- WebFetch
instruction: fix-supervisor
pass_previous_response: false
rules:
- condition: 監督者の指摘に対する修正が完了した
next: supervise

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 5
initial_movement: melchior
movements:

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 10
initial_movement: execute
movements:
@ -39,4 +38,6 @@ movements:
タスクをこなしてください。
output_contracts:
report:
- Summary: summary.md
- name: summary.md
format: summary
use_judge: false

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 10
initial_movement: plan
movements:
@ -109,6 +108,7 @@ movements:
調査結果を評価し、元の依頼に対して十分な回答になっているか判断してください。
**重要**: 問題がある場合は、Plannerへの具体的な指示を含めてください。
pass_previous_response: false
rules:
- condition: 調査結果が元の依頼に対して十分である
next: COMPLETE

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 20
initial_movement: reviewers
movements:
@ -38,8 +37,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 01-coder-scope.md
- Decisions: 02-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: reviewers
parallel:
- name: ai_review
@ -79,8 +80,11 @@ movements:
- condition: 要求未達成、テスト失敗、ビルドエラー
output_contracts:
report:
- Validation: 05-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false
rules:
- condition: all("AI特有の問題なし", "すべて問題なし")
next: COMPLETE
@ -152,6 +156,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: AI問題の修正完了
next: reviewers
@ -176,6 +181,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: 監督者の指摘に対する修正が完了した
next: reviewers

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 10
initial_movement: plan
movements:
@ -119,6 +118,7 @@ movements:
- Grep
- WebSearch
- WebFetch
pass_previous_response: false
rules:
- condition: approved, PR comment requested
next: pr-comment
@ -170,7 +170,45 @@ movements:
```
output_contracts:
report:
- Review Summary: 04-review-summary.md
- name: review-summary.md
format: |
```markdown
# レビューサマリー
## 総合判定: APPROVE / REJECT
## サマリー
{2-3文で全レビュー結果を統合}
## レビュー結果
| レビュー | 結果 | 主要な発見 |
|---------|------|-----------|
| アーキテクチャ | APPROVE/REJECT | {概要} |
| セキュリティ | APPROVE/REJECT | {概要} |
| AIアンチパターン | APPROVE/REJECT | {概要} |
## 今回の指摘new
| # | finding_id | 重大度 | ソース | 場所 | 問題 | 修正案 |
|---|------------|--------|--------|------|------|--------|
| 1 | SUM-NEW-src-file-L42 | High | セキュリティ | `file:line` | 説明 | 提案 |
## 継続指摘persists
| # | finding_id | ソース | 前回根拠 | 今回根拠 | 問題 |
|---|------------|--------|----------|----------|------|
| 1 | SUM-PERSIST-src-file-L77 | アーキテクチャ | `file:line` | `file:line` | 説明 |
## 解消済みresolved
| finding_id | ソース | 解消根拠 |
|------------|--------|----------|
| SUM-RESOLVED-src-file-L10 | QA | `file:line` |
## 改善提案
- {全レビューからの統合提案}
## REJECT判定条件
- `new` または `persists` が1件以上ある場合のみ REJECT 可
- `finding_id` なしの指摘は無効
```
- name: pr-comment
edit: false
persona: pr-commenter
@ -196,14 +234,14 @@ movements:
- `01-architect-review.md`(アーキテクチャレビュー)
- `02-security-review.md`(セキュリティレビュー)
- `03-ai-review.md`AIアンチパターンレビュー
- `04-review-summary.md`(統合サマリー)
- `review-summary.md`(統合サマリー)
3. 重要度でフィルタリングし、Critical/High/Mediumの指摘をインラインコメントとして投稿
4. 以下のフォーマットでサマリーコメントを投稿:
```
## 自動レビューサマリー
{04-review-summary.mdからの総合判定とサマリー}
{review-summary.mdからの総合判定とサマリー}
### レビュー結果
| レビュー | 結果 |

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 50
initial_movement: review
loop_monitors:
@ -118,8 +117,41 @@ movements:
next: COMPLETE
output_contracts:
report:
- name: 00-full-review.md
- 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
@ -206,7 +238,6 @@ movements:
report:
- name: 01-reform-plan.md
format: plan
- name: implement
edit: true
persona: coder
@ -239,9 +270,10 @@ movements:
interactive_only: true
output_contracts:
report:
- Scope: 02-coder-scope.md
- Decisions: 03-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: reviewers
parallel:
- name: arch-review
@ -290,7 +322,6 @@ movements:
next: verify
- condition: any("needs_fix")
next: fix
- name: fix
edit: true
persona: coder
@ -310,13 +341,13 @@ movements:
- 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
@ -371,7 +402,6 @@ movements:
report:
- name: 06-verification.md
format: validation
- name: next_target
edit: false
persona: planner
@ -434,4 +464,25 @@ movements:
next: COMPLETE
output_contracts:
report:
- name: 07-progress.md
- 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}
```

View File

@ -6,7 +6,6 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 20
initial_movement: plan_test
loop_monitors:
@ -65,7 +64,6 @@ movements:
report:
- name: 00-test-plan.md
format: test-plan
- name: implement_test
edit: true
persona: coder
@ -100,9 +98,10 @@ movements:
instruction: implement-test
output_contracts:
report:
- Scope: 02-coder-scope.md
- Decisions: 03-coder-decisions.md
- name: coder-scope.md
format: coder-scope
- name: coder-decisions.md
format: coder-decisions
- name: ai_review
edit: false
persona: ai-antipattern-reviewer
@ -125,7 +124,6 @@ movements:
report:
- name: 04-ai-review.md
format: ai-review
- name: ai_fix
edit: true
persona: coder
@ -146,6 +144,7 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: AI問題の修正完了
next: ai_review
@ -154,7 +153,6 @@ movements:
- condition: 判断できない、情報不足
next: ai_no_fix
instruction: ai-fix
- name: ai_no_fix
edit: false
persona: architecture-reviewer
@ -169,7 +167,6 @@ movements:
- condition: ai_fixの判断が妥当修正不要
next: review_test
instruction: arbitrate
- name: review_test
edit: false
persona: qa-reviewer
@ -192,7 +189,6 @@ movements:
report:
- name: 05-qa-review.md
format: qa-review
- name: fix
edit: true
persona: coder
@ -213,13 +209,13 @@ movements:
- WebSearch
- WebFetch
required_permission_mode: edit
pass_previous_response: false
rules:
- condition: 修正完了
next: review_test
- condition: 判断できない、情報不足
next: plan_test
instruction: fix
- name: supervise
edit: false
persona: supervisor
@ -231,6 +227,7 @@ movements:
- Bash
- WebSearch
- WebFetch
pass_previous_response: false
rules:
- condition: すべて問題なし
next: COMPLETE
@ -239,5 +236,8 @@ movements:
instruction: supervise
output_contracts:
report:
- Validation: 06-supervisor-validation.md
- Summary: summary.md
- name: supervisor-validation.md
format: supervisor-validation
- name: summary.md
format: summary
use_judge: false

View File

@ -304,7 +304,7 @@ takt reset categories
| ピース | おすすめ用途 |
|------------|------------|
| `default` | 本格的な開発タスク。TAKT自身の開発で使用。アーキテクトセキュリティの並列レビュー付き多段階レビュー。 |
| `minimal` | 簡単な修正やシンプルなタスク。基本的なレビュー付きの最小限のピース。 |
| `default-mini` | 簡単な修正やシンプルなタスク。AI アンチパターンレビュー+スーパーバイザー付きの軽量ピース。 |
| `review-fix-minimal` | レビュー&修正ピース。レビューフィードバックに基づく反復的な改善に特化。 |
| `research` | 調査・リサーチ。質問せずに自律的にリサーチを実行。 |
@ -460,13 +460,15 @@ TAKTには複数のビルトインピースが同梱されています:
| ピース | 説明 |
|------------|------|
| `default` | フル開発ピース: 計画 → 実装 → AI レビュー → 並列レビューアーキテクトQA→ スーパーバイザー承認。各レビュー段階に修正ループあり。 |
| `minimal` | クイックピース: 計画 → 実装 → レビュー → スーパーバイザー。高速イテレーション向けの最小構成。 |
| `default-mini` | ミニ開発ピース: 計画 → 実装 → 並列レビューAI アンチパターン+スーパーバイザー)→ 修正。レビュー付きの軽量構成。 |
| `frontend-mini` | ミニフロントエンドピース: 計画 → 実装 → 並列レビューAI アンチパターン+スーパーバイザー)。フロントエンドナレッジ注入付き。 |
| `backend-mini` | ミニバックエンドピース: 計画 → 実装 → 並列レビューAI アンチパターン+スーパーバイザー)。バックエンドナレッジ注入付き。 |
| `backend-cqrs-mini` | ミニ CQRS+ES ピース: 計画 → 実装 → 並列レビューAI アンチパターンスーパーバイザー。CQRS+ES ナレッジ注入付き。 |
| `review-fix-minimal` | レビュー重視ピース: レビュー → 修正 → スーパーバイザー。レビューフィードバックに基づく反復改善向け。 |
| `research` | リサーチピース: プランナー → ディガー → スーパーバイザー。質問せずに自律的にリサーチを実行。 |
| `expert` | フルスタック開発ピース: アーキテクチャ、フロントエンド、セキュリティ、QA レビューと修正ループ。 |
| `expert-cqrs` | フルスタック開発ピースCQRS+ES特化: CQRS+ES、フロントエンド、セキュリティ、QA レビューと修正ループ。 |
| `magi` | エヴァンゲリオンにインスパイアされた審議システム。3つの AI ペルソナMELCHIOR、BALTHASAR、CASPERが分析し投票。 |
| `coding` | 軽量開発ピース: planner → 実装 → 並列レビューAI アンチパターン+アーキテクチャ)→ 修正。スーパーバイザーなしの高速フィードバックループ。 |
| `passthrough` | 最小構成。タスクをそのまま coder に渡す薄いラッパー。レビューなし。 |
| `compound-eye` | マルチモデルレビュー: Claude と Codex に同じ指示を同時送信し、両方の回答を統合。 |
| `review-only` | 変更を加えない読み取り専用のコードレビューピース。 |

View File

@ -6,13 +6,12 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 20
initial_movement: review
loop_monitors:
- cycle: [review, fix]
- cycle:
- review
- fix
threshold: 2
judge:
persona: ../agents/test-reviewer-b.md
@ -21,7 +20,6 @@ loop_monitors:
next: review
- condition: abort_loop
next: ABORT
movements:
- name: review
persona: ../agents/test-reviewer-a.md
@ -32,7 +30,6 @@ movements:
next: COMPLETE
- condition: needs_fix
next: fix
- name: fix
persona: ../agents/test-coder.md
edit: true

View File

@ -6,12 +6,8 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 2
initial_movement: step-a
movements:
- name: step-a
edit: true
@ -22,7 +18,6 @@ movements:
rules:
- condition: Done
next: step-b
- name: step-b
edit: true
persona: ../agents/test-coder.md

View File

@ -6,10 +6,7 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 3
movements:
- name: execute
edit: true

View File

@ -6,10 +6,7 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 3
movements:
- name: execute
edit: true

View File

@ -6,12 +6,8 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 20
initial_movement: step-1
movements:
- name: step-1
edit: true
@ -21,7 +17,6 @@ movements:
rules:
- condition: Done
next: step-2
- name: step-2
edit: true
persona: ../agents/test-coder.md
@ -30,7 +25,6 @@ movements:
rules:
- condition: Done
next: step-3
- name: step-3
edit: true
persona: ../agents/test-coder.md
@ -39,7 +33,6 @@ movements:
rules:
- condition: Done
next: step-4
- name: step-4
edit: true
persona: ../agents/test-coder.md
@ -48,7 +41,6 @@ movements:
rules:
- condition: Done
next: step-5
- name: step-5
edit: true
persona: ../agents/test-coder.md
@ -57,7 +49,6 @@ movements:
rules:
- condition: Done
next: step-6
- name: step-6
edit: true
persona: ../agents/test-coder.md
@ -66,7 +57,6 @@ movements:
rules:
- condition: Done
next: step-7
- name: step-7
edit: true
persona: ../agents/test-coder.md
@ -75,7 +65,6 @@ movements:
rules:
- condition: Done
next: step-8
- name: step-8
edit: true
persona: ../agents/test-coder.md

View File

@ -6,12 +6,8 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 5
initial_movement: step-1
movements:
- name: step-1
edit: true
@ -22,7 +18,6 @@ movements:
rules:
- condition: Done
next: step-2
- name: step-2
edit: true
persona: ../agents/test-coder.md

View File

@ -6,12 +6,8 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 10
initial_movement: plan
movements:
- name: plan
persona: ../agents/test-coder.md
@ -20,9 +16,8 @@ movements:
instruction_template: |
Create a plan for the task.
rules:
- condition: "Plan complete"
- condition: Plan complete
next: review
- name: review
parallel:
- name: arch-review
@ -44,7 +39,6 @@ movements:
next: COMPLETE
- condition: any("needs_fix")
next: fix
- name: fix
persona: ../agents/test-coder.md
edit: true
@ -52,5 +46,5 @@ movements:
instruction_template: |
Fix the issues found in review.
rules:
- condition: "Fix applied"
- condition: Fix applied
next: review

View File

@ -6,10 +6,7 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 3
movements:
- name: execute
edit: true
@ -21,7 +18,8 @@ movements:
required_permission_mode: edit
output_contracts:
report:
- Report: report.md
- name: report.md
format: report
instruction_template: |
{task}
rules:

View File

@ -6,10 +6,7 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 5
movements:
- name: execute
edit: true

View File

@ -6,10 +6,7 @@ piece_config:
network_access: true
opencode:
network_access: true
max_movements: 5
movements:
- name: execute
edit: false

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "takt",
"version": "0.16.0",
"version": "0.17.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "takt",
"version": "0.16.0",
"version": "0.17.0",
"license": "MIT",
"dependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.37",

View File

@ -1,6 +1,6 @@
{
"name": "takt",
"version": "0.16.0",
"version": "0.17.0",
"description": "TAKT: TAKT Agent Koordination Topology - AI Agent Piece Orchestration",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -217,10 +217,10 @@ describe('loadPiece (builtin fallback)', () => {
expect(piece).toBeNull();
});
it('should load builtin pieces like minimal, research, e2e-test', () => {
const minimal = loadPiece('minimal', process.cwd());
expect(minimal).not.toBeNull();
expect(minimal!.name).toBe('minimal');
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');
const research = loadPiece('research', process.cwd());
expect(research).not.toBeNull();
@ -249,7 +249,7 @@ describe('listPieces (builtin fallback)', () => {
it('should include builtin pieces', () => {
const pieces = listPieces(testDir);
expect(pieces).toContain('default');
expect(pieces).toContain('minimal');
expect(pieces).toContain('default-mini');
expect(pieces).toContain('e2e-test');
});
@ -277,7 +277,7 @@ 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('minimal')).toBe(true);
expect(pieces.has('default-mini')).toBe(true);
});
});

View File

@ -74,7 +74,7 @@ describe('emitMovementReports', () => {
it('should emit movement:report when output contract file exists', () => {
// Given: a movement with output contract and the file exists
const outputContracts: OutputContractEntry[] = [{ name: 'plan.md' }];
const outputContracts: OutputContractEntry[] = [{ name: 'plan.md', format: 'plan', useJudge: true }];
const movement = createMovement({ outputContracts });
writeFileSync(join(reportBaseDir, 'plan.md'), '# Plan', 'utf-8');
const emitter = new EventEmitter();
@ -91,7 +91,7 @@ describe('emitMovementReports', () => {
it('should not emit when output contract file does not exist', () => {
// Given: a movement with output contract but file doesn't exist
const outputContracts: OutputContractEntry[] = [{ name: 'missing.md' }];
const outputContracts: OutputContractEntry[] = [{ name: 'missing.md', format: 'missing', useJudge: true }];
const movement = createMovement({ outputContracts });
const emitter = new EventEmitter();
const handler = vi.fn();
@ -106,7 +106,7 @@ describe('emitMovementReports', () => {
it('should emit movement:report when OutputContractItem file exists', () => {
// Given: a movement with OutputContractItem and the file exists
const outputContracts: OutputContractEntry[] = [{ name: '03-review.md', format: '# Review' }];
const outputContracts: OutputContractEntry[] = [{ name: '03-review.md', format: '# Review', useJudge: true }];
const movement = createMovement({ outputContracts });
writeFileSync(join(reportBaseDir, '03-review.md'), '# Review\nOK', 'utf-8');
const emitter = new EventEmitter();
@ -124,9 +124,9 @@ describe('emitMovementReports', () => {
it('should emit for each existing file in output contracts array', () => {
// Given: a movement with array output contracts, two files exist, one missing
const outputContracts: OutputContractEntry[] = [
{ label: 'Scope', path: '01-scope.md' },
{ label: 'Decisions', path: '02-decisions.md' },
{ label: 'Missing', path: '03-missing.md' },
{ name: '01-scope.md', format: '01-scope', useJudge: true },
{ name: '02-decisions.md', format: '02-decisions', useJudge: true },
{ name: '03-missing.md', format: '03-missing', useJudge: true },
];
const movement = createMovement({ outputContracts });
writeFileSync(join(reportBaseDir, '01-scope.md'), '# Scope', 'utf-8');
@ -160,7 +160,7 @@ describe('emitMovementReports', () => {
it('should not emit when reportDir is empty', () => {
// Given: a movement with output contracts but empty reportDir
const outputContracts: OutputContractEntry[] = [{ name: 'plan.md' }];
const outputContracts: OutputContractEntry[] = [{ name: 'plan.md', format: 'plan', useJudge: true }];
const movement = createMovement({ outputContracts });
writeFileSync(join(reportBaseDir, 'plan.md'), '# Plan', 'utf-8');
const emitter = new EventEmitter();

View File

@ -68,7 +68,7 @@ function buildSimpleConfig(): PieceConfig {
initialMovement: 'review',
movements: [
makeMovement('review', {
outputContracts: [{ label: 'review', path: '00-review.md' }],
outputContracts: [{ name: '00-review.md', format: '00-review', useJudge: true }],
rules: [
makeRule('approved', 'COMPLETE'),
],
@ -138,7 +138,7 @@ describe('PieceEngine: worktree reportDir resolution', () => {
movements: [
makeMovement('review', {
instructionTemplate: 'Write report to {report_dir}',
outputContracts: [{ label: 'review', path: '00-review.md' }],
outputContracts: [{ name: '00-review.md', format: '00-review', useJudge: true }],
rules: [
makeRule('approved', 'COMPLETE'),
],

View File

@ -15,29 +15,29 @@ import { makeMovement, makeInstructionContext } from './test-helpers.js';
describe('isOutputContractItem', () => {
it('should return true for OutputContractItem (has name)', () => {
expect(isOutputContractItem({ name: 'report.md' })).toBe(true);
expect(isOutputContractItem({ name: 'report.md', format: 'report', useJudge: true })).toBe(true);
});
it('should return true for OutputContractItem with order/format', () => {
expect(isOutputContractItem({ name: 'report.md', order: 'Output to file', format: 'markdown' })).toBe(true);
expect(isOutputContractItem({ name: 'report.md', order: 'Output to file', format: 'markdown', useJudge: true })).toBe(true);
});
it('should return false for OutputContractLabelPath (has label and path)', () => {
expect(isOutputContractItem({ label: 'Report', path: 'report.md' })).toBe(false);
it('should return false when name is missing', () => {
expect(isOutputContractItem({ format: 'report', useJudge: true })).toBe(false);
});
});
describe('renderReportContext', () => {
it('should render single OutputContractItem', () => {
const contracts: OutputContractEntry[] = [{ name: '00-plan.md' }];
const contracts: OutputContractEntry[] = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const result = renderReportContext(contracts, '/tmp/reports');
expect(result).toContain('Report Directory: /tmp/reports/');
expect(result).toContain('Report File: /tmp/reports/00-plan.md');
});
it('should render single OutputContractLabelPath', () => {
const contracts: OutputContractEntry[] = [{ label: 'Plan', path: 'plan.md' }];
it('should render single OutputContractItem by name', () => {
const contracts: OutputContractEntry[] = [{ name: 'plan.md', format: 'plan', useJudge: true }];
const result = renderReportContext(contracts, '/tmp/reports');
expect(result).toContain('Report Directory: /tmp/reports/');
@ -46,15 +46,15 @@ describe('renderReportContext', () => {
it('should render multiple contracts as list', () => {
const contracts: OutputContractEntry[] = [
{ name: '00-plan.md' },
{ label: 'Review', path: '01-review.md' },
{ name: '00-plan.md', format: '00-plan', useJudge: true },
{ name: '01-review.md', format: '01-review', useJudge: true },
];
const result = renderReportContext(contracts, '/tmp/reports');
expect(result).toContain('Report Directory: /tmp/reports/');
expect(result).toContain('Report Files:');
expect(result).toContain('00-plan.md: /tmp/reports/00-plan.md');
expect(result).toContain('Review: /tmp/reports/01-review.md');
expect(result).toContain('01-review.md: /tmp/reports/01-review.md');
});
});
@ -66,13 +66,13 @@ describe('renderReportOutputInstruction', () => {
});
it('should return empty string when no reportDir', () => {
const step = makeMovement({ outputContracts: [{ name: 'report.md' }] });
const step = makeMovement({ outputContracts: [{ name: 'report.md', format: 'report', useJudge: true }] });
const ctx = makeInstructionContext();
expect(renderReportOutputInstruction(step, ctx, 'en')).toBe('');
});
it('should render English single-file instruction', () => {
const step = makeMovement({ outputContracts: [{ name: 'report.md' }] });
const step = makeMovement({ outputContracts: [{ name: 'report.md', format: 'report', useJudge: true }] });
const ctx = makeInstructionContext({ reportDir: '/tmp/reports', movementIteration: 2 });
const result = renderReportOutputInstruction(step, ctx, 'en');
@ -83,7 +83,7 @@ describe('renderReportOutputInstruction', () => {
it('should render English multi-file instruction', () => {
const step = makeMovement({
outputContracts: [{ name: 'plan.md' }, { name: 'review.md' }],
outputContracts: [{ name: 'plan.md', format: 'plan', useJudge: true }, { name: 'review.md', format: 'review', useJudge: true }],
});
const ctx = makeInstructionContext({ reportDir: '/tmp/reports' });
@ -92,7 +92,7 @@ describe('renderReportOutputInstruction', () => {
});
it('should render Japanese single-file instruction', () => {
const step = makeMovement({ outputContracts: [{ name: 'report.md' }] });
const step = makeMovement({ outputContracts: [{ name: 'report.md', format: 'report', useJudge: true }] });
const ctx = makeInstructionContext({ reportDir: '/tmp/reports', movementIteration: 1 });
const result = renderReportOutputInstruction(step, ctx, 'ja');
@ -103,7 +103,7 @@ describe('renderReportOutputInstruction', () => {
it('should render Japanese multi-file instruction', () => {
const step = makeMovement({
outputContracts: [{ name: 'plan.md' }, { name: 'review.md' }],
outputContracts: [{ name: 'plan.md', format: 'plan', useJudge: true }, { name: 'review.md', format: 'review', useJudge: true }],
});
const ctx = makeInstructionContext({ reportDir: '/tmp/reports' });

View File

@ -474,7 +474,7 @@ describe('instruction-builder', () => {
it('should include report info in Phase 1 when step has report', () => {
const step = createMinimalStep('Do work');
step.name = 'plan';
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const context = createMinimalContext({
reportDir: '/project/.takt/runs/20260129-test/reports',
language: 'en',
@ -491,8 +491,8 @@ describe('instruction-builder', () => {
it('should include report info for OutputContractEntry[] in Phase 1', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [
{ label: 'Scope', path: '01-scope.md' },
{ label: 'Decisions', path: '02-decisions.md' },
{ name: '01-scope.md', format: '01-scope', useJudge: true },
{ name: '02-decisions.md', format: '02-decisions', useJudge: true },
];
const context = createMinimalContext({
reportDir: '/project/.takt/runs/20260129-test/reports',
@ -508,7 +508,7 @@ describe('instruction-builder', () => {
it('should include report info for OutputContractItem in Phase 1', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const context = createMinimalContext({
reportDir: '/project/.takt/runs/20260129-test/reports',
language: 'en',
@ -653,7 +653,7 @@ describe('instruction-builder', () => {
describe('buildInstruction report-free (phase separation)', () => {
it('should include Report Directory info but NOT report output instruction in Phase 1', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const context = createMinimalContext({
reportDir: '/project/.takt/runs/20260129-test/reports',
language: 'en',
@ -673,7 +673,7 @@ describe('instruction-builder', () => {
it('should NOT include output contract in buildInstruction', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md', format: '**Format:**\n# Plan' }];
step.outputContracts = [{ name: '00-plan.md', format: '**Format:**\n# Plan', useJudge: true }];
const context = createMinimalContext({
reportDir: '/project/.takt/runs/20260129-test/reports',
language: 'en',
@ -727,7 +727,7 @@ describe('instruction-builder', () => {
it('should include execution context with working directory', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const ctx = createReportContext({ cwd: '/my/project' });
const result = buildReportInstruction(step, ctx);
@ -737,7 +737,7 @@ describe('instruction-builder', () => {
it('should include no-source-edit rule in execution rules', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const ctx = createReportContext();
const result = buildReportInstruction(step, ctx);
@ -747,7 +747,7 @@ describe('instruction-builder', () => {
it('should include no-commit and no-cd rules', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const ctx = createReportContext();
const result = buildReportInstruction(step, ctx);
@ -758,7 +758,7 @@ describe('instruction-builder', () => {
it('should include report directory and file for string report', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const ctx = createReportContext({ reportDir: '/project/.takt/runs/20260130-test/reports' });
const result = buildReportInstruction(step, ctx);
@ -770,8 +770,8 @@ describe('instruction-builder', () => {
it('should include report files for OutputContractEntry[] report', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [
{ label: 'Scope', path: '01-scope.md' },
{ label: 'Decisions', path: '02-decisions.md' },
{ name: '01-scope.md', format: '01-scope', useJudge: true },
{ name: '02-decisions.md', format: '02-decisions', useJudge: true },
];
const ctx = createReportContext();
@ -779,13 +779,13 @@ describe('instruction-builder', () => {
expect(result).toContain('- Report Directory: /project/.takt/runs/20260129-test/reports/');
expect(result).toContain('- Report Files:');
expect(result).toContain(' - Scope: /project/.takt/runs/20260129-test/reports/01-scope.md');
expect(result).toContain(' - Decisions: /project/.takt/runs/20260129-test/reports/02-decisions.md');
expect(result).toContain(' - 01-scope.md: /project/.takt/runs/20260129-test/reports/01-scope.md');
expect(result).toContain(' - 02-decisions.md: /project/.takt/runs/20260129-test/reports/02-decisions.md');
});
it('should include report file for OutputContractItem report', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const ctx = createReportContext();
const result = buildReportInstruction(step, ctx);
@ -795,7 +795,7 @@ describe('instruction-builder', () => {
it('should include auto-generated report output instruction', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const ctx = createReportContext();
const result = buildReportInstruction(step, ctx);
@ -810,6 +810,8 @@ describe('instruction-builder', () => {
step.outputContracts = [{
name: '00-plan.md',
order: 'Output to {report:00-plan.md} file.',
format: '00-plan',
useJudge: true,
}];
const ctx = createReportContext();
@ -824,6 +826,7 @@ describe('instruction-builder', () => {
step.outputContracts = [{
name: '00-plan.md',
format: '**Format:**\n```markdown\n# Plan\n```',
useJudge: true,
}];
const ctx = createReportContext();
@ -835,7 +838,7 @@ describe('instruction-builder', () => {
it('should include overwrite-and-archive rule in report output instruction', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const ctx = createReportContext({ movementIteration: 5 });
const result = buildReportInstruction(step, ctx);
@ -845,7 +848,7 @@ describe('instruction-builder', () => {
it('should include instruction body text', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const ctx = createReportContext();
const result = buildReportInstruction(step, ctx);
@ -856,7 +859,7 @@ describe('instruction-builder', () => {
it('should NOT include user request, previous response, or status rules', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
step.rules = [
{ condition: 'Done', next: 'COMPLETE' },
];
@ -872,7 +875,7 @@ describe('instruction-builder', () => {
it('should render Japanese report instruction', () => {
const step = createMinimalStep('作業する');
step.outputContracts = [{ name: '00-plan.md' }];
step.outputContracts = [{ name: '00-plan.md', format: '00-plan', useJudge: true }];
const ctx = createReportContext({ language: 'ja' });
const result = buildReportInstruction(step, ctx);
@ -892,8 +895,8 @@ describe('instruction-builder', () => {
it('should include multi-file report output instruction for OutputContractEntry[]', () => {
const step = createMinimalStep('Do work');
step.outputContracts = [
{ label: 'Scope', path: '01-scope.md' },
{ label: 'Decisions', path: '02-decisions.md' },
{ name: '01-scope.md', format: '01-scope', useJudge: true },
{ name: '02-decisions.md', format: '02-decisions', useJudge: true },
];
const ctx = createReportContext();
@ -1144,15 +1147,15 @@ describe('instruction-builder', () => {
describe('isOutputContractItem', () => {
it('should return true for OutputContractItem', () => {
expect(isOutputContractItem({ name: '00-plan.md' })).toBe(true);
expect(isOutputContractItem({ name: '00-plan.md', format: '00-plan', useJudge: true })).toBe(true);
});
it('should return true for OutputContractItem with order/format', () => {
expect(isOutputContractItem({ name: '00-plan.md', order: 'output to...', format: '# Plan' })).toBe(true);
});
it('should return false for OutputContractLabelPath', () => {
expect(isOutputContractItem({ label: 'Scope', path: '01-scope.md' })).toBe(false);
it('should return false when name is missing', () => {
expect(isOutputContractItem({ format: '01-scope', useJudge: true })).toBe(false);
});
});

View File

@ -281,7 +281,7 @@ describe('Instruction Builder IT: buildReportInstruction', () => {
it('should build report instruction with report context', () => {
const step = makeMovement({
name: 'plan',
outputContracts: [{ name: '00-plan.md', format: '# Plan\n{movement_iteration}' }],
outputContracts: [{ name: '00-plan.md', format: '# Plan\n{movement_iteration}', useJudge: true }],
});
const result = buildReportInstruction(step, {

View File

@ -156,7 +156,7 @@ describe('Piece Loader IT: agent path resolution', () => {
});
it('should resolve relative agent paths from piece YAML location', () => {
const config = loadPiece('minimal', testDir);
const config = loadPiece('default-mini', testDir);
expect(config).not.toBeNull();
for (const movement of config!.movements) {
@ -223,7 +223,7 @@ describe('Piece Loader IT: rule syntax parsing', () => {
});
it('should parse standard rules with next movement', () => {
const config = loadPiece('minimal', testDir);
const config = loadPiece('default-mini', testDir);
expect(config).not.toBeNull();
const implementStep = config!.movements.find((s) => s.name === 'implement');
@ -251,14 +251,14 @@ describe('Piece Loader IT: piece config validation', () => {
});
it('should set max_movements from YAML', () => {
const config = loadPiece('minimal', testDir);
const config = loadPiece('default-mini', 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('minimal', testDir);
const config = loadPiece('default-mini', testDir);
expect(config).not.toBeNull();
expect(typeof config!.initialMovement).toBe('string');
@ -290,7 +290,7 @@ describe('Piece Loader IT: piece config validation', () => {
});
it('should set passPreviousResponse from YAML', () => {
const config = loadPiece('minimal', testDir);
const config = loadPiece('default-mini', testDir);
expect(config).not.toBeNull();
// At least some movements should have passPreviousResponse set

View File

@ -80,7 +80,7 @@ function createEngine(config: PieceConfig, dir: string, task: string): PieceEngi
});
}
describe('Piece Patterns IT: minimal piece', () => {
describe('Piece Patterns IT: default-mini piece', () => {
let testDir: string;
beforeEach(() => {
@ -93,11 +93,12 @@ describe('Piece Patterns IT: minimal piece', () => {
rmSync(testDir, { recursive: true, force: true });
});
it('should complete: implement → reviewers (parallel: ai_review + supervise) → COMPLETE', async () => {
const config = loadPiece('minimal', testDir);
it('should complete: plan → implement → reviewers (parallel: ai_review + supervise) → COMPLETE', async () => {
const config = loadPiece('default-mini', 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.' },
@ -107,13 +108,14 @@ describe('Piece Patterns IT: minimal piece', () => {
const state = await engine.run();
expect(state.status).toBe('completed');
expect(state.iteration).toBe(2);
expect(state.iteration).toBe(3);
});
it('should ABORT when implement cannot proceed', async () => {
const config = loadPiece('minimal', testDir);
const config = loadPiece('default-mini', testDir);
setMockScenario([
{ persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible.' },
{ persona: 'coder', status: 'done', content: 'Cannot proceed, insufficient info.' },
]);
@ -121,7 +123,7 @@ describe('Piece Patterns IT: minimal piece', () => {
const state = await engine.run();
expect(state.status).toBe('aborted');
expect(state.iteration).toBe(1);
expect(state.iteration).toBe(2);
});
});

View File

@ -282,6 +282,7 @@ describe('Pipeline Modes IT: --task + --piece name (builtin)', () => {
it('should load and execute builtin minimal piece by name', async () => {
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' },
@ -289,7 +290,7 @@ describe('Pipeline Modes IT: --task + --piece name (builtin)', () => {
const exitCode = await executePipeline({
task: 'Add a feature',
piece: 'minimal',
piece: 'default-mini',
autoPr: false,
skipGit: true,
cwd: testDir,

View File

@ -228,10 +228,11 @@ describe('Pipeline Integration Tests', () => {
});
it('should complete pipeline with piece name + skip-git + mock scenario', async () => {
// Use builtin 'minimal' piece
// Use builtin 'default-mini' piece
// persona field: extractPersonaName result (from .md filename)
// tag in content: [MOVEMENT_NAME:N] where MOVEMENT_NAME is the movement name uppercased
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' },
@ -239,7 +240,7 @@ describe('Pipeline Integration Tests', () => {
const exitCode = await executePipeline({
task: 'Add a hello world function',
piece: 'minimal',
piece: 'default-mini',
autoPr: false,
skipGit: true,
cwd: testDir,

View File

@ -188,7 +188,7 @@ describe('Three-Phase Execution IT: phase1 + phase2 (report defined)', () => {
makeMovement('step', agentPath, [
makeRule('Done', 'COMPLETE'),
makeRule('Not done', 'ABORT'),
], { outputContracts: [{ label: 'test', path: 'test-report.md' }] }),
], { outputContracts: [{ name: 'test-report.md', format: 'test-report', useJudge: true }] }),
],
};
@ -217,7 +217,7 @@ describe('Three-Phase Execution IT: phase1 + phase2 (report defined)', () => {
movements: [
makeMovement('step', agentPath, [
makeRule('Done', 'COMPLETE'),
], { outputContracts: [{ label: 'Scope', path: 'scope.md' }, { label: 'Decisions', path: 'decisions.md' }] }),
], { outputContracts: [{ name: 'scope.md', format: 'scope', useJudge: true }, { name: 'decisions.md', format: 'decisions', useJudge: true }] }),
],
};
@ -320,7 +320,7 @@ describe('Three-Phase Execution IT: all three phases', () => {
makeMovement('step', agentPath, [
makeRule('Done', 'COMPLETE'),
makeRule('Not done', 'ABORT'),
], { outputContracts: [{ label: 'test', path: 'test-report.md' }] }),
], { outputContracts: [{ name: 'test-report.md', format: 'test-report', useJudge: true }] }),
],
};

View File

@ -560,6 +560,7 @@ describe('section reference resolution', () => {
report: [{
name: '00-plan.md',
format: 'plan',
use_judge: true,
}],
},
}],

View File

@ -235,7 +235,7 @@ describe('pr-comment instruction_template contains piece-specific procedures', (
expect(template).toContain('01-architect-review.md');
expect(template).toContain('02-security-review.md');
expect(template).toContain('03-ai-review.md');
expect(template).toContain('04-review-summary.md');
expect(template).toContain('review-summary.md');
});
it('JA: should reference specific report files', () => {
@ -245,6 +245,6 @@ describe('pr-comment instruction_template contains piece-specific procedures', (
expect(template).toContain('01-architect-review.md');
expect(template).toContain('02-security-review.md');
expect(template).toContain('03-ai-review.md');
expect(template).toContain('04-review-summary.md');
expect(template).toContain('review-summary.md');
});
});

View File

@ -131,24 +131,24 @@ describe('getReportFiles', () => {
it('should extract name from OutputContractItem entries', () => {
const contracts: OutputContractEntry[] = [
{ name: '00-plan.md' },
{ name: '01-review.md' },
{ name: '00-plan.md', format: '00-plan', useJudge: true },
{ name: '01-review.md', format: '01-review', useJudge: true },
];
expect(getReportFiles(contracts)).toEqual(['00-plan.md', '01-review.md']);
});
it('should extract path from OutputContractLabelPath entries', () => {
const contracts: OutputContractEntry[] = [
{ label: 'Scope', path: 'scope.md' },
{ label: 'Decisions', path: 'decisions.md' },
{ name: 'scope.md', format: 'scope', useJudge: true },
{ name: 'decisions.md', format: 'decisions', useJudge: true },
];
expect(getReportFiles(contracts)).toEqual(['scope.md', 'decisions.md']);
});
it('should handle mixed entry types', () => {
const contracts: OutputContractEntry[] = [
{ name: '00-plan.md' },
{ label: 'Review', path: 'review.md' },
{ name: '00-plan.md', format: '00-plan', useJudge: true },
{ name: 'review.md', format: 'review', useJudge: true },
];
expect(getReportFiles(contracts)).toEqual(['00-plan.md', 'review.md']);
});

View File

@ -52,7 +52,7 @@ describe('prepareRuntimeEnvironment', () => {
expect(result).toBeDefined();
expect(result?.prepare).toEqual(['gradle', 'node']);
const runtimeRoot = join(cwd, '.runtime');
const runtimeRoot = join(cwd, '.takt', '.runtime');
expect(existsSync(runtimeRoot)).toBe(true);
expect(existsSync(join(runtimeRoot, 'tmp'))).toBe(true);
expect(existsSync(join(runtimeRoot, 'cache'))).toBe(true);
@ -89,8 +89,8 @@ describe('prepareRuntimeEnvironment', () => {
});
expect(result).toBeDefined();
expect(result?.injectedEnv.CUSTOM_CACHE_DIR).toBe(join(cwd, '.runtime', 'custom-cache'));
expect(existsSync(join(cwd, '.runtime', 'custom-cache'))).toBe(true);
expect(result?.injectedEnv.CUSTOM_CACHE_DIR).toBe(join(cwd, '.takt', '.runtime', 'custom-cache'));
expect(existsSync(join(cwd, '.takt', '.runtime', 'custom-cache'))).toBe(true);
});
});

View File

@ -4,7 +4,6 @@ export type {
Status,
RuleMatchMethod,
PermissionMode,
OutputContractLabelPath,
OutputContractItem,
OutputContractEntry,
McpServerConfig,

View File

@ -34,26 +34,20 @@ export interface PieceRule {
aggregateConditionText?: string | string[];
}
/** Output contract configuration (label: path pair format) */
export interface OutputContractLabelPath {
/** Display label (e.g., "Scope", "Decisions") */
label: string;
/** File path relative to report directory (e.g., "01-coder-scope.md") */
path: string;
}
/** Output contract item configuration with order/format instructions */
export interface OutputContractItem {
/** Report file name (e.g., "00-plan.md") */
name: string;
/** Output format template key or inline format content */
format: string;
/** Whether this report is used as input for status judgment phase (default: true) */
useJudge?: boolean;
/** Instruction prepended before instruction_template (e.g., output destination) */
order?: string;
/** Instruction appended after instruction_template (e.g., output format) - resolved from report_formats */
format?: string;
}
/** Union type for output contract entries */
export type OutputContractEntry = OutputContractLabelPath | OutputContractItem;
/** Output contract entry */
export type OutputContractEntry = OutputContractItem;
/** MCP server configuration for stdio transport */
export interface McpStdioServerConfig {

View File

@ -119,52 +119,35 @@ export const PieceProviderOptionsSchema = z.object({
*
* YAML format:
* output_contracts:
* - name: 00-plan.md
* order: |
* **:** {report:00-plan.md}
* format: |
* **:**
* ```markdown
* ...
* ```
* report:
* - name: 00-plan.md
* format: plan
* use_judge: true
*/
export const OutputContractItemSchema = z.object({
/** Report file name */
name: z.string().min(1),
/** Instruction appended after instruction_template (e.g., output format) */
format: z.string().min(1),
/** Whether this report is used as input for status judgment phase */
use_judge: z.boolean().optional().default(true),
/** Instruction prepended before instruction_template (e.g., output destination) */
order: z.string().optional(),
/** Instruction appended after instruction_template (e.g., output format) */
format: z.string().optional(),
});
/**
* Raw output contract entry array item in output_contracts.report
*
* Supports:
* - Label:path format: { Scope: "01-scope.md" }
* - Item format: { name, order?, format? }
*/
export const OutputContractEntrySchema = z.union([
z.record(z.string(), z.string()), // {Scope: "01-scope.md"} format
OutputContractItemSchema, // {name, order?, format?} format
]);
/**
* Output contracts field schema for movement-level definition.
*
* YAML format:
* output_contracts:
* report: # report array (required if output_contracts is specified)
* - Scope: 01-scope.md # label:path format
* - Decisions: 02-decisions.md
* output_contracts:
* report:
* - name: 00-plan.md # name + order + format format
* - name: 00-plan.md
* order: ...
* format: plan
* use_judge: true
*/
export const OutputContractsFieldSchema = z.object({
report: z.array(OutputContractEntrySchema).optional(),
report: z.array(OutputContractItemSchema).optional(),
}).optional();
/** Quality gates schema - AI directives for movement completion (string array) */

View File

@ -33,7 +33,6 @@ export type {
// Piece configuration and runtime state
export type {
PieceRule,
OutputContractLabelPath,
OutputContractItem,
OutputContractEntry,
McpServerConfig,

View File

@ -16,7 +16,7 @@ import type {
} from '../../models/types.js';
import type { PhaseName } from '../types.js';
import { executeAgent } from '../agent-usecases.js';
import { InstructionBuilder, isOutputContractItem } from '../instruction/InstructionBuilder.js';
import { InstructionBuilder } from '../instruction/InstructionBuilder.js';
import { needsStatusJudgmentPhase, runReportPhase, runStatusJudgmentPhase } from '../phase-runner.js';
import { detectMatchedRule } from '../evaluation/index.js';
import { buildSessionKey } from '../session-key.js';
@ -257,7 +257,7 @@ export class MovementExecutor {
const baseDir = join(this.deps.getCwd(), this.deps.getReportDir());
for (const entry of step.outputContracts) {
const fileName = isOutputContractItem(entry) ? entry.name : entry.path;
const fileName = entry.name;
this.checkReportFile(step, baseDir, fileName);
}
}

View File

@ -3,7 +3,6 @@
*/
import type { PieceMovement, OutputContractEntry } from '../../models/types.js';
import { isOutputContractItem } from '../instruction/InstructionBuilder.js';
/**
* Check whether a movement has tag-based rules (i.e., rules that require
@ -42,8 +41,15 @@ export function getAutoSelectedTag(step: PieceMovement): string {
*/
export function getReportFiles(outputContracts: OutputContractEntry[] | undefined): string[] {
if (!outputContracts || outputContracts.length === 0) return [];
return outputContracts.map((entry) => {
if (isOutputContractItem(entry)) return entry.name;
return entry.path;
});
return outputContracts.map((entry) => entry.name);
}
/**
* Get report file names that are eligible for Phase 3 status judgment.
*/
export function getJudgmentReportFiles(outputContracts: OutputContractEntry[] | undefined): string[] {
if (!outputContracts || outputContracts.length === 0) return [];
return outputContracts
.filter((entry) => entry.useJudge !== false)
.map((entry) => entry.name);
}

View File

@ -267,16 +267,12 @@ export function renderReportContext(
if (outputContracts.length === 1) {
const entry = outputContracts[0]!;
const fileName = isOutputContractItem(entry) ? entry.name : entry.path;
const fileName = entry.name;
lines.push(`- ${reportFile}: ${reportDir}/${fileName}`);
} else {
lines.push(`- ${reportFiles}:`);
for (const entry of outputContracts) {
if (isOutputContractItem(entry)) {
lines.push(` - ${entry.name}: ${reportDir}/${entry.name}`);
} else {
lines.push(` - ${entry.label}: ${reportDir}/${entry.path}`);
}
lines.push(` - ${entry.name}: ${reportDir}/${entry.name}`);
}
}

View File

@ -68,9 +68,12 @@ export class ReportInstructionBuilder {
language,
};
const firstContract = this.step.outputContracts[0];
if (firstContract && isOutputContractItem(firstContract) && firstContract.order) {
reportOutput = replaceTemplatePlaceholders(firstContract.order.trimEnd(), this.step, instrContext);
const targetContract = this.context.targetFile
? this.step.outputContracts.find((entry) => entry.name === this.context.targetFile)
: this.step.outputContracts[0];
if (targetContract && isOutputContractItem(targetContract) && targetContract.order) {
reportOutput = replaceTemplatePlaceholders(targetContract.order.trimEnd(), this.step, instrContext);
hasReportOutput = true;
} else if (!this.context.targetFile) {
const output = renderReportOutputInstruction(this.step, instrContext, language);
@ -82,8 +85,8 @@ export class ReportInstructionBuilder {
let outputContract = '';
let hasOutputContract = false;
if (firstContract && isOutputContractItem(firstContract) && firstContract.format) {
outputContract = replaceTemplatePlaceholders(firstContract.format.trimEnd(), this.step, instrContext);
if (targetContract && isOutputContractItem(targetContract) && targetContract.format) {
outputContract = replaceTemplatePlaceholders(targetContract.format.trimEnd(), this.step, instrContext);
hasOutputContract = true;
}

View File

@ -3,7 +3,7 @@ import { resolve } from 'node:path';
import type { PieceMovement, RuleMatchMethod } from '../models/types.js';
import { judgeStatus } from './agent-usecases.js';
import { StatusJudgmentBuilder, type StatusJudgmentContext } from './instruction/StatusJudgmentBuilder.js';
import { getReportFiles } from './evaluation/rule-utils.js';
import { getJudgmentReportFiles } from './evaluation/rule-utils.js';
import { createLogger } from '../../shared/utils/index.js';
import type { PhaseRunnerContext } from './phase-runner.js';
@ -23,7 +23,7 @@ function buildBaseContext(
step: PieceMovement,
ctx: PhaseRunnerContext,
): Omit<StatusJudgmentContext, 'structuredOutput'> | undefined {
const reportFiles = getReportFiles(step.outputContracts);
const reportFiles = getJudgmentReportFiles(step.outputContracts);
if (reportFiles.length > 0) {
const reports: string[] = [];
@ -41,6 +41,7 @@ function buildBaseContext(
inputSource: 'report',
};
}
throw new Error(`Status judgment requires existing use_judge reports for movement "${step.name}"`);
}
if (!ctx.lastResponse) return undefined;

View File

@ -188,7 +188,7 @@ export function prepareRuntimeEnvironment(
}
const deduped = dedupePrepare(prepareEntries);
const runtimeRoot = join(cwd, '.runtime');
const runtimeRoot = join(cwd, '.takt', '.runtime');
const envFile = join(runtimeRoot, 'env.sh');
const injectedEnv = buildInjectedEnvironment(cwd, runtimeRoot, deduped);

Some files were not shown because too many files have changed in this diff Show More