flonat-research 0.1.0 → 0.2.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 (498) hide show
  1. package/.claude/agents/artifact-coherence-auditor.md +192 -0
  2. package/.claude/agents/blindspot.md +271 -0
  3. package/.claude/agents/claim-verify.md +259 -0
  4. package/.claude/agents/code-paper-auditor.md +323 -0
  5. package/.claude/agents/code-review.md +322 -0
  6. package/.claude/agents/codex-research.md +141 -0
  7. package/.claude/agents/domain-reviewer.md +57 -7
  8. package/.claude/agents/fatal-error-check.md +223 -0
  9. package/.claude/agents/fixer.md +62 -6
  10. package/.claude/agents/gemini-research.md +103 -0
  11. package/.claude/agents/paper-critic.md +227 -114
  12. package/.claude/agents/peer-reviewer.md +109 -19
  13. package/.claude/agents/proposal-reviewer.md +60 -7
  14. package/.claude/agents/referee2-reviewer.md +267 -77
  15. package/.claude/agents/references/code-review/checklist-categories.md +111 -0
  16. package/.claude/agents/references/code-review/findings-schema.json +35 -0
  17. package/.claude/agents/references/code-review/persona-catalog.md +112 -0
  18. package/.claude/agents/references/code-review/quality-rubric.md +67 -0
  19. package/.claude/agents/references/code-review/subagent-template.md +54 -0
  20. package/.claude/agents/references/paper-critic/council-mode.md +53 -0
  21. package/.claude/agents/references/paper-critic/council-personas.md +3 -3
  22. package/.claude/agents/references/paper-critic/council-prompts.md +1 -1
  23. package/.claude/agents/references/paper-critic/json-schema.md +97 -0
  24. package/.claude/agents/references/paper-critic/report-format.md +81 -0
  25. package/.claude/agents/references/paper-critic/specialist-mode.md +80 -0
  26. package/.claude/agents/references/peer-reviewer/sa-prompts.md +55 -1
  27. package/.claude/agents/references/proposal-reviewer/sa-prompts.md +27 -0
  28. package/.claude/agents/references/referee2-reviewer/audit-checklists.md +21 -0
  29. package/.claude/agents/references/referee2-reviewer/council-mode.md +39 -0
  30. package/.claude/agents/references/referee2-reviewer/deep-mode.md +89 -0
  31. package/.claude/agents/references/referee2-reviewer/grounded-mode.md +146 -0
  32. package/.claude/agents/references/referee2-reviewer/json-schema.md +70 -0
  33. package/.claude/agents/references/referee2-reviewer/methods/causal-inference.md +62 -0
  34. package/.claude/agents/references/referee2-reviewer/methods/computational-simulation.md +58 -0
  35. package/.claude/agents/references/referee2-reviewer/methods/content-analysis.md +71 -0
  36. package/.claude/agents/references/referee2-reviewer/methods/cross-cutting.md +47 -0
  37. package/.claude/agents/references/referee2-reviewer/methods/experiments.md +58 -0
  38. package/.claude/agents/references/referee2-reviewer/methods/mcdm.md +83 -0
  39. package/.claude/agents/references/referee2-reviewer/methods/ml-nlp.md +70 -0
  40. package/.claude/agents/references/referee2-reviewer/methods/survey-psychometrics.md +66 -0
  41. package/.claude/agents/references/referee2-reviewer/report-template.md +14 -0
  42. package/.claude/agents/reproducibility-auditor.md +200 -0
  43. package/.claude/rules/audit-before-fix.md +49 -0
  44. package/.claude/rules/design-before-results.md +8 -0
  45. package/.claude/rules/doi-verification.md +69 -0
  46. package/.claude/rules/ignore-external-agent-files.md +23 -0
  47. package/.claude/rules/latex-hygiene.md +97 -0
  48. package/.claude/rules/lean-claude-md.md +6 -0
  49. package/.claude/rules/learn-tags.md +24 -24
  50. package/.claude/rules/mark-unverified.md +74 -0
  51. package/.claude/rules/no-hardcoded-results.md +45 -0
  52. package/.claude/rules/overleaf-separation.md +6 -0
  53. package/.claude/rules/paper-code-consistency.md +60 -0
  54. package/.claude/rules/plan-first.md +26 -102
  55. package/.claude/rules/python-uv.md +34 -0
  56. package/.claude/rules/read-docs-first.md +4 -0
  57. package/.claude/rules/scope-discipline.md +4 -0
  58. package/.claude/rules/severity-gradient.md +91 -0
  59. package/.claude/rules/spec-before-quality.md +53 -0
  60. package/.claude/rules/subagent-write-guard.md +75 -0
  61. package/.context/resources/claude-scientific-writer-review.md +2 -2
  62. package/.context/resources/coauthor-venues.md +165 -0
  63. package/.context/resources/cunningham-multi-analyst-agents.md +1 -1
  64. package/.context/resources/google-ai-co-scientist-review.md +2 -2
  65. package/.context/resources/pedro-santanna-takeaways.md +1 -1
  66. package/.context/resources/venue-rankings/ft50.csv +51 -0
  67. package/.context/resources/venue-rankings/scimagojr-2025.csv +32194 -0
  68. package/.context/resources/venue-rankings/wbs60.csv +61 -0
  69. package/.context/resources/venue-rankings.md +20 -28
  70. package/.scripts/README.md +43 -148
  71. package/.scripts/build_book_variant.py +204 -0
  72. package/.scripts/build_paperpile_filename_index.py +68 -0
  73. package/.scripts/check_pdf_availability.py +98 -0
  74. package/.scripts/check_sprint_contract.py +79 -0
  75. package/.scripts/count_inventory.py +49 -19
  76. package/.scripts/ensure-resources.sh +60 -0
  77. package/.scripts/gen_books_index.py +250 -0
  78. package/.scripts/gen_references_page.py +262 -0
  79. package/.scripts/mini-unlock +22 -0
  80. package/.scripts/myst_to_quarto.py +258 -0
  81. package/.scripts/paper-book-deploy.sh +104 -0
  82. package/.scripts/regen-resource-manifest.sh +51 -0
  83. package/.scripts/skill-health.py +1 -1
  84. package/.scripts/system_audit_facts.py +637 -0
  85. package/.scripts/update_atlas_book_url.py +73 -0
  86. package/.scripts/venue-metrics/backfill-venues.py +197 -0
  87. package/CLAUDE.md +30 -24
  88. package/README.md +48 -22
  89. package/docs/agents.md +11 -2
  90. package/docs/getting-started.md +26 -2
  91. package/docs/hooks.md +2 -1
  92. package/docs/rules.md +12 -3
  93. package/docs/setup/setup-overview/setup-overview.pdf +0 -0
  94. package/docs/skills.md +29 -6
  95. package/hooks/context-monitor.py +1 -1
  96. package/hooks/handoff-read.sh +35 -0
  97. package/hooks/precompact-autosave.py +3 -2
  98. package/hooks/startup-context-loader.sh +56 -4
  99. package/package.json +4 -4
  100. package/packages/cli-council/.claude/settings.local.json +158 -0
  101. package/packages/{llm-council → council-api}/README.md +53 -24
  102. package/packages/{llm-council → council-api}/pyproject.toml +9 -9
  103. package/packages/council-api/src/council_api/__init__.py +29 -0
  104. package/packages/{llm-council/src/llm_council → council-api/src/council_api}/__main__.py +11 -11
  105. package/packages/council-api/src/council_api/client.py +441 -0
  106. package/packages/{llm-council/src/llm_council → council-api/src/council_api}/config.py +2 -2
  107. package/packages/{llm-council/src/llm_council → council-api/src/council_api}/council.py +5 -5
  108. package/packages/council-cli/.claude/settings.local.json +158 -0
  109. package/packages/{cli-council → council-cli}/README.md +11 -11
  110. package/packages/{cli-council → council-cli}/pyproject.toml +5 -5
  111. package/packages/{cli-council/src/cli_council → council-cli/src/council_cli}/__init__.py +4 -4
  112. package/packages/{cli-council/src/cli_council → council-cli/src/council_cli}/__main__.py +4 -4
  113. package/packages/council-cli/src/council_cli/backends/__init__.py +8 -0
  114. package/packages/{cli-council/src/cli_council → council-cli/src/council_cli}/backends/base.py +1 -1
  115. package/packages/{cli-council/src/cli_council → council-cli/src/council_cli}/backends/claude.py +2 -2
  116. package/packages/{cli-council/src/cli_council → council-cli/src/council_cli}/backends/codex.py +2 -2
  117. package/packages/{cli-council/src/cli_council → council-cli/src/council_cli}/backends/gemini.py +2 -2
  118. package/packages/{cli-council/src/cli_council → council-cli/src/council_cli}/council.py +7 -7
  119. package/packages/mcp-scholarly/EXPLAINER.md +392 -0
  120. package/packages/{mcp-bibliography → mcp-scholarly}/MEMORY.md +1 -1
  121. package/packages/mcp-scholarly/README.md +140 -0
  122. package/packages/mcp-scholarly/_app.py +235 -0
  123. package/packages/mcp-scholarly/cli.py +370 -0
  124. package/packages/mcp-scholarly/mcp_adapter.py +50 -0
  125. package/packages/mcp-scholarly/pyproject.toml +34 -0
  126. package/packages/mcp-scholarly/run.sh +17 -0
  127. package/packages/mcp-scholarly/server.py +54 -0
  128. package/packages/mcp-scholarly/tests/test_dual_cli_mcp.py +94 -0
  129. package/packages/{mcp-bibliography → mcp-scholarly}/tools/__init__.py +2 -0
  130. package/packages/mcp-scholarly/tools/_models.py +54 -0
  131. package/packages/mcp-scholarly/tools/_registry.py +21 -0
  132. package/packages/{mcp-bibliography → mcp-scholarly}/tools/altmetric.py +9 -10
  133. package/packages/mcp-scholarly/tools/arxiv.py +139 -0
  134. package/packages/{mcp-bibliography → mcp-scholarly}/tools/core.py +9 -10
  135. package/packages/{mcp-bibliography → mcp-scholarly}/tools/dblp.py +4 -5
  136. package/packages/mcp-scholarly/tools/exa.py +179 -0
  137. package/packages/{mcp-bibliography → mcp-scholarly}/tools/openalex.py +19 -20
  138. package/packages/{mcp-bibliography → mcp-scholarly}/tools/opencitations.py +7 -8
  139. package/packages/{mcp-bibliography → mcp-scholarly}/tools/openreview.py +10 -11
  140. package/packages/{mcp-bibliography → mcp-scholarly}/tools/orcid.py +10 -11
  141. package/packages/{mcp-bibliography → mcp-scholarly}/tools/scholarly.py +24 -25
  142. package/packages/{mcp-bibliography → mcp-scholarly}/tools/unpaywall.py +4 -5
  143. package/packages/{mcp-bibliography → mcp-scholarly}/tools/zenodo.py +7 -8
  144. package/packages/scholarly/EXPLAINER.md +392 -0
  145. package/packages/scholarly/MEMORY.md +31 -0
  146. package/packages/scholarly/README.md +140 -0
  147. package/packages/{mcp-bibliography → scholarly}/_app.py +17 -8
  148. package/packages/scholarly/cli.py +370 -0
  149. package/packages/scholarly/formatters.py +158 -0
  150. package/packages/scholarly/mcp_adapter.py +50 -0
  151. package/packages/scholarly/pyproject.toml +34 -0
  152. package/packages/scholarly/run.sh +17 -0
  153. package/packages/scholarly/scholarly_formatters.py +83 -0
  154. package/packages/scholarly/server.py +54 -0
  155. package/packages/scholarly/tests/test_dual_cli_mcp.py +94 -0
  156. package/packages/scholarly/tools/__init__.py +30 -0
  157. package/packages/scholarly/tools/_models.py +54 -0
  158. package/packages/scholarly/tools/_registry.py +21 -0
  159. package/packages/scholarly/tools/altmetric.py +106 -0
  160. package/packages/scholarly/tools/arxiv.py +139 -0
  161. package/packages/scholarly/tools/core.py +91 -0
  162. package/packages/scholarly/tools/dblp.py +51 -0
  163. package/packages/scholarly/tools/exa.py +179 -0
  164. package/packages/scholarly/tools/openalex.py +295 -0
  165. package/packages/scholarly/tools/opencitations.py +101 -0
  166. package/packages/scholarly/tools/openreview.py +178 -0
  167. package/packages/scholarly/tools/orcid.py +130 -0
  168. package/packages/scholarly/tools/scholarly.py +574 -0
  169. package/packages/scholarly/tools/unpaywall.py +62 -0
  170. package/packages/scholarly/tools/zenodo.py +122 -0
  171. package/skills/audit-paper-book/SKILL.md +184 -0
  172. package/skills/audit-paper-book/references/phase-1-diff-inventory.md +102 -0
  173. package/skills/audit-paper-book/references/phase-2-accessibility.md +12 -0
  174. package/skills/audit-paper-book/references/phase-4-apply-logic.md +55 -0
  175. package/skills/audit-paper-book/references/phase-5-verify-smoke-tests.md +33 -0
  176. package/skills/audit-paper-book/references/report-format-template.md +87 -0
  177. package/skills/audit-paper-book/scripts/batch_audit.py +667 -0
  178. package/skills/beamer-deck/SKILL.md +22 -10
  179. package/skills/beamer-deck/references/review-prompts.md +24 -0
  180. package/skills/bib-coverage/SKILL.md +121 -0
  181. package/skills/bib-filter/SKILL.md +110 -0
  182. package/skills/bib-parse/SKILL.md +274 -0
  183. package/skills/bib-validate/SKILL.md +83 -46
  184. package/skills/bib-validate/references/cli-recipes.md +77 -0
  185. package/skills/bib-validate/references/council-mode.md +3 -3
  186. package/skills/bib-validate/references/deep-verify-protocol.md +13 -0
  187. package/skills/bib-validate/references/deep-verify.md +36 -9
  188. package/skills/bib-validate/references/doi-verification.md +68 -0
  189. package/skills/bib-validate/references/fix-mode.md +9 -14
  190. package/skills/bib-validate/references/metadata-verification.md +13 -0
  191. package/skills/bib-validate/references/openalex-verification.md +9 -9
  192. package/skills/bib-validate/references/preprint-check.md +6 -3
  193. package/skills/bib-validate/references/ref-manager-crossref.md +18 -27
  194. package/skills/bib-validate/references/report-template.md +7 -8
  195. package/skills/causal-design/SKILL.md +242 -0
  196. package/skills/causal-design/references/causal-audit-prompt.md +107 -0
  197. package/skills/causal-design/references/design-decision-tree.md +164 -0
  198. package/skills/causal-design/references/strategy-memo-template.md +138 -0
  199. package/skills/code-review/SKILL.md +155 -162
  200. package/skills/code-review/references/checklist-categories.md +111 -0
  201. package/skills/code-review/references/findings-schema.json +35 -0
  202. package/skills/code-review/references/persona-catalog.md +112 -0
  203. package/skills/code-review/references/subagent-template.md +54 -0
  204. package/skills/devils-advocate/SKILL.md +2 -2
  205. package/skills/devils-advocate/references/competing-hypotheses.md +1 -1
  206. package/skills/docx/LICENSE.txt +30 -0
  207. package/skills/docx/SKILL.md +134 -0
  208. package/skills/docx/references/docx-js-patterns.md +312 -0
  209. package/skills/docx/references/xml-reference.md +128 -0
  210. package/skills/docx/scripts/__init__.py +1 -0
  211. package/skills/docx/scripts/accept_changes.py +135 -0
  212. package/skills/docx/scripts/comment.py +318 -0
  213. package/skills/docx/scripts/office/helpers/__init__.py +0 -0
  214. package/skills/docx/scripts/office/helpers/merge_runs.py +199 -0
  215. package/skills/docx/scripts/office/helpers/simplify_redlines.py +197 -0
  216. package/skills/docx/scripts/office/pack.py +159 -0
  217. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  218. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  219. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  220. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  221. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  222. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  223. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  224. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  225. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  226. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  227. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  228. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  229. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  230. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  231. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  232. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  233. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  234. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  235. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  236. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  237. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  238. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  239. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  240. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  241. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  242. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  243. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  244. package/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  245. package/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  246. package/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  247. package/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  248. package/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
  249. package/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  250. package/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  251. package/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  252. package/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  253. package/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  254. package/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  255. package/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  256. package/skills/docx/scripts/office/soffice.py +183 -0
  257. package/skills/docx/scripts/office/unpack.py +132 -0
  258. package/skills/docx/scripts/office/validate.py +111 -0
  259. package/skills/docx/scripts/office/validators/__init__.py +15 -0
  260. package/skills/docx/scripts/office/validators/base.py +847 -0
  261. package/skills/docx/scripts/office/validators/docx.py +446 -0
  262. package/skills/docx/scripts/office/validators/pptx.py +275 -0
  263. package/skills/docx/scripts/office/validators/redlining.py +247 -0
  264. package/skills/docx/scripts/templates/comments.xml +3 -0
  265. package/skills/docx/scripts/templates/commentsExtended.xml +3 -0
  266. package/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
  267. package/skills/docx/scripts/templates/commentsIds.xml +3 -0
  268. package/skills/docx/scripts/templates/people.xml +3 -0
  269. package/skills/experiment-design/SKILL.md +188 -0
  270. package/skills/experiment-design/references/identification-strategies.md +70 -0
  271. package/skills/experiment-design/references/known-scales-registry.md +112 -0
  272. package/skills/experiment-design/references/pap-template.md +138 -0
  273. package/skills/experiment-design/references/power-analysis-recipes.md +145 -0
  274. package/skills/experiment-design/references/qsf-parsing-guide.md +180 -0
  275. package/skills/experiment-design/references/survey-design-checklist.md +108 -0
  276. package/skills/handoff/SKILL.md +87 -0
  277. package/skills/init-paper-book/SKILL.md +179 -0
  278. package/skills/init-paper-book/references/intro-masthead-format.md +87 -0
  279. package/skills/init-paper-book/references/phase-1-read-plan.md +13 -0
  280. package/skills/init-paper-book/references/phase-2-scaffold.md +37 -0
  281. package/skills/init-paper-book/references/phase-3-chapter-scaffolding.md +25 -0
  282. package/skills/init-paper-book/references/phase-4-verify-chapters.md +55 -0
  283. package/skills/init-paper-book/references/phase-5-register.md +77 -0
  284. package/skills/init-paper-book/references/verify_chapters.py +279 -0
  285. package/skills/init-paper-book/references/visual_check.mjs +170 -0
  286. package/skills/init-paper-book/scripts/regenerate_intro.py +243 -0
  287. package/skills/init-project-course/{skill.md → SKILL.md} +3 -3
  288. package/skills/init-project-course/references/memory-and-settings.md +5 -5
  289. package/skills/init-project-course/references/organise-templates.md +2 -0
  290. package/skills/init-project-light/{skill.md → SKILL.md} +2 -2
  291. package/skills/init-project-research/SKILL.md +118 -223
  292. package/skills/init-project-research/references/atlas-schema.md +40 -28
  293. package/skills/init-project-research/references/atlas-sync.md +92 -0
  294. package/skills/init-project-research/references/confirmation-report.md +5 -5
  295. package/skills/init-project-research/references/github-release-repo.md +174 -0
  296. package/skills/init-project-research/references/literature-discovery.md +18 -8
  297. package/skills/init-project-research/references/paper-directory.md +109 -0
  298. package/skills/init-project-research/references/round-1-venue.md +26 -0
  299. package/skills/init-project-research/references/round-2-github.md +26 -0
  300. package/skills/init-project-research/references/round-2-hpc.md +46 -0
  301. package/skills/init-project-research/references/scaffold-details.md +27 -15
  302. package/skills/init-project-research/references/scaffold-tree.md +65 -0
  303. package/skills/init-project-research/references/task-mgmt-sync.md +57 -0
  304. package/skills/init-project-research/templates/field-calibration.md +1 -1
  305. package/skills/init-project-research/templates/seed-files.md +55 -11
  306. package/skills/insights-deck/SKILL.md +1 -1
  307. package/skills/interview-me/SKILL.md +0 -1
  308. package/skills/latex/SKILL.md +234 -80
  309. package/skills/latex/references/known-errors.md +183 -0
  310. package/skills/latex/references/latex-configs.md +37 -95
  311. package/skills/latex/references/quality-rubric.md +50 -0
  312. package/skills/latex/references/templates.md +54 -0
  313. package/skills/latex-health-check/SKILL.md +20 -3
  314. package/skills/latex-scaffold/SKILL.md +147 -0
  315. package/skills/latex-template/SKILL.md +231 -0
  316. package/skills/latex-template/references/comparison-checklist.md +154 -0
  317. package/skills/latex-template/references/report-format.md +192 -0
  318. package/skills/literature/SKILL.md +181 -217
  319. package/skills/literature/references/agent-templates.md +152 -25
  320. package/skills/literature/references/arxiv-api-guide.md +69 -0
  321. package/skills/literature/references/bibliography-format.md +30 -0
  322. package/skills/literature/references/bibliometric-apis.md +10 -10
  323. package/skills/literature/references/cli-recipes.md +92 -0
  324. package/skills/literature/references/{cli-council-search.md → council-cli-search.md} +4 -4
  325. package/skills/literature/references/deep-loop-protocol.md +122 -0
  326. package/skills/literature/references/field-framework.md +41 -0
  327. package/skills/literature/references/hyde-search.md +92 -0
  328. package/skills/literature/references/openalex-workflows.md +15 -15
  329. package/skills/literature/references/perplexity-grounding.md +53 -0
  330. package/skills/literature/references/phase-2-search.md +27 -0
  331. package/skills/literature/references/phase-4-verification.md +85 -0
  332. package/skills/literature/references/pipeline-completion.md +44 -0
  333. package/skills/literature/references/reference-manager-sync.md +10 -24
  334. package/skills/literature/references/related-skills.md +32 -0
  335. package/skills/literature/references/scholarly-output-parsing.md +79 -0
  336. package/skills/literature/references/scisciinet-enrichment.md +52 -0
  337. package/skills/literature/references/search-plan.md +45 -0
  338. package/skills/literature/references/snowball-search.md +19 -0
  339. package/skills/literature/references/synthesis.md +94 -0
  340. package/skills/memory-cleanup/SKILL.md +281 -0
  341. package/skills/multi-perspective/SKILL.md +26 -25
  342. package/skills/multi-perspective/references/computational-many-analysts.md +1 -1
  343. package/skills/multi-perspective/references/perspective-templates.md +31 -0
  344. package/skills/parse-reviews/SKILL.md +244 -0
  345. package/skills/parse-reviews/references/rr-routing.md +101 -0
  346. package/skills/pdf/LICENSE.txt +30 -0
  347. package/skills/pdf/SKILL.md +53 -0
  348. package/skills/pdf/forms.md +294 -0
  349. package/skills/pdf/reference.md +612 -0
  350. package/skills/pdf/references/pdf-recipes.md +276 -0
  351. package/skills/pdf/scripts/check_bounding_boxes.py +65 -0
  352. package/skills/pdf/scripts/check_fillable_fields.py +11 -0
  353. package/skills/pdf/scripts/convert_pdf_to_images.py +33 -0
  354. package/skills/pdf/scripts/create_validation_image.py +37 -0
  355. package/skills/pdf/scripts/extract_form_field_info.py +122 -0
  356. package/skills/pdf/scripts/extract_form_structure.py +115 -0
  357. package/skills/pdf/scripts/fill_fillable_fields.py +98 -0
  358. package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
  359. package/skills/postmortem/SKILL.md +201 -0
  360. package/skills/pre-submission-report/SKILL.md +139 -7
  361. package/skills/proofread/SKILL.md +73 -7
  362. package/skills/python-env/SKILL.md +4 -0
  363. package/skills/save-context/SKILL.md +3 -3
  364. package/skills/session-health/SKILL.md +126 -0
  365. package/skills/shared/checkpoint-resumability.md +166 -0
  366. package/skills/shared/concept-validation-gate.md +2 -2
  367. package/skills/shared/council-protocol.md +21 -20
  368. package/skills/shared/external-audit-protocol.md +2 -2
  369. package/skills/shared/integrity-gates.md +130 -0
  370. package/skills/shared/knowledge-acquisition.md +222 -0
  371. package/skills/shared/learn-tag-routing.md +129 -0
  372. package/skills/shared/material-passport.md +178 -0
  373. package/skills/shared/mcp-degradation.md +7 -5
  374. package/skills/shared/method-fitness-gate.md +127 -0
  375. package/skills/shared/project-documentation-content.md +3 -3
  376. package/skills/shared/project-documentation-format.md +1 -1
  377. package/skills/shared/project-documentation.md +7 -7
  378. package/skills/shared/reference-resolution.md +69 -41
  379. package/skills/shared/skill-design-patterns.md +89 -4
  380. package/skills/shared/skill-index.md +62 -47
  381. package/skills/shared/sources-cache.md +120 -0
  382. package/skills/shared/system-documentation.md +7 -7
  383. package/skills/shared/tikz-rules.md +36 -1
  384. package/skills/shared/worker-critic-protocol.md +156 -0
  385. package/skills/skill-extract/SKILL.md +220 -0
  386. package/skills/skill-extract/scripts/validate_skill.py +265 -0
  387. package/skills/skill-preflight/SKILL.md +230 -0
  388. package/skills/split-pdf/SKILL.md +114 -59
  389. package/skills/strategic-revision/SKILL.md +198 -0
  390. package/skills/strategic-revision/references/dag-validation.md +172 -0
  391. package/skills/strategic-revision/references/phases.md +458 -0
  392. package/skills/strategic-revision/references/rr-routing.md +101 -0
  393. package/skills/strategic-revision/references/task-schema.md +148 -0
  394. package/skills/strategic-revision/scripts/dag_validator.py +505 -0
  395. package/skills/synthetic-data/SKILL.md +247 -0
  396. package/skills/synthetic-data/references/calibration-targets.md +483 -0
  397. package/skills/synthetic-data/references/dgp-recipes-experimental.md +203 -0
  398. package/skills/synthetic-data/references/dgp-recipes-observational.md +162 -0
  399. package/skills/synthetic-data/references/dgp-recipes-survey-mediation.md +211 -0
  400. package/skills/synthetic-data/references/dgp-recipes.md +14 -0
  401. package/skills/system-audit/SKILL.md +123 -45
  402. package/skills/system-audit/references/sub-agent-prompts.md +14 -163
  403. package/skills/task-management/SKILL.md +2 -2
  404. package/skills/update-project-doc/SKILL.md +2 -2
  405. package/skills/voice-analyzer/SKILL.md +292 -0
  406. package/skills/voice-editor/SKILL.md +270 -0
  407. package/skills/voice-editor/references/common-problems.md +21 -0
  408. package/skills/voice-editor/references/editing-modes.md +29 -0
  409. package/skills/xlsx/LICENSE.txt +30 -0
  410. package/skills/xlsx/SKILL.md +293 -0
  411. package/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
  412. package/skills/xlsx/scripts/office/helpers/merge_runs.py +199 -0
  413. package/skills/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
  414. package/skills/xlsx/scripts/office/pack.py +159 -0
  415. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  416. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  417. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  418. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  419. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  420. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  421. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  422. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  423. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  424. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  425. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  426. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  427. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  428. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  429. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  430. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  431. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  432. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  433. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  434. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  435. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  436. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  437. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  438. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  439. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  440. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  441. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  442. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  443. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  444. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  445. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  446. package/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
  447. package/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  448. package/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  449. package/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  450. package/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  451. package/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  452. package/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  453. package/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  454. package/skills/xlsx/scripts/office/soffice.py +183 -0
  455. package/skills/xlsx/scripts/office/unpack.py +132 -0
  456. package/skills/xlsx/scripts/office/validate.py +111 -0
  457. package/skills/xlsx/scripts/office/validators/__init__.py +15 -0
  458. package/skills/xlsx/scripts/office/validators/base.py +847 -0
  459. package/skills/xlsx/scripts/office/validators/docx.py +446 -0
  460. package/skills/xlsx/scripts/office/validators/pptx.py +275 -0
  461. package/skills/xlsx/scripts/office/validators/redlining.py +247 -0
  462. package/skills/xlsx/scripts/recalc.py +184 -0
  463. package/.claude/rules/ignore-agents-md.md +0 -17
  464. package/.claude/rules/ignore-gemini-md.md +0 -17
  465. package/.scripts/conf +0 -445
  466. package/.scripts/config.py +0 -122
  467. package/.scripts/daily_digest.py +0 -288
  468. package/.scripts/done +0 -177
  469. package/.scripts/extract_meeting_actions.py +0 -223
  470. package/.scripts/generate-codex-agents-md.py +0 -217
  471. package/.scripts/inbox +0 -194
  472. package/.scripts/notion_helpers.py +0 -325
  473. package/.scripts/papers +0 -227
  474. package/.scripts/query +0 -223
  475. package/.scripts/task +0 -213
  476. package/.scripts/tasks +0 -190
  477. package/.scripts/week +0 -206
  478. package/packages/cli-council/src/cli_council/backends/__init__.py +0 -8
  479. package/packages/llm-council/src/llm_council/__init__.py +0 -23
  480. package/packages/llm-council/src/llm_council/client.py +0 -253
  481. package/packages/mcp-bibliography/pyproject.toml +0 -15
  482. package/packages/mcp-bibliography/run.sh +0 -20
  483. package/packages/mcp-bibliography/server.py +0 -1857
  484. package/packages/mcp-bibliography/tools/_registry.py +0 -19
  485. package/skills/init-project-research/references/atlas-pipeline-sync.md +0 -70
  486. /package/packages/{cli-council → council-api}/.github/workflows/claude-code-review.yml +0 -0
  487. /package/packages/{cli-council → council-api}/.github/workflows/claude.yml +0 -0
  488. /package/packages/{llm-council/src/llm_council → council-api/src/council_api}/checkpoint.py +0 -0
  489. /package/packages/{llm-council/src/llm_council → council-api/src/council_api}/models.py +0 -0
  490. /package/packages/{llm-council → council-cli}/.github/workflows/claude-code-review.yml +0 -0
  491. /package/packages/{llm-council → council-cli}/.github/workflows/claude.yml +0 -0
  492. /package/packages/{cli-council/src/cli_council → council-cli/src/council_cli}/checkpoint.py +0 -0
  493. /package/packages/{cli-council/src/cli_council → council-cli/src/council_cli}/config.py +0 -0
  494. /package/packages/{cli-council/src/cli_council → council-cli/src/council_cli}/models.py +0 -0
  495. /package/packages/{mcp-bibliography → mcp-scholarly}/formatters.py +0 -0
  496. /package/packages/{mcp-bibliography → mcp-scholarly}/log/2026-03-13-2100.md +0 -0
  497. /package/packages/{mcp-bibliography → mcp-scholarly}/scholarly_formatters.py +0 -0
  498. /package/packages/{mcp-bibliography → mcp-scholarly}/uv.lock +0 -0
