@bohuyeshan/openagent-labforge-core 3.11.2 → 3.11.3

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 (226) hide show
  1. package/README.ja.md +34 -27
  2. package/README.ko.md +34 -27
  3. package/README.md +245 -188
  4. package/README.ru.md +28 -21
  5. package/README.zh-cn.md +245 -188
  6. package/bin/platform.test.ts +21 -20
  7. package/dist/agents/atlas/default.d.ts +1 -1
  8. package/dist/agents/atlas/gemini.d.ts +1 -1
  9. package/dist/agents/atlas/gpt.d.ts +1 -1
  10. package/dist/agents/bio-methodologist.d.ts +1 -1
  11. package/dist/agents/bio-pipeline-operator.d.ts +1 -1
  12. package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
  13. package/dist/agents/dynamic-agent-prompt-builder.d.ts +2 -0
  14. package/dist/agents/env-context.d.ts +1 -1
  15. package/dist/agents/index.d.ts +1 -0
  16. package/dist/agents/metis.d.ts +1 -1
  17. package/dist/agents/prometheus/gemini.d.ts +1 -1
  18. package/dist/agents/prometheus/gpt.d.ts +1 -1
  19. package/dist/agents/prometheus/interview-mode.d.ts +1 -1
  20. package/dist/agents/prometheus/plan-generation.d.ts +1 -1
  21. package/dist/agents/prometheus/plan-template.d.ts +1 -1
  22. package/dist/agents/prometheus/system-prompt.d.ts +1 -1
  23. package/dist/agents/types.d.ts +1 -1
  24. package/dist/cli/config-manager/bun-install.d.ts +6 -1
  25. package/dist/cli/config-manager/plugin-name-with-version.d.ts +1 -1
  26. package/dist/cli/doctor/constants.d.ts +1 -1
  27. package/dist/cli/index.js +763 -467
  28. package/dist/cli/install-validators.d.ts +1 -0
  29. package/dist/cli/model-fallback-types.d.ts +1 -0
  30. package/dist/cli/openai-only-model-catalog.d.ts +3 -0
  31. package/dist/cli/run/index.d.ts +1 -0
  32. package/dist/cli/run/model-resolver.d.ts +4 -0
  33. package/dist/cli/run/types.d.ts +1 -0
  34. package/dist/cli/types.d.ts +3 -0
  35. package/dist/config/schema/agent-names.d.ts +3 -1
  36. package/dist/config/schema/background-task.d.ts +2 -0
  37. package/dist/config/schema/git-env-prefix.d.ts +5 -0
  38. package/dist/config/schema/git-master.d.ts +1 -0
  39. package/dist/config/schema/hooks.d.ts +2 -0
  40. package/dist/config/schema/oh-my-opencode-config.d.ts +54 -1
  41. package/dist/config/schema.d.ts +1 -0
  42. package/dist/create-hooks.d.ts +13 -0
  43. package/dist/features/background-agent/compaction-aware-message-resolver.d.ts +16 -1
  44. package/dist/features/background-agent/constants.d.ts +1 -1
  45. package/dist/features/background-agent/manager.d.ts +20 -4
  46. package/dist/features/background-agent/process-cleanup.d.ts +1 -1
  47. package/dist/features/background-agent/remove-task-toast-tracking.d.ts +1 -0
  48. package/dist/features/background-agent/subagent-spawn-limits.d.ts +23 -0
  49. package/dist/features/background-agent/task-history.d.ts +1 -0
  50. package/dist/features/background-agent/task-poller.d.ts +1 -0
  51. package/dist/features/background-agent/types.d.ts +4 -0
  52. package/dist/features/claude-code-agent-loader/claude-model-mapper.d.ts +4 -0
  53. package/dist/features/claude-code-agent-loader/loader.d.ts +3 -3
  54. package/dist/features/claude-code-agent-loader/types.d.ts +8 -1
  55. package/dist/features/claude-code-plugin-loader/agent-loader.d.ts +2 -2
  56. package/dist/features/claude-code-plugin-loader/loader.d.ts +2 -2
  57. package/dist/features/claude-code-plugin-loader/types.d.ts +1 -1
  58. package/dist/features/opencode-skill-loader/git-master-template-injection.d.ts +1 -1
  59. package/dist/features/skill-mcp-manager/types.d.ts +4 -0
  60. package/dist/features/tmux-subagent/index.d.ts +1 -0
  61. package/dist/features/tmux-subagent/manager.d.ts +5 -0
  62. package/dist/features/tmux-subagent/pane-state-parser.d.ts +8 -0
  63. package/dist/features/tmux-subagent/tracked-session-state.d.ts +8 -0
  64. package/dist/features/tmux-subagent/types.d.ts +2 -0
  65. package/dist/hooks/atlas/boulder-session-lineage.d.ts +6 -0
  66. package/dist/hooks/atlas/final-wave-approval-gate.d.ts +4 -0
  67. package/dist/hooks/atlas/idle-event.d.ts +8 -0
  68. package/dist/hooks/atlas/resolve-active-boulder-session.d.ts +11 -0
  69. package/dist/hooks/atlas/tool-execute-after.d.ts +2 -0
  70. package/dist/hooks/atlas/types.d.ts +2 -0
  71. package/dist/hooks/atlas/verification-reminders.d.ts +4 -0
  72. package/dist/hooks/auto-slash-command/hook.d.ts +7 -0
  73. package/dist/hooks/auto-slash-command/processed-command-store.d.ts +7 -0
  74. package/dist/hooks/auto-update-checker/checker/sync-package-json.d.ts +7 -0
  75. package/dist/hooks/auto-update-checker/checker.d.ts +3 -1
  76. package/dist/hooks/auto-update-checker/constants.d.ts +2 -2
  77. package/dist/hooks/comment-checker/downloader.d.ts +1 -1
  78. package/dist/hooks/compaction-context-injector/compaction-context-prompt.d.ts +1 -0
  79. package/dist/hooks/compaction-context-injector/constants.d.ts +5 -0
  80. package/dist/hooks/compaction-context-injector/hook.d.ts +5 -1
  81. package/dist/hooks/compaction-context-injector/recovery-prompt-config.d.ts +6 -0
  82. package/dist/hooks/compaction-context-injector/recovery.d.ts +6 -0
  83. package/dist/hooks/compaction-context-injector/session-id.d.ts +2 -0
  84. package/dist/hooks/compaction-context-injector/session-prompt-config-resolver.d.ts +16 -0
  85. package/dist/hooks/compaction-context-injector/tail-monitor.d.ts +13 -0
  86. package/dist/hooks/compaction-context-injector/types.d.ts +43 -0
  87. package/dist/hooks/compaction-context-injector/validated-model.d.ts +13 -0
  88. package/dist/hooks/context-window-monitor.d.ts +2 -5
  89. package/dist/hooks/delegate-task-english-directive/hook.d.ts +14 -0
  90. package/dist/hooks/delegate-task-english-directive/index.d.ts +1 -0
  91. package/dist/hooks/gpt-permission-continuation/assistant-message.d.ts +23 -0
  92. package/dist/hooks/gpt-permission-continuation/constants.d.ts +4 -0
  93. package/dist/hooks/gpt-permission-continuation/detector.d.ts +1 -0
  94. package/dist/hooks/gpt-permission-continuation/handler.d.ts +12 -0
  95. package/dist/hooks/gpt-permission-continuation/index.d.ts +13 -0
  96. package/dist/hooks/gpt-permission-continuation/session-state.d.ts +15 -0
  97. package/dist/hooks/index.d.ts +2 -0
  98. package/dist/hooks/keyword-detector/hook.d.ts +1 -0
  99. package/dist/hooks/preemptive-compaction.d.ts +2 -5
  100. package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +16 -0
  101. package/dist/hooks/runtime-fallback/fallback-bootstrap-model.d.ts +10 -0
  102. package/dist/hooks/runtime-fallback/fallback-retry-dispatcher.d.ts +11 -0
  103. package/dist/hooks/runtime-fallback/hook.d.ts +2 -3
  104. package/dist/hooks/runtime-fallback/last-user-retry-parts.d.ts +4 -0
  105. package/dist/hooks/runtime-fallback/message-update-handler.d.ts +1 -2
  106. package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +7 -0
  107. package/dist/hooks/runtime-fallback/session-messages.d.ts +9 -0
  108. package/dist/hooks/runtime-fallback/session-status-handler.d.ts +3 -0
  109. package/dist/hooks/runtime-fallback/types.d.ts +57 -3
  110. package/dist/hooks/runtime-fallback/visible-assistant-response.d.ts +3 -0
  111. package/dist/hooks/session-notification-content.d.ts +30 -0
  112. package/dist/hooks/session-notification-scheduler.d.ts +5 -3
  113. package/dist/hooks/session-notification.d.ts +2 -0
  114. package/dist/hooks/start-work/index.d.ts +1 -1
  115. package/dist/hooks/start-work/worktree-detector.d.ts +7 -0
  116. package/dist/hooks/todo-continuation-enforcer/constants.d.ts +6 -2
  117. package/dist/hooks/todo-continuation-enforcer/handler.d.ts +1 -0
  118. package/dist/hooks/todo-continuation-enforcer/idle-event.d.ts +1 -0
  119. package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +10 -1
  120. package/dist/hooks/todo-continuation-enforcer/stagnation-detection.d.ts +6 -0
  121. package/dist/hooks/todo-continuation-enforcer/types.d.ts +5 -0
  122. package/dist/hooks/tool-output-truncator.d.ts +1 -0
  123. package/dist/index.d.ts +2 -2
  124. package/dist/index.js +10577 -7241
  125. package/dist/openagent-labforge.schema.json +70 -4
  126. package/dist/plugin/hooks/create-continuation-hooks.d.ts +2 -1
  127. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
  128. package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
  129. package/dist/plugin/normalize-tool-arg-schemas.d.ts +2 -0
  130. package/dist/plugin/ultrawork-model-override.d.ts +1 -15
  131. package/dist/plugin/ultrawork-variant-availability.d.ts +6 -0
  132. package/dist/plugin-dispose.d.ts +10 -0
  133. package/dist/plugin-handlers/agent-override-protection.d.ts +3 -0
  134. package/dist/plugin-state.d.ts +5 -0
  135. package/dist/shared/compaction-agent-config-checkpoint.d.ts +11 -0
  136. package/dist/shared/context-limit-resolver.d.ts +5 -0
  137. package/dist/shared/data-path.d.ts +2 -2
  138. package/dist/shared/dynamic-truncator.d.ts +4 -7
  139. package/dist/shared/external-plugin-detector.d.ts +1 -1
  140. package/dist/shared/fallback-chain-from-models.d.ts +3 -0
  141. package/dist/shared/index.d.ts +3 -0
  142. package/dist/shared/model-error-classifier.d.ts +2 -1
  143. package/dist/shared/opencode-command-dirs.d.ts +3 -0
  144. package/dist/shared/plugin-identity.d.ts +7 -0
  145. package/dist/shared/question-denied-session-permission.d.ts +6 -0
  146. package/dist/shared/retry-status-utils.d.ts +2 -0
  147. package/dist/shared/system-directive.d.ts +6 -5
  148. package/dist/shared/vision-capable-models-cache.d.ts +4 -0
  149. package/dist/tools/call-omo-agent/background-executor.d.ts +2 -1
  150. package/dist/tools/call-omo-agent/constants.d.ts +1 -1
  151. package/dist/tools/call-omo-agent/sync-executor.d.ts +11 -3
  152. package/dist/tools/call-omo-agent/tools.d.ts +2 -1
  153. package/dist/tools/delegate-task/cancel-unstable-agent-task.d.ts +2 -0
  154. package/dist/tools/delegate-task/model-selection.d.ts +1 -0
  155. package/dist/tools/delegate-task/model-string-parser.d.ts +1 -3
  156. package/dist/tools/look-at/multimodal-fallback-chain.d.ts +4 -0
  157. package/dist/tools/lsp/constants.d.ts +1 -0
  158. package/dist/tools/lsp/directory-diagnostics.d.ts +1 -0
  159. package/dist/tools/lsp/lsp-client-transport.d.ts +4 -2
  160. package/dist/tools/lsp/lsp-client-wrapper.d.ts +2 -1
  161. package/dist/tools/lsp/server-path-bases.d.ts +1 -0
  162. package/generated/skills-bundles/catalog.json +282 -39
  163. package/generated/skills-bundles/full/INDEX.md +38 -10
  164. package/generated/skills-bundles/full/skills/data-analysis/experiment-monitoring/auto-claude__monitor-experiment/SKILL.md +63 -0
  165. package/generated/skills-bundles/full/skills/data-analysis/experiment-ops/auto-claude__run-experiment/SKILL.md +112 -0
  166. package/generated/skills-bundles/full/skills/data-analysis/optimization/auto-claude__dse-loop/SKILL.md +279 -0
  167. package/generated/skills-bundles/full/skills/data-analysis/statistics/auto-claude__analyze-results/SKILL.md +47 -0
  168. package/generated/skills-bundles/full/skills/data-analysis/visualization/auto-claude__paper-figure/SKILL.md +281 -0
  169. package/generated/skills-bundles/full/skills/productivity/communication/auto-claude__feishu-notify/SKILL.md +154 -0
  170. package/generated/skills-bundles/full/skills/productivity/visual-design/auto-claude__pixel-art/SKILL.md +138 -0
  171. package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-compile/SKILL.md +252 -0
  172. package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-plan/SKILL.md +254 -0
  173. package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/SKILL.md +310 -0
  174. package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/iclr2026.tex +84 -0
  175. package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/icml2025.tex +87 -0
  176. package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/math_commands.tex +48 -0
  177. package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/neurips2025.tex +80 -0
  178. package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-writing/SKILL.md +255 -0
  179. package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__arxiv/SKILL.md +133 -0
  180. package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__novelty-check/SKILL.md +87 -0
  181. package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__research-lit/SKILL.md +194 -0
  182. package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-creator/SKILL.md +228 -0
  183. package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-discovery/SKILL.md +186 -0
  184. package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-discovery-robot/SKILL.md +351 -0
  185. package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__research-pipeline/SKILL.md +174 -0
  186. package/generated/skills-bundles/full/skills/research/theory-writing/auto-claude__proof-writer/SKILL.md +224 -0
  187. package/generated/skills-bundles/paper/INDEX.md +40 -0
  188. package/generated/skills-bundles/paper/skills/data-analysis/experiment-monitoring/auto-claude__monitor-experiment/SKILL.md +63 -0
  189. package/generated/skills-bundles/paper/skills/data-analysis/experiment-ops/auto-claude__run-experiment/SKILL.md +112 -0
  190. package/generated/skills-bundles/paper/skills/data-analysis/optimization/auto-claude__dse-loop/SKILL.md +279 -0
  191. package/generated/skills-bundles/paper/skills/data-analysis/statistics/auto-claude__analyze-results/SKILL.md +47 -0
  192. package/generated/skills-bundles/paper/skills/data-analysis/visualization/auto-claude__paper-figure/SKILL.md +281 -0
  193. package/generated/skills-bundles/paper/skills/productivity/communication/auto-claude__feishu-notify/SKILL.md +154 -0
  194. package/generated/skills-bundles/paper/skills/productivity/visual-design/auto-claude__pixel-art/SKILL.md +138 -0
  195. package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-compile/SKILL.md +252 -0
  196. package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-plan/SKILL.md +254 -0
  197. package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/SKILL.md +310 -0
  198. package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/iclr2026.tex +84 -0
  199. package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/icml2025.tex +87 -0
  200. package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/math_commands.tex +48 -0
  201. package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/neurips2025.tex +80 -0
  202. package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-writing/SKILL.md +255 -0
  203. package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__arxiv/SKILL.md +133 -0
  204. package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__novelty-check/SKILL.md +87 -0
  205. package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__research-lit/SKILL.md +194 -0
  206. package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-creator/SKILL.md +228 -0
  207. package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-discovery/SKILL.md +186 -0
  208. package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-discovery-robot/SKILL.md +351 -0
  209. package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__research-pipeline/SKILL.md +174 -0
  210. package/generated/skills-bundles/paper/skills/research/theory-writing/auto-claude__proof-writer/SKILL.md +224 -0
  211. package/package.json +21 -21
  212. package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/LICENSE.txt +0 -21
  213. package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/SKILL.md +0 -615
  214. package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/_meta.json +0 -11
  215. package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/scripts/virtualbox-utils.ts +0 -586
  216. package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/.clawhubsafe +0 -0
  217. package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/LICENSE +0 -21
  218. package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/README.md +0 -127
  219. package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/SECURITY.md +0 -68
  220. package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/SKILL.md +0 -141
  221. package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/_meta.json +0 -11
  222. package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/scripts/speak.sh +0 -52
  223. package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/scripts/transcribe.sh +0 -50
  224. package/generated/skills-bundles/full/skills/research/media-search/skills-main__youtube-search/LICENSE.txt +0 -21
  225. package/generated/skills-bundles/full/skills/research/media-search/skills-main__youtube-search/SKILL.md +0 -416
  226. package/generated/skills-bundles/full/skills/research/media-search/skills-main__youtube-search/_meta.json +0 -11
