# GNAF claim wording

> 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 (https://github.com/afflom/WASM-GEMM-GNAF). A Lean 4 mechanization working toward a kernel-checked global-optimality theorem for a committed WebAssembly GEMM binary under UOR-GNAF. 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 GNAF claim wording 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 | word, level, declaration, axioms, scope |
| 2. 7 rules | the first that applies decides |
| 3. Answer | permit, deny, not-applicable, indeterminate |
| 4. Proved | 4 theorems, 41 tests |

Verified by prismpm verify in the pinned SDK. Fingerprint: 4995fd0233cc61ad259d6a0541d1412e14b20783e64bb08f0f4c5973f9c7001d. Acceptance vectors: 41. Claims: 7.

## The prompt

```json
{
  "schema": "prism/prompt/1",
  "goal": "Decide which words a GNAF document may use for a claim. No README or ledger may say more than the Lean kernel checked.",
  "pattern": "policyDecision",
  "repository": "afflom/WASM-GEMM-GNAF",
  "app": {
    "name": "gnaf-claim-wording",
    "title": "GNAF claim wording",
    "purpose": "Decide whether a strong word may be used for a claim row, from its claim level, its declaration, its axioms and its scope.",
    "fields": [
      {
        "name": "word",
        "kind": "choice",
        "values": [
          "proved",
          "theorem",
          "globally-optimal",
          "measured",
          "cited"
        ],
        "means": "the word a document wants to use for the claim"
      },
      {
        "name": "level",
        "kind": "choice",
        "values": [
          "authority",
          "build-evidence",
          "formal-proof",
          "measurement",
          "open"
        ],
        "means": "the claim level of the row in model/claims.json"
      },
      {
        "name": "declaration",
        "kind": "choice",
        "values": [
          "present",
          "absent"
        ],
        "means": "whether the Lean declaration the row names exists in the compiled environment"
      },
      {
        "name": "axioms",
        "kind": "choice",
        "values": [
          "permitted",
          "executable-choice",
          "sorry"
        ],
        "means": "the transitive axioms the declaration reaches"
      },
      {
        "name": "scope",
        "kind": "choice",
        "values": [
          "release",
          "conditional"
        ],
        "means": "whether the declaration is the release-scoped statement or a generic or conditional lemma"
      }
    ],
    "outcomes": [
      "permit",
      "deny",
      "not-applicable",
      "indeterminate"
    ],
    "meanings": {
      "permit": "XACML 3.0 section 7: Permit; the document may use the word for this claim",
      "deny": "XACML 3.0 section 7: Deny; the word overstates what the claim establishes",
      "not-applicable": "XACML 3.0 section 7: NotApplicable; the strong-wording policy does not govern this word",
      "indeterminate": "XACML 3.0 section 7: Indeterminate; the declaration cannot be found, so the policy cannot be evaluated"
    },
    "rules": [
      {
        "when": [
          {
            "field": "word",
            "op": "is",
            "value": "measured"
          }
        ],
        "then": "not-applicable",
        "why": "SPEC.md 17.1 restricts only proved, theorem and globally optimal; a measurement is reported, not promoted"
      },
      {
        "when": [
          {
            "field": "word",
            "op": "is",
            "value": "cited"
          }
        ],
        "then": "not-applicable",
        "why": "SPEC.md 17.1: an external citation is an authority row and uses its own words"
      },
      {
        "when": [
          {
            "field": "level",
            "op": "is not",
            "value": "formal-proof"
          }
        ],
        "then": "deny",
        "why": "SPEC.md 17.1: only formalProof supports proved, theorem or globally optimal; tests, benchmarks, citations and measurements cannot promote a claim"
      },
      {
        "when": [
          {
            "field": "declaration",
            "op": "is",
            "value": "absent"
          }
        ],
        "then": "indeterminate",
        "why": "SPEC.md 17.2: the conformance tool must confirm the declaration exists in the compiled Lean environment before the row is credited"
      },
      {
        "when": [
          {
            "field": "axioms",
            "op": "is",
            "value": "sorry"
          }
        ],
        "then": "deny",
        "why": "README.md: what is proved is kernel-checked and sorry-free"
      },
      {
        "when": [
          {
            "field": "axioms",
            "op": "is",
            "value": "executable-choice"
          }
        ],
        "then": "deny",
        "why": "README.md: declarations reaching Classical.choice as executable witnesses are recorded as uncredited, not counted as formal proof"
      },
      {
        "when": [
          {
            "field": "word",
            "op": "is",
            "value": "globally-optimal"
          },
          {
            "field": "scope",
            "op": "is",
            "value": "conditional"
          }
        ],
        "then": "deny",
        "why": "WasmGemmGnaf/Theorems/Status.lean: the generic argmin and other conditional infrastructure do not instantiate the release claim"
      }
    ],
    "otherwise": "permit",
    "otherwiseWhy": "a formal-proof row whose declaration exists, reaches only propext, Quot.sound and Prop-level Classical.choice, and is used at its own scope",
    "properties": [
      {
        "kind": "never",
        "when": [
          {
            "field": "level",
            "op": "is not",
            "value": "formal-proof"
          }
        ],
        "then": "permit",
        "why": "SPEC.md 17.1: nothing short of formalProof supports a strong word"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "word",
            "op": "is",
            "value": "globally-optimal"
          },
          {
            "field": "scope",
            "op": "is",
            "value": "conditional"
          }
        ],
        "then": "permit",
        "why": "README.md: the generic finite-argmin lemma does not identify a committed artifact"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "axioms",
            "op": "is",
            "value": "executable-choice"
          }
        ],
        "then": "permit",
        "why": "README.md: executable Classical.choice witnesses are uncredited"
      },
      {
        "kind": "always",
        "when": [
          {
            "field": "word",
            "op": "is",
            "value": "measured"
          }
        ],
        "then": "not-applicable",
        "why": "a measured number is reported with its corpus, never worded as a proof"
      }
    ],
    "examples": [
      {
        "request": "proved formal-proof present permitted conditional",
        "response": "permit"
      },
      {
        "request": "globally-optimal formal-proof present permitted conditional",
        "response": "deny"
      },
      {
        "request": "globally-optimal formal-proof absent permitted release",
        "response": "indeterminate"
      },
      {
        "request": "theorem measurement present permitted release",
        "response": "deny"
      },
      {
        "request": "measured measurement present permitted release",
        "response": "not-applicable"
      },
      {
        "request": "proved formal-proof present executable-choice conditional",
        "response": "deny"
      }
    ]
  },
  "stakeholders": [
    {
      "name": "Release reviewer",
      "text": "Reviews README.md, CERTIFICATION.md and CONFORMANCE.md and needs no sentence to claim global optimality before the release theorem closes.",
      "concerns": [
        "Proved guarantees",
        "Honest wording"
      ]
    },
    {
      "name": "Maintainer",
      "text": "Adds claim rows and prose and needs to know, row by row, which words the row supports.",
      "concerns": [
        "Correct answers"
      ]
    }
  ],
  "concerns": [
    {
      "name": "Honest wording",
      "text": "A strong word appears only beside a formal-proof row whose declaration the kernel checked at its own scope.",
      "model": "quality"
    }
  ],
  "components": [
    {
      "name": "Lean 4 kernel",
      "text": "Lean 4.30.0, which checks every declaration and reports its transitive axioms.",
      "kind": "externalSystem"
    },
    {
      "name": "UOR-GNAF authority",
      "text": "The pinned UOR-GNAF authority whose total answer carrier fixes the terminal answer WorkloadIncomplete.",
      "kind": "externalSystem"
    },
    {
      "name": "Conformance tool",
      "text": "The xtask gate that loads the compiled environment, recomputes identities and enforces the dependency firewall.",
      "kind": "cliAdapter"
    }
  ],
  "threats": [
    {
      "name": "Benchmark promoted to proof",
      "text": "A benchmark or test result is worded as proved or globally optimal.",
      "stride": "elevationOfPrivilege",
      "asset": "answer",
      "likelihood": "medium",
      "impact": "critical",
      "control": {
        "name": "Formal proof only",
        "text": "Only a formal-proof row is permitted a strong word.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "GnafClaimWordingProofs::inv001Holds"
          },
          {
            "kind": "gate",
            "reference": "just vv"
          }
        ]
      }
    },
    {
      "name": "Generic lemma cited as release theorem",
      "text": "Universal.exists_globalOptimal_of_nonempty is cited as if it were the release-scoped optimality theorem.",
      "stride": "spoofing",
      "asset": "answer",
      "likelihood": "medium",
      "impact": "critical",
      "control": {
        "name": "Scope check",
        "text": "Global optimality is denied for any conditional declaration.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "GnafClaimWordingProofs::inv002Holds"
          },
          {
            "kind": "review",
            "reference": "WasmGemmGnaf/Theorems/Status.lean"
          }
        ]
      }
    },
    {
      "name": "Self-recorded proposition",
      "text": "A row records GlobalOptimal := True so its hash matches itself.",
      "stride": "tampering",
      "asset": "source",
      "likelihood": "low",
      "impact": "critical",
      "control": {
        "name": "Dependency firewall",
        "text": "The conformance tool unfolds scope-critical definitions and compares them to the WGG-GO-1 authority schema.",
        "evidence": [
          {
            "kind": "gate",
            "reference": "xtask/src/firewall.rs"
          },
          {
            "kind": "review",
            "reference": "SPEC.md 17.2"
          }
        ]
      }
    }
  ],
  "quality": [
    {
      "characteristic": "Functional suitability",
      "subcharacteristic": "Functional correctness",
      "requirement": "No unearned strong word",
      "text": "No strong word is permitted for a row below formal proof or with uncredited axioms.",
      "measure": "Unearned permits",
      "measureText": "Requests below formal proof or with executable-choice or sorry axioms that answer permit.",
      "threshold": 0
    },
    {
      "characteristic": "Security",
      "subcharacteristic": "Accountability",
      "requirement": "Every permit has a declaration",
      "text": "A permit always names a declaration the compiled environment holds.",
      "measure": "Permits without a declaration",
      "measureText": "Requests with an absent declaration that answer permit.",
      "threshold": 0
    }
  ],
  "journeys": [
    {
      "stakeholder": "Release reviewer",
      "steps": [
        "REQ-004",
        "REQ-007",
        "INV-002",
        "INV-001"
      ]
    },
    {
      "stakeholder": "Maintainer",
      "steps": [
        "REQ-001",
        "REQ-003",
        "REQ-006",
        "otherwise"
      ]
    }
  ],
  "axioms": {
    "inv001Holds": [
      "Classical.choice",
      "Quot.sound",
      "propext"
    ],
    "inv002Holds": [
      "Classical.choice",
      "Quot.sound",
      "propext"
    ],
    "inv003Holds": [
      "Classical.choice",
      "Quot.sound",
      "propext"
    ],
    "inv004Holds": [
      "Classical.choice",
      "Quot.sound",
      "propext"
    ]
  },
  "license": "MIT OR Apache-2.0"
}
```

## Claims

- GC-01: The app never answers permit when level is not formal-proof
- GC-02: The app never answers permit when word is globally-optimal and scope is conditional
- GC-03: The app never answers permit when axioms is executable-choice
- GC-04: The app always answers not-applicable when word is measured
- GC-05: The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references
- GC-06: The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared
- GC-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 | 4 |
| not-applicable | 2 |
| indeterminate | 1 |

## Behavior

A request is word, level, declaration, axioms, scope, separated by spaces. The first rule that matches decides. If none matches, the answer is permit. A request over 136 bytes, or in any other form, is answered invalid.

| Rule | When | Answer | Why |
| --- | --- | --- | --- |
| REQ-001 | word is measured | not-applicable | SPEC.md 17.1 restricts only proved, theorem and globally optimal; a measurement is reported, not promoted |
| REQ-002 | word is cited | not-applicable | SPEC.md 17.1: an external citation is an authority row and uses its own words |
| REQ-003 | level is not formal-proof | deny | SPEC.md 17.1: only formalProof supports proved, theorem or globally optimal; tests, benchmarks, citations and measurements cannot promote a claim |
| REQ-004 | declaration is absent | indeterminate | SPEC.md 17.2: the conformance tool must confirm the declaration exists in the compiled Lean environment before the row is credited |
| REQ-005 | axioms is sorry | deny | README.md: what is proved is kernel-checked and sorry-free |
| REQ-006 | axioms is executable-choice | deny | README.md: declarations reaching Classical.choice as executable witnesses are recorded as uncredited, not counted as formal proof |
| REQ-007 | word is globally-optimal and scope is conditional | deny | WasmGemmGnaf/Theorems/Status.lean: the generic argmin and other conditional infrastructure do not instantiate the release claim |
| otherwise | no rule matches | permit | a formal-proof row whose declaration exists, reaches only propext, Quot.sound and Prop-level Classical.choice, and is used at its own scope |

## 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 level is not formal-proof. | GnafClaimWordingProofs::inv001Holds | SPEC.md 17.1: nothing short of formalProof supports a strong word |
| INV-002 | It never answers permit when word is globally-optimal and scope is conditional. | GnafClaimWordingProofs::inv002Holds | README.md: the generic finite-argmin lemma does not identify a committed artifact |
| INV-003 | It never answers permit when axioms is executable-choice. | GnafClaimWordingProofs::inv003Holds | README.md: executable Classical.choice witnesses are uncredited |
| INV-004 | It always answers not-applicable when word is measured. | GnafClaimWordingProofs::inv004Holds | a measured number is reported with its corpus, never worded as a proof |

## Architecture

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

| Stakeholder | Who they are | Concerns |
| --- | --- | --- |
| Maintainer | Adds claim rows and prose and needs to know, row by row, which words the row supports. | Correct answers |
| Release reviewer | Reviews README.md, CERTIFICATION.md and CONFORMANCE.md and needs no sentence to claim global optimality before the release theorem closes. | Proved guarantees, Honest wording |
| 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 permit when none does, as the spec states. | quality |
| Honest wording | A strong word appears only beside a formal-proof row whose declaration the kernel checked at its own scope. | 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 5 fields in order, or is longer than 136 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 GNAF claim wording guest. |
| Conformance tool | cliAdapter | The xtask gate that loads the compiled environment, recomputes identities and enforces the dependency firewall. |
| GNAF claim wording guest | service | The Core-Wasm guest built from the model: it answers one request of at most 136 bytes with one answer of at most 64. |
| GNAF claim wording 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. |
| Lean 4 kernel | externalSystem | Lean 4.30.0, which checks every declaration and reports its transitive axioms. |
| 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. |
| UOR-GNAF authority | externalSystem | The pinned UOR-GNAF authority whose total answer carrier fixes the terminal answer WorkloadIncomplete. |

## Design views

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

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

## Features and journeys

13 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 word is measured, the answer is not-applicable. | GnafClaimWording::rule1, GnafClaimWording::judge | GnafClaimWording::application |
| When word is cited, the answer is not-applicable. | GnafClaimWording::rule2, GnafClaimWording::judge | GnafClaimWording::application |
| When level is not formal-proof, the answer is deny. | GnafClaimWording::rule3, GnafClaimWording::judge | GnafClaimWording::application |
| When declaration is absent, the answer is indeterminate. | GnafClaimWording::rule4, GnafClaimWording::judge | GnafClaimWording::application |
| When axioms is sorry, the answer is deny. | GnafClaimWording::rule5, GnafClaimWording::judge | GnafClaimWording::application |
| When axioms is executable-choice, the answer is deny. | GnafClaimWording::rule6, GnafClaimWording::judge | GnafClaimWording::application |
| When word is globally-optimal and scope is conditional, the answer is deny. | GnafClaimWording::rule7, GnafClaimWording::judge | GnafClaimWording::application |
| When no rule matches, the answer is permit. | GnafClaimWording::judge | GnafClaimWording::application |
| A request that is not word, level, declaration, axioms, scope in order, separated by single spaces, or is over 136 bytes, is answered invalid. | GnafClaimWording::dispatch, GnafClaimWording::decodeField1 | GnafClaimWording::application |
| It never answers permit when level is not formal-proof. | GnafClaimWording::judge | GnafClaimWordingProofs::inv001Holds |
| It never answers permit when word is globally-optimal and scope is conditional. | GnafClaimWording::judge | GnafClaimWordingProofs::inv002Holds |
| It never answers permit when axioms is executable-choice. | GnafClaimWording::judge | GnafClaimWordingProofs::inv003Holds |
| It always answers not-applicable when word is measured. | GnafClaimWording::judge | GnafClaimWordingProofs::inv004Holds |

## Journeys

The ordered features each stakeholder takes.

| Stakeholder | Steps |
| --- | --- |
| Maintainer | REQ-001 → REQ-003 → REQ-006 → otherwise |
| Release reviewer | REQ-004 → REQ-007 → INV-002 → INV-001 |
| 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 GnafClaimWordingProofs::inv001Holds |
| Answer that breaks INV-002 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-002: proof GnafClaimWordingProofs::inv002Holds |
| Answer that breaks INV-003 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-003: proof GnafClaimWordingProofs::inv003Holds |
| Answer that breaks INV-004 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-004: proof GnafClaimWordingProofs::inv004Holds |
| Benchmark promoted to proof | elevationOfPrivilege | Answer | medium likelihood, critical impact | Formal proof only: proof GnafClaimWordingProofs::inv001Holds; gate just vv |
| Generic lemma cited as release theorem | spoofing | Answer | medium likelihood, critical impact | Scope check: proof GnafClaimWordingProofs::inv002Holds; review WasmGemmGnaf/Theorems/Status.lean |
| 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 |
| Self-recorded proposition | tampering | Model source | low likelihood, critical impact | Dependency firewall: gate xtask/src/firewall.rs; review SPEC.md 17.2 |
| 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 272 bytes for one request. | Performance efficiency: Resource utilization | Guest allocation bytes | 272 |
| Bounded request: A request over 136 bytes is refused before any field is read. | Performance efficiency: Time behaviour | Request bytes read | 136 |
| Every permit has a declaration: A permit always names a declaration the compiled environment holds. | Security: Accountability | Permits without a declaration | 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 41 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 |
| No unearned strong word: No strong word is permitted for a row below formal proof or with uncredited axioms. | Functional suitability: Functional correctness | Unearned 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 | GnafClaimWording::judge, GnafClaimWording::encodeAnswer |
| OpenSpec | Requirements | GnafClaimWording::application |
| SPDX MIT OR Apache-2.0 | Licensing | GnafClaimWording::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 GNAF claim wording request
Viewpoint: Architecture::viewpointMaintainerCorrectAnswers
Notation: ISO/PAS 19450:2015 OPM, Prism OPL profile

componentBrowser is an object.
componentGNAFClaimWordingGuest is an object.
componentGNAFClaimWordingGuest can be stateDeciding or stateIdle.
processDecide is a process.
processEncodeAnswer is a process.
processJudge is a process.
processParseRequest is a process.
componentGNAFClaimWordingGuest 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 GNAF claim wording
component "componentBrowser" as c0
component "componentConformanceTool" as c1
component "componentGNAFClaimWordingGuest" as c2
component "componentGNAFClaimWordingPage" as c3
component "componentGitHubPages" as c4
component "componentLean4Kernel" as c5
component "componentPrismBuild" as c6
component "componentSourceRepository" as c7
component "componentUORGNAFAuthority" as c8
c0 --> c2 : edgeBrowserToGNAFClaimWordingGuest
c1 --> c2 : edgeConformanceToolToGNAFClaimWordingGuest
c2 --> c0 : edgeGNAFClaimWordingGuestToBrowser
c2 --> c1 : edgeGNAFClaimWordingGuestToConformanceTool
c2 --> c5 : edgeGNAFClaimWordingGuestToLean4Kernel
c2 --> c8 : edgeGNAFClaimWordingGuestToUORGNAFAuthority
c3 --> c4 : edgeGNAFClaimWordingPageToGitHubPages
c4 --> c0 : edgeGitHubPagesToBrowser
c5 --> c2 : edgeLean4KernelToGNAFClaimWordingGuest
c6 --> c2 : edgePrismBuildToGNAFClaimWordingGuest
c6 --> c3 : edgePrismBuildToGNAFClaimWordingPage
c7 --> c6 : edgeSourceRepositoryToPrismBuild
c8 --> c2 : edgeUORGNAFAuthorityToGNAFClaimWordingGuest
@enduml

```

### design/Design.viewUmlRequest.puml

```
@startuml
' UML 2.5.1 sequence diagram
' view: Design::viewUmlRequest
' viewpoint: Architecture::viewpointMaintainerCorrectAnswers
title Answering a GNAF claim wording request
participant "componentBrowser" as p0
participant "componentGNAFClaimWordingGuest" 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 GNAF claim wording 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 --> s2 : processRule2
s4 --> s0 : processRule3
s4 --> s1 : processRule4
s4 --> s0 : processRule5
s4 --> s0 : processRule6
s4 --> s0 : processRule7
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-gnaf-claim-wording.zip has them all.

- app/src/Architecture.lex.tex (420 lines)
- app/src/Compliance.lex.tex (56 lines)
- app/src/Design.lex.tex (633 lines)
- app/src/Features.lex.tex (151 lines)
- app/src/Quality.lex.tex (375 lines)
- app/src/Security.lex.tex (607 lines)
- app/src/GnafClaimWording.lex.tex (293 lines)
- app/src/GnafClaimWordingProofs.lex.tex (201 lines)
- app/lexlean.toml (43 lines)
- app/prompt.json (417 lines)
- model/ids.toml (65 lines)
- features/suites/gnaf\_claim\_wording.feature (44 lines)
- crates/conformance/tests/gnaf\_claim\_wording.rs (132 lines)
- site/app.json (114 lines)
- openspec/specs/gnaf-claim-wording/spec.md (206 lines)
