# Docs sync

> 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 (https://github.com/UOR-Foundation/website), live at https://uor.foundation/. The UOR Foundation website, which syncs the Prism SDK docs from PrismPM every six hours and redeploys only when they change. 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 Docs sync 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 | branch, seed, pages, package, changed |
| 2. 6 rules | the first that matches wins |
| 3. Answer | keep, refuse, unchanged, redeploy |
| 4. Proved | 4 theorems, 49 tests |

Verified by prismpm verify in the pinned SDK. Fingerprint: 88d57bb4ebf97249d923d9a1b50679710d4f3c66acad8985468048931ec68170. Acceptance vectors: 49. Claims: 7.

## The prompt

```json
{
  "schema": "prism/prompt/1",
  "pattern": "decisionTable",
  "goal": "Decide what the nightly docs sync does to uor.foundation. The site must never swap its docs for an empty or unchecked release.",
  "repository": "UOR-Foundation/website",
  "license": "NOASSERTION",
  "app": {
    "name": "site-docs-sync",
    "title": "Docs sync",
    "purpose": "Decide whether one run of the Prism docs sync keeps the current docs, refuses to overwrite them, finds nothing changed, or commits and redeploys the site, from the docs-site branch, the seed flag, the pages found, the prism-code package check and whether the generated files changed.",
    "fields": [
      {
        "name": "branch",
        "kind": "choice",
        "values": [
          "present",
          "absent"
        ],
        "means": "whether the docs-site branch of UOR-Foundation/PrismPM exists"
      },
      {
        "name": "seed",
        "kind": "choice",
        "values": [
          "no",
          "yes"
        ],
        "means": "whether the run passes --seed, the one-time import from main's docs/generated"
      },
      {
        "name": "pages",
        "kind": "number",
        "min": 0,
        "max": 10000,
        "means": "Markdown pages found under get-started, guides, api, reference, sdks, concepts, examples or migration"
      },
      {
        "name": "package",
        "kind": "choice",
        "values": [
          "verified",
          "no-release",
          "mismatch",
          "no-skill"
        ],
        "means": "the prism-code npm latest check: verified, no latest release, tarball not matching its registry integrity, or no skill/SKILL.md in it"
      },
      {
        "name": "changed",
        "kind": "choice",
        "values": [
          "yes",
          "no"
        ],
        "means": "whether the generated prism, npm and requests files differ from main"
      }
    ],
    "outcomes": [
      "keep",
      "refuse",
      "unchanged",
      "redeploy"
    ],
    "meanings": {
      "keep": "exit 0 keeping the current docs",
      "refuse": "the sync throws and the current docs are not overwritten",
      "unchanged": "No changes, nothing committed",
      "redeploy": "commit the generated files and run deploy.yml on main"
    },
    "rules": [
      {
        "when": [
          {
            "field": "branch",
            "op": "is",
            "value": "absent"
          },
          {
            "field": "seed",
            "op": "is",
            "value": "no"
          }
        ],
        "then": "keep",
        "why": "scripts/sync-prism-docs.mjs: docs-site branch not found; keeping current docs"
      },
      {
        "when": [
          {
            "field": "pages",
            "op": "=",
            "value": 0
          }
        ],
        "then": "refuse",
        "why": "scripts/sync-prism-docs.mjs: No pages found; refusing to overwrite the current docs"
      },
      {
        "when": [
          {
            "field": "package",
            "op": "is",
            "value": "no-release"
          }
        ],
        "then": "refuse",
        "why": "scripts/sync-prism-docs.mjs: npm registry gave no prism-code latest release; refusing to overwrite the current docs"
      },
      {
        "when": [
          {
            "field": "package",
            "op": "is",
            "value": "mismatch"
          }
        ],
        "then": "refuse",
        "why": "scripts/sync-prism-docs.mjs: the prism-code tarball does not match its registry integrity"
      },
      {
        "when": [
          {
            "field": "package",
            "op": "is",
            "value": "no-skill"
          }
        ],
        "then": "refuse",
        "why": "scripts/sync-prism-docs.mjs: the site publishes the package's skill/SKILL.md byte for byte, and refuses a release without one"
      },
      {
        "when": [
          {
            "field": "changed",
            "op": "is",
            "value": "no"
          }
        ],
        "then": "unchanged",
        "why": ".github/workflows/sync-prism-docs.yml: git diff --quiet on the generated files, then No changes"
      }
    ],
    "otherwise": "redeploy",
    "otherwiseWhy": ".github/workflows/sync-prism-docs.yml: commit the generated files, push, and gh workflow run deploy.yml --ref main",
    "properties": [
      {
        "kind": "never",
        "when": [
          {
            "field": "pages",
            "op": "=",
            "value": 0
          }
        ],
        "then": "redeploy",
        "why": "an empty docs tree never replaces the published docs"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "package",
            "op": "is",
            "value": "mismatch"
          }
        ],
        "then": "redeploy",
        "why": "a tarball that fails its integrity never sets the versions or skill the site states"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "changed",
            "op": "is",
            "value": "no"
          }
        ],
        "then": "redeploy",
        "why": "the site is redeployed only when the docs changed"
      },
      {
        "kind": "always",
        "when": [
          {
            "field": "branch",
            "op": "is",
            "value": "absent"
          },
          {
            "field": "seed",
            "op": "is",
            "value": "no"
          }
        ],
        "then": "keep",
        "why": "without the branch, and without --seed, the docs are kept"
      }
    ],
    "examples": [
      {
        "request": "present no 42 verified yes",
        "response": "redeploy"
      },
      {
        "request": "present no 42 verified no",
        "response": "unchanged"
      },
      {
        "request": "absent no 0 no-release yes",
        "response": "keep"
      },
      {
        "request": "absent yes 12 verified yes",
        "response": "redeploy"
      },
      {
        "request": "present no 0 verified yes",
        "response": "refuse"
      },
      {
        "request": "present no 42 mismatch yes",
        "response": "refuse"
      },
      {
        "request": "present no 42 no-skill yes",
        "response": "refuse"
      }
    ]
  },
  "stakeholders": [
    {
      "name": "Site visitor",
      "text": "Reads the Prism SDK docs and their Markdown twins on uor.foundation and needs them to be the current docs-site release, never an empty or unverified one.",
      "concerns": [
        "Correct answers",
        "Integrity of the published app"
      ]
    },
    {
      "name": "Site maintainer",
      "text": "Owns the scheduled sync and needs it to redeploy only on a real change and to fail loudly instead of overwriting.",
      "concerns": [
        "Proved guarantees",
        "Refused malformed requests"
      ]
    }
  ],
  "components": [
    {
      "name": "PrismPM docs-site branch",
      "text": "The branch of UOR-Foundation/PrismPM the docs are pulled from.",
      "kind": "externalSystem"
    },
    {
      "name": "npm registry",
      "text": "Serves prism-code latest, its tarball and its integrity.",
      "kind": "externalSystem"
    },
    {
      "name": "uor.foundation",
      "text": "The React, Vite and Tailwind site deploy.yml publishes to GitHub Pages.",
      "kind": "staticSite"
    }
  ],
  "threats": [
    {
      "name": "Docs wiped by an empty tree",
      "text": "A reorganized or empty docs-site branch overwrites every docs page with nothing.",
      "stride": "denialOfService",
      "asset": "answer",
      "likelihood": "medium",
      "impact": "major",
      "control": {
        "name": "No pages, no overwrite",
        "text": "Zero pages is refused.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "SiteDocsSyncProofs::inv001Holds"
          },
          {
            "kind": "review",
            "reference": "UOR-Foundation/website scripts/sync-prism-docs.mjs"
          }
        ]
      }
    },
    {
      "name": "Tampered prism-code tarball",
      "text": "A tarball that differs from its registry integrity sets the published versions and agent skill.",
      "stride": "tampering",
      "asset": "source",
      "likelihood": "low",
      "impact": "critical",
      "control": {
        "name": "Registry integrity",
        "text": "An integrity mismatch is refused.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "SiteDocsSyncProofs::inv002Holds"
          },
          {
            "kind": "gate",
            "reference": "UOR-Foundation/website scripts/sync-prism-docs.mjs integrity check"
          }
        ]
      }
    },
    {
      "name": "Compromised docs-site branch",
      "text": "Someone with push access to the PrismPM docs-site branch publishes misleading docs.",
      "stride": "spoofing",
      "asset": "source",
      "likelihood": "low",
      "impact": "major",
      "accepted": "The site trusts the PrismPM repository as the docs authority; the generated files are committed, so every change is reviewable in history."
    }
  ],
  "quality": [
    {
      "characteristic": "Reliability",
      "subcharacteristic": "Fault tolerance",
      "requirement": "Every failed check refuses",
      "text": "Each of the four refusals the sync script throws is a rule answering refuse.",
      "measure": "Refusal checks",
      "measureText": "Refusal checks of the sync script the app models.",
      "threshold": 4
    },
    {
      "characteristic": "Performance efficiency",
      "subcharacteristic": "Resource utilization",
      "requirement": "No needless redeploy",
      "text": "A run that changes no generated file does not redeploy.",
      "measure": "Needless redeploys",
      "measureText": "Acceptance vectors with no change answered redeploy.",
      "threshold": 0
    }
  ],
  "journeys": [
    {
      "stakeholder": "Site visitor",
      "steps": [
        "otherwise",
        "REQ-002",
        "INV-001",
        "INV-002"
      ]
    },
    {
      "stakeholder": "Site maintainer",
      "steps": [
        "REQ-001",
        "REQ-003",
        "REQ-004",
        "REQ-005",
        "REQ-006",
        "INV-003",
        "refuse"
      ]
    }
  ],
  "axioms": {
    "inv004Holds": [
      "Classical.choice",
      "Quot.sound",
      "propext"
    ]
  },
  "concerns": []
}
```

## Claims

- SD-01: The app never answers redeploy when pages equals 0
- SD-02: The app never answers redeploy when package is mismatch
- SD-03: The app never answers redeploy when changed is no
- SD-04: The app always answers keep when branch is absent and seed is no
- SD-05: The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references
- SD-06: The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared
- SD-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 | keep, refuse, unchanged, redeploy |

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

|  | rules |
| --- | --- |
| keep | 1 |
| refuse | 4 |
| unchanged | 1 |
| redeploy | 0 |

## Behavior

A request is branch, seed, pages, package, changed, separated by spaces. The first rule that matches decides. If none matches, the answer is redeploy. A request over 136 bytes, or in any other form, is answered invalid.

| Rule | When | Answer | Why |
| --- | --- | --- | --- |
| REQ-001 | branch is absent and seed is no | keep | scripts/sync-prism-docs.mjs: docs-site branch not found; keeping current docs |
| REQ-002 | pages equals 0 | refuse | scripts/sync-prism-docs.mjs: No pages found; refusing to overwrite the current docs |
| REQ-003 | package is no-release | refuse | scripts/sync-prism-docs.mjs: npm registry gave no prism-code latest release; refusing to overwrite the current docs |
| REQ-004 | package is mismatch | refuse | scripts/sync-prism-docs.mjs: the prism-code tarball does not match its registry integrity |
| REQ-005 | package is no-skill | refuse | scripts/sync-prism-docs.mjs: the site publishes the package's skill/SKILL.md byte for byte, and refuses a release without one |
| REQ-006 | changed is no | unchanged | .github/workflows/sync-prism-docs.yml: git diff --quiet on the generated files, then No changes |
| otherwise | no rule matches | redeploy | .github/workflows/sync-prism-docs.yml: commit the generated files, push, and gh workflow run deploy.yml --ref main |

## 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 redeploy when pages equals 0. | SiteDocsSyncProofs::inv001Holds | an empty docs tree never replaces the published docs |
| INV-002 | It never answers redeploy when package is mismatch. | SiteDocsSyncProofs::inv002Holds | a tarball that fails its integrity never sets the versions or skill the site states |
| INV-003 | It never answers redeploy when changed is no. | SiteDocsSyncProofs::inv003Holds | the site is redeployed only when the docs changed |
| INV-004 | It always answers keep when branch is absent and seed is no. | SiteDocsSyncProofs::inv004Holds | without the branch, and without --seed, the docs are kept |

## Architecture

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

| Stakeholder | Who they are | Concerns |
| --- | --- | --- |
| Site maintainer | Owns the scheduled sync and needs it to redeploy only on a real change and to fail loudly instead of overwriting. | Proved guarantees, Refused malformed requests |
| Site visitor | Reads the Prism SDK docs and their Markdown twins on uor.foundation and needs them to be the current docs-site release, never an empty or unverified one. | Correct answers, Integrity of the published app |
| 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 redeploy 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 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 Docs sync guest. |
| Docs sync 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. |
| Docs sync 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. |
| npm registry | externalSystem | Serves prism-code latest, its tarball and its integrity. |
| Prism build | cliAdapter | prismpm verify in the SDK image prismpm.lock pins: it checks every theorem, builds the guest and replays every vector. |
| PrismPM docs-site branch | externalSystem | The branch of UOR-Foundation/PrismPM the docs are pulled from. |
| Source repository | externalSystem | The repository that holds the prompt, the model and its gate. |
| uor.foundation | staticSite | The React, Vite and Tailwind site deploy.yml publishes to GitHub Pages. |

## Design views

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

| View | Diagram | Viewpoint |
| --- | --- | --- |
| Deciding a Docs sync request | opmObjectProcess | Site visitor: Correct answers |
| Components of Docs sync | umlComponent | Site visitor: Integrity of the published app |
| Answering a Docs sync request | umlSequence | Site visitor: Correct answers |
| States of the Docs sync guest | umlStateMachine | Site maintainer: 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 branch is absent and seed is no, the answer is keep. | SiteDocsSync::rule1, SiteDocsSync::judge | SiteDocsSync::application |
| When pages equals 0, the answer is refuse. | SiteDocsSync::rule2, SiteDocsSync::judge | SiteDocsSync::application |
| When package is no-release, the answer is refuse. | SiteDocsSync::rule3, SiteDocsSync::judge | SiteDocsSync::application |
| When package is mismatch, the answer is refuse. | SiteDocsSync::rule4, SiteDocsSync::judge | SiteDocsSync::application |
| When package is no-skill, the answer is refuse. | SiteDocsSync::rule5, SiteDocsSync::judge | SiteDocsSync::application |
| When changed is no, the answer is unchanged. | SiteDocsSync::rule6, SiteDocsSync::judge | SiteDocsSync::application |
| When no rule matches, the answer is redeploy. | SiteDocsSync::judge | SiteDocsSync::application |
| A request that is not branch, seed, pages, package, changed in order, separated by single spaces, or is over 136 bytes, is answered invalid. | SiteDocsSync::dispatch, SiteDocsSync::decodeField1 | SiteDocsSync::application |
| It never answers redeploy when pages equals 0. | SiteDocsSync::judge | SiteDocsSyncProofs::inv001Holds |
| It never answers redeploy when package is mismatch. | SiteDocsSync::judge | SiteDocsSyncProofs::inv002Holds |
| It never answers redeploy when changed is no. | SiteDocsSync::judge | SiteDocsSyncProofs::inv003Holds |
| It always answers keep when branch is absent and seed is no. | SiteDocsSync::judge | SiteDocsSyncProofs::inv004Holds |

## Journeys

The ordered features each stakeholder takes.

| Stakeholder | Steps |
| --- | --- |
| Site maintainer | REQ-001 → REQ-003 → REQ-004 → REQ-005 → REQ-006 → INV-003 → refuse |
| Site visitor | otherwise → REQ-002 → INV-001 → INV-002 |
| 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 SiteDocsSyncProofs::inv001Holds |
| Answer that breaks INV-002 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-002: proof SiteDocsSyncProofs::inv002Holds |
| Answer that breaks INV-003 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-003: proof SiteDocsSyncProofs::inv003Holds |
| Answer that breaks INV-004 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-004: proof SiteDocsSyncProofs::inv004Holds |
| Compromised docs-site branch | spoofing | Model source | low likelihood, major impact | accepted: The site trusts the PrismPM repository as the docs authority; the generated files are committed, so every change is reviewable in history. |
| Docs wiped by an empty tree | denialOfService | Answer | medium likelihood, major impact | No pages, no overwrite: proof SiteDocsSyncProofs::inv001Holds; review UOR-Foundation/website scripts/sync-prism-docs.mjs |
| 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 |
| 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 |
| Tampered prism-code tarball | tampering | Model source | low likelihood, critical impact | Registry integrity: proof SiteDocsSyncProofs::inv002Holds; gate UOR-Foundation/website scripts/sync-prism-docs.mjs integrity check |

## 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 failed check refuses: Each of the four refusals the sync script throws is a rule answering refuse. | Reliability: Fault tolerance | Refusal checks | 4 |
| 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, redeploy otherwise, or invalid. | Functional suitability: Functional completeness | Unanswered requests | 0 |
| Every vector replays: All 49 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 needless redeploy: A run that changes no generated file does not redeploy. | Performance efficiency: Resource utilization | Needless redeploys | 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 | SiteDocsSync::judge |
| OpenSpec | Requirements | SiteDocsSync::application |
| SPDX NOASSERTION | Licensing | SiteDocsSync::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 Docs sync request
Viewpoint: Architecture::viewpointSiteVisitorCorrectAnswers
Notation: ISO/PAS 19450:2015 OPM, Prism OPL profile

componentBrowser is an object.
componentDocsSyncGuest is an object.
componentDocsSyncGuest can be stateDeciding or stateIdle.
processDecide is a process.
processEncodeAnswer is a process.
processJudge is a process.
processParseRequest is a process.
componentDocsSyncGuest 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::viewpointSiteVisitorIntegrityOfThePublishedApp
title Components of Docs sync
component "componentBrowser" as c0
component "componentDocsSyncGuest" as c1
component "componentDocsSyncPage" as c2
component "componentGitHubPages" as c3
component "componentNpmRegistry" as c4
component "componentPrismBuild" as c5
component "componentPrismPMDocsSiteBranch" as c6
component "componentSourceRepository" as c7
component "componentUorFoundation" as c8
c0 --> c1 : edgeBrowserToDocsSyncGuest
c1 --> c0 : edgeDocsSyncGuestToBrowser
c1 --> c4 : edgeDocsSyncGuestToNpmRegistry
c1 --> c6 : edgeDocsSyncGuestToPrismPMDocsSiteBranch
c1 --> c8 : edgeDocsSyncGuestToUorFoundation
c2 --> c3 : edgeDocsSyncPageToGitHubPages
c3 --> c0 : edgeGitHubPagesToBrowser
c4 --> c1 : edgeNpmRegistryToDocsSyncGuest
c5 --> c1 : edgePrismBuildToDocsSyncGuest
c5 --> c2 : edgePrismBuildToDocsSyncPage
c6 --> c1 : edgePrismPMDocsSiteBranchToDocsSyncGuest
c7 --> c5 : edgeSourceRepositoryToPrismBuild
c8 --> c1 : edgeUorFoundationToDocsSyncGuest
@enduml

```

### design/Design.viewUmlRequest.puml

```
@startuml
' UML 2.5.1 sequence diagram
' view: Design::viewUmlRequest
' viewpoint: Architecture::viewpointSiteVisitorCorrectAnswers
title Answering a Docs sync request
participant "componentBrowser" as p0
participant "componentDocsSyncGuest" 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::viewpointSiteMaintainerRefusedMalformedRequests
title States of the Docs sync guest
state "stateAnsweredKeep" as s0
state "stateAnsweredRedeploy" as s1
state "stateAnsweredRefuse" as s2
state "stateAnsweredUnchanged" 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 --> s2 : processRule2
s4 --> s2 : processRule3
s4 --> s2 : processRule4
s4 --> s2 : processRule5
s4 --> s3 : processRule6
s4 --> s1 : processOtherwise
s0 --> s5 : processEncodeAnswer
s2 --> s5 : processEncodeAnswer
s3 --> 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-site-docs-sync.zip has them all.

- app/src/Architecture.lex.tex (427 lines)
- app/src/Compliance.lex.tex (56 lines)
- app/src/Design.lex.tex (619 lines)
- app/src/Features.lex.tex (144 lines)
- app/src/Quality.lex.tex (375 lines)
- app/src/Security.lex.tex (593 lines)
- app/src/SiteDocsSync.lex.tex (275 lines)
- app/src/SiteDocsSyncProofs.lex.tex (169 lines)
- app/lexlean.toml (43 lines)
- app/prompt.json (373 lines)
- model/ids.toml (65 lines)
- features/suites/site\_docs\_sync.feature (44 lines)
- crates/conformance/tests/site\_docs\_sync.rs (132 lines)
- site/app.json (114 lines)
- openspec/specs/site-docs-sync/spec.md (196 lines)
