flonat-research 0.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 (285) hide show
  1. package/.claude/agents/domain-reviewer.md +336 -0
  2. package/.claude/agents/fixer.md +226 -0
  3. package/.claude/agents/paper-critic.md +370 -0
  4. package/.claude/agents/peer-reviewer.md +289 -0
  5. package/.claude/agents/proposal-reviewer.md +215 -0
  6. package/.claude/agents/referee2-reviewer.md +367 -0
  7. package/.claude/agents/references/journal-referee-profiles.md +354 -0
  8. package/.claude/agents/references/paper-critic/council-personas.md +77 -0
  9. package/.claude/agents/references/paper-critic/council-prompts.md +198 -0
  10. package/.claude/agents/references/peer-reviewer/report-template.md +199 -0
  11. package/.claude/agents/references/peer-reviewer/sa-prompts.md +260 -0
  12. package/.claude/agents/references/peer-reviewer/security-scan.md +188 -0
  13. package/.claude/agents/references/proposal-reviewer/report-template.md +144 -0
  14. package/.claude/agents/references/proposal-reviewer/sa-prompts.md +149 -0
  15. package/.claude/agents/references/referee-config.md +114 -0
  16. package/.claude/agents/references/referee2-reviewer/audit-checklists.md +287 -0
  17. package/.claude/agents/references/referee2-reviewer/report-template.md +334 -0
  18. package/.claude/rules/design-before-results.md +52 -0
  19. package/.claude/rules/ignore-agents-md.md +17 -0
  20. package/.claude/rules/ignore-gemini-md.md +17 -0
  21. package/.claude/rules/lean-claude-md.md +45 -0
  22. package/.claude/rules/learn-tags.md +99 -0
  23. package/.claude/rules/overleaf-separation.md +67 -0
  24. package/.claude/rules/plan-first.md +175 -0
  25. package/.claude/rules/read-docs-first.md +50 -0
  26. package/.claude/rules/scope-discipline.md +28 -0
  27. package/.claude/settings.json +125 -0
  28. package/.context/current-focus.md +33 -0
  29. package/.context/preferences/priorities.md +36 -0
  30. package/.context/preferences/task-naming.md +28 -0
  31. package/.context/profile.md +29 -0
  32. package/.context/projects/_index.md +41 -0
  33. package/.context/projects/papers/nudge-exp.md +22 -0
  34. package/.context/projects/papers/uncertainty.md +31 -0
  35. package/.context/resources/claude-scientific-writer-review.md +48 -0
  36. package/.context/resources/cunningham-multi-analyst-agents.md +104 -0
  37. package/.context/resources/cunningham-multilang-code-audit.md +62 -0
  38. package/.context/resources/google-ai-co-scientist-review.md +72 -0
  39. package/.context/resources/karpathy-llm-council-review.md +58 -0
  40. package/.context/resources/multi-coder-reliability-protocol.md +175 -0
  41. package/.context/resources/pedro-santanna-takeaways.md +96 -0
  42. package/.context/resources/venue-rankings/abs_ajg_2024.csv +1823 -0
  43. package/.context/resources/venue-rankings/abs_ajg_2024_econ.csv +356 -0
  44. package/.context/resources/venue-rankings/cabs_4_4star_theory.csv +40 -0
  45. package/.context/resources/venue-rankings/core_2026.csv +801 -0
  46. package/.context/resources/venue-rankings.md +147 -0
  47. package/.context/workflows/README.md +69 -0
  48. package/.context/workflows/daily-review.md +91 -0
  49. package/.context/workflows/meeting-actions.md +108 -0
  50. package/.context/workflows/replication-protocol.md +155 -0
  51. package/.context/workflows/weekly-review.md +113 -0
  52. package/.mcp-server-biblio/formatters.py +158 -0
  53. package/.mcp-server-biblio/pyproject.toml +11 -0
  54. package/.mcp-server-biblio/server.py +678 -0
  55. package/.mcp-server-biblio/sources/__init__.py +14 -0
  56. package/.mcp-server-biblio/sources/base.py +73 -0
  57. package/.mcp-server-biblio/sources/formatters.py +83 -0
  58. package/.mcp-server-biblio/sources/models.py +22 -0
  59. package/.mcp-server-biblio/sources/multi_source.py +243 -0
  60. package/.mcp-server-biblio/sources/openalex_source.py +183 -0
  61. package/.mcp-server-biblio/sources/scopus_source.py +309 -0
  62. package/.mcp-server-biblio/sources/wos_source.py +508 -0
  63. package/.mcp-server-biblio/uv.lock +896 -0
  64. package/.scripts/README.md +161 -0
  65. package/.scripts/ai_pattern_density.py +446 -0
  66. package/.scripts/conf +445 -0
  67. package/.scripts/config.py +122 -0
  68. package/.scripts/count_inventory.py +275 -0
  69. package/.scripts/daily_digest.py +288 -0
  70. package/.scripts/done +177 -0
  71. package/.scripts/extract_meeting_actions.py +223 -0
  72. package/.scripts/focus +176 -0
  73. package/.scripts/generate-codex-agents-md.py +217 -0
  74. package/.scripts/inbox +194 -0
  75. package/.scripts/notion_helpers.py +325 -0
  76. package/.scripts/openalex/query_helpers.py +306 -0
  77. package/.scripts/papers +227 -0
  78. package/.scripts/query +223 -0
  79. package/.scripts/session-history.py +201 -0
  80. package/.scripts/skill-health.py +516 -0
  81. package/.scripts/skill-log-miner.py +273 -0
  82. package/.scripts/sync-to-codex.sh +252 -0
  83. package/.scripts/task +213 -0
  84. package/.scripts/tasks +190 -0
  85. package/.scripts/week +206 -0
  86. package/CLAUDE.md +197 -0
  87. package/LICENSE +21 -0
  88. package/MEMORY.md +38 -0
  89. package/README.md +269 -0
  90. package/docs/agents.md +44 -0
  91. package/docs/bibliography-setup.md +55 -0
  92. package/docs/council-mode.md +36 -0
  93. package/docs/getting-started.md +245 -0
  94. package/docs/hooks.md +38 -0
  95. package/docs/mcp-servers.md +82 -0
  96. package/docs/notion-setup.md +109 -0
  97. package/docs/rules.md +33 -0
  98. package/docs/scripts.md +303 -0
  99. package/docs/setup-overview/setup-overview.pdf +0 -0
  100. package/docs/skills.md +70 -0
  101. package/docs/system.md +159 -0
  102. package/hooks/block-destructive-git.sh +66 -0
  103. package/hooks/context-monitor.py +114 -0
  104. package/hooks/postcompact-restore.py +157 -0
  105. package/hooks/precompact-autosave.py +181 -0
  106. package/hooks/promise-checker.sh +124 -0
  107. package/hooks/protect-source-files.sh +81 -0
  108. package/hooks/resume-context-loader.sh +53 -0
  109. package/hooks/startup-context-loader.sh +102 -0
  110. package/package.json +51 -0
  111. package/packages/cli-council/.github/workflows/claude-code-review.yml +44 -0
  112. package/packages/cli-council/.github/workflows/claude.yml +50 -0
  113. package/packages/cli-council/README.md +100 -0
  114. package/packages/cli-council/pyproject.toml +43 -0
  115. package/packages/cli-council/src/cli_council/__init__.py +19 -0
  116. package/packages/cli-council/src/cli_council/__main__.py +185 -0
  117. package/packages/cli-council/src/cli_council/backends/__init__.py +8 -0
  118. package/packages/cli-council/src/cli_council/backends/base.py +81 -0
  119. package/packages/cli-council/src/cli_council/backends/claude.py +25 -0
  120. package/packages/cli-council/src/cli_council/backends/codex.py +27 -0
  121. package/packages/cli-council/src/cli_council/backends/gemini.py +26 -0
  122. package/packages/cli-council/src/cli_council/checkpoint.py +212 -0
  123. package/packages/cli-council/src/cli_council/config.py +51 -0
  124. package/packages/cli-council/src/cli_council/council.py +391 -0
  125. package/packages/cli-council/src/cli_council/models.py +46 -0
  126. package/packages/llm-council/.github/workflows/claude-code-review.yml +44 -0
  127. package/packages/llm-council/.github/workflows/claude.yml +50 -0
  128. package/packages/llm-council/README.md +453 -0
  129. package/packages/llm-council/pyproject.toml +42 -0
  130. package/packages/llm-council/src/llm_council/__init__.py +23 -0
  131. package/packages/llm-council/src/llm_council/__main__.py +259 -0
  132. package/packages/llm-council/src/llm_council/checkpoint.py +193 -0
  133. package/packages/llm-council/src/llm_council/client.py +253 -0
  134. package/packages/llm-council/src/llm_council/config.py +232 -0
  135. package/packages/llm-council/src/llm_council/council.py +482 -0
  136. package/packages/llm-council/src/llm_council/models.py +46 -0
  137. package/packages/mcp-bibliography/MEMORY.md +31 -0
  138. package/packages/mcp-bibliography/_app.py +226 -0
  139. package/packages/mcp-bibliography/formatters.py +158 -0
  140. package/packages/mcp-bibliography/log/2026-03-13-2100.md +35 -0
  141. package/packages/mcp-bibliography/pyproject.toml +15 -0
  142. package/packages/mcp-bibliography/run.sh +20 -0
  143. package/packages/mcp-bibliography/scholarly_formatters.py +83 -0
  144. package/packages/mcp-bibliography/server.py +1857 -0
  145. package/packages/mcp-bibliography/tools/__init__.py +28 -0
  146. package/packages/mcp-bibliography/tools/_registry.py +19 -0
  147. package/packages/mcp-bibliography/tools/altmetric.py +107 -0
  148. package/packages/mcp-bibliography/tools/core.py +92 -0
  149. package/packages/mcp-bibliography/tools/dblp.py +52 -0
  150. package/packages/mcp-bibliography/tools/openalex.py +296 -0
  151. package/packages/mcp-bibliography/tools/opencitations.py +102 -0
  152. package/packages/mcp-bibliography/tools/openreview.py +179 -0
  153. package/packages/mcp-bibliography/tools/orcid.py +131 -0
  154. package/packages/mcp-bibliography/tools/scholarly.py +575 -0
  155. package/packages/mcp-bibliography/tools/unpaywall.py +63 -0
  156. package/packages/mcp-bibliography/tools/zenodo.py +123 -0
  157. package/packages/mcp-bibliography/uv.lock +711 -0
  158. package/scripts/setup.sh +143 -0
  159. package/skills/beamer-deck/SKILL.md +199 -0
  160. package/skills/beamer-deck/references/quality-rubric.md +54 -0
  161. package/skills/beamer-deck/references/review-prompts.md +106 -0
  162. package/skills/bib-validate/SKILL.md +261 -0
  163. package/skills/bib-validate/references/council-mode.md +34 -0
  164. package/skills/bib-validate/references/deep-verify.md +79 -0
  165. package/skills/bib-validate/references/fix-mode.md +36 -0
  166. package/skills/bib-validate/references/openalex-verification.md +45 -0
  167. package/skills/bib-validate/references/preprint-check.md +31 -0
  168. package/skills/bib-validate/references/ref-manager-crossref.md +41 -0
  169. package/skills/bib-validate/references/report-template.md +82 -0
  170. package/skills/code-archaeology/SKILL.md +141 -0
  171. package/skills/code-review/SKILL.md +265 -0
  172. package/skills/code-review/references/quality-rubric.md +67 -0
  173. package/skills/consolidate-memory/SKILL.md +208 -0
  174. package/skills/context-status/SKILL.md +126 -0
  175. package/skills/creation-guard/SKILL.md +230 -0
  176. package/skills/devils-advocate/SKILL.md +130 -0
  177. package/skills/devils-advocate/references/competing-hypotheses.md +83 -0
  178. package/skills/init-project/SKILL.md +115 -0
  179. package/skills/init-project-course/references/memory-and-settings.md +92 -0
  180. package/skills/init-project-course/references/organise-templates.md +94 -0
  181. package/skills/init-project-course/skill.md +147 -0
  182. package/skills/init-project-light/skill.md +139 -0
  183. package/skills/init-project-research/SKILL.md +368 -0
  184. package/skills/init-project-research/references/atlas-pipeline-sync.md +70 -0
  185. package/skills/init-project-research/references/atlas-schema.md +81 -0
  186. package/skills/init-project-research/references/confirmation-report.md +39 -0
  187. package/skills/init-project-research/references/domain-profile-template.md +104 -0
  188. package/skills/init-project-research/references/interview-round3.md +34 -0
  189. package/skills/init-project-research/references/literature-discovery.md +43 -0
  190. package/skills/init-project-research/references/scaffold-details.md +197 -0
  191. package/skills/init-project-research/templates/field-calibration.md +60 -0
  192. package/skills/init-project-research/templates/pipeline-manifest.md +63 -0
  193. package/skills/init-project-research/templates/run-all.sh +116 -0
  194. package/skills/init-project-research/templates/seed-files.md +337 -0
  195. package/skills/insights-deck/SKILL.md +151 -0
  196. package/skills/interview-me/SKILL.md +157 -0
  197. package/skills/latex/SKILL.md +141 -0
  198. package/skills/latex/references/latex-configs.md +183 -0
  199. package/skills/latex-autofix/SKILL.md +230 -0
  200. package/skills/latex-autofix/references/known-errors.md +183 -0
  201. package/skills/latex-autofix/references/quality-rubric.md +50 -0
  202. package/skills/latex-health-check/SKILL.md +161 -0
  203. package/skills/learn/SKILL.md +220 -0
  204. package/skills/learn/scripts/validate_skill.py +265 -0
  205. package/skills/lessons-learned/SKILL.md +201 -0
  206. package/skills/literature/SKILL.md +335 -0
  207. package/skills/literature/references/agent-templates.md +393 -0
  208. package/skills/literature/references/bibliometric-apis.md +44 -0
  209. package/skills/literature/references/cli-council-search.md +79 -0
  210. package/skills/literature/references/openalex-api-guide.md +371 -0
  211. package/skills/literature/references/openalex-common-queries.md +381 -0
  212. package/skills/literature/references/openalex-workflows.md +248 -0
  213. package/skills/literature/references/reference-manager-sync.md +36 -0
  214. package/skills/literature/references/scopus-api-guide.md +208 -0
  215. package/skills/literature/references/wos-api-guide.md +308 -0
  216. package/skills/multi-perspective/SKILL.md +311 -0
  217. package/skills/multi-perspective/references/computational-many-analysts.md +77 -0
  218. package/skills/pipeline-manifest/SKILL.md +226 -0
  219. package/skills/pre-submission-report/SKILL.md +153 -0
  220. package/skills/process-reviews/SKILL.md +244 -0
  221. package/skills/process-reviews/references/rr-routing.md +101 -0
  222. package/skills/project-deck/SKILL.md +87 -0
  223. package/skills/project-safety/SKILL.md +135 -0
  224. package/skills/proofread/SKILL.md +254 -0
  225. package/skills/proofread/references/quality-rubric.md +104 -0
  226. package/skills/python-env/SKILL.md +57 -0
  227. package/skills/quarto-deck/SKILL.md +226 -0
  228. package/skills/quarto-deck/references/markdown-format.md +143 -0
  229. package/skills/quarto-deck/references/quality-rubric.md +54 -0
  230. package/skills/save-context/SKILL.md +174 -0
  231. package/skills/session-log/SKILL.md +98 -0
  232. package/skills/shared/concept-validation-gate.md +161 -0
  233. package/skills/shared/council-protocol.md +265 -0
  234. package/skills/shared/distribution-diagnostics.md +164 -0
  235. package/skills/shared/engagement-stratified-sampling.md +218 -0
  236. package/skills/shared/escalation-protocol.md +74 -0
  237. package/skills/shared/external-audit-protocol.md +205 -0
  238. package/skills/shared/intercoder-reliability.md +256 -0
  239. package/skills/shared/mcp-degradation.md +81 -0
  240. package/skills/shared/method-probing-questions.md +163 -0
  241. package/skills/shared/multi-language-conventions.md +143 -0
  242. package/skills/shared/paid-api-safety.md +174 -0
  243. package/skills/shared/palettes.md +90 -0
  244. package/skills/shared/progressive-disclosure.md +92 -0
  245. package/skills/shared/project-documentation-content.md +443 -0
  246. package/skills/shared/project-documentation-format.md +281 -0
  247. package/skills/shared/project-documentation.md +100 -0
  248. package/skills/shared/publication-output.md +138 -0
  249. package/skills/shared/quality-scoring.md +70 -0
  250. package/skills/shared/reference-resolution.md +77 -0
  251. package/skills/shared/research-quality-rubric.md +165 -0
  252. package/skills/shared/rhetoric-principles.md +54 -0
  253. package/skills/shared/skill-design-patterns.md +272 -0
  254. package/skills/shared/skill-index.md +240 -0
  255. package/skills/shared/system-documentation.md +334 -0
  256. package/skills/shared/tikz-rules.md +402 -0
  257. package/skills/shared/validation-tiers.md +121 -0
  258. package/skills/shared/venue-guides/README.md +46 -0
  259. package/skills/shared/venue-guides/cell_press_style.md +483 -0
  260. package/skills/shared/venue-guides/conferences_formatting.md +564 -0
  261. package/skills/shared/venue-guides/cs_conference_style.md +463 -0
  262. package/skills/shared/venue-guides/examples/cell_summary_example.md +247 -0
  263. package/skills/shared/venue-guides/examples/medical_structured_abstract.md +313 -0
  264. package/skills/shared/venue-guides/examples/nature_abstract_examples.md +213 -0
  265. package/skills/shared/venue-guides/examples/neurips_introduction_example.md +245 -0
  266. package/skills/shared/venue-guides/journals_formatting.md +486 -0
  267. package/skills/shared/venue-guides/medical_journal_styles.md +535 -0
  268. package/skills/shared/venue-guides/ml_conference_style.md +556 -0
  269. package/skills/shared/venue-guides/nature_science_style.md +405 -0
  270. package/skills/shared/venue-guides/reviewer_expectations.md +417 -0
  271. package/skills/shared/venue-guides/venue_writing_styles.md +321 -0
  272. package/skills/split-pdf/SKILL.md +172 -0
  273. package/skills/split-pdf/methodology.md +48 -0
  274. package/skills/sync-notion/SKILL.md +93 -0
  275. package/skills/system-audit/SKILL.md +157 -0
  276. package/skills/system-audit/references/sub-agent-prompts.md +294 -0
  277. package/skills/task-management/SKILL.md +131 -0
  278. package/skills/update-focus/SKILL.md +204 -0
  279. package/skills/update-project-doc/SKILL.md +194 -0
  280. package/skills/validate-bib/SKILL.md +242 -0
  281. package/skills/validate-bib/references/council-mode.md +34 -0
  282. package/skills/validate-bib/references/deep-verify.md +71 -0
  283. package/skills/validate-bib/references/openalex-verification.md +45 -0
  284. package/skills/validate-bib/references/preprint-check.md +31 -0
  285. package/skills/validate-bib/references/report-template.md +62 -0