@@ -0,0 +1,138 @@
1
+ # Strategy Memo Template
2
+
3
+ > Use this template when producing the strategy memo in `/causal-design` Design Phase 3.
4
+ > Fill in every section. If a section is not applicable, state why rather than leaving it blank.
5
+
6
+ ---
7
+
8
+ ```markdown
9
+ # Causal Strategy Memo
10
+
11
+ **Project:** [project name]
12
+ **Date:** YYYY-MM-DD
13
+ **Status:** Draft | Locked
14
+
15
+ ---
16
+
17
+ ## 1. Research Question
18
+
19
+ **Causal question:** [State the causal question in one sentence. What is the effect of X on Y?]
20
+
21
+ **Treatment (X):** [Define precisely -- what is the treatment, intervention, or policy?]
22
+
23
+ **Outcome (Y):** [Define precisely -- what is the primary outcome variable? How is it measured?]
24
+
25
+ **Population:** [Who is the estimand defined over? What is the target population?]
26
+
27
+ ## 2. Estimand
28
+
29
+ **Formal definition:**
30
+
31
+ $$\tau = E[Y_i(1) - Y_i(0) \mid \text{subpopulation}]$$
32
+
33
+ **Type:** [ATE / ATT / LATE / CATE / Other]
34
+
35
+ **Interpretation:** [One sentence explaining what the parameter means substantively.]
36
+
37
+ ## 3. Identification Strategy
38
+
39
+ **Strategy:** [DiD / IV / RDD / SC / Event Study / Matching / Other]
40
+
41
+ **Source of variation:** [What generates exogenous variation in treatment? Why is this variation plausibly exogenous?]
42
+
43
+ **Intuition:** [2-3 sentences explaining the identification argument in plain language. A non-technical reader should understand why this comparison is valid.]
44
+
45
+ **Formal identification result:**
46
+
47
+ [State the formal result: under assumptions A1-An, the estimand is identified by [expression]. Reference the relevant econometric result if applicable.]
48
+
49
+ ## 4. Key Assumptions
50
+
51
+ For each assumption, state it formally, provide a conceptual defence, and describe how (if possible) it will be tested.
52
+
53
+ ### Assumption 1: [Name]
54
+
55
+ **Statement:** [Formal statement]
56
+
57
+ **Defence:** [Why should this hold in your setting?]
58
+
59
+ **Testable?** [Yes / No / Partially]
60
+
61
+ **Test plan:** [If testable, what diagnostic will you run? What would a failure look like?]
62
+
63
+ ### Assumption 2: [Name]
64
+
65
+ [Same structure]
66
+
67
+ ### Assumption N: [Name]
68
+
69
+ [Same structure]
70
+
71
+ ## 5. Threats and Mitigations
72
+
73
+ | # | Threat | Severity | Mitigation | Residual risk |
74
+ |---|--------|----------|-----------|---------------|
75
+ | T1 | [What could go wrong] | High/Medium/Low | [How you address it] | [What risk remains] |
76
+ | T2 | ... | ... | ... | ... |
77
+ | T3 | ... | ... | ... | ... |
78
+
79
+ ## 6. Diagnostics Plan
80
+
81
+ List every diagnostic test you will run before trusting the main estimates. These must be run **before** examining point estimates (per the `design-before-results` rule).
82
+
83
+ | # | Diagnostic | Purpose | Pass criterion |
84
+ |---|-----------|---------|----------------|
85
+ | D1 | [Test name] | [What it checks] | [What counts as passing] |
86
+ | D2 | ... | ... | ... |
87
+ | D3 | ... | ... | ... |
88
+
89
+ ## 7. Robustness Checks
90
+
91
+ Pre-commit to alternative specifications. These are decided now, before seeing results. Post-hoc robustness checks added after seeing the main results are not credible.
92
+
93
+ | # | Specification | What it varies | Why informative |
94
+ |---|--------------|----------------|-----------------|
95
+ | R1 | [Description] | [What changes vs. main spec] | [What we learn] |
96
+ | R2 | ... | ... | ... |
97
+ | R3 | ... | ... | ... |
98
+
99
+ ## 8. Alternative Strategies Considered
100
+
101
+ | Strategy | Why considered | Why rejected |
102
+ |----------|---------------|-------------|
103
+ | [Strategy 1] | [What made it a candidate] | [Why it was not chosen] |
104
+ | [Strategy 2] | ... | ... |
105
+
106
+ ## 9. Data Requirements
107
+
108
+ | Variable | Source | Available? | Notes |
109
+ |----------|--------|-----------|-------|
110
+ | Treatment | [source] | Yes/No/Partial | |
111
+ | Outcome | [source] | Yes/No/Partial | |
112
+ | Running variable (RDD) | [source] | Yes/No/N/A | |
113
+ | Instrument (IV) | [source] | Yes/No/N/A | |
114
+ | Pre-treatment covariates | [source] | Yes/No/Partial | |
115
+ | Panel structure | [source] | Yes/No/N/A | |
116
+
117
+ ## 10. Implementation Notes
118
+
119
+ **Estimator:** [What R/Python/Stata package and function will implement this? e.g., `did` (Callaway & Sant'Anna), `rdrobust`, `ivreg`]
120
+
121
+ **Standard errors:** [How will inference be conducted? Clustered at what level? Bootstrap?]
122
+
123
+ **Sample restrictions:** [Any sample restrictions beyond the target population?]
124
+
125
+ ---
126
+
127
+ ## Sign-Off
128
+
129
+ - [ ] Estimand is precisely defined
130
+ - [ ] Identification strategy matches the estimand
131
+ - [ ] All key assumptions are stated and defended
132
+ - [ ] Diagnostics plan is complete and pre-committed
133
+ - [ ] Robustness checks are pre-committed
134
+ - [ ] This memo has been reviewed by domain-reviewer agent
135
+
136
+ **Locked by:** [name]
137
+ **Lock date:** [date]
138
+ ```
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: code-review
3
- description: "Use when you need a quality review of R or Python research scripts."
4
- allowed-tools: Read, Glob, Grep
5
- argument-hint: [script-path or project-path]
3
+ description: "Use when you need a quality review of R, Python, or Julia research scripts. Multi-persona orchestrator with parallel specialist reviewers."
4
+ allowed-tools: Read, Glob, Grep, Agent, Bash(wc*)
5
+ argument-hint: "[script-path or project-path]"
6
6
  ---
