Skip to content

Docs site (/docs)

Panel-readable project documentation on the existing demo site, served from the same Cloudflare Pages project. No new cloud resource.

  • /docs — index: ordered sections, each entry's title plus a one-line description from its first paragraph, and "Synthetic data only · last built from commit \".
  • /docs/<slug> — one rendered document per slug: desktop table of contents, phone document selector, sanitized Markdown, source path, SHA-256, Back to demo.

Pipeline

web/docs-manifest.json is the allowlist (ordered sections, entries {slug, title, source}). web/scripts/build-docs.mjs runs from build:snapshot BEFORE vite build: it copies each source to web/public/docs-src/<slug>.md, records SHA-256 plus the git commit in web/public/docs-src/index.json, applies ONLY mechanical published-copy transforms (listed below), then FAILS THE BUILD (exit 1, file:line) if any copied doc still contains a denylisted term or a secret-shaped value (case-insensitive). Source documents are never modified: the build only reads them (a unit test asserts byte-identical sources after buildDocs), and docs that still fail after the transforms are excluded from the manifest, never rewritten. Rendering reuses the demo's sanitized Markdown pipeline (markdown-it with html: false, DOMPurify, no raw HTML); inter-doc links resolve to /docs/<slug> only when the target is in the manifest, otherwise they render as plain text.

