feat(agent): Enrich breakdown/decompose agent input with full initiative context
Breakdown and decompose agents now receive all existing phases, tasks, and pages as read-only context so they can plan with awareness of what already exists instead of operating in a vacuum.
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
1. **tRPC procedure** calls `agentManager.spawn(options)`
|
||||
2. Manager generates alias (adjective-animal), creates DB record
|
||||
3. `AgentProcessManager.createWorktree()` — creates git worktree at `.cw-worktrees/agent/<alias>/`
|
||||
4. `file-io.writeInputFiles()` — writes `.cw/input/` with initiative, pages, phase, task as frontmatter
|
||||
4. `file-io.writeInputFiles()` — writes `.cw/input/` with assignment files (initiative, pages, phase, task) and read-only context dirs (`context/phases/`, `context/tasks/`)
|
||||
5. Provider config builds spawn command via `buildSpawnCommand()`
|
||||
6. `spawnDetached()` — launches detached child process with file output redirection
|
||||
7. `FileTailer` watches output file, fires `onEvent` and `onRawContent` callbacks
|
||||
|
||||
@@ -117,9 +117,9 @@ Each procedure uses `require*Repository(ctx)` helpers that throw `TRPCError(INTE
|
||||
| Procedure | Type | Description |
|
||||
|-----------|------|-------------|
|
||||
| spawnArchitectDiscuss | mutation | Discussion agent |
|
||||
| spawnArchitectBreakdown | mutation | Breakdown agent (generates phases) |
|
||||
| spawnArchitectBreakdown | mutation | Breakdown agent (generates phases). Passes full initiative context (existing phases, tasks, pages) |
|
||||
| spawnArchitectRefine | mutation | Refine agent (generates proposals) |
|
||||
| spawnArchitectDecompose | mutation | Decompose agent (generates tasks) |
|
||||
| spawnArchitectDecompose | mutation | Decompose agent (generates tasks). Passes full initiative context (sibling phases, tasks, pages) |
|
||||
|
||||
### Dispatch
|
||||
| Procedure | Type | Description |
|
||||
|
||||
Reference in New Issue
Block a user