@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,281 @@
1
+ ---
2
+ name: "auto-claude/paper-figure"
3
+ description: "Generate publication-quality figures and tables from experiment results. Use when user says \"画图\", \"作图\", \"generate figures\", \"paper figures\", or needs plots for a paper."
4
+ argument-hint: ["figure-plan-or-data-path"]
5
+ allowed-tools: "Bash(*), Read, Write, Edit, Grep, Glob, Agent, mcp__codex__codex, mcp__codex__codex-reply"
6
+ metadata:
7
+ category: "data-analysis/visualization"
8
+ ---
9
+ # Paper Figure: Publication-Quality Plots from Experiment Data
10
+
11
+ Generate all figures and tables for a paper based on: **$ARGUMENTS**
12
+
13
+ ## Scope: What This Skill Can and Cannot Do
14
+
15
+ | Category | Can auto-generate? | Examples |
16
+ |----------|-------------------|----------|
17
+ | **Data-driven plots** | ✅ Yes | Line plots (training curves), bar charts (method comparison), scatter plots, heatmaps, box/violin plots |
18
+ | **Comparison tables** | ✅ Yes | LaTeX tables comparing prior bounds, method features, ablation results |
19
+ | **Multi-panel figures** | ✅ Yes | Subfigure grids combining multiple plots (e.g., 3×3 dataset × method) |
20
+ | **Architecture/pipeline diagrams** | ❌ No — manual | Model architecture, data flow diagrams, system overviews. At best can generate a rough TikZ skeleton, but **expect to draw these yourself** using tools like draw.io, Figma, or TikZ |
21
+ | **Generated image grids** | ❌ No — manual | Grids of generated samples (e.g., GAN/diffusion outputs). These come from running your model, not from this skill |
22
+ | **Photographs / screenshots** | ❌ No — manual | Real-world images, UI screenshots, qualitative examples |
23
+
24
+ **In practice:** For a typical ML paper, this skill handles ~60% of figures (all data plots + tables). The remaining ~40% (hero figure, architecture diagram, qualitative results) need to be created manually and placed in `figures/` before running `/paper-write`. The skill will detect these as "existing figures" and preserve them.
25
+
26
+ ## Constants
27
+
28
+ - **STYLE = `publication`** — Visual style preset. Options: `publication` (default, clean for print), `poster` (larger fonts), `slide` (bold colors)
29
+ - **DPI = 300** — Output resolution
30
+ - **FORMAT = `pdf`** — Output format. Options: `pdf` (vector, best for LaTeX), `png` (raster fallback)
31
+ - **COLOR_PALETTE = `tab10`** — Default matplotlib color cycle. Options: `tab10`, `Set2`, `colorblind` (deuteranopia-safe)
32
+ - **FONT_SIZE = 10** — Base font size (matches typical conference body text)
33
+ - **FIG_DIR = `figures/`** — Output directory for generated figures
34
+ - **REVIEWER_MODEL = `gpt-5.4`** — Model used via Codex MCP for figure quality review.
35
+
36
+ ## Inputs
37
+
38
+ 1. **PAPER_PLAN.md** — figure plan table (from `/paper-plan`)
39
+ 2. **Experiment data** — JSON files, CSV files, or screen logs in `figures/` or project root
40
+ 3. **Existing figures** — any manually created figures to preserve
41
+
42
+ If no PAPER_PLAN.md exists, scan for data files and ask the user which figures to generate.
43
+
44
+ ## Workflow
45
+
46
+ ### Step 1: Read Figure Plan
47
+
48
+ Parse the Figure Plan table from PAPER_PLAN.md:
49
+
50
+ ```markdown
51
+ | ID | Type | Description | Data Source | Priority |
52
+ |----|------|-------------|-------------|----------|
53
+ | Fig 1 | Architecture | ... | manual | HIGH |
54
+ | Fig 2 | Line plot | ... | figures/exp.json | HIGH |
55
+ ```
56
+
57
+ Identify:
58
+ - Which figures can be auto-generated from data
59
+ - Which need manual creation (architecture diagrams, etc.)
60
+ - Which are comparison tables (generate as LaTeX)
61
+
62
+ ### Step 2: Set Up Plotting Environment
63
+
64
+ Create a shared style configuration script:
65
+
66
+ ```python
67
+ # paper_plot_style.py — shared across all figure scripts
68
+ import matplotlib.pyplot as plt
69
+ import matplotlib
70
+ matplotlib.rcParams.update({
71
+ 'font.size': FONT_SIZE,
72
+ 'font.family': 'serif',
73
+ 'font.serif': ['Times New Roman', 'Times', 'DejaVu Serif'],
74
+ 'axes.labelsize': FONT_SIZE,
75
+ 'axes.titlesize': FONT_SIZE + 1,
76
+ 'xtick.labelsize': FONT_SIZE - 1,
77
+ 'ytick.labelsize': FONT_SIZE - 1,
78
+ 'legend.fontsize': FONT_SIZE - 1,
79
+ 'figure.dpi': DPI,
80
+ 'savefig.dpi': DPI,
81
+ 'savefig.bbox': 'tight',
82
+ 'savefig.pad_inches': 0.05,
83
+ 'axes.grid': False,
84
+ 'axes.spines.top': False,
85
+ 'axes.spines.right': False,
86
+ 'text.usetex': False, # set True if LaTeX is available
87
+ 'mathtext.fontset': 'stix',
88
+ })
89
+
90
+ # Color palette
91
+ COLORS = plt.cm.tab10.colors # or Set2, or colorblind-safe
92
+
93
+ def save_fig(fig, name, fmt=FORMAT):
94
+ """Save figure to FIG_DIR with consistent naming."""
95
+ fig.savefig(f'{FIG_DIR}/{name}.{fmt}')
96
+ print(f'Saved: {FIG_DIR}/{name}.{fmt}')
97
+ ```
98
+
99
+ ### Step 3: Auto-Select Figure Type
100
+
101
+ Use this decision tree for data-driven figures (inspired by Imbad0202/academic-research-skills):
102
+
103
+ | Data Pattern | Recommended Type | Size |
104
+ |-------------|-----------------|------|
105
+ | X=time/steps, Y=metric | Line plot | 0.48\textwidth |
106
+ | Methods × 1 metric | Bar chart | 0.48\textwidth |
107
+ | Methods × multiple metrics | Grouped bar / radar | 0.95\textwidth |
108
+ | Two continuous variables | Scatter plot | 0.48\textwidth |
109
+ | Matrix / grid values | Heatmap | 0.48\textwidth |
110
+ | Distribution comparison | Box/violin plot | 0.48\textwidth |
111
+ | Multi-dataset results | Multi-panel (subfigure) | 0.95\textwidth |
112
+ | Prior work comparison | LaTeX table | — |
113
+
114
+ ### Step 4: Generate Each Figure
115
+
116
+ For each figure in the plan, create a standalone Python script:
117
+
118
+ **Line plots** (training curves, scaling):
119
+ ```python
120
+ # gen_fig2_training_curves.py
121
+ from paper_plot_style import *
122
+ import json
123
+
124
+ with open('figures/exp_results.json') as f:
125
+ data = json.load(f)
126
+
127
+ fig, ax = plt.subplots(1, 1, figsize=(5, 3.5))
128
+ ax.plot(data['steps'], data['fac_loss'], label='Factorized', color=COLORS[0])
129
+ ax.plot(data['steps'], data['crf_loss'], label='CRF-LR', color=COLORS[1])
130
+ ax.set_xlabel('Training Steps')
131
+ ax.set_ylabel('Cross-Entropy Loss')
132
+ ax.legend(frameon=False)
133
+ save_fig(fig, 'fig2_training_curves')
134
+ ```
135
+
136
+ **Bar charts** (comparison, ablation):
137
+ ```python
138
+ fig, ax = plt.subplots(1, 1, figsize=(5, 3))
139
+ methods = ['Baseline', 'Method A', 'Method B', 'Ours']
140
+ values = [82.3, 85.1, 86.7, 89.2]
141
+ bars = ax.bar(methods, values, color=[COLORS[i] for i in range(len(methods))])
142
+ ax.set_ylabel('Accuracy (%)')
143
+ # Add value labels on bars
144
+ for bar, val in zip(bars, values):
145
+ ax.text(bar.get_x() + bar.get_width()/2, bar.get_height() + 0.3,
146
+ f'{val:.1f}', ha='center', va='bottom', fontsize=FONT_SIZE-1)
147
+ save_fig(fig, 'fig3_comparison')
148
+ ```
149
+
150
+ **Comparison tables** (LaTeX, for theory papers):
151
+ ```latex
152
+ \begin{table}[t]
153
+ \centering
154
+ \caption{Comparison of estimation error bounds. $n$: sample size, $D$: ambient dim, $d$: latent dim, $K$: subspaces, $n_k$: modes.}
155
+ \label{tab:bounds}
156
+ \begin{tabular}{lccc}
157
+ \toprule
158
+ Method & Rate & Depends on $D$? & Multi-modal? \\
159
+ \midrule
160
+ \citet{MinimaxOkoAS23} & $n^{-s'/D}$ & Yes (curse) & No \\
161
+ \citet{ScoreMatchingdistributionrecovery} & $n^{-2/d}$ & No & No \\
162
+ \textbf{Ours} & $\sqrt{\sum n_k d_k / n}$ & No & Yes \\
163
+ \bottomrule
164
+ \end{tabular}
165
+ \end{table}
166
+ ```
167
+
168
+ **Architecture/pipeline diagrams** (MANUAL — outside this skill's scope):
169
+ - These require manual creation using draw.io, Figma, Keynote, or TikZ
170
+ - This skill can generate a rough TikZ skeleton as a starting point, but **do not expect publication-quality results**
171
+ - If the figure already exists in `figures/`, preserve it and generate only the LaTeX `\includegraphics` snippet
172
+ - Flag as `[MANUAL]` in the figure plan and `latex_includes.tex`
173
+
174
+ ### Step 5: Run All Scripts
175
+
176
+ ```bash
177
+ # Run all figure generation scripts
178
+ for script in gen_fig*.py; do
179
+ python "$script"
180
+ done
181
+ ```
182
+
183
+ Verify all output files exist and are non-empty.
184
+
185
+ ### Step 6: Generate LaTeX Include Snippets
186
+
187
+ For each figure, output the LaTeX code to include it:
188
+
189
+ ```latex
190
+ % === Fig 2: Training Curves ===
191
+ \begin{figure}[t]
192
+ \centering
193
+ \includegraphics[width=0.48\textwidth]{figures/fig2_training_curves.pdf}
194
+ \caption{Training curves comparing factorized and CRF-LR denoising.}
195
+ \label{fig:training_curves}
196
+ \end{figure}
197
+ ```
198
+
199
+ Save all snippets to `figures/latex_includes.tex` for easy copy-paste into the paper.
200
+
201
+ ### Step 7: Figure Quality Review with REVIEWER_MODEL
202
+
203
+ Send figure descriptions and captions to GPT-5.4 for review:
204
+
205
+ ```
206
+ mcp__codex__codex:
207
+ model: gpt-5.4
208
+ config: {"model_reasoning_effort": "xhigh"}
209
+ prompt: |
210
+ Review these figure/table plans for a [VENUE] submission.
211
+
212
+ For each figure:
213
+ 1. Is the caption informative and self-contained?
214
+ 2. Does the figure type match the data being shown?
215
+ 3. Is the comparison fair and clear?
216
+ 4. Any missing baselines or ablations?
217
+ 5. Would a different visualization be more effective?
218
+
219
+ [list all figures with captions and descriptions]
220
+ ```
221
+
222
+ ### Step 8: Quality Checklist
223
+
224
+ Before finishing, verify each figure (from pedrohcgs/claude-code-my-workflow):
225
+
226
+ - [ ] Font size readable at printed paper size (not too small)
227
+ - [ ] Colors distinguishable in grayscale (print-friendly)
228
+ - [ ] **No title inside figures** — titles go only in LaTeX `\caption{}` (from pedrohcgs)
229
+ - [ ] Legend does not overlap data
230
+ - [ ] Axis labels have units where applicable
231
+ - [ ] Axis labels are publication-quality (not variable names like `emp_rate`)
232
+ - [ ] Figure width fits single column (0.48\textwidth) or full width (0.95\textwidth)
233
+ - [ ] PDF output is vector (not rasterized text)
234
+ - [ ] No matplotlib default title (remove `plt.title` for publications)
235
+ - [ ] Serif font matches paper body text (Times / Computer Modern)
236
+ - [ ] Colorblind-accessible (if using colorblind palette)
237
+
238
+ ## Output
239
+
240
+ ```
241
+ figures/
242
+ ├── paper_plot_style.py # shared style config
243
+ ├── gen_fig1_architecture.py # per-figure scripts
244
+ ├── gen_fig2_training_curves.py
245
+ ├── gen_fig3_comparison.py
246
+ ├── fig1_architecture.pdf # generated figures
247
+ ├── fig2_training_curves.pdf
248
+ ├── fig3_comparison.pdf
249
+ ├── latex_includes.tex # LaTeX snippets for all figures
250
+ └── TABLE_*.tex # standalone table LaTeX files
251
+ ```
252
+
253
+ ## Key Rules
254
+
255
+ - **Every figure must be reproducible** — save the generation script alongside the output
256
+ - **Do NOT hardcode data** — always read from JSON/CSV files
257
+ - **Use vector format (PDF)** for all plots — PNG only as fallback
258
+ - **No decorative elements** — no background colors, no 3D effects, no chart junk
259
+ - **Consistent style across all figures** — same fonts, colors, line widths
260
+ - **Colorblind-safe** — verify with https://davidmathlogic.com/colorblind/ if needed
261
+ - **One script per figure** — easy to re-run individual figures when data changes
262
+ - **No titles inside figures** — captions are in LaTeX only
263
+ - **Comparison tables count as figures** — generate them as standalone .tex files
264
+
265
+ ## Figure Type Reference
266
+
267
+ | Type | When to Use | Typical Size |
268
+ |------|------------|--------------|
269
+ | Line plot | Training curves, scaling trends | 0.48\textwidth |
270
+ | Bar chart | Method comparison, ablation | 0.48\textwidth |
271
+ | Grouped bar | Multi-metric comparison | 0.95\textwidth |
272
+ | Scatter plot | Correlation analysis | 0.48\textwidth |
273
+ | Heatmap | Attention, confusion matrix | 0.48\textwidth |
274
+ | Box/violin | Distribution comparison | 0.48\textwidth |
275
+ | Architecture | System overview | 0.95\textwidth |
276
+ | Multi-panel | Combined results (subfigures) | 0.95\textwidth |
277
+ | Comparison table | Prior bounds vs. ours (theory) | full width |
278
+
279
+ ## Acknowledgements
280
+
281
+ Design pattern (type × style matrix) inspired by [baoyu-skills](https://github.com/jimliu/baoyu-skills). Publication style defaults and figure rules from [pedrohcgs/claude-code-my-workflow](https://github.com/pedrohcgs/claude-code-my-workflow). Visualization decision tree from [Imbad0202/academic-research-skills](https://github.com/Imbad0202/academic-research-skills).
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: "auto-claude/feishu-notify"
3
+ description: "Send notifications to Feishu/Lark. Internal utility used by other skills, or manually via /feishu-notify. Supports push-only (webhook) and interactive (bidirectional) modes. Use when user says \"发飞书\", \"notify feishu\", or other skills need to send status updates."
4
+ argument-hint: ["message-text"]
5
+ allowed-tools: "Bash(curl *), Bash(cat *), Read, Glob"
6
+ metadata:
7
+ category: "productivity/communication"
8
+ ---
9
+
10
+ # Feishu/Lark Notification
11
+
12
+ Send a notification: **$ARGUMENTS**
13
+
14
+ ## Overview
15
+
16
+ This skill provides Feishu/Lark integration for ARIS. It is designed as an **internal utility** — other skills call it at key events (experiment done, review scored, checkpoint waiting). It can also be invoked manually.
17
+
18
+ **Zero-impact guarantee**: If no `feishu.json` config exists, this skill does nothing and returns silently. All existing workflows are completely unaffected.
19
+
20
+ ## Configuration
21
+
22
+ The skill reads `~/.claude/feishu.json`. If this file does not exist, **all Feishu functionality is disabled** — skills behave exactly as before.
23
+
24
+ ### Config Format
25
+
26
+ ```json
27
+ {
28
+ "mode": "push",
29
+ "webhook_url": "https://open.feishu.cn/open-apis/bot/v2/hook/YOUR_WEBHOOK_ID",
30
+ "interactive": {
31
+ "bridge_url": "http://localhost:5000",
32
+ "timeout_seconds": 300
33
+ }
34
+ }
35
+ ```
36
+
37
+ ### Modes
38
+
39
+ | Mode | `"mode"` value | What it does | Requires |
40
+ |------|----------------|--------------|----------|
41
+ | **Off** | `"off"` or file absent | Nothing. Pure CLI as-is | Nothing |
42
+ | **Push only** | `"push"` | Send webhook notifications at key events. Mobile push, no reply | Feishu bot webhook URL |
43
+ | **Interactive** | `"interactive"` | Full bidirectional. Approve/reject from Feishu, reply to checkpoints | [feishu-claude-code](https://github.com/joewongjc/feishu-claude-code) running |
44
+
45
+ ## Workflow
46
+
47
+ ### Step 1: Read Config
48
+
49
+ ```bash
50
+ cat ~/.claude/feishu.json 2>/dev/null
51
+ ```
52
+
53
+ - **File not found** → return silently, do nothing
54
+ - **`"mode": "off"`** → return silently, do nothing
55
+ - **`"mode": "push"`** → proceed to Step 2 (push)
56
+ - **`"mode": "interactive"`** → proceed to Step 3 (interactive)
57
+
58
+ ### Step 2: Push Notification (webhook)
59
+
60
+ Send a rich card to the Feishu webhook:
61
+
62
+ ```bash
63
+ curl -s -X POST "$WEBHOOK_URL" \
64
+ -H "Content-Type: application/json" \
65
+ -d '{
66
+ "msg_type": "interactive",
67
+ "card": {
68
+ "header": {
69
+ "title": {"tag": "plain_text", "content": "TITLE"},
70
+ "template": "COLOR"
71
+ },
72
+ "elements": [
73
+ {"tag": "markdown", "content": "BODY"}
74
+ ]
75
+ }
76
+ }'
77
+ ```
78
+
79
+ **Card templates by event type:**
80
+
81
+ | Event | Title | Color | Body |
82
+ |-------|-------|-------|------|
83
+ | `experiment_done` | Experiment Complete | `green` | Results table, delta vs baseline |
84
+ | `review_scored` | Review Round N: X/10 | `blue` (≥6) / `orange` (<6) | Score, verdict, top 3 weaknesses |
85
+ | `checkpoint` | Checkpoint: Waiting for Input | `yellow` | Question, options, context |
86
+ | `error` | Error: [type] | `red` | Error message, what failed |
87
+ | `pipeline_done` | Pipeline Complete | `purple` | Final summary, deliverables |
88
+ | `custom` | Custom | `blue` | Free-form message from $ARGUMENTS |
89
+
90
+ **Return immediately after curl** — push mode never waits for a response.
91
+
92
+ ### Step 3: Interactive Notification (bidirectional)
93
+
94
+ Interactive mode uses [feishu-claude-code](https://github.com/joewongjc/feishu-claude-code) as a bridge:
95
+
96
+ 1. **Send message** to the bridge:
97
+ ```bash
98
+ curl -s -X POST "$BRIDGE_URL/send" \
99
+ -H "Content-Type: application/json" \
100
+ -d '{"type": "EVENT_TYPE", "title": "TITLE", "body": "BODY", "options": ["approve", "reject", "custom"]}'
101
+ ```
102
+
103
+ 2. **Wait for reply** (with timeout):
104
+ ```bash
105
+ curl -s "$BRIDGE_URL/poll?timeout=$TIMEOUT_SECONDS"
106
+ ```
107
+ Returns: `{"reply": "approve"}` or `{"reply": "reject"}` or `{"reply": "user typed message"}` or `{"timeout": true}`
108
+
109
+ 3. **On timeout**: Fall back to `AUTO_PROCEED` behavior (proceed with default option).
110
+
111
+ 4. **Return the user's reply** to the calling skill so it can act on it.
112
+
113
+ ### Step 4: Verify Delivery
114
+
115
+ - **Push mode**: Check curl exit code. If non-zero, log warning but do NOT block the workflow.
116
+ - **Interactive mode**: If bridge is unreachable, fall back to push mode (if webhook configured) or skip silently.
117
+
118
+ ## Helper Function (for other skills)
119
+
120
+ Other skills should use this pattern to send notifications:
121
+
122
+ ```markdown
123
+ ### Feishu Notification (if configured)
124
+
125
+ Check if `~/.claude/feishu.json` exists and mode is not "off":
126
+ - If **push** mode: send webhook notification with event summary
127
+ - If **interactive** mode: send notification and wait for user reply
128
+ - If **off** or file absent: skip entirely (no-op)
129
+ ```
130
+
131
+ **This check is always guarded.** If the config file doesn't exist, the skill skips the notification block entirely — zero overhead, zero side effects.
132
+
133
+ ## Event Catalog
134
+
135
+ Skills send these events at these moments:
136
+
137
+ | Skill | Event | When |
138
+ |-------|-------|------|
139
+ | `/run-experiment` | `experiment_done` | Screen session finishes |
140
+ | `/idea-discovery` | `checkpoint` | Between phases (if interactive) |
141
+ | `/idea-discovery` | `pipeline_done` | Final report ready |
142
+ | `/monitor-experiment` | `experiment_done` | Results collected |
143
+ | `/research-pipeline` | `checkpoint` | Between workflow stages |
144
+ | `/research-pipeline` | `pipeline_done` | Full pipeline complete |
145
+
146
+ ## Key Rules
147
+
148
+ - **NEVER block a workflow** because Feishu is unreachable. Always fail open.
149
+ - **NEVER require Feishu config** — all skills must work without it.
150
+ - **Config file absent = mode off.** No error, no warning, no log.
151
+ - **Push mode is fire-and-forget.** Send curl, check exit code, move on.
152
+ - **Interactive timeout = auto-proceed.** Don't hang forever waiting for a reply.
153
+ - **Respect `AUTO_PROCEED`**: In interactive mode, if the user doesn't reply within timeout, use the same auto-proceed logic as the calling skill.
154
+ - **No secrets in notifications.** Never include API keys, tokens, or passwords in Feishu messages.
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: "auto-claude/pixel-art"
3
+ description: "Generate pixel art SVG illustrations for READMEs, docs, or slides. Use when user says \"画像素图\", \"pixel art\", \"make an SVG illustration\", \"README hero image\", or wants a cute visual."
4
+ argument-hint: ["description of what to draw"]
5
+ allowed-tools: "Write, Edit, Read, Bash(open *)"
6
+ metadata:
7
+ category: "productivity/visual-design"
8
+ ---
9
+ # Pixel Art SVG Generator
10
+
11
+ Create a pixel art SVG illustration: $ARGUMENTS
12
+
13
+ ## Design Principles
14
+
15
+ ### Pixel Grid
16
+ - Each "pixel" is a `<rect>` with width/height of 7px
17
+ - Grid spacing: 7px (no gaps between pixels)
18
+ - Characters are typically 8-10 pixels wide, 8-12 pixels tall
19
+ - Use `<g transform="translate(x,y)">` to position and reuse character groups
20
+
21
+ ### Color Palette
22
+ Keep it simple — 3-5 colors per character:
23
+ - **Skin**: `#FFDAB9` (light), `#E8967A` / `#D4956A` (blush/shadow)
24
+ - **Eyes**: `#333`
25
+ - **Hair**: `#8B5E3C` (brown), `#2C2C2C` (black), `#FFD700` (blonde), `#C0392B` (red)
26
+ - **Clothes**: use project's brand color (e.g. `#4A9EDA` for blue, `#74AA63` for green)
27
+ - **Shoes/pants**: `#444`
28
+ - **Accessories**: `#555` (glasses frames), `#FFD700` (crown)
29
+
30
+ ### Character Template (7px grid)
31
+ ```
32
+ Row 0 (hair top): 4 pixels centered
33
+ Row 1 (hair): 6 pixels wide
34
+ Row 2 (face top): 6 pixels — all skin
35
+ Row 3 (eyes): 6 pixels — skin, eye, skin, skin, eye, skin
36
+ Row 4 (mouth): 6 pixels — skin, skin, mouth, mouth, skin, skin
37
+ Row 5 (body top): 8 pixels — hand, 6 shirt, hand
38
+ Row 6 (body): 6 pixels — all shirt
39
+ Row 7 (legs): 2+2 pixels — with gap in middle
40
+ ```
41
+
42
+ ### Scene Composition
43
+
44
+ #### Chat Dialogue Layout (like our hero image)
45
+ - Two characters on left/right sides, vertically centered
46
+ - Chat bubbles between them, alternating left/right
47
+ - Bubble tails point toward the speaking character
48
+ - Arrows between bubbles show direction of communication
49
+ - Use `orient="auto"` markers for arrow heads
50
+ - Bottom: tagline or decoration
51
+
52
+ #### Single Character with Label
53
+ - Character centered
54
+ - Label text below
55
+ - Optional: speech bubble above
56
+
57
+ #### Group Scene
58
+ - Characters spaced evenly
59
+ - Optional: ground line, background elements
60
+ - Keep viewBox tight — no wasted space
61
+
62
+ ### SVG Structure
63
+ ```xml
64
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 W H" font-family="monospace">
65
+ <defs>
66
+ <!-- Arrow markers if needed -->
67
+ </defs>
68
+
69
+ <rect width="W" height="H" fill="#fafbfc" rx="12"/> <!-- Background -->
70
+
71
+ <!-- Characters via <g transform="translate(...)"> -->
72
+ <!-- Dialogue bubbles: <rect> + <polygon> tail + <text> -->
73
+ <!-- Arrows: <line> with marker-end -->
74
+ <!-- Labels: <text> with text-anchor="middle" -->
75
+ </svg>
76
+ ```
77
+
78
+ ### Chat Bubble Recipe
79
+ ```xml
80
+ <!-- Blue bubble (left character speaks) -->
81
+ <rect x="110" y="29" width="280" height="26" fill="#e8f4fd" stroke="#4a9eda" stroke-width="1.5" rx="8"/>
82
+ <!-- Tail pointing left toward character -->
83
+ <polygon points="108,41 99,47 108,46" fill="#e8f4fd" stroke="#4a9eda" stroke-width="1.5"/>
84
+ <rect x="107" y="40" width="3" height="7" fill="#e8f4fd"/> <!-- covers stroke at junction -->
85
+ <text x="123" y="46" font-size="13px">📄 Message here</text>
86
+
87
+ <!-- Orange bubble (right character responds) -->
88
+ <rect x="490" y="71" width="280" height="26" fill="#fdf2e8" stroke="#da8a4a" stroke-width="1.5" rx="8"/>
89
+ <!-- Tail pointing right toward character -->
90
+ <polygon points="772,83 781,89 772,88" fill="#fdf2e8" stroke="#da8a4a" stroke-width="1.5"/>
91
+ <rect x="770" y="82" width="3" height="7" fill="#fdf2e8"/>
92
+ <text x="503" y="88" font-size="13px">🤔 Response here</text>
93
+ ```
94
+
95
+ ### Arrow Recipe
96
+ ```xml
97
+ <defs>
98
+ <marker id="ar" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto">
99
+ <polygon points="0 0, 8 3, 0 6" fill="#4a9eda"/>
100
+ </marker>
101
+ </defs>
102
+ <!-- Right arrow (→): x1 < x2 -->
103
+ <line x1="392" y1="42" x2="465" y2="42" stroke="#4a9eda" stroke-width="2" marker-end="url(#ar)"/>
104
+ <!-- Left arrow (←): x1 > x2 -->
105
+ <line x1="488" y1="84" x2="420" y2="84" stroke="#da8a4a" stroke-width="2" marker-end="url(#ar-o)"/>
106
+ ```
107
+
108
+ ## Workflow
109
+
110
+ ### Step 1: Understand the Request
111
+ - What characters/objects to draw?
112
+ - What's the scene? (dialogue, portrait, group, diagram)
113
+ - What colors/brand to match?
114
+ - What size? (compact for badge, wide for README hero)
115
+
116
+ ### Step 2: Generate SVG
117
+ - Write to a temp file or project directory
118
+ - Open with `open <file.svg>` for preview
119
+ - Keep viewBox tight — measure actual content bounds
120
+
121
+ ### Step 3: Iterate with User
122
+ - User provides feedback on screenshot
123
+ - Common fixes: overlap, arrow direction, spacing, sizing
124
+ - Use `Edit` for small tweaks, `Write` for major redesigns
125
+ - Typical: 2-4 iterations to get it right
126
+
127
+ ### Step 4: Finalize
128
+ - Ensure no personal info in the SVG
129
+ - Clean up: remove unused defs, tighten viewBox
130
+ - Suggest adding to README: `![Alt text](filename.svg)`
131
+
132
+ ## Common Pitfalls
133
+ - **Arrow direction**: `orient="auto"` follows line direction. Line going right→left = arrowhead points left
134
+ - **Bubble overlap**: keep 38-44px vertical spacing between rows
135
+ - **Text overflow**: monospace 13px ≈ 7.8px/char, emoji ≈ 14px. Measure before setting bubble width
136
+ - **Character overlap with bubbles**: keep character x-zone and bubble x-zone separated by ≥10px
137
+ - **viewBox too large**: match viewBox to actual content, add ~10px padding
138
+ - **Tail stroke artifact**: always add a small `<rect>` at the bubble-tail junction to cover the stroke line