Published-copy transforms (each mechanical, word-boundary-safe, unit-tested):

  1. Jones-Gaffney → Jones, JonesGaffney → Jones (case-preserving: lowercase stays lowercase, so the redacted bucket reads jones-fleet-admin-tfstate). The plain "Jones" teammate form (Clahadore Jones, Cedric Jones, Jenny Jones, Gronktayvius Jones, Susie Franny Jones) is public per standing policy; only the internal surname form is rewritten.
  2. Machine names → generic: DESKTOP-SCDT9HI → the streaming build PC, DESKTOP-D249KD4 → the GPU PC (RTX 4090), ANDYGREATROOMPC → the orchestration PC, ANDREWBEDROOMTV → the verification PC, any other DESKTOP-[A-Z0-9]+ → a build PC.
  3. Private-org URLs (https://github.com/andrewjonesdev-tools/… and https://github.com/andrewjonesdev/…) → plain text the private repository (no link). Whole-line badge/image lines pointing there are dropped.
  4. Absolute paths → repo-relative form or <local path>; http://10.x / http://100.x origins → <lan host> (unchanged from round 1).

Fail-closed checks after the transforms: the denylist (C:\Users, /Users/, AndrewJonesDev, \fives, /fives/, Jones-Gaffney, Gaffney, NarrativeGMC, .fleet-secrets, fleet-dispatch, FleetDispatch, agentmail, GitHub Copilot, DESKTOP-, ANDYGREATROOMPC, ANDREWBEDROOMTV) plus secret-VALUE detection — bare env-var names such as OYSTEHR_CLIENT_SECRET and CLOUDFLARE_API_TOKEN are allowed, but the build fails on key = value assignments (12+ chars), 32+ char hex/base64 runs outside sha256/digest/commit context (40-hex git SHAs and 64-hex digests are hashes by format and allowed even bare in tables), AKIA… keys, -----BEGIN blocks, and residual 10.x/100.x LAN IPs. Bucket and GCP project resource names (e.g. the redacted tfstate bucket in DEPLOY.md) are allowed.

Counts

  • Allowlist candidates: 27 (docs/architecture/ holds no .md files, so that clause contributes zero; docs/CI.md does not exist, so that clause also contributes zero).
  • Included: 27 documents in 8 sections.
  • Excluded by the privacy scrub: 0 documents.
  • Mechanical normalizations in the included set: 33 total.
  • Published-copy transforms in the included set: 11 total.

Included

Section Slug Source
Start here plain docs/levels/plain.md
Start here middle docs/levels/middle.md
Start here complex docs/levels/complex.md
Start here readme README.md
Architecture data-model docs/DATA-MODEL.md
Architecture spec docs/SPEC.md
Architecture lineage docs/LINEAGE.md
Architecture ottehr-track docs/ottehr-track.md
Architecture workspace architecture/workspace.dsl (code block + intro)
Pipelines and reports predictive-reports docs/PREDICTIVE-REPORTS.md
Pipelines and reports data-quality docs/DATA-QUALITY.md
Pipelines and reports data-profile docs/DATA-PROFILE.md
Pipelines and reports intake docs/INTAKE.md
Pipelines and reports metabase docs/levels/metabase.md
Migration migration docs/MIGRATION.md
Quality and delivery quality-matrix docs/QUALITY-MATRIX.md
Quality and delivery testing docs/TESTING.md
Quality and delivery deploy docs/DEPLOY.md
AI summarization medgemma-spike docs/MEDGEMMA-SPIKE.md
AI summarization packet-model-run docs/PACKET-MODEL-RUN.md
Forge Studio forge-studio docs/forge-studio.md
Forge Studio forge-studio-architecture docs/forge-studio-architecture.md
Forge Studio forge-studio-agentrail docs/forge-studio-agentrail.md
Forge Studio forge-studio-story docs/forge-studio-story.md
Forge Studio forge-studio-codegraph docs/forge-studio-codegraph.md
Forge Studio forge-studio-floorplan docs/forge-studio-floorplan.md
Legal third-party-notices THIRD-PARTY-NOTICES.md

Transforms applied per doc (mechanical, logged per file by the build):

  • plain 2 (surname ×2: Clahadore Jones-Gaffney → Clahadore Jones, Cedric Jones-Gaffney → Cedric Jones).
  • readme 1 (CI badge line dropped).
  • spec 1 (surname ×1: JonesGaffney.EntityFrameworkCore.DuckDB → Jones.EntityFrameworkCore.DuckDB).
  • lineage 2 (private-org links ×2 → the private repository).
  • deploy 2 (surname ×2 in the tfstate bucket → jones-fleet-admin-tfstate).
  • medgemma-spike 1 (machine ×1: DESKTOP-D249KD4 → the GPU PC (RTX 4090)).
  • packet-model-run 1 (machine ×1: DESKTOP-D249KD4 → the GPU PC (RTX 4090)).
  • forge-studio-architecture 1 (private-org link ×1 → the private repository).
  • All other docs: 0 transforms. The DESKTOP-SCDT9HI, ANDYGREATROOMPC, ANDREWBEDROOMTV and generic-DESKTOP- mappings fired zero times (no such names in the corpus) but are implemented and unit-tested.

Normalizations applied per doc (mechanical, logged per file by the build):

  • testing 11 (one C:\Users\… path, /work/ and /tmp/ docker paths), quality-matrix 6 (/tmp/ paths), forge-studio 6 (C:\Users\… / C:/Users/… paths), ottehr-track 2 (C:\Users\… paths), medgemma-spike 3 (C:/Users/… and C:\models\… paths, one LAN origin), packet-model-run 1 (LAN origin), deploy 1 (placeholder C:/path/…), forge-studio-agentrail 1 (C:\Users\… path), forge-studio-codegraph 1 (C:/Users/… path), forge-studio-floorplan 1 (C:\Users\… path).
  • All other included docs needed zero normalizations.

Excluded

None. All 11 round-1 exclusions now pass after the published-copy transforms; no doc fails after them, so none is excluded.

Deviation from the brief

None. The round-1 deviation (excluded /docs/plain, e2e asserting not-found) is resolved: /docs/plain renders "Plain English" and the suite proves it is reachable from the nav. The not-published e2e canary now uses /docs/verify (docs/VERIFY.md exists in the repo but is not on the allowlist).

Verification (2026-11-13, branch wt/WT-dc65/docs-site)

  • npm test (web): 9 files, 57 tests, all pass — includes 15 scrub tests (docsScrub.test.ts: every denylisted term fails incl. mixed case, public teammate/env names pass, surname/machine/URL transforms incl. boundaries and counts, secret values fail incl. each assignment key, SHAs/digests pass by format, LAN//Users/ residue fails, sources byte-identical, fail-closed on residue/secret/missing source/bad slug) and 7 Markdown tests (markdown.test.ts, incl. 3 docs-link-rewrite tests).
  • npm run build:snapshot: passes — scrub copies 27 docs, then typecheck and vite build succeed.
  • npm run e2e: 92 tests, all pass — includes 57 docs tests (docs.e2e.ts: index lists all 8 sections, each of the 27 slugs renders a non-empty heading at 390px and 1280px with no page overflow and no console errors, nav/footer reachability via /docs/plain, non-allowlisted-slug not-found).
  • Built-output leak grep over web/dist/docs-src/ (28 files), per term: Gaffney: 0, AndrewJonesDev: 0, DESKTOP-: 0, C:\Users: 0, andrewjonesdev-tools: 0. Positive controls scanned in the same pass: the private repository: 3 (lineage ×2, forge-studio-architecture ×1), Clahadore Jones: 3 (plain, readme, forge-studio bodies), the GPU PC: 3 and <lan host>: 3 (medgemma-spike and packet-model-run bodies plus one shared index-description line), <local path>: 23 lines.

Round 3 (2026-11-13, branch wt/WT-dc65/docs-site)

Public board (/board)

  • web/public/board/board.json: snapshot of Jira epic FLT-478 at 2026-11-13T13:23:14+00:00 — 3 columns, 25 cards (Done 15, In progress 4, Next / known gaps 6), 28-term legend.
  • BoardView mounted from main.ts for /board; /board / 200 in _redirects (rewrite to /, never /index.html). Plain-text rendering only (no v-html); internal evidence links stay in the same tab, external links open in a new tab with noopener. Columns stack at 390px with no page overflow. "Board" added to the demo nav (drawer + phone buttons) and footer, next to Documentation.
  • Tests: board.test.ts (11 unit tests: load/validate, grouping, counts, filter, internal/external) and board.e2e.ts (4 tests: columns, counts and legend match the JSON; every internal evidence link resolves 200; no console errors; no overflow at 390 and 1280; nav/footer reachability).

Manual test sheet

  • docs/testing/MANUAL-TEST-CASES.md (86 cases) published as slug manual-test-cases ("Manual test cases") in "Quality and delivery"; docs/testing/MANUAL-TEST-CASES.csv shipped scrubbed at /docs-src/manual-test-cases.csv via a new extraCopies step in build-docs.mjs, with a "Download CSV" link on the doc page (manual-cases.e2e.ts proves the doc renders and the CSV resolves 200).
  • Counts now: 28 documents in 8 sections → 30 files (28 md + index.json + csv); scrub passes with 0 normalizations/transforms on the new files.

Journeys (web/e2e/journeys.spec.ts)

  • 19 of the 22 PLANNED: journeys rows automated, one test per row named [TC-XXX-nn] <title>; both sheet files link each automated row to its journey (web/e2e/journeys.spec.ts › [TC-XXX-nn] …), IDs unchanged.
  • 3 rows left MANUAL ONLY: TC-A11Y-01 (visible-focus order needs human keyboard judgement), TC-A11Y-02 (tab arrow-key feel needs human keyboard judgement), TC-CLI-06 (full dotnet suite needs the .NET SDK, not a browser journey). One partial PLANNED: journeys note remains (TC-NAV-04 migration half, not one of the 22).
  • journeys.prod.config.ts runs the same file against JOURNEY_BASE_URL (default https://fhir-pipeline-demo.pages.dev); the 8 /docs//board journeys carry @needs-local and are excluded from prod runs until those routes deploy (--grep-invert @needs-local).
  • vite.config.ts now excludes e2e/** from vitest (the .spec.ts suffix otherwise enters npm test).

Verification

  • npm test: 10 files, 68 tests, all pass.
  • npm run build:snapshot: passes — scrub copies 28 docs + CSV, typecheck and vite build succeed.
  • npm run e2e: 114 passed, 2 failed (116 total) — all 92 pre-existing tests, the 4 board tests, the manual-cases test and 17 of 19 journeys pass; the 2 failures are TC-SUM-05 and TC-SUM-07 (below).
  • Prod journeys (--grep-invert @needs-local, 11 tests): 9 passed, 2 failed — the same TC-SUM-05/TC-SUM-07.

Known failures (sheet-vs-app defects, not test bugs)

  • TC-SUM-05: the Negation gallery card shows "Not excerpted…" for post-discharge's "Assessment: The report states that CT ruled out pulmonary embolism." instead of "Quoted unchanged". The gallery shows the first regex match over race-ordered packet fetches: post-discharge-first yields "Not excerpted", multi-source-first yields "Quoted unchanged". Local runs have consistently shown post-discharge-first; prod has shown both outcomes. AFTER itself never affirms PE (every section check in the journey passes).
  • TC-SUM-06 passes but is racy the same way: the Family history card shows "HPI: Mother had breast cancer." or "A source excerpt that mentions breast cancer in the mother must retain that experiencer." depending on whether specialist-referral or preventive-care wins the race (local consistently the former; prod has shown both).
  • TC-SUM-07: the Stopped medication card deterministically shows the HPI sentence "…a previous clinician stopped metformin… (Quoted unchanged)" instead of the named "Metformin stopped in March" sentence — only medication-reconciliation matches, and its first matching source is the HPI note. The journey's AFTER checks pass (no section promotes metformin; the March sentence is quoted in AFTER).
  • Pre-existing app race (found while stabilizing TC-NAV-05, not fixed — out of scope): App.onMounted navigates back to the deep-linked page when the initial refresh resolves after the user already navigated away, yanking slow-network users back. The journeys wait for the settled load before hash-change steps; suggested fix is to gate that re-navigation on the hash being unchanged since mount.

Round 4: docs polish (2026-11-13, branch wt/WT-dc65/docs-polish)

Reading experience for the panel: 72ch prose measure at 1.6 line-height with a clear heading scale, highlight.js code blocks (C#, TS, JSON, YAML, PowerShell, bash, SQL; DSL as plain text) with a language label and copy button added after DOMPurify sanitizing, heading anchors, a sticky desktop "On this page" TOC from H2/H3 (dropdown on mobile), doc headers (level badge, reading time, "Updated from commit \"), previous/next links, three level cards plus section cards on the index, zebra/sticky-header tables in scroll boxes, blockquote callouts, inline code chips, theme colors (#12675e / #102c3c), and print stylesheets for /docs and /board. Screenshots: docs/screenshots/docs-polish-390.png (/docs/middle, scrollWidth 390, 0 errors) and docs/screenshots/docs-polish-1280.png (/docs index, scrollWidth 1280, 0 errors).

New published docs (all pass the scrub; code tour pages are generated at build time from the real sources by buildCodeTourPage and flow through the same scrub):

Section Slug Source
Start here glossary docs/GLOSSARY.md ("Glossary: every tool, in plain English")
Start here making-of docs/MAKING-OF.md ("How this was built")
Code tour code-tour-cdktn generated: Deploy Program.cs + DeploymentConstants.cs + Infra Program.cs
Code tour code-tour-efcore generated: AppDbContext + LakehouseDbContext + InHouseStoreDbContext + 9 Data migrations + 3 Migration migrations
Code tour code-tour-aspire generated: AppHost Program.cs + ServiceDefaults Extensions.cs

NDA hardening: every UUID/GUID-like value and 32-char token in a published file is SHA-256 hashed and compared against web/scripts/nda-hashes.json (hashes only; the two terms never appear in a commit, test or log). A match fails the build with file:line and a redacted snippet. Proven with a synthetic term in docsScrub.test.ts (runtime-generated UUID, positive + negative + no-leak assertions) and once against the real terms in a scratch manifest (failed closed, no leak). Dist grep over all 152 web/dist files for the two real terms: 0 files with hits, 0 total hits. Oystehr review: every Oystehr mention in the published docs reads as an evaluation of Oystehr's public FHIR API (dry-run/no-live-execution disclaimers throughout); three sentences flagged for human review in the round report (setup -Apply, deploy -Apply, Silver pricing), prose not rewritten.

Verification (this branch, before the docs-site merge):

  • npm test (web): 10 files, 78 tests, all pass — 19 scrub tests (+2 code tour, +2 NDA) and 13 Markdown tests (+6 reading experience).
  • npm run build:snapshot: passes — scrub copies 33 docs in 9 sections (0 transforms on the 5 new pages), then typecheck and vite build succeed.
  • npm run e2e: 97 tests, all pass (1.5m).
  • After merging origin/wt/WT-dc65/docs-site (round 3 journeys, keep-both): npm test 78 pass; npm run e2e 116 pass (97 + 19 journeys, 1.9m), including the journeys TC-DOCS-01/TC-NAV-08 with level-card-scoped Plain-English locators. /board needed no new styling (unchanged by the merge, already polished in step 1).