@research-copilot/plugin 1.1.17 → 1.1.18

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 (799) hide show
  1. package/dist/.claude-plugin/plugin.json +1 -1
  2. package/dist/.codex-plugin/plugin.toml +1 -1
  3. package/dist/.cursor-plugin/plugin.json +1 -1
  4. package/dist/.gemini-plugin/plugin.json +1 -1
  5. package/dist/.opencode-plugin/plugin.json +1 -1
  6. package/dist/.windsurf-plugin/plugin.json +1 -1
  7. package/dist/skills/ablation-planner/SKILL.md +126 -0
  8. package/dist/skills/alphaxiv/SKILL.md +186 -0
  9. package/dist/skills/analyze-results/SKILL.md +45 -0
  10. package/dist/skills/arxiv/SKILL.md +210 -0
  11. package/dist/skills/auto-paper-improvement-loop/SKILL.md +574 -0
  12. package/dist/skills/auto-review-loop/SKILL.md +370 -0
  13. package/dist/skills/auto-review-loop-llm/SKILL.md +247 -0
  14. package/dist/skills/auto-review-loop-minimax/SKILL.md +290 -0
  15. package/dist/skills/benchmark-paper-template/SKILL.md +142 -0
  16. package/dist/skills/benchmark-paper-template/references/benchmark-design.md +180 -0
  17. package/dist/skills/benchmark-paper-template/references/checklist.md +113 -0
  18. package/dist/skills/benchmark-paper-template/references/construction-pipeline.md +127 -0
  19. package/dist/skills/benchmark-paper-template/references/experiments.md +159 -0
  20. package/dist/skills/benchmark-paper-template/references/gap-analysis.md +86 -0
  21. package/dist/skills/benchmark-paper-template/references/instantiation-template.md +194 -0
  22. package/dist/skills/benchmark-paper-template/references/orchestrator-notes.md +96 -0
  23. package/dist/skills/benchmark-paper-template/references/paper-structure.md +209 -0
  24. package/dist/skills/citation-audit/SKILL.md +494 -0
  25. package/dist/skills/claims-drafting/SKILL.md +239 -0
  26. package/dist/skills/comm-lit-review/SKILL.md +299 -0
  27. package/dist/skills/comm-lit-review/references/domain-taxonomy.md +57 -0
  28. package/dist/skills/comm-lit-review/references/output-template.md +37 -0
  29. package/dist/skills/comm-lit-review/references/source-policy.md +99 -0
  30. package/dist/skills/comm-lit-review/references/venue-tiering.md +112 -0
  31. package/dist/skills/composer/SKILL.md +840 -0
  32. package/dist/skills/composer/references/section_guides.md +675 -0
  33. package/dist/skills/composer/references/writing_standards.md +629 -0
  34. package/dist/skills/composer/scripts/chapter_quality_check.py +470 -0
  35. package/dist/skills/composer/scripts/final_evaluation.py +550 -0
  36. package/dist/skills/deepxiv/SKILL.md +142 -0
  37. package/dist/skills/dse-loop/SKILL.md +277 -0
  38. package/dist/skills/embodiment-description/SKILL.md +129 -0
  39. package/dist/skills/exa-search/SKILL.md +192 -0
  40. package/dist/skills/experiment-audit/SKILL.md +262 -0
  41. package/dist/skills/experiment-bridge/SKILL.md +316 -0
  42. package/dist/skills/experiment-plan/SKILL.md +249 -0
  43. package/dist/skills/experiment-queue/SKILL.md +380 -0
  44. package/dist/skills/experiment-queue/scripts/build_manifest.py +142 -0
  45. package/dist/skills/experiment-queue/scripts/queue_manager.py +426 -0
  46. package/dist/skills/feishu-notify/SKILL.md +155 -0
  47. package/dist/skills/figure-description/SKILL.md +138 -0
  48. package/dist/skills/figure-designer/SKILL.md +207 -0
  49. package/dist/skills/figure-designer/references/design-rules.md +99 -0
  50. package/dist/skills/figure-designer/references/experimental-results.md +127 -0
  51. package/dist/skills/figure-designer/references/motivated-example.md +138 -0
  52. package/dist/skills/figure-designer/references/solution-overview.md +145 -0
  53. package/dist/skills/figure-designer/references/tools.md +124 -0
  54. package/dist/skills/figure-spec/SKILL.md +252 -0
  55. package/dist/skills/figure-spec/scripts/figure_renderer.py +799 -0
  56. package/dist/skills/formula-derivation/SKILL.md +280 -0
  57. package/dist/skills/gemini-search/SKILL.md +205 -0
  58. package/dist/skills/grant-proposal/SKILL.md +625 -0
  59. package/dist/skills/humanizer/AGENTS.md +25 -0
  60. package/dist/skills/humanizer/SKILL.md +621 -0
  61. package/dist/skills/idea-creator/SKILL.md +311 -0
  62. package/dist/skills/idea-discovery/SKILL.md +340 -0
  63. package/dist/skills/idea-discovery-robot/SKILL.md +362 -0
  64. package/dist/skills/idea-evaluator/SKILL.md +265 -0
  65. package/dist/skills/idea-evaluator/references/fatal-flaws.md +192 -0
  66. package/dist/skills/idea-evaluator/references/five-dimensions.md +251 -0
  67. package/dist/skills/idea-evaluator/references/lifecycle-capability-matching.md +177 -0
  68. package/dist/skills/idea-evaluator/references/paradigm-elephant.md +112 -0
  69. package/dist/skills/idea-evaluator/references/paradigm-examples.md +107 -0
  70. package/dist/skills/idea-evaluator/references/paradigm-first-principles.md +115 -0
  71. package/dist/skills/idea-evaluator/references/paradigm-hamming.md +137 -0
  72. package/dist/skills/idea-evaluator/references/paradigm-shift-probe.md +160 -0
  73. package/dist/skills/idea-evaluator/references/paradigm-technology-cycle.md +116 -0
  74. package/dist/skills/idea-evaluator/references/worked-examples.md +206 -0
  75. package/dist/skills/interview-cheatsheet/SKILL.md +245 -0
  76. package/dist/skills/intro-drafter/SKILL.md +250 -0
  77. package/dist/skills/intro-drafter/references/contribution-patterns.md +116 -0
  78. package/dist/skills/intro-drafter/references/flowchart.md +204 -0
  79. package/dist/skills/intro-drafter/references/paper-types.md +155 -0
  80. package/dist/skills/intro-drafter/references/running-example.md +133 -0
  81. package/dist/skills/intro-drafter/references/worked-examples.md +161 -0
  82. package/dist/skills/invention-structuring/SKILL.md +188 -0
  83. package/dist/skills/jurisdiction-format/SKILL.md +192 -0
  84. package/dist/skills/kill-argument/SKILL.md +384 -0
  85. package/dist/skills/llm-wiki/.mise.toml +2 -0
  86. package/dist/skills/llm-wiki/.nvmrc +1 -0
  87. package/dist/skills/llm-wiki/AGENTS.md +132 -0
  88. package/dist/skills/llm-wiki/CHANGELOG.md +459 -0
  89. package/dist/skills/llm-wiki/CLAUDE.md +109 -0
  90. package/dist/skills/llm-wiki/HERMES.md +44 -0
  91. package/dist/skills/llm-wiki/SKILL.md +1133 -0
  92. package/dist/skills/llm-wiki/assets/graph-demo.gif +0 -0
  93. package/dist/skills/llm-wiki/assets/graph-preview.png +0 -0
  94. package/dist/skills/llm-wiki/deps/LICENSE-d3.txt +13 -0
  95. package/dist/skills/llm-wiki/deps/LICENSE-marked.txt +44 -0
  96. package/dist/skills/llm-wiki/deps/LICENSE-purify.txt +568 -0
  97. package/{LICENSE → dist/skills/llm-wiki/deps/LICENSE-roughjs.txt} +1 -1
  98. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/SKILL.md +261 -0
  99. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/references/config/first-time-setup.md +106 -0
  100. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/cdp.ts +179 -0
  101. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/constants.ts +13 -0
  102. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/defuddle-converter.ts +58 -0
  103. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/html-to-markdown.ts +135 -0
  104. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/legacy-converter.ts +629 -0
  105. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/main.ts +314 -0
  106. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/markdown-conversion-shared.ts +305 -0
  107. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/media-localizer.ts +317 -0
  108. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/package.json +14 -0
  109. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/paths.ts +29 -0
  110. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/vendor/baoyu-chrome-cdp/package.json +9 -0
  111. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/vendor/baoyu-chrome-cdp/src/index.test.ts +307 -0
  112. package/dist/skills/llm-wiki/deps/baoyu-url-to-markdown/scripts/vendor/baoyu-chrome-cdp/src/index.ts +523 -0
  113. package/dist/skills/llm-wiki/deps/d3.min.js +2 -0
  114. package/dist/skills/llm-wiki/deps/marked.min.js +6 -0
  115. package/dist/skills/llm-wiki/deps/purify.min.js +3 -0
  116. package/dist/skills/llm-wiki/deps/rough.min.js +7 -0
  117. package/dist/skills/llm-wiki/deps/youtube-transcript/SKILL.md +47 -0
  118. package/dist/skills/llm-wiki/deps/youtube-transcript/scripts/get_transcript.py +72 -0
  119. package/dist/skills/llm-wiki/docs/design/oriental-atlas/DESIGN.md +183 -0
  120. package/dist/skills/llm-wiki/docs/design/oriental-atlas/design-brief.md +170 -0
  121. package/dist/skills/llm-wiki/docs/design/oriental-atlas/oriental-editorial-atlas.html +1908 -0
  122. package/dist/skills/llm-wiki/docs/design/oriental-atlas/reviews/result-review.md +68 -0
  123. package/dist/skills/llm-wiki/docs/plans/2026-06-15-omp-tool-status-events-phased-plan.md +655 -0
  124. package/dist/skills/llm-wiki/docs/plans/2026-06-15-omp-tool-status-events-progress.json +913 -0
  125. package/dist/skills/llm-wiki/docs/spark/2026-06-15-omp-tool-status-events-design.md +174 -0
  126. package/dist/skills/llm-wiki/install.ps1 +87 -0
  127. package/dist/skills/llm-wiki/install.sh +722 -0
  128. package/dist/skills/llm-wiki/package-lock.json +10309 -0
  129. package/dist/skills/llm-wiki/package.json +24 -0
  130. package/dist/skills/llm-wiki/packages/graph-engine/package.json +33 -0
  131. package/dist/skills/llm-wiki/packages/graph-engine/src/anim/.gitkeep +1 -0
  132. package/dist/skills/llm-wiki/packages/graph-engine/src/anim/index.ts +179 -0
  133. package/dist/skills/llm-wiki/packages/graph-engine/src/diff.ts +121 -0
  134. package/dist/skills/llm-wiki/packages/graph-engine/src/graph-node.ts +37 -0
  135. package/dist/skills/llm-wiki/packages/graph-engine/src/index.ts +140 -0
  136. package/dist/skills/llm-wiki/packages/graph-engine/src/model/atlas.ts +18 -0
  137. package/dist/skills/llm-wiki/packages/graph-engine/src/model/index.ts +6 -0
  138. package/dist/skills/llm-wiki/packages/graph-engine/src/model/labels.ts +11 -0
  139. package/dist/skills/llm-wiki/packages/graph-engine/src/model/learning.ts +8 -0
  140. package/dist/skills/llm-wiki/packages/graph-engine/src/model/legacy-helpers.ts +1373 -0
  141. package/dist/skills/llm-wiki/packages/graph-engine/src/model/queue.ts +7 -0
  142. package/dist/skills/llm-wiki/packages/graph-engine/src/model/storage.ts +4 -0
  143. package/dist/skills/llm-wiki/packages/graph-engine/src/model/visibility.ts +9 -0
  144. package/dist/skills/llm-wiki/packages/graph-engine/src/render/.gitkeep +1 -0
  145. package/dist/skills/llm-wiki/packages/graph-engine/src/render/index.ts +59 -0
  146. package/dist/skills/llm-wiki/packages/graph-engine/src/render/legend.ts +25 -0
  147. package/dist/skills/llm-wiki/packages/graph-engine/src/render/model.ts +593 -0
  148. package/dist/skills/llm-wiki/packages/graph-engine/src/render/preview.ts +65 -0
  149. package/dist/skills/llm-wiki/packages/graph-engine/src/render/search.ts +48 -0
  150. package/dist/skills/llm-wiki/packages/graph-engine/src/render/static-renderer.ts +2783 -0
  151. package/dist/skills/llm-wiki/packages/graph-engine/src/render/toolbar.ts +40 -0
  152. package/dist/skills/llm-wiki/packages/graph-engine/src/render/viewport.ts +272 -0
  153. package/dist/skills/llm-wiki/packages/graph-engine/src/select/.gitkeep +1 -0
  154. package/dist/skills/llm-wiki/packages/graph-engine/src/select/index.ts +189 -0
  155. package/dist/skills/llm-wiki/packages/graph-engine/src/sim/index.ts +298 -0
  156. package/dist/skills/llm-wiki/packages/graph-engine/src/sim/pins.ts +96 -0
  157. package/dist/skills/llm-wiki/packages/graph-engine/src/themes/.gitkeep +1 -0
  158. package/dist/skills/llm-wiki/packages/graph-engine/src/themes/index.ts +8 -0
  159. package/dist/skills/llm-wiki/packages/graph-engine/src/themes/tokens.ts +107 -0
  160. package/dist/skills/llm-wiki/packages/graph-engine/src/types.ts +313 -0
  161. package/dist/skills/llm-wiki/packages/graph-engine/test/anim.test.ts +100 -0
  162. package/dist/skills/llm-wiki/packages/graph-engine/test/diff.test.ts +133 -0
  163. package/dist/skills/llm-wiki/packages/graph-engine/test/helpers.test.ts +275 -0
  164. package/dist/skills/llm-wiki/packages/graph-engine/test/learning.test.ts +259 -0
  165. package/dist/skills/llm-wiki/packages/graph-engine/test/preview.test.ts +56 -0
  166. package/dist/skills/llm-wiki/packages/graph-engine/test/queue.test.ts +114 -0
  167. package/dist/skills/llm-wiki/packages/graph-engine/test/render-model.test.ts +322 -0
  168. package/dist/skills/llm-wiki/packages/graph-engine/test/runtime-state.test.ts +281 -0
  169. package/dist/skills/llm-wiki/packages/graph-engine/test/search-and-legend.test.ts +111 -0
  170. package/dist/skills/llm-wiki/packages/graph-engine/test/select.test.ts +168 -0
  171. package/dist/skills/llm-wiki/packages/graph-engine/test/sim.test.ts +123 -0
  172. package/dist/skills/llm-wiki/packages/graph-engine/test/themes.test.ts +62 -0
  173. package/dist/skills/llm-wiki/packages/graph-engine/test/toolbar.test.ts +64 -0
  174. package/dist/skills/llm-wiki/packages/graph-engine/test/viewport.test.ts +167 -0
  175. package/dist/skills/llm-wiki/packages/graph-engine/tsconfig.json +17 -0
  176. package/dist/skills/llm-wiki/packages/graph-engine/vite.config.ts +15 -0
  177. package/dist/skills/llm-wiki/platforms/claude/CLAUDE.md +37 -0
  178. package/dist/skills/llm-wiki/platforms/claude/companions/llm-wiki-upgrade/SKILL.md +95 -0
  179. package/dist/skills/llm-wiki/platforms/codex/AGENTS.md +23 -0
  180. package/dist/skills/llm-wiki/scripts/adapter-state.sh +424 -0
  181. package/dist/skills/llm-wiki/scripts/build-graph-data.sh +395 -0
  182. package/dist/skills/llm-wiki/scripts/build-graph-html.sh +453 -0
  183. package/dist/skills/llm-wiki/scripts/cache.sh +352 -0
  184. package/dist/skills/llm-wiki/scripts/create-source-page.sh +100 -0
  185. package/dist/skills/llm-wiki/scripts/delete-helper.sh +68 -0
  186. package/dist/skills/llm-wiki/scripts/graph-analysis.js +732 -0
  187. package/dist/skills/llm-wiki/scripts/hook-session-start.sh +46 -0
  188. package/dist/skills/llm-wiki/scripts/init-wiki.sh +95 -0
  189. package/dist/skills/llm-wiki/scripts/lib/source-signal-eligibility.js +158 -0
  190. package/dist/skills/llm-wiki/scripts/lint-fix.sh +114 -0
  191. package/dist/skills/llm-wiki/scripts/lint-runner.sh +217 -0
  192. package/dist/skills/llm-wiki/scripts/runtime-context.sh +77 -0
  193. package/dist/skills/llm-wiki/scripts/shared-config.sh +83 -0
  194. package/dist/skills/llm-wiki/scripts/source-record-contract.tsv +10 -0
  195. package/dist/skills/llm-wiki/scripts/source-registry.sh +349 -0
  196. package/dist/skills/llm-wiki/scripts/source-registry.tsv +10 -0
  197. package/dist/skills/llm-wiki/scripts/source-signal-coverage.js +83 -0
  198. package/dist/skills/llm-wiki/scripts/validate-step1.sh +144 -0
  199. package/dist/skills/llm-wiki/scripts/wiki-compat.sh +267 -0
  200. package/dist/skills/llm-wiki/setup.sh +8 -0
  201. package/dist/skills/llm-wiki/templates/entity-template.md +30 -0
  202. package/dist/skills/llm-wiki/templates/graph-styles/wash/footer.html +27 -0
  203. package/dist/skills/llm-wiki/templates/graph-styles/wash/graph-wash-helpers.js +1326 -0
  204. package/dist/skills/llm-wiki/templates/graph-styles/wash/graph-wash.js +1009 -0
  205. package/dist/skills/llm-wiki/templates/graph-styles/wash/header.html +2002 -0
  206. package/dist/skills/llm-wiki/templates/index-en-template.md +51 -0
  207. package/dist/skills/llm-wiki/templates/index-template.md +51 -0
  208. package/dist/skills/llm-wiki/templates/log-en-template.md +11 -0
  209. package/dist/skills/llm-wiki/templates/log-template.md +11 -0
  210. package/dist/skills/llm-wiki/templates/overview-en-template.md +41 -0
  211. package/dist/skills/llm-wiki/templates/overview-template.md +41 -0
  212. package/dist/skills/llm-wiki/templates/purpose-en-template.md +16 -0
  213. package/dist/skills/llm-wiki/templates/purpose-template.md +16 -0
  214. package/dist/skills/llm-wiki/templates/query-template.md +19 -0
  215. package/dist/skills/llm-wiki/templates/schema-template.md +185 -0
  216. package/dist/skills/llm-wiki/templates/source-template.md +51 -0
  217. package/dist/skills/llm-wiki/templates/synthesis-template.md +25 -0
  218. package/dist/skills/llm-wiki/templates/topic-template.md +35 -0
  219. package/dist/skills/llm-wiki/tests/adapter-state.sh +338 -0
  220. package/dist/skills/llm-wiki/tests/browser/graph-density-preview.mjs +53 -0
  221. package/dist/skills/llm-wiki/tests/browser/graph-html-insights.mjs +41 -0
  222. package/dist/skills/llm-wiki/tests/browser/graph-node-slim.mjs +71 -0
  223. package/dist/skills/llm-wiki/tests/browser/graph-stage-4-5.mjs +717 -0
  224. package/dist/skills/llm-wiki/tests/expected/graph-data-empty.json +60 -0
  225. package/dist/skills/llm-wiki/tests/expected/graph-data-sample.json +396 -0
  226. package/dist/skills/llm-wiki/tests/expected/graph-interactive-basic.html +1736 -0
  227. package/dist/skills/llm-wiki/tests/expected/lint-output.txt +44 -0
  228. package/dist/skills/llm-wiki/tests/fixtures/coverage-sample-wiki/index.md +1 -0
  229. package/dist/skills/llm-wiki/tests/fixtures/coverage-sample-wiki/wiki/entities/Alpha.md +10 -0
  230. package/dist/skills/llm-wiki/tests/fixtures/coverage-sample-wiki/wiki/entities/Beta.md +7 -0
  231. package/dist/skills/llm-wiki/tests/fixtures/coverage-sample-wiki/wiki/entities/Delta.md +8 -0
  232. package/dist/skills/llm-wiki/tests/fixtures/coverage-sample-wiki/wiki/entities/Gamma.md +8 -0
  233. package/dist/skills/llm-wiki/tests/fixtures/coverage-sample-wiki/wiki/queries/20260422-abc.md +10 -0
  234. package/dist/skills/llm-wiki/tests/fixtures/coverage-sample-wiki/wiki/synthesis/Crystal.md +8 -0
  235. package/dist/skills/llm-wiki/tests/fixtures/coverage-sample-wiki/wiki/topics/Overview.md +9 -0
  236. package/dist/skills/llm-wiki/tests/fixtures/graph-data-empty-wiki/wiki/entities/.gitkeep +0 -0
  237. package/dist/skills/llm-wiki/tests/fixtures/graph-data-sample-wiki/purpose.md +3 -0
  238. package/dist/skills/llm-wiki/tests/fixtures/graph-data-sample-wiki/wiki/entities/Attention.md +7 -0
  239. package/dist/skills/llm-wiki/tests/fixtures/graph-data-sample-wiki/wiki/entities/Decoder.md +7 -0
  240. package/dist/skills/llm-wiki/tests/fixtures/graph-data-sample-wiki/wiki/entities/Encoder.md +7 -0
  241. package/dist/skills/llm-wiki/tests/fixtures/graph-data-sample-wiki/wiki/entities/GPT.md +7 -0
  242. package/dist/skills/llm-wiki/tests/fixtures/graph-data-sample-wiki/wiki/entities/Transformer.md +13 -0
  243. package/dist/skills/llm-wiki/tests/fixtures/graph-data-sample-wiki/wiki/sources/paper.md +9 -0
  244. package/dist/skills/llm-wiki/tests/fixtures/graph-data-sample-wiki/wiki/topics/arch.md +12 -0
  245. package/dist/skills/llm-wiki/tests/fixtures/graph-data-sample-wiki/wiki/topics/finetune.md +9 -0
  246. package/dist/skills/llm-wiki/tests/fixtures/graph-interactive-basic/wiki/graph-data.json +40 -0
  247. package/dist/skills/llm-wiki/tests/fixtures/graph-interactive-dense/wiki/graph-data.json +3965 -0
  248. package/dist/skills/llm-wiki/tests/fixtures/graph-interactive-multicomm/wiki/graph-data.json +212 -0
  249. package/dist/skills/llm-wiki/tests/fixtures/lint-sample-wiki/index.md +14 -0
  250. package/dist/skills/llm-wiki/tests/fixtures/lint-sample-wiki/wiki/entities/C++.md +6 -0
  251. package/dist/skills/llm-wiki/tests/fixtures/lint-sample-wiki/wiki/entities/Lonely.md +4 -0
  252. package/dist/skills/llm-wiki/tests/fixtures/lint-sample-wiki/wiki/entities/Other.md +8 -0
  253. package/dist/skills/llm-wiki/tests/fixtures/lint-sample-wiki/wiki/entities/Real.md +7 -0
  254. package/dist/skills/llm-wiki/tests/fixtures/lint-sample-wiki/wiki/sources/2026-01-01-test-source.md +15 -0
  255. package/dist/skills/llm-wiki/tests/fixtures/lint-sample-wiki/wiki/sources/2026-02-01-inline-img.md +12 -0
  256. package/dist/skills/llm-wiki/tests/fixtures/lint-sample-wiki/wiki/topics/AIbasic.md +3 -0
  257. package/dist/skills/llm-wiki/tests/graph-analysis-helper.regression-1.sh +237 -0
  258. package/dist/skills/llm-wiki/tests/graph-browser-stage-4-5.regression-1.sh +157 -0
  259. package/dist/skills/llm-wiki/tests/graph-build-failures.regression-1.sh +91 -0
  260. package/dist/skills/llm-wiki/tests/graph-data-confidence-merge.regression-1.sh +309 -0
  261. package/dist/skills/llm-wiki/tests/graph-data-source-paths.regression-1.sh +49 -0
  262. package/dist/skills/llm-wiki/tests/graph-html-a11y.regression-1.sh +47 -0
  263. package/dist/skills/llm-wiki/tests/graph-html-brand-link.regression-1.sh +47 -0
  264. package/dist/skills/llm-wiki/tests/graph-html-density.regression-1.sh +228 -0
  265. package/dist/skills/llm-wiki/tests/graph-html-drawer-neighbors.regression-1.sh +47 -0
  266. package/dist/skills/llm-wiki/tests/graph-html-insights.regression-1.sh +80 -0
  267. package/dist/skills/llm-wiki/tests/graph-html-long-label.regression-1.sh +92 -0
  268. package/dist/skills/llm-wiki/tests/graph-html-minimap.regression-1.sh +51 -0
  269. package/dist/skills/llm-wiki/tests/graph-html-mobile.regression-1.sh +48 -0
  270. package/dist/skills/llm-wiki/tests/graph-html-oriental-atlas-contract.regression-1.sh +94 -0
  271. package/dist/skills/llm-wiki/tests/graph-html-oriental-design-contract.regression-1.sh +82 -0
  272. package/dist/skills/llm-wiki/tests/graph-html-search.regression-1.sh +52 -0
  273. package/dist/skills/llm-wiki/tests/graph-html-styles.regression-1.sh +66 -0
  274. package/dist/skills/llm-wiki/tests/graph-html-toolbar.regression-1.sh +62 -0
  275. package/dist/skills/llm-wiki/tests/js/graph-wash-bootstrap.test.js +110 -0
  276. package/dist/skills/llm-wiki/tests/js/graph-wash-helpers.test.js +296 -0
  277. package/dist/skills/llm-wiki/tests/js/graph-wash-learning.test.js +260 -0
  278. package/dist/skills/llm-wiki/tests/js/graph-wash-queue.test.js +115 -0
  279. package/dist/skills/llm-wiki/tests/js/graph-wash-runtime-state.test.js +282 -0
  280. package/dist/skills/llm-wiki/tests/js/source-signal-coverage.test.js +48 -0
  281. package/dist/skills/llm-wiki/tests/js/source-signal-eligibility.test.js +202 -0
  282. package/dist/skills/llm-wiki/tests/lib/graph-html-engine-helpers.sh +110 -0
  283. package/dist/skills/llm-wiki/tests/lint-output.regression-1.sh +32 -0
  284. package/dist/skills/llm-wiki/tests/regression.sh +1754 -0
  285. package/dist/skills/llm-wiki/workbench/.claude/skills/.gitkeep +0 -0
  286. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/SKILL.md +590 -0
  287. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/__init__.py +1 -0
  288. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/accept_changes.py +135 -0
  289. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/comment.py +318 -0
  290. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/helpers/__init__.py +0 -0
  291. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/helpers/merge_runs.py +199 -0
  292. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/helpers/simplify_redlines.py +197 -0
  293. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/pack.py +159 -0
  294. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  295. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  296. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  297. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  298. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  299. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  300. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  301. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  302. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  303. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  304. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  305. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  306. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  307. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  308. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  309. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  310. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  311. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  312. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  313. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  314. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  315. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  316. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  317. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  318. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  319. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  320. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  321. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  322. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  323. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  324. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  325. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
  326. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  327. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  328. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  329. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  330. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  331. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  332. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  333. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/soffice.py +183 -0
  334. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/unpack.py +132 -0
  335. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/validate.py +111 -0
  336. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/validators/__init__.py +15 -0
  337. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/validators/base.py +847 -0
  338. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/validators/docx.py +446 -0
  339. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/validators/pptx.py +275 -0
  340. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/office/validators/redlining.py +247 -0
  341. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/templates/comments.xml +3 -0
  342. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/templates/commentsExtended.xml +3 -0
  343. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
  344. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/templates/commentsIds.xml +3 -0
  345. package/dist/skills/llm-wiki/workbench/.claude/skills/docx/scripts/templates/people.xml +3 -0
  346. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/SKILL.md +314 -0
  347. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/forms.md +294 -0
  348. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/reference.md +612 -0
  349. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/scripts/check_bounding_boxes.py +65 -0
  350. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/scripts/check_fillable_fields.py +11 -0
  351. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/scripts/convert_pdf_to_images.py +33 -0
  352. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/scripts/create_validation_image.py +37 -0
  353. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/scripts/extract_form_field_info.py +122 -0
  354. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/scripts/extract_form_structure.py +115 -0
  355. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/scripts/fill_fillable_fields.py +98 -0
  356. package/dist/skills/llm-wiki/workbench/.claude/skills/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
  357. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/SKILL.md +232 -0
  358. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/editing.md +205 -0
  359. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/pptxgenjs.md +420 -0
  360. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/__init__.py +0 -0
  361. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/add_slide.py +195 -0
  362. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/clean.py +286 -0
  363. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/helpers/__init__.py +0 -0
  364. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/helpers/merge_runs.py +199 -0
  365. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
  366. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/pack.py +159 -0
  367. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  368. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  369. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  370. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  371. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  372. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  373. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  374. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  375. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  376. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  377. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  378. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  379. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  380. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  381. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  382. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  383. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  384. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  385. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  386. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  387. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  388. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  389. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  390. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  391. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  392. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  393. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  394. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  395. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  396. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  397. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  398. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
  399. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  400. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  401. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  402. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  403. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  404. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  405. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  406. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/soffice.py +183 -0
  407. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/unpack.py +132 -0
  408. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/validate.py +111 -0
  409. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/validators/__init__.py +15 -0
  410. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/validators/base.py +847 -0
  411. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/validators/docx.py +446 -0
  412. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/validators/pptx.py +275 -0
  413. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/office/validators/redlining.py +247 -0
  414. package/dist/skills/llm-wiki/workbench/.claude/skills/pptx/scripts/thumbnail.py +289 -0
  415. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/SKILL.md +292 -0
  416. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
  417. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/helpers/merge_runs.py +199 -0
  418. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
  419. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/pack.py +159 -0
  420. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  421. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  422. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  423. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  424. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  425. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  426. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  427. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  428. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  429. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  430. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  431. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  432. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  433. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  434. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  435. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  436. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  437. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  438. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  439. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  440. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  441. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  442. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  443. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  444. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  445. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  446. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  447. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  448. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  449. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  450. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  451. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
  452. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  453. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  454. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  455. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  456. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  457. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  458. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  459. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/soffice.py +183 -0
  460. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/unpack.py +132 -0
  461. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/validate.py +111 -0
  462. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/validators/__init__.py +15 -0
  463. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/validators/base.py +847 -0
  464. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/validators/docx.py +446 -0
  465. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/validators/pptx.py +275 -0
  466. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/office/validators/redlining.py +247 -0
  467. package/dist/skills/llm-wiki/workbench/.claude/skills/xlsx/scripts/recalc.py +184 -0
  468. package/dist/skills/llm-wiki/workbench/AGENTS.md +110 -0
  469. package/dist/skills/llm-wiki/workbench/CLAUDE.md +54 -0
  470. package/dist/skills/llm-wiki/workbench/PRODUCT.md +1268 -0
  471. package/dist/skills/llm-wiki/workbench/docs/current-kb-retrieval-design.md +587 -0
  472. package/dist/skills/llm-wiki/workbench/docs/graph-evolution-1-design.md +210 -0
  473. package/dist/skills/llm-wiki/workbench/docs/stage-2-design.md +1139 -0
  474. package/dist/skills/llm-wiki/workbench/docs/stage-3-design.md +1269 -0
  475. package/dist/skills/llm-wiki/workbench/docs/stage-3.5-design.md +1164 -0
  476. package/dist/skills/llm-wiki/workbench/docs/stage-4-design.md +504 -0
  477. package/dist/skills/llm-wiki/workbench/docs/stage-4.5-design.md +195 -0
  478. package/dist/skills/llm-wiki/workbench/docs/superpowers/specs/2026-05-28-resizable-preview-layout-design.md +165 -0
  479. package/dist/skills/llm-wiki/workbench/docs/superpowers/specs/2026-05-28-settings-panel-scroll-fix.md +50 -0
  480. package/dist/skills/llm-wiki/workbench/server/package.json +29 -0
  481. package/dist/skills/llm-wiki/workbench/server/src/agent.ts +457 -0
  482. package/dist/skills/llm-wiki/workbench/server/src/artifacts.ts +248 -0
  483. package/dist/skills/llm-wiki/workbench/server/src/auth.ts +164 -0
  484. package/dist/skills/llm-wiki/workbench/server/src/config.ts +130 -0
  485. package/dist/skills/llm-wiki/workbench/server/src/conversations.test.ts +121 -0
  486. package/dist/skills/llm-wiki/workbench/server/src/conversations.ts +255 -0
  487. package/dist/skills/llm-wiki/workbench/server/src/digest/batch.ts +189 -0
  488. package/dist/skills/llm-wiki/workbench/server/src/digest/concurrency.test.ts +36 -0
  489. package/dist/skills/llm-wiki/workbench/server/src/digest/concurrency.ts +31 -0
  490. package/dist/skills/llm-wiki/workbench/server/src/digest/subagent.ts +91 -0
  491. package/dist/skills/llm-wiki/workbench/server/src/extensions/artifacts.ts +81 -0
  492. package/dist/skills/llm-wiki/workbench/server/src/extensions/knowledge-base.ts +263 -0
  493. package/dist/skills/llm-wiki/workbench/server/src/extensions/new-wiki.ts +42 -0
  494. package/dist/skills/llm-wiki/workbench/server/src/extensions/synthesis.ts +172 -0
  495. package/dist/skills/llm-wiki/workbench/server/src/graph-watcher.test.ts +196 -0
  496. package/dist/skills/llm-wiki/workbench/server/src/graph.test.ts +84 -0
  497. package/dist/skills/llm-wiki/workbench/server/src/graph.ts +379 -0
  498. package/dist/skills/llm-wiki/workbench/server/src/index.ts +1148 -0
  499. package/dist/skills/llm-wiki/workbench/server/src/knowledge-bases.test.ts +30 -0
  500. package/dist/skills/llm-wiki/workbench/server/src/knowledge-bases.ts +321 -0
  501. package/dist/skills/llm-wiki/workbench/server/src/pages.test.ts +16 -0
  502. package/dist/skills/llm-wiki/workbench/server/src/pages.ts +158 -0
  503. package/dist/skills/llm-wiki/workbench/server/src/retrieval.test.ts +151 -0
  504. package/dist/skills/llm-wiki/workbench/server/src/retrieval.ts +427 -0
  505. package/dist/skills/llm-wiki/workbench/server/src/tool-status-events.test.ts +363 -0
  506. package/dist/skills/llm-wiki/workbench/server/src/tool-status-events.ts +616 -0
  507. package/dist/skills/llm-wiki/workbench/server/src/wiki-init.test.ts +19 -0
  508. package/dist/skills/llm-wiki/workbench/server/src/wiki-init.ts +188 -0
  509. package/dist/skills/llm-wiki/workbench/server/tsconfig.json +10 -0
  510. package/dist/skills/llm-wiki/workbench/tsconfig.json +20 -0
  511. package/dist/skills/llm-wiki/workbench/web/components.json +21 -0
  512. package/dist/skills/llm-wiki/workbench/web/eslint.config.js +22 -0
  513. package/dist/skills/llm-wiki/workbench/web/index.html +13 -0
  514. package/dist/skills/llm-wiki/workbench/web/package.json +48 -0
  515. package/dist/skills/llm-wiki/workbench/web/src/App.tsx +749 -0
  516. package/dist/skills/llm-wiki/workbench/web/src/components/AddExternalDialog.tsx +373 -0
  517. package/dist/skills/llm-wiki/workbench/web/src/components/ArtifactView.tsx +15 -0
  518. package/dist/skills/llm-wiki/workbench/web/src/components/BatchDigestPanel.tsx +106 -0
  519. package/dist/skills/llm-wiki/workbench/web/src/components/ChatPanel.tsx +821 -0
  520. package/dist/skills/llm-wiki/workbench/web/src/components/CommandMenu.tsx +65 -0
  521. package/dist/skills/llm-wiki/workbench/web/src/components/ExportButtons.tsx +54 -0
  522. package/dist/skills/llm-wiki/workbench/web/src/components/GraphPanel.tsx +516 -0
  523. package/dist/skills/llm-wiki/workbench/web/src/components/GraphReader.tsx +48 -0
  524. package/dist/skills/llm-wiki/workbench/web/src/components/GraphSelection.tsx +100 -0
  525. package/dist/skills/llm-wiki/workbench/web/src/components/MarkdownView.tsx +56 -0
  526. package/dist/skills/llm-wiki/workbench/web/src/components/NewWikiDialog.tsx +101 -0
  527. package/dist/skills/llm-wiki/workbench/web/src/components/RefMenu.tsx +40 -0
  528. package/dist/skills/llm-wiki/workbench/web/src/components/RightDrawer.tsx +227 -0
  529. package/dist/skills/llm-wiki/workbench/web/src/components/SettingsPanel.tsx +331 -0
  530. package/dist/skills/llm-wiki/workbench/web/src/components/Sidebar.tsx +436 -0
  531. package/dist/skills/llm-wiki/workbench/web/src/components/ToolHistorySummary.tsx +123 -0
  532. package/dist/skills/llm-wiki/workbench/web/src/components/ToolStatusRunway.tsx +90 -0
  533. package/dist/skills/llm-wiki/workbench/web/src/components/renderers/DownloadOnlyRenderer.tsx +88 -0
  534. package/dist/skills/llm-wiki/workbench/web/src/components/renderers/HtmlRenderer.tsx +92 -0
  535. package/dist/skills/llm-wiki/workbench/web/src/components/ui/button.tsx +52 -0
  536. package/dist/skills/llm-wiki/workbench/web/src/components/ui/command.tsx +50 -0
  537. package/dist/skills/llm-wiki/workbench/web/src/components/ui/dialog.tsx +156 -0
  538. package/dist/skills/llm-wiki/workbench/web/src/components/ui/input.tsx +21 -0
  539. package/dist/skills/llm-wiki/workbench/web/src/components/ui/tooltip.tsx +57 -0
  540. package/dist/skills/llm-wiki/workbench/web/src/index.css +1737 -0
  541. package/dist/skills/llm-wiki/workbench/web/src/lib/api.ts +648 -0
  542. package/dist/skills/llm-wiki/workbench/web/src/lib/drawer-state.ts +79 -0
  543. package/dist/skills/llm-wiki/workbench/web/src/lib/graph-reader.ts +25 -0
  544. package/dist/skills/llm-wiki/workbench/web/src/lib/graph-selection-drawer.ts +35 -0
  545. package/dist/skills/llm-wiki/workbench/web/src/lib/graph-selection.ts +96 -0
  546. package/dist/skills/llm-wiki/workbench/web/src/lib/legacy-tool-status.ts +113 -0
  547. package/dist/skills/llm-wiki/workbench/web/src/lib/sse.ts +72 -0
  548. package/dist/skills/llm-wiki/workbench/web/src/lib/tool-status-format.ts +170 -0
  549. package/dist/skills/llm-wiki/workbench/web/src/lib/tool-status-model.ts +392 -0
  550. package/dist/skills/llm-wiki/workbench/web/src/lib/utils.ts +10 -0
  551. package/dist/skills/llm-wiki/workbench/web/src/lib/wiki-links.ts +32 -0
  552. package/dist/skills/llm-wiki/workbench/web/src/main.tsx +10 -0
  553. package/dist/skills/llm-wiki/workbench/web/test/api.test.ts +61 -0
  554. package/dist/skills/llm-wiki/workbench/web/test/chat-panel-tool-status.test.tsx +26 -0
  555. package/dist/skills/llm-wiki/workbench/web/test/graph-drawer-state.test.ts +78 -0
  556. package/dist/skills/llm-wiki/workbench/web/test/graph-reader-request.test.ts +32 -0
  557. package/dist/skills/llm-wiki/workbench/web/test/graph-reader.test.ts +62 -0
  558. package/dist/skills/llm-wiki/workbench/web/test/graph-selection-drawer.test.ts +56 -0
  559. package/dist/skills/llm-wiki/workbench/web/test/graph-selection.test.ts +83 -0
  560. package/dist/skills/llm-wiki/workbench/web/test/tool-history-summary.test.tsx +124 -0
  561. package/dist/skills/llm-wiki/workbench/web/test/tool-status-format.test.ts +107 -0
  562. package/dist/skills/llm-wiki/workbench/web/test/tool-status-model.test.ts +324 -0
  563. package/dist/skills/llm-wiki/workbench/web/test/tool-status-runway.test.ts +134 -0
  564. package/dist/skills/llm-wiki/workbench/web/test/wiki-links.test.ts +23 -0
  565. package/dist/skills/llm-wiki/workbench/web/tsconfig.app.json +30 -0
  566. package/dist/skills/llm-wiki/workbench/web/tsconfig.json +7 -0
  567. package/dist/skills/llm-wiki/workbench/web/tsconfig.node.json +24 -0
  568. package/dist/skills/llm-wiki/workbench/web/vite.config.ts +26 -0
  569. package/dist/skills/mean-reviewer/SECURITY.md +23 -0
  570. package/dist/skills/mean-reviewer/SKILL.md +203 -0
  571. package/dist/skills/mean-reviewer/examples/13446_1000_Layer_Networks_for_.pdf +0 -0
  572. package/dist/skills/mean-reviewer/examples/13446_mean_reviewer.md +116 -0
  573. package/dist/skills/mean-reviewer/examples/13446_mean_reviewer_author_rebuttal_simulated.md +282 -0
  574. package/dist/skills/mean-reviewer/examples/13446_mean_reviewer_reply.md +91 -0
  575. package/dist/skills/mean-reviewer/examples/13446_official_review.json +973 -0
  576. package/dist/skills/mean-reviewer/examples/ChatGPT_AC_Roleplay.jpeg +0 -0
  577. package/dist/skills/medical-imaging-review/SKILL.md +295 -0
  578. package/dist/skills/medical-imaging-review/references/CITATION_INTEGRITY.md +233 -0
  579. package/dist/skills/medical-imaging-review/references/DOMAINS.md +302 -0
  580. package/dist/skills/medical-imaging-review/references/HALLUCINATION_PATTERNS.md +211 -0
  581. package/dist/skills/medical-imaging-review/references/MCP_SETUP.md +216 -0
  582. package/dist/skills/medical-imaging-review/references/PARADIGM.md +221 -0
  583. package/dist/skills/medical-imaging-review/references/QUALITY_CHECKLIST.md +169 -0
  584. package/dist/skills/medical-imaging-review/references/TEMPLATES.md +291 -0
  585. package/dist/skills/medical-imaging-review/references/WORKFLOW.md +289 -0
  586. package/dist/skills/mermaid-diagram/SKILL.md +379 -0
  587. package/dist/skills/meta-apply/SKILL.md +137 -0
  588. package/dist/skills/meta-optimize/SKILL.md +253 -0
  589. package/dist/skills/monitor-experiment/SKILL.md +98 -0
  590. package/dist/skills/novelty-check/SKILL.md +89 -0
  591. package/dist/skills/openalex/SKILL.md +228 -0
  592. package/dist/skills/overleaf-sync/SKILL.md +220 -0
  593. package/dist/skills/paper-claim-audit/SKILL.md +340 -0
  594. package/dist/skills/paper-compile/SKILL.md +253 -0
  595. package/dist/skills/paper-figure/SKILL.md +279 -0
  596. package/dist/skills/paper-illustration/SKILL.md +690 -0
  597. package/dist/skills/paper-illustration-image2/SKILL.md +383 -0
  598. package/dist/skills/paper-illustration-image2/scripts/paper_illustration_image2.py +255 -0
  599. package/dist/skills/paper-plan/SKILL.md +278 -0
  600. package/dist/skills/paper-poster/SKILL.md +19 -0
  601. package/dist/skills/paper-poster-html/DESIGN_FINAL.md +176 -0
  602. package/dist/skills/paper-poster-html/IMPLEMENTATION_CONVENTIONS.md +161 -0
  603. package/dist/skills/paper-poster-html/LICENSES/posterly-MIT.txt +21 -0
  604. package/dist/skills/paper-poster-html/NOTICE.md +57 -0
  605. package/dist/skills/paper-poster-html/SKILL.md +357 -0
  606. package/dist/skills/paper-poster-html/scripts/_posterly/__init__.py +0 -0
  607. package/dist/skills/paper-poster-html/scripts/_posterly/canvas.py +200 -0
  608. package/dist/skills/paper-poster-html/scripts/_posterly/measure.py +588 -0
  609. package/dist/skills/paper-poster-html/scripts/_posterly/polish.py +498 -0
  610. package/dist/skills/paper-poster-html/scripts/_posterly/preflight.py +489 -0
  611. package/dist/skills/paper-poster-html/scripts/_posterly/render.py +215 -0
  612. package/dist/skills/paper-poster-html/scripts/_posterly/textutil.py +16 -0
  613. package/dist/skills/paper-poster-html/scripts/_posterly/verify_final.py +171 -0
  614. package/dist/skills/paper-poster-html/scripts/asset_check.py +897 -0
  615. package/dist/skills/paper-poster-html/scripts/extract_pdf_figures.py +666 -0
  616. package/dist/skills/paper-poster-html/scripts/poster_check.py +251 -0
  617. package/dist/skills/paper-poster-html/scripts/preprocess_figures.py +238 -0
  618. package/dist/skills/paper-poster-html/scripts/render_preview.py +217 -0
  619. package/dist/skills/paper-poster-html/scripts/run_gates.py +556 -0
  620. package/dist/skills/paper-poster-html/scripts/style_check.py +1324 -0
  621. package/dist/skills/paper-poster-html/templates/COMPONENTS.md +462 -0
  622. package/dist/skills/paper-poster-html/templates/landscape_4col.html +1032 -0
  623. package/dist/skills/paper-poster-html/templates/landscape_hero.html +1046 -0
  624. package/dist/skills/paper-poster-html/templates/portrait_2col.html +947 -0
  625. package/dist/skills/paper-poster-html/templates/tokens/acl.json +9 -0
  626. package/dist/skills/paper-poster-html/templates/tokens/cvpr.json +9 -0
  627. package/dist/skills/paper-poster-html/templates/tokens/generic.json +9 -0
  628. package/dist/skills/paper-poster-html/templates/tokens/iclr.json +9 -0
  629. package/dist/skills/paper-poster-html/templates/tokens/icml.json +9 -0
  630. package/dist/skills/paper-poster-html/templates/tokens/neurips.json +9 -0
  631. package/dist/skills/paper-slide-deck/SKILL.md +464 -0
  632. package/dist/skills/paper-slide-deck/references/analysis-framework.md +392 -0
  633. package/dist/skills/paper-slide-deck/references/base-prompt.md +70 -0
  634. package/dist/skills/paper-slide-deck/references/content-rules.md +95 -0
  635. package/dist/skills/paper-slide-deck/references/figure-container-template.md +177 -0
  636. package/dist/skills/paper-slide-deck/references/modification-guide.md +85 -0
  637. package/dist/skills/paper-slide-deck/references/outline-template.md +437 -0
  638. package/dist/skills/paper-slide-deck/references/styles/academic-paper.md +109 -0
  639. package/dist/skills/paper-slide-deck/references/styles/blueprint.md +67 -0
  640. package/dist/skills/paper-slide-deck/references/styles/bold-editorial.md +70 -0
  641. package/dist/skills/paper-slide-deck/references/styles/chalkboard.md +68 -0
  642. package/dist/skills/paper-slide-deck/references/styles/corporate.md +69 -0
  643. package/dist/skills/paper-slide-deck/references/styles/dark-atmospheric.md +69 -0
  644. package/dist/skills/paper-slide-deck/references/styles/editorial-infographic.md +73 -0
  645. package/dist/skills/paper-slide-deck/references/styles/fantasy-animation.md +69 -0
  646. package/dist/skills/paper-slide-deck/references/styles/intuition-machine.md +72 -0
  647. package/dist/skills/paper-slide-deck/references/styles/minimal.md +64 -0
  648. package/dist/skills/paper-slide-deck/references/styles/notion.md +69 -0
  649. package/dist/skills/paper-slide-deck/references/styles/pixel-art.md +67 -0
  650. package/dist/skills/paper-slide-deck/references/styles/scientific.md +73 -0
  651. package/dist/skills/paper-slide-deck/references/styles/sketch-notes.md +66 -0
  652. package/dist/skills/paper-slide-deck/references/styles/vector-illustration.md +72 -0
  653. package/dist/skills/paper-slide-deck/references/styles/vintage.md +73 -0
  654. package/dist/skills/paper-slide-deck/references/styles/watercolor.md +68 -0
  655. package/dist/skills/paper-slide-deck/scripts/apply-template.ts +282 -0
  656. package/dist/skills/paper-slide-deck/scripts/detect-figures.ts +283 -0
  657. package/dist/skills/paper-slide-deck/scripts/extract-figure.ts +140 -0
  658. package/dist/skills/paper-slide-deck/scripts/generate-slides.py +182 -0
  659. package/dist/skills/paper-slide-deck/scripts/merge-to-pdf.ts +116 -0
  660. package/dist/skills/paper-slide-deck/scripts/merge-to-pptx.ts +137 -0
  661. package/dist/skills/paper-slide-deck/scripts/package-lock.json +899 -0
  662. package/dist/skills/paper-slide-deck/scripts/package.json +8 -0
  663. package/dist/skills/paper-slides/SKILL.md +571 -0
  664. package/dist/skills/paper-talk/SKILL.md +381 -0
  665. package/dist/skills/paper-write/SKILL.md +411 -0
  666. package/dist/skills/paper-write/templates/IEEEtran.bst +2409 -0
  667. package/dist/skills/paper-write/templates/IEEEtran.cls +6347 -0
  668. package/dist/skills/paper-write/templates/aaai2026.bst +1493 -0
  669. package/dist/skills/paper-write/templates/aaai2026.sty +315 -0
  670. package/dist/skills/paper-write/templates/aaai2026.tex +952 -0
  671. package/dist/skills/paper-write/templates/acl.sty +312 -0
  672. package/dist/skills/paper-write/templates/acl2026.tex +377 -0
  673. package/dist/skills/paper-write/templates/acl_natbib.bst +1940 -0
  674. package/dist/skills/paper-write/templates/acm.bst +3081 -0
  675. package/dist/skills/paper-write/templates/acm_mm2026.tex +204 -0
  676. package/dist/skills/paper-write/templates/acmart.cls +3520 -0
  677. package/dist/skills/paper-write/templates/cvpr.bst +1448 -0
  678. package/dist/skills/paper-write/templates/cvpr.sty +508 -0
  679. package/dist/skills/paper-write/templates/cvpr2026.tex +63 -0
  680. package/dist/skills/paper-write/templates/iclr2026.tex +84 -0
  681. package/dist/skills/paper-write/templates/iclr2026_conference.bst +1440 -0
  682. package/dist/skills/paper-write/templates/iclr2026_conference.sty +246 -0
  683. package/dist/skills/paper-write/templates/icml2025.tex +87 -0
  684. package/dist/skills/paper-write/templates/icml2026.sty +767 -0
  685. package/dist/skills/paper-write/templates/icml2026.tex +662 -0
  686. package/dist/skills/paper-write/templates/ieee_conference.tex +89 -0
  687. package/dist/skills/paper-write/templates/ieee_journal.tex +93 -0
  688. package/dist/skills/paper-write/templates/math_commands.tex +48 -0
  689. package/dist/skills/paper-write/templates/neurips2025.tex +80 -0
  690. package/dist/skills/paper-write/templates/neurips2026.tex +493 -0
  691. package/dist/skills/paper-write/templates/neurips_2026.sty +437 -0
  692. package/dist/skills/paper-writing/SKILL.md +632 -0
  693. package/dist/skills/patent-novelty-check/SKILL.md +153 -0
  694. package/dist/skills/patent-pipeline/SKILL.md +344 -0
  695. package/dist/skills/patent-review/SKILL.md +202 -0
  696. package/dist/skills/pixel-art/SKILL.md +139 -0
  697. package/dist/skills/pre-submission-reviewer/SKILL.md +247 -0
  698. package/dist/skills/pre-submission-reviewer/references/forbidden-patterns.md +163 -0
  699. package/dist/skills/pre-submission-reviewer/references/grammar-rules.md +135 -0
  700. package/dist/skills/pre-submission-reviewer/references/latex-rules.md +158 -0
  701. package/dist/skills/pre-submission-reviewer/references/logic-and-structure.md +125 -0
  702. package/dist/skills/pre-submission-reviewer/references/section-guides.md +169 -0
  703. package/dist/skills/prior-art-search/SKILL.md +146 -0
  704. package/dist/skills/proof-checker/SKILL.md +499 -0
  705. package/dist/skills/proof-writer/SKILL.md +222 -0
  706. package/dist/skills/qzcli/SKILL.md +316 -0
  707. package/dist/skills/rebuttal/SKILL.md +304 -0
  708. package/dist/skills/render-html/SKILL.md +299 -0
  709. package/dist/skills/render-html/scripts/render_html.py +905 -0
  710. package/dist/skills/render-html/scripts/templates/academic.html +342 -0
  711. package/dist/skills/render-html/scripts/templates/dashboard.html +333 -0
  712. package/dist/skills/research-lit/SKILL.md +353 -0
  713. package/dist/skills/research-paper-writing/SKILL.md +99 -0
  714. package/dist/skills/research-paper-writing/agents/openai.yaml +4 -0
  715. package/dist/skills/research-paper-writing/references/abstract.md +102 -0
  716. package/dist/skills/research-paper-writing/references/conclusion.md +35 -0
  717. package/dist/skills/research-paper-writing/references/does-my-writing-flow-source.md +45 -0
  718. package/dist/skills/research-paper-writing/references/examples/abstract/template-a.md +21 -0
  719. package/dist/skills/research-paper-writing/references/examples/abstract/template-b.md +34 -0
  720. package/dist/skills/research-paper-writing/references/examples/abstract/template-c.md +28 -0
  721. package/dist/skills/research-paper-writing/references/examples/abstract-examples.md +13 -0
  722. package/dist/skills/research-paper-writing/references/examples/index.md +21 -0
  723. package/dist/skills/research-paper-writing/references/examples/introduction/novel-task-challenge-decomposition.md +18 -0
  724. package/dist/skills/research-paper-writing/references/examples/introduction/pipeline-not-recommended-abstract-only.md +30 -0
  725. package/dist/skills/research-paper-writing/references/examples/introduction/pipeline-version-1-one-contribution-multi-advantages.md +30 -0
  726. package/dist/skills/research-paper-writing/references/examples/introduction/pipeline-version-2-two-contributions.md +34 -0
  727. package/dist/skills/research-paper-writing/references/examples/introduction/pipeline-version-3-new-module-on-existing-pipeline.md +18 -0
  728. package/dist/skills/research-paper-writing/references/examples/introduction/pipeline-version-4-observation-driven.md +16 -0
  729. package/dist/skills/research-paper-writing/references/examples/introduction/technical-challenge-version-1-existing-task.md +32 -0
  730. package/dist/skills/research-paper-writing/references/examples/introduction/technical-challenge-version-2-existing-task-insight-backed-by-traditional.md +33 -0
  731. package/dist/skills/research-paper-writing/references/examples/introduction/technical-challenge-version-3-novel-task.md +21 -0
  732. package/dist/skills/research-paper-writing/references/examples/introduction/version-1-task-then-application.md +14 -0
  733. package/dist/skills/research-paper-writing/references/examples/introduction/version-2-application-first.md +10 -0
  734. package/dist/skills/research-paper-writing/references/examples/introduction/version-3-general-to-specific-setting.md +14 -0
  735. package/dist/skills/research-paper-writing/references/examples/introduction/version-4-open-with-challenge.md +20 -0
  736. package/dist/skills/research-paper-writing/references/examples/introduction-examples.md +25 -0
  737. package/dist/skills/research-paper-writing/references/examples/method/example-of-the-three-elements.md +67 -0
  738. package/dist/skills/research-paper-writing/references/examples/method/method-writing-common-issues-note.md +10 -0
  739. package/dist/skills/research-paper-writing/references/examples/method/module-design-instant-ngp.md +55 -0
  740. package/dist/skills/research-paper-writing/references/examples/method/module-motivation-patterns.md +15 -0
  741. package/dist/skills/research-paper-writing/references/examples/method/module-triad-neural-body.md +19 -0
  742. package/dist/skills/research-paper-writing/references/examples/method/neural-body-annotated-figure-text.md +66 -0
  743. package/dist/skills/research-paper-writing/references/examples/method/overview-template.md +30 -0
  744. package/dist/skills/research-paper-writing/references/examples/method/pre-writing-questions.md +17 -0
  745. package/dist/skills/research-paper-writing/references/examples/method/section-skeleton.md +9 -0
  746. package/dist/skills/research-paper-writing/references/examples/method-examples.md +24 -0
  747. package/dist/skills/research-paper-writing/references/experiments.md +102 -0
  748. package/dist/skills/research-paper-writing/references/introduction.md +408 -0
  749. package/dist/skills/research-paper-writing/references/method.md +196 -0
  750. package/dist/skills/research-paper-writing/references/paper-review.md +86 -0
  751. package/dist/skills/research-paper-writing/references/related-work.md +41 -0
  752. package/dist/skills/research-pipeline/SKILL.md +257 -0
  753. package/dist/skills/research-proposal/SKILL.md +573 -0
  754. package/dist/skills/research-proposal/assets/proposal_scaffold_en.md +323 -0
  755. package/dist/skills/research-proposal/assets/proposal_scaffold_zh.md +346 -0
  756. package/dist/skills/research-proposal/references/DOMAIN_TEMPLATES.md +518 -0
  757. package/dist/skills/research-proposal/references/LITERATURE_WORKFLOW.md +529 -0
  758. package/dist/skills/research-proposal/references/QUALITY_CHECKLIST.md +325 -0
  759. package/dist/skills/research-proposal/references/STRUCTURE_GUIDE.md +398 -0
  760. package/dist/skills/research-proposal/references/WRITING_STYLE_GUIDE.md +661 -0
  761. package/dist/skills/research-refine/SKILL.md +716 -0
  762. package/dist/skills/research-refine-pipeline/SKILL.md +186 -0
  763. package/dist/skills/research-review/SKILL.md +119 -0
  764. package/dist/skills/research-wiki/SKILL.md +373 -0
  765. package/dist/skills/resubmit-pipeline/SKILL.md +427 -0
  766. package/dist/skills/result-to-claim/SKILL.md +190 -0
  767. package/dist/skills/run-experiment/SKILL.md +227 -0
  768. package/dist/skills/scientific-figure-making/SKILL.md +38 -0
  769. package/dist/skills/scientific-figure-making/references/api.md +152 -0
  770. package/dist/skills/scientific-figure-making/references/common-patterns.md +74 -0
  771. package/dist/skills/scientific-figure-making/references/demos.md +30 -0
  772. package/dist/skills/scientific-figure-making/references/design-theory.md +138 -0
  773. package/dist/skills/scientific-figure-making/references/tutorials.md +135 -0
  774. package/dist/skills/semantic-scholar/SKILL.md +219 -0
  775. package/dist/skills/serverless-modal/SKILL.md +324 -0
  776. package/dist/skills/slides-polish/SKILL.md +563 -0
  777. package/dist/skills/specification-writing/SKILL.md +211 -0
  778. package/dist/skills/strategist/SKILL.md +670 -0
  779. package/dist/skills/strategist/references/quality_standards.md +336 -0
  780. package/dist/skills/strategist/references/search_strategy.md +459 -0
  781. package/dist/skills/strategist/scripts/evaluate_samples.py +300 -0
  782. package/dist/skills/strategist/scripts/gap_analysis.py +399 -0
  783. package/dist/skills/system-profile/SKILL.md +103 -0
  784. package/dist/skills/tech-paper-template/SKILL.md +192 -0
  785. package/dist/skills/tech-paper-template/references/consistency-checks.md +166 -0
  786. package/dist/skills/tech-paper-template/references/paper-types.md +127 -0
  787. package/dist/skills/tech-paper-template/references/thinking-template.md +194 -0
  788. package/dist/skills/tech-paper-template/references/worked-examples.md +124 -0
  789. package/dist/skills/training-check/SKILL.md +83 -0
  790. package/dist/skills/vast-gpu/SKILL.md +380 -0
  791. package/dist/skills/vibe-research-workflow/SKILL.md +189 -0
  792. package/dist/skills/vibe-research-workflow/references/behavior-guidelines.md +149 -0
  793. package/dist/skills/vibe-research-workflow/references/tool-selection.md +144 -0
  794. package/dist/skills/vibe-research-workflow/references/vibe-coding.md +154 -0
  795. package/dist/skills/vibe-research-workflow/references/vibe-figure.md +131 -0
  796. package/dist/skills/vibe-research-workflow/references/vibe-writing.md +181 -0
  797. package/dist/skills/wiki-enrich/SKILL.md +254 -0
  798. package/dist/skills/writing-systems-papers/SKILL.md +184 -0
  799. package/package.json +1 -1
