Creative ideas + design notes
Commits with substantial prose (≥120 chars) — the rationale behind each move.
c9833a1 · 2026-09-14 · approvals-viewer: implement openAudit() — Audit All button was a dead handler
The "🔍 Audit All" button called openAudit(), which was defined nowhere
(confirmed live: PAGEERROR "openAudit is not defined" on click). Add a
read-only full-queue overlay that renders every loaded memo at once
(chip/date/rating/title/file + collapsible body via <details>), reusing
md()/fmtDate() and card styles. Esc or ✕ closes; swiper keys are
suppressed while open so arrow-keys can't fire decisions behind it.
Also add the missing .b-audit style. No new writes — purely client-side.
Verified in Chrome: typeof openAudit === 'function', overlay shows all 77
items, memo bodies expand, Esc closes, swiper state restored, no pageerror.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X7mfnaSD5EB3DGZcaamU8A
c9cbd5f · 2026-09-14 · TK-11685: approval-time freshness re-check guard (read-only, advisory)
Closes the governance gap where a delete list could be approved against a
STALE enumeration: an approval fired at 18:26Z for a list a sibling lane had
already invalidated at 15:43Z, because nothing joined a fresh enumeration
against concurrent findings before the memo reached Steve.
freshness-guard.js joins a gated memo's enumerated target set (Shopify
variant/product ids, DW-SKUs, GMC offer-ids, /products/ handles) against every
newer concurrent finding — the executed-reversible ledger (already-done), memos
since filed to _done/_resolved/_superseded, other open memos, and decision
logs — and flags any target a finding newer than the memo's as-of has touched,
surfacing "N of M targets are now stale, do NOT execute blind". Precision
anchors + now-clamp (future expiry/scheduled dates never corrupt as-of or a
finding ts) + Drafted-date as-of + NOT_MEASURED-is-never-PASS. Verdicts in the
fleet-health PASS/WARN/FAIL vocabulary.
READ-ONLY + ADVISORY throughout: it annotates/warns and surfaces the memo's own
re-verify command; it NEVER approves, rejects, edits, moves, or executes any
memo, delete, or target action, and never runs the memo's re-verify command
itself.
- freshness-guard-cli.js: one memo / --all / --stale / --json
- server.js: read-only GET /api/freshness?file=<memo.md> (additive, guarded)
- test/freshness-guard.test.js: NEGATIVE TEST — injects the concurrent-
invalidation fault, proves STALE; proves FRESH on a still-fresh set; proves
the future-date clamp. 19/19 assertions pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: 963c1354-d10a-451f-8e5b-936663056ab7
a3df63a · 2026-08-25 · creds-safe fetch guard: resolve relative fetch vs credential-free location (creds-in-URL trap)
Fleet inoculation — opening this basic-auth app with credentials in the URL
poisoned document.baseURI and made relative fetch('/api/…') throw. Guard resolves
non-absolute request URLs against location instead. Ref: creds-in-url-fetch-guard-fleet-pattern.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
69d3d3a · 2026-08-19 · approvals-viewer: add star ratings (1-5) + sort-by-rating/category/security
- /api/rate POST endpoint stores per-memo ratings in ratings.json
- /api/memos?sort= supports: mtime (default), rating, category, security
- Star widget (★) on each card, clickable; keyboard shortcut 1-5 to rate
- Rating badge chip in header row + rating-first sort surfaces urgent items
- Toggle off same star to clear rating
528c44e · 2026-08-13 · approvals-viewer: serve public/ static assets so /nav-agent/* resolves (was 404)
Raw Node http server had no static route; nav-agent.js/.css 404'd. Added a
path-traversal-guarded static handler for public/ before the 404 fallback.
Additive + reversible; asset stays behind Basic auth.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
a0197a4 · 2026-07-28 · approvals-viewer: fix blank page — nested-quote SyntaxError in inline handlers
The card action buttons + memo toggle used single-quoted inline onclick handlers
inside single-quoted JS strings; the escaped quotes collapsed and broke the whole
inline script (page stuck on 'loading…'). Switched action buttons to
data-attributes + one delegated click listener; memo toggle to a named tog().
ecc4f6c · 2026-07-28 · approvals-viewer: skip auth for loopback (fixes blank page)
Chrome drops the userinfo credential on the follow-up /api/drafts fetch, so the
data call 401'd and the page rendered blank. Loopback (this Mac) is now trusted
and served without auth; remote callers still need basic auth admin/DW2024!.
be8f9d3 · 2026-07-28 · approvals-viewer: yes/no board for the pending-approval queue
Zero-dep Node viewer (basic auth admin/DW2024!) on :9792. Reads
~/.claude/yolo-queue/pending-approval/*.md, shows gate/DTD/reversibility +
Claude's recommendation, and records Approve/Defer/Block per draft to
decisions.json, mirrored into cncp-approvals-state.json. Decision-capture only
— nothing is executed. Pre-seeded with the 15 quick-triage batch-1 approvals.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>