Merge pull request #177 from nrslib/takt/#152/simplify-builtin-piece-refs
refactor-builtin-pieces
This commit is contained in:
commit
b561431cb5
@ -1,24 +1,6 @@
|
||||
name: coding
|
||||
description: Lightweight development piece with planning and parallel reviews (plan -> implement -> parallel review -> complete)
|
||||
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
|
||||
movements:
|
||||
- name: plan
|
||||
@ -150,7 +132,3 @@ movements:
|
||||
- condition: Cannot determine, insufficient information
|
||||
next: ABORT
|
||||
instruction: fix
|
||||
report_formats:
|
||||
plan: ../output-contracts/plan.md
|
||||
ai-review: ../output-contracts/ai-review.md
|
||||
architecture-review: ../output-contracts/architecture-review.md
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
name: compound-eye
|
||||
description: Multi-model review - send the same instruction to Claude and Codex simultaneously, synthesize both responses
|
||||
max_iterations: 10
|
||||
knowledge:
|
||||
architecture: ../knowledge/architecture.md
|
||||
personas:
|
||||
coder: ../personas/coder.md
|
||||
supervisor: ../personas/supervisor.md
|
||||
initial_movement: evaluate
|
||||
movements:
|
||||
- name: evaluate
|
||||
|
||||
@ -1,32 +1,6 @@
|
||||
name: default
|
||||
description: Standard development piece with planning and specialized reviews
|
||||
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
|
||||
loop_monitors:
|
||||
- cycle:
|
||||
@ -282,10 +256,3 @@ movements:
|
||||
report:
|
||||
- Validation: 07-supervisor-validation.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
|
||||
|
||||
@ -1,41 +1,6 @@
|
||||
name: expert-cqrs
|
||||
description: CQRS+ES, Frontend, Security, QA Expert Review
|
||||
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
|
||||
movements:
|
||||
- name: plan
|
||||
@ -323,12 +288,3 @@ movements:
|
||||
next: supervise
|
||||
- condition: Unable to proceed with fixes
|
||||
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
|
||||
|
||||
@ -1,39 +1,6 @@
|
||||
name: expert
|
||||
description: Architecture, Frontend, Security, QA Expert Review
|
||||
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
|
||||
movements:
|
||||
- name: plan
|
||||
@ -317,12 +284,3 @@ movements:
|
||||
next: supervise
|
||||
- condition: Unable to proceed with fixes
|
||||
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
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
name: magi
|
||||
description: MAGI Deliberation System - Analyze from 3 perspectives and decide by majority
|
||||
max_iterations: 5
|
||||
personas:
|
||||
melchior: ../personas/melchior.md
|
||||
balthasar: ../personas/balthasar.md
|
||||
casper: ../personas/casper.md
|
||||
initial_movement: melchior
|
||||
movements:
|
||||
- name: melchior
|
||||
|
||||
@ -1,21 +1,6 @@
|
||||
name: minimal
|
||||
description: Minimal development piece (implement -> parallel review -> fix if needed -> complete)
|
||||
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
|
||||
movements:
|
||||
- name: implement
|
||||
@ -190,5 +175,3 @@ movements:
|
||||
- condition: Cannot proceed, insufficient info
|
||||
next: implement
|
||||
instruction: fix-supervisor
|
||||
report_formats:
|
||||
ai-review: ../output-contracts/ai-review.md
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
name: passthrough
|
||||
description: Single-agent thin wrapper. Pass task directly to coder as-is.
|
||||
max_iterations: 10
|
||||
policies:
|
||||
coding: ../policies/coding.md
|
||||
testing: ../policies/testing.md
|
||||
personas:
|
||||
coder: ../personas/coder.md
|
||||
initial_movement: execute
|
||||
movements:
|
||||
- name: execute
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
name: research
|
||||
description: Research piece - autonomously executes research without asking questions
|
||||
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
|
||||
movements:
|
||||
- name: plan
|
||||
|
||||
@ -1,21 +1,6 @@
|
||||
name: review-fix-minimal
|
||||
description: Review and fix piece for existing code (starts with review, no implementation)
|
||||
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
|
||||
movements:
|
||||
- name: implement
|
||||
@ -190,5 +175,3 @@ movements:
|
||||
- condition: Cannot proceed, insufficient info
|
||||
next: implement
|
||||
instruction: fix-supervisor
|
||||
report_formats:
|
||||
ai-review: ../output-contracts/ai-review.md
|
||||
|
||||
@ -1,23 +1,6 @@
|
||||
name: review-only
|
||||
description: Review-only piece - reviews code without making edits
|
||||
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
|
||||
movements:
|
||||
- name: plan
|
||||
@ -230,8 +213,3 @@ movements:
|
||||
---
|
||||
*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
|
||||
|
||||
@ -1,25 +1,6 @@
|
||||
name: structural-reform
|
||||
description: Full project review and structural reform - iterative codebase restructuring with staged file splits
|
||||
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
|
||||
loop_monitors:
|
||||
- cycle:
|
||||
@ -447,9 +428,3 @@ movements:
|
||||
output_contracts:
|
||||
report:
|
||||
- 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
|
||||
|
||||
@ -1,31 +1,6 @@
|
||||
name: unit-test
|
||||
description: Unit test focused piece (test analysis → test implementation → review → fix)
|
||||
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
|
||||
loop_monitors:
|
||||
- cycle:
|
||||
@ -259,9 +234,3 @@ movements:
|
||||
report:
|
||||
- Validation: 06-supervisor-validation.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
|
||||
|
||||
@ -1,24 +1,6 @@
|
||||
name: coding
|
||||
description: Lightweight development piece with planning and parallel reviews (plan -> implement -> parallel review -> complete)
|
||||
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
|
||||
movements:
|
||||
- name: plan
|
||||
@ -150,7 +132,3 @@ movements:
|
||||
- condition: 判断できない、情報不足
|
||||
next: ABORT
|
||||
instruction: fix
|
||||
report_formats:
|
||||
plan: ../output-contracts/plan.md
|
||||
ai-review: ../output-contracts/ai-review.md
|
||||
architecture-review: ../output-contracts/architecture-review.md
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
name: compound-eye
|
||||
description: 複眼レビュー - 同じ指示を Claude と Codex に同時に投げ、両者の回答を統合する
|
||||
max_iterations: 10
|
||||
knowledge:
|
||||
architecture: ../knowledge/architecture.md
|
||||
personas:
|
||||
coder: ../personas/coder.md
|
||||
supervisor: ../personas/supervisor.md
|
||||
initial_movement: evaluate
|
||||
|
||||
movements:
|
||||
|
||||
@ -1,32 +1,6 @@
|
||||
name: default
|
||||
description: Standard development piece with planning and specialized reviews
|
||||
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
|
||||
loop_monitors:
|
||||
- cycle:
|
||||
@ -282,10 +256,3 @@ movements:
|
||||
report:
|
||||
- Validation: 07-supervisor-validation.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
|
||||
|
||||
@ -1,41 +1,6 @@
|
||||
name: expert-cqrs
|
||||
description: CQRS+ES・フロントエンド・セキュリティ・QA専門家レビュー
|
||||
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
|
||||
movements:
|
||||
- name: plan
|
||||
@ -323,12 +288,3 @@ movements:
|
||||
next: supervise
|
||||
- condition: 修正を進行できない
|
||||
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
|
||||
|
||||
@ -1,39 +1,6 @@
|
||||
name: expert
|
||||
description: アーキテクチャ・フロントエンド・セキュリティ・QA専門家レビュー
|
||||
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
|
||||
movements:
|
||||
- name: plan
|
||||
@ -317,12 +284,3 @@ movements:
|
||||
next: supervise
|
||||
- condition: 修正を進行できない
|
||||
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
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
name: magi
|
||||
description: MAGI合議システム - 3つの観点から分析し多数決で判定
|
||||
max_iterations: 5
|
||||
personas:
|
||||
melchior: ../personas/melchior.md
|
||||
balthasar: ../personas/balthasar.md
|
||||
casper: ../personas/casper.md
|
||||
initial_movement: melchior
|
||||
movements:
|
||||
- name: melchior
|
||||
|
||||
@ -1,21 +1,6 @@
|
||||
name: minimal
|
||||
description: Minimal development piece (implement -> parallel review -> fix if needed -> complete)
|
||||
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
|
||||
movements:
|
||||
- name: implement
|
||||
@ -190,5 +175,3 @@ movements:
|
||||
- condition: 修正を進行できない
|
||||
next: implement
|
||||
instruction: fix-supervisor
|
||||
report_formats:
|
||||
ai-review: ../output-contracts/ai-review.md
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
name: passthrough
|
||||
description: Single-agent thin wrapper. Pass task directly to coder as-is.
|
||||
max_iterations: 10
|
||||
policies:
|
||||
coding: ../policies/coding.md
|
||||
testing: ../policies/testing.md
|
||||
personas:
|
||||
coder: ../personas/coder.md
|
||||
initial_movement: execute
|
||||
movements:
|
||||
- name: execute
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
name: research
|
||||
description: 調査ピース - 質問せずに自律的に調査を実行
|
||||
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
|
||||
movements:
|
||||
- name: plan
|
||||
|
||||
@ -1,21 +1,6 @@
|
||||
name: review-fix-minimal
|
||||
description: 既存コードのレビューと修正ピース(レビュー開始、実装なし)
|
||||
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
|
||||
movements:
|
||||
- name: implement
|
||||
@ -190,5 +175,3 @@ movements:
|
||||
- condition: 修正を進行できない
|
||||
next: implement
|
||||
instruction: fix-supervisor
|
||||
report_formats:
|
||||
ai-review: ../output-contracts/ai-review.md
|
||||
|
||||
@ -1,23 +1,6 @@
|
||||
name: review-only
|
||||
description: レビュー専用ピース - コードをレビューするだけで編集は行わない
|
||||
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
|
||||
movements:
|
||||
- name: plan
|
||||
@ -231,8 +214,3 @@ movements:
|
||||
---
|
||||
*[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
|
||||
|
||||
@ -1,25 +1,6 @@
|
||||
name: structural-reform
|
||||
description: プロジェクト全体レビューと構造改革 - 段階的なファイル分割による反復的コードベース再構築
|
||||
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
|
||||
loop_monitors:
|
||||
- cycle:
|
||||
@ -447,9 +428,3 @@ movements:
|
||||
output_contracts:
|
||||
report:
|
||||
- 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
|
||||
|
||||
@ -1,31 +1,6 @@
|
||||
name: unit-test
|
||||
description: 単体テスト追加に特化したピース(テスト分析→テスト実装→レビュー→修正)
|
||||
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
|
||||
loop_monitors:
|
||||
- cycle:
|
||||
@ -259,9 +234,3 @@ movements:
|
||||
report:
|
||||
- Validation: 06-supervisor-validation.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
|
||||
|
||||
@ -327,52 +327,33 @@ Faceted Promptingの中核メカニズムは**宣言的な合成**である。
|
||||
|
||||
### 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
|
||||
name: my-workflow
|
||||
max_iterations: 10
|
||||
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:
|
||||
- name: implement
|
||||
persona: coder # WHO — personas.coder を参照
|
||||
policy: coding # RULES — policies.coding を参照
|
||||
instruction: implement # WHAT — instructions.implement を参照
|
||||
knowledge: architecture # CONTEXT — knowledge.architecture を参照
|
||||
persona: coder # WHO — builtins/{lang}/personas/coder.md
|
||||
policy: coding # RULES — builtins/{lang}/policies/coding.md
|
||||
instruction: implement # WHAT — builtins/{lang}/instructions/implement.md
|
||||
knowledge: architecture # CONTEXT — builtins/{lang}/knowledge/architecture.md
|
||||
edit: true
|
||||
rules:
|
||||
- condition: Implementation complete
|
||||
next: review
|
||||
|
||||
- name: review
|
||||
persona: reviewer # 異なる WHO
|
||||
persona: architecture-reviewer # 異なる WHO
|
||||
policy: review # 異なる RULES
|
||||
instruction: review # 異なる WHAT(共有も可能)
|
||||
knowledge: architecture # 同じ CONTEXT — 再利用
|
||||
output_contracts:
|
||||
report:
|
||||
- name: review.md
|
||||
format: review # OUTPUT — report_formats.review を参照
|
||||
format: architecture-review # OUTPUT — builtins/{lang}/output-contracts/architecture-review.md
|
||||
edit: false
|
||||
rules:
|
||||
- condition: Approved
|
||||
|
||||
@ -327,52 +327,33 @@ Key properties:
|
||||
|
||||
### 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
|
||||
name: my-workflow
|
||||
max_iterations: 10
|
||||
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:
|
||||
- name: implement
|
||||
persona: coder # WHO — references personas.coder
|
||||
policy: coding # RULES — references policies.coding
|
||||
instruction: implement # WHAT — references instructions.implement
|
||||
knowledge: architecture # CONTEXT — references knowledge.architecture
|
||||
persona: coder # WHO — builtins/{lang}/personas/coder.md
|
||||
policy: coding # RULES — builtins/{lang}/policies/coding.md
|
||||
instruction: implement # WHAT — builtins/{lang}/instructions/implement.md
|
||||
knowledge: architecture # CONTEXT — builtins/{lang}/knowledge/architecture.md
|
||||
edit: true
|
||||
rules:
|
||||
- condition: Implementation complete
|
||||
next: review
|
||||
|
||||
- name: review
|
||||
persona: reviewer # Different WHO
|
||||
persona: architecture-reviewer # Different WHO
|
||||
policy: review # Different RULES
|
||||
instruction: review # Different WHAT (but could share)
|
||||
knowledge: architecture # Same CONTEXT — reused
|
||||
output_contracts:
|
||||
report:
|
||||
- name: review.md
|
||||
format: review # OUTPUT — references report_formats.review
|
||||
format: architecture-review # OUTPUT — builtins/{lang}/output-contracts/architecture-review.md
|
||||
edit: false
|
||||
rules:
|
||||
- condition: Approved
|
||||
|
||||
@ -44,6 +44,15 @@ describe('getBuiltinPiece', () => {
|
||||
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', () => {
|
||||
expect(getBuiltinPiece('nonexistent-piece')).toBeNull();
|
||||
expect(getBuiltinPiece('unknown')).toBeNull();
|
||||
|
||||
@ -508,4 +508,110 @@ describe('normalizePieceConfig with layer resolution', () => {
|
||||
expect(config.movements[0]!.knowledgeContents).toBeDefined();
|
||||
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');
|
||||
});
|
||||
});
|
||||
|
||||
@ -15,7 +15,6 @@ import { getLanguage } from '../global/globalConfig.js';
|
||||
import {
|
||||
type PieceSections,
|
||||
type FacetResolutionContext,
|
||||
resolveResourceContent,
|
||||
resolveRefToContent,
|
||||
resolveRefList,
|
||||
resolveSectionMap,
|
||||
@ -189,7 +188,9 @@ function normalizeStepFromRaw(
|
||||
model: step.model,
|
||||
permissionMode: step.permission_mode,
|
||||
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,
|
||||
outputContracts: normalizeOutputContracts(step.output_contracts, pieceDir, sections.resolvedReportFormats, context),
|
||||
qualityGates: step.quality_gates,
|
||||
@ -217,7 +218,9 @@ function normalizeLoopMonitorJudge(
|
||||
return {
|
||||
persona: personaSpec,
|
||||
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 })),
|
||||
};
|
||||
}
|
||||
@ -297,10 +300,10 @@ export function loadPieceFromFile(filePath: string, projectDir?: string): PieceC
|
||||
const raw = parseYaml(content);
|
||||
const pieceDir = dirname(filePath);
|
||||
|
||||
let context: FacetResolutionContext | undefined;
|
||||
if (projectDir) {
|
||||
context = { projectDir, lang: getLanguage() };
|
||||
}
|
||||
const context: FacetResolutionContext = {
|
||||
lang: getLanguage(),
|
||||
projectDir,
|
||||
};
|
||||
|
||||
return normalizePieceConfig(raw, pieceDir, context);
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ import { getProjectFacetDir, getGlobalFacetDir, getBuiltinFacetDir } from '../pa
|
||||
|
||||
/** Context for 3-layer facet resolution. */
|
||||
export interface FacetResolutionContext {
|
||||
projectDir: string;
|
||||
projectDir?: string;
|
||||
lang: Language;
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ export function resolveFacetPath(
|
||||
context: FacetResolutionContext,
|
||||
): string | undefined {
|
||||
const candidateDirs = [
|
||||
getProjectFacetDir(context.projectDir, facetType),
|
||||
...(context.projectDir ? [getProjectFacetDir(context.projectDir, facetType)] : []),
|
||||
getGlobalFacetDir(facetType),
|
||||
getBuiltinFacetDir(context.lang, facetType),
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user