7
7
 
8
8
  # Research Code Review
9
9
 
10
- **Report-only skill.** Never edit source files — produce `CODE-REVIEW-REPORT.md` only.
10
+ **Report-only skill.** Never edit source files — produce `reviews/code-review/YYYY-MM-DD_CODE-REVIEW-REPORT.md` only.
11
11
 
12
12
  ## When to Use
13
13
 
@@ -22,216 +22,217 @@ argument-hint: [script-path or project-path]
22
22
  - **Formal verification** — use the Referee 2 agent for cross-language replication
23
23
  - **General software projects** — this is for research scripts, not applications
24
24
 
25
- ## Workflow
25
+ ---
26
26
 
27
- 1. **Locate scripts**: Find all `.R`, `.py`, `.do`, `.jl` files in the project
28
- 2. **Read each script** carefully
29
- 3. **Score each category** (Pass / Fail / N/A)
30
- 4. **Produce report**: Write `CODE-REVIEW-REPORT.md` in the project directory
27
+ ## Architecture
31
28
 
32
- ## 11 Review Categories
29
+ **Orchestrator + parallel specialist reviewers.** The main context runs a baseline checklist, then spawns 3-6 specialist sub-agents in parallel. Each reviewer produces structured JSON findings. The orchestrator deduplicates, merges, and synthesizes a single report.
33
30
 
