Story-2140 Walkthrough

Change: RFD-AGT-007 Story G (Epic-2021 final story). Atlas is demoted to the workspace-level Dock agent only; its matter-scoped surfaces (intake wizard, matter chat, span-command, reframe, staleness, explain) are retired to Mira (converse + command) and to Vega (ambient reframe). This PR is the pramaan-agents code cutover. The matter-facing chat + frame-edit traffic flip is a broker/infra action (see §Live evidence).

Scope boundary. Workspace-level Atlas (the Dock: navigate / filter / view / find / server-tool reads) is untouched. Only the matter-scoped routes are removed. Mira already owns converse + command (Stories B–E, merged on main); this story removes Atlas's now-superseded matter code so nothing routes to it.

The core move — Atlas becomes dock-only, matter routes fail closed

The AgentCore entrypoint (agents/atlas/main.py) now serves the single kind="dock_chat" surface. A matter-scoped invoke (the retired intake/chat/reframe/staleness/explain path) is refused before any frame — the ADR-110 "404 the superseded route" demotion, not a compatibility stub:

if payload.get("kind") != "dock_chat":
    raise ValueError(
        "Atlas serves only the workspace Dock (kind='dock_chat'). The matter-scoped "
        "intake/chat/reframe/staleness routes were retired to Mira (Story-2140 / RFD-AGT-007)."
    )

runtime.handle_request is now dock-only; the Bug-1370 boundary watchdog (runtime.stream_invoke) is rewired to emit a Dock terminal (dock_chat._dock_error_turn) instead of the deleted intake turn — the thread-isolated deadline safety is preserved on the surviving path.

What was deleted (no dead routes, no stubs)

AreaRemoved (matter-scope)Kept (workspace Dock)
agent.pythe 5 intake sub-agents + stream_atlas_turn, run_reframe/staleness/explain/reflection, build_intake_input, source_snapshot, _error_turn, intake output-function + completeness gateUsageCollector, _read_run_usage/_capture_usage/_run_kwargs/_raise_if_truncated, _elapsed_ms/_log_run_failed (shared model-call plumbing)
models.py13 intake classes (AtlasIntakeInput, AtlasParty, AtlasProposal, AtlasFrameOutput, AtlasTurn, AtlasReflection*, AtlasExplain/Reframe/Staleness Output, AtlasTrigger, …)all Dock models (DockChatContext, AtlasDockTurn, tool/view/render intents) + AtlasHistoryMessage
runtime.pymatter dispatch, _wrap_proposal/_turn_event/_maybe_reflectDock handlers, build_dock_context, watchdog
prompts/intake/explain/reflect/reframe/staleness.py + _render intake helpersdock_chat.py + fence primitives
events.pyreflection_eventall v1 event builders
tests / evalsintake tests + the intake grounding/streaming eval harness (dataset, evaluators, grounding_*, _streaming_probe, activity_stream_probe, run.py) + dev_prompt_test.pyall Dock/nav/authz/injection-scanner/prompt-leakage/surface-operator gates; test_latency_invariant + test_atlas_stream_watchdog + test_prompt_fence retargeted to the Dock path

Verification — offline (this PR's code rail)

GateResult
ruff check agent_contracts/ tests/ scripts/ + ruff check agents/pass
scripts/check_brain_egress.py (ADR-110 §6 brain purity)clean
scripts/check_prompt_leakage.pyclean
governance unit tests (pytest tests/ -m unit)171 passed
atlas suite507 passed
atlas CI eval gates (authz + surface-operator + injection-scanner + logfire k3 + latency-invariant)75 passed
other agents (framer 120 / registrar 287 / mira 139 / context_judge 16)pass
mira adversarial gate (test_adversarial.py + evals.run adversarial)40 passed; 13 held / 0 invariant failures

Live evidence — ADR-110 rail-by-rail (HONEST STATUS)

A green unit test is NOT cutover proof (AGENTS.md / ADR-110). The matter-chat traffic is served by Mira on staging only once Mira's AgentCore runtime is deployed and the broker matter-surface default is flipped. As of this PR, AgentCore staging (ap-south-1) has runtimes pramaanAgents_{atlas,framer,registrar} — no mira runtime, and the deployed atlas artifact still carries the pre-demotion code. Deploys run via Terraform in pramaan-infra (the agentcore CLI is retired, ADR-109). This PR therefore must merge AFTER the infra deploy lands; live ADR-110 evidence is attached then (by a follow-up), not fabricated now.
Rail (ADR-110)StatusHow it is proven
AgentCore response contract (Atlas demotion)code-provenOffline: test_atlas_entrypoint asserts a non-dock invoke fails closed; watchdog + dock stream pinned. Live: post-deploy, aws bedrock-agentcore invoke-agent-runtime against pramaanAgents_atlas with a matter envelope returns the fail-closed error.
Broker reachability (matter → Mira)gated on deployBroker already speaks Mira (Stories B–E). Post-deploy: broker log shows the matter-surface invoke targeting the Mira runtime; the default-flip lands broker-side.
AgentCore response contract (Mira converse/command)gated on deployPost-deploy smoke: invoke-agent-runtime on pramaanAgents_mira — intent=converse streams turn.delta…turn.completed; intent=command runs Vega's panel → proposed FrameOutput. Logfire service_name='pramaan-agents-mira' shows the invoke_agent spans.
App-side rendergated on deployPost-deploy: matter conversation panel + CCB (Story-F) render Mira's stream / proposed frame diff on the existing ratify rail.
Durable run truthgated on deployPost-deploy: a Mira command proposal persists as a frame version (Story-E rail); Confirm promotes to canonical, Reject discards; stale-base race handled via generation CAS.

Terraform surface the pramaan-infra story needs

This PR adds the mira entry to agentcore/agentcore.json (local-dev manifest parity with framer/registrar; not a deploy authority). The infra story must:

One-line recall: this PR makes the pramaan-agents code the cutover — Atlas is workspace-Dock-only, Mira owns the matter surface — verified offline; the live traffic flip lands with the pramaan-infra deploy + broker default, and the ADR-110 rail evidence is attached then.