diff --git a/CHANGELOG.md b/CHANGELOG.md index 8602f34..24cab3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 449c89c..bfd9ae0 100644 --- a/README.md +++ b/README.md @@ -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. | diff --git a/builtins/en/instructions/supervise.md b/builtins/en/instructions/supervise.md index f5c5dcd..a7dda1d 100644 --- a/builtins/en/instructions/supervise.md +++ b/builtins/en/instructions/supervise.md @@ -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 | diff --git a/builtins/en/output-contracts/supervisor-validation.md b/builtins/en/output-contracts/supervisor-validation.md index d84a19b..5428760 100644 --- a/builtins/en/output-contracts/supervisor-validation.md +++ b/builtins/en/output-contracts/supervisor-validation.md @@ -3,10 +3,22 @@ ## 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 | |------|--------|-------------------| -| Requirements met | ✅ | Checked against requirements list | | Tests | ✅ | `npm test` (N passed) | | Build | ✅ | `npm run build` succeeded | | Functional check | ✅ | Main flow verified | diff --git a/builtins/en/personas/supervisor.md b/builtins/en/personas/supervisor.md index 78c2b78..8e038b4 100644 --- a/builtins/en/personas/supervisor.md +++ b/builtins/en/personas/supervisor.md @@ -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. diff --git a/builtins/en/piece-categories.yaml b/builtins/en/piece-categories.yaml index 1cd1933..b8c77b5 100644 --- a/builtins/en/piece-categories.yaml +++ b/builtins/en/piece-categories.yaml @@ -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 diff --git a/builtins/en/pieces/backend-cqrs-mini.yaml b/builtins/en/pieces/backend-cqrs-mini.yaml new file mode 100644 index 0000000..7b9803b --- /dev/null +++ b/builtins/en/pieces/backend-cqrs-mini.yaml @@ -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 diff --git a/builtins/en/pieces/backend-mini.yaml b/builtins/en/pieces/backend-mini.yaml new file mode 100644 index 0000000..0927fc1 --- /dev/null +++ b/builtins/en/pieces/backend-mini.yaml @@ -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 diff --git a/builtins/en/pieces/coding.yaml b/builtins/en/pieces/coding.yaml deleted file mode 100644 index 0688b44..0000000 --- a/builtins/en/pieces/coding.yaml +++ /dev/null @@ -1,140 +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: - - 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 - 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 - pass_previous_response: false - rules: - - condition: Fix complete - next: reviewers - - condition: Cannot determine, insufficient information - next: ABORT - instruction: fix diff --git a/builtins/en/pieces/minimal.yaml b/builtins/en/pieces/default-mini.yaml similarity index 83% rename from builtins/en/pieces/minimal.yaml rename to builtins/en/pieces/default-mini.yaml index e4e86b1..b5b05ed 100644 --- a/builtins/en/pieces/minimal.yaml +++ b/builtins/en/pieces/default-mini.yaml @@ -1,5 +1,5 @@ -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: @@ -7,14 +7,38 @@ piece_config: 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 @@ -67,6 +91,7 @@ movements: edit: false persona: supervisor policy: review + knowledge: architecture allowed_tools: - Read - Glob @@ -102,6 +127,7 @@ movements: policy: - coding - testing + knowledge: architecture allowed_tools: - Read - Glob @@ -122,6 +148,7 @@ movements: policy: - coding - testing + knowledge: architecture allowed_tools: - Read - Glob @@ -146,6 +173,7 @@ movements: policy: - coding - testing + knowledge: architecture allowed_tools: - Read - Glob @@ -171,6 +199,7 @@ movements: policy: - coding - testing + knowledge: architecture allowed_tools: - Read - Glob diff --git a/builtins/en/pieces/frontend-mini.yaml b/builtins/en/pieces/frontend-mini.yaml new file mode 100644 index 0000000..b7ecc7e --- /dev/null +++ b/builtins/en/pieces/frontend-mini.yaml @@ -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 diff --git a/builtins/ja/instructions/supervise.md b/builtins/ja/instructions/supervise.md index c2c44e2..2e0518e 100644 --- a/builtins/ja/instructions/supervise.md +++ b/builtins/ja/instructions/supervise.md @@ -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` 成功 | | 動作確認 | ✅ | 主要フロー確認 | diff --git a/builtins/ja/output-contracts/supervisor-validation.md b/builtins/ja/output-contracts/supervisor-validation.md index 4fd1110..b7f1503 100644 --- a/builtins/ja/output-contracts/supervisor-validation.md +++ b/builtins/ja/output-contracts/supervisor-validation.md @@ -3,10 +3,22 @@ ## 結果: APPROVE / REJECT +## 要件充足チェック + +タスク指示書から要件を抽出し、各要件を実コードで個別に検証する。 + +| # | 要件(タスク指示書から抽出) | 充足 | 根拠(ファイル:行) | +|---|---------------------------|------|-------------------| +| 1 | {要件1} | ✅/❌ | `src/file.ts:42` | +| 2 | {要件2} | ✅/❌ | `src/file.ts:55` | + +- ❌ が1件でもある場合は REJECT 必須 +- 根拠なしの ✅ は無効(実コードで確認すること) +- 計画レポートの判断を鵜呑みにせず、要件ごとに独立照合する + ## 検証サマリー | 項目 | 状態 | 確認方法 | |------|------|---------| -| 要求充足 | ✅ | 要求リストと照合 | | テスト | ✅ | `npm test` (N passed) | | ビルド | ✅ | `npm run build` 成功 | | 動作確認 | ✅ | 主要フロー確認 | diff --git a/builtins/ja/personas/supervisor.md b/builtins/ja/personas/supervisor.md index b9b22c7..d519e74 100644 --- a/builtins/ja/personas/supervisor.md +++ b/builtins/ja/personas/supervisor.md @@ -43,10 +43,12 @@ ### 検証観点 -**要求の充足:** -- 元のタスク要求がすべて満たされているか +**要求の充足(最重要):** + +- 全要件を個別に検証し、1件でも未充足なら APPROVE しない - 「~もできる」と言っていたことが本当にできるか - 暗黙の要求(当然期待される動作)が満たされているか +- 「概ね完了」「主要部分は完了」は APPROVE の根拠にならない。全要件の充足が必要 **動作確認(実際に実行する):** diff --git a/builtins/ja/piece-categories.yaml b/builtins/ja/piece-categories.yaml index 6daf434..3a3c28b 100644 --- a/builtins/ja/piece-categories.yaml +++ b/builtins/ja/piece-categories.yaml @@ -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 diff --git a/builtins/ja/pieces/backend-cqrs-mini.yaml b/builtins/ja/pieces/backend-cqrs-mini.yaml new file mode 100644 index 0000000..a7f59a7 --- /dev/null +++ b/builtins/ja/pieces/backend-cqrs-mini.yaml @@ -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 diff --git a/builtins/ja/pieces/backend-mini.yaml b/builtins/ja/pieces/backend-mini.yaml new file mode 100644 index 0000000..439c396 --- /dev/null +++ b/builtins/ja/pieces/backend-mini.yaml @@ -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 diff --git a/builtins/ja/pieces/coding.yaml b/builtins/ja/pieces/coding.yaml deleted file mode 100644 index 63eb435..0000000 --- a/builtins/ja/pieces/coding.yaml +++ /dev/null @@ -1,140 +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: - - 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 - 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 - pass_previous_response: false - rules: - - condition: 修正完了 - next: reviewers - - condition: 判断できない、情報不足 - next: ABORT - instruction: fix diff --git a/builtins/ja/pieces/minimal.yaml b/builtins/ja/pieces/default-mini.yaml similarity index 84% rename from builtins/ja/pieces/minimal.yaml rename to builtins/ja/pieces/default-mini.yaml index 8a874d9..477074d 100644 --- a/builtins/ja/pieces/minimal.yaml +++ b/builtins/ja/pieces/default-mini.yaml @@ -1,5 +1,5 @@ -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: @@ -7,14 +7,38 @@ piece_config: 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 @@ -67,6 +91,7 @@ movements: edit: false persona: supervisor policy: review + knowledge: architecture allowed_tools: - Read - Glob @@ -102,6 +127,7 @@ movements: policy: - coding - testing + knowledge: architecture allowed_tools: - Read - Glob @@ -122,6 +148,7 @@ movements: policy: - coding - testing + knowledge: architecture allowed_tools: - Read - Glob @@ -146,6 +173,7 @@ movements: policy: - coding - testing + knowledge: architecture allowed_tools: - Read - Glob @@ -171,6 +199,7 @@ movements: policy: - coding - testing + knowledge: architecture allowed_tools: - Read - Glob diff --git a/builtins/ja/pieces/frontend-mini.yaml b/builtins/ja/pieces/frontend-mini.yaml new file mode 100644 index 0000000..e56b21f --- /dev/null +++ b/builtins/ja/pieces/frontend-mini.yaml @@ -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 diff --git a/docs/README.ja.md b/docs/README.ja.md index 65af6ad..1a5e362 100644 --- a/docs/README.ja.md +++ b/docs/README.ja.md @@ -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` | 変更を加えない読み取り専用のコードレビューピース。 | diff --git a/package-lock.json b/package-lock.json index ec4a22f..94fc58b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index bb1f49a..4abf12b 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/__tests__/config.test.ts b/src/__tests__/config.test.ts index 5c2f910..012ec05 100644 --- a/src/__tests__/config.test.ts +++ b/src/__tests__/config.test.ts @@ -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); }); }); diff --git a/src/__tests__/it-piece-loader.test.ts b/src/__tests__/it-piece-loader.test.ts index 3ab53ac..1572c14 100644 --- a/src/__tests__/it-piece-loader.test.ts +++ b/src/__tests__/it-piece-loader.test.ts @@ -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 diff --git a/src/__tests__/it-piece-patterns.test.ts b/src/__tests__/it-piece-patterns.test.ts index bd99736..9c1fb65 100644 --- a/src/__tests__/it-piece-patterns.test.ts +++ b/src/__tests__/it-piece-patterns.test.ts @@ -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); }); }); diff --git a/src/__tests__/it-pipeline-modes.test.ts b/src/__tests__/it-pipeline-modes.test.ts index a381483..ee9314b 100644 --- a/src/__tests__/it-pipeline-modes.test.ts +++ b/src/__tests__/it-pipeline-modes.test.ts @@ -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, diff --git a/src/__tests__/it-pipeline.test.ts b/src/__tests__/it-pipeline.test.ts index 5743f29..1262957 100644 --- a/src/__tests__/it-pipeline.test.ts +++ b/src/__tests__/it-pipeline.test.ts @@ -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, diff --git a/src/features/tasks/list/taskBranchLifecycleActions.ts b/src/features/tasks/list/taskBranchLifecycleActions.ts index 2d8fabe..7398f08 100644 --- a/src/features/tasks/list/taskBranchLifecycleActions.ts +++ b/src/features/tasks/list/taskBranchLifecycleActions.ts @@ -105,7 +105,7 @@ export function deleteBranch(projectDir: string, target: BranchActionTarget): bo try { if (worktreePath) { if (existsSync(worktreePath)) { - rmSync(worktreePath, { recursive: true, force: true }); + rmSync(worktreePath, { recursive: true, force: true, maxRetries: 3, retryDelay: 200 }); log.info('Removed worktree directory', { worktreePath }); } diff --git a/src/infra/task/clone.ts b/src/infra/task/clone.ts index 69cc1fb..9a2d393 100644 --- a/src/infra/task/clone.ts +++ b/src/infra/task/clone.ts @@ -217,7 +217,7 @@ export class CloneManager { removeClone(clonePath: string): void { log.info('Removing clone', { path: clonePath }); try { - fs.rmSync(clonePath, { recursive: true, force: true }); + fs.rmSync(clonePath, { recursive: true, force: true, maxRetries: 3, retryDelay: 200 }); log.info('Clone removed', { path: clonePath }); } catch (err) { log.error('Failed to remove clone', { path: clonePath, error: String(err) });