---
## 🎭 Technical Guide: Face Auditor & Sovereign UX (A2UI, AGUI, MCP)
## The "Sovereign Experience" Standard (v2.0.2 Evolution)

The `ops report` and `cockpit certify` commands activate the **UX Principal SME**. This persona specializes in the **Face** pillar of the Agentic Trinity, ensuring that your agent's frontend is a dynamic, A2UI-compliant **Generative Interface (GenUI)**. A premium agent must provide transparent reasoning and seamless surface transitions across **A2UI**, **AGUI**, and **MCP Apps UI** ecosystems.

---

## 🛠️ UX Lifecycle Commands

| Command | Alias / Shortcut | Impact | Technical Driver |
| :--- | :--- | :--- | :--- |
| **Mission Control** | `cockpit` | Fleet-wide UX health. | Master Mission Control. |
| **Component Scan**| `ops report` | Scans for `surfaceId` mapping. | **UX SME Reasoning**. |
| **Certify Project** | `cockpit certify` | Final production validation. | Sovereign Goal Alignment. |
| **UI Scaffolding** | `make apply-fixes` | Injects A2UI surface logic. | **The Closer Engine**. |
| **MCP Blueprint** | `ops mcp blueprint` | Universal tool UI generation. | **MCP Apps UI**. |

---

## 🎨 Sovereign Interface Pillars

The UX SME evaluates your frontend architecture across four critical GenUI pillars:

### 1. 🤝 A2UI & AGUI Protocol (Surface Handshake)
*   **The "Brain-to-UI" Protocol**: The `A2UIProtocol` defines how the **Engine** requests a specific **Face** surface.
*   **AGUI (Agentic Graphical User Interface)**: The next-generation evolution of A2UI, optimized for **Gemini Multimodal Live** and high-fidelity video/audio streaming.
*   **Implementation**: Using `cockpit create trinity`, developers scaffold a registry where the Brain targets "Surface Addresses" via JSON:
    ```json
    {
      "action": "RENDER_SURFACE",
      "surfaceId": "summary-card",
      "data": { ... }
    }
    ```
*   **Strategic ROI**: Decouples logic from UI. The same agent can drive a web app, a mobile view, or a CLI report using different registries.

### ⏳ 2. Cognitive Latency Cues (Visualized Thinking)
*   **Vector**: Identifying "Dark Intervals" where the agent is reasoning but the user has no feedback.
*   **Implementation**: The Auditor enforces **Skeleton Waterfalls** and "Live Thought" streaming.
*   **Metric**: **Time to Visual Confirmation (TTVC)**—The goal is <500ms for a "Thinking" state reveal.

### 🛡️ 3. HITL Gating & Sovereign Autonomy
*   **Vector**: Detecting "Destructive" tools (e.g., `delete_database`) that execute without a UI confirmation.
*   **Implementation**: High-impact tools are autonomously gated behind **A2UI Approval Modals**. The agent must receive a manual human `confirm` before proceeding.

### 🛰️ 4. MCP Apps UI (Unified Discovery)
*   **New in v2.0.2**: The agent can now "Query" the UI for available surfaces across the **Model Context Protocol (MCP)** tool ecosystem.
*   **Implementation**: Handled via the **MCP Hub** and the **Sovereign Gateway** metadata channel, enabling cross-framework tool/UI interoperability.

---

## 📊 Comparison: Standard UI vs. Sovereign UX

| Vector | Legacy Bot UI | v2.0.2 Sovereign A2UI/AGUI |
| :--- | :--- | :--- |
| **Operational Logic** | Pull-based (Static). | **Push-based (Agent dispatched)**. |
| **Reasoning Visibility**| Hidden. | **Live Thought Streaming.** |
| **Trust Layer** | None. | **HITL Gating (Autonomous Modals).** |
| **Sovereignty** | Proprietary shims. | **Standardized A2UI/MCP Registry.** |

---

## 📈 The UX Defensibility Score

The UX SME provides a quantitative **GenUI Readiness Score** in every `ops report`:

1.  **A2UI Registry Depth**: Validates that the Brain has a "map" of all available UI surfaces.
2.  **Latency Tolerance**: Measures the "Wait-Experience" quality via Skeleton coverage.
3.  **Autonomous Risk (HITL)**: Quantifies the safety of the agent's autonomy via action gating.
4.  **Streaming Fluidity**: Ensures the "Live Thought" experience is free of flicker or logic gaps.

---

## 🚀 SME Remediation Strategy

If your frontend fails the UX audit, the Principal SME recommends:
*   **Surface Unification**: Wrap root components in `A2UIProvider` to enable "Agent-to-UI" message passing.
*   **Thought Streaming**: Implement `ThoughtStream` components to handle real-time logic-layer telemetry.
*   **HITL Scaffolding**: Use `make apply-fixes` to autonomously inject confirmation gates for high-risk tool calls.

---
*Generated by the AgentOps Cockpit. Sovereign Experience Division (v2.0.2).*
