@leocm/flowcraft 0.0.0-stage → 2.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 (269) hide show
  1. package/README.md +846 -3
  2. package/bin/cli.js +102 -0
  3. package/flowcraft.yaml +30 -0
  4. package/install.sh +24 -0
  5. package/lib/args.js +34 -0
  6. package/lib/config.js +20 -0
  7. package/lib/copy.js +131 -0
  8. package/lib/fix.js +110 -0
  9. package/lib/fsutil.js +104 -0
  10. package/lib/global.js +229 -0
  11. package/lib/init.js +43 -0
  12. package/lib/runtime.js +84 -0
  13. package/lib/version.js +55 -0
  14. package/lib/wizard.js +125 -0
  15. package/package.json +31 -4
  16. package/presets/backend.yaml +20 -0
  17. package/presets/default.yaml +15 -0
  18. package/presets/frontend.yaml +20 -0
  19. package/presets/quick-fix.yaml +15 -0
  20. package/setup/.claude/commands/P0.5.md +1 -0
  21. package/setup/.claude/commands/P0.md +1 -0
  22. package/setup/.claude/commands/P1.md +1 -0
  23. package/setup/.claude/commands/P2.md +1 -0
  24. package/setup/.claude/commands/P3.md +1 -0
  25. package/setup/.claude/commands/P4.md +1 -0
  26. package/setup/.claude/commands/P5.md +1 -0
  27. package/setup/.claude/commands/code-analysis-init.md +1 -0
  28. package/setup/.claude/commands/code-analysis-rebuild.md +1 -0
  29. package/setup/.claude/commands/code-analysis-show-memory.md +1 -0
  30. package/setup/.claude/commands/code-analysis-update.md +1 -0
  31. package/setup/.claude/hooks/check-phase-advancement.py +180 -0
  32. package/setup/.claude/hooks/check-phase-test.py +152 -0
  33. package/setup/.claude/hooks/check-phase-write.py +232 -0
  34. package/setup/.claude/hooks/dispatch.py +64 -0
  35. package/setup/.claude/hooks/file-suggestion.py +45 -0
  36. package/setup/.claude/hooks/flowcraft_env.py +99 -0
  37. package/setup/.claude/hooks/log_session.py +91 -0
  38. package/setup/.claude/hooks/permission-request.py +125 -0
  39. package/setup/.claude/hooks/post-tool-failure.py +34 -0
  40. package/setup/.claude/hooks/pre-compact.py +64 -0
  41. package/setup/.claude/hooks/review-runner.py +844 -0
  42. package/setup/.claude/hooks/session-end.py +182 -0
  43. package/setup/.claude/hooks/session-start.py +188 -0
  44. package/setup/.claude/hooks/settings.json +0 -0
  45. package/setup/.claude/hooks/setup-keys.py +280 -0
  46. package/setup/.claude/hooks/statusline.py +61 -0
  47. package/setup/.claude/hooks/stop-check.py +169 -0
  48. package/setup/.claude/hooks/subagent-start.py +48 -0
  49. package/setup/.claude/hooks/subagent-stop.py +61 -0
  50. package/setup/.claude/hooks/task-completed.py +55 -0
  51. package/setup/.claude/hooks/task_manager.py +592 -0
  52. package/setup/.claude/hooks/user-prompt-submit.py +85 -0
  53. package/setup/.claude/project-state.md +109 -0
  54. package/setup/.claude/settings.json +237 -0
  55. package/setup/.claude/settings.local.json +13 -0
  56. package/setup/.claude/skills/P5report/SKILL.md +77 -0
  57. package/setup/.claude/skills/Pstatus/SKILL.md +68 -0
  58. package/setup/.claude/skills/archive/SKILL.md +196 -0
  59. package/setup/.claude/skills/brainstorming/SKILL.md +155 -0
  60. package/setup/.claude/skills/brainstorming/scripts/frame-template.html +213 -0
  61. package/setup/.claude/skills/brainstorming/scripts/helper.js +167 -0
  62. package/setup/.claude/skills/brainstorming/scripts/server.cjs +723 -0
  63. package/setup/.claude/skills/brainstorming/scripts/start-server.py +245 -0
  64. package/setup/.claude/skills/brainstorming/scripts/stop-server.py +178 -0
  65. package/setup/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  66. package/setup/.claude/skills/brainstorming/visual-companion.md +298 -0
  67. package/setup/.claude/skills/checkpoint/SKILL.md +42 -0
  68. package/setup/.claude/skills/chrome-integration/SKILL.md +67 -0
  69. package/setup/.claude/skills/code-analysis/SKILL.md +1243 -0
  70. package/setup/.claude/skills/code-review/SKILL.md +265 -0
  71. package/setup/.claude/skills/cross-review/SKILL.md +41 -0
  72. package/setup/.claude/skills/executing-plans/SKILL.md +64 -0
  73. package/setup/.claude/skills/git-prep/SKILL.md +50 -0
  74. package/setup/.claude/skills/gitnexus/gitnexus-cli/SKILL.md +67 -0
  75. package/setup/.claude/skills/gitnexus/gitnexus-debugging/SKILL.md +89 -0
  76. package/setup/.claude/skills/gitnexus/gitnexus-exploring/SKILL.md +78 -0
  77. package/setup/.claude/skills/gitnexus/gitnexus-guide/SKILL.md +66 -0
  78. package/setup/.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +97 -0
  79. package/setup/.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md +121 -0
  80. package/setup/.claude/skills/graphify/SKILL.md +49 -0
  81. package/setup/.claude/skills/openspec-apply-change/SKILL.md +185 -0
  82. package/setup/.claude/skills/openspec-archive-change/SKILL.md +182 -0
  83. package/setup/.claude/skills/openspec-bulk-archive-change/SKILL.md +339 -0
  84. package/setup/.claude/skills/openspec-continue-change/SKILL.md +118 -0
  85. package/setup/.claude/skills/openspec-explore/SKILL.md +311 -0
  86. package/setup/.claude/skills/openspec-ff-change/SKILL.md +113 -0
  87. package/setup/.claude/skills/openspec-new-change/SKILL.md +77 -0
  88. package/setup/.claude/skills/openspec-onboard/SKILL.md +573 -0
  89. package/setup/.claude/skills/openspec-propose/SKILL.md +149 -0
  90. package/setup/.claude/skills/openspec-sync-specs/SKILL.md +262 -0
  91. package/setup/.claude/skills/openspec-update-change/SKILL.md +91 -0
  92. package/setup/.claude/skills/openspec-verify-change/SKILL.md +175 -0
  93. package/setup/.claude/skills/oss-version-check/SKILL.md +71 -0
  94. package/setup/.claude/skills/oss-version-check/check_oss_version.py +205 -0
  95. package/setup/.claude/skills/phase/SKILL.md +63 -0
  96. package/setup/.claude/skills/playwright/SKILL.md +86 -0
  97. package/setup/.claude/skills/playwright-cli/SKILL.md +420 -0
  98. package/setup/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
  99. package/setup/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
  100. package/setup/.claude/skills/playwright-cli/references/references/element-attributes.md +23 -0
  101. package/setup/.claude/skills/playwright-cli/references/references/playwright-tests.md +39 -0
  102. package/setup/.claude/skills/playwright-cli/references/references/request-mocking.md +87 -0
  103. package/setup/.claude/skills/playwright-cli/references/references/running-code.md +241 -0
  104. package/setup/.claude/skills/playwright-cli/references/references/session-management.md +225 -0
  105. package/setup/.claude/skills/playwright-cli/references/references/storage-state.md +275 -0
  106. package/setup/.claude/skills/playwright-cli/references/references/test-generation.md +433 -0
  107. package/setup/.claude/skills/playwright-cli/references/references/tracing.md +139 -0
  108. package/setup/.claude/skills/playwright-cli/references/references/video-recording.md +143 -0
  109. package/setup/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
  110. package/setup/.claude/skills/playwright-cli/references/running-code.md +241 -0
  111. package/setup/.claude/skills/playwright-cli/references/session-management.md +225 -0
  112. package/setup/.claude/skills/playwright-cli/references/storage-state.md +275 -0
  113. package/setup/.claude/skills/playwright-cli/references/test-generation.md +433 -0
  114. package/setup/.claude/skills/playwright-cli/references/tracing.md +139 -0
  115. package/setup/.claude/skills/playwright-cli/references/video-recording.md +143 -0
  116. package/setup/.claude/skills/review/SKILL.md +98 -0
  117. package/setup/.claude/skills/review-tools/SKILL.md +76 -0
  118. package/setup/.claude/skills/subagent-driven-development/SKILL.md +94 -0
  119. package/setup/.claude/skills/task/SKILL.md +26 -0
  120. package/setup/.claude/skills/test-driven-development/SKILL.md +320 -0
  121. package/setup/.claude/skills/test-driven-development/writing-good-tests.md +198 -0
  122. package/setup/.claude/skills/ui-ux-pro-max/SKILL.md +377 -0
  123. package/setup/.claude/skills/ui-ux-pro-max/data/charts.csv +26 -0
  124. package/setup/.claude/skills/ui-ux-pro-max/data/colors.csv +97 -0
  125. package/setup/.claude/skills/ui-ux-pro-max/data/icons.csv +101 -0
  126. package/setup/.claude/skills/ui-ux-pro-max/data/landing.csv +31 -0
  127. package/setup/.claude/skills/ui-ux-pro-max/data/products.csv +97 -0
  128. package/setup/.claude/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  129. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  130. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  131. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  132. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  133. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  134. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  135. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  136. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  137. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  138. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  139. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  140. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  141. package/setup/.claude/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  142. package/setup/.claude/skills/ui-ux-pro-max/data/styles.csv +68 -0
  143. package/setup/.claude/skills/ui-ux-pro-max/data/typography.csv +58 -0
  144. package/setup/.claude/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  145. package/setup/.claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  146. package/setup/.claude/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  147. package/setup/.claude/skills/ui-ux-pro-max/scripts/core.py +253 -0
  148. package/setup/.claude/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  149. package/setup/.claude/skills/ui-ux-pro-max/scripts/search.py +114 -0
  150. package/setup/.claude/skills/ui-ux-standards/SKILL.md +154 -0
  151. package/setup/.claude/skills/verification-before-completion/SKILL.md +120 -0
  152. package/setup/.claude/skills/wiki-read/SKILL.md +190 -0
  153. package/setup/.claude/skills/writing-plans/SKILL.md +168 -0
  154. package/setup/.claude/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  155. package/setup/.claude/tasks/.last-session +1 -0
  156. package/setup/.codex/.agents/skills/P5report/SKILL.md +77 -0
  157. package/setup/.codex/.agents/skills/Pstatus/SKILL.md +30 -0
  158. package/setup/.codex/.agents/skills/archive/SKILL.md +196 -0
  159. package/setup/.codex/.agents/skills/brainstorming/SKILL.md +155 -0
  160. package/setup/.codex/.agents/skills/brainstorming/scripts/frame-template.html +213 -0
  161. package/setup/.codex/.agents/skills/brainstorming/scripts/helper.js +167 -0
  162. package/setup/.codex/.agents/skills/brainstorming/scripts/server.cjs +723 -0
  163. package/setup/.codex/.agents/skills/brainstorming/scripts/start-server.py +245 -0
  164. package/setup/.codex/.agents/skills/brainstorming/scripts/stop-server.py +178 -0
  165. package/setup/.codex/.agents/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  166. package/setup/.codex/.agents/skills/brainstorming/visual-companion.md +298 -0
  167. package/setup/.codex/.agents/skills/checkpoint/SKILL.md +42 -0
  168. package/setup/.codex/.agents/skills/chrome-integration/SKILL.md +67 -0
  169. package/setup/.codex/.agents/skills/code-analysis/SKILL.md +1243 -0
  170. package/setup/.codex/.agents/skills/code-review/SKILL.md +265 -0
  171. package/setup/.codex/.agents/skills/cross-review/SKILL.md +42 -0
  172. package/setup/.codex/.agents/skills/executing-plans/SKILL.md +64 -0
  173. package/setup/.codex/.agents/skills/git-prep/SKILL.md +50 -0
  174. package/setup/.codex/.agents/skills/gitnexus/gitnexus-cli/SKILL.md +67 -0
  175. package/setup/.codex/.agents/skills/gitnexus/gitnexus-debugging/SKILL.md +89 -0
  176. package/setup/.codex/.agents/skills/gitnexus/gitnexus-exploring/SKILL.md +78 -0
  177. package/setup/.codex/.agents/skills/gitnexus/gitnexus-guide/SKILL.md +66 -0
  178. package/setup/.codex/.agents/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +97 -0
  179. package/setup/.codex/.agents/skills/gitnexus/gitnexus-refactoring/SKILL.md +121 -0
  180. package/setup/.codex/.agents/skills/graphify/SKILL.md +49 -0
  181. package/setup/.codex/.agents/skills/openspec-apply-change/SKILL.md +185 -0
  182. package/setup/.codex/.agents/skills/openspec-archive-change/SKILL.md +182 -0
  183. package/setup/.codex/.agents/skills/openspec-bulk-archive-change/SKILL.md +339 -0
  184. package/setup/.codex/.agents/skills/openspec-continue-change/SKILL.md +118 -0
  185. package/setup/.codex/.agents/skills/openspec-explore/SKILL.md +311 -0
  186. package/setup/.codex/.agents/skills/openspec-ff-change/SKILL.md +113 -0
  187. package/setup/.codex/.agents/skills/openspec-new-change/SKILL.md +77 -0
  188. package/setup/.codex/.agents/skills/openspec-onboard/SKILL.md +573 -0
  189. package/setup/.codex/.agents/skills/openspec-propose/SKILL.md +149 -0
  190. package/setup/.codex/.agents/skills/openspec-sync-specs/SKILL.md +262 -0
  191. package/setup/.codex/.agents/skills/openspec-update-change/SKILL.md +91 -0
  192. package/setup/.codex/.agents/skills/openspec-verify-change/SKILL.md +175 -0
  193. package/setup/.codex/.agents/skills/oss-version-check/SKILL.md +71 -0
  194. package/setup/.codex/.agents/skills/oss-version-check/check_oss_version.py +205 -0
  195. package/setup/.codex/.agents/skills/phase/SKILL.md +63 -0
  196. package/setup/.codex/.agents/skills/playwright/SKILL.md +86 -0
  197. package/setup/.codex/.agents/skills/playwright-cli/SKILL.md +420 -0
  198. package/setup/.codex/.agents/skills/playwright-cli/references/element-attributes.md +23 -0
  199. package/setup/.codex/.agents/skills/playwright-cli/references/playwright-tests.md +39 -0
  200. package/setup/.codex/.agents/skills/playwright-cli/references/references/element-attributes.md +23 -0
  201. package/setup/.codex/.agents/skills/playwright-cli/references/references/playwright-tests.md +39 -0
  202. package/setup/.codex/.agents/skills/playwright-cli/references/references/request-mocking.md +87 -0
  203. package/setup/.codex/.agents/skills/playwright-cli/references/references/running-code.md +241 -0
  204. package/setup/.codex/.agents/skills/playwright-cli/references/references/session-management.md +225 -0
  205. package/setup/.codex/.agents/skills/playwright-cli/references/references/storage-state.md +275 -0
  206. package/setup/.codex/.agents/skills/playwright-cli/references/references/test-generation.md +433 -0
  207. package/setup/.codex/.agents/skills/playwright-cli/references/references/tracing.md +139 -0
  208. package/setup/.codex/.agents/skills/playwright-cli/references/references/video-recording.md +143 -0
  209. package/setup/.codex/.agents/skills/playwright-cli/references/request-mocking.md +87 -0
  210. package/setup/.codex/.agents/skills/playwright-cli/references/running-code.md +241 -0
  211. package/setup/.codex/.agents/skills/playwright-cli/references/session-management.md +225 -0
  212. package/setup/.codex/.agents/skills/playwright-cli/references/storage-state.md +275 -0
  213. package/setup/.codex/.agents/skills/playwright-cli/references/test-generation.md +433 -0
  214. package/setup/.codex/.agents/skills/playwright-cli/references/tracing.md +139 -0
  215. package/setup/.codex/.agents/skills/playwright-cli/references/video-recording.md +143 -0
  216. package/setup/.codex/.agents/skills/review/SKILL.md +98 -0
  217. package/setup/.codex/.agents/skills/review-tools/SKILL.md +76 -0
  218. package/setup/.codex/.agents/skills/subagent-driven-development/SKILL.md +94 -0
  219. package/setup/.codex/.agents/skills/task/SKILL.md +27 -0
  220. package/setup/.codex/.agents/skills/test-driven-development/SKILL.md +320 -0
  221. package/setup/.codex/.agents/skills/test-driven-development/writing-good-tests.md +198 -0
  222. package/setup/.codex/.agents/skills/ui-ux-pro-max/SKILL.md +377 -0
  223. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/charts.csv +26 -0
  224. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/colors.csv +97 -0
  225. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/icons.csv +101 -0
  226. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/landing.csv +31 -0
  227. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/products.csv +97 -0
  228. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  229. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  230. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  231. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  232. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  233. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  234. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  235. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  236. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  237. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  238. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  239. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  240. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  241. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  242. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/styles.csv +68 -0
  243. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/typography.csv +58 -0
  244. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  245. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  246. package/setup/.codex/.agents/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  247. package/setup/.codex/.agents/skills/ui-ux-pro-max/scripts/core.py +253 -0
  248. package/setup/.codex/.agents/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  249. package/setup/.codex/.agents/skills/ui-ux-pro-max/scripts/search.py +114 -0
  250. package/setup/.codex/.agents/skills/ui-ux-standards/SKILL.md +154 -0
  251. package/setup/.codex/.agents/skills/verification-before-completion/SKILL.md +120 -0
  252. package/setup/.codex/.agents/skills/wiki-read/SKILL.md +190 -0
  253. package/setup/.codex/.agents/skills/writing-plans/SKILL.md +168 -0
  254. package/setup/.codex/.agents/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  255. package/setup/.codex/config.toml +10 -0
  256. package/setup/.codex/hooks/log_session.py +85 -0
  257. package/setup/.codex/hooks/review-runner.py +844 -0
  258. package/setup/.codex/hooks/sdlc-codex-hook.cjs +1020 -0
  259. package/setup/.codex/hooks/setup-keys.py +280 -0
  260. package/setup/.codex/hooks.json +121 -0
  261. package/setup/.codex/model-catalog.json +154 -0
  262. package/setup/.codex/project-state.md +103 -0
  263. package/setup/AGENTS.md +722 -0
  264. package/setup/CLAUDE.md +717 -0
  265. package/setup/install.sh +24 -0
  266. package/setup/tests/test_decision_timeout.py +241 -0
  267. package/setup/tests/test_hook_guards.py +341 -0
  268. package/setup/tests/test_sdlc_bootstrap.py +167 -0
  269. package/setup/tests/test_task_manager.py +148 -0
