Skip to content

Commit c59b229

Browse files
authored
feat(installer): clinician-friendly update reminders (classroom default-on + npx nudge + README) (#213)
Classroom installers enable in-app update notice + Desktop updater by default; npx/manual install prints a one-time enable-reminders nudge (read-only session_hook_enabled gate); README Quick Start recommends --enable-update-notify; CHANGELOG [Unreleased] backfilled with #207-212. Additive, no count/version change. CI green.
1 parent dab2331 commit c59b229

8 files changed

Lines changed: 118 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,41 @@
22

33
## [Unreleased]
44

5+
### Added
6+
7+
- **Three new reviewer domain-probe modules** (`/peer-review` + `/self-review`, vendored
8+
byte-identical), reverse-engineered from high-IF CC-BY papers under the `reverse_engineer/`
9+
license firewall: **`mendelian_randomization.md`** (MR1–MR8: the three IV assumptions, a
10+
pleiotropy-robust sensitivity suite rather than IVW alone, Steiger/direction, sample overlap,
11+
non-linear-MR caution, drug-target colocalization); **`polygenic_risk_score.md`** (PG1–PG8:
12+
ancestry transferability/portability, base/target leakage, incremental value over the clinical
13+
model, screening detection-rate-vs-discrimination, target-population calibration);
14+
**`network_meta_analysis.md`** (NM1–NM8: transitivity, global+local incoherence, SUCRA/P-score
15+
over-interpretation, CINeMA/GRADE-NMA certainty, component-NMA additivity). Domain-probe modules
16+
12 → 15.
17+
- **Observational probe O17** (`observational_confounding.md`) — agnostic many-exposure-scan
18+
multiplicity (ExWAS / EWAS / MWAS): correction matched to claim against the honest test-count
19+
denominator, independent replication as the real safeguard, correlated-exposure conservatism,
20+
selective top-hit reporting.
21+
- **Two reporting-guideline checklists** (`/check-reporting`): **STROBE-MR** (Mendelian
22+
randomization) and **PGS-RS / PRS-RS** (polygenic-score risk prediction), with study-type
23+
routing + aliases. Reporting guidelines 36 → 38.
24+
- **Four `/analyze-stats` analysis guides**: multiple-testing/high-dimensional screening,
25+
Mendelian randomization, polygenic risk score, and network meta-analysis.
26+
- **`/clean-data` implausible-value & cross-field validity rules** reference — organ-system
27+
compatible-with-life bounds + cross-field logical-consistency rules (temporal ordering,
28+
derived-vs-source, sex-/state-specific), flag-not-auto-fix.
29+
30+
### Changed
31+
32+
- **Clinician-friendly update reminders.** The classroom installers
33+
(`install-macos.command` / `install-windows.cmd` / `install-windows.ps1`) now enable the in-app
34+
"update available" notice and the one-click Desktop updater by default (turnkey path; disable
35+
with `--disable-update-notify` or `MEDSCI_NO_UPDATE_CHECK=1`). For the `npx`/manual paths the
36+
installer prints a one-time nudge showing how to turn reminders on (`--enable-update-notify`),
37+
and the README Quick Start recommends it. New read-only `update.session_hook_enabled()` gates the
38+
nudge; the `npx`/manual paths stay opt-in (no silent SessionStart hook).
39+
540
## [4.9.0] - 2026-06-26
641

742
### Added

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ every output requires human-expert verification. New here? See the
6464
npx medsci-skills install # copies every skill into your agent's folder
6565
```
6666

67+
**Recommended (especially for clinicians):** add `--enable-update-notify` so Claude Code shows a one-line *"update available"* notice when a new version ships — otherwise you stay on the version you installed and are never told. (No terminal at all? The classroom installer below turns this on for you.)
68+
69+
```bash
70+
npx medsci-skills install --enable-update-notify # install + in-app update reminders
71+
```
72+
6773
**Have git?** Install every skill in three commands:
6874

6975
```bash
@@ -497,6 +503,8 @@ After unzipping:
497503
- Windows: double-click `installers/install-windows.cmd`
498504
- macOS: double-click `installers/install-macos.command`
499505

506+
This turnkey install also **turns on in-app update reminders** and adds an **"Update MedSci Skills"** Desktop icon, so you are told when a new version ships and can update with one click — no terminal needed (see [Updating](#updating)).
507+
500508
Then restart Claude Code Desktop, Codex Desktop, or Cursor and test with:
501509

502510
```text
@@ -548,19 +556,22 @@ See [docs/classroom_distribution_plan.md](docs/classroom_distribution_plan.md) a
548556

549557
MedSci Skills updates often. You do **not** need GitHub, git, or the command line to stay current.
550558

551-
- **One click (recommended for the classroom install).** After installing, an updater is placed at
552-
`~/.medsci-skills/updater/` (and, if you chose `--desktop-launcher`, an **"Update MedSci Skills"**
553-
icon on your Desktop). Double-click it: it downloads the latest release from GitHub, verifies it,
554-
and re-installs — transactionally, so an interrupted update never corrupts your install.
559+
- **One click (recommended for the classroom install).** The classroom installer (Option 1) now
560+
sets this up for you automatically — it places an updater at `~/.medsci-skills/updater/`, drops an
561+
**"Update MedSci Skills"** icon on your Desktop (`--desktop-launcher`), and **turns on the in-app
562+
update reminder** (below). Double-click the icon: it downloads the latest release from GitHub,
563+
verifies it, and re-installs — transactionally, so an interrupted update never corrupts your install.
555564
- **Already installed an old copy?** Re-download the latest classroom ZIP **once** and double-click
556565
the installer; from then on the one-click updater is in place for every future update.
557566
- **Terminal users:** `npx medsci-skills@latest install` always installs the latest.
558567
- **Just checking:** `python3 installers/install.py --check-update` reports whether a newer version
559568
is available and installs nothing.
560-
- **Get reminded (opt-in, Claude Code):** `python3 installers/install.py --enable-update-notify`
561-
shows a one-line *"update available"* notice when a Claude Code session starts. It is **off by
562-
default**, checks at most once a day, reads nothing about your session, and never installs
563-
anything. Turn it off with `--disable-update-notify`, or silence it with `MEDSCI_NO_UPDATE_CHECK=1`.
569+
- **Get reminded (Claude Code):** `python3 installers/install.py --enable-update-notify` (or
570+
`npx medsci-skills install --enable-update-notify`) shows a one-line *"update available"* notice
571+
when a Claude Code session starts. **The classroom installer enables this for you;** for the
572+
`npx`/manual paths it is **off by default** (the installer prints how to turn it on). It checks at
573+
most once a day, reads nothing about your session, and never installs anything. Turn it off with
574+
`--disable-update-notify`, or silence it with `MEDSCI_NO_UPDATE_CHECK=1`.
564575
- **Claude Code plugin marketplace:** third-party marketplace **auto-update is off by default**
565576
enable it in Claude Code or run a manual plugin update.
566577

installers/install-macos.command

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,19 @@ cd "$(dirname "$0")/.."
66
echo "MedSci Skills Installer for macOS"
77
echo
88

9+
PY=""
910
if command -v python3 >/dev/null 2>&1; then
10-
python3 installers/install.py --target all
11+
PY=python3
1112
elif command -v python >/dev/null 2>&1; then
12-
python installers/install.py --target all
13+
PY=python
14+
fi
15+
16+
if [ -n "$PY" ]; then
17+
"$PY" installers/install.py --target all --desktop-launcher
18+
# Turn on the in-app "update available" reminder for this turnkey install so you are told when a
19+
# new version is out (no terminal needed afterward). Best-effort; turn off later with
20+
# `install.py --disable-update-notify` or MEDSCI_NO_UPDATE_CHECK=1.
21+
"$PY" installers/install.py --enable-update-notify || true
1322
else
1423
echo "Python was not found."
1524
echo "Install Python 3 from https://www.python.org/downloads/ and run this installer again."

installers/install-windows.cmd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ echo.
77

88
where py >nul 2>nul
99
if %errorlevel%==0 (
10-
py -3 installers\install.py --target all
10+
py -3 installers\install.py --target all --desktop-launcher
11+
rem Turn on the in-app "update available" reminder for this turnkey install (disable later with --disable-update-notify).
12+
py -3 installers\install.py --enable-update-notify
1113
goto done
1214
)
1315

1416
where python >nul 2>nul
1517
if %errorlevel%==0 (
16-
python installers\install.py --target all
18+
python installers\install.py --target all --desktop-launcher
19+
rem Turn on the in-app "update available" reminder for this turnkey install (disable later with --disable-update-notify).
20+
python installers\install.py --enable-update-notify
1721
goto done
1822
)
1923

installers/install-windows.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ Write-Host "MedSci Skills Installer for Windows"
55
Write-Host ""
66

77
if (Get-Command py -ErrorAction SilentlyContinue) {
8-
py -3 installers/install.py --target all
8+
py -3 installers/install.py --target all --desktop-launcher
9+
# Turn on the in-app "update available" reminder for this turnkey install (disable later with --disable-update-notify).
10+
try { py -3 installers/install.py --enable-update-notify } catch {}
911
} elseif (Get-Command python -ErrorAction SilentlyContinue) {
10-
python installers/install.py --target all
12+
python installers/install.py --target all --desktop-launcher
13+
try { python installers/install.py --enable-update-notify } catch {}
1114
} else {
1215
Write-Host "Python was not found."
1316
Write-Host "Please install Python 3 from https://www.python.org/downloads/ and run this installer again."

installers/install.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,19 @@ def main() -> int:
286286
except Exception as exc: # noqa: BLE001
287287
log(f"\n[updater] could not install the one-click updater ({exc}); updates still work via re-running the installer.", log_lines)
288288

289+
# One-time nudge: if the in-app update reminder is not enabled, surface how to turn it on.
290+
# (The classroom installers enable it automatically; this covers npx / manual installs so a
291+
# clinician who installed via "install this repo" is told how to get update notices.) Read-only.
292+
if not args.dry_run:
293+
try:
294+
import update # noqa: PLC0415
295+
if not update.session_hook_enabled(medsci_txn.state_home(), update.default_settings_path()):
296+
log("\n[update reminders] OFF — Claude Code will not tell you when a new version is out.", log_lines)
297+
log(" Turn on with: npx medsci-skills install --enable-update-notify", log_lines)
298+
log(" (or: python3 installers/install.py --enable-update-notify)", log_lines)
299+
except Exception: # noqa: BLE001 - nudge is best-effort, never block the install
300+
pass
301+
289302
if failures:
290303
log(f"\nCompleted with errors on: {', '.join(failures)}. Other targets are fully installed.", log_lines)
291304
log("If this happened during class, send the install log to the instructor.", log_lines)

installers/update.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,25 @@ def register_session_hook(home: Path, settings_path: Path) -> str:
517517
return "enabled"
518518

519519

520+
def session_hook_enabled(home: Path, settings_path: Path) -> bool:
521+
"""Read-only: True iff our SessionStart update-notify hook is currently registered in
522+
settings.json. Never writes; tolerant of an absent/empty/unreadable settings file (False).
523+
Used by the installer to decide whether to print the one-time enable-reminders nudge."""
524+
try:
525+
if not settings_path.is_file():
526+
return False
527+
settings = _load_settings(settings_path)
528+
if not isinstance(settings, dict):
529+
return False
530+
hooks = settings.get("hooks")
531+
ss = hooks.get("SessionStart") if isinstance(hooks, dict) else None
532+
if not isinstance(ss, list):
533+
return False
534+
return any(_entry_owns_hook(e, home) for e in ss)
535+
except Exception: # noqa: BLE001 - read-only nudge gate, never block install
536+
return False
537+
538+
520539
def unregister_session_hook(home: Path, settings_path: Path) -> str:
521540
"""Opt-out: remove ONLY our SessionStart hook (even if it shares an entry with other hooks),
522541
preserving everything else; drop emptied containers. Returns 'disabled' or 'not-enabled'."""

metadata/distribution_files.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88
},
99
{
1010
"path": "installers/install-macos.command",
11-
"size": 455,
12-
"sha256": "abc4ed71a42e0e87ef20332a9bcad840d84e50032cbf77999d703eebe3084bd9"
11+
"size": 803,
12+
"sha256": "4071582be11c467f48fe9f4684dcc9b7a115a5361479fdfbd7a10c74d3309a52"
1313
},
1414
{
1515
"path": "installers/install-windows.cmd",
16-
"size": 438,
17-
"sha256": "96cce0caf63a2936de769d4a01720a2fc1de946379d04259876272474e07d574"
16+
"size": 831,
17+
"sha256": "3204da065979a2b060a5170b5c542e5ccd2ede4ecc172fcee7eafac3c0bfd003"
1818
},
1919
{
2020
"path": "installers/install-windows.ps1",
21-
"size": 554,
22-
"sha256": "2e025ffce1079a2a8be442ccccbd65711780423bcf68be9cc12bf29c015e3621"
21+
"size": 861,
22+
"sha256": "1f44ec21dfd828979445dc9ab76b4e2015cec573911d843d9416f3302aa8183d"
2323
},
2424
{
2525
"path": "installers/install.py",
26-
"size": 13319,
27-
"sha256": "9467880b2efdc5c71ed280aa1e17e4c785fe7d80078c3666d5047fb9ac267c89"
26+
"size": 14230,
27+
"sha256": "f1a092bbc5ea676a3bfca3dcb724e9e64a07dc1e1e2414ff696fc21cf4f7f8c0"
2828
},
2929
{
3030
"path": "installers/medsci_txn.py",
@@ -48,8 +48,8 @@
4848
},
4949
{
5050
"path": "installers/update.py",
51-
"size": 25500,
52-
"sha256": "6a632a88617889a1ac36418822b8af3f2bcab75bfa28169e99ae4fdf0b810365"
51+
"size": 26375,
52+
"sha256": "9ed283deea2e9bf10c17bbbbc1d75ae64703ecd587326583a17d0600d8bf0ca3"
5353
},
5454
{
5555
"path": "skills/MAINTENANCE.md",

0 commit comments

Comments
 (0)