34
- ### 1. Reproducibility
31
+ ```
32
+ Phase 1: Scope → Phase 2: Baseline Checklist → Phase 3: Spawn Reviewers
33
+ → Phase 4: Merge & Dedup → Phase 5: Synthesize Report
34
+ ```
35
35
 
36
- | Check | Pass Criteria |
37
- |-------|--------------|
38
- | Random seeds | `set.seed()` / `random.seed()` / `np.random.seed()` set before any stochastic operation |
39
- | Relative paths | No hardcoded absolute paths (e.g., `/Users/username/...` or `C:\...`) |
40
- | Working directory | Script does not `setwd()` / `os.chdir()` — uses project-relative paths |
41
- | Session info | Script prints session info at end (`sessionInfo()` / `sys.version`) or documents environment |
36
+ ---
42
37
 
43
- ### 2. Script Structure
38
+ ## Phase 1: Scope Detection
44
39
 
45
- | Check | Pass Criteria |
46
- |-------|--------------|
47
- | Header | Script begins with comment block: purpose, author, date, inputs, outputs |
48
- | Sections | Code organised into labelled sections (comments or `# ---- Section ----`) |
49
- | Imports at top | All `library()` / `import` statements at the top of the file |
50
- | Reasonable length | Single script < 500 lines; longer scripts should be split |
40
+ 1. **Locate scripts:** Find all `.R`, `.py`, `.jl`, `.do` files in the project (or the specified path)
41
+ 2. **Count and classify:** Report file count, languages, total lines of code
42
+ 3. **Read project CLAUDE.md** (if it exists) for domain context, estimand, methodology
51
43
 