@@ -0,0 +1,573 @@
1
+ ---
2
+ name: openspec-onboard
3
+ description: Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
4
+ allowed-tools: Bash(openspec:*)
5
+ license: MIT
6
+ compatibility: Requires openspec CLI.
7
+ metadata:
8
+ author: openspec
9
+ version: "1.0"
10
+ ---
11
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
12
+
13
+ Guide the user through their first complete OpenSpec workflow cycle. This is a teaching experience—you'll do real work in their codebase while explaining each step.
14
+
15
+ **Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
16
+
17
+ ---
18
+
19
+ ## Preflight
20
+
21
+ Before starting, check if the OpenSpec CLI is installed:
22
+
23
+ ```bash
24
+ # Unix/macOS
25
+ openspec --version 2>&1 || echo "CLI_NOT_INSTALLED"
26
+ # Windows (PowerShell)
27
+ # if (Get-Command openspec -ErrorAction SilentlyContinue) { openspec --version } else { echo "CLI_NOT_INSTALLED" }
28
+ ```
29
+
30
+ **If CLI not installed:**
31
+ > OpenSpec CLI is not installed. Install it first, then come back to `/openspec-onboard`.
32
+
33
+ Stop here if not installed.
34
+
35
+ ---
36
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
37
+
38
+ ## Phase 1: Welcome
39
+
40
+ Display:
41
+
42
+ ```
43
+ ## Welcome to OpenSpec!
44
+
45
+ I'll walk you through a complete change cycle—from idea to implementation—using a real task in your codebase. Along the way, you'll learn the workflow by doing it.
46
+
47
+ **What we'll do:**
48
+ 1. Pick a small, real task in your codebase
49
+ 2. Explore the problem briefly
50
+ 3. Create a change (the container for our work)
51
+ 4. Build the artifacts: proposal → specs → design → tasks
52
+ 5. Implement the tasks
53
+ 6. Archive the completed change
54
+
55
+ **Time:** ~15-20 minutes
56
+
57
+ Let's start by finding something to work on.
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Phase 2: Task Selection
63
+
64
+ ### Codebase Analysis
65
+
66
+ Scan the codebase for small improvement opportunities. Look for:
67
+
68
+ 1. **TODO/FIXME comments** - Search for `TODO`, `FIXME`, `HACK`, `XXX` in code files
69
+ 2. **Missing error handling** - `catch` blocks that swallow errors, risky operations without try-catch
70
+ 3. **Functions without tests** - Cross-reference `src/` with test directories
71
+ 4. **Type issues** - `any` types in TypeScript files (`: any`, `as any`)
72
+ 5. **Debug artifacts** - `console.log`, `console.debug`, `debugger` statements in non-debug code
73
+ 6. **Missing validation** - User input handlers without validation
74
+
75
+ Also check recent git activity:
76
+ ```bash
77
+ # Unix/macOS
78
+ git log --oneline -10 2>/dev/null || echo "No git history"
79
+ # Windows (PowerShell)
80
+ # git log --oneline -10 2>$null; if ($LASTEXITCODE -ne 0) { echo "No git history" }
81
+ ```
82
+
83
+ ### Present Suggestions
84
+
85
+ From your analysis, present 3-4 specific suggestions:
86
+
87
+ ```
88
+ ## Task Suggestions
89
+
90
+ Based on scanning your codebase, here are some good starter tasks:
91
+
92
+ **1. [Most promising task]**
93
+ Location: `src/path/to/file.ts:42`
94
+ Scope: ~1-2 files, ~20-30 lines
95
+ Why it's good: [brief reason]
96
+
97
+ **2. [Second task]**
98
+ Location: `src/another/file.ts`
99
+ Scope: ~1 file, ~15 lines
100
+ Why it's good: [brief reason]
101
+
102
+ **3. [Third task]**
103
+ Location: [location]
104
+ Scope: [estimate]
105
+ Why it's good: [brief reason]
106
+
107
+ **4. Something else?**
108
+ Tell me what you'd like to work on.
109
+
110
+ Which task interests you? (Pick a number or describe your own)
111
+ ```
112
+
113
+ **If nothing found:** Fall back to asking what the user wants to build:
114
+ > I didn't find obvious quick wins in your codebase. What's something small you've been meaning to add or fix?
115
+
116
+ ### Scope Guardrail
117
+
118
+ If the user picks or describes something too large (major feature, multi-day work):
119
+
120
+ ```
121
+ That's a valuable task, but it's probably larger than ideal for your first OpenSpec run-through.
122
+
123
+ For learning the workflow, smaller is better—it lets you see the full cycle without getting stuck in implementation details.
124
+
125
+ **Options:**
126
+ 1. **Slice it smaller** - What's the smallest useful piece of [their task]? Maybe just [specific slice]?
127
+ 2. **Pick something else** - One of the other suggestions, or a different small task?
128
+ 3. **Do it anyway** - If you really want to tackle this, we can. Just know it'll take longer.
129
+
130
+ What would you prefer?
131
+ ```
132
+
133
+ Let the user override if they insist—this is a soft guardrail.
134
+
135
+ ---
136
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
137
+
138
+ ## Phase 3: Explore Demo
139
+
140
+ Once a task is selected, briefly demonstrate explore mode:
141
+
142
+ ```
143
+ Before we create a change, let me quickly show you **explore mode**—it's how you think through problems before committing to a direction.
144
+ ```
145
+
146
+ Spend 1-2 minutes investigating the relevant code:
147
+ - Read the file(s) involved
148
+ - Draw a quick ASCII diagram if it helps
149
+ - Note any considerations
150
+
151
+ ```
152
+ ## Quick Exploration
153
+
154
+ [Your brief analysis—what you found, any considerations]
155
+
156
+ ┌─────────────────────────────────────────┐
157
+ │ [Optional: ASCII diagram if helpful] │
158
+ └─────────────────────────────────────────┘
159
+
160
+ Explore mode (`/openspec-explore`) is for this kind of thinking—investigating before implementing. You can use it anytime you need to think through a problem.
161
+
162
+ Now let's create a change to hold our work.
163
+ ```
164
+
165
+ **PAUSE** - Wait for user acknowledgment before proceeding.
166
+
167
+ ---
168
+
169
+ ## Phase 4: Create the Change
170
+
171
+ **EXPLAIN:**
172
+ ```
173
+ ## Creating a Change
174
+
175
+ A "change" in OpenSpec is a container for all the thinking and planning around a piece of work. It lives at the `changeRoot` reported by `openspec status --change "<name>" --json` and holds your artifacts—proposal, specs, design, tasks.
176
+
177
+ Let me create one for our task.
178
+ ```
179
+
180
+ **DO:** Create the change with a derived kebab-case name:
181
+ ```bash
182
+ openspec new change "<derived-name>"
183
+ ```
184
+
185
+ **SHOW:**
186
+ ```
187
+ Created: <changeRoot from status JSON>
188
+
189
+ The folder structure:
190
+ ```
191
+ <changeRoot>/
192
+ ├── proposal.md ← Why we're doing this (empty, we'll fill it)
193
+ ├── design.md ← How we'll build it (empty)
194
+ ├── specs/ ← Detailed requirements (empty)
195
+ └── tasks.md ← Implementation checklist (empty)
196
+ ```
197
+
198
+ Now let's fill in the first artifact—the proposal.
199
+ ```
200
+
201
+ ---
202
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
203
+
204
+ ## Phase 5: Proposal
205
+
206
+ **EXPLAIN:**
207
+ ```
208
+ ## The Proposal
209
+
210
+ The proposal captures **why** we're making this change and **what** it involves at a high level. It's the "elevator pitch" for the work.
211
+
212
+ I'll draft one based on our task.
213
+ ```
214
+
215
+ **DO:** Draft the proposal content (don't save yet):
216
+
217
+ `<capability-path>` is the spec directory relative to `specs/` (for example,
218
+ `user-auth` or `identity/user-auth`). Use the exact existing path for modified
219
+ capabilities. For new capabilities, follow the project's established spec
220
+ organization.
221
+
222
+ ```
223
+ Here's a draft proposal:
224
+
225
+ ---
226
+
227
+ ## Why
228
+
229
+ [1-2 sentences explaining the problem/opportunity]
230
+
231
+ ## What Changes
232
+
233
+ [Bullet points of what will be different]
234
+
235
+ ## Capabilities
236
+
237
+ ### New Capabilities
238
+ - `<capability-path>`: [brief description]
239
+
240
+ ### Modified Capabilities
241
+ <!-- If modifying existing behavior -->
242
+ - `<existing-capability-path>`: [brief description]
243
+
244
+ ## Impact
245
+
246
+ - `src/path/to/file.ts`: [what changes]
247
+ - [other files if applicable]
248
+
249
+ ---
250
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
251
+
252
+ Does this capture the intent? I can adjust before we save it.
253
+ ```
254
+
255
+ **PAUSE** - Wait for user approval/feedback.
256
+
257
+ After approval, save the proposal:
258
+ ```bash
259
+ openspec instructions proposal --change "<name>" --json
260
+ ```
261
+ Then write the content to the `resolvedOutputPath` from `openspec instructions proposal --change "<name>" --json`.
262
+
263
+ ```
264
+ Proposal saved. This is your "why" document—you can always come back and refine it as understanding evolves.
265
+
266
+ Next up: specs.
267
+ ```
268
+
269
+ ---
270
+
271
+ ## Phase 6: Specs
272
+
273
+ **EXPLAIN:**
274
+ ```
275
+ ## Specs
276
+
277
+ Specs define **what** we're building in precise, testable terms. They use a requirement/scenario format that makes expected behavior crystal clear.
278
+
279
+ For a small task like this, we might only need one spec file.
280
+ ```
281
+
282
+ **DO:** Resolve where the spec file should be created:
283
+ ```bash
284
+ openspec instructions specs --change "<name>" --json
285
+ # Use resolvedOutputPath from the JSON. If it is a glob, choose the concrete file path using the schema instruction and the change's context.
286
+ ```
287
+
288
+ Draft the spec content:
289
+
290
+ ```
291
+ Here's the spec:
292
+
293
+ ---
294
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
295
+
296
+ ## ADDED Requirements
297
+
298
+ ### Requirement: <Name>
299
+
300
+ <Description of what the system should do>
301
+
302
+ #### Scenario: <Scenario name>
303
+
304
+ - **WHEN** <trigger condition>
305
+ - **THEN** <expected outcome>
306
+ - **AND** <additional outcome if needed>
307
+
308
+ ---
309
+
310
+ This format—WHEN/THEN/AND—makes requirements testable. You can literally read them as test cases.
311
+ ```
312
+
313
+ Save to the concrete file path chosen from `resolvedOutputPath`.
314
+
315
+ ---
316
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
317
+
318
+ ## Phase 7: Design
319
+
320
+ **EXPLAIN:**
321
+ ```
322
+ ## Design
323
+
324
+ The design captures **how** we'll build it—technical decisions, tradeoffs, approach.
325
+
326
+ For small changes, this might be brief. That's fine—not every change needs deep design discussion.
327
+ ```
328
+
329
+ **DO:** Draft design.md:
330
+
331
+ ```
332
+ Here's the design:
333
+
334
+ ---
335
+
336
+ ## Context
337
+
338
+ [Brief context about the current state]
339
+
340
+ ## Goals / Non-Goals
341
+
342
+ **Goals:**
343
+ - [What we're trying to achieve]
344
+
345
+ **Non-Goals:**
346
+ - [What's explicitly out of scope]
347
+
348
+ ## Decisions
349
+
350
+ ### Decision 1: [Key decision]
351
+
352
+ [Explanation of approach and rationale]
353
+
354
+ ---
355
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
356
+
357
+ For a small task, this captures the key decisions without over-engineering.
358
+ ```
359
+
360
+ Save to the `resolvedOutputPath` from `openspec instructions design --change "<name>" --json`.
361
+
362
+ ---
363
+
364
+ ## Phase 8: Tasks
365
+
366
+ **EXPLAIN:**
367
+ ```
368
+ ## Tasks
369
+
370
+ Finally, we break the work into implementation tasks—checkboxes that drive the apply phase.
371
+
372
+ These should be small, clear, and in logical order.
373
+ ```
374
+
375
+ **DO:** Generate tasks based on specs and design:
376
+
377
+ ```
378
+ Here are the implementation tasks:
379
+
380
+ ---
381
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
382
+
383
+ ## 1. [Category or file]
384
+
385
+ - [ ] 1.1 [Specific task]
386
+ - [ ] 1.2 [Specific task]
387
+
388
+ ## 2. Verify
389
+
390
+ - [ ] 2.1 [Verification step]
391
+
392
+ ---
393
+
394
+ Each checkbox becomes a unit of work in the apply phase. Ready to implement?
395
+ ```
396
+
397
+ **PAUSE** - Wait for user to confirm they're ready to implement.
398
+
399
+ Save to the `resolvedOutputPath` from `openspec instructions tasks --change "<name>" --json`.
400
+
401
+ ---
402
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
403
+
404
+ ## Phase 9: Apply (Implementation)
405
+
406
+ **EXPLAIN:**
407
+ ```
408
+ ## Implementation
409
+
410
+ Now we implement each task, checking them off as we go. I'll announce each one and occasionally note how the specs/design informed the approach.
411
+ ```
412
+
413
+ **DO:** For each task:
414
+
415
+ 1. Announce: "Working on task N: [description]"
416
+ 2. Implement the change in the codebase
417
+ 3. Reference specs/design naturally: "The spec says X, so I'm doing Y"
418
+ 4. Mark complete in tasks.md: `- [ ]` → `- [x]`
419
+ 5. Brief status: "✓ Task N complete"
420
+
421
+ Keep narration light—don't over-explain every line of code.
422
+
423
+ After all tasks:
424
+
425
+ ```
426
+ ## Implementation Complete
427
+
428
+ All tasks done:
429
+ - [x] Task 1
430
+ - [x] Task 2
431
+ - [x] ...
432
+
433
+ The change is implemented! One more step—let's archive it.
434
+ ```
435
+
436
+ ---
437
+
438
+ ## Phase 10: Archive
439
+
440
+ **EXPLAIN:**
441
+ ```
442
+ ## Archiving
443
+
444
+ When a change is complete, we archive it. The archive path is derived from `planningHome.changesDir` and the date.
445
+
446
+ Archived changes become your project's decision history—you can always find them later to understand why something was built a certain way.
447
+ ```
448
+
449
+ **DO:** Archive the change (`--yes` answers the confirmation prompts, which you cannot answer from a tool call):
450
+ ```bash
451
+ openspec archive "<name>" --yes
452
+ ```
453
+
454
+ **SHOW:**
455
+ ```
456
+ Archived to: `<planningHome.changesDir>/archive/<target-name>/` (the target name prepends today's date, unless the name already starts with a `YYYY-MM-DD-` prefix — then it is kept as-is, no second date)
457
+
458
+ The change is now part of your project's history. The code is in your codebase, the decision record is preserved.
459
+ ```
460
+
461
+ ---
462
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
463
+
464
+ ## Phase 11: Recap & Next Steps
465
+
466
+ ```
467
+ ## Congratulations!
468
+
469
+ You just completed a full OpenSpec cycle:
470
+
471
+ 1. **Explore** - Thought through the problem
472
+ 2. **New** - Created a change container
473
+ 3. **Proposal** - Captured WHY
474
+ 4. **Specs** - Defined WHAT in detail
475
+ 5. **Design** - Decided HOW
476
+ 6. **Tasks** - Broke it into steps
477
+ 7. **Apply** - Implemented the work
478
+ 8. **Archive** - Preserved the record
479
+
480
+ This same rhythm works for any size change—a small fix or a major feature.
481
+
482
+ ---
483
+
484
+ ## Command Reference
485
+
486
+ **Core workflow:**
487
+
488
+ | Command | What it does |
489
+ |-------------------|--------------------------------------------|
490
+ | `/openspec-propose` | Create a change and generate all artifacts |
491
+ | `/openspec-explore` | Think through problems before/during work |
492
+ | `/openspec-apply-change` | Implement tasks from a change |
493
+ | `/openspec-archive-change` | Archive a completed change |
494
+
495
+ **Additional commands** (only if installed - availability depends on your profile):
496
+
497
+ | Command | What it does |
498
+ |--------------------|----------------------------------------------------------|
499
+ | `/openspec-new-change` | Start a new change, step through artifacts one at a time |
500
+ | `/openspec-continue-change` | Continue working on an existing change |
501
+ | `/openspec-ff-change` | Fast-forward: create all artifacts at once |
502
+ | `/openspec-verify-change` | Verify implementation matches artifacts |
503
+
504
+ ---
505
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
506
+
507
+ ## What's Next?
508
+
509
+ Try `/openspec-propose` on something you actually want to build. You've got the rhythm now!
510
+ ```
511
+
512
+ ---
513
+
514
+ ## Graceful Exit Handling
515
+
516
+ ### User wants to stop mid-way
517
+
518
+ If the user says they need to stop, want to pause, or seem disengaged:
519
+
520
+ ```
521
+ No problem! Your change is saved at the `changeRoot` reported by `openspec status --change "<name>" --json`.
522
+
523
+ To pick up where we left off later:
524
+ - `/openspec-continue-change <name>` - Resume artifact creation (if installed; otherwise `openspec status --change "<name>" --json` shows the next artifact)
525
+ - `/openspec-apply-change <name>` - Jump to implementation (if tasks exist)
526
+
527
+ The work won't be lost. Come back whenever you're ready.
528
+ ```
529
+
530
+ Exit gracefully without pressure.
531
+
532
+ ### User just wants command reference
533
+
534
+ If the user says they just want to see the commands or skip the tutorial:
535
+
536
+ ```
537
+ ## OpenSpec Quick Reference
538
+
539
+ **Core workflow:**
540
+
541
+ | Command | What it does |
542
+ |--------------------------|--------------------------------------------|
543
+ | `/openspec-propose <name>` | Create a change and generate all artifacts |
544
+ | `/openspec-explore` | Think through problems (no code changes) |
545
+ | `/openspec-apply-change <name>` | Implement tasks |
546
+ | `/openspec-archive-change <name>` | Archive when done |
547
+
548
+ **Additional commands** (only if installed - availability depends on your profile):
549
+
550
+ | Command | What it does |
551
+ |---------------------------|-------------------------------------|
552
+ | `/openspec-new-change <name>` | Start a new change, step by step |
553
+ | `/openspec-continue-change <name>` | Continue an existing change |
554
+ | `/openspec-ff-change <name>` | Fast-forward: all artifacts at once |
555
+ | `/openspec-verify-change <name>` | Verify implementation |
556
+
557
+ Try `/openspec-propose` to start your first change.
558
+ ```
559
+
560
+ Exit gracefully.
561
+
562
+ ---
563
+ > **Auto-install (懒加载自动安装)**: 仅当本技能被调用且 `openspec` 命令缺失时执行:`npm i -g @fission-ai/openspec`,或改用 `npx @fission-ai/openspec {cmd}`(按需下载)。
564
+
565
+ ## Guardrails
566
+
567
+ - **Follow the EXPLAIN → DO → SHOW → PAUSE pattern** at key transitions (after explore, after proposal draft, after tasks, after archive)
568
+ - **Keep narration light** during implementation—teach without lecturing
569
+ - **Don't skip phases** even if the change is small—the goal is teaching the workflow
570
+ - **Pause for acknowledgment** at marked points, but don't over-pause
571
+ - **Handle exits gracefully**—never pressure the user to continue
572
+ - **Use real codebase tasks**—don't simulate or use fake examples
573
+ - **Adjust scope gently**—guide toward smaller tasks but respect user choice