@@ -0,0 +1,252 @@
1
+ ---
2
+ name: "auto-claude/paper-compile"
3
+ description: "Compile LaTeX paper to PDF, fix errors, and verify output. Use when user says \"编译论文\", \"compile paper\", \"build PDF\", \"生成PDF\", or wants to compile LaTeX into a submission-ready PDF."
4
+ argument-hint: ["paper-directory"]
5
+ allowed-tools: "Bash(*), Read, Write, Edit, Grep, Glob"
6
+ metadata:
7
+ category: "research/document-authoring"
8
+ ---
9
+ # Paper Compile: LaTeX to Submission-Ready PDF
10
+
11
+ Compile the LaTeX paper and fix any issues: **$ARGUMENTS**
12
+
13
+ ## Constants
14
+
15
+ - **COMPILER = `latexmk`** — LaTeX build tool. Handles multi-pass compilation automatically.
16
+ - **ENGINE = `pdflatex`** — LaTeX engine. Options: `pdflatex` (default), `xelatex` (for CJK/custom fonts), `lualatex`.
17
+ - **MAX_COMPILE_ATTEMPTS = 3** — Maximum attempts to fix errors and recompile.
18
+ - **PAPER_DIR = `paper/`** — Directory containing LaTeX source files.
19
+ - **MAX_PAGES** — Main body page limit (to end of Conclusion, excluding references & appendix). ICLR=9, NeurIPS=9, ICML=8.
20
+
21
+ ## Workflow
22
+
23
+ ### Step 1: Verify Prerequisites
24
+
25
+ Check that the compilation environment is ready:
26
+
27
+ ```bash
28
+ # Check LaTeX installation
29
+ which pdflatex && which latexmk && which bibtex
30
+
31
+ # If not installed, provide instructions:
32
+ # macOS: brew install --cask mactex-no-gui
33
+ # Ubuntu: sudo apt-get install texlive-full
34
+ # Server: conda install -c conda-forge texlive-core
35
+ ```
36
+
37
+ Verify all required files exist:
38
+
39
+ ```bash
40
+ # Must exist
41
+ ls $PAPER_DIR/main.tex
42
+
43
+ # Should exist
44
+ ls $PAPER_DIR/references.bib
45
+ ls $PAPER_DIR/sections/*.tex
46
+ ls $PAPER_DIR/figures/*.pdf 2>/dev/null || ls $PAPER_DIR/figures/*.png 2>/dev/null
47
+ ```
48
+
49
+ ### Step 2: First Compilation Attempt
50
+
51
+ ```bash
52
+ cd $PAPER_DIR
53
+
54
+ # Clean previous build artifacts
55
+ latexmk -C
56
+
57
+ # Full compilation (pdflatex + bibtex + pdflatex × 2)
58
+ latexmk -pdf -interaction=nonstopmode -halt-on-error main.tex 2>&1 | tee compile.log
59
+ ```
60
+
61
+ ### Step 3: Error Diagnosis and Auto-Fix
62
+
63
+ If compilation fails, read `compile.log` and fix common errors:
64
+
65
+ **Missing packages:**
66
+ ```
67
+ ! LaTeX Error: File `somepackage.sty' not found.
68
+ ```
69
+ → Install via `tlmgr install somepackage` or remove the `\usepackage` if unused.
70
+
71
+ **Undefined references:**
72
+ ```
73
+ LaTeX Warning: Reference `fig:xyz' on page 3 undefined
74
+ ```
75
+ → Check `\label{fig:xyz}` exists in the correct figure environment.
76
+
77
+ **Missing figures:**
78
+ ```
79
+ ! LaTeX Error: File `figures/fig1.pdf' not found.
80
+ ```
81
+ → Check if the file exists with a different extension (.png vs .pdf). Update the `\includegraphics` path.
82
+
83
+ **Citation undefined:**
84
+ ```
85
+ LaTeX Warning: Citation `smith2024' undefined
86
+ ```
87
+ → Add the missing entry to `references.bib` or fix the citation key.
88
+
89
+ **`[VERIFY]` markers in text:**
90
+ → Search for `[VERIFY]` markers left by `/paper-write`. These indicate unverified citations or facts. Search for the correct information or flag to the user.
91
+
92
+ **Overfull hbox:**
93
+ ```
94
+ Overfull \hbox (12.5pt too wide) in paragraph at lines 42--45
95
+ ```
96
+ → Minor: usually ignorable. If severe (>20pt), rephrase the text or adjust figure width.
97
+
98
+ **BibTeX errors:**
99
+ ```
100
+ I was expecting a `,' or a `}'---line 15 of references.bib
101
+ ```
102
+ → Fix BibTeX syntax (missing comma, unmatched braces, special characters in title).
103
+
104
+ **`\crefname` undefined for custom theorem types:**
105
+ → Ensure `\crefname{assumption}{Assumption}{Assumptions}` and similar are in the preamble after `\newtheorem{assumption}`.
106
+
107
+ ### Step 4: Iterative Fix Loop
108
+
109
+ ```
110
+ for attempt in 1..MAX_COMPILE_ATTEMPTS:
111
+ compile()
112
+ if success:
113
+ break
114
+ parse_errors()
115
+ auto_fix()
116
+ ```
117
+
118
+ For each error:
119
+ 1. Read the error message from `compile.log`
120
+ 2. Locate the source file and line number
121
+ 3. Apply the fix
122
+ 4. Recompile
123
+
124
+ ### Step 5: Post-Compilation Checks
125
+
126
+ After successful compilation, verify the output:
127
+
128
+ ```bash
129
+ # Check PDF exists and has content
130
+ ls -la main.pdf
131
+ # Check page count
132
+ pdfinfo main.pdf | grep Pages
133
+
134
+ # macOS: open for visual inspection
135
+ # open main.pdf
136
+ ```
137
+
138
+ **Automated checks:**
139
+
140
+ - [ ] PDF file exists and is > 100KB (not empty/corrupt)
141
+ - [ ] Total page count is reasonable (MAX_PAGES + appendix + references)
142
+ - [ ] No "??" in the PDF (undefined references — grep the log)
143
+ - [ ] No "[?]" in the PDF (undefined citations — grep the log)
144
+ - [ ] Figures are rendered (not missing image placeholders)
145
+
146
+ ```bash
147
+ # Check for undefined references
148
+ grep -c "LaTeX Warning.*undefined" compile.log
149
+
150
+ # Check for missing citations
151
+ grep -c "Citation.*undefined" compile.log
152
+ ```
153
+
154
+ ### Step 6: Page Count Verification
155
+
156
+ **CRITICAL**: Verify main body fits within MAX_PAGES.
157
+
158
+ Main body = first page through end of Conclusion section (not necessarily §5 — could be §6, §7, or §8 depending on structure).
159
+ References and appendix are NOT counted.
160
+
161
+ **Precise check using `pdftotext`:**
162
+ ```bash
163
+ # Extract text and find where Conclusion ends vs References begin
164
+ pdftotext main.pdf - | python3 -c "
165
+ import sys
166
+ text = sys.stdin.read()
167
+ pages = text.split('\f')
168
+ for i, page in enumerate(pages):
169
+ if 'Ethics Statement' in page or 'Reproducibility' in page:
170
+ print(f'Conclusion ends on page {i+1}')
171
+ if any(w in page for w in ['References', 'Bibliography']):
172
+ lines = [l for l in page.split('\n') if l.strip()]
173
+ for l in lines[:3]:
174
+ if 'References' in l or 'Bibliography' in l:
175
+ print(f'References start on page {i+1}')
176
+ break
177
+ "
178
+ ```
179
+
180
+ If Conclusion ends mid-page and References start on the same page, the main body is that page number (e.g., if both are on page 9, main body = ~8.5 pages, which is fine for a 9-page limit since it leaves room for the References header).
181
+
182
+ If over limit:
183
+ - Identify which sections are longest
184
+ - Suggest specific cuts (move proofs to appendix, compress tables, tighten writing)
185
+ - Report: "Main body is X pages (limit: MAX_PAGES). Suggestion: move [specific content] to appendix."
186
+
187
+ ### Step 6.5: Stale File Detection
188
+
189
+ Check for orphaned section files not referenced by `main.tex`:
190
+
191
+ ```bash
192
+ # Find all .tex files in sections/ and check which are \input'ed by main.tex
193
+ for f in paper/sections/*.tex; do
194
+ base=$(basename "$f")
195
+ if ! grep -q "$base" paper/main.tex; then
196
+ echo "WARNING: $f is not referenced by main.tex — consider removing"
197
+ fi
198
+ done
199
+ ```
200
+
201
+ This prevents confusion from leftover files when section structure changes (e.g., old `5_conclusion.tex` left behind after restructuring to 7 sections).
202
+
203
+ ### Step 7: Submission Readiness
204
+
205
+ For conference submission, additional checks:
206
+
207
+ - [ ] **Anonymous**: no author names, affiliations, or self-citations that reveal identity
208
+ - [ ] **Page limit**: main body within MAX_PAGES (to end of Conclusion)
209
+ - [ ] **Font embedding**: all fonts embedded in PDF
210
+ ```bash
211
+ pdffonts main.pdf | grep -v "yes" # should return nothing (or only header)
212
+ ```
213
+ - [ ] **No supplementary mixed in**: appendix clearly after `\newpage\appendix`
214
+ - [ ] **File size**: reasonable (< 50MB for most venues, < 10MB preferred)
215
+ - [ ] **No `[VERIFY]` markers**: search the PDF text for leftover markers
216
+
217
+ ### Step 8: Output Summary
218
+
219
+ ```markdown
220
+ ## Compilation Report
221
+
222
+ - **Status**: SUCCESS / FAILED
223
+ - **PDF**: paper/main.pdf
224
+ - **Pages**: X (main body to Conclusion) + Y (references) + Z (appendix)
225
+ - **Within page limit**: YES/NO (MAX_PAGES = N)
226
+ - **Errors fixed**: [list of auto-fixed issues]
227
+ - **Warnings remaining**: [list of non-critical warnings]
228
+ - **Undefined references**: 0
229
+ - **Undefined citations**: 0
230
+
231
+ ### Next Steps
232
+ - [ ] Visual inspection of PDF
233
+ - [ ] Run `/paper-write` to fix any content issues
234
+ - [ ] Submit to [venue] via OpenReview / CMT / HotCRP
235
+ ```
236
+
237
+ ## Key Rules
238
+
239
+ - **Never delete the user's source files** — only modify to fix errors
240
+ - **Keep compile.log** — useful for debugging
241
+ - **Don't suppress warnings** — report them, let the user decide
242
+ - **If LaTeX is not installed**, provide clear installation instructions rather than failing silently
243
+ - **Font embedding is critical** — some venues reject PDFs with non-embedded fonts
244
+ - **Page count = main body to Conclusion** — this is the metric that matters for submission
245
+
246
+ ## Common Venue Requirements
247
+
248
+ | Venue | Style File | Citation | Page Limit (main body) | Submission |
249
+ |-------|-----------|----------|------------------------|------------|
250
+ | ICLR 2026 | `iclr2026_conference.sty` | `natbib` (`\citep`/`\citet`) | 9 pages (to Conclusion end) | OpenReview |
251
+ | NeurIPS 2025 | `neurips_2025.sty` | `natbib` (`\citep`/`\citet`) | 9 pages (to Conclusion end) | OpenReview |
252
+ | ICML 2025 | `icml2025.sty` | `natbib` (`\citep`/`\citet`) | 8 pages (to Conclusion end) | OpenReview |
@@ -0,0 +1,254 @@
1
+ ---
2
+ name: "auto-claude/paper-plan"
3
+ description: "Generate a structured paper outline from review conclusions and experiment results. Use when user says \"写大纲\", \"paper outline\", \"plan the paper\", \"论文规划\", or wants to create a paper plan before writing."
4
+ argument-hint: ["topic-or-narrative-doc"]
5
+ allowed-tools: "Bash(*), Read, Write, Edit, Grep, Glob, Agent, WebSearch, WebFetch, mcp__codex__codex, mcp__codex__codex-reply"
6
+ metadata:
7
+ category: "research/document-authoring"
8
+ ---
9
+ # Paper Plan: From Review Conclusions to Paper Outline
10
+
11
+ Generate a structured, section-by-section paper outline from: **$ARGUMENTS**
12
+
13
+ ## Constants
14
+
15
+ - **REVIEWER_MODEL = `gpt-5.4`** — Model used via Codex MCP for outline review. Must be an OpenAI model.
16
+ - **TARGET_VENUE = `ICLR`** — Default venue. User can override (e.g., `/paper-plan "topic" — venue: NeurIPS`). Supported: `ICLR`, `NeurIPS`, `ICML`.
17
+ - **MAX_PAGES** — Main body page limit, measured from first page to end of Conclusion section (excluding references, appendix, and acknowledgements). ICLR=9, NeurIPS=9, ICML=8.
18
+
19
+ ## Inputs
20
+
21
+ The skill expects one or more of these in the project directory:
22
+
23
+ 1. **NARRATIVE_REPORT.md** or **STORY.md** — research narrative with claims and evidence
24
+ 2. **Experiment results** — JSON files in `figures/`, screen logs, tables
25
+ 3. **IDEA_REPORT.md** — from idea-discovery pipeline (if applicable)
26
+
27
+ If none exist, ask the user to describe the paper's contribution in 3-5 sentences.
28
+
29
+ ## Workflow
30
+
31
+ ### Step 1: Extract Claims and Evidence
32
+
33
+ Read all available narrative documents and extract:
34
+
35
+ 1. **Core claims** (3-5 main contributions)
36
+ 2. **Evidence** for each claim (which experiments, which metrics, which figures)
37
+ 3. **Known weaknesses** (from reviewer feedback)
38
+ 4. **Suggested framing** (from review conclusions)
39
+
40
+ Build a **Claims-Evidence Matrix**:
41
+
42
+ ```markdown
43
+ | Claim | Evidence | Status | Section |
44
+ |-------|----------|--------|---------|
45
+ | [claim 1] | [exp A, metric B] | Supported | §3.2 |
46
+ | [claim 2] | [exp C] | Partially supported | §4.1 |
47
+ ```
48
+
49
+ ### Step 2: Determine Paper Type and Structure
50
+
51
+ Based on TARGET_VENUE and paper content, classify and select structure.
52
+
53
+ **IMPORTANT**: The section count is FLEXIBLE (5-8 sections). Choose what fits the content best. The templates below are starting points, not rigid constraints.
54
+
55
+ **Empirical/Diagnostic paper:**
56
+ ```
57
+ 1. Introduction (1.5 pages)
58
+ 2. Related Work (1 page)
59
+ 3. Method / Setup (1.5 pages)
60
+ 4. Experiments (3 pages)
61
+ 5. Analysis / Discussion (1 page)
62
+ 6. Conclusion (0.5 pages)
63
+ ```
64
+
65
+ **Theory + Experiments paper:**
66
+ ```
67
+ 1. Introduction (1.5 pages)
68
+ 2. Related Work (1 page)
69
+ 3. Preliminaries & Modeling (1.5 pages)
70
+ 4. Experiments (1.5 pages)
71
+ 5. Theory Part A (1.5 pages)
72
+ 6. Theory Part B (1.5 pages)
73
+ 7. Conclusion (0.5 pages)
74
+ — Total: 9 pages
75
+ ```
76
+ Theory papers often need 7 sections (splitting theory into estimation + optimization, or setup + analysis). The total page budget MUST sum to MAX_PAGES.
77
+
78
+ Theory papers should:
79
+ - Include **proof sketch** locations (not just theorem statements)
80
+ - Plan a **comparison table** of prior theoretical bounds vs. this paper's bounds
81
+ - Identify which proofs go in appendix vs. main body
82
+
83
+ **Method paper:**
84
+ ```
85
+ 1. Introduction (1.5 pages)
86
+ 2. Related Work (1 page)
87
+ 3. Method (2 pages)
88
+ 4. Experiments (2.5 pages)
89
+ 5. Ablation / Analysis (1 page)
90
+ 6. Conclusion (0.5 pages)
91
+ ```
92
+
93
+ ### Step 3: Section-by-Section Planning
94
+
95
+ For each section, specify:
96
+
97
+ ```markdown
98
+ ### §0 Abstract
99
+ - **One-sentence problem**: [what gap this paper addresses]
100
+ - **Approach**: [what we do, in one sentence]
101
+ - **Key result**: [most compelling quantitative finding]
102
+ - **Implication**: [why it matters]
103
+ - **Estimated length**: 150-250 words
104
+ - **Self-contained check**: can a reader understand this without the paper?
105
+
106
+ ### §1 Introduction
107
+ - **Opening hook**: [1-2 sentences that motivate the problem]
108
+ - **Gap**: [what's missing in prior work]
109
+ - **Key questions**: [the research questions this paper answers]
110
+ - **Contributions**: [numbered list, matching Claims-Evidence Matrix]
111
+ - **Hero figure**: [describe what Figure 1 should show — MUST include clear comparison if applicable]
112
+ - **Estimated length**: 1.5 pages
113
+ - **Key citations**: [3-5 papers to cite here]
114
+
115
+ ### §2 Related Work
116
+ - **Subtopics**: [2-4 categories of related work]
117
+ - **Positioning**: [how this paper differs from each category]
118
+ - **Minimum length**: 1 full page (at least 3-4 paragraphs with substantive synthesis)
119
+ - **Must NOT be just a list** — synthesize, compare, and position
120
+
121
+ ### §3 Method / Setup / Preliminaries
122
+ - **Notation**: [key symbols and their meanings]
123
+ - **Problem formulation**: [formal setup]
124
+ - **Method description**: [algorithm, model, or experimental design]
125
+ - **Formal statements**: [theorems, propositions if applicable]
126
+ - **Proof sketch locations**: [which key steps appear here vs. appendix]
127
+ - **Estimated length**: 1.5-2 pages
128
+
129
+ ### §4 Experiments / Main Results
130
+ - **Figures planned**:
131
+ - Fig 1: [description, type: bar/line/table/architecture, WHAT COMPARISON it shows]
132
+ - Fig 2: [description]
133
+ - Table 1: [what it shows, which methods/baselines compared]
134
+ - **Data source**: [which JSON files / experiment results]
135
+
136
+ ### §5 Conclusion
137
+ - **Restatement**: [contributions rephrased, not copy-pasted from intro]
138
+ - **Limitations**: [honest assessment — reviewers value this]
139
+ - **Future work**: [1-2 concrete directions]
140
+ - **Estimated length**: 0.5 pages
141
+ ```
142
+
143
+ ### Step 4: Figure Plan
144
+
145
+ List every figure and table:
146
+
147
+ ```markdown
148
+ ## Figure Plan
149
+
150
+ | ID | Type | Description | Data Source | Priority |
151
+ |----|------|-------------|-------------|----------|
152
+ | Fig 1 | Hero/Architecture | System overview + comparison | manual | HIGH |
153
+ | Fig 2 | Line plot | Training curves comparison | figures/exp_A.json | HIGH |
154
+ | Fig 3 | Bar chart | Ablation results | figures/ablation.json | MEDIUM |
155
+ | Table 1 | Comparison table | Main results vs. baselines | figures/main_results.json | HIGH |
156
+ | Table 2 | Theory comparison | Prior bounds vs. ours | manual | HIGH (theory papers) |
157
+ ```
158
+
159
+ **CRITICAL for Figure 1 / Hero Figure**: Describe in detail what the figure should contain, including:
160
+ - Which methods are being compared
161
+ - What the visual difference should demonstrate
162
+ - Caption draft that clearly states the comparison
163
+
164
+ ### Step 5: Citation Scaffolding
165
+
166
+ For each section, list required citations:
167
+
168
+ ```markdown
169
+ ## Citation Plan
170
+ - §1 Intro: [paper1], [paper2], [paper3] (problem motivation)
171
+ - §2 Related: [paper4]-[paper10] (categorized by subtopic)
172
+ - §3 Method: [paper11] (baseline), [paper12] (technique we build on)
173
+ ```
174
+
175
+ **Citation rules** (from claude-scholar + Imbad0202/academic-research-skills):
176
+ 1. NEVER generate BibTeX from memory — always verify via search or existing .bib files
177
+ 2. Every citation must be verified: correct authors, year, venue
178
+ 3. Flag any citation you're unsure about with `[VERIFY]`
179
+ 4. Prefer published versions over arXiv preprints when available
180
+
181
+ ### Step 6: Cross-Review with REVIEWER_MODEL
182
+
183
+ Send the complete outline to GPT-5.4 xhigh for feedback:
184
+
185
+ ```
186
+ mcp__codex__codex:
187
+ model: gpt-5.4
188
+ config: {"model_reasoning_effort": "xhigh"}
189
+ prompt: |
190
+ Review this paper outline for a [VENUE] submission.
191
+ [full outline including Claims-Evidence Matrix]
192
+
193
+ Score 1-10 on:
194
+ 1. Logical flow — does the story build naturally?
195
+ 2. Claim-evidence alignment — every claim backed?
196
+ 3. Missing experiments or analysis
197
+ 4. Positioning relative to prior work
198
+ 5. Page budget feasibility (MAX_PAGES = main body to Conclusion end, excluding refs/appendix)
199
+
200
+ For each weakness, suggest the MINIMUM fix.
201
+ Be specific and actionable — "add X" not "consider more experiments".
202
+ ```
203
+
204
+ Apply feedback before finalizing.
205
+
206
+ ### Step 7: Output
207
+
208
+ Save the final outline to `PAPER_PLAN.md` in the project root:
209
+
210
+ ```markdown
211
+ # Paper Plan
212
+
213
+ **Title**: [working title]
214
+ **Venue**: [target venue]
215
+ **Type**: [empirical/theory/method]
216
+ **Date**: [today]
217
+ **Page budget**: [MAX_PAGES] pages (main body to Conclusion end, excluding references & appendix)
218
+ **Section count**: [N] (must match the number of section files that will be created)
219
+
220
+ ## Claims-Evidence Matrix
221
+ [from Step 1]
222
+
223
+ ## Structure
224
+ [from Step 2-3, section by section]
225
+
226
+ ## Figure Plan
227
+ [from Step 4, with detailed hero figure description]
228
+
229
+ ## Citation Plan
230
+ [from Step 5]
231
+
232
+ ## Reviewer Feedback
233
+ [from Step 6, summarized]
234
+
235
+ ## Next Steps
236
+ - [ ] /paper-figure to generate all figures
237
+ - [ ] /paper-write to draft LaTeX
238
+ - [ ] /paper-compile to build PDF
239
+ ```
240
+
241
+ ## Key Rules
242
+
243
+ - **Do NOT generate author information** — leave author block as placeholder or anonymous
244
+ - **Be honest about evidence gaps** — mark claims as "needs experiment" rather than overclaiming
245
+ - **Page budget is hard** — if content exceeds MAX_PAGES, suggest what to move to appendix
246
+ - **MAX_PAGES counts main body only** — from first page to end of Conclusion. References and appendix are NOT counted.
247
+ - **Venue-specific norms** — all three venues (ICLR/NeurIPS/ICML) use `natbib` (`\citep`/`\citet`)
248
+ - **Claims-Evidence Matrix is the backbone** — every claim must map to evidence, every experiment must support a claim
249
+ - **Figures need detailed descriptions** — especially the hero figure, which must clearly specify comparisons and visual expectations
250
+ - **Section count is flexible** — 5-8 sections depending on paper type. Don't force content into a rigid 5-section template.
251
+
252
+ ## Acknowledgements
253
+
254
+ Outline methodology inspired by [Research-Paper-Writing-Skills](https://github.com/Master-cai/Research-Paper-Writing-Skills) (claim-evidence mapping), [claude-scholar](https://github.com/Galaxy-Dawn/claude-scholar) (citation verification), and [Imbad0202/academic-research-skills](https://github.com/Imbad0202/academic-research-skills) (claim verification protocol).