medsci-skills 4.1.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.
Files changed (702) hide show
  1. package/LICENSE +50 -0
  2. package/README.md +602 -0
  3. package/README_FIRST.md +27 -0
  4. package/bin/medsci-skills.js +159 -0
  5. package/installers/install-macos.command +19 -0
  6. package/installers/install-windows.cmd +26 -0
  7. package/installers/install-windows.ps1 +17 -0
  8. package/installers/install.py +218 -0
  9. package/metadata/skills_catalog.json +452 -0
  10. package/package.json +48 -0
  11. package/skills/academic-aio/SKILL.md +408 -0
  12. package/skills/academic-aio/references/case_studies/kjr_mllm_2025.md +82 -0
  13. package/skills/academic-aio/references/checklists/AIO_GENERAL.md +354 -0
  14. package/skills/academic-aio/references/journal_summarybox_templates.yaml +126 -0
  15. package/skills/academic-aio/references/oac_funding_checklist.yaml +129 -0
  16. package/skills/academic-aio/references/reporting_guideline_mapping.md +39 -0
  17. package/skills/academic-aio/references/schema_markup_templates/CodeRepository.jsonld +32 -0
  18. package/skills/academic-aio/references/schema_markup_templates/Dataset.jsonld +36 -0
  19. package/skills/academic-aio/references/schema_markup_templates/Person.jsonld +30 -0
  20. package/skills/academic-aio/references/schema_markup_templates/README.md +43 -0
  21. package/skills/academic-aio/references/schema_markup_templates/ScholarlyArticle.jsonld +55 -0
  22. package/skills/academic-aio/scripts/batch_metadata_audit.py +169 -0
  23. package/skills/academic-aio/scripts/validate_schema.py +118 -0
  24. package/skills/academic-aio/skill.yml +36 -0
  25. package/skills/academic-aio/templates/aio_audit_checklist.md.j2 +108 -0
  26. package/skills/add-journal/SKILL.md +482 -0
  27. package/skills/add-journal/skill.yml +33 -0
  28. package/skills/analyze-stats/SKILL.md +598 -0
  29. package/skills/analyze-stats/references/analysis_guides/missing_data.md +109 -0
  30. package/skills/analyze-stats/references/analysis_guides/nhis_icd10_mapping.md +247 -0
  31. package/skills/analyze-stats/references/analysis_guides/propensity_score.md +132 -0
  32. package/skills/analyze-stats/references/analysis_guides/regression.md +115 -0
  33. package/skills/analyze-stats/references/analysis_guides/repeated_measures.md +160 -0
  34. package/skills/analyze-stats/references/analysis_guides/survey_weighted.md +366 -0
  35. package/skills/analyze-stats/references/analysis_guides/test_selection.md +86 -0
  36. package/skills/analyze-stats/references/style/figure_style.mplstyle +69 -0
  37. package/skills/analyze-stats/references/style/theme_publication.R +147 -0
  38. package/skills/analyze-stats/references/table-standards/journal-profiles/ajr.yaml +51 -0
  39. package/skills/analyze-stats/references/table-standards/journal-profiles/european_radiology.yaml +55 -0
  40. package/skills/analyze-stats/references/table-standards/journal-profiles/jama.yaml +66 -0
  41. package/skills/analyze-stats/references/table-standards/journal-profiles/lancet.yaml +57 -0
  42. package/skills/analyze-stats/references/table-standards/journal-profiles/nejm.yaml +51 -0
  43. package/skills/analyze-stats/references/table-standards/journal-profiles/radiology.yaml +66 -0
  44. package/skills/analyze-stats/references/table-standards/table-standards.md +287 -0
  45. package/skills/analyze-stats/references/table-standards/table-types/diagnostic_accuracy.md +36 -0
  46. package/skills/analyze-stats/references/table-standards/table-types/meta_analysis.md +58 -0
  47. package/skills/analyze-stats/references/table-standards/table-types/model_comparison.md +36 -0
  48. package/skills/analyze-stats/references/table-standards/table-types/regression_results.md +50 -0
  49. package/skills/analyze-stats/references/table-standards/table-types/table1_demographics.md +51 -0
  50. package/skills/analyze-stats/references/table-standards/tool-comparison.md +79 -0
  51. package/skills/analyze-stats/references/templates/agreement_analysis.py +436 -0
  52. package/skills/analyze-stats/references/templates/dca_plot.R +237 -0
  53. package/skills/analyze-stats/references/templates/diagnostic_accuracy.py +401 -0
  54. package/skills/analyze-stats/references/templates/dta_meta_analysis.R +384 -0
  55. package/skills/analyze-stats/references/templates/forest_plot.py +412 -0
  56. package/skills/analyze-stats/references/templates/likert_summary.py +356 -0
  57. package/skills/analyze-stats/references/templates/meta_analysis.R +365 -0
  58. package/skills/analyze-stats/references/templates/propensity_score.py +478 -0
  59. package/skills/analyze-stats/references/templates/regression.py +425 -0
  60. package/skills/analyze-stats/references/templates/repeated_measures.py +434 -0
  61. package/skills/analyze-stats/references/templates/sample_size.R +382 -0
  62. package/skills/analyze-stats/references/templates/survey_weighted_analysis.py +411 -0
  63. package/skills/analyze-stats/references/templates/survival_analysis.py +325 -0
  64. package/skills/analyze-stats/references/templates/table1_demographics.py +287 -0
  65. package/skills/analyze-stats/scripts/check_generated_code.py +335 -0
  66. package/skills/analyze-stats/skill.yml +38 -0
  67. package/skills/analyze-stats/tests/fixtures/gen_bad.R +16 -0
  68. package/skills/analyze-stats/tests/fixtures/gen_bad.py +24 -0
  69. package/skills/analyze-stats/tests/fixtures/gen_clean.py +21 -0
  70. package/skills/analyze-stats/tests/test_generated_code.sh +59 -0
  71. package/skills/analyze-stats/tests/test_survival_template.sh +53 -0
  72. package/skills/author-strategy/SKILL.md +117 -0
  73. package/skills/author-strategy/analyze_patterns.py +303 -0
  74. package/skills/author-strategy/fetch_pubmed.py +374 -0
  75. package/skills/author-strategy/skill.yml +34 -0
  76. package/skills/batch-cohort/SKILL.md +223 -0
  77. package/skills/batch-cohort/references/base_template_knhanes.R +210 -0
  78. package/skills/batch-cohort/references/batch_template_generator.R +222 -0
  79. package/skills/batch-cohort/references/variable_coding_registry.md +136 -0
  80. package/skills/batch-cohort/skill.yml +35 -0
  81. package/skills/calc-sample-size/SKILL.md +491 -0
  82. package/skills/calc-sample-size/references/formulas.md +655 -0
  83. package/skills/calc-sample-size/references/observational_cohort.md +49 -0
  84. package/skills/calc-sample-size/skill.yml +51 -0
  85. package/skills/check-reporting/SKILL.md +534 -0
  86. package/skills/check-reporting/references/LICENSES.md +41 -0
  87. package/skills/check-reporting/references/checklists/AMSTAR2.md +54 -0
  88. package/skills/check-reporting/references/checklists/ARRIVE_2.md +234 -0
  89. package/skills/check-reporting/references/checklists/CARE.md +102 -0
  90. package/skills/check-reporting/references/checklists/CLAIM_2024.md +128 -0
  91. package/skills/check-reporting/references/checklists/CLEAR.md +113 -0
  92. package/skills/check-reporting/references/checklists/CONSORT.md +86 -0
  93. package/skills/check-reporting/references/checklists/COSMIN_RoB.md +136 -0
  94. package/skills/check-reporting/references/checklists/GRRAS.md +61 -0
  95. package/skills/check-reporting/references/checklists/MI_CLEAR_LLM.md +167 -0
  96. package/skills/check-reporting/references/checklists/MOOSE.md +85 -0
  97. package/skills/check-reporting/references/checklists/NOS.md +88 -0
  98. package/skills/check-reporting/references/checklists/PRISMA_2020.md +135 -0
  99. package/skills/check-reporting/references/checklists/PRISMA_DTA.md +36 -0
  100. package/skills/check-reporting/references/checklists/PRISMA_P.md +56 -0
  101. package/skills/check-reporting/references/checklists/PROBAST.md +75 -0
  102. package/skills/check-reporting/references/checklists/PROBAST_AI.md +130 -0
  103. package/skills/check-reporting/references/checklists/QUADAS2.md +77 -0
  104. package/skills/check-reporting/references/checklists/QUADAS_C.md +131 -0
  105. package/skills/check-reporting/references/checklists/ROBINS_E.md +179 -0
  106. package/skills/check-reporting/references/checklists/ROBINS_I.md +87 -0
  107. package/skills/check-reporting/references/checklists/ROBIS.md +114 -0
  108. package/skills/check-reporting/references/checklists/ROB_ME.md +126 -0
  109. package/skills/check-reporting/references/checklists/RoB2.md +79 -0
  110. package/skills/check-reporting/references/checklists/RoB_NMA.md +96 -0
  111. package/skills/check-reporting/references/checklists/SPIRIT.md +112 -0
  112. package/skills/check-reporting/references/checklists/SQUIRE_2.md +68 -0
  113. package/skills/check-reporting/references/checklists/STARD.md +129 -0
  114. package/skills/check-reporting/references/checklists/STARD_AI.md +211 -0
  115. package/skills/check-reporting/references/checklists/STROBE.md +80 -0
  116. package/skills/check-reporting/references/checklists/SWiM.md +33 -0
  117. package/skills/check-reporting/references/checklists/TRIPOD.md +157 -0
  118. package/skills/check-reporting/references/checklists/TRIPOD_AI.md +140 -0
  119. package/skills/check-reporting/references/step4c_registration_timing.md +93 -0
  120. package/skills/check-reporting/references/step4d_prisma_figure_audit.md +137 -0
  121. package/skills/check-reporting/scripts/check_checklist_exists.py +183 -0
  122. package/skills/check-reporting/scripts/check_checklist_version.py +168 -0
  123. package/skills/check-reporting/scripts/check_framework_naming.py +206 -0
  124. package/skills/check-reporting/scripts/check_prisma_figure.py +209 -0
  125. package/skills/check-reporting/scripts/prisma_cascade_check.py +274 -0
  126. package/skills/check-reporting/skill.yml +41 -0
  127. package/skills/check-reporting/tests/fixtures/framework_bad.md +8 -0
  128. package/skills/check-reporting/tests/fixtures/framework_clean.md +7 -0
  129. package/skills/check-reporting/tests/test_checklist_fail_fast.sh +77 -0
  130. package/skills/check-reporting/tests/test_checklist_version.sh +72 -0
  131. package/skills/check-reporting/tests/test_framework_naming.sh +45 -0
  132. package/skills/check-reporting/tests/test_prisma_cascade.sh +104 -0
  133. package/skills/clean-data/SKILL.md +180 -0
  134. package/skills/clean-data/references/cleaning_patterns.md +299 -0
  135. package/skills/clean-data/references/profiling_template.py +304 -0
  136. package/skills/clean-data/scripts/check_structural_zero.py +174 -0
  137. package/skills/clean-data/skill.yml +35 -0
  138. package/skills/clean-data/tests/fixtures/smoking.csv +8 -0
  139. package/skills/clean-data/tests/test_structural_zero.sh +49 -0
  140. package/skills/cross-national/SKILL.md +264 -0
  141. package/skills/cross-national/skill.yml +37 -0
  142. package/skills/define-variables/SKILL.md +146 -0
  143. package/skills/define-variables/references/common_definitions.md +190 -0
  144. package/skills/define-variables/skill.yml +34 -0
  145. package/skills/define-variables/templates/variable_operationalization.md +64 -0
  146. package/skills/deidentify/SKILL.md +203 -0
  147. package/skills/deidentify/deidentify.py +1224 -0
  148. package/skills/deidentify/locales/_template.json +45 -0
  149. package/skills/deidentify/locales/au.json +43 -0
  150. package/skills/deidentify/locales/ca.json +44 -0
  151. package/skills/deidentify/locales/cn.json +47 -0
  152. package/skills/deidentify/locales/de.json +48 -0
  153. package/skills/deidentify/locales/fr.json +48 -0
  154. package/skills/deidentify/locales/in.json +48 -0
  155. package/skills/deidentify/locales/jp.json +48 -0
  156. package/skills/deidentify/locales/kr.json +48 -0
  157. package/skills/deidentify/locales/uk.json +45 -0
  158. package/skills/deidentify/locales/us.json +43 -0
  159. package/skills/deidentify/references/date_shift_guide.md +82 -0
  160. package/skills/deidentify/references/hipaa_18_identifiers.md +48 -0
  161. package/skills/deidentify/references/korean_phi_patterns.md +135 -0
  162. package/skills/deidentify/skill.yml +43 -0
  163. package/skills/deidentify/tests/README.md +26 -0
  164. package/skills/deidentify/tests/test_clean.csv +16 -0
  165. package/skills/deidentify/tests/test_edge_cases.csv +11 -0
  166. package/skills/deidentify/tests/test_phi_korean.csv +11 -0
  167. package/skills/design-ai-benchmarking/SKILL.md +214 -0
  168. package/skills/design-ai-benchmarking/references/benchmark_export_schema.json +69 -0
  169. package/skills/design-ai-benchmarking/references/elicitation_rubric_template.md +37 -0
  170. package/skills/design-ai-benchmarking/skill.yml +38 -0
  171. package/skills/design-study/SKILL.md +298 -0
  172. package/skills/design-study/skill.yml +33 -0
  173. package/skills/fill-icmje-coi/SKILL.md +216 -0
  174. package/skills/fill-icmje-coi/scripts/fill_icmje_coi.py +140 -0
  175. package/skills/fill-icmje-coi/skill.yml +35 -0
  176. package/skills/fill-icmje-coi/templates/icmje_coi_seed_synthetic.docx +0 -0
  177. package/skills/fill-protocol/SKILL.md +248 -0
  178. package/skills/fill-protocol/examples/example_irb_template.yaml +53 -0
  179. package/skills/fill-protocol/references/best_practices.md +121 -0
  180. package/skills/fill-protocol/scripts/doc_to_docx.py +111 -0
  181. package/skills/fill-protocol/scripts/fill_form.py +611 -0
  182. package/skills/fill-protocol/scripts/inspect_template.py +61 -0
  183. package/skills/fill-protocol/setup.sh +162 -0
  184. package/skills/fill-protocol/skill.yml +37 -0
  185. package/skills/find-cohort-gap/SKILL.md +309 -0
  186. package/skills/find-cohort-gap/references/cohort_profile_template.md +93 -0
  187. package/skills/find-cohort-gap/references/onepager_template.md +84 -0
  188. package/skills/find-cohort-gap/references/pattern_scoring_rubric.md +169 -0
  189. package/skills/find-cohort-gap/references/saturation_query_templates.md +143 -0
  190. package/skills/find-cohort-gap/skill.yml +35 -0
  191. package/skills/find-journal/POLICY.md +87 -0
  192. package/skills/find-journal/SKILL.md +340 -0
  193. package/skills/find-journal/references/journal_profiles/AJNR.md +29 -0
  194. package/skills/find-journal/references/journal_profiles/AJR.md +30 -0
  195. package/skills/find-journal/references/journal_profiles/Abdominal_Radiology.md +30 -0
  196. package/skills/find-journal/references/journal_profiles/Academic_Radiology.md +30 -0
  197. package/skills/find-journal/references/journal_profiles/Annals_of_Internal_Medicine.md +33 -0
  198. package/skills/find-journal/references/journal_profiles/Artificial_Intelligence_in_Medicine.md +28 -0
  199. package/skills/find-journal/references/journal_profiles/BMC_Medicine.md +31 -0
  200. package/skills/find-journal/references/journal_profiles/British_Journal_of_Radiology.md +39 -0
  201. package/skills/find-journal/references/journal_profiles/CVIR.md +30 -0
  202. package/skills/find-journal/references/journal_profiles/Chest.md +39 -0
  203. package/skills/find-journal/references/journal_profiles/Clinical_Radiology.md +30 -0
  204. package/skills/find-journal/references/journal_profiles/Clinical_and_Molecular_Hepatology.md +32 -0
  205. package/skills/find-journal/references/journal_profiles/Diabetes_Metabolism_Journal.md +36 -0
  206. package/skills/find-journal/references/journal_profiles/Diagnostic_and_Interventional_Radiology.md +32 -0
  207. package/skills/find-journal/references/journal_profiles/Endocrinology_and_Metabolism.md +37 -0
  208. package/skills/find-journal/references/journal_profiles/European_Journal_of_Preventive_Cardiology.md +39 -0
  209. package/skills/find-journal/references/journal_profiles/European_Radiology.md +29 -0
  210. package/skills/find-journal/references/journal_profiles/Hepatology_Communications.md +40 -0
  211. package/skills/find-journal/references/journal_profiles/Hepatology_International.md +37 -0
  212. package/skills/find-journal/references/journal_profiles/IEEE_JBHI.md +28 -0
  213. package/skills/find-journal/references/journal_profiles/IEEE_TMI.md +28 -0
  214. package/skills/find-journal/references/journal_profiles/INSI.md +29 -0
  215. package/skills/find-journal/references/journal_profiles/Investigative_Radiology.md +25 -0
  216. package/skills/find-journal/references/journal_profiles/JACC_Advances.md +41 -0
  217. package/skills/find-journal/references/journal_profiles/JACC_Asia.md +30 -0
  218. package/skills/find-journal/references/journal_profiles/JACR.md +28 -0
  219. package/skills/find-journal/references/journal_profiles/JAMA.md +40 -0
  220. package/skills/find-journal/references/journal_profiles/JAMA_Network_Open.md +30 -0
  221. package/skills/find-journal/references/journal_profiles/JCSM.md +39 -0
  222. package/skills/find-journal/references/journal_profiles/JKMS.md +32 -0
  223. package/skills/find-journal/references/journal_profiles/JMIR.md +29 -0
  224. package/skills/find-journal/references/journal_profiles/JMIR_Medical_Education.md +29 -0
  225. package/skills/find-journal/references/journal_profiles/JNIS.md +35 -0
  226. package/skills/find-journal/references/journal_profiles/JVIR.md +31 -0
  227. package/skills/find-journal/references/journal_profiles/Journal_of_Biomedical_Informatics.md +29 -0
  228. package/skills/find-journal/references/journal_profiles/Journal_of_Clinical_Endocrinology_and_Metabolism.md +40 -0
  229. package/skills/find-journal/references/journal_profiles/Journal_of_Magnetic_Resonance_Imaging.md +30 -0
  230. package/skills/find-journal/references/journal_profiles/Journal_of_Nuclear_Medicine.md +31 -0
  231. package/skills/find-journal/references/journal_profiles/Journal_of_Stroke.md +32 -0
  232. package/skills/find-journal/references/journal_profiles/KJR.md +38 -0
  233. package/skills/find-journal/references/journal_profiles/Korean_Circulation_Journal.md +38 -0
  234. package/skills/find-journal/references/journal_profiles/Korean_Journal_of_Internal_Medicine.md +36 -0
  235. package/skills/find-journal/references/journal_profiles/Lancet_Diabetes_and_Endocrinology.md +40 -0
  236. package/skills/find-journal/references/journal_profiles/Lancet_Gastroenterology_and_Hepatology.md +49 -0
  237. package/skills/find-journal/references/journal_profiles/Lancet_Infectious_Diseases.md +38 -0
  238. package/skills/find-journal/references/journal_profiles/Lancet_Neurology.md +39 -0
  239. package/skills/find-journal/references/journal_profiles/Lancet_Oncology.md +40 -0
  240. package/skills/find-journal/references/journal_profiles/Lancet_Psychiatry.md +38 -0
  241. package/skills/find-journal/references/journal_profiles/Lancet_Public_Health.md +30 -0
  242. package/skills/find-journal/references/journal_profiles/Lancet_Respiratory_Medicine.md +39 -0
  243. package/skills/find-journal/references/journal_profiles/Liver_International.md +33 -0
  244. package/skills/find-journal/references/journal_profiles/Medical_Image_Analysis.md +28 -0
  245. package/skills/find-journal/references/journal_profiles/NEJM.md +33 -0
  246. package/skills/find-journal/references/journal_profiles/Nature_Machine_Intelligence.md +31 -0
  247. package/skills/find-journal/references/journal_profiles/Nature_Medicine.md +39 -0
  248. package/skills/find-journal/references/journal_profiles/Neuroradiology.md +31 -0
  249. package/skills/find-journal/references/journal_profiles/Nutrition_Metabolism_and_Cardiovascular_Diseases.md +39 -0
  250. package/skills/find-journal/references/journal_profiles/PLOS_Medicine.md +32 -0
  251. package/skills/find-journal/references/journal_profiles/RYAI.md +28 -0
  252. package/skills/find-journal/references/journal_profiles/Radiology.md +29 -0
  253. package/skills/find-journal/references/journal_profiles/Skeletal_Radiology.md +31 -0
  254. package/skills/find-journal/references/journal_profiles/Stroke.md +37 -0
  255. package/skills/find-journal/references/journal_profiles/The_BMJ.md +31 -0
  256. package/skills/find-journal/references/journal_profiles/The_Lancet.md +31 -0
  257. package/skills/find-journal/references/journal_profiles/The_Lancet_Digital_Health.md +29 -0
  258. package/skills/find-journal/references/journal_profiles/World_Journal_of_Hepatology.md +53 -0
  259. package/skills/find-journal/references/journal_profiles/npj_Digital_Medicine.md +29 -0
  260. package/skills/find-journal/skill.yml +34 -0
  261. package/skills/fulltext-retrieval/SKILL.md +174 -0
  262. package/skills/fulltext-retrieval/fetch_oa.py +433 -0
  263. package/skills/fulltext-retrieval/pdf_to_md.py +160 -0
  264. package/skills/fulltext-retrieval/skill.yml +41 -0
  265. package/skills/generate-codebook/SKILL.md +155 -0
  266. package/skills/generate-codebook/references/codebook_schema.md +76 -0
  267. package/skills/generate-codebook/scripts/generate_codebook.py +278 -0
  268. package/skills/generate-codebook/skill.yml +35 -0
  269. package/skills/generate-codebook/tests/test_generate_codebook.sh +76 -0
  270. package/skills/grant-builder/SKILL.md +251 -0
  271. package/skills/grant-builder/skill.yml +34 -0
  272. package/skills/humanize/SKILL.md +251 -0
  273. package/skills/humanize/references/ai_patterns.md +571 -0
  274. package/skills/humanize/skill.yml +33 -0
  275. package/skills/intake-project/SKILL.md +264 -0
  276. package/skills/intake-project/skill.yml +34 -0
  277. package/skills/lit-sync/SKILL.md +448 -0
  278. package/skills/lit-sync/references/locale/ko/note_templates.md +110 -0
  279. package/skills/lit-sync/skill.yml +52 -0
  280. package/skills/lit-sync/tests/test_poll_logic.sh +92 -0
  281. package/skills/ma-scout/SKILL.md +640 -0
  282. package/skills/ma-scout/references/project_readme_template.md +95 -0
  283. package/skills/ma-scout/references/project_readme_template_ko.md +82 -0
  284. package/skills/ma-scout/skill.yml +33 -0
  285. package/skills/make-figures/SKILL.md +957 -0
  286. package/skills/make-figures/references/critic_rubrics/data_plot.md +166 -0
  287. package/skills/make-figures/references/critic_rubrics/flow_diagram.md +169 -0
  288. package/skills/make-figures/references/design_principles.md +181 -0
  289. package/skills/make-figures/references/exemplar_diagrams/README.md +65 -0
  290. package/skills/make-figures/references/exemplar_diagrams/consort/README.md +15 -0
  291. package/skills/make-figures/references/exemplar_diagrams/consort/template_input.yaml +37 -0
  292. package/skills/make-figures/references/exemplar_diagrams/consort/template_output.pdf +0 -0
  293. package/skills/make-figures/references/exemplar_diagrams/consort/template_output.png +0 -0
  294. package/skills/make-figures/references/exemplar_diagrams/consort/template_output_600.png +0 -0
  295. package/skills/make-figures/references/exemplar_diagrams/other/other_02.meta.yaml +4 -0
  296. package/skills/make-figures/references/exemplar_diagrams/other/other_02.png +0 -0
  297. package/skills/make-figures/references/exemplar_diagrams/other/other_02_why.md +13 -0
  298. package/skills/make-figures/references/exemplar_diagrams/pipeline/README.md +15 -0
  299. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_01.meta.yaml +4 -0
  300. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_01.png +0 -0
  301. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_01_why.md +13 -0
  302. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_03.meta.yaml +4 -0
  303. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_03.png +0 -0
  304. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_03_why.md +13 -0
  305. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_04.meta.yaml +4 -0
  306. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_04.png +0 -0
  307. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_04_why.md +13 -0
  308. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_05.meta.yaml +4 -0
  309. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_05.png +0 -0
  310. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_05_why.md +13 -0
  311. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_06.meta.yaml +4 -0
  312. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_06.png +0 -0
  313. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_06_why.md +13 -0
  314. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_07.meta.yaml +4 -0
  315. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_07.png +0 -0
  316. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_07_why.md +13 -0
  317. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_08.meta.yaml +4 -0
  318. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_08.png +0 -0
  319. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_08_why.md +13 -0
  320. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_09.meta.yaml +4 -0
  321. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_09.png +0 -0
  322. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_09_why.md +13 -0
  323. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_10.meta.yaml +4 -0
  324. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_10.png +0 -0
  325. package/skills/make-figures/references/exemplar_diagrams/pipeline/pipeline_10_why.md +13 -0
  326. package/skills/make-figures/references/exemplar_diagrams/prisma/README.md +15 -0
  327. package/skills/make-figures/references/exemplar_diagrams/prisma/template_input.yaml +47 -0
  328. package/skills/make-figures/references/exemplar_diagrams/prisma/template_output.pdf +0 -0
  329. package/skills/make-figures/references/exemplar_diagrams/prisma/template_output.png +0 -0
  330. package/skills/make-figures/references/exemplar_diagrams/prisma/template_output_600.png +0 -0
  331. package/skills/make-figures/references/exemplar_diagrams/stard/README.md +15 -0
  332. package/skills/make-figures/references/exemplar_diagrams/stard/template_input.yaml +40 -0
  333. package/skills/make-figures/references/exemplar_diagrams/stard/template_output.pdf +0 -0
  334. package/skills/make-figures/references/exemplar_diagrams/stard/template_output.png +0 -0
  335. package/skills/make-figures/references/exemplar_diagrams/stard/template_output_600.png +0 -0
  336. package/skills/make-figures/references/exemplar_diagrams/strobe/template_input.yaml +43 -0
  337. package/skills/make-figures/references/exemplar_diagrams/strobe/template_input_pptx.yaml +43 -0
  338. package/skills/make-figures/references/exemplar_diagrams/strobe/template_output.pdf +0 -0
  339. package/skills/make-figures/references/exemplar_diagrams/strobe/template_output.png +0 -0
  340. package/skills/make-figures/references/exemplar_diagrams/strobe/template_output.pptx +0 -0
  341. package/skills/make-figures/references/exemplar_diagrams/strobe/template_output_600.png +0 -0
  342. package/skills/make-figures/references/figure_specs.md +291 -0
  343. package/skills/make-figures/references/flow_diagram_lessons.md +164 -0
  344. package/skills/make-figures/references/jacc_central_illustration_principles.md +91 -0
  345. package/skills/make-figures/references/medical_illustration_sources.md +98 -0
  346. package/skills/make-figures/references/pipeline_concepts_medical_ai.md +240 -0
  347. package/skills/make-figures/references/reporting_guideline_figure_map.md +104 -0
  348. package/skills/make-figures/references/visual_abstract_templates/european_radiology.pptx +0 -0
  349. package/skills/make-figures/references/visual_abstract_templates/jacc_central_illustration.pptx +0 -0
  350. package/skills/make-figures/references/visual_abstract_templates/medsci_default.pptx +0 -0
  351. package/skills/make-figures/references/visual_abstract_templates/template_guide.md +114 -0
  352. package/skills/make-figures/scripts/build_jacc_template.py +77 -0
  353. package/skills/make-figures/scripts/build_prisma2020_template.py +371 -0
  354. package/skills/make-figures/scripts/build_strobe_template.py +351 -0
  355. package/skills/make-figures/scripts/critic_figure.py +264 -0
  356. package/skills/make-figures/scripts/derive_figure_legend_counts.py +138 -0
  357. package/skills/make-figures/scripts/extract_exemplar_from_pdf.py +186 -0
  358. package/skills/make-figures/scripts/fetch_official_templates.sh +88 -0
  359. package/skills/make-figures/scripts/fill_prisma_template.py +142 -0
  360. package/skills/make-figures/scripts/generate_flow_diagram.R +133 -0
  361. package/skills/make-figures/scripts/generate_image.py +99 -0
  362. package/skills/make-figures/scripts/generate_visual_abstract.py +438 -0
  363. package/skills/make-figures/scripts/validate_pptx_mac_compat.py +233 -0
  364. package/skills/make-figures/skill.yml +52 -0
  365. package/skills/make-figures/templates/official/NOTES.md +62 -0
  366. package/skills/make-figures/templates/official/consort2010/CONSORT_2025_editable_checklist.docx +0 -0
  367. package/skills/make-figures/templates/official/consort2010/CONSORT_2025_flow_diagram.docx +0 -0
  368. package/skills/make-figures/templates/official/prisma2020/PRISMA_2020_flow_new_v1.pptx +0 -0
  369. package/skills/make-figures/templates/official/prisma2020/PRISMA_2020_flow_new_v2.pptx +0 -0
  370. package/skills/make-figures/templates/official/prisma2020/PRISMA_2020_flow_updated_v2.pptx +0 -0
  371. package/skills/make-figures/templates/official/spirit2013/SPIRIT_2025_editable_checklist.docx +0 -0
  372. package/skills/make-figures/templates/official/spirit2013/SPIRIT_2025_participant_timeline.docx +0 -0
  373. package/skills/make-figures/templates/official/stard2015/STARD_2015_checklist.docx +0 -0
  374. package/skills/make-figures/templates/official/stard2015/STARD_2015_flow_diagram.pdf +0 -0
  375. package/skills/make-figures/tests/fixtures/figure1_flow.yaml +8 -0
  376. package/skills/make-figures/tests/fixtures/manuscript_ok.md +9 -0
  377. package/skills/make-figures/tests/fixtures/manuscript_stale.md +4 -0
  378. package/skills/make-figures/tests/test_legend_reconcile.sh +36 -0
  379. package/skills/manage-project/SKILL.md +358 -0
  380. package/skills/manage-project/references/pre_submission_checklist.md +53 -0
  381. package/skills/manage-project/references/project_state_template.json +37 -0
  382. package/skills/manage-project/references/scaffold_templates.md +118 -0
  383. package/skills/manage-project/references/status_output_format.md +44 -0
  384. package/skills/manage-project/references/timeline_example.md +20 -0
  385. package/skills/manage-project/skill.yml +36 -0
  386. package/skills/manage-project/templates/SSOT.yaml.template +41 -0
  387. package/skills/manage-refs/LICENSE.zotero-mcp +21 -0
  388. package/skills/manage-refs/NOTICE.md +29 -0
  389. package/skills/manage-refs/SKILL.md +289 -0
  390. package/skills/manage-refs/citation_styles/README.md +40 -0
  391. package/skills/manage-refs/citation_styles/american-journal-of-roentgenology.csl +211 -0
  392. package/skills/manage-refs/citation_styles/cardiovascular-and-interventional-radiology.csl +19 -0
  393. package/skills/manage-refs/citation_styles/european-radiology.csl +19 -0
  394. package/skills/manage-refs/citation_styles/journal-of-cachexia-sarcopenia-and-muscle.csl +150 -0
  395. package/skills/manage-refs/citation_styles/journal-of-korean-medical-science-strict.csl +533 -0
  396. package/skills/manage-refs/citation_styles/journal-of-korean-medical-science.csl +16 -0
  397. package/skills/manage-refs/citation_styles/korean-journal-of-radiology.csl +155 -0
  398. package/skills/manage-refs/citation_styles/nature.csl +189 -0
  399. package/skills/manage-refs/citation_styles/nlm-citation-sequence.csl +535 -0
  400. package/skills/manage-refs/citation_styles/radiology.csl +228 -0
  401. package/skills/manage-refs/citation_styles/springer-basic-brackets.csl +187 -0
  402. package/skills/manage-refs/citation_styles/springer-vancouver-brackets.csl +276 -0
  403. package/skills/manage-refs/citation_styles/vancouver-superscript.csl +536 -0
  404. package/skills/manage-refs/citation_styles/vancouver.csl +535 -0
  405. package/skills/manage-refs/references/REFERENCE_STYLE_SPECS.md +59 -0
  406. package/skills/manage-refs/references/check_xref_symptoms.md +35 -0
  407. package/skills/manage-refs/scripts/_vendor_citation_writer.py +600 -0
  408. package/skills/manage-refs/scripts/check_citation_keys.py +112 -0
  409. package/skills/manage-refs/scripts/check_csl_render.py +102 -0
  410. package/skills/manage-refs/scripts/check_xref.py +633 -0
  411. package/skills/manage-refs/scripts/fill_journal_abbrev.py +104 -0
  412. package/skills/manage-refs/scripts/inject_zotero_cwyw.py +133 -0
  413. package/skills/manage-refs/scripts/md_marker_convert.py +193 -0
  414. package/skills/manage-refs/scripts/pre_submission_gate.sh +238 -0
  415. package/skills/manage-refs/scripts/render_pandoc.sh +88 -0
  416. package/skills/manage-refs/skill.yml +70 -0
  417. package/skills/manage-refs/tests/fixtures/pre_submission_gate/README.md +32 -0
  418. package/skills/manage-refs/tests/fixtures/pre_submission_gate/manuscript.md +10 -0
  419. package/skills/manage-refs/tests/fixtures/pre_submission_gate/refs.bib +34 -0
  420. package/skills/manage-refs/tests/fixtures/pre_submission_gate/run.sh +117 -0
  421. package/skills/manage-refs/tests/test_vN_docx_check.sh +145 -0
  422. package/skills/meta-analysis/SKILL.md +739 -0
  423. package/skills/meta-analysis/references/LICENSES.md +21 -0
  424. package/skills/meta-analysis/references/PROSPERO_template.md +221 -0
  425. package/skills/meta-analysis/references/ai_pre_screening_template.py +245 -0
  426. package/skills/meta-analysis/references/checklists/JBI_Case_Series.md +45 -0
  427. package/skills/meta-analysis/references/checklists/NOS.md +88 -0
  428. package/skills/meta-analysis/references/checklists/PRISMA_DTA.md +36 -0
  429. package/skills/meta-analysis/references/checklists/PROBAST.md +75 -0
  430. package/skills/meta-analysis/references/checklists/QUADAS2.md +77 -0
  431. package/skills/meta-analysis/references/checklists/ROBINS_I.md +87 -0
  432. package/skills/meta-analysis/references/checklists/RoB2.md +79 -0
  433. package/skills/meta-analysis/references/data_integrity_checklist.md +57 -0
  434. package/skills/meta-analysis/references/icmje_coi_guide.md +181 -0
  435. package/skills/meta-analysis/references/phase10_recovery.md +136 -0
  436. package/skills/meta-analysis/references/phase4_km_composite.md +58 -0
  437. package/skills/meta-analysis/references/phase6_statistical_synthesis.md +148 -0
  438. package/skills/meta-analysis/references/phase9_circulation.md +84 -0
  439. package/skills/meta-analysis/references/post_submission_release_ops.md +41 -0
  440. package/skills/meta-analysis/references/r_templates.md +132 -0
  441. package/skills/meta-analysis/references/review_orchestration.md +40 -0
  442. package/skills/meta-analysis/references/submission_package_drift.md +71 -0
  443. package/skills/meta-analysis/scripts/check_pool_consistency.py +201 -0
  444. package/skills/meta-analysis/scripts/cohort_overlap_check.py +242 -0
  445. package/skills/meta-analysis/scripts/dta_extraction_qc.py +137 -0
  446. package/skills/meta-analysis/scripts/screening_reconcile.py +160 -0
  447. package/skills/meta-analysis/skill.yml +47 -0
  448. package/skills/meta-analysis/templates/FINAL_POOL_LOCK.yaml.template +70 -0
  449. package/skills/meta-analysis/templates/extraction_form_v2.md +129 -0
  450. package/skills/meta-analysis/templates/supplementary_8file_checklist.md +94 -0
  451. package/skills/meta-analysis/tests/test_pool_consistency.sh +123 -0
  452. package/skills/orchestrate/SKILL.md +501 -0
  453. package/skills/orchestrate/references/dialogue_nodes.md +196 -0
  454. package/skills/orchestrate/references/report_template.md +109 -0
  455. package/skills/orchestrate/references/report_template_ko.md +88 -0
  456. package/skills/orchestrate/skill.yml +44 -0
  457. package/skills/peer-review/SKILL.md +381 -0
  458. package/skills/peer-review/references/aczel_2021_reviewer2_patterns.md +88 -0
  459. package/skills/peer-review/references/domain-probes/ai_overclaiming.md +47 -0
  460. package/skills/peer-review/references/domain-probes/narrative_review.md +44 -0
  461. package/skills/peer-review/references/domain-probes/observational_confounding.md +48 -0
  462. package/skills/peer-review/references/domain-probes/radiomics.md +38 -0
  463. package/skills/peer-review/references/domain-probes/sr_ma.md +87 -0
  464. package/skills/peer-review/references/domain-probes/survival_prognostic.md +68 -0
  465. package/skills/peer-review/references/exemplar_reviews/README.md +43 -0
  466. package/skills/peer-review/references/exemplar_reviews/ai_overclaiming.md +47 -0
  467. package/skills/peer-review/references/exemplar_reviews/calibration_missing.md +44 -0
  468. package/skills/peer-review/references/exemplar_reviews/data_leakage.md +48 -0
  469. package/skills/peer-review/references/exemplar_reviews/reference_standard_validity.md +45 -0
  470. package/skills/peer-review/references/narrative_review_audit.md +67 -0
  471. package/skills/peer-review/references/reviewer_calibration/README.md +34 -0
  472. package/skills/peer-review/references/reviewer_calibration/compliance_floor.md +52 -0
  473. package/skills/peer-review/references/reviewer_profiles/AJR.md +82 -0
  474. package/skills/peer-review/references/reviewer_profiles/EURE.md +64 -0
  475. package/skills/peer-review/references/reviewer_profiles/INSI.md +57 -0
  476. package/skills/peer-review/references/reviewer_profiles/KJR.md +100 -0
  477. package/skills/peer-review/references/reviewer_profiles/README.md +32 -0
  478. package/skills/peer-review/references/reviewer_profiles/RYAI.md +86 -0
  479. package/skills/peer-review/skill.yml +39 -0
  480. package/skills/present-paper/SKILL.md +675 -0
  481. package/skills/present-paper/references/critic_rubrics/slide.md +155 -0
  482. package/skills/present-paper/references/generate_pptx_templates.py +604 -0
  483. package/skills/present-paper/references/medical_presentation_templates.md +277 -0
  484. package/skills/present-paper/references/slide_design_principles.md +202 -0
  485. package/skills/present-paper/references/slide_visual_styles/nature_lancet.md +168 -0
  486. package/skills/present-paper/references/workflow-checklist.md +109 -0
  487. package/skills/present-paper/scripts/extract_pdf_figures.py +243 -0
  488. package/skills/present-paper/scripts/inject_pronunciation_notes.py +178 -0
  489. package/skills/present-paper/scripts/inject_speaker_notes.py +133 -0
  490. package/skills/present-paper/scripts/strip_notes_for_sharing.py +140 -0
  491. package/skills/present-paper/scripts/trim_caption.py +271 -0
  492. package/skills/present-paper/skill.yml +41 -0
  493. package/skills/present-paper/templates/build_pptx_nature_lancet.py +688 -0
  494. package/skills/publish-skill/SKILL.md +370 -0
  495. package/skills/publish-skill/references/license-compatibility-matrix.md +132 -0
  496. package/skills/publish-skill/references/pii-patterns.md +130 -0
  497. package/skills/publish-skill/scripts/audit_skill.sh +278 -0
  498. package/skills/publish-skill/skill.yml +35 -0
  499. package/skills/render-pdf-doc/SKILL.md +146 -0
  500. package/skills/render-pdf-doc/references/known_pitfalls.md +53 -0
  501. package/skills/render-pdf-doc/references/pandoc_korean_cheatsheet.md +77 -0
  502. package/skills/render-pdf-doc/scripts/check_deps.sh +42 -0
  503. package/skills/render-pdf-doc/scripts/infer_colwidths.py +164 -0
  504. package/skills/render-pdf-doc/scripts/render_pdf.sh +98 -0
  505. package/skills/render-pdf-doc/skill.yml +57 -0
  506. package/skills/render-pdf-doc/templates/anchor-doc.md +27 -0
  507. package/skills/render-pdf-doc/templates/anchor-doc_ko.md +25 -0
  508. package/skills/render-pdf-doc/templates/briefing-handout.md +33 -0
  509. package/skills/render-pdf-doc/templates/briefing-handout_ko.md +31 -0
  510. package/skills/render-pdf-doc/templates/proposal-cover.md +33 -0
  511. package/skills/render-pdf-doc/templates/proposal-cover_ko.md +31 -0
  512. package/skills/render-pdf-doc/templates/reference-table.md +22 -0
  513. package/skills/render-pdf-doc/templates/reference-table_ko.md +20 -0
  514. package/skills/replicate-study/SKILL.md +150 -0
  515. package/skills/replicate-study/references/harmonization_3country.csv +47 -0
  516. package/skills/replicate-study/references/harmonization_knhanes_nhanes.csv +68 -0
  517. package/skills/replicate-study/references/methodology_extraction_template.md +134 -0
  518. package/skills/replicate-study/skill.yml +37 -0
  519. package/skills/review-paper/SKILL.md +104 -0
  520. package/skills/review-paper/references/macro_skeleton.md +6 -0
  521. package/skills/review-paper/skill.yml +25 -0
  522. package/skills/revise/SKILL.md +515 -0
  523. package/skills/revise/references/r2r_voice.md +346 -0
  524. package/skills/revise/skill.yml +43 -0
  525. package/skills/search-lit/SKILL.md +443 -0
  526. package/skills/search-lit/references/parse_pubmed.py +326 -0
  527. package/skills/search-lit/references/pubmed_eutils.sh +111 -0
  528. package/skills/search-lit/skill.yml +46 -0
  529. package/skills/self-review/SKILL.md +1045 -0
  530. package/skills/self-review/references/domain-probes/ai_overclaiming.md +47 -0
  531. package/skills/self-review/references/domain-probes/narrative_review.md +44 -0
  532. package/skills/self-review/references/domain-probes/observational_confounding.md +48 -0
  533. package/skills/self-review/references/domain-probes/radiomics.md +38 -0
  534. package/skills/self-review/references/domain-probes/sr_ma.md +87 -0
  535. package/skills/self-review/references/domain-probes/survival_prognostic.md +68 -0
  536. package/skills/self-review/references/exemplar_findings/README.md +43 -0
  537. package/skills/self-review/references/exemplar_findings/cohort_arithmetic_mismatch.md +35 -0
  538. package/skills/self-review/references/exemplar_findings/estimand_drift_posthoc_primary.md +39 -0
  539. package/skills/self-review/references/exemplar_findings/scope_overreach_cross_sectional.md +35 -0
  540. package/skills/self-review/references/exemplar_findings/unadjusted_confounder.md +36 -0
  541. package/skills/self-review/references/panel_review_template.md +177 -0
  542. package/skills/self-review/scripts/check_artifact_coverage.py +301 -0
  543. package/skills/self-review/scripts/check_claim_artifact.py +248 -0
  544. package/skills/self-review/scripts/check_classical_style.py +185 -0
  545. package/skills/self-review/scripts/check_cohort_arithmetic.py +481 -0
  546. package/skills/self-review/scripts/check_confounding_completeness.py +287 -0
  547. package/skills/self-review/scripts/check_panel_diversity.py +336 -0
  548. package/skills/self-review/scripts/check_reference_adequacy.py +392 -0
  549. package/skills/self-review/scripts/check_reviewer_team_consistency.py +412 -0
  550. package/skills/self-review/scripts/check_scope_coherence.py +177 -0
  551. package/skills/self-review/skill.yml +47 -0
  552. package/skills/self-review/tests/fixtures/claim_manuscript.md +17 -0
  553. package/skills/self-review/tests/fixtures/claim_prereg.md +6 -0
  554. package/skills/self-review/tests/fixtures/cohort_bad.md +21 -0
  555. package/skills/self-review/tests/fixtures/cohort_clean.md +21 -0
  556. package/skills/self-review/tests/fixtures/cohort_partition.csv +5 -0
  557. package/skills/self-review/tests/fixtures/coverage_analysis/31_delong_nested_added_value.csv +3 -0
  558. package/skills/self-review/tests/fixtures/coverage_analysis/table1_demographics.csv +3 -0
  559. package/skills/self-review/tests/fixtures/coverage_clean.md +13 -0
  560. package/skills/self-review/tests/fixtures/coverage_manuscript.md +11 -0
  561. package/skills/self-review/tests/fixtures/panel_collapse.json +27 -0
  562. package/skills/self-review/tests/fixtures/panel_good.json +32 -0
  563. package/skills/self-review/tests/fixtures/panel_monoculture.json +32 -0
  564. package/skills/self-review/tests/fixtures/refadeq_letter.md +13 -0
  565. package/skills/self-review/tests/fixtures/refadeq_original_fixed.md +42 -0
  566. package/skills/self-review/tests/fixtures/refadeq_original_uncited.md +40 -0
  567. package/skills/self-review/tests/fixtures/scope_bad.md +9 -0
  568. package/skills/self-review/tests/fixtures/scope_clean.md +8 -0
  569. package/skills/self-review/tests/fixtures/scope_surrogate.md +8 -0
  570. package/skills/self-review/tests/fixtures/style_bad.md +13 -0
  571. package/skills/self-review/tests/fixtures/style_clean.md +11 -0
  572. package/skills/self-review/tests/fixtures/table1_by_exposure.csv +11 -0
  573. package/skills/self-review/tests/test_artifact_coverage.sh +44 -0
  574. package/skills/self-review/tests/test_claim_artifact.sh +50 -0
  575. package/skills/self-review/tests/test_classical_style.sh +44 -0
  576. package/skills/self-review/tests/test_cohort_arithmetic.sh +49 -0
  577. package/skills/self-review/tests/test_confounding_completeness.sh +66 -0
  578. package/skills/self-review/tests/test_panel_diversity.sh +55 -0
  579. package/skills/self-review/tests/test_panel_mode.sh +69 -0
  580. package/skills/self-review/tests/test_reference_adequacy.sh +68 -0
  581. package/skills/self-review/tests/test_reviewer_team_consistency.sh +138 -0
  582. package/skills/self-review/tests/test_scope_coherence.sh +46 -0
  583. package/skills/setup-medsci/SKILL.md +110 -0
  584. package/skills/setup-medsci/references/setup-checklist.md +51 -0
  585. package/skills/setup-medsci/skill.yml +30 -0
  586. package/skills/sync-submission/SKILL.md +382 -0
  587. package/skills/sync-submission/scripts/author_registry_example.yaml +36 -0
  588. package/skills/sync-submission/scripts/blind_sweep.py +203 -0
  589. package/skills/sync-submission/scripts/check_asset_anonymization.py +300 -0
  590. package/skills/sync-submission/scripts/check_cross_artifact_stale.py +211 -0
  591. package/skills/sync-submission/scripts/cover_letter_drift_check.py +451 -0
  592. package/skills/sync-submission/scripts/cross_document_n_check.py +486 -0
  593. package/skills/sync-submission/scripts/detect_copy_divergence.py +136 -0
  594. package/skills/sync-submission/scripts/preflight_gate.py +458 -0
  595. package/skills/sync-submission/scripts/scope_drift_check.py +362 -0
  596. package/skills/sync-submission/scripts/sync_submission.py +169 -0
  597. package/skills/sync-submission/skill.yml +43 -0
  598. package/skills/sync-submission/tests/fixtures/copy_ok.md +5 -0
  599. package/skills/sync-submission/tests/fixtures/copy_stale.md +5 -0
  600. package/skills/sync-submission/tests/fixtures/ssot.md +5 -0
  601. package/skills/sync-submission/tests/test_asset_anonymization.sh +99 -0
  602. package/skills/sync-submission/tests/test_copy_divergence.sh +44 -0
  603. package/skills/sync-submission/tests/test_cross_artifact_stale.sh +80 -0
  604. package/skills/sync-submission/tests/test_cross_document_n.sh +132 -0
  605. package/skills/sync-submission/tests/test_preflight_gate.sh +112 -0
  606. package/skills/sync-submission/tests/test_scope_drift.sh +122 -0
  607. package/skills/sync-submission/tests/test_vN_docx_assertion.sh +51 -0
  608. package/skills/verify-refs/SKILL.md +177 -0
  609. package/skills/verify-refs/references/manual_checkpoint_guide.md +100 -0
  610. package/skills/verify-refs/scripts/verify_cli.sh +62 -0
  611. package/skills/verify-refs/scripts/verify_refs.py +782 -0
  612. package/skills/verify-refs/skill.yml +44 -0
  613. package/skills/verify-refs/tests/fixtures/pagination_placeholder.bib +17 -0
  614. package/skills/verify-refs/tests/test_pagination_placeholder.sh +42 -0
  615. package/skills/version-dataset/SKILL.md +143 -0
  616. package/skills/version-dataset/references/manifest_schema.md +72 -0
  617. package/skills/version-dataset/scripts/version_dataset.py +242 -0
  618. package/skills/version-dataset/skill.yml +35 -0
  619. package/skills/version-dataset/tests/test_version_dataset.sh +52 -0
  620. package/skills/write-paper/SKILL.md +1148 -0
  621. package/skills/write-paper/references/exemplar_methods/README.md +38 -0
  622. package/skills/write-paper/references/exemplar_methods/ai_validation_tripod_claim.md +47 -0
  623. package/skills/write-paper/references/exemplar_methods/diagnostic_accuracy_stard.md +50 -0
  624. package/skills/write-paper/references/exemplar_methods/observational_cohort_strobe.md +43 -0
  625. package/skills/write-paper/references/journal_profiles/AJNR.md +185 -0
  626. package/skills/write-paper/references/journal_profiles/AJR.md +149 -0
  627. package/skills/write-paper/references/journal_profiles/Abdominal_Radiology.md +139 -0
  628. package/skills/write-paper/references/journal_profiles/Academic_Radiology.md +90 -0
  629. package/skills/write-paper/references/journal_profiles/Annals_of_Internal_Medicine.md +150 -0
  630. package/skills/write-paper/references/journal_profiles/Artificial_Intelligence_in_Medicine.md +82 -0
  631. package/skills/write-paper/references/journal_profiles/British_Journal_of_Radiology.md +161 -0
  632. package/skills/write-paper/references/journal_profiles/CVIR.md +157 -0
  633. package/skills/write-paper/references/journal_profiles/Chest.md +270 -0
  634. package/skills/write-paper/references/journal_profiles/Clinical_Radiology.md +160 -0
  635. package/skills/write-paper/references/journal_profiles/Clinical_and_Molecular_Hepatology.md +147 -0
  636. package/skills/write-paper/references/journal_profiles/Diabetes_Metabolism_Journal.md +163 -0
  637. package/skills/write-paper/references/journal_profiles/Diagnostic_and_Interventional_Radiology.md +216 -0
  638. package/skills/write-paper/references/journal_profiles/Endocrinology_and_Metabolism.md +167 -0
  639. package/skills/write-paper/references/journal_profiles/European_Journal_of_Preventive_Cardiology.md +192 -0
  640. package/skills/write-paper/references/journal_profiles/European_Radiology.md +159 -0
  641. package/skills/write-paper/references/journal_profiles/Hepatology_Communications.md +110 -0
  642. package/skills/write-paper/references/journal_profiles/Hepatology_International.md +106 -0
  643. package/skills/write-paper/references/journal_profiles/IEEE_TMI.md +180 -0
  644. package/skills/write-paper/references/journal_profiles/INSI.md +163 -0
  645. package/skills/write-paper/references/journal_profiles/Investigative_Radiology.md +86 -0
  646. package/skills/write-paper/references/journal_profiles/JACC_Advances.md +197 -0
  647. package/skills/write-paper/references/journal_profiles/JACC_Asia.md +168 -0
  648. package/skills/write-paper/references/journal_profiles/JACR.md +87 -0
  649. package/skills/write-paper/references/journal_profiles/JAMA.md +188 -0
  650. package/skills/write-paper/references/journal_profiles/JAMA_Network_Open.md +170 -0
  651. package/skills/write-paper/references/journal_profiles/JCSM.md +266 -0
  652. package/skills/write-paper/references/journal_profiles/JKMS.md +201 -0
  653. package/skills/write-paper/references/journal_profiles/JMIR.md +88 -0
  654. package/skills/write-paper/references/journal_profiles/JMIR_Medical_Education.md +86 -0
  655. package/skills/write-paper/references/journal_profiles/JNIS.md +227 -0
  656. package/skills/write-paper/references/journal_profiles/JVIR.md +158 -0
  657. package/skills/write-paper/references/journal_profiles/Journal_of_Clinical_Endocrinology_and_Metabolism.md +191 -0
  658. package/skills/write-paper/references/journal_profiles/Journal_of_Stroke.md +176 -0
  659. package/skills/write-paper/references/journal_profiles/KJR.md +185 -0
  660. package/skills/write-paper/references/journal_profiles/Korean_Circulation_Journal.md +184 -0
  661. package/skills/write-paper/references/journal_profiles/Korean_Journal_of_Internal_Medicine.md +178 -0
  662. package/skills/write-paper/references/journal_profiles/Lancet_Gastroenterology_and_Hepatology.md +127 -0
  663. package/skills/write-paper/references/journal_profiles/Liver_International.md +165 -0
  664. package/skills/write-paper/references/journal_profiles/Medical_Image_Analysis.md +147 -0
  665. package/skills/write-paper/references/journal_profiles/NEJM.md +147 -0
  666. package/skills/write-paper/references/journal_profiles/Nature_Medicine.md +181 -0
  667. package/skills/write-paper/references/journal_profiles/Neuroradiology.md +151 -0
  668. package/skills/write-paper/references/journal_profiles/Nutrition_Metabolism_and_Cardiovascular_Diseases.md +184 -0
  669. package/skills/write-paper/references/journal_profiles/PLOS_Medicine.md +166 -0
  670. package/skills/write-paper/references/journal_profiles/RYAI.md +124 -0
  671. package/skills/write-paper/references/journal_profiles/Radiology.md +173 -0
  672. package/skills/write-paper/references/journal_profiles/Skeletal_Radiology.md +135 -0
  673. package/skills/write-paper/references/journal_profiles/Stroke.md +210 -0
  674. package/skills/write-paper/references/journal_profiles/The_BMJ.md +121 -0
  675. package/skills/write-paper/references/journal_profiles/The_Lancet.md +112 -0
  676. package/skills/write-paper/references/journal_profiles/The_Lancet_Digital_Health.md +104 -0
  677. package/skills/write-paper/references/journal_profiles/World_Journal_of_Hepatology.md +106 -0
  678. package/skills/write-paper/references/journal_profiles/npj_Digital_Medicine.md +93 -0
  679. package/skills/write-paper/references/paper_types/ai_validation.md +270 -0
  680. package/skills/write-paper/references/paper_types/animal_study.md +194 -0
  681. package/skills/write-paper/references/paper_types/case_report.md +237 -0
  682. package/skills/write-paper/references/paper_types/cross_national.md +328 -0
  683. package/skills/write-paper/references/paper_types/letter.md +127 -0
  684. package/skills/write-paper/references/paper_types/meta_analysis.md +181 -0
  685. package/skills/write-paper/references/paper_types/nhis_cohort.md +297 -0
  686. package/skills/write-paper/references/paper_types/original_article.md +221 -0
  687. package/skills/write-paper/references/paper_types/technical_note.md +131 -0
  688. package/skills/write-paper/references/section_guides/discussion.md +155 -0
  689. package/skills/write-paper/references/section_guides/introduction.md +108 -0
  690. package/skills/write-paper/references/section_guides/methods.md +144 -0
  691. package/skills/write-paper/references/section_guides/results.md +113 -0
  692. package/skills/write-paper/references/section_guides/step7_1_classical_qc.md +67 -0
  693. package/skills/write-paper/references/section_guides/step7_4a_audit_recovery.md +74 -0
  694. package/skills/write-paper/references/section_guides/title_abstract.md +123 -0
  695. package/skills/write-paper/references/section_templates/methods_statistical.md +147 -0
  696. package/skills/write-paper/scripts/check_placeholders.py +182 -0
  697. package/skills/write-paper/skill.yml +48 -0
  698. package/skills/write-paper/tests/test_placeholders.sh +107 -0
  699. package/skills/write-protocol/SKILL.md +243 -0
  700. package/skills/write-protocol/references/ethics_checklist.md +150 -0
  701. package/skills/write-protocol/references/protocol_template.md +304 -0
  702. package/skills/write-protocol/skill.yml +34 -0
