# Runtime Environment for the Multi-Agent Handbook — 2026-09-19
Scope: only the environment facts the handbook (v0.3.0) and process doc (v2.4.4) actually depend on.

## 1. Host profile (drives handbook 0.3 "single-machine conservative mode")
- Alibaba Cloud ECS, Ubuntu 22.04, 2 vCPU, **1.6 GB RAM** (measured free: 660-770 MB after masking
  fwupd / packagekit / multipathd on 2026-09-19), 40 GB disk (~26 GB free), **no swap**, **no Docker/podman**.
- Consequence: `max_workers` hard cap = 2 (start with 1); only lightweight work may run in parallel;
  `blocked` instead of silently starting a new worker when resources are tight.

## 2. What this host must never do (handbook 0.3 table)
- No compile, no full test suite, no packaging, no dependency installs, no container builds, no DB migrations.
  There is no Android SDK and no JVM budget here. **All of that goes to CI (GitHub Actions).**
- Evidence: on 2026-09-19 an attempt to temporarily install a JRE + kotlinc just to syntax-check Kotlin
  was aborted under memory pressure and fully rolled back. Local verification = static checks only;
  the compile gate is CI, and the visual gate is CI-produced screenshots.
- Browser/UI work: **headless, single instance**. Headed Chrome needs Xvfb and makes the box unresponsive.

## 3. Orchestration layer that actually exists (vs. the handbook's Code layer)
- Available: Hermes `delegate_task` — isolated child contexts, per-task toolset trimming, up to 10 concurrent children,
  parent model/provider inherited (DeepSeek official API; no third-party provider in the delegation path).
- **Not implemented (all "Code layer" clauses are target-state):** orchestrator process, SQLite task state machine,
  file locks / worktree isolation, per-phase token budget and circuit breaker, reviewer JSON verdict diffing,
  checkpoint interception with timers, coverage-diff, fingerprint clustering, high-risk-domain plugin checks.
- Therefore: every rule the handbook assigns to the Code layer is, today, enforced only by the human and the lead agent.

## 4. What stands in for the Code layer today
- `/root/mas/mtask.py` ("youth version" ledger):
  - `precheck --repo <repo>` before dispatching (dirty files + overlap with active task claims)
  - `claim <id> --files "..."` file ownership, **directory-level claims included**; overlap => serialize
  - `todo add/list/done` for human decisions + a daily 09:00 zero-LLM reminder (silent when empty)
- Plus two manual habits: check `git status` in the target repo before dispatch, and treat CI as the compile gate.

## 5. Persistence and reporting
- Hermes persists conversations and run traces in `state.db` + session files. These are **not** a task state machine:
  no phase/state columns, no recovery protocol. Nothing in the handbook that assumes "restore from DB" works today.
- Reports/artifacts are delivered through the public page `http://8.148.217.89:18642/apks/x7k2m9/` (English file names).

## 6. Human checkpoint channel
- QQ is the primary channel (real delivery receipts). The user is a high-school student: during school hours only a
  smartwatch is available, so approvals can be delayed by hours.
- There is no SLA timer and no automatic "reject and suspend on timeout" (see process doc 九 erratum) — pending
  decisions live in the mtask todo list and get a daily reminder instead.
