feat: Propagate task summaries and input context to execution agents
Execution agents were spawning blind — no input files, no knowledge of what predecessor tasks accomplished. This adds three capabilities: 1. summary column on tasks table — completeTask() reads the finishing agent's result.message and stores it on the task record 2. dispatchNext() gathers full initiative context (initiative, phase, sibling tasks, pages) and passes it as inputContext so agents get .cw/input/task.md, initiative.md, phase.md, and context directories 3. context/tasks/*.md files now include the summary field in frontmatter so dependent agents can see what prior agents accomplished
This commit is contained in:
@@ -56,11 +56,13 @@ AccountCredentialsRefreshedEvent { accountId, expiresAt, previousExpiresAt? }
|
||||
|
||||
1. **Queue** — `queue(taskId)` fetches task dependencies, adds to internal Map
|
||||
2. **Dispatch** — `dispatchNext()` finds highest-priority task with all deps complete
|
||||
3. **Priority order**: high > medium > low, then oldest first (FIFO within priority)
|
||||
4. **Checkpoint skip** — Tasks with type starting with `checkpoint:` skip auto-dispatch
|
||||
5. **Planning skip** — Planning-category tasks (research, discuss, plan, detail, refine) skip auto-dispatch — they use the architect flow
|
||||
6. **Approval check** — `completeTask()` checks `requiresApproval` (task-level, then initiative-level)
|
||||
7. **Approval flow** — If approval required: status → `pending_approval`, emit `task:pending_approval`
|
||||
3. **Context gathering** — Before spawn, `dispatchNext()` gathers initiative context (initiative, phase, tasks, pages) and passes as `inputContext` to the agent. Agents receive `.cw/input/task.md`, `initiative.md`, `phase.md`, `context/tasks/`, `context/phases/`, and `pages/`.
|
||||
4. **Priority order**: high > medium > low, then oldest first (FIFO within priority)
|
||||
5. **Checkpoint skip** — Tasks with type starting with `checkpoint:` skip auto-dispatch
|
||||
6. **Planning skip** — Planning-category tasks (research, discuss, plan, detail, refine) skip auto-dispatch — they use the architect flow
|
||||
7. **Summary propagation** — `completeTask()` reads the completing agent's `result.message` and stores it on the task's `summary` column. Dependent tasks see this summary in `context/tasks/<id>.md` frontmatter.
|
||||
8. **Approval check** — `completeTask()` checks `requiresApproval` (task-level, then initiative-level)
|
||||
9. **Approval flow** — If approval required: status → `pending_approval`, emit `task:pending_approval`
|
||||
|
||||
### DispatchManager Methods
|
||||
|
||||
|
||||
Reference in New Issue
Block a user