takt: refactor-builtin-pieces

This commit is contained in:
nrslib 2026-02-09 10:43:08 +09:00
parent de89882c7f
commit 40b3bb2185
32 changed files with 141 additions and 603 deletions

View File

@ -1,24 +1,6 @@
name: coding name: coding
description: Lightweight development piece with planning and parallel reviews (plan -> implement -> parallel review -> complete) description: Lightweight development piece with planning and parallel reviews (plan -> implement -> parallel review -> complete)
max_iterations: 20 max_iterations: 20
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
knowledge:
architecture: ../knowledge/architecture.md
personas:
planner: ../personas/planner.md
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
architecture-reviewer: ../personas/architecture-reviewer.md
instructions:
plan: ../instructions/plan.md
implement: ../instructions/implement.md
ai-review: ../instructions/ai-review.md
review-arch: ../instructions/review-arch.md
fix: ../instructions/fix.md
initial_movement: plan initial_movement: plan
movements: movements:
- name: plan - name: plan
@ -150,7 +132,3 @@ movements:
- condition: Cannot determine, insufficient information - condition: Cannot determine, insufficient information
next: ABORT next: ABORT
instruction: fix instruction: fix
report_formats:
plan: ../output-contracts/plan.md
ai-review: ../output-contracts/ai-review.md
architecture-review: ../output-contracts/architecture-review.md

View File

@ -1,11 +1,6 @@
name: compound-eye name: compound-eye
description: Multi-model review - send the same instruction to Claude and Codex simultaneously, synthesize both responses description: Multi-model review - send the same instruction to Claude and Codex simultaneously, synthesize both responses
max_iterations: 10 max_iterations: 10
knowledge:
architecture: ../knowledge/architecture.md
personas:
coder: ../personas/coder.md
supervisor: ../personas/supervisor.md
initial_movement: evaluate initial_movement: evaluate
movements: movements:
- name: evaluate - name: evaluate

View File

@ -1,32 +1,6 @@
name: default name: default
description: Standard development piece with planning and specialized reviews description: Standard development piece with planning and specialized reviews
max_iterations: 30 max_iterations: 30
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
qa: ../policies/qa.md
knowledge:
backend: ../knowledge/backend.md
architecture: ../knowledge/architecture.md
personas:
planner: ../personas/planner.md
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
architecture-reviewer: ../personas/architecture-reviewer.md
qa-reviewer: ../personas/qa-reviewer.md
supervisor: ../personas/supervisor.md
instructions:
plan: ../instructions/plan.md
implement: ../instructions/implement.md
ai-review: ../instructions/ai-review.md
ai-fix: ../instructions/ai-fix.md
arbitrate: ../instructions/arbitrate.md
review-arch: ../instructions/review-arch.md
review-qa: ../instructions/review-qa.md
fix: ../instructions/fix.md
supervise: ../instructions/supervise.md
initial_movement: plan initial_movement: plan
loop_monitors: loop_monitors:
- cycle: - cycle:
@ -282,10 +256,3 @@ movements:
report: report:
- Validation: 07-supervisor-validation.md - Validation: 07-supervisor-validation.md
- Summary: summary.md - Summary: summary.md
report_formats:
plan: ../output-contracts/plan.md
ai-review: ../output-contracts/ai-review.md
architecture-review: ../output-contracts/architecture-review.md
qa-review: ../output-contracts/qa-review.md
validation: ../output-contracts/validation.md
summary: ../output-contracts/summary.md

View File

@ -1,41 +1,6 @@
name: expert-cqrs name: expert-cqrs
description: CQRS+ES, Frontend, Security, QA Expert Review description: CQRS+ES, Frontend, Security, QA Expert Review
max_iterations: 30 max_iterations: 30
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
qa: ../policies/qa.md
knowledge:
frontend: ../knowledge/frontend.md
backend: ../knowledge/backend.md
cqrs-es: ../knowledge/cqrs-es.md
security: ../knowledge/security.md
architecture: ../knowledge/architecture.md
personas:
planner: ../personas/planner.md
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
architecture-reviewer: ../personas/architecture-reviewer.md
cqrs-es-reviewer: ../personas/cqrs-es-reviewer.md
frontend-reviewer: ../personas/frontend-reviewer.md
security-reviewer: ../personas/security-reviewer.md
qa-reviewer: ../personas/qa-reviewer.md
expert-supervisor: ../personas/expert-supervisor.md
instructions:
plan: ../instructions/plan.md
implement: ../instructions/implement.md
ai-review: ../instructions/ai-review.md
ai-fix: ../instructions/ai-fix.md
arbitrate: ../instructions/arbitrate.md
review-cqrs-es: ../instructions/review-cqrs-es.md
review-frontend: ../instructions/review-frontend.md
review-security: ../instructions/review-security.md
review-qa: ../instructions/review-qa.md
fix: ../instructions/fix.md
supervise: ../instructions/supervise.md
fix-supervisor: ../instructions/fix-supervisor.md
initial_movement: plan initial_movement: plan
movements: movements:
- name: plan - name: plan
@ -323,12 +288,3 @@ movements:
next: supervise next: supervise
- condition: Unable to proceed with fixes - condition: Unable to proceed with fixes
next: plan next: plan
report_formats:
plan: ../output-contracts/plan.md
ai-review: ../output-contracts/ai-review.md
cqrs-es-review: ../output-contracts/cqrs-es-review.md
frontend-review: ../output-contracts/frontend-review.md
security-review: ../output-contracts/security-review.md
qa-review: ../output-contracts/qa-review.md
validation: ../output-contracts/validation.md
summary: ../output-contracts/summary.md

