@waoooo/claude-skills 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/README.md +48 -0
  2. package/package.json +28 -0
  3. package/registry.json +431 -0
  4. package/skills/acceptance-review/SKILL.md +537 -0
  5. package/skills/all-plan/SKILL.md +19 -0
  6. package/skills/all-plan/references/flow.md +750 -0
  7. package/skills/api-docs-generate/SKILL.md +204 -0
  8. package/skills/api-docs-generate/assets/templates/api.mdx +140 -0
  9. package/skills/api-docs-generate/scripts/generate-api-docs.ts +308 -0
  10. package/skills/ask/SKILL.md +42 -0
  11. package/skills/autonew/SKILL.md +34 -0
  12. package/skills/capability-analyze/SKILL.md +300 -0
  13. package/skills/capability-analyze/scripts/analyze-capabilities.ts +531 -0
  14. package/skills/capability-docs-generate/SKILL.md +155 -0
  15. package/skills/capability-docs-generate/assets/templates/capability.mdx +271 -0
  16. package/skills/capability-docs-generate/scripts/generate-capability-docs.ts +358 -0
  17. package/skills/capability-tree-query/SKILL.md +112 -0
  18. package/skills/capability-tree-query/scripts/build-capability-tree.ts +402 -0
  19. package/skills/changelog-generator/SKILL.md +104 -0
  20. package/skills/continue/SKILL.md +39 -0
  21. package/skills/continue/agents/openai.yaml +3 -0
  22. package/skills/creating-skills/SKILL.md +158 -0
  23. package/skills/creating-skills/references/official_best_practices.md +128 -0
  24. package/skills/creating-skills/references/skill_examples.md +199 -0
  25. package/skills/docx/LICENSE.txt +30 -0
  26. package/skills/docx/SKILL.md +197 -0
  27. package/skills/docx/docx-js.md +350 -0
  28. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  29. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  30. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  31. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  32. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  33. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  34. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  35. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  36. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  37. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  38. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  39. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  40. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  41. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  42. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  43. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  44. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  45. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  46. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  47. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  48. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  49. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  50. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  51. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  52. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  53. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  54. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  55. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  56. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  57. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  58. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  59. package/skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
  60. package/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  61. package/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  62. package/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  63. package/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  64. package/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  65. package/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  66. package/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  67. package/skills/docx/ooxml/scripts/pack.py +159 -0
  68. package/skills/docx/ooxml/scripts/unpack.py +29 -0
  69. package/skills/docx/ooxml/scripts/validate.py +69 -0
  70. package/skills/docx/ooxml/scripts/validation/__init__.py +15 -0
  71. package/skills/docx/ooxml/scripts/validation/base.py +951 -0
  72. package/skills/docx/ooxml/scripts/validation/docx.py +274 -0
  73. package/skills/docx/ooxml/scripts/validation/pptx.py +315 -0
  74. package/skills/docx/ooxml/scripts/validation/redlining.py +279 -0
  75. package/skills/docx/ooxml.md +610 -0
  76. package/skills/docx/scripts/__init__.py +1 -0
  77. package/skills/docx/scripts/document.py +1276 -0
  78. package/skills/docx/scripts/templates/comments.xml +3 -0
  79. package/skills/docx/scripts/templates/commentsExtended.xml +3 -0
  80. package/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
  81. package/skills/docx/scripts/templates/commentsIds.xml +3 -0
  82. package/skills/docx/scripts/templates/people.xml +3 -0
  83. package/skills/docx/scripts/utilities.py +374 -0
  84. package/skills/git-branch-create/SKILL.md +170 -0
  85. package/skills/git-branch-merge/SKILL.md +176 -0
  86. package/skills/git-commit/SKILL.md +56 -0
  87. package/skills/git-commit/references/commit_examples.md +311 -0
  88. package/skills/github-actions-trigger/SKILL.md +367 -0
  89. package/skills/github-issue-create/SKILL.md +294 -0
  90. package/skills/github-pr-creation/SKILL.md +137 -0
  91. package/skills/github-pr-creation/references/pr_templates.md +187 -0
  92. package/skills/github-pr-merge/SKILL.md +112 -0
  93. package/skills/github-pr-review/SKILL.md +110 -0
  94. package/skills/github-pr-review/references/severity_guide.md +168 -0
  95. package/skills/job-create/SKILL.md +294 -0
  96. package/skills/job-create/scripts/create-job.ts +105 -0
  97. package/skills/job-workflow/SKILL.md +212 -0
  98. package/skills/keyword-extract/SKILL.md +229 -0
  99. package/skills/mcp-builder/LICENSE.txt +202 -0
  100. package/skills/mcp-builder/SKILL.md +236 -0
  101. package/skills/mcp-builder/reference/evaluation.md +602 -0
  102. package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  103. package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
  104. package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
  105. package/skills/mcp-builder/scripts/connections.py +151 -0
  106. package/skills/mcp-builder/scripts/evaluation.py +373 -0
  107. package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  108. package/skills/mcp-builder/scripts/requirements.txt +2 -0
  109. package/skills/mdx-to-openspec/SKILL.md +827 -0
  110. package/skills/mdx-to-openspec/scripts/mdx-to-openspec.ts +320 -0
  111. package/skills/mounted/SKILL.md +20 -0
  112. package/skills/multi-model-review/SKILL.md +459 -0
  113. package/skills/notion-automation/SKILL.md +215 -0
  114. package/skills/openspec-review/SKILL.md +513 -0
  115. package/skills/pdf/LICENSE.txt +30 -0
  116. package/skills/pdf/SKILL.md +294 -0
  117. package/skills/pdf/forms.md +205 -0
  118. package/skills/pdf/reference.md +612 -0
  119. package/skills/pdf/scripts/check_bounding_boxes.py +70 -0
  120. package/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
  121. package/skills/pdf/scripts/check_fillable_fields.py +12 -0
  122. package/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
  123. package/skills/pdf/scripts/create_validation_image.py +41 -0
  124. package/skills/pdf/scripts/extract_form_field_info.py +152 -0
  125. package/skills/pdf/scripts/fill_fillable_fields.py +114 -0
  126. package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
  127. package/skills/pend/SKILL.md +33 -0
  128. package/skills/ping/SKILL.md +39 -0
  129. package/skills/pptx/LICENSE.txt +30 -0
  130. package/skills/pptx/SKILL.md +484 -0
  131. package/skills/pptx/html2pptx.md +625 -0
  132. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  133. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  134. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  135. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  136. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  137. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  138. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  139. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  140. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  141. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  142. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  143. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  144. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  145. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  146. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  147. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  148. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  149. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  150. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  151. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  152. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  153. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  154. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  155. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  156. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  157. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  158. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  159. package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  160. package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  161. package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  162. package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  163. package/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
  164. package/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  165. package/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  166. package/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  167. package/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  168. package/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  169. package/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  170. package/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  171. package/skills/pptx/ooxml/scripts/pack.py +159 -0
  172. package/skills/pptx/ooxml/scripts/unpack.py +29 -0
  173. package/skills/pptx/ooxml/scripts/validate.py +69 -0
  174. package/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
  175. package/skills/pptx/ooxml/scripts/validation/base.py +951 -0
  176. package/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
  177. package/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
  178. package/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
  179. package/skills/pptx/ooxml.md +427 -0
  180. package/skills/pptx/scripts/html2pptx.js +979 -0
  181. package/skills/pptx/scripts/inventory.py +1020 -0
  182. package/skills/pptx/scripts/rearrange.py +231 -0
  183. package/skills/pptx/scripts/replace.py +385 -0
  184. package/skills/pptx/scripts/thumbnail.py +450 -0
  185. package/skills/progress-update/SKILL.md +394 -0
  186. package/skills/progress-update/scripts/update-progress.ts +221 -0
  187. package/skills/release-automation/SKILL.md +306 -0
  188. package/skills/requirement-parse/SKILL.md +212 -0
  189. package/skills/requirement-parse/scripts/infer-builder-config.ts +346 -0
  190. package/skills/requirement-parse/scripts/merge-requirements.ts +228 -0
  191. package/skills/requirement-parse/scripts/parse-docs.ts +206 -0
  192. package/skills/requirement-parse/scripts/parse-openspec.ts +168 -0
  193. package/skills/roadmap-docs-generate/SKILL.md +483 -0
  194. package/skills/roadmap-docs-generate/assets/templates/ROADMAP.mdx +75 -0
  195. package/skills/roadmap-docs-generate/assets/templates/ROADMAP.mdx.template +330 -0
  196. package/skills/roadmap-docs-generate/assets/templates/TODO.mdx +56 -0
  197. package/skills/roadmap-docs-generate/assets/templates/TODO.mdx.template +363 -0
  198. package/skills/roadmap-docs-generate/scripts/json-to-mdx.ts +445 -0
  199. package/skills/roadmap-docs-generate/scripts/json-to-mdx.ts.backup +411 -0
  200. package/skills/roadmap-generate/SKILL.md +396 -0
  201. package/skills/roadmap-generate/scripts/generate-roadmap.ts +496 -0
  202. package/skills/skill-creator/LICENSE.txt +202 -0
  203. package/skills/skill-creator/SKILL.md +356 -0
  204. package/skills/skill-creator/references/output-patterns.md +82 -0
  205. package/skills/skill-creator/references/workflows.md +28 -0
  206. package/skills/skill-creator/scripts/init_skill.py +303 -0
  207. package/skills/skill-creator/scripts/package_skill.py +110 -0
  208. package/skills/skill-creator/scripts/quick_validate.py +95 -0
  209. package/skills/spec-generate/SKILL.md +408 -0
  210. package/skills/spec-generate/scripts/generate-specs.ts +538 -0
  211. package/skills/spec-generate/scripts/generate-tasks.ts +174 -0
  212. package/skills/specs-review/SKILL.md +370 -0
  213. package/skills/task-execute/SKILL.md +399 -0
  214. package/skills/task-update-status/SKILL.md +349 -0
  215. package/skills/task-update-status/scripts/update-task-status.ts +192 -0
  216. package/skills/task-verify/SKILL.md +407 -0
  217. package/skills/ui-ux-pro-max/SKILL.md +386 -0
  218. package/skills/ui-ux-pro-max/data/charts.csv +26 -0
  219. package/skills/ui-ux-pro-max/data/colors.csv +97 -0
  220. package/skills/ui-ux-pro-max/data/icons.csv +101 -0
  221. package/skills/ui-ux-pro-max/data/landing.csv +31 -0
  222. package/skills/ui-ux-pro-max/data/products.csv +97 -0
  223. package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  224. package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  225. package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  226. package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  227. package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  228. package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  229. package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  230. package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  231. package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  232. package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  233. package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  234. package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  235. package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  236. package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  237. package/skills/ui-ux-pro-max/data/styles.csv +68 -0
  238. package/skills/ui-ux-pro-max/data/typography.csv +58 -0
  239. package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  240. package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  241. package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  242. package/skills/ui-ux-pro-max/scripts/core.py +253 -0
  243. package/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  244. package/skills/ui-ux-pro-max/scripts/search.py +114 -0
  245. package/skills/vercel-automation/SKILL.md +226 -0
  246. package/skills/webapp-testing/LICENSE.txt +202 -0
  247. package/skills/webapp-testing/SKILL.md +96 -0
  248. package/skills/webapp-testing/examples/console_logging.py +35 -0
  249. package/skills/webapp-testing/examples/element_discovery.py +40 -0
  250. package/skills/webapp-testing/examples/static_html_automation.py +33 -0
  251. package/skills/webapp-testing/scripts/with_server.py +106 -0
  252. package/skills/worktree-manager/SKILL.md +725 -0
  253. package/skills/worktree-manager/config.json +15 -0
  254. package/skills/worktree-manager/scripts/allocate-ports.sh +100 -0
  255. package/skills/worktree-manager/scripts/cleanup.sh +185 -0
  256. package/skills/worktree-manager/scripts/launch-agent.sh +155 -0
  257. package/skills/worktree-manager/scripts/register.sh +125 -0
  258. package/skills/worktree-manager/scripts/release-ports.sh +48 -0
  259. package/skills/worktree-manager/scripts/status.sh +169 -0
  260. package/skills/worktree-manager/scripts/sync.sh +168 -0
  261. package/skills/worktree-manager/templates/worktree.json +23 -0
  262. package/skills/xlsx/LICENSE.txt +30 -0
  263. package/skills/xlsx/SKILL.md +289 -0
  264. package/skills/xlsx/recalc.py +178 -0
