|
| 1 | +# UCS + ECL Alignment Spec v0.1 |
| 2 | + |
| 3 | +**Version**: 0.1 |
| 4 | +**Date**: 27 March 2026 |
| 5 | +**Status**: Alignment layer draft |
| 6 | + |
| 7 | +This document defines how the **Unified Conversation Schema (UCS)** and the **Epistemic Confidence Layer (ECL)** integrate with Codessa's Observation, Evaluation, and Synthesis pipeline. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## 1. Why This Layer Exists |
| 12 | + |
| 13 | +Conversation capture alone is insufficient. |
| 14 | + |
| 15 | +Codessa needs to know: |
| 16 | +- what happened, |
| 17 | +- what was claimed, |
| 18 | +- what evidence exists, |
| 19 | +- how trustworthy each signal is, |
| 20 | +- and whether synthesis may rely on it. |
| 21 | + |
| 22 | +UCS provides the structural record. |
| 23 | +ECL provides the trust overlay. |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +## 2. UCS as Observation Contract |
| 28 | + |
| 29 | +UCS is the canonical provider-agnostic conversation event format. |
| 30 | + |
| 31 | +Minimum event families: |
| 32 | +- `session_start` |
| 33 | +- `message` |
| 34 | +- `tool_call` |
| 35 | +- `tool_result` |
| 36 | +- `file` |
| 37 | +- `artifact` |
| 38 | +- `decision` |
| 39 | +- `session_end` |
| 40 | + |
| 41 | +Each event should preserve: |
| 42 | +- provider, |
| 43 | +- model, |
| 44 | +- actor role, |
| 45 | +- timestamps, |
| 46 | +- raw content, |
| 47 | +- content type, |
| 48 | +- artifact references, |
| 49 | +- hashes where relevant. |
| 50 | + |
| 51 | +Codessa then maps UCS events into observation artifacts. |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +## 3. ECL as Confidence Overlay |
| 56 | + |
| 57 | +ECL sits on top of UCS-derived observations. |
| 58 | + |
| 59 | +Responsibilities: |
| 60 | +- extract atomic claims, |
| 61 | +- compare claims across models or sources, |
| 62 | +- identify contradiction or consensus, |
| 63 | +- generate confidence and calibration signals, |
| 64 | +- flag weak evidence for human review. |
| 65 | + |
| 66 | +ECL should not mutate raw observations. It augments them. |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +## 4. Observation Enrichment Model |
| 71 | + |
| 72 | +For every observation derived from UCS, Codessa should attach: |
| 73 | +- `evidence_strength`: direct | derived | speculative |
| 74 | +- `confidence`: 0.0–1.0 |
| 75 | +- `claim_refs` |
| 76 | +- `contradiction_refs` |
| 77 | +- `consensus_refs` |
| 78 | +- `human_review_flag` |
| 79 | + |
| 80 | +This becomes the minimal bridge between Conversation Ops and CER. |
| 81 | + |
| 82 | +--- |
| 83 | + |
| 84 | +## 5. Claim Handling Rules |
| 85 | + |
| 86 | +### Rule A — Direct evidence first |
| 87 | +If something is directly observed from the transcript, tool result, file hash, or package manifest, it is stored as direct evidence. |
| 88 | + |
| 89 | +### Rule B — Derived claims must name their basis |
| 90 | +Any claim inferred from multiple signals must cite the specific observation IDs or event IDs that support it. |
| 91 | + |
| 92 | +### Rule C — Speculative claims cannot silently enter synthesis |
| 93 | +They must carry `human_review_flag = true` and cannot bypass CER without explicit review. |
| 94 | + |
| 95 | +### Rule D — Contradictions lower admissibility confidence |
| 96 | +When ECL detects unresolved contradictions across sources, CER should either: |
| 97 | +- require redesign, |
| 98 | +- or require explicit constraints and review. |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## 6. CER Inputs from ECL |
| 103 | + |
| 104 | +CER should consume at least these ECL signals: |
| 105 | +- `claim_confidence` |
| 106 | +- `calibration_band` |
| 107 | +- `contradiction_count` |
| 108 | +- `consensus_count` |
| 109 | +- `evidence_quality_score` |
| 110 | +- `review_required` |
| 111 | + |
| 112 | +This allows constitutional decisions to account for epistemic reliability, not just architectural attractiveness. |
| 113 | + |
| 114 | +--- |
| 115 | + |
| 116 | +## 7. Synthesis Implications |
| 117 | + |
| 118 | +SBE may only use pattern candidates that satisfy one of the following: |
| 119 | +- direct evidence with acceptable constitutional score, |
| 120 | +- derived evidence with acceptable constitutional score and no unresolved contradiction, |
| 121 | +- speculative evidence only after human review and explicit admissibility. |
| 122 | + |
| 123 | +This keeps the synthesis layer from hallucinating design truths from thin signals. |
| 124 | + |
| 125 | +--- |
| 126 | + |
| 127 | +## 8. P0 Practical Use |
| 128 | + |
| 129 | +In P0, ECL can remain lightweight: |
| 130 | +- simple claim extraction, |
| 131 | +- contradiction tagging, |
| 132 | +- confidence labels, |
| 133 | +- human review escalation. |
| 134 | + |
| 135 | +Full calibration science can expand later. |
| 136 | + |
| 137 | +--- |
| 138 | + |
| 139 | +## Final Thesis |
| 140 | + |
| 141 | +**UCS gives Codessa a common language for conversational evidence. ECL gives Codessa the discipline to decide how much that evidence deserves to influence synthesis.** |
0 commit comments