Initial commit: AirCoding V1.0.0 Alpha architecture baseline
Complete architecture document set with multi-model review remediation: - Frozen interface contracts, runtime semantics, DB schemas - Event/tool/error/provider registries - Scheduler and main agent state machines - C4 module/code views, solution architecture, baseline V1 - Multi-model review reports and joint assessment - Phase-gate remediation complete (P0/P1/P2/UX resolved) - Implementation plan with T-000A through T-045 - Reference folders kept as placeholders only
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# ADR-0005: Use Independent Worker Processes And NDJSON IPC
|
||||
|
||||
- Status: Accepted
|
||||
- Date: 2026-05-27
|
||||
|
||||
## Context
|
||||
|
||||
A single agent process doing all work would cause context explosion, reduce responsiveness, and make parallel execution fragile. AirCoding needs workers that can be monitored, retried, cancelled, and recovered independently.
|
||||
|
||||
## Decision
|
||||
|
||||
Run Executor, Reviewer, Debugger, Compactor, and ExperienceMiner as independent Bun child processes. Use NDJSON over stdio for IPC.
|
||||
|
||||
IPC messages use:
|
||||
|
||||
```text
|
||||
kind: event
|
||||
kind: control
|
||||
kind: log
|
||||
```
|
||||
|
||||
The Scheduler owns process lifecycle, heartbeat monitoring, timeout handling, and WorkerResult collection.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Main Agent remains responsive.
|
||||
- Workers have bounded task context.
|
||||
- Scheduler can detect lost workers through heartbeat/process state.
|
||||
- stdout is reserved for protocol; stderr is crash/fatal fallback.
|
||||
- Worker loops may be role-specific rather than one generic shared loop.
|
||||
Reference in New Issue
Block a user