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:
Lukas May
2026-03-03 13:42:37 +01:00
parent 86a1912959
commit 536cdf08a1
9 changed files with 122 additions and 9 deletions

View File

@@ -159,6 +159,7 @@ export const tasks = sqliteTable('tasks', {
.default('pending'),
requiresApproval: integer('requires_approval', { mode: 'boolean' }), // null = inherit from initiative
order: integer('order').notNull().default(0),
summary: text('summary'), // Agent result summary — propagated to dependent tasks as context
createdAt: integer('created_at', { mode: 'timestamp' }).notNull(),
updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull(),
});