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,311 @@
1
+ ---
2
+ name: multi-perspective
3
+ description: "Use when you need to explore a research question from multiple independent perspectives."
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, Task, AskUserQuestion
5
+ argument-hint: "[research question, hypothesis, or design choice]"
6
+ ---
7
+
8
+ # Multi-Perspective Exploration
9
+
10
+ Spawn 3-5 parallel agents, each with a distinct disciplinary lens and epistemic prior, to independently investigate a research question. Then synthesise their findings into a structured comparison that surfaces agreements, tensions, and blind spots.
11
+
12
+ The core insight: a single-perspective analysis inherits the biases of that perspective. Deliberately introducing cognitive diversity — grounded in real disciplinary traditions — produces more robust research designs.
13
+
14
+ ## When to Use
15
+
16
+ - Early-stage research design: "Is this the right question? Is this the right method?"
17
+ - When choosing between competing identification strategies
18
+ - When a paper needs to convince reviewers from different traditions
19
+ - Before committing to a theoretical framework
20
+ - When you suspect your approach has blind spots
21
+
22
+ ## When NOT to Use
23
+
24
+ - **Quick feedback** — use `/devils-advocate` (single-perspective adversarial)
25
+ - **Literature search** — use `/literature` (discovery, not deliberation)
26
+ - **Generating new questions** — use `/scout generate` (this skill evaluates, not generates)
27
+ - **Paper proofreading** — use `/proofread` or `paper-critic` agent
28
+
29
+ ## Workflow
30
+
31
+ ### Phase 1: Frame the Question
32
+
33
+ Read `$ARGUMENTS` and any referenced files. Formulate a clear, debatable research question or design choice. Good inputs:
34
+
35
+ - "Should I use DiD or synthetic control for this policy evaluation?"
36
+ - "Is bounded rationality or information asymmetry the better theoretical lens for this phenomenon?"
37
+ - "What are the threats to my identification strategy for [paper X]?"
38
+ - "How would different disciplines approach [phenomenon Y]?"
39
+
40
+ If the input is vague, ask one clarifying question before proceeding.
41
+
42
+ ### Phase 2: Generate Perspectives
43
+
44
+ Generate 3-5 distinct perspectives. Each perspective is defined by:
45
+
46
+ | Field | Description |
47
+ |-------|-------------|
48
+ | **Label** | Short name (e.g., "Behavioural Economist", "Organisational Theorist") |
49
+ | **Discipline** | Academic field and tradition |
50
+ | **Epistemic prior** | What this perspective takes as given, and what it questions |
51
+ | **Methodological preference** | Preferred empirical approach and evidence standards |
52
+ | **Likely concern** | What this perspective would worry about most |
53
+
54
+ **Rules for perspective generation:**
55
+ - At least one perspective must be **methodologically sceptical** (e.g., econometrician focused on identification)
56
+ - At least one must come from a **different discipline** than the paper's primary field
57
+ - At least one must prioritise **practical/policy relevance** over internal validity
58
+ - Perspectives must **genuinely disagree** on at least one substantive point — no hollow diversity
59
+ - Ground perspectives in real traditions, not caricatures
60
+
61
+ **Perspective templates by domain:**
62
+
63
+ | If the research is about... | Consider these lenses |
64
+ |----------------------------|----------------------|
65
+ | Human-AI collaboration | Cognitive psychologist, HCI researcher, organisational economist, ethicist, systems engineer |
66
+ | MCDM / preference elicitation | Decision theorist, behavioural economist, operations researcher, UX researcher, philosopher of rationality |
67
+ | Multi-agent systems | Game theorist, mechanism designer, complexity scientist, political economist, social choice theorist |
68
+ | Organisational behaviour | Sociologist, micro-economist, evolutionary psychologist, management scientist, institutional theorist |
69
+ | Environmental/carbon policy | Environmental economist, political scientist, energy engineer, regulatory lawyer, behavioural scientist |
70
+
71
+ Present the generated perspectives to the user and get approval before proceeding. The user may want to add, remove, or adjust perspectives.
72
+
73
+ ### Phase 3: Parallel Investigation
74
+
75
+ Spawn one sub-agent per perspective using the Task tool. Each agent receives:
76
+
77
+ ```
78
+ You are a [LABEL] investigating this research question:
79
+
80
+ [QUESTION]
81
+
82
+ Your disciplinary background: [DISCIPLINE]
83
+ Your epistemic prior: [EPISTEMIC PRIOR]
84
+ Your methodological preference: [METHODOLOGICAL PREFERENCE]
85
+ Your primary concern: [LIKELY CONCERN]
86
+
87
+ Context about the project:
88
+ [Relevant project context — CLAUDE.md summary, paper abstract if available]
89
+
90
+ TASK: Analyse this question from your perspective. Address:
91
+ 1. How would you frame this question in your discipline?
92
+ 2. What theoretical framework would you apply?
93
+ 3. What empirical strategy would you recommend, and why?
94
+ 4. What are the main threats to validity from your perspective?
95
+ 5. What would you find most/least convincing in the current approach?
96
+ 6. What is the one thing the researcher is probably overlooking?
97
+
98
+ Be specific and grounded. Cite real methodological traditions and papers where relevant.
99
+ Write 300-500 words. Do not hedge — commit to your perspective's position.
100
+ ```
101
+
102
+ **Agent configuration:**
103
+ - Use `subagent_type: general-purpose` for each
104
+ - Run all agents in parallel (up to 5 concurrent, per orchestration convention)
105
+ - Each agent writes to a temp file; collect results after all complete
106
+
107
+ ### Phase 3.25: User Check-In (Interactive Mode)
108
+
109
+ After collecting all perspective outputs, present them to the user as a structured summary and run an interactive check-in. This is the key differentiator from a passive multi-perspective analysis — the user participates as an active contributor, not a spectator.
110
+
111
+ **What to present:**
112
+ - Each perspective's key position (2-3 sentences, not the full output)
113
+ - The main disagreements visible so far
114
+ - Any assumptions the perspectives made about the research context
115
+
116
+ **Then ask (via AskUserQuestion):**
117
+
118
+ > "Here's where the perspectives stand so far. Before they peer-review each other, I want to check in:
119
+ >
120
+ > 1. **Reveal constraints:** Is there anything these perspectives don't know that would change their analysis? (e.g., data limitations, institutional constraints, supervisor preferences, timeline)
121
+ > 2. **Redirect:** Is any perspective completely off-base or exploring an irrelevant direction?
122
+ > 3. **Challenge:** Do you want to push back on any specific claim before cross-evaluation?"
123
+
124
+ **How the user's input feeds forward:**
125
+ - Constraints revealed here are injected into the cross-evaluation prompt as "Additional context from the researcher" — each evaluator sees them
126
+ - If a perspective is marked as off-base, it is still included in cross-evaluation (for completeness) but flagged: "The researcher considers this direction less relevant because [reason]"
127
+ - Challenges are posed directly to the relevant perspective in the cross-evaluation round as an additional evaluation criterion
128
+
129
+ **When to skip:** If the user says "skip check-in", "just run it", or "non-interactive", proceed directly to Phase 3.5. The default is interactive.
130
+
131
+ ### Phase 3.5: Anonymised Cross-Evaluation
132
+
133
+ Before synthesising, run a peer-review round where each perspective critiques all others — without knowing which lens produced which output. This forces content-based evaluation rather than tribal dismissal.
134
+
135
+ **Setup:** Anonymise each perspective's output by replacing the label with a neutral identifier (Perspective A, B, C, ...). Strip any self-identifying language (e.g., "as an econometrician, I...").
136
+
137
+ **Spawn one evaluator agent per perspective** using the Task tool. Each receives:
138
+
139
+ ```
140
+ You are a [LABEL] ([DISCIPLINE]).
141
+
142
+ Below are [N] anonymous analyses of this research question:
143
+
144
+ [QUESTION]
145
+
146
+ ---
147
+ [Perspective A output — anonymised]
148
+ ---
149
+ [Perspective B output — anonymised]
150
+ ---
151
+ [Perspective C output — anonymised]
152
+ ---
153
+
154
+ TASK: Evaluate each perspective on these criteria (1-5 scale):
155
+ 1. **Rigour** — Is the reasoning sound? Are claims supported?
156
+ 2. **Relevance** — Does it address the core question?
157
+ 3. **Novelty** — Does it surface something the others miss?
158
+ 4. **Practicality** — Could the researcher act on this advice?
159
+
160
+ [IF USER PROVIDED INPUT IN PHASE 3.25, ADD:]
161
+ Additional context from the researcher:
162
+ - Constraints: [user-revealed constraints]
163
+ - Challenges: [user's pushback on specific claims]
164
+ - Relevance notes: [any perspectives the user flagged as less relevant, with reason]
165
+
166
+ Factor this researcher context into your evaluation — perspectives that ignore known constraints should score lower on Practicality.
167
+
168
+ For each perspective, provide:
169
+ - Scores (4 numbers)
170
+ - One strength (1 sentence)
171
+ - One weakness (1 sentence)
172
+ - Would you change your own analysis based on this? (yes/no + why)
173
+
174
+ Then rank all perspectives from most to least valuable for the researcher.
175
+ Be honest — evaluate the content, not the style. 200-300 words total.
176
+ ```
177
+
178
+ **Agent configuration:**
179
+ - Use `subagent_type: general-purpose` for each
180
+ - Run all evaluator agents in parallel
181
+ - Each agent must NOT see which label produced which output
182
+
183
+ **What this produces:**
184
+ - A cross-evaluation matrix (each perspective rated by every other)
185
+ - Self-revision signals (perspectives that update their view after seeing others)
186
+ - Consensus rankings (which perspectives were rated highest across evaluators)
187
+
188
+ Include the cross-evaluation matrix in the final report (Section "Peer Evaluation") so the user can see where perspectives found each other compelling or weak.
189
+
190
+ ### Phase 4: Synthesise
191
+
192
+ Read all agent outputs **and their peer evaluations** and produce a structured synthesis. Weight the synthesis by peer evaluation scores — perspectives rated highly across evaluators get more influence than those rated poorly:
193
+
194
+ #### 4.1 Agreement Map
195
+
196
+ What do all (or most) perspectives agree on? These are robust findings — if sceptics from different traditions converge, the point is likely sound.
197
+
198
+ #### 4.2 Tension Map
199
+
200
+ Where do perspectives disagree? For each tension:
201
+ - What is the disagreement about? (framing, method, assumption, evidence standard)
202
+ - Is it resolvable? (empirically testable vs. fundamentally different values)
203
+ - What would it take to resolve it?
204
+
205
+ #### 4.3 Blind Spot Detection
206
+
207
+ What did one perspective flag that no others mentioned? These are the most valuable findings — they reveal assumptions that are invisible within the primary discipline.
208
+
209
+ #### 4.4 Recommendations
210
+
211
+ Based on the synthesis:
212
+ 1. **Strengthen:** What should the researcher do to address the most serious concerns?
213
+ 2. **Acknowledge:** What limitations should be explicitly discussed in the paper?
214
+ 3. **Test:** What additional analyses could resolve the key tensions?
215
+ 4. **Reframe:** Should the question or approach be reconsidered?
216
+
217
+ ### Phase 5: Output
218
+
219
+ Write the report to the project directory as `PERSPECTIVES-REPORT.md` (or print to console for quick use).
220
+
221
+ ## Output Format
222
+
223
+ ```markdown
224
+ # Multi-Perspective Analysis
225
+
226
+ **Question:** [The research question or design choice]
227
+ **Date:** YYYY-MM-DD
228
+ **Perspectives:** [N] ([list of labels])
229
+
230
+ ## Perspectives
231
+
232
+ ### 1. [Label]: [Discipline]
233
+ **Prior:** [One sentence]
234
+ **Analysis:** [Agent's full response]
235
+
236
+ ### 2. [Label]: [Discipline]
237
+ ...
238
+
239
+ ## Peer Evaluation
240
+
241
+ | Perspective | Avg Rigour | Avg Relevance | Avg Novelty | Avg Practicality | Overall Rank |
242
+ |-------------|-----------|--------------|------------|-----------------|--------------|
243
+ | [Label] | X.X | X.X | X.X | X.X | #N |
244
+
245
+ **Key cross-evaluation findings:**
246
+ - [Which perspectives updated their view after seeing others]
247
+ - [Where evaluators converged on a strength/weakness]
248
+
249
+ ## Synthesis
250
+
251
+ ### Agreements
252
+ - [Point 1 — which perspectives agree, and why this is robust]
253
+ - [Point 2]
254
+
255
+ ### Tensions
256
+
257
+ | Tension | Perspectives | Nature | Resolvable? |
258
+ |---------|-------------|--------|-------------|
259
+ | [Description] | A vs. B | Methodological | Yes — via [test] |
260
+ | [Description] | C vs. D, E | Conceptual | No — different values |
261
+
262
+ ### Blind Spots
263
+ - [Finding] — flagged by [perspective], missed by all others
264
+ - [Finding]
265
+
266
+ ### Recommendations
267
+ 1. **Strengthen:** [Most important action]
268
+ 2. **Acknowledge:** [Limitation to discuss]
269
+ 3. **Test:** [Additional analysis]
270
+ 4. **Reframe:** [If applicable]
271
+
272
+ ## Next Steps
273
+ - [ ] [Actionable item 1]
274
+ - [ ] [Actionable item 2]
275
+ ```
276
+
277
+ ## Council Mode Enhancement
278
+
279
+ In standard mode, Phase 3 spawns Claude sub-agents with different personas — but they all share the same underlying model. Council mode upgrades this to genuine model diversity: different LLM providers (Claude, GPT, Gemini) bring genuinely different reasoning patterns, training biases, and knowledge bases.
280
+
281
+ **Trigger:** "Council multi-perspective" or "thorough multi-perspective"
282
+
283
+ **What changes in council mode:**
284
+ - Phase 3 (Parallel Investigation): Each perspective is assigned to a different LLM provider via `cli-council`, not Claude sub-agents
285
+ - Phase 3.5 (Cross-Evaluation): Each model evaluates the others' perspectives without knowing which model produced which — genuine blind review
286
+ - Phase 4 (Synthesis): Chairman model reads all perspectives and cross-evaluations, weighted by peer scores
287
+
288
+ **Invocation (CLI backend):**
289
+ ```bash
290
+ cd packages/cli-council
291
+ uv run python -m cli_council \
292
+ --prompt-file /tmp/perspective-prompt.txt \
293
+ --context-file /tmp/research-context.txt \
294
+ --output-md /tmp/perspectives-council.md \
295
+ --chairman claude \
296
+ --timeout 180
297
+ ```
298
+
299
+ See `skills/shared/council-protocol.md` for the full orchestration protocol.
300
+
301
+ **Value:** High — this skill is the natural fit for council mode. The whole point of multi-perspective analysis is cognitive diversity, and using genuinely different models instead of persona-differentiated instances of the same model is a strict upgrade.
302
+
303
+ ## Cross-References
304
+
305
+ | Skill | When to use instead/alongside |
306
+ |-------|-------------------------------|
307
+ | `/devils-advocate` | Quick single-perspective adversarial feedback |
308
+ | `/literature` | Find the papers that perspectives reference |
309
+ | `/interview-me` | Develop the research idea through structured conversation |
310
+ | Referee 2 agent | Formal paper audit with code verification |
311
+ | `references/computational-many-analysts.md` | When combining qualitative perspectives with quantitative many-analysts |
@@ -0,0 +1,77 @@
1
+ # Computational Many-Analysts
2
+
3
+ > How the many-analysts design relates to multi-perspective analysis, when to combine them, and the verification hierarchy. Read when deciding between qualitative perspective diversity and quantitative specification diversity.
4
+
5
+ ## Multi-Perspective vs Many-Analysts
6
+
7
+ These are complementary, not competing, approaches to robustness:
8
+
9
+ | Dimension | Multi-Perspective | Many-Analysts |
10
+ |-----------|------------------|---------------|
11
+ | **Question** | "Should we use DiD at all?" | "Given DiD, how sensitive is the ATT to covariate choice?" |
12
+ | **What varies** | Disciplinary lens, theoretical framework, method preference | Implementation choices within a fixed method |
13
+ | **Nature of diversity** | Qualitative — different ways of seeing | Quantitative — different specifications of the same model |
14
+ | **Output** | Agreement/tension map, blind spots | Forest plot, spread-to-SE ratio |
15
+ | **When in pipeline** | Early — before committing to an approach | Late — after locking the estimator, before submission |
16
+ | **Agent design** | Personas with distinct priors | Identical instructions, independent isolation |
17
+
18
+ **Key distinction:** Multi-perspective agents are deliberately given different epistemic priors (behavioural economist vs econometrician vs sociologist). Many-analyst agents receive identical instructions and differ only through emergent discretionary choices.
19
+
20
+ ## When to Combine
21
+
22
+ Use `/multi-perspective` first, then many-analysts:
23
+
24
+ 1. **Stage 1 — Multi-Perspective:** "What identification strategy should we use for this policy evaluation?" Spawn disciplinary perspectives to debate DiD vs synthetic control vs IV.
25
+ 2. **Lock the approach** based on the synthesis (agreements, resolved tensions).
26
+ 3. **Stage 2 — Many-Analysts:** "Given DiD with Callaway & Sant'Anna, how sensitive is the ATT to covariate choice?" Run N isolated agents on the same dataset with the locked estimator.
27
+ 4. **Report both:** The multi-perspective analysis justifies the methodological choice; the many-analysts spread quantifies remaining researcher degrees of freedom.
28
+
29
+ **When NOT to combine:**
30
+ - If the method choice is uncontested (e.g., randomised experiment → just run many-analysts on specification choices)
31
+ - If you're at the conceptual stage and haven't collected data yet (multi-perspective only)
32
+ - If the only question is "does my code run correctly?" (neither — use `/code-review`)
33
+
34
+ ## The Convex Cost Problem
35
+
36
+ Cunningham (2026, Post 21) observes that AI productivity gains are superlinear in mess:
37
+
38
+ > "5x productivity → >5x mess."
39
+
40
+ **Stock pollutants** grow convex: excess files, duplicate outputs, hard-coded results, branching pipelines. Each additional agent run adds output that must be verified, organised, and synthesised.
41
+
42
+ **Three binding constraints in human-AI research:**
43
+
44
+ | Constraint | Description | Implication |
45
+ |------------|-------------|-------------|
46
+ | **Verification** | Human must check that agent output is correct | Scales linearly at best; often sublinearly as fatigue sets in |
47
+ | **Attention** | Resist automating the learning process itself | Running 15 agents is easy; understanding why they diverged is hard |
48
+ | **Congestion** | Finding things in your own output | More agents = more output directories, more figures, more specs to track |
49
+
50
+ **For many-analysts designs:** The value is in the diagnostic (forest plot, covariate heatmap), not in the individual outputs. Design the pipeline to produce the diagnostic automatically — don't manually inspect each agent's work.
51
+
52
+ ## Verification Hierarchy
53
+
54
+ Karpathy's claim: "The new skill is verification, not generation." This creates a natural hierarchy of verification tools:
55
+
56
+ | Level | Tool | What it checks | Cost |
57
+ |-------|------|----------------|------|
58
+ | 1. Code correctness | Multi-language audit (R + Python + Stata) | Same specification → same estimate across languages | Medium |
59
+ | 2. Specification sensitivity | Many-analysts design | Same estimator → estimate spread across specification choices | Medium-high |
60
+ | 3. Method sensitivity | Multi-perspective analysis | Different disciplines → different recommended approaches | High |
61
+ | 4. Adversarial review | `referee2-reviewer` agent | Everything a hostile reviewer could exploit | High |
62
+
63
+ Each level subsumes the one below: if agents can't reproduce the same estimate across languages (Level 1), there's no point measuring specification sensitivity (Level 2).
64
+
65
+ **Standard reporting:** Include the forest plot from Level 2 in the robustness appendix. Reference the multi-perspective synthesis in the methodology discussion. Adversarial review (Level 4) is a pre-submission internal tool, not reported.
66
+
67
+ ## Connection to Council Mode
68
+
69
+ The `/multi-perspective` council mode (using `cli-council` with multiple LLM providers) adds genuine model diversity on top of persona diversity. The many-analysts design adds specification diversity on top of that. They operate on different axes:
70
+
71
+ | Axis | What varies | Tool |
72
+ |------|-------------|------|
73
+ | Model diversity | LLM provider (Claude, GPT, Gemini) | Council mode |
74
+ | Persona diversity | Disciplinary lens and epistemic prior | `/multi-perspective` standard mode |
75
+ | Specification diversity | Implementation choices within a fixed method | Many-analysts design |
76
+
77
+ All three can run on the same research question, each contributing a different kind of robustness evidence.
@@ -0,0 +1,226 @@
1
+ ---
2
+ name: pipeline-manifest
3
+ description: "Use when you need to map scripts to their inputs, outputs, and paper figures/tables."
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, AskUserQuestion
5
+ argument-hint: [project-path]
6
+ ---
7
+
8
+ # Pipeline Manifest
9
+
10
+ Build and maintain a `pipeline.md` that maps every script in a research project to its inputs, outputs, and the paper figures/tables it feeds. Optionally add structured headers to scripts that lack them.
11
+
12
+ ## When to Use
13
+
14
+ - When starting a multi-step empirical project (establish the pipeline early)
15
+ - Before sharing code with coauthors (makes the data flow legible)
16
+ - Before submission (ensures the replication package is traceable)
17
+ - After inheriting or reviving old code (pair with `/code-archaeology`)
18
+ - When you can't remember which script produces Figure 3
19
+
20
+ ## When NOT to Use
21
+
22
+ - Pure theory projects with no empirical pipeline
23
+ - Single-script projects (no pipeline to map)
24
+ - **Code quality review** — use `/code-review` instead (this skill maps structure, not quality)
25
+
26
+ ## Modes
27
+
28
+ Ask the user which mode to run:
29
+
30
+ | Mode | What it does | Writes to |
31
+ |------|-------------|-----------|
32
+ | **Scan** (default) | Read-only. Scans scripts, builds `pipeline.md` | `pipeline.md` only |
33
+ | **Add headers** | Scan + insert structured headers into scripts that lack them | `pipeline.md` + script files |
34
+
35
+ In **Add headers** mode, show the proposed header for each script and get confirmation before writing. Never overwrite an existing structured header — only add to scripts that lack one.
36
+
37
+ ## Structured Script Header Format
38
+
39
+ Every research script should begin with a structured header block. The format adapts to the language:
40
+
41
+ ### Python
42
+
43
+ ```python
44
+ # ============================================================================
45
+ # PURPOSE: [One sentence describing what this script does]
46
+ # INPUTS: [Comma-separated list of input files, relative to project root]
47
+ # OUTPUTS: [Comma-separated list of output files, relative to project root]
48
+ # DEPENDS: [Scripts that must run before this one, or "none"]
49
+ # PAPER: [Figure/table references this feeds, e.g. "Figure 2, Table 1", or "none"]
50
+ # ============================================================================
51
+ ```
52
+
53
+ ### R
54
+
55
+ ```r
56
+ # ============================================================================
57
+ # PURPOSE: [One sentence describing what this script does]
58
+ # INPUTS: [Comma-separated list of input files, relative to project root]
59
+ # OUTPUTS: [Comma-separated list of output files, relative to project root]
60
+ # DEPENDS: [Scripts that must run before this one, or "none"]
61
+ # PAPER: [Figure/table references this feeds, e.g. "Figure 2, Table 1", or "none"]
62
+ # ============================================================================
63
+ ```
64
+
65
+ ### Stata
66
+
67
+ ```stata
68
+ * ============================================================================
69
+ * PURPOSE: [One sentence describing what this script does]
70
+ * INPUTS: [Comma-separated list of input files, relative to project root]
71
+ * OUTPUTS: [Comma-separated list of output files, relative to project root]
72
+ * DEPENDS: [Scripts that must run before this one, or "none"]
73
+ * PAPER: [Figure/table references this feeds, e.g. "Figure 2, Table 1", or "none"]
74
+ * ============================================================================
75
+ ```
76
+
77
+ ### Julia
78
+
79
+ ```julia
80
+ # ============================================================================
81
+ # PURPOSE: [One sentence describing what this script does]
82
+ # INPUTS: [Comma-separated list of input files, relative to project root]
83
+ # OUTPUTS: [Comma-separated list of output files, relative to project root]
84
+ # DEPENDS: [Scripts that must run before this one, or "none"]
85
+ # PAPER: [Figure/table references this feeds, e.g. "Figure 2, Table 1", or "none"]
86
+ # ============================================================================
87
+ ```
88
+
89
+ ## Header Field Definitions
90
+
91
+ | Field | What it contains | How to populate |
92
+ |-------|-----------------|-----------------|
93
+ | **PURPOSE** | One sentence. What does this script do? | Read the script and summarise |
94
+ | **INPUTS** | Files this script reads. Paths relative to project root. | Grep for `read`, `load`, `import`, `open`, `use` patterns |
95
+ | **OUTPUTS** | Files this script writes. Paths relative to project root. | Grep for `write`, `save`, `export`, `ggsave`, `savefig`, `sink` patterns |
96
+ | **DEPENDS** | Other scripts that must run first (their outputs are this script's inputs). | Trace input files back to the scripts that produce them |
97
+ | **PAPER** | Which figures, tables, or sections in the paper use this script's output. | Match output filenames against `\includegraphics`, `\input`, `\include` in `.tex` files |
98
+
99
+ ## Workflow
100
+
101
+ ### Phase 1: Discover Scripts
102
+
103
+ Scan the project for research scripts:
104
+
105
+ ```
106
+ code/**/*.{py,R,r,do,jl,m}
107
+ src/**/*.{py,R,r,do,jl,m}
108
+ scripts/**/*.{py,R,r,do,jl,m}
109
+ ```
110
+
111
+ Exclude:
112
+ - `__pycache__/`, `.venv/`, `renv/`, `node_modules/`
113
+ - Test files (`test_*.py`, `*_test.R`)
114
+ - Setup/config scripts (`setup.py`, `conftest.py`)
115
+
116
+ Sort by filename (numerical prefixes like `01_`, `02_` determine natural order).
117
+
118
+ ### Phase 2: Extract Pipeline Information
119
+
120
+ For each script:
121
+
122
+ 1. **Check for existing header.** Look for the `PURPOSE:` / `INPUTS:` / `OUTPUTS:` / `DEPENDS:` / `PAPER:` pattern in the first 20 lines.
123
+
124
+ 2. **If header exists:** Parse it directly. Trust the header as ground truth.
125
+
126
+ 3. **If no header:** Read the full script and infer:
127
+ - **Inputs:** File read operations (`pd.read_csv`, `read.csv`, `readRDS`, `load`, `use`, `open`, `import delimited`, `fread`, `arrow::read_parquet`, `readr::read_*`)
128
+ - **Outputs:** File write operations (`to_csv`, `write.csv`, `saveRDS`, `save`, `ggsave`, `plt.savefig`, `export`, `sink`, `write_parquet`, `fwrite`, `outsheet`, `estout`)
129
+ - **Dependencies:** Cross-reference — if script B reads a file that script A writes, then B depends on A
130
+ - **Paper links:** Match output filenames against `\includegraphics{...}` and `\input{...}` in `.tex` files
131
+
132
+ ### Phase 3: Build Dependency Graph
133
+
134
+ From the extracted information, construct:
135
+
136
+ 1. **Execution order** — topological sort of the dependency graph. Flag cycles as errors.
137
+ 2. **Orphan detection** — scripts whose outputs are never used by another script or the paper. These may be exploratory/deprecated.
138
+ 3. **Missing link detection** — inputs that no script produces and that don't exist in `data/raw/`.
139
+
140
+ ### Phase 4: Build Paper Linkage
141
+
142
+ Scan all `.tex` files in `paper/` for:
143
+ - `\includegraphics{path}` — figures
144
+ - `\input{path}` — tables or sub-documents
145
+ - `\include{path}` — chapters
146
+
147
+ Match these paths to script outputs. Build a reverse map: for each figure/table in the paper, which script(s) produce it?
148
+
149
+ ### Phase 5: Write pipeline.md
150
+
151
+ Write `pipeline.md` to the project root using the format below.
152
+
153
+ ### Phase 6 (Add Headers Mode Only): Insert Headers
154
+
155
+ For scripts missing structured headers:
156
+ 1. Generate the header from Phase 2 analysis
157
+ 2. Show the proposed header to the user
158
+ 3. On confirmation, insert at the top of the file (after any shebang line or encoding declaration)
159
+
160
+ ## pipeline.md Format
161
+
162
+ ```markdown
163
+ # Pipeline Manifest
164
+
165
+ > Auto-generated by `/pipeline-manifest` on YYYY-MM-DD.
166
+ > Manually edit the PAPER column and any inferred values that are wrong.
167
+ > Re-run `/pipeline-manifest` to refresh after adding or modifying scripts.
168
+
169
+ ## Pipeline Table
170
+
171
+ | # | Script | Purpose | Inputs | Outputs | Depends | Paper |
172
+ |---|--------|---------|--------|---------|---------|-------|
173
+ | 1 | `code/01_clean.R` | Clean raw survey data | `data/raw/survey.csv` | `data/processed/survey_clean.rds` | none | -- |
174
+ | 2 | `code/02_merge.R` | Merge survey with admin data | `data/processed/survey_clean.rds`, `data/raw/admin.csv` | `data/processed/merged.rds` | `01_clean.R` | -- |
175
+ | 3 | `code/03_analysis.R` | Run main regressions | `data/processed/merged.rds` | `results/main_results.rds`, `paper/figures/fig_coef.pdf` | `02_merge.R` | Figure 2 |
176
+ | 4 | `code/04_robustness.py` | Robustness checks | `data/processed/merged.rds` | `results/robustness.csv`, `paper/figures/fig_robust.pdf` | `02_merge.R` | Figure 3, Table A1 |
177
+
178
+ ## Figure & Table Manifest
179
+
180
+ | Paper Reference | Producing Script | Output File |
181
+ |----------------|-----------------|-------------|
182
+ | Figure 2 | `code/03_analysis.R` | `paper/figures/fig_coef.pdf` |
183
+ | Figure 3 | `code/04_robustness.py` | `paper/figures/fig_robust.pdf` |
184
+ | Table A1 | `code/04_robustness.py` | `results/robustness.csv` |
185
+
186
+ ## Dependency Graph
187
+
188
+ ```
189
+ data/raw/survey.csv ─┐
190
+ ├─> 01_clean.R ─> data/processed/survey_clean.rds ─┐
191
+ data/raw/admin.csv ──┘ ├─> 02_merge.R ─> data/processed/merged.rds ─┬─> 03_analysis.R
192
+ │ └─> 04_robustness.py
193
+ ```
194
+
195
+ ## Diagnostics
196
+
197
+ ### Orphan Scripts
198
+ Scripts whose outputs are not consumed by any other script or the paper.
199
+
200
+ ### Missing Inputs
201
+ Files referenced as inputs but not produced by any script and not found in `data/raw/`.
202
+
203
+ ### Execution Order
204
+ Recommended order based on dependency resolution:
205
+ 1. `code/01_clean.R`
206
+ 2. `code/02_merge.R`
207
+ 3. `code/03_analysis.R`
208
+ 4. `code/04_robustness.py` (can run in parallel with step 3)
209
+ ```
210
+
211
+ ## Updating an Existing pipeline.md
212
+
213
+ If `pipeline.md` already exists:
214
+
215
+ 1. Read it and parse the existing table
216
+ 2. Re-scan scripts (some may have been added, removed, or modified)
217
+ 3. **Preserve manual edits** — if the user has edited the PAPER column or added notes, keep those values. Only update fields that can be re-derived from code (PURPOSE, INPUTS, OUTPUTS, DEPENDS).
218
+ 4. Flag changes: "2 scripts added, 1 script removed, 3 entries updated"
219
+ 5. Write the updated file
220
+
221
+ ## Cross-References
222
+
223
+ - **`/code-review`** — Quality review for individual scripts (checks header presence in Category 2: Script Structure)
224
+ - **`/code-archaeology`** — For understanding unfamiliar code before building the manifest
225
+ - **`/pre-submission-report`** — Pipeline manifest helps verify the replication package is complete
226
+ - **`/init-project-research`** — New projects can run `/pipeline-manifest` once scripts exist