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,143 @@
1
+ #!/usr/bin/env bash
2
+ # setup.sh — Set up Claude Code for Academic Research
3
+ #
4
+ # Creates symlinks so Claude Code can find skills, agents, hooks, and rules
5
+ # from any project directory.
6
+ #
7
+ # Usage:
8
+ # ./scripts/setup.sh # first-time setup
9
+ # ./scripts/setup.sh --update # re-link without overwriting settings
10
+
11
+ set -euo pipefail
12
+
13
+ REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)"
14
+ CLAUDE_DIR="$HOME/.claude"
15
+ VERSION="$(grep '"version"' "$REPO_DIR/package.json" 2>/dev/null | head -1 | sed 's/.*: *"\(.*\)".*/\1/' || echo "unknown")"
16
+ UPDATE_MODE=false
17
+
18
+ [[ "${1:-}" == "--update" ]] && UPDATE_MODE=true
19
+
20
+ RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[0;33m'; CYAN='\033[0;36m'; NC='\033[0m'
21
+ info() { echo -e "${CYAN}[setup]${NC} $*"; }
22
+ ok() { echo -e "${GREEN}[setup]${NC} $*"; }
23
+ warn() { echo -e "${YELLOW}[setup]${NC} $*"; }
24
+ err() { echo -e "${RED}[setup]${NC} $*" >&2; }
25
+
26
+ echo ""
27
+ echo "========================================="
28
+ echo " Claude Code for Academic Research"
29
+ if $UPDATE_MODE; then
30
+ echo " Update (v$VERSION)"
31
+ else
32
+ echo " Initial Setup (v$VERSION)"
33
+ fi
34
+ echo "========================================="
35
+ echo ""
36
+
37
+ # ---------- helper: create or verify symlink ----------
38
+ link_component() {
39
+ local name="$1"
40
+ local source="$2"
41
+ local target="$3"
42
+
43
+ if [[ -L "$target" ]]; then
44
+ existing="$(readlink "$target")"
45
+ if [[ "$existing" == "$source" ]]; then
46
+ ok "$name symlink already correct"
47
+ else
48
+ if $UPDATE_MODE; then
49
+ rm "$target"
50
+ ln -s "$source" "$target"
51
+ ok "$name symlink updated → $source"
52
+ else
53
+ warn "$name symlink exists but points to: $existing"
54
+ warn "Remove it manually if you want to update: rm $target"
55
+ fi
56
+ fi
57
+ elif [[ -e "$target" ]]; then
58
+ warn "$target is a real directory/file (not a symlink)"
59
+ warn "Back it up and remove it if you want to use this repo's $name"
60
+ else
61
+ ln -s "$source" "$target"
62
+ ok "Linked $name → $source"
63
+ fi
64
+ }
65
+
66
+ # ---------- 1. Create ~/.claude if needed ----------
67
+ if [[ ! -d "$CLAUDE_DIR" ]]; then
68
+ info "Creating $CLAUDE_DIR..."
69
+ mkdir -p "$CLAUDE_DIR"
70
+ ok "Created $CLAUDE_DIR"
71
+ fi
72
+
73
+ # ---------- 2. Symlink components ----------
74
+ link_component "skills" "$REPO_DIR/skills" "$CLAUDE_DIR/skills"
75
+ link_component "agents" "$REPO_DIR/.claude/agents" "$CLAUDE_DIR/agents"
76
+ link_component "rules" "$REPO_DIR/.claude/rules" "$CLAUDE_DIR/rules"
77
+ link_component "hooks" "$REPO_DIR/hooks" "$CLAUDE_DIR/hooks"
78
+
79
+ # ---------- 3. Copy settings (skip in update mode) ----------
80
+ if $UPDATE_MODE; then
81
+ info "Update mode — skipping settings.json (preserving your config)"
82
+ elif [[ -f "$CLAUDE_DIR/settings.json" ]]; then
83
+ warn "~/.claude/settings.json already exists — not overwriting"
84
+ warn "Compare with $REPO_DIR/.claude/settings.json and merge manually"
85
+ else
86
+ cp "$REPO_DIR/.claude/settings.json" "$CLAUDE_DIR/settings.json"
87
+ ok "Copied settings.json → $CLAUDE_DIR/settings.json"
88
+ fi
89
+
90
+ # ---------- 4. Create log directory ----------
91
+ mkdir -p "$REPO_DIR/log/plans"
92
+ ok "Ensured log/ and log/plans/ directories exist"
93
+
94
+ # ---------- 5. Check Python dependencies ----------
95
+ info "Checking Python dependencies..."
96
+
97
+ if command -v uv &>/dev/null; then
98
+ ok "uv found: $(uv --version)"
99
+ else
100
+ warn "uv not found — required for Python hooks and MCP server"
101
+ warn "Install: curl -LsSf https://astral.sh/uv/install.sh | sh"
102
+ fi
103
+
104
+ if command -v python3 &>/dev/null; then
105
+ ok "python3 found: $(python3 --version 2>&1)"
106
+ else
107
+ warn "python3 not found — some hooks require Python 3.11+"
108
+ fi
109
+
110
+ if command -v latexmk &>/dev/null; then
111
+ ok "latexmk found (LaTeX compilation available)"
112
+ else
113
+ info "latexmk not found — install a TeX distribution for LaTeX skills"
114
+ fi
115
+
116
+ # ---------- 6. MCP bibliography server ----------
117
+ if [[ -d "$REPO_DIR/.mcp-server-biblio" ]]; then
118
+ info "Bibliography MCP server found at .mcp-server-biblio/"
119
+ info "To configure it, see docs/bibliography-setup.md"
120
+ else
121
+ info "No .mcp-server-biblio/ directory — bibliography search not available"
122
+ fi
123
+
124
+ # ---------- Done ----------
125
+ echo ""
126
+ echo "========================================="
127
+ echo " Setup complete! (v$VERSION)"
128
+ echo "========================================="
129
+ echo ""
130
+ if ! $UPDATE_MODE; then
131
+ echo "Next steps:"
132
+ echo " 1. Edit .context/profile.md with your details"
133
+ echo " 2. Edit .context/current-focus.md with your current work"
134
+ echo " 3. Edit .context/projects/_index.md with your projects"
135
+ echo " 4. Edit CLAUDE.md to customise conventions"
136
+ echo " 5. Review ~/.claude/settings.json for permissions and hooks"
137
+ echo ""
138
+ echo "Then open any project directory and run 'claude' to start!"
139
+ else
140
+ echo "Symlinks updated. Your settings.json was preserved."
141
+ echo ""
142
+ echo "Check docs/getting-started.md if you need to merge new settings."
143
+ fi
@@ -0,0 +1,199 @@
1
+ ---
2
+ name: beamer-deck
3
+ description: "Use when you need to create an academic Beamer presentation with original theme and multi-agent review."
4
+ allowed-tools: Bash(latexmk*), Bash(xelatex*), Bash(pdflatex*), Bash(biber*), Bash(bibtex*), Bash(mkdir*), Bash(ls*), Bash(R*), Bash(Rscript*), Bash(python*), Read, Write, Edit, Task
5
+ argument-hint: [topic, content-path, or project-name]
6
+ ---
7
+
8
+ # Beamer Deck Skill
9
+
10
+ > Generate academic Beamer presentations with original themes, rhetoric-driven structure, and multi-agent review. Internalises Scott Cunningham's rhetoric framework and implements an adversarial review workflow.
11
+
12
+ ## Purpose
13
+
14
+ Create polished, zero-warning Beamer decks for academic contexts: seminars, conference talks, teaching lectures, and working decks for coauthors. Every deck gets a custom theme, assertion-driven titles, and parallel review by rhetoric and graphics sub-agents.
15
+
16
+ **NOT for project status updates** — use `/project-deck` for those.
17
+
18
+ ## When to Use
19
+
20
+ - Academic seminar presentations
21
+ - Conference talks (15–45 min)
22
+ - Teaching lectures (undergraduate or PhD)
23
+ - Working decks for coauthors or supervisors
24
+ - Any presentation that needs rhetoric discipline and visual quality
25
+
26
+ ---
27
+
28
+ ## Critical Rules
29
+
30
+ 1. **Build artifacts go to `out/`, PDF stays in the source directory.** Create `.latexmkrc` with `$out_dir = 'out'` and an `END {}` block to copy the PDF back if missing. Use `/latex-autofix` for compilation — it handles error resolution automatically. See `/latex` for manual config details.
31
+ 2. **Python:** Always use `uv run python`. Never bare `python`, `python3`, `pip`, or `pip3`.
32
+ 2. **Fix ALL warnings.** Overfull hbox, underfull hbox, overfull vbox, underfull vbox — no matter how small. Parse the `.log` file. Recompile until clean.
33
+ 3. **Titles are assertions, not labels.** "Distance increases abortion rates" — not "Results". Every frame title states a claim.
34
+ 4. **One idea per slide.** Not a guideline. A law. If a slide has two ideas, split it.
35
+ 5. **Original themes only.** Never use default Beamer themes (Warsaw, Madrid, etc.) as-is. Define colours and templates inline in the `.tex` file — no separate `.sty` files.
36
+ 6. **Code-first figures.** Generate figures via R or Python scripts before inserting. Never use placeholder images. **Always save the script alongside the figures** — never generate a figure without preserving the code that created it.
37
+ 7. **If a `.bib` file is used, validate it.** Cross-reference all `\cite{}` keys against the bibliography file. See `/bib-validate` for the full protocol.
38
+
39
+ ---
40
+
41
+ ## Rhetoric Principles
42
+
43
+ Full framework (Three Laws, MB/MC, Aristotelian Triad, Narrative Arc, Pyramid Principle, Devil's Advocate): [`../shared/rhetoric-principles.md`](../shared/rhetoric-principles.md)
44
+
45
+ Scott's original essay: `resources/academics/scott-cunningham/MixtapeTools/presentations/rhetoric_of_decks.md`
46
+
47
+ ---
48
+
49
+ ## Quality Scoring
50
+
51
+ Apply numeric quality scoring using the shared framework and skill-specific rubric:
52
+
53
+ - **Framework:** [`../shared/quality-scoring.md`](../shared/quality-scoring.md) — severity tiers, thresholds, verdict rules
54
+ - **Rubric:** [`references/quality-rubric.md`](references/quality-rubric.md) — issue-to-deduction mappings for this skill
55
+
56
+ Start at 100, deduct per issue found, apply verdict. Compute the score in Phase 7 and report it in the final output.
57
+
58
+ ## Context-Specific Guidance
59
+
60
+ See [`../shared/rhetoric-principles.md`](../shared/rhetoric-principles.md) for the full Aristotelian Triad framework. Context-specific Ethos/Pathos/Logos balance and adjustments are applied in Phase 2 based on audience type (academic seminar, conference talk, teaching lecture, working deck).
61
+
62
+ ---
63
+
64
+ ## Workflow: 7 Phases
65
+
66
+ ```
67
+ You (orchestrator)
68
+ ├── Phase 1: Gather context (direct)
69
+ ├── Phase 2: Design structure (direct)
70
+ ├── Phase 3: Build deck (direct)
71
+ ├── Phase 4: Fix all warnings (direct)
72
+ ├── Phase 5: Rhetoric review (sub-agent — Explore)
73
+ ├── Phase 6: Graphics review (sub-agent — Explore) ← parallel with Phase 5
74
+ └── Phase 7: Apply & finalise (direct)
75
+ ```
76
+
77
+ ### Phase 1: Gather Context (Direct)
78
+
79
+ Read project files, content sources, and audience brief. Ask the user clarifying questions:
80
+
81
+ - **Audience**: Who is this for? (seminar, conference, teaching, coauthors)
82
+ - **Duration**: How long is the talk?
83
+ - **Content source**: Paper draft? Notes? Existing slides? Code output?
84
+ - **Special requirements**: Specific figures, institutional branding, language?
85
+
86
+ Check for existing `.bib` files in the project. If citations are needed, note this for Phase 3.
87
+
88
+ ### Phase 2: Design Structure (Direct)
89
+
90
+ 1. **Choose rhetoric balance** based on audience (see table above)
91
+ 2. **Outline slide sequence** with assertion titles — write each title as a claim
92
+ 3. **Plan narrative arc** — identify Act I/II/III transitions
93
+ 4. **Choose colour palette** — original, appropriate to audience tone (see Reference Palettes below for starting points)
94
+ 5. **Identify figures needed** — which need to be generated via code?
95
+
96
+ Present the outline to the user for approval before building.
97
+
98
+ ### Phase 3: Build Deck (Direct)
99
+
100
+ 1. **Generate figures first** — run R/Python scripts, save to `figures/`
101
+ 2. **Write `.tex` file** with inline theme (colours, templates, fonts — all in one file, no `.sty`)
102
+ 3. **Use 16:9 aspect ratio** (`\documentclass[aspectratio=169,11pt]{beamer}`)
103
+ 4. **Create `.latexmkrc`** if not present (`$out_dir = 'out'` + `END {}` block to copy PDF back)
104
+ 5. **Compile using `/latex-autofix`** — this handles missing packages, font conflicts, citation key mismatches, and stale cache automatically
105
+ 6. **If using citations**: add `\addbibresource{references.bib}` or `\bibliography{}` as appropriate
106
+
107
+ ### Phase 4: Fix All Warnings (Direct)
108
+
109
+ After `/latex-autofix` resolves errors, address remaining **warnings** (which autofix does not fix):
110
+
111
+ 1. Parse `out/*.log` for overfull/underfull hbox/vbox warnings
112
+ 2. Fix every single one — adjust text, resize figures, tweak `\parbox`, etc.
113
+ 3. Recompile
114
+ 4. Repeat until the log is clean
115
+
116
+ **"Compilation success does not mean visual success."** Also check for silent visual errors:
117
+ - TikZ: shape constraints forcing label misplacement, coordinate misalignment. **If the deck contains TikZ diagrams**, run the 6-pass verification from [`../shared/tikz-rules.md`](../shared/tikz-rules.md) — compute Bezier depths, check gaps, verify label fit, check shape boundary clearance.
118
+ - matplotlib/ggplot: axis labels cut off, legend obscuring data, text sizing. **If figures use curved arrows (`arc3`)**, compute Bézier positions using the helper functions in `../shared/tikz-rules.md` § Matplotlib Extension — never guess where curves pass. Check label-to-shape clearance (Boundary Rule) and use anchor-based centering for text pairs.
119
+ - **PDF visual inspection**: Run `uv run python scripts/pdf-to-images.py <deck>.pdf` to convert pages to images, then inspect each image for text overflow, element overlap, font readability, and alignment issues that are invisible in the log
120
+
121
+ ### Phase 5: Rhetoric Review (Sub-Agent — Explore)
122
+
123
+ Launch a sub-agent to review the `.tex` file against 7 criteria: narrative arc, MB/MC balance, title quality, one-idea-per-slide, transitions, Aristotelian balance, and pyramid principle.
124
+
125
+ Full prompt template: [`references/review-prompts.md`](references/review-prompts.md) § Rhetoric Review
126
+
127
+ ### Phase 6: Graphics Review (Sub-Agent — Explore)
128
+
129
+ Launch **in parallel with Phase 5**. Reviews TikZ diagrams, figure sizing, table formatting, colour consistency, typography, and numerical accuracy.
130
+
131
+ Full prompt template: [`references/review-prompts.md`](references/review-prompts.md) § Graphics Review
132
+
133
+ ### Phase 7: Apply and Finalise (Direct)
134
+
135
+ 1. Read both reviewer reports
136
+ 2. Incorporate feedback — prioritise Critical and Needs Work items
137
+ 3. Recompile
138
+ 4. Verify zero warnings in the log
139
+ 5. **If using a `.bib` file**: validate all `\cite{}` keys resolve correctly (check log for `Citation .* undefined`). See `/bib-validate` for the full cross-referencing protocol.
140
+ 6. If significant changes were made, loop back to Phase 5 for another review round
141
+ 7. **Compute quality score** — read `references/quality-rubric.md`, log all issues from Phases 4-6, compute score and verdict
142
+ 8. Confirm final PDF is in the source directory (copied from `out/` by `.latexmkrc`)
143
+
144
+ ---
145
+
146
+ ## Reference Palettes
147
+
148
+ Three starting palettes (Professional, Energetic, Academic) in both LaTeX and CSS formats: [`../shared/palettes.md`](../shared/palettes.md)
149
+
150
+ Use as inspiration — always create an original palette for each deck.
151
+
152
+ ---
153
+
154
+ ## Output Checklist
155
+
156
+ A completed deck directory should contain:
157
+
158
+ ```
159
+ project/
160
+ ├── deck.tex # Main Beamer file (inline theme)
161
+ ├── deck.pdf # Compiled PDF (copied from out/ by .latexmkrc)
162
+ ├── .latexmkrc # Output directory config
163
+ ├── out/ # Build artifacts only
164
+ ├── figures/ # Generated figures (if any)
165
+ │ ├── figure_1.png
166
+ │ └── ...
167
+ ├── scripts/ # R/Python scripts that generated figures (if any)
168
+ │ ├── figure_1.R
169
+ │ └── ...
170
+ └── references.bib # Bibliography (if citations used)
171
+ ```
172
+
173
+ - [ ] PDF compiles with zero warnings
174
+ - [ ] All frame titles are assertions
175
+ - [ ] One idea per slide
176
+ - [ ] Narrative arc: Problem → Investigation → Resolution
177
+ - [ ] Rhetoric review completed (Phase 5)
178
+ - [ ] Graphics review completed (Phase 6)
179
+ - [ ] If `.bib` used: all `\cite{}` keys validated (see `/bib-validate`)
180
+ - [ ] Quality score computed and reported
181
+
182
+ ---
183
+
184
+ ## Cross-References
185
+
186
+ | Skill | When to use instead/alongside |
187
+ |-------|-------------------------------|
188
+ | `/project-deck` | For project status updates (supervisor meetings, coauthor handoffs) |
189
+ | `/latex-autofix` | **Default compiler** — used in Phase 3 for error resolution and citation audit |
190
+ | `/latex` | For manual compilation config details, `.latexmkrc` setup, engine selection |
191
+ | `/proofread` | For post-hoc review of text quality in the deck |
192
+ | `/bib-validate` | For thorough bibliography cross-referencing when citations are used |
193
+ | `/literature` | For finding and verifying citations to include |
194
+ | `/quarto-deck` | For HTML presentations (teaching, informal talks) instead of PDF |
195
+ | `/quarto-course` | For full course websites with multiple lectures, exercises, and navigation |
196
+
197
+ **Scott's full rhetoric essay:** `resources/academics/scott-cunningham/MixtapeTools/presentations/rhetoric_of_decks.md`
198
+ **Scott's deck generation prompt:** `resources/academics/scott-cunningham/MixtapeTools/presentations/create_deck_prompt.md`
199
+ **Scott's example decks:** `resources/academics/scott-cunningham/MixtapeTools/presentations/examples/`
@@ -0,0 +1,54 @@
1
+ # Quality Rubric: Beamer Deck
2
+
3
+ > Scoring rubric for `/beamer-deck`. Uses the shared framework in [`../../shared/quality-scoring.md`](../../shared/quality-scoring.md).
4
+
5
+ ## Deduction Table
6
+
7
+ ### Blocker (-100)
8
+
9
+ | Issue | Deduction | Notes |
10
+ |-------|-----------|-------|
11
+ | Compilation fails — no PDF produced | -100 | Deck is broken |
12
+ | Default Beamer theme used (Warsaw, Madrid, etc.) | -100 | Violates Critical Rule 5 |
13
+
14
+ ### Critical (-15 to -25)
15
+
16
+ | Issue | Deduction | Notes |
17
+ |-------|-----------|-------|
18
+ | No narrative arc (no Problem → Investigation → Resolution structure) | -20 | Fundamental rhetoric failure |
19
+ | Label title instead of assertion (e.g., "Results" not a claim) | -15 | Per frame — violates Critical Rule 3 |
20
+ | Multiple ideas on a single slide | -15 | Per slide — violates Critical Rule 4 |
21
+ | Unresolved `\cite{}` — `??` or `[?]` in output | -15 | Per broken citation |
22
+ | Unresolved `\ref{}` — `??` in output | -15 | Per broken reference |
23
+
24
+ ### Major (-5 to -14)
25
+
26
+ | Issue | Deduction | Notes |
27
+ |-------|-----------|-------|
28
+ | Overfull hbox/vbox warning remaining | -5 | Per instance — violates Critical Rule 2 |
29
+ | Missing transitions between sections (audience loses thread) | -8 | Per missing transition |
30
+ | Aristotelian balance off (e.g., 0% pathos in teaching) | -5 | Once for the deck |
31
+ | Placeholder image instead of code-generated figure | -10 | Per figure — violates Critical Rule 6 |
32
+ | Figure axes unlabelled or legend missing | -5 | Per figure |
33
+ | Colour palette not accessible (low contrast, red-green reliance) | -5 | Once for the deck |
34
+ | `.bib` used but not validated | -8 | Once — violates Critical Rule 7 |
35
+
36
+ ### Minor (-1 to -4)
37
+
38
+ | Issue | Deduction | Notes |
39
+ |-------|-----------|-------|
40
+ | Conclusion-last instead of conclusion-first on a slide (Pyramid Principle) | -3 | Per slide |
41
+ | Speaker notes missing on key slides | -2 | Per key slide |
42
+ | Slide overloaded visually (too much text, cramped layout) | -3 | Per slide |
43
+ | Inconsistent font sizing across slides | -2 | Once for the deck |
44
+ | Minor TikZ alignment issue | -2 | Per diagram |
45
+ | Cognitive load spike (too much new information at once) | -3 | Per instance |
46
+
47
+ ## Category Mapping
48
+
49
+ | Rubric category | Phase |
50
+ |----------------|-------|
51
+ | Compilation & warnings | Phase 3-4 |
52
+ | Rhetoric (arc, titles, one-idea) | Phase 5 |
53
+ | Graphics (figures, TikZ, colour) | Phase 6 |
54
+ | Final polish | Phase 7 |
@@ -0,0 +1,106 @@
1
+ # Beamer Deck Review Prompts
2
+
3
+ > Sub-agent prompts for Phases 5 and 6 of `/beamer-deck`. Also usable by `/quarto-deck` (Phase 5).
4
+
5
+ ## Rhetoric Review (Phase 5)
6
+
7
+ Launch with `subagent_type: Explore`:
8
+
9
+ ```
10
+ You are a rhetoric reviewer for an academic Beamer presentation.
11
+
12
+ Read the file at: [PATH TO .tex FILE]
13
+
14
+ Evaluate the deck against these criteria and return a structured report:
15
+
16
+ ## 1. Narrative Arc
17
+ - Does the deck follow a three-act structure (Problem → Investigation → Resolution)?
18
+ - Is the opening a provocative question, statistic, or bold claim (not "Today I'll talk about...")?
19
+ - Does the closing deliver a single memorable takeaway (not "Questions?" or "Thank you")?
20
+
21
+ ## 2. MB/MC Balance
22
+ - Is cognitive load distributed smoothly across slides?
23
+ - Are there overloaded slides (too many ideas, text to footer)?
24
+ - Are there underloaded slides (wasted opportunity)?
25
+ - Is there deliberate rhythm between dense and light slides?
26
+
27
+ ## 3. Title Quality
28
+ - Is every frame title an assertion (a claim), not a label?
29
+ - Bad: "Results", "Data", "Background"
30
+ - Good: "Distance increases abortion rates", "Standard methods fail with staggered treatment"
31
+
32
+ ## 4. One Idea Per Slide
33
+ - Does any slide try to convey multiple ideas?
34
+ - Flag any slide that should be split.
35
+
36
+ ## 5. Transitions
37
+ - Are transitions between slides explicit?
38
+ - Does the audience know where they are in the argument at all times?
39
+
40
+ ## 6. Aristotelian Balance
41
+ - For the intended audience ([AUDIENCE TYPE]), is the ethos/pathos/logos balance appropriate?
42
+ - Is there a Devil's Advocate moment (acknowledging the strongest objection)?
43
+
44
+ ## 7. Pyramid Principle
45
+ - Does each section lead with conclusions, then support?
46
+ - Or does the deck bury findings after too much background?
47
+
48
+ Return your report as a structured markdown document with:
49
+ - A rating for each criterion (Strong / Adequate / Needs Work)
50
+ - Specific slide numbers and suggested improvements
51
+ - An overall assessment
52
+ ```
53
+
54
+ ## Graphics Review (Phase 6)
55
+
56
+ Launch with `subagent_type: Explore` **in parallel with Phase 5**:
57
+
58
+ ```
59
+ You are a graphics specialist reviewing an academic Beamer presentation.
60
+
61
+ Read the file at: [PATH TO .tex FILE]
62
+
63
+ Check for visual and technical issues:
64
+
65
+ ## 1. TikZ Diagrams
66
+ - Do coordinate values match intended placement?
67
+ - Are node positions consistent with the visual layout described?
68
+ - Are labels positioned correctly (not overlapping nodes or edges)?
69
+ - Do shape constraints force any misplacement?
70
+ - Do labels near circles/rectangles clear the computed shape boundary by at least 0.4cm?
71
+
72
+ ## 2. Matplotlib/Python Figures
73
+ - For curved arrows (`arc3`): were Bézier positions computed or guessed?
74
+ - Do labels near patches (FancyBboxPatch, Circle) clear their boundaries?
75
+ - For text pairs in containers: is anchor-based centering used (not symmetric `va='center'`)?
76
+ - Are figure-generation scripts saved alongside the output figures?
77
+
78
+ ## 3. Figure Sizing and Placement
79
+ - Are included figures sized appropriately for the slide?
80
+ - Is there sufficient whitespace around figures?
81
+ - Are captions/labels readable at presentation size (minimum 18pt)?
82
+
83
+ ## 4. Table Formatting
84
+ - Are tables clean (booktabs style, no vertical rules)?
85
+ - Is text in tables large enough to read?
86
+ - Are column widths balanced?
87
+
88
+ ## 5. Colour Consistency
89
+ - Is the colour palette used consistently throughout?
90
+ - Are accent colours used for emphasis, not decoration?
91
+ - Do data visualisation colours match the deck palette?
92
+
93
+ ## 6. Typography
94
+ - Is body text at least 24pt (18pt floor)?
95
+ - Maximum two font families?
96
+ - Is text ragged right (not justified)?
97
+
98
+ ## 7. Numerical Accuracy
99
+ - If the deck references specific numbers, do the figures/tables match?
100
+ - Are axis scales appropriate and labeled?
101
+
102
+ Return your report as structured markdown with:
103
+ - Specific slide numbers for each issue found
104
+ - Severity (Critical / Minor / Suggestion)
105
+ - Recommended fix for each issue
106
+ ```