52
- ### 3. Output Hygiene
44
+ If no code files found, stop: "No code files found at [path]."
53
45
 
54
- | Check | Pass Criteria |
55
- |-------|--------------|
56
- | No print pollution | No stray `print()` / `cat()` / `message()` dumping to console |
57
- | Outputs saved | Key results saved to files, not just printed |
58
- | Clean console | Running the script does not produce walls of text |
46
+ ---
59
47
 
60
- ### 4. Function Quality
48
+ ## Phase 2: Baseline Checklist (main context, fast pass)
61
49
 
62
- | Check | Pass Criteria |
63
- |-------|--------------|
64
- | Documentation | Functions have comments explaining purpose, inputs, outputs |
65
- | Naming | Function names are descriptive verbs (`estimate_ate`, not `f1`) |
66
- | Defaults | Reasonable defaults for optional parameters |
67
- | No side effects | Functions don't modify global state |
50
+ Run through all 11 categories as a quick structural check. This catches mechanical issues that don't need specialist reviewers.
68
51
 
69
- ### 5. Domain Correctness
52
+ ### 11 Checklist Categories
70
53
 
71
- | Check | Pass Criteria |
72
- |-------|--------------|
73
- | Estimator matches paper | The estimator used matches what the paper claims |
74
- | Weights | If weighted: weights sum to expected value, correct application |
75
- | Standard errors | Clustering / HC / bootstrap matches paper specification |
76
- | Sample restrictions | Filters match the paper's sample description |
77
- | Variable construction | Variables constructed as described in the paper |
54
+ See [`references/checklist-categories.md`](references/checklist-categories.md) for detailed specifications of all 11 categories: Reproducibility, Script Structure, Output Hygiene, Function Quality, Domain Correctness, Figure Quality, Data Persistence, Dependencies, Python-Specific, R-Specific, and Cross-Language Verification.
78
55
 