@@ -0,0 +1,1148 @@
1
+ ---
2
+ name: write-paper
3
+ description: Full-pipeline medical/scientific paper writing. 8-phase IMRAD workflow from outline to submission-ready manuscript. Supports original articles, case reports, meta-analyses, AI validation studies, animal studies, and technical notes. Do NOT trigger for self-checking (use self-review instead).
4
+ triggers: write paper, manuscript, draft paper, start writing, write methods, write results, write discussion, write introduction
5
+ tools: Read, Write, Edit, Bash, Grep, Glob
6
+ model: inherit
7
+ ---
8
+
9
+ # Write-Paper Skill
10
+
11
+ You are helping a medical researcher write scientific manuscripts for journal submission.
12
+ You orchestrate the full writing pipeline from initial outline through submission-ready
13
+ polish, producing publication-quality prose that reads as if written by an experienced
14
+ academic physician.
15
+
16
+ ## Key Directories
17
+
18
+ - **Journal profiles (built-in)**: `${CLAUDE_SKILL_DIR}/references/journal_profiles/`
19
+ - **Paper type templates**: `${CLAUDE_SKILL_DIR}/references/paper_types/`
20
+ - **Section templates**: `${CLAUDE_SKILL_DIR}/references/section_templates/`
21
+ - **Section guides**: `${CLAUDE_SKILL_DIR}/references/section_guides/` (on-demand per phase)
22
+ - **Manuscript workspace**: determined at Phase 0 (typically `7_Manuscript/{PaperN}/`)
23
+
24
+ ---
25
+
26
+ ## 8-Phase Pipeline
27
+
28
+ ### Phase 0: Init
29
+
30
+ Gather essential information from the user before any writing begins.
31
+
32
+ **Required inputs:**
33
+ 1. **Title** (working title is fine)
34
+ 2. **Paper type**: original article, AI validation, case report, meta-analysis, technical note, animal study, NHIS cohort, cross-national
35
+ 3. **Target journal**: load profile from `${CLAUDE_SKILL_DIR}/references/journal_profiles/`
36
+ 4. **Research question / hypothesis**
37
+ 5. **Available data**: what datasets, tables, analyses already exist
38
+
39
+ **Optional flags:**
40
+ - `--no-llm-disclosure`: Skip LLM writing assistance disclosure. Default is ON (disclosure included). See [LLM Disclosure](#llm-writing-disclosure) section below.
41
+ - `--autonomous`: Run the full pipeline without user gates. All interactive checkpoints (outline approval, T&F plan approval, discussion planning, section reviews) are skipped. The pipeline executes Phases 0-7 sequentially without pausing. Default is OFF (all gates active). Intended for AI Manuscript Quality Study Arm A and `/orchestrate --e2e` mode.
42
+
43
+ **Actions:**
44
+ 1. Load the journal profile. If no profile exists, ask the user for: word limits, abstract format, citation style, figure/table limits, special requirements.
45
+ 2. Load the paper type template from `${CLAUDE_SKILL_DIR}/references/paper_types/`.
46
+ 3. Select the appropriate reporting guideline(s):
47
+ - Diagnostic accuracy study: STARD / STARD-AI
48
+ - Prediction model: TRIPOD+AI
49
+ - AI study in radiology: CLAIM 2024
50
+ - RCT: CONSORT / CONSORT-AI
51
+ - Systematic review: PRISMA 2020
52
+ - Observational study: STROBE
53
+ - Educational study: no standard checklist (use SQUIRE if applicable)
54
+ 4. **AI/LLM design-stage reporting map**: for AI validation, LLM/MLLM, NLP extraction, or report-generation papers, map each required AI-reporting item to a manuscript section before drafting. At minimum record model/version/access date, input fields, prompt or fine-tuning protocol, same-backbone zero-shot/few-shot baseline if an adaptation claim is made, test-data independence/contamination assessment, repeatability/stochasticity handling, and the Methods subsection where each will appear. If any item cannot be placed, halt for design clarification rather than burying it as a Phase 7 limitation.
55
+ 5. Create or confirm the project scaffold directory.
56
+ 6. Check for `--no-llm-disclosure` flag. If absent, LLM disclosure is ON by default.
57
+ Check for `--autonomous` flag. If present, record autonomous mode as ON.
58
+ Record both flag states for use in Phase 1-7 gate logic.
59
+
60
+ #### Case Report Mode
61
+
62
+ When paper type is "case report":
63
+ 1. Load `${CLAUDE_SKILL_DIR}/references/paper_types/case_report.md` (CARE structure).
64
+ 2. Override word limits: total 1000-1500 words (excl. abstract, references, legends).
65
+ 3. Override abstract limit: 150 words, structured (Introduction, Case Presentation, Conclusion).
66
+ 4. Override reference limit: 15 references maximum.
67
+ 5. Apply CARE 2016 reporting guideline (mandatory).
68
+ 6. Modify Phase 1 outline to CARE 8-section structure:
69
+ Title, Abstract, Introduction, Case Presentation (Patient Information, Clinical Findings,
70
+ Timeline, Diagnostic Assessment, Therapeutic Intervention, Follow-up and Outcomes),
71
+ Discussion, Learning Points, Conclusion, Patient Consent Statement.
72
+ 7. In Phase 2, default figures:
73
+ - Figure 1: Key imaging findings (annotated, typically 3-6 panels)
74
+ - Figure 2: Clinical timeline (if complex course)
75
+ - Table 1: Laboratory and clinical data at presentation
76
+ 8. In Phase 5 (Discussion), call `/search-lit` with query: `"[condition]" AND "case report"[Publication Type]`.
77
+ If 5 or more similar cases found, create a comparison table (Author, Year, Age/Sex, Presentation, Treatment, Outcome).
78
+ If fewer than 5, state: "To our knowledge, only [N] similar cases have been reported in the English literature."
79
+ 9. Skip Phase 5a Discussion Planning Gate — case reports are shorter; proceed directly to drafting.
80
+ 10. For extended case reports with literature review, user can specify `--extended` to raise
81
+ the word limit to 2000-3000 words and add a structured review section.
82
+
83
+ 7. **Identify a backbone article (auto-proposal first, ask only as fallback)**:
84
+ a. **Scan first** — if `manuscript/_src/refs.bib` exists, scan it for entries matching the current paper's study design (Phase 0 paper_type), imaging modality, and target journal (or comparable tier). Prefer entries whose Zotero record has a PDF attachment (full text locally available).
85
+ b. **Rank candidates** by: PDF available locally (+2), recency within 5 years (+1), same target journal (+2), same study design + modality (+2).
86
+ c. **Behavior**:
87
+ - **One strong candidate (score ≥ 5)** — propose it proactively: *"I found a likely backbone article: [citation]. Full text appears available. I will use it as the structural backbone unless you prefer another."* Proceed once user confirms or stays silent for one turn.
88
+ - **Multiple candidates** — present the top 3 ranked list with rationale and ask the user to choose.
89
+ - **No refs.bib, or no candidates** — ask the user to provide a published study (legacy behavior).
90
+ d. Record the chosen citekey in `project.yaml::backbone_article` so Methods, Tables, and Figures phases reuse it without re-asking.
91
+ 8. Summarize the setup to the user and confirm before proceeding.
92
+
93
+ **Output:** Setup summary with journal constraints, paper type, reporting guideline, backbone article, directory path, and LLM disclosure status (ON/OFF).
94
+
95
+ #### Phase 0 Gate: Citekey-only references
96
+
97
+ Before any section drafting begins, this skill enforces citekey-only entry into
98
+ the manuscript. LLM-generated reference strings in prose are a primary source of
99
+ citation fabrication.
100
+
101
+ **Hard rules (v1.1.1 Phase 1A.4)**:
102
+
103
+ 1. **Every in-text citation MUST be `[@citekey]`**, where `citekey` exists in `manuscript/_src/refs.bib`. Pandoc/Quarto-style only. No "(Smith et al., 2024)" free text.
104
+ 2. **For a citation the user intends to add but has not yet imported to Zotero**, use the placeholder form `[@NEW:short-topic]` (e.g., `[@NEW:chest-xray-llm]`, `[@NEW:radbench-1]`). The topic slug is kebab-case, ≤30 characters, and must be unique within the manuscript.
105
+ 3. **Never** fabricate a citekey that "looks real" (e.g., `[@Smith_2024_AI]`) when the entry is not in `refs.bib`. The `[@NEW:...]` form is the only allowed placeholder.
106
+ 4. Before Phase 7 (Polish), ALL `[@NEW:...]` placeholders must be resolved:
107
+ - Owner runs `/search-lit` → `/lit-sync` to import verified entries into Zotero; Better BibTeX auto-export refreshes `refs.bib`; owner replaces `[@NEW:topic]` with the real citekey.
108
+ - Collaborators notify the owner (per `docs/zotero_policy.md`).
109
+ 5. Phase 7 pre-submission check: `grep -E '\[@NEW:[^]]+\]|\[N\]|\[N–N\]' manuscript/index.qmd` must return zero matches before `/sync-submission` is allowed to freeze a journal package. The bare numeric markers `[N]` / `[N–N]` are the failure mode where a manuscript is drafted outside this pipeline (no `refs.bib`) and method-load-bearing citations are left as unresolved placeholders; block them the same way as `[@NEW:...]`.
110
+
111
+ **Why this matters**: PRISMA citation fabrication in MA projects and reference hallucination in solo manuscripts both traced back to LLM-generated citation strings inlined during drafting. Forcing the citekey discipline at Phase 0 redirects that failure mode into a visible placeholder the submission gate can block.
112
+
113
+ **If refs.bib is absent (new project)**:
114
+ - Create an empty `manuscript/_src/refs.bib` placeholder with a comment: `% refs.bib managed by /lit-sync via Zotero Better BibTeX. Do not hand-edit.`
115
+ - Record in `SSOT.yaml` `reference_manager.required_for: project_owner` per Zotero policy.
116
+ - Proceed; all early citations will be `[@NEW:...]` placeholders until the first `/lit-sync` run.
117
+
118
+ ---
119
+
120
+ ### Phase 1: Outline
121
+
122
+ Create a structured IMRAD outline with section-level word budgets that respect journal limits.
123
+
124
+ **Outline structure:**
125
+ ```
126
+ Title: {working title}
127
+ Target: {journal} | Type: {paper type}
128
+ Total word limit: {N} (excl. abstract, references, legends)
129
+
130
+ 1. Abstract ({N} words, structured: {format per journal})
131
+ 2. Introduction ({N} words, {M} paragraphs)
132
+ - P1: Clinical context / background
133
+ - P2: Knowledge gap
134
+ - P3: Study objective / hypothesis
135
+ 3. Materials and Methods ({N} words)
136
+ - 3.1 Study Design and Setting
137
+ - 3.2 Participants / Dataset
138
+ - 3.3 Procedures / Intervention / Model
139
+ - 3.4 Outcome Measures
140
+ - 3.5 Statistical Analysis
141
+ - 3.6 Ethics
142
+ 4. Results ({N} words)
143
+ - 4.1 Study population (Table 1)
144
+ - 4.2 Primary endpoint
145
+ - 4.3 Secondary endpoints
146
+ - 4.4 Subgroup / sensitivity analyses
147
+ 5. Discussion ({N} words, {M} paragraphs)
148
+ - P1: Key findings summary
149
+ - P2-3: Comparison with prior literature
150
+ - P4: Clinical implications
151
+ - P5: Limitations
152
+ - P6: Conclusion
153
+ 6. Tables: {list with descriptions}
154
+ 7. Figures: {list with descriptions}
155
+ 8. Supplemental materials: {if applicable}
156
+ ```
157
+
158
+ **Gate:** Present outline to user. Do NOT proceed until user approves or requests changes.
159
+ **Autonomous mode:** If `--autonomous` is ON, skip this gate. Log the outline to `qc/_pipeline_log.md` and proceed to Phase 2.
160
+
161
+ ---
162
+
163
+ ### Phase 2: Tables & Figures
164
+
165
+ Design all tables and figures BEFORE writing prose. This ensures the narrative serves the data, not the reverse.
166
+
167
+ **Actions:**
168
+ 1. Review available data with the user.
169
+ 2. Design each table:
170
+ - Table 1: Demographics / baseline characteristics (always)
171
+ - Table 2+: Primary and secondary outcomes
172
+ - Supplemental tables as needed
173
+ 3. Design each figure:
174
+ - Figure 1: Study flow diagram (CONSORT/STARD/PRISMA as applicable)
175
+ - Additional figures: performance curves, forest plots, calibration plots, etc.
176
+ 4. Call `/analyze-stats` if statistical analysis is needed.
177
+ 5. Call `/make-figures` if figure generation is needed. **Pass `--study-type`** mapped from the paper type / reporting guideline selected in Phase 0: diagnostic accuracy → `diagnostic-accuracy`, prediction model → `ai-validation`, systematic review → `meta-analysis`, DTA systematic review → `dta-meta-analysis`, observational → `observational-cohort`, RCT → `rct`.
178
+ 6. **Auto-detect required figures.** Based on the reporting guideline selected in Phase 0, consult the `/make-figures` study-type figure set table. Call `/make-figures` with the full figure set for the study type. Do not ask the user to name each figure individually.
179
+ 7. **Visual abstract check.** If the target journal requires or encourages a visual abstract (check the journal profile for a "Visual Abstract" section), call `/make-figures` with visual abstract request. Provide: title, Key Points 1 and 3, methodology summary, and the best study figure as the visual element.
180
+ 8. **Figure discovery and embedding.** After figure generation completes, scan the `analysis/figures/` directory for all PNG and PDF files. For each figure:
181
+ - Generate a markdown image reference: `![Figure N. Caption](analysis/figures/filename.png){width=80%}`
182
+ - Draft a figure legend based on the figure type and analysis context
183
+ - Insert the reference at the appropriate location in the Results section
184
+ 9. **Manifest verification (HALT gate).** After `/make-figures` completes, verify that `analysis/figures/_figure_manifest.md` exists and contains at least one figure entry. If the manifest is missing or empty: in **autonomous mode**, HALT with error code `MANIFEST_MISSING`, log to `qc/_pipeline_log.md`, and write a recovery note to `manuscript/<id>/REPORT.md` Tier-3 section ("rerun /make-figures or manually create _figure_manifest.md"). In **interactive mode**, report the error and ask the user how to proceed. **Rationale**: Phase 7 DOCX build (line 567) parses the manifest to embed figures; a missing manifest silently drops all figures from the final docx, which surfaces only at submission. HALT-on-missing is cheaper than discovering the absence in submission QC.
185
+
186
+ **Gate:** Present T&F plan to user. Do NOT proceed until user approves.
187
+ **Autonomous mode:** If `--autonomous` is ON, skip this gate. Log the T&F plan to `qc/_pipeline_log.md` and proceed to Phase 3.
188
+
189
+ ---
190
+
191
+ ### Phase 3: Methods
192
+
193
+ Write the Methods section first -- it is the most objective and anchors the rest of the paper.
194
+
195
+ **Before writing:** Load `${CLAUDE_SKILL_DIR}/references/section_guides/methods.md` for PICO structure, backbone article usage, checklist cross-reference, and terminology conventions. For the matching study type, also skim the structure model in `${CLAUDE_SKILL_DIR}/references/exemplar_methods/` (diagnostic-accuracy/STARD, AI-validation/TRIPOD+AI·CLAIM, observational-cohort/STROBE) — it lists, paragraph by paragraph, what each Methods paragraph must establish plus the element that type most often omits. Model the structure; the exemplars are synthetic, with placeholder specifics, not prose to copy.
196
+
197
+ **Writing order within Methods:**
198
+ 1. Study Design and Setting
199
+ 2. Participants / Dataset (inclusion/exclusion, recruitment period)
200
+ 3. Procedures / Intervention / AI Model description
201
+ 4. Outcome Measures (primary and secondary endpoints)
202
+ 5. Statistical Analysis (reference `${CLAUDE_SKILL_DIR}/references/section_templates/methods_statistical.md`)
203
+ 6. Ethics statement
204
+ 7. AI/LLM disclosure (if `--no-llm-disclosure` was NOT set): insert the Methods disclosure paragraph from the [LLM Disclosure](#llm-writing-disclosure) section
205
+
206
+ **AI/LLM extraction add-ons (when applicable):**
207
+ - In Dataset / Inputs, state exactly which text fields the model received and whether clinical history,
208
+ indication, impression, prior diagnosis, or referral text was masked. If a supplied field can contain
209
+ the target label, Methods must either exclude it or describe a no-leaky-field sensitivity analysis.
210
+ - In AI Model or Statistical Analysis, include a same-backbone zero-shot/few-shot comparator when the
211
+ claim is that fine-tuning, LoRA, prompt engineering, or a multi-agent wrapper improves performance.
212
+ - In Introduction, state the decision-impact path: what clinical or research workflow step changes if the
213
+ model works, not only that the extracted label is interesting.
214
+
215
+ **Process:**
216
+ 1. **Writer pass**: Draft the full Methods section following the outline and paper type template.
217
+ 2. **Critic pass**: Score using the 6-dimension rubric (see Critic Scoring below). Provide specific line-level feedback.
218
+ 3. **Fixer pass**: Revise based on critic feedback.
219
+ 4. Repeat critic-fixer loop up to 3 rounds. Pass threshold: overall score >= 85/100.
220
+ 5. Present final Methods to user.
221
+
222
+ ---
223
+
224
+ ### Phase 4: Results
225
+
226
+ Write Results aligned to the approved tables and figures. **Results = "What did we find?"
227
+ — nothing more.** Every sentence must be a factual statement backed by a number.
228
+
229
+ **Before writing:** Load `${CLAUDE_SKILL_DIR}/references/section_guides/results.md` for mirror-symmetry rules, flowchart requirements, missing data handling, and the anti-interpretation self-check.
230
+
231
+ **Rules:**
232
+ - Every number in the text must match the corresponding table cell exactly.
233
+ - Start with study population description referencing Table 1.
234
+ - Present primary endpoint results first, then secondary.
235
+ - Reference every table and figure at least once in the text.
236
+ - Report exact p-values (not "p < 0.05" unless truly < 0.001).
237
+ - All primary metrics must include 95% confidence intervals.
238
+ - **Incremental value must be earned, not asserted.** If the paper claims the model/marker adds value *beyond* / *on top of* an existing tool (a clinical score, a routine test, a baseline model), Results must report the nested-model comparison — a baseline model from the in-routine-use predictors versus the augmented model — with an incremental metric: ΔC-index / ΔAUC (paired CI, e.g. DeLong), NRI, IDI, or decision-curve net benefit. A standalone discrimination number does not support a "beyond X" claim. If the design did not include the baseline comparator (see `/design-study` Phase 3), soften the claim to standalone performance rather than implying added value.
239
+ - Do not interpret results in this section; state findings only.
240
+
241
+ **Anti-interpretation guardrails (strict):**
242
+ - NO "why" explanations — save for Discussion.
243
+ - NO comparisons with prior literature — save for Discussion.
244
+ - NO causal language ("caused," "led to," "due to") — use "was associated with."
245
+ - NO evaluative adjectives without numbers ("high," "significant," "notable,"
246
+ "remarkable," "surprising") — always pair with the actual value.
247
+ - NO hedge words implying interpretation ("suggests," "implies," "indicates importance,"
248
+ "consistent with," "as expected").
249
+ - **Self-check heuristic (applied to every sentence):**
250
+ 1. Does this sentence explain "why"? → Move to Discussion.
251
+ 2. Does it reference another study? → Move to Discussion.
252
+ 3. Does it use "suggests/implies/indicates importance"? → Rewrite as factual statement.
253
+ 4. Does it use an adjective without a number? → Add the number or delete the adjective.
254
+ 5. Does it contain "interestingly/notably/remarkably/surprisingly"? → Delete the word.
255
+
256
+ **Structure:**
257
+ 1. Study population (enrollment, exclusions, demographics → Table 1).
258
+ 2. Primary endpoint results (one paragraph per primary outcome).
259
+ 3. Secondary endpoint results.
260
+ 4. Subgroup / sensitivity analyses (if applicable).
261
+
262
+ **Process:** Same writer -> critic -> fixer loop as Phase 3 (max 3 rounds, threshold 85/100).
263
+
264
+ **Gate:** Present final Results to user. Confirm before proceeding to Discussion.
265
+
266
+ ---
267
+
268
+ ### Phase 5: Discussion
269
+
270
+ **Before writing:** Load `${CLAUDE_SKILL_DIR}/references/section_guides/discussion.md` for the 4-paragraph structure, word limits, limitation writing guidelines, and Table/Figure citation rules.
271
+
272
+ **Before drafting, collect user input (Discussion Planning Gate).**
273
+
274
+ #### Step 5a: Discussion Planning (interactive)
275
+
276
+ Ask the user the following questions (in the user's preferred language). Wait for answers before drafting.
277
+
278
+ ```
279
+ Q1. List the 3-5 key findings of this study in order of importance.
280
+ Q2. Name 3-5 key prior studies (anchor papers) you want to compare against in the
281
+ Discussion — titles or DOIs.
282
+ - Studies consistent with your results: ?
283
+ - Studies inconsistent with your results: ?
284
+ Q3. Are there methodological or population differences that could explain any disagreement?
285
+ Q4. State up to 3 limitations of this study.
286
+ (For each, include how it was mitigated and the direction in which it could affect the results.)
287
+ Q5. Are there clinical implications you want to emphasize?
288
+ ```
289
+
290
+ If the user provides partial answers, proceed with what is available and note gaps.
291
+ If the user says "skip" (or the equivalent in their language), use `/search-lit` to identify
292
+ anchor papers from the reference list and proceed with best-effort defaults.
293
+
294
+ **Gate:** Do NOT start writing Discussion until user responds (or explicitly skips).
295
+ **Autonomous mode:** If `--autonomous` is ON, skip the interactive planning. Use `/search-lit` to identify anchor papers from the reference list and proceed with best-effort defaults (same as the "skip" path).
296
+
297
+ #### Step 5b: Discussion Drafting
298
+
299
+ Write the Discussion using the inverted funnel structure:
300
+
301
+ **Paragraph structure:**
302
+ 1. **Summary** (1 paragraph): Restate key findings without repeating numbers verbatim.
303
+ Bridge from Results — the reader should feel continuity.
304
+ 2. **Context — anchor paper comparisons** (2-3 paragraphs): Each paragraph organized around
305
+ one theme or finding. For each anchor paper:
306
+ - State the prior finding with citation.
307
+ - Compare: agreement or disagreement with our result.
308
+ - Explain the discrepancy (if any) citing methodological or population differences.
309
+ 3. **Clinical implications** (1 paragraph): What does this mean for practice or future research?
310
+ 4. **Limitations** (1 paragraph): Honest, specific, ordered by severity. For each limitation:
311
+ (a) what it is, (b) how it was mitigated, (c) direction of residual bias.
312
+ Do NOT use "our study has several limitations" as an opener.
313
+ 5. **Strengths** (optional, 1-2 sentences): Only if genuinely novel contribution.
314
+ 6. **Conclusion** (1-2 sentences): Single most important finding + implication.
315
+ Must be a citable statement. No "further studies are needed" as final sentence.
316
+
317
+ **Rules:**
318
+ - Do not introduce new data not presented in Results.
319
+ - Avoid overclaiming: language must match evidence level.
320
+ - **Endpoint↔conclusion scope.** The Clinical-implications and Conclusion sentences must not exceed what the design and endpoint support. A cross-sectional / single-visit / prevalence study cannot license a prognostic or surveillance claim (a rescreen interval, disease progression, predicting future risk) — that requires longitudinal follow-up. A binary surrogate endpoint (present/absent, >0, dichotomized) is risk stratification, not a patient-care directive (defer/withhold/initiate therapy). `/self-review` §D (`check_scope_coherence.py`) flags `CROSS_SECTIONAL_PROGNOSTIC` / `SURROGATE_CARE_DIRECTIVE`; keep the conclusion verb inside the design's reach.
321
+ - Acknowledge alternative explanations for key findings.
322
+ - Each comparison with prior work must cite the specific study.
323
+ - NO "interestingly," "notably," "it is worth noting" — state the point directly.
324
+
325
+ **Process:** Same writer -> critic -> fixer loop (max 3 rounds, threshold 85/100).
326
+
327
+ After the first draft, present to the user with (ask in the user's preferred language):
328
+ ```
329
+ Here is the Discussion draft. Please review:
330
+ - Any missing anchor papers or additional comparisons needed?
331
+ - Anything you want to change in the interpretation?
332
+ - Any clinical implications to emphasize more or soften?
333
+ ```
334
+ Incorporate user feedback before running the critic-fixer loop.
335
+
336
+ ---
337
+
338
+ ### Phase 6: Introduction + Abstract
339
+
340
+ Write these LAST because they frame the paper and depend on knowing what was actually found.
341
+
342
+ **Before writing:** Load `${CLAUDE_SKILL_DIR}/references/section_guides/introduction.md` for the Gap Storytelling 5-step structure, word/paragraph/reference targets, and common mistakes. Also load `${CLAUDE_SKILL_DIR}/references/section_guides/title_abstract.md` for Title 3-type selection, 4-component checklist, Abstract Conclusion-first priority, and Visual Abstract guidance.
343
+
344
+ **Introduction structure (3-4 paragraphs):**
345
+ 1. Clinical context establishing importance (cite prevalence, burden, current practice).
346
+ 2. Knowledge gap that this study addresses.
347
+ 3. Study objective, stated precisely. Include hypothesis if applicable.
348
+
349
+ **Abstract:**
350
+ - Follow the journal's structured format exactly.
351
+ - Must be self-contained: a reader should understand the study from abstract alone.
352
+ - All numbers must match the main text and tables.
353
+ - Final sentence: clinical implication, not "further studies are needed."
354
+ - **Lead with the pre-specified primary estimand, not the largest effect.** It is tempting (and a critic/peer-sim pass may even suggest it) to foreground the strongest number to make the Abstract "land harder." Do not let that reframe which result is *primary*: tightening effect-size language is fine, but promoting a secondary, exploratory, or post-hoc estimate to the headline is estimand shopping. The Abstract's primary result must be the registered/protocol primary contrast — the same one Step 7.3b checks. If the primary is null or underpowered, report it as such (see `/self-review` category C, power-aware null) rather than substituting a more favourable secondary estimate.
355
+
356
+ **Process:** Same writer -> critic -> fixer loop (max 3 rounds, threshold 85/100).
357
+
358
+ ---
359
+
360
+ ### Phase 7: Polish
361
+
362
+ Final quality pass before submission.
363
+
364
+ **Actions (strict sequential execution — each step MUST complete before the next begins):**
365
+
366
+ #### Step 7.1: AI Pattern Scan
367
+
368
+ Scan for and remove AI writing patterns (see AI Pattern Avoidance below). Edit `manuscript/manuscript.md` in place.
369
+
370
+ **Classical-style QC (for senior MA reviewers) — load on demand:**
371
+
372
+ | Trigger | Action |
373
+ |---------|--------|
374
+ | Manuscript type = MA, systematic review, or a senior co-author review is expected | Load `references/section_guides/step7_1_classical_qc.md` → run the 7 grep checks together (§ symbol, AI Disclosure paragraph, heading style, eligibility numbered list, Funding placeholder, PROSPERO chronology, em-dash overuse) |
375
+ | Verify all at once with a deterministic lint | `python3 "${MEDSCI_SKILLS_ROOT:-$HOME/workspace/medsci-skills}/skills/self-review/scripts/check_classical_style.py" --manuscript manuscript/manuscript.md --strict` — `SECTION_SYMBOL`/`INBODY_AI_DISCLOSURE` (Major) + `ELIGIBILITY_PROSE`/`DECIMAL_INCONSISTENCY`/`EM_DASH_OVERUSE` (Minor). The machine-checkable subset of the same conventions as the 7-grep checklist. |
376
+ | Global-rule cross-reference | `~/.claude/rules/manuscript-style-classical.md` (motivation for the 11 items) |
377
+ | Pattern 19–21 body rewrite | `/humanize` (§, self-reference, AI Disclosure boilerplate) |
378
+
379
+ **AI-disclosure meta-applicability (manuscript-style-classical §15):** if the manuscript
380
+ contains an AI/LLM-use disclosure, that paragraph must itself satisfy the reporting items the
381
+ manuscript critiques (FLAIR F1.6, TRIPOD-LLM, MI-CLEAR-LLM all require the tool **version**, the
382
+ **access channel**, the **date range**, and the **responsible party**). Enforce all four tokens
383
+ and zero unresolved placeholders:
384
+
385
+ ```bash
386
+ DISC=$(grep -niE 'generative ai|large language model|\bLLM\b|assisted (the|with) (writing|drafting)|ChatGPT|Claude|Copilot|Gemini' manuscript/manuscript.md)
387
+ # the disclosure paragraph must carry: version + channel + date + responsible party
388
+ grep -iE 'version|[0-9]+\.[0-9x]+|GPT-[0-9]' <<<"$DISC" # version present
389
+ grep -iE 'API|chat|web|Bedrock|Azure|interface' <<<"$DISC" # access channel present
390
+ grep -E '20[0-9]{2}' <<<"$DISC" # date / date range present
391
+ grep -iE 'by [A-Z]\.[A-Z]\.|reviewed by|deployed by|the authors' <<<"$DISC" # responsible party
392
+ # zero placeholders
393
+ grep -nE '\[(version|date|tool|model|channel)\]|TODO|XXXX|TBD' manuscript/manuscript.md # must be empty
394
+ ```
395
+
396
+ Any missing token (or a surviving `[version]`/`TODO`/`XXXX` placeholder) is a HALT: the paper
397
+ cannot critique a framework's AI-disclosure item while failing it itself. For a classical /
398
+ senior-MA target the disclosure paragraph is not placed in the body at all — branch it to the
399
+ title page (manuscript-style-classical §7 forbids the in-body AI-disclosure paragraph).
400
+
401
+ #### Step 7.2: Reporting Guideline Check
402
+
403
+ Call `/check-reporting` on `manuscript/manuscript.md`. Parse the output:
404
+ - If the report includes a JSON summary block (Part D), extract MISSING items.
405
+ - For each MISSING item where `fixable_by_ai` is true (e.g., missing ethics statement, missing data availability statement, missing sample size justification), insert the suggested text at the indicated location in `manuscript/manuscript.md`.
406
+ - Do NOT attempt to fix items requiring external information (IRB numbers, registration numbers, protocol details only the author knows).
407
+ - Log all auto-inserted text to `qc/_pipeline_log.md`.
408
+
409
+ #### Step 7.3: Citation Verification
410
+
411
+ **7.3.1 — Placeholder gate (v1.1.1 Phase 1A.4).** Before running `/verify-refs`,
412
+ confirm that no `[@NEW:topic]` placeholders remain:
413
+
414
+ ```bash
415
+ grep -nE '\[@NEW:[^]]+\]' manuscript/index.qmd manuscript/manuscript.md 2>/dev/null
416
+ ```
417
+
418
+ If any match is returned, HARD STOP. Report the unresolved placeholders to the
419
+ user and loop back: owner runs `/search-lit` → `/lit-sync` to import entries,
420
+ collaborators flag via owner. Do NOT proceed to 7.3.2 until the grep is clean.
421
+
422
+ **7.3.2 — Audit.** Call `/verify-refs` on the current manuscript. Per v1.2.0
423
+ contract, its sole output is `qc/reference_audit.json` (no longer writes
424
+ `references/*`). Parse that file: if `submission_safe: false`, stop the pipeline
425
+ and surface the `FABRICATED` / `MISMATCH` records AND any `duplicate_findings[]`
426
+ entries (duplicate PMID/DOI; cite renumbering required) to the user. If
427
+ `/verify-refs` is unavailable, fall back to `/search-lit --verify-only` and flag
428
+ any unverified references with `[UNVERIFIED]` markers.
429
+
430
+ #### Step 7.3a: Numerical Claim Audit (MANDATORY for MA / pooled estimates / comparative arms)
431
+
432
+ Citation verification protects against fabricated references; this step protects against
433
+ fabricated numbers. They are different failure modes and Step 7.3 does not catch the latter.
434
+
435
+ **Precedent failure pattern:**
436
+ > A revision-era comparative meta-analysis reached Step 7.3 with 0 citation errors (all
437
+ > PMIDs verified against PubMed) yet carried a silent numerical reversal on a safety
438
+ > outcome — the reported arm-level events were direction-flipped relative to the primary
439
+ > source Table. The error originated in a hand-typed Fisher-exact matrix in a revision-era
440
+ > analysis script, and internal consistency checks (Phase 2.5 of `/self-review`) passed
441
+ > cleanly because every downstream artifact echoed the same wrong number.
442
+
443
+ **Trigger conditions:** any of the following makes this step mandatory before Step 7.4.
444
+ - The manuscript contains pooled estimates, forest plots, or a meta-analysis Table.
445
+ - The manuscript contains comparative-arm specific values extracted from a larger study.
446
+ - The manuscript contains any `[VERIFY-CSV]` tag (from `/revise` Step 2.5 or `/meta-analysis`
447
+ Phase 6b).
448
+ - The current draft is a revision (post-v1).
449
+ - The manuscript synthesizes completion of an items × studies reporting-quality checklist
450
+ (TRIPOD+AI, PROBAST+AI, CLAIM, PRISMA, STARD, CHARMS, ARRIVE, or similar) and reports
451
+ corpus-level, study-level, or item-level PRESENT / PARTIAL / ABSENT / compliance counts
452
+ and percentages. The matrix cells are the authoritative source; headline numbers are
453
+ derivations and must be recomputed from cells via code before prose drafting.
454
+
455
+ **Precedent failure pattern for the reporting-quality trigger:**
456
+ > A reporting-quality systematic review reported corpus PRESENT at ~61% in v1.0; cell-level
457
+ > recomputation on v1.1 produced ~51% (delta ~10 percentage points). The error survived
458
+ > internal consistency because every downstream table, figure caption, and abstract
459
+ > sentence echoed the hand-tallied v1.0 total. Recomputation from matrix cells — not from
460
+ > hand-tallied per-study totals — is the only reliable source for headline numbers.
461
+
462
+ **Procedure:**
463
+
464
+ 1. **3-way matching.** For every pooled estimate, subgroup result, and Table value, establish
465
+ that the text ↔ Table (`analysis/tables/*.csv`) ↔ extraction CSV (`data_extraction_*.csv`)
466
+ triplet agrees. Random-sample 5 claims if the full set is large.
467
+
468
+ 2. **Primary-source back-check.** For each sampled claim, locate the original paper's Table
469
+ or Figure coordinate and confirm the value. Record page number.
470
+
471
+ 3. **Analysis-script audit.** Grep all `.R` / `.py` scripts for `matrix(`, `c(`, `data.frame(`,
472
+ and `fisher.test(`. Any numerical literal without a CSV-coordinate comment is flagged —
473
+ even if the value happens to be right. Hand-typed numerical literals are a structural risk,
474
+ not a cosmetic issue.
475
+
476
+ 4. **Tag removal.** Every `[VERIFY-CSV]` tag may be removed only after that specific value
477
+ has been confirmed in steps 1–3. Record the removal in `qc/_pipeline_log.md`:
478
+ ```
479
+ ## Numerical Claim Audit (Phase 7.3a)
480
+ - [VERIFY-CSV] tags cleared: {N}/{N}
481
+ - 3-way mismatches found: {count}
482
+ - Hand-typed script literals without CSV comment: {count}
483
+ - Primary-source disagreements: {count} ← P0 blocker if >0
484
+ ```
485
+
486
+ 5. **Blocker policy.** A direction reversal or a significance-boundary crossing (p<0.05 ↔
487
+ p≥0.05) is a P0 blocker — halt Step 7.4 and alert the user. Other mismatches are P1 and
488
+ must be fixed before Step 7.6 DOCX build.
489
+
490
+ 6. **Reporting-quality checklist SR — additional steps (only when that trigger fires).**
491
+ When the audit target is an items × studies checklist synthesis, run these in addition
492
+ to steps 1–5:
493
+
494
+ a. **Per-study totals recomputation.** For each included study, recompute the
495
+ PRESENT / PARTIAL / ABSENT / NA counts from the per-study matrix cells via code.
496
+ Hand-tallied per-study totals in any extraction or summary file are prohibited
497
+ as the authoritative source and must be replaced with the recomputed values.
498
+
499
+ b. **Corpus-level denominator recomputation.** The corpus denominator is
500
+ Σ non-NA across studies, not K × I (where K = studies, I = items). Compute
501
+ corpus PRESENT % = Σ PRESENT / Σ non-NA and repeat for PARTIAL and ABSENT.
502
+ An NA-unaware denominator is a P1 defect because it shifts every percentage.
503
+
504
+ c. **Item-level roll-up.** For each item, count how many of K studies are PRESENT,
505
+ PARTIAL, ABSENT, or NA. Flag universal-ABSENT and universal-NA items —
506
+ these drive the Discussion paragraph and must be listed explicitly, not
507
+ described generally.
508
+
509
+ d. **3-way consistency.** Every headline number in the manuscript (abstract,
510
+ Results paragraph, Tables, Figure captions) must trace back to: manuscript
511
+ text ↔ per-study JSON or extraction file ↔ summary document (e.g.,
512
+ `*_summary.md`). All three must agree to the last decimal place.
513
+
514
+ e. **Source artifacts expected.** The audit expects to find a reproducible
515
+ script (e.g., `analysis/recompute_matrix_totals.py`) that loads the per-study
516
+ cells, recomputes every headline number from cells, emits a
517
+ `numerical_claims_log.csv` (claim_id | description | value | source |
518
+ computation), and exits non-zero on any 3-way mismatch. Absence of such a
519
+ script is itself a P1 finding to flag for the user.
520
+
521
+ This step composes with — not replaces — `/self-review` Phase 2.5a. Run it here for pipeline
522
+ completeness even when `/self-review` is also invoked.
523
+
524
+ #### Step 7.3b: Estimand Provenance & Promised-Analysis Audit
525
+
526
+ Step 7.3/7.3a verify that citations and numbers are real. This step verifies that the
527
+ manuscript's **claims trace to the artifacts they should** — the pre-registration / protocol,
528
+ and the analyses Methods promised. These survive Step 7.3a because the prose is internally
529
+ consistent.
530
+
531
+ **Trigger:** any manuscript with a pre-registered or protocol-defined primary analysis, an
532
+ E-value / unmeasured-confounding statement, or a Statistical Analysis subsection that names
533
+ analyses (interaction, subgroup, sensitivity, multiple imputation). Skip for case reports.
534
+
535
+ 1. **Delegate the cross-check to `/self-review` Phase 2.5f** (claim-vs-artifact). It runs the
536
+ deterministic estimand + E-value checks and returns `PRIMARY_REASSIGNED` / `ESTIMAND_DRIFT`
537
+ (the primary contrast was re-designated after results were known, or does not match the
538
+ registration) and `EVALUE_ARITHMETIC` / `EVALUE_NON_PRIMARY` (a reported E-value does not
539
+ recompute from its primary estimate, or is borrowed from a secondary one). Any of these is a
540
+ **P0 blocker** — halt before Step 7.4 and route to **Step 7.4a (Audit Recovery Branch)**.
541
+ The fix is to report the pre-specified and revised models coequally and disclose the change
542
+ in the Abstract and Limitations, never to silently lead with the more favourable estimate.
543
+
544
+ 2. **Methods-promised-analysis completeness (inline grep).** Every analysis named in the Methods
545
+ Statistical Analysis subsection must appear in Results:
546
+
547
+ ```bash
548
+ # promised in Methods
549
+ grep -ioE "interaction|subgroup|sensitivity analysis|multiple imputation|mediation|competing risk|landmark|E-value" \
550
+ manuscript/index.qmd | sort -u
551
+ ```
552
+
553
+ Cross-check each hit against the Results section. A promised-but-absent analysis is a **HALT**:
554
+ add it to Results, remove the promise from Methods, or file a protocol amendment. Log the
555
+ checklist to `qc/_pipeline_log.md`.
556
+
557
+ 3. **Reverse direction — disk-present-but-unreported.** The forward grep only catches analyses
558
+ the Methods promised. An analysis that was *run* but whose result is missing from the paper —
559
+ often because it undercuts the headline — needs the opposite scan. Delegate to
560
+ `/self-review` Phase 2.5f's coverage gate, which reads an `_analysis_outputs.md` manifest (or
561
+ globs the analysis directory) and reconciles every output file against the manuscript body:
562
+
563
+ ```bash
564
+ python3 "${MEDSCI_SKILLS_ROOT:-$HOME/workspace/medsci-skills}/skills/self-review/scripts/check_artifact_coverage.py" \
565
+ --manuscript manuscript/index.qmd --analysis-dir output/analysis --strict
566
+ ```
567
+
568
+ A `DISK_UNREPORTED` analysis-bearing output (an added-value DeLong CSV, a calibration table)
569
+ is a **HALT**: report it or document why it was dropped.
570
+
571
+ This step composes with `/self-review` Phase 2.5f; run it here for pipeline completeness even
572
+ when `/self-review` is also invoked.
573
+
574
+ #### Step 7.3c: Reference Adequacy Gate
575
+
576
+ Step 7.3/7.3a/7.3b verify reference **integrity** — that the cited references are real and the
577
+ numbers/estimands trace to their artifacts. This step is the complementary **reference adequacy**
578
+ check: are there *enough* relevant references, in the right sections, and does **every named
579
+ statistical method or reporting guideline carry a citation**? The dominant failure mode in an
580
+ autonomous draft is a Statistical Analysis subsection that names a competing-risk model, multiple
581
+ imputation, the E-value, and an eGFR equation with **zero citations** — internally consistent
582
+ prose that no integrity check flags.
583
+
584
+ Delegate the detection to the self-review checker (same cross-skill pattern Step 7.3b uses for
585
+ `check_artifact_coverage.py`). Resolve the manuscript path with the fallback chain
586
+ `SSOT.yaml::truth.manuscript_md` → `manuscript/manuscript.md` → `manuscript/index.qmd`; pass the
587
+ `project.yaml` paper type verbatim (the script's alias map handles repo names); pass the journal
588
+ reference cap from the chosen `references/journal_profiles/<journal>.md` when known.
589
+
590
+ ```bash
591
+ python3 "${MEDSCI_SKILLS_ROOT:-$HOME/workspace/medsci-skills}/skills/self-review/scripts/check_reference_adequacy.py" \
592
+ --manuscript "$MANUSCRIPT" --bib "$BIB" \
593
+ --article-type "$TYPE" ${CAP:+--journal-cap "$CAP"} \
594
+ --out qc/reference_adequacy.json # no --strict: write-paper decides the action from the JSON
595
+ ```
596
+
597
+ Parse `qc/reference_adequacy.json` and act:
598
+
599
+ 1. **Methods citation completeness (blocking).** Any `methods_zero_citations: true` (for an
600
+ original/AI-validation/meta-analysis paper) **or** any `methods_named_method_uncited`
601
+ (statistical tier) finding is a reference-acquisition blocker. **Interactive:** loop
602
+ `/search-lit` (Manuscript Paper Reference Pool mode) → `/lit-sync` → `/verify-refs --strict`,
603
+ then re-run this gate until the named-method gap clears. **`--autonomous` mode** (where
604
+ `/lit-sync` needs the Zotero GUI and cannot run unattended): do **not** infinite-loop — record
605
+ `SEARCH_LIT_REQUIRED` plus the uncited-method list in `qc/_pipeline_log.md`, surface it to the
606
+ owner, and continue producing the draft (the same deferral Phase 0 applies to unresolved
607
+ `[@NEW:]` placeholders).
608
+ 2. **Total count (loop, then warn).** `reference_count_verdict: "BELOW_TARGET"` triggers one
609
+ `/search-lit` acquisition round; if the field is genuinely sparse and the count stays low,
610
+ downgrade to a logged WARN rather than blocking. **Never fabricate references to hit a target.**
611
+
612
+ All additions flow `/search-lit` → `/lit-sync` → `/verify-refs --strict` only; this skill never
613
+ writes references from memory, and the checker emits `fixable_by_ai: false` (it diagnoses gaps, it
614
+ does not write citations). Append the result to `qc/_pipeline_log.md`:
615
+
616
+ ```md
617
+ ## Reference Adequacy Gate (Phase 7.3c)
618
+ - Article type / Journal cap: {type} / {cap|unknown}
619
+ - Cited references: {N} Effective target: {min}-{max}
620
+ - Section distribution: Intro {N} / Methods {N} / Results {N} / Discussion {N}
621
+ - Named methods checked: {N} Uncited: {list}
622
+ - Action: PASS | SEARCH_LIT_REQUIRED | HALT_UNVERIFIED_REFS
623
+ ```
624
+
625
+ This step composes with `/self-review` Phase 2.5c-2, which re-runs the same checker with `--strict`
626
+ and folds its findings into the review JSON; run it here so a reference-acquisition loop precedes
627
+ the prose self-review in Step 7.4.
628
+
629
+ #### Step 7.4: Self-Review + Fix Loop
630
+
631
+ Call `/self-review --json --fix` on the current `manuscript/manuscript.md`.
632
+
633
+ This delegates the entire fix loop to the self-review skill, which:
634
+ 1. Runs systematic review (Phase 2) and generates a JSON report (Phase 3c).
635
+ 2. If `verdict` is `"REVISE"`: filters `fixable_by_ai` issues, applies text edits to `manuscript.md`, and re-reviews — up to 2 fix-and-re-review iterations.
636
+ 3. If `verdict` is `"PASS"` after any iteration: stops early.
637
+ 4. Returns the final JSON report with updated scores.
638
+
639
+ **High-stakes manual pass (optional):** this autonomous loop deliberately uses the single-pass review — a multi-agent panel is *not* auto-applied in the pipeline (it spawns several reviewer agents plus an editor, multiplying token cost). For a top-tier or otherwise high-stakes manuscript, run `/self-review --panel` once manually as a final pre-submission pass (it diagnoses and prioritizes but does not auto-fix, so triage its findings yourself).
640
+
641
+ After `/self-review --json --fix` completes:
642
+ - Parse the final JSON output block.
643
+ - Log the final `overall_score`, `verdict`, fix iteration count, and any remaining issues to `qc/_pipeline_log.md`.
644
+ - If any `severity: "fatal"` issue remains: **route to Step 7.4a (Audit Recovery Branch)** — do NOT proceed to Step 7.5.
645
+ - If no fatal issue remains: proceed to Step 7.5.
646
+
647
+ #### Step 7.4a: Audit Recovery Branch
648
+
649
+ **Purpose:** the linear polish flow assumes remaining issues are prose-level, but some
650
+ self-review findings are structural — underlying data, protocol application, or analysis
651
+ script is wrong, not prose. Continuing through Step 7.5 – 7.6 in that case produces a
652
+ polished manuscript built on a broken foundation. This step makes the recovery loop
653
+ explicit.
654
+
655
+ **Trigger (any one from Step 7.4 JSON):** fatal issue in category `accuracy`,
656
+ `data_fidelity`, `protocol_mismatch`, or `numerical_claim`; unresolved Step 7.3a primary-
657
+ source disagreement; `[VERIFY-CSV]` tag persisting after two fix iterations; registered
658
+ protocol ↔ delivered analysis inconsistency; reviewer-consensus ↔ locked-dataset
659
+ disagreement. Inline text fixes are forbidden — recovery requires re-extraction,
660
+ re-analysis, or re-registration.
661
+
662
+ **Routing table:**
663
+
664
+ | Symptom | Route to |
665
+ |---|---|
666
+ | MA pooled/forest/subgroup/funnel numbers disagree with source | `/meta-analysis` Phase 10 |
667
+ | MA protocol ↔ analysis mismatch (eligibility, outcome, subgroup) | `/meta-analysis` Phase 10 + registry amendment |
668
+ | Primary-study numerical claim disagrees with source Table/Figure | `/meta-analysis` Phase 6b, then return |
669
+ | Non-MA extraction error affecting Table 1 / primary endpoint | Return to Phase 2, re-enter Phase 3 – 7 for affected sections |
670
+ | Non-MA protocol amendment needed | HALT — human decision |
671
+
672
+ **Sequence**: (1) halt Steps 7.5 – 7.6; (2) log the branch decision to
673
+ `qc/_pipeline_log.md`; (3) invoke the routed skill with the specific findings; (4) on
674
+ re-entry, resume at Step 7.3 (Citation Verification) — not Step 7.1, because recovery
675
+ may have introduced new citations — and carry any change summary to Phase 8+;
676
+ (5) loop budget is one cycle — a second cycle should trigger a root-cause review of
677
+ Phase 2 / 6 / 6b rather than another recovery.
678
+
679
+ **Autonomous mode.** In `--autonomous`, the orchestrator may auto-invoke the routed
680
+ recovery skill. If the recovery requires human decision (protocol amendment, eligibility
681
+ re-scope), the run stops and flags `RECOVERY_HALT_HUMAN_DECISION` in the log.
682
+
683
+ **Load-on-demand procedural detail** (full trigger list, log-block template, per-route
684
+ re-entry checklist, autonomous-mode edge cases):
685
+ `${CLAUDE_SKILL_DIR}/references/section_guides/step7_4a_audit_recovery.md`.
686
+
687
+ #### Step 7.5: Generate Deliverables
688
+
689
+ Log the self-review fix loop results to `qc/_pipeline_log.md`:
690
+ ```
691
+ ## Self-Review Fix Loop (Phase 7.4)
692
+ - Initial score: {score_before} → Final score: {score_after}
693
+ - Fix iterations: {N}/2
694
+ - Fixed issues: {count}
695
+ - Remaining issues (human review needed): {count}
696
+ - Final verdict: {PASS|REVISE}
697
+ ```
698
+
699
+ Generate the following files:
700
+ - `manuscript/manuscript.md`: Complete manuscript (with LLM disclosure in Methods and Acknowledgments if enabled)
701
+ - `manuscript/title_page.md`: Title page with author info, word count, key points if required
702
+ - `qc/reporting_checklist.md`: Filled reporting guideline checklist from Step 7.2
703
+ - `qc/self_review.md`: Final self-review report from Step 7.4
704
+ - `qc/_pipeline_log.md`: Pipeline execution log
705
+
706
+ #### Step 7.6: DOCX Build
707
+
708
+ Build the final submission-ready documents from the assembled components:
709
+
710
+ 1. **Input files**: `manuscript/manuscript.md`, `analysis/figures/_figure_manifest.md`, `analysis/tables/*.csv`
711
+ 2. **Figure embedding**: Parse `analysis/figures/_figure_manifest.md`. For each figure entry, verify the file exists at the specified path. Replace markdown image references `![Figure N. ...](path)` with the actual image path.
712
+ 3. **Table embedding**: For each `analysis/tables/*.csv` file referenced in the manuscript, the pandoc conversion will handle table formatting.
713
+ 4. **Pandoc conversion** (primary):
714
+ ```bash
715
+ pandoc manuscript/manuscript.md -o manuscript/manuscript_final.docx -V mainfont="Times New Roman" -V fontsize=12pt
716
+ pandoc manuscript/manuscript.md -o manuscript/manuscript_final.pdf --pdf-engine=xelatex -V geometry:margin=1in -V fontsize=11pt -V mainfont="Times New Roman"
717
+ ```
718
+ Ensure all figure image references use relative paths so figures render in both formats.
719
+
720
+ **With pandoc citeproc + journal CSL** (when manuscript uses `[@bibkey]` citations and a `.bib` is available — preferred for any submission with > 5 references; mandatory when reviewers have asked for "automatically generated reference list"):
721
+
722
+ The validation + render scripts live in `/manage-refs` (split out 2026-05-01). Either invoke `/manage-refs` directly (recommended), or call the scripts manually:
723
+ ```bash
724
+ MR="${MEDSCI_SKILLS_ROOT:-$HOME/workspace/medsci-skills}/skills/manage-refs"
725
+
726
+ # 1. Validate keys vs .bib first (fail fast on UNDEFINED keys; [@NEW:topic] placeholders pass through)
727
+ python "$MR/scripts/check_citation_keys.py" \
728
+ manuscript/manuscript.md manuscript/_src/refs.bib
729
+
730
+ # 2. Render with journal CSL (see manage-refs/citation_styles/ for bundled CSLs)
731
+ "$MR/scripts/render_pandoc.sh" \
732
+ -j european-radiology \
733
+ -i manuscript/manuscript.md \
734
+ -b manuscript/_src/refs.bib \
735
+ -o manuscript/manuscript_final.docx
736
+ ```
737
+ Bundled CSLs: `european-radiology`, `radiology`, `american-journal-of-roentgenology`,
738
+ `cardiovascular-and-interventional-radiology`, `korean-journal-of-radiology`,
739
+ `vancouver`, `vancouver-superscript`. Use `radiology` for RYAI; use `vancouver` for JVIR
740
+ (no dedicated CSL). On rejection cascade (e.g., ER → JVIR → CVIR), re-render with
741
+ different `-j` — references reformat in seconds. Never hand-type the References list.
742
+
743
+ **Decision: pandoc vs Zotero Word plugin (CWYW)** — `/manage-refs` documents the hybrid 3-phase strategy (Phase 1 pandoc draft → Phase 2 transition → Phase 3 Zotero CWYW for circulation/revision/submission). Use Workflow B (CWYW) once co-authors collaborate live in Word; use Workflow A (pandoc) for single-author lockdown, journal-cascade rejection re-formatting, or when the plugin is unavailable. See
744
+ `~/.claude/rules/manuscript-references.md` and `skills/manage-refs/SKILL.md`.
745
+ 5. **Fallback** (if pandoc is unavailable): Generate the DOCX using python-docx:
746
+ - Parse `manuscript/manuscript.md` sections (`##` → Heading 2, `###` → Heading 3, `**bold**` → bold runs)
747
+ - Insert figures as inline images at their markdown reference locations
748
+ - Insert tables as formatted Word tables from CSV sources
749
+ - Apply Times New Roman 12pt, double spacing, 1-inch margins, page numbers
750
+ - Save as `manuscript/manuscript_final.docx`
751
+ 6. **Verify output**: Confirm `manuscript/manuscript_final.docx` exists and is non-empty. Report file size.
752
+
753
+ #### Step 7.6a: Cross-Reference QC (Manuscript ↔ rendered DOCX)
754
+
755
+ Catches the failure mode where in-text Table/Figure citations resolve to the
756
+ wrong rendered caption. Internal consistency (Phase 2.5 of `/self-review`)
757
+ does NOT catch this because both the body prose and the build script can echo
758
+ their own divergent SSOTs cleanly. Precedent: an STROBE cohort manuscript revision —
759
+ body cited "Supplementary Table S4 (a sensitivity-analysis)" but the rendered DOCX S4
760
+ was a diagnostics table; S1, S6, S7 mismatched and S8, S9 were cited but absent from
761
+ the DOCX entirely.
762
+
763
+ **Run after Step 7.6 DOCX build and before Step 7.7 final gate:**
764
+
765
+ ```bash
766
+ MR="${MEDSCI_SKILLS_ROOT:-$HOME/workspace/medsci-skills}/skills/manage-refs"
767
+ python3 "$MR/scripts/check_xref.py" \
768
+ --md manuscript/manuscript.md \
769
+ --docx manuscript/manuscript_final.docx \
770
+ --out qc/xref_audit.json \
771
+ --strict
772
+ ```
773
+
774
+ The script extracts (a) every `(Supplementary )?(Table|Figure)\s+(S?\d+[A-Z]?)`
775
+ in-text citation, (b) caption definitions from `## Tables` / `## Figures` /
776
+ `## Figure Legends` / `## Supplementary {Tables,Figures}` sections in the body,
777
+ and (c) caption paragraphs in the rendered DOCX (via python-docx). It then
778
+ emits a 3-way matrix to `qc/xref_audit.json`:
779
+
780
+ | Status | Meaning | Severity |
781
+ |---|---|---|
782
+ | `OK` | cited + body caption + DOCX caption all present and caption text agrees (Jaccard ≥ 0.40) | — |
783
+ | `MISSING_DOCX` | cited but no caption with that label in the rendered DOCX | **P0 blocker** |
784
+ | `MISSING_BODY` | cited but no caption definition in the markdown body sections (build SSOT drift) | **P0 blocker** |
785
+ | `MISMATCH` | label exists in both body and DOCX but caption text disagrees | **P0 blocker** |
786
+ | `UNCITED` | caption defined or rendered but never cited in main text | warn |
787
+ | `NOT_CITED_NO_BODY` | label appears only in DOCX (rare; legacy artifact) | warn |
788
+
789
+ **Submission gate:** if any `MISSING_DOCX` / `MISSING_BODY` / `MISMATCH` row is
790
+ present, `submission_safe: false` and the script exits 1 under `--strict`.
791
+ HALT pipeline. Do NOT proceed to Step 7.7. Route fixes by symptom:
792
+
793
+ - `MISSING_BODY` → add caption definition under `## Tables` / `## Figures` in
794
+ `manuscript.md`, then re-run Step 7.6 + 7.6a. If the build script
795
+ (`build_manuscript_docx.py` or equivalent) carries its own hardcoded caption
796
+ list, that is the IMPROVEMENT_QUEUE #2 SSOT-unification issue — flag it.
797
+ - `MISSING_DOCX` → either drop the citation (the table/figure was retired) or
798
+ re-add the table/figure to the build pipeline, then rebuild DOCX.
799
+ - `MISMATCH` → reconcile body vs build script. Body caption is the SSOT;
800
+ update the build pipeline to match, never the reverse.
801
+
802
+ Log the run to `qc/_pipeline_log.md`:
803
+ ```
804
+ ## Cross-Reference QC (Phase 7.6a)
805
+ - in-text citations: {N}
806
+ - unique labels: {N}
807
+ - OK: {N} | MISSING_DOCX: {N} | MISSING_BODY: {N} | MISMATCH: {N} | UNCITED: {N}
808
+ - submission_safe: {true|false}
809
+ - audit: qc/xref_audit.json
810
+ ```
811
+
812
+ If `python-docx` is unavailable, the script falls back to a body-only audit
813
+ (citations vs body captions) with a warning. Install with `pip install python-docx`.
814
+
815
+ #### Step 7.7: Final Gate
816
+
817
+ - **Autonomous mode**: Log completion to `qc/_pipeline_log.md`. Report summary: word count, figure count, self-review score, reporting compliance percentage, any FATAL flags.
818
+ - **Interactive mode**: Present the full summary to the user and await confirmation.
819
+
820
+ ---
821
+
822
+ ### Phase 8+ (Optional): Cover Letter Generation
823
+
824
+ Triggered when the user requests "generate cover letter" or after `/find-journal` recommendation.
825
+
826
+ This is an optional post-pipeline step. Do NOT generate automatically — only when explicitly requested.
827
+
828
+ **Required user inputs (MUST ask, never fabricate):**
829
+ 1. Editor name (if known; otherwise use "Dear Editor")
830
+ 2. Suggested reviewers (2-3 names with affiliations and email addresses)
831
+ 3. Excluded reviewers (if any, with brief reason)
832
+ 4. Any specific points to emphasize for the target journal
833
+
834
+ **Cover letter structure:**
835
+
836
+ 1. **Salutation**: "Dear [Editor name / Editor],"
837
+ 2. **Submission statement**: "We submit our manuscript entitled '[Title]' for consideration as [article type] in [Journal Name]."
838
+ 3. **Novelty statement** (2-3 sentences): What is new and why it matters. Extract from abstract key findings.
839
+ 4. **Scope fit** (1-2 sentences): Why this journal is appropriate. Reference journal scope from profile if loaded.
840
+ 5. **Brief methods** (1 sentence): Study design and key numbers.
841
+ 6. **Ethical compliance**: IRB approval number, author agreement, COI statement, no dual submission.
842
+ 7. **AI disclosure** (if applicable): Specific AI tools used and human oversight statement.
843
+ 8. **Suggested reviewers**: Name, affiliation, email, expertise area (2-3 minimum).
844
+ 9. **Excluded reviewers** (if any): Name and reason.
845
+
846
+ **Reviewer COI cross-check (mandatory for meta-analyses):**
847
+ Cross-check all suggested and excluded reviewers against the included-study author list and their co-authors. Same-institution authors of included studies constitute automatic COI and must be excluded from reviewer suggestions.
848
+ 10. **Closing**: Corresponding author name and credentials.
849
+
850
+ **Anti-overclaiming guard:**
851
+ Automatically flag and rewrite any of these words in cover letters: "first," "novel," "unprecedented," "groundbreaking," "paradigm-shifting," "revolutionary." Replace with specific factual statements about what the study contributes.
852
+
853
+ **Word limit:** 300-500 words. Cover letters exceeding 500 words should be trimmed.
854
+
855
+ ---
856
+
857
+ ## LLM-Assisted Writing Principles
858
+
859
+ When using this skill (or any LLM) for manuscript drafting, follow this 3-step process:
860
+
861
+ 1. **Structure first**: The user (or the skill) outlines the logical flow, key arguments, and paragraph-level plan *before* generating prose. An LLM cannot evaluate its own output without a pre-defined target.
862
+ 2. **LLM drafts**: Generate prose based on the structured plan.
863
+ 3. **Critical evaluation**: Review LLM output against the plan. Check for logical gaps, unsupported claims, AI pattern phrases, and deviation from the intended argument. Revise or reject sections that do not meet the standard.
864
+
865
+ This principle applies at every phase: the outline (Phase 1) is the structure; the writer pass is the LLM draft; the critic-fixer loop is the critical evaluation. The user remains the final arbiter of scientific accuracy and narrative direction.
866
+
867
+ ---
868
+
869
+ ## Critic Scoring Rubric
870
+
871
+ Each section goes through a critic-fixer loop. The critic scores 6 dimensions (0-20 each, total 0-120 scaled to 0-100).
872
+
873
+ ### Dimensions
874
+
875
+ | # | Dimension | What the critic checks |
876
+ |---|-----------|----------------------|
877
+ | 1 | **Accuracy** | Every claim matches data/tables. No fabricated numbers. Effect directions correct. |
878
+ | 2 | **Completeness** | All required elements per reporting guideline present. No missing subsections. |
879
+ | 3 | **Clarity** | Each sentence parseable on first read. No ambiguous referents. Logical paragraph flow. |
880
+ | 4 | **Conciseness** | No filler phrases, redundant sentences, or unnecessary hedging. Within word budget. |
881
+ | 5 | **Reporting** | Specific guideline items (STARD/TRIPOD/CLAIM/etc.) addressed in this section. |
882
+ | 6 | **Humanness** | No AI writing patterns detected (see list below). Reads like an experienced physician wrote it. |
883
+ | 7 | **Section Boundaries** | **Results only:** No interpretation, no "why," no prior literature references, no evaluative adjectives without numbers. **Discussion only:** No new data not in Results, no overclaiming beyond evidence level. Flag any sentence that belongs in the other section. |
884
+
885
+ > **Note:** Dimensions 1-6 are scored 0-20 each (total 0-120 scaled to 0-100). Dimension 7
886
+ > is a **pass/fail gate** applied during Phase 4 (Results) and Phase 5 (Discussion): if any
887
+ > sentence violates section boundaries, the critic MUST flag it regardless of overall score.
888
+ > The fixer must move or rewrite the flagged sentence before the section can pass.
889
+
890
+ ### Scoring Guide
891
+
892
+ - **18-20**: Publication-ready. No changes needed.
893
+ - **14-17**: Minor revisions. Specific sentences flagged.
894
+ - **10-13**: Moderate revisions. Structural or content gaps.
895
+ - **0-9**: Major rewrite. Fundamental issues.
896
+
897
+ ### Pass Threshold
898
+
899
+ - Overall score >= 85/100 to pass.
900
+ - No single dimension below 12/20.
901
+ - If either condition fails, trigger fixer round.
902
+
903
+ ### Critic Output Format
904
+
905
+ ```
906
+ ## Critic Report: {Section Name} -- Round {N}
907
+
908
+ Overall: {score}/100
909
+ Accuracy: {}/20 | Completeness: {}/20 | Clarity: {}/20
910
+ Conciseness: {}/20 | Reporting: {}/20 | Humanness: {}/20
911
+
912
+ ### Issues (by priority)
913
+ 1. [Dimension] Line/paragraph reference: {specific issue} -> {suggested fix}
914
+ 2. ...
915
+
916
+ ### Verdict: {PASS | REVISE}
917
+ ```
918
+
919
+ ---
920
+
921
+ ## Manuscript Writing Rules
922
+
923
+ ### Prose Quality
924
+
925
+ - **Full prose only.** NEVER use bullet points or numbered lists in manuscript sections (Methods, Results, Discussion, Introduction). Bullet points are acceptable only in structured abstracts if the journal format requires them.
926
+ - **Active voice preferred.** "We analyzed" not "Analysis was performed." Use passive only when the agent is truly irrelevant.
927
+ - **Tense conventions:**
928
+ - Methods and Results: past tense ("We enrolled," "The AUC was")
929
+ - Discussion and Introduction: present tense for established facts ("Lung cancer is"), past tense for study-specific findings ("Our results showed")
930
+ - Abstract: matches the section it describes
931
+ - **Paragraph structure:** Each paragraph has one main idea. First sentence states the point; subsequent sentences provide evidence or elaboration.
932
+ - **Transitions:** Every paragraph connects logically to the next. Use explicit transition phrases sparingly but effectively.
933
+
934
+ ### Data Integrity
935
+
936
+ - All numbers in text must match the corresponding table cells exactly.
937
+ - Report effect sizes with 95% confidence intervals for all primary endpoints.
938
+ - Use exact p-values (p = 0.032) rather than thresholds (p < 0.05), except when p < 0.001.
939
+ - Percentages must match: if 23 of 150, write "23 (15.3%)" -- verify the math.
940
+ - Never round numbers differently between text and tables.
941
+
942
+ ### AI Pattern Avoidance
943
+
944
+ The manuscript must NOT contain these patterns commonly flagged as AI-generated:
945
+
946
+ **Forbidden phrases:**
947
+ - "In conclusion" (use "In summary" or rephrase)
948
+ - "It is worth noting that"
949
+ - "It is important to note that"
950
+ - "Notably,"
951
+ - "Interestingly,"
952
+ - "Importantly,"
953
+ - "Furthermore," at sentence start (use "In addition," or restructure)
954
+ - "Moreover," at sentence start
955
+ - "plays a crucial role"
956
+ - "a comprehensive analysis"
957
+ - "delve into"
958
+ - "leverage" (use "use" or "apply")
959
+ - "utilize" (use "use")
960
+ - "in the realm of"
961
+ - "underscores the importance of"
962
+ - "sheds light on"
963
+ - "paves the way for"
964
+ - "a nuanced understanding"
965
+ - "the landscape of"
966
+ - "a paradigm shift"
967
+ - "robust" (unless describing a statistical method)
968
+
969
+ **Forbidden structural patterns:**
970
+ - Three-part list sentences ("X, Y, and Z" repeated across paragraphs)
971
+ - Excessive hedging chains ("may potentially be associated with possible")
972
+ - Mirror-structure paragraphs (same template repeated with different content)
973
+ - Grandstanding opening sentences ("In the rapidly evolving landscape of...")
974
+
975
+ **Preferred alternatives:**
976
+ - Vary sentence structure and length within paragraphs.
977
+ - Use specific, concrete language over abstract generalizations.
978
+ - Let data speak: "The AUC was 0.92" rather than "The model demonstrated remarkable performance."
979
+
980
+ ### Journal Compliance
981
+
982
+ - Respect all word limits from the loaded journal profile.
983
+ - Follow the journal's structured abstract format exactly.
984
+ - Use the journal's citation style (Vancouver numbered for most radiology journals).
985
+ - Include all journal-specific required elements (e.g., "Key Points" for AJR, CLAIM checklist for RYAI AI studies).
986
+
987
+ ---
988
+
989
+ ## Skill Interactions
990
+
991
+ This skill orchestrates other skills at specific phases:
992
+
993
+ | Phase | Skill called | Purpose |
994
+ |-------|-------------|---------|
995
+ | 2 | `/analyze-stats` | Statistical analysis for tables |
996
+ | 2 | `/make-figures --study-type` | Figure generation with study-type auto-detection |
997
+ | 7.1 | (built-in) | AI pattern removal |
998
+ | 7.2 | `/check-reporting` | Reporting guideline compliance + auto-fix MISSING items |
999
+ | 7.3 | `/verify-refs` | Citation verification and reference artifact audit |
1000
+ | 7.4 | `/self-review --json` | Self-review with auto-fix loop (max 2 iterations) |
1001
+ | 7.4a | `/meta-analysis` Phase 10 (MA manuscripts) | Audit recovery branch — rebuild extraction/analysis/figures/body when self-review surfaces structural data or protocol issues |
1002
+ | 7.5 | `/humanize` | AI-pattern density sweep (<2.0 / 1000 words) |
1003
+ | 7.5a | `/academic-aio` (optional, off by default) | AI-search-engine and RAG visibility checklist — run after humanize so QC-confirmed claims and human-readable text anchor the PASS/PARTIAL/FAIL report. Opt-in via `--aio` or when preparing preprint / GitHub README / CITATION.cff / HF card alongside submission. Silent pipeline execution is explicitly prohibited by the skill's Communication Rules. |
1004
+ | 7.6 | `/manage-refs` (pandoc citeproc / Zotero CWYW) | DOCX build from manuscript/manuscript.md + analysis/figures + analysis/tables. Bibliography rendering delegated to `/manage-refs scripts/render_pandoc.sh` since 2026-05-01. |
1005
+ | 7.6a | `/manage-refs scripts/check_xref.py --strict` | Cross-reference QC: in-text Table/Figure citations ↔ body captions ↔ rendered DOCX captions (3-way matrix). Submission gate. |
1006
+ | 8+ | `/find-journal` | Journal scope for cover letter (optional) |
1007
+
1008
+ If a called skill is not available, perform that step inline using the relevant section of this skill document as guidance.
1009
+
1010
+ ---
1011
+
1012
+ ## LLM Writing Disclosure
1013
+
1014
+ When LLM disclosure is enabled (default), the skill generates transparency statements
1015
+ compliant with ICMJE 2025 and COPE guidelines. The user can disable this with `--no-llm-disclosure`.
1016
+
1017
+ ### Why Default ON
1018
+
1019
+ Major journals (Nature, Lancet, Radiology, JAMA) and the ICMJE (2025 update) require
1020
+ disclosure of AI writing assistance. Omitting disclosure risks rejection or retraction.
1021
+ The default-on design protects the user; they can opt out for journals with no such policy
1022
+ or when LLM assistance was minimal.
1023
+
1024
+ ### Disclosure Locations (3 places)
1025
+
1026
+ #### 1. Methods Section — Last Paragraph
1027
+
1028
+ Insert at the end of the Methods section, after the ethics statement:
1029
+
1030
+ **Template (adapt to specifics):**
1031
+ ```
1032
+ [AI-Assisted Writing Disclosure]
1033
+ An artificial intelligence language model (Claude, Anthropic) was used to assist with
1034
+ manuscript drafting, including structuring sections, refining prose, and verifying
1035
+ internal consistency of reported statistics. All content was critically reviewed,
1036
+ verified against source data, and approved by all authors. The AI tool was not involved
1037
+ in study design, data collection, data analysis, or interpretation of results.
1038
+ ```
1039
+
1040
+ **Customization rules:**
1041
+ - Replace "Claude, Anthropic" with the actual tool(s) used.
1042
+ - List specific tasks the LLM performed (drafting, editing, literature search, statistical code).
1043
+ - If the LLM was also used for data analysis (e.g., statistical code generation via
1044
+ `/analyze-stats`), state this explicitly: "was also used to generate statistical
1045
+ analysis code, which was reviewed and validated by [statistician/author]."
1046
+ - Keep to 2-3 sentences. Do not over-explain.
1047
+
1048
+ #### 2. Acknowledgments Section
1049
+
1050
+ **Template:**
1051
+ ```
1052
+ The authors acknowledge the use of [Claude/tool name] ([Anthropic/developer]) for
1053
+ writing assistance in preparing this manuscript. The authors retain full responsibility
1054
+ for the content.
1055
+ ```
1056
+
1057
+ #### 3. Cover Letter — AI Disclosure Paragraph (Phase 8+)
1058
+
1059
+ **Template:**
1060
+ ```
1061
+ In accordance with [Journal Name]'s policy on AI-assisted writing, we disclose that
1062
+ [Claude/tool name] was used to assist with manuscript preparation, specifically
1063
+ [list tasks: drafting, language editing, statistical code review]. All authors have
1064
+ reviewed and take responsibility for the final content. The AI tool was not listed
1065
+ as an author and did not contribute to study conception, design, or data interpretation.
1066
+ ```
1067
+
1068
+ ### What NOT to Disclose
1069
+
1070
+ - Do not disclose routine use of grammar checkers (Grammarly, Word spell-check) — these
1071
+ are not considered generative AI under current ICMJE guidance.
1072
+ - Do not disclose use of reference managers (Zotero, EndNote) or statistical software
1073
+ (R, Python) unless the LLM generated the analysis code.
1074
+
1075
+ ### Journal-Specific Overrides
1076
+
1077
+ When a journal profile is loaded in Phase 0, check for the `## AI Writing Disclosure Policy`
1078
+ section in the profile. Tier 1 profiles now include structured fields:
1079
+ - **Requirement level** (Required / Recommended / Not specified)
1080
+ - **Permitted scope** (All tasks / Language editing only / Not permitted)
1081
+ - **Disclosure location** (Methods / Acknowledgments / Cover letter / Submission form)
1082
+ - **AI-generated images** (Allowed / Banned / Not specified)
1083
+ - **Policy URL**
1084
+
1085
+ Use these fields to adjust disclosure language automatically. Key known policies:
1086
+ - **Radiology/RSNA**: Required; language editing only; Methods + Acknowledgments; AI images banned.
1087
+ - **RYAI/RSNA**: Required; language editing only; Methods + Acknowledgments; AI images banned.
1088
+ - **JAMA/AMA**: Required; language editing only; Methods + Cover letter.
1089
+ - **Lancet**: Required; language editing only ("readability and language"); Acknowledgments + prompts disclosed.
1090
+ - **BMJ**: Required; all tasks permitted but must disclose; Methods + Acknowledgments; applies to text, images, data, diagrams.
1091
+ - **Nature/Springer Nature**: Required; language editing only; Methods; AI images banned.
1092
+ - **Science/AAAS**: Most restrictive. LLM use limited; treated as potential misconduct if undisclosed.
1093
+
1094
+ If the loaded journal profile has no AI Writing Disclosure Policy section, fall back to
1095
+ ICMJE 2025 defaults (disclose in Methods + Acknowledgments, language editing scope).
1096
+
1097
+ ---
1098
+
1099
+ ## Error Handling
1100
+
1101
+ - If the user provides incomplete data for a table, flag specific missing values rather than inventing data.
1102
+ - If word count exceeds the journal limit after a section draft, report the overage and suggest specific cuts.
1103
+ - If the critic-fixer loop reaches 3 rounds without passing, present the best version to the user with the remaining issues listed, and ask for guidance.
1104
+ - Never fabricate references. If a citation is needed, describe the type of reference needed and ask the user to provide it, or call `/search-lit` to find a real one.
1105
+
1106
+ ## Resumption
1107
+
1108
+ If the user returns to a partially completed manuscript:
1109
+ 1. Check the workspace directory for existing drafts.
1110
+ 2. Identify which phase was last completed.
1111
+ 3. Summarize progress and ask the user where to resume.
1112
+
1113
+ ## Anti-Hallucination
1114
+
1115
+ - **Never fabricate references.** All citations must be verified via `/search-lit` with confirmed DOI or PMID. Mark unverified references as `[UNVERIFIED - NEEDS MANUAL CHECK]`.
1116
+ - **Never invent clinical definitions, diagnostic criteria, or guideline recommendations.** If uncertain, flag with `[VERIFY]` and ask the user.
1117
+ - **Never fabricate numerical results** — compliance percentages, scores, effect sizes, or sample sizes must come from actual data or analysis output.
1118
+ - If a reporting guideline item, journal policy, or clinical standard is uncertain, state the uncertainty rather than guessing.
1119
+
1120
+ ---
1121
+
1122
+ ## Gates
1123
+
1124
+ Severity levels: **ENFORCED** = pipeline halts on failure (cannot proceed to next phase). **ADVISORY** = warning logged, user may override. **OPT-IN** = runs only when explicitly invoked.
1125
+
1126
+ | Phase | Gate | Severity | Trigger | Action on fail |
1127
+ |---|---|---|---|---|
1128
+ | 0 | Backbone-article auto-proposal (Phase 0 "Identify a backbone article" action) | ADVISORY | refs.bib has methodologically similar candidate | Surface to user; user accepts/declines |
1129
+ | 7.0 | Citekey resolution (delegate `/manage-refs scripts/check_citation_keys.py`) | ENFORCED | UNDEFINED keys present | Halt; resolve via `/lit-sync` then re-run |
1130
+ | 7.0 | NEW_PLACEHOLDER drain (delegate `/manage-refs`) | ENFORCED at 7.6 entry | `[@NEW:topic]` markers remain | Resolve each before DOCX render |
1131
+ | 7.1 | Classical-style QC (manuscript-style-classical 11 items) | ENFORCED | § symbol > 0 OR AI Disclosure paragraph in body OR em-dash > 25 | Auto-fix or HALT for senior MA reviewer prep |
1132
+ | 7.2 | Reporting guideline compliance (`/check-reporting`) | ENFORCED at submission | <100% mandatory items present | Auto-fix MISSING; ADVISORY for partial |
1133
+ | 7.3 | Reference audit (`/verify-refs --strict`) | ENFORCED | FABRICATED or HIGH_MISMATCH_FIRST_AUTHOR > 0 | Halt; fix in Zotero, re-render refs.bib via `/lit-sync` |
1134
+ | 7.4 | Self-review fix loop (`/self-review --json --fix`) | ENFORCED | score below threshold after 2 iterations | Route to Step 7.4a Audit Recovery |
1135
+ | 7.4a | Audit Recovery branch (route to `/meta-analysis` Phase 10 for MA manuscripts) | ENFORCED in `--e2e` | self-review surfaced structural data issue | HALT with `RECOVERY_HALT_HUMAN_DECISION` if recovery validation fails twice |
1136
+ | 7.5 | Humanize density (`/humanize`) | ADVISORY | AI patterns > 2.0 / 1000 words | Sweep + flag remaining; user reviews |
1137
+ | 7.5a | AIO checklist (`/academic-aio --aio`) | OPT-IN | user supplies `--aio` flag | PASS/PARTIAL/FAIL report; never auto-applies |
1138
+ | 7.6 | DOCX build (delegate `/manage-refs scripts/render_pandoc.sh`) | ENFORCED | render exits non-zero | Halt; report stderr to user |
1139
+ | 7.6a | Cross-reference QC (delegate `/manage-refs scripts/check_xref.py --strict`) | ENFORCED — submission gate | MISSING_DOCX / MISSING_BODY / MISMATCH > 0 | Halt; route fixes per `references/check_xref_symptoms.md` |
1140
+ | 7.7 | Final submission gate | ENFORCED | any of 7.0–7.6a above failed | Refuse to mark `submission_safe: true` |
1141
+ | 8+ | Cover letter generation | OPT-IN | user invokes `--cover-letter` | Renders against journal profile |
1142
+
1143
+ Cross-cutting global rules applied during 7.x QC:
1144
+ - `manuscript-style-classical.md` (11 items, Phase 7.1 — ENFORCED)
1145
+ - `manuscript-references.md` (hand-typed References list — ENFORCED via Phase 7.6 delegation)
1146
+ - `numerical-safety.md`, `data-integrity.md`, `citation-safety.md` (Phase 7.3 + 7.6a — ENFORCED)
1147
+ - `senior-mentor-circulation.md` (post-7.7, when round 1 begins — ADVISORY)
1148
+ - `ai-drafted-document-policy.md` (Phase 0 if AI-draft attached — ENFORCED)