212 lines
5.1 KiB
YAML
212 lines
5.1 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)
|
|
|
|
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: |
|
|
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
|
|
**Without this tag, the workflow will stop.**
|
|
Your final output MUST include a status tag following the rules below.
|
|
|
|
## 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}
|
|
- 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: |
|
|
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
|
|
**Without this tag, the workflow will stop.**
|
|
Your final output MUST include a status tag following the rules below.
|
|
|
|
## 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}
|
|
- 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: |
|
|
# ⚠️ REQUIRED: Status Output Rules ⚠️
|
|
|
|
**Without this tag, the workflow will stop.**
|
|
Your final output MUST include a status tag following the rules below.
|
|
|
|
## 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}
|
|
- 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
|