135 lines
4.0 KiB
YAML
135 lines
4.0 KiB
YAML
# Research Piece
|
|
# A piece 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} - Piece-wide turn count (total movements executed across all agents)
|
|
# {max_iterations} - Maximum iterations allowed for the piece
|
|
# {movement_iteration} - Per-movement iteration count (how many times THIS movement has been executed)
|
|
# {task} - Original user request
|
|
# {previous_response} - Output from the previous movement
|
|
# {user_inputs} - Accumulated user inputs during piece
|
|
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
|
|
|
|
name: research
|
|
description: Research piece - autonomously executes research without asking questions
|
|
|
|
max_iterations: 10
|
|
|
|
movements:
|
|
- name: plan
|
|
agent: ../agents/research/planner.md
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction_template: |
|
|
## Piece Status
|
|
- Iteration: {iteration}/{max_iterations} (piece-wide)
|
|
- Movement Iteration: {movement_iteration} (times this movement has run)
|
|
- Movement: 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
|
|
rules:
|
|
- condition: Planning is complete
|
|
next: dig
|
|
- condition: Insufficient information to create a plan
|
|
next: ABORT
|
|
|
|
- name: dig
|
|
agent: ../agents/research/digger.md
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction_template: |
|
|
## Piece Status
|
|
- Iteration: {iteration}/{max_iterations} (piece-wide)
|
|
- Movement Iteration: {movement_iteration} (times this movement has run)
|
|
- Movement: 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
|
|
rules:
|
|
- condition: Research is complete
|
|
next: supervise
|
|
- condition: Unable to conduct research
|
|
next: ABORT
|
|
|
|
- name: supervise
|
|
agent: ../agents/research/supervisor.md
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction_template: |
|
|
## Piece Status
|
|
- Iteration: {iteration}/{max_iterations} (piece-wide)
|
|
- Movement Iteration: {movement_iteration} (times this movement has run)
|
|
- Movement: 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
|
|
rules:
|
|
- condition: Research results adequately answer the original request
|
|
next: COMPLETE
|
|
- condition: Research results are insufficient and replanning is needed
|
|
next: plan
|
|
|
|
initial_movement: plan
|