# ADR-0002: Use Bun TypeScript Monorepo For AirCoding Runtime

- Status: Accepted
- Date: 2026-05-27

## Context

AirCoding needs a self-owned runtime that can support CLI, TUI, agent orchestration, provider adapters, contracts, and toolchain packages without becoming a wrapper around an existing coding agent.

## Decision

Use TypeScript on Bun with Bun workspaces and Turborepo. Organize MVP packages as:

```text
packages/cli
packages/tui
packages/runtime
packages/llm
packages/toolchain-cpp
packages/contracts
```

## Consequences

- Runtime, UI, providers, and toolchains share compileable contracts.
- Worker agents can run as independent Bun child processes.
- Python remains subprocess-only for existing scripts/libraries, not the core runtime.
- Future language support is added through `toolchain-*` packages.
