レポート出力指示を自動生成に統一し、YAML の手動 order/instruction_template を削除
- REPORT_OUTPUT_STRINGS (en/ja) と renderReportOutputInstruction() を追加 - 全8ワークフローYAMLから手動の order フィールドとレポート出力指示を削除 - ReportObjectConfig に明示的 order がある場合は後方互換として優先 - .envrc を .gitignore に追加 ref #29
This commit is contained in:
parent
706a59d3b6
commit
cb37baec2c
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,6 +26,7 @@ coverage/
|
|||||||
.env
|
.env
|
||||||
.env.local
|
.env.local
|
||||||
.env.*.local
|
.env.*.local
|
||||||
|
.envrc
|
||||||
|
|
||||||
# TAKT config (user data)
|
# TAKT config (user data)
|
||||||
.takt/
|
.takt/
|
||||||
|
|||||||
@ -32,10 +32,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/planner.md
|
agent: ~/.takt/agents/default/planner.md
|
||||||
report:
|
report:
|
||||||
name: 00-plan.md
|
name: 00-plan.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Task Plan
|
# Task Plan
|
||||||
@ -116,10 +112,6 @@ steps:
|
|||||||
Follow the plan from the plan step and implement.
|
Follow the plan from the plan step and implement.
|
||||||
Refer to the plan report (00-plan.md) and proceed with implementation.
|
Refer to the plan report (00-plan.md) and proceed with implementation.
|
||||||
|
|
||||||
**Report output:** Output to the `Report Files` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
|
|
||||||
**Scope report format (create at implementation start):**
|
**Scope report format (create at implementation start):**
|
||||||
```markdown
|
```markdown
|
||||||
# Change Scope Declaration
|
# Change Scope Declaration
|
||||||
@ -155,10 +147,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 03-ai-review.md
|
name: 03-ai-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# AI-Generated Code Review
|
# AI-Generated Code Review
|
||||||
@ -239,10 +227,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/architecture-reviewer.md
|
agent: ~/.takt/agents/default/architecture-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 04-architect-review.md
|
name: 04-architect-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Architecture Review
|
# Architecture Review
|
||||||
@ -353,10 +337,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/security-reviewer.md
|
agent: ~/.takt/agents/default/security-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 05-security-review.md
|
name: 05-security-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Security Review
|
# Security Review
|
||||||
@ -461,10 +441,6 @@ steps:
|
|||||||
**Review Reports:** Read all reports in Report Directory and
|
**Review Reports:** Read all reports in Report Directory and
|
||||||
check for any unaddressed improvement suggestions.
|
check for any unaddressed improvement suggestions.
|
||||||
|
|
||||||
**Report output:** Output to the `Report Files` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
|
|
||||||
**Validation report format:**
|
**Validation report format:**
|
||||||
```markdown
|
```markdown
|
||||||
# Final Validation Results
|
# Final Validation Results
|
||||||
|
|||||||
@ -35,10 +35,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/planner.md
|
agent: ~/.takt/agents/default/planner.md
|
||||||
report:
|
report:
|
||||||
name: 00-plan.md
|
name: 00-plan.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Task Plan
|
# Task Plan
|
||||||
@ -110,10 +106,6 @@ steps:
|
|||||||
Follow the plan from the plan step and implement.
|
Follow the plan from the plan step and implement.
|
||||||
Refer to the plan report (00-plan.md) and proceed with implementation.
|
Refer to the plan report (00-plan.md) and proceed with implementation.
|
||||||
|
|
||||||
**Report output:** Output to the `Report Files` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
|
|
||||||
**Scope report format (create at implementation start):**
|
**Scope report format (create at implementation start):**
|
||||||
```markdown
|
```markdown
|
||||||
# Change Scope Declaration
|
# Change Scope Declaration
|
||||||
@ -157,10 +149,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 03-ai-review.md
|
name: 03-ai-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# AI-Generated Code Review
|
# AI-Generated Code Review
|
||||||
@ -243,10 +231,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert-cqrs/cqrs-es-reviewer.md
|
agent: ~/.takt/agents/expert-cqrs/cqrs-es-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 04-cqrs-es-review.md
|
name: 04-cqrs-es-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# CQRS+ES Review
|
# CQRS+ES Review
|
||||||
@ -335,10 +319,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/frontend-reviewer.md
|
agent: ~/.takt/agents/expert/frontend-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 05-frontend-review.md
|
name: 05-frontend-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Frontend Review
|
# Frontend Review
|
||||||
@ -427,10 +407,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/security-reviewer.md
|
agent: ~/.takt/agents/expert/security-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 06-security-review.md
|
name: 06-security-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Security Review
|
# Security Review
|
||||||
@ -526,10 +502,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/qa-reviewer.md
|
agent: ~/.takt/agents/expert/qa-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 07-qa-review.md
|
name: 07-qa-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# QA Review
|
# QA Review
|
||||||
@ -656,10 +628,6 @@ steps:
|
|||||||
**Review Reports:** Read all reports in Report Directory and
|
**Review Reports:** Read all reports in Report Directory and
|
||||||
check for any unaddressed improvement suggestions.
|
check for any unaddressed improvement suggestions.
|
||||||
|
|
||||||
**Report output:** Output to the `Report Files` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
|
|
||||||
**Validation report format:**
|
**Validation report format:**
|
||||||
```markdown
|
```markdown
|
||||||
# Final Validation Results
|
# Final Validation Results
|
||||||
|
|||||||
@ -47,10 +47,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/planner.md
|
agent: ~/.takt/agents/default/planner.md
|
||||||
report:
|
report:
|
||||||
name: 00-plan.md
|
name: 00-plan.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Task Plan
|
# Task Plan
|
||||||
@ -122,10 +118,6 @@ steps:
|
|||||||
Follow the plan from the plan step and implement.
|
Follow the plan from the plan step and implement.
|
||||||
Refer to the plan report (00-plan.md) and proceed with implementation.
|
Refer to the plan report (00-plan.md) and proceed with implementation.
|
||||||
|
|
||||||
**Report output:** Output to the `Report Files` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
|
|
||||||
**Scope report format (create at implementation start):**
|
**Scope report format (create at implementation start):**
|
||||||
```markdown
|
```markdown
|
||||||
# Change Scope Declaration
|
# Change Scope Declaration
|
||||||
@ -169,10 +161,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 03-ai-review.md
|
name: 03-ai-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# AI-Generated Code Review
|
# AI-Generated Code Review
|
||||||
@ -255,10 +243,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/architecture-reviewer.md
|
agent: ~/.takt/agents/default/architecture-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 04-architect-review.md
|
name: 04-architect-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Architecture Review
|
# Architecture Review
|
||||||
@ -349,10 +333,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/frontend-reviewer.md
|
agent: ~/.takt/agents/expert/frontend-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 05-frontend-review.md
|
name: 05-frontend-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Frontend Review
|
# Frontend Review
|
||||||
@ -441,10 +421,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/security-reviewer.md
|
agent: ~/.takt/agents/expert/security-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 06-security-review.md
|
name: 06-security-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Security Review
|
# Security Review
|
||||||
@ -540,10 +516,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/qa-reviewer.md
|
agent: ~/.takt/agents/expert/qa-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 07-qa-review.md
|
name: 07-qa-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# QA Review
|
# QA Review
|
||||||
@ -670,10 +642,6 @@ steps:
|
|||||||
**Review Reports:** Read all reports in Report Directory and
|
**Review Reports:** Read all reports in Report Directory and
|
||||||
check for any unaddressed improvement suggestions.
|
check for any unaddressed improvement suggestions.
|
||||||
|
|
||||||
**Report output:** Output to the `Report Files` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
|
|
||||||
**Validation report format:**
|
**Validation report format:**
|
||||||
```markdown
|
```markdown
|
||||||
# Final Validation Results
|
# Final Validation Results
|
||||||
|
|||||||
@ -29,10 +29,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/planner.md
|
agent: ~/.takt/agents/default/planner.md
|
||||||
report:
|
report:
|
||||||
name: 00-plan.md
|
name: 00-plan.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Task Plan
|
# Task Plan
|
||||||
@ -109,10 +105,6 @@ steps:
|
|||||||
Follow the plan from the plan step and implement.
|
Follow the plan from the plan step and implement.
|
||||||
Refer to the plan report (00-plan.md) and proceed with implementation.
|
Refer to the plan report (00-plan.md) and proceed with implementation.
|
||||||
|
|
||||||
**Report output:** Output to the `Report Files` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
|
|
||||||
**Scope report format (create at implementation start):**
|
**Scope report format (create at implementation start):**
|
||||||
```markdown
|
```markdown
|
||||||
# Change Scope Declaration
|
# Change Scope Declaration
|
||||||
@ -148,10 +140,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 03-ai-review.md
|
name: 03-ai-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# AI-Generated Code Review
|
# AI-Generated Code Review
|
||||||
@ -202,10 +190,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/architecture-reviewer.md
|
agent: ~/.takt/agents/default/architecture-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 04-architect-review.md
|
name: 04-architect-review.md
|
||||||
order: |
|
|
||||||
**Report output:** Output to the `Report File` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# Architecture Review
|
# Architecture Review
|
||||||
@ -283,10 +267,6 @@ steps:
|
|||||||
**Review Reports:** Read all reports in Report Directory and
|
**Review Reports:** Read all reports in Report Directory and
|
||||||
check for any unaddressed improvement suggestions.
|
check for any unaddressed improvement suggestions.
|
||||||
|
|
||||||
**Report output:** Output to the `Report Files` specified above.
|
|
||||||
- If file does not exist: Create new file
|
|
||||||
- If file exists: Append with `## Iteration {step_iteration}` section
|
|
||||||
|
|
||||||
**Validation report format:**
|
**Validation report format:**
|
||||||
```markdown
|
```markdown
|
||||||
# Final Validation Results
|
# Final Validation Results
|
||||||
|
|||||||
@ -23,10 +23,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/planner.md
|
agent: ~/.takt/agents/default/planner.md
|
||||||
report:
|
report:
|
||||||
name: 00-plan.md
|
name: 00-plan.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# タスク計画
|
# タスク計画
|
||||||
@ -112,10 +108,6 @@ steps:
|
|||||||
- 既存コードを変更した場合は該当するテストを更新
|
- 既存コードを変更した場合は該当するテストを更新
|
||||||
- テストファイルの配置: プロジェクトの規約に従う(例: `__tests__/`, `*.test.ts`)
|
- テストファイルの配置: プロジェクトの規約に従う(例: `__tests__/`, `*.test.ts`)
|
||||||
|
|
||||||
**レポート出力:** Report Files に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
|
|
||||||
**Scopeレポートフォーマット(実装開始時に作成):**
|
**Scopeレポートフォーマット(実装開始時に作成):**
|
||||||
```markdown
|
```markdown
|
||||||
# 変更スコープ宣言
|
# 変更スコープ宣言
|
||||||
@ -151,10 +143,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 03-ai-review.md
|
name: 03-ai-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# AI生成コードレビュー
|
# AI生成コードレビュー
|
||||||
@ -235,10 +223,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/architecture-reviewer.md
|
agent: ~/.takt/agents/default/architecture-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 04-architect-review.md
|
name: 04-architect-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# アーキテクチャレビュー
|
# アーキテクチャレビュー
|
||||||
@ -359,10 +343,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/security-reviewer.md
|
agent: ~/.takt/agents/default/security-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 05-security-review.md
|
name: 05-security-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# セキュリティレビュー
|
# セキュリティレビュー
|
||||||
@ -467,10 +447,6 @@ steps:
|
|||||||
**レポートの確認:** Report Directory内の全レポートを読み、
|
**レポートの確認:** Report Directory内の全レポートを読み、
|
||||||
未対応の改善提案がないか確認してください。
|
未対応の改善提案がないか確認してください。
|
||||||
|
|
||||||
**レポート出力:** Report Files に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
|
|
||||||
**Validationレポートフォーマット:**
|
**Validationレポートフォーマット:**
|
||||||
```markdown
|
```markdown
|
||||||
# 最終検証結果
|
# 最終検証結果
|
||||||
|
|||||||
@ -44,10 +44,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/planner.md
|
agent: ~/.takt/agents/default/planner.md
|
||||||
report:
|
report:
|
||||||
name: 00-plan.md
|
name: 00-plan.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# タスク計画
|
# タスク計画
|
||||||
@ -119,10 +115,6 @@ steps:
|
|||||||
planステップで立てた計画に従って実装してください。
|
planステップで立てた計画に従って実装してください。
|
||||||
計画レポート(00-plan.md)を参照し、実装を進めてください。
|
計画レポート(00-plan.md)を参照し、実装を進めてください。
|
||||||
|
|
||||||
**レポート出力:** Report Files に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
|
|
||||||
**Scopeレポートフォーマット(実装開始時に作成):**
|
**Scopeレポートフォーマット(実装開始時に作成):**
|
||||||
```markdown
|
```markdown
|
||||||
# 変更スコープ宣言
|
# 変更スコープ宣言
|
||||||
@ -166,10 +158,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 03-ai-review.md
|
name: 03-ai-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# AI生成コードレビュー
|
# AI生成コードレビュー
|
||||||
@ -252,10 +240,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert-cqrs/cqrs-es-reviewer.md
|
agent: ~/.takt/agents/expert-cqrs/cqrs-es-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 04-cqrs-es-review.md
|
name: 04-cqrs-es-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# CQRS+ESレビュー
|
# CQRS+ESレビュー
|
||||||
@ -344,10 +328,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/frontend-reviewer.md
|
agent: ~/.takt/agents/expert/frontend-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 05-frontend-review.md
|
name: 05-frontend-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# フロントエンドレビュー
|
# フロントエンドレビュー
|
||||||
@ -436,10 +416,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/security-reviewer.md
|
agent: ~/.takt/agents/expert/security-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 06-security-review.md
|
name: 06-security-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# セキュリティレビュー
|
# セキュリティレビュー
|
||||||
@ -535,10 +511,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/qa-reviewer.md
|
agent: ~/.takt/agents/expert/qa-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 07-qa-review.md
|
name: 07-qa-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# QAレビュー
|
# QAレビュー
|
||||||
@ -665,10 +637,6 @@ steps:
|
|||||||
**レポートの確認:** Report Directory内の全レポートを読み、
|
**レポートの確認:** Report Directory内の全レポートを読み、
|
||||||
未対応の改善提案がないか確認してください。
|
未対応の改善提案がないか確認してください。
|
||||||
|
|
||||||
**レポート出力:** Report Files に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
|
|
||||||
**Validationレポートフォーマット:**
|
**Validationレポートフォーマット:**
|
||||||
```markdown
|
```markdown
|
||||||
# 最終検証結果
|
# 最終検証結果
|
||||||
|
|||||||
@ -35,10 +35,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/planner.md
|
agent: ~/.takt/agents/default/planner.md
|
||||||
report:
|
report:
|
||||||
name: 00-plan.md
|
name: 00-plan.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# タスク計画
|
# タスク計画
|
||||||
@ -110,10 +106,6 @@ steps:
|
|||||||
planステップで立てた計画に従って実装してください。
|
planステップで立てた計画に従って実装してください。
|
||||||
計画レポート(00-plan.md)を参照し、実装を進めてください。
|
計画レポート(00-plan.md)を参照し、実装を進めてください。
|
||||||
|
|
||||||
**レポート出力:** Report Files に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
|
|
||||||
**Scopeレポートフォーマット(実装開始時に作成):**
|
**Scopeレポートフォーマット(実装開始時に作成):**
|
||||||
```markdown
|
```markdown
|
||||||
# 変更スコープ宣言
|
# 変更スコープ宣言
|
||||||
@ -157,10 +149,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 03-ai-review.md
|
name: 03-ai-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# AI生成コードレビュー
|
# AI生成コードレビュー
|
||||||
@ -243,10 +231,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/architecture-reviewer.md
|
agent: ~/.takt/agents/default/architecture-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 04-architect-review.md
|
name: 04-architect-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# アーキテクチャレビュー
|
# アーキテクチャレビュー
|
||||||
@ -337,10 +321,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/frontend-reviewer.md
|
agent: ~/.takt/agents/expert/frontend-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 05-frontend-review.md
|
name: 05-frontend-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# フロントエンドレビュー
|
# フロントエンドレビュー
|
||||||
@ -429,10 +409,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/security-reviewer.md
|
agent: ~/.takt/agents/expert/security-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 06-security-review.md
|
name: 06-security-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# セキュリティレビュー
|
# セキュリティレビュー
|
||||||
@ -528,10 +504,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/expert/qa-reviewer.md
|
agent: ~/.takt/agents/expert/qa-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 07-qa-review.md
|
name: 07-qa-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# QAレビュー
|
# QAレビュー
|
||||||
@ -658,10 +630,6 @@ steps:
|
|||||||
**レポートの確認:** Report Directory内の全レポートを読み、
|
**レポートの確認:** Report Directory内の全レポートを読み、
|
||||||
未対応の改善提案がないか確認してください。
|
未対応の改善提案がないか確認してください。
|
||||||
|
|
||||||
**レポート出力:** Report Files に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
|
|
||||||
**Validationレポートフォーマット:**
|
**Validationレポートフォーマット:**
|
||||||
```markdown
|
```markdown
|
||||||
# 最終検証結果
|
# 最終検証結果
|
||||||
|
|||||||
@ -24,10 +24,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/planner.md
|
agent: ~/.takt/agents/default/planner.md
|
||||||
report:
|
report:
|
||||||
name: 00-plan.md
|
name: 00-plan.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# タスク計画
|
# タスク計画
|
||||||
@ -103,10 +99,6 @@ steps:
|
|||||||
planステップで立てた計画に従って実装してください。
|
planステップで立てた計画に従って実装してください。
|
||||||
計画レポート(00-plan.md)を参照し、実装を進めてください。
|
計画レポート(00-plan.md)を参照し、実装を進めてください。
|
||||||
|
|
||||||
**レポート出力:** Report Files に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
|
|
||||||
**Scopeレポートフォーマット(実装開始時に作成):**
|
**Scopeレポートフォーマット(実装開始時に作成):**
|
||||||
```markdown
|
```markdown
|
||||||
# 変更スコープ宣言
|
# 変更スコープ宣言
|
||||||
@ -147,10 +139,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 03-ai-review.md
|
name: 03-ai-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# AI生成コードレビュー
|
# AI生成コードレビュー
|
||||||
@ -201,10 +189,6 @@ steps:
|
|||||||
agent: ~/.takt/agents/default/architecture-reviewer.md
|
agent: ~/.takt/agents/default/architecture-reviewer.md
|
||||||
report:
|
report:
|
||||||
name: 04-architect-review.md
|
name: 04-architect-review.md
|
||||||
order: |
|
|
||||||
**レポート出力:** `Report File` に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
format: |
|
format: |
|
||||||
```markdown
|
```markdown
|
||||||
# アーキテクチャレビュー
|
# アーキテクチャレビュー
|
||||||
@ -277,10 +261,6 @@ steps:
|
|||||||
**レポートの確認:** Report Directory内の全レポートを読み、
|
**レポートの確認:** Report Directory内の全レポートを読み、
|
||||||
未対応の改善提案がないか確認してください。
|
未対応の改善提案がないか確認してください。
|
||||||
|
|
||||||
**レポート出力:** Report Files に出力してください。
|
|
||||||
- ファイルが存在しない場合: 新規作成
|
|
||||||
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
|
|
||||||
|
|
||||||
**Validationレポートフォーマット:**
|
**Validationレポートフォーマット:**
|
||||||
```markdown
|
```markdown
|
||||||
# 最終検証結果
|
# 最終検証結果
|
||||||
|
|||||||
@ -626,7 +626,7 @@ describe('instruction-builder', () => {
|
|||||||
expect(result).not.toContain('{report:00-plan.md}');
|
expect(result).not.toContain('{report:00-plan.md}');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not inject order/format when report is a simple string', () => {
|
it('should auto-inject report output instruction when report is a simple string', () => {
|
||||||
const step = createMinimalStep('Do work');
|
const step = createMinimalStep('Do work');
|
||||||
step.report = '00-plan.md';
|
step.report = '00-plan.md';
|
||||||
const context = createMinimalContext({
|
const context = createMinimalContext({
|
||||||
@ -636,17 +636,16 @@ describe('instruction-builder', () => {
|
|||||||
|
|
||||||
const result = buildInstruction(step, context);
|
const result = buildInstruction(step, context);
|
||||||
|
|
||||||
// Should contain instructions normally
|
// Auto-generated report output instruction should be injected before ## Instructions
|
||||||
expect(result).toContain('## Instructions');
|
expect(result).toContain('**Report output:** Output to the `Report File` specified above.');
|
||||||
expect(result).toContain('Do work');
|
expect(result).toContain('- If file does not exist: Create new file');
|
||||||
// The instruction should appear right after Additional User Inputs, not after any order section
|
const reportIdx = result.indexOf('**Report output:**');
|
||||||
const additionalIdx = result.indexOf('## Additional User Inputs');
|
|
||||||
const instructionsIdx = result.indexOf('## Instructions');
|
const instructionsIdx = result.indexOf('## Instructions');
|
||||||
expect(additionalIdx).toBeGreaterThan(-1);
|
expect(reportIdx).toBeGreaterThan(-1);
|
||||||
expect(instructionsIdx).toBeGreaterThan(additionalIdx);
|
expect(instructionsIdx).toBeGreaterThan(reportIdx);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not inject order/format when report is ReportConfig[]', () => {
|
it('should auto-inject report output instruction when report is ReportConfig[]', () => {
|
||||||
const step = createMinimalStep('Do work');
|
const step = createMinimalStep('Do work');
|
||||||
step.report = [
|
step.report = [
|
||||||
{ label: 'Scope', path: '01-scope.md' },
|
{ label: 'Scope', path: '01-scope.md' },
|
||||||
@ -658,9 +657,9 @@ describe('instruction-builder', () => {
|
|||||||
|
|
||||||
const result = buildInstruction(step, context);
|
const result = buildInstruction(step, context);
|
||||||
|
|
||||||
// Just verify normal behavior without extra sections
|
// Auto-generated multi-file report output instruction
|
||||||
expect(result).toContain('## Instructions');
|
expect(result).toContain('**Report output:** Output to the `Report Files` specified above.');
|
||||||
expect(result).toContain('Do work');
|
expect(result).toContain('- If file does not exist: Create new file');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should replace {report:filename} in instruction_template too', () => {
|
it('should replace {report:filename} in instruction_template too', () => {
|
||||||
@ -692,6 +691,90 @@ describe('instruction-builder', () => {
|
|||||||
|
|
||||||
expect(result).toContain('Append ## Iteration 3 section');
|
expect(result).toContain('Append ## Iteration 3 section');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should auto-inject Japanese report output instruction for ja language', () => {
|
||||||
|
const step = createMinimalStep('作業する');
|
||||||
|
step.report = { name: '00-plan.md' };
|
||||||
|
const context = createMinimalContext({
|
||||||
|
reportDir: '20260129-test',
|
||||||
|
language: 'ja',
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = buildInstruction(step, context);
|
||||||
|
|
||||||
|
expect(result).toContain('**レポート出力:** `Report File` に出力してください。');
|
||||||
|
expect(result).toContain('- ファイルが存在しない場合: 新規作成');
|
||||||
|
expect(result).toContain('- ファイルが存在する場合: `## Iteration 1` セクションを追記');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should auto-inject Japanese multi-file report output instruction', () => {
|
||||||
|
const step = createMinimalStep('作業する');
|
||||||
|
step.report = [{ label: 'Scope', path: '01-scope.md' }];
|
||||||
|
const context = createMinimalContext({
|
||||||
|
reportDir: '20260129-test',
|
||||||
|
language: 'ja',
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = buildInstruction(step, context);
|
||||||
|
|
||||||
|
expect(result).toContain('**レポート出力:** Report Files に出力してください。');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should replace {step_iteration} in auto-generated report output instruction', () => {
|
||||||
|
const step = createMinimalStep('Do work');
|
||||||
|
step.report = '00-plan.md';
|
||||||
|
const context = createMinimalContext({
|
||||||
|
reportDir: '20260129-test',
|
||||||
|
stepIteration: 5,
|
||||||
|
language: 'en',
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = buildInstruction(step, context);
|
||||||
|
|
||||||
|
expect(result).toContain('Append with `## Iteration 5` section');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should prefer explicit order over auto-generated report instruction', () => {
|
||||||
|
const step = createMinimalStep('Do work');
|
||||||
|
step.report = {
|
||||||
|
name: '00-plan.md',
|
||||||
|
order: 'Custom order instruction',
|
||||||
|
};
|
||||||
|
const context = createMinimalContext({
|
||||||
|
reportDir: '20260129-test',
|
||||||
|
language: 'en',
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = buildInstruction(step, context);
|
||||||
|
|
||||||
|
expect(result).toContain('Custom order instruction');
|
||||||
|
expect(result).not.toContain('**Report output:**');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should auto-inject report output for ReportObjectConfig without order', () => {
|
||||||
|
const step = createMinimalStep('Do work');
|
||||||
|
step.report = { name: '00-plan.md', format: '# Plan' };
|
||||||
|
const context = createMinimalContext({
|
||||||
|
reportDir: '20260129-test',
|
||||||
|
language: 'en',
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = buildInstruction(step, context);
|
||||||
|
|
||||||
|
expect(result).toContain('**Report output:** Output to the `Report File` specified above.');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should NOT inject report output when no reportDir', () => {
|
||||||
|
const step = createMinimalStep('Do work');
|
||||||
|
step.report = '00-plan.md';
|
||||||
|
const context = createMinimalContext({
|
||||||
|
language: 'en',
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = buildInstruction(step, context);
|
||||||
|
|
||||||
|
expect(result).not.toContain('**Report output:**');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('auto-injected User Request and Additional User Inputs sections', () => {
|
describe('auto-injected User Request and Additional User Inputs sections', () => {
|
||||||
|
|||||||
@ -269,6 +269,44 @@ const SECTION_STRINGS = {
|
|||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
/** Localized strings for auto-generated report output instructions */
|
||||||
|
const REPORT_OUTPUT_STRINGS = {
|
||||||
|
en: {
|
||||||
|
singleHeading: '**Report output:** Output to the `Report File` specified above.',
|
||||||
|
multiHeading: '**Report output:** Output to the `Report Files` specified above.',
|
||||||
|
createRule: '- If file does not exist: Create new file',
|
||||||
|
appendRule: '- If file exists: Append with `## Iteration {step_iteration}` section',
|
||||||
|
},
|
||||||
|
ja: {
|
||||||
|
singleHeading: '**レポート出力:** `Report File` に出力してください。',
|
||||||
|
multiHeading: '**レポート出力:** Report Files に出力してください。',
|
||||||
|
createRule: '- ファイルが存在しない場合: 新規作成',
|
||||||
|
appendRule: '- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記',
|
||||||
|
},
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate report output instructions from step.report config.
|
||||||
|
* Returns undefined if step has no report or no reportDir.
|
||||||
|
*
|
||||||
|
* This replaces the manual `order:` fields and instruction_template
|
||||||
|
* report output blocks that were previously hand-written in each YAML.
|
||||||
|
*/
|
||||||
|
function renderReportOutputInstruction(
|
||||||
|
step: WorkflowStep,
|
||||||
|
context: InstructionContext,
|
||||||
|
language: Language,
|
||||||
|
): string | undefined {
|
||||||
|
if (!step.report || !context.reportDir) return undefined;
|
||||||
|
|
||||||
|
const s = REPORT_OUTPUT_STRINGS[language];
|
||||||
|
const isMulti = Array.isArray(step.report);
|
||||||
|
const heading = isMulti ? s.multiHeading : s.singleHeading;
|
||||||
|
const appendRule = s.appendRule.replace('{step_iteration}', String(context.stepIteration));
|
||||||
|
|
||||||
|
return [heading, s.createRule, appendRule].join('\n');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the Workflow Context section.
|
* Render the Workflow Context section.
|
||||||
*/
|
*/
|
||||||
@ -428,10 +466,17 @@ export function buildInstruction(
|
|||||||
sections.push(`${s.additionalUserInputs}\n${escapeTemplateChars(userInputsStr)}`);
|
sections.push(`${s.additionalUserInputs}\n${escapeTemplateChars(userInputsStr)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6a. Report order (prepended before instruction_template, from ReportObjectConfig)
|
// 6a. Report output instruction (auto-generated from step.report)
|
||||||
|
// If ReportObjectConfig has an explicit `order:`, use that (backward compat).
|
||||||
|
// Otherwise, auto-generate from the report declaration.
|
||||||
if (step.report && isReportObjectConfig(step.report) && step.report.order) {
|
if (step.report && isReportObjectConfig(step.report) && step.report.order) {
|
||||||
const processedOrder = replaceTemplatePlaceholders(step.report.order.trimEnd(), step, context);
|
const processedOrder = replaceTemplatePlaceholders(step.report.order.trimEnd(), step, context);
|
||||||
sections.push(processedOrder);
|
sections.push(processedOrder);
|
||||||
|
} else {
|
||||||
|
const reportInstruction = renderReportOutputInstruction(step, context, language);
|
||||||
|
if (reportInstruction) {
|
||||||
|
sections.push(reportInstruction);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6b. Instructions header + instruction_template content
|
// 6b. Instructions header + instruction_template content
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user