takt/resources/global/en/workflows/research.yaml
nrslib 7bb54067b4 ステータス出力ルールのヘッダーを自動生成に変更
- renderStatusRulesHeader() を追加して言語別にヘッダーを生成
- 全ワークフローYAMLから重複していたヘッダー部分を削除
- buildInstruction() で statusRulesPrompt にヘッダーを自動付加
2026-01-29 02:38:01 +09:00

216 lines
5.4 KiB
YAML

# Research Workflow
# A workflow that autonomously executes research tasks
# Planner creates the plan, Digger executes, Supervisor verifies
#
# Flow:
# plan -> dig -> supervise -> COMPLETE (approved)
# -> plan (rejected: restart from planning)
#
# Template Variables:
# {iteration} - Workflow-wide turn count (total steps executed across all agents)
# {max_iterations} - Maximum iterations allowed for the workflow
# {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
# {task} - Original user request
# {previous_response} - Output from the previous step
# {git_diff} - Current uncommitted changes (git diff)
# {user_inputs} - Accumulated user inputs during workflow
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
name: research
description: Research workflow - autonomously executes research without asking questions
max_iterations: 10
steps:
- name: plan
agent: ~/.takt/agents/research/planner.md
allowed_tools:
- Read
- Glob
- Grep
- WebSearch
- WebFetch
status_rules_prompt: |
## Output Format
| Situation | Tag |
|-----------|-----|
| Plan complete | `[PLANNER:DONE]` |
| Insufficient info | `[PLANNER:BLOCKED]` |
### Output Examples
**DONE case:**
```
[PLANNER:DONE]
```
**BLOCKED case:**
```
[PLANNER:BLOCKED]
Clarifications needed:
- {Question 1}
```
instruction_template: |
## Workflow Status
- Iteration: {iteration}/{max_iterations} (workflow-wide)
- Step Iteration: {step_iteration} (times this step has run)
- Step: plan
## Research Request
{task}
## Supervisor Feedback (for re-planning)
{previous_response}
## Additional User Inputs
{user_inputs}
## Instructions
Create a research plan for the above request.
**Important**: Do not ask the user questions.
- Make assumptions for unclear points and proceed
- If multiple interpretations exist, include all in the research scope
- If there is feedback from Supervisor, incorporate it into the plan
pass_previous_response: true
transitions:
- condition: done
next_step: dig
- condition: blocked
next_step: ABORT
- name: dig
agent: ~/.takt/agents/research/digger.md
allowed_tools:
- Read
- Glob
- Grep
- WebSearch
- WebFetch
status_rules_prompt: |
## Output Format
| Situation | Tag |
|-----------|-----|
| Research complete | `[DIGGER:DONE]` |
| Unable to research | `[DIGGER:BLOCKED]` |
### Output Examples
**DONE case:**
```
[DIGGER:DONE]
```
**BLOCKED case:**
```
[DIGGER:BLOCKED]
Reason: {Why research was not possible}
```
instruction_template: |
## Workflow Status
- Iteration: {iteration}/{max_iterations} (workflow-wide)
- Step Iteration: {step_iteration} (times this step has run)
- Step: dig
## Original Research Request
{task}
## Research Plan
{previous_response}
## Additional User Inputs
{user_inputs}
## Instructions
Execute the research according to the plan above.
**Important**: Do not ask the user questions.
- Research within the scope of what can be investigated
- Report items that could not be researched as "Unable to research"
Available tools:
- Web search
- GitHub search (gh command)
- Codebase search
- File reading
pass_previous_response: true
transitions:
- condition: done
next_step: supervise
- condition: blocked
next_step: ABORT
- name: supervise
agent: ~/.takt/agents/research/supervisor.md
allowed_tools:
- Read
- Glob
- Grep
- WebSearch
- WebFetch
status_rules_prompt: |
## Judgment Criteria
| Situation | Judgment |
|-----------|----------|
| Research results sufficient | APPROVE |
| Research results insufficient | REJECT |
## Output Format
| Situation | Tag |
|-----------|-----|
| Research complete, results sufficient | `[SUPERVISOR:APPROVE]` |
| Insufficient, restart from planning | `[SUPERVISOR:REJECT]` |
### Output Examples
**APPROVE case:**
```
[SUPERVISOR:APPROVE]
Research results adequately answer the original request.
```
**REJECT case:**
```
[SUPERVISOR:REJECT]
Missing:
- {Specific missing items}
```
instruction_template: |
## Workflow Status
- Iteration: {iteration}/{max_iterations} (workflow-wide)
- Step Iteration: {step_iteration} (times this step has run)
- Step: supervise (research quality evaluation)
## Original Research Request
{task}
## Digger's Research Results
{previous_response}
## Instructions
Evaluate the research results and determine if they adequately answer the original request.
**Important**: If there are issues, include specific instructions for the Planner.
pass_previous_response: true
transitions:
- condition: approved
next_step: COMPLETE
- condition: rejected
next_step: plan
initial_step: plan