Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9d74b36
Make the written record, not a reachability scan, the gate on retirin…
claude Sep 2, 2026
37f9779
Retire nine superseded design mockups, each against a named winner
claude Sep 2, 2026
24ff960
Correct two false exemption claims, close the gate's enforcement gap,…
claude Sep 2, 2026
9985c17
Restore two mockups the adversarial review found were not superseded
claude Sep 2, 2026
4b3d302
Record the branch review in the immutable ledger
claude Sep 2, 2026
8a184b5
Stop `npm run format` from corrupting immutable review records
claude Sep 2, 2026
fa70134
Merge origin/main and follow the mockup exemption correction into its…
claude Sep 2, 2026
0a45136
Close three gate holes Codex found: blank successors, page-less route…
claude Sep 2, 2026
c4c0a5d
Merge origin/main, regenerate the snapshots, and refresh the stale sc…
claude Sep 2, 2026
3681105
Merge origin/main and regenerate the three conflicting artefacts
claude Sep 2, 2026
eafbca9
Merge remote-tracking branch 'origin/main' into claude/mockup-retirem…
claude Sep 2, 2026
339b87f
Merge origin/main and regenerate the docs scripts index
claude Sep 2, 2026
440ab69
Merge origin/main, keeping both new verify:cheap gates
claude Sep 2, 2026
461c547
Merge origin/main, keeping both .prettierignore entries
claude Sep 2, 2026
fce054c
Merge origin/main, keeping both new verify:cheap gates
claude Sep 2, 2026
35b9ac7
Merge remote-tracking branch 'origin/main' into claude/mockup-retirem…
claude Sep 2, 2026
4877a2e
Merge origin/main and refresh the repo-awareness snapshot
claude Sep 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/gates/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Check these before believing any result.
for exactly this reason — if installed packages do not match `package-lock.json`, treat any test,
lint, or typecheck result as void until `npm ci` has run. Its own failure message says as much.
- **`verify:cheap` stops at the first failing check.** Everything after that point never ran. Do not
describe the change as broadly verified when the gate died at check 2 of 39.
describe the change as broadly verified when the gate died at check 2 of 40.
- **Changed-file formatting is required in CI but is not part of `verify:cheap`.** A locally green
`verify:cheap` can still fail CI on formatting. During iteration, format only task-owned files.
Before a push, follow `AGENTS.md`: from an isolated or otherwise fully owned worktree run
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ jobs:
if: needs.changes.outputs.docs_changed == 'true' || needs.changes.outputs.static_heavy_changed == 'true'
run: npm run sitemap:check

- name: Mockup retirement policy
if: needs.changes.outputs.docs_changed == 'true' || needs.changes.outputs.static_heavy_changed == 'true'
run: npm run check:mockups

