18 file(s), +1217 / -73 lines
| Path | Role | + | - |
|---|---|---|---|
| messages/en.json | Config | +41 | -0 |
| messages/hi.json | Config | +41 | -0 |
| src/components/matter-detail/brief/brief-mira-ccb.tsx | Component | +47 | -0 |
| src/components/matter-detail/brief/matter-brief-page.tsx | Component | +35 | -0 |
| src/components/matter-detail/brief/matter-brief-sections.tsx | Component | +12 | -0 |
| src/components/matter-detail/ccb/mira-control-bar.stories.tsx | Component | +72 | -11 |
| src/components/matter-detail/ccb/mira-control-bar.tsx | Component | +136 | -62 |
| src/components/matter-detail/ccb/mira-conversation-panel.stories.tsx | Component | +123 | -0 |
| src/components/matter-detail/ccb/mira-conversation-panel.tsx | Component | +220 | -0 |
| src/components/matter-detail/ccb/mira-descriptor.ts | Component | +53 | -0 |
| src/components/matter-detail/ccb/mira-matter-dock.stories.tsx | Component | +35 | -0 |
| src/components/matter-detail/ccb/mira-matter-dock.tsx | Component | +64 | -0 |
| src/components/matters/matter-shell-chrome.tsx | Component | +15 | -0 |
| src/lib/agents/atlas-rail-store.ts | Library | +51 | -0 |
| src/lib/agents/atlas-rail.ts | Library | +31 | -0 |
| src/lib/agents/mira-rail.ts | Library | +95 | -0 |
| src/lib/agents/use-mira-command-rail.ts | Library | +74 | -0 |
| src/lib/agents/use-mira-conversation-rail.ts | Library | +72 | -0 |
Mira is the head of one matter (RFD-AGT-007). She talks — a matter-scoped streaming chat that replaces Atlas's matter-facing surface (§5.2) — and she does — a scoped command that runs Vega's panel and lands a proposed frame edit for counsel to Confirm/Reject (§5.1). This story builds both app surfaces against the frozen §5.1/§5.2 contract, reusing every existing primitive: the agent-agnostic ACP substrate, the agent-agnostic broker WS rail, and — critically — the existing Brief frame ratify rail. No new ratify surface is introduced.
mira-descriptor.ts) — a
localized AgentDescriptor (name Mira, role
Matter Expert, the vendored
/agent-avatars/mira-matter-expert.png). Mira renders through
the same substrate as Atlas, so the panel is pure composition.
reduceFrame the Atlas dock uses. mira-rail.ts
adds the launch/query builders; atlas-rail-store.ts adds the
two Mira connections. The shared reducer gains one converse-only field,
suggestedCommand (the "Do it" tail, §2.3), exactly mirroring
the existing dock-only fields.
mira-control-bar.tsx) — the approved
Storybook prototype promoted to live: i18n (en + hi), a wired
onSubmitCommand, and states bar → command → working →
proposed / failed with the same AnimatePresence + MICRO_TRANSITION
motion. On a settled command it confirms the edit is on the Brief field's
rail — it never renders its own accept/reject (AC: no new ratify surface).
mira-conversation-panel.tsx) — the ACP
(AgentChatPanel + AgentComposer) composed with
Mira's identity and the converse rail: streamed markdown replies, a live
thinking indicator, and the "Do it" escalation chip that
fires an intent:"command" run. Split into a pure
MiraConversationView (Storybook-driven) and the rail-wired
MiraConversationPanel.
onMira hook on
EditableFieldWithHistory) opens the CCB scoped to that field.
The command fires over the Mira command rail; the broker persists the
result as a proposed frame version (Story-E), and on settle the
Brief is invalidated so the field shows provenance="proposed"
with its existing Confirm/Reject. brief-mira-ccb.tsx owns the
floating CCB + the command rail; matter-brief-page.tsx threads
onMira through the Dispute / Counsel-read sections.
mira-matter-dock.tsx) opens the conversation panel
as an animated overlay drawer, mounted once in
matter-shell-chrome.tsx for the whole matter subtree.
Mira namespace in
messages/en.json AND messages/hi.json (33 keys
each, at parity). No user-facing literal in src/**.
| AC | Where |
|---|---|
| Converse about a matter, replies stream in | Conversation panel + converse rail; Storybook MiraConversationPanel → Conversation / Streaming |
| Scoped command → proposed edit on the existing rail (Confirm/Reject) | Brief gutter onMira → CCB → command rail → Brief invalidate → field provenance="proposed" |
| "Do it" escalation fires a command | suggestedCommand tail → panel chip → useMiraCommandRail.run(scope, text) |
| No new ratify surface; Mira identity + avatar; i18n both locales | CCB routes ratify to the Brief rail; mira-descriptor.ts; en + hi at parity |
| Storybook for panel + CCB states, incl. motion | 3 story files; Live + Motion (CCB), WithDoIt (panel), dock enter/exit |
| File | Change |
|---|---|
src/components/matter-detail/ccb/mira-descriptor.ts | new — localized Mira AgentDescriptor |
src/components/matter-detail/ccb/mira-control-bar.tsx | prototype → live (i18n, wired command, ratify via Brief rail) |
src/components/matter-detail/ccb/mira-conversation-panel.tsx | new — view + rail-wired container (Do-it chip) |
src/components/matter-detail/ccb/mira-matter-dock.tsx | new — floating "Ask Mira" + overlay drawer |
src/components/matter-detail/ccb/*.stories.tsx | CCB (rewritten), conversation panel (new), dock (new) |
src/components/matter-detail/brief/brief-mira-ccb.tsx | new — Brief command entry (floating CCB + command rail) |
src/components/matter-detail/brief/matter-brief-page.tsx | wire onMira gutter → CCB; invalidate on proposed |
src/components/matter-detail/brief/matter-brief-sections.tsx | thread onMira to the editable fields |
src/components/matters/matter-shell-chrome.tsx | mount the Mira dock + live panel once for the matter subtree |
src/lib/agents/mira-rail.ts | new — converse/command WS launch + query builders (§5.1/§5.2) |
src/lib/agents/use-mira-conversation-rail.ts | new — the streaming converse hook |
src/lib/agents/use-mira-command-rail.ts | new — the command hook (settle → Brief invalidate) |
src/lib/agents/atlas-rail.ts | suggestedCommand on the shared reducer (converse tail) |
src/lib/agents/atlas-rail-store.ts | two Mira connections on the agent-agnostic machinery |
messages/en.json, messages/hi.json | new Mira namespace (33 keys, at parity) |
pnpm typecheck — clean.pnpm lint — clean on the touched files.pnpm test — 164 passed (incl. the extended atlas-rail reducer).pnpm build — Compiled successfully.#356 issue-ref in a comment); en/hi Mira parity 33/33.MatterDetail/MiraControlBar (Bar, Command,
Working, Proposed, Failed, Live, Motion),
MatterDetail/MiraConversationPanel (Empty, Conversation,
Streaming, WithDoIt), MatterDetail/MiraMatterDock
(open/close drawer motion).
Per ADR-110, broker readiness is kept separate from surface readiness, and
this boundary is not provable live from this repo today: the
broker's Mira intent:"converse"/"command" routing lands with the
Atlas cutover (RFD Story-G), and the brain (pramaan-agents Stories A–D) is not
yet on AgentCore staging. The RFD explicitly scoped Story-F to build against a
stub. So: the app surfaces + rail are wired against the FROZEN §5.1/§5.2
input shape (mira block, current_frame/
documents broker-assembled per §5.1), and go live the moment the
broker routes Mira. The seam to confirm is the outer WS
client-message envelope (agentKey/kind), which
mirrors the dock's buildDockChatLaunch convention pending the
broker's Mira WebSocketClientMessage. Streamed-markdown replies
render as whitespace-preserving text today (matching the Atlas dock's current
behaviour); rich-markdown rendering is the shared live-rail follow-up.