# Example apps

> Apps built from one prompt each, grouped by pattern, and verified before they go live.

Each example is one prompt for an app from a real Prism or UOR project, with rules read from that project's source. The builder writes the whole app from the prompt. The pages workflow verifies every one before the site goes live. They are grouped by the pattern they follow: DMN decision tables, XACML policy decisions and UML state machines.

**Figure: Examples by pattern.** 33 examples. Each bar is one pattern; the coloured part was verified when this site was built.

|  | verified | not built here |
| --- | --- | --- |
| Decision tables | 21 | 0 |
| Policy decisions | 6 | 0 |
| State machines | 6 | 0 |

## Decision tables

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. OMG DMN 1.5, hit policy FIRST (https://www.omg.org/spec/DMN/1.5/).

- [Rule 30 cell](rule-30-cell/index.md): Find the next state of one Rule 30 cell from its neighbours, so every row of the pattern can be replayed and checked. Inspired by afflom/rule30.
- [Strike die](karst-zero-strike/index.md): Roll one strike die in Karst: Zero Horizon, with cover and momentum. Then every roll in a fight can be replayed. Inspired by afflom/karst-zero.
- [Wise deferral](ciris-deferral/index.md): 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.
- [Current support](legal-matter-support/index.md): Tell if a PrismLegal matter is current. A legal strategy should only rest on support that is checked, grounded and up to date. Inspired by afflom/prism-legal.
- [Header work](btc-header-work/index.md): Decide if a block header's hash meets its target, so any node can check the proof of work from the header alone. Inspired by afflom/prism-btc.
- [Plant attunement](garden-attunement/index.md): Decide if a player's gesture in Verdant Resonance reaches the plant they face. The garden then answers the same walk the same way. Inspired by afflom/verdant-resonance.
- [Capability route](uorust-capability/index.md): Decide how UORust records a Rust target by the effect it reaches. Every effect becomes a threat in the model, and nothing hides as pure. Inspired by afflom/uorust.
- [Publish gate](devrel-publish-gate/index.md): Decide if Prism-DevRel may publish its pages, so no reader ever sees a page that gets the model wrong. Inspired by afflom/prism-devrel.
- [Proposal admission](foundry-admission/index.md): Decide if a router's proposal joins the app. A stale, unclear or clashing proposal never becomes part of it. Inspired by UOR-Foundation/foundry.
- [Compression admission](uorc-admission/index.md): Decide if a new UORC archive replaces the best one so far. A smaller size must never come at the cost of lost data. Inspired by UOR-Foundation/compression.
- [Quorum commit](bft-commit/index.md): Decide if a round of votes commits a block. A validator commits only when enough others agree, and only once it holds the block itself. Inspired by UOR-Foundation/malachite-usdc.
- [Address admission](addr-admission/index.md): Decide if a value gets a UOR-ADDR address. Two values that mean the same thing share one label, and a broken value gets none. Inspired by UOR-Foundation/uor-addr.
- [Dataflow policy](dataflow-policy-check/index.md): Decide if a Prism dataflow script is accepted, rejected for breaking a policy, or an error. A script that leaks memory or personal data is never accepted. Inspired by UOR-Foundation/prism-code.
- [Draft admission](lexlean-mcp-draft-admission/index.md): Decide if LexLean MCP takes a draft from an AI model. No file path leaves its folders, and no draft goes over the owner's limits. Inspired by UOR-Foundation/lexlean-mcp.
- [Coded matmul admission](matmul-coded-admission/index.md): Decide if a coded matrix request is computed, or which error it gets. The checks run in the order the LexLean Matmul protocol sets. Inspired by afflom/lexlean-matmul.
- [UTQC row honesty](utqc-row-honesty/index.md): Decide if a row of the UOR Atlas UTQC dictionary passes the honesty check, so no row claims more than its source shows. Inspired by afflom/UOR-Atlas-UTQC.
- [Calculator protocol](calculator-protocol/index.md): Sort a Calculator request by the kind of answer it gets. A bad, unknown or too-large request never gets a number back. Inspired by UOR-Foundation/calculator-example.
- [Requantization clamp](mnist-requant-clamp/index.md): Sort how the MNIST network squeezes a 32-bit sum into an 8-bit value, so no value ever falls outside 0 to 255. Inspired by UOR-Foundation/MNIST.
- [JCS NFC admission](jcs-nfc-admission/index.md): Give the one refusal code for a broken JSON document, or let it through. Then every tool refuses the same input with the same code. Inspired by UOR-Foundation/uor-jcs-nfc.
- [Two-seed bar](r4-seed-gate/index.md): Decide if a two-seed UOR-R4 run beats its baselines, so a result inside the noise is never called a win. Inspired by UOR-Foundation/uor-r4.
- [Docs sync](site-docs-sync/index.md): Decide what the nightly docs sync does to uor.foundation. The site must never swap its docs for an empty or unchecked release. Inspired by UOR-Foundation/website.

## Policy decisions

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. OASIS XACML 3.0 policy decision point (https://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-os-en.html).

- [Open policy](holo-open-policy/index.md): 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.
- [Namespace authorization](kappa-namespace-authorization/index.md): Decide if kappa-registry lets someone change a namespace. Only its owner, a key holder or a short chain of trust can write. Inspired by UOR-Foundation/kappa-registry.
- [Axiom policy](lexlean-axiom-policy/index.md): Decide if a declaration uses only the axioms its source allows. Then lexlean verify publishes nothing that rests on more. Inspired by UOR-Foundation/LexLean.
- [GNAF claim wording](gnaf-claim-wording/index.md): Decide which words a GNAF document may use for a claim. No README or ledger may say more than the Lean kernel checked. Inspired by afflom/WASM-GEMM-GNAF.
- [Emporous admission](emporous-admit-policy/index.md): 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.
- [Portal publication](foundry-web-publication/index.md): Decide if foundry-web may publish a portal release. Only the exact build that was checked and approved can go live. Inspired by UOR-Foundation/foundry-web.

## State machines

The answer is the next state, given the current state and an event. This is a UML state machine written as one pure function. The state travels in the request, so the app keeps nothing between requests. The builder proves what holds over every run. OMG UML 2.5.1 behavioral state machine (https://www.omg.org/spec/UML/2.5.1/).

- [MCP task lifecycle](mcp-task-lifecycle/index.md): Find an MCP task's next state, so a client that polls, updates or cancels it always sees the state the protocol would write. Inspired by UOR-Foundation/MCP.
- [Container lifecycle](prismpm-container-lifecycle/index.md): Move a PrismPM holo container through its Docker life. A holo that fails its check never runs, and a running one is never removed. Inspired by UOR-Foundation/PrismPM.
- [Atlas walk controls](atlas-explorer-walk/index.md): Find the next state of the Atlas Explorer view from the button pressed. Then each walk through the E8 orbit can be replayed step by step. Inspired by afflom/atlas-explorer.
- [Vault escrow lifecycle](vault-escrow-lifecycle/index.md): Find the next status of an escrow in the PrismPM Vault from the step applied to it. Then locking, release and refund can be replayed. Inspired by afflom/aistudio-experiment.
- [Release lifecycle](template-release-lifecycle/index.md): Move a template release from build to accept, one step at a time. No release is accepted before every step has passed in order. Inspired by UOR-Foundation/template.
- [Organization lifecycle](foundry-org-lifecycle/index.md): Move a Foundry organization through its life. Only its own admins can switch it on, pause it or retire it. Inspired by UOR-Foundation/uor-foundry.
