# Open policy

> Decide if Holo Search opens the app an address names. Nothing runs unless its bytes match the address, its model checks and its tests pass.

Inspired by UOR-Foundation/holo-search (https://github.com/UOR-Foundation/holo-search), live at https://uor-foundation.github.io/holo-search/. Find, verify and open Prism apps by their address. Pattern: Policy decision, OASIS XACML 3.0 policy decision point. To write one of your own, follow How to build a policy decision app (../../guides/policy-decision/index.md). The prompt below is data, quoted from the example.

**Figure: What the Open policy 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 | resolution, digest, check, failed |
| 2. 5 rules | the first that applies decides |
| 3. Answer | permit, deny, not-applicable, indeterminate |
| 4. Proved | 5 theorems, 42 tests |

Verified by prismpm verify in the pinned SDK. Fingerprint: 4e726d51aa264506d30c260ca86e889ad95540c97094a16e3fa0297a1f2f4e5b. Acceptance vectors: 42. Claims: 8.

## The prompt

```json
{
  "schema": "prism/prompt/1",
  "goal": "Decide if Holo Search opens the app an address names. Nothing runs unless its bytes match the address, its model checks and its tests pass.",
  "pattern": "policyDecision",
  "repository": "UOR-Foundation/holo-search",
  "app": {
    "name": "holo-open",
    "limits": [
      "It does not fetch or hash the bytes; the page does, and passes the results."
    ],
    "title": "Open policy",
    "purpose": "Decide, as an XACML policy decision, whether a fetched app may open, from how the address resolved, whether the bytes hash to it, whether the model checks and how many acceptance vectors failed.",
    "fields": [
      {
        "name": "resolution",
        "kind": "choice",
        "values": [
          "found",
          "ambiguous",
          "missing"
        ],
        "means": "how the address or name resolved in the registry"
      },
      {
        "name": "digest",
        "kind": "choice",
        "values": [
          "match",
          "mismatch"
        ],
        "means": "whether the bytes hash to the address"
      },
      {
        "name": "check",
        "kind": "choice",
        "values": [
          "pass",
          "fail"
        ],
        "means": "whether LexLean checks the compiled model"
      },
      {
        "name": "failed",
        "kind": "number",
        "min": 0,
        "means": "acceptance vectors that did not replay"
      }
    ],
    "outcomes": [
      "permit",
      "deny",
      "not-applicable",
      "indeterminate"
    ],
    "meanings": {
      "permit": "the gate is Ready: the app opens",
      "deny": "the gate refuses with its reason: hash mismatch, check failed or vectors failed",
      "not-applicable": "no app the address names was found, so the open policy does not apply",
      "indeterminate": "the address names more than one app, so the policy cannot be evaluated until it is longer"
    },
    "rules": [
      {
        "when": [
          {
            "field": "resolution",
            "op": "is",
            "value": "missing"
          }
        ],
        "then": "not-applicable",
        "why": "src/HoloSearch.lex.tex Resolution.Missing: nothing in the registry has this address"
      },
      {
        "when": [
          {
            "field": "resolution",
            "op": "is",
            "value": "ambiguous"
          }
        ],
        "then": "indeterminate",
        "why": "src/HoloSearch.lex.tex Resolution.Ambiguous: a prefix names more than one app"
      },
      {
        "when": [
          {
            "field": "digest",
            "op": "is",
            "value": "mismatch"
          }
        ],
        "then": "deny",
        "why": "src/HoloSearch.lex.tex gate: HashMismatch, always the reason given first (hash_mismatch_is_reported_first)"
      },
      {
        "when": [
          {
            "field": "check",
            "op": "is",
            "value": "fail"
          }
        ],
        "then": "deny",
        "why": "src/HoloSearch.lex.tex gate: Refusal.CheckFailed"
      },
      {
        "when": [
          {
            "field": "failed",
            "op": ">=",
            "value": 1
          }
        ],
        "then": "deny",
        "why": "src/HoloSearch.lex.tex gate: Refusal.VectorsFailed, as the tampered Calculator with 3 of 22 failing"
      }
    ],
    "otherwise": "permit",
    "otherwiseWhy": "src/HoloSearch.lex.tex gate_ready_exactly: ready exactly when the address, the check and the vectors all pass",
    "properties": [
      {
        "kind": "never",
        "when": [
          {
            "field": "digest",
            "op": "is",
            "value": "mismatch"
          }
        ],
        "then": "permit",
        "why": "substituted bytes never run"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "failed",
            "op": ">=",
            "value": 1
          }
        ],
        "then": "permit",
        "why": "a failing app never runs"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "check",
            "op": "is",
            "value": "fail"
          }
        ],
        "then": "permit",
        "why": "a model that does not check never runs"
      },
      {
        "kind": "always",
        "when": [
          {
            "field": "resolution",
            "op": "is",
            "value": "found"
          },
          {
            "field": "digest",
            "op": "is",
            "value": "mismatch"
          }
        ],
        "then": "deny",
        "why": "a mismatched address is refused, whatever else is true"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "resolution",
            "op": "is",
            "value": "ambiguous"
          }
        ],
        "then": "permit",
        "why": "an ambiguous prefix never opens an app"
      }
    ],
    "examples": [
      {
        "request": "found match pass 0",
        "response": "permit"
      },
      {
        "request": "found mismatch pass 0",
        "response": "deny"
      },
      {
        "request": "found match fail 0",
        "response": "deny"
      },
      {
        "request": "found match pass 3",
        "response": "deny"
      },
      {
        "request": "missing match pass 0",
        "response": "not-applicable"
      },
      {
        "request": "ambiguous match pass 0",
        "response": "indeterminate"
      }
    ]
  },
  "stakeholders": [
    {
      "name": "Visitor",
      "text": "Pastes an address and needs nothing to run unless it is the app the address names.",
      "concerns": [
        "Proved guarantees",
        "Correct answers"
      ]
    },
    {
      "name": "App publisher",
      "text": "Publishes a holo to the registry or IPFS and needs a tampered copy refused with its reason, whichever host serves it.",
      "concerns": [
        "Refusal names its reason"
      ]
    }
  ],
  "concerns": [
    {
      "name": "Refusal names its reason",
      "text": "A refused app is refused with one reason, and a mismatched address is always the reason given first.",
      "model": "security"
    }
  ],
  "components": [
    {
      "name": "IPFS gateways",
      "text": "Public IPFS gateways that serve app bytes by CID; Holo Search trusts none of them.",
      "kind": "externalSystem"
    },
    {
      "name": "Registry mirror",
      "text": "registry/: models, holos, images and layers stored under their digest, with index.json for search, served raw.",
      "kind": "database"
    },
    {
      "name": "LexLean Wasm runtime",
      "text": "LexLean's runtime compiled to WebAssembly, which compiles the model and replays its vectors in the browser.",
      "kind": "service"
    }
  ],
  "threats": [
    {
      "name": "Hostile gateway",
      "text": "A gateway or mirror serves other bytes under the address.",
      "stride": "spoofing",
      "asset": "holo",
      "likelihood": "medium",
      "impact": "critical",
      "control": {
        "name": "Hash in the browser",
        "text": "The page hashes the bytes before anything runs, and a mismatch is never permitted, proved for every request.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "HoloOpenProofs::inv001Holds"
          },
          {
            "kind": "review",
            "reference": "src/HoloSearch.lex.tex hash_mismatch_is_reported_first"
          }
        ]
      }
    },
    {
      "name": "Prefix collision",
      "text": "An 8-digit prefix resolves to another app than the one the visitor meant.",
      "stride": "spoofing",
      "asset": "request",
      "likelihood": "low",
      "impact": "major",
      "control": {
        "name": "Ambiguity is indeterminate",
        "text": "A prefix that names more than one app is never permitted, proved for every request.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "HoloOpenProofs::inv005Holds"
          }
        ]
      }
    },
    {
      "name": "Frame module swapped",
      "text": "The prism-frame module loaded from the template site is replaced.",
      "stride": "tampering",
      "asset": "holo",
      "likelihood": "low",
      "impact": "major",
      "control": {
        "name": "Frame pointer checked",
        "text": "The page checks the frame module against frame/current.json's SHA-256 before running it, and falls back to a plain address bar.",
        "evidence": [
          {
            "kind": "review",
            "reference": "README.md frame"
          }
        ]
      }
    }
  ],
  "quality": [
    {
      "characteristic": "Security",
      "subcharacteristic": "Authenticity",
      "requirement": "Only the named app opens",
      "text": "No app opens whose bytes do not hash to the address, whose model does not check, or whose vectors fail.",
      "measure": "Unverified opens",
      "measureText": "Requests with a mismatch, a failed check or a failed vector answered permit.",
      "threshold": 0
    }
  ],
  "journeys": [
    {
      "stakeholder": "Visitor",
      "steps": [
        "REQ-001",
        "REQ-002",
        "REQ-003",
        "otherwise"
      ]
    },
    {
      "stakeholder": "App publisher",
      "steps": [
        "REQ-003",
        "REQ-004",
        "REQ-005",
        "INV-004"
      ]
    }
  ],
  "license": "MIT OR Apache-2.0",
  "axioms": {}
}
```

## Claims

- HO-01: The app never answers permit when digest is mismatch
- HO-02: The app never answers permit when failed is at least 1
- HO-03: The app never answers permit when check is fail
- HO-04: The app always answers deny when resolution is found and digest is mismatch
- HO-05: The app never answers permit when resolution is ambiguous
- HO-06: The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references
- HO-07: The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared
- HO-08: Every compliance obligation is numbered in order and names its evidence

## Pattern

Policy decision: OASIS XACML 3.0 policy decision point. The answer is one XACML 3.0 decision: permit, deny, not-applicable, indeterminate. A policy that applies gives permit or deny. If none applies, the answer is not-applicable. If the request cannot be judged, it is indeterminate.

| Pattern | Standard | Answers |
| --- | --- | --- |
| Policy decision | OASIS XACML 3.0 policy decision point | permit, deny, not-applicable, indeterminate |

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

|  | rules |
| --- | --- |
| permit | 0 |
| deny | 3 |
| not-applicable | 1 |
| indeterminate | 1 |

## Behavior

A request is resolution, digest, check, failed, separated by spaces. The first rule that matches decides. If none matches, the answer is permit. A request over 112 bytes, or in any other form, is answered invalid.

| Rule | When | Answer | Why |
| --- | --- | --- | --- |
| REQ-001 | resolution is missing | not-applicable | src/HoloSearch.lex.tex Resolution.Missing: nothing in the registry has this address |
| REQ-002 | resolution is ambiguous | indeterminate | src/HoloSearch.lex.tex Resolution.Ambiguous: a prefix names more than one app |
| REQ-003 | digest is mismatch | deny | src/HoloSearch.lex.tex gate: HashMismatch, always the reason given first (hash\_mismatch\_is\_reported\_first) |
| REQ-004 | check is fail | deny | src/HoloSearch.lex.tex gate: Refusal.CheckFailed |
| REQ-005 | failed is at least 1 | deny | src/HoloSearch.lex.tex gate: Refusal.VectorsFailed, as the tampered Calculator with 3 of 22 failing |
| otherwise | no rule matches | permit | src/HoloSearch.lex.tex gate\_ready\_exactly: ready exactly when the address, the check and the vectors all pass |

## 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 permit when digest is mismatch. | HoloOpenProofs::inv001Holds | substituted bytes never run |
| INV-002 | It never answers permit when failed is at least 1. | HoloOpenProofs::inv002Holds | a failing app never runs |
| INV-003 | It never answers permit when check is fail. | HoloOpenProofs::inv003Holds | a model that does not check never runs |
| INV-004 | It always answers deny when resolution is found and digest is mismatch. | HoloOpenProofs::inv004Holds | a mismatched address is refused, whatever else is true |
| INV-005 | It never answers permit when resolution is ambiguous. | HoloOpenProofs::inv005Holds | an ambiguous prefix never opens an app |

## Architecture

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

| Stakeholder | Who they are | Concerns |
| --- | --- | --- |
| App publisher | Publishes a holo to the registry or IPFS and needs a tampered copy refused with its reason, whichever host serves it. | Refusal names its reason |
| 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 |
| Visitor | Pastes an address and needs nothing to run unless it is the app the address names. | Proved guarantees, Correct answers |

## 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 permit when none does, as the spec states. | quality |
| 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 |
| Refusal names its reason | A refused app is refused with one reason, and a mismatched address is always the reason given first. | security |
| 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

9 components and 13 edges between them.

| Component | Kind | What it is |
| --- | --- | --- |
| Browser | externalSystem | The visitor's web browser, which loads the page and runs the Open policy guest. |
| GitHub Pages | externalSystem | Serves the page and the holo from the repository Pages workflow. |
| IPFS gateways | externalSystem | Public IPFS gateways that serve app bytes by CID; Holo Search trusts none of them. |
| LexLean Wasm runtime | service | LexLean's runtime compiled to WebAssembly, which compiles the model and replays its vectors in the browser. |
| Open policy 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. |
| Open policy page | staticSite | The page the template publishes: the holo, its fingerprint, its provenance and its acceptance vectors. |
| Prism build | cliAdapter | prismpm verify in the SDK image prismpm.lock pins: it checks every theorem, builds the guest and replays every vector. |
| Registry mirror | database | registry/: models, holos, images and layers stored under their digest, with index.json for search, served raw. |
| Source repository | externalSystem | The repository that holds the prompt, the model and its gate. |

## Design views

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

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

## Features and journeys

12 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 resolution is missing, the answer is not-applicable. | HoloOpen::rule1, HoloOpen::judge | HoloOpen::application |
| When resolution is ambiguous, the answer is indeterminate. | HoloOpen::rule2, HoloOpen::judge | HoloOpen::application |
| When digest is mismatch, the answer is deny. | HoloOpen::rule3, HoloOpen::judge | HoloOpen::application |
| When check is fail, the answer is deny. | HoloOpen::rule4, HoloOpen::judge | HoloOpen::application |
| When failed is at least 1, the answer is deny. | HoloOpen::rule5, HoloOpen::judge | HoloOpen::application |
| When no rule matches, the answer is permit. | HoloOpen::judge | HoloOpen::application |
| A request that is not resolution, digest, check, failed in order, separated by single spaces, or is over 112 bytes, is answered invalid. | HoloOpen::dispatch, HoloOpen::decodeField1 | HoloOpen::application |
| It never answers permit when digest is mismatch. | HoloOpen::judge | HoloOpenProofs::inv001Holds |
| It never answers permit when failed is at least 1. | HoloOpen::judge | HoloOpenProofs::inv002Holds |
| It never answers permit when check is fail. | HoloOpen::judge | HoloOpenProofs::inv003Holds |
| It always answers deny when resolution is found and digest is mismatch. | HoloOpen::judge | HoloOpenProofs::inv004Holds |
| It never answers permit when resolution is ambiguous. | HoloOpen::judge | HoloOpenProofs::inv005Holds |

## Journeys

The ordered features each stakeholder takes.

| Stakeholder | Steps |
| --- | --- |
| App publisher | REQ-003 → REQ-004 → REQ-005 → INV-004 |
| Verifier | refuse → INV-001 → INV-002 → INV-003 → INV-004 → INV-005 |
| Visitor | REQ-001 → REQ-002 → REQ-003 → otherwise |

## 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 HoloOpenProofs::inv001Holds |
| Answer that breaks INV-002 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-002: proof HoloOpenProofs::inv002Holds |
| Answer that breaks INV-003 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-003: proof HoloOpenProofs::inv003Holds |
| Answer that breaks INV-004 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-004: proof HoloOpenProofs::inv004Holds |
| Answer that breaks INV-005 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-005: proof HoloOpenProofs::inv005Holds |
| Frame module swapped | tampering | Published holo | low likelihood, major impact | Frame pointer checked: review README.md frame |
| Granted capability | informationDisclosure | Answer | low likelihood, major impact | No capability granted: gate prism-code check refuses an ungranted guest import |
| Hostile gateway | spoofing | Published holo | medium likelihood, critical impact | Hash in the browser: proof HoloOpenProofs::inv001Holds; review src/HoloSearch.lex.tex hash\_mismatch\_is\_reported\_first |
| 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 |
| Prefix collision | spoofing | Request bytes | low likelihood, major impact | Ambiguity is indeterminate: proof HoloOpenProofs::inv005Holds |
| 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. |
| 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, permit otherwise, or invalid. | Functional suitability: Functional completeness | Unanswered requests | 0 |
| Every vector replays: All 42 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 |
| Only the named app opens: No app opens whose bytes do not hash to the address, whose model does not check, or whose vectors fail. | Security: Authenticity | Unverified opens | 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 |
| OASIS XACML 3.0 policy decision point | Policy decision | HoloOpen::judge, HoloOpen::encodeAnswer |
| OpenSpec | Requirements | HoloOpen::application |
| SPDX MIT OR Apache-2.0 | Licensing | HoloOpen::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 Open policy request
Viewpoint: Architecture::viewpointVisitorCorrectAnswers
Notation: ISO/PAS 19450:2015 OPM, Prism OPL profile

componentBrowser is an object.
componentOpenPolicyGuest is an object.
componentOpenPolicyGuest can be stateDeciding or stateIdle.
processDecide is a process.
processEncodeAnswer is a process.
processJudge is a process.
processParseRequest is a process.
componentOpenPolicyGuest 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 Open policy
component "componentBrowser" as c0
component "componentGitHubPages" as c1
component "componentIPFSGateways" as c2
component "componentLexLeanWasmRuntime" as c3
component "componentOpenPolicyGuest" as c4
component "componentOpenPolicyPage" as c5
component "componentPrismBuild" as c6
component "componentRegistryMirror" as c7
component "componentSourceRepository" as c8
c0 --> c4 : edgeBrowserToOpenPolicyGuest
c1 --> c0 : edgeGitHubPagesToBrowser
c2 --> c4 : edgeIPFSGatewaysToOpenPolicyGuest
c3 --> c4 : edgeLexLeanWasmRuntimeToOpenPolicyGuest
c4 --> c0 : edgeOpenPolicyGuestToBrowser
c4 --> c2 : edgeOpenPolicyGuestToIPFSGateways
c4 --> c3 : edgeOpenPolicyGuestToLexLeanWasmRuntime
c4 --> c7 : edgeOpenPolicyGuestToRegistryMirror
c5 --> c1 : edgeOpenPolicyPageToGitHubPages
c6 --> c4 : edgePrismBuildToOpenPolicyGuest
c6 --> c5 : edgePrismBuildToOpenPolicyPage
c7 --> c4 : edgeRegistryMirrorToOpenPolicyGuest
c8 --> c6 : edgeSourceRepositoryToPrismBuild
@enduml

```

### design/Design.viewUmlRequest.puml

```
@startuml
' UML 2.5.1 sequence diagram
' view: Design::viewUmlRequest
' viewpoint: Architecture::viewpointVisitorCorrectAnswers
title Answering a Open policy request
participant "componentBrowser" as p0
participant "componentOpenPolicyGuest" 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 Open policy guest
state "stateAnsweredDeny" as s0
state "stateAnsweredIndeterminate" as s1
state "stateAnsweredNotApplicable" as s2
state "stateAnsweredPermit" as s3
state "stateDeciding" as s4
state "stateIdle" as s5
state "stateRefused" as s6
[*] --> s5
s5 --> s4 : processParseRequest
s5 --> s6 : processParseRequest
s4 --> s2 : processRule1
s4 --> s1 : processRule2
s4 --> s0 : processRule3
s4 --> s0 : processRule4
s4 --> s0 : processRule5
s4 --> s3 : processOtherwise
s3 --> s5 : processEncodeAnswer
s0 --> s5 : processEncodeAnswer
s2 --> s5 : processEncodeAnswer
s1 --> s5 : processEncodeAnswer
s6 --> s5 : processEncodeAnswer
@enduml

```

## Prism source

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

- app/src/Architecture.lex.tex (420 lines)
- app/src/Compliance.lex.tex (56 lines)
- app/src/Design.lex.tex (605 lines)
- app/src/Features.lex.tex (126 lines)
- app/src/Quality.lex.tex (354 lines)
- app/src/Security.lex.tex (649 lines)
- app/src/HoloOpen.lex.tex (244 lines)
- app/src/HoloOpenProofs.lex.tex (189 lines)
- app/lexlean.toml (43 lines)
- app/prompt.json (349 lines)
- model/ids.toml (71 lines)
- features/suites/holo\_open.feature (50 lines)
- crates/conformance/tests/holo\_open.rs (142 lines)
- site/app.json (125 lines)
- openspec/specs/holo-open/spec.md (199 lines)
