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).
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.
| Area | Removed (matter-scope) | Kept (workspace Dock) |
|---|---|---|
agent.py | the 5 intake sub-agents + stream_atlas_turn, run_reframe/staleness/explain/reflection, build_intake_input, source_snapshot, _error_turn, intake output-function + completeness gate | UsageCollector, _read_run_usage/_capture_usage/_run_kwargs/_raise_if_truncated, _elapsed_ms/_log_run_failed (shared model-call plumbing) |
models.py | 13 intake classes (AtlasIntakeInput, AtlasParty, AtlasProposal, AtlasFrameOutput, AtlasTurn, AtlasReflection*, AtlasExplain/Reframe/Staleness Output, AtlasTrigger, …) | all Dock models (DockChatContext, AtlasDockTurn, tool/view/render intents) + AtlasHistoryMessage |
runtime.py | matter dispatch, _wrap_proposal/_turn_event/_maybe_reflect | Dock handlers, build_dock_context, watchdog |
prompts/ | intake/explain/reflect/reframe/staleness.py + _render intake helpers | dock_chat.py + fence primitives |
events.py | reflection_event | all v1 event builders |
| tests / evals | intake tests + the intake grounding/streaming eval harness (dataset, evaluators, grounding_*, _streaming_probe, activity_stream_probe, run.py) + dev_prompt_test.py | all 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 |
| Gate | Result |
|---|---|
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.py | clean |
governance unit tests (pytest tests/ -m unit) | 171 passed |
| atlas suite | 507 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 |
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) | Status | How it is proven |
|---|---|---|
| AgentCore response contract (Atlas demotion) | code-proven | Offline: 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 deploy | Broker 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 deploy | Post-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 render | gated on deploy | Post-deploy: matter conversation panel + CCB (Story-F) render Mira's stream / proposed frame diff on the existing ratify rail. |
| Durable run truth | gated on deploy | Post-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. |
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:
pramaanAgents_mira, CodeZip,
entrypoint main.py, codeLocation agents/mira/, PYTHON_3_12,
ap-south-1. Artifact = the CodeZip closure from
uv export --package mira --no-dev --no-emit-workspace.os.getenv-only; secrets bootstrapped from ARNs at cold start, ADR-121 D3):
OPENROUTER_SECRET_ARN → OPENROUTER_API_KEY (inference, ADR-116)LOGFIRE_SECRET_ARN → LOGFIRE_TOKEN (observability, ADR-118; optional — absent = no-op)secretsmanager:GetSecretValue scoped to Mira's own two ARNs onlyllm.yaml/code, no baked model ids): MIRA_<ROLE>_MODEL, MIRA_CACHE_<SEAT>, MIRA_CALL_TIMEOUT_S (150), MIRA_CONVERSE_ATTEMPT_TIMEOUT_S (20), MIRA_INVOKE_BUDGET_S (780), MIRA_REGION/AWS_REGIONagents/atlas/ code
in this PR must ship — the currently-deployed Atlas still serves matter routes, so the
cutover is incomplete until the new Atlas CodeZip replaces it.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.