See how a synthetic hospital legal task becomes a result, a review record and a verified download.
Decision supported
Let in-house reviewers inspect the screening, routing, ranking and records produced by the demonstration. The tool does not grant authority to act for an institution.
All 963 engine and viewer tests passed on 31 October 2026. A fresh synthetic counsel-selection run ranked two eligible firms, excluded two, and kept an unchecked conflict visible. Its simulated review decision was bound to the result; the suite also covers missing and altered export artifacts.
The map below describes its original snapshot. The note above covers later fixes and checks; older results below still belong to the earlier version.
01 / Workflow
How the work moves through the system.
Read from left to right. Open a step to see why it matters, how it works, and where to find the code.
Process or decisionEvidence or data exchange
01Documents & context
implemented
Supply a closed demo case
The developer chooses public snapshots and synthetic case records. The module validates the allowed fields so unknown or incomplete input cannot silently become a legal fact.
Legal ↔ Technical +
Legal purpose
Unknown facts remain explicit.
How it works
JSON schemas, field allowlists and provenance references.
src/legal_kernel/jsonschema.py:32_type_ok
src/legal_kernel/facts.py:16read_fact
implemented
Load the versioned policy pack
The shared kernel checks the selected demonstration rule pack’s status, dates and source hashes. Expired, revoked or inconsistent instructions cannot quietly govern the run.
Legal ↔ Technical +
Legal purpose
A demonstration policy is not institutional authority.
How it works
Source manifests, lifecycle validation and integrity hashes.
One of nine terminal modules applies deterministic rules to rank, screen or classify the record. Refusals stay in the result so a reviewer can see what remains unresolved.
Legal ↔ Technical +
Legal purpose
Ranking and documentation status are advisory outputs.
How it works
Domain engines use shared validation, provenance and hashing primitives.
src/uf_counsel_ranker/engine.py:58evaluate
src/legal_disclosure_gate/engine.py:65evaluate
src/legal_reg_screen/engine.py:123evaluate
implemented
Fix the run artifacts
The engine saves an immutable result, readable reports and a source/output manifest. A later reviewer can inspect the same result.
Legal ↔ Technical +
Legal purpose
A fixed record preserves the scope of the check.
How it works
Canonical result hash, manifest and append-only hash-chained audit.
The local viewer reads files written by the engine. It shows their status, origins and reports, with evidence behind each flag.
Legal ↔ Technical +
Legal purpose
Presentation does not create or infer a substantive result.
How it works
Artifact APIs and gate/register/ranked renderers.
frontend/serve.py:116scan_runs
frontend/assets/module.js:178loadRun
implemented
Record the human review
The permitted command bridge sends the reviewer’s chosen action to the module. The module rechecks the run and links the review receipt to the exact result hash.
Legal ↔ Technical +
Legal purpose
A demo role label does not establish real identity or institutional authorization.
How it works
Existing CLI review/verify operations, shell-free subprocess and hash-bound receipts.
frontend/serve.py:528_handle_api_cli
src/legal_kernel/audit.py:103apply_review
04Records & handoff
implemented
Download a verified review bundle
The module must verify that the required files are unchanged before download. The bundle includes the result, reports, receipts and an index of file hashes.
Legal ↔ Technical +
Legal purpose
Retention of review evidence is distinct from permission to act.
How it works
Bounded snapshot comparison, CLI verification and deterministic ZIP.
Run a demonstration checklist; privilege true/unknown forces human-only review even if all checklist items are evidenced; result vocabulary contains no permit state.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
Disclosure result, checklist evidence, manifest and audit receipts
Review & permissions
Authorized human decides any real disclosure elsewhere.
Output
REVIEW_READY or REVIEW_REQUIRED_ONLY; never a release permit.
Apply deterministic demo invoice checks with Decimal money arithmetic and recorded narrative matches; unrepresented legal judgment remains outside the engine.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
Invoice findings, reports and hash-bound review artifacts
Review & permissions
Human controls payment authorization; no payment integration.
Closed module and verb allowlists, module-specific supported verbs, bounded JSON body, constrained run paths and shell=False invocation; browser evaluation is excluded.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
Reads module run artifacts; review commands append existing module receipts
Review & permissions
No authentication; localhost-only viewer; role labels enforced by module demonstration rules.
Output
Read-only states/reports, verification stdout and review receipt results.
frontend/serve.py:39MODULE_ALLOWLIST =
frontend/serve.py:261_prepare_cli_args
frontend/serve.py:528_handle_api_cli
frontend/assets/module.js:178loadRun
implemented
Verified review bundle download
Retain a verified artifact snapshot for a subsequent reviewer.
+
Interface / command
frontend/assets/review.js:mountReviewControls
Call
GET /api/review-bundle?module=...&id=...
Service / backend
frontend/serve.py:_handle_review_bundle
Rules & validation
Resolve one allowlisted module/run, reject unsafe paths or artifacts over limits, verify via the real CLI, compare before/after bytes, then zip only the five required files and a hash receipt.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
Download response only; no result or review state is rewritten
Review & permissions
No bundle is emitted when verification fails, files change or a required artifact is unsafe.
Output
Deterministic ZIP with result, manifest, audit, HTML/text reports and file hashes.
All nine terminal modules and the reachable localhost viewer groups were inspected. Related register/intake traces are grouped without treating shared rendering as shared domain logic.
13 mapped0 partial0 unmapped
Outside counselimplemented
Module evaluate/review/verify and corresponding gate/register/ranked view mapped; outside counsel also exposes report.
Document intakeimplemented
Module evaluate/review/verify and corresponding gate/register/ranked view mapped; outside counsel also exposes report.
Obligationsimplemented
Module evaluate/review/verify and corresponding gate/register/ranked view mapped; outside counsel also exposes report.
Disclosure reviewimplemented
Module evaluate/review/verify and corresponding gate/register/ranked view mapped; outside counsel also exposes report.
Invoice reviewimplemented
Module evaluate/review/verify and corresponding gate/register/ranked view mapped; outside counsel also exposes report.
Policy registerimplemented
Module evaluate/review/verify and corresponding gate/register/ranked view mapped; outside counsel also exposes report.
Litigation holdsimplemented
Module evaluate/review/verify and corresponding gate/register/ranked view mapped; outside counsel also exposes report.
Matter triageimplemented
Module evaluate/review/verify and corresponding gate/register/ranked view mapped; outside counsel also exposes report.
Regulatory documentation screenimplemented
Module evaluate/review/verify and corresponding gate/register/ranked view mapped; outside counsel also exposes report.
Suite overview and module selectionimplemented
Artifact census and selected-run rendering.
Raw engine reports and artifact APIimplemented
Read result, manifest, audit and engine-authored HTML/text reports.
Command bridge and review dialogimplemented
Allowlisted module verbs and engine-owned review semantics.
Verified bundle downloadimplemented
New engine-verified, bounded artifact export.
03 / Review and permissions
What needs to happen before the next step?
implemented
Rules keep their source and status
Source manifests and rule-pack lifecycle checks retain hashes, effective windows and demonstration status; source text is not promoted into institutional authority.
Review re-verifies the run and appends a receipt tied to its output hash; stale review and audit inconsistency are reported.
Code references
src/legal_kernel/audit.py:103apply_review
src/legal_kernel/runrecord.py:27verify_run
implemented
Browser cannot evaluate new matters
The bridge exposes only permitted review/verify/report operations with a closed module/argument allowlist and shell-free invocation.
Code references
frontend/serve.py:54VERB_ALLOWLIST =
frontend/serve.py:261_prepare_cli_args
implemented
Bundle refusal and local trust limit
Export requires stable artifact bytes and successful module verification. It does not authenticate a reviewer, anchor a whole replaced directory, or establish legal validity.
Added a bounded download endpoint and review-control link. It captures required artifact bytes, invokes the selected module verify command, refuses nonzero verification or changed/symlinked/missing artifacts, and produces a deterministic ZIP with a SHA-256 file receipt.
The viewer could inspect reports and invoke verification but lacked a single retained packet containing the result, source/output manifest, review receipts and reports; engine evaluation remains terminal-only.
Options considered
Add institutional authentication to the local viewer.
Add a verified review bundle for retaining the result and review history together.
32 passed using bundled Python; real synthetic ranker runs, repeatable ZIP bytes, tamper refusal, missing run and symlink refusal.
passedpython3 -m pytest tests/ frontend/tests/ -q
963 passed in 44.15s using bundled Python; local synthetic engine and viewer suite.
Scope of the tool
DEMO_ONLY public or synthetic inputs; no patient, protected health, privileged or real matter records.
Nine deterministic modules use no model, vector database, external API or network retrieval in their decision paths.
Reviewer role labels are allowlisted demonstration roles, not authenticated identities.
Disclosure review has no release-permission path; the software sends no notices, engages no counsel, pays no invoice and issues/releases no litigation hold.
Local hashes detect inconsistent alteration; coordinated replacement of the whole run remains outside the integrity guarantee.
Unfinished work and gaps in the map
Role labels are not authenticated identities; no production institutional access control is claimed.
Only public snapshots and synthetic inputs were examined; no hospital adoption or real-matter validation is established.
The bundle excludes original inputs, and a coordinated replacement of a whole consistent run directory is outside local-hash integrity guarantees.
The home reviewed indicator detects that a review event exists; it should not be treated as current substantive approval or a real-world legal authorization.
No legal authority was refreshed in this implementation. Demonstration policy coverage is not a statement that current hospital law is complete.
Bundle verification assumes trusted local files. Before/after comparisons are not atomic protection against a malicious local filesystem writer.
Original input files are excluded; the ZIP cannot independently re-establish source authenticity without the original source environment.
The viewer remains a localhost demonstration with no identity authentication.
The selected-module verify command validates local integrity, not legal correctness or professional approval.
Implementation snapshot
These maps explain the software, its sources, and who reviews the results. Local and synthetic tests do not establish legal accuracy or readiness for production. The technical traces identify configured integrations and unfinished paths.