| name | internal-medicine-dev |
| description | Repo-local snapshot of audit-fix-deploy SS E for InternalMedicine. Use when working on this repo to know current version, test baseline, schema state, and the 16-binding window contract. |
internal-medicine-dev - Pnimit Mega snapshot
This is the per-repo skill snapshot. Canonical procedure lives in
~/.claude/skills/audit-fix-deploy/SKILL.md SS E. This file holds the
state-as-of-now: version numbers, test baseline, schema, binding contract.
Identity
- Repo: github.com/Eiasash/InternalMedicine
- Live: https://eiasash.github.io/InternalMedicine/
- Stack: Vite + ES modules + IndexedDB + Supabase + GitHub Pages
- Sibling repos sharing engine: Geriatrics (SS D), FamilyMedicine (SS C). All three share shared/fsrs.js byte-identical.
- Supabase project: krmlzwwelqvlfslwltol (labeled "Toranot" in dashboard; shared with SS B/C/D/E).
- Exam target: Israeli Internal Medicine Board (P0064-2025).
Current snapshot (2026-05-01, v10.4.4)
| Field | Value |
|---|
| APP_VERSION (constants.js) | 10.4.4 |
| package.json version | 10.4.4.0 |
| sw.js CACHE | pnimit-v10.4.4 |
| Test baseline | 692 / 35 files |
| shared/fsrs.js LF-md5 | cea66a0435be626eda9c1bf120d2625c (canonical) |
| shared/fsrs.js git-hash-object | 9f91faaf4f814c5747318f8f6bcf2157b883582d |
| Question count | 1556 |
| EXAM_YEARS | 7 sessions (2020, 2021-Jun, 2022-Jun, 2023-Jun, 2024-May, 2024-Oct, 2025-Jun) |
| TOPICS / EXAM_FREQ / IMA_WEIGHTS | length 24 each (P0064-2025 contract) |
| IMA_WEIGHTS sum | 141 - overlap by design (ECG dual-counted ti=0 + ti=2) |
| Supabase schema for writes | public (NOT internal_medicine - 9.76 rollback scar) |
Trinity invariant (locked)
- package.json "version" 10.4.4.0
- src/core/constants.js APP_VERSION '10.4.4'
- sw.js CACHE 'pnimit-v10.4.4'
Enforced by node scripts/sync-sw-version.cjs (run as part of npm run verify).
Window bindings (exactly 16)
API surface - set in src/ui/app.js:
- go, render (core nav)
- setTopicFilt (quiz)
- openHarrisonChapter (library)
- showLeaderboard, cloudBackup, cloudRestore (cloud)
- sendChatStarter (chat starter)
- exportProgress, importProgress (data ops)
- toggleDark, showHelp (header)
- applyUpdate, shareApp (dynamic UI)
- shareQ (quiz delegation)
- updateAccountChip (auth chip refresh)
Internal flags also on window (NOT API): G, APP_VERSION, __pnimitLastMockWrong, __authBound, __studyPlanBound, _idbSaveTimer, _lsWarnShown, __debug, save.
Audit primer (always-run gates)
- node scripts/sync-sw-version.cjs # trinity sync
- git hash-object shared/fsrs.js # fsrs.js dual-hash
- tr -d '\r' < shared/fsrs.js | md5sum
- node -e "..." # 24-topic contract
- grep -rn "internal_medicine." src/ # 9.76 schema-scar (must be empty)
- npm run verify # full chain
Hard constraints (NEVER violate)
- APP_VERSION / sw.js CACHE / package.json version locked together
- Never hand-edit dist/sw.js - regenerated by scripts/build.sh
- Never reintroduce internal_medicine Supabase schema for writes (9.76 rollback scar)
- Never diverge shared/fsrs.js from SS C / SS D - coordinate via cross-repo R3
- Never break the 24-topic contract - TOPICS / EXAM_FREQ / IMA_WEIGHTS length 24
- Pnimit != Mishpacha - different Q banks, syllabuses, AFP integration
- Never push without rebasing first (sibling-repo concurrency)
Recent versions
- 10.4.4 (2026-05-01) - IMA_WEIGHTS overlap annotation + R2 test expansion (38 new). 654 -> 692 tests.
- 10.4.3 (2026-05-01) - HARRISON_PDF_MAP[458] URL-encoding fix. R1 test expansion (28 new).
- 10.4.2 (2026-05-01, sibling) - Dark Mode CSS for image-render surfaces.
- 10.4.1 - Defensive html data-theme="light" static default.
- 10.4.0 - Auto-restore-on-login prompt for fresh-device users.
- 10.3.0 - Settings consolidation (5 stages).
Reference
- Full procedure: ~/.claude/skills/audit-fix-deploy/SKILL.md SS E
- Repo CLAUDE.md: ./CLAUDE.md (architecture, invariants, file map)
- Audit log: ./IMPROVEMENTS.md (rolling, most recent at top)