Architecture Overview
ADA is composed of 5 main modules communicating through narrow interfaces. No module depends directly on another — everything goes through strictly typed TypeScript interfaces.
| Module | File | Responsibility |
|---|---|---|
| Coordinator | coordinator/index.js | Entry point. Receives the task, orchestrates classification, routing, and feedback loop. |
| Classifier | coordinator/classifier.js | TF-IDF scoring. Produces mode, tier, profile, signals from text description. |
| Router | coordinator/router.js | Thompson Sampling. Selects optimal agent for each phase from Beta distributions. |
| ReasoningBank | coordinator/bank.js | SQLite persistence. Trajectories, insights, distributions, conventions. |
| Executor | coordinator/executor.js | Spawns Claude Code agents. Streaming EventEmitter. Collects outputs. Reports results. |