- name: Repo awareness snapshot
if: needs.changes.outputs.docs_changed == 'true' || needs.changes.outputs.static_heavy_changed == 'true'
run: npm run check:repo-awareness-snapshot
Expand Down
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ docs/outstanding-issues.md
# tests/branch-review-index.test.ts gates the generator's escaping, ordering and
# per-record coverage far more strictly than Prettier's alignment would.
docs/branch-review-index.md
# Content-addressed immutable review records: the filename IS the SHA-256 of the row, so
# ANY reformatting breaks the record's own guard. Found 2026-09-02 — `npm run format`, which
# AGENTS.md requires before every ordinary push, silently rewrote a freshly appended record
# and `check:branch-review-ledger` then rejected it as "filename must be the SHA-256 content
# address for its record row". Existing records happened to be Prettier-clean, so the trap
# only fires on a row whose prose Prettier wants to touch. Structure is not lost by ignoring
# them — `check:branch-review-ledger` verifies the address, cell count, dates and duplicates
# far more strictly than Prettier's formatting ever could.
docs/branch-review-records/
# Verbatim user-provided prompt inputs retained for cloud review.
docs/prompts/codex-cloud-review/
# Generated by `scripts/generate-outstanding-issues-snapshot.mjs` from
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Verification pyramid — run the **smallest gate that covers the change**, then
| Gate | What it is |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `npm run test:focused -- --files <paths>` | Source-only iteration. Fails closed for deleted files and test infrastructure — then run `npm run test`. |
| `npm run verify:cheap` | The broad local gate: 36 static/consistency gates + `lint` + `typecheck` + full offline unit suite; use for cross-module risk, not automatically |
| `npm run verify:cheap` | The broad local gate: 37 static/consistency gates + `lint` + `typecheck` + full offline unit suite; use for cross-module risk, not automatically |
| `npm run verify:pr-local` | Risk-routed PR mirror: focused docs/workflow contracts for recognised light scope, fail-closed heavy checks for executable or unknown scope. `-- --dry-run --files <paths>` shows selection. |
| `npm run verify:ui` | Chromium production journeys. Run `npm run ensure` first. |
| `npm run verify:phone-chrome` | Phone-chrome changes; selects affected owners/journeys before escalating to `verify:ui` |
Expand Down
76 changes: 35 additions & 41 deletions data/repo-awareness-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": "repo-awareness-snapshot-v2",
"captured_revision": {
"sha": "a683a5a6af3d400574bb8ef55e199e0c8665c60f",
"committed_at": "2026-09-02T11:35:41+00:00"
"sha": "fce054c83d8ee57c0ba9701b6855b11516dc1cc2",
"committed_at": "2026-09-02T15:15:38+00:00"
},
"routes": {
"modes": [
Expand Down Expand Up @@ -344,16 +344,6 @@
"file": "src/app/mockups/answer-chat-redesign/page.tsx",
"area": "mockup"
},
{
"path": "/mockups/answer-evidence-popups",
"file": "src/app/mockups/answer-evidence-popups/page.tsx",
"area": "mockup"
},
{
"path": "/mockups/answer-home-proposal",
"file": "src/app/mockups/answer-home-proposal/page.tsx",
"area": "mockup"
},
{
"path": "/mockups/answer-loading-redesign",
"file": "src/app/mockups/answer-loading-redesign/page.tsx",
Expand Down Expand Up @@ -649,36 +639,11 @@
"file": "src/app/mockups/document-navigation-final/page.tsx",
"area": "mockup"
},
{
"path": "/mockups/document-navigation-final-review",
"file": "src/app/mockups/document-navigation-final-review/page.tsx",
"area": "mockup"
},
{
"path": "/mockups/document-navigation-pane",
"file": "src/app/mockups/document-navigation-pane/page.tsx",
"area": "mockup"
},
{
"path": "/mockups/document-navigation-perfected",
"file": "src/app/mockups/document-navigation-perfected/page.tsx",
"area": "mockup"
},
{
"path": "/mockups/document-phone-fused-directions",
"file": "src/app/mockups/document-phone-fused-directions/page.tsx",
"area": "mockup"
},
{
"path": "/mockups/document-phone-title",
"file": "src/app/mockups/document-phone-title/page.tsx",
"area": "mockup"
},
{
"path": "/mockups/document-phone-title-refined",
"file": "src/app/mockups/document-phone-title-refined/page.tsx",
"area": "mockup"
},
{
"path": "/mockups/document-phone-zero-chrome",
"file": "src/app/mockups/document-phone-zero-chrome/page.tsx",
Expand Down Expand Up @@ -1461,9 +1426,9 @@
],
"counts": {
"modes": 16,
"pages": 204,
"pages": 197,
"product_pages": 67,
"mockup_pages": 137,
"mockup_pages": 130,
"redirects": 18,
"api": 60
}
Expand Down Expand Up @@ -3035,6 +3000,11 @@
"section": "root",
"catalogued": false
},
{
"path": "docs/mockup-retirement-policy.md",
"section": "root",
"catalogued": true
},
{
"path": "docs/mode-aware-clinical-ask-local-handover.md",
"section": "root",
Expand Down Expand Up @@ -4447,8 +4417,8 @@
}
],
"counts": {
"documents": 582,
"catalogued": 113,
"documents": 583,
"catalogued": 114,
"uncatalogued": 469,
"sections": 21
}
Expand Down Expand Up @@ -10614,6 +10584,14 @@
"outcome": "implemented; focused + ci-workflow contracts green; Production UI wall-time confirmation pending first CI run",
"checks": "vitest focused+ci-workflows; playwright-pr-shards --validate; check:playwright-browser-revision; check:outstanding-issues"
},
{
"date": "2026-09-02",
"ref": "claude/gate-audit-ujhkqb",
"head": "4dcd8ddece3b4ec3cbe75cace784214eb7e14be9",
"scope": "prlanded",
"outcome": "merged clean, content diff empty against branch tip",
"checks": "verify:pr-local green (multiple re-runs across 8 conflict resolutions), full CI green after one confirmed flake (Production UI privacy-sticky-chrome strict-mode double-render, unrelated to this PR's diff) re-ran and passed"
},
{
"date": "2026-07-28",
"ref": "PR #1298 / `codex/fix-p2-audit-20260719`",
Expand Down Expand Up @@ -16822,6 +16800,14 @@
"outcome": "Re-check only: still CONFLICTING vs origin/main. Semantic conflicts include privacy/page.tsx, answer-render-policy.ts, answer-request.ts, source-authority-metadata.ts, upload/bulk routes, settings-dialog, drift-manifest (+ more). Merge aborted; no force-resolve.",
"checks": "merge origin/main and/or conflict re-check only; no provider-backed checks run"
},
{
"date": "2026-09-02",
"ref": "claude/caring-contacts-vocabulary-tmnc89",
"head": "969cc7f8889181758c93eb725e8eab7be6dc5e1e",
"scope": "prlanded",
"outcome": "Merged and verified. Two-dot content diff between the squash commit and the branch tip 21f4ef3da was empty, so all fifteen commits landed and nothing was orphaned by the squash+auto-merge race. The ~20 queued inbox requests it carried are applied by PR #2559, which rebased onto this squash and absorbed them; #Z5P2BW, #0HYHTH and #AGRAKQ are archived there, and the two follow-ups this branch filed (#686WHW, #1NMMZS) are added.",
"checks": "prlanded content diff empty; full CI green on 21f4ef3da (PR required, Build, Unit coverage, Production UI 1/2/3 + critical, Caring Contacts database, Safety and config checks, Lighthouse, Static PR checks, PR policy, PR mergeability, Semgrep, Gitleaks, GitGuardian); one review thread, resolved"
},
{
"date": "2026-07-29",
"ref": "claude/latency-fixes-2026-07-29",
Expand Down Expand Up @@ -17094,6 +17080,14 @@
"outcome": "supersedes prior #1160 row: final HEAD after prettier site-map; merge origin/main clean; stale sitemap fixed; no threads",
"checks": "vitest site-map pass; sitemap:check pass; no provider-backed checks run"
},
{
"date": "2026-09-02",
"ref": "claude/mockup-retirement-xw0vmn",
"head": "9985c1709eff661f42a42be3744e585c831816a5",
"scope": "mockup retirement policy and sweep",
"outcome": "Reviewed by two fresh agents before push; both found real defects and all were fixed on this head. (1) An adversarial 'argue every candidate is still alive' pass withdrew two of nine retirement candidates. document-navigation-final is partly adopted, not superseded: production document-viewer/section-nav.tsx:143 renders its heading as the string 'flex items-baseline justify-between px-0.5 pb-2', which exists in exactly two files repo-wide (production and that draft at line 278) and is absent from document-navigation-perfected, so production is a hybrid of two drafts. document-phone-zero-chrome returned UNCERTAIN because the kept document-navigation-contract carries its 'zero new chrome, sheet not pane' thesis verbatim and both landed in the one squash 6230c4db, so authorship cannot be established. Both restored, along with their chrome-suppression branches in mockups-layout-client.tsx, which would otherwise have shipped a duplicate composer over both studies. Nine retirements became seven. That pass also confirmed the winner identification independently (flexGrow/weight/pending/Loader2 appear in perfected and in no other draft) and re-ran check:dead-code-candidate, reading every distinct refusal reason and pulling the pinning file for the two that could plausibly have been real; both were bare-name collisions. (2) A frontend-ui-reviewer pass on the full diff found that two doc corrections introduced by this branch were themselves false, both since verified with picomatch: mockups are NOT exempt from CodeRabbit (.coderabbit.yaml's '!mockups/**' is root-anchored and excludes only the repo-root notes directory) and NOT blind to knip (its ignore is a basename filter, so route page.tsx files and _/mockups/_* subtrees are still scanned; what suppresses findings is check:knip omitting unused-file analysis repo-wide). It also found the new gate advertised enforcement nothing invoked (no caller passed --diff), that the gate missed relative imports, dynamic imports, CSS composes and route-path literals, and that the sweep had consequently left four dead pathname branches in mockups-layout-client.tsx which the gate passed clean. All fixed with tests; check:mockups now runs --diff auto so all three modes are enforced in verify:cheap and CI. Two fail-open holes closed: listRouteSlugs returned [] on a missing route root (passing as '0 routes indexed'), and the Retired table's column order was trusted positionally. Three findings filed to the /issues inbox rather than fixed here: the calculators mockup still serving prescribing/ECT/admission directives that PR #2491 removed from production on clinical-safety grounds (those routes 404 in production, so not patient-facing); the loss of the repo's only source-text heading-hierarchy contract; and two pieces of pre-existing dead wiring. Note the heavy CI jobs are skipped on draft PRs by design in this repo, so server-side green is not yet demonstrated.",
"checks": "check:mockups (self-test + 72 routes indexed, 14 retired + 13 deleted files recorded and unreferenced); npm run test (947 files, 12098 passed, 4 skipped); lint; typecheck; check:gate-manifest (38 gates, 35 static, consistent); sitemap:check; docs:check-links (4742 refs); check:outstanding-issues; check:ledger-write-discipline; prettier --check on all changed files; bundle budget on two cold builds (mockups 611.6 KiB / 160 chunks / 133 routes, -0.3% vs baseline). check:dead-code-candidate --diff REFUSES (64/201) and is reported as refusing, not green: every refusal is a bare-symbol-name collision on a file-local or framework-convention identifier; no threshold or refusal-list entry was changed. Not run: verify:ui (only non-mockup change is the /mockups route-group shell, which 404s in production) and any provider-backed gate."
},
{
"date": "2026-07-28",
"ref": "PR #1297 / `motion-audit-fixes-clean`",
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ npm run docs:check-links
- [frontend-architecture.md](frontend-architecture.md) — shell, routing, dashboard module structure
- [wiring-conventions.md](wiring-conventions.md) — page/button wiring conventions and the dead-button / orphan-route gates
- [search-chrome-behaviour.md](search-chrome-behaviour.md) — shared search-chrome contract: composer ownership, phone edge-to-edge dock, hide/reveal reserves
- [mockup-retirement-policy.md](mockup-retirement-policy.md) — when a mockup may be deleted, who decides, what evidence is required, and the three tiers that keep developer-gated prototypes out of cleanup scope
- [search-results-bar-decisions.md](search-results-bar-decisions.md) — shared results-bar anatomy, why the filter shelf is scoped to two modes, and what is deliberately not done
- [deployment-architecture.md](deployment-architecture.md) — app/worker/Supabase deployment topology
- [ingestion-state-machine.md](ingestion-state-machine.md) — ingestion job lifecycle and states
Expand Down
33 changes: 28 additions & 5 deletions docs/agents/wiring-and-bundle-budget.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,34 @@ action must perform one; a page that ships must be reachable.
`<button>`; `tests/route-reachability.test.ts` (in `npm run test`) fails when a production page
route has no inbound nav link unless it is consciously added to that test's documented
allowlist (redirect targets / legacy-compat routes). Both run in `verify:cheap` and CI. Mockups
(`src/app/mockups/**`, `*-mockups.tsx`) are design-scratch and exempt from both — **and from
nothing else**. Mockups are compiled like any other source: they are typechecked, and their client
chunks are still weighed by `check:bundle-budget` — against the separate `mockups` scratch budget,
not the `production` one (reconciled 2026-08-09; see "Bundle budget" below). Do not read "exempt"
as "free".
(`src/app/mockups/**`, `*-mockups.tsx`) are design-scratch and exempt from both. **Corrected
2026-09-02: "and from nothing else" was wrong** — reading the actual rule and config sources,
mockups are also exempt from `local/no-hardcoded-hex`, `local/require-z-index-ladder` and
`local/require-lucide-icon-aria` (`eslint.config.mjs`), from `check:icon-scale` and
`check:design-system-contract`, and from the required Playwright lane (mockup specs carry
`@mockup` and the `chromium` project sets `grepInvert`; `chromium-mockups` is advisory).
Two exemptions people assume and that do NOT exist, both verified by glob semantics on
2026-09-02: **CodeRabbit reviews mockup source normally** — `.coderabbit.yaml`'s `!mockups/**`
is root-anchored and excludes only the repo-root `mockups/` notes directory, not
`src/app/mockups/**` or `*-mockups.tsx`; and **`knip` is not blind to this surface** —
`knip.json` ignores files whose _basename_ contains `mockup`, so `*-mockups.tsx` is exempt but
the `src/app/mockups/<slug>/page.tsx` routes and the `*/mockups/**` subtrees are not.
(`check:knip` does run `--include dependencies,unlisted,unresolved,duplicates`, omitting
unused-file and unused-export analysis — but that is repo-wide, not a mockup carve-out.)
Note too that the three exemption globs disagree with each other, so `care-plan/mockups/**`,
`caring-contacts/mockups/**` and `ward-management/**` are exempt from fewer rules than the
depth-1 `*-mockups.tsx` files. Mockups are still compiled like any other source: they are
typechecked, and their client chunks are still weighed by `check:bundle-budget` — against the
separate `mockups` scratch budget, not the `production` one (reconciled 2026-08-09; see
"Bundle budget" below). Do not read "exempt" as "free", and do not read this correction as
licence to widen the list.
- **Retiring a mockup is governed by `docs/mockup-retirement-policy.md`**, enforced by
`npm run check:mockups`. Deleting one needs a written successor plus a clean import search, not a
reachability scan and not a `-v2`/`-final`/`-perfected` suffix — in this repo a mockup and the
production change it justifies usually land in the SAME commit, and in at least five families the
newer generation imports the older one. `/mockups/development`, `/mockups/caring-contacts`,
`/mockups/care-plan` and `/mockups/ward-flow` are live in production behind `DeveloperAreaGate`
and are never cleanup candidates.
- **Never** add a production page route without either an inbound link or a documented
reachability allowlist entry plus an `/issues` note, and never silence the button-wiring rule
with a blanket disable — wire the control or make it an explicit placeholder.
Expand Down
12 changes: 10 additions & 2 deletions docs/answer-page-redesign-handover.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# Answer page redesign — build and merge handover

**Status:** design settled, not built. Nothing in `src/app/(search-app)` or
`src/components/clinical-dashboard` has changed yet.
**Status: BUILT AND SHIPPED.** Corrected 2026-09-02 — this header said "design settled, not
built. Nothing in `src/app/(search-app)` or `src/components/clinical-dashboard` has changed
yet" long after that stopped being true, and it was edited twice on 2026-08-26 without the
status being touched. It shipped across #2362, #2370, #2377, #2388 and #2450:
`answer-content.tsx`, `answer-status.tsx` and `answer-progress.ts` were all rewritten from this
design, `answer-source-rail.tsx` / `answer-source-drawer.tsx` / `answer-source-rows.ts` were
created for it, the shield tile and `--answer-message-gutter` are gone, and
`AnswerProgressStepper` no longer exists. Read what follows as the record of a completed build,
not a plan. §12.6's "Not yet in production" line is stale in the same way and for the same
reason.
**Design lives at:** `/mockups/answer-chat-perfected` (the design to build) and
`/mockups/answer-chat-redesign` (the three-way comparison it was chosen from).
**Owner decision on record:** direction A — numbered marks in the prose, one source
Expand Down
Loading
Loading