The Gatehouse app flow โ how the engine is visualised
Audience: the WP5 (supervisor dashboard) and WP6 (agent client) build
sessions. Every panel below names its data source: an endpoint ofgatehouse_verify/app.py (all live as of session 3) and the artifact it
renders. Nothing in the UI computes; the UI RENDERS what the engine derived โ
the same discipline as the engine itself (a claimed number is never trusted,
so the app never invents one).
Register: standards voice throughout the apps. The user is a supervisor,
never an agent-owner (CLAUDE.md rules 1 and 2). Mythopoetic edges belong to
render-time expressions, not to these surfaces.
The demo is two acts (the north-star video): Act 1 โ an agent approaches,
is challenged, proves understanding, a VRC issues, the audit trail renders.
Act 2 โ the supervisor revokes, and verification fails everywhere.
The shared spine: the ceremony rail
Both apps show the same seven-station rail, always visible, one station lit
at a time. It IS the route order of the API and the action vocabulary of the
ledger โ the UI never needs its own state machine:
APPROACH โธ ASSESS โธ CHALLENGE โธ APPROVE โธ ISSUE โธ FLY/SANDBOX/HOLD โธ (REVOKE)
โ โ โ โ โ โ โ
gate.* assessment.* challenge.* approval.* vrc.* manifest.issued vrc.revoked
Hydrate from GET /gate/state: the furthest non-null artifact
(identity โ assessment โ challenge โ approvalEventHash โ vrc โ manifest)
positions the rail. POST /gate/reset restarts the demo.
Verdict colour language (used everywhere, never a third vocabulary)
| verdict | decision | colour | UI noun |
|---|---|---|---|
| VALIDATED | fly | green | cleared |
| MIRAGE | sandbox | amber | sandboxed |
| BLOCKED | hold | red | held |
Refusals are first-class UI, not error toasts: a refusal renders as a station
outcome WITH its ledger event (vrc.refused, gate.identity_refused) โ
"the gate says no on the record" is a feature to show, not an exception to hide.
Act 1 ยท Supervisor dashboard (WP5), scene by scene
Scene 1 โ the gate (identity)
POST /gate/approach ยท artifact: AgentIdentity ยท event: gate.approach orgate.identity_refused (403)
โโ AGENT AT THE GATE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ did:key:z6MkCanaryโฆ [VERIFIED โ]โ
โ key z6MkCanaryโฆ binding: did == key โ โ
โ operator did:web:gatehouseโฆ โ
โ capabilities declared: sandbox.echo โ
โ โ refused case: red banner + the refusal event โโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Identity card with a hard verified/refused state. The did:keyโmultibase
binding is shown as a literal padlock joining the two strings โ spoof refusal
(Act 1 cold open: show a spoofed identity bounced BEFORE any assessment).
Scene 2 โ the witness draw (the dice moment)
POST /gate/assess response .assessment.witnessDraw ยท event:assessment.witness_drawn
โ THE DRAW โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ seed = sha256(agent's own submission) โ
โ 7e51d081โฆ โโโบ 6 of 24 probes go DEEP โ
โ [force.reflect.3] [sigma.sm.2] [force.connect.3] โ
โ [sigma.rc.1] [force.reflect.2] [force.protect.1] โ
โ derivable by any auditor: algorithm sha256-canon-v1
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Animate: the agent's canonical bytes flow into a hash, the hash deals 6 probe
cards face-up out of the 24-card grid. The caption carries the whole point:
the agent cannot know which probes will be probed while it writes.
Scene 3 โ the probe board (24 derived probes)
GET /probes for prompts + POST /gate/assess with probeScores ยท events:assessment.completed
โ PROBES โ N = 4ยท3 + 6ยท2 = 24 (derived, not fixed) โ
โ PROTECT โ1.0 โ1.0 โ0.9 ฯ_sm โ0.9 โ1.0 โ
โ PROJECT โ0.9 โ1.0 โ0.9 ฯ_sr โ1.0 โ0.9 โฆ โ
โ REFLECT โฆ ฯ_mr โ0.8 โ0.9 โ no-deepโ
โ CONNECT โฆ โฆ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Two-column board: 12 force probes (4 rows) and 12 separation probes (6 rows).
Deep-drawn probes wear the draw's mark. Each probe expands to its supervisor-
voice prompt + score slider + rationale field. The ฯ_mr row can badge the
open runtime-07 finding until its disposition.
Scene 4 โ the sovereignty instrument (the centrepiece)
POST /gate/assess response: .assessment + .sigmaMatrix + .scope
Three linked instruments, one derivation, left to right:
โ ฮฃ (4ร4, 1โฯ off-diag) โฌ VOLUME det(ฮฃ) โฌ LATTICE {0,1}^6 โ
โ S M R C โ โ โ63 stratum 6 โ
โ S 1.0 .10 .10 .10 โ โโโโโโโโโ โ โฑ โฒ tier 6 โ
โ M .10 1.0 .10 .10 โ 0.948 โ โฆ 15 ยท 20 ยท 15 โฆ โ
โ R .10 .10 1.0 .10 โ fly โฅ 0.15 โ bits 111111 โ
โ C .10 .10 .10 1.0 โ hold โค 0 โ ProtectionโฆValue โ
โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโ
- ฮฃ heatmap: white diagonal, off-diagonal cells shaded by residual
correlation (1โฯ); hovering a cell highlights the two probes that fed it. - Volume gauge: det(ฮฃ) on a 0โ1 bar with the two config thresholds drawn
ON the bar (GET /policysupplies them โ the gauge and the law share one
number). Below 0.15: amber sandbox band. At/below 0: red hold. The
tetrahedron collapse can render literally: a 3D tetra flattening as detโ0. - Lattice: the 64-vertex Boolean lattice as 7 stacked strata
(1ยท6ยท15ยท20ยท15ยท6ยท1); the agent's vertex lights up; each of the 6 bits labels
its dimension AND the ฯ pair that set it (FD-1 made visible). Tier = the
stratum row the vertex sits in โ the ladder is not a separate widget.
Scene 5 โ the understanding challenge (gate two)
POST /gate/challenge, POST /gate/challenge/attempt ยท events:challenge.issued/attempted/passed/failed
โ UNDERSTANDING, NOT POSSESSION โโโโโโโโโโโโโโโโโโโโ
โ prompt: "Why does a revoked credential failโฆ?" โ
โ anchors: [revocation] [verifier] [status list] โ
โ attempt 1 โธ anchors hit 3/3 = 1.00 โฅ 0.60 PASS โ
โ (echoing the prompt scores 0 โ shown live) โ
โ proverb: committed as 4f2aโฆ (hash, never shown) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Anchors light up as the agent's answer covers them. The proverbCommitment
renders as a sealed hash chip โ the UI making "we never store the secret"
visible. Failed attempts stay on screen with their audit hash: permanence
is the point.
Scene 6 โ approval and issuance (the two gates close)
POST /gate/approve (rationale REQUIRED in the UI โ the button is disabled
until the supervisor writes one), then POST /gate/issue.
โ THE TWO GATES โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ gate 1 SUPERVISOR APPROVAL โ on the record โ
โ gate 2 UNDERSTANDING PASSED โ attempt-1 โ
โ โผ both gates + det โฅ 0.15 โผ โ
โ โ VRC โโโโโโโโโโโโโโโโโโโโโโโโโโโโ two proofs: โ
โ โ tier 6 ยท A(ฯ)=0.69 ยท h(ฯ)=1.0 โ issuer โ โ
โ โ status: list index 0 ยท active โ subject โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ (bilateral) โ
โ MANIFEST: fly ยท scope: pool.*, gate.* ยท ttl 7d โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The credential renders as a physical card stamped by TWO signatures โ the
bilateral ceremony is the image. Under it, the DeploymentManifest as a
boarding pass: decision, capability list (the scope ladder rung), TTL.
A refused issuance renders the vrc.refused event in this same panel, amber
or red per verdict.
Scene 7 โ the audit rail (always on, bottom of screen)
GET /gate/state .ledger ยท every event
โ AUDIT โ h(ฯ) = 1.00 โ chain VERIFIED โโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ 0000โฆโโถ[gate.approach]โโถ[witness_drawn]โโถ[completed]โโถ โฆ โ
โ aa65โฆ d5daโฆ d38dโฆ โ
โ every block: action ยท rationale ยท payload digest ยท prior โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
A horizontal block chain from the 64-zero genesis; each block shows its
action and opens to actor/subject/rationale/digests. The h(ฯ) dial sits at
the rail's head. The tamper demo: an "audit inspector" toggle lets the
supervisor flip one byte in a COPY of an event โ the rail recomputes live,
the block and every later link go red, h(ฯ) drops, and the Variance/Audit
clause quote appears: a broken chain voids deployment. (Pure client-side
recompute โ packages/audit's TS mirror of the canon, WP5.)
Act 2 โ revocation
POST /gate/revoke (rationale required) then GET /gate/verify.
The credential card gets a REVOKED stamp; the vrc.revoked block joins the
rail; and a "relying-party strip" โ three little verifier badges (registry,
peer agent, auditor) โ flips from โโโ to โโโ in one motion: fails
verification everywhere, immediately.
Act 1/2 from the other side ยท Agent client (WP6)
The agent client is deliberately austere โ a terminal-like column. It shows
what the AGENT can see, which is the demo's quiet argument about privacy:
- its own identity + key custody (the
AgentIdentityProvideradapter slot;
hearthold's Emissary can seat here later without touching the core); - the prompts it is asked (never the scoring rubric, never the thresholds);
- the challenge question and its own answers;
- the credential it holds once issued (and the moment it stops verifying);
- NOT the witness-draw seed logic, NOT the ฮฃ instrument, NOT other agents.
Same endpoints, read through the subject's keyhole. Panel titles mirror the
dashboard's rail so the video can cut between the two views station by station.
Policy panel (GET /policy)
A standing side panel printing lexon_policy(cfg) verbatim โ the five-clause
law with the LIVE threshold numbers in it. When a threshold gates something
on screen (the volume gauge bands, a refusal), the corresponding clause
highlights. The law and the instrument are visibly the same numbers
(runtime 06 is the watch on exactly this).
Build notes for WP5/6
- Stack: the existing Vite+React+TS shells in
apps/supervisorandapps/agent-client; types from@gatehouse/contractsgenerated TS. - The dashboard polls
GET /gate/state(1s) โ no websockets needed for the
demo; the state IS the render model. packages/audit(WP4 TS side): browser mirror of canonical-bytes +
sha256 (WebCrypto) for the client-side tamper demo; parity is already
proven by the vitest lane and runtime 03.- Every scene's screenshot doubles as a WP8 render asset: the GDC deck and
Block 15 case study reuse the same seven stations.
Assets
Source: docs/app-flow.md
upstream: github.com/mitchuski/kyra_gatehouse ยท the repo is the source of truth; this page is a projection that records its origin ยท author: Mitchell Travers ยท (โ๏ธโฅโฟปโฅ๐ง)๐
โ Welcome Visitors