diff --git a/CLAUDE.md b/CLAUDE.md index 8b5826f..41e3491 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -463,12 +463,12 @@ Example category config: ```yaml piece_categories: Development: - pieces: [default, default-mini] + pieces: [default] children: Backend: - pieces: [expert-cqrs] + pieces: [dual-cqrs] Frontend: - pieces: [expert] + pieces: [dual] Research: pieces: [research, magi] show_others_category: true diff --git a/README.md b/README.md index 949a5dd..c8e12b7 100644 --- a/README.md +++ b/README.md @@ -124,12 +124,10 @@ Rules determine the next movement. `COMPLETE` ends the piece successfully, `ABOR | Piece | Use Case | |-------|----------| -| `default-mini` | Quick fixes. Lightweight plan → implement → parallel review → fix loop. | -| `default-test-first-mini` | Test-first development. Write tests first, then implement to pass them. | +| `default` | Standard development. Test-first with AI antipattern review and parallel review (architecture + supervisor). | | `frontend-mini` | Frontend-focused mini configuration. | | `backend-mini` | Backend-focused mini configuration. | -| `expert-mini` | Expert-level mini configuration. | -| `default` | Serious development. Multi-stage review with parallel reviewers. Used for TAKT's own development. | +| `dual-mini` | Frontend + backend mini configuration. | See the [Builtin Catalog](./docs/builtin-catalog.md) for all pieces and personas. diff --git a/builtins/en/facets/instructions/implement-after-tests.md b/builtins/en/facets/instructions/implement-after-tests.md index b2edf3e..439da58 100644 --- a/builtins/en/facets/instructions/implement-after-tests.md +++ b/builtins/en/facets/instructions/implement-after-tests.md @@ -41,6 +41,15 @@ Small / Medium / Large - **Rationale**: {Reason for the choice} ``` +**Pre-completion self-check (required):** +Before running build and tests, verify the following: +- If new parameters/fields were added, grep to confirm they are actually passed from call sites +- For any `??`, `||`, `= defaultValue` usage, confirm fallback is truly necessary +- Verify no replaced code/exports remain after refactoring +- Verify no features outside the task specification were added +- Verify no if/else blocks call the same function with only argument differences +- Verify new code matches existing implementation patterns (API call style, type definition style, etc.) + **Required output (include headings)** ## Work results - {Summary of actions taken} diff --git a/builtins/en/facets/instructions/implement.md b/builtins/en/facets/instructions/implement.md index 5b894c1..940cfe3 100644 --- a/builtins/en/facets/instructions/implement.md +++ b/builtins/en/facets/instructions/implement.md @@ -40,6 +40,15 @@ Small / Medium / Large - **Rationale**: {Reason for the choice} ``` +**Pre-completion self-check (required):** +Before running build and tests, verify the following: +- If new parameters/fields were added, grep to confirm they are actually passed from call sites +- For any `??`, `||`, `= defaultValue` usage, confirm fallback is truly necessary +- Verify no replaced code/exports remain after refactoring +- Verify no features outside the task specification were added +- Verify no if/else blocks call the same function with only argument differences +- Verify new code matches existing implementation patterns (API call style, type definition style, etc.) + **Required output (include headings)** ## Work results - {Summary of actions taken} diff --git a/builtins/en/facets/instructions/plan.md b/builtins/en/facets/instructions/plan.md index 1ccdc8a..24a7ec6 100644 --- a/builtins/en/facets/instructions/plan.md +++ b/builtins/en/facets/instructions/plan.md @@ -19,3 +19,7 @@ For small tasks, skip the design sections in the report. 4. Determine file structure and design patterns (if needed) 5. Decide on the implementation approach - Verify the implementation approach does not violate knowledge/policy constraints +6. Include the following in coder implementation guidelines: + - Existing implementation patterns to reference (file:line). Always cite when similar processing already exists + - Impact area of changes. Especially when adding new parameters, enumerate all call sites that need wiring + - Anti-patterns to watch for in this specific task (if applicable) diff --git a/builtins/en/facets/personas/expert-supervisor.md b/builtins/en/facets/personas/dual-supervisor.md similarity index 100% rename from builtins/en/facets/personas/expert-supervisor.md rename to builtins/en/facets/personas/dual-supervisor.md diff --git a/builtins/en/facets/policies/coding.md b/builtins/en/facets/policies/coding.md index 630352d..27ec559 100644 --- a/builtins/en/facets/policies/coding.md +++ b/builtins/en/facets/policies/coding.md @@ -321,3 +321,6 @@ function formatPercentage(value: number): string { ... } - **Replaced code surviving after refactoring** - Remove replaced code and exports. Do not keep unless explicitly told to - **Workarounds that bypass safety mechanisms** - If the root fix is correct, no additional bypass is needed - **Direct tool execution bypassing project scripts** - `npx tool` and similar bypass the lockfile, causing version mismatches. Look for project-defined scripts (npm scripts, Makefile, etc.) first. Only consider direct execution when no script exists +- **Missing wiring** - When adding new parameters or fields, grep the entire call chain to verify. If callers do not pass the value, `options.xxx ?? fallback` always uses the fallback +- **Redundant conditionals** - When if/else calls the same function with only argument differences, unify using ternary operators or spread syntax +- **Copy-paste patterns** - Before writing new code, grep for existing implementations of the same kind and follow the existing pattern. Do not introduce your own style diff --git a/builtins/en/piece-categories.yaml b/builtins/en/piece-categories.yaml index 7f72c39..41b63d6 100644 --- a/builtins/en/piece-categories.yaml +++ b/builtins/en/piece-categories.yaml @@ -1,20 +1,17 @@ piece_categories: 🚀 Quick Start: pieces: - - default-mini + - default - frontend-mini - backend-mini - - default - compound-eye ⚡ Mini: pieces: - - default-mini - - default-test-first-mini - frontend-mini - backend-mini - backend-cqrs-mini - - expert-mini - - expert-cqrs-mini + - dual-mini + - dual-cqrs-mini 🎚 Frontend: pieces: - frontend @@ -25,18 +22,15 @@ piece_categories: - backend-mini - backend-cqrs - backend-cqrs-mini - 🔧 Expert: + 🔧 Dual: pieces: - - expert - - expert-mini - - expert-cqrs - - expert-cqrs-mini + - dual + - dual-mini + - dual-cqrs + - dual-cqrs-mini 🏗 Infrastructure: pieces: - terraform - 🛠 Refactoring: - pieces: - - structural-reform 🔍 Review: pieces: - review @@ -44,9 +38,6 @@ piece_categories: pieces: - unit-test - e2e-test - ✅ Test First: - pieces: - - default-test-first-mini 🎵 TAKT Development: pieces: - takt-default @@ -54,6 +45,7 @@ piece_categories: Others: pieces: - research + - deep-research - magi show_others_category: true others_category_name: Others diff --git a/builtins/en/pieces/backend-cqrs.yaml b/builtins/en/pieces/backend-cqrs.yaml index 2d966f5..21ddf8a 100644 --- a/builtins/en/pieces/backend-cqrs.yaml +++ b/builtins/en/pieces/backend-cqrs.yaml @@ -235,7 +235,7 @@ movements: instruction: fix - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review allowed_tools: - Read diff --git a/builtins/en/pieces/backend.yaml b/builtins/en/pieces/backend.yaml index 4e41d42..147e4a5 100644 --- a/builtins/en/pieces/backend.yaml +++ b/builtins/en/pieces/backend.yaml @@ -231,7 +231,7 @@ movements: instruction: fix - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review allowed_tools: - Read diff --git a/builtins/en/pieces/default-mini.yaml b/builtins/en/pieces/default-mini.yaml deleted file mode 100644 index 2b3f70b..0000000 --- a/builtins/en/pieces/default-mini.yaml +++ /dev/null @@ -1,219 +0,0 @@ -name: default-mini -description: Mini development piece (plan -> implement -> parallel review -> fix if needed -> complete) -piece_config: - provider_options: - codex: - network_access: true - opencode: - network_access: true -max_movements: 20 -initial_movement: plan -movements: - - name: plan - edit: false - persona: planner - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - rules: - - condition: Requirements are clear and implementation is possible - next: implement - - condition: User is asking a question (not an implementation task) - next: COMPLETE - - condition: Requirements are unclear, insufficient information - next: ABORT - instruction: plan - output_contracts: - report: - - name: plan.md - format: plan - - name: implement - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - instruction: implement - rules: - - condition: Implementation complete - next: reviewers - - condition: Cannot proceed, insufficient info - next: ABORT - - condition: User input required because there are items to confirm with the user - next: implement - requires_user_input: true - interactive_only: true - output_contracts: - report: - - name: coder-scope.md - format: coder-scope - - name: coder-decisions.md - format: coder-decisions - - name: reviewers - parallel: - - name: ai_review - edit: false - persona: ai-antipattern-reviewer - policy: - - review - - ai-antipattern - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - instruction: review-ai - rules: - - condition: No AI-specific issues - - condition: AI-specific issues found - output_contracts: - report: - - name: ai-review.md - format: ai-review - - name: supervise - edit: false - persona: supervisor - policy: review - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - instruction: supervise - rules: - - condition: All checks passed - - condition: Requirements unmet, tests failing - output_contracts: - report: - - name: supervisor-validation.md - format: supervisor-validation - - name: summary.md - format: summary - use_judge: false - rules: - - condition: all("No AI-specific issues", "All checks passed") - next: COMPLETE - - condition: all("AI-specific issues found", "Requirements unmet, tests failing") - next: fix_both - - condition: any("AI-specific issues found") - next: ai_fix - - condition: any("Requirements unmet, tests failing") - next: supervise_fix - - name: fix_both - parallel: - - name: ai_fix_parallel - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - rules: - - condition: AI Reviewer's issues fixed - - condition: No fix needed (verified target files/spec) - - condition: Cannot proceed, insufficient info - instruction: ai-fix - - name: supervise_fix_parallel - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - rules: - - condition: Supervisor's issues fixed - - condition: Cannot proceed, insufficient info - instruction: fix-supervisor - rules: - - condition: all("AI Reviewer's issues fixed", "Supervisor's issues fixed") - next: reviewers - - condition: any("No fix needed (verified target files/spec)", "Cannot proceed, insufficient info") - next: implement - - name: ai_fix - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - pass_previous_response: false - rules: - - condition: AI Reviewer's issues fixed - next: reviewers - - condition: No fix needed (verified target files/spec) - next: implement - - condition: Cannot proceed, insufficient info - next: implement - instruction: ai-fix - - name: supervise_fix - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - pass_previous_response: false - rules: - - condition: Supervisor's issues fixed - next: reviewers - - condition: Cannot proceed, insufficient info - next: implement - instruction: fix-supervisor diff --git a/builtins/en/pieces/default-test-first-mini.yaml b/builtins/en/pieces/default-test-first-mini.yaml deleted file mode 100644 index d858795..0000000 --- a/builtins/en/pieces/default-test-first-mini.yaml +++ /dev/null @@ -1,254 +0,0 @@ -name: default-test-first-mini -description: Test-first development piece (plan -> write tests -> implement -> parallel review -> fix if needed -> complete) -piece_config: - provider_options: - codex: - network_access: true - opencode: - network_access: true -max_movements: 25 -initial_movement: plan -movements: - - name: plan - edit: false - persona: planner - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - rules: - - condition: Requirements are clear and implementation is possible - next: write_tests - - condition: User is asking a question (not an implementation task) - next: COMPLETE - - condition: Requirements are unclear, insufficient information - next: ABORT - instruction: plan - output_contracts: - report: - - name: plan.md - format: plan - - name: write_tests - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - instruction: write-tests-first - rules: - - condition: Tests written successfully - next: implement - - condition: Cannot proceed because the test target is not implemented yet, so skip test writing - next: implement - - condition: Cannot proceed with test creation - next: ABORT - - condition: User input required because there are items to confirm with the user - next: write_tests - requires_user_input: true - interactive_only: true - output_contracts: - report: - - name: test-scope.md - format: coder-scope - - name: test-decisions.md - format: coder-decisions - - name: implement - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - instruction: implement-after-tests - rules: - - condition: Implementation complete - next: reviewers - - condition: Cannot proceed, insufficient info - next: ABORT - - condition: User input required because there are items to confirm with the user - next: implement - requires_user_input: true - interactive_only: true - output_contracts: - report: - - name: coder-scope.md - format: coder-scope - - name: coder-decisions.md - format: coder-decisions - - name: reviewers - parallel: - - name: ai_review - edit: false - persona: ai-antipattern-reviewer - policy: - - review - - ai-antipattern - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - instruction: review-ai - rules: - - condition: No AI-specific issues - - condition: AI-specific issues found - output_contracts: - report: - - name: ai-review.md - format: ai-review - - name: supervise - edit: false - persona: supervisor - policy: review - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - instruction: supervise - rules: - - condition: All checks passed - - condition: Requirements unmet, tests failing - output_contracts: - report: - - name: supervisor-validation.md - format: supervisor-validation - - name: summary.md - format: summary - use_judge: false - rules: - - condition: all("No AI-specific issues", "All checks passed") - next: COMPLETE - - condition: all("AI-specific issues found", "Requirements unmet, tests failing") - next: fix_both - - condition: any("AI-specific issues found") - next: ai_fix - - condition: any("Requirements unmet, tests failing") - next: supervise_fix - - name: fix_both - parallel: - - name: ai_fix_parallel - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - rules: - - condition: AI Reviewer's issues fixed - - condition: No fix needed (verified target files/spec) - - condition: Cannot proceed, insufficient info - instruction: ai-fix - - name: supervise_fix_parallel - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - rules: - - condition: Supervisor's issues fixed - - condition: Cannot proceed, insufficient info - instruction: fix-supervisor - rules: - - condition: all("AI Reviewer's issues fixed", "Supervisor's issues fixed") - next: reviewers - - condition: any("No fix needed (verified target files/spec)", "Cannot proceed, insufficient info") - next: implement - - name: ai_fix - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - pass_previous_response: false - rules: - - condition: AI Reviewer's issues fixed - next: reviewers - - condition: No fix needed (verified target files/spec) - next: implement - - condition: Cannot proceed, insufficient info - next: implement - instruction: ai-fix - - name: supervise_fix - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - pass_previous_response: false - rules: - - condition: Supervisor's issues fixed - next: reviewers - - condition: Cannot proceed, insufficient info - next: implement - instruction: fix-supervisor diff --git a/builtins/en/pieces/default.yaml b/builtins/en/pieces/default.yaml index abddca8..0cb0f2a 100644 --- a/builtins/en/pieces/default.yaml +++ b/builtins/en/pieces/default.yaml @@ -1,5 +1,5 @@ name: default -description: Test-first development piece (plan → write tests → implement → AI review → 3-parallel review → fix → supervise → complete) +description: Test-first development piece (plan → write tests → implement → AI antipattern review → parallel review → complete) piece_config: provider_options: codex: @@ -68,7 +68,6 @@ movements: - coding - testing knowledge: - - backend - architecture allowed_tools: - Read @@ -106,7 +105,6 @@ movements: - testing session: refresh knowledge: - - backend - architecture allowed_tools: - Read @@ -118,6 +116,7 @@ movements: - WebSearch - WebFetch required_permission_mode: edit + instruction: implement-after-tests rules: - condition: Implementation complete next: ai_review @@ -129,7 +128,6 @@ movements: next: implement requires_user_input: true interactive_only: true - instruction: implement-after-tests output_contracts: report: - name: coder-scope.md @@ -148,12 +146,12 @@ movements: - Grep - WebSearch - WebFetch + instruction: ai-review rules: - condition: No AI-specific issues next: reviewers - condition: AI-specific issues found next: ai_fix - instruction: ai-review output_contracts: report: - name: ai-review.md @@ -166,7 +164,6 @@ movements: - testing session: refresh knowledge: - - backend - architecture allowed_tools: - Read @@ -178,38 +175,22 @@ movements: - WebSearch - WebFetch required_permission_mode: edit + instruction: ai-fix pass_previous_response: false rules: - condition: AI issues fixed next: ai_review - condition: No fix needed (verified target files/spec) - next: ai_no_fix - - condition: Cannot proceed, insufficient info - next: ai_no_fix - instruction: ai-fix - - name: ai_no_fix - edit: false - persona: architecture-reviewer - policy: review - allowed_tools: - - Read - - Glob - - Grep - rules: - - condition: ai_review's findings are valid (fix required) - next: ai_fix - - condition: ai_fix's judgment is valid (no fix needed) next: reviewers - instruction: arbitrate + - condition: Cannot proceed with fixes + next: reviewers - name: reviewers parallel: - name: arch-review edit: false persona: architecture-reviewer policy: review - knowledge: - - architecture - - backend + knowledge: architecture allowed_tools: - Read - Glob @@ -224,50 +205,32 @@ movements: report: - name: architect-review.md format: architecture-review - - name: qa-review + - name: supervise edit: false - persona: qa-reviewer - policy: - - review - - qa + persona: supervisor + policy: review allowed_tools: - Read - Glob - Grep + - Bash - WebSearch - WebFetch + instruction: supervise rules: - - condition: approved - - condition: needs_fix - instruction: review-qa + - condition: All checks passed + - condition: Requirements unmet, tests failing, build errors output_contracts: report: - - name: qa-review.md - format: qa-review - - name: testing-review - edit: false - persona: testing-reviewer - policy: - - review - - testing - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - rules: - - condition: approved - - condition: needs_fix - instruction: review-test - output_contracts: - report: - - name: testing-review.md - format: testing-review + - name: supervisor-validation.md + format: supervisor-validation + - name: summary.md + format: summary + use_judge: false rules: - - condition: all("approved") - next: supervise - - condition: any("needs_fix") + - condition: all("approved", "All checks passed") + next: COMPLETE + - condition: any("needs_fix", "Requirements unmet, tests failing, build errors") next: fix - name: fix edit: true @@ -276,7 +239,6 @@ movements: - coding - testing knowledge: - - backend - architecture allowed_tools: - Read @@ -288,35 +250,10 @@ movements: - WebSearch - WebFetch required_permission_mode: edit + instruction: fix pass_previous_response: false rules: - condition: Fix complete next: reviewers - condition: Cannot proceed, insufficient info next: plan - instruction: fix - - name: supervise - edit: false - persona: supervisor - policy: review - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - pass_previous_response: false - rules: - - condition: All checks passed - next: COMPLETE - - condition: Requirements unmet, tests failing, build errors - next: plan - instruction: supervise - output_contracts: - report: - - name: supervisor-validation.md - format: supervisor-validation - - name: summary.md - format: summary - use_judge: false diff --git a/builtins/en/pieces/expert-cqrs-mini.yaml b/builtins/en/pieces/dual-cqrs-mini.yaml similarity index 96% rename from builtins/en/pieces/expert-cqrs-mini.yaml rename to builtins/en/pieces/dual-cqrs-mini.yaml index 2ede7ef..8a454ce 100644 --- a/builtins/en/pieces/expert-cqrs-mini.yaml +++ b/builtins/en/pieces/dual-cqrs-mini.yaml @@ -1,5 +1,5 @@ -name: expert-cqrs-mini -description: CQRS+ES Expert-focused mini development piece (plan -> implement -> parallel review -> fix if needed -> complete) +name: dual-cqrs-mini +description: CQRS+ES frontend + backend mini development piece (plan -> implement -> parallel review -> fix if needed -> complete) with CQRS+ES knowledge injection piece_config: provider_options: codex: @@ -99,7 +99,7 @@ movements: format: ai-review - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review knowledge: - frontend diff --git a/builtins/en/pieces/expert-cqrs.yaml b/builtins/en/pieces/dual-cqrs.yaml similarity index 97% rename from builtins/en/pieces/expert-cqrs.yaml rename to builtins/en/pieces/dual-cqrs.yaml index 38cbfe3..fbb4b1d 100644 --- a/builtins/en/pieces/expert-cqrs.yaml +++ b/builtins/en/pieces/dual-cqrs.yaml @@ -1,5 +1,5 @@ -name: expert-cqrs -description: CQRS+ES, Frontend, Security, QA Expert Review +name: dual-cqrs +description: Frontend + backend development piece (CQRS+ES specialized) with CQRS+ES, frontend, security, and QA reviews with fix loops piece_config: provider_options: codex: @@ -271,7 +271,7 @@ movements: instruction: fix - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review allowed_tools: - Read diff --git a/builtins/en/pieces/expert-mini.yaml b/builtins/en/pieces/dual-mini.yaml similarity index 96% rename from builtins/en/pieces/expert-mini.yaml rename to builtins/en/pieces/dual-mini.yaml index baaf765..151e58c 100644 --- a/builtins/en/pieces/expert-mini.yaml +++ b/builtins/en/pieces/dual-mini.yaml @@ -1,5 +1,5 @@ -name: expert-mini -description: Expert-focused mini development piece (plan -> implement -> parallel review -> fix if needed -> complete) +name: dual-mini +description: Frontend + backend mini development piece (plan -> implement -> parallel review -> fix if needed -> complete) with frontend + backend knowledge injection piece_config: provider_options: codex: @@ -97,7 +97,7 @@ movements: format: ai-review - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review knowledge: - frontend diff --git a/builtins/en/pieces/expert.yaml b/builtins/en/pieces/dual.yaml similarity index 97% rename from builtins/en/pieces/expert.yaml rename to builtins/en/pieces/dual.yaml index a2a903b..316f067 100644 --- a/builtins/en/pieces/expert.yaml +++ b/builtins/en/pieces/dual.yaml @@ -1,5 +1,5 @@ -name: expert -description: Architecture, Frontend, Security, QA Expert Review +name: dual +description: Frontend + backend development piece with architecture, frontend, security, and QA reviews with fix loops piece_config: provider_options: codex: @@ -267,7 +267,7 @@ movements: instruction: fix - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review allowed_tools: - Read diff --git a/builtins/en/pieces/frontend.yaml b/builtins/en/pieces/frontend.yaml index e0e2ad4..deda907 100644 --- a/builtins/en/pieces/frontend.yaml +++ b/builtins/en/pieces/frontend.yaml @@ -250,7 +250,7 @@ movements: instruction: fix - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review allowed_tools: - Read diff --git a/builtins/en/pieces/passthrough.yaml b/builtins/en/pieces/passthrough.yaml deleted file mode 100644 index bdc733b..0000000 --- a/builtins/en/pieces/passthrough.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: passthrough -description: Single-agent thin wrapper. Pass task directly to coder as-is. -piece_config: - provider_options: - codex: - network_access: true - opencode: - network_access: true -max_movements: 10 -initial_movement: execute -movements: - - name: execute - edit: true - persona: coder - policy: - - coding - - testing - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - rules: - - condition: Task complete - next: COMPLETE - - condition: Cannot proceed - next: ABORT - - condition: User input required - next: execute - requires_user_input: true - interactive_only: true - instruction_template: | - Do the task. - output_contracts: - report: - - name: summary.md - format: summary - use_judge: false diff --git a/builtins/en/pieces/structural-reform.yaml b/builtins/en/pieces/structural-reform.yaml deleted file mode 100644 index 64891d8..0000000 --- a/builtins/en/pieces/structural-reform.yaml +++ /dev/null @@ -1,488 +0,0 @@ -name: structural-reform -description: Full project review and structural reform - iterative codebase restructuring with staged file splits -piece_config: - provider_options: - codex: - network_access: true - opencode: - network_access: true -max_movements: 50 -initial_movement: review -loop_monitors: - - cycle: - - implement - - fix - threshold: 3 - judge: - persona: supervisor - instruction_template: | - The implement -> reviewers -> fix loop has repeated {cycle_count} times for the current reform target. - - Review the reports from each cycle and determine whether this loop - is making progress or repeating the same issues. - - **Reports to reference:** - - Architect review: {report:architect-review.md} - - QA review: {report:qa-review.md} - - **Judgment criteria:** - - Are review findings being addressed in each fix cycle? - - Are the same issues recurring without resolution? - - Is the implementation converging toward approval? - rules: - - condition: Healthy (making progress toward approval) - next: implement - - condition: Unproductive (same issues recurring, no convergence) - next: next_target -movements: - - name: review - edit: false - persona: architecture-reviewer - policy: review - knowledge: - - architecture - - backend - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - instruction_template: | - ## Piece Status - - Iteration: {iteration}/{max_movements} (piece-wide) - - Movement Iteration: {movement_iteration} (times this movement has run) - - Movement: review (full project review) - - ## User Request - {task} - - ## Instructions - Conduct a comprehensive structural review of the entire project codebase. - - **Focus areas:** - 1. **God Classes/Functions**: Files exceeding 300 lines, classes with multiple responsibilities - 2. **Coupling**: Circular dependencies, tight coupling between modules - 3. **Cohesion**: Low-cohesion modules mixing unrelated concerns - 4. **Testability**: Untestable code due to tight coupling or side effects - 5. **Layer violations**: Wrong dependency directions, domain logic in adapters - 6. **DRY violations**: Duplicated logic across 3+ locations - - **For each issue found, report:** - - File path and line count - - Problem category (God Class, Low Cohesion, etc.) - - Severity (Critical / High / Medium) - - Specific responsibilities that should be separated - - Dependencies that would be affected by splitting - - **Output format:** - - ```markdown - # Full Project Structural Review - - ## Summary - - Total files reviewed: N - - Issues found: N (Critical: N, High: N, Medium: N) - - ## Critical Issues - - ### 1. {File path} ({line count} lines) - - **Problem**: {category} - - **Severity**: Critical - - **Responsibilities found**: - 1. {responsibility 1} - 2. {responsibility 2} - - **Proposed split**: - - `{new-file-1}.ts`: {responsibility} - - `{new-file-2}.ts`: {responsibility} - - **Affected dependents**: {files that import this module} - - ## High Priority Issues - ... - - ## Medium Priority Issues - ... - - ## Dependency Graph Concerns - - {circular dependencies, layering violations} - - ## Recommended Reform Order - 1. {file} - {reason for priority} - 2. {file} - {reason for priority} - ``` - rules: - - condition: Full review is complete with findings - next: plan_reform - - condition: No structural issues found - next: COMPLETE - output_contracts: - report: - - name: full-review.md - format: | - ```markdown - # Full Project Structural Review - - ## Summary - - Total files reviewed: {N} - - Issues found: {N} (Critical: {N}, High: {N}, Medium: {N}) - - ## Critical Issues - - ### 1. {File path} ({line count} lines) - - **Problem**: {category} - - **Severity**: Critical - - **Responsibilities found**: - 1. {responsibility 1} - 2. {responsibility 2} - - **Proposed split**: - - `{new-file-1}.ts`: {responsibility} - - `{new-file-2}.ts`: {responsibility} - - **Affected dependents**: {files that import this module} - - ## High Priority Issues - - {Issue} - - ## Medium Priority Issues - - {Issue} - - ## Dependency Graph Concerns - - {circular dependencies, layering violations} - - ## Recommended Reform Order - 1. {file} - {reason for priority} - 2. {file} - {reason for priority} - ``` - - name: plan_reform - edit: false - persona: planner - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - instruction_template: | - ## Piece Status - - Iteration: {iteration}/{max_movements} (piece-wide) - - Movement Iteration: {movement_iteration} (times this movement has run) - - Movement: plan_reform (reform plan creation) - - ## User Request - {task} - - ## Full Review Results - {previous_response} - - ## Additional User Inputs - {user_inputs} - - ## Instructions - Based on the full review results, create a concrete reform execution plan. - - **Planning principles:** - - One file split per iteration (keep changes manageable) - - Order by dependency: split leaf nodes first, then work inward - - Each split must leave tests and build passing - - No backward compatibility concerns (per user instruction) - - **For each reform target, specify:** - 1. Target file and current line count - 2. Proposed new files with responsibilities - 3. Expected changes to imports in dependent files - 4. Test strategy (new tests needed, existing tests to update) - 5. Risk assessment (what could break) - - **Output format:** - - ```markdown - # Structural Reform Plan - - ## Reform Targets (ordered by execution priority) - - ### Target 1: {file path} - - **Current state**: {line count} lines, {N} responsibilities - - **Proposed split**: - | New file | Responsibility | Estimated lines | - |----------|---------------|-----------------| - | `{path}` | {responsibility} | ~{N} | - - **Dependent files**: {list of files that import this} - - **Test plan**: {what tests to add/update} - - **Risk**: {Low/Medium/High} - {description} - - ### Target 2: {file path} - ... - - ## Execution Order Rationale - {Why this order minimizes risk and dependency conflicts} - - ## Success Criteria - - All tests pass after each split - - Build succeeds after each split - - No file exceeds 300 lines - - Each file has single responsibility - ``` - rules: - - condition: Reform plan is complete and ready to execute - next: implement - - condition: No actionable reforms identified - next: COMPLETE - - condition: Requirements unclear, need user input - next: ABORT - appendix: | - Clarifications needed: - - {Question 1} - - {Question 2} - output_contracts: - report: - - name: reform-plan.md - format: plan - - name: implement - edit: true - persona: coder - policy: - - coding - - testing - session: refresh - knowledge: - - backend - - architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - instruction: implement - rules: - - condition: Implementation complete - next: reviewers - - condition: Cannot proceed, insufficient info - next: reviewers - - condition: User input required - next: implement - requires_user_input: true - interactive_only: true - output_contracts: - report: - - name: coder-scope.md - format: coder-scope - - name: coder-decisions.md - format: coder-decisions - - name: reviewers - parallel: - - name: arch-review - edit: false - persona: architecture-reviewer - policy: review - knowledge: - - architecture - - backend - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - rules: - - condition: approved - - condition: needs_fix - instruction: review-arch - output_contracts: - report: - - name: architect-review.md - format: architecture-review - - name: qa-review - edit: false - persona: qa-reviewer - policy: - - review - - qa - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - rules: - - condition: approved - - condition: needs_fix - instruction: review-qa - output_contracts: - report: - - name: qa-review.md - format: qa-review - rules: - - condition: all("approved") - next: verify - - condition: any("needs_fix") - next: fix - - name: fix - edit: true - persona: coder - policy: - - coding - - testing - knowledge: - - backend - - architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - pass_previous_response: false - rules: - - condition: Fix complete - next: reviewers - - condition: Cannot proceed, insufficient info - next: plan_reform - instruction: fix - - name: verify - edit: false - persona: supervisor - policy: review - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - instruction_template: | - ## Piece Status - - Iteration: {iteration}/{max_movements} (piece-wide) - - Movement Iteration: {movement_iteration} (times this movement has run) - - Movement: verify (build and test verification) - - ## Instructions - Verify that the current reform step has been completed successfully. - - **Verification checklist:** - 1. **Build**: Run the build command and confirm it passes - 2. **Tests**: Run the test suite and confirm all tests pass - 3. **File sizes**: Confirm no new file exceeds 300 lines - 4. **Single responsibility**: Confirm each new file has a clear, single purpose - 5. **Import consistency**: Confirm all imports are updated correctly - - **Report format:** - - ```markdown - # Verification Results - - ## Result: PASS / FAIL - - | Check | Status | Details | - |-------|--------|---------| - | Build | PASS/FAIL | {output summary} | - | Tests | PASS/FAIL | {N passed, N failed} | - | File sizes | PASS/FAIL | {any file > 300 lines} | - | Single responsibility | PASS/FAIL | {assessment} | - | Import consistency | PASS/FAIL | {any broken imports} | - - ## Issues (if FAIL) - 1. {issue description} - ``` - rules: - - condition: All verifications passed - next: next_target - - condition: Verification failed - next: fix - output_contracts: - report: - - name: verification.md - format: validation - - name: next_target - edit: false - persona: planner - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - instruction_template: | - ## Piece Status - - Iteration: {iteration}/{max_movements} (piece-wide) - - Movement Iteration: {movement_iteration} (times this movement has run) - - Movement: next_target (progress check and next target selection) - - ## Original Reform Plan - {report:reform-plan.md} - - ## Latest Verification - {previous_response} - - ## Instructions - Assess the progress of the structural reform and determine the next action. - - **Steps:** - 1. Review the reform plan and identify which targets have been completed - 2. Check the current codebase state against the plan - 3. Determine if there are remaining reform targets - - **Output format:** - - ```markdown - # Reform Progress - - ## Completed Targets - | # | Target | Status | - |---|--------|--------| - | 1 | {file} | Completed | - | 2 | {file} | Completed | - - ## Remaining Targets - | # | Target | Priority | - |---|--------|----------| - | 3 | {file} | Next | - | 4 | {file} | Pending | - - ## Next Action - - **Target**: {next file to reform} - - **Plan**: {brief description of the split} - - ## Overall Progress - {N}/{total} targets completed. Estimated remaining iterations: {N} - ``` - rules: - - condition: More reform targets remain - next: implement - - condition: All reform targets completed - next: COMPLETE - output_contracts: - report: - - name: progress.md - format: | - ```markdown - # Reform Progress - - ## Completed Targets - | # | Target | Status | - |---|--------|--------| - | 1 | {file} | Completed | - - ## Remaining Targets - | # | Target | Priority | - |---|--------|----------| - | 2 | {file} | Next | - - ## Next Action - - **Target**: {next file to reform} - - **Plan**: {brief description of the split} - - ## Overall Progress - {N}/{total} targets completed. Estimated remaining iterations: {N} - ``` diff --git a/builtins/en/pieces/takt-default-team-leader.yaml b/builtins/en/pieces/takt-default-team-leader.yaml index e549e4f..c84ee7e 100644 --- a/builtins/en/pieces/takt-default-team-leader.yaml +++ b/builtins/en/pieces/takt-default-team-leader.yaml @@ -1,5 +1,5 @@ name: takt-default-team-leader -description: TAKT development piece with team leader (plan → write tests → team-leader implement → AI review → 5-parallel review → fix → supervise → complete) +description: TAKT development piece with team leader (plan → write tests → team-leader implement → AI antipattern review → 5-parallel review → fix → supervise → complete) piece_config: provider_options: codex: diff --git a/builtins/en/pieces/takt-default.yaml b/builtins/en/pieces/takt-default.yaml index 65d8ac8..b963bba 100644 --- a/builtins/en/pieces/takt-default.yaml +++ b/builtins/en/pieces/takt-default.yaml @@ -1,5 +1,5 @@ name: takt-default -description: TAKT development piece (plan → write tests → implement → AI review → 5-parallel review → fix → supervise → complete) +description: TAKT development piece (plan → write tests → implement → AI antipattern review → 5-parallel review → fix → supervise → complete) piece_config: provider_options: codex: diff --git a/builtins/en/templates/instructions/supervise.md b/builtins/en/templates/instructions/supervise.md index a99859a..11cc819 100644 --- a/builtins/en/templates/instructions/supervise.md +++ b/builtins/en/templates/instructions/supervise.md @@ -1,7 +1,7 @@ # supervise -- Final Verification Instruction Template > **Purpose**: Run tests/builds, verify all review results, give final approval -> **Agent**: supervisor, expert-supervisor +> **Agent**: supervisor, dual-supervisor > **Reports**: Validation + Summary (format embedded in template) --- @@ -11,7 +11,7 @@ ``` Run tests, verify builds, and perform final approval. -{Customize: Review pass status -- for expert pieces where all reviews have passed} +{Customize: Review pass status -- for dual pieces where all reviews have passed} ## Previous Reviews Summary Reaching this movement means all of the following reviews have been APPROVED: {Customize: Actual review list} diff --git a/builtins/en/templates/reports/summary.md b/builtins/en/templates/reports/summary.md index c146171..800188f 100644 --- a/builtins/en/templates/reports/summary.md +++ b/builtins/en/templates/reports/summary.md @@ -49,4 +49,4 @@ All other sections are the same across pieces. | minimal | AI Review, Supervisor | | coding | AI Review, Architecture | | default | Architecture Design, AI Review, Architect Review, QA, Supervisor | -| expert | AI Review, Architecture, Frontend, Security, QA, Supervisor | +| dual | AI Review, Architecture, Frontend, Security, QA, Supervisor | diff --git a/builtins/ja/facets/instructions/implement-after-tests.md b/builtins/ja/facets/instructions/implement-after-tests.md index b06eb5a..2a50239 100644 --- a/builtins/ja/facets/instructions/implement-after-tests.md +++ b/builtins/ja/facets/instructions/implement-after-tests.md @@ -41,6 +41,15 @@ Small / Medium / Large - **理由**: {遞んだ理由} ``` +**実装完了前の自己チェック必須:** +ビルドずテストを実行する前に、以䞋を確認しおください: +- 新しいパラメヌタ/フィヌルドを远加した堎合、grep で呌び出し元から実際に枡されおいるか確認した +- `??`, `||`, `= defaultValue` を䜿った箇所で、フォヌルバックが本圓に必芁か確認した +- リファクタリングで眮き換えたコヌド・゚クスポヌトが残っおいないか確認した +- タスク指瀺曞にない機胜を远加しおいないか確認した +- if/else で同䞀関数を呌び出し、匕数の差異のみになっおいないか確認した +- 新しいコヌドが既存の実装パタヌンAPI呌び出し方匏、型定矩方匏等ず䞀臎しおいるか確認した + **必須出力芋出しを含める** ## 䜜業結果 - {実斜内容の芁玄} diff --git a/builtins/ja/facets/instructions/implement.md b/builtins/ja/facets/instructions/implement.md index e461317..cb31c4b 100644 --- a/builtins/ja/facets/instructions/implement.md +++ b/builtins/ja/facets/instructions/implement.md @@ -40,6 +40,15 @@ Small / Medium / Large - **理由**: {遞んだ理由} ``` +**実装完了前の自己チェック必須:** +ビルドずテストを実行する前に、以䞋を確認しおください: +- 新しいパラメヌタ/フィヌルドを远加した堎合、grep で呌び出し元から実際に枡されおいるか確認した +- `??`, `||`, `= defaultValue` を䜿った箇所で、フォヌルバックが本圓に必芁か確認した +- リファクタリングで眮き換えたコヌド・゚クスポヌトが残っおいないか確認した +- タスク指瀺曞にない機胜を远加しおいないか確認した +- if/else で同䞀関数を呌び出し、匕数の差異のみになっおいないか確認した +- 新しいコヌドが既存の実装パタヌンAPI呌び出し方匏、型定矩方匏等ず䞀臎しおいるか確認した + **必須出力芋出しを含める** ## 䜜業結果 - {実斜内容の芁玄} diff --git a/builtins/ja/facets/instructions/plan.md b/builtins/ja/facets/instructions/plan.md index b1165f7..9fa68c9 100644 --- a/builtins/ja/facets/instructions/plan.md +++ b/builtins/ja/facets/instructions/plan.md @@ -25,3 +25,7 @@ 5. ファむル構成・蚭蚈パタヌンを決定する必芁な堎合 6. 実装アプロヌチを決める - 実装アプロヌチがナレッゞ・ポリシヌの制玄に違反しないか照合する +7. Coder向けの実装ガむドラむンに以䞋を含めるこず: + - 参照すべき既存実装パタヌンファむル:行。同皮の凊理が既にある堎合は必ず瀺す + - 倉曎の圱響範囲。特に新しいパラメヌタを远加する堎合、配線が必芁な党箇所を列挙する + - このタスクで特に泚意すべきアンチパタヌン該圓するものがあれば diff --git a/builtins/ja/facets/personas/expert-supervisor.md b/builtins/ja/facets/personas/dual-supervisor.md similarity index 99% rename from builtins/ja/facets/personas/expert-supervisor.md rename to builtins/ja/facets/personas/dual-supervisor.md index 3d234bc..26b1a2b 100644 --- a/builtins/ja/facets/personas/expert-supervisor.md +++ b/builtins/ja/facets/personas/dual-supervisor.md @@ -1,4 +1,4 @@ -# Expert Supervisor +# Dual Supervisor あなたは監督者です。すべおのレビュヌを統括し、最終的なリリヌス可吊を刀断したす。 diff --git a/builtins/ja/facets/policies/coding.md b/builtins/ja/facets/policies/coding.md index 2e08de6..21d58d8 100644 --- a/builtins/ja/facets/policies/coding.md +++ b/builtins/ja/facets/policies/coding.md @@ -321,3 +321,6 @@ function formatPercentage(value: number): string { ... } - **リファクタリング埌の旧コヌド残存** - 眮き換えたコヌド・゚クスポヌトは削陀する。明瀺的に残すよう指瀺されない限り残さない - **安党機構を迂回するワヌクアラりンド** - 根本修正が正しいなら远加の迂回は䞍芁 - **プロゞェクトスクリプトを迂回するツヌル盎接実行** - `npx tool` 等の盎接実行は lockfile を迂回しバヌゞョン䞍䞀臎を起こす。プロゞェクトが定矩したスクリプトnpm scripts, Makefile 等を探しお䜿う。芋぀からない堎合のみ盎接実行を怜蚎する +- **配線忘れ** - 新しいパラメヌタやフィヌルドを远加したら、grep で呌び出しチェヌン党䜓を確認する。呌び出し元が倀を枡しおいないず `options.xxx ?? fallback` で垞にフォヌルバックが䜿われる +- **冗長な条件分岐** - if/else で同䞀関数を呌び出し匕数の差異のみの堎合、䞉項挔算子やスプレッド構文で統䞀する +- **コピペパタヌン** - 新しいコヌドを曞く前に同皮の既存実装を grep で確認し、既存パタヌンに合わせる。独自の曞き方を持ち蟌たない diff --git a/builtins/ja/piece-categories.yaml b/builtins/ja/piece-categories.yaml index 45cdd99..9d11ee8 100644 --- a/builtins/ja/piece-categories.yaml +++ b/builtins/ja/piece-categories.yaml @@ -1,20 +1,17 @@ piece_categories: 🚀 クむックスタヌト: pieces: - - default-mini + - default - frontend-mini - backend-mini - - default - compound-eye ⚡ Mini: pieces: - - default-mini - - default-test-first-mini - frontend-mini - backend-mini - backend-cqrs-mini - - expert-mini - - expert-cqrs-mini + - dual-mini + - dual-cqrs-mini 🎚 フロント゚ンド: pieces: - frontend @@ -25,18 +22,15 @@ piece_categories: - backend-mini - backend-cqrs - backend-cqrs-mini - 🔧 ゚キスパヌト: + 🔧 デュアル: pieces: - - expert - - expert-mini - - expert-cqrs - - expert-cqrs-mini + - dual + - dual-mini + - dual-cqrs + - dual-cqrs-mini 🏗 むンフラストラクチャ: pieces: - terraform - 🛠 リファクタリング: - pieces: - - structural-reform 🔍 レビュヌ: pieces: - review @@ -44,9 +38,6 @@ piece_categories: pieces: - unit-test - e2e-test - ✅ テストファヌスト: - pieces: - - default-test-first-mini 🎵 TAKT開発: pieces: - takt-default @@ -54,6 +45,7 @@ piece_categories: その他: pieces: - research + - deep-research - magi show_others_category: true others_category_name: その他 diff --git a/builtins/ja/pieces/backend-cqrs.yaml b/builtins/ja/pieces/backend-cqrs.yaml index 40085fe..56e7f74 100644 --- a/builtins/ja/pieces/backend-cqrs.yaml +++ b/builtins/ja/pieces/backend-cqrs.yaml @@ -235,7 +235,7 @@ movements: instruction: fix - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review allowed_tools: - Read diff --git a/builtins/ja/pieces/backend.yaml b/builtins/ja/pieces/backend.yaml index 78a0737..61b1567 100644 --- a/builtins/ja/pieces/backend.yaml +++ b/builtins/ja/pieces/backend.yaml @@ -231,7 +231,7 @@ movements: instruction: fix - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review allowed_tools: - Read diff --git a/builtins/ja/pieces/default-mini.yaml b/builtins/ja/pieces/default-mini.yaml deleted file mode 100644 index 03598df..0000000 --- a/builtins/ja/pieces/default-mini.yaml +++ /dev/null @@ -1,219 +0,0 @@ -name: default-mini -description: Mini開発ピヌスplan → implement → 䞊列レビュヌ → 修正 → 完了 -piece_config: - provider_options: - codex: - network_access: true - opencode: - network_access: true -max_movements: 20 -initial_movement: plan -movements: - - name: plan - edit: false - persona: planner - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - rules: - - condition: 芁件が明確で実装可胜 - next: implement - - condition: ナヌザヌが質問をしおいる実装タスクではない - next: COMPLETE - - condition: 芁件が䞍明確、情報䞍足 - next: ABORT - instruction: plan - output_contracts: - report: - - name: plan.md - format: plan - - name: implement - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - instruction: implement - rules: - - condition: 実装が完了した - next: reviewers - - condition: 実装を進行できない - next: ABORT - - condition: ナヌザヌぞの確認事項があるためナヌザヌ入力が必芁 - next: implement - requires_user_input: true - interactive_only: true - output_contracts: - report: - - name: coder-scope.md - format: coder-scope - - name: coder-decisions.md - format: coder-decisions - - name: reviewers - parallel: - - name: ai_review - edit: false - persona: ai-antipattern-reviewer - policy: - - review - - ai-antipattern - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - instruction: review-ai - rules: - - condition: AI特有の問題なし - - condition: AI特有の問題あり - output_contracts: - report: - - name: ai-review.md - format: ai-review - - name: supervise - edit: false - persona: supervisor - policy: review - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - instruction: supervise - rules: - - condition: すべお問題なし - - condition: 芁求未達成、テスト倱敗、ビルド゚ラヌ - output_contracts: - report: - - name: supervisor-validation.md - format: supervisor-validation - - name: summary.md - format: summary - use_judge: false - rules: - - condition: all("AI特有の問題なし", "すべお問題なし") - next: COMPLETE - - condition: all("AI特有の問題あり", "芁求未達成、テスト倱敗、ビルド゚ラヌ") - next: fix_both - - condition: any("AI特有の問題あり") - next: ai_fix - - condition: any("芁求未達成、テスト倱敗、ビルド゚ラヌ") - next: supervise_fix - - name: fix_both - parallel: - - name: ai_fix_parallel - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - rules: - - condition: AI問題の修正完了 - - condition: 修正䞍芁指摘察象ファむル/仕様の確認枈み - - condition: 刀断できない、情報䞍足 - instruction: ai-fix - - name: supervise_fix_parallel - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - rules: - - condition: 監督者の指摘に察する修正が完了した - - condition: 修正を進行できない - instruction: fix-supervisor - rules: - - condition: all("AI問題の修正完了", "監督者の指摘に察する修正が完了した") - next: reviewers - - condition: any("修正䞍芁指摘察象ファむル/仕様の確認枈み", "刀断できない、情報䞍足", "修正を進行できない") - next: implement - - name: ai_fix - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - pass_previous_response: false - rules: - - condition: AI問題の修正完了 - next: reviewers - - condition: 修正䞍芁指摘察象ファむル/仕様の確認枈み - next: implement - - condition: 刀断できない、情報䞍足 - next: implement - instruction: ai-fix - - name: supervise_fix - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - pass_previous_response: false - rules: - - condition: 監督者の指摘に察する修正が完了した - next: reviewers - - condition: 修正を進行できない - next: implement - instruction: fix-supervisor diff --git a/builtins/ja/pieces/default-test-first-mini.yaml b/builtins/ja/pieces/default-test-first-mini.yaml deleted file mode 100644 index 14c6db1..0000000 --- a/builtins/ja/pieces/default-test-first-mini.yaml +++ /dev/null @@ -1,254 +0,0 @@ -name: default-test-first-mini -description: Test-First開発ピヌスplan → テスト䜜成 → implement → 䞊列レビュヌ → 修正 → 完了 -piece_config: - provider_options: - codex: - network_access: true - opencode: - network_access: true -max_movements: 25 -initial_movement: plan -movements: - - name: plan - edit: false - persona: planner - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - rules: - - condition: 芁件が明確で実装可胜 - next: write_tests - - condition: ナヌザヌが質問をしおいる実装タスクではない - next: COMPLETE - - condition: 芁件が䞍明確、情報䞍足 - next: ABORT - instruction: plan - output_contracts: - report: - - name: plan.md - format: plan - - name: write_tests - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - instruction: write-tests-first - rules: - - condition: テスト䜜成が完了した - next: implement - - condition: テスト察象が未実装のためテスト䜜成をスキップする - next: implement - - condition: テスト䜜成を進行できない - next: ABORT - - condition: ナヌザヌぞの確認事項があるためナヌザヌ入力が必芁 - next: write_tests - requires_user_input: true - interactive_only: true - output_contracts: - report: - - name: test-scope.md - format: coder-scope - - name: test-decisions.md - format: coder-decisions - - name: implement - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - instruction: implement-after-tests - rules: - - condition: 実装が完了した - next: reviewers - - condition: 実装を進行できない - next: ABORT - - condition: ナヌザヌぞの確認事項があるためナヌザヌ入力が必芁 - next: implement - requires_user_input: true - interactive_only: true - output_contracts: - report: - - name: coder-scope.md - format: coder-scope - - name: coder-decisions.md - format: coder-decisions - - name: reviewers - parallel: - - name: ai_review - edit: false - persona: ai-antipattern-reviewer - policy: - - review - - ai-antipattern - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - instruction: review-ai - rules: - - condition: AI特有の問題なし - - condition: AI特有の問題あり - output_contracts: - report: - - name: ai-review.md - format: ai-review - - name: supervise - edit: false - persona: supervisor - policy: review - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - instruction: supervise - rules: - - condition: すべお問題なし - - condition: 芁求未達成、テスト倱敗、ビルド゚ラヌ - output_contracts: - report: - - name: supervisor-validation.md - format: supervisor-validation - - name: summary.md - format: summary - use_judge: false - rules: - - condition: all("AI特有の問題なし", "すべお問題なし") - next: COMPLETE - - condition: all("AI特有の問題あり", "芁求未達成、テスト倱敗、ビルド゚ラヌ") - next: fix_both - - condition: any("AI特有の問題あり") - next: ai_fix - - condition: any("芁求未達成、テスト倱敗、ビルド゚ラヌ") - next: supervise_fix - - name: fix_both - parallel: - - name: ai_fix_parallel - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - rules: - - condition: AI問題の修正完了 - - condition: 修正䞍芁指摘察象ファむル/仕様の確認枈み - - condition: 刀断できない、情報䞍足 - instruction: ai-fix - - name: supervise_fix_parallel - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - rules: - - condition: 監督者の指摘に察する修正が完了した - - condition: 修正を進行できない - instruction: fix-supervisor - rules: - - condition: all("AI問題の修正完了", "監督者の指摘に察する修正が完了した") - next: reviewers - - condition: any("修正䞍芁指摘察象ファむル/仕様の確認枈み", "刀断できない、情報䞍足", "修正を進行できない") - next: implement - - name: ai_fix - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - pass_previous_response: false - rules: - - condition: AI問題の修正完了 - next: reviewers - - condition: 修正䞍芁指摘察象ファむル/仕様の確認枈み - next: implement - - condition: 刀断できない、情報䞍足 - next: implement - instruction: ai-fix - - name: supervise_fix - edit: true - persona: coder - policy: - - coding - - testing - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - pass_previous_response: false - rules: - - condition: 監督者の指摘に察する修正が完了した - next: reviewers - - condition: 修正を進行できない - next: implement - instruction: fix-supervisor diff --git a/builtins/ja/pieces/default.yaml b/builtins/ja/pieces/default.yaml index 9a5ac19..9265202 100644 --- a/builtins/ja/pieces/default.yaml +++ b/builtins/ja/pieces/default.yaml @@ -1,5 +1,5 @@ name: default -description: テスト先行開発ピヌス蚈画 → テスト䜜成 → 実装 → AIレビュヌ → 3䞊列レビュヌ → 修正 → 監督 → 完了 +description: テスト先行開発ピヌス蚈画 → テスト䜜成 → 実装 → AIアンチパタヌンレビュヌ → 䞊列レビュヌ → 完了 piece_config: provider_options: codex: @@ -68,7 +68,6 @@ movements: - coding - testing knowledge: - - backend - architecture allowed_tools: - Read @@ -106,7 +105,6 @@ movements: - testing session: refresh knowledge: - - backend - architecture allowed_tools: - Read @@ -118,6 +116,7 @@ movements: - WebSearch - WebFetch required_permission_mode: edit + instruction: implement-after-tests rules: - condition: 実装完了 next: ai_review @@ -129,7 +128,6 @@ movements: next: implement requires_user_input: true interactive_only: true - instruction: implement-after-tests output_contracts: report: - name: coder-scope.md @@ -148,12 +146,12 @@ movements: - Grep - WebSearch - WebFetch + instruction: ai-review rules: - condition: AI特有の問題なし next: reviewers - condition: AI特有の問題あり next: ai_fix - instruction: ai-review output_contracts: report: - name: ai-review.md @@ -166,7 +164,6 @@ movements: - testing session: refresh knowledge: - - backend - architecture allowed_tools: - Read @@ -178,38 +175,22 @@ movements: - WebSearch - WebFetch required_permission_mode: edit + instruction: ai-fix pass_previous_response: false rules: - - condition: AI問題の修正完了 + - condition: AI Reviewerの指摘に察する修正が完了した next: ai_review - condition: 修正䞍芁指摘察象ファむル/仕様の確認枈み - next: ai_no_fix - - condition: 刀断できない、情報䞍足 - next: ai_no_fix - instruction: ai-fix - - name: ai_no_fix - edit: false - persona: architecture-reviewer - policy: review - allowed_tools: - - Read - - Glob - - Grep - rules: - - condition: ai_reviewの指摘が劥圓修正すべき - next: ai_fix - - condition: ai_fixの刀断が劥圓修正䞍芁 next: reviewers - instruction: arbitrate + - condition: 修正を進行できない + next: reviewers - name: reviewers parallel: - name: arch-review edit: false persona: architecture-reviewer policy: review - knowledge: - - architecture - - backend + knowledge: architecture allowed_tools: - Read - Glob @@ -224,50 +205,32 @@ movements: report: - name: architect-review.md format: architecture-review - - name: qa-review + - name: supervise edit: false - persona: qa-reviewer - policy: - - review - - qa + persona: supervisor + policy: review allowed_tools: - Read - Glob - Grep + - Bash - WebSearch - WebFetch + instruction: supervise rules: - - condition: approved - - condition: needs_fix - instruction: review-qa + - condition: すべお問題なし + - condition: 芁求未達成、テスト倱敗、ビルド゚ラヌ output_contracts: report: - - name: qa-review.md - format: qa-review - - name: testing-review - edit: false - persona: testing-reviewer - policy: - - review - - testing - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - rules: - - condition: approved - - condition: needs_fix - instruction: review-test - output_contracts: - report: - - name: testing-review.md - format: testing-review + - name: supervisor-validation.md + format: supervisor-validation + - name: summary.md + format: summary + use_judge: false rules: - - condition: all("approved") - next: supervise - - condition: any("needs_fix") + - condition: all("approved", "すべお問題なし") + next: COMPLETE + - condition: any("needs_fix", "芁求未達成、テスト倱敗、ビルド゚ラヌ") next: fix - name: fix edit: true @@ -276,7 +239,6 @@ movements: - coding - testing knowledge: - - backend - architecture allowed_tools: - Read @@ -288,35 +250,10 @@ movements: - WebSearch - WebFetch required_permission_mode: edit + instruction: fix pass_previous_response: false rules: - condition: 修正完了 next: reviewers - condition: 刀断できない、情報䞍足 next: plan - instruction: fix - - name: supervise - edit: false - persona: supervisor - policy: review - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - pass_previous_response: false - rules: - - condition: すべお問題なし - next: COMPLETE - - condition: 芁求未達成、テスト倱敗、ビルド゚ラヌ - next: plan - instruction: supervise - output_contracts: - report: - - name: supervisor-validation.md - format: supervisor-validation - - name: summary.md - format: summary - use_judge: false diff --git a/builtins/ja/pieces/expert-cqrs-mini.yaml b/builtins/ja/pieces/dual-cqrs-mini.yaml similarity index 96% rename from builtins/ja/pieces/expert-cqrs-mini.yaml rename to builtins/ja/pieces/dual-cqrs-mini.yaml index cf4aa69..9b4c10d 100644 --- a/builtins/ja/pieces/expert-cqrs-mini.yaml +++ b/builtins/ja/pieces/dual-cqrs-mini.yaml @@ -1,5 +1,5 @@ -name: expert-cqrs-mini -description: CQRS+ES Expert向けMini開発ピヌスplan → implement → 䞊列レビュヌ → 修正 → 完了 +name: dual-cqrs-mini +description: CQRS+ES フロント゚ンドバック゚ンド向けMini開発ピヌスplan → implement → 䞊列レビュヌ → 修正 → 完了。CQRS+ESナレッゞ泚入付き。 piece_config: provider_options: codex: @@ -99,7 +99,7 @@ movements: format: ai-review - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review knowledge: - frontend diff --git a/builtins/ja/pieces/expert-cqrs.yaml b/builtins/ja/pieces/dual-cqrs.yaml similarity index 96% rename from builtins/ja/pieces/expert-cqrs.yaml rename to builtins/ja/pieces/dual-cqrs.yaml index b9b007a..6ddcf0d 100644 --- a/builtins/ja/pieces/expert-cqrs.yaml +++ b/builtins/ja/pieces/dual-cqrs.yaml @@ -1,5 +1,5 @@ -name: expert-cqrs -description: CQRS+ES・フロント゚ンド・セキュリティ・QA専門家レビュヌ +name: dual-cqrs +description: フロント゚ンドバック゚ンド開発ピヌスCQRS+ES特化CQRS+ES・フロント゚ンド・セキュリティ・QAレビュヌず修正ルヌプ付き piece_config: provider_options: codex: @@ -271,7 +271,7 @@ movements: instruction: fix - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review allowed_tools: - Read diff --git a/builtins/ja/pieces/expert-mini.yaml b/builtins/ja/pieces/dual-mini.yaml similarity index 95% rename from builtins/ja/pieces/expert-mini.yaml rename to builtins/ja/pieces/dual-mini.yaml index 2bcff2f..2dfd1e4 100644 --- a/builtins/ja/pieces/expert-mini.yaml +++ b/builtins/ja/pieces/dual-mini.yaml @@ -1,5 +1,5 @@ -name: expert-mini -description: Expert向けMini開発ピヌスplan → implement → 䞊列レビュヌ → 修正 → 完了 +name: dual-mini +description: フロント゚ンドバック゚ンド向けMini開発ピヌスplan → implement → 䞊列レビュヌ → 修正 → 完了。フロント゚ンドバック゚ンドのナレッゞ泚入付き。 piece_config: provider_options: codex: @@ -97,7 +97,7 @@ movements: format: ai-review - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review knowledge: - frontend diff --git a/builtins/ja/pieces/expert.yaml b/builtins/ja/pieces/dual.yaml similarity index 97% rename from builtins/ja/pieces/expert.yaml rename to builtins/ja/pieces/dual.yaml index b519983..4eeb7ce 100644 --- a/builtins/ja/pieces/expert.yaml +++ b/builtins/ja/pieces/dual.yaml @@ -1,5 +1,5 @@ -name: expert -description: アヌキテクチャ・フロント゚ンド・セキュリティ・QA専門家レビュヌ +name: dual +description: フロント゚ンドバック゚ンド開発ピヌスアヌキテクチャ・フロント゚ンド・セキュリティ・QAレビュヌず修正ルヌプ付き piece_config: provider_options: codex: @@ -267,7 +267,7 @@ movements: instruction: fix - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review allowed_tools: - Read diff --git a/builtins/ja/pieces/frontend.yaml b/builtins/ja/pieces/frontend.yaml index fd66e60..7839a77 100644 --- a/builtins/ja/pieces/frontend.yaml +++ b/builtins/ja/pieces/frontend.yaml @@ -250,7 +250,7 @@ movements: instruction: fix - name: supervise edit: false - persona: expert-supervisor + persona: dual-supervisor policy: review allowed_tools: - Read diff --git a/builtins/ja/pieces/passthrough.yaml b/builtins/ja/pieces/passthrough.yaml deleted file mode 100644 index 962922a..0000000 --- a/builtins/ja/pieces/passthrough.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: passthrough -description: Single-agent thin wrapper. Pass task directly to coder as-is. -piece_config: - provider_options: - codex: - network_access: true - opencode: - network_access: true -max_movements: 10 -initial_movement: execute -movements: - - name: execute - edit: true - persona: coder - policy: - - coding - - testing - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - rules: - - condition: タスク完了 - next: COMPLETE - - condition: 進行できない - next: ABORT - - condition: ナヌザヌ入力が必芁 - next: execute - requires_user_input: true - interactive_only: true - instruction_template: | - タスクをこなしおください。 - output_contracts: - report: - - name: summary.md - format: summary - use_judge: false diff --git a/builtins/ja/pieces/structural-reform.yaml b/builtins/ja/pieces/structural-reform.yaml deleted file mode 100644 index 86640f4..0000000 --- a/builtins/ja/pieces/structural-reform.yaml +++ /dev/null @@ -1,488 +0,0 @@ -name: structural-reform -description: プロゞェクト党䜓レビュヌず構造改革 - 段階的なファむル分割による反埩的コヌドベヌス再構築 -piece_config: - provider_options: - codex: - network_access: true - opencode: - network_access: true -max_movements: 50 -initial_movement: review -loop_monitors: - - cycle: - - implement - - fix - threshold: 3 - judge: - persona: supervisor - instruction_template: | - implement → reviewers → fix のルヌプが珟圚の改革タヌゲットに察しお {cycle_count} 回繰り返されたした。 - - 各サむクルのレポヌトを確認し、このルヌプが進捗しおいるか、 - 同じ問題を繰り返しおいるかを刀断しおください。 - - **参照するレポヌト:** - - アヌキテクチャレビュヌ: {report:architect-review.md} - - QAレビュヌ: {report:qa-review.md} - - **刀断基準:** - - 各修正サむクルでレビュヌ指摘が解消されおいるか - - 同じ問題が解決されずに繰り返されおいないか - - 実装が承認に向かっお収束しおいるか - rules: - - condition: 健党承認に向けお進捗あり - next: implement - - condition: 非生産的同じ問題が繰り返され、収束なし - next: next_target -movements: - - name: review - edit: false - persona: architecture-reviewer - policy: review - knowledge: - - architecture - - backend - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - instruction_template: | - ## ピヌスステヌタス - - むテレヌション: {iteration}/{max_movements}ピヌス党䜓 - - ムヌブメントむテレヌション: {movement_iteration}このムヌブメントの実行回数 - - ムヌブメント: reviewプロゞェクト党䜓レビュヌ - - ## ナヌザヌリク゚スト - {task} - - ## 指瀺 - プロゞェクトのコヌドベヌス党䜓に察しお、包括的な構造レビュヌを実斜しおください。 - - **重点領域:** - 1. **God Class/Function**: 300行を超えるファむル、耇数の責務を持぀クラス - 2. **結合床**: 埪環䟝存、モゞュヌル間の密結合 - 3. **凝集床**: 無関係な関心事が混圚した䜎凝集モゞュヌル - 4. **テスタビリティ**: 密結合や副䜜甚によるテスト困難なコヌド - 5. **レむダヌ違反**: 䟝存方向の誀り、アダプタヌ局にドメむンロゞック - 6. **DRY違反**: 3箇所以䞊の重耇ロゞック - - **発芋した問題ごずに報告:** - - ファむルパスず行数 - - 問題カテゎリGod Class、䜎凝集など - - 深刻床Critical / High / Medium - - 分離すべき具䜓的な責務 - - 分割により圱響を受ける䟝存先 - - **出力フォヌマット:** - - ```markdown - # プロゞェクト党䜓構造レビュヌ - - ## サマリヌ - - レビュヌ察象ファむル数: N - - 怜出された問題: NCritical: N, High: N, Medium: N - - ## Critical Issues - - ### 1. {ファむルパス}{行数}行 - - **問題**: {カテゎリ} - - **深刻床**: Critical - - **怜出された責務**: - 1. {責務1} - 2. {責務2} - - **分割提案**: - - `{新ファむル1}.ts`: {責務} - - `{新ファむル2}.ts`: {責務} - - **圱響を受ける䟝存先**: {このモゞュヌルをむンポヌトしおいるファむル} - - ## High Priority Issues - ... - - ## Medium Priority Issues - ... - - ## 䟝存グラフの懞念事項 - - {埪環䟝存、レむダヌ違反} - - ## 掚奚改革順序 - 1. {ファむル} - {優先理由} - 2. {ファむル} - {優先理由} - ``` - rules: - - condition: 党䜓レビュヌが完了し、問題が怜出された - next: plan_reform - - condition: 構造的な問題は芋぀からなかった - next: COMPLETE - output_contracts: - report: - - name: full-review.md - format: | - ```markdown - # 党䜓構造レビュヌ - - ## サマリヌ - - レビュヌ察象ファむル数: {N} - - 問題件数: {N}Critical: {N}, High: {N}, Medium: {N} - - ## Critical な問題 - - ### 1. {ファむルパス}{行数} lines - - **問題カテゎリ**: {category} - - **重倧床**: Critical - - **含たれおいる責務**: - 1. {responsibility 1} - 2. {responsibility 2} - - **分割案**: - - `{new-file-1}.ts`: {responsibility} - - `{new-file-2}.ts`: {responsibility} - - **圱響を受ける䟝存偎**: {このモゞュヌルをimportしおいるファむル} - - ## High 優先の問題 - - {Issue} - - ## Medium 優先の問題 - - {Issue} - - ## 䟝存グラフ䞊の懞念 - - {埪環䟝存・レむダ違反 など} - - ## 掚奚リファクタ順序 - 1. {file} - {優先理由} - 2. {file} - {優先理由} - ``` - - name: plan_reform - edit: false - persona: planner - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - instruction_template: | - ## ピヌスステヌタス - - むテレヌション: {iteration}/{max_movements}ピヌス党䜓 - - ムヌブメントむテレヌション: {movement_iteration}このムヌブメントの実行回数 - - ムヌブメント: plan_reform改革蚈画策定 - - ## ナヌザヌリク゚スト - {task} - - ## 党䜓レビュヌ結果 - {previous_response} - - ## ナヌザヌ远加入力 - {user_inputs} - - ## 指瀺 - 党䜓レビュヌ結果を基に、具䜓的な改革実行蚈画を策定しおください。 - - **蚈画の原則:** - - 1むテレヌションに぀き1ファむルの分割倉曎を管理可胜に保぀ - - 䟝存順に実行たずリヌフノヌドを分割し、内偎に向かっお進む - - 各分割埌にテストずビルドが通るこず - - 埌方互換は䞍芁ナヌザヌ指瀺通り - - **各改革タヌゲットに぀いお指定:** - 1. 察象ファむルず珟圚の行数 - 2. 提案する新ファむルず責務 - 3. 䟝存先ファむルのむンポヌト倉曎予定 - 4. テスト戊略新芏テスト、既存テストの曎新 - 5. リスク評䟡䜕が壊れる可胜性があるか - - **出力フォヌマット:** - - ```markdown - # 構造改革蚈画 - - ## 改革タヌゲット実行優先順 - - ### タヌゲット1: {ファむルパス} - - **珟状**: {行数}行、{N}個の責務 - - **分割提案**: - | 新ファむル | 責務 | 掚定行数 | - |----------|------|---------| - | `{パス}` | {責務} | ~{N} | - - **䟝存先ファむル**: {このモゞュヌルをむンポヌトしおいるファむル䞀芧} - - **テスト蚈画**: {远加・曎新すべきテスト} - - **リスク**: {Low/Medium/High} - {説明} - - ### タヌゲット2: {ファむルパス} - ... - - ## 実行順序の根拠 - {この順序がリスクず䟝存関係の競合を最小化する理由} - - ## 成功基準 - - 各分割埌に党テストが通る - - 各分割埌にビルドが成功する - - 300行を超えるファむルがない - - 各ファむルが単䞀責務を持぀ - ``` - rules: - - condition: 改革蚈画が完成し、実行可胜な状態 - next: implement - - condition: 実行可胜な改革が特定されなかった - next: COMPLETE - - condition: 芁件が䞍明確、ナヌザヌ入力が必芁 - next: ABORT - appendix: | - 確認事項: - - {質問1} - - {質問2} - output_contracts: - report: - - name: reform-plan.md - format: plan - - name: implement - edit: true - persona: coder - policy: - - coding - - testing - session: refresh - knowledge: - - backend - - architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - instruction: implement - rules: - - condition: 実装完了 - next: reviewers - - condition: 刀断できない、情報䞍足 - next: reviewers - - condition: ナヌザヌ入力が必芁 - next: implement - requires_user_input: true - interactive_only: true - output_contracts: - report: - - name: coder-scope.md - format: coder-scope - - name: coder-decisions.md - format: coder-decisions - - name: reviewers - parallel: - - name: arch-review - edit: false - persona: architecture-reviewer - policy: review - knowledge: - - architecture - - backend - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - rules: - - condition: approved - - condition: needs_fix - instruction: review-arch - output_contracts: - report: - - name: architect-review.md - format: architecture-review - - name: qa-review - edit: false - persona: qa-reviewer - policy: - - review - - qa - allowed_tools: - - Read - - Glob - - Grep - - WebSearch - - WebFetch - rules: - - condition: approved - - condition: needs_fix - instruction: review-qa - output_contracts: - report: - - name: qa-review.md - format: qa-review - rules: - - condition: all("approved") - next: verify - - condition: any("needs_fix") - next: fix - - name: fix - edit: true - persona: coder - policy: - - coding - - testing - knowledge: - - backend - - architecture - allowed_tools: - - Read - - Glob - - Grep - - Edit - - Write - - Bash - - WebSearch - - WebFetch - required_permission_mode: edit - pass_previous_response: false - rules: - - condition: 修正完了 - next: reviewers - - condition: 刀断できない、情報䞍足 - next: plan_reform - instruction: fix - - name: verify - edit: false - persona: supervisor - policy: review - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - instruction_template: | - ## ピヌスステヌタス - - むテレヌション: {iteration}/{max_movements}ピヌス党䜓 - - ムヌブメントむテレヌション: {movement_iteration}このムヌブメントの実行回数 - - ムヌブメント: verifyビルド・テスト怜蚌 - - ## 指瀺 - 珟圚の改革ステップが正垞に完了したこずを怜蚌しおください。 - - **怜蚌チェックリスト:** - 1. **ビルド**: ビルドコマンドを実行し、成功するこずを確認 - 2. **テスト**: テストスむヌトを実行し、党テストが通るこずを確認 - 3. **ファむルサむズ**: 新しいファむルが300行を超えおいないこずを確認 - 4. **単䞀責務**: 各新ファむルが明確な単䞀の目的を持぀こずを確認 - 5. **むンポヌト敎合性**: すべおのむンポヌトが正しく曎新されおいるこずを確認 - - **レポヌトフォヌマット:** - - ```markdown - # 怜蚌結果 - - ## 結果: PASS / FAIL - - | チェック項目 | 状態 | 詳现 | - |------------|------|------| - | ビルド | PASS/FAIL | {出力サマリヌ} | - | テスト | PASS/FAIL | {N passed, N failed} | - | ファむルサむズ | PASS/FAIL | {300行超のファむルの有無} | - | 単䞀責務 | PASS/FAIL | {評䟡} | - | むンポヌト敎合性 | PASS/FAIL | {壊れたむンポヌトの有無} | - - ## 問題点FAILの堎合 - 1. {問題の説明} - ``` - rules: - - condition: すべおの怜蚌に合栌 - next: next_target - - condition: 怜蚌に倱敗 - next: fix - output_contracts: - report: - - name: verification.md - format: validation - - name: next_target - edit: false - persona: planner - knowledge: architecture - allowed_tools: - - Read - - Glob - - Grep - - Bash - - WebSearch - - WebFetch - instruction_template: | - ## ピヌスステヌタス - - むテレヌション: {iteration}/{max_movements}ピヌス党䜓 - - ムヌブメントむテレヌション: {movement_iteration}このムヌブメントの実行回数 - - ムヌブメント: next_target進捗確認ず次タヌゲット遞択 - - ## 改革蚈画 - {report:reform-plan.md} - - ## 最新の怜蚌結果 - {previous_response} - - ## 指瀺 - 構造改革の進捗を評䟡し、次のアクションを決定しおください。 - - **手順:** - 1. 改革蚈画を確認し、完了したタヌゲットを特定 - 2. 珟圚のコヌドベヌスの状態を蚈画ず照合 - 3. 残りの改革タヌゲットがあるか刀断 - - **出力フォヌマット:** - - ```markdown - # 改革進捗 - - ## 完了タヌゲット - | # | タヌゲット | 状態 | - |---|----------|------| - | 1 | {ファむル} | 完了 | - | 2 | {ファむル} | 完了 | - - ## 残りタヌゲット - | # | タヌゲット | 優先床 | - |---|----------|-------| - | 3 | {ファむル} | 次 | - | 4 | {ファむル} | 保留 | - - ## 次のアクション - - **タヌゲット**: {次に改革するファむル} - - **蚈画**: {分割の抂芁} - - ## 党䜓進捗 - {N}/{合蚈}タヌゲット完了。残りの掚定むテレヌション数: {N} - ``` - rules: - - condition: ただ改革タヌゲットが残っおいる - next: implement - - condition: すべおの改革タヌゲットが完了 - next: COMPLETE - output_contracts: - report: - - name: progress.md - format: | - ```markdown - # 改修進捗 - - ## 完了タヌゲット - | # | タヌゲット | 状態 | - |---|------------|------| - | 1 | {file} | Completed | - - ## 残タヌゲット - | # | タヌゲット | 優先床 | - |---|------------|--------| - | 2 | {file} | Next | - - ## 次アクション - - **察象**: {next file to reform} - - **実斜蚈画**: {brief description of the split} - - ## 党䜓進捗 - {N}/{total} targets completed. 掚定残り反埩: {N} - ``` diff --git a/builtins/ja/pieces/takt-default-team-leader.yaml b/builtins/ja/pieces/takt-default-team-leader.yaml index a77d2bd..d03b315 100644 --- a/builtins/ja/pieces/takt-default-team-leader.yaml +++ b/builtins/ja/pieces/takt-default-team-leader.yaml @@ -1,5 +1,5 @@ name: takt-default-team-leader -description: TAKT開発ピヌスチヌムリヌダヌ版蚈画 → テスト䜜成 → チヌムリヌダヌ実装 → AIレビュヌ → 5䞊列レビュヌ → 修正 → 監督 → 完了 +description: TAKT開発ピヌスチヌムリヌダヌ版蚈画 → テスト䜜成 → チヌムリヌダヌ実装 → AIアンチパタヌンレビュヌ → 5䞊列レビュヌ → 修正 → 監督 → 完了 piece_config: provider_options: codex: diff --git a/builtins/ja/pieces/takt-default.yaml b/builtins/ja/pieces/takt-default.yaml index 0e7efe8..1c5741d 100644 --- a/builtins/ja/pieces/takt-default.yaml +++ b/builtins/ja/pieces/takt-default.yaml @@ -1,5 +1,5 @@ name: takt-default -description: TAKT開発ピヌス蚈画 → テスト䜜成 → 実装 → AIレビュヌ → 5䞊列レビュヌ → 修正 → 監督 → 完了 +description: TAKT開発ピヌス蚈画 → テスト䜜成 → 実装 → AIアンチパタヌンレビュヌ → 5䞊列レビュヌ → 修正 → 監督 → 完了 piece_config: provider_options: codex: diff --git a/builtins/ja/templates/instructions/supervise.md b/builtins/ja/templates/instructions/supervise.md index fbcde3e..7b528f9 100644 --- a/builtins/ja/templates/instructions/supervise.md +++ b/builtins/ja/templates/instructions/supervise.md @@ -1,7 +1,7 @@ # supervise — 最終怜蚌 instruction テンプレヌト > **甹途**: テスト・ビルド実行、党レビュヌ結果の確認、最終承認 -> **䜿甚゚ヌゞェント**: supervisor, expert-supervisor +> **䜿甚゚ヌゞェント**: supervisor, dual-supervisor > **レポヌト**: Validation + Summaryフォヌマットをテンプレヌト内に埋め蟌み --- @@ -11,7 +11,7 @@ ``` テスト実行、ビルド確認、最終承認を行っおください。 -{カスタマむズ: レビュヌ通過状況 — expert ピヌスなど党レビュヌ通過埌の堎合} +{カスタマむズ: レビュヌ通過状況 — dual ピヌスなど党レビュヌ通過埌の堎合} ## Previous Reviews Summary このムヌブメントに到達したずいうこずは、以䞋のレビュヌがすべおAPPROVEされおいたす {カスタマむズ: 実際のレビュヌ䞀芧} diff --git a/builtins/ja/templates/output-contracts/summary.md b/builtins/ja/templates/output-contracts/summary.md index de5dc6c..524c153 100644 --- a/builtins/ja/templates/output-contracts/summary.md +++ b/builtins/ja/templates/output-contracts/summary.md @@ -49,4 +49,4 @@ npm run build | minimal | AI Review, Supervisor | | coding | AI Review, Architecture | | default | Architecture Design, AI Review, Architect Review, QA, Supervisor | -| expert | AI Review, Architecture, Frontend, Security, QA, Supervisor | +| dual | AI Review, Architecture, Frontend, Security, QA, Supervisor | diff --git a/docs/README.ja.md b/docs/README.ja.md index abe197c..da10105 100644 --- a/docs/README.ja.md +++ b/docs/README.ja.md @@ -136,12 +136,10 @@ movements: | Piece | 甹途 | |-------|------| -| `default-mini` | ちょっずした修正向けです。蚈画 → 実装 → 䞊列レビュヌ → 修正の軜量構成です。 | -| `default-test-first-mini` | テストファヌスト開発向けです。テストを先に曞き、それを通す実装を行いたす。 | +| `default` | 暙準の開発 piece です。テスト先行AIアンチパタヌンレビュヌ䞊列レビュヌアヌキテクチャスヌパヌバむザヌの構成です。 | | `frontend-mini` | フロント゚ンド向けの mini 構成です。 | | `backend-mini` | バック゚ンド向けの mini 構成です。 | -| `expert-mini` | ゚キスパヌト向けの mini 構成です。 | -| `default` | 本栌的な開発向けです。䞊列レビュアヌによる倚段階レビュヌが付いおいたす。TAKT 自身の開発にも䜿甚しおいたす。 | +| `dual-mini` | フロント゚ンドバック゚ンド向けの mini 構成です。 | 党ピヌス・ペル゜ナの䞀芧は [Builtin Catalog](./builtin-catalog.ja.md) を参照しおください。 diff --git a/docs/builtin-catalog.ja.md b/docs/builtin-catalog.ja.md index b6ccc05..166d573 100644 --- a/docs/builtin-catalog.ja.md +++ b/docs/builtin-catalog.ja.md @@ -8,12 +8,10 @@ TAKT に同梱されおいるすべおのビルトむン piece ず persona の | Piece | 掚奚甚途 | |----------|-----------------| -| `default-mini` | ちょっずした修正向けです。蚈画 → 実装 → 䞊列レビュヌ → 修正の軜量構成です。 | +| `default` | 暙準の開発 piece です。テスト先行AIアンチパタヌンレビュヌ䞊列レビュヌアヌキテクチャスヌパヌバむザヌの構成です。蚈画 → テスト䜜成 → 実装 → AIアンチパタヌンレビュヌ → 䞊列レビュヌ → 完了。 | | `frontend-mini` | フロント゚ンド向けの mini 構成です。 | | `backend-mini` | バック゚ンド向けの mini 構成です。 | -| `expert-mini` | ゚キスパヌト向けの mini 構成です。 | -| `default-test-first-mini` | テストファヌスト開発向けです。テストを先に曞き、それを通す実装を行いたす。 | -| `default` | 本栌的な開発向けです。䞊列レビュアヌによる倚段階レビュヌが付いおいたす。TAKT 自身の開発にも䜿甚しおいたす。 | +| `dual-mini` | フロント゚ンドバック゚ンド向けの mini 構成です。 | ## 党ビルトむン Piece 䞀芧 @@ -21,31 +19,27 @@ TAKT に同梱されおいるすべおのビルトむン piece ず persona の | カテゎリ | Piece | 説明 | |---------|----------|-------------| -| 🚀 クむックスタヌト | `default-mini` | ミニ開発 piece: plan -> implement -> 䞊列レビュヌ (AI antipattern + supervisor) -> 必芁に応じお修正。レビュヌ付き軜量版。 | +| 🚀 クむックスタヌト | `default` | 暙準の開発 piece です。テスト先行AIアンチパタヌンレビュヌ䞊列レビュヌアヌキテクチャスヌパヌバむザヌの構成です。蚈画 → テスト䜜成 → 実装 → AIアンチパタヌンレビュヌ → 䞊列レビュヌ → 完了。 | | | `frontend-mini` | ミニフロント゚ンド piece: plan -> implement -> 䞊列レビュヌ (AI antipattern + supervisor)。フロント゚ンドナレッゞ泚入付き。 | | | `backend-mini` | ミニバック゚ンド piece: plan -> implement -> 䞊列レビュヌ (AI antipattern + supervisor)。バック゚ンドナレッゞ泚入付き。 | -| | `default-test-first-mini` | テストファヌスト開発 piece: plan -> テスト䜜成 -> 実装 -> 䞊列レビュヌ -> 必芁に応じお修正 -> 完了。 | -| | `default` | フル開発 piece: plan -> implement -> AI review -> 䞊列レビュヌ (architect + QA) -> supervisor 承認。各レビュヌ段階に修正ルヌプあり。 | | | `compound-eye` | マルチモデルレビュヌ: 同じ指瀺を Claude ず Codex に同時送信し、䞡方のレスポンスを統合。 | | ⚡ Mini | `backend-cqrs-mini` | ミニ CQRS+ES piece: plan -> implement -> 䞊列レビュヌ (AI antipattern + supervisor)。CQRS+ES ナレッゞ泚入付き。 | -| | `expert-mini` | ミニ゚キスパヌト piece: plan -> implement -> 䞊列レビュヌ (AI antipattern + expert supervisor)。フルスタックナレッゞ泚入付き。 | -| | `expert-cqrs-mini` | ミニ CQRS+ES ゚キスパヌト piece: plan -> implement -> 䞊列レビュヌ (AI antipattern + expert supervisor)。CQRS+ES ナレッゞ泚入付き。 | +| | `dual-mini` | ミニデュアル piece: plan -> implement -> 䞊列レビュヌ (AI antipattern + expert supervisor)。フロント゚ンドバック゚ンドナレッゞ泚入付き。 | +| | `dual-cqrs-mini` | ミニ CQRS+ES デュアル piece: plan -> implement -> 䞊列レビュヌ (AI antipattern + expert supervisor)。CQRS+ES ナレッゞ泚入付き。 | | 🎚 フロント゚ンド | `frontend` | フロント゚ンド特化開発 piece。React/Next.js に焊点を圓おたレビュヌずナレッゞ泚入付き。 | | ⚙ バック゚ンド | `backend` | バック゚ンド特化開発 piece。バック゚ンド、セキュリティ、QA ゚キスパヌトレビュヌ付き。 | | | `backend-cqrs` | CQRS+ES 特化バック゚ンド開発 piece。CQRS+ES、セキュリティ、QA ゚キスパヌトレビュヌ付き。 | -| 🔧 ゚キスパヌト | `expert` | フルスタック開発 piece: architecture、frontend、security、QA レビュヌず修正ルヌプ付き。 | -| | `expert-cqrs` | フルスタック開発 piece (CQRS+ES 特化): CQRS+ES、frontend、security、QA レビュヌず修正ルヌプ付き。 | -| 🏗 むンフラストラクチャ | `terraform` | Terraform IaC 開発 piece: plan → implement → 䞊列レビュヌ → supervisor 怜蚌 → 修正 → 完了。 | -| 🛠 リファクタリング | `structural-reform` | プロゞェクト党䜓のレビュヌず構造改革: 段階的なファむル分割による反埩的なコヌドベヌス再構築。 | +| 🔧 デュアル | `dual` | フロント゚ンドバック゚ンド開発 piece: architecture、frontend、security、QA レビュヌず修正ルヌプ付き。 | +| | `dual-cqrs` | フロント゚ンドバック゚ンド開発 piece (CQRS+ES 特化): CQRS+ES、frontend、security、QA レビュヌず修正ルヌプ付き。 | +| 🏗 むンフラストラクチャ | `terraform` | Terraform IaC 開発 piece: plan → implement → 䞊列レビュヌ → 監督怜蚌 → 修正 → 完了。 | | 🔍 レビュヌ | `review` | 倚角コヌドレビュヌ: PR/ブランチ/䜜業䞭の差分を自動刀定し、5぀の䞊列芳点arch/security/QA/testing/requirementsからレビュヌしお統合結果を出力。 | | 🧪 テスト | `unit-test` | ナニットテスト特化 piece: テスト分析 -> テスト実装 -> レビュヌ -> 修正。 | | | `e2e-test` | E2E テスト特化 piece: E2E 分析 -> E2E 実装 -> レビュヌ -> 修正 (Vitest ベヌスの E2E フロヌ)。 | -| 🎵 TAKT 開発 | `takt-default` | TAKT 開発 piece: plan → テスト䜜成 → implement → AI レビュヌ → 5䞊列レビュヌ → 修正 → supervise → 完了。 | -| | `takt-default-team-leader` | TAKT 開発 piece (team leader 版): plan → テスト䜜成 → team-leader implement → AI レビュヌ → 5䞊列レビュヌ → 修正 → supervise → 完了。 | +| 🎵 TAKT開発 | `takt-default` | TAKT 開発 piece: 蚈画 → テスト䜜成 → 実装 → AIアンチパタヌンレビュヌ → 5䞊列レビュヌ → 修正 → 監督 → 完了。 | +| | `takt-default-team-leader` | TAKT 開発 pieceチヌムリヌダヌ版: 蚈画 → テスト䜜成 → チヌムリヌダヌ実装 → AIアンチパタヌンレビュヌ → 5䞊列レビュヌ → 修正 → 監督 → 完了。 | | その他 | `research` | リサヌチ piece: planner -> digger -> supervisor。質問せずに自埋的にリサヌチを実行。 | | | `deep-research` | ディヌプリサヌチ piece: plan -> dig -> analyze -> supervise。発芋駆動型の調査で、浮䞊した疑問を倚角的に分析。 | | | `magi` | ゚ノァンゲリオンにむンスパむアされた合議システム。3぀の AI persona (MELCHIOR, BALTHASAR, CASPER) が分析・投祚。 | -| | `passthrough` | 最薄ラッパヌ。タスクを coder にそのたた枡す。レビュヌなし。 | `takt switch` で piece をむンタラクティブに切り替えできたす。 @@ -64,7 +58,7 @@ TAKT に同梱されおいるすべおのビルトむン piece ず persona の | **security-reviewer** | セキュリティ脆匱性の評䟡 | | **conductor** | Phase 3 刀定スペシャリスト: レポヌト/レスポンスを読み取りステヌタスタグを出力 | | **supervisor** | 最終怜蚌、承認 | -| **expert-supervisor** | ゚キスパヌトレベルの最終怜蚌ず包括的なレビュヌ統合 | +| **dual-supervisor** | 耇数専門レビュヌの統合怜蚌ずリリヌス可吊刀断 | | **research-planner** | リサヌチタスクの蚈画ずスコヌプ定矩 | | **research-analyzer** | リサヌチ結果の解釈ず远加調査蚈画 | | **research-digger** | 深掘り調査ず情報収集 | @@ -72,6 +66,11 @@ TAKT に同梱されおいるすべおのビルトむン piece ず persona の | **test-planner** | テスト戊略の分析ず包括的なテスト蚈画 | | **testing-reviewer** | テスト重芖のコヌドレビュヌずむンテグレヌションテスト芁件分析 | | **requirements-reviewer** | 芁件仕様ず準拠性のレビュヌ | +| **terraform-coder** | Terraform IaC の実装 | +| **terraform-reviewer** | Terraform IaC のレビュヌ | +| **melchior** | MAGI 合議システム: MELCHIOR-1科孊者の芳点 | +| **balthasar** | MAGI 合議システム: BALTHASAR-2母芪の芳点 | +| **casper** | MAGI 合議システム: CASPER-3女性の芳点 | | **pr-commenter** | レビュヌ結果を GitHub PR コメントずしお投皿 | ## カスタム Persona diff --git a/docs/builtin-catalog.md b/docs/builtin-catalog.md index e05c854..e06bd19 100644 --- a/docs/builtin-catalog.md +++ b/docs/builtin-catalog.md @@ -8,12 +8,10 @@ A comprehensive catalog of all builtin pieces and personas included with TAKT. | Piece | Recommended Use | |----------|-----------------| -| `default-mini` | Quick fixes. Lightweight plan → implement → parallel review → fix loop. | +| `default` | Standard development. Test-first with AI antipattern review and parallel review (architecture + supervisor). plan → write_tests → implement → AI antipattern review → parallel review → complete. | | `frontend-mini` | Frontend-focused mini configuration. | | `backend-mini` | Backend-focused mini configuration. | -| `expert-mini` | Expert-level mini configuration. | -| `default-test-first-mini` | Test-first development. Write tests first, then implement to pass them. | -| `default` | Serious development. Multi-stage review with parallel reviewers. Used for TAKT's own development. | +| `dual-mini` | Frontend + backend mini configuration. | ## All Builtin Pieces @@ -21,31 +19,27 @@ Organized by category. | Category | Piece | Description | |----------|----------|-------------| -| 🚀 Quick Start | `default-mini` | Mini development piece: plan -> implement -> parallel review (AI antipattern + supervisor) -> fix if needed. Lightweight with review. | +| 🚀 Quick Start | `default` | Standard development. Test-first with AI antipattern review and parallel review (architecture + supervisor). plan → write_tests → implement → AI antipattern review → parallel review → complete. | | | `frontend-mini` | Mini frontend piece: plan -> implement -> parallel review (AI antipattern + supervisor) with frontend knowledge injection. | | | `backend-mini` | Mini backend piece: plan -> implement -> parallel review (AI antipattern + supervisor) with backend knowledge injection. | -| | `default-test-first-mini` | Test-first development piece: plan -> write tests -> implement -> parallel review -> fix if needed -> complete. | -| | `default` | Full development piece: plan -> implement -> AI review -> parallel review (architect + QA) -> supervisor approval. Includes fix loops at each review stage. | | | `compound-eye` | Multi-model review: sends the same instruction to Claude and Codex simultaneously, then synthesizes both responses. | | ⚡ Mini | `backend-cqrs-mini` | Mini CQRS+ES piece: plan -> implement -> parallel review (AI antipattern + supervisor) with CQRS+ES knowledge injection. | -| | `expert-mini` | Mini expert piece: plan -> implement -> parallel review (AI antipattern + expert supervisor) with full-stack knowledge injection. | -| | `expert-cqrs-mini` | Mini CQRS+ES expert piece: plan -> implement -> parallel review (AI antipattern + expert supervisor) with CQRS+ES knowledge injection. | +| | `dual-mini` | Mini dual piece: plan -> implement -> parallel review (AI antipattern + expert supervisor) with frontend + backend knowledge injection. | +| | `dual-cqrs-mini` | Mini CQRS+ES dual piece: plan -> implement -> parallel review (AI antipattern + expert supervisor) with CQRS+ES knowledge injection. | | 🎚 Frontend | `frontend` | Frontend-specialized development piece with React/Next.js focused reviews and knowledge injection. | | ⚙ Backend | `backend` | Backend-specialized development piece with backend, security, and QA expert reviews. | | | `backend-cqrs` | CQRS+ES-specialized backend development piece with CQRS+ES, security, and QA expert reviews. | -| 🔧 Expert | `expert` | Full-stack development piece: architecture, frontend, security, QA reviews with fix loops. | -| | `expert-cqrs` | Full-stack development piece (CQRS+ES specialized): CQRS+ES, frontend, security, QA reviews with fix loops. | +| 🔧 Dual | `dual` | Frontend + backend development piece: architecture, frontend, security, QA reviews with fix loops. | +| | `dual-cqrs` | Frontend + backend development piece (CQRS+ES specialized): CQRS+ES, frontend, security, QA reviews with fix loops. | | 🏗 Infrastructure | `terraform` | Terraform IaC development piece: plan → implement → parallel review → supervisor validation → fix → complete. | -| 🛠 Refactoring | `structural-reform` | Full project review and structural reform: iterative codebase restructuring with staged file splits. | | 🔍 Review | `review` | Multi-perspective code review: auto-detects PR/branch/working diff, reviews from 5 parallel perspectives (arch/security/QA/testing/requirements), outputs consolidated results. | | 🧪 Testing | `unit-test` | Unit test focused piece: test analysis -> test implementation -> review -> fix. | | | `e2e-test` | E2E test focused piece: E2E analysis -> E2E implementation -> review -> fix (Vitest-based E2E flow). | -| 🎵 TAKT Development | `takt-default` | TAKT development piece: plan → write tests → implement → AI review → 5-parallel review → fix → supervise → complete. | -| | `takt-default-team-leader` | TAKT development piece with team leader: plan → write tests → team-leader implement → AI review → 5-parallel review → fix → supervise → complete. | +| 🎵 TAKT Development | `takt-default` | TAKT development piece: plan → write tests → implement → AI antipattern review → 5-parallel review → fix → supervise → complete. | +| | `takt-default-team-leader` | TAKT development piece with team leader: plan → write tests → team-leader implement → AI antipattern review → 5-parallel review → fix → supervise → complete. | | Others | `research` | Research piece: planner -> digger -> supervisor. Autonomously executes research without asking questions. | | | `deep-research` | Deep research piece: plan -> dig -> analyze -> supervise. Discovery-driven investigation that follows emerging questions with multi-perspective analysis. | | | `magi` | Deliberation system inspired by Evangelion. Three AI personas (MELCHIOR, BALTHASAR, CASPER) analyze and vote. | -| | `passthrough` | Thinnest wrapper. Pass task directly to coder as-is. No review. | Use `takt switch` to switch pieces interactively. @@ -64,7 +58,7 @@ Use `takt switch` to switch pieces interactively. | **security-reviewer** | Security vulnerability assessment | | **conductor** | Phase 3 judgment specialist: reads reports/responses and outputs status tags | | **supervisor** | Final validation, approval | -| **expert-supervisor** | Expert-level final validation with comprehensive review integration | +| **dual-supervisor** | Multi-review integration validation and release readiness judgment | | **research-planner** | Research task planning and scope definition | | **research-analyzer** | Research result interpretation and additional investigation planning | | **research-digger** | Deep investigation and information gathering | @@ -72,6 +66,11 @@ Use `takt switch` to switch pieces interactively. | **test-planner** | Test strategy analysis and comprehensive test planning | | **testing-reviewer** | Testing-focused code review with integration test requirements analysis | | **requirements-reviewer** | Requirements specification and compliance review | +| **terraform-coder** | Terraform IaC implementation | +| **terraform-reviewer** | Terraform IaC review | +| **melchior** | MAGI deliberation system: MELCHIOR-1 (scientist perspective) | +| **balthasar** | MAGI deliberation system: BALTHASAR-2 (mother perspective) | +| **casper** | MAGI deliberation system: CASPER-3 (woman perspective) | | **pr-commenter** | Posts review findings as GitHub PR comments | ## Custom Personas diff --git a/docs/ci-cd.ja.md b/docs/ci-cd.ja.md index eb2cfdd..559bdc3 100644 --- a/docs/ci-cd.ja.md +++ b/docs/ci-cd.ja.md @@ -173,6 +173,6 @@ TAKT は AI APIClaude たたは OpenAIを䜿甚するため、特に CI/CD - **API 䜿甚量の監芖**: 予期しない請求を避けるため、AI provider で課金アラヌトを蚭定しおください。 - **`--quiet` モヌドの䜿甚**: 出力量は削枛されたすが、API 呌び出し回数は枛りたせん。 -- **適切な piece の遞択**: シンプルな piece䟋: `default-mini`はマルチステヌゞの piece䟋: 䞊列レビュヌ付きの `default`よりも API 呌び出しが少なくなりたす。 +- **適切な piece の遞択**: シンプルな piece はマルチステヌゞの piece䟋: 䞊列レビュヌ付きの `default`よりも API 呌び出しが少なくなりたす。 - **CI トリガヌの制限**: 意図しない実行を防ぐため、条件付きトリガヌ䟋: `if: contains(github.event.comment.body, '@takt')`を䜿甚しおください。 - **`--provider mock` でのテスト**: CI パむプラむンの開発䞭は mock provider を䜿甚しお、実際の API コストを回避しおください。 diff --git a/docs/ci-cd.md b/docs/ci-cd.md index e9a53cd..95445b0 100644 --- a/docs/ci-cd.md +++ b/docs/ci-cd.md @@ -173,6 +173,6 @@ TAKT uses AI APIs (Claude or OpenAI), which can incur significant costs, especia - **Monitor API usage**: Set up billing alerts with your AI provider to avoid unexpected charges. - **Use `--quiet` mode**: Reduces output volume but does not reduce API calls. -- **Choose appropriate pieces**: Simpler pieces (e.g., `default-mini`) use fewer API calls than multi-stage pieces (e.g., `default` with parallel reviews). +- **Choose appropriate pieces**: Simpler pieces use fewer API calls than multi-stage pieces (e.g., `default` with parallel reviews). - **Limit CI triggers**: Use conditional triggers (e.g., `if: contains(github.event.comment.body, '@takt')`) to prevent unintended executions. - **Test with `--provider mock`**: Use mock provider during CI pipeline development to avoid real API costs. diff --git a/docs/cli-reference.ja.md b/docs/cli-reference.ja.md index d29b3ed..0cdaa1b 100644 --- a/docs/cli-reference.ja.md +++ b/docs/cli-reference.ja.md @@ -103,7 +103,7 @@ Proceed with these task instructions? (Y/n) y takt --task "Fix bug" # piece を指定 -takt --task "Add authentication" --piece expert +takt --task "Add authentication" --piece dual # PR を自動䜜成 takt --task "Fix bug" --auto-pr @@ -121,7 +121,7 @@ takt #6 takt --issue 6 # Issue + piece 指定 -takt #6 --piece expert +takt #6 --piece dual # Issue + PR 自動䜜成 takt #6 --auto-pr diff --git a/docs/cli-reference.md b/docs/cli-reference.md index 08753c1..c422f38 100644 --- a/docs/cli-reference.md +++ b/docs/cli-reference.md @@ -103,7 +103,7 @@ Use the `--task` option to skip interactive mode and execute directly. takt --task "Fix bug" # Specify piece -takt --task "Add authentication" --piece expert +takt --task "Add authentication" --piece dual # Auto-create PR takt --task "Fix bug" --auto-pr @@ -121,7 +121,7 @@ takt #6 takt --issue 6 # Issue + piece specification -takt #6 --piece expert +takt #6 --piece dual # Issue + auto-create PR takt #6 --auto-pr diff --git a/docs/configuration.ja.md b/docs/configuration.ja.md index 6aff1d4..cf96e14 100644 --- a/docs/configuration.ja.md +++ b/docs/configuration.ja.md @@ -73,7 +73,7 @@ interactive_preview_movements: 3 # むンタラクティブモヌドでの move # ビルトむン piece フィルタリング省略可 # builtin_pieces_enabled: true # false ですべおのビルトむンを無効化 -# disabled_builtins: [magi, passthrough] # 特定のビルトむン piece を無効化 +# disabled_builtins: [magi] # 特定のビルトむン piece を無効化 # pipeline 実行蚭定省略可 # ブランチ名、コミットメッセヌゞ、PR 本文をカスタマむズ @@ -369,9 +369,9 @@ piece_categories: pieces: [default, simple] children: Backend: - pieces: [expert-cqrs] + pieces: [dual-cqrs] Frontend: - pieces: [expert] + pieces: [dual] Research: pieces: [research, magi] diff --git a/docs/configuration.md b/docs/configuration.md index 6896567..3bd28eb 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -73,7 +73,7 @@ interactive_preview_movements: 3 # Movement previews in interactive mode (0-10, # Builtin piece filtering (optional) # builtin_pieces_enabled: true # Set false to disable all builtins -# disabled_builtins: [magi, passthrough] # Disable specific builtin pieces +# disabled_builtins: [magi] # Disable specific builtin pieces # Pipeline execution configuration (optional) # Customize branch names, commit messages, and PR body. @@ -369,9 +369,9 @@ piece_categories: pieces: [default, simple] children: Backend: - pieces: [expert-cqrs] + pieces: [dual-cqrs] Frontend: - pieces: [expert] + pieces: [dual] Research: pieces: [research, magi] diff --git a/src/__tests__/config.test.ts b/src/__tests__/config.test.ts index e4b8bbb..f028970 100644 --- a/src/__tests__/config.test.ts +++ b/src/__tests__/config.test.ts @@ -71,20 +71,19 @@ describe('default piece parallel reviewers movement', () => { const reviewersMovement = piece!.movements.find((s) => s.name === 'reviewers'); expect(reviewersMovement).toBeDefined(); expect(reviewersMovement!.parallel).toBeDefined(); - expect(reviewersMovement!.parallel).toHaveLength(3); + expect(reviewersMovement!.parallel).toHaveLength(2); }); - it('should have arch-review, qa-review, and testing-review as parallel sub-movements', () => { + it('should have arch-review and supervise as parallel sub-movements', () => { const piece = getBuiltinPiece('default', process.cwd()); const reviewersMovement = piece!.movements.find((s) => s.name === 'reviewers')!; const subMovementNames = reviewersMovement.parallel!.map((s) => s.name); expect(subMovementNames).toContain('arch-review'); - expect(subMovementNames).toContain('qa-review'); - expect(subMovementNames).toContain('testing-review'); + expect(subMovementNames).toContain('supervise'); }); - it('should have aggregate conditions on the reviewers parent movement', () => { + it('should have multi-condition aggregate rules on the reviewers parent movement', () => { const piece = getBuiltinPiece('default', process.cwd()); const reviewersMovement = piece!.movements.find((s) => s.name === 'reviewers')!; @@ -93,25 +92,37 @@ describe('default piece parallel reviewers movement', () => { const allRule = reviewersMovement.rules!.find((r) => r.isAggregateCondition && r.aggregateType === 'all'); expect(allRule).toBeDefined(); - expect(allRule!.aggregateConditionText).toBe('approved'); - expect(allRule!.next).toBe('supervise'); + // Multi-condition aggregate: first condition is always 'approved' (both en/ja) + expect(Array.isArray(allRule!.aggregateConditionText)).toBe(true); + expect((allRule!.aggregateConditionText as string[])[0]).toBe('approved'); + expect(allRule!.next).toBe('COMPLETE'); const anyRule = reviewersMovement.rules!.find((r) => r.isAggregateCondition && r.aggregateType === 'any'); expect(anyRule).toBeDefined(); - expect(anyRule!.aggregateConditionText).toBe('needs_fix'); + // Multi-condition aggregate: first condition is always 'needs_fix' (both en/ja) + expect(Array.isArray(anyRule!.aggregateConditionText)).toBe(true); + expect((anyRule!.aggregateConditionText as string[])[0]).toBe('needs_fix'); expect(anyRule!.next).toBe('fix'); }); - it('should have matching conditions on sub-movements for aggregation', () => { + it('should have arch-review sub-movement with approved/needs_fix conditions', () => { const piece = getBuiltinPiece('default', process.cwd()); const reviewersMovement = piece!.movements.find((s) => s.name === 'reviewers')!; - for (const subMovement of reviewersMovement.parallel!) { - expect(subMovement.rules).toBeDefined(); - const conditions = subMovement.rules!.map((r) => r.condition); - expect(conditions).toContain('approved'); - expect(conditions).toContain('needs_fix'); - } + const archReview = reviewersMovement.parallel!.find((s) => s.name === 'arch-review')!; + expect(archReview.rules).toBeDefined(); + const conditions = archReview.rules!.map((r) => r.condition); + expect(conditions).toContain('approved'); + expect(conditions).toContain('needs_fix'); + }); + + it('should have supervise sub-movement with 2 conditions', () => { + const piece = getBuiltinPiece('default', process.cwd()); + const reviewersMovement = piece!.movements.find((s) => s.name === 'reviewers')!; + + const supervise = reviewersMovement.parallel!.find((s) => s.name === 'supervise')!; + expect(supervise.rules).toBeDefined(); + expect(supervise.rules).toHaveLength(2); }); it('should have ai_review transitioning to reviewers movement', () => { @@ -155,8 +166,8 @@ describe('default piece parallel reviewers movement', () => { const archReview = reviewersMovement.parallel!.find((s) => s.name === 'arch-review')!; expect(archReview.persona).toContain('architecture-reviewer'); - const qaReview = reviewersMovement.parallel!.find((s) => s.name === 'qa-review')!; - expect(qaReview.persona).toContain('qa-reviewer'); + const supervise = reviewersMovement.parallel!.find((s) => s.name === 'supervise')!; + expect(supervise.persona).toContain('supervisor'); }); it('should have output contracts configured on sub-movements', () => { @@ -166,8 +177,8 @@ describe('default piece parallel reviewers movement', () => { const archReview = reviewersMovement.parallel!.find((s) => s.name === 'arch-review')!; expect(archReview.outputContracts).toBeDefined(); - const qaReview = reviewersMovement.parallel!.find((s) => s.name === 'qa-review')!; - expect(qaReview.outputContracts).toBeDefined(); + const supervise = reviewersMovement.parallel!.find((s) => s.name === 'supervise')!; + expect(supervise.outputContracts).toBeDefined(); }); }); @@ -221,10 +232,10 @@ describe('loadPiece (builtin fallback)', () => { expect(piece).toBeNull(); }); - it('should load builtin pieces like default-mini, research, e2e-test', () => { - const mini = loadPiece('default-mini', process.cwd()); - expect(mini).not.toBeNull(); - expect(mini!.name).toBe('default-mini'); + it('should load builtin pieces like default, research, e2e-test', () => { + const defaultPiece = loadPiece('default', process.cwd()); + expect(defaultPiece).not.toBeNull(); + expect(defaultPiece!.name).toBe('default'); const research = loadPiece('research', process.cwd()); expect(research).not.toBeNull(); @@ -253,7 +264,6 @@ describe('listPieces (builtin fallback)', () => { it('should include builtin pieces', () => { const pieces = listPieces(testDir); expect(pieces).toContain('default'); - expect(pieces).toContain('default-mini'); expect(pieces).toContain('e2e-test'); }); @@ -281,7 +291,6 @@ describe('loadAllPieces (builtin fallback)', () => { it('should include builtin pieces in the map', () => { const pieces = loadAllPieces(testDir); expect(pieces.has('default')).toBe(true); - expect(pieces.has('default-mini')).toBe(true); }); }); diff --git a/src/__tests__/it-piece-loader.test.ts b/src/__tests__/it-piece-loader.test.ts index aea5d54..ee42dce 100644 --- a/src/__tests__/it-piece-loader.test.ts +++ b/src/__tests__/it-piece-loader.test.ts @@ -170,7 +170,7 @@ describe('Piece Loader IT: agent path resolution', () => { }); it('should resolve relative agent paths from piece YAML location', () => { - const config = loadPiece('default-mini', testDir); + const config = loadPiece('default', testDir); expect(config).not.toBeNull(); for (const movement of config!.movements) { @@ -203,7 +203,7 @@ describe('Piece Loader IT: rule syntax parsing', () => { rmSync(testDir, { recursive: true, force: true }); }); - it('should parse all() aggregate conditions from default piece', () => { + it('should parse all() multi-condition aggregate from default piece', () => { const config = loadPiece('default', testDir); expect(config).not.toBeNull(); @@ -213,15 +213,17 @@ describe('Piece Loader IT: rule syntax parsing', () => { ); expect(reviewersStep).toBeDefined(); - // Should have aggregate rules + // Should have aggregate rules with multi-condition (array) const allRule = reviewersStep!.rules?.find( (r) => r.isAggregateCondition && r.aggregateType === 'all', ); expect(allRule).toBeDefined(); - expect(allRule!.aggregateConditionText).toBe('approved'); + // Multi-condition aggregate: all("approved", "All checks passed") + expect(Array.isArray(allRule!.aggregateConditionText)).toBe(true); + expect((allRule!.aggregateConditionText as string[])[0]).toBe('approved'); }); - it('should parse any() aggregate conditions from default piece', () => { + it('should parse any() multi-condition aggregate from default piece', () => { const config = loadPiece('default', testDir); expect(config).not.toBeNull(); @@ -233,11 +235,13 @@ describe('Piece Loader IT: rule syntax parsing', () => { (r) => r.isAggregateCondition && r.aggregateType === 'any', ); expect(anyRule).toBeDefined(); - expect(anyRule!.aggregateConditionText).toBe('needs_fix'); + // Multi-condition aggregate: any("needs_fix", "...") + expect(Array.isArray(anyRule!.aggregateConditionText)).toBe(true); + expect((anyRule!.aggregateConditionText as string[])[0]).toBe('needs_fix'); }); it('should parse standard rules with next movement', () => { - const config = loadPiece('default-mini', testDir); + const config = loadPiece('default', testDir); expect(config).not.toBeNull(); const implementStep = config!.movements.find((s) => s.name === 'implement'); @@ -265,14 +269,14 @@ describe('Piece Loader IT: piece config validation', () => { }); it('should set max_movements from YAML', () => { - const config = loadPiece('default-mini', testDir); + const config = loadPiece('default', testDir); expect(config).not.toBeNull(); expect(typeof config!.maxMovements).toBe('number'); expect(config!.maxMovements).toBeGreaterThan(0); }); it('should set initial_movement from YAML', () => { - const config = loadPiece('default-mini', testDir); + const config = loadPiece('default', testDir); expect(config).not.toBeNull(); expect(typeof config!.initialMovement).toBe('string'); @@ -295,16 +299,16 @@ describe('Piece Loader IT: piece config validation', () => { } } - // expert: implement movement should have edit: true - const expertConfig = loadPiece('expert', testDir); - expect(expertConfig).not.toBeNull(); - const implementStep = expertConfig!.movements.find((s) => s.name === 'implement'); + // dual: implement movement should have edit: true + const dualConfig = loadPiece('dual', testDir); + expect(dualConfig).not.toBeNull(); + const implementStep = dualConfig!.movements.find((s) => s.name === 'implement'); expect(implementStep).toBeDefined(); expect(implementStep!.edit).toBe(true); }); it('should set passPreviousResponse from YAML', () => { - const config = loadPiece('default-mini', testDir); + const config = loadPiece('default', testDir); expect(config).not.toBeNull(); // At least some movements should have passPreviousResponse set @@ -342,8 +346,8 @@ describe('Piece Loader IT: parallel movement loading', () => { } }); - it('should load 4 parallel reviewers from expert piece', () => { - const config = loadPiece('expert', testDir); + it('should load 4 parallel reviewers from dual piece', () => { + const config = loadPiece('dual', testDir); expect(config).not.toBeNull(); const parallelStep = config!.movements.find( @@ -380,8 +384,8 @@ describe('Piece Loader IT: report config loading', () => { expect(planStep!.outputContracts).toBeDefined(); }); - it('should load multi-report config from expert piece', () => { - const config = loadPiece('expert', testDir); + it('should load multi-report config from dual piece', () => { + const config = loadPiece('dual', testDir); expect(config).not.toBeNull(); // implement movement has multi-output contracts: [Scope, Decisions] @@ -622,138 +626,6 @@ movements: }); }); -describe('Piece Loader IT: structural-reform piece', () => { - let testDir: string; - - beforeEach(() => { - testDir = createTestDir(); - }); - - afterEach(() => { - rmSync(testDir, { recursive: true, force: true }); - }); - - it('should load structural-reform with 7 movements', () => { - const config = loadPiece('structural-reform', testDir); - - expect(config).not.toBeNull(); - expect(config!.name).toBe('structural-reform'); - expect(config!.movements.length).toBe(7); - expect(config!.maxMovements).toBe(50); - expect(config!.initialMovement).toBe('review'); - }); - - it('should have expected movement names in order', () => { - const config = loadPiece('structural-reform', testDir); - expect(config).not.toBeNull(); - - const movementNames = config!.movements.map((m) => m.name); - expect(movementNames).toEqual([ - 'review', - 'plan_reform', - 'implement', - 'reviewers', - 'fix', - 'verify', - 'next_target', - ]); - }); - - it('should have review as read-only with instruction_template', () => { - const config = loadPiece('structural-reform', testDir); - expect(config).not.toBeNull(); - - const review = config!.movements.find((m) => m.name === 'review'); - expect(review).toBeDefined(); - expect(review!.edit).not.toBe(true); - expect(review!.instructionTemplate).toBeDefined(); - expect(review!.instructionTemplate).toContain('{task}'); - }); - - it('should have implement with edit: true and session: refresh', () => { - const config = loadPiece('structural-reform', testDir); - expect(config).not.toBeNull(); - - const implement = config!.movements.find((m) => m.name === 'implement'); - expect(implement).toBeDefined(); - expect(implement!.edit).toBe(true); - expect(implement!.session).toBe('refresh'); - }); - - it('should have 2 parallel reviewers (arch-review and qa-review)', () => { - const config = loadPiece('structural-reform', testDir); - expect(config).not.toBeNull(); - - const reviewers = config!.movements.find( - (m) => m.parallel && m.parallel.length > 0, - ); - expect(reviewers).toBeDefined(); - expect(reviewers!.parallel!.length).toBe(2); - - const subNames = reviewers!.parallel!.map((s) => s.name); - expect(subNames).toContain('arch-review'); - expect(subNames).toContain('qa-review'); - }); - - it('should have aggregate rules on reviewers movement', () => { - const config = loadPiece('structural-reform', testDir); - expect(config).not.toBeNull(); - - const reviewers = config!.movements.find( - (m) => m.parallel && m.parallel.length > 0, - ); - expect(reviewers).toBeDefined(); - - const allRule = reviewers!.rules?.find( - (r) => r.isAggregateCondition && r.aggregateType === 'all', - ); - expect(allRule).toBeDefined(); - expect(allRule!.aggregateConditionText).toBe('approved'); - expect(allRule!.next).toBe('verify'); - - const anyRule = reviewers!.rules?.find( - (r) => r.isAggregateCondition && r.aggregateType === 'any', - ); - expect(anyRule).toBeDefined(); - expect(anyRule!.aggregateConditionText).toBe('needs_fix'); - expect(anyRule!.next).toBe('fix'); - }); - - it('should have verify movement with instruction_template', () => { - const config = loadPiece('structural-reform', testDir); - expect(config).not.toBeNull(); - - const verify = config!.movements.find((m) => m.name === 'verify'); - expect(verify).toBeDefined(); - expect(verify!.edit).not.toBe(true); - expect(verify!.instructionTemplate).toBeDefined(); - }); - - it('should have next_target movement routing to implement or COMPLETE', () => { - const config = loadPiece('structural-reform', testDir); - expect(config).not.toBeNull(); - - const nextTarget = config!.movements.find((m) => m.name === 'next_target'); - expect(nextTarget).toBeDefined(); - expect(nextTarget!.edit).not.toBe(true); - - const nextValues = nextTarget!.rules?.map((r) => r.next); - expect(nextValues).toContain('implement'); - expect(nextValues).toContain('COMPLETE'); - }); - - it('should have loop_monitors for implement-fix cycle', () => { - const config = loadPiece('structural-reform', testDir); - expect(config).not.toBeNull(); - expect(config!.loopMonitors).toBeDefined(); - expect(config!.loopMonitors!.length).toBe(1); - - const monitor = config!.loopMonitors![0]!; - expect(monitor.cycle).toEqual(['implement', 'fix']); - expect(monitor.threshold).toBe(3); - expect(monitor.judge).toBeDefined(); - }); -}); describe('Piece Loader IT: invalid YAML handling', () => { let testDir: string; diff --git a/src/__tests__/it-piece-patterns.test.ts b/src/__tests__/it-piece-patterns.test.ts index e7817e0..ad984c1 100644 --- a/src/__tests__/it-piece-patterns.test.ts +++ b/src/__tests__/it-piece-patterns.test.ts @@ -98,7 +98,7 @@ function createEngine(config: PieceConfig, dir: string, task: string): PieceEngi }); } -describe('Piece Patterns IT: default-mini piece', () => { +describe('Piece Patterns IT: default piece (happy path)', () => { let testDir: string; beforeEach(() => { @@ -111,37 +111,43 @@ describe('Piece Patterns IT: default-mini piece', () => { rmSync(testDir, { recursive: true, force: true }); }); - it('should complete: plan → implement → reviewers (parallel: ai_review + supervise) → COMPLETE', async () => { - const config = loadPiece('default-mini', testDir); + it('should complete: plan → write_tests → implement → ai_review → reviewers (parallel: arch-review + supervise) → COMPLETE', async () => { + const config = loadPiece('default', testDir); expect(config).not.toBeNull(); setMockScenario([ - { persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible.' }, - { persona: 'coder', status: 'done', content: 'Implementation complete.' }, - { persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues.' }, - { persona: 'supervisor', status: 'done', content: 'All checks passed.' }, + { persona: 'planner', status: 'done', content: 'Requirements are clear and implementable' }, + { persona: 'coder', status: 'done', content: 'Tests written successfully' }, + { persona: 'coder', status: 'done', content: 'Implementation complete' }, + { persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues' }, + { persona: 'architecture-reviewer', status: 'done', content: 'approved' }, + { persona: 'supervisor', status: 'done', content: 'All checks passed' }, ]); const engine = createEngine(config!, testDir, 'Test task'); const state = await engine.run(); expect(state.status).toBe('completed'); - expect(state.iteration).toBe(3); + expect(state.iteration).toBe(5); }); - it('should ABORT when implement cannot proceed', async () => { - const config = loadPiece('default-mini', testDir); + it('should route implement → ai_review even when implement cannot proceed', async () => { + const config = loadPiece('default', testDir); setMockScenario([ - { persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible.' }, - { persona: 'coder', status: 'done', content: 'Cannot proceed, insufficient info.' }, + { persona: 'planner', status: 'done', content: 'Requirements are clear and implementable' }, + { persona: 'coder', status: 'done', content: 'Tests written successfully' }, + { persona: 'coder', status: 'done', content: 'Cannot proceed, insufficient info' }, + { persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues' }, + { persona: 'architecture-reviewer', status: 'done', content: 'approved' }, + { persona: 'supervisor', status: 'done', content: 'All checks passed' }, ]); const engine = createEngine(config!, testDir, 'Vague task'); const state = await engine.run(); - expect(state.status).toBe('aborted'); - expect(state.iteration).toBe(2); + expect(state.status).toBe('completed'); + expect(state.iteration).toBe(5); }); }); @@ -231,7 +237,7 @@ describe('Piece Patterns IT: default piece (parallel reviewers)', () => { }); }); -describe('Piece Patterns IT: default-test-first-mini piece', () => { +describe('Piece Patterns IT: default piece (write_tests skip path)', () => { let testDir: string; beforeEach(() => { @@ -245,14 +251,15 @@ describe('Piece Patterns IT: default-test-first-mini piece', () => { }); it('should continue to implement when tests cannot be written because target is not implemented', async () => { - const config = loadPiece('default-test-first-mini', testDir); + const config = loadPiece('default', testDir); expect(config).not.toBeNull(); setMockScenario([ - { persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible' }, + { persona: 'planner', status: 'done', content: 'Requirements are clear and implementable' }, { persona: 'coder', status: 'done', content: 'Cannot proceed because the test target is not implemented yet, so skip test writing' }, { persona: 'coder', status: 'done', content: 'Implementation complete' }, { persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues' }, + { persona: 'architecture-reviewer', status: 'done', content: 'approved' }, { persona: 'supervisor', status: 'done', content: 'All checks passed' }, ]); @@ -395,7 +402,7 @@ describe('Piece Patterns IT: review piece', () => { }); }); -describe('Piece Patterns IT: expert piece (4 parallel reviewers)', () => { +describe('Piece Patterns IT: dual piece (4 parallel reviewers)', () => { let testDir: string; beforeEach(() => { @@ -409,7 +416,7 @@ describe('Piece Patterns IT: expert piece (4 parallel reviewers)', () => { }); it('should complete with all("approved") in 4-parallel review', async () => { - const config = loadPiece('expert', testDir); + const config = loadPiece('dual', testDir); expect(config).not.toBeNull(); setMockScenario([ @@ -422,10 +429,10 @@ describe('Piece Patterns IT: expert piece (4 parallel reviewers)', () => { { persona: 'security-reviewer', status: 'done', content: '[SECURITY-REVIEW:1]\n\napproved' }, { persona: 'qa-reviewer', status: 'done', content: '[QA-REVIEW:1]\n\napproved' }, // Supervisor - { persona: 'expert-supervisor', status: 'done', content: '[SUPERVISE:1]\n\nAll validations pass.' }, + { persona: 'dual-supervisor', status: 'done', content: '[SUPERVISE:1]\n\nAll validations pass.' }, ]); - const engine = createEngine(config!, testDir, 'Expert review task'); + const engine = createEngine(config!, testDir, 'Dual review task'); const state = await engine.run(); expect(state.status).toBe('completed'); diff --git a/src/__tests__/it-pipeline-modes.test.ts b/src/__tests__/it-pipeline-modes.test.ts index 90212d2..86b5201 100644 --- a/src/__tests__/it-pipeline-modes.test.ts +++ b/src/__tests__/it-pipeline-modes.test.ts @@ -280,17 +280,20 @@ describe('Pipeline Modes IT: --task + --piece name (builtin)', () => { rmSync(testDir, { recursive: true, force: true }); }); - it('should load and execute builtin minimal piece by name', async () => { + it('should load and execute builtin default piece by name', async () => { + // Flow: plan → write_tests → implement → ai_review → reviewers(arch-review + supervise) → COMPLETE setMockScenario([ - { persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible.' }, + { persona: 'planner', status: 'done', content: 'Requirements are clear and implementable' }, + { persona: 'coder', status: 'done', content: 'Tests written successfully' }, { persona: 'coder', status: 'done', content: 'Implementation complete' }, { persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues' }, + { persona: 'architecture-reviewer', status: 'done', content: 'approved' }, { persona: 'supervisor', status: 'done', content: 'All checks passed' }, ]); const exitCode = await executePipeline({ task: 'Add a feature', - piece: 'default-mini', + piece: 'default', autoPr: false, skipGit: true, cwd: testDir, diff --git a/src/__tests__/it-pipeline.test.ts b/src/__tests__/it-pipeline.test.ts index dc89c24..7cc5791 100644 --- a/src/__tests__/it-pipeline.test.ts +++ b/src/__tests__/it-pipeline.test.ts @@ -227,19 +227,21 @@ describe('Pipeline Integration Tests', () => { }); it('should complete pipeline with piece name + skip-git + mock scenario', async () => { - // Use builtin 'default-mini' piece + // Use builtin 'default' piece // persona field: extractPersonaName result (from .md filename) - // tag in content: [MOVEMENT_NAME:N] where MOVEMENT_NAME is the movement name uppercased + // Flow: plan → write_tests → implement → ai_review → reviewers(arch-review + supervise) → COMPLETE setMockScenario([ - { persona: 'planner', status: 'done', content: 'Requirements are clear and implementation is possible.' }, + { persona: 'planner', status: 'done', content: 'Requirements are clear and implementable' }, + { persona: 'coder', status: 'done', content: 'Tests written successfully' }, { persona: 'coder', status: 'done', content: 'Implementation complete' }, { persona: 'ai-antipattern-reviewer', status: 'done', content: 'No AI-specific issues' }, + { persona: 'architecture-reviewer', status: 'done', content: 'approved' }, { persona: 'supervisor', status: 'done', content: 'All checks passed' }, ]); const exitCode = await executePipeline({ task: 'Add a hello world function', - piece: 'default-mini', + piece: 'default', autoPr: false, skipGit: true, cwd: testDir, diff --git a/src/__tests__/piece-expert-parallel.test.ts b/src/__tests__/piece-dual-parallel.test.ts similarity index 94% rename from src/__tests__/piece-expert-parallel.test.ts rename to src/__tests__/piece-dual-parallel.test.ts index 5bd4109..47a3aab 100644 --- a/src/__tests__/piece-expert-parallel.test.ts +++ b/src/__tests__/piece-dual-parallel.test.ts @@ -1,8 +1,8 @@ /** - * Tests for expert/expert-cqrs piece parallel review structure. + * Tests for dual/dual-cqrs piece parallel review structure. * * Validates that: - * - expert and expert-cqrs pieces load successfully via loadPiece + * - dual and dual-cqrs pieces load successfully via loadPiece * - The reviewers movement is a parallel movement with expected sub-movements * - ai_review routes to reviewers (not individual review movements) * - fix movement routes back to reviewers @@ -13,12 +13,12 @@ import { describe, it, expect } from 'vitest'; import { loadPiece } from '../infra/config/index.js'; -describe('expert piece parallel structure', () => { - const piece = loadPiece('expert', process.cwd()); +describe('dual piece parallel structure', () => { + const piece = loadPiece('dual', process.cwd()); it('should load successfully', () => { expect(piece).not.toBeNull(); - expect(piece!.name).toBe('expert'); + expect(piece!.name).toBe('dual'); }); it('should have a reviewers parallel movement', () => { @@ -94,12 +94,12 @@ describe('expert piece parallel structure', () => { }); }); -describe('expert-cqrs piece parallel structure', () => { - const piece = loadPiece('expert-cqrs', process.cwd()); +describe('dual-cqrs piece parallel structure', () => { + const piece = loadPiece('dual-cqrs', process.cwd()); it('should load successfully', () => { expect(piece).not.toBeNull(); - expect(piece!.name).toBe('expert-cqrs'); + expect(piece!.name).toBe('dual-cqrs'); }); it('should have a reviewers parallel movement', () => {