Add reactive (graph-derived parallel) task execution within slices.
When enabled via preferences, the dispatch table derives a task dependency
graph from IO annotations in task plans and dispatches multiple ready,
non-conflicting tasks in parallel via subagent.
Architecture:
- Graph derivation happens at dispatch time (auto-dispatch.ts)
- A new reactive-execute prompt instructs the agent to use subagent
parallel mode to dispatch all currently-ready tasks
- The auto-loop treats reactive-execute as a single unit type
- After agent_end, the orchestrator checks which tasks completed and loops
New files:
- reactive-graph.ts: pure graph derivation, ready-set resolution,
conflict detection, deadlock detection, IO loader, state persistence
- prompts/reactive-execute.md: prompt template for parallel dispatch
- tests/reactive-graph.test.ts: 22 unit tests for graph functions
- tests/reactive-executor.test.ts: 11 integration tests for dispatch
rules, preferences validation, state persistence, re-entry
Modified files:
- types.ts: TaskIO, DerivedTaskNode, ReactiveExecutionConfig,
ReactiveExecutionState interfaces
- files.ts: parseTaskPlanIO() extracts IO from task plan sections
- preferences-types.ts: reactive_execution config + known keys
- preferences-validation.ts: validation with range checks
- auto-dispatch.ts: new reactive-execute dispatch rule
- auto-prompts.ts: buildReactiveExecutePrompt()
- auto-recovery.ts: artifact verification for reactive-execute
- auto-post-unit.ts: reactive state cleanup on slice completion
Backward compatible: disabled by default, falls through to sequential
execution when disabled, ambiguous, or only 1 task is ready.