79
- ### 6. Figure Quality
56
+ Record checklist results (Pass/Fail/N/A per category) for the report. Continue to Phase 3 regardless of results.
80
57
 
81
- | Check | Pass Criteria |
82
- |-------|--------------|
83
- | Dimensions specified | Figure size set explicitly (not default) |
84
- | Transparency/resolution | Appropriate for publication (300+ DPI for raster, vector preferred) |
85
- | Saved to file | Figures saved with `ggsave()` / `plt.savefig()`, not just displayed |
86
- | Labels | Axes labelled, legend present where needed, title informative |
87
- | Colour | Colourblind-friendly palette; not relying on red/green distinction |
58
+ ---
88
59
 
89
- ### 7. Data Persistence
60
+ ## Phase 3: Spawn Specialist Reviewers
90
61
 
91
- | Check | Pass Criteria |
92
- |-------|--------------|
93
- | Intermediate objects saved | Expensive computations saved (`saveRDS()` / `pickle.dump()` / `.parquet`) |
94
- | Load before recompute | Script checks for saved objects before rerunning expensive operations |
95
- | Output format | Final outputs in portable format (CSV, parquet — not just `.RData`) |
62
+ Read `references/persona-catalog.md` for the full persona definitions and selection logic.
96
63
 
97
- ### 8. Dependencies
64
+ ### 3a. Select Reviewers
98
65
 
99
- | Check | Pass Criteria |
100
- |-------|--------------|
101
- | Declared at top | All `library()` / `import` at the start of the script |
102
- | Versions documented | `renv.lock` / `requirements.txt` / `pyproject.toml` exists |
103
- | No unnecessary packages | Each loaded package is actually used |
104
- | Installation instructions | README or comment explains how to set up the environment |
66
+ **Always spawn (3 reviewers):**
67
+ - `correctness-reviewer` — logic errors, bugs, state issues
68
+ - `reproducibility-reviewer` seeds, paths, environment, portability
69
+ - `design-reviewer` structure, naming, dead code, complexity
105
70
 
106
- ### 9. Python-Specific
71
+ **Conditionally spawn (scan code to decide):**
72
+ - `domain-reviewer` — if statistical/econometric methods detected
73
+ - `performance-reviewer` — if loops over data, DB queries, or expensive operations detected
74
+ - `security-reviewer` — if user input handling, HTTP, SQL, shell commands, or credentials detected
107
75
 
108
- *Score N/A if no Python files.*
76
+ ### 3b. Announce Team
109
77
 
110
- | Check | Pass Criteria |
111
- |-------|--------------|
112
- | Type hints | Functions have type annotations for parameters and return values |
113
- | Docstrings | Functions have docstrings (not just comments) |
114
- | uv usage | Uses `uv` for environment management (per project conventions) |
115
- | f-strings | Uses f-strings, not `.format()` or `%` formatting |
78
+ Before spawning, list the team:
116
79
 
117
- ### 10. R-Specific
80
+ ```
81
+ Review team: correctness, reproducibility, design, domain (detected: lm() with cluster SEs)
82
+ ```
118
83
 
119
- *Score N/A if no R files.*
84
+ ### 3c. Spawn in Parallel
120
85
 
121
- | Check | Pass Criteria |
122
- |-------|--------------|
123
- | tidyverse consistency | Doesn't mix base R and tidyverse for the same operation |
124
- | Assignment operator | Uses `<-` not `=` for assignment |
125
- | Boolean values | Uses `TRUE`/`FALSE`, not `T`/`F` |
126
- | Pipe consistency | Uses one pipe style consistently (`%>%` or `|>`) |
86
+ For each selected reviewer, launch a sub-agent (subagent_type: "general-purpose", model: "haiku") with:
127
87
 
128
- ### 11. Cross-Language Verification
88
+ 1. Read `references/subagent-template.md` — substitute `{persona_name}` and `{persona_content}` from the catalog
89
+ 2. Pass the file list and instruct the agent to read each file
90
+ 3. Instruct: return ONLY JSON matching `references/findings-schema.json`
129
91
 
130
- *Score N/A if the project has no numerical results or only uses one language.*
92
+ **All reviewers run in parallel** launch them in a single message with multiple Agent tool calls.
131
93
 
132
- | Check | Pass Criteria |
133
- |-------|--------------|
134
- | Replication directory | `code/replication/` (or equivalent) exists with cross-language scripts |
135
- | Two-language coverage | Key numerical results reproduced in a second language (e.g., R results verified in Python or vice versa) |
136
- | Result comparison | Scripts compare outputs and report discrepancies (tolerance-based, not exact match) |
137
- | Precision threshold | Numerical outputs compared to 6+ decimal places — discrepancies at lower precision indicate real bugs |
138
- | Documentation | README or comments explain what is being replicated and acceptable tolerance |
94
+ ---
139
95
 
140
- #### Why Cross-Language Replication Works
96
+ ## Phase 4: Merge & Deduplicate
141
97
 
142
- Different languages produce different hallucination patterns when AI-assisted. An error in a Python implementation is unlikely to appear identically in R (or vice versa), making discrepancies easy to spot. This is the core insight from Scott Cunningham's Referee 2 protocol.
98
+ After all reviewers return:
143
99
 
144
- #### How to Set Up
100
+ ### 4a. Validate
145
101
 
146
- 1. Create `code/replication/` with scripts that independently implement key numerical results in a second language
147
- 2. Write a comparison script that loads outputs from both languages and reports discrepancies at 6+ decimal places
148
- 3. Document what is being replicated, which results are covered, and the acceptable tolerance (e.g., 1e-6 for coefficients, 1e-4 for standard errors)
102
+ - Parse each reviewer's JSON output
103
+ - Drop malformed findings (note count of dropped findings)
104
+ - Drop findings with confidence < 0.60 (exception: P0 at 0.50+ survives)
149
105
 
150
- ## Confidence Filtering
106
+ ### 4b. Deduplicate
151
107
 