@@ -0,0 +1,393 @@
1
+ # Literature Skill: Agent Templates
2
+
3
+ > Sub-agent prompt templates used in Phases 2, 4, and 5 of the `/literature` skill. Read this when dispatching agents.
4
+
5
+ ---
6
+
7
+ ## Phase 2: Search Agent Templates
8
+
9
+ ### Agent 1: Google Scholar Search
10
+
11
+ ```
12
+ subagent_type: Explore
13
+ prompt: |
14
+ Search Google Scholar for academic papers on: [TOPIC]
15
+
16
+ Focus on: [JOURNALS/FIELDS if specified]
17
+ Time period: [YEARS if specified]
18
+
19
+ Search strategy:
20
+ 1. Start with broad terms capturing the core concept
21
+ 2. Narrow progressively — add specificity based on results
22
+ 3. Try 3-5 different query variations
23
+
24
+ Prioritize:
25
+ - Recent work (past 3 years) first
26
+ - Highly-cited foundational papers regardless of age
27
+ - Peer-reviewed over preprints
28
+
29
+ Skip these already-known papers: [LIST OF EXISTING CITATION KEYS]
30
+
31
+ Return a structured list with for each paper:
32
+ - Title, authors, year, journal/venue
33
+ - DOI or URL if found
34
+ - Brief note on relevance (1 sentence)
35
+
36
+ Target: [N] papers. Cast a wide net — duplicates will be removed later.
37
+ ```
38
+
39
+ ### Agent 2: Semantic Scholar / arXiv Search
40
+
41
+ ```
42
+ subagent_type: Explore
43
+ prompt: |
44
+ Search Semantic Scholar and arXiv for academic papers on: [TOPIC]
45
+
46
+ [Same structure as Agent 1, but targeting these specific sources]
47
+ Use WebSearch with site:semanticscholar.org and site:arxiv.org queries.
48
+
49
+ Skip these already-known papers: [LIST OF EXISTING CITATION KEYS]
50
+
51
+ Return the same structured list format as above.
52
+ Target: [N] papers.
53
+ ```
54
+
55
+ ### Agent 2 (recommended): Cross-Source Search via Pre-Fetched Biblio Data
56
+
57
+ **This is the primary structured search agent.** The orchestrator (main context) calls `scholarly_search` via the bibliography MCP before spawning this agent, and writes results to a temp file.
58
+
59
+ **MCP tools are NOT available in sub-agents.** The orchestrator must pre-fetch search results.
60
+
61
+ **Orchestrator pre-fetch step (run in main context before spawning Agent 2):**
62
+ 1. Call `scholarly_search` with query, year_from, year_to, sort_by, limit: 50
63
+ 2. If sub-themes exist, run additional `scholarly_search` calls
64
+ 3. Optionally call `scholarly_similar_works` for related papers
65
+ 4. Write all results to `/tmp/lit-search/bibliography-results.json`
66
+
67
+ ```
68
+ subagent_type: Explore
69
+ prompt: |
70
+ Read pre-fetched bibliography search results from:
71
+ /tmp/lit-search/bibliography-results.json
72
+
73
+ This file contains structured results from OpenAlex, Scopus, and WoS
74
+ for papers on: [TOPIC]
75
+
76
+ Your tasks:
77
+ 1. Parse the results and extract: title, authors, year, journal, DOI, citation count
78
+ 2. Supplement with WebSearch for papers that may be missing from bibliometric databases
79
+ (very recent papers, working papers, interdisciplinary work)
80
+ 3. Search Semantic Scholar (site:semanticscholar.org) for additional coverage
81
+
82
+ Skip these already-known papers: [LIST OF EXISTING CITATION KEYS]
83
+
84
+ Return for each paper: title, authors, year, journal, DOI, citation count, sources found in.
85
+ Target: [N] papers. Cast a wide net — duplicates will be removed later.
86
+ ```
87
+
88
+ ### Agent 3 (optional): Semantic Scholar / arXiv or Domain-Specific
89
+
90
+ Use when the topic has strong CS/ML overlap (Semantic Scholar) or needs working paper coverage (SSRN, NBER):
91
+
92
+ ```
93
+ subagent_type: Explore
94
+ prompt: |
95
+ Search Semantic Scholar and arXiv for academic papers on: [TOPIC]
96
+
97
+ [Same structure as Agent 1, but targeting these specific sources]
98
+ Use WebSearch with site:semanticscholar.org and site:arxiv.org queries.
99
+
100
+ Skip these already-known papers: [LIST OF EXISTING CITATION KEYS]
101
+
102
+ Return the same structured list format as above.
103
+ Target: [N] papers.
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Phase 4: Verification
109
+
110
+ ### Step 1: Batch DOI Pre-Verification via MCP (Direct — No Sub-Agent)
111
+
112
+ Before spawning verification agents, collect all DOIs from Phase 3 candidates and call the bibliography MCP tool directly:
113
+
114
+ ```
115
+ Call `scholarly_verify_dois` with:
116
+ dois: ["10.1016/j.ejor.2024.01.001", "10.1287/mnsc.2022.4321", ...]
117
+
118
+ Results: each DOI gets a status AND a resolved title:
119
+ - VERIFIED (2+ sources confirm) → CHECK TITLE MATCH before accepting
120
+ - SINGLE_SOURCE (1 source only) → still needs manual check
121
+ - NOT_FOUND → needs full manual verification or may be fabricated
122
+ ```
123
+
124
+ **CRITICAL — Title-matching gate:** For every VERIFIED DOI, compare the returned title against the expected title. If they don't match, the DOI is WRONG even though it resolves. This is the most common error pattern — lookup tools return DOIs that are structurally valid (correct journal prefix, plausible suffix) but point to a different paper in the same journal. Example: `10.1111/j.1468-0297.2010.02387.x` vs `02366.x` — both resolve, but to different papers.
125
+
126
+ Papers with title mismatches go to Step 2. Papers without DOIs always go to manual verification.
127
+
128
+ ### Step 2: Manual Verification for Remaining Papers
129
+
130
+ Spawn multiple agents in parallel, each verifying a batch of ~5 papers:
131
+
132
+ ```
133
+ subagent_type: general-purpose
134
+ prompt: |
135
+ Verify that each of the following academic papers exists and has correct metadata.
136
+ This is for a bibliography — accuracy is critical. Do NOT guess or fabricate details.
137
+
138
+ Papers to verify:
139
+ 1. [Title] by [Authors] ([Year]) — [Journal/venue if known]
140
+ 2. [Title] by [Authors] ([Year]) — [Journal/venue if known]
141
+ 3. ...
142
+ 4. ...
143
+ 5. ...
144
+
145
+ For EACH paper:
146
+ 1. Search the web to confirm the paper exists
147
+ 2. Verify: authors (ALL authors — full list, exact names and order), title, year, journal, volume, pages
148
+ 3. **Find the correct DOI using these methods IN ORDER of reliability:**
149
+ a. **Crossref API (most reliable — ALWAYS try this first):** Run:
150
+ `curl -sL "https://api.crossref.org/works?query.bibliographic=TITLE+AUTHOR&rows=3"`
151
+ Parse the JSON response — the first result's `DOI` field is the correct DOI.
152
+ This uses publisher metadata and is far more reliable than web search or MCP tools.
153
+ **Do NOT use MCP `scholarly_search` for specific known papers** — it returns
154
+ noisy, irrelevant results. Crossref is the gold standard for targeted lookups.
155
+ b. **Publisher page:** Visit the journal's website and search for the paper.
156
+ c. **Web search (last resort):** Search for the paper + "DOI". But DOIs from
157
+ web search MUST still be verified in step 4.
158
+ 4. **Resolve the DOI** by visiting https://doi.org/[DOI] — confirm the landing
159
+ page shows the SAME title and authors. If the DOI resolves to a different
160
+ paper, the metadata is WRONG. Go back to step 3.
161
+ **NEVER reconstruct DOIs from memory or by guessing suffixes** — this is the
162
+ most common hallucination pattern (correct journal prefix, wrong suffix).
163
+ 5. Find the abstract
164
+ 6. Note the URL where you found/confirmed it (publisher page preferred)
165
+ 7. **Preprint check:** If the paper was found on arXiv, SSRN, NBER, or any
166
+ working paper series, search for a published journal or conference version.
167
+ Check Google Scholar, the DOI, and the author's publication page.
168
+ Use Crossref API or WebSearch — do NOT call MCP tools (scholarly_search,
169
+ scholarly_verify_dois, etc.) as MCP tools are not available in sub-agents.
170
+ - If a published version exists: use that version's metadata instead
171
+ (journal, year, volume, pages, DOI)
172
+ - If no published version exists: keep the preprint, but note it as
173
+ a working paper in the venue field
174
+
175
+ **Author accuracy rules:**
176
+ - List ALL authors — never use "and others" or "et al." in the metadata.
177
+ Every author must be named.
178
+ - Beware of author conflation: researchers in the same subfield may share
179
+ surnames or topics. Confirm authors from the publisher page, not from
180
+ secondary aggregators.
181
+ - If you find the paper attributed to different authors on different sources,
182
+ trust the publisher/DOI landing page over Google Scholar snippets.
183
+ - **Verify author order and initials** against the publisher page. Common
184
+ errors: swapped first/last names, wrong middle initials, missing co-authors,
185
+ or extra authors from a different paper with a similar title.
186
+
187
+ **DOI verification is mandatory.** If the DOI does not resolve to the claimed
188
+ paper, the entry FAILS verification — do not mark it as VERIFIED.
189
+ Use Crossref API for DOI lookup — never guess or reconstruct DOIs.
190
+
191
+ Return for each paper one of:
192
+ - VERIFIED: [full corrected metadata including DOI and abstract]
193
+ — include the URL of the publisher page where you confirmed the metadata
194
+ — if upgraded from preprint, add: "UPGRADED from [preprint source]"
195
+ - NOT FOUND: [title] — could not confirm existence, do not include
196
+ - METADATA MISMATCH: [title] — paper exists but DOI/authors don't match
197
+ search results. Include what you found and flag the discrepancy.
198
+
199
+ Be strict. If you cannot find a paper or its details don't match, mark it NOT FOUND
200
+ or METADATA MISMATCH. Never guess metadata.
201
+ ```
202
+
203
+ ---
204
+
205
+ ## Phase 5: PDF Download Agent Template
206
+
207
+ ```
208
+ subagent_type: Bash
209
+ prompt: |
210
+ Download PDFs for these academic papers. Save each to [PROJECT]/docs/readings/
211
+ with filename matching the citation key.
212
+
213
+ Papers:
214
+ 1. Key: Smith2024 — DOI: 10.1000/example — URL: https://...
215
+ 2. Key: Jones2023 — DOI: 10.1000/example2 — URL: https://...
216
+ 3. ...
217
+
218
+ For each paper, try in order:
219
+ 1. Direct PDF link if known
220
+ 2. DOI redirect (https://doi.org/[DOI])
221
+ 3. Search for open access version on author website, SSRN, arXiv, NBER
222
+
223
+ Use curl or wget. Create the output directory if needed.
224
+ Report which downloads succeeded and which failed.
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Prompt Templates (User-Facing)
230
+
231
+ ### Find specific references
232
+ ```
233
+ Find 5 recent papers on [TOPIC] from [JOURNALS].
234
+ Verify each citation exists and provide BibTeX entries.
235
+ ```
236
+
237
+ ### Build comprehensive literature
238
+ ```
239
+ Help me synthesize the literature on [TOPIC].
240
+
241
+ I need:
242
+ 1. Top 25 seminal papers (high citations, foundational)
243
+ 2. Key themes/debates in this literature
244
+ 3. Narrative "story" of how this field developed
245
+ 4. Gaps or opportunities for new research
246
+ 5. A .bib file with all references
247
+
248
+ Focus on: [JOURNALS/FIELDS]
249
+ Time period: [YEARS]
250
+ ```
251
+
252
+ ### Synthesis prompts
253
+ ```
254
+ Organize these papers into themes and write a 2-paragraph summary of each theme.
255
+ ```
256
+
257
+ ```
258
+ Based on this literature, what research questions remain unanswered?
259
+ ```
260
+
261
+ ---
262
+
263
+ ## Phase 2b: CLI Council Search Template
264
+
265
+ **When to use:** Broad reviews (20+ papers), interdisciplinary topics, or when Phase 2 coverage seems thin. Each model (Gemini, Codex, Claude) has different training data and recall — and Gemini has live web search.
266
+
267
+ **Step 1:** Write the search prompt to a temp file:
268
+
269
+ ```bash
270
+ cat > /tmp/lit-council-prompt.txt << 'PROMPT'
271
+ Search for academic papers on: [TOPIC]
272
+
273
+ Focus: [JOURNALS/FIELDS if specified]
274
+ Time period: [YEARS if specified]
275
+
276
+ For each paper, provide:
277
+ - Full title
278
+ - ALL authors (full names, never "et al.")
279
+ - Year of publication
280
+ - Journal or venue name
281
+ - DOI if known
282
+ - One sentence on relevance
283
+
284
+ Prioritize:
285
+ - Highly-cited foundational papers regardless of age
286
+ - Recent work (past 3-5 years)
287
+ - Peer-reviewed over preprints
288
+ - Papers from top journals in the field
289
+
290
+ Target: [N] papers. Cast a wide net — duplicates will be removed later.
291
+
292
+ Skip these already-known papers: [LIST OF EXISTING CITATION KEYS]
293
+ PROMPT
294
+ ```
295
+
296
+ **Step 2:** Run the council:
297
+
298
+ ```bash
299
+ cd "$TM/packages/cli-council"
300
+ uv run python -m cli_council \
301
+ --prompt-file /tmp/lit-council-prompt.txt \
302
+ --output /tmp/lit-council-result.json \
303
+ --output-md /tmp/lit-council-report.md \
304
+ --timeout 180
305
+ ```
306
+
307
+ **Step 3:** Parse results. Read `/tmp/lit-council-report.md` and extract paper lists from:
308
+ - The synthesis (chairman's merged list)
309
+ - Each individual assessment (Assessment A/B/C) — these often contain papers the others missed
310
+
311
+ Feed all discovered papers into Phase 3 (deduplication) alongside Phase 2 results.
312
+
313
+ **Expected value:** Gemini finds more recent papers via web search. Codex and Claude recall different foundational works from training. Typical yield: 10-20% more unique papers vs. Phase 2 alone.
314
+
315
+ ---
316
+
317
+ ## Phase 7: CLI Council Synthesis Template (Optional)
318
+
319
+ For comprehensive reviews, run the narrative synthesis through cli-council to get three independent thematic interpretations.
320
+
321
+ **Step 1:** Write the paper list to a context file:
322
+
323
+ ```bash
324
+ # Collect all verified paper metadata (titles, abstracts, years, journals)
325
+ # into a single file for context
326
+ cat > /tmp/lit-papers.txt << 'EOF'
327
+ [Paste the verified paper list with titles, authors, years, journals, and abstracts]
328
+ EOF
329
+ ```
330
+
331
+ **Step 2:** Write the synthesis prompt:
332
+
333
+ ```bash
334
+ cat > /tmp/lit-synthesis-prompt.txt << 'PROMPT'
335
+ Synthesise the following academic literature into a structured narrative review.
336
+
337
+ 1. Identify major themes — group papers by approach, finding, or intellectual tradition
338
+ 2. Map the intellectual lineage — how did thinking in this area evolve?
339
+ 3. Note current debates — where do researchers disagree?
340
+ 4. Identify gaps — what questions remain unanswered?
341
+
342
+ Structure your synthesis as numbered themes, each with:
343
+ - Theme title
344
+ - 2-3 paragraph narrative
345
+ - Key papers in that theme (cite by author and year)
346
+
347
+ End with a "Gaps and Opportunities" section identifying 3-5 directions for future research.
348
+ PROMPT
349
+ ```
350
+
351
+ **Step 3:** Run the council:
352
+
353
+ ```bash
354
+ cd "$TM/packages/cli-council"
355
+ uv run python -m cli_council \
356
+ --prompt-file /tmp/lit-synthesis-prompt.txt \
357
+ --context-file /tmp/lit-papers.txt \
358
+ --output-md /tmp/lit-synthesis-report.md \
359
+ --chairman claude \
360
+ --timeout 180
361
+ ```
362
+
363
+ **Expected value:** Different models identify different thematic groupings and gaps. The chairman synthesis produces a richer narrative than any single model.
364
+
365
+ ---
366
+
367
+ ## Scaling Guide
368
+
369
+ | Request size | Search agents | CLI Council (Phase 2b) | DOI pre-verify (MCP) | Verification waves | PDF waves |
370
+ |---|---|---|---|---|---|
371
+ | 5 papers | 1 (MCP cross-source) | Skip | 1 call | 1 wave (1 agent) | 1 wave |
372
+ | 10-15 papers | 2 (Scholar + MCP) | Skip | 1 call | 1 wave (2-3 agents) | 1 wave |
373
+ | 20-25 papers | 2-3 | Recommended | 1 call | 1-2 waves | 2 waves |
374
+ | 30+ papers | 3 | Recommended | 1 call (50 DOI limit) | 2+ waves | 3+ waves |
375
+
376
+ For small requests (< 5 papers), skip sub-agents entirely — call `scholarly_search` and `scholarly_verify_dois` directly, then do verification inline.
377
+
378
+ **Between waves:** write collected results to the `.bib` file or a scratch markdown file on disk, then proceed to the next wave. This prevents context overflow.
379
+
380
+ ---
381
+
382
+ ## Example Use
383
+
384
+ "Create a literature review on interactive approaches to multi-criteria decision making, focusing on papers from top journals in the field from 2015-2025. I need about 25 key papers with a .bib file and a narrative summary."
385
+
386
+ This would trigger:
387
+ 1. Pre-search check for existing .bib
388
+ 2. 3 parallel search agents (Scholar, Semantic Scholar, domain journals)
389
+ 3. Deduplicate ~40 candidates down to ~30
390
+ 4. 2 waves of 3 verification agents (5 papers each), results written to disk between waves
391
+ 5. 2 waves of 3 PDF download agents
392
+ 6. Assemble verified .bib (~25 papers)
393
+ 7. Write thematic narrative summary
@@ -0,0 +1,44 @@
1
+ # Bibliometric API Structured Queries
2
+
3
+ > Four bibliometric sources are available. The **bibliography MCP server** (`packages/mcp-bibliography/`) is the preferred interface — `scholarly_search` queries all enabled sources in one call with automatic DOI-based dedup; `scholarly_verify_dois` batch-verifies DOIs across all sources.
4
+
5
+ ## Bibliography MCP Tools (preferred)
6
+
7
+ | Tool | What it does | When to use |
8
+ |------|-------------|-------------|
9
+ | `scholarly_search` | Cross-source keyword search (OpenAlex + S2 + Scopus + WoS) with dedup | Phase 2 pre-fetch |
10
+ | `scholarly_similar_works` | ML-based recommendations (S2 Recommendations API) | Phase 2 pre-fetch — finds papers beyond keyword matches |
11
+ | `scholarly_verify_dois` | Batch DOI verification across all sources | Phase 4 verification |
12
+ | `scholarly_citations` | Forward citation graph (papers citing a given paper) | Phase 2.5 snowball — find follow-up work |
13
+ | `scholarly_references` | Backward citation graph (papers referenced by a given paper) | Phase 2.5 snowball — find foundational works |
14
+ | `scholarly_paper_detail` | Full metadata + TLDR + BibTeX + OA PDF link | Phase 3 screening, Phase 6 BibTeX assembly |
15
+ | `scholarly_author_papers` | All papers by an author | Phase 2 pre-fetch — author-based search |
16
+ | `scholarly_source_status` | Check which sources are active | Phase 1 |
17
+
18
+ ## OpenAlex (always available)
19
+
20
+ **Setup:** `.scripts/openalex/openalex_client.py` + `.scripts/openalex/query_helpers.py`
21
+
22
+ | Workflow | What it does |
23
+ |----------|-------------|
24
+ | Highly-cited papers | Top-cited papers on a topic (filtered by year) |
25
+ | Author output | Full publication record for a researcher |
26
+ | Institution output | Research output analysis for a university |
27
+ | Publication trends | Year-by-year counts for a topic |
28
+ | Open-access discovery | Find freely downloadable versions |
29
+ | Citation network | Forward citations for a given paper |
30
+ | Batch DOI lookup | Verify metadata for multiple papers |
31
+
32
+ **Full recipes:** [openalex-workflows.md](openalex-workflows.md) | **API guide:** [openalex-api-guide.md](openalex-api-guide.md)
33
+
34
+ ## Scopus (requires `SCOPUS_API_KEY` + `SCOPUS_INST_TOKEN`)
35
+
36
+ Query syntax: `TITLE-ABS-KEY("quoted phrases" OR terms)`, subject areas via `SUBJAREA(CODE)`, year filters via `PUBYEAR > N` / `PUBYEAR < N`. Elsevier REST API with `X-ELS-APIKey` + `X-ELS-Insttoken` headers. Provides abstracts, author keywords, and citation counts in COMPLETE view. Pagination via `start`/`count` params (max 25 per page).
37
+
38
+ **API guide:** [scopus-api-guide.md](scopus-api-guide.md)
39
+
40
+ ## Web of Science (requires `WOS_API_KEY`)
41
+
42
+ Query syntax: `TS=(topic search)`, year filter via `PY=(YYYY-YYYY)`. Two API tiers: **Starter** (`/documents` endpoint, page-based, max 50/page) and **Expanded** (root endpoint, `firstRecord`-based, max 100/page, includes abstracts). Auth via `X-ApiKey` header. Tier set via `WOS_API_TIER` env var (default: `starter`).
43
+
44
+ **API guide:** [wos-api-guide.md](wos-api-guide.md)
@@ -0,0 +1,79 @@
1
+ # CLI Council Search & arXiv Full-Text Reading
2
+
3
+ > Phase 2b multi-model literature search and arXiv source reading.
4
+ > Referenced from `SKILL.md` — the parent file has a summary + pointer.
5
+
6
+ ## Phase 2b: CLI Council Search (Optional)
7
+
8
+ **When to use:** Broad literature reviews (20+ papers), interdisciplinary topics, or when maximum recall matters. Each model has different training data and recall — running the same search query through Gemini, Codex, and Claude surfaces papers that any single model would miss. Gemini additionally has live web search.
9
+
10
+ **How it works:** Run `cli-council` from the `packages/cli-council/` package. The council sends the same search prompt to all three CLI backends in parallel, collects their independent paper lists, then synthesises a merged list.
11
+
12
+ **Invocation:**
13
+
14
+ ```bash
15
+ cd "packages/cli-council"
16
+ uv run python -m cli_council \
17
+ --prompt-file /tmp/lit-council-prompt.txt \
18
+ --output /tmp/lit-council-result.json \
19
+ --output-md /tmp/lit-council-report.md \
20
+ --timeout 180
21
+ ```
22
+
23
+ **Prompt template** (write to `/tmp/lit-council-prompt.txt`):
24
+
25
+ ```
26
+ Search for academic papers on: [TOPIC]
27
+
28
+ Focus: [JOURNALS/FIELDS if specified]
29
+ Time period: [YEARS if specified]
30
+
31
+ For each paper, provide:
32
+ - Full title
33
+ - ALL authors (never "et al.")
34
+ - Year
35
+ - Journal/venue
36
+ - DOI if known
37
+
38
+ Prioritize:
39
+ - Highly-cited foundational papers
40
+ - Recent work (past 3-5 years)
41
+ - Peer-reviewed over preprints
42
+
43
+ Target: [N] papers. Cast a wide net — duplicates will be removed.
44
+
45
+ Skip these already-known papers: [LIST OF EXISTING CITATION KEYS]
46
+ ```
47
+
48
+ **After the council returns:**
49
+ 1. Parse the synthesis and individual assessments from the JSON output
50
+ 2. Extract paper lists from each backend's response (Gemini often finds more recent papers via web search; Codex and Claude recall different foundational works)
51
+ 3. Feed ALL discovered papers into Phase 3 alongside the Phase 2 results for deduplication
52
+
53
+ **When to skip:** Small requests (< 10 papers), narrow/well-defined topics, or when Phase 2 already returns sufficient coverage. The standard Phase 2 agents (Scholar + bibliography MCP) remain the primary search mechanism; Phase 2b supplements with model-diversity recall.
54
+
55
+ ---
56
+
57
+ ## Reading Full Paper Text from arXiv
58
+
59
+ When you need to read the full text of a paper (not just the abstract) — to verify claims, understand methodology, or extract exact phrasing — download the arXiv LaTeX source:
60
+
61
+ ```bash
62
+ # Download source tarball
63
+ curl -L -o /tmp/ARXIV_ID.tar.gz "https://arxiv.org/src/ARXIV_ID"
64
+
65
+ # Extract
66
+ mkdir -p /tmp/ARXIV_ID && cd /tmp/ARXIV_ID && tar -xzf /tmp/ARXIV_ID.tar.gz
67
+
68
+ # Find and read the main .tex file
69
+ ls *.tex
70
+ ```
71
+
72
+ This gives you:
73
+ - Full paper text with equations, methodology details, and exact author phrasing
74
+ - The paper's `.bib` or `.bbl` file for cross-referencing their citations
75
+ - Supplementary materials and appendices
76
+
77
+ **When to use:** Deep verification of a specific paper's claims, extracting precise definitions or theorems, understanding methodology details that abstracts omit, or finding papers cited by the target paper.
78
+
79
+ **Limitation:** Only works for arXiv papers with source available. For journal-only papers, use `/split-pdf` instead.