@@ -0,0 +1,905 @@
1
+ #!/usr/bin/env python3
2
+ """render_html.py — convert ARIS Markdown / JSON artifacts to single-file HTML.
3
+
4
+ Pure-stdlib Python. No external pip deps.
5
+
6
+ Usage:
7
+ render_html.py <input.md> [--template academic|dashboard]
8
+ [--out <output.html>]
9
+ [--title "..."] [--subtitle "..."]
10
+ [--eyebrow "..."]
11
+ [--state <state.json>]
12
+ [--json <sidecar.json>]
13
+ [--offline]
14
+ [--no-toc]
15
+
16
+ See skills/render-html/SKILL.md for the full contract.
17
+
18
+ Design invariants (see codex review consultation in commit message):
19
+ - Markdown / JSON is canonical source, HTML is generated view.
20
+ - HTML embeds source path + SHA256 + generated timestamp (drift detection).
21
+ - Single-file output. MathJax + highlight.js loaded from CDN unless --offline.
22
+ - Pure stdlib: re, html, hashlib, json, datetime, pathlib, argparse, sys.
23
+ - Conservative Markdown subset matching what ARIS artifacts actually emit.
24
+ """
25
+ from __future__ import annotations
26
+
27
+ import argparse
28
+ import hashlib
29
+ import html as html_lib
30
+ import json
31
+ import re
32
+ import sys
33
+ from datetime import datetime, timezone
34
+ from pathlib import Path
35
+
36
+ TEMPLATES_DIR = Path(__file__).resolve().parent / "templates"
37
+
38
+ # ---------------------------------------------------------------------------
39
+ # Inline parsing
40
+ # ---------------------------------------------------------------------------
41
+
42
+ # Placeholders used to protect inline content during multi-pass rewriting.
43
+ # Two non-printable PUA chars + index to avoid collisions with real content.
44
+ _PH_OPEN = ""
45
+ _PH_CLOSE = ""
46
+
47
+
48
+ def _ph(idx: int) -> str:
49
+ return f"{_PH_OPEN}{idx}{_PH_CLOSE}"
50
+
51
+
52
+ _RE_CODE_INLINE = re.compile(r"`([^`\n]+)`")
53
+ _RE_MATH_DISPLAY = re.compile(r"\$\$([^\n][\s\S]*?)\$\$")
54
+ _RE_MATH_INLINE = re.compile(r"(?<!\\)\$([^\$\n]+?)\$")
55
+ _RE_IMG = re.compile(r"!\[([^\]]*)\]\(([^)\s]+)(?:\s+\"([^\"]*)\")?\)")
56
+ _RE_LINK = re.compile(r"\[([^\]]+)\]\(([^)\s]+)(?:\s+\"([^\"]*)\")?\)")
57
+ _RE_BOLD = re.compile(r"\*\*([^\*\n]+)\*\*")
58
+ _RE_ITALIC = re.compile(r"(?<!\*)\*([^\*\n]+)\*(?!\*)")
59
+ _RE_ITALIC_UNDERSCORE = re.compile(r"(?<!\w)_([^_\n]+)_(?!\w)")
60
+ _RE_STRIKE = re.compile(r"~~([^~\n]+)~~")
61
+
62
+ # Inline HTML tags that should pass through inline (commonly used in ARIS docs).
63
+ _INLINE_HTML_TAGS = ("br", "img", "a", "span", "sub", "sup", "code", "kbd", "b", "i", "u", "strong", "em")
64
+
65
+ # URL schemes considered safe for href/src. javascript:, data:, vbscript: blocked.
66
+ _SAFE_URL_SCHEMES = ("http:", "https:", "mailto:", "ftp:", "tel:", "#", "/", "./", "../")
67
+
68
+
69
+ def _safe_url(url: str) -> str:
70
+ """Return url if scheme is safe, else '#'. Defensive against javascript: links."""
71
+ s = url.strip().lower()
72
+ # Relative paths and fragments are fine
73
+ if s.startswith(("#", "/", "./", "../")) or s == "":
74
+ return url
75
+ if s.startswith(_SAFE_URL_SCHEMES):
76
+ return url
77
+ # Bare path like "foo/bar.md" or "page.html" — no scheme prefix, safe.
78
+ if ":" not in s.split("/", 1)[0]:
79
+ return url
80
+ # Block javascript:, data:, vbscript:, file:, etc.
81
+ return "#blocked-unsafe-url"
82
+
83
+
84
+ # Tags stripped wholesale from HTML passthrough (block and inline).
85
+ # Even if the workflow LLM hallucinates these, they never reach output.
86
+ _RE_STRIP_TAG = re.compile(
87
+ r"<\s*(script|style|iframe|object|embed|form|input|button|link|meta|base)\b[^>]*>.*?</\s*\1\s*>",
88
+ re.IGNORECASE | re.DOTALL,
89
+ )
90
+ _RE_STRIP_TAG_SELF = re.compile(
91
+ r"<\s*(script|style|iframe|object|embed|form|input|button|link|meta|base)\b[^>]*/?\s*>",
92
+ re.IGNORECASE,
93
+ )
94
+ # Event-handler attributes like onclick=, onload=, etc. — strip these.
95
+ _RE_STRIP_EVENT_ATTR = re.compile(
96
+ r"\s+on[a-z]+\s*=\s*(\"[^\"]*\"|'[^']*'|[^\s>]+)",
97
+ re.IGNORECASE,
98
+ )
99
+ # javascript:/vbscript:/data: in href/src — replace with #blocked.
100
+ _RE_STRIP_DANGEROUS_URL_ATTR = re.compile(
101
+ r"""(\b(?:href|src|action|formaction|poster)\s*=\s*["']?)\s*(?:javascript|vbscript|data)\s*:""",
102
+ re.IGNORECASE,
103
+ )
104
+
105
+
106
+ def sanitize_html(s: str) -> str:
107
+ """Strip dangerous tags / event handlers / javascript: URLs from raw HTML.
108
+
109
+ Applied to: (a) inline-HTML spans we pass through, (b) block-HTML
110
+ passthrough content. Markdown text content is HTML-escaped separately
111
+ and never reaches this function. ARIS workflow artifacts should not
112
+ contain these tags; this is defense-in-depth in case an LLM hallucinates
113
+ one.
114
+ """
115
+ s = _RE_STRIP_TAG.sub("", s)
116
+ s = _RE_STRIP_TAG_SELF.sub("", s)
117
+ s = _RE_STRIP_EVENT_ATTR.sub("", s)
118
+ s = _RE_STRIP_DANGEROUS_URL_ATTR.sub(r"\1#blocked-unsafe-url:", s)
119
+ return s
120
+
121
+
122
+ def render_inline(text: str) -> str:
123
+ """Convert Markdown inline syntax to HTML. Escape everything else.
124
+
125
+ Order matters:
126
+ 1. Stash inline code, math (display+inline), and raw HTML tag-shaped
127
+ spans into placeholders (so we don't expand markdown inside them).
128
+ 2. HTML-escape the remaining text.
129
+ 3. Apply images, links, bold, italic, strike.
130
+ 4. Restore placeholders.
131
+ """
132
+ stash: list[str] = []
133
+
134
+ def store(replacement: str) -> str:
135
+ idx = len(stash)
136
+ stash.append(replacement)
137
+ return _ph(idx)
138
+
139
+ # 1a. Inline code -- escape inner content fully.
140
+ def _code_sub(m: re.Match[str]) -> str:
141
+ return store(f"<code>{html_lib.escape(m.group(1))}</code>")
142
+
143
+ text = _RE_CODE_INLINE.sub(_code_sub, text)
144
+
145
+ # 1b. Display math (passthrough; MathJax will render).
146
+ def _md_sub(m: re.Match[str]) -> str:
147
+ body = m.group(1)
148
+ return store(f"$${body}$$")
149
+
150
+ text = _RE_MATH_DISPLAY.sub(_md_sub, text)
151
+
152
+ # 1c. Inline math (passthrough).
153
+ def _mi_sub(m: re.Match[str]) -> str:
154
+ body = m.group(1)
155
+ return store(f"${body}$")
156
+
157
+ text = _RE_MATH_INLINE.sub(_mi_sub, text)
158
+
159
+ # 1d. Inline HTML spans (very limited allowlist + sanitize before stash).
160
+ _re_tag = re.compile(
161
+ r"<(/?)(" + "|".join(_INLINE_HTML_TAGS) + r")(\s[^<>]*)?>",
162
+ re.IGNORECASE,
163
+ )
164
+
165
+ def _tag_sub(m: re.Match[str]) -> str:
166
+ return store(sanitize_html(m.group(0)))
167
+
168
+ text = _re_tag.sub(_tag_sub, text)
169
+
170
+ # 2. HTML-escape remainder.
171
+ text = html_lib.escape(text, quote=False)
172
+
173
+ # 3. Apply markdown emphasis & links.
174
+ def _img_sub(m: re.Match[str]) -> str:
175
+ alt = html_lib.escape(m.group(1), quote=True)
176
+ src = html_lib.escape(_safe_url(m.group(2)), quote=True)
177
+ title = m.group(3)
178
+ title_attr = f' title="{html_lib.escape(title, quote=True)}"' if title else ""
179
+ return f'<img src="{src}" alt="{alt}"{title_attr} />'
180
+
181
+ text = _RE_IMG.sub(_img_sub, text)
182
+
183
+ def _link_sub(m: re.Match[str]) -> str:
184
+ label = m.group(1) # inner label can still contain code placeholders; ok.
185
+ href = html_lib.escape(_safe_url(m.group(2)), quote=True)
186
+ title = m.group(3)
187
+ title_attr = f' title="{html_lib.escape(title, quote=True)}"' if title else ""
188
+ return f'<a href="{href}"{title_attr}>{label}</a>'
189
+
190
+ text = _RE_LINK.sub(_link_sub, text)
191
+ text = _RE_BOLD.sub(r"<strong>\1</strong>", text)
192
+ text = _RE_ITALIC.sub(r"<em>\1</em>", text)
193
+ text = _RE_ITALIC_UNDERSCORE.sub(r"<em>\1</em>", text)
194
+ text = _RE_STRIKE.sub(r"<del>\1</del>", text)
195
+
196
+ # 4. Restore placeholders.
197
+ def _restore(m: re.Match[str]) -> str:
198
+ idx = int(m.group(1))
199
+ return stash[idx]
200
+
201
+ text = re.sub(rf"{_PH_OPEN}(\d+){_PH_CLOSE}", _restore, text)
202
+ return text
203
+
204
+
205
+ # ---------------------------------------------------------------------------
206
+ # Block parsing
207
+ # ---------------------------------------------------------------------------
208
+
209
+ _RE_HEADING = re.compile(r"^(#{1,6})\s+(.+?)\s*#*\s*$")
210
+ _RE_HR = re.compile(r"^\s*(?:-{3,}|\*{3,}|_{3,})\s*$")
211
+ _RE_CODE_FENCE = re.compile(r"^```(\w+)?\s*$")
212
+ _RE_TABLE_DIVIDER = re.compile(r"^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|?\s*$")
213
+ _RE_ORDERED = re.compile(r"^(\s*)(\d+)[.)]\s+(.*)$")
214
+ _RE_UNORDERED = re.compile(r"^(\s*)[-*+]\s+(.*)$")
215
+ _RE_BLOCKQUOTE = re.compile(r"^>\s?(.*)$")
216
+ _RE_HTML_BLOCK_OPEN = re.compile(
217
+ r"^\s*<(details|div|figure|table|p|ul|ol|nav|section|aside|header|footer|main|article|blockquote)(\s|>|/>)",
218
+ re.IGNORECASE,
219
+ )
220
+
221
+ _CALLOUT_PREFIX_MAP = [
222
+ # (regex on first content, css class, default title)
223
+ (re.compile(r"^[⚠️⚠]️?\s*"), "callout-warn", "Warning"),
224
+ (re.compile(r"^💡\s*"), "callout-info", "Tip"),
225
+ (re.compile(r"^✅\s*"), "callout-good", "OK"),
226
+ (re.compile(r"^✓\s*"), "callout-good", "OK"),
227
+ (re.compile(r"^❌\s*"), "callout-bad", "Blocked"),
228
+ (re.compile(r"^🔒\s*"), "callout-good", "Guarantee"),
229
+ (re.compile(r"^📝\s*"), "callout-info", "Note"),
230
+ (re.compile(r"^🚨\s*"), "callout-bad", "Critical"),
231
+ (re.compile(r"^🛠\s*"), "callout-info", "Note"),
232
+ (re.compile(r"^🆕\s*"), "callout-info", "New"),
233
+ (re.compile(r"^⚙️⚡?\s*"), "callout-info", "Config"),
234
+ (re.compile(r"^🔁\s*"), "callout-info", "Loop"),
235
+ (re.compile(r"^🌱\s*"), "callout-info", "Note"),
236
+ (re.compile(r"^📚\s*"), "callout-info", "Reference"),
237
+ (re.compile(r"^🧬\s*"), "callout-info", "Meta"),
238
+ ]
239
+
240
+
241
+ def _slugify(text: str) -> str:
242
+ text = re.sub(r"[`*_~$]", "", text)
243
+ text = re.sub(r"\s+", "-", text.strip().lower())
244
+ text = re.sub(r"[^a-z0-9一-鿿\-]", "", text)
245
+ return text.strip("-") or "section"
246
+
247
+
248
+ def parse_blocks(lines: list[str]) -> list[dict]:
249
+ blocks: list[dict] = []
250
+ i = 0
251
+ n = len(lines)
252
+ while i < n:
253
+ line = lines[i]
254
+ stripped = line.rstrip()
255
+
256
+ # Blank line — skip.
257
+ if not stripped.strip():
258
+ i += 1
259
+ continue
260
+
261
+ # Code fence.
262
+ m = _RE_CODE_FENCE.match(stripped)
263
+ if m:
264
+ lang = (m.group(1) or "").strip()
265
+ body: list[str] = []
266
+ i += 1
267
+ while i < n and not _RE_CODE_FENCE.match(lines[i].rstrip()):
268
+ body.append(lines[i])
269
+ i += 1
270
+ if i < n: # consume closing fence
271
+ i += 1
272
+ blocks.append({"type": "code", "lang": lang, "content": "\n".join(body)})
273
+ continue
274
+
275
+ # ATX heading.
276
+ m = _RE_HEADING.match(stripped)
277
+ if m:
278
+ level = len(m.group(1))
279
+ text = m.group(2).strip()
280
+ blocks.append({"type": "heading", "level": level, "text": text})
281
+ i += 1
282
+ continue
283
+
284
+ # Horizontal rule.
285
+ if _RE_HR.match(stripped):
286
+ blocks.append({"type": "hr"})
287
+ i += 1
288
+ continue
289
+
290
+ # Table: current line has at least one `|`, AND next line is a divider.
291
+ if "|" in stripped and i + 1 < n and _RE_TABLE_DIVIDER.match(lines[i + 1].rstrip()):
292
+ header = stripped
293
+ divider = lines[i + 1].rstrip()
294
+ rows: list[str] = []
295
+ j = i + 2
296
+ while j < n and "|" in lines[j] and lines[j].strip():
297
+ rows.append(lines[j].rstrip())
298
+ j += 1
299
+ blocks.append({"type": "table", "header": header, "divider": divider, "rows": rows})
300
+ i = j
301
+ continue
302
+
303
+ # HTML block — passthrough until the closing tag is reached. Per
304
+ # CommonMark §4.6 (loosely): treat the block as ending on the first
305
+ # line that *starts* with the matching </tag>. We track depth only
306
+ # for opening/closing tags that appear at line start (after optional
307
+ # whitespace), so inline mentions like `<details>` inside backticks
308
+ # in a paragraph don't perturb the counter.
309
+ if _RE_HTML_BLOCK_OPEN.match(line):
310
+ tag_m = _RE_HTML_BLOCK_OPEN.match(line)
311
+ assert tag_m is not None
312
+ tag = tag_m.group(1).lower()
313
+ line_open_re = re.compile(rf"^\s*<{re.escape(tag)}(?=[\s/>])", re.IGNORECASE)
314
+ line_close_re = re.compile(rf"^\s*</{re.escape(tag)}(?=[\s>])", re.IGNORECASE)
315
+ body = [line]
316
+ depth = 1
317
+ # Self-closing tag on the same line: <tag .../>
318
+ if re.search(rf"<{re.escape(tag)}\b[^>]*/\s*>", line, re.IGNORECASE):
319
+ depth = 0
320
+ # Same-line full close: <tag>...</tag> or </tag> on same line as open
321
+ elif re.search(rf"</{re.escape(tag)}(?=[\s>])", line, re.IGNORECASE):
322
+ depth = 0
323
+ i += 1
324
+ while i < n and depth > 0:
325
+ cur = lines[i]
326
+ body.append(cur)
327
+ # Count nested opens/closes at line start only.
328
+ if line_open_re.match(cur):
329
+ depth += 1
330
+ if line_close_re.match(cur):
331
+ depth -= 1
332
+ i += 1
333
+ content = "\n".join(body)
334
+ # Sanitize: strip dangerous tags / event handlers / unsafe URL schemes.
335
+ content = sanitize_html(content)
336
+ blocks.append({"type": "html", "content": content})
337
+ continue
338
+
339
+ # Blockquote.
340
+ if _RE_BLOCKQUOTE.match(stripped):
341
+ quote_lines: list[str] = []
342
+ while i < n:
343
+ m_bq = _RE_BLOCKQUOTE.match(lines[i].rstrip())
344
+ if not m_bq:
345
+ break
346
+ quote_lines.append(m_bq.group(1))
347
+ i += 1
348
+ blocks.append({"type": "blockquote", "lines": quote_lines})
349
+ continue
350
+
351
+ # Ordered or unordered list. Indent-aware: a marker at the same
352
+ # indent as the first item starts a sibling; a marker at deeper
353
+ # indent (or any deeper-indented continuation line) becomes part
354
+ # of the current item's content and is re-parsed recursively in
355
+ # render_list (so nested lists / paragraphs / code blocks work).
356
+ if _RE_ORDERED.match(stripped) or _RE_UNORDERED.match(stripped):
357
+ first_m = _RE_ORDERED.match(lines[i]) or _RE_UNORDERED.match(lines[i])
358
+ base_indent = len(first_m.group(1))
359
+ ordered = bool(_RE_ORDERED.match(lines[i]))
360
+ items: list[str] = []
361
+ current: list[str] = []
362
+ while i < n:
363
+ cur_line = lines[i]
364
+ # Blank line — peek ahead to decide if list continues.
365
+ if cur_line.strip() == "":
366
+ if i + 1 < n:
367
+ nxt = lines[i + 1]
368
+ m_o_next = _RE_ORDERED.match(nxt)
369
+ m_u_next = _RE_UNORDERED.match(nxt)
370
+ if (m_o_next or m_u_next) and len(
371
+ (m_o_next or m_u_next).group(1)
372
+ ) >= base_indent:
373
+ # Continue list; consume blank.
374
+ current.append("")
375
+ i += 1
376
+ continue
377
+ if nxt.startswith(" " * (base_indent + 2)) or nxt.startswith("\t"):
378
+ current.append("")
379
+ i += 1
380
+ continue
381
+ break
382
+ m_o = _RE_ORDERED.match(cur_line)
383
+ m_u = _RE_UNORDERED.match(cur_line)
384
+ if m_o or m_u:
385
+ marker_indent = len((m_o or m_u).group(1))
386
+ if marker_indent == base_indent:
387
+ # Sibling item at same level.
388
+ if current:
389
+ items.append("\n".join(current).rstrip())
390
+ current = []
391
+ current.append((m_o or m_u).group(3 if m_o else 2))
392
+ i += 1
393
+ continue
394
+ if marker_indent > base_indent:
395
+ # Nested item — append the line with reduced indent
396
+ # (strip base_indent + 2 spaces so the nested parse
397
+ # sees the marker at column 0 of its own context).
398
+ strip = base_indent + 2
399
+ current.append(
400
+ cur_line[strip:] if cur_line[:strip].strip() == "" else cur_line.lstrip()
401
+ )
402
+ i += 1
403
+ continue
404
+ # Marker at shallower indent — list ends here.
405
+ break
406
+ # Non-marker line: continuation of current item if indented
407
+ # past base_indent + 2 (or any indent for the "lazy continuation"
408
+ # convention).
409
+ if cur_line.startswith(" " * (base_indent + 2)) or cur_line.startswith("\t"):
410
+ strip = base_indent + 2
411
+ current.append(
412
+ cur_line[strip:] if cur_line[:strip].strip() == "" else cur_line.lstrip()
413
+ )
414
+ i += 1
415
+ continue
416
+ # Anything else at base_indent or shallower → list ends.
417
+ break
418
+ if current:
419
+ items.append("\n".join(current).rstrip())
420
+ blocks.append({"type": "list", "ordered": ordered, "items": items})
421
+ continue
422
+
423
+ # Paragraph: gather lines until blank or block boundary.
424
+ para: list[str] = [stripped]
425
+ i += 1
426
+ while i < n:
427
+ nxt = lines[i].rstrip()
428
+ if not nxt.strip():
429
+ break
430
+ if (_RE_HEADING.match(nxt) or _RE_CODE_FENCE.match(nxt) or _RE_HR.match(nxt) or
431
+ _RE_BLOCKQUOTE.match(nxt) or _RE_ORDERED.match(nxt) or
432
+ _RE_UNORDERED.match(nxt) or _RE_HTML_BLOCK_OPEN.match(lines[i]) or
433
+ ("|" in nxt and i + 1 < n and _RE_TABLE_DIVIDER.match(lines[i + 1].rstrip()))):
434
+ break
435
+ para.append(nxt)
436
+ i += 1
437
+ blocks.append({"type": "paragraph", "text": " ".join(para)})
438
+ return blocks
439
+
440
+
441
+ # ---------------------------------------------------------------------------
442
+ # Block rendering
443
+ # ---------------------------------------------------------------------------
444
+
445
+
446
+ def render_table(header: str, divider: str, rows: list[str]) -> str:
447
+ def split_row(s: str) -> list[str]:
448
+ s = s.strip()
449
+ if s.startswith("|"):
450
+ s = s[1:]
451
+ if s.endswith("|"):
452
+ s = s[:-1]
453
+ return [c.strip() for c in s.split("|")]
454
+
455
+ header_cells = split_row(header)
456
+ align = []
457
+ for cell in split_row(divider):
458
+ cell = cell.strip()
459
+ if cell.startswith(":") and cell.endswith(":"):
460
+ align.append("center")
461
+ elif cell.endswith(":"):
462
+ align.append("right")
463
+ else:
464
+ align.append("left")
465
+
466
+ def cell_attr(idx: int) -> str:
467
+ if idx < len(align) and align[idx] != "left":
468
+ return f' style="text-align:{align[idx]}"'
469
+ return ""
470
+
471
+ out: list[str] = ["<table>", "<thead><tr>"]
472
+ for idx, cell in enumerate(header_cells):
473
+ out.append(f"<th{cell_attr(idx)}>{render_inline(cell)}</th>")
474
+ out.append("</tr></thead>")
475
+ out.append("<tbody>")
476
+ for row in rows:
477
+ out.append("<tr>")
478
+ for idx, cell in enumerate(split_row(row)):
479
+ out.append(f"<td{cell_attr(idx)}>{render_inline(cell)}</td>")
480
+ out.append("</tr>")
481
+ out.append("</tbody></table>")
482
+ return "".join(out)
483
+
484
+
485
+ def render_blockquote(quote_lines: list[str]) -> str:
486
+ """Detect callout style (emoji prefix) and render with callout class."""
487
+ if not quote_lines:
488
+ return "<blockquote></blockquote>"
489
+ first = quote_lines[0]
490
+ css_class = None
491
+ title = None
492
+ body_lines = list(quote_lines)
493
+ # Try matching callout prefix on the first non-empty line.
494
+ first_nonempty_idx = 0
495
+ while first_nonempty_idx < len(body_lines) and not body_lines[first_nonempty_idx].strip():
496
+ first_nonempty_idx += 1
497
+ if first_nonempty_idx < len(body_lines):
498
+ line0 = body_lines[first_nonempty_idx].lstrip()
499
+ for pattern, klass, default_title in _CALLOUT_PREFIX_MAP:
500
+ m = pattern.match(line0)
501
+ if m:
502
+ css_class = klass
503
+ title = default_title
504
+ # Strip emoji + try to extract a **Bold:** title prefix.
505
+ rest = pattern.sub("", line0, count=1)
506
+ m_title = re.match(r"\*\*([^*\n]+?)\*\*[::\s\-—]+\s*", rest)
507
+ if m_title:
508
+ title = m_title.group(1)
509
+ rest = rest[m_title.end():]
510
+ body_lines[first_nonempty_idx] = rest
511
+ break
512
+
513
+ inner_md = "\n".join(body_lines).strip("\n")
514
+ inner_blocks = parse_blocks(inner_md.split("\n")) if inner_md else []
515
+ inner_html, _ = _render_blocks(inner_blocks, collect_toc=False)
516
+ if css_class:
517
+ title_html = f'<div class="callout-title">{html_lib.escape(title or "")}</div>' if title else ""
518
+ return f'<div class="callout {css_class}">{title_html}{inner_html}</div>'
519
+ return f"<blockquote>{inner_html}</blockquote>"
520
+
521
+
522
+ def render_list(ordered: bool, items: list[str]) -> str:
523
+ tag = "ol" if ordered else "ul"
524
+ out = [f"<{tag}>"]
525
+ for item in items:
526
+ # Nested lists are possible — parse the item body as blocks.
527
+ item_blocks = parse_blocks(item.split("\n"))
528
+ # Common case: single paragraph — emit inline directly.
529
+ if len(item_blocks) == 1 and item_blocks[0]["type"] == "paragraph":
530
+ out.append(f"<li>{render_inline(item_blocks[0]['text'])}</li>")
531
+ else:
532
+ inner, _ = _render_blocks(item_blocks, collect_toc=False)
533
+ out.append(f"<li>{inner}</li>")
534
+ out.append(f"</{tag}>")
535
+ return "".join(out)
536
+
537
+
538
+ def render_code(lang: str, content: str) -> str:
539
+ escaped = html_lib.escape(content)
540
+ if lang:
541
+ return f'<pre><code class="language-{html_lib.escape(lang, quote=True)}">{escaped}</code></pre>'
542
+ # Heuristic: if content looks like an ASCII art diagram (mostly box-drawing
543
+ # chars and pipes), tag the surrounding <pre> with class="diagram".
544
+ diagram_chars = set("│─┌┐└┘├┤┬┴┼▲▼◀▶━┃┏┓┗┛╭╮╰╯═║╔╗╚╝╠╣╦╩╬║▶▼─")
545
+ sample = content[:200]
546
+ if sample and sum(1 for c in sample if c in diagram_chars) >= 4:
547
+ return f'<pre class="diagram"><code>{escaped}</code></pre>'
548
+ return f"<pre><code>{escaped}</code></pre>"
549
+
550
+
551
+ def _render_blocks(
552
+ blocks: list[dict],
553
+ collect_toc: bool,
554
+ used_ids: dict | None = None,
555
+ ) -> tuple[str, list[dict]]:
556
+ if used_ids is None:
557
+ used_ids = {}
558
+ out: list[str] = []
559
+ toc: list[dict] = []
560
+ for b in blocks:
561
+ t = b["type"]
562
+ if t == "heading":
563
+ level = b["level"]
564
+ text = b["text"]
565
+ inline = render_inline(text)
566
+ base_id = _slugify(text)
567
+ uid = base_id
568
+ n = used_ids.get(base_id, 0)
569
+ if n > 0:
570
+ uid = f"{base_id}-{n}"
571
+ used_ids[base_id] = n + 1
572
+ out.append(f'<h{level} id="{uid}">{inline}</h{level}>')
573
+ if collect_toc and 2 <= level <= 3:
574
+ toc.append({"level": level, "id": uid, "text": text})
575
+ elif t == "paragraph":
576
+ out.append(f"<p>{render_inline(b['text'])}</p>")
577
+ elif t == "hr":
578
+ out.append("<hr />")
579
+ elif t == "code":
580
+ out.append(render_code(b.get("lang", ""), b["content"]))
581
+ elif t == "blockquote":
582
+ out.append(render_blockquote(b["lines"]))
583
+ elif t == "list":
584
+ out.append(render_list(b["ordered"], b["items"]))
585
+ elif t == "table":
586
+ out.append(render_table(b["header"], b["divider"], b["rows"]))
587
+ elif t == "html":
588
+ out.append(_render_html_block(b["content"]))
589
+ else:
590
+ out.append(f"<!-- unknown block: {html_lib.escape(t)} -->")
591
+ return "\n".join(out), toc
592
+
593
+
594
+ def _render_html_block(content: str) -> str:
595
+ """For <details>...</details> blocks, parse the inner content as Markdown.
596
+
597
+ Matches GitHub-flavored convention: when a `<details>` block has a blank
598
+ line separating its `<summary>` from the body, the body is parsed as
599
+ markdown (lists, headings, code, callouts all work). For non-<details>
600
+ HTML blocks, content passes through verbatim.
601
+ """
602
+ lines = content.split("\n")
603
+ if not lines or not lines[0].lstrip().lower().startswith("<details"):
604
+ return content
605
+ # Locate opening boundary: after </summary> if present, else after the
606
+ # <details> line itself.
607
+ open_end = 1 # default: just past the <details> line
608
+ summary_close_re = re.compile(r"</summary\s*>", re.IGNORECASE)
609
+ for j in range(1, len(lines)):
610
+ if summary_close_re.search(lines[j]):
611
+ open_end = j + 1
612
+ break
613
+ # If we hit non-summary content first, no `<summary>` block; stop scanning.
614
+ if lines[j].strip() and not re.match(r"\s*<summary", lines[j], re.IGNORECASE):
615
+ break
616
+ # Locate closing boundary: the last </details> line.
617
+ close_start = len(lines) - 1
618
+ close_re = re.compile(r"^\s*</details\s*>", re.IGNORECASE)
619
+ while close_start > 0 and not close_re.match(lines[close_start]):
620
+ close_start -= 1
621
+ if open_end >= close_start:
622
+ # Degenerate or empty body; emit raw.
623
+ return content
624
+ open_part = "\n".join(lines[:open_end])
625
+ inner_md = "\n".join(lines[open_end:close_start]).strip("\n")
626
+ close_part = "\n".join(lines[close_start:])
627
+ if not inner_md.strip():
628
+ return content
629
+ inner_blocks = parse_blocks(inner_md.split("\n"))
630
+ inner_html, _ = _render_blocks(inner_blocks, collect_toc=False)
631
+ return f"{open_part}\n{inner_html}\n{close_part}"
632
+
633
+
634
+ def render_toc(toc: list[dict]) -> str:
635
+ """Render a nested TOC. Groups consecutive H3s under their preceding H2.
636
+
637
+ Orphan H3 (H3 without a preceding H2 in this run) is promoted to a
638
+ top-level <li>. Output is well-formed `<ol><li>...<ul><li>...</li></ul>...</li></ol>`.
639
+ """
640
+ if not toc:
641
+ return ""
642
+ grouped: list[tuple[dict, list[dict]]] = [] # [(h2_entry, [h3_children])]
643
+ current_parent: dict | None = None
644
+ current_children: list[dict] = []
645
+ for entry in toc:
646
+ if entry["level"] == 2:
647
+ if current_parent is not None:
648
+ grouped.append((current_parent, current_children))
649
+ current_parent = entry
650
+ current_children = []
651
+ elif entry["level"] == 3:
652
+ if current_parent is None:
653
+ # Orphan H3 — promote to top level so the TOC stays well-formed.
654
+ grouped.append((entry, []))
655
+ else:
656
+ current_children.append(entry)
657
+ if current_parent is not None:
658
+ grouped.append((current_parent, current_children))
659
+
660
+ out: list[str] = ["<ol>"]
661
+ for parent, children in grouped:
662
+ pid = html_lib.escape(parent["id"], quote=True)
663
+ ptext = html_lib.escape(parent["text"])
664
+ out.append(f'<li><a href="#{pid}">{ptext}</a>')
665
+ if children:
666
+ out.append("<ul>")
667
+ for c in children:
668
+ cid = html_lib.escape(c["id"], quote=True)
669
+ ctext = html_lib.escape(c["text"])
670
+ out.append(f'<li><a href="#{cid}">{ctext}</a></li>')
671
+ out.append("</ul>")
672
+ out.append("</li>")
673
+ out.append("</ol>")
674
+ return "\n".join(out)
675
+
676
+
677
+ def strip_frontmatter(md: str) -> str:
678
+ """Strip leading YAML frontmatter (--- ... ---) if present at start."""
679
+ md = md.lstrip("\ufeff")
680
+ lines = md.split("\n", 1)
681
+ if not lines or lines[0].strip() != "---":
682
+ return md
683
+ # find closing ---
684
+ rest = lines[1] if len(lines) > 1 else ""
685
+ parts = rest.split("\n---\n", 1)
686
+ if len(parts) == 2:
687
+ return parts[1].lstrip("\n")
688
+ # try also \n--- at the very end of a line
689
+ parts = rest.split("\n---", 1)
690
+ if len(parts) == 2 and (parts[1] == "" or parts[1].startswith("\n")):
691
+ return parts[1].lstrip("\n")
692
+ return md
693
+
694
+
695
+ # ---------------------------------------------------------------------------
696
+ # Template loading + main
697
+ # ---------------------------------------------------------------------------
698
+
699
+ CDN_BLOCK_FULL = """<!-- MathJax 3 -->
700
+ <script>
701
+ window.MathJax = {
702
+ tex: { inlineMath: [['$', '$'], ['\\\\(', '\\\\)']], displayMath: [['$$', '$$'], ['\\\\[', '\\\\]']], processEscapes: true },
703
+ options: { skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'] }
704
+ };
705
+ </script>
706
+ <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" async></script>
707
+
708
+ <!-- highlight.js -->
709
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/atom-one-light.min.css">
710
+ <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js"></script>
711
+ <script>document.addEventListener('DOMContentLoaded', () => hljs.highlightAll());</script>
712
+ """
713
+
714
+ CDN_BLOCK_OFFLINE = "<!-- offline mode: MathJax + highlight.js skipped; math and code blocks render as plain text -->"
715
+
716
+
717
+ def load_template(name: str) -> str:
718
+ path = TEMPLATES_DIR / f"{name}.html"
719
+ if not path.exists():
720
+ raise SystemExit(
721
+ f"error: template '{name}' not found at {path}. "
722
+ f"Available: {[p.stem for p in TEMPLATES_DIR.glob('*.html')]}"
723
+ )
724
+ return path.read_text(encoding="utf-8")
725
+
726
+
727
+ def sha256_of(text: str) -> str:
728
+ return hashlib.sha256(text.encode("utf-8")).hexdigest()
729
+
730
+
731
+ def render_json_as_pre(json_path: Path) -> str:
732
+ """Render a sidecar JSON file as a collapsed <details> block of pretty-printed JSON."""
733
+ try:
734
+ obj = json.loads(json_path.read_text(encoding="utf-8"))
735
+ except json.JSONDecodeError as e:
736
+ return f'<div class="callout callout-bad"><div class="callout-title">JSON parse error</div><p>{html_lib.escape(str(e))}</p></div>'
737
+ pretty = json.dumps(obj, ensure_ascii=False, indent=2, sort_keys=False)
738
+ return (
739
+ f'<details><summary>Sidecar JSON: <code>{html_lib.escape(str(json_path))}</code></summary>'
740
+ f'<pre><code class="language-json">{html_lib.escape(pretty)}</code></pre>'
741
+ f'</details>'
742
+ )
743
+
744
+
745
+ def substitute(template: str, vars: dict) -> str:
746
+ out = template
747
+ for k, v in vars.items():
748
+ out = out.replace("{{" + k + "}}", v)
749
+ return out
750
+
751
+
752
+ def _repo_relative(input_path: Path) -> str:
753
+ """Return a display-friendly repo-relative path. Avoids leaking absolute
754
+ /Users/<name>/... in the generated HTML meta + footer.
755
+
756
+ Order: cwd-relative if input is under cwd; else git-root-relative if in
757
+ a git repo; else basename only (parent dirs stripped) so we never
758
+ surface the home directory.
759
+ """
760
+ try:
761
+ return str(input_path.relative_to(Path.cwd()))
762
+ except ValueError:
763
+ pass
764
+ try:
765
+ import subprocess
766
+ result = subprocess.run(
767
+ ["git", "rev-parse", "--show-toplevel"],
768
+ cwd=input_path.parent,
769
+ capture_output=True,
770
+ text=True,
771
+ check=False,
772
+ )
773
+ if result.returncode == 0:
774
+ git_root = Path(result.stdout.strip())
775
+ try:
776
+ return str(input_path.relative_to(git_root))
777
+ except ValueError:
778
+ pass
779
+ except Exception:
780
+ pass
781
+ return input_path.name
782
+
783
+
784
+ def main(argv: list[str] | None = None) -> int:
785
+ ap = argparse.ArgumentParser(
786
+ description="Render an ARIS Markdown artifact to single-file HTML.",
787
+ )
788
+ ap.add_argument("input", help="Path to input .md (or .json — wrapped in a <pre>)")
789
+ ap.add_argument("--template", default="academic", choices=["academic", "dashboard"])
790
+ ap.add_argument("--out", help="Output HTML path (default: <input>.html)")
791
+ ap.add_argument("--title", help="Page title (default: first H1, or filename)")
792
+ ap.add_argument("--subtitle", default="", help="Optional italic subtitle line")
793
+ ap.add_argument("--eyebrow", default="", help="Optional uppercase eyebrow above H1")
794
+ ap.add_argument("--author", default="", help="Optional author byline (e.g., 'Name (姓名), Affiliation')")
795
+ ap.add_argument("--lang", default="zh-CN", help='<html lang="…"> attribute (default zh-CN)')
796
+ ap.add_argument("--state", help="Optional sidecar state JSON to append as <details>")
797
+ ap.add_argument("--json", dest="json_sidecar", help="Optional sidecar JSON to append (e.g., KILL_ARGUMENT.json)")
798
+ ap.add_argument("--offline", action="store_true", help="Skip MathJax / highlight.js CDN blocks")
799
+ ap.add_argument("--no-toc", action="store_true", help="Skip TOC sidebar (forces TOC_LABEL/TOC_HTML to empty)")
800
+ args = ap.parse_args(argv)
801
+
802
+ input_path = Path(args.input).resolve()
803
+ if not input_path.exists():
804
+ print(f"error: input not found: {input_path}", file=sys.stderr)
805
+ return 2
806
+ display_source_path = _repo_relative(input_path)
807
+
808
+ raw = input_path.read_text(encoding="utf-8")
809
+ source_hash = sha256_of(raw)
810
+
811
+ # If the input is JSON, wrap it as a single code block.
812
+ is_json = input_path.suffix.lower() == ".json"
813
+ if is_json:
814
+ try:
815
+ obj = json.loads(raw)
816
+ pretty = json.dumps(obj, ensure_ascii=False, indent=2, sort_keys=False)
817
+ except json.JSONDecodeError:
818
+ pretty = raw
819
+ md_source = f"# {input_path.name}\n\n```json\n{pretty}\n```\n"
820
+ else:
821
+ md_source = strip_frontmatter(raw)
822
+
823
+ blocks = parse_blocks(md_source.split("\n"))
824
+ body_html, toc = _render_blocks(blocks, collect_toc=not args.no_toc)
825
+
826
+ # Title autodetection.
827
+ title = args.title
828
+ if not title:
829
+ # Look for first H1 block.
830
+ for b in blocks:
831
+ if b.get("type") == "heading" and b.get("level") == 1:
832
+ title = b["text"]
833
+ break
834
+ if not title:
835
+ title = input_path.stem.replace("_", " ").replace("-", " ").title()
836
+
837
+ # Append sidecar JSON if requested.
838
+ extra_html_blocks: list[str] = []
839
+ for label, path_str in (("state", args.state), ("json", args.json_sidecar)):
840
+ if path_str:
841
+ p = Path(path_str).resolve()
842
+ if p.exists():
843
+ extra_html_blocks.append(f'<h2 id="sidecar-{label}">Sidecar — <code>{html_lib.escape(p.name)}</code></h2>')
844
+ extra_html_blocks.append(render_json_as_pre(p))
845
+ else:
846
+ extra_html_blocks.append(
847
+ f'<div class="callout callout-warn"><div class="callout-title">Sidecar missing</div>'
848
+ f'<p><code>{html_lib.escape(path_str)}</code> not found.</p></div>'
849
+ )
850
+
851
+ body_html = body_html + ("\n" + "\n".join(extra_html_blocks) if extra_html_blocks else "")
852
+
853
+ template_str = load_template(args.template)
854
+
855
+ toc_html = render_toc(toc) if not args.no_toc else ""
856
+ toc_label = "Contents" if not args.no_toc else ""
857
+ if args.no_toc:
858
+ # Hide TOC entirely by emitting an empty <nav> (template has <nav>, we'd
859
+ # rather just leave structure intact; CSS won't visually break).
860
+ toc_html = ""
861
+
862
+ eyebrow_block = f'<div class="eyebrow">{html_lib.escape(args.eyebrow)}</div>' if args.eyebrow else ""
863
+ subtitle_block = f'<p class="subtitle">{html_lib.escape(args.subtitle)}</p>' if args.subtitle else ""
864
+ byline_block = (
865
+ f'<p class="byline">By <strong>{html_lib.escape(args.author)}</strong></p>'
866
+ if args.author else ""
867
+ )
868
+
869
+ generated_at = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC")
870
+
871
+ vars_ = {
872
+ "LANG": html_lib.escape(args.lang, quote=True),
873
+ "TITLE": html_lib.escape(title),
874
+ "SUBTITLE_BLOCK": subtitle_block,
875
+ "EYEBROW_BLOCK": eyebrow_block,
876
+ "BYLINE_BLOCK": byline_block,
877
+ "SOURCE_PATH": html_lib.escape(display_source_path),
878
+ "SOURCE_SHA256": source_hash,
879
+ "SOURCE_SHA256_SHORT": source_hash[:12],
880
+ "GENERATED_AT": generated_at,
881
+ "HEAD_CDN": CDN_BLOCK_OFFLINE if args.offline else CDN_BLOCK_FULL,
882
+ "TOC_HTML": toc_html,
883
+ "TOC_LABEL": toc_label,
884
+ "BODY_HTML": body_html,
885
+ "EXTRA_META": "",
886
+ }
887
+
888
+ rendered = substitute(template_str, vars_)
889
+
890
+ out_path = Path(args.out).resolve() if args.out else input_path.with_suffix(".html")
891
+ if out_path.is_dir():
892
+ print(
893
+ f"error: --out points to a directory: {out_path}. "
894
+ f"Specify a file path ending in .html.",
895
+ file=sys.stderr,
896
+ )
897
+ return 2
898
+ out_path.parent.mkdir(parents=True, exist_ok=True)
899
+ out_path.write_text(rendered, encoding="utf-8")
900
+ print(f"wrote {out_path} ({len(rendered):,} bytes, {len(toc)} TOC entries, source sha256 {source_hash[:12]}...)")
901
+ return 0
902
+
903
+
904
+ if __name__ == "__main__":
905
+ sys.exit(main())