152
- - Only report issues where you are >80% confident they are genuine problems
153
- - Consolidate similar findings (e.g., 5 instances of the same naming issue = 1 finding with count)
154
- - For borderline cases, note uncertainty: "Possible issue (medium confidence): ..."
155
- - Never pad the report with low-confidence observations to appear thorough
108
+ Fingerprint each finding:
156
109
 
157
- ## Scorecard
110
+ ```
111
+ fingerprint = normalize(file) + line_bucket(line, ±3) + normalize(title)
112
+ ```
158
113
 
159
- | # | Category | Result | Notes |
160
- |---|----------|--------|-------|
161
- | 1 | Reproducibility | Pass/Fail | |
162
- | 2 | Script structure | Pass/Fail | |
163
- | 3 | Output hygiene | Pass/Fail | |
164
- | 4 | Function quality | Pass/Fail | |
165
- | 5 | Domain correctness | Pass/Fail | |
166
- | 6 | Figure quality | Pass/Fail | |
167
- | 7 | Data persistence | Pass/Fail | |
168
- | 8 | Dependencies | Pass/Fail | |
169
- | 9 | Python-specific | Pass/Fail/N/A | |
170
- | 10 | R-specific | Pass/Fail/N/A | |
171
- | 11 | Cross-language verification | Pass/Fail/N/A | |
114
+ Where:
115
+ - `normalize()` = lowercase, strip whitespace
116
+ - `line_bucket(line, ±3)` = any line within ±3 of another is considered the same location
172
117
 
173
- **Overall: X/11 Pass** (adjust denominator for N/A categories)
118
+ When fingerprints match across reviewers:
119
+ - Keep the **highest severity**
120
+ - Keep the **highest confidence** + union all evidence
121
+ - Record which reviewers agreed (e.g., "correctness, domain")
122
+ - **Cross-reviewer agreement bonus:** +0.10 confidence (capped at 1.0)
174
123
 
175
- ## Quality Scoring
124
+ ### 4c. Map to Quality Rubric
176
125
 
177
- Apply numeric quality scoring using the shared framework and skill-specific rubric:
126
+ Map each merged finding to the closest entry in `references/quality-rubric.md` to determine the deduction. If no exact match, classify by severity tier and use the midpoint deduction.
178
127
 
179
- - **Framework:** [`../shared/quality-scoring.md`](../shared/quality-scoring.md) — severity tiers, thresholds, verdict rules
180
- - **Rubric:** [`references/quality-rubric.md`](references/quality-rubric.md) — issue-to-deduction mappings for this skill
128
+ ### 4d. Sort
181
129
 
182
- Start at 100, deduct per issue found, apply verdict. Insert the Score Block into the report after the scorecard.
130
+ Sort findings: P0 first P1 P2 P3, then by confidence (descending), then by file, then by line.
131
+
132
+ ---
183
133
 
184
- ## Report Format
134
+ ## Phase 5: Synthesize Report
135
+
136
+ Create `reviews/code-review/` if it does not exist (`mkdir -p`). Write `reviews/code-review/YYYY-MM-DD_CODE-REVIEW-REPORT.md` in the project directory (date-stamped so prior reports are preserved, matching the pattern used by `paper-critic`, `peer-reviewer`, `domain-reviewer`, `referee2-reviewer`, and `proofread`).
137
+
138
+ ### Report Format
185
139
 
186
140
  ```markdown
187
141
  # Code Review Report
188
142
 
189
143
  **Project:** [path]
190
144
  **Date:** YYYY-MM-DD
191
- **Scripts reviewed:** [list]
192
- **Languages:** R / Python / Both
145
+ **Scripts reviewed:** [list with line counts]
146
+ **Languages:** R / Python / Julia / Both
147
+ **Review team:** [list of reviewers with conditional justifications]
193
148
 
194
- ## Scorecard
149
+ ## Quality Score
195
150
 
196
- [Table above, filled in]
151
+ | Metric | Value |
152
+ |--------|-------|
153
+ | **Score** | XX / 100 |
154
+ | **Verdict** | Ship / Ship with notes / Revise / Revise (major) / Blocked |
197
155
 
198
- ## Detailed Findings
156
+ ### Deductions
199
157
 
200
- ### Category 1: Reproducibility
201
- **Result: Pass/Fail**
158
+ | # | Issue | Tier | Deduction | Category | Reviewer(s) | Confidence |
159
+ |---|-------|------|-----------|----------|-------------|------------|
160
+ | 1 | [title] | P0 | -25 | Domain Correctness | domain, correctness | 0.92 |
161
+ | 2 | [title] | P1 | -15 | Reproducibility | reproducibility | 0.85 |
162
+ | ... | | | | | | |
163
+ | | **Total deductions** | | **-XX** | | | |
202
164
 
203
- [Specific findings with file:line references]
165
+ ## Checklist Scorecard
204
166
 
205
- ### Category 2: Script Structure
206
- ...
167
+ | # | Category | Result | Notes |
168
+ |---|----------|--------|-------|
169
+ | 1 | Reproducibility | Pass/Fail | |
170
+ | 2 | Script structure | Pass/Fail | |
171
+ | ... | | | |
172
+ | 11 | Cross-language verification | Pass/Fail/N/A | |
207
173
 
208
- [Continue for all 11 categories]
174
+ **Checklist: X/11 Pass** (adjust denominator for N/A categories)
209
175
 
210
- ## Priority Fixes
176
+ ## Detailed Findings
211
177
 
212
- 1. [Most important issue what to fix first]
213
- 2. [Second most important]
214
- 3. [Third]
178
+ ### P0Blocker
215
179
 
216
- ## Quality Score
180
+ | # | File | Issue | Reviewer(s) | Confidence | Evidence |
181
+ |---|------|-------|-------------|------------|----------|
182
+ | 1 | path:line | [title + why_it_matters] | [reviewers] | 0.92 | [evidence] |
217
183
 
218
- | Metric | Value |
219
- |--------|-------|
220
- | **Score** | XX / 100 |
221
- | **Verdict** | Ship / Ship with notes / Revise / Revise (major) / Blocked |
184
+ ### P1 Critical
185
+ [same format, omit if empty]
222
186
 
223
- ### Deductions
187
+ ### P2 — Major
188
+ [same format, omit if empty]
189
+
190
+ ### P3 — Minor
191
+ [same format, omit if empty]
192
+
193
+ ## Residual Risks
224
194
 
225
- | # | Issue | Tier | Deduction | Category |
226
- |---|-------|------|-----------|----------|
227
- | 1 | [description] | [tier] | -X | [category] |
228
- | | **Total deductions** | | **-XX** | |
195
+ [Union of residual_risks from all reviewers things that can't be verified from code alone]
196
+
197
+ ## Priority Fixes
198
+
199
+ 1. [Most impactful issue — what to fix first]
200
+ 2. [Second]
201
+ 3. [Third]
229
202
 
230
203
  ## Positive Observations
231
204
 
232
205
  [Things done well — important for morale and learning]
206
+
207
+ ## Review Metadata
208
+
209
+ - Reviewers spawned: [N]
210
+ - Findings before dedup: [N]
211
+ - Findings after dedup: [N]
212
+ - Findings suppressed (low confidence): [N]
213
+ - Cross-reviewer agreements: [N]
233
214
  ```
234
215
 
216
+ ---
217
+
218
+ ## Confidence Filtering
219
+
220
+ - Suppress findings below 0.60 confidence (exception: P0 at 0.50+)
221
+ - Consolidate identical patterns: 5 instances of the same issue = 1 finding with count in evidence
222
+ - Cross-reviewer agreement boosts confidence by +0.10 (capped at 1.0)
223
+ - Never pad the report with low-confidence observations
224
+
225
+ ## Quality Scoring
226
+
227
+ Apply numeric quality scoring using the shared framework and skill-specific rubric:
228
+
229
+ - **Framework:** [`../shared/quality-scoring.md`](../shared/quality-scoring.md) — severity tiers, thresholds, verdict rules
230
+ - **Rubric:** [`references/quality-rubric.md`](references/quality-rubric.md) — issue-to-deduction mappings for this skill
231
+
232
+ Start at 100, deduct per issue found, apply verdict.
233
+
234
+ ---
235
+
235
236
  ## Council Mode (Optional)
