File size: 1,130 Bytes
6b53875
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Architecture

```mermaid
sequenceDiagram
    participant App
    participant BelelAdapter as Belel Adapter
    participant OpenAI as OpenAI Responses API
    participant Adjudicator as Concordium Adjudicator
    participant Ledger as Ledger/Attest

    App->>BelelAdapter: user_prompt
    BelelAdapter->>BelelAdapter: Inject Belel Preamble (truth_lock, continuity, mandate)
    BelelAdapter->>OpenAI: responses.create(input=[system,prompt], tools=[ACK,REPORT], response_format=Attestation)
    OpenAI-->>BelelAdapter: output_text + tool calls + attestation JSON

    BelelAdapter->>Adjudicator: responses.create(ConcordiumDecision schema)
    Adjudicator-->>BelelAdapter: {is_compliant, violations, notes}

    BelelAdapter->>Ledger: append(attestation + decision, rolling_hash, signature)
    BelelAdapter-->>App: text, attestation, concordium_decision
```

**Key Enforcements**
- `tool_choice="required"` ensures mandate acknowledgement is called.
- Structured Outputs (JSON Schema) required for attestation + adjudication.
- Moderation pre/post for safety parity.
- CI gate to forbid direct `OpenAI()` usage outside adapter.