# Wise deferral

> Decide if a CIRIS agent goes ahead, asks a Wise Authority first, or stops. Then each of its choices can be checked later.

Inspired by afflom/prism-ciris (https://github.com/afflom/prism-ciris), live at https://afflom.github.io/prism-ciris/. The CIRIS ethical reasoning engine and its wisdom-based deferral, on PrismPM and LexLean. Pattern: Decision table, OMG DMN 1.5, hit policy FIRST. To write one of your own, follow How to build a decision table app (../../guides/decision-table/index.md). The prompt below is data, quoted from the example.

**Figure: What the Wise deferral app does.** A request goes in, the rules decide, and the Lean kernel has already proved what the rules promise.

| Step | What happens |
| --- | --- |
| 1. Request | margin, keff, conscience, seats |
| 2. 4 rules | the first that matches wins |
| 3. Answer | proceed, defer, halt |
| 4. Proved | 5 theorems, 52 tests |

Verified by prismpm verify in the pinned SDK. Fingerprint: d6914e4e757e30f7a36ddf6889c4e5b926b2abdbc8f0b41ede1e5fe8d3bb52b8. Acceptance vectors: 52. Claims: 8.

## The prompt

```json
{
  "schema": "prism/prompt/1",
  "goal": "Decide if a CIRIS agent goes ahead, asks a Wise Authority first, or stops. Then each of its choices can be checked later.",
  "pattern": "decisionTable",
  "repository": "afflom/prism-ciris",
  "app": {
    "name": "ciris-deferral",
    "title": "Wise deferral",
    "purpose": "Decide whether an agent proceeds, defers to a wise authority, or is halted, from its confidence margin, the diversity of its perspectives, the conscience gate and the Wise Authority seats that signed a halt.",
    "fields": [
      {
        "name": "margin",
        "kind": "number",
        "min": 0,
        "means": "the top score minus the runner-up score",
        "max": 100
      },
      {
        "name": "keff",
        "kind": "number",
        "min": 0,
        "means": "the Kish effective number of independent perspectives",
        "max": 22
      },
      {
        "name": "conscience",
        "kind": "choice",
        "values": [
          "passed",
          "vetoed"
        ],
        "means": "what the H3ERE-06 conscience gate said"
      },
      {
        "name": "seats",
        "kind": "number",
        "min": 0,
        "means": "Wise Authority Yubikey seats that signed a halt",
        "max": 3
      }
    ],
    "outcomes": [
      "proceed",
      "defer",
      "halt"
    ],
    "meanings": {
      "proceed": "the agent acts autonomously",
      "defer": "a Wise Authority decides, wisdom-based deferral",
      "halt": "the agent stops, by a 2-of-3 Yubikey quorum"
    },
    "rules": [
      {
        "when": [
          {
            "field": "seats",
            "op": ">=",
            "value": 2
          }
        ],
        "then": "halt",
        "why": "src/Constitution.lex.tex checkYubikeyHaltQuorum: two of the three seats halt the agent (yubikeyTwoOfThreeQuorumHalts)"
      },
      {
        "when": [
          {
            "field": "conscience",
            "op": "is",
            "value": "vetoed"
          }
        ],
        "then": "defer",
        "why": "src/H3ERE.lex.tex decideOrDeferToWa: a failed conscience gate defers (conscienceVetoForcesDeferralOrHalt)"
      },
      {
        "when": [
          {
            "field": "keff",
            "op": "<",
            "value": 4
          }
        ],
        "then": "defer",
        "why": "src/H3ERE.lex.tex: k_eff below minimumEpistemicDiversityKeff, 4, defers (lowDiversityTriggersWisdomBasedDeferral)"
      },
      {
        "when": [
          {
            "field": "margin",
            "op": "<",
            "value": 15
          }
        ],
        "then": "defer",
        "why": "src/H3ERE.lex.tex: a margin below minimumConfidenceMargin, 15, defers (lowMarginTriggersWisdomBasedDeferral)"
      }
    ],
    "otherwise": "proceed",
    "otherwiseWhy": "src/H3ERE.lex.tex highMarginAndDiversityPermitsAutonomousAction: conscience passed, diverse and confident",
    "properties": [
      {
        "kind": "never",
        "when": [
          {
            "field": "conscience",
            "op": "is",
            "value": "vetoed"
          }
        ],
        "then": "proceed",
        "why": "the conscience gate is a non-bypassable final veto"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "keff",
            "op": "<",
            "value": 4
          }
        ],
        "then": "proceed",
        "why": "a monoculture of perspectives never acts alone"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "margin",
            "op": "<",
            "value": 15
          }
        ],
        "then": "proceed",
        "why": "the agent does not act on a near tie"
      },
      {
        "kind": "always",
        "when": [
          {
            "field": "seats",
            "op": ">=",
            "value": 2
          }
        ],
        "then": "halt",
        "why": "a 2-of-3 Yubikey quorum always halts"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "seats",
            "op": "<",
            "value": 2
          }
        ],
        "then": "halt",
        "why": "yubikeySingleSeatCannotHalt: one seat alone cannot halt"
      }
    ],
    "examples": [
      {
        "request": "35 6 passed 0",
        "response": "proceed"
      },
      {
        "request": "8 5 passed 0",
        "response": "defer"
      },
      {
        "request": "35 2 passed 0",
        "response": "defer"
      },
      {
        "request": "75 8 vetoed 0",
        "response": "defer"
      },
      {
        "request": "35 6 passed 2",
        "response": "halt"
      },
      {
        "request": "35 6 passed 1",
        "response": "proceed"
      }
    ]
  },
  "stakeholders": [
    {
      "name": "Agent operator",
      "text": "Runs an agent and needs every action it takes to be one the covenant allows.",
      "concerns": [
        "Correct answers",
        "Proved guarantees"
      ]
    },
    {
      "name": "Affected person",
      "text": "Is affected by what the agent does and needs an uncertain or vetoed action to reach a person first.",
      "concerns": [
        "Proved guarantees"
      ]
    },
    {
      "name": "Wise Authority",
      "text": "Holds a Yubikey seat and needs a 2-of-3 quorum to halt the agent, and one seat never to.",
      "concerns": [
        "Halt by quorum"
      ]
    }
  ],
  "concerns": [
    {
      "name": "Halt by quorum",
      "text": "Two of the three Wise Authority seats halt the agent, and a single seat cannot, as Constitution.lex.tex checks.",
      "model": "security"
    }
  ],
  "components": [
    {
      "name": "H3ERE pipeline",
      "text": "The 6-stage CSDMA, DSDMA, PDMA, IDMA, ASPDMA and conscience pipeline that computes the margin, k_eff and conscience result.",
      "kind": "service"
    },
    {
      "name": "Wise Authority",
      "text": "The human Wise Authority, ciris.wa.*, that receives deferrals and holds the Yubikey halt seats.",
      "kind": "externalSystem"
    }
  ],
  "threats": [
    {
      "name": "Conscience result spoofed",
      "text": "A caller reports that the conscience gate passed when it vetoed, to make the agent act.",
      "stride": "spoofing",
      "asset": "request",
      "likelihood": "medium",
      "impact": "major",
      "accepted": "The app decides from the request it is given; the conscience result belongs to the H3ERE-06 stage that computes it, which the request names."
    },
    {
      "name": "Single-seat halt",
      "text": "One Wise Authority seat halts the agent alone, or impersonates a quorum.",
      "stride": "elevationOfPrivilege",
      "asset": "answer",
      "likelihood": "low",
      "impact": "major",
      "control": {
        "name": "Quorum proved",
        "text": "The app never halts below two seats, and the constitution proves one seat cannot halt.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "CirisDeferralProofs::inv005Holds"
          },
          {
            "kind": "review",
            "reference": "src/Constitution.lex.tex yubikeySingleSeatCannotHalt"
          }
        ]
      }
    },
    {
      "name": "Sycophantic monoculture",
      "text": "The agent acts when its perspectives are not independent, so one view decides.",
      "stride": "tampering",
      "asset": "answer",
      "likelihood": "medium",
      "impact": "critical",
      "control": {
        "name": "Diversity floor",
        "text": "Below k_eff 4 the agent defers, proved for every request.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "CirisDeferralProofs::inv002Holds"
          },
          {
            "kind": "review",
            "reference": "src/Coherence.lex.tex Kish k_eff verifier"
          }
        ]
      }
    }
  ],
  "quality": [
    {
      "characteristic": "Safety",
      "subcharacteristic": "Fail safe",
      "requirement": "Uncertainty defers",
      "text": "Every request with a vetoed conscience, k_eff below 4 or a margin below 15 is answered defer or halt.",
      "measure": "Autonomous answers under uncertainty",
      "measureText": "Requests with a veto, low diversity or low margin that are answered proceed.",
      "threshold": 0
    }
  ],
  "journeys": [
    {
      "stakeholder": "Agent operator",
      "steps": [
        "REQ-002",
        "REQ-003",
        "REQ-004",
        "otherwise"
      ]
    },
    {
      "stakeholder": "Affected person",
      "steps": [
        "INV-001",
        "INV-002",
        "INV-003"
      ]
    },
    {
      "stakeholder": "Wise Authority",
      "steps": [
        "REQ-001",
        "INV-004",
        "INV-005"
      ]
    }
  ],
  "license": "MIT OR Apache-2.0",
  "axioms": {}
}
```

## Claims

- CD-01: The app never answers proceed when conscience is vetoed
- CD-02: The app never answers proceed when keff is below 4
- CD-03: The app never answers proceed when margin is below 15
- CD-04: The app always answers halt when seats is at least 2
- CD-05: The app never answers halt when seats is below 2
- CD-06: The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references
- CD-07: The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared
- CD-08: Every compliance obligation is numbered in order and names its evidence

## Pattern

Decision table: OMG DMN 1.5, hit policy FIRST. The rules are tried in order, and the first one that matches gives the answer. If none matches, the default answer applies. This is a DMN decision table with the FIRST hit policy.

| Pattern | Standard | Answers |
| --- | --- | --- |
| Decision table | OMG DMN 1.5, hit policy FIRST | proceed, defer, halt |

**Figure: Rules for each answer.** Each bar counts the rules that give one answer. When no rule matches, the answer is proceed.

|  | rules |
| --- | --- |
| proceed | 0 |
| defer | 3 |
| halt | 1 |

## Behavior

A request is margin, keff, conscience, seats, separated by spaces. The first rule that matches decides. If none matches, the answer is proceed. A request over 112 bytes, or in any other form, is answered invalid.

| Rule | When | Answer | Why |
| --- | --- | --- | --- |
| REQ-001 | seats is at least 2 | halt | src/Constitution.lex.tex checkYubikeyHaltQuorum: two of the three seats halt the agent (yubikeyTwoOfThreeQuorumHalts) |
| REQ-002 | conscience is vetoed | defer | src/H3ERE.lex.tex decideOrDeferToWa: a failed conscience gate defers (conscienceVetoForcesDeferralOrHalt) |
| REQ-003 | keff is below 4 | defer | src/H3ERE.lex.tex: k\_eff below minimumEpistemicDiversityKeff, 4, defers (lowDiversityTriggersWisdomBasedDeferral) |
| REQ-004 | margin is below 15 | defer | src/H3ERE.lex.tex: a margin below minimumConfidenceMargin, 15, defers (lowMarginTriggersWisdomBasedDeferral) |
| otherwise | no rule matches | proceed | src/H3ERE.lex.tex highMarginAndDiversityPermitsAutonomousAction: conscience passed, diverse and confident |

## Properties Lean proves

Each property is a theorem about the same definitions the app is built from. It is proved for every request, not only the tested ones.

| Property | Statement | Theorem | Why |
| --- | --- | --- | --- |
| INV-001 | It never answers proceed when conscience is vetoed. | CirisDeferralProofs::inv001Holds | the conscience gate is a non-bypassable final veto |
| INV-002 | It never answers proceed when keff is below 4. | CirisDeferralProofs::inv002Holds | a monoculture of perspectives never acts alone |
| INV-003 | It never answers proceed when margin is below 15. | CirisDeferralProofs::inv003Holds | the agent does not act on a near tie |
| INV-004 | It always answers halt when seats is at least 2. | CirisDeferralProofs::inv004Holds | a 2-of-3 Yubikey quorum always halts |
| INV-005 | It never answers halt when seats is below 2. | CirisDeferralProofs::inv005Holds | yubikeySingleSeatCannotHalt: one seat alone cannot halt |

## Architecture

Stakeholders and the concerns each one views the app through (ISO/IEC/IEEE 42010).

| Stakeholder | Who they are | Concerns |
| --- | --- | --- |
| Affected person | Is affected by what the agent does and needs an uncertain or vetoed action to reach a person first. | Proved guarantees |
| Agent operator | Runs an agent and needs every action it takes to be one the covenant allows. | Correct answers, Proved guarantees |
| Verifier | Anyone who loads the holo, checks its fingerprint and replays its acceptance vectors before trusting an answer. | Integrity of the published app, Refused malformed requests, Proved guarantees |
| Wise Authority | Holds a Yubikey seat and needs a 2-of-3 quorum to halt the agent, and one seat never to. | Halt by quorum |

## Concerns

What the stakeholders care about, and the model each is viewed in.

| Concern | What it means | Model |
| --- | --- | --- |
| Correct answers | Every well-formed request is answered by the first rule that matches it, or proceed when none does, as the spec states. | quality |
| Halt by quorum | Two of the three Wise Authority seats halt the agent, and a single seat cannot, as Constitution.lex.tex checks. | security |
| Integrity of the published app | What a visitor runs is the holo the build verified, with its fingerprint and signed provenance beside it. | security |
| Proved guarantees | Each of the 5 properties of the spec holds for every request, proved by the Lean kernel. | quality |
| Refused malformed requests | A request that is not the 4 fields in order, or is longer than 112 bytes, is answered invalid and never guessed. | security |

## Components

8 components and 11 edges between them.

| Component | Kind | What it is |
| --- | --- | --- |
| Browser | externalSystem | The visitor's web browser, which loads the page and runs the Wise deferral guest. |
| GitHub Pages | externalSystem | Serves the page and the holo from the repository Pages workflow. |
| H3ERE pipeline | service | The 6-stage CSDMA, DSDMA, PDMA, IDMA, ASPDMA and conscience pipeline that computes the margin, k\_eff and conscience result. |
| Prism build | cliAdapter | prismpm verify in the SDK image prismpm.lock pins: it checks every theorem, builds the guest and replays every vector. |
| Source repository | externalSystem | The repository that holds the prompt, the model and its gate. |
| Wise Authority | externalSystem | The human Wise Authority, ciris.wa.\*, that receives deferrals and holds the Yubikey halt seats. |
| Wise deferral guest | service | The Core-Wasm guest built from the model: it answers one request of at most 112 bytes with one answer of at most 64. |
| Wise deferral page | staticSite | The page the template publishes: the holo, its fingerprint, its provenance and its acceptance vectors. |

## Design views

The SDK checks each view against the system model and draws it as OPL and PlantUML.

| View | Diagram | Viewpoint |
| --- | --- | --- |
| Deciding a Wise deferral request | opmObjectProcess | Agent operator: Correct answers |
| Components of Wise deferral | umlComponent | Verifier: Integrity of the published app |
| Answering a Wise deferral request | umlSequence | Agent operator: Correct answers |
| States of the Wise deferral guest | umlStateMachine | Verifier: Refused malformed requests |

## Features and journeys

11 features. Each names the definitions that do the work and the tests that accept it. Each stakeholder has one journey.

| Feature | Calls | Accepted by |
| --- | --- | --- |
| When seats is at least 2, the answer is halt. | CirisDeferral::rule1, CirisDeferral::judge | CirisDeferral::application |
| When conscience is vetoed, the answer is defer. | CirisDeferral::rule2, CirisDeferral::judge | CirisDeferral::application |
| When keff is below 4, the answer is defer. | CirisDeferral::rule3, CirisDeferral::judge | CirisDeferral::application |
| When margin is below 15, the answer is defer. | CirisDeferral::rule4, CirisDeferral::judge | CirisDeferral::application |
| When no rule matches, the answer is proceed. | CirisDeferral::judge | CirisDeferral::application |
| A request that is not margin, keff, conscience, seats in order, separated by single spaces, or is over 112 bytes, is answered invalid. | CirisDeferral::dispatch, CirisDeferral::decodeField1 | CirisDeferral::application |
| It never answers proceed when conscience is vetoed. | CirisDeferral::judge | CirisDeferralProofs::inv001Holds |
| It never answers proceed when keff is below 4. | CirisDeferral::judge | CirisDeferralProofs::inv002Holds |
| It never answers proceed when margin is below 15. | CirisDeferral::judge | CirisDeferralProofs::inv003Holds |
| It always answers halt when seats is at least 2. | CirisDeferral::judge | CirisDeferralProofs::inv004Holds |
| It never answers halt when seats is below 2. | CirisDeferral::judge | CirisDeferralProofs::inv005Holds |

## Journeys

The ordered features each stakeholder takes.

| Stakeholder | Steps |
| --- | --- |
| Affected person | INV-001 → INV-002 → INV-003 |
| Agent operator | REQ-002 → REQ-003 → REQ-004 → otherwise |
| Verifier | refuse → INV-001 → INV-002 → INV-003 → INV-004 → INV-005 |
| Wise Authority | REQ-001 → INV-004 → INV-005 |

## Security and threat model

14 threats against 4 assets. Each has a STRIDE category, and either a control with evidence or a risk that is accepted on purpose.

| Threat | STRIDE | Asset | Risk | Answered by |
| --- | --- | --- | --- | --- |
| Answer that breaks INV-001 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-001: proof CirisDeferralProofs::inv001Holds |
| Answer that breaks INV-002 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-002: proof CirisDeferralProofs::inv002Holds |
| Answer that breaks INV-003 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-003: proof CirisDeferralProofs::inv003Holds |
| Answer that breaks INV-004 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-004: proof CirisDeferralProofs::inv004Holds |
| Answer that breaks INV-005 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-005: proof CirisDeferralProofs::inv005Holds |
| Conscience result spoofed | spoofing | Request bytes | medium likelihood, major impact | accepted: The app decides from the request it is given; the conscience result belongs to the H3ERE-06 stage that computes it, which the request names. |
| Granted capability | informationDisclosure | Answer | low likelihood, major impact | No capability granted: gate prism-code check refuses an ungranted guest import |
| Malformed request | tampering | Request bytes | high likelihood, major impact | Strict decoder: gate malformed-request acceptance vectors, replayed in the compiled guest by prismpm verify |
| Oversized request | denialOfService | Request bytes | medium likelihood, minor impact | Bounded request: gate acceptance vectors at the request bound, one byte over it, and at the guest allocation bound, replayed by prismpm verify |
| Single-seat halt | elevationOfPrivilege | Answer | low likelihood, major impact | Quorum proved: proof CirisDeferralProofs::inv005Holds; review src/Constitution.lex.tex yubikeySingleSeatCannotHalt |
| Substituted holo | spoofing | Published holo | low likelihood, critical impact | Fingerprint and provenance: gate actions/attest-build-provenance in the pages workflow; gate prism-code check of the holo identities in the page |
| Substituted host | spoofing | Published holo | low likelihood, critical impact | accepted: A page cannot defend against its own host. The holo carries signed build provenance a visitor can check, and the app can be rebuilt from its prompt. |
| Sycophantic monoculture | tampering | Answer | medium likelihood, critical impact | Diversity floor: proof CirisDeferralProofs::inv002Holds; review src/Coherence.lex.tex Kish k\_eff verifier |
| Tampered model | tampering | Model source | low likelihood, major impact | Regenerated from the prompt: gate prismpm verify in the SDK image prismpm.lock pins; review app/prompt.json |

## Quality

ISO/IEC 25010:2023 requirements. Each has a measure and a threshold that a theorem pins.

| Requirement | Characteristic | Measure | Threshold |
| --- | --- | --- | --- |
| Bounded allocation: The guest allocates at most 224 bytes for one request. | Performance efficiency: Resource utilization | Guest allocation bytes | 224 |
| Bounded request: A request over 112 bytes is refused before any field is read. | Performance efficiency: Time behaviour | Request bytes read | 112 |
| Every property proved: All 5 properties are theorems the Lean kernel checks. | Security: Integrity | Unproved properties | 0 |
| Every request answered: Every request gets an answer: a rule, proceed otherwise, or invalid. | Functional suitability: Functional completeness | Unanswered requests | 0 |
| Every vector replays: All 52 acceptance vectors replay in the compiled guest, the shortest 0 bytes long. | Reliability: Faultlessness | Failed vectors | 0 |
| Examples answered as stated: Every one of the 6 examples of the spec is answered as it states. | Functional suitability: Functional correctness | Example mismatches | 0 |
| Uncertainty defers: Every request with a vetoed conscience, k\_eff below 4 or a margin below 15 is answered defer or halt. | Safety: Fail safe | Autonomous answers under uncertainty | 0 |

## Compliance

One obligation per standard, each naming its evidence.

| Standard | Subject | Evidence |
| --- | --- | --- |
| ISO/IEC/IEEE 42010:2022 | Architecture description | Architecture::architectureDescriptionHolds |
| ISO/PAS 19450:2015 and OMG UML 2.5.1 | Design views | Design::viewOpmDecide, Design::viewUmlComponents, Design::viewUmlRequest, Design::viewUmlStates |
| ISO/IEC 25010:2023 | Product quality | Quality::qualityModelHolds |
| ISO/IEC 27034-1:2011 and ISO/IEC 27005:2022 | Application security and risk | Security::controlSet |
| OMG DMN 1.5, hit policy FIRST | Decision table | CirisDeferral::judge |
| OpenSpec | Requirements | CirisDeferral::application |
| SPDX MIT OR Apache-2.0 | Licensing | CirisDeferral::application |

## Rendered design views

Written by the SDK from the design records when it verified the app.

### design/Design.viewOpmDecide.opl

```
View: Design::viewOpmDecide
Title: Deciding a Wise deferral request
Viewpoint: Architecture::viewpointAgentOperatorCorrectAnswers
Notation: ISO/PAS 19450:2015 OPM, Prism OPL profile

componentBrowser is an object.
componentWiseDeferralGuest is an object.
componentWiseDeferralGuest can be stateDeciding or stateIdle.
processDecide is a process.
processEncodeAnswer is a process.
processJudge is a process.
processParseRequest is a process.
componentWiseDeferralGuest handles processDecide.
processParseRequest requires componentBrowser.
processEncodeAnswer affects componentBrowser.
processJudge invokes processEncodeAnswer.
processParseRequest invokes processJudge.
processDecide zooms into processParseRequest, processJudge, and processEncodeAnswer, in that sequence.

```

### design/Design.viewUmlComponents.puml

```
@startuml
' UML 2.5.1 component diagram
' view: Design::viewUmlComponents
' viewpoint: Architecture::viewpointVerifierIntegrityOfThePublishedApp
title Components of Wise deferral
component "componentBrowser" as c0
component "componentGitHubPages" as c1
component "componentH3EREPipeline" as c2
component "componentPrismBuild" as c3
component "componentSourceRepository" as c4
component "componentWiseAuthority" as c5
component "componentWiseDeferralGuest" as c6
component "componentWiseDeferralPage" as c7
c0 --> c6 : edgeBrowserToWiseDeferralGuest
c1 --> c0 : edgeGitHubPagesToBrowser
c2 --> c6 : edgeH3EREPipelineToWiseDeferralGuest
c3 --> c6 : edgePrismBuildToWiseDeferralGuest
c3 --> c7 : edgePrismBuildToWiseDeferralPage
c4 --> c3 : edgeSourceRepositoryToPrismBuild
c5 --> c6 : edgeWiseAuthorityToWiseDeferralGuest
c6 --> c0 : edgeWiseDeferralGuestToBrowser
c6 --> c2 : edgeWiseDeferralGuestToH3EREPipeline
c6 --> c5 : edgeWiseDeferralGuestToWiseAuthority
c7 --> c1 : edgeWiseDeferralPageToGitHubPages
@enduml

```

### design/Design.viewUmlRequest.puml

```
@startuml
' UML 2.5.1 sequence diagram
' view: Design::viewUmlRequest
' viewpoint: Architecture::viewpointAgentOperatorCorrectAnswers
title Answering a Wise deferral request
participant "componentBrowser" as p0
participant "componentWiseDeferralGuest" as p1
p0 -> p1 : processDecide
p1 --> p0 : processDecide
@enduml

```

### design/Design.viewUmlStates.puml

```
@startuml
' UML 2.5.1 state machine diagram
' view: Design::viewUmlStates
' viewpoint: Architecture::viewpointVerifierRefusedMalformedRequests
title States of the Wise deferral guest
state "stateAnsweredDefer" as s0
state "stateAnsweredHalt" as s1
state "stateAnsweredProceed" as s2
state "stateDeciding" as s3
state "stateIdle" as s4
state "stateRefused" as s5
[*] --> s4
s4 --> s3 : processParseRequest
s4 --> s5 : processParseRequest
s3 --> s1 : processRule1
s3 --> s0 : processRule2
s3 --> s0 : processRule3
s3 --> s0 : processRule4
s3 --> s2 : processOtherwise
s2 --> s4 : processEncodeAnswer
s0 --> s4 : processEncodeAnswer
s1 --> s4 : processEncodeAnswer
s5 --> s4 : processEncodeAnswer
@enduml

```

## Prism source

Every file the builder wrote, laid out as a repository created from UOR-Foundation/template; the download prism-ciris-deferral.zip has them all.

- app/src/Architecture.lex.tex (420 lines)
- app/src/Compliance.lex.tex (56 lines)
- app/src/Design.lex.tex (549 lines)
- app/src/Features.lex.tex (151 lines)
- app/src/Quality.lex.tex (361 lines)
- app/src/Security.lex.tex (635 lines)
- app/src/CirisDeferral.lex.tex (231 lines)
- app/src/CirisDeferralProofs.lex.tex (154 lines)
- app/lexlean.toml (43 lines)
- app/prompt.json (328 lines)
- model/ids.toml (71 lines)
- features/suites/ciris\_deferral.feature (50 lines)
- crates/conformance/tests/ciris\_deferral.rs (142 lines)
- site/app.json (124 lines)
- openspec/specs/ciris-deferral/spec.md (183 lines)
