# M1 — Reactive Copilot

**Priority:** P0  
**Target date:** ~April 1, 2026 (Wednesday)  
**Duration:** ~6 days from March 26  
**Source:** [MOM 20260326](../phase-2/conversations/20260326-mom.md#act-iii--m1--m2--m3-milestones-locked-visualization-framework-priorities-0032--0057)

---

## Objective

Deliver a **reactive copilot** with base visualization patterns and the redesigned UI connected to the Invictus/Tata Steel data source. This is the foundational user-triggered Q&A mode that orchestrates multiple agents to synthesize answers with visual outputs.

---

## What Ships

### Functional Deliverables

- **Reactive copilot mode:** User asks question → system orchestrates agents → returns visual + textual answer
- **Multi-agent orchestration:** Queries routed through RT core agent to data source agents (not single-source)
- **Visual outputs:** Interactive charts, drill-downs, not just text responses
- **Redesigned UI:** New patterns from design team integrated (code, not Figma)
- **Invictus/Tata Steel data source:** Connected, queryable, trained data agent

### Technical Components

- RT core agent functioning as hub:
  - User identity management
  - Question mode detection (ad hoc, training, data refresh)
  - Routing to user-aware and data source agents
- Data source agent skeleton ready:
  - Manual training possible at developer level
  - Entity-specific agents (Invictus, Cautilia) can be created
- Base visualization patterns operational

---

## Known Gaps (Accepted Technical Debt)

1. **Orange box missing:**
   - PostgreSQL database for system prompts/instructions not built
   - Current state: prompts hardcoded in Python
   - Impact: Less flexible, harder to update agent instructions
   - Mitigation: Deliver with embedded strings; refactor post-M1

2. **Orchestration wiring incomplete:**
   - Broader orchestration being stitched together
   - Architectural databases not fully set up
   - Impact: "Plumbing" delivery, not polished architecture
   - Mitigation: Focus on functional demo, not production-grade infrastructure

3. **Deferred RT core capabilities:**
   - Cross-source snapshot synthesis
   - RBAC for daily org data storage
   - Integration with two red boxes + one pink box
   - These are explicitly moved to M3

---

## Parallel Workstreams

### Workstream 1: UI Integration

**Owner:** TBD (UI team + Yeshwanth)  
**Tasks:**

- Integrate redesigned UI code from Nihar's design team
- Code must be ready (not Figma mockups)
- Connect UI components to RT core agent API
- Implement base visualization patterns (charts, tables, etc.)
- Test interactive drill-downs and chart interactions

**Dependencies:**

- UI code delivery from design team
- API contracts from backend team

---

### Workstream 2: Data Source Preparation

**Owner:** TBD (Data team + Yeshwanth)  
**Tasks:**

- Prepare Invictus/Tata Steel data set
- Train data source agent on Invictus schema
- Verify data agent can answer domain-specific queries
- Test multi-agent routing (user query → RT core → data agent → response)
- Validate visual output generation from data queries

**Dependencies:**

- Access to Invictus data
- Data agent training framework operational

---

## Definition of Done

✅ **Functional:**

- [ ] User can ask a business question through the UI
- [ ] System routes question to appropriate data source agent(s)
- [ ] Response includes both text explanation and visual component (chart/table)
- [ ] Interactive elements work (drill-down, hover, filter)
- [ ] Invictus data queries return accurate results

✅ **Technical:**

- [ ] RT core agent successfully routes queries to data source agents
- [ ] User-aware agent tracks identity and preferences
- [ ] Data source agent responds to Invictus-specific queries
- [ ] Redesigned UI code integrated and functional
- [ ] Base visualization patterns render correctly

✅ **Documentation:**

- [ ] Communication modes document updated (multi-agent orchestration + visual outputs)
- [ ] API contracts documented for UI ↔ RT core agent
- [ ] Known technical debt logged for post-M1 resolution

---

## Success Criteria

**Demo scenario:**

1. CXO logs into Enterprise Brain
2. Asks: _"What are the top 3 production bottlenecks in Invictus this month?"_
3. System:
   - Routes query to Invictus data agent
   - Agent queries data, identifies bottlenecks
   - RT core synthesizes response
   - UI renders: text summary + bar chart + drill-down table
4. CXO clicks on a bottleneck → detailed view appears

**Quality bar:**

- Response time < 10 seconds for simple queries
- Visual accuracy matches data source
- UI responsive and intuitive
- No crashes or error states during demo

---

## Risks & Mitigations

| Risk                               | Likelihood | Impact   | Mitigation                                                       |
| ---------------------------------- | ---------- | -------- | ---------------------------------------------------------------- |
| UI code delivery delayed           | Medium     | High     | Daily check-ins with design team; fallback to basic UI if needed |
| Data agent training incomplete     | Medium     | High     | Scope down to 3-5 key query types; expand post-M1                |
| Orchestration wiring breaks        | Low        | Critical | Dedicated integration testing before demo                        |
| Orange box absence blocks progress | Low        | Medium   | Already mitigated; hardcoded prompts acceptable for M1           |

---

## Post-M1 Cleanup

Once M1 ships, immediately address:

1. Refactor hardcoded prompts into orange box (PostgreSQL)
2. Complete orchestration wiring for production
3. Set up architectural databases properly
4. Document technical debt for M2/M3 sprints

---

## Related Work

**Todos from MOM:**

- [x] Update communication modes document (multi-agent orchestration + visual outputs) — Yeshwanth
- [ ] Grant Yeshwanth access to UI pattern code repository — This week
- [ ] Ask Nihar's team to share UI generation prompts with Yeshwanth — This week

**Related milestones:**

- [M2 — Dynamic Workspace](M2-dynamic-workspace.md) — Builds on M1 with AI-driven UI
- [M3 — Full Experience Center](M3-full-experience-center.md) — Completes vision with proactive mode

**Related docs:**

- [User Interaction Modes](user-interaction-modes.md) — Reactive vs proactive framing
- [Data Flow Understanding](../phase-2/data-flow-understaning.md) — Architecture context

---

**Last updated:** March 27, 2026
