Architecture¶
Two phases (DESIGN D10): annotate decides and proposes (no writes); apply writes the
accepted AVUs to iRODS through mesa-mcp's shared helpers and records one mesa-ducklake
snapshot per run and path. Decisions are written to the sidecar before any iRODS write.
Layers: backends (AnyJev's protocol: fake, gateway, local weights, composite) below
providers (DecisionRecord with level and calibration) below the pipeline; the planner is a
separate role that only proposes. mesa_mcp.ols provides the OLS client and the canonical
AVU transform; mesa_ducklake.DuckLakeClient records snapshots.
The code map is in CLAUDE.md; the decisions in DESIGN.md; the facts in RESEARCH.md.
Service and tools (M4)¶
service.py holds the collaborators (provider, planner, OLS layer, policy, store) behind one
lock with a bounded wait (policy.max_wait_s; a busy decider degrades to
decider_unavailable instead of queueing), and owns the human-feedback path. The CLI and
the mesa_decide_* tools (mcp_tools/) both build on it; chooser.py answers mesa-mcp's
own picker. See MCP tools.