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,126 @@
1
+ ---
2
+ name: context-status
3
+ description: "Use when you need to check current context status and session health."
4
+ allowed_tools:
5
+ - Read
6
+ - Glob
7
+ - Bash(ls*, cat*)
8
+ ---
9
+
10
+ # Context Status: Session Health Check
11
+
12
+ On-demand diagnostic showing context usage, preservation state, and open work items. Fast and lightweight — no vault queries.
13
+
14
+ ## What to Check
15
+
16
+ ### 1. Context Usage Estimate
17
+
18
+ Read the context monitor state file to get the current tool call count:
19
+
20
+ ```
21
+ ~/.claude/sessions/{project-hash}/context-monitor-state.json
22
+ ```
23
+
24
+ The project hash is a SHA-256 of `CLAUDE_PROJECT_DIR` (first 12 chars). If the state file doesn't exist, report "No context monitor data — hook may not be active."
25
+
26
+ Calculate:
27
+ - Tool calls so far
28
+ - Estimated percentage (calls / 150)
29
+ - Which thresholds have fired (from the `fired` array)
30
+ - Time since last warning
31
+
32
+ ### 2. Active Plan
33
+
34
+ Find the latest file in `log/plans/`:
35
+ - If found: show filename, first 3 lines, and whether it contains "APPROVED" or is still "DRAFT"
36
+ - If none: report "No active plan"
37
+
38
+ ### 3. Latest Session Log
39
+
40
+ Find the latest non-compact `.md` file in `log/` (skip files with `-compact` in the name):
41
+ - If found: show filename and first 3 lines
42
+ - If none: report "No session log found"
43
+
44
+ ### 4. Focus Freshness
45
+
46
+ Check when `.context/current-focus.md` was last modified:
47
+ - Show the modification date
48
+ - If older than 3 days: warn "Focus file is stale — consider running `/update-focus`"
49
+ - Show the first 5 lines (headline)
50
+
51
+ ### 5. Preservation Hooks
52
+
53
+ Verify these hooks are configured in `~/.claude/settings.json`:
54
+ - `PreCompact` → `precompact-autosave.py` (pre-compact state save)
55
+ - `SessionStart` compact → `postcompact-restore.py` (post-compact restore)
56
+ - `PostToolUse` → `context-monitor.py` (this monitor)
57
+
58
+ For each: report CONFIGURED or MISSING.
59
+
60
+ ### 6. Open Loops
61
+
62
+ Count unchecked items (`- [ ]`) in `.context/current-focus.md`:
63
+ - Report the count
64
+ - If > 5: warn "Many open loops — consider triaging"
65
+
66
+ ## Output Format
67
+
68
+ Present as a compact status panel:
69
+
70
+ ```
71
+ ## Session Health
72
+
73
+ | Metric | Value |
74
+ |--------|-------|
75
+ | Context usage | ~XX% (N/150 tool calls) |
76
+ | Thresholds fired | none / info / warning / critical |
77
+ | Active plan | filename (DRAFT/APPROVED) / none |
78
+ | Latest log | filename / none |
79
+ | Focus freshness | N days ago / stale warning |
80
+ | Open loops | N items |
81
+
82
+ ### Preservation Hooks
83
+
84
+ | Hook | Status |
85
+ |------|--------|
86
+ | PreCompact auto-save | CONFIGURED / MISSING |
87
+ | Post-compact restore | CONFIGURED / MISSING |
88
+ | Context monitor | CONFIGURED / MISSING |
89
+
90
+ ### Recommendations
91
+
92
+ [Only if there are issues — e.g., stale focus, missing hooks, high context usage]
93
+ ```
94
+
95
+ ### 7. Compaction Guidance
96
+
97
+ When context is high (>60%), include these reference tables in the output:
98
+
99
+ **When to compact:**
100
+
101
+ | Phase Transition | Compact? | Why |
102
+ |---|---|---|
103
+ | Research to Planning | Yes | Research context is bulky; plan is the distilled output |
104
+ | Planning to Implementation | Yes | Plan is in a file; free up context for code |
105
+ | Implementation to Testing | Maybe | Keep if tests reference recent code |
106
+ | Debugging to Next feature | Yes | Debug traces pollute context |
107
+ | Mid-implementation | No | Losing file paths and partial state is costly |
108
+ | After a failed approach | Yes | Clear dead-end reasoning |
109
+
110
+ **What survives compaction:**
111
+
112
+ | Persists | Lost |
113
+ |---|---|
114
+ | CLAUDE.md + rules | Intermediate reasoning |
115
+ | Task list | File contents previously read |
116
+ | MEMORY.md | Multi-step conversation context |
117
+ | Git state | Tool call history |
118
+ | Files on disk | Verbal preferences |
119
+ | precompact-autosave state | — |
120
+
121
+ ## When to Use
122
+
123
+ - When the context monitor fires a warning
124
+ - Before starting a large task (to check remaining capacity)
125
+ - After resuming a session (to verify state was preserved)
126
+ - When unsure if preservation hooks are working
@@ -0,0 +1,230 @@
1
+ ---
2
+ name: creation-guard
3
+ description: "Use when you need a pre-flight duplicate check before creating new skills or agents."
4
+ allowed_tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ - AskUserQuestion
9
+ ---
10
+
11
+ # Creation Guard: Pre-Flight Duplicate Check
12
+
13
+ Prevent duplicate functionality by analysing existing skills and agents before creating new ones. Intercepts creation intent, searches for overlap, and recommends one of 5 actions.
14
+
15
+ ## When to Use
16
+
17
+ Invoke **before** creating ANY new:
18
+ - Skill (`skills/*/SKILL.md`)
19
+ - Agent (`.claude/agents/*.md`)
20
+
21
+ Trigger phrases:
22
+ - "Create a skill for..."
23
+ - "I want a new skill that..."
24
+ - "Let's add an agent for..."
25
+ - Any intent to create new automation/tooling
26
+
27
+ ## Process
28
+
29
+ ### Step 1: Identify the Proposal
30
+
31
+ Extract from the request:
32
+ - **Name**: Proposed name (kebab-case)
33
+ - **Type**: skill | agent
34
+ - **Purpose**: What it does (one sentence)
35
+ - **Key Functions**: 3-5 main capabilities
36
+ - **Keywords**: Searchable terms related to functionality
37
+
38
+ ### Step 2: Search Existing Artifacts
39
+
40
+ Run these searches in parallel:
41
+
42
+ 1. **Read [`skills/shared/skill-index.md`](../shared/skill-index.md)** — scan the categorised table for potential duplicates by name and purpose
43
+ 2. **Keyword search** — grep skills and agents for each keyword:
44
+
45
+ ```
46
+ Grep for each keyword across:
47
+ - skills/*/SKILL.md (frontmatter + body)
48
+ - .claude/agents/*.md (frontmatter + body)
49
+ ```
50
+
51
+ 3. **Agent scan** — read frontmatter of each agent to check purpose overlap:
52
+
53
+ ```
54
+ Glob: .claude/agents/*.md
55
+ Read first 20 lines of each match
56
+ ```
57
+
58
+ ### Step 3: Analyse Overlap
59
+
60
+ For each potentially related artifact, assess:
61
+
62
+ | Criterion | Question |
63
+ |-----------|----------|
64
+ | Functional overlap | Does it do the same thing? (0-100%) |
65
+ | Naming confusion | Could names be confused? |
66
+ | Extension potential | Could the proposal extend this instead? |
67
+ | Composition | Could existing artifacts compose to achieve this? |
68
+
69
+ ### Step 4: Generate Recommendation
70
+
71
+ Based on analysis, recommend ONE of:
72
+
73
+ | Recommendation | Criteria | Action |
74
+ |----------------|----------|--------|
75
+ | **PROCEED** | <20% overlap, genuinely new capability | Create new artifact |
76
+ | **EXTEND** | 50%+ overlap with single existing artifact | Modify existing instead |
77
+ | **COMPOSE** | Multiple artifacts cover 80%+ combined | Create thin wrapper or document workflow |
78
+ | **ITERATE** | 20-50% overlap, proposal needs refinement | Refine proposal to differentiate |
79
+ | **BLOCK** | Would create problematic duplication | Do not create |
80
+
81
+ ### Step 5: Present and Confirm
82
+
83
+ Display the analysis and wait for explicit user approval before proceeding.
84
+
85
+ ## Output Format
86
+
87
+ ```
88
+ ════════════════════════════════════════════════════════════════
89
+ CREATION GUARD ANALYSIS
90
+ ════════════════════════════════════════════════════════════════
91
+
92
+ PROPOSAL:
93
+ Type: [skill|agent]
94
+ Name: [proposed-name]
95
+ Purpose: [one sentence]
96
+
97
+ EXISTING ARTIFACTS ANALYSED: [count]
98
+
99
+ RELATED ARTIFACTS FOUND:
100
+
101
+ 1. [artifact-name] ([type])
102
+ Purpose: [what it does]
103
+ Overlap: [X]% - [explanation]
104
+
105
+ 2. [artifact-name] ([type])
106
+ Purpose: [what it does]
107
+ Overlap: [X]% - [explanation]
108
+
109
+ RECOMMENDATION: [PROCEED|EXTEND|COMPOSE|ITERATE|BLOCK]
110
+
111
+ RATIONALE:
112
+ [2-3 sentences explaining the recommendation]
113
+
114
+ SUGGESTED ACTION:
115
+ [Specific next step based on recommendation]
116
+
117
+ ════════════════════════════════════════════════════════════════
118
+ ```
119
+
120
+ ## Recommendation Details
121
+
122
+ ### PROCEED
123
+ - Artifact is genuinely new
124
+ - No significant overlap found
125
+ - Clear differentiation from existing tools
126
+ - Go ahead and create
127
+
128
+ ### EXTEND
129
+ Present extension proposal:
130
+ ```
131
+ Instead of creating [new-name], extend [existing-name]:
132
+
133
+ Current capabilities:
134
+ - [existing feature 1]
135
+ - [existing feature 2]
136
+
137
+ Proposed additions:
138
+ - [new feature 1]
139
+ - [new feature 2]
140
+ ```
141
+
142
+ ### COMPOSE
143
+ Present composition approach:
144
+ ```
145
+ The proposed functionality can be achieved by combining:
146
+
147
+ 1. [artifact-1] — handles [aspect]
148
+ 2. [artifact-2] — handles [aspect]
149
+
150
+ Options:
151
+ A) Document this workflow (no new code)
152
+ B) Create thin orchestration skill
153
+ C) Add to existing skill's integration section
154
+ ```
155
+
156
+ ### ITERATE
157
+ Present refinement questions:
158
+ ```
159
+ Overlap detected with [existing-artifact].
160
+
161
+ Differentiation needed:
162
+ 1. [question about scope]
163
+ 2. [question about use case]
164
+ 3. [question about implementation]
165
+
166
+ Please clarify to proceed.
167
+ ```
168
+
169
+ ### BLOCK
170
+ Explain why creation should not proceed:
171
+ ```
172
+ BLOCKED: Would create problematic duplication.
173
+
174
+ Existing artifact: [name]
175
+ - Already does: [capabilities]
176
+ - Your request: [same capabilities]
177
+
178
+ Alternatives:
179
+ 1. Use existing: /[skill-name]
180
+ 2. If missing features, extend the existing artifact
181
+ 3. If different use case, explain how this differs
182
+ ```
183
+
184
+ ## Post-Match Action Table
185
+
186
+ When overlap IS found, use this table to decide the specific action:
187
+
188
+ | Situation | Action |
189
+ |-----------|--------|
190
+ | Nothing related found | Create new artifact |
191
+ | Same trigger + same fix as existing | Update existing (bump version, improve docs) |
192
+ | Same trigger, different root cause | Create new + add cross-links in both |
193
+ | Partial overlap (same domain, different trigger) | Add variant subsection to existing |
194
+ | Same domain, different problem | Create new + add "See also" references |
195
+ | Existing is stale or wrong | Mark deprecated + create replacement |
196
+
197
+ This complements the PROCEED/EXTEND/COMPOSE/ITERATE/BLOCK recommendation above. The recommendation decides *whether* to create; this table decides *how* to handle the relationship with existing artifacts.
198
+
199
+ ## Self-Check Questions
200
+
201
+ Before creating ANY new artifact, ask:
202
+
203
+ 1. Does something similar already exist?
204
+ 2. Could this be added to an existing artifact?
205
+ 3. Would a user know to look for this vs the existing one?
206
+ 4. Am I creating this because it's needed or because it's easier than finding what exists?
207
+
208
+ ## Naming Convention Enforcement
209
+
210
+ When creating a new skill, **always** name the definition file `SKILL.md` (uppercase). Never `skill.md`, `Skill.md`, or any other casing.
211
+
212
+ - The MCP server's skill discovery scans for `SKILL.md` explicitly
213
+ - Documentation generators and `/system-audit` use `find -name 'SKILL.md'`
214
+ - On case-insensitive filesystems (macOS APFS), lowercase files appear to work locally but fail in case-sensitive contexts (Linux CI, Docker, MCP server pattern matching)
215
+
216
+ **Check before writing:** If the target directory already contains a `skill.md` (lowercase), rename it to `SKILL.md` first.
217
+
218
+ ## Anti-Patterns
219
+
220
+ | Anti-Pattern | Problem | Instead |
221
+ |--------------|---------|---------|
222
+ | Skip the check | "It's obviously new" — famous last words | Always run the analysis |
223
+ | Name-only matching | Names differ but functions overlap | Search by purpose and keywords |
224
+ | Create then merge | Merge debt accumulates fast | Check first, create once |
225
+ | Over-splitting | Two skills that always run together | Consider a single skill with phases |
226
+ | Lowercase `skill.md` | Invisible to MCP server, audit tools, and case-sensitive systems | Always use `SKILL.md` (uppercase) |
227
+
228
+ ## Integration
229
+
230
+ This skill is invoked by `/learn` in Phase 2 to replace the old subset/partial/no-overlap check. When called from `/learn`, return the recommendation label (PROCEED/EXTEND/COMPOSE/ITERATE/BLOCK) so `/learn` can branch accordingly.
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: devils-advocate
3
+ description: "Use when you need to challenge research assumptions or stress-test arguments."
4
+ argument-hint: [paper-or-argument-description]
5
+ ---
6
+
7
+ # Devil's Advocate Skill
8
+
9
+ > Challenge research assumptions and identify weaknesses in your arguments.
10
+
11
+ ## Purpose
12
+
13
+ Based on Scott Cunningham's Part 3: "Creating Devil's Advocate Agents for Tough Problems" - addressing the "LLM thing of over-confidence in diagnosing a problem."
14
+
15
+ **For formal code audits with replication scripts and referee reports, use the Referee 2 agent instead (`.claude/agents/referee2-reviewer.md`).** This skill is for quick adversarial feedback on arguments, not systematic audits.
16
+
17
+ ## When to Use
18
+
19
+ - Before submitting a paper
20
+ - When stuck on a research problem
21
+ - When you want to stress-test an argument
22
+ - During paper revision planning
23
+
24
+ ## When NOT to Use
25
+
26
+ - **Code audits** — use the Referee 2 agent instead
27
+ - **Replication verification** — use the Referee 2 agent instead
28
+ - **Quick proofreading** — just ask for a read-through
29
+ - **When you want validation** — this skill is designed to challenge, not affirm
30
+
31
+ ## Workflow
32
+
33
+ 1. **Understand the claim** — Read the paper/argument being evaluated
34
+ 2. **Generate competing hypotheses** — If evaluating a research question or design, load `references/competing-hypotheses.md` and generate 3-5 rival explanations before critiquing
35
+ 3. **Run the debate** — Use the multi-turn debate protocol below (default) or single-shot mode for quick checks
36
+ 4. **Deliver the verdict** — Synthesize surviving critiques with severity ratings
37
+
38
+ ## Multi-Turn Debate Protocol (Default)
39
+
40
+ Inspired by the simulated scientific debates in Google's AI Co-Scientist. A one-shot critique is easy for an LLM to produce but often superficial. Multi-turn debates force each critique to survive a defense, filtering out weak objections and sharpening the strong ones.
41
+
42
+ ### Round 1: Adversarial Critic
43
+
44
+ Adopt the persona of a hostile but competent reviewer. Challenge on:
45
+ 1. **Theoretical foundations** — Are the assumptions justified?
46
+ 2. **Methodology** — Limitations? Alternative approaches?
47
+ 3. **Data** — Selection bias? Measurement issues? External validity?
48
+ 4. **Causal claims** — Alternative explanations? Confounders?
49
+ 5. **Contribution** — Novel enough? Does it matter?
50
+
51
+ Produce **numbered critiques** (aim for 5-8), each with a concrete statement of the problem.
52
+
53
+ ### Round 2: Defense
54
+
55
+ Switch persona to the paper's author. For each numbered critique, provide the strongest possible defense:
56
+ - Cite evidence from the paper that addresses the concern
57
+ - Explain design choices that mitigate the issue
58
+ - Acknowledge limitations honestly where the defense is weak
59
+ - Propose concrete fixes where the critique has merit
60
+
61
+ ### Round 3: Adjudication
62
+
63
+ Switch to an impartial senior reviewer. For each critique-defense pair, rule:
64
+ - **Critique stands** — the defense is insufficient; this is a real weakness
65
+ - **Critique partially addressed** — defense has merit but issue remains
66
+ - **Critique resolved** — the defense adequately addresses the concern
67
+
68
+ ### Final Synthesis
69
+
70
+ Produce a structured report with only the surviving critiques (stands + partially addressed), ranked by severity:
71
+
72
+ ```markdown
73
+ ## Devil's Advocate Report
74
+
75
+ ### Critical (must fix before submission)
76
+ 1. [Critique] — [Why the defense failed] — [Suggested fix]
77
+
78
+ ### Major (reviewers will likely raise)
79
+ 2. [Critique] — [What remains after defense] — [Suggested fix]
80
+
81
+ ### Minor (worth acknowledging)
82
+ 3. [Critique] — [Residual concern] — [How to preempt]
83
+
84
+ ### Dismissed
85
+ - [Critiques that were resolved in Round 2, listed briefly for transparency]
86
+ ```
87
+
88
+ ## Single-Shot Mode
89
+
90
+ For quick checks (e.g., "just poke holes in this argument"), skip the multi-turn protocol and produce a direct critique. Use when the user says "quick", "just challenge this", or the input is a paragraph rather than a full paper.
91
+
92
+ ## Example Use
93
+
94
+ "Play devil's advocate on my research paper about preference drift - specifically challenge my identification strategy and the assumptions about utility functions."
95
+
96
+ ---
97
+
98
+ ## Council Mode (Optional)
99
+
100
+ For the highest-stakes arguments, run the devil's advocate debate across multiple LLM providers. Different models have genuinely different reasoning patterns — a critique that Claude finds weak, GPT may find devastating, and vice versa. This produces adversarial tension that a single model cannot replicate internally.
101
+
102
+ **Trigger:** "Council devil's advocate" or "thorough challenge"
103
+
104
+ **How it works:**
105
+ 1. Each model independently plays Adversarial Critic (Round 1) using the same paper/argument
106
+ 2. Cross-review: each model evaluates the others' critiques — identifying which challenges are strongest
107
+ 3. Chairman synthesis: produces a single report with surviving critiques ranked by cross-model agreement
108
+
109
+ **Invocation (CLI backend):**
110
+ ```bash
111
+ cd packages/cli-council
112
+ uv run python -m cli_council \
113
+ --prompt-file /tmp/devils-advocate-prompt.txt \
114
+ --context-file /tmp/paper-content.txt \
115
+ --output-md /tmp/devils-advocate-council.md \
116
+ --chairman claude \
117
+ --timeout 180
118
+ ```
119
+
120
+ See `skills/shared/council-protocol.md` for the full orchestration protocol.
121
+
122
+ **Value:** High — the multi-turn debate protocol (Round 1→2→3) becomes genuinely adversarial when different models play different roles. A critique that survives cross-model scrutiny is almost certainly a real weakness.
123
+
124
+ ## Cross-References
125
+
126
+ | Skill | When to use instead/alongside |
127
+ |-------|-------------------------------|
128
+ | `/interview-me` | To develop the idea further through structured interview |
129
+ | `/multi-perspective` | For multi-perspective analysis with disciplinary diversity |
130
+ | `/proofread` | For language/formatting review rather than argument critique |
@@ -0,0 +1,83 @@
1
+ # Competing Hypotheses Checklist
2
+
3
+ Structured process for generating and evaluating rival explanations before locking a research design. Complements the `design-before-results` rule (`.claude/rules/design-before-results.md`) by specifying HOW to formulate competing explanations, not just that you should. Adapted from K-Dense's hypothesis-generation skill and quality criteria framework.
4
+
5
+ ## When to Use
6
+
7
+ - Before locking a research design (pre-registration, analysis plan)
8
+ - When `/devils-advocate` is invoked on a research question
9
+ - During early-stage paper planning (idea -> literature review transition)
10
+ - When reviewing a paper that presents only one explanation
11
+
12
+ ## The 3-Step Process
13
+
14
+ ### Step 1: Generate 3-5 Competing Hypotheses
15
+
16
+ Each hypothesis must provide a **mechanistic explanation** -- specify HOW and WHY the effect occurs, not just WHAT happens.
17
+
18
+ **Requirements:**
19
+ - Each must be distinguishable from the others (different mechanisms, not different magnitudes)
20
+ - Include at least one "null" or status-quo explanation (e.g., "observed pattern is an artefact of selection")
21
+
22
+ **Generation strategies:**
23
+ - Apply known mechanisms from analogous settings (e.g., anchoring from behavioural econ to MCDM)
24
+ - Consider different levels of explanation: individual (cognitive) -> group (social) -> market (structural) -> institutional (regulatory)
25
+ - Question existing assumptions: what if the causal direction is reversed? What if it is confounded?
26
+ - Combine mechanisms in novel ways (e.g., bounded rationality + social conformity)
27
+
28
+ ### Step 2: Evaluate Against 7 Quality Criteria
29
+
30
+ | Criterion | Definition | H1 | H2 | H3 | H4 | H5 |
31
+ |-----------|-----------|----|----|----|----|-----|
32
+ | **Testability** | Can it be empirically tested with available methods? | | | | | |
33
+ | **Falsifiability** | What specific observations would disprove it? | | | | | |
34
+ | **Parsimony** | Is it the simplest explanation consistent with evidence? | | | | | |
35
+ | **Explanatory power** | How much of the phenomenon does it account for? | | | | | |
36
+ | **Scope** | Does it generalise beyond the specific case? | | | | | |
37
+ | **Consistency** | Does it align with established theory and evidence? | | | | | |
38
+ | **Novelty** | Does it offer new insight beyond existing accounts? | | | | | |
39
+
40
+ Rate each cell as **Strong** / **Moderate** / **Weak**.
41
+
42
+ Hypotheses scoring Weak on Testability or Falsifiability should be revised or dropped.
43
+
44
+ ### Step 3: Design Distinguishing Tests
45
+
46
+ - For each pair of hypotheses (H_i, H_j), identify at least one prediction where they diverge
47
+ - Prioritise predictions that are most feasible to test (data availability, ethical constraints, cost)
48
+ - Identify "critical experiments" that eliminate the most hypotheses simultaneously
49
+ - Format: "If H1 is correct but H2 is not, we should observe X but not Y"
50
+
51
+ ## Common Pitfalls
52
+
53
+ - **Just-so stories:** plausible narrative without testable predictions -- if you cannot specify what would falsify it, it is not a hypothesis
54
+ - **Unfalsifiable claims:** built-in escape clauses ("it depends on context", "moderating factors may apply")
55
+ - **Single-hypothesis lock-in:** committing to one explanation before considering alternatives, then seeking only confirmatory evidence
56
+ - **Over-complexity:** invoking unnecessary mechanisms when a simpler account suffices (violates parsimony)
57
+
58
+ ## Worked Example
59
+
60
+ **Research question:** Why do decision-makers deviate from optimal stopping rules in sequential search (e.g., hiring, investment screening)?
61
+
62
+ **Competing hypotheses:**
63
+
64
+ - **H1 (Cognitive load):** Tracking running optima exceeds working-memory capacity; DMs fall back on satisficing heuristics. Mechanism: individual-level cognitive constraint.
65
+ - **H2 (Social accountability):** DMs stop early to justify choices to stakeholders ("I chose the best I saw") rather than risk continued search with uncertain payoff. Mechanism: group-level social pressure.
66
+ - **H3 (Null -- rational adaptation):** Deviations reflect rational updating given non-stationary option quality or unknown distributions; no bias is present. Mechanism: Bayesian learning under uncertainty.
67
+
68
+ | Criterion | H1 | H2 | H3 |
69
+ |-----------|-----|-----|-----|
70
+ | Testability | Strong | Strong | Moderate |
71
+ | Falsifiability | Strong | Strong | Weak |
72
+ | Parsimony | Strong | Moderate | Strong |
73
+ | Explanatory power | Moderate | Moderate | Moderate |
74
+ | Scope | Strong | Moderate | Strong |
75
+ | Consistency | Strong | Strong | Strong |
76
+ | Novelty | Weak | Moderate | Weak |
77
+
78
+ **Distinguishing predictions:**
79
+
80
+ - **H1 vs H2:** Manipulate accountability (solo vs committee decision). If H1 dominates, deviation rates are unchanged; if H2, deviations decrease when accountability is removed.
81
+ - **H1 vs H3:** Vary cognitive load (dual-task paradigm). If H1, higher load increases deviation; if H3, load is irrelevant.
82
+ - **H2 vs H3:** Provide full distributional information. If H3, deviations disappear with known distributions; if H2, they persist because the social motive remains.
83
+ - **Critical test:** Dual-task + no-accountability + known-distribution condition -- eliminates all three simultaneously.
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: init-project
3
+ description: "Bootstrap a new research project. Interview for details, scaffold directory structure, create Overleaf symlink, initialise git, and create project context files."
4
+ allowed-tools: Bash(mkdir*), Bash(ln*), Bash(git*), Bash(ls*), Read, Write, Edit, Glob, Grep, AskUserQuestion
5
+ argument-hint: (no arguments — starts an interview)
6
+ ---
7
+
8
+ # Init Project — Research Project Scaffolder
9
+
10
+ > Interactive project setup: answer questions, get a ready-to-use research project directory.
11
+
12
+ ## Protocol
13
+
14
+ ### Phase 1: Interview
15
+
16
+ Ask the user these questions using `AskUserQuestion` (adapt based on what's already known):
17
+
18
+ 1. **Project name** — short name for the directory (e.g., `nudge-experiment`)
19
+ 2. **Paper title** — working title for the paper
20
+ 3. **Research question** — one sentence
21
+ 4. **Target journal/venue** — where you plan to submit
22
+ 5. **Co-authors** — names and affiliations (if any)
23
+ 6. **Parent directory** — where to create the project (default: `~/Research/`)
24
+ 7. **Overleaf path** — path to Overleaf-synced directory for symlink (optional)
25
+ 8. **Methodology** — experimental, observational, theoretical, simulation, mixed
26
+
27
+ ### Phase 2: Scaffold
28
+
29
+ Create the directory structure:
30
+
31
+ ```
32
+ <project-name>/
33
+ ├── CLAUDE.md # Project-specific Claude instructions
34
+ ├── README.md # Project overview
35
+ ├── MEMORY.md # Knowledge base (seeded with template)
36
+ ├── paper/ # → Overleaf symlink (or empty dir)
37
+ ├── code/
38
+ │ ├── python/ # Python scripts
39
+ │ └── R/ # R scripts
40
+ ├── data/
41
+ │ ├── raw/ # Original data (never modified)
42
+ │ └── processed/ # Cleaned/transformed data
43
+ ├── results/ # Analysis outputs
44
+ ├── figures/ # Generated figures
45
+ ├── docs/ # Project documentation
46
+ ├── correspondence/ # Referee reports, cover letters
47
+ │ └── referee2/ # Referee 2 agent reports
48
+ ├── log/ # Session logs
49
+ │ └── plans/ # Saved plans
50
+ └── .gitignore
51
+ ```
52
+
53
+ ### Phase 3: Populate Files
54
+
55
+ **CLAUDE.md** — project-specific instructions:
56
+ - Paper title and research question
57
+ - Co-authors and target venue
58
+ - Methodology and key conventions
59
+ - Pointer to project context files
60
+
61
+ **README.md** — human-readable overview:
62
+ - Project title and description
63
+ - Directory structure explanation
64
+ - How to compile the paper
65
+ - Co-author information
66
+
67
+ **MEMORY.md** — seeded with research project template:
68
+ - Notation Registry (empty)
69
+ - Estimand Registry (empty)
70
+ - Key Decisions (empty)
71
+ - Citations (empty)
72
+ - Anti-Patterns (empty)
73
+ - Code Pitfalls (empty)
74
+
75
+ **.gitignore** — standard research project ignores:
76
+ - Build artifacts (`out/`, `*.aux`, `*.log`)
77
+ - Data files (`data/raw/*.csv`, `data/raw/*.xlsx`)
78
+ - Python/R artifacts (`__pycache__/`, `.Rhistory`)
79
+ - OS files (`.DS_Store`)
80
+
81
+ ### Phase 4: Git & Symlinks
82
+
83
+ 1. **Overleaf symlink** — if a path was provided:
84
+ ```bash
85
+ ln -s /path/to/overleaf/dir paper
86
+ ```
87
+ 2. **Git init** — initialise the repository:
88
+ ```bash
89
+ git init
90
+ git add .
91
+ git commit -m "Initial project scaffold"
92
+ ```
93
+
94
+ ### Phase 5: Context Update
95
+
96
+ Update the central context library:
97
+ 1. Add the project to `.context/projects/_index.md`
98
+ 2. Create `.context/projects/papers/<project-name>.md` with metadata
99
+
100
+ ## Output
101
+
102
+ Print a summary of what was created:
103
+
104
+ ```
105
+ Project created: ~/Research/<project-name>/
106
+ Directories: 12
107
+ Files: 4 (CLAUDE.md, README.md, MEMORY.md, .gitignore)
108
+ Overleaf: linked / not configured
109
+ Git: initialised with initial commit
110
+
111
+ Next steps:
112
+ 1. Start writing in paper/ (or link Overleaf)
113
+ 2. Add code to code/python/ or code/R/
114
+ 3. Run /session-log when you finish working
115
+ ```