View File

@ -1,39 +1,6 @@
name: expert name: expert
description: Architecture, Frontend, Security, QA Expert Review description: Architecture, Frontend, Security, QA Expert Review
max_iterations: 30 max_iterations: 30
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
qa: ../policies/qa.md
knowledge:
frontend: ../knowledge/frontend.md
backend: ../knowledge/backend.md
security: ../knowledge/security.md
architecture: ../knowledge/architecture.md
personas:
planner: ../personas/planner.md
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
architecture-reviewer: ../personas/architecture-reviewer.md
frontend-reviewer: ../personas/frontend-reviewer.md
security-reviewer: ../personas/security-reviewer.md
qa-reviewer: ../personas/qa-reviewer.md
expert-supervisor: ../personas/expert-supervisor.md
instructions:
plan: ../instructions/plan.md
implement: ../instructions/implement.md
ai-review: ../instructions/ai-review.md
ai-fix: ../instructions/ai-fix.md
arbitrate: ../instructions/arbitrate.md
review-arch: ../instructions/review-arch.md
review-frontend: ../instructions/review-frontend.md
review-security: ../instructions/review-security.md
review-qa: ../instructions/review-qa.md
fix: ../instructions/fix.md
supervise: ../instructions/supervise.md
fix-supervisor: ../instructions/fix-supervisor.md
initial_movement: plan initial_movement: plan
movements: movements:
- name: plan - name: plan
@ -317,12 +284,3 @@ movements:
next: supervise next: supervise
- condition: Unable to proceed with fixes - condition: Unable to proceed with fixes
next: plan next: plan
report_formats:
plan: ../output-contracts/plan.md
ai-review: ../output-contracts/ai-review.md
architecture-review: ../output-contracts/architecture-review.md
frontend-review: ../output-contracts/frontend-review.md
security-review: ../output-contracts/security-review.md
qa-review: ../output-contracts/qa-review.md
validation: ../output-contracts/validation.md
summary: ../output-contracts/summary.md

View File

@ -1,10 +1,6 @@
name: magi name: magi
description: MAGI Deliberation System - Analyze from 3 perspectives and decide by majority description: MAGI Deliberation System - Analyze from 3 perspectives and decide by majority
max_iterations: 5 max_iterations: 5
personas:
melchior: ../personas/melchior.md
balthasar: ../personas/balthasar.md
casper: ../personas/casper.md
initial_movement: melchior initial_movement: melchior
movements: movements:
- name: melchior - name: melchior

View File

@ -1,21 +1,6 @@
name: minimal name: minimal
description: Minimal development piece (implement -> parallel review -> fix if needed -> complete) description: Minimal development piece (implement -> parallel review -> fix if needed -> complete)
max_iterations: 20 max_iterations: 20
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
personas:
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
supervisor: ../personas/supervisor.md
instructions:
implement: ../instructions/implement.md
review-ai: ../instructions/review-ai.md
ai-fix: ../instructions/ai-fix.md
supervise: ../instructions/supervise.md
fix-supervisor: ../instructions/fix-supervisor.md
initial_movement: implement initial_movement: implement
movements: movements:
- name: implement - name: implement
@ -190,5 +175,3 @@ movements:
- condition: Cannot proceed, insufficient info - condition: Cannot proceed, insufficient info
next: implement next: implement
instruction: fix-supervisor instruction: fix-supervisor
report_formats:
ai-review: ../output-contracts/ai-review.md

View File

@ -1,11 +1,6 @@
name: passthrough name: passthrough
description: Single-agent thin wrapper. Pass task directly to coder as-is. description: Single-agent thin wrapper. Pass task directly to coder as-is.
max_iterations: 10 max_iterations: 10
policies:
coding: ../policies/coding.md
testing: ../policies/testing.md
personas:
coder: ../personas/coder.md
initial_movement: execute initial_movement: execute
movements: movements:
- name: execute - name: execute

View File

@ -1,10 +1,6 @@
name: research name: research
description: Research piece - autonomously executes research without asking questions description: Research piece - autonomously executes research without asking questions
max_iterations: 10 max_iterations: 10
personas:
research-planner: ../personas/research-planner.md
research-digger: ../personas/research-digger.md
research-supervisor: ../personas/research-supervisor.md
initial_movement: plan initial_movement: plan
movements: movements:
- name: plan - name: plan

View File

@ -1,21 +1,6 @@
name: review-fix-minimal name: review-fix-minimal
description: Review and fix piece for existing code (starts with review, no implementation) description: Review and fix piece for existing code (starts with review, no implementation)
max_iterations: 20 max_iterations: 20
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
personas:
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
supervisor: ../personas/supervisor.md
instructions:
implement: ../instructions/implement.md
review-ai: ../instructions/review-ai.md
ai-fix: ../instructions/ai-fix.md
supervise: ../instructions/supervise.md
fix-supervisor: ../instructions/fix-supervisor.md
initial_movement: reviewers initial_movement: reviewers
movements: movements:
- name: implement - name: implement
@ -190,5 +175,3 @@ movements:
- condition: Cannot proceed, insufficient info - condition: Cannot proceed, insufficient info
next: implement next: implement
instruction: fix-supervisor instruction: fix-supervisor
report_formats:
ai-review: ../output-contracts/ai-review.md

