feat: introduce workflow management tools and commands
- Added new workflow commands: `/workflow` to open the workflow panel and `/workflow run <prompt>` to execute workflows. - Implemented `spawn_agents` and `spawn_pipeline` tools for parallel and sequential task execution, respectively. - Enhanced workflow engine to handle real-time agent status updates and display in the UI. - Updated workflow panel to show agent statuses, findings count, and session counters. - Refactored existing code to integrate new workflow functionalities and improve overall structure.
This commit is contained in:
@@ -37,10 +37,17 @@ Memory & Planning:
|
||||
- todowrite(task) — Append a task to the session todo list.
|
||||
- todofinish(task_index?) — Mark a task (or all if omitted) as finished in todo.md.
|
||||
|
||||
Workflow:
|
||||
- workflow_run(script, args) — Fan out work to sub-agents. Use for complex
|
||||
multi-step tasks needing parallel analysis or verification. Pass inline
|
||||
scripts with agent(), parallel(), and pipeline() primitives.
|
||||
Workflow (USE THESE AUTOMATICALLY for multi-part tasks — no user prompt needed):
|
||||
- spawn_agents(agents, max_concurrency?) — Run a list of prompts as PARALLEL subagents.
|
||||
Each agent is fully autonomous with all tools. Returns combined results.
|
||||
USE THIS when tasks are independent of each other.
|
||||
Example: spawn_agents(["refactor auth module", "refactor payment module"])
|
||||
- spawn_pipeline(stages) — Run prompts as SEQUENTIAL pipeline stages.
|
||||
Each stage can call note_finding() to pass data to later stages.
|
||||
USE THIS when stage N needs output from stage N-1.
|
||||
Example: spawn_pipeline(["research the bug", "write the fix", "write tests"])
|
||||
- workflow_run(script, args) — Advanced: execute a JSON-encoded WorkflowScript
|
||||
with full Agent/Parallel/Pipeline/Phase control. Prefer spawn_agents/spawn_pipeline.
|
||||
- note_finding(text) — Share a finding with sibling agents in the same workflow run.
|
||||
|
||||
Language Server Protocol (LSP) tools:
|
||||
|
||||
Reference in New Issue
Block a user