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,204 @@
1
+ ---
2
+ name: update-focus
3
+ description: "Use when you need to update current-focus.md with a structured session summary."
4
+ allowed-tools: Read, Edit, Bash(git log*), Bash(date*), Bash(ls*)
5
+ ---
6
+
7
+ # Update Focus Skill
8
+
9
+ > Structured end-of-session update to `.context/current-focus.md` that preserves the document's full structure.
10
+
11
+ ## Purpose
12
+
13
+ The stop hook nudges to update `current-focus.md` at session end, but ad-hoc edits risk flattening its rich structure. This skill handles session rotation, open loop management, and targeted questions — so the file stays useful as a working memory between sessions.
14
+
15
+ ## When to Use
16
+
17
+ - At the end of a work session (triggered by stop hook or manually)
18
+ - When the user says "update my focus", "save where I left off", "update current focus"
19
+ - After `/session-log` if `current-focus.md` wasn't updated
20
+
21
+ ## Canonical Document Structure
22
+
23
+ `current-focus.md` follows this structure — **always preserve it**:
24
+
25
+ ```markdown
26
+ # Current Focus
27
+
28
+ > Update this file regularly...
29
+
30
+ ## This Week's Focus (w/c YYYY-MM-DD)
31
+
32
+ ### Primary Goal
33
+ [One sentence]
34
+
35
+ ### Active Projects (Top 3)
36
+ 1. **[Project]** - [Status/phase]
37
+ 2. **[Project]** - [Status/phase]
38
+ 3. **[Project]** - [Status/phase]
39
+
40
+ ### Waiting On
41
+ - [ ] [Person] - [What] - [Since when]
42
+
43
+ ### Upcoming Deadlines
44
+ | Deadline | What | Project |
45
+ |----------|------|---------|
46
+
47
+ ## Recent Context
48
+
49
+ ### Last Session Summary (YYYY-MM-DD — [Title])
50
+ - [Bullet points of what happened]
51
+
52
+ ### Previous Session (YYYY-MM-DD — [Title])
53
+ - [Bullet points]
54
+
55
+ ### Previous Session (YYYY-MM-DD — [Title])
56
+ - [Bullet points]
57
+
58
+ ### Previous Session (YYYY-MM-DD — [Title])
59
+ - [Bullet points]
60
+
61
+ ### Open Loops
62
+ Things I started but haven't finished:
63
+ - [ ] [Item]
64
+ - [x] [Completed item — remove on next update]
65
+
66
+ ### Mental State
67
+ [Optional: How are you feeling about work?]
68
+
69
+ ---
70
+
71
+ ## Quick Reference
72
+
73
+ ### Key Meetings This Week
74
+ - [Day]: [Meeting] with [Person] about [Topic]
75
+
76
+ ### Papers in Active Revision
77
+ - [Paper title] - [Journal] - [Stage]
78
+
79
+ ---
80
+ ```
81
+
82
+ ## Workflow
83
+
84
+ ### Step 1: Read current state
85
+
86
+ Read these three sources to understand what happened:
87
+
88
+ 1. `.context/current-focus.md` — current file contents
89
+ 2. Latest file in `log/` — most recent session log (if one was created)
90
+ 3. `git log --oneline -10` — recent commits for concrete evidence of work done
91
+
92
+ Also note today's date for week rollover detection.
93
+
94
+ ### Step 2: Detect week rollover
95
+
96
+ Compare the `w/c` date in `## This Week's Focus (w/c YYYY-MM-DD)` against today's date.
97
+
98
+ - If today is in a **new week** (Monday-based), flag that weekly sections need updating.
99
+ - If same week, skip weekly section updates.
100
+
101
+ Week rollover means: Primary Goal, Active Projects Top 3, Waiting On, Upcoming Deadlines, and Key Meetings may all need refreshing.
102
+
103
+ ### Step 3: Draft session summary
104
+
105
+ From the session context (conversation history, commits, log), draft a summary in the **same bullet-point format** as existing entries:
106
+
107
+ ```markdown
108
+ ### Last Session Summary (YYYY-MM-DD — [Short Title])
109
+ - [What was done, in bullet points]
110
+ - [Key decisions or outputs]
111
+ - [Files/commits if relevant]
112
+ ```
113
+
114
+ Keep it concise — 3-6 bullet points. Match the style of existing entries.
115
+
116
+ ### Step 4: Ask targeted questions (2-4 max)
117
+
118
+ Ask only what's needed. Skip questions where the answer is obvious from context.
119
+
120
+ **Always ask:**
121
+ 1. "Does this session summary look right?" (show the draft)
122
+ 2. "Any open loops to add or check off?" (show current list with proposed changes marked)
123
+
124
+ **Ask only if relevant:**
125
+ 3. "How are you feeling about work?" — only if Mental State is still a placeholder (`[Optional: ...]`)
126
+ 4. "Has your primary goal or top 3 changed?" — only on **week rollover**
127
+
128
+ Present questions concisely with proposed answers. Let the user confirm or adjust.
129
+
130
+ ### Step 5: Apply the update
131
+
132
+ Use `Edit` to make targeted changes. **Never rewrite the whole file.**
133
+
134
+ #### Session rotation rules
135
+
136
+ - **Rename** the current `### Last Session Summary (...)` to `### Previous Session (...)`
137
+ - **Insert** the new `### Last Session Summary (...)` in its place
138
+ - **Keep a maximum of 4 session entries** in Recent Context (1 Last + 3 Previous)
139
+ - If there are already 4 entries, **delete the oldest** Previous Session
140
+ - Preserve the exact header format: `### Last Session Summary (YYYY-MM-DD — Title)` for the newest, `### Previous Session (YYYY-MM-DD — Title)` for older ones
141
+
142
+ #### Open loop management
143
+
144
+ - **Check off** items that were completed this session (change `- [ ]` to `- [x]`)
145
+ - **Remove** items marked `[x]` from previous sessions (they've been acknowledged)
146
+ - **Add** new open loops identified during the session
147
+ - Keep the intro line: `Things I started but haven't finished:`
148
+
149
+ #### Other updates
150
+
151
+ - Update **Mental State** if the user provided one
152
+ - Update **weekly sections** if week rollover was detected and the user confirmed changes
153
+ - Update **Quick Reference** if meetings or paper revisions changed
154
+ - Update **Waiting On** if new blockers emerged or old ones resolved
155
+
156
+ ### Step 6: Confirm
157
+
158
+ Report what was changed:
159
+
160
+ ```
161
+ Updated .context/current-focus.md:
162
+ - Session: [title] added to Recent Context
163
+ - Open loops: [N checked off, M added]
164
+ - [Any other changes]
165
+ ```
166
+
167
+ If no session log was created this session, offer: "Want me to run `/session-log` too?"
168
+
169
+ ## Integration with Other Skills
170
+
171
+ | Skill | Relationship |
172
+ |-------|-------------|
173
+ | `/session-log` | Creates the detailed log; `/update-focus` updates the working memory. Often run together. |
174
+ | `/save-context` | For ad-hoc saves to any context file. Defers to `/update-focus` for structured focus updates. |
175
+ | `vault sync (edit vault files directly)` | Updates `projects/_index.md` and vault. For full session-level focus updates, defers to `/update-focus`. |
176
+
177
+ ## Example Interaction
178
+
179
+ **Claude:** Here's what I'd update in `current-focus.md`:
180
+
181
+ **Session summary:**
182
+ ```
183
+ ### Last Session Summary (2026-02-08 — Update Focus Skill)
184
+ - Created `/update-focus` skill for structured current-focus.md updates
185
+ - Updated stop hook, session-log, and update-context with cross-references
186
+ - Updated CLAUDE.md skills list (16 → 17)
187
+ ```
188
+
189
+ **Open loops — proposed changes:**
190
+ - [x] ~~Commit all pending changes~~ (done this session)
191
+ - [ ] Test new skills on CAPE-MOBO or MRes paper *(keep)*
192
+ - [ ] Try replication protocol on a real paper *(keep)*
193
+ - **New:** [ ] Test `/update-focus` skill end-to-end
194
+
195
+ Does this look right? Any open loops to add or change?
196
+
197
+ **the user:** Looks good, also check off the replication one, I decided to skip it.
198
+
199
+ **Claude:** Got it. *[Applies edits]* Updated `.context/current-focus.md`:
200
+ - Session: "Update Focus Skill" added to Recent Context
201
+ - Open loops: 2 checked off, 1 added
202
+ - Previous sessions rotated (oldest dropped)
203
+
204
+ Want me to run `/session-log` too?
@@ -0,0 +1,194 @@
1
+ ---
2
+ name: update-project-doc
3
+ description: "Use when you need to update a project's own CLAUDE.md, README.md, or docs/ to reflect current state."
4
+ allowed-tools: Read, Edit, Write, Glob, Grep, Bash(ls*), Bash(git log*), Bash(git diff*), Bash(readlink*), Bash(wc*), Bash(date*), AskUserQuestion
5
+ argument-hint: (no arguments)
6
+ ---
7
+
8
+ # Update Project Doc — Refresh Stale Documentation
9
+
10
+ > Scan a project's documentation files and update sections that have drifted from reality: file trees, timestamps, bibliography counts, next steps, skill/hook tallies, and more.
11
+
12
+ ## When to Use
13
+
14
+ - After significant project work (new files, completed milestones, structural changes)
15
+ - During `/general-session-recap` when offered
16
+ - When the user says "update project docs", "refresh docs", "sync my docs", "update my README"
17
+ - Periodically to keep documentation accurate
18
+
19
+ ## What It Does NOT Do
20
+
21
+ - Never rewrites research content (hypotheses, arguments, literature, design decisions)
22
+ - Never deletes sections — only updates factual/structural content within existing sections
23
+ - Never creates new documentation files — only updates existing ones
24
+
25
+ ---
26
+
27
+ ## Protocol
28
+
29
+ ### Step 1: Detect Documentation Files
30
+
31
+ Find all documentation files in the project:
32
+
33
+ 1. Check for `CLAUDE.md` in project root
34
+ 2. Check for `README.md` in project root
35
+ 3. Scan `docs/` and `docs/*/` for `.md` files containing file trees or counts
36
+ 4. Note which files exist — only update what's present
37
+
38
+ **Special case:** Some projects (e.g., the political information paper) have no `CLAUDE.md` because they use a committed `README.md` as their primary project documentation instead. This is intentional for repos meant to be shared or published. In these cases, treat `README.md` as the main documentation file and apply all the same checks to it.
39
+
40
+ Read each detected file to understand its current content.
41
+
42
+ ### Step 2: Gather Current State
43
+
44
+ Collect the actual state of the project:
45
+
46
+ 1. **File tree** — use `ls -R` or `Glob` to build the actual directory structure (respect `.gitignore` patterns, skip `out/`, `__pycache__/`, `.venv/`, `node_modules/`)
47
+ 2. **Recent git history** — `git log --oneline -20` for recent commits
48
+ 3. **Session logs** — read the latest 1-2 files in `log/` (if the directory exists)
49
+ 4. **Bibliography count** — count entries in any `.bib` file(s): `grep -c '@' *.bib`
50
+ 5. **Symlink targets** — `readlink` on any documented symlinks
51
+ 6. **Context files** — read `.context/current-focus.md` or `.context/project-recap.md` if present
52
+
53
+ **Task Management only** (detected by presence of `skills/` directory):
54
+ 7. **Skill count** — count directories in `skills/` that contain `SKILL.md`
55
+ 8. **Hook count** — count `.sh` files in `hooks/` (if present)
56
+ 9. **Skill lengths** — `wc -l skills/*/SKILL.md` to identify bloated skills
57
+
58
+ **Leanness data** (all projects):
59
+ 10. **CLAUDE.md line count** — `wc -l CLAUDE.md`
60
+ 11. **CLAUDE.md section sizes** — count lines per `##` section
61
+ 12. **README.md line count** — `wc -l README.md`
62
+ 13. **SKILL.md line counts** — (Task Management only) `wc -l skills/*/SKILL.md`
63
+ 14. **Duplication scan** — check if CLAUDE.md content duplicates what's already in README.md, docs/, or .context/ files
64
+ 15. **Agent line counts** — `wc -l .claude/agents/*.md` (if present)
65
+ 16. **Context file line counts** — `wc -l .context/*.md` (if present)
66
+
67
+ ### Step 3: Run Staleness Checks
68
+
69
+ Compare gathered state against documented content. Flag any mismatches:
70
+
71
+ | Check | How to Detect |
72
+ |-------|--------------|
73
+ | **File tree** | Generate actual tree, compare against any tree/structure block in docs (look for ``` blocks or indented listings with file paths) |
74
+ | **Timestamps** | Flag "Last updated", "w/c", or date stamps older than 7 days |
75
+ | **Bibliography count** | Compare actual `.bib` entry count vs any documented count (e.g., "42 references") |
76
+ | **Next steps / roadmap** | Cross-reference items against recent commits and session logs — flag items that appear completed |
77
+ | **Manuscript status** | Flag sections marked "TODO", "incomplete", or "placeholder" that now have content |
78
+ | **Symlinks** | Verify documented symlink targets still resolve with `readlink` |
79
+ | **Skill/hook counts** | (Task Management only) Compare actual count vs documented numbers in CLAUDE.md, README.md, and `.tex` files |
80
+ | **Venue/target info** | If CLAUDE.md documents a target journal, check it matches `.context/projects/_index.md` (if accessible) |
81
+
82
+ ### Step 3b: Leanness Audit
83
+
84
+ Using the data gathered in Step 2 (items 10-14), check infrastructure file sizes against thresholds. This applies to **all projects**, not just Task Management.
85
+
86
+ | File | Threshold | What to flag | Fix |
87
+ |------|-----------|-------------|-----|
88
+ | `CLAUDE.md` | > 200 lines total | Current line count | Extract reference sections to `docs/`, replace with pointers (see `lean-claude-md` rule) |
89
+ | `CLAUDE.md` sections | Any `##` section > 15 lines of reference material | Section name + line count | Extract to `docs/` with a one-line summary + link |
90
+ | `CLAUDE.md` duplication | Content duplicated from README/docs/.context | Which content is duplicated and where | Keep only the pointer in CLAUDE.md |
91
+ | `README.md` | > 300 lines total | Current line count | Extract long sections to `docs/` |
92
+ | `SKILL.md` files | > 300 lines each (TM only) | File name + line count | Move templates/examples/report formats to `references/` or `templates/` subdirectory |
93
+ | Project agents (`.claude/agents/*.md`) | > 400 lines each | File name + line count | Extract verbose prompt sections to companion files |
94
+ | Context files (`.context/*.md`) | > 200 lines each | File name + line count | Archive stale content, keep current |
95
+
96
+ **What counts as "reference material"** (extractable): assessment guidelines, detailed literature notes, long examples, report templates, checklists, reviewer feedback.
97
+
98
+ **What does NOT count** (keep in place): safety rules, conventions, folder structure trees, session continuity pointers.
99
+
100
+ Present leanness findings separately from staleness findings in Step 4.
101
+
102
+ ### Step 4: Propose Changes
103
+
104
+ Present findings grouped by file:
105
+
106
+ ```
107
+ Staleness report for [Project Name]:
108
+
109
+ CLAUDE.md:
110
+ - File structure tree is outdated (missing: X, Y; removed: Z)
111
+ - Skill count says 23, actual is 26
112
+ - "Last updated" date is 3 weeks old
113
+
114
+ README.md:
115
+ - Directory structure block needs updating
116
+ - Next steps: "Write introduction" appears completed (commit abc1234)
117
+ - Bibliography count says 38, actual is 42
118
+
119
+ docs/overview.md:
120
+ - No issues detected
121
+
122
+ Leanness:
123
+ - CLAUDE.md: 237 lines (threshold: 200) — ## Assessment section is 42 lines of guidelines
124
+ - README.md: OK (189 lines)
125
+ ```
126
+
127
+ If nothing is stale, report that and stop.
128
+
129
+ ### Step 5: Ask for Confirmation
130
+
131
+ #### Step 5a: Staleness Fixes
132
+
133
+ Use `AskUserQuestion` to let the user approve, modify, or skip staleness fixes:
134
+
135
+ - **Apply all** — update everything proposed
136
+ - **Select by file** — choose which files to update
137
+ - **Skip** — make no changes
138
+
139
+ #### Step 5b: Offer Leanness Fixes
140
+
141
+ If Step 3b found leanness issues, present each as an individually actionable item:
142
+
143
+ ```
144
+ Leanness fixes available:
145
+
146
+ | # | File | Issue | Current | Fix |
147
+ |---|------|-------|---------|-----|
148
+ | 1 | CLAUDE.md | >200 lines | 237 | Extract ## Assessment section → docs/ |
149
+ | 2 | skills/X/SKILL.md | >300 lines | 382 | Move checklists → references/ |
150
+ ```
151
+
152
+ Use `AskUserQuestion` with `multiSelect: true`:
153
+ - **Question:** "Which leanness fixes do you want to apply?"
154
+ - One option per fix with current size and proposed outcome
155
+ - Include an **"All of them"** option as the first choice
156
+
157
+ **Do not defer or merely report leanness findings.** Always present them as actionable items alongside staleness fixes.
158
+
159
+ ### Step 6: Apply and Report
160
+
161
+ For each approved change:
162
+
163
+ 1. Use **targeted `Edit` operations** — never rewrite entire files
164
+ 2. Preserve all surrounding content
165
+ 3. When updating file trees, match the existing formatting style (├──, |--, indented, etc.)
166
+ 4. When updating counts, find the exact number and replace it
167
+ 5. When marking next-step items as done, use strikethrough (~~item~~) rather than deleting
168
+
169
+ After all edits, print a summary:
170
+
171
+ ```
172
+ Updated project docs:
173
+ CLAUDE.md: file tree, skill count (23 → 26)
174
+ README.md: directory structure, bib count (38 → 42), 1 next-step marked complete
175
+ Total: 5 edits across 2 files
176
+ ```
177
+
178
+ ---
179
+
180
+ ## Key Rules
181
+
182
+ 1. **Targeted edits only** — never rewrite entire files. Use `Edit` with precise `old_string` / `new_string`.
183
+ 2. **Preserve research content** — hypotheses, questions, literature reviews, design decisions, and arguments are sacred. Only update factual/structural sections.
184
+ 3. **Always show before applying** — never make silent edits. The proposal step is mandatory.
185
+ 4. **Match existing style** — if the project uses `├──` trees, don't switch to `|--`. If counts use "X total", don't change to "X skills".
186
+ 5. **Works in any project** — not just Task Management. Adapt checks to what's present.
187
+ 6. **Idempotent** — running twice in a row should produce no changes the second time.
188
+
189
+ ## Cross-References
190
+
191
+ - `/general-session-recap` — offers to run this skill at Step 3.5
192
+ - `/sync-repo private` — Task Management-specific superset: propagates counts across all private TM docs including LaTeX files. Run after this skill when in the TM project.
193
+ - `vault sync (edit vault files directly)` — syncs state to the central context library (complementary; run after this)
194
+ - `/update-focus` — updates `current-focus.md` (different purpose: session state, not doc accuracy)
@@ -0,0 +1,242 @@
1
+ ---
2
+ name: validate-bib
3
+ description: "Cross-reference \\cite{} keys against .bib files or embedded \\bibitem entries. Finds missing, unused, and typo'd citation keys. Deep verification mode spawns parallel agents for DOI/metadata validation at scale. Read-only in standard mode."
4
+ allowed-tools: Read, Glob, Grep, Task, Write, Bash(mkdir*), Bash(ls*), Bash(rm*)
5
+ argument-hint: [project-path or tex-file]
6
+ ---
7
+
8
+ # Bibliography Validation
9
+
10
+ **Read-only skill.** Never edit source files — produce a categorised report only.
11
+
12
+ **Citation key rule:** the user's existing keys always take precedence. They come from Paperpile (his reference management system) and are canonical. When suggesting replacements (typo corrections, preprint upgrades, metadata fixes), always keep the user's key and update the `.bib` entry metadata around it — never suggest renaming a key to match some "standard" format.
13
+
14
+ ## When to Use
15
+
16
+ - Before compiling a final version of a paper
17
+ - After adding new citations to check nothing was missed
18
+ - When `biber`/`bibtex` reports undefined citations
19
+ - As part of a pre-submission checklist (pair with `/proofread`)
20
+
21
+ ## When NOT to Use
22
+
23
+ - **Finding new references** — use `/literature` for discovery
24
+ - **Building a bibliography from scratch** — use `/literature` with `.bib` generation
25
+ - **General proofreading** — use `/proofread` (which also flags citation format issues)
26
+
27
+ ## Phase 0: Session Log (Suggested)
28
+
29
+ Bibliography validation with preprint staleness checks can be context-heavy (OpenAlex lookups, web searches for published versions). Before starting, **suggest** running `/session-log` to capture prior work as a recovery checkpoint. If the user declines, proceed without it.
30
+
31
+ ## Convention
32
+
33
+ **Default bibliography file is `paperpile.bib`** — this is the standard across all projects (per the `/latex` skill convention). However, the skill also supports:
34
+
35
+ - Any `.bib` file found in the same directory as the `.tex` files being audited
36
+ - Embedded bibliographies using `\begin{thebibliography}` / `\bibitem{key}` blocks
37
+ - Both external and embedded simultaneously (rare but possible)
38
+
39
+ ## Bibliography Detection
40
+
41
+ At the start of validation, detect which bibliography method the project uses:
42
+
43
+ ### 1. External `.bib` file (standard)
44
+
45
+ Look for `.bib` files in the project directory. Priority order:
46
+ 1. `paperpile.bib` (preferred — standard naming convention across all projects)
47
+ 2. Any other `.bib` file in the same directory as the `.tex` files
48
+
49
+ If **multiple `.bib` files** are found, validate all of them and produce a combined report. Note which file each issue belongs to. If `paperpile.bib` exists alongside other `.bib` files, flag the extras as a potential cleanup opportunity (the project may have migrated from a different naming convention).
50
+
51
+ Full validation applies: cross-reference checks **and** quality checks.
52
+
53
+ ### 2. Embedded `\begin{thebibliography}` / `\bibitem{key}`
54
+
55
+ Some LaTeX documents define references inline rather than using an external `.bib` file. Detect by scanning `.tex` files for `\begin{thebibliography}`.
56
+
57
+ Extract keys from `\bibitem` entries:
58
+ - `\bibitem{key}` — standard form, key is the argument in braces
59
+ - `\bibitem[label]{key}` — optional label form (e.g., `\bibitem[Smith et al., 2020]{smith2020}`), key is in the **second** set of braces
60
+
61
+ Only **cross-reference checks** apply (missing keys, unused keys, typos). Quality checks (required fields, year, author formatting) are **skipped** because embedded bibliographies don't have structured metadata.
62
+
63
+ ### 3. Both (rare)
64
+
65
+ If a project has both a `.bib` file and `\begin{thebibliography}` blocks, validate both:
66
+ - Run full validation on the `.bib` file
67
+ - Run cross-reference checks on `\bibitem` entries
68
+ - Merge both key sets when checking for missing citations
69
+
70
+ ## Workflow
71
+
72
+ 1. **Find files**: Locate all `.tex` files in the project
73
+ 2. **Detect bibliography type**: Check for `.bib` files and/or `\begin{thebibliography}` blocks
74
+ 3. **Extract citation keys from .tex**: Scan for all citation commands
75
+ 4. **Extract entry keys from bibliography source(s)**:
76
+ - External: Parse all `@type{key,` entries from `.bib` file(s)
77
+ - Embedded: Parse all `\bibitem{key}` and `\bibitem[label]{key}` entries
78
+ 5. **Cross-reference**: Compare the two sets
79
+ 6. **Quality checks**: Validate `.bib` entry completeness (external only)
80
+ 7. **Produce report**: Write results to stdout (or save if requested)
81
+
82
+ ## Citation Commands to Scan
83
+
84
+ Scan `.tex` files for all of these patterns:
85
+
86
+ | Command | Example |
87
+ |---------|---------|
88
+ | `\cite{key}` | Basic citation |
89
+ | `\citet{key}` | Textual: Author (Year) |
90
+ | `\citep{key}` | Parenthetical: (Author, Year) |
91
+ | `\textcite{key}` | biblatex textual |
92
+ | `\autocite{key}` | biblatex auto |
93
+ | `\parencite{key}` | biblatex parenthetical |
94
+ | `\citeauthor{key}` | Author name only |
95
+ | `\citeyear{key}` | Year only |
96
+ | `\nocite{key}` | Include in bibliography without in-text citation |
97
+
98
+ Also handle **multi-key citations**: `\citep{key1, key2, key3}`
99
+
100
+ ## Cross-Reference Checks
101
+
102
+ ### Critical: Missing Entries
103
+
104
+ Citation keys used in `.tex` but not defined in the bibliography source (`.bib` file or `\bibitem` entries).
105
+
106
+ These will cause compilation errors.
107
+
108
+ ### Warning: Unused Entries
109
+
110
+ Keys defined in the bibliography source but never cited in any `.tex` file.
111
+
112
+ Not errors, but may indicate:
113
+ - Forgotten citations (should they be `\nocite`?)
114
+ - Leftover entries from earlier drafts
115
+ - Entries intended for a different paper
116
+
117
+ ### Warning: Possible Typos (Fuzzy Match)
118
+
119
+ For each missing key, check if a similar key exists in the bibliography using edit distance:
120
+ - Edit distance = 1: Very likely a typo
121
+ - Edit distance = 2: Possibly a typo
122
+ - Flag these with the suggested correction
123
+
124
+ Common typo patterns:
125
+ - Year off by one: `smith2020` vs `smith2021`
126
+ - Missing/extra letter: `santanna` vs `sant'anna` vs `santana`
127
+ - Underscore vs camelCase: `smith_jones` vs `smithjones`
128
+
129
+ ## Quality Checks on .bib Entries
130
+
131
+ **These checks apply only to external `.bib` files.** Embedded bibliographies lack structured metadata, so quality checks are skipped for them.
132
+
133
+ ### Required Fields by Entry Type
134
+
135
+ | Entry Type | Required Fields |
136
+ |-----------|----------------|
137
+ | `@article` | author, title, journal, year |
138
+ | `@book` | author/editor, title, publisher, year |
139
+ | `@incollection` | author, title, booktitle, publisher, year |
140
+ | `@inproceedings` | author, title, booktitle, year |
141
+ | `@techreport` | author, title, institution, year |
142
+ | `@unpublished` | author, title, note, year |
143
+ | `@phdthesis` | author, title, school, year |
144
+
145
+ ### Year Reasonableness
146
+
147
+ - Flag entries with year < 1900 or year > current year + 1
148
+ - Flag entries with no year at all
149
+
150
+ ### Author Formatting
151
+
152
+ - Check for inconsistent author formats within the file
153
+ - **Flag entries where author field contains "and others" or "et al."** — this is never valid in BibTeX. All authors must be listed explicitly. Severity: **Warning**.
154
+ - Flag entries with organisation names that might need `{{braces}}` to prevent splitting
155
+
156
+ ### DOI Resolution (optional — triggered by `--verify-dois` flag or when issues are suspected)
157
+
158
+ **Preferred method: biblio MCP `scholarly_verify_dois`.** Collect all DOIs from the `.bib` file and call `scholarly_verify_dois` (up to 50 per call). This batch-verifies each DOI against all enabled sources (OpenAlex, Scopus, WoS). Results:
159
+ - **VERIFIED** (2+ sources confirm) — DOI is valid, metadata can be trusted
160
+ - **SINGLE_SOURCE** (1 source only) — DOI exists but warrants a manual spot-check
161
+ - **NOT_FOUND** — DOI not found in any source; resolve manually via WebFetch
162
+
163
+ **Fallback for NOT_FOUND DOIs:** Resolve via `https://doi.org/[DOI]` and confirm the returned metadata matches the entry:
164
+
165
+ 1. **Title match**: Does the DOI landing page title match the `.bib` title?
166
+ 2. **Author match**: Does the first author on the landing page match the `.bib` first author?
167
+ 3. **Journal match**: Does the venue match?
168
+
169
+ Flag mismatches as:
170
+ - **Warning: DOI mismatch** — DOI resolves to a different paper than claimed. This usually means the DOI is wrong (adjacent DOI in the same journal volume) or the authors are wrong (conflation of researchers in the same subfield).
171
+
172
+ This check catches:
173
+ - Wrong DOIs (e.g., off-by-one in the DOI suffix)
174
+ - Author conflation (real researchers incorrectly attributed to a paper)
175
+ - Metadata copied from secondary sources without verification
176
+
177
+ For manual WebFetch resolution, process in batches of 5 to avoid rate limiting. Only flag confirmed mismatches — if the DOI cannot be resolved (404, timeout), note it as "unresolvable" at Info level.
178
+
179
+ ### Preprint Staleness Check
180
+
181
+ **For every entry that looks like a preprint**, check whether a peer-reviewed version has since been published. Full detection signals, lookup protocol, and classification: [`references/preprint-check.md`](references/preprint-check.md)
182
+
183
+ ## Severity Levels
184
+
185
+ | Level | Meaning |
186
+ |-------|---------|
187
+ | **Critical** | Missing entry for a cited key — will cause compilation error |
188
+ | **Warning** | Unused entry, possible typo, missing required field |
189
+ | **Info** | Year oddity, formatting suggestion, bibliography type note |
190
+
191
+ ## Bibliography Output
192
+
193
+ After validation, offer these actions if applicable:
194
+
195
+ - **Embedded bibliography → offer to create `paperpile.bib`**: If the project uses `\begin{thebibliography}`, offer to extract the references into a proper `paperpile.bib` file (one `@misc` entry per `\bibitem`, with the full text as a `note` field). The author can then enrich the entries with proper metadata.
196
+ - **Non-standard `.bib` name → offer to rename**: If the existing `.bib` file is not named `paperpile.bib`, offer to rename it to `paperpile.bib` and update the `\bibliography{}` command in the `.tex` file.
197
+
198
+ These are **offers only** — do not make changes without explicit confirmation.
199
+
200
+ ## Report Format
201
+
202
+ Full report template with all sections: [`references/report-template.md`](references/report-template.md)
203
+
204
+ Sections: Summary table → Critical (missing entries) → Warning (typos, unused, missing fields, DOI mismatches, stale preprints) → Info (year issues) → Limitations (for embedded bibliographies).
205
+
206
+ ## Optional: Metadata Verification via Biblio MCP
207
+
208
+ When missing entries or suspicious metadata are flagged, use the biblio MCP tools:
209
+
210
+ - **`scholarly_search`** — search by title to find the correct entry across OpenAlex + Scopus + WoS
211
+ - **`scholarly_verify_dois`** — batch-verify DOIs across all sources (preferred over manual DOI resolution)
212
+ - **`openalex_lookup_doi`** — look up full metadata for a specific DOI
213
+
214
+ For Python client fallback (citation networks, institution analysis): [`references/openalex-verification.md`](references/openalex-verification.md)
215
+
216
+ ## Deep Verification Mode (Parallel, Disk-Based)
217
+
218
+ Triggered by: `--deep-verify` flag, 40+ entries, or "deep verify" / "verify all references". Spawns parallel sub-agents that verify batches and write results to disk. Full architecture, batch JSON format, and assembly: [references/deep-verify.md](references/deep-verify.md)
219
+
220
+ ## Council Mode (Optional)
221
+
222
+ For high-stakes submissions. Trigger: "council validate-bib", "thorough bib check". Full details: [references/council-mode.md](references/council-mode.md)
223
+
224
+ ## Quality Scoring
225
+
226
+ When producing a full validation report, apply numeric quality scoring using the shared framework:
227
+
228
+ - **Framework:** [`../shared/quality-scoring.md`](../shared/quality-scoring.md) — severity tiers, thresholds, verdict rules
229
+
230
+ Map validation findings to the framework tiers:
231
+ - **Critical** (-15 to -25): Missing entry for a cited key (compilation error)
232
+ - **Major** (-5 to -14): DOI mismatch, stale preprint with published version available, "et al." in author field
233
+ - **Minor** (-1 to -4): Missing optional fields, year oddities, unused entries
234
+
235
+ Compute the score and include the Score Block in the report after the summary table.
236
+
237
+ ## Cross-References
238
+
239
+ - **`/proofread`** — For overall paper quality including citation format
240
+ - **`/literature`** — For finding and adding new references (includes full OpenAlex workflows)
241
+ - **`/latex`** — For compilation with reference checking
242
+ - **`/latex-autofix`** — For compilation and error resolution. Run after fixing bibliography issues to verify citations compile cleanly.
@@ -0,0 +1,34 @@
1
+ # Council Mode for Bibliography Validation
2
+
3
+ > For high-stakes submissions, run bibliography validation in council mode. Different models have different knowledge of the academic literature -- one model may know a paper's correct DOI while another catches a metadata mismatch that the first misses.
4
+
5
+ ## When to Trigger
6
+
7
+ - "Council validate-bib"
8
+ - "Thorough bib check"
9
+
10
+ ## How It Works
11
+
12
+ 1. The main session collects all `\cite{}` keys and `.bib` entries
13
+ 2. The prompt is sent to 3 models via `cli-council`
14
+ 3. Each model independently cross-references keys, checks for typos, and verifies metadata
15
+ 4. Cross-review catches false positives (flagged entries that are actually correct) and surfaces additional issues
16
+ 5. Chairman synthesis produces a single `VALIDATION-REPORT.md`
17
+
18
+ ## Invocation (CLI backend -- free)
19
+
20
+ ```bash
21
+ cd packages/cli-council
22
+ uv run python -m cli_council \
23
+ --prompt-file /tmp/validate-bib-prompt.txt \
24
+ --context-file /tmp/bib-and-tex-content.txt \
25
+ --output-md /tmp/validate-bib-council.md \
26
+ --chairman claude \
27
+ --timeout 180
28
+ ```
29
+
30
+ See `skills/shared/council-protocol.md` for the full orchestration protocol.
31
+
32
+ ## Value
33
+
34
+ Moderate to high -- most valuable in deep verification mode where DOI/metadata accuracy matters. Different models have genuinely different bibliographic knowledge.