236
237
 
237
238
  For complex codebases or high-stakes replication packages, run the code review across multiple LLM providers. Different models have different strengths: some excel at spotting statistical errors, others at code structure or reproducibility issues.
@@ -241,25 +242,17 @@ For complex codebases or high-stakes replication packages, run the code review a
241
242
  **How it works:**
242
243
  1. Each model independently scores all 11 categories against the same scripts
243
244
  2. Cross-review: models evaluate each other's findings — catching false positives and missed issues
244
- 3. Chairman synthesis: produces a single `CODE-REVIEW-REPORT.md` with the union of confirmed findings
245
-
246
- **Invocation (CLI backend):**
247
- ```bash
248
- cd packages/cli-council
249
- uv run python -m cli_council \
250
- --prompt-file /tmp/code-review-prompt.txt \
251
- --context-file /tmp/scripts-content.txt \
252
- --output-md /tmp/code-review-council.md \
253
- --chairman claude \
254
- --timeout 180
255
- ```
245
+ 3. Chairman synthesis: produces a single `reviews/code-review/YYYY-MM-DD_CODE-REVIEW-REPORT.md` with the union of confirmed findings
256
246
 
257
247
  See `skills/shared/council-protocol.md` for the full orchestration protocol.
258
248
 
259
- **Value:** Moderate to high — most valuable for domain correctness (Category 5) and cross-language verification (Category 11), where different models may catch different statistical or logical errors.
249
+ ---
260
250
 
261
251
  ## Cross-References
262
252
 
263
253
  - **`/code-archaeology`** — For understanding unfamiliar code before reviewing it
264
- - **Referee 2 agent** — For formal cross-language replication and verification (Category 11 flags the absence; Referee 2 does the actual replication)
254
+ - **Referee 2 agent** — For formal cross-language replication and verification
265
255
  - **`/proofread`** — For the paper that accompanies this code
256
+ - **`references/persona-catalog.md`** — Reviewer persona definitions and selection logic
257
+ - **`references/findings-schema.json`** — JSON output contract for sub-agents
258
+ - **`references/subagent-template.md`** — Prompt template for spawning reviewers
@@ -0,0 +1,111 @@
1
+ # 11 Checklist Categories
2
+
3
+ Detailed specifications for Phase 2 baseline checklist.
4
+
5
+ ## 1. Reproducibility
6
+
7
+ | Check | Pass Criteria |
8
+ |-------|--------------|
9
+ | Random seeds | `set.seed()` / `random.seed()` / `np.random.seed()` set before any stochastic operation |
10
+ | Relative paths | No hardcoded absolute paths (e.g., `/Users/username/...` or `C:\...`) |
11
+ | Working directory | Script does not `setwd()` / `os.chdir()` — uses project-relative paths |
12
+ | Session info | Script prints session info at end (`sessionInfo()` / `sys.version`) or documents environment |
13
+ | HPC SHA logging | If project has `hpc/*.sbatch`: every sbatch writes `git-sha.txt` + `git-status.txt` to `OUT_DIR` before `srun` (pins results to code version). Missing SHA log = P1 reproducibility deduction. See [`docs/guides/hpc.md`](../../docs/guides/hpc.md). |
14
+ | HPC account/partition | If `*.sbatch` present: `--account=wbs` set, partition matches workload (compute/gpu/hmem/devel), no hardcoded user paths |
15
+
16
+ ## 2. Script Structure
17
+
18
+ | Check | Pass Criteria |
19
+ |-------|--------------|
20
+ | Header | Script begins with comment block: purpose, author, date, inputs, outputs |
21
+ | Sections | Code organised into labelled sections (comments or `# ---- Section ----`) |
22
+ | Imports at top | All `library()` / `import` statements at the top of the file |
23
+ | Reasonable length | Single script < 500 lines; longer scripts should be split |
24
+
25
+ ## 3. Output Hygiene
26
+
27
+ | Check | Pass Criteria |
28
+ |-------|--------------|
29
+ | No print pollution | No stray `print()` / `cat()` / `message()` dumping to console |
30
+ | Outputs saved | Key results saved to files, not just printed |
31
+ | Clean console | Running the script does not produce walls of text |
32
+
33
+ ## 4. Function Quality
34
+
35
+ | Check | Pass Criteria |
36
+ |-------|--------------|
37
+ | Documentation | Functions have comments explaining purpose, inputs, outputs |
38
+ | Naming | Function names are descriptive verbs (`estimate_ate`, not `f1`) |
39
+ | Defaults | Reasonable defaults for optional parameters |
40
+ | No side effects | Functions don't modify global state |
41
+
42
+ ## 5. Domain Correctness
43
+
44
+ | Check | Pass Criteria |
45
+ |-------|--------------|
46
+ | Estimator matches paper | The estimator used matches what the paper claims |
47
+ | Weights | If weighted: weights sum to expected value, correct application |
48
+ | Standard errors | Clustering / HC / bootstrap matches paper specification |
49
+ | Sample restrictions | Filters match the paper's sample description |
50
+ | Variable construction | Variables constructed as described in the paper |
51
+
52
+ ## 6. Figure Quality
53
+
54
+ | Check | Pass Criteria |
55
+ |-------|--------------|
56
+ | Dimensions specified | Figure size set explicitly (not default) |
57
+ | Transparency/resolution | Appropriate for publication (300+ DPI for raster, vector preferred) |
58
+ | Saved to file | Figures saved with `ggsave()` / `plt.savefig()`, not just displayed |
59
+ | Labels | Axes labelled, legend present where needed, title informative |
60
+ | Colour | Colourblind-friendly palette; not relying on red/green distinction |
61
+
62
+ ## 7. Data Persistence
63
+
64
+ | Check | Pass Criteria |
65
+ |-------|--------------|
66
+ | Intermediate objects saved | Expensive computations saved (`saveRDS()` / `pickle.dump()` / `.parquet`) |
67
+ | Load before recompute | Script checks for saved objects before rerunning expensive operations |
68
+ | Output format | Final outputs in portable format (CSV, parquet — not just `.RData`) |
69
+
70
+ ## 8. Dependencies
71
+
72
+ | Check | Pass Criteria |
73
+ |-------|--------------|
74
+ | Declared at top | All `library()` / `import` at the start of the script |
75
+ | Versions documented | `renv.lock` / `requirements.txt` / `pyproject.toml` exists |
76
+ | No unnecessary packages | Each loaded package is actually used |
77
+ | Installation instructions | README or comment explains how to set up the environment |
78
+
79
+ ## 9. Python-Specific
80
+
81
+ *Score N/A if no Python files.*
82
+
83
+ | Check | Pass Criteria |
84
+ |-------|--------------|
85
+ | Type hints | Functions have type annotations for parameters and return values |
86
+ | Docstrings | Functions have docstrings (not just comments) |
87
+ | uv usage | Uses `uv` for environment management (per project conventions) |
88
+ | f-strings | Uses f-strings, not `.format()` or `%` formatting |
89
+
90
+ ## 10. R-Specific
91
+
92
+ *Score N/A if no R files.*
93
+
94
+ | Check | Pass Criteria |
95
+ |-------|--------------|
96
+ | tidyverse consistency | Doesn't mix base R and tidyverse for the same operation |
97
+ | Assignment operator | Uses `<-` not `=` for assignment |
98
+ | Boolean values | Uses `TRUE`/`FALSE`, not `T`/`F` |
99
+ | Pipe consistency | Uses one pipe style consistently (`%>%` or `\|>`) |
100
+
101
+ ## 11. Cross-Language Verification
102
+
103
+ *Score N/A if the project has no numerical results or only uses one language.*
104
+
105
+ | Check | Pass Criteria |
106
+ |-------|--------------|
107
+ | Replication directory | `code/replication/` (or equivalent) exists with cross-language scripts |
108
+ | Two-language coverage | Key numerical results reproduced in a second language |
109
+ | Result comparison | Scripts compare outputs and report discrepancies (tolerance-based) |
110
+ | Precision threshold | Numerical outputs compared to 6+ decimal places |
111
+ | Documentation | README explains what is being replicated and acceptable tolerance |