medsci-skills 5.7.0 → 5.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -15
- package/installers/install.py +14 -1
- package/metadata/distribution_files.json +129 -34
- package/metadata/distribution_manifest.json +1 -1
- package/package.json +1 -1
- package/skills/analyze-stats/SKILL.md +14 -3
- package/skills/calc-sample-size/SKILL.md +47 -2
- package/skills/calc-sample-size/references/prediction_model_sample_size.md +97 -0
- package/skills/check-reporting/SKILL.md +5 -2
- package/skills/check-reporting/references/checklists/COREQ.md +86 -0
- package/skills/check-reporting/references/checklists/SRQR.md +64 -0
- package/skills/check-reporting/scripts/check_checklist_exists.py +3 -0
- package/skills/check-reporting/scripts/check_framework_naming.py +19 -9
- package/skills/check-reporting/tests/test_framework_naming.sh +16 -0
- package/skills/design-study/SKILL.md +2 -1
- package/skills/design-study/references/dag_adjustment.md +93 -0
- package/skills/design-study/references/target_trial_emulation.md +94 -0
- package/skills/design-study/scripts/adjustment_set_challenge/fixture/confounder.json +1 -0
- package/skills/design-study/scripts/adjustment_set_challenge/fixture/instrument.json +1 -0
- package/skills/design-study/scripts/adjustment_set_challenge/fixture/mbias.json +1 -0
- package/skills/design-study/scripts/adjustment_set_challenge/fixture/mediator.json +1 -0
- package/skills/design-study/scripts/adjustment_set_challenge/problem.md +35 -0
- package/skills/design-study/scripts/adjustment_set_challenge/verify.sh +45 -0
- package/skills/design-study/scripts/adjustment_set_helper.py +163 -0
- package/skills/design-study/skill.yml +1 -0
- package/skills/make-figures/references/exemplar_plots/README.md +14 -0
- package/skills/make-figures/references/reporting_guideline_figure_map.md +2 -2
- package/skills/make-figures/scripts/render_core_figures.py +295 -0
- package/skills/make-figures/scripts/render_core_figures_challenge/fixture/synthetic_inputs.json +42 -0
- package/skills/make-figures/scripts/render_core_figures_challenge/problem.md +42 -0
- package/skills/make-figures/scripts/render_core_figures_challenge/verify.sh +37 -0
- package/skills/make-figures/skill.yml +1 -0
- package/skills/model-validation/SKILL.md +14 -1
- package/skills/model-validation/references/validation_design.md +32 -1
- package/skills/orchestrate/SKILL.md +1 -1
- package/skills/peer-review/SKILL.md +6 -0
- package/skills/peer-review/references/domain-probes/qualitative_research.md +50 -0
- package/skills/self-review/SKILL.md +37 -86
- package/skills/self-review/references/domain-probes/qualitative_research.md +50 -0
- package/skills/self-review/references/panel_review_template.md +5 -2
- package/skills/self-review/references/phases/confounding_completeness.md +90 -0
- package/skills/self-review/scripts/check_claim_artifact.py +42 -6
- package/skills/self-review/tests/test_claim_artifact.sh +24 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**51 skills that actually work.** Built by a physician-researcher, tested on real publications.
|
|
6
6
|
|
|
7
|
-
*MedSci Skills is an end-to-end research tool for physician and medical-engineering researchers — design → scaffold → validate → publish — for the clinical manuscript and the medical-AI model behind it. Its moat is the compliance layer —
|
|
7
|
+
*MedSci Skills is an end-to-end research tool for physician and medical-engineering researchers — design → scaffold → validate → publish — for the clinical manuscript and the medical-AI model behind it. Its moat is the compliance layer — 44 reporting guidelines and risk-of-bias tools, reference/citation verification, and deterministic integrity gates before peer review — now extended by a model-engineering lane that scaffolds reproducible, leakage-safe training repos and audits model validation. Clinical AI model research engineering is in scope; a general AI-scientist platform is not. It competes on clinical submission reliability, not skill count.*
|
|
8
8
|
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
[](https://github.com/Aperivue/medsci-skills/releases/latest)
|
|
@@ -51,7 +51,9 @@ integrity gates** for submission-grade biomedical research. As of **v5.0** it ad
|
|
|
51
51
|
**model-engineering lane**: choose a paper-grounded architecture, scaffold a
|
|
52
52
|
reproducible, leakage-safe PyTorch training repo, and validate, document, and
|
|
53
53
|
evaluate a medical-imaging or LLM/MLLM model so the work reaches a paper — it
|
|
54
|
-
|
|
54
|
+
ships a minimal runnable default model for a forward-pass smoke test and
|
|
55
|
+
**integrates** MONAI / nnU-Net / timm / torchvision for production-grade models,
|
|
56
|
+
rather than reimplementing the ecosystem. Clinical AI model research
|
|
55
57
|
engineering is in scope; it is **not** a diagnostic tool, an autonomous author, or a
|
|
56
58
|
general AI-scientist platform, and every output requires human-expert verification.
|
|
57
59
|
New here? See the [3 workflows below](#start-here-3-workflows), the
|
|
@@ -281,54 +283,54 @@ The E2E pipeline (`orchestrate --e2e`) produces everything up to `qc/`. The `sub
|
|
|
281
283
|
|
|
282
284
|
## What's New
|
|
283
285
|
|
|
284
|
-
**v4.10** — reviewer-coverage expansion reverse-engineered from high-IF, CC-BY papers (learn-only under the `reverse_engineer/` license firewall), plus a clinician-friendly update path. Additive and backward-compatible; 45 skills / **
|
|
286
|
+
**v4.10** — reviewer-coverage expansion reverse-engineered from high-IF, CC-BY papers (learn-only under the `reverse_engineer/` license firewall), plus a clinician-friendly update path. Additive and backward-compatible; 45 skills / **44 guidelines** / 36 detectors / **15 domain-probe modules** (was 12):
|
|
285
287
|
|
|
286
288
|
- **Three new reviewer domain-probe modules** (`/peer-review` + `/self-review`, vendored byte-identical): **Mendelian randomization** (MR1–MR8 — IV assumptions, pleiotropy-robust sensitivity suite, Steiger, sample overlap, NLMR, drug-target colocalization), **polygenic risk score** (PG1–PG8 — ancestry portability, base/target leakage, incremental value over the clinical model, screening-vs-discrimination, calibration), and **network meta-analysis** (NM1–NM8 — transitivity, incoherence, SUCRA over-interpretation, CINeMA/GRADE-NMA, component-NMA additivity). Plus observational **O17** (agnostic many-exposure-scan multiplicity: ExWAS/EWAS/MWAS).
|
|
287
289
|
- **Two reporting-guideline checklists** (36 → 38): **STROBE-MR** and **PGS-RS / PRS-RS**, with study-type routing. Four new `/analyze-stats` analysis guides (multiplicity, MR, PRS, NMA) and a `/clean-data` implausible-value + cross-field validity reference.
|
|
288
290
|
- **Clinician-friendly update reminders** — the classroom installers enable the in-app "update available" notice + one-click Desktop updater by default; the `npx`/manual paths print how to turn it on; the install guide recommends `npx medsci-skills install --enable-update-notify`.
|
|
289
291
|
|
|
290
|
-
**v4.9** — analysis-integrity hardening promoted from real review cycles, plus journal-mechanics additions. Additive and backward-compatible; still 45 skills /
|
|
292
|
+
**v4.9** — analysis-integrity hardening promoted from real review cycles, plus journal-mechanics additions. Additive and backward-compatible; still 45 skills / 44 guidelines, analysis-integrity detectors **32 → 36**:
|
|
291
293
|
|
|
292
294
|
- **Four new gates** — a **duplicate-bibliography** check (`check_reference_duplication.py`) for the hybrid `[@key]` + hand-typed `## References` build that renders the list twice; a **cross-script binning / composite-indicator** consistency check (`check_binning_consistency.py`, `BINNING_DRIFT` / `DERIVED_DEF_DRIFT`) for a derived categorical or composite indicator defined inconsistently across analysis scripts; a **float citation-order** check (`check_citation_order.py`) for numbered Tables/Figures not first cited in ascending order per series; and an **audit-dump leak** gate (`/sync-submission`) that blocks a `/check-reporting` output mistakenly attached as a submission file.
|
|
293
295
|
- **KJR technical-check conventions + percentage-decimal style**, reader-allocation-under-burden and generative-image-as-study-object reporting (`/design-ai-benchmarking`, `/check-reporting`), and a **Liver International** CSL with that journal's submission mechanics (`/manage-refs`).
|
|
294
296
|
|
|
295
|
-
**v4.8** is the **review-harvest batch** — deterministic detector hardening promoted from real-manuscript review cycles. Additive and backward-compatible; still 45 skills /
|
|
297
|
+
**v4.8** is the **review-harvest batch** — deterministic detector hardening promoted from real-manuscript review cycles. Additive and backward-compatible; still 45 skills / 44 guidelines, analysis-integrity detectors **30 → 32**:
|
|
296
298
|
|
|
297
299
|
- **Two new gates** — `check_supplement_hygiene.py` lints the rendered supplement / tables / caption files (not just the manuscript) for §-labels, placeholders, build markers, response-letter framing, and unresolved body↔supplement cross-references; `check_null_calibration.py` flags a headline negative/equivalence claim made without a minimum-detectable-effect / power / equivalence statement.
|
|
298
300
|
- **Four detector false-positive fixes** — gates no longer fire on a recommended colorblind-safe palette, author-footnote `§` daggers, a correctly-hedged disclaimer, or a tier-label digit; each with a regression fixture and three newly CI-wired test suites.
|
|
299
301
|
- **Nine reviewer-side domain probes** (SR/MA, observational, diagnostic, AI-overclaiming, survival) plus a `/design-study` design-stage ceiling gate for perceptual/reader-AI studies and a reusable confidence-weighted-rating→AUC monotonicity template.
|
|
300
302
|
|
|
301
|
-
**v4.7** is the **self-update foundation** — physician-researchers stay current without GitHub, git, or a terminal. Additive and backward-compatible; still 45 skills /
|
|
303
|
+
**v4.7** is the **self-update foundation** — physician-researchers stay current without GitHub, git, or a terminal. Additive and backward-compatible; still 45 skills / 44 guidelines / 30 detectors:
|
|
302
304
|
|
|
303
305
|
- **Transactional, crash-recoverable installer.** Each install runs through a durable journal state machine recovered on the next run (roll back / forward-clean / fail-closed), with per-target SHA-256 inventories — your modified or third-party skills are backed up and never clobbered or auto-deleted.
|
|
304
306
|
- **One-click self-updater** (`~/.medsci-skills/updater/`, `install.py --check-update`). Verifies the download against the github.com API digest and **never `extractall()`s** (per-entry rejection of traversal / symlink / duplicate / zip-bomb + an allowlist & per-file hash). The release pipeline injects a verified `provenance.json`, attests build provenance, runs on a protected `release` environment, and verifies each ZIP round-trips through the updater's own safe-extract before publishing.
|
|
305
307
|
- **Opt-in update notice (off by default):** `install.py --enable-update-notify` shows a one-line "update available" message at Claude Code session start — no telemetry, reads nothing about your session, installs nothing. `--disable-update-notify` / `MEDSCI_NO_UPDATE_CHECK=1` turn it off. *(Honest scope: the digest/attestation detect transport tampering, not a compromised publisher account — see `SECURITY.md`.)*
|
|
306
308
|
|
|
307
|
-
**v4.6** is a maintainability, governance, and review-depth release — still 45 skills /
|
|
309
|
+
**v4.6** is a maintainability, governance, and review-depth release — still 45 skills / 44 guidelines; analysis-integrity detectors **28 → 30**, domain probes 11 → 12:
|
|
308
310
|
|
|
309
311
|
- **Fairness / equity / subgroup-performance probe (EQ0–EQ6)** for AI/prediction/diagnostic studies that claim cross-population performance, plus two new detectors: an **AI-disclosure + data/code-availability** check (`/sync-submission`) and a **structured-summary-box conformance** check (`/academic-aio`).
|
|
310
312
|
- **Governance + answer-engine layer:** `ROADMAP.md`, `MAINTAINERS.md`, `SECURITY.md`, a maintainer workflow + release checklist, an AEO/GEO `docs/faq.md`, a "Start here: 3 workflows" + "Validation status" section in this README, and a new `maturity` field (official / experimental / community) on every skill.
|
|
311
313
|
- **Token diet (pilot):** `write-paper` Phase 7 integrity audits moved to a load-on-demand reference (~2,559 tokens saved per invocation). Positioning now leads with the compliance moat rather than skill count.
|
|
312
314
|
|
|
313
|
-
**v4.5** deepens the review + submission surface with no new skill or reporting-guideline count (still 45 skills /
|
|
315
|
+
**v4.5** deepens the review + submission surface with no new skill or reporting-guideline count (still 45 skills / 44 guidelines); analysis-integrity detectors **27 → 28**:
|
|
314
316
|
|
|
315
317
|
- **`/clean-data` + `/analyze-stats` — reverse-coded-item / negative-alpha detector.** A multi-item Likert scale with a negatively-worded item must be recoded `(min+max) − x` before the scale total or Cronbach's alpha is computed; left un-recoded, the item correlates negatively with the rest of the scale and alpha collapses (often negative). A negative alpha is a coding bug, not a "multidimensional construct." New stdlib-only `check_reverse_coding.py` returns `REVERSE_CODING_LIKELY` / `REVERSE_CODING_SUSPECT` / `OK` from per-item item-rest correlations + raw alpha; the Likert summary template gains a `--reverse-items` recode flag.
|
|
316
318
|
- **`/peer-review` + `/self-review` — SR/MA + DTA + prediction-model probe batch.** `sr_ma.md` **P12** risk-of-bias table row-sum ↔ traffic-light figure-matrix reconciliation and **P13** included-study ↔ reference-list completeness; `diagnostic_accuracy.md` **D7** index-test-as-enrollment-criterion circularity; `clinical_prediction_model.md` **CP5** intended-use horizon leakage and **CP6** development/CV vs held-out/external validation-nomenclature conflation. Vendored byte-identical into `/self-review`.
|
|
317
319
|
- **`/sync-submission` — embedded absolute-path leak scan.** A `word/*.xml` attribute (e.g. a pandoc-embedded image's `<pic:cNvPr descr="…">`) carrying an absolute home-dir path (`/Users/…`, `/home/…`) is a username leak invisible to a rendered-text scan; now flagged as `docx_embedded_abs_path` under `check_asset_anonymization.py`.
|
|
318
320
|
|
|
319
|
-
**v4.4** adds reviewer/analysis depth with no new skill or reporting-guideline count (still 45 skills /
|
|
321
|
+
**v4.4** adds reviewer/analysis depth with no new skill or reporting-guideline count (still 45 skills / 44 guidelines / 27 detectors):
|
|
320
322
|
|
|
321
323
|
- **`/author-strategy` — trajectory-archetype classification (optional).** Classifies a queried author's PubMed trajectory into abstract career archetypes (A1 infrastructure builder, A2 methodology rule-maker, A3 clinical→AI hybrid, A4 SR/MA volume engine, A5 large-consortium participation, A6 device/technique depth, + a computed composite) as an **explainable, multi-label, confidence-scored heuristic — not an objective verdict**. The rubric is a single canonical YAML (the narrative doc is generated from it); scores exclude `unavailable` signals (h-index/citation/venue-tier → `[VERIFY]`, never fabricated); a **disambiguation gate** binds an approved `corpus_manifest.json` to the CSV (csv + PMID-set hashes) so a surname alone never classifies, and target-author attribution never borrows a co-author's ORCID/affiliation.
|
|
322
324
|
- **`/peer-review` + `/self-review` — Image-Synthesis / cross-modality probe (IS1–IS4)** for studies that synthesize one imaging modality from another and claim the output carries the target's information, plus a reviewer-side reference-integrity spot-check.
|
|
323
325
|
- **`/verify-refs` — OpenAlex tertiary index** recovers conference-proceedings / non-DOI citations (NeurIPS/ICLR/ACL) that fall through PubMed and CrossRef, the free analogue of a portal's second index.
|
|
324
326
|
|
|
325
|
-
**v4.3** hardens the **cross-sectional / observational cohort** review surface end-to-end, much of it reverse-engineered from real CC-BY cohort papers (learn-only under the license firewall) — no new skill or reporting-guideline count (still 45 skills /
|
|
327
|
+
**v4.3** hardens the **cross-sectional / observational cohort** review surface end-to-end, much of it reverse-engineered from real CC-BY cohort papers (learn-only under the license firewall) — no new skill or reporting-guideline count (still 45 skills / 44 guidelines); analysis-integrity detectors **25 → 27**:
|
|
326
328
|
|
|
327
329
|
- **Observational probes O1 → O14** (`/peer-review` + `/self-review`, vendored) — over-adjustment / analysis-unit clustering / outcome construct-validity (O7–O9), overlapping-subset gradient (O10), **complex-survey design & weighting** for NHANES/KNHANES (O11), **data-driven threshold / "inflection-point" mining** (O12), **cross-sectional mediation** temporal-order & sequential-ignorability (O13), and **interaction scale** — additive RERI/AP/S vs multiplicative (O14). Plus a new **clinical-prediction-model** probe module **CP1–CP4** and survival **S9** (panel-data / multistate variance).
|
|
328
330
|
- **Two new detectors (25 → 27)** — `check_wordcount_cap.py` (the revision-inflation trap: body vs journal cap) and `check_paren_spans.py` (em-dash→paren conversions that wrap a whole sentence). Plus a `check_confounding_completeness.py` upgrade (DB-code↔prose alias map, SMD-from-mean±SD, exposure-defining-covariate exemption), a `check_cohort_arithmetic.py` `ANALYSIS_UNIT_UNDISCLOSED` check, a `check_scope_coherence.py` cross-sectional-yield lexicon, and a verify-refs corporate/collective-author render-abort fix.
|
|
329
331
|
- **Analysis & submission tooling** — `/analyze-stats` gains **mediation** and **interaction & effect-modification** guides; `/sync-submission` gains `assemble_supplement.py` (S{N} index↔file integrity) and a `/revise` body-word-count exit gate; `/render-pdf-doc` gains a `scan_glyph_coverage.py` xelatex silent-glyph-drop scan.
|
|
330
332
|
|
|
331
|
-
**v4.2** builds out the case-report capability end-to-end, grounded in real CC-BY case reports (learn-only under the license firewall) — no new skill or reporting-guideline count (still 45 skills /
|
|
333
|
+
**v4.2** builds out the case-report capability end-to-end, grounded in real CC-BY case reports (learn-only under the license firewall) — no new skill or reporting-guideline count (still 45 skills / 44 guidelines); journal profiles **68 → 73**:
|
|
332
334
|
|
|
333
335
|
- **Case-report + case-series writing** — `/write-paper` gains a CARE narrative + 150-word-abstract case-report exemplar, a **case-series** paper type (methods-light mini-cohort, all-cases summary table, counts-not-rates), and **adverse-event/pharmacovigilance** (Naranjo/WHO-UMC causality) and **diagnostic-pitfall/mimic** subtypes.
|
|
334
336
|
- **Radiology / imaging-led track** — a dedicated `exemplar_case_report_radiology.md` (per-modality technique→findings→impression, structured-reporting lexicons BI-RADS/LI-RADS/PI-RADS/TI-RADS/Lung-RADS/O-RADS, quantitative threshold honesty, an interventional-radiology procedure/complication subtype, DICOM de-identification) plus a `/make-figures` annotated multimodality imaging-panel exemplar.
|
|
@@ -452,14 +454,14 @@ ma-scout -> search-lit -> fulltext-retrieval -> design-study ──> write-proto
|
|
|
452
454
|
| **search-lit** | PubMed + Semantic Scholar + bioRxiv search with anti-hallucination citation verification. Token-efficient error handling -- CrossRef failures are silently batched, not repeated. BibTeX output tags each entry with `verified`/`verified_by`/`verified_on` fields so downstream skills can trust the citation provenance. |
|
|
453
455
|
| **verify-refs** | Pre-submission reference audit for `.md`, `.docx`, `.bib`, or `.tsv` inputs. Extracts references, verifies DOI/PMID via CrossRef/PubMed when available, and writes `qc/reference_audit.json` as the sole output — row-level status (OK / MISMATCH / UNVERIFIED / FABRICATED) lives inside the JSON `records[]` block. `/search-lit` produces candidate BibTeX; `/lit-sync` owns `manuscript/_src/refs.bib`. |
|
|
454
456
|
| **fulltext-retrieval** | Batch open-access PDF downloader. Unpaywall → PMC → OpenAlex → CrossRef pipeline. OA-only -- no paywall bypass. Input: DOI list or TSV. Optional PDF→Markdown conversion via [pymupdf4llm](https://pymupdf.readthedocs.io/en/latest/pymupdf4llm/) for token-efficient LLM analysis of academic papers. |
|
|
455
|
-
| **check-reporting** | Manuscript compliance audit against
|
|
457
|
+
| **check-reporting** | Manuscript compliance audit against 44 reporting guidelines and risk of bias tools (STROBE, STROBE-MR, RECORD, STARD, STARD-AI, TRIPOD, TRIPOD+AI, TRIPOD-LLM, PGS-RS, CHEERS 2022, CROSS, SRQR, COREQ, PRISMA, PRISMA-DTA, PRISMA-P, PRISMA-ScR, MOOSE, ARRIVE, CONSORT, CONSORT-AI, CARE, SPIRIT, SPIRIT-AI, CLAIM, DECIDE-AI, SQUIRE 2.0, CLEAR, GRRAS, MI-CLEAR-LLM, SWiM, AMSTAR 2, QUADAS-2, QUADAS-C, RoB 2, ROBINS-I, ROBINS-E, ROBIS, ROB-ME, PROBAST, PROBAST+AI, NOS, COSMIN, RoB NMA). Machine-readable JSON summary with `compliance_pct` and `fixable_by_ai` flags for automated pipeline integration. |
|
|
456
458
|
| **analyze-stats** | Statistical analysis code generation (Python/R) for diagnostic accuracy, DTA meta-analysis (bivariate/HSROC), inter-rater agreement, survival analysis, demographics tables, regression (logistic/linear), propensity score (matching/IPTW/overlap weighting), and repeated measures (RM ANOVA/GEE/mixed models). Calibration mandatory for prediction models. |
|
|
457
459
|
| **meta-analysis** | Full systematic review and meta-analysis pipeline (8 phases). DTA (bivariate/HSROC) and intervention meta-analysis. Protocol to submission-ready manuscript with PRISMA-DTA compliance. |
|
|
458
460
|
| **make-figures** | Publication-ready figures and visual abstracts: ROC curves, forest plots, PRISMA/CONSORT/STARD flow diagrams, Kaplan-Meier curves, Bland-Altman plots, confusion matrices, and journal-specific visual/graphical abstracts (python-pptx template-based). Communication-first design principles (Nat Hum Behav 2026 — key message, audience, cognitive load, figure-vs-table decision) and five flow-diagram production lessons (official-template fidelity, VML fallback PDF export, docx XML escape, sequential placeholder mapping, version freeze); critic rubric Section G adds 5 communication-first checks. `--study-type` auto-generates the full required figure set; structured `_figure_manifest.md` output for downstream pipeline consumption; D2 enforced as default for flow diagrams. |
|
|
459
461
|
| **design-study** | Study design review: identifies analysis unit, cohort logic, data leakage risks, comparator design, validation strategy, and reporting guideline fit. |
|
|
460
462
|
| **design-ai-benchmarking** | Design and validity review for benchmarking AI system(s) against a human-expert panel: evaluation-question and arm definition, decoupled multi-dimensional rubrics with anchors, planted calibration probes (positive-control / known-bad / instability / mechanism-contradiction), reviewer-panel construction with per-reviewer randomization, inter-rater reliability targets with separate control-item reliability, LLM-as-judge vs human-as-judge adjudication, construct-independence guards, and a structured JSON rating-export schema. Locks the rubric before data collection. |
|
|
461
463
|
| **model-validation** | Design or audit the clinical-validation study for an engineer-built medical-imaging model (segmentation / classification / detection): patient-level split disjointness and the data-leakage taxonomy, tuning-on-test, internal vs genuine external validation, comparator design, single-run vs multi-seed variance, task-correct metric selection (Metrics Reloaded), test-set sizing, and CLAIM 2024 / TRIPOD+AI / STARD-AI reporting fit. Ships a deterministic split-leakage gate that proves patient disjointness by set arithmetic on the emitted split table. Integrates with MONAI / nnU-Net — does not replace them. |
|
|
462
|
-
| **model-scaffold** | Generate a reproducible, runnable PyTorch training repo for a medical-imaging task — segmentation (U-Net), classification, detection, image-to-image synthesis, or self-supervised pretraining — the missing middle link between choosing an architecture and validating a trained model. Emits a patient-level seed-locked split as an auditable artifact, a task-appropriate model, train/evaluate scripts that seed every RNG and infer under eval mode, a config, requirements, a reproducibility record, and a Methods stub with VERIFY placeholders (no fabricated numbers). Reproducibility holds by construction; ships a `check_training_hygiene` AST gate + a network-free build→validate challenge.
|
|
464
|
+
| **model-scaffold** | Generate a reproducible, runnable PyTorch training repo for a medical-imaging task — segmentation (U-Net), classification, detection, image-to-image synthesis, or self-supervised pretraining — the missing middle link between choosing an architecture and validating a trained model. Emits a patient-level seed-locked split as an auditable artifact, a task-appropriate model, train/evaluate scripts that seed every RNG and infer under eval mode, a config, requirements, a reproducibility record, and a Methods stub with VERIFY placeholders (no fabricated numbers). Reproducibility holds by construction; ships a `check_training_hygiene` AST gate + a network-free build→validate challenge. Emits a minimal runnable default model for a forward-pass smoke test, and integrates with MONAI / nnU-Net / TorchIO / timm / torchvision for production-grade models. |
|
|
463
465
|
| **architecture-zoo** | "Which architecture for which research question" decision tool: maps task (classification / segmentation / detection / transfer), modality, data scale, and class imbalance to a paper-grounded architecture shortlist. Curates the foundational curriculum (ResNet / DenseNet / EfficientNet / ViT / Swin; U-Net / 3-D U-Net / Attention & Residual U-Net / nnU-Net / Mask R-CNN; SAM/MedSAM / TotalSegmentator / BiomedCLIP / DINO / MAE / SimCLR) — each with core idea, when-to-use, medical-imaging use, reference implementation, validation setup, and the matching model-scaffold template. Advisory; teaches archetypes, not a live SOTA leaderboard. |
|
|
464
466
|
| **model-card** | Generate the documentation an engineer-built medical-imaging model must carry — a Model Card (Mitchell et al. 2019), a Datasheet for its dataset (Gebru et al. 2021), and a METRIC-informed data-quality pass — filled from user-supplied facts (never fabricated), then verify every required section is present and non-empty with a deterministic completeness gate (`check_model_card_complete`). Model Card / Datasheet are documentation standards vendored as templates, not counted reporting checklists. |
|
|
465
467
|
| **model-evaluation** | Compute and report task-correct held-out metrics for a trained medical-imaging model — segmentation (Dice + a boundary metric HD95/NSD, per structure), classification (AUROC + AUPRC + sensitivity/specificity with bootstrap CIs at the deployment prevalence), or detection (FROC/mAP with a stated IoU criterion) — plus calibration and subgroup slices. Emits a per-case table for analyze-stats and gates the metric choice against Metrics Reloaded / CLAIM 2024 (`check_metric_reporting`). Numbers come only from executed code. |
|
|
@@ -621,8 +623,8 @@ Projects declare their source-of-truth layout in `SSOT.yaml`, and a `qc/migratio
|
|
|
621
623
|
### Meta-Analysis Failure Modes
|
|
622
624
|
`/meta-analysis` ships empirical failure-mode references (data integrity, review orchestration, submission package drift, post-submission release ops) with four automation hooks: `scripts/prisma_5way_consistency.py` (DI-6 PRISMA number consistency), `scripts/extraction_consensus_log_init.py` (DI-1 dual-extraction scaffold), `scripts/tag_cleanup_gate.sh` (DI-8 placeholder tag gate), and `scripts/verify_package_integrity.py` (SPD SHA-256 manifest for submission bundles).
|
|
623
625
|
|
|
624
|
-
###
|
|
625
|
-
`check-reporting` includes bundled checklists for
|
|
626
|
+
### 44 Reporting Guidelines & RoB Tools Built-in
|
|
627
|
+
`check-reporting` includes bundled checklists for 44 guidelines and risk-of-bias tools: STROBE, STROBE-MR, RECORD, STARD, STARD-AI, TRIPOD, TRIPOD+AI, TRIPOD-LLM, PGS-RS, CHEERS 2022, CROSS, SRQR, COREQ, PRISMA 2020, PRISMA-DTA, PRISMA-P, PRISMA-ScR, MOOSE, ARRIVE, CONSORT, CONSORT-AI, CARE, SPIRIT, SPIRIT-AI, CLAIM, DECIDE-AI, SQUIRE 2.0, CLEAR, GRRAS, MI-CLEAR-LLM, SWiM, AMSTAR 2, QUADAS-2, QUADAS-C, RoB 2, ROBINS-I, ROBINS-E, ROBIS, ROB-ME, PROBAST, PROBAST+AI, NOS, COSMIN, RoB NMA. Includes Results/Discussion section boundary checks and machine-readable JSON summary for pipeline integration.
|
|
626
628
|
|
|
627
629
|
### Publication-Ready Output
|
|
628
630
|
`analyze-stats` generates reproducible Python/R code for 13 analysis types -- including regression, propensity score, and repeated measures -- with mandatory calibration for prediction models. `make-figures` produces journal-specification figures (300 DPI, colorblind-safe palettes, proper dimensions), visual/graphical abstracts, and a tool selection guide (D2 for flow diagrams, matplotlib for data plots). `--study-type` auto-generates the complete figure set for each study design.
|
package/installers/install.py
CHANGED
|
@@ -167,10 +167,23 @@ def run_self_test() -> int:
|
|
|
167
167
|
return 0
|
|
168
168
|
|
|
169
169
|
|
|
170
|
+
LOG_DIR = REPO_ROOT / "installers" / ".logs"
|
|
171
|
+
LOG_KEEP = 10 # retain the most recent N install logs; prune older
|
|
172
|
+
|
|
173
|
+
|
|
170
174
|
def write_log(log_lines: list[str]) -> Path:
|
|
175
|
+
"""Write the timestamped install log to installers/.logs/ (gitignored) and keep only
|
|
176
|
+
the most recent LOG_KEEP — logs used to accumulate in the repo root."""
|
|
177
|
+
LOG_DIR.mkdir(parents=True, exist_ok=True)
|
|
171
178
|
stamp = dt.datetime.now().strftime("%Y%m%d-%H%M%S")
|
|
172
|
-
log_path =
|
|
179
|
+
log_path = LOG_DIR / f"{stamp}-{LOG_NAME}"
|
|
173
180
|
log_path.write_text("\n".join(log_lines) + "\n", encoding="utf-8")
|
|
181
|
+
old = sorted(LOG_DIR.glob(f"*-{LOG_NAME}"))
|
|
182
|
+
for stale in old[:-LOG_KEEP]:
|
|
183
|
+
try:
|
|
184
|
+
stale.unlink()
|
|
185
|
+
except OSError:
|
|
186
|
+
pass
|
|
174
187
|
return log_path
|
|
175
188
|
|
|
176
189
|
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"path": "installers/install.py",
|
|
26
|
-
"size":
|
|
27
|
-
"sha256": "
|
|
26
|
+
"size": 14720,
|
|
27
|
+
"sha256": "b22e5d5be62ba1f71a81ad3214aed2cbfefbf97fd52179b21a8452a11ae95fcf"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"path": "installers/medsci_txn.py",
|
|
@@ -153,8 +153,8 @@
|
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
"path": "skills/analyze-stats/SKILL.md",
|
|
156
|
-
"size":
|
|
157
|
-
"sha256": "
|
|
156
|
+
"size": 55302,
|
|
157
|
+
"sha256": "3809b6a55e8a79b7dc48f617e3be0a7faf2a96a6f0ba03d58977a39f267cce81"
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
"path": "skills/analyze-stats/references/analysis_guides/health_economic_evaluation.md",
|
|
@@ -513,8 +513,8 @@
|
|
|
513
513
|
},
|
|
514
514
|
{
|
|
515
515
|
"path": "skills/calc-sample-size/SKILL.md",
|
|
516
|
-
"size":
|
|
517
|
-
"sha256": "
|
|
516
|
+
"size": 23904,
|
|
517
|
+
"sha256": "0bed1ee5d43f044a490d77fac181900f9e513dfd379831d0446b118b4768b798"
|
|
518
518
|
},
|
|
519
519
|
{
|
|
520
520
|
"path": "skills/calc-sample-size/references/formulas.md",
|
|
@@ -531,6 +531,11 @@
|
|
|
531
531
|
"size": 2142,
|
|
532
532
|
"sha256": "97062f5aa63ce8f5b5e340e6b65683720b3ce1d94e34d201977d9a2601293038"
|
|
533
533
|
},
|
|
534
|
+
{
|
|
535
|
+
"path": "skills/calc-sample-size/references/prediction_model_sample_size.md",
|
|
536
|
+
"size": 5074,
|
|
537
|
+
"sha256": "bf3d42ad59d2a3b3abc2f00db9559de671514b7b64bd4cf44ec53717966dc635"
|
|
538
|
+
},
|
|
534
539
|
{
|
|
535
540
|
"path": "skills/calc-sample-size/skill.yml",
|
|
536
541
|
"size": 2958,
|
|
@@ -538,8 +543,8 @@
|
|
|
538
543
|
},
|
|
539
544
|
{
|
|
540
545
|
"path": "skills/check-reporting/SKILL.md",
|
|
541
|
-
"size":
|
|
542
|
-
"sha256": "
|
|
546
|
+
"size": 39223,
|
|
547
|
+
"sha256": "2dec1d994bb37fb6091f755ab51b2f890eca2b3299e18ca247ae3c7e45be86bb"
|
|
543
548
|
},
|
|
544
549
|
{
|
|
545
550
|
"path": "skills/check-reporting/references/LICENSES.md",
|
|
@@ -596,6 +601,11 @@
|
|
|
596
601
|
"size": 4376,
|
|
597
602
|
"sha256": "e923b3d2f550351f952334053978d5f0ca726ddb4798f3c1e4adba36939bd662"
|
|
598
603
|
},
|
|
604
|
+
{
|
|
605
|
+
"path": "skills/check-reporting/references/checklists/COREQ.md",
|
|
606
|
+
"size": 6809,
|
|
607
|
+
"sha256": "9a8c10db7fa2859ab4d9b26e01a4a15b134e6b5f76c338911a5be118d41e8f98"
|
|
608
|
+
},
|
|
599
609
|
{
|
|
600
610
|
"path": "skills/check-reporting/references/checklists/COSMIN_RoB.md",
|
|
601
611
|
"size": 5535,
|
|
@@ -726,6 +736,11 @@
|
|
|
726
736
|
"size": 5730,
|
|
727
737
|
"sha256": "d145e612c8fb7a182d8212257790f2599cd218810a57ae97c0c6309cd6c4f613"
|
|
728
738
|
},
|
|
739
|
+
{
|
|
740
|
+
"path": "skills/check-reporting/references/checklists/SRQR.md",
|
|
741
|
+
"size": 6930,
|
|
742
|
+
"sha256": "27ecdb3835e122566b113dc9afc1de6d1a988820f45dabc34a9d56f4658016fd"
|
|
743
|
+
},
|
|
729
744
|
{
|
|
730
745
|
"path": "skills/check-reporting/references/checklists/STARD.md",
|
|
731
746
|
"size": 6440,
|
|
@@ -788,8 +803,8 @@
|
|
|
788
803
|
},
|
|
789
804
|
{
|
|
790
805
|
"path": "skills/check-reporting/scripts/check_checklist_exists.py",
|
|
791
|
-
"size":
|
|
792
|
-
"sha256": "
|
|
806
|
+
"size": 6886,
|
|
807
|
+
"sha256": "c2ffe9761b4580e43a9ea7889b124a6591a6687c3cf939bc3ae1aad051e3040c"
|
|
793
808
|
},
|
|
794
809
|
{
|
|
795
810
|
"path": "skills/check-reporting/scripts/check_checklist_version.py",
|
|
@@ -798,8 +813,8 @@
|
|
|
798
813
|
},
|
|
799
814
|
{
|
|
800
815
|
"path": "skills/check-reporting/scripts/check_framework_naming.py",
|
|
801
|
-
"size":
|
|
802
|
-
"sha256": "
|
|
816
|
+
"size": 8455,
|
|
817
|
+
"sha256": "bd44ffb3f55d6539f972cd4bf50f1d9301e865da41e05c8d279776e94fb6d3d7"
|
|
803
818
|
},
|
|
804
819
|
{
|
|
805
820
|
"path": "skills/check-reporting/scripts/check_prisma_figure.py",
|
|
@@ -993,13 +1008,58 @@
|
|
|
993
1008
|
},
|
|
994
1009
|
{
|
|
995
1010
|
"path": "skills/design-study/SKILL.md",
|
|
996
|
-
"size":
|
|
997
|
-
"sha256": "
|
|
1011
|
+
"size": 19220,
|
|
1012
|
+
"sha256": "d4a05f6dd2530620bd1ec3e1c64ba0625aae25def12892247e61a77724132cd6"
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"path": "skills/design-study/references/dag_adjustment.md",
|
|
1016
|
+
"size": 4390,
|
|
1017
|
+
"sha256": "8b6c9d2b2d4e79652b355cf30f0d56f4232619cad8589489707107f85bef9de3"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"path": "skills/design-study/references/target_trial_emulation.md",
|
|
1021
|
+
"size": 6025,
|
|
1022
|
+
"sha256": "3f3b8aa8256689a2109e06b0eaa92f0e793869838711c19f0b2d9e9e01dcb0ff"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"path": "skills/design-study/scripts/adjustment_set_challenge/fixture/confounder.json",
|
|
1026
|
+
"size": 111,
|
|
1027
|
+
"sha256": "3d1c43f40a41e91f674cca1d47fd9bb8566e9d74f9ebb18aa097a41fbf0b11ff"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"path": "skills/design-study/scripts/adjustment_set_challenge/fixture/instrument.json",
|
|
1031
|
+
"size": 199,
|
|
1032
|
+
"sha256": "5a99731963404b122cb3e233cc5c850885fe42cc49c9b1cfbac0206ea936703b"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"path": "skills/design-study/scripts/adjustment_set_challenge/fixture/mbias.json",
|
|
1036
|
+
"size": 182,
|
|
1037
|
+
"sha256": "b05f7d537b9a25841172d4325fba858933aedab20718ac78e58547d11f8b6561"
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
"path": "skills/design-study/scripts/adjustment_set_challenge/fixture/mediator.json",
|
|
1041
|
+
"size": 106,
|
|
1042
|
+
"sha256": "9e3fe1ed554a115058e9d7916856eaeca4d666c00741282960320cb87e1cfe91"
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"path": "skills/design-study/scripts/adjustment_set_challenge/problem.md",
|
|
1046
|
+
"size": 2264,
|
|
1047
|
+
"sha256": "79cba6ed5f3259a9e633c88d7a4d6d08994fff5f4f8461482dd86bcd2c7239ab"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"path": "skills/design-study/scripts/adjustment_set_challenge/verify.sh",
|
|
1051
|
+
"size": 2672,
|
|
1052
|
+
"sha256": "87349a1eb69b1c5e1b6120c6e5b1269bc830ef91803e7f09219da2285451bb76"
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
"path": "skills/design-study/scripts/adjustment_set_helper.py",
|
|
1056
|
+
"size": 8231,
|
|
1057
|
+
"sha256": "239948c31d513f95f834fdf2d48e9938f7e585a2ebb12387a5abf3b06305dca0"
|
|
998
1058
|
},
|
|
999
1059
|
{
|
|
1000
1060
|
"path": "skills/design-study/skill.yml",
|
|
1001
|
-
"size":
|
|
1002
|
-
"sha256": "
|
|
1061
|
+
"size": 1411,
|
|
1062
|
+
"sha256": "3981d5da7734b90e6905ac329e996b145af82bd6a28ec2a8d42918e9ce077ee5"
|
|
1003
1063
|
},
|
|
1004
1064
|
{
|
|
1005
1065
|
"path": "skills/fill-icmje-coi/SKILL.md",
|
|
@@ -1943,8 +2003,8 @@
|
|
|
1943
2003
|
},
|
|
1944
2004
|
{
|
|
1945
2005
|
"path": "skills/make-figures/references/exemplar_plots/README.md",
|
|
1946
|
-
"size":
|
|
1947
|
-
"sha256": "
|
|
2006
|
+
"size": 5872,
|
|
2007
|
+
"sha256": "32f93f0c65b2fe353b17dd1345267c85d5646fcf7de7adb9f784be551fc900af"
|
|
1948
2008
|
},
|
|
1949
2009
|
{
|
|
1950
2010
|
"path": "skills/make-figures/references/exemplar_plots/bland_altman.md",
|
|
@@ -2029,7 +2089,7 @@
|
|
|
2029
2089
|
{
|
|
2030
2090
|
"path": "skills/make-figures/references/reporting_guideline_figure_map.md",
|
|
2031
2091
|
"size": 7149,
|
|
2032
|
-
"sha256": "
|
|
2092
|
+
"sha256": "81f2eff4969e055d886976f4c9e26bf20f1946048c2b61563a7c95b7ebec1d86"
|
|
2033
2093
|
},
|
|
2034
2094
|
{
|
|
2035
2095
|
"path": "skills/make-figures/references/visual_abstract_templates/european_radiology.pptx",
|
|
@@ -2106,6 +2166,26 @@
|
|
|
2106
2166
|
"size": 17167,
|
|
2107
2167
|
"sha256": "88c5e0829bb7c6d1fb6d6e1f45e1ce61bccdd91a7ed9a153623e51d8bc30b651"
|
|
2108
2168
|
},
|
|
2169
|
+
{
|
|
2170
|
+
"path": "skills/make-figures/scripts/render_core_figures.py",
|
|
2171
|
+
"size": 14436,
|
|
2172
|
+
"sha256": "35f91147d51dd73b75dc116be9e0a80588fe1daf502966e82468d3c62b12f25d"
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
"path": "skills/make-figures/scripts/render_core_figures_challenge/fixture/synthetic_inputs.json",
|
|
2176
|
+
"size": 1429,
|
|
2177
|
+
"sha256": "24c0944fcb1384f073988d0f6e28b8f375ba4a7eff62fb4e21bc7066726d5ebc"
|
|
2178
|
+
},
|
|
2179
|
+
{
|
|
2180
|
+
"path": "skills/make-figures/scripts/render_core_figures_challenge/problem.md",
|
|
2181
|
+
"size": 2485,
|
|
2182
|
+
"sha256": "a4e62161806d95b637d9ce984541190e5e9e213e2522d1f8740d847ee10c1a30"
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
"path": "skills/make-figures/scripts/render_core_figures_challenge/verify.sh",
|
|
2186
|
+
"size": 1907,
|
|
2187
|
+
"sha256": "7f05fd9cd4e2bfdf6c5b7e8e2a61bee5f8fd44d7d2746e29e2ae77adec84b9c0"
|
|
2188
|
+
},
|
|
2109
2189
|
{
|
|
2110
2190
|
"path": "skills/make-figures/scripts/validate_pptx_mac_compat.py",
|
|
2111
2191
|
"size": 8662,
|
|
@@ -2113,8 +2193,8 @@
|
|
|
2113
2193
|
},
|
|
2114
2194
|
{
|
|
2115
2195
|
"path": "skills/make-figures/skill.yml",
|
|
2116
|
-
"size":
|
|
2117
|
-
"sha256": "
|
|
2196
|
+
"size": 2205,
|
|
2197
|
+
"sha256": "b973c376998b15cefe9bffdf580889f905b60ddc2dead00cc5cbc900a6fd50f5"
|
|
2118
2198
|
},
|
|
2119
2199
|
{
|
|
2120
2200
|
"path": "skills/make-figures/templates/official/NOTES.md",
|
|
@@ -2763,13 +2843,13 @@
|
|
|
2763
2843
|
},
|
|
2764
2844
|
{
|
|
2765
2845
|
"path": "skills/model-validation/SKILL.md",
|
|
2766
|
-
"size":
|
|
2767
|
-
"sha256": "
|
|
2846
|
+
"size": 10836,
|
|
2847
|
+
"sha256": "5cfd4ac6d75b3a474408b10d8eead3fdf7be8a44e1578dcac332cc2203ae75fe"
|
|
2768
2848
|
},
|
|
2769
2849
|
{
|
|
2770
2850
|
"path": "skills/model-validation/references/validation_design.md",
|
|
2771
|
-
"size":
|
|
2772
|
-
"sha256": "
|
|
2851
|
+
"size": 13780,
|
|
2852
|
+
"sha256": "c7ad02c2679b241d94af70c05f22740a6ad75c61c0c70d71ba2e48c4f3d64bf5"
|
|
2773
2853
|
},
|
|
2774
2854
|
{
|
|
2775
2855
|
"path": "skills/model-validation/scripts/check_split_leakage.py",
|
|
@@ -2819,7 +2899,7 @@
|
|
|
2819
2899
|
{
|
|
2820
2900
|
"path": "skills/orchestrate/SKILL.md",
|
|
2821
2901
|
"size": 35203,
|
|
2822
|
-
"sha256": "
|
|
2902
|
+
"sha256": "7197cb70e6f8940653ab9adaad158167111a0478edad8a972e7cc8816ca85123"
|
|
2823
2903
|
},
|
|
2824
2904
|
{
|
|
2825
2905
|
"path": "skills/orchestrate/references/dialogue_nodes.md",
|
|
@@ -2843,8 +2923,8 @@
|
|
|
2843
2923
|
},
|
|
2844
2924
|
{
|
|
2845
2925
|
"path": "skills/peer-review/SKILL.md",
|
|
2846
|
-
"size":
|
|
2847
|
-
"sha256": "
|
|
2926
|
+
"size": 68213,
|
|
2927
|
+
"sha256": "51feccb82dca34a28a0b9ace5467d23ddc654056af2cd9e152a4559cf074cfc3"
|
|
2848
2928
|
},
|
|
2849
2929
|
{
|
|
2850
2930
|
"path": "skills/peer-review/references/aczel_2021_reviewer2_patterns.md",
|
|
@@ -2921,6 +3001,11 @@
|
|
|
2921
3001
|
"size": 9718,
|
|
2922
3002
|
"sha256": "2e383fec4cf2034c62f9e1a419a0ff61e27bc5b3c132f7115b2335bd72472452"
|
|
2923
3003
|
},
|
|
3004
|
+
{
|
|
3005
|
+
"path": "skills/peer-review/references/domain-probes/qualitative_research.md",
|
|
3006
|
+
"size": 7014,
|
|
3007
|
+
"sha256": "fd82024939bbfc7f30f284a85a06712b69a269b89a2c8e3752484fb6fb23ebea"
|
|
3008
|
+
},
|
|
2924
3009
|
{
|
|
2925
3010
|
"path": "skills/peer-review/references/domain-probes/radiomics.md",
|
|
2926
3011
|
"size": 5344,
|
|
@@ -3403,8 +3488,8 @@
|
|
|
3403
3488
|
},
|
|
3404
3489
|
{
|
|
3405
3490
|
"path": "skills/self-review/SKILL.md",
|
|
3406
|
-
"size":
|
|
3407
|
-
"sha256": "
|
|
3491
|
+
"size": 102413,
|
|
3492
|
+
"sha256": "97219c57684d4eaced9e35b0968ca09da7731095c186a4e97757b4039f43f2f6"
|
|
3408
3493
|
},
|
|
3409
3494
|
{
|
|
3410
3495
|
"path": "skills/self-review/references/domain-probes/ai_overclaiming.md",
|
|
@@ -3476,6 +3561,11 @@
|
|
|
3476
3561
|
"size": 9718,
|
|
3477
3562
|
"sha256": "2e383fec4cf2034c62f9e1a419a0ff61e27bc5b3c132f7115b2335bd72472452"
|
|
3478
3563
|
},
|
|
3564
|
+
{
|
|
3565
|
+
"path": "skills/self-review/references/domain-probes/qualitative_research.md",
|
|
3566
|
+
"size": 7014,
|
|
3567
|
+
"sha256": "fd82024939bbfc7f30f284a85a06712b69a269b89a2c8e3752484fb6fb23ebea"
|
|
3568
|
+
},
|
|
3479
3569
|
{
|
|
3480
3570
|
"path": "skills/self-review/references/domain-probes/radiomics.md",
|
|
3481
3571
|
"size": 5344,
|
|
@@ -3553,8 +3643,13 @@
|
|
|
3553
3643
|
},
|
|
3554
3644
|
{
|
|
3555
3645
|
"path": "skills/self-review/references/panel_review_template.md",
|
|
3556
|
-
"size":
|
|
3557
|
-
"sha256": "
|
|
3646
|
+
"size": 15095,
|
|
3647
|
+
"sha256": "f9c084e950602ec88f7465dc953ed2309148cab37a3bef5f1b4c80deca2707a4"
|
|
3648
|
+
},
|
|
3649
|
+
{
|
|
3650
|
+
"path": "skills/self-review/references/phases/confounding_completeness.md",
|
|
3651
|
+
"size": 5344,
|
|
3652
|
+
"sha256": "051f2b066d2d708b161c1e97d666d9e214d128f1413a9c4822f0333e748bda14"
|
|
3558
3653
|
},
|
|
3559
3654
|
{
|
|
3560
3655
|
"path": "skills/self-review/scripts/check_artifact_coverage.py",
|
|
@@ -3573,8 +3668,8 @@
|
|
|
3573
3668
|
},
|
|
3574
3669
|
{
|
|
3575
3670
|
"path": "skills/self-review/scripts/check_claim_artifact.py",
|
|
3576
|
-
"size":
|
|
3577
|
-
"sha256": "
|
|
3671
|
+
"size": 13065,
|
|
3672
|
+
"sha256": "ac29a7e8145152e6641fce8eaf98766cfc943a034db72252cc38538d7ab59db2"
|
|
3578
3673
|
},
|
|
3579
3674
|
{
|
|
3580
3675
|
"path": "skills/self-review/scripts/check_classical_style.py",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "medsci-skills",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.0",
|
|
4
4
|
"description": "MedSci Skills — a medical/scientific research skill suite for AI coding agents (Claude Code, Codex, Cursor, Copilot). The npm package is a terminal-friendly installer shortcut; the canonical distribution remains the GitHub repository and the Claude Code plugin marketplace.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://github.com/Aperivue/medsci-skills#readme",
|
|
@@ -283,9 +283,20 @@ rho = 0.39 between a fasting marker (IQR 0.6 to 3.5 units, SD 3.05) and an index
|
|
|
283
283
|
marker is associated with about 0.8 index units higher on average (monotonic-linear approximation;
|
|
284
284
|
crude, unadjusted)."
|
|
285
285
|
|
|
286
|
-
**Output contract
|
|
287
|
-
|
|
288
|
-
|
|
286
|
+
**Output contract (clinical-utility is a default, not an optional add-on).** Report every
|
|
287
|
+
primary effect in units a clinician acts on, by default — do not leave these as prose to be
|
|
288
|
+
added later:
|
|
289
|
+
- **OR/HR/RR primary outcomes** → report the relative measure **and** the absolute risk at
|
|
290
|
+
a stated baseline + absolute risk difference + **NNT** (or NNH = 1/ARI), baseline risk
|
|
291
|
+
explicit. A relative-only headline is incomplete.
|
|
292
|
+
- **Continuous outcomes** → add the IQR/clinically-anchored "Real-world translation" line
|
|
293
|
+
beneath the effect size.
|
|
294
|
+
- **Prediction / classification (incl. medical-AI) models** → a **decision-curve /
|
|
295
|
+
net-benefit** pass at the relevant threshold is standard output, not just AUC +
|
|
296
|
+
calibration. An incremental claim reports added **net benefit / NRI / IDI over the
|
|
297
|
+
established clinical model**, not the new model's AUC alone. See
|
|
298
|
+
`references/table-standards/table-types/incremental_value.md` and the `make-figures`
|
|
299
|
+
`decision_curve` exemplar (and `render_core_figures.py` for the rendered curve).
|
|
289
300
|
|
|
290
301
|
## Error Handling
|
|
291
302
|
|
|
@@ -20,6 +20,7 @@ Python (alternative), interpret effect sizes clinically, and produce IRB-ready j
|
|
|
20
20
|
|
|
21
21
|
- **Formulas**: `${CLAUDE_SKILL_DIR}/references/formulas.md` -- mathematical formulas, R/Python functions, effect size conventions
|
|
22
22
|
- **Observational cohort precision branch**: `${CLAUDE_SKILL_DIR}/references/observational_cohort.md`
|
|
23
|
+
- **Prediction-model / medical-AI sample size (Riley)**: `${CLAUDE_SKILL_DIR}/references/prediction_model_sample_size.md` -- the current TRIPOD+AI-aligned standard for a clinical prediction/classification model (development via `pmsampsize`, external validation via `pmvalsampsize`, net-benefit precision). Use this instead of EPV-10 whenever the goal is risk prediction for use rather than a single-predictor hypothesis test (Tests 12-13).
|
|
23
24
|
- **Justification prose exemplars**: `${CLAUDE_SKILL_DIR}/references/justification_examples.md` -- reviewer-safe IRB/Methods justification paragraphs per design (proportions, means, DTA precision, survival/log-rank, ICC agreement, non-inferiority), each stating the five required elements; load when producing the justification text
|
|
24
25
|
- **Existing R template**: See `analyze-stats` skill at `references/templates/sample_size.R` for the 7 original tests
|
|
25
26
|
|
|
@@ -49,7 +50,10 @@ What is your primary outcome?
|
|
|
49
50
|
| | +-- NO --> How many groups?
|
|
50
51
|
| | +-- 2 groups, superiority --> [4] Two-proportion comparison (chi-square)
|
|
51
52
|
| | +-- 2 groups, non-inferiority --> [10] Non-inferiority / equivalence
|
|
52
|
-
| | +-- Multivariable model --> [9] Logistic regression
|
|
53
|
+
| | +-- Multivariable model --> single-predictor hypothesis test? --> [9] Logistic regression
|
|
54
|
+
| | --> clinical prediction / AI model for use?
|
|
55
|
+
| | +-- developing the model --> [12] Prediction-model development (Riley)
|
|
56
|
+
| | +-- externally validating --> [13] External-validation (Riley)
|
|
53
57
|
| |
|
|
54
58
|
+-- Continuous (measurement, score)
|
|
55
59
|
| |
|
|
@@ -242,7 +246,10 @@ What is your primary outcome?
|
|
|
242
246
|
**Approach A: Peduzzi Rule of Thumb (EPV >= 10)**
|
|
243
247
|
- N_events = 10 * n_predictors
|
|
244
248
|
- N_total = N_events / event_rate
|
|
245
|
-
- Simple, widely cited, conservative. Use as a minimum baseline
|
|
249
|
+
- Simple, widely cited, conservative. Use as a minimum baseline **for a single-predictor
|
|
250
|
+
hypothesis test only**. For a **clinical prediction / medical-AI model intended for use**,
|
|
251
|
+
EPV-10 is outdated and reviewer-vulnerable — use the Riley criteria in Test 12
|
|
252
|
+
(development) / Test 13 (validation) instead.
|
|
246
253
|
|
|
247
254
|
**Approach B: Hsieh (1989) Formula**
|
|
248
255
|
- Uses the OR of interest for the primary predictor to calculate a more precise sample size.
|
|
@@ -320,6 +327,44 @@ N_adj = N_total / (1 - attrition_rate)
|
|
|
320
327
|
|
|
321
328
|
---
|
|
322
329
|
|
|
330
|
+
### Test 12: Prediction-Model Development (Riley)
|
|
331
|
+
|
|
332
|
+
**When to use**: developing a clinical prediction / classification model (including a
|
|
333
|
+
medical-AI model evaluated as one) — the goal is risk prediction *for use*, not a single
|
|
334
|
+
predictor's hypothesis test. EPV-10 (Tests 9/11) is outdated here.
|
|
335
|
+
|
|
336
|
+
**Approach**: the minimum N is the largest satisfying all four Riley criteria
|
|
337
|
+
simultaneously — global shrinkage ≥ 0.9, apparent–adjusted R² gap ≤ 0.05, precise overall
|
|
338
|
+
risk estimate, and (time-to-event) precise baseline survival. Implemented in R `pmsampsize`.
|
|
339
|
+
|
|
340
|
+
**Required parameters**: number of **candidate predictor parameters** (count dummy/non-linear
|
|
341
|
+
terms), a conservative expected **C-statistic or Cox-Snell R²** (with its literature source),
|
|
342
|
+
and outcome **prevalence** (binary) or **event rate + mean follow-up** (time-to-event).
|
|
343
|
+
|
|
344
|
+
Read `${CLAUDE_SKILL_DIR}/references/prediction_model_sample_size.md` for the criteria, the
|
|
345
|
+
`pmsampsize` code, and the reporting requirements. Report N + required events + the binding
|
|
346
|
+
criterion + the assumed C/R² and its source.
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
### Test 13: External-Validation Sample Size (Riley)
|
|
351
|
+
|
|
352
|
+
**When to use**: sizing an **external validation** of an existing prediction/AI model.
|
|
353
|
+
|
|
354
|
+
**Approach**: size to estimate the key validation metrics *precisely enough to be
|
|
355
|
+
conclusive* — target the CI width of the **C-statistic**, the **calibration slope**, the
|
|
356
|
+
**calibration-in-the-large / O:E ratio**, and (if a utility claim) **net benefit**.
|
|
357
|
+
Implemented in R `pmvalsampsize`. A floor of ≥ 100 events and ≥ 100 non-events applies, but
|
|
358
|
+
the precise target is usually larger.
|
|
359
|
+
|
|
360
|
+
**Required parameters**: expected **prevalence**, anticipated **C-statistic**, and the
|
|
361
|
+
target CI widths.
|
|
362
|
+
|
|
363
|
+
Read `${CLAUDE_SKILL_DIR}/references/prediction_model_sample_size.md` for the `pmvalsampsize`
|
|
364
|
+
code. Report the targeted CI widths and the resulting events / non-events.
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
323
368
|
## Scope Limitations
|
|
324
369
|
|
|
325
370
|
### Supported
|