# Strike die

> 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 (https://github.com/afflom/karst-zero), live at https://afflom.github.io/karst-zero/. A tactical wargame whose Nemesis Core engine is modeled and verified with LexLean and PrismPM. 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 Strike die 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 | die, cover, momentum |
| 2. 6 rules | the first that matches wins |
| 3. Answer | critical, hit, miss, blocked |
| 4. Proved | 4 theorems, 43 tests |

Verified by prismpm verify in the pinned SDK. Fingerprint: 8021a6db83f243b8a793ece306fa4061838d30f47a3ab312a24823f8395ba4de. Acceptance vectors: 43. Claims: 7.

## The prompt

```json
{
  "schema": "prism/prompt/1",
  "goal": "Roll one strike die in Karst: Zero Horizon, with cover and momentum. Then every roll in a fight can be replayed.",
  "pattern": "decisionTable",
  "repository": "afflom/karst-zero",
  "app": {
    "name": "karst-strike",
    "limits": [
      "It resolves one attacking die against no defending hits; the opposed pool sums the dice.",
      "Plating, resilience and subsystem rupture are outside it."
    ],
    "title": "Strike die",
    "purpose": "Decide what one d6 of a strike pool does against an undefended target behind no cover, low cover or a solid bulkhead, after the striker moved some sectors.",
    "fields": [
      {
        "name": "die",
        "kind": "number",
        "min": 0,
        "means": "the face the d6 shows",
        "max": 6
      },
      {
        "name": "cover",
        "kind": "choice",
        "values": [
          "none",
          "low",
          "solid"
        ],
        "means": "the cover between the striker and the target"
      },
      {
        "name": "momentum",
        "kind": "number",
        "min": 0,
        "means": "sectors the striker moved before the strike, 4 meaning 4 or more",
        "max": 4
      }
    ],
    "outcomes": [
      "critical",
      "hit",
      "miss",
      "blocked"
    ],
    "meanings": {
      "critical": "one net hit from a natural 6",
      "hit": "one net hit",
      "miss": "no net hit",
      "blocked": "line of sight is blocked, no hit"
    },
    "rules": [
      {
        "when": [
          {
            "field": "cover",
            "op": "is",
            "value": "solid"
          }
        ],
        "then": "blocked",
        "why": "src/CombatEngine.lex.tex resolveOpposedNetHits: cover level 2, a solid bulkhead, gives 0 net hits (bulkheadFullCoverBlocksLineOfSight)"
      },
      {
        "when": [
          {
            "field": "cover",
            "op": "is",
            "value": "none"
          },
          {
            "field": "die",
            "op": "=",
            "value": 6
          }
        ],
        "then": "critical",
        "why": "src/game/nemesisEngine.ts: the strike pool scores critical 6s"
      },
      {
        "when": [
          {
            "field": "cover",
            "op": "is",
            "value": "none"
          },
          {
            "field": "die",
            "op": ">=",
            "value": 4
          }
        ],
        "then": "hit",
        "why": "README Subsystem 2: the opposed strike pool hits on 4+"
      },
      {
        "when": [
          {
            "field": "cover",
            "op": "is",
            "value": "none"
          },
          {
            "field": "momentum",
            "op": ">=",
            "value": 4
          }
        ],
        "then": "hit",
        "why": "src/CombatEngine.lex.tex momentumBonusHit: 4 moved sectors add one hit to the pool"
      },
      {
        "when": [
          {
            "field": "cover",
            "op": "is",
            "value": "low"
          },
          {
            "field": "momentum",
            "op": ">=",
            "value": 4
          },
          {
            "field": "die",
            "op": "=",
            "value": 6
          }
        ],
        "then": "critical",
        "why": "src/CombatEngine.lex.tex: the momentum hit pays for the low cover auto-evade, so the natural 6 still lands"
      },
      {
        "when": [
          {
            "field": "cover",
            "op": "is",
            "value": "low"
          },
          {
            "field": "momentum",
            "op": ">=",
            "value": 4
          },
          {
            "field": "die",
            "op": ">=",
            "value": 4
          }
        ],
        "then": "hit",
        "why": "src/CombatEngine.lex.tex resolveOpposedNetHits: atk + momentumBonusHit minus coverAutoEvade leaves one net hit"
      }
    ],
    "otherwise": "miss",
    "otherwiseWhy": "src/CombatEngine.lex.tex coverAutoEvade: low cover cancels the single hit without a momentum charge, and a face below 4 without momentum scores none",
    "properties": [
      {
        "kind": "never",
        "when": [
          {
            "field": "cover",
            "op": "is",
            "value": "solid"
          }
        ],
        "then": "hit",
        "why": "nothing hits through a solid bulkhead"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "die",
            "op": "<",
            "value": 6
          }
        ],
        "then": "critical",
        "why": "only a natural 6 is a critical"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "cover",
            "op": "is",
            "value": "low"
          },
          {
            "field": "momentum",
            "op": "<",
            "value": 4
          }
        ],
        "then": "hit",
        "why": "partialCoverGrantsOneAutoEvade: without a momentum charge low cover cancels the one hit"
      },
      {
        "kind": "always",
        "when": [
          {
            "field": "cover",
            "op": "is",
            "value": "solid"
          }
        ],
        "then": "blocked",
        "why": "a solid bulkhead always blocks line of sight"
      }
    ],
    "examples": [
      {
        "request": "6 none 0",
        "response": "critical"
      },
      {
        "request": "4 none 0",
        "response": "hit"
      },
      {
        "request": "3 none 0",
        "response": "miss"
      },
      {
        "request": "3 none 4",
        "response": "hit"
      },
      {
        "request": "4 low 0",
        "response": "miss"
      },
      {
        "request": "6 low 0",
        "response": "miss"
      },
      {
        "request": "4 low 4",
        "response": "hit"
      },
      {
        "request": "6 low 4",
        "response": "critical"
      },
      {
        "request": "6 solid 4",
        "response": "blocked"
      }
    ]
  },
  "stakeholders": [
    {
      "name": "Player",
      "text": "Rolls the strike pool and needs every die resolved by the rules, the same on every screen.",
      "concerns": [
        "Correct answers"
      ]
    },
    {
      "name": "Game designer",
      "text": "Tunes cover and momentum and needs the never-hit guarantees to survive every change.",
      "concerns": [
        "Proved guarantees",
        "Correct answers"
      ]
    }
  ],
  "components": [
    {
      "name": "Karst client",
      "text": "The Karst: Zero Horizon client, src/game/nemesisEngine.ts, which rolls the pool and shows the combat breakdown.",
      "kind": "staticSite"
    },
    {
      "name": "karst-kernel",
      "text": "The no_std, forbid(unsafe_code) Rust kernel in crates/karst-kernel that realizes the Nemesis Core engine.",
      "kind": "service"
    }
  ],
  "threats": [
    {
      "name": "Loaded die",
      "text": "A client sends a face it did not roll, to turn a miss into a hit.",
      "stride": "tampering",
      "asset": "request",
      "likelihood": "medium",
      "impact": "major",
      "accepted": "The app resolves the face it is given; the roll itself belongs to the client, and the skirmish replay shows every face sent."
    },
    {
      "name": "Shot through a bulkhead",
      "text": "A strike through solid cover is counted as a hit, so a unit behind a bulkhead takes damage.",
      "stride": "elevationOfPrivilege",
      "asset": "answer",
      "likelihood": "low",
      "impact": "major",
      "control": {
        "name": "Line of sight proved",
        "text": "The app never answers hit behind solid cover, and the engine proves 0 net hits at cover level 2.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "KarstStrikeProofs::inv001Holds"
          },
          {
            "kind": "review",
            "reference": "src/CombatEngine.lex.tex bulkheadFullCoverBlocksLineOfSight"
          }
        ]
      }
    },
    {
      "name": "Momentum without the move",
      "text": "A strike behind low cover is credited a momentum charge the striker did not earn.",
      "stride": "tampering",
      "asset": "answer",
      "likelihood": "medium",
      "impact": "minor",
      "control": {
        "name": "Four sectors required",
        "text": "Without 4 moved sectors low cover cancels the hit, proved for every request.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "KarstStrikeProofs::inv003Holds"
          },
          {
            "kind": "review",
            "reference": "src/CombatEngine.lex.tex momentumChargeRequiresFourSectors"
          }
        ]
      }
    }
  ],
  "quality": [
    {
      "characteristic": "Interaction capability",
      "subcharacteristic": "Self-descriptiveness",
      "requirement": "Every face named",
      "text": "Each answer names what the die did: critical, hit, miss or blocked.",
      "measure": "Unnamed answers",
      "measureText": "Answers that are not one of the four outcome words.",
      "threshold": 0
    }
  ],
  "journeys": [
    {
      "stakeholder": "Player",
      "steps": [
        "REQ-001",
        "REQ-002",
        "REQ-003",
        "REQ-004",
        "otherwise"
      ]
    },
    {
      "stakeholder": "Game designer",
      "steps": [
        "REQ-005",
        "REQ-006",
        "INV-001",
        "INV-003",
        "INV-004"
      ]
    }
  ],
  "axioms": {
    "inv004Holds": [
      "Classical.choice",
      "Quot.sound",
      "propext"
    ]
  },
  "concerns": [],
  "license": "MIT OR Apache-2.0"
}
```

## Claims

- KS-01: The app never answers hit when cover is solid
- KS-02: The app never answers critical when die is below 6
- KS-03: The app never answers hit when cover is low and momentum is below 4
- KS-04: The app always answers blocked when cover is solid
- KS-05: The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references
- KS-06: The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared
- KS-07: 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 | critical, hit, miss, blocked |

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

|  | rules |
| --- | --- |
| critical | 2 |
| hit | 3 |
| miss | 0 |
| blocked | 1 |

## Behavior

A request is die, cover, momentum, separated by spaces. The first rule that matches decides. If none matches, the answer is miss. A request over 88 bytes, or in any other form, is answered invalid.

| Rule | When | Answer | Why |
| --- | --- | --- | --- |
| REQ-001 | cover is solid | blocked | src/CombatEngine.lex.tex resolveOpposedNetHits: cover level 2, a solid bulkhead, gives 0 net hits (bulkheadFullCoverBlocksLineOfSight) |
| REQ-002 | cover is none and die equals 6 | critical | src/game/nemesisEngine.ts: the strike pool scores critical 6s |
| REQ-003 | cover is none and die is at least 4 | hit | README Subsystem 2: the opposed strike pool hits on 4+ |
| REQ-004 | cover is none and momentum is at least 4 | hit | src/CombatEngine.lex.tex momentumBonusHit: 4 moved sectors add one hit to the pool |
| REQ-005 | cover is low and momentum is at least 4 and die equals 6 | critical | src/CombatEngine.lex.tex: the momentum hit pays for the low cover auto-evade, so the natural 6 still lands |
| REQ-006 | cover is low and momentum is at least 4 and die is at least 4 | hit | src/CombatEngine.lex.tex resolveOpposedNetHits: atk + momentumBonusHit minus coverAutoEvade leaves one net hit |
| otherwise | no rule matches | miss | src/CombatEngine.lex.tex coverAutoEvade: low cover cancels the single hit without a momentum charge, and a face below 4 without momentum scores none |

## 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 hit when cover is solid. | KarstStrikeProofs::inv001Holds | nothing hits through a solid bulkhead |
| INV-002 | It never answers critical when die is below 6. | KarstStrikeProofs::inv002Holds | only a natural 6 is a critical |
| INV-003 | It never answers hit when cover is low and momentum is below 4. | KarstStrikeProofs::inv003Holds | partialCoverGrantsOneAutoEvade: without a momentum charge low cover cancels the one hit |
| INV-004 | It always answers blocked when cover is solid. | KarstStrikeProofs::inv004Holds | a solid bulkhead always blocks line of sight |

## Architecture

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

| Stakeholder | Who they are | Concerns |
| --- | --- | --- |
| Game designer | Tunes cover and momentum and needs the never-hit guarantees to survive every change. | Proved guarantees, Correct answers |
| Player | Rolls the strike pool and needs every die resolved by the rules, the same on every screen. | Correct answers |
| 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 |
| --- | --- | --- |
| Correct answers | Every well-formed request is answered by the first rule that matches it, or miss 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 3 fields in order, or is longer than 88 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 Strike die guest. |
| GitHub Pages | externalSystem | Serves the page and the holo from the repository Pages workflow. |
| Karst client | staticSite | The Karst: Zero Horizon client, src/game/nemesisEngine.ts, which rolls the pool and shows the combat breakdown. |
| karst-kernel | service | The no\_std, forbid(unsafe\_code) Rust kernel in crates/karst-kernel that realizes the Nemesis Core engine. |
| 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. |
| Strike die guest | service | The Core-Wasm guest built from the model: it answers one request of at most 88 bytes with one answer of at most 64. |
| Strike die 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 Strike die request | opmObjectProcess | Game designer: Correct answers |
| Components of Strike die | umlComponent | Verifier: Integrity of the published app |
| Answering a Strike die request | umlSequence | Game designer: Correct answers |
| States of the Strike die 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 cover is solid, the answer is blocked. | KarstStrike::rule1, KarstStrike::judge | KarstStrike::application |
| When cover is none and die equals 6, the answer is critical. | KarstStrike::rule2, KarstStrike::judge | KarstStrike::application |
| When cover is none and die is at least 4, the answer is hit. | KarstStrike::rule3, KarstStrike::judge | KarstStrike::application |
| When cover is none and momentum is at least 4, the answer is hit. | KarstStrike::rule4, KarstStrike::judge | KarstStrike::application |
| When cover is low and momentum is at least 4 and die equals 6, the answer is critical. | KarstStrike::rule5, KarstStrike::judge | KarstStrike::application |
| When cover is low and momentum is at least 4 and die is at least 4, the answer is hit. | KarstStrike::rule6, KarstStrike::judge | KarstStrike::application |
| When no rule matches, the answer is miss. | KarstStrike::judge | KarstStrike::application |
| A request that is not die, cover, momentum in order, separated by single spaces, or is over 88 bytes, is answered invalid. | KarstStrike::dispatch, KarstStrike::decodeField1 | KarstStrike::application |
| It never answers hit when cover is solid. | KarstStrike::judge | KarstStrikeProofs::inv001Holds |
| It never answers critical when die is below 6. | KarstStrike::judge | KarstStrikeProofs::inv002Holds |
| It never answers hit when cover is low and momentum is below 4. | KarstStrike::judge | KarstStrikeProofs::inv003Holds |
| It always answers blocked when cover is solid. | KarstStrike::judge | KarstStrikeProofs::inv004Holds |

## Journeys

The ordered features each stakeholder takes.

| Stakeholder | Steps |
| --- | --- |
| Game designer | REQ-005 → REQ-006 → INV-001 → INV-003 → INV-004 |
| Player | REQ-001 → REQ-002 → REQ-003 → REQ-004 → otherwise |
| 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 KarstStrikeProofs::inv001Holds |
| Answer that breaks INV-002 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-002: proof KarstStrikeProofs::inv002Holds |
| Answer that breaks INV-003 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-003: proof KarstStrikeProofs::inv003Holds |
| Answer that breaks INV-004 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-004: proof KarstStrikeProofs::inv004Holds |
| Granted capability | informationDisclosure | Answer | low likelihood, major impact | No capability granted: gate prism-code check refuses an ungranted guest import |
| Loaded die | tampering | Request bytes | medium likelihood, major impact | accepted: The app resolves the face it is given; the roll itself belongs to the client, and the skirmish replay shows every face sent. |
| Malformed request | tampering | Request bytes | high likelihood, major impact | Strict decoder: gate malformed-request acceptance vectors, replayed in the compiled guest by prismpm verify |
| Momentum without the move | tampering | Answer | medium likelihood, minor impact | Four sectors required: proof KarstStrikeProofs::inv003Holds; review src/CombatEngine.lex.tex momentumChargeRequiresFourSectors |
| 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 |
| Shot through a bulkhead | elevationOfPrivilege | Answer | low likelihood, major impact | Line of sight proved: proof KarstStrikeProofs::inv001Holds; review src/CombatEngine.lex.tex bulkheadFullCoverBlocksLineOfSight |
| 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 176 bytes for one request. | Performance efficiency: Resource utilization | Guest allocation bytes | 176 |
| Bounded request: A request over 88 bytes is refused before any field is read. | Performance efficiency: Time behaviour | Request bytes read | 88 |
| Every face named: Each answer names what the die did: critical, hit, miss or blocked. | Interaction capability: Self-descriptiveness | Unnamed answers | 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, miss otherwise, or invalid. | Functional suitability: Functional completeness | Unanswered requests | 0 |
| Every vector replays: All 43 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 9 examples of the spec is answered as it states. | Functional suitability: Functional correctness | Example mismatches | 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 | KarstStrike::judge |
| OpenSpec | Requirements | KarstStrike::application |
| SPDX MIT OR Apache-2.0 | Licensing | KarstStrike::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 Strike die request
Viewpoint: Architecture::viewpointGameDesignerCorrectAnswers
Notation: ISO/PAS 19450:2015 OPM, Prism OPL profile

componentBrowser is an object.
componentStrikeDieGuest is an object.
componentStrikeDieGuest can be stateDeciding or stateIdle.
processDecide is a process.
processEncodeAnswer is a process.
processJudge is a process.
processParseRequest is a process.
componentStrikeDieGuest 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 Strike die
component "componentBrowser" as c0
component "componentGitHubPages" as c1
component "componentKarstClient" as c2
component "componentKarstKernel" as c3
component "componentPrismBuild" as c4
component "componentSourceRepository" as c5
component "componentStrikeDieGuest" as c6
component "componentStrikeDiePage" as c7
c0 --> c6 : edgeBrowserToStrikeDieGuest
c1 --> c0 : edgeGitHubPagesToBrowser
c2 --> c6 : edgeKarstClientToStrikeDieGuest
c3 --> c6 : edgeKarstKernelToStrikeDieGuest
c4 --> c6 : edgePrismBuildToStrikeDieGuest
c4 --> c7 : edgePrismBuildToStrikeDiePage
c5 --> c4 : edgeSourceRepositoryToPrismBuild
c6 --> c0 : edgeStrikeDieGuestToBrowser
c6 --> c2 : edgeStrikeDieGuestToKarstClient
c6 --> c3 : edgeStrikeDieGuestToKarstKernel
c7 --> c1 : edgeStrikeDiePageToGitHubPages
@enduml

```

### design/Design.viewUmlRequest.puml

```
@startuml
' UML 2.5.1 sequence diagram
' view: Design::viewUmlRequest
' viewpoint: Architecture::viewpointGameDesignerCorrectAnswers
title Answering a Strike die request
participant "componentBrowser" as p0
participant "componentStrikeDieGuest" 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 Strike die guest
state "stateAnsweredBlocked" as s0
state "stateAnsweredCritical" as s1
state "stateAnsweredHit" as s2
state "stateAnsweredMiss" as s3
state "stateDeciding" as s4
state "stateIdle" as s5
state "stateRefused" as s6
[*] --> s5
s5 --> s4 : processParseRequest
s5 --> s6 : processParseRequest
s4 --> s0 : processRule1
s4 --> s1 : processRule2
s4 --> s2 : processRule3
s4 --> s2 : processRule4
s4 --> s1 : processRule5
s4 --> s2 : processRule6
s4 --> s3 : processOtherwise
s1 --> s5 : processEncodeAnswer
s2 --> s5 : processEncodeAnswer
s3 --> s5 : processEncodeAnswer
s0 --> 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-karst-strike.zip has them all.

- app/src/Architecture.lex.tex (392 lines)
- app/src/Compliance.lex.tex (56 lines)
- app/src/Design.lex.tex (598 lines)
- app/src/Features.lex.tex (144 lines)
- app/src/Quality.lex.tex (361 lines)
- app/src/Security.lex.tex (593 lines)
- app/src/KarstStrike.lex.tex (224 lines)
- app/src/KarstStrikeProofs.lex.tex (141 lines)
- app/lexlean.toml (43 lines)
- app/prompt.json (378 lines)
- model/ids.toml (65 lines)
- features/suites/karst\_strike.feature (44 lines)
- crates/conformance/tests/karst\_strike.rs (132 lines)
- site/app.json (114 lines)
- openspec/specs/karst-strike/spec.md (201 lines)