View File

@ -1,23 +1,6 @@
name: review-only name: review-only
description: Review-only piece - reviews code without making edits description: Review-only piece - reviews code without making edits
max_iterations: 10 max_iterations: 10
policies:
review: ../policies/review.md
ai-antipattern: ../policies/ai-antipattern.md
knowledge:
architecture: ../knowledge/architecture.md
security: ../knowledge/security.md
personas:
planner: ../personas/planner.md
architecture-reviewer: ../personas/architecture-reviewer.md
security-reviewer: ../personas/security-reviewer.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
supervisor: ../personas/supervisor.md
pr-commenter: ../personas/pr-commenter.md
instructions:
review-arch: ../instructions/review-arch.md
review-security: ../instructions/review-security.md
review-ai: ../instructions/review-ai.md
initial_movement: plan initial_movement: plan
movements: movements:
- name: plan - name: plan
@ -230,8 +213,3 @@ movements:
--- ---
*Generated by [takt](https://github.com/toruticas/takt) review-only piece* *Generated by [takt](https://github.com/toruticas/takt) review-only piece*
``` ```
report_formats:
architecture-review: ../output-contracts/architecture-review.md
security-review: ../output-contracts/security-review.md
ai-review: ../output-contracts/ai-review.md
review-summary: ../output-contracts/review-summary.md

View File

@ -1,25 +1,6 @@
name: structural-reform name: structural-reform
description: Full project review and structural reform - iterative codebase restructuring with staged file splits description: Full project review and structural reform - iterative codebase restructuring with staged file splits
max_iterations: 50 max_iterations: 50
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
qa: ../policies/qa.md
knowledge:
backend: ../knowledge/backend.md
architecture: ../knowledge/architecture.md
personas:
planner: ../personas/planner.md
coder: ../personas/coder.md
architecture-reviewer: ../personas/architecture-reviewer.md
qa-reviewer: ../personas/qa-reviewer.md
supervisor: ../personas/supervisor.md
instructions:
implement: ../instructions/implement.md
review-arch: ../instructions/review-arch.md
review-qa: ../instructions/review-qa.md
fix: ../instructions/fix.md
initial_movement: review initial_movement: review
loop_monitors: loop_monitors:
- cycle: - cycle:
@ -447,9 +428,3 @@ movements:
output_contracts: output_contracts:
report: report:
- name: 07-progress.md - name: 07-progress.md
report_formats:
plan: ../output-contracts/plan.md
architecture-review: ../output-contracts/architecture-review.md
qa-review: ../output-contracts/qa-review.md
validation: ../output-contracts/validation.md
summary: ../output-contracts/summary.md

View File

@ -1,31 +1,6 @@
name: unit-test name: unit-test
description: Unit test focused piece (test analysis → test implementation → review → fix) description: Unit test focused piece (test analysis → test implementation → review → fix)
max_iterations: 20 max_iterations: 20
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
qa: ../policies/qa.md
knowledge:
architecture: ../knowledge/architecture.md
backend: ../knowledge/backend.md
personas:
test-planner: ../personas/test-planner.md
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
architecture-reviewer: ../personas/architecture-reviewer.md
qa-reviewer: ../personas/qa-reviewer.md
supervisor: ../personas/supervisor.md
instructions:
plan-test: ../instructions/plan-test.md
implement-test: ../instructions/implement-test.md
ai-review: ../instructions/ai-review.md
ai-fix: ../instructions/ai-fix.md
arbitrate: ../instructions/arbitrate.md
review-test: ../instructions/review-test.md
fix: ../instructions/fix.md
supervise: ../instructions/supervise.md
initial_movement: plan_test initial_movement: plan_test
loop_monitors: loop_monitors:
- cycle: - cycle:
@ -259,9 +234,3 @@ movements:
report: report:
- Validation: 06-supervisor-validation.md - Validation: 06-supervisor-validation.md
- Summary: summary.md - Summary: summary.md
report_formats:
test-plan: ../output-contracts/test-plan.md
ai-review: ../output-contracts/ai-review.md
qa-review: ../output-contracts/qa-review.md
validation: ../output-contracts/validation.md
summary: ../output-contracts/summary.md

View File

@ -1,24 +1,6 @@
name: coding name: coding
description: Lightweight development piece with planning and parallel reviews (plan -> implement -> parallel review -> complete) description: Lightweight development piece with planning and parallel reviews (plan -> implement -> parallel review -> complete)
max_iterations: 20 max_iterations: 20
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
knowledge:
architecture: ../knowledge/architecture.md
personas:
planner: ../personas/planner.md
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
architecture-reviewer: ../personas/architecture-reviewer.md
instructions:
plan: ../instructions/plan.md
implement: ../instructions/implement.md
ai-review: ../instructions/ai-review.md
review-arch: ../instructions/review-arch.md
fix: ../instructions/fix.md
initial_movement: plan initial_movement: plan
movements: movements:
- name: plan - name: plan
@ -150,7 +132,3 @@ movements:
- condition: 判断できない、情報不足 - condition: 判断できない、情報不足
next: ABORT next: ABORT
instruction: fix instruction: fix
report_formats:
plan: ../output-contracts/plan.md
ai-review: ../output-contracts/ai-review.md
architecture-review: ../output-contracts/architecture-review.md

View File

@ -1,11 +1,6 @@
name: compound-eye name: compound-eye
description: 複眼レビュー - 同じ指示を Claude と Codex に同時に投げ、両者の回答を統合する description: 複眼レビュー - 同じ指示を Claude と Codex に同時に投げ、両者の回答を統合する
max_iterations: 10 max_iterations: 10
knowledge:
architecture: ../knowledge/architecture.md
personas:
coder: ../personas/coder.md
supervisor: ../personas/supervisor.md
initial_movement: evaluate initial_movement: evaluate
movements: movements:

View File

@ -1,32 +1,6 @@
name: default name: default
description: Standard development piece with planning and specialized reviews description: Standard development piece with planning and specialized reviews
max_iterations: 30 max_iterations: 30
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
qa: ../policies/qa.md
knowledge:
architecture: ../knowledge/architecture.md
backend: ../knowledge/backend.md
personas:
planner: ../personas/planner.md
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
architecture-reviewer: ../personas/architecture-reviewer.md
qa-reviewer: ../personas/qa-reviewer.md
supervisor: ../personas/supervisor.md
instructions:
plan: ../instructions/plan.md
implement: ../instructions/implement.md
ai-review: ../instructions/ai-review.md
ai-fix: ../instructions/ai-fix.md
arbitrate: ../instructions/arbitrate.md
review-arch: ../instructions/review-arch.md
review-qa: ../instructions/review-qa.md
fix: ../instructions/fix.md
supervise: ../instructions/supervise.md
initial_movement: plan initial_movement: plan
loop_monitors: loop_monitors:
- cycle: - cycle:
@ -282,10 +256,3 @@ movements:
report: report:
- Validation: 07-supervisor-validation.md - Validation: 07-supervisor-validation.md
- Summary: summary.md - Summary: summary.md
report_formats:
plan: ../output-contracts/plan.md
ai-review: ../output-contracts/ai-review.md
architecture-review: ../output-contracts/architecture-review.md
qa-review: ../output-contracts/qa-review.md
validation: ../output-contracts/validation.md
summary: ../output-contracts/summary.md

View File

@ -1,41 +1,6 @@
name: expert-cqrs name: expert-cqrs
description: CQRS+ES・フロントエンド・セキュリティ・QA専門家レビュー description: CQRS+ES・フロントエンド・セキュリティ・QA専門家レビュー
max_iterations: 30 max_iterations: 30
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
qa: ../policies/qa.md
knowledge:
frontend: ../knowledge/frontend.md
backend: ../knowledge/backend.md
cqrs-es: ../knowledge/cqrs-es.md
security: ../knowledge/security.md
architecture: ../knowledge/architecture.md
personas:
planner: ../personas/planner.md
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
architecture-reviewer: ../personas/architecture-reviewer.md
cqrs-es-reviewer: ../personas/cqrs-es-reviewer.md
frontend-reviewer: ../personas/frontend-reviewer.md
security-reviewer: ../personas/security-reviewer.md
qa-reviewer: ../personas/qa-reviewer.md
expert-supervisor: ../personas/expert-supervisor.md
instructions:
plan: ../instructions/plan.md
implement: ../instructions/implement.md
ai-review: ../instructions/ai-review.md
ai-fix: ../instructions/ai-fix.md
arbitrate: ../instructions/arbitrate.md
review-cqrs-es: ../instructions/review-cqrs-es.md
review-frontend: ../instructions/review-frontend.md
review-security: ../instructions/review-security.md
review-qa: ../instructions/review-qa.md
fix: ../instructions/fix.md
supervise: ../instructions/supervise.md
fix-supervisor: ../instructions/fix-supervisor.md
initial_movement: plan initial_movement: plan
movements: movements:
- name: plan - name: plan
@ -323,12 +288,3 @@ movements:
next: supervise next: supervise
- condition: 修正を進行できない - condition: 修正を進行できない
next: plan next: plan
report_formats:
plan: ../output-contracts/plan.md
ai-review: ../output-contracts/ai-review.md
cqrs-es-review: ../output-contracts/cqrs-es-review.md
frontend-review: ../output-contracts/frontend-review.md
security-review: ../output-contracts/security-review.md
qa-review: ../output-contracts/qa-review.md
validation: ../output-contracts/validation.md
summary: ../output-contracts/summary.md

View File

@ -1,39 +1,6 @@
name: expert name: expert
description: アーキテクチャ・フロントエンド・セキュリティ・QA専門家レビュー description: アーキテクチャ・フロントエンド・セキュリティ・QA専門家レビュー
max_iterations: 30 max_iterations: 30
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
qa: ../policies/qa.md
knowledge:
frontend: ../knowledge/frontend.md
backend: ../knowledge/backend.md
security: ../knowledge/security.md
architecture: ../knowledge/architecture.md
personas:
planner: ../personas/planner.md
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
architecture-reviewer: ../personas/architecture-reviewer.md
frontend-reviewer: ../personas/frontend-reviewer.md
security-reviewer: ../personas/security-reviewer.md
qa-reviewer: ../personas/qa-reviewer.md
expert-supervisor: ../personas/expert-supervisor.md
instructions:
plan: ../instructions/plan.md
implement: ../instructions/implement.md
ai-review: ../instructions/ai-review.md
ai-fix: ../instructions/ai-fix.md
arbitrate: ../instructions/arbitrate.md
review-arch: ../instructions/review-arch.md
review-frontend: ../instructions/review-frontend.md
review-security: ../instructions/review-security.md
review-qa: ../instructions/review-qa.md
fix: ../instructions/fix.md
supervise: ../instructions/supervise.md
fix-supervisor: ../instructions/fix-supervisor.md
initial_movement: plan initial_movement: plan
movements: movements:
- name: plan - name: plan
@ -317,12 +284,3 @@ movements:
next: supervise next: supervise
- condition: 修正を進行できない - condition: 修正を進行できない
next: plan next: plan
report_formats:
plan: ../output-contracts/plan.md
ai-review: ../output-contracts/ai-review.md
architecture-review: ../output-contracts/architecture-review.md
frontend-review: ../output-contracts/frontend-review.md
security-review: ../output-contracts/security-review.md
qa-review: ../output-contracts/qa-review.md
validation: ../output-contracts/validation.md
summary: ../output-contracts/summary.md

View File

@ -1,10 +1,6 @@
name: magi name: magi
description: MAGI合議システム - 3つの観点から分析し多数決で判定 description: MAGI合議システム - 3つの観点から分析し多数決で判定
max_iterations: 5 max_iterations: 5
personas:
melchior: ../personas/melchior.md
balthasar: ../personas/balthasar.md
casper: ../personas/casper.md
initial_movement: melchior initial_movement: melchior
movements: movements:
- name: melchior - name: melchior

View File

@ -1,21 +1,6 @@
name: minimal name: minimal
description: Minimal development piece (implement -> parallel review -> fix if needed -> complete) description: Minimal development piece (implement -> parallel review -> fix if needed -> complete)
max_iterations: 20 max_iterations: 20
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
personas:
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
supervisor: ../personas/supervisor.md
instructions:
implement: ../instructions/implement.md
review-ai: ../instructions/review-ai.md
ai-fix: ../instructions/ai-fix.md
supervise: ../instructions/supervise.md
fix-supervisor: ../instructions/fix-supervisor.md
initial_movement: implement initial_movement: implement
movements: movements:
- name: implement - name: implement
@ -190,5 +175,3 @@ movements:
- condition: 修正を進行できない - condition: 修正を進行できない
next: implement next: implement
instruction: fix-supervisor instruction: fix-supervisor
report_formats:
ai-review: ../output-contracts/ai-review.md

View File

@ -1,11 +1,6 @@
name: passthrough name: passthrough
description: Single-agent thin wrapper. Pass task directly to coder as-is. description: Single-agent thin wrapper. Pass task directly to coder as-is.
max_iterations: 10 max_iterations: 10
policies:
coding: ../policies/coding.md
testing: ../policies/testing.md
personas:
coder: ../personas/coder.md
initial_movement: execute initial_movement: execute
movements: movements:
- name: execute - name: execute

View File

@ -1,10 +1,6 @@
name: research name: research
description: 調査ピース - 質問せずに自律的に調査を実行 description: 調査ピース - 質問せずに自律的に調査を実行
max_iterations: 10 max_iterations: 10
personas:
research-planner: ../personas/research-planner.md
research-digger: ../personas/research-digger.md
research-supervisor: ../personas/research-supervisor.md
initial_movement: plan initial_movement: plan
movements: movements:
- name: plan - name: plan

View File

@ -1,21 +1,6 @@
name: review-fix-minimal name: review-fix-minimal
description: 既存コードのレビューと修正ピース(レビュー開始、実装なし) description: 既存コードのレビューと修正ピース(レビュー開始、実装なし)
max_iterations: 20 max_iterations: 20
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
personas:
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
supervisor: ../personas/supervisor.md
instructions:
implement: ../instructions/implement.md
review-ai: ../instructions/review-ai.md
ai-fix: ../instructions/ai-fix.md
supervise: ../instructions/supervise.md
fix-supervisor: ../instructions/fix-supervisor.md
initial_movement: reviewers initial_movement: reviewers
movements: movements:
- name: implement - name: implement
@ -190,5 +175,3 @@ movements:
- condition: 修正を進行できない - condition: 修正を進行できない
next: implement next: implement
instruction: fix-supervisor instruction: fix-supervisor
report_formats:
ai-review: ../output-contracts/ai-review.md

View File

@ -1,23 +1,6 @@
name: review-only name: review-only
description: レビュー専用ピース - コードをレビューするだけで編集は行わない description: レビュー専用ピース - コードをレビューするだけで編集は行わない
max_iterations: 10 max_iterations: 10
policies:
review: ../policies/review.md
ai-antipattern: ../policies/ai-antipattern.md
knowledge:
architecture: ../knowledge/architecture.md
security: ../knowledge/security.md
personas:
planner: ../personas/planner.md
architecture-reviewer: ../personas/architecture-reviewer.md
security-reviewer: ../personas/security-reviewer.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
supervisor: ../personas/supervisor.md
pr-commenter: ../personas/pr-commenter.md
instructions:
review-arch: ../instructions/review-arch.md
review-security: ../instructions/review-security.md
review-ai: ../instructions/review-ai.md
initial_movement: plan initial_movement: plan
movements: movements:
- name: plan - name: plan
@ -231,8 +214,3 @@ movements:
--- ---
*[takt](https://github.com/toruticas/takt) review-only ピースで生成* *[takt](https://github.com/toruticas/takt) review-only ピースで生成*
``` ```
report_formats:
architecture-review: ../output-contracts/architecture-review.md
security-review: ../output-contracts/security-review.md
ai-review: ../output-contracts/ai-review.md
review-summary: ../output-contracts/review-summary.md

View File

@ -1,25 +1,6 @@
name: structural-reform name: structural-reform
description: プロジェクト全体レビューと構造改革 - 段階的なファイル分割による反復的コードベース再構築 description: プロジェクト全体レビューと構造改革 - 段階的なファイル分割による反復的コードベース再構築
max_iterations: 50 max_iterations: 50
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
qa: ../policies/qa.md
knowledge:
backend: ../knowledge/backend.md
architecture: ../knowledge/architecture.md
personas:
planner: ../personas/planner.md
coder: ../personas/coder.md
architecture-reviewer: ../personas/architecture-reviewer.md
qa-reviewer: ../personas/qa-reviewer.md
supervisor: ../personas/supervisor.md
instructions:
implement: ../instructions/implement.md
review-arch: ../instructions/review-arch.md
review-qa: ../instructions/review-qa.md
fix: ../instructions/fix.md
initial_movement: review initial_movement: review
loop_monitors: loop_monitors:
- cycle: - cycle:
@ -447,9 +428,3 @@ movements:
output_contracts: output_contracts:
report: report:
- name: 07-progress.md - name: 07-progress.md
report_formats:
plan: ../output-contracts/plan.md
architecture-review: ../output-contracts/architecture-review.md
qa-review: ../output-contracts/qa-review.md
validation: ../output-contracts/validation.md
summary: ../output-contracts/summary.md

View File

@ -1,31 +1,6 @@
name: unit-test name: unit-test
description: 単体テスト追加に特化したピース(テスト分析→テスト実装→レビュー→修正) description: 単体テスト追加に特化したピース(テスト分析→テスト実装→レビュー→修正)
max_iterations: 20 max_iterations: 20
policies:
coding: ../policies/coding.md
review: ../policies/review.md
testing: ../policies/testing.md
ai-antipattern: ../policies/ai-antipattern.md
qa: ../policies/qa.md
knowledge:
architecture: ../knowledge/architecture.md
backend: ../knowledge/backend.md
personas:
test-planner: ../personas/test-planner.md
coder: ../personas/coder.md
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
architecture-reviewer: ../personas/architecture-reviewer.md
qa-reviewer: ../personas/qa-reviewer.md
supervisor: ../personas/supervisor.md
instructions:
plan-test: ../instructions/plan-test.md
implement-test: ../instructions/implement-test.md
ai-review: ../instructions/ai-review.md
ai-fix: ../instructions/ai-fix.md
arbitrate: ../instructions/arbitrate.md
review-test: ../instructions/review-test.md
fix: ../instructions/fix.md
supervise: ../instructions/supervise.md
initial_movement: plan_test initial_movement: plan_test
loop_monitors: loop_monitors:
- cycle: - cycle:
@ -259,9 +234,3 @@ movements:
report: report:
- Validation: 06-supervisor-validation.md - Validation: 06-supervisor-validation.md
- Summary: summary.md - Summary: summary.md
report_formats:
test-plan: ../output-contracts/test-plan.md
ai-review: ../output-contracts/ai-review.md
qa-review: ../output-contracts/qa-review.md
validation: ../output-contracts/validation.md
summary: ../output-contracts/summary.md

View File

@ -327,52 +327,33 @@ Faceted Promptingの中核メカニズムは**宣言的な合成**である。
### TAKTでの実装例 ### TAKTでの実装例
[TAKT](https://github.com/nrslib/takt) はFaceted PromptingをYAMLベースのワークフロー定義「ピース」と呼ぶで実装している。各関心はセクションマップで短いキーにマッピングされ、各ステップTAKTでは「ムーブメント」と呼ぶからキーで参照される [TAKT](https://github.com/nrslib/takt) はFaceted PromptingをYAMLベースのワークフロー定義「ピース」と呼ぶで実装している。builtinの各ファセットは、各ステップTAKTでは「ムーブメント」と呼ぶから bare name で直接参照できる。セクションマップは「名前とファイル名が異なる」場合のカスタムエイリアス用途でのみ任意で使う
```yaml ```yaml
name: my-workflow name: my-workflow
max_iterations: 10 max_iterations: 10
initial_movement: plan initial_movement: plan
# セクションマップ — キー: ファイルパスこのYAMLからの相対パス
personas:
coder: ../personas/coder.md
reviewer: ../personas/architecture-reviewer.md
policies:
coding: ../policies/coding.md
review: ../policies/review.md
instructions:
plan: ../instructions/plan.md
implement: ../instructions/implement.md
knowledge:
architecture: ../knowledge/architecture.md
report_formats:
review: ../output-contracts/review.md
movements: movements:
- name: implement - name: implement
persona: coder # WHO — personas.coder を参照 persona: coder # WHO — builtins/{lang}/personas/coder.md
policy: coding # RULES — policies.coding を参照 policy: coding # RULES — builtins/{lang}/policies/coding.md
instruction: implement # WHAT — instructions.implement を参照 instruction: implement # WHAT — builtins/{lang}/instructions/implement.md
knowledge: architecture # CONTEXT — knowledge.architecture を参照 knowledge: architecture # CONTEXT — builtins/{lang}/knowledge/architecture.md
edit: true edit: true
rules: rules:
- condition: Implementation complete - condition: Implementation complete
next: review next: review
- name: review - name: review
persona: reviewer # 異なる WHO persona: architecture-reviewer # 異なる WHO
policy: review # 異なる RULES policy: review # 異なる RULES
instruction: review # 異なる WHAT共有も可能 instruction: review # 異なる WHAT共有も可能
knowledge: architecture # 同じ CONTEXT — 再利用 knowledge: architecture # 同じ CONTEXT — 再利用
output_contracts: output_contracts:
report: report:
- name: review.md - name: review.md
format: review # OUTPUT — report_formats.review を参照 format: architecture-review # OUTPUT — builtins/{lang}/output-contracts/architecture-review.md
edit: false edit: false
rules: rules:
- condition: Approved - condition: Approved

View File

@ -327,52 +327,33 @@ Key properties:
### Implementation Example: TAKT ### Implementation Example: TAKT
[TAKT](https://github.com/nrslib/takt) implements Faceted Prompting using YAML-based workflow definitions called "pieces." Concerns are mapped to short keys via section maps, then referenced by key in each step (called "movement" in TAKT): [TAKT](https://github.com/nrslib/takt) implements Faceted Prompting using YAML-based workflow definitions called "pieces." Builtin facets can be referenced directly by bare name in each step (called "movement" in TAKT). Section maps are optional and only needed for custom aliases (name differs from file name):
```yaml ```yaml
name: my-workflow name: my-workflow
max_iterations: 10 max_iterations: 10
initial_movement: plan initial_movement: plan
# Section maps — key: file path (relative to this YAML)
personas:
coder: ../personas/coder.md
reviewer: ../personas/architecture-reviewer.md
policies:
coding: ../policies/coding.md
review: ../policies/review.md
instructions:
plan: ../instructions/plan.md
implement: ../instructions/implement.md
knowledge:
architecture: ../knowledge/architecture.md
output_contracts:
review: ../output-contracts/review.md
movements: movements:
- name: implement - name: implement
persona: coder # WHO — references personas.coder persona: coder # WHO — builtins/{lang}/personas/coder.md
policy: coding # RULES — references policies.coding policy: coding # RULES — builtins/{lang}/policies/coding.md
instruction: implement # WHAT — references instructions.implement instruction: implement # WHAT — builtins/{lang}/instructions/implement.md
knowledge: architecture # CONTEXT — references knowledge.architecture knowledge: architecture # CONTEXT — builtins/{lang}/knowledge/architecture.md
edit: true edit: true
rules: rules:
- condition: Implementation complete - condition: Implementation complete
next: review next: review
- name: review - name: review
persona: reviewer # Different WHO persona: architecture-reviewer # Different WHO
policy: review # Different RULES policy: review # Different RULES
instruction: review # Different WHAT (but could share) instruction: review # Different WHAT (but could share)
knowledge: architecture # Same CONTEXT — reused knowledge: architecture # Same CONTEXT — reused
output_contracts: output_contracts:
report: report:
- name: review.md - name: review.md
format: review # OUTPUT — references report_formats.review format: architecture-review # OUTPUT — builtins/{lang}/output-contracts/architecture-review.md
edit: false edit: false
rules: rules:
- condition: Approved - condition: Approved

View File

@ -44,6 +44,15 @@ describe('getBuiltinPiece', () => {
expect(piece!.name).toBe('default'); expect(piece!.name).toBe('default');
}); });
it('should resolve builtin instruction_template without projectCwd', () => {
const piece = getBuiltinPiece('default');
expect(piece).not.toBeNull();
const planMovement = piece!.movements.find((movement) => movement.name === 'plan');
expect(planMovement).toBeDefined();
expect(planMovement!.instructionTemplate).not.toBe('plan');
});
it('should return null for non-existent piece names', () => { it('should return null for non-existent piece names', () => {
expect(getBuiltinPiece('nonexistent-piece')).toBeNull(); expect(getBuiltinPiece('nonexistent-piece')).toBeNull();
expect(getBuiltinPiece('unknown')).toBeNull(); expect(getBuiltinPiece('unknown')).toBeNull();

View File

@ -508,4 +508,110 @@ describe('normalizePieceConfig with layer resolution', () => {
expect(config.movements[0]!.knowledgeContents).toBeDefined(); expect(config.movements[0]!.knowledgeContents).toBeDefined();
expect(config.movements[0]!.knowledgeContents![0]).toBe('# Domain Knowledge'); expect(config.movements[0]!.knowledgeContents![0]).toBe('# Domain Knowledge');
}); });
it('should resolve instruction_template from section map before layer resolution', () => {
const raw = {
name: 'test-piece',
instructions: {
implement: 'Mapped instruction template',
},
movements: [
{
name: 'step1',
persona: 'coder',
instruction_template: 'implement',
instruction: '{task}',
},
],
};
const context: FacetResolutionContext = { projectDir, lang: 'ja' };
const config = normalizePieceConfig(raw, pieceDir, context);
expect(config.movements[0]!.instructionTemplate).toBe('Mapped instruction template');
});
it('should resolve instruction_template by name via layer resolution', () => {
const instructionsDir = join(projectDir, '.takt', 'instructions');
mkdirSync(instructionsDir, { recursive: true });
writeFileSync(join(instructionsDir, 'implement.md'), 'Project implement template');
const raw = {
name: 'test-piece',
movements: [
{
name: 'step1',
persona: 'coder',
instruction_template: 'implement',
instruction: '{task}',
},
],
};
const context: FacetResolutionContext = { projectDir, lang: 'ja' };
const config = normalizePieceConfig(raw, pieceDir, context);
expect(config.movements[0]!.instructionTemplate).toBe('Project implement template');
});
it('should keep inline instruction_template when no facet is found', () => {
const inlineTemplate = `Use this inline template.
Second line remains inline.`;
const raw = {
name: 'test-piece',
movements: [
{
name: 'step1',
persona: 'coder',
instruction_template: inlineTemplate,
instruction: '{task}',
},
],
};
const context: FacetResolutionContext = { projectDir, lang: 'ja' };
const config = normalizePieceConfig(raw, pieceDir, context);
expect(config.movements[0]!.instructionTemplate).toBe(inlineTemplate);
});
it('should resolve loop monitor judge instruction_template via layer resolution', () => {
const instructionsDir = join(projectDir, '.takt', 'instructions');
mkdirSync(instructionsDir, { recursive: true });
writeFileSync(join(instructionsDir, 'judge-template.md'), 'Project judge template');
const raw = {
name: 'test-piece',
movements: [
{
name: 'step1',
persona: 'coder',
instruction: '{task}',
rules: [{ condition: 'next', next: 'step2' }],
},
{
name: 'step2',
persona: 'coder',
instruction: '{task}',
rules: [{ condition: 'done', next: 'COMPLETE' }],
},
],
loop_monitors: [
{
cycle: ['step1', 'step2'],
threshold: 2,
judge: {
persona: 'coder',
instruction_template: 'judge-template',
rules: [{ condition: 'continue', next: 'step2' }],
},
},
],
};
const context: FacetResolutionContext = { projectDir, lang: 'ja' };
const config = normalizePieceConfig(raw, pieceDir, context);
expect(config.loopMonitors?.[0]?.judge.instructionTemplate).toBe('Project judge template');
});
}); });