@@ -0,0 +1,271 @@
1
+ ---
2
+ title: '概览'
3
+ description: 'L2 [能力名称] - 简短描述'
4
+ ---
5
+
6
+ ## 概述
7
+
8
+ [能力名称] 是 Waoooo 平台的**统一 [服务类型] 服务**,负责对接多个 [外部服务类型],提供统一的 [功能] 接口。
9
+
10
+ **核心功能**:
11
+ - [核心功能 1]
12
+ - [核心功能 2]
13
+ - [核心功能 3]
14
+ - [核心功能 4]
15
+
16
+ **能力定位**:
17
+ - 属于 **L2 连接能力层**
18
+ - 只负责 [核心职责],不负责业务逻辑
19
+ - 触发后续流程(通知 [相关服务])
20
+
21
+ ---
22
+
23
+ ## 核心职责
24
+
25
+ ### ✅ 负责什么
26
+
27
+ - **[职责 1]**:[详细说明]
28
+ - **[职责 2]**:[详细说明]
29
+ - **[职责 3]**:[详细说明]
30
+
31
+ ### ❌ 不负责什么
32
+
33
+ - **[非职责 1]**:[说明为什么不负责]
34
+ - **[非职责 2]**:[说明为什么不负责]
35
+ - **[非职责 3]**:[说明为什么不负责]
36
+
37
+ ---
38
+
39
+ ## 整体架构
40
+
41
+ ### 系统架构图
42
+
43
+ ```mermaid
44
+ flowchart TB
45
+ subgraph Client["客户端"]
46
+ Web[Web 应用]
47
+ Extension[浏览器插件]
48
+ end
49
+
50
+ subgraph L1API["L1 API Client"]
51
+ APIClient[API Client<br/>HTTP 请求封装]
52
+ end
53
+
54
+ subgraph L2["L2 连接能力层"]
55
+ Gateway[[能力名称]<br/>统一服务]
56
+ end
57
+
58
+ subgraph L1["L1 基础能力层"]
59
+ Service1[相关服务 1]
60
+ Service2[相关服务 2]
61
+ end
62
+
63
+ subgraph Providers["外部服务提供商"]
64
+ Provider1[供应商 1]
65
+ Provider2[供应商 2]
66
+ Provider3[供应商 3]
67
+ end
68
+
69
+ Web --> APIClient
70
+ Extension --> APIClient
71
+ APIClient --> Gateway
72
+
73
+ Gateway --> Service1
74
+ Gateway --> Service2
75
+
76
+ Gateway --> Provider1
77
+ Gateway --> Provider2
78
+ Gateway --> Provider3
79
+
80
+ Provider1 -.Webhook.-> Gateway
81
+ Provider2 -.Webhook.-> Gateway
82
+ Provider3 -.Webhook.-> Gateway
83
+
84
+ style Gateway fill:#e1f5ff
85
+ style Service1 fill:#fff3cd
86
+ style Service2 fill:#fff3cd
87
+ style APIClient fill:#fff3cd
88
+ ```
89
+
90
+ **架构说明**:
91
+ - **客户端**:Web 应用和浏览器插件发起请求
92
+ - **API Client (L1)**:前端统一 HTTP 请求封装,自动注入认证 Token
93
+ - **[能力名称] (L2)**:统一的 [服务类型] 服务,对接多个外部供应商
94
+ - **L1 能力层**:[相关服务列表]
95
+ - **外部供应商**:[供应商列表]
96
+
97
+ <Note>
98
+ **API Client 说明**:
99
+ - 所有前端到后端的 API 请求都通过 **L1 API Client** 统一处理
100
+ - API Client 自动注入认证 Token、处理请求/响应拦截、统一错误处理
101
+ - L1-L2 层之间的交互也是通过 API 调用实现
102
+ </Note>
103
+
104
+ ---
105
+
106
+ ## 当前实现状态
107
+
108
+ ### ✅ 已实现([主要供应商])
109
+
110
+ **后端功能**:
111
+ - ✅ [供应商] 集成
112
+ - ✅ [核心功能 1]
113
+ - ✅ [核心功能 2]
114
+ - ✅ Webhook 处理和签名验证
115
+ - ✅ 错误处理和重试机制
116
+
117
+ **前端功能**:
118
+ - ✅ [前端功能 1]
119
+ - ✅ [前端功能 2]
120
+ - ✅ [前端功能 3]
121
+
122
+ **代码位置**:
123
+ - 后端:`waoooo-service/app/[module]/`
124
+ - 前端:`waoooo-web/packages/@waoooo/[package]/`
125
+
126
+ ### ⚠️ 架构问题
127
+
128
+ <Warning>
129
+ **当前架构存在的问题**:
130
+
131
+ **问题描述**:
132
+ - [问题 1]
133
+ - [问题 2]
134
+ - [问题 3]
135
+
136
+ **影响**:
137
+ - [影响说明 1]
138
+ - [影响说明 2]
139
+
140
+ **解决方案**:
141
+ - ✅ **[方案 1]**:[说明]
142
+ - ⚠️ **[方案 2]**:[说明]
143
+ </Warning>
144
+
145
+ ### 🔄 计划支持
146
+
147
+ <Note>
148
+ **未来规划**:
149
+
150
+ - **[功能 1]**:[说明]
151
+ - **[功能 2]**:[说明]
152
+ - **[功能 3]**:[说明]
153
+
154
+ **架构要求**:
155
+ - 统一的接口设计
156
+ - 可切换的服务提供商
157
+ - 向后兼容
158
+ </Note>
159
+
160
+ ---
161
+
162
+ ## 快速开始
163
+
164
+ ### 后端调用示例
165
+
166
+ ```python
167
+ # 示例代码
168
+ from app.[module] import [ServiceClass]
169
+
170
+ # 创建实例
171
+ service = [ServiceClass]()
172
+
173
+ # 调用方法
174
+ result = await service.[method_name](
175
+ param1="value1",
176
+ param2="value2"
177
+ )
178
+ ```
179
+
180
+ ### 前端调用示例
181
+
182
+ ```typescript
183
+ // 示例代码
184
+ import { use[Hook] } from '@waoooo/[package]';
185
+
186
+ function Component() {
187
+ const { [method], loading, error } = use[Hook]();
188
+
189
+ const handleAction = async () => {
190
+ const result = await [method]({
191
+ param1: 'value1',
192
+ param2: 'value2'
193
+ });
194
+ };
195
+
196
+ return (
197
+ // JSX
198
+ );
199
+ }
200
+ ```
201
+
202
+ ---
203
+
204
+ ## 深入了解
205
+
206
+ <CardGroup cols={2}>
207
+ <Card title="核心概念" icon="lightbulb" href="/capabilities/l2-integration/[capability-name]/concepts">
208
+ 了解核心概念和设计思想
209
+ </Card>
210
+
211
+ <Card title="[功能模块 1]" icon="gear" href="/capabilities/l2-integration/[capability-name]/[module-1]">
212
+ [功能模块 1 说明]
213
+ </Card>
214
+
215
+ <Card title="[功能模块 2]" icon="route" href="/capabilities/l2-integration/[capability-name]/[module-2]">
216
+ [功能模块 2 说明]
217
+ </Card>
218
+
219
+ <Card title="[供应商 1]" icon="credit-card" href="/capabilities/l2-integration/[capability-name]/[provider-1]">
220
+ [供应商 1] 集成文档
221
+ </Card>
222
+
223
+ <Card title="[供应商 2]" icon="credit-card" href="/capabilities/l2-integration/[capability-name]/[provider-2]">
224
+ [供应商 2] 集成文档
225
+ </Card>
226
+
227
+ <Card title="[供应商 3]" icon="credit-card" href="/capabilities/l2-integration/[capability-name]/[provider-3]">
228
+ [供应商 3] 集成文档
229
+ </Card>
230
+ </CardGroup>
231
+
232
+ ---
233
+
234
+ ## API 参考
235
+
236
+ <CardGroup cols={2}>
237
+ <Card title="[API 端点 1]" icon="code" href="/api-reference/rest-api/endpoints/[endpoint-1]">
238
+ [API 端点 1 说明]
239
+ </Card>
240
+
241
+ <Card title="[API 端点 2]" icon="code" href="/api-reference/rest-api/endpoints/[endpoint-2]">
242
+ [API 端点 2 说明]
243
+ </Card>
244
+
245
+ <Card title="Webhook" icon="webhook" href="/api-reference/rest-api/endpoints/[webhook]">
246
+ Webhook 回调处理
247
+ </Card>
248
+ </CardGroup>
249
+
250
+ ---
251
+
252
+ ## 项目规划
253
+
254
+ <CardGroup cols={2}>
255
+ <Card title="详细规划" icon="map" href="/planning/[capability-name]">
256
+ 查看详细规划文档
257
+ </Card>
258
+
259
+ <Card title="TODO 任务" icon="list-check" href="/planning/todo/[capability-name]">
260
+ 查看待办任务清单
261
+ </Card>
262
+
263
+ <Card title="ROADMAP" icon="road" href="/planning/ROADMAP">
264
+ 查看项目路线图
265
+ </Card>
266
+ </CardGroup>
267
+
268
+ ---
269
+
270
+ **最后更新**:2026-02-06
271
+ **维护者**:Waoooo Development Team
@@ -0,0 +1,358 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Generate Capability Documentation from OpenSpec and Code
4
+ *
5
+ * This script generates capability documentation by:
6
+ * 1. Reading OpenSpec proposal and design
7
+ * 2. Analyzing code structure and implementation
8
+ * 3. Filling the capability.mdx template with extracted data
9
+ * 4. Outputting to waoooo-docs/developer-docs/capabilities/<layer>/<capability>.mdx
10
+ * 5. Updating mint.json navigation
11
+ *
12
+ * Usage:
13
+ * npx tsx generate-capability-docs.ts \
14
+ * --openspec <openspec-path> \
15
+ * --capability <capability-id> \
16
+ * --layer <l1-foundation|l2-integration|l3-business> \
17
+ * --code <code-path>
18
+ *
19
+ * Example:
20
+ * npx tsx generate-capability-docs.ts \
21
+ * --openspec openspec/changes/001-payment-gateway/ \
22
+ * --capability payment-gateway \
23
+ * --layer l2-integration \
24
+ * --code ../../waoooo-service/app/payment/
25
+ */
26
+
27
+ import fs from 'fs';
28
+ import path from 'path';
29
+ import { fileURLToPath } from 'url';
30
+
31
+ const __filename = fileURLToPath(import.meta.url);
32
+ const __dirname = path.dirname(__filename);
33
+
34
+ // ============================================================================
35
+ // Types
36
+ // ============================================================================
37
+
38
+ interface CapabilityData {
39
+ name: string;
40
+ layer: string;
41
+ description: string;
42
+ coreFeatures: string[];
43
+ responsibilities: {
44
+ what: string[];
45
+ whatNot: string[];
46
+ };
47
+ architecture: {
48
+ diagram: string;
49
+ description: string;
50
+ };
51
+ implementation: {
52
+ status: string;
53
+ backend: string[];
54
+ frontend: string[];
55
+ codePaths: {
56
+ backend: string;
57
+ frontend: string;
58
+ };
59
+ };
60
+ issues: {
61
+ problems: string[];
62
+ impacts: string[];
63
+ solutions: string[];
64
+ };
65
+ futureSupport: string[];
66
+ quickStart: {
67
+ backend: string;
68
+ frontend: string;
69
+ };
70
+ apiEndpoints: string[];
71
+ relatedCapabilities: string[];
72
+ }
73
+
74
+ // ============================================================================
75
+ // CLI Arguments Parsing
76
+ // ============================================================================
77
+
78
+ function parseArgs(): {
79
+ openspecPath: string;
80
+ capabilityId: string;
81
+ layer: string;
82
+ codePath: string;
83
+ } {
84
+ const args = process.argv.slice(2);
85
+ const result: any = {};
86
+
87
+ for (let i = 0; i < args.length; i += 2) {
88
+ const key = args[i].replace('--', '');
89
+ const value = args[i + 1];
90
+ result[key] = value;
91
+ }
92
+
93
+ if (!result.openspec || !result.capability || !result.layer) {
94
+ console.error('❌ Missing required arguments');
95
+ console.error('Usage: generate-capability-docs.ts --openspec <path> --capability <id> --layer <layer> [--code <path>]');
96
+ process.exit(1);
97
+ }
98
+
99
+ return {
100
+ openspecPath: result.openspec,
101
+ capabilityId: result.capability,
102
+ layer: result.layer,
103
+ codePath: result.code || '',
104
+ };
105
+ }
106
+
107
+ // ============================================================================
108
+ // OpenSpec Parsing
109
+ // ============================================================================
110
+
111
+ function readOpenSpec(openspecPath: string): { proposal: string; design: string } {
112
+ const proposalPath = path.join(openspecPath, 'proposal.md');
113
+ const designPath = path.join(openspecPath, 'design.md');
114
+
115
+ if (!fs.existsSync(proposalPath)) {
116
+ throw new Error(`Proposal not found: ${proposalPath}`);
117
+ }
118
+
119
+ const proposal = fs.readFileSync(proposalPath, 'utf-8');
120
+ const design = fs.existsSync(designPath) ? fs.readFileSync(designPath, 'utf-8') : '';
121
+
122
+ return { proposal, design };
123
+ }
124
+
125
+ function extractFromOpenSpec(proposal: string, design: string): Partial<CapabilityData> {
126
+ // Extract title (first # heading)
127
+ const titleMatch = proposal.match(/^#\s+(.+)$/m);
128
+ const name = titleMatch ? titleMatch[1] : 'Unknown Capability';
129
+
130
+ // Extract description (first paragraph after title)
131
+ const descMatch = proposal.match(/^#\s+.+\n\n(.+?)(?:\n\n|$)/m);
132
+ const description = descMatch ? descMatch[1] : '';
133
+
134
+ // Extract core features (look for bullet points under "功能" or "Features")
135
+ const featuresMatch = proposal.match(/##\s+(?:功能|Features|核心功能)[\s\S]*?\n((?:[-*]\s+.+\n?)+)/i);
136
+ const coreFeatures = featuresMatch
137
+ ? featuresMatch[1].split('\n').filter(line => line.trim()).map(line => line.replace(/^[-*]\s+/, '').trim())
138
+ : [];
139
+
140
+ // Extract responsibilities from design
141
+ const responsibilitiesMatch = design.match(/##\s+(?:职责|Responsibilities)[\s\S]*?\n((?:[-*]\s+.+\n?)+)/i);
142
+ const responsibilities = responsibilitiesMatch
143
+ ? responsibilitiesMatch[1].split('\n').filter(line => line.trim()).map(line => line.replace(/^[-*]\s+/, '').trim())
144
+ : [];
145
+
146
+ return {
147
+ name,
148
+ description,
149
+ coreFeatures,
150
+ responsibilities: {
151
+ what: responsibilities.filter(r => !r.includes('不负责') && !r.includes('not responsible')),
152
+ whatNot: responsibilities.filter(r => r.includes('不负责') || r.includes('not responsible')),
153
+ },
154
+ };
155
+ }
156
+
157
+ // ============================================================================
158
+ // Code Analysis
159
+ // ============================================================================
160
+
161
+ function analyzeCode(codePath: string): Partial<CapabilityData> {
162
+ if (!codePath || !fs.existsSync(codePath)) {
163
+ return {
164
+ implementation: {
165
+ status: 'Not Implemented',
166
+ backend: [],
167
+ frontend: [],
168
+ codePaths: { backend: '', frontend: '' },
169
+ },
170
+ };
171
+ }
172
+
173
+ // Simple file listing (can be enhanced with AST parsing)
174
+ const files = fs.readdirSync(codePath, { recursive: true }) as string[];
175
+ const pyFiles = files.filter(f => f.endsWith('.py'));
176
+ const tsFiles = files.filter(f => f.endsWith('.ts') || f.endsWith('.tsx'));
177
+
178
+ return {
179
+ implementation: {
180
+ status: 'Implemented',
181
+ backend: pyFiles.slice(0, 5), // Top 5 files
182
+ frontend: tsFiles.slice(0, 5),
183
+ codePaths: {
184
+ backend: codePath.includes('service') ? codePath : '',
185
+ frontend: codePath.includes('web') ? codePath : '',
186
+ },
187
+ },
188
+ };
189
+ }
190
+
191
+ // ============================================================================
192
+ // Template Filling
193
+ // ============================================================================
194
+
195
+ function fillTemplate(data: CapabilityData): string {
196
+ const templatePath = path.join(__dirname, '../assets/templates/capability.mdx');
197
+ let template = fs.readFileSync(templatePath, 'utf-8');
198
+
199
+ // Replace placeholders
200
+ template = template.replace(/\[能力名称\]/g, data.name);
201
+ template = template.replace(/\[服务类型\]/g, data.layer);
202
+ template = template.replace(/\[简短描述\]/g, data.description);
203
+
204
+ // Replace core features
205
+ const featuresText = data.coreFeatures.map(f => `- ${f}`).join('\n');
206
+ template = template.replace(/- \[核心功能 1\][\s\S]*?- \[核心功能 4\]/m, featuresText);
207
+
208
+ // Replace responsibilities
209
+ const whatText = data.responsibilities.what.map(r => `- **${r}**`).join('\n');
210
+ const whatNotText = data.responsibilities.whatNot.map(r => `- **${r}**`).join('\n');
211
+ template = template.replace(/- \*\*\[职责 1\]\*\*[\s\S]*?- \*\*\[职责 3\]\*\*/m, whatText);
212
+ template = template.replace(/- \*\*\[非职责 1\]\*\*[\s\S]*?- \*\*\[非职责 3\]\*\*/m, whatNotText);
213
+
214
+ // Replace implementation status
215
+ const backendFiles = data.implementation.backend.map(f => ` - ✅ ${f}`).join('\n');
216
+ const frontendFiles = data.implementation.frontend.map(f => ` - ✅ ${f}`).join('\n');
217
+ template = template.replace(/- ✅ \[供应商\] 集成[\s\S]*?- ✅ 错误处理和重试机制/m, backendFiles);
218
+ template = template.replace(/- ✅ \[前端功能 1\][\s\S]*?- ✅ \[前端功能 3\]/m, frontendFiles);
219
+
220
+ // Replace code paths
221
+ template = template.replace(/waoooo-service\/app\/\[module\]\//g, data.implementation.codePaths.backend);
222
+ template = template.replace(/waoooo-web\/packages\/@waoooo\/\[package\]\//g, data.implementation.codePaths.frontend);
223
+
224
+ // Replace last updated date
225
+ const today = new Date().toISOString().split('T')[0];
226
+ template = template.replace(/\*\*最后更新\*\*:\d{4}-\d{2}-\d{2}/, `**最后更新**:${today}`);
227
+
228
+ return template;
229
+ }
230
+
231
+ // ============================================================================
232
+ // Update mint.json (using universal utility)
233
+ // ============================================================================
234
+
235
+ function updateMintJson(capabilityId: string, layer: string, docsPath: string) {
236
+ const projectRoot = path.resolve(__dirname, '../../../../../');
237
+
238
+ // Map layer to group name
239
+ const layerNames: Record<string, string> = {
240
+ 'l1-foundation': 'L1 基础能力层',
241
+ 'l2-integration': 'L2 连接能力层',
242
+ 'l3-business': 'L3 业务能力层',
243
+ };
244
+
245
+ // Calculate relative path
246
+ const relativePath = path.relative(
247
+ path.join(projectRoot, 'waoooo-docs'),
248
+ docsPath
249
+ ).replace(/\.mdx$/, '');
250
+
251
+ // Call universal update-mint-nav utility
252
+ const updateScript = path.join(__dirname, '../../../../src/scripts/update-mint-nav.ts');
253
+ const { execSync } = require('child_process');
254
+
255
+ try {
256
+ execSync(
257
+ `npx tsx "${updateScript}" --section "Capabilities" --group "${layerNames[layer]}" --page "${relativePath}"`,
258
+ { stdio: 'inherit' }
259
+ );
260
+ } catch (error) {
261
+ console.warn('⚠️ Failed to update mint.json');
262
+ }
263
+ }
264
+
265
+ // ============================================================================
266
+ // Main
267
+ // ============================================================================
268
+
269
+ async function main() {
270
+ console.log('🚀 Generating Capability Documentation...\n');
271
+
272
+ const { openspecPath, capabilityId, layer, codePath } = parseArgs();
273
+
274
+ console.log('📥 Input:');
275
+ console.log(` - OpenSpec: ${openspecPath}`);
276
+ console.log(` - Capability: ${capabilityId}`);
277
+ console.log(` - Layer: ${layer}`);
278
+ console.log(` - Code: ${codePath || '(not provided)'}\n`);
279
+
280
+ // Step 1: Read OpenSpec
281
+ console.log('📖 Step 1/5: Reading OpenSpec...');
282
+ const { proposal, design } = readOpenSpec(openspecPath);
283
+ const openspecData = extractFromOpenSpec(proposal, design);
284
+ console.log('✅ OpenSpec parsed\n');
285
+
286
+ // Step 2: Analyze code
287
+ console.log('🔍 Step 2/5: Analyzing code...');
288
+ const codeData = analyzeCode(codePath);
289
+ console.log('✅ Code analyzed\n');
290
+
291
+ // Step 3: Merge data
292
+ console.log('🔗 Step 3/5: Merging data...');
293
+ const capabilityData: CapabilityData = {
294
+ name: openspecData.name || capabilityId,
295
+ layer,
296
+ description: openspecData.description || '',
297
+ coreFeatures: openspecData.coreFeatures || [],
298
+ responsibilities: openspecData.responsibilities || { what: [], whatNot: [] },
299
+ architecture: {
300
+ diagram: '(Auto-generated diagram placeholder)',
301
+ description: '(Auto-generated description)',
302
+ },
303
+ implementation: codeData.implementation || {
304
+ status: 'Not Implemented',
305
+ backend: [],
306
+ frontend: [],
307
+ codePaths: { backend: '', frontend: '' },
308
+ },
309
+ issues: {
310
+ problems: [],
311
+ impacts: [],
312
+ solutions: [],
313
+ },
314
+ futureSupport: [],
315
+ quickStart: {
316
+ backend: '(Auto-generated example)',
317
+ frontend: '(Auto-generated example)',
318
+ },
319
+ apiEndpoints: [],
320
+ relatedCapabilities: [],
321
+ };
322
+ console.log('✅ Data merged\n');
323
+
324
+ // Step 4: Fill template and write output
325
+ console.log('📝 Step 4/5: Generating documentation...');
326
+ const output = fillTemplate(capabilityData);
327
+
328
+ // Determine output path
329
+ const projectRoot = path.resolve(__dirname, '../../../../../');
330
+ const docsPath = path.join(projectRoot, 'waoooo-docs/developer-docs/capabilities', layer, `${capabilityId}.mdx`);
331
+
332
+ // Ensure directory exists
333
+ fs.mkdirSync(path.dirname(docsPath), { recursive: true });
334
+
335
+ // Write file
336
+ fs.writeFileSync(docsPath, output, 'utf-8');
337
+ console.log('✅ Documentation generated\n');
338
+
339
+ // Step 5: Update mint.json
340
+ console.log('🔧 Step 5/5: Updating mint.json...');
341
+ updateMintJson(capabilityId, layer, docsPath);
342
+ console.log('');
343
+
344
+ console.log('📂 Output:');
345
+ console.log(` ${docsPath}\n`);
346
+
347
+ console.log('🎉 Done!');
348
+ console.log('\n💡 Next steps:');
349
+ console.log(' 1. Review the generated documentation');
350
+ console.log(' 2. Fill in missing sections (architecture diagram, issues, etc.)');
351
+ console.log(' 3. Add code examples and API references');
352
+ console.log(' 4. Commit the changes');
353
+ }
354
+
355
+ main().catch(error => {
356
+ console.error('❌ Error:', error.message);
357
+ process.exit(1);
358
+ });