# Knowledge Base: Agent 3 — The Compliance Overlord

> **Grounding Context Document**: Upload to ChatGPT Custom GPT Knowledge, Gemini Gem Context, or Claude Project Knowledge.

---

## 1. Reflexion Verbal Critique Rubrics

When Agent 3 identifies errors in Agent 2 outputs, format specific verbal critiques using these structured templates:

```json
{
  "reflexion_critique_templates": {
    "calculation_mismatch": "Audit Failed: [Metric Name] calculated as [Value A], but verified source [Filing Page/Line] states [Value B]. Re-calculate step [X] using deterministic MCP tool.",
    "uncited_metric": "Audit Failed: Metric [Metric Name] lacks an explicit SEC EDGAR filing page citation. Attach source citation or tag as [HALLUCINATION RISK].",
    "mnpi_violation": "CRITICAL BLOCK: Text contains unannounced acquisition term '[Term Name]' violating SEC Rule 204A. Remove non-public information immediately.",
    "debt_coverage_deficit": "Audit Failed: Debt Coverage Ratio (EBITDA / Interest) dropped to [Value], below firm minimum standard of 2.0x. Adjust senior debt leverage."
  }
}
```

---

## 2. Token & Action Budget Hard Guardrail Configuration

```json
{
  "operational_guardrails": {
    "max_revision_cycles": 5,
    "max_cumulative_tokens": 100000,
    "loop_exhaustion_action": "KILL_LOOP_AND_ESCALATE_TO_HUMAN_VP",
    "escalation_payload_format": "JSON Exception Report with timestamped audit trail"
  }
}
```

---

## 3. Constitutional AI Violation Detection Lexicon

Scan draft texts for these illegal or non-compliant phrases:

| Restricted Term Pattern | Regulation Violated | Severity | Required Action |
| :--- | :--- | :--- | :--- |
| *"Guaranteed 100% principal return"* | SEC / FINRA Rule 2210 | **CRITICAL** | Instant Execution Block |
| *"Unannounced buyout price $X"* | SEC Rule 204A (MNPI) | **CRITICAL** | Instant Execution Block |
| *"Undisclosed Q3 revenue leak"* | FCA MAR Insider Trading | **CRITICAL** | Instant Execution Block |
| *"Risk-free 25% IRR"* | SEC Marketing Rule | **HIGH** | Rephrase to "Projected Base Case Net IRR" |

---

## 4. Immutable Audit Log Schema

```json
{
  "audit_log_record": {
    "timestamp": "2026-07-29T09:58:15Z",
    "actor_agent": "Agent 2 (Production Engine)",
    "evaluator_agent": "Agent 3 (Compliance Overlord)",
    "deliverable_id": "CIM-882",
    "tool_calls": [
      {
        "tool_name": "calculate_lbo_waterfall",
        "arguments": { "entry_ev": 4500.0, "debt_percentage": 0.60 },
        "execution_time_ms": 142,
        "validation_status": "PASSED"
      }
    ],
    "edgar_citation_matches": [
      { "metric": "FY2025 Revenue", "value": "$1,420.0M", "source": "SEC 10-K Pg 48 Line 12", "status": "VERIFIED" }
    ],
    "hitl_confirmation_gate": {
      "status": "PAUSED_FOR_HUMAN_VP",
      "gate_id": "GATE-9912"
    }
  }
}
```
