Tutorials: Build your first Prism app
// tutorial · Learn
Build your first Prism app
Describe your app once, as a structured prompt, and Prism writes every facet of it, proves what it promises and publishes it.
In this tutorial you build, check and ship one Prism app from one prompt. It takes four steps. The app is verified the first time its repository's workflow runs.
The data in this figure
| Step | What happens |
|---|---|
| 1. Write a prompt | the rules, answers and examples, as JSON |
| 2. Build | every facet, written as Prism source |
| 3. Check | the Lean kernel proves each claim |
| 4. Ship | GitHub Pages serves the verified app |
- Load the first example. In the builder below, Start from already shows Rule 30 cell (afflom/rule30). Its
appis aprism/spec/1spec. It lists the request fields, the answers, the rules in order, the properties Lean must prove, and examples. - Build it. Press Build the app. The builder runs in this page and sends nothing anywhere. You see what the app will claim, and every file it wrote, one module per facet.
- Change one rule and build again. Change a rule's answer so that it contradicts an example, and build. The builder refuses and names the example. Put the rule back. Every prompt is checked before anything is written.
- Download and ship it. Press Download .zip and run the commands under Ship. The repository's gate,
just vv, checks every claim. Its Pages workflow proves the app with the Lean kernel and publishes it.
Build an app
Ship
gh repo create OWNER/prism-NAME --template UOR-Foundation/template --public
gh api -X POST repos/OWNER/prism-NAME/pages -f build_type=workflow
git -c core.autocrlf=false clone https://github.com/OWNER/prism-NAME.git
cd prism-NAME
git rm -q app/src/Contract.lex.tex crates/conformance/tests/contract.rs features/suites/contract.feature
unzip -o ../prism-NAME.zip
git add -A && git commit -m "Build the app from its prompt" && git pushNAME is the app's name: app.name in the prompt, such as rule-thirty-cell for Rule 30 cell. The download is prism-NAME.zip. First set repository in the prompt to OWNER/prism-NAME, so the page links to the right place.
Next
- How to build a decision table app: The rules are tried in order, and the first one that matches gives the answer.
- How to build a policy decision app: The answer is one XACML 3.0 decision: permit, deny, not-applicable, indeterminate.
- How to build a state machine app: The answer is the next state, given the current state and an event.
- Examples: 33 apps from real Prism projects, each built from one prompt and verified.
- Reference: every member of a prompt, the patterns, the CLI and the MCP tool.
- Prism source: the Foundation modules and language every app is written in.
- Explanation: how one prompt becomes every facet, and what checks each.
Words on this page 5
- facet
- One view of a model, such as its architecture, its security or its quality. Each facet holds records.
- Lean kernel
- The small checker at the heart of the Lean prover. It accepts a proof only if every step follows the rules.
- MCP
- Model Context Protocol: an open protocol through which AI agents call tools such as the Prism builder.
- XACML
- OASIS eXtensible Access Control Markup Language 3.0: a policy decides permit, deny, not applicable or indeterminate.
- prompt
- One JSON document that describes an app. The builder turns it into every facet of a Prism model.