# Emporous admission

> Decide if Emporous lets an object into a namespace. Each object must come from someone who is allowed to add it there.

Inspired by afflom/emporous (https://github.com/afflom/emporous). The supply-chain layer over kappa-registry: admission by scope, blast-radius traversal over ComposedOf, and honest measurements. 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 Emporous admission 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 | namespace, realization, principal, bytes |
| 2. 5 rules | the first that applies decides |
| 3. Answer | permit, deny, not-applicable, indeterminate |
| 4. Proved | 4 theorems, 35 tests |

Verified by prismpm verify in the pinned SDK. Fingerprint: 78d9c1936305610b8432b57c6c96cdae2b337be73db34516ab4bb65cea944653. Acceptance vectors: 35. Claims: 7.

## The prompt

```json
{
  "schema": "prism/prompt/1",
  "goal": "Decide if Emporous lets an object into a namespace. Each object must come from someone who is allowed to add it there.",
  "pattern": "policyDecision",
  "repository": "afflom/emporous",
  "app": {
    "name": "emporous-admit-policy",
    "title": "Emporous admission",
    "purpose": "Decide whether one representation is admitted under the scope its namespace names, from the scope, its realization, the principal and the bytes.",
    "fields": [
      {
        "name": "namespace",
        "kind": "choice",
        "values": [
          "scoped",
          "unscoped",
          "conflicted"
        ],
        "means": "whether the namespace names exactly one scope, none, or more than one"
      },
      {
        "name": "realization",
        "kind": "choice",
        "values": [
          "known",
          "unknown"
        ],
        "means": "whether the registry knows the realization the scope names"
      },
      {
        "name": "principal",
        "kind": "choice",
        "values": [
          "authorized",
          "unauthorized"
        ],
        "means": "whether a capability-edge walk reaches the principal from the scope authorization"
      },
      {
        "name": "bytes",
        "kind": "choice",
        "values": [
          "realizable",
          "refused"
        ],
        "means": "whether the realization carries the bytes to a canonical form"
      }
    ],
    "outcomes": [
      "permit",
      "deny",
      "not-applicable",
      "indeterminate"
    ],
    "meanings": {
      "permit": "XACML 3.0 section 7: Permit; the object kappa, the representation kappa and a DerivedFrom edge are written",
      "deny": "XACML 3.0 section 7: Deny; StoreError::Rejected and no DerivedFrom edge is written",
      "not-applicable": "XACML 3.0 section 7: NotApplicable; the namespace names no scope, so no policy governs it",
      "indeterminate": "XACML 3.0 section 7: Indeterminate; the scope cannot be evaluated, because its realization is unknown or the namespace names several scopes"
    },
    "rules": [
      {
        "when": [
          {
            "field": "namespace",
            "op": "is",
            "value": "unscoped"
          }
        ],
        "then": "not-applicable",
        "why": "crates/admission/src/scope.rs scope_of_namespace: the namespace names no scope, StoreError::NotFound"
      },
      {
        "when": [
          {
            "field": "namespace",
            "op": "is",
            "value": "conflicted"
          }
        ],
        "then": "indeterminate",
        "why": "crates/admission/src/scope.rs: a namespace naming more than one scope is StoreError::Conflict"
      },
      {
        "when": [
          {
            "field": "realization",
            "op": "is",
            "value": "unknown"
          }
        ],
        "then": "indeterminate",
        "why": "crates/admission/src/admit.rs: the registry does not know the realization, StoreError::NotFound (EA-03)"
      },
      {
        "when": [
          {
            "field": "principal",
            "op": "is",
            "value": "unauthorized"
          }
        ],
        "then": "deny",
        "why": "crates/admission/src/admit.rs and auth.rs: the principal is not authorized by the scope capability, StoreError::Rejected (EA-05)"
      },
      {
        "when": [
          {
            "field": "bytes",
            "op": "is",
            "value": "refused"
          }
        ],
        "then": "deny",
        "why": "crates/admission/src/realize.rs: the realization refuses the bytes, StoreError::Rejected"
      }
    ],
    "otherwise": "permit",
    "otherwiseWhy": "SPEC.md 5.1: the canonical form is ingested on the scope axis and the received bytes at their own kappa, joined by a DerivedFrom edge",
    "properties": [
      {
        "kind": "never",
        "when": [
          {
            "field": "principal",
            "op": "is",
            "value": "unauthorized"
          }
        ],
        "then": "permit",
        "why": "EA-05: admission into a namespace requires the capability its scope names"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "realization",
            "op": "is",
            "value": "unknown"
          }
        ],
        "then": "permit",
        "why": "EA-03: a scope naming a realization the registry does not know is reported as not found"
      },
      {
        "kind": "always",
        "when": [
          {
            "field": "namespace",
            "op": "is",
            "value": "scoped"
          },
          {
            "field": "realization",
            "op": "is",
            "value": "known"
          },
          {
            "field": "principal",
            "op": "is",
            "value": "unauthorized"
          }
        ],
        "then": "deny",
        "why": "admit.rs checks authorization before the realization reads the bytes"
      },
      {
        "kind": "always",
        "when": [
          {
            "field": "namespace",
            "op": "is",
            "value": "unscoped"
          }
        ],
        "then": "not-applicable",
        "why": "without a scope there is no realization, axis or authorization to apply"
      }
    ],
    "examples": [
      {
        "request": "scoped known authorized realizable",
        "response": "permit"
      },
      {
        "request": "scoped known unauthorized realizable",
        "response": "deny"
      },
      {
        "request": "scoped unknown authorized realizable",
        "response": "indeterminate"
      },
      {
        "request": "unscoped known authorized realizable",
        "response": "not-applicable"
      },
      {
        "request": "scoped known authorized refused",
        "response": "deny"
      },
      {
        "request": "conflicted known authorized realizable",
        "response": "indeterminate"
      },
      {
        "request": "scoped known unauthorized refused",
        "response": "deny"
      }
    ]
  },
  "stakeholders": [
    {
      "name": "Publisher",
      "text": "Admits artefact representations into a namespace and needs each admission addressed by the canonical form its scope selects.",
      "concerns": [
        "Correct answers"
      ]
    },
    {
      "name": "Supply-chain auditor",
      "text": "Assesses blast radius over ComposedOf and needs every object in a namespace admitted by a principal its capability authorizes.",
      "concerns": [
        "Proved guarantees",
        "Authorized admission"
      ]
    }
  ],
  "concerns": [
    {
      "name": "Authorized admission",
      "text": "No object kappa and no DerivedFrom edge exist for a principal the scope capability does not reach.",
      "model": "security"
    }
  ],
  "components": [
    {
      "name": "kappa-registry",
      "text": "The pinned upstream registry Emporous imports, whose KappaStore ingests content and resolves edges.",
      "kind": "externalSystem"
    },
    {
      "name": "KappaStore",
      "text": "The content-addressed store holding objects, representations, scopes and capability edges.",
      "kind": "database"
    }
  ],
  "threats": [
    {
      "name": "Unauthorized admission",
      "text": "A principal outside the scope capability admits an object into the namespace.",
      "stride": "elevationOfPrivilege",
      "asset": "request",
      "likelihood": "medium",
      "impact": "critical",
      "control": {
        "name": "Capability-edge walk",
        "text": "Admission is denied unless the walk from the scope authorization reaches the principal.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "EmporousAdmitPolicyProofs::inv001Holds"
          },
          {
            "kind": "gate",
            "reference": "EA-05 features/suites/admission.feature"
          }
        ]
      }
    },
    {
      "name": "Realization chosen in code",
      "text": "The admission path names a realization or axis literal instead of reading it from the scope.",
      "stride": "tampering",
      "asset": "source",
      "likelihood": "low",
      "impact": "major",
      "control": {
        "name": "Read from the scope",
        "text": "The realization and axis are read from the scope and a literal on the admission path fails the gate.",
        "evidence": [
          {
            "kind": "gate",
            "reference": "EA-03 features/suites/admission.feature"
          },
          {
            "kind": "gate",
            "reference": "cargo xtask audit-parametric"
          }
        ]
      }
    },
    {
      "name": "Unknown realization admitted",
      "text": "A scope names a realization the registry does not know and the bytes are admitted unrealized.",
      "stride": "tampering",
      "asset": "answer",
      "likelihood": "low",
      "impact": "major",
      "control": {
        "name": "Not found, not admitted",
        "text": "An unknown realization is indeterminate and never permitted.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "EmporousAdmitPolicyProofs::inv002Holds"
          }
        ]
      }
    }
  ],
  "quality": [
    {
      "characteristic": "Security",
      "subcharacteristic": "Resistance",
      "requirement": "No unauthorized admission",
      "text": "No request from an unauthorized principal is permitted.",
      "measure": "Unauthorized permits",
      "measureText": "Requests with an unauthorized principal that answer permit.",
      "threshold": 0
    },
    {
      "characteristic": "Functional suitability",
      "subcharacteristic": "Functional completeness",
      "requirement": "Every admission condition decided",
      "text": "Each admission condition of SPEC.md 6.3 and the namespace conflict has its own answer.",
      "measure": "Undecided conditions",
      "measureText": "Admission failure conditions no rule decides.",
      "threshold": 0
    }
  ],
  "journeys": [
    {
      "stakeholder": "Publisher",
      "steps": [
        "REQ-001",
        "REQ-003",
        "REQ-005",
        "otherwise"
      ]
    },
    {
      "stakeholder": "Supply-chain auditor",
      "steps": [
        "REQ-002",
        "REQ-004",
        "INV-001",
        "INV-003"
      ]
    }
  ],
  "license": "MIT OR Apache-2.0",
  "axioms": {}
}
```

## Claims

- EA-01: The app never answers permit when principal is unauthorized
- EA-02: The app never answers permit when realization is unknown
- EA-03: The app always answers deny when namespace is scoped and realization is known and principal is unauthorized
- EA-04: The app always answers not-applicable when namespace is unscoped
- EA-05: The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references
- EA-06: The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared
- EA-07: 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 | 2 |
| not-applicable | 1 |
| indeterminate | 2 |

## Behavior

A request is namespace, realization, principal, bytes, 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 | namespace is unscoped | not-applicable | crates/admission/src/scope.rs scope\_of\_namespace: the namespace names no scope, StoreError::NotFound |
| REQ-002 | namespace is conflicted | indeterminate | crates/admission/src/scope.rs: a namespace naming more than one scope is StoreError::Conflict |
| REQ-003 | realization is unknown | indeterminate | crates/admission/src/admit.rs: the registry does not know the realization, StoreError::NotFound (EA-03) |
| REQ-004 | principal is unauthorized | deny | crates/admission/src/admit.rs and auth.rs: the principal is not authorized by the scope capability, StoreError::Rejected (EA-05) |
| REQ-005 | bytes is refused | deny | crates/admission/src/realize.rs: the realization refuses the bytes, StoreError::Rejected |
| otherwise | no rule matches | permit | SPEC.md 5.1: the canonical form is ingested on the scope axis and the received bytes at their own kappa, joined by a DerivedFrom edge |

## 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 principal is unauthorized. | EmporousAdmitPolicyProofs::inv001Holds | EA-05: admission into a namespace requires the capability its scope names |
| INV-002 | It never answers permit when realization is unknown. | EmporousAdmitPolicyProofs::inv002Holds | EA-03: a scope naming a realization the registry does not know is reported as not found |
| INV-003 | It always answers deny when namespace is scoped and realization is known and principal is unauthorized. | EmporousAdmitPolicyProofs::inv003Holds | admit.rs checks authorization before the realization reads the bytes |
| INV-004 | It always answers not-applicable when namespace is unscoped. | EmporousAdmitPolicyProofs::inv004Holds | without a scope there is no realization, axis or authorization to apply |

## Architecture

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

| Stakeholder | Who they are | Concerns |
| --- | --- | --- |
| Publisher | Admits artefact representations into a namespace and needs each admission addressed by the canonical form its scope selects. | Correct answers |
| Supply-chain auditor | Assesses blast radius over ComposedOf and needs every object in a namespace admitted by a principal its capability authorizes. | Proved guarantees, Authorized admission |
| 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 |

## Concerns

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

| Concern | What it means | Model |
| --- | --- | --- |
| Authorized admission | No object kappa and no DerivedFrom edge exist for a principal the scope capability does not reach. | security |
| 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 4 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 Emporous admission guest. |
| Emporous admission 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. |
| Emporous admission page | staticSite | The page the template publishes: the holo, its fingerprint, its provenance and its acceptance vectors. |
| GitHub Pages | externalSystem | Serves the page and the holo from the repository Pages workflow. |
| kappa-registry | externalSystem | The pinned upstream registry Emporous imports, whose KappaStore ingests content and resolves edges. |
| KappaStore | database | The content-addressed store holding objects, representations, scopes and capability edges. |
| 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. |

## Design views

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

| View | Diagram | Viewpoint |
| --- | --- | --- |
| Deciding a Emporous admission request | opmObjectProcess | Publisher: Correct answers |
| Components of Emporous admission | umlComponent | Verifier: Integrity of the published app |
| Answering a Emporous admission request | umlSequence | Publisher: Correct answers |
| States of the Emporous admission 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 namespace is unscoped, the answer is not-applicable. | EmporousAdmitPolicy::rule1, EmporousAdmitPolicy::judge | EmporousAdmitPolicy::application |
| When namespace is conflicted, the answer is indeterminate. | EmporousAdmitPolicy::rule2, EmporousAdmitPolicy::judge | EmporousAdmitPolicy::application |
| When realization is unknown, the answer is indeterminate. | EmporousAdmitPolicy::rule3, EmporousAdmitPolicy::judge | EmporousAdmitPolicy::application |
| When principal is unauthorized, the answer is deny. | EmporousAdmitPolicy::rule4, EmporousAdmitPolicy::judge | EmporousAdmitPolicy::application |
| When bytes is refused, the answer is deny. | EmporousAdmitPolicy::rule5, EmporousAdmitPolicy::judge | EmporousAdmitPolicy::application |
| When no rule matches, the answer is permit. | EmporousAdmitPolicy::judge | EmporousAdmitPolicy::application |
| A request that is not namespace, realization, principal, bytes in order, separated by single spaces, or is over 112 bytes, is answered invalid. | EmporousAdmitPolicy::dispatch, EmporousAdmitPolicy::decodeField1 | EmporousAdmitPolicy::application |
| It never answers permit when principal is unauthorized. | EmporousAdmitPolicy::judge | EmporousAdmitPolicyProofs::inv001Holds |
| It never answers permit when realization is unknown. | EmporousAdmitPolicy::judge | EmporousAdmitPolicyProofs::inv002Holds |
| It always answers deny when namespace is scoped and realization is known and principal is unauthorized. | EmporousAdmitPolicy::judge | EmporousAdmitPolicyProofs::inv003Holds |
| It always answers not-applicable when namespace is unscoped. | EmporousAdmitPolicy::judge | EmporousAdmitPolicyProofs::inv004Holds |

## Journeys

The ordered features each stakeholder takes.

| Stakeholder | Steps |
| --- | --- |
| Publisher | REQ-001 → REQ-003 → REQ-005 → otherwise |
| Supply-chain auditor | REQ-002 → REQ-004 → INV-001 → INV-003 |
| Verifier | refuse → INV-001 → INV-002 → INV-003 → INV-004 |

## Security and threat model

13 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 EmporousAdmitPolicyProofs::inv001Holds |
| Answer that breaks INV-002 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-002: proof EmporousAdmitPolicyProofs::inv002Holds |
| Answer that breaks INV-003 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-003: proof EmporousAdmitPolicyProofs::inv003Holds |
| Answer that breaks INV-004 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-004: proof EmporousAdmitPolicyProofs::inv004Holds |
| 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 |
| Realization chosen in code | tampering | Model source | low likelihood, major impact | Read from the scope: gate EA-03 features/suites/admission.feature; gate cargo xtask audit-parametric |
| 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 |
| Unauthorized admission | elevationOfPrivilege | Request bytes | medium likelihood, critical impact | Capability-edge walk: proof EmporousAdmitPolicyProofs::inv001Holds; gate EA-05 features/suites/admission.feature |
| Unknown realization admitted | tampering | Answer | low likelihood, major impact | Not found, not admitted: proof EmporousAdmitPolicyProofs::inv002Holds |

## 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 admission condition decided: Each admission condition of SPEC.md 6.3 and the namespace conflict has its own answer. | Functional suitability: Functional completeness | Undecided conditions | 0 |
| Every property proved: All 4 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 35 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 7 examples of the spec is answered as it states. | Functional suitability: Functional correctness | Example mismatches | 0 |
| No unauthorized admission: No request from an unauthorized principal is permitted. | Security: Resistance | Unauthorized permits | 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 | EmporousAdmitPolicy::judge, EmporousAdmitPolicy::encodeAnswer |
| OpenSpec | Requirements | EmporousAdmitPolicy::application |
| SPDX MIT OR Apache-2.0 | Licensing | EmporousAdmitPolicy::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 Emporous admission request
Viewpoint: Architecture::viewpointPublisherCorrectAnswers
Notation: ISO/PAS 19450:2015 OPM, Prism OPL profile

componentBrowser is an object.
componentEmporousAdmissionGuest is an object.
componentEmporousAdmissionGuest can be stateDeciding or stateIdle.
processDecide is a process.
processEncodeAnswer is a process.
processJudge is a process.
processParseRequest is a process.
componentEmporousAdmissionGuest 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 Emporous admission
component "componentBrowser" as c0
component "componentEmporousAdmissionGuest" as c1
component "componentEmporousAdmissionPage" as c2
component "componentGitHubPages" as c3
component "componentKappaRegistry" as c4
component "componentKappaStore" as c5
component "componentPrismBuild" as c6
component "componentSourceRepository" as c7
c0 --> c1 : edgeBrowserToEmporousAdmissionGuest
c1 --> c0 : edgeEmporousAdmissionGuestToBrowser
c1 --> c4 : edgeEmporousAdmissionGuestToKappaRegistry
c1 --> c5 : edgeEmporousAdmissionGuestToKappaStore
c2 --> c3 : edgeEmporousAdmissionPageToGitHubPages
c3 --> c0 : edgeGitHubPagesToBrowser
c4 --> c1 : edgeKappaRegistryToEmporousAdmissionGuest
c5 --> c1 : edgeKappaStoreToEmporousAdmissionGuest
c6 --> c1 : edgePrismBuildToEmporousAdmissionGuest
c6 --> c2 : edgePrismBuildToEmporousAdmissionPage
c7 --> c6 : edgeSourceRepositoryToPrismBuild
@enduml

```

### design/Design.viewUmlRequest.puml

```
@startuml
' UML 2.5.1 sequence diagram
' view: Design::viewUmlRequest
' viewpoint: Architecture::viewpointPublisherCorrectAnswers
title Answering a Emporous admission request
participant "componentBrowser" as p0
participant "componentEmporousAdmissionGuest" 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 Emporous admission 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 --> s1 : 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-emporous-admit-policy.zip has them all.

- app/src/Architecture.lex.tex (399 lines)
- app/src/Compliance.lex.tex (56 lines)
- app/src/Design.lex.tex (584 lines)
- app/src/Features.lex.tex (137 lines)
- app/src/Quality.lex.tex (375 lines)
- app/src/Security.lex.tex (607 lines)
- app/src/EmporousAdmitPolicy.lex.tex (245 lines)
- app/src/EmporousAdmitPolicyProofs.lex.tex (161 lines)
- app/lexlean.toml (43 lines)
- app/prompt.json (354 lines)
- model/ids.toml (65 lines)
- features/suites/emporous\_admit\_policy.feature (44 lines)
- crates/conformance/tests/emporous\_admit\_policy.rs (132 lines)
- site/app.json (114 lines)
- openspec/specs/emporous-admit-policy/spec.md (184 lines)