View File

@ -15,7 +15,6 @@ import { getLanguage } from '../global/globalConfig.js';
import { import {
type PieceSections, type PieceSections,
type FacetResolutionContext, type FacetResolutionContext,
resolveResourceContent,
resolveRefToContent, resolveRefToContent,
resolveRefList, resolveRefList,
resolveSectionMap, resolveSectionMap,
@ -189,7 +188,9 @@ function normalizeStepFromRaw(
model: step.model, model: step.model,
permissionMode: step.permission_mode, permissionMode: step.permission_mode,
edit: step.edit, edit: step.edit,
instructionTemplate: resolveResourceContent(step.instruction_template, pieceDir) || expandedInstruction || '{task}', instructionTemplate: (step.instruction_template
? resolveRefToContent(step.instruction_template, sections.resolvedInstructions, pieceDir, 'instructions', context)
: undefined) || expandedInstruction || '{task}',
rules, rules,
outputContracts: normalizeOutputContracts(step.output_contracts, pieceDir, sections.resolvedReportFormats, context), outputContracts: normalizeOutputContracts(step.output_contracts, pieceDir, sections.resolvedReportFormats, context),
qualityGates: step.quality_gates, qualityGates: step.quality_gates,
@ -217,7 +218,9 @@ function normalizeLoopMonitorJudge(
return { return {
persona: personaSpec, persona: personaSpec,
personaPath, personaPath,
instructionTemplate: resolveResourceContent(raw.instruction_template, pieceDir), instructionTemplate: raw.instruction_template
? resolveRefToContent(raw.instruction_template, sections.resolvedInstructions, pieceDir, 'instructions', context)
: undefined,
rules: raw.rules.map((r) => ({ condition: r.condition, next: r.next })), rules: raw.rules.map((r) => ({ condition: r.condition, next: r.next })),
}; };
} }
@ -297,10 +300,10 @@ export function loadPieceFromFile(filePath: string, projectDir?: string): PieceC
const raw = parseYaml(content); const raw = parseYaml(content);
const pieceDir = dirname(filePath); const pieceDir = dirname(filePath);
let context: FacetResolutionContext | undefined; const context: FacetResolutionContext = {
if (projectDir) { lang: getLanguage(),
context = { projectDir, lang: getLanguage() }; projectDir,
} };
return normalizePieceConfig(raw, pieceDir, context); return normalizePieceConfig(raw, pieceDir, context);
} }

View File

@ -15,7 +15,7 @@ import { getProjectFacetDir, getGlobalFacetDir, getBuiltinFacetDir } from '../pa
/** Context for 3-layer facet resolution. */ /** Context for 3-layer facet resolution. */
export interface FacetResolutionContext { export interface FacetResolutionContext {
projectDir: string; projectDir?: string;
lang: Language; lang: Language;
} }
@ -63,7 +63,7 @@ export function resolveFacetPath(
context: FacetResolutionContext, context: FacetResolutionContext,
): string | undefined { ): string | undefined {
const candidateDirs = [ const candidateDirs = [
getProjectFacetDir(context.projectDir, facetType), ...(context.projectDir ? [getProjectFacetDir(context.projectDir, facetType)] : []),
getGlobalFacetDir(facetType), getGlobalFacetDir(facetType),
getBuiltinFacetDir(context.lang, facetType), getBuiltinFacetDir(context.lang, facetType),
]; ];