docs(TASK-021): fix task-queue example IDs + document dispatch/collect/failure semantics
- prompts.rs DEFAULT_SPAWN_INSTRUCTIONS: example IDs task_1/task_2 -> "1"/"2" (real numeric-string IDs; old format silently produced dep_error + unblocked task), plus task-queue rules: root tasks with agent are never auto-dispatched, task_complete is what dispatches dependents, auto-dispatched agents must be collected, failed tasks permanently block dependents. - architect config: optional task-queue mirroring guidance for parallel mode (disk task files stay the durable store; queue is in-memory). - sisyphus config: short note on encoding dependency-shaped bursts as agent__task_create chains; todos remain the tracking source of truth.
This commit is contained in:
3 files changed
+31
-3
No files matched your search
+12
-3
@@ -167,17 +167,26 @@ pub(in crate::config) const DEFAULT_SPAWN_INSTRUCTIONS: &str = indoc! {"
|
||||
```
|
||||
# Create tasks with dependencies (optional: auto-dispatch with --agent)
|
||||
agent__task_create --subject \"Explore existing patterns\"
|
||||
agent__task_create --subject \"Implement feature\" --blocked_by [\"task_1\"] --agent coder --prompt \"Implement based on patterns found\"
|
||||
agent__task_create --subject \"Write tests\" --blocked_by [\"task_2\"]
|
||||
agent__task_create --subject \"Implement feature\" --blocked_by [\"1\"] --agent coder --prompt \"Implement based on patterns found\"
|
||||
agent__task_create --subject \"Write tests\" --blocked_by [\"2\"]
|
||||
|
||||
# Check what's runnable
|
||||
agent__task_list
|
||||
|
||||
# After completing a task, mark it done to unblock dependents
|
||||
# If dependents have --agent set, they auto-dispatch
|
||||
agent__task_complete --task_id task_1
|
||||
agent__task_complete --task_id 1
|
||||
```
|
||||
|
||||
Task-queue rules (NOT obvious — read carefully):
|
||||
- Task IDs are numeric strings (\"1\", \"2\", ...) assigned in creation order.
|
||||
- A task created with `agent` but NO blockers is NEVER auto-dispatched — spawn it yourself.
|
||||
- Auto-dispatch happens only inside `agent__task_complete`: completing a task is what
|
||||
dispatches its newly-unblocked dependents.
|
||||
- Auto-dispatched agents must still be collected via `agent__collect`, and an agent finishing
|
||||
does NOT complete its task — call `agent__task_complete` yourself to advance the chain.
|
||||
- A failed task permanently blocks its dependents — recreate the chain rather than retrying.
|
||||
|
||||
### Escalation Handling
|
||||
|
||||
Child agents may need user input but cannot prompt the user directly. When this happens,
|
||||
|
||||
Reference in new issue
Block a user