@jspg-ai/coding-bb 0.0.1 → 0.0.2-beta.23

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 (145) hide show
  1. package/cbb/bin/cbb.js +6 -0
  2. package/cbb/bin/cbbm.js +6 -0
  3. package/cbb/dev-standards/rules/cbb-ai-behavior.md +103 -103
  4. package/cbb/dev-standards/rules/cbb-priority.md +55 -55
  5. package/cbb/lib/install/claude-code.js +2 -0
  6. package/cbb/lib/install/init.js +496 -290
  7. package/cbb/lib/install/opencode.js +31 -0
  8. package/cbb/lib/install/qoder.js +2 -0
  9. package/cbb/lib/install/workspaces.js +53 -13
  10. package/cbb/lib/openspec/index.js +3 -3
  11. package/cbb/lib/superpowers/index.js +1 -1
  12. package/cbb/lib/utils/check-update.js +16 -14
  13. package/cbb/lib/utils/gitignore.js +2 -1
  14. package/cbb/lib/utils/output.js +92 -4
  15. package/cbb/lib/utils/version.js +2 -31
  16. package/cbb/lib/wiki/cli.js +25 -25
  17. package/cbb/lib/wiki/index.js +16 -16
  18. package/cbb/tools/cbb-design-to-wiki/SKILL.md +14 -14
  19. package/cbb/tools/cbb-wiki-ops/SKILL.md +22 -22
  20. package/cbb/worktrees/_shared/scripts/find-target-worktree.js +2 -2
  21. package/cbb/worktrees/_shared/scripts/find-workspace-root.js +7 -7
  22. package/cbb/worktrees/_shared/scripts/push-core.js +18 -0
  23. package/cbb/worktrees/commands/{close.md → worktree-close.md} +8 -8
  24. package/cbb/worktrees/commands/{init.md → worktree-init.md} +9 -9
  25. package/cbb/worktrees/commands/{push.md → worktree-push.md} +3 -3
  26. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/SKILL.md +20 -20
  27. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/check-env.js +4 -4
  28. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/check-unarchived.js +1 -1
  29. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/delete-branches.js +3 -3
  30. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/discover-apps.js +6 -6
  31. package/cbb/worktrees/skills/{openspec-extend-worktree → cbb-worktree-close}/scripts/find-target-worktree.js +2 -2
  32. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-close}/scripts/find-workspace-root.js +7 -7
  33. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/remove-worktrees.js +4 -4
  34. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/safety-check.js +4 -4
  35. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/SKILL.md +81 -107
  36. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/auto-open.js +1 -1
  37. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/check-env-deep.js +4 -4
  38. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/check-env.js +6 -6
  39. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/check-repos.js +4 -4
  40. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/create-branches.js +4 -4
  41. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/create-worktrees.js +8 -7
  42. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-init}/scripts/find-workspace-root.js +7 -7
  43. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/install-ai.js +33 -33
  44. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/parse-config.js +7 -7
  45. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/push-branches.js +9 -7
  46. package/cbb/worktrees/skills/{openspec-extend-worktree → cbb-worktree-init}/scripts/push-core.js +18 -0
  47. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/sync-repos.js +10 -12
  48. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/update-gitignore.js +19 -6
  49. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-push}/SKILL.md +16 -16
  50. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-push}/scripts/commit-worktrees.js +2 -2
  51. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-push}/scripts/find-target-worktree.js +2 -2
  52. package/cbb/worktrees/skills/{openspec-extend-worktree → cbb-worktree-push}/scripts/find-workspace-root.js +7 -7
  53. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-push}/scripts/push-core.js +18 -0
  54. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-push}/scripts/push-worktrees.js +7 -5
  55. package/config/workspace-config.sample.json +18 -0
  56. package/config/workspaces.json +11 -6
  57. package/openspec/.version +6 -6
  58. package/openspec/commands/apply.md +7 -7
  59. package/openspec/commands/archive.md +7 -7
  60. package/openspec/commands/bulk-archive.md +7 -7
  61. package/openspec/commands/continue.md +7 -7
  62. package/openspec/commands/explore.md +7 -7
  63. package/openspec/commands/ff.md +7 -7
  64. package/openspec/commands/new.md +7 -7
  65. package/openspec/commands/onboard.md +7 -7
  66. package/openspec/commands/propose.md +7 -7
  67. package/openspec/commands/sync.md +7 -7
  68. package/openspec/commands/update.md +7 -7
  69. package/openspec/commands/verify.md +7 -7
  70. package/openspec/skills/openspec-apply-change/SKILL.md +187 -187
  71. package/openspec/skills/openspec-archive-change/SKILL.md +181 -181
  72. package/openspec/skills/openspec-bulk-archive-change/SKILL.md +338 -338
  73. package/openspec/skills/openspec-continue-change/SKILL.md +117 -117
  74. package/openspec/skills/openspec-explore/SKILL.md +342 -342
  75. package/openspec/skills/openspec-ff-change/SKILL.md +116 -116
  76. package/openspec/skills/openspec-new-change/SKILL.md +76 -76
  77. package/openspec/skills/openspec-onboard/SKILL.md +560 -560
  78. package/openspec/skills/openspec-propose/SKILL.md +162 -162
  79. package/openspec/skills/openspec-sync-specs/SKILL.md +261 -261
  80. package/openspec/skills/openspec-update-change/SKILL.md +90 -90
  81. package/openspec/skills/openspec-verify-change/SKILL.md +174 -174
  82. package/package.json +4 -3
  83. package/superpowers/.version +6 -6
  84. package/superpowers/skills/brainstorming/SKILL.md +250 -250
  85. package/superpowers/skills/brainstorming/scripts/helper.js +167 -167
  86. package/superpowers/skills/brainstorming/scripts/start-server.sh +209 -209
  87. package/superpowers/skills/brainstorming/scripts/stop-server.sh +120 -120
  88. package/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -49
  89. package/superpowers/skills/brainstorming/visual-companion.md +299 -299
  90. package/superpowers/skills/dispatching-parallel-agents/SKILL.md +167 -167
  91. package/superpowers/skills/executing-plans/SKILL.md +64 -64
  92. package/superpowers/skills/finishing-a-development-branch/SKILL.md +225 -225
  93. package/superpowers/skills/receiving-code-review/SKILL.md +205 -205
  94. package/superpowers/skills/requesting-code-review/SKILL.md +95 -95
  95. package/superpowers/skills/requesting-code-review/code-reviewer.md +181 -181
  96. package/superpowers/skills/subagent-driven-development/SKILL.md +568 -568
  97. package/superpowers/skills/subagent-driven-development/implementer-prompt.md +154 -154
  98. package/superpowers/skills/subagent-driven-development/re-review-prompt.md +115 -115
  99. package/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +207 -207
  100. package/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -119
  101. package/superpowers/skills/systematic-debugging/SKILL.md +283 -283
  102. package/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -158
  103. package/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -115
  104. package/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -122
  105. package/superpowers/skills/systematic-debugging/find-polluter.sh +72 -72
  106. package/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -169
  107. package/superpowers/skills/systematic-debugging/test-academic.md +14 -14
  108. package/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -58
  109. package/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -68
  110. package/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -69
  111. package/superpowers/skills/test-driven-development/SKILL.md +320 -320
  112. package/superpowers/skills/test-driven-development/writing-good-tests.md +198 -198
  113. package/superpowers/skills/using-git-worktrees/SKILL.md +167 -167
  114. package/superpowers/skills/using-superpowers/SKILL.md +63 -63
  115. package/superpowers/skills/using-superpowers/references/antigravity-tools.md +23 -23
  116. package/superpowers/skills/using-superpowers/references/codex-tools.md +108 -108
  117. package/superpowers/skills/using-superpowers/references/gemini-tools.md +63 -63
  118. package/superpowers/skills/using-superpowers/references/hermes-tools.md +56 -56
  119. package/superpowers/skills/using-superpowers/references/pi-tools.md +16 -16
  120. package/superpowers/skills/verification-before-completion/SKILL.md +120 -120
  121. package/superpowers/skills/writing-plans/SKILL.md +171 -171
  122. package/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -49
  123. package/superpowers/skills/writing-skills/SKILL.md +679 -679
  124. package/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -1150
  125. package/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -189
  126. package/superpowers/skills/writing-skills/persuasion-principles.md +187 -187
  127. package/superpowers/skills/writing-skills/render-graphs.js +169 -169
  128. package/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -384
  129. package/cbb/worktrees/commands/extend.md +0 -65
  130. package/cbb/worktrees/skills/openspec-close-worktree/scripts/find-target-worktree.js +0 -96
  131. package/cbb/worktrees/skills/openspec-extend-worktree/SKILL.md +0 -390
  132. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/check-env.js +0 -95
  133. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/check-repos.js +0 -98
  134. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/create-branches-and-worktrees.js +0 -135
  135. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/install-ai.js +0 -150
  136. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/list-available-apps.js +0 -88
  137. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/sync-repos.js +0 -93
  138. package/cbb/worktrees/skills/openspec-init-worktree/scripts/find-workspace-root.js +0 -67
  139. package/cbb/worktrees/skills/openspec-init-worktree/scripts/generate-app-options.js +0 -93
  140. package/cbb/worktrees/skills/openspec-init-worktree/scripts/push-core.js +0 -136
  141. package/cbb/worktrees/skills/openspec-push-worktrees/scripts/silence-popup.js +0 -23
  142. package/config/config.sample.json +0 -16
  143. /package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/silence-popup.js +0 -0
  144. /package/cbb/worktrees/skills/{openspec-extend-worktree → cbb-worktree-init}/scripts/silence-popup.js +0 -0
  145. /package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-push}/scripts/silence-popup.js +0 -0
@@ -1,560 +1,560 @@
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
-
12
- 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.
13
-
14
- **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`, `schemas`, `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.
15
-
16
- ---
17
-
18
- ## Preflight
19
-
20
- Before starting, check if the OpenSpec CLI is installed:
21
-
22
- ```bash
23
- # Unix/macOS
24
- openspec --version 2>&1 || echo "CLI_NOT_INSTALLED"
25
- # Windows (PowerShell)
26
- # if (Get-Command openspec -ErrorAction SilentlyContinue) { openspec --version } else { echo "CLI_NOT_INSTALLED" }
27
- ```
28
-
29
- **If CLI not installed:**
30
- > OpenSpec CLI is not installed. Install it first, then come back to `/openspec-onboard`.
31
-
32
- Stop here if not installed.
33
-
34
- ---
35
-
36
- ## Phase 1: Welcome
37
-
38
- Display:
39
-
40
- ```
41
- ## Welcome to OpenSpec!
42
-
43
- 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.
44
-
45
- **What we'll do:**
46
- 1. Pick a small, real task in your codebase
47
- 2. Explore the problem briefly
48
- 3. Create a change (the container for our work)
49
- 4. Build the artifacts: proposal → specs → design → tasks
50
- 5. Implement the tasks
51
- 6. Archive the completed change
52
-
53
- **Time:** ~15-20 minutes
54
-
55
- Let's start by finding something to work on.
56
- ```
57
-
58
- ---
59
-
60
- ## Phase 2: Task Selection
61
-
62
- ### Codebase Analysis
63
-
64
- Scan the codebase for small improvement opportunities. Look for:
65
-
66
- 1. **TODO/FIXME comments** - Search for `TODO`, `FIXME`, `HACK`, `XXX` in code files
67
- 2. **Missing error handling** - `catch` blocks that swallow errors, risky operations without try-catch
68
- 3. **Functions without tests** - Cross-reference `src/` with test directories
69
- 4. **Type issues** - `any` types in TypeScript files (`: any`, `as any`)
70
- 5. **Debug artifacts** - `console.log`, `console.debug`, `debugger` statements in non-debug code
71
- 6. **Missing validation** - User input handlers without validation
72
-
73
- Also check recent git activity:
74
- ```bash
75
- # Unix/macOS
76
- git log --oneline -10 2>/dev/null || echo "No git history"
77
- # Windows (PowerShell)
78
- # git log --oneline -10 2>$null; if ($LASTEXITCODE -ne 0) { echo "No git history" }
79
- ```
80
-
81
- ### Present Suggestions
82
-
83
- From your analysis, present 3-4 specific suggestions:
84
-
85
- ```
86
- ## Task Suggestions
87
-
88
- Based on scanning your codebase, here are some good starter tasks:
89
-
90
- **1. [Most promising task]**
91
- Location: `src/path/to/file.ts:42`
92
- Scope: ~1-2 files, ~20-30 lines
93
- Why it's good: [brief reason]
94
-
95
- **2. [Second task]**
96
- Location: `src/another/file.ts`
97
- Scope: ~1 file, ~15 lines
98
- Why it's good: [brief reason]
99
-
100
- **3. [Third task]**
101
- Location: [location]
102
- Scope: [estimate]
103
- Why it's good: [brief reason]
104
-
105
- **4. Something else?**
106
- Tell me what you'd like to work on.
107
-
108
- Which task interests you? (Pick a number or describe your own)
109
- ```
110
-
111
- **If nothing found:** Fall back to asking what the user wants to build:
112
- > I didn't find obvious quick wins in your codebase. What's something small you've been meaning to add or fix?
113
-
114
- ### Scope Guardrail
115
-
116
- If the user picks or describes something too large (major feature, multi-day work):
117
-
118
- ```
119
- That's a valuable task, but it's probably larger than ideal for your first OpenSpec run-through.
120
-
121
- For learning the workflow, smaller is better—it lets you see the full cycle without getting stuck in implementation details.
122
-
123
- **Options:**
124
- 1. **Slice it smaller** - What's the smallest useful piece of [their task]? Maybe just [specific slice]?
125
- 2. **Pick something else** - One of the other suggestions, or a different small task?
126
- 3. **Do it anyway** - If you really want to tackle this, we can. Just know it'll take longer.
127
-
128
- What would you prefer?
129
- ```
130
-
131
- Let the user override if they insist—this is a soft guardrail.
132
-
133
- ---
134
-
135
- ## Phase 3: Explore Demo
136
-
137
- Once a task is selected, briefly demonstrate explore mode:
138
-
139
- ```
140
- Before we create a change, let me quickly show you **explore mode**—it's how you think through problems before committing to a direction.
141
- ```
142
-
143
- Spend 1-2 minutes investigating the relevant code:
144
- - Read the file(s) involved
145
- - Draw a quick ASCII diagram if it helps
146
- - Note any considerations
147
-
148
- ```
149
- ## Quick Exploration
150
-
151
- [Your brief analysis—what you found, any considerations]
152
-
153
- ┌─────────────────────────────────────────┐
154
- │ [Optional: ASCII diagram if helpful] │
155
- └─────────────────────────────────────────┘
156
-
157
- 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.
158
-
159
- Now let's create a change to hold our work.
160
- ```
161
-
162
- **PAUSE** - Wait for user acknowledgment before proceeding.
163
-
164
- ---
165
-
166
- ## Phase 4: Create the Change
167
-
168
- **EXPLAIN:**
169
- ```
170
- ## Creating a Change
171
-
172
- 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.
173
-
174
- Let me create one for our task.
175
- ```
176
-
177
- **DO:** Create the change with a derived kebab-case name:
178
- ```bash
179
- openspec new change "<derived-name>"
180
- ```
181
-
182
- **SHOW:**
183
- ```
184
- Created: <changeRoot from status JSON>
185
-
186
- The folder structure:
187
- ```
188
- <changeRoot>/
189
- ├── proposal.md ← Why we're doing this (empty, we'll fill it)
190
- ├── design.md ← How we'll build it (empty)
191
- ├── specs/ ← Detailed requirements (empty)
192
- └── tasks.md ← Implementation checklist (empty)
193
- ```
194
-
195
- Now let's fill in the first artifact—the proposal.
196
- ```
197
-
198
- ---
199
-
200
- ## Phase 5: Proposal
201
-
202
- **EXPLAIN:**
203
- ```
204
- ## The Proposal
205
-
206
- 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.
207
-
208
- I'll draft one based on our task.
209
- ```
210
-
211
- **DO:** Draft the proposal content (don't save yet):
212
-
213
- `<capability-path>` is the spec directory relative to `specs/` (for example,
214
- `user-auth` or `identity/user-auth`). Use the exact existing path for modified
215
- capabilities. For new capabilities, follow the project's established spec
216
- organization.
217
-
218
- ```
219
- Here's a draft proposal:
220
-
221
- ---
222
-
223
- ## Why
224
-
225
- [1-2 sentences explaining the problem/opportunity]
226
-
227
- ## What Changes
228
-
229
- [Bullet points of what will be different]
230
-
231
- ## Capabilities
232
-
233
- ### New Capabilities
234
- - `<capability-path>`: [brief description]
235
-
236
- ### Modified Capabilities
237
- <!-- If modifying existing behavior -->
238
- - `<existing-capability-path>`: [brief description]
239
-
240
- ## Impact
241
-
242
- - `src/path/to/file.ts`: [what changes]
243
- - [other files if applicable]
244
-
245
- ---
246
-
247
- Does this capture the intent? I can adjust before we save it.
248
- ```
249
-
250
- **PAUSE** - Wait for user approval/feedback.
251
-
252
- After approval, save the proposal:
253
- ```bash
254
- openspec instructions proposal --change "<name>" --json
255
- ```
256
- Then write the content to the `resolvedOutputPath` from `openspec instructions proposal --change "<name>" --json`.
257
-
258
- ```
259
- Proposal saved. This is your "why" document—you can always come back and refine it as understanding evolves.
260
-
261
- Next up: specs.
262
- ```
263
-
264
- ---
265
-
266
- ## Phase 6: Specs
267
-
268
- **EXPLAIN:**
269
- ```
270
- ## Specs
271
-
272
- Specs define **what** we're building in precise, testable terms. They use a requirement/scenario format that makes expected behavior crystal clear.
273
-
274
- For a small task like this, we might only need one spec file.
275
- ```
276
-
277
- **DO:** Resolve where the spec file should be created:
278
- ```bash
279
- openspec instructions specs --change "<name>" --json
280
- # Use resolvedOutputPath from the JSON. If it is a glob, choose the concrete file path using the schema instruction and the change's context.
281
- ```
282
-
283
- Draft the spec content:
284
-
285
- ```
286
- Here's the spec:
287
-
288
- ---
289
-
290
- ## ADDED Requirements
291
-
292
- ### Requirement: <Name>
293
-
294
- <Description of what the system should do>
295
-
296
- #### Scenario: <Scenario name>
297
-
298
- - **WHEN** <trigger condition>
299
- - **THEN** <expected outcome>
300
- - **AND** <additional outcome if needed>
301
-
302
- ---
303
-
304
- This format—WHEN/THEN/AND—makes requirements testable. You can literally read them as test cases.
305
- ```
306
-
307
- Save to the concrete file path chosen from `resolvedOutputPath`.
308
-
309
- ---
310
-
311
- ## Phase 7: Design
312
-
313
- **EXPLAIN:**
314
- ```
315
- ## Design
316
-
317
- The design captures **how** we'll build it—technical decisions, tradeoffs, approach.
318
-
319
- For small changes, this might be brief. That's fine—not every change needs deep design discussion.
320
- ```
321
-
322
- **DO:** Draft design.md:
323
-
324
- ```
325
- Here's the design:
326
-
327
- ---
328
-
329
- ## Context
330
-
331
- [Brief context about the current state]
332
-
333
- ## Goals / Non-Goals
334
-
335
- **Goals:**
336
- - [What we're trying to achieve]
337
-
338
- **Non-Goals:**
339
- - [What's explicitly out of scope]
340
-
341
- ## Decisions
342
-
343
- ### Decision 1: [Key decision]
344
-
345
- [Explanation of approach and rationale]
346
-
347
- ---
348
-
349
- For a small task, this captures the key decisions without over-engineering.
350
- ```
351
-
352
- Save to the `resolvedOutputPath` from `openspec instructions design --change "<name>" --json`.
353
-
354
- ---
355
-
356
- ## Phase 8: Tasks
357
-
358
- **EXPLAIN:**
359
- ```
360
- ## Tasks
361
-
362
- Finally, we break the work into implementation tasks—checkboxes that drive the apply phase.
363
-
364
- These should be small, clear, and in logical order.
365
- ```
366
-
367
- **DO:** Generate tasks based on specs and design:
368
-
369
- ```
370
- Here are the implementation tasks:
371
-
372
- ---
373
-
374
- ## 1. [Category or file]
375
-
376
- - [ ] 1.1 [Specific task] — verify: [test, command, observable behavior, or delivered artifact]
377
- - [ ] 1.2 [Specific task] — verify: [test, command, observable behavior, or delivered artifact]
378
-
379
- ## 2. Integration Verification
380
-
381
- - [ ] 2.1 Verify [broader integration or system behavior] with [end-to-end test or observable result]
382
-
383
- ---
384
-
385
- Each checkbox becomes a unit of work in the apply phase. Ready to implement?
386
- ```
387
-
388
- **PAUSE** - Wait for user to confirm they're ready to implement.
389
-
390
- Save to the `resolvedOutputPath` from `openspec instructions tasks --change "<name>" --json`.
391
-
392
- ---
393
-
394
- ## Phase 9: Apply (Implementation)
395
-
396
- **EXPLAIN:**
397
- ```
398
- ## Implementation
399
-
400
- 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.
401
- ```
402
-
403
- **DO:** For each task:
404
-
405
- 1. Announce: "Working on task N: [description]"
406
- 2. Implement the change in the codebase
407
- 3. Reference specs/design naturally: "The spec says X, so I'm doing Y"
408
- 4. Mark complete in tasks.md: `- [ ]` → `- [x]`
409
- 5. Brief status: "✓ Task N complete"
410
-
411
- Keep narration light—don't over-explain every line of code.
412
-
413
- After all tasks:
414
-
415
- ```
416
- ## Implementation Complete
417
-
418
- All tasks done:
419
- - [x] Task 1
420
- - [x] Task 2
421
- - [x] ...
422
-
423
- The change is implemented! One more step—let's archive it.
424
- ```
425
-
426
- ---
427
-
428
- ## Phase 10: Archive
429
-
430
- **EXPLAIN:**
431
- ```
432
- ## Archiving
433
-
434
- When a change is complete, we archive it. The archive path is derived from `planningHome.changesDir` and the date.
435
-
436
- Archived changes become your project's decision history—you can always find them later to understand why something was built a certain way.
437
- ```
438
-
439
- **DO:** Archive the change (`--yes` answers the confirmation prompts, which you cannot answer from a tool call):
440
- ```bash
441
- openspec archive "<name>" --yes
442
- ```
443
-
444
- **SHOW:**
445
- ```
446
- 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)
447
-
448
- The change is now part of your project's history. The code is in your codebase, the decision record is preserved.
449
- ```
450
-
451
- ---
452
-
453
- ## Phase 11: Recap & Next Steps
454
-
455
- ```
456
- ## Congratulations!
457
-
458
- You just completed a full OpenSpec cycle:
459
-
460
- 1. **Explore** - Thought through the problem
461
- 2. **New** - Created a change container
462
- 3. **Proposal** - Captured WHY
463
- 4. **Specs** - Defined WHAT in detail
464
- 5. **Design** - Decided HOW
465
- 6. **Tasks** - Broke it into steps
466
- 7. **Apply** - Implemented the work
467
- 8. **Archive** - Preserved the record
468
-
469
- This same rhythm works for any size change—a small fix or a major feature.
470
-
471
- ---
472
-
473
- ## Command Reference
474
-
475
- **Core workflow:**
476
-
477
- | Command | What it does |
478
- |-------------------|--------------------------------------------|
479
- | `/openspec-propose` | Create a change and generate all artifacts |
480
- | `/openspec-explore` | Think through problems before/during work |
481
- | `/openspec-apply-change` | Implement tasks from a change |
482
- | `/openspec-archive-change` | Archive a completed change |
483
-
484
- **Additional commands** (only if installed - availability depends on your profile):
485
-
486
- | Command | What it does |
487
- |--------------------|----------------------------------------------------------|
488
- | `/openspec-new-change` | Start a new change, step through artifacts one at a time |
489
- | `/openspec-continue-change` | Continue working on an existing change |
490
- | `/openspec-ff-change` | Fast-forward: create all artifacts at once |
491
- | `/openspec-verify-change` | Verify implementation matches artifacts |
492
-
493
- ---
494
-
495
- ## What's Next?
496
-
497
- Try `/openspec-propose` on something you actually want to build. You've got the rhythm now!
498
- ```
499
-
500
- ---
501
-
502
- ## Graceful Exit Handling
503
-
504
- ### User wants to stop mid-way
505
-
506
- If the user says they need to stop, want to pause, or seem disengaged:
507
-
508
- ```
509
- No problem! Your change is saved at the `changeRoot` reported by `openspec status --change "<name>" --json`.
510
-
511
- To pick up where we left off later:
512
- - `/openspec-continue-change <name>` - Resume artifact creation (if installed; otherwise `openspec status --change "<name>" --json` shows the next artifact)
513
- - `/openspec-apply-change <name>` - Jump to implementation (if tasks exist)
514
-
515
- The work won't be lost. Come back whenever you're ready.
516
- ```
517
-
518
- Exit gracefully without pressure.
519
-
520
- ### User just wants command reference
521
-
522
- If the user says they just want to see the commands or skip the tutorial:
523
-
524
- ```
525
- ## OpenSpec Quick Reference
526
-
527
- **Core workflow:**
528
-
529
- | Command | What it does |
530
- |--------------------------|--------------------------------------------|
531
- | `/openspec-propose <name>` | Create a change and generate all artifacts |
532
- | `/openspec-explore` | Think through problems (no code changes) |
533
- | `/openspec-apply-change <name>` | Implement tasks |
534
- | `/openspec-archive-change <name>` | Archive when done |
535
-
536
- **Additional commands** (only if installed - availability depends on your profile):
537
-
538
- | Command | What it does |
539
- |---------------------------|-------------------------------------|
540
- | `/openspec-new-change <name>` | Start a new change, step by step |
541
- | `/openspec-continue-change <name>` | Continue an existing change |
542
- | `/openspec-ff-change <name>` | Fast-forward: all artifacts at once |
543
- | `/openspec-verify-change <name>` | Verify implementation |
544
-
545
- Try `/openspec-propose` to start your first change.
546
- ```
547
-
548
- Exit gracefully.
549
-
550
- ---
551
-
552
- ## Guardrails
553
-
554
- - **Follow the EXPLAIN → DO → SHOW → PAUSE pattern** at key transitions (after explore, after proposal draft, after tasks, after archive)
555
- - **Keep narration light** during implementation—teach without lecturing
556
- - **Don't skip phases** even if the change is small—the goal is teaching the workflow
557
- - **Pause for acknowledgment** at marked points, but don't over-pause
558
- - **Handle exits gracefully**—never pressure the user to continue
559
- - **Use real codebase tasks**—don't simulate or use fake examples
560
- - **Adjust scope gently**—guide toward smaller tasks but respect user choice
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
+
12
+ 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.
13
+
14
+ **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`, `schemas`, `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.
15
+
16
+ ---
17
+
18
+ ## Preflight
19
+
20
+ Before starting, check if the OpenSpec CLI is installed:
21
+
22
+ ```bash
23
+ # Unix/macOS
24
+ openspec --version 2>&1 || echo "CLI_NOT_INSTALLED"
25
+ # Windows (PowerShell)
26
+ # if (Get-Command openspec -ErrorAction SilentlyContinue) { openspec --version } else { echo "CLI_NOT_INSTALLED" }
27
+ ```
28
+
29
+ **If CLI not installed:**
30
+ > OpenSpec CLI is not installed. Install it first, then come back to `/openspec-onboard`.
31
+
32
+ Stop here if not installed.
33
+
34
+ ---
35
+
36
+ ## Phase 1: Welcome
37
+
38
+ Display:
39
+
40
+ ```
41
+ ## Welcome to OpenSpec!
42
+
43
+ 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.
44
+
45
+ **What we'll do:**
46
+ 1. Pick a small, real task in your codebase
47
+ 2. Explore the problem briefly
48
+ 3. Create a change (the container for our work)
49
+ 4. Build the artifacts: proposal → specs → design → tasks
50
+ 5. Implement the tasks
51
+ 6. Archive the completed change
52
+
53
+ **Time:** ~15-20 minutes
54
+
55
+ Let's start by finding something to work on.
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Phase 2: Task Selection
61
+
62
+ ### Codebase Analysis
63
+
64
+ Scan the codebase for small improvement opportunities. Look for:
65
+
66
+ 1. **TODO/FIXME comments** - Search for `TODO`, `FIXME`, `HACK`, `XXX` in code files
67
+ 2. **Missing error handling** - `catch` blocks that swallow errors, risky operations without try-catch
68
+ 3. **Functions without tests** - Cross-reference `src/` with test directories
69
+ 4. **Type issues** - `any` types in TypeScript files (`: any`, `as any`)
70
+ 5. **Debug artifacts** - `console.log`, `console.debug`, `debugger` statements in non-debug code
71
+ 6. **Missing validation** - User input handlers without validation
72
+
73
+ Also check recent git activity:
74
+ ```bash
75
+ # Unix/macOS
76
+ git log --oneline -10 2>/dev/null || echo "No git history"
77
+ # Windows (PowerShell)
78
+ # git log --oneline -10 2>$null; if ($LASTEXITCODE -ne 0) { echo "No git history" }
79
+ ```
80
+
81
+ ### Present Suggestions
82
+
83
+ From your analysis, present 3-4 specific suggestions:
84
+
85
+ ```
86
+ ## Task Suggestions
87
+
88
+ Based on scanning your codebase, here are some good starter tasks:
89
+
90
+ **1. [Most promising task]**
91
+ Location: `src/path/to/file.ts:42`
92
+ Scope: ~1-2 files, ~20-30 lines
93
+ Why it's good: [brief reason]
94
+
95
+ **2. [Second task]**
96
+ Location: `src/another/file.ts`
97
+ Scope: ~1 file, ~15 lines
98
+ Why it's good: [brief reason]
99
+
100
+ **3. [Third task]**
101
+ Location: [location]
102
+ Scope: [estimate]
103
+ Why it's good: [brief reason]
104
+
105
+ **4. Something else?**
106
+ Tell me what you'd like to work on.
107
+
108
+ Which task interests you? (Pick a number or describe your own)
109
+ ```
110
+
111
+ **If nothing found:** Fall back to asking what the user wants to build:
112
+ > I didn't find obvious quick wins in your codebase. What's something small you've been meaning to add or fix?
113
+
114
+ ### Scope Guardrail
115
+
116
+ If the user picks or describes something too large (major feature, multi-day work):
117
+
118
+ ```
119
+ That's a valuable task, but it's probably larger than ideal for your first OpenSpec run-through.
120
+
121
+ For learning the workflow, smaller is better—it lets you see the full cycle without getting stuck in implementation details.
122
+
123
+ **Options:**
124
+ 1. **Slice it smaller** - What's the smallest useful piece of [their task]? Maybe just [specific slice]?
125
+ 2. **Pick something else** - One of the other suggestions, or a different small task?
126
+ 3. **Do it anyway** - If you really want to tackle this, we can. Just know it'll take longer.
127
+
128
+ What would you prefer?
129
+ ```
130
+
131
+ Let the user override if they insist—this is a soft guardrail.
132
+
133
+ ---
134
+
135
+ ## Phase 3: Explore Demo
136
+
137
+ Once a task is selected, briefly demonstrate explore mode:
138
+
139
+ ```
140
+ Before we create a change, let me quickly show you **explore mode**—it's how you think through problems before committing to a direction.
141
+ ```
142
+
143
+ Spend 1-2 minutes investigating the relevant code:
144
+ - Read the file(s) involved
145
+ - Draw a quick ASCII diagram if it helps
146
+ - Note any considerations
147
+
148
+ ```
149
+ ## Quick Exploration
150
+
151
+ [Your brief analysis—what you found, any considerations]
152
+
153
+ ┌─────────────────────────────────────────┐
154
+ │ [Optional: ASCII diagram if helpful] │
155
+ └─────────────────────────────────────────┘
156
+
157
+ 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.
158
+
159
+ Now let's create a change to hold our work.
160
+ ```
161
+
162
+ **PAUSE** - Wait for user acknowledgment before proceeding.
163
+
164
+ ---
165
+
166
+ ## Phase 4: Create the Change
167
+
168
+ **EXPLAIN:**
169
+ ```
170
+ ## Creating a Change
171
+
172
+ 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.
173
+
174
+ Let me create one for our task.
175
+ ```
176
+
177
+ **DO:** Create the change with a derived kebab-case name:
178
+ ```bash
179
+ openspec new change "<derived-name>"
180
+ ```
181
+
182
+ **SHOW:**
183
+ ```
184
+ Created: <changeRoot from status JSON>
185
+
186
+ The folder structure:
187
+ ```
188
+ <changeRoot>/
189
+ ├── proposal.md ← Why we're doing this (empty, we'll fill it)
190
+ ├── design.md ← How we'll build it (empty)
191
+ ├── specs/ ← Detailed requirements (empty)
192
+ └── tasks.md ← Implementation checklist (empty)
193
+ ```
194
+
195
+ Now let's fill in the first artifact—the proposal.
196
+ ```
197
+
198
+ ---
199
+
200
+ ## Phase 5: Proposal
201
+
202
+ **EXPLAIN:**
203
+ ```
204
+ ## The Proposal
205
+
206
+ 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.
207
+
208
+ I'll draft one based on our task.
209
+ ```
210
+
211
+ **DO:** Draft the proposal content (don't save yet):
212
+
213
+ `<capability-path>` is the spec directory relative to `specs/` (for example,
214
+ `user-auth` or `identity/user-auth`). Use the exact existing path for modified
215
+ capabilities. For new capabilities, follow the project's established spec
216
+ organization.
217
+
218
+ ```
219
+ Here's a draft proposal:
220
+
221
+ ---
222
+
223
+ ## Why
224
+
225
+ [1-2 sentences explaining the problem/opportunity]
226
+
227
+ ## What Changes
228
+
229
+ [Bullet points of what will be different]
230
+
231
+ ## Capabilities
232
+
233
+ ### New Capabilities
234
+ - `<capability-path>`: [brief description]
235
+
236
+ ### Modified Capabilities
237
+ <!-- If modifying existing behavior -->
238
+ - `<existing-capability-path>`: [brief description]
239
+
240
+ ## Impact
241
+
242
+ - `src/path/to/file.ts`: [what changes]
243
+ - [other files if applicable]
244
+
245
+ ---
246
+
247
+ Does this capture the intent? I can adjust before we save it.
248
+ ```
249
+
250
+ **PAUSE** - Wait for user approval/feedback.
251
+
252
+ After approval, save the proposal:
253
+ ```bash
254
+ openspec instructions proposal --change "<name>" --json
255
+ ```
256
+ Then write the content to the `resolvedOutputPath` from `openspec instructions proposal --change "<name>" --json`.
257
+
258
+ ```
259
+ Proposal saved. This is your "why" document—you can always come back and refine it as understanding evolves.
260
+
261
+ Next up: specs.
262
+ ```
263
+
264
+ ---
265
+
266
+ ## Phase 6: Specs
267
+
268
+ **EXPLAIN:**
269
+ ```
270
+ ## Specs
271
+
272
+ Specs define **what** we're building in precise, testable terms. They use a requirement/scenario format that makes expected behavior crystal clear.
273
+
274
+ For a small task like this, we might only need one spec file.
275
+ ```
276
+
277
+ **DO:** Resolve where the spec file should be created:
278
+ ```bash
279
+ openspec instructions specs --change "<name>" --json
280
+ # Use resolvedOutputPath from the JSON. If it is a glob, choose the concrete file path using the schema instruction and the change's context.
281
+ ```
282
+
283
+ Draft the spec content:
284
+
285
+ ```
286
+ Here's the spec:
287
+
288
+ ---
289
+
290
+ ## ADDED Requirements
291
+
292
+ ### Requirement: <Name>
293
+
294
+ <Description of what the system should do>
295
+
296
+ #### Scenario: <Scenario name>
297
+
298
+ - **WHEN** <trigger condition>
299
+ - **THEN** <expected outcome>
300
+ - **AND** <additional outcome if needed>
301
+
302
+ ---
303
+
304
+ This format—WHEN/THEN/AND—makes requirements testable. You can literally read them as test cases.
305
+ ```
306
+
307
+ Save to the concrete file path chosen from `resolvedOutputPath`.
308
+
309
+ ---
310
+
311
+ ## Phase 7: Design
312
+
313
+ **EXPLAIN:**
314
+ ```
315
+ ## Design
316
+
317
+ The design captures **how** we'll build it—technical decisions, tradeoffs, approach.
318
+
319
+ For small changes, this might be brief. That's fine—not every change needs deep design discussion.
320
+ ```
321
+
322
+ **DO:** Draft design.md:
323
+
324
+ ```
325
+ Here's the design:
326
+
327
+ ---
328
+
329
+ ## Context
330
+
331
+ [Brief context about the current state]
332
+
333
+ ## Goals / Non-Goals
334
+
335
+ **Goals:**
336
+ - [What we're trying to achieve]
337
+
338
+ **Non-Goals:**
339
+ - [What's explicitly out of scope]
340
+
341
+ ## Decisions
342
+
343
+ ### Decision 1: [Key decision]
344
+
345
+ [Explanation of approach and rationale]
346
+
347
+ ---
348
+
349
+ For a small task, this captures the key decisions without over-engineering.
350
+ ```
351
+
352
+ Save to the `resolvedOutputPath` from `openspec instructions design --change "<name>" --json`.
353
+
354
+ ---
355
+
356
+ ## Phase 8: Tasks
357
+
358
+ **EXPLAIN:**
359
+ ```
360
+ ## Tasks
361
+
362
+ Finally, we break the work into implementation tasks—checkboxes that drive the apply phase.
363
+
364
+ These should be small, clear, and in logical order.
365
+ ```
366
+
367
+ **DO:** Generate tasks based on specs and design:
368
+
369
+ ```
370
+ Here are the implementation tasks:
371
+
372
+ ---
373
+
374
+ ## 1. [Category or file]
375
+
376
+ - [ ] 1.1 [Specific task] — verify: [test, command, observable behavior, or delivered artifact]
377
+ - [ ] 1.2 [Specific task] — verify: [test, command, observable behavior, or delivered artifact]
378
+
379
+ ## 2. Integration Verification
380
+
381
+ - [ ] 2.1 Verify [broader integration or system behavior] with [end-to-end test or observable result]
382
+
383
+ ---
384
+
385
+ Each checkbox becomes a unit of work in the apply phase. Ready to implement?
386
+ ```
387
+
388
+ **PAUSE** - Wait for user to confirm they're ready to implement.
389
+
390
+ Save to the `resolvedOutputPath` from `openspec instructions tasks --change "<name>" --json`.
391
+
392
+ ---
393
+
394
+ ## Phase 9: Apply (Implementation)
395
+
396
+ **EXPLAIN:**
397
+ ```
398
+ ## Implementation
399
+
400
+ 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.
401
+ ```
402
+
403
+ **DO:** For each task:
404
+
405
+ 1. Announce: "Working on task N: [description]"
406
+ 2. Implement the change in the codebase
407
+ 3. Reference specs/design naturally: "The spec says X, so I'm doing Y"
408
+ 4. Mark complete in tasks.md: `- [ ]` → `- [x]`
409
+ 5. Brief status: "✓ Task N complete"
410
+
411
+ Keep narration light—don't over-explain every line of code.
412
+
413
+ After all tasks:
414
+
415
+ ```
416
+ ## Implementation Complete
417
+
418
+ All tasks done:
419
+ - [x] Task 1
420
+ - [x] Task 2
421
+ - [x] ...
422
+
423
+ The change is implemented! One more step—let's archive it.
424
+ ```
425
+
426
+ ---
427
+
428
+ ## Phase 10: Archive
429
+
430
+ **EXPLAIN:**
431
+ ```
432
+ ## Archiving
433
+
434
+ When a change is complete, we archive it. The archive path is derived from `planningHome.changesDir` and the date.
435
+
436
+ Archived changes become your project's decision history—you can always find them later to understand why something was built a certain way.
437
+ ```
438
+
439
+ **DO:** Archive the change (`--yes` answers the confirmation prompts, which you cannot answer from a tool call):
440
+ ```bash
441
+ openspec archive "<name>" --yes
442
+ ```
443
+
444
+ **SHOW:**
445
+ ```
446
+ 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)
447
+
448
+ The change is now part of your project's history. The code is in your codebase, the decision record is preserved.
449
+ ```
450
+
451
+ ---
452
+
453
+ ## Phase 11: Recap & Next Steps
454
+
455
+ ```
456
+ ## Congratulations!
457
+
458
+ You just completed a full OpenSpec cycle:
459
+
460
+ 1. **Explore** - Thought through the problem
461
+ 2. **New** - Created a change container
462
+ 3. **Proposal** - Captured WHY
463
+ 4. **Specs** - Defined WHAT in detail
464
+ 5. **Design** - Decided HOW
465
+ 6. **Tasks** - Broke it into steps
466
+ 7. **Apply** - Implemented the work
467
+ 8. **Archive** - Preserved the record
468
+
469
+ This same rhythm works for any size change—a small fix or a major feature.
470
+
471
+ ---
472
+
473
+ ## Command Reference
474
+
475
+ **Core workflow:**
476
+
477
+ | Command | What it does |
478
+ |-------------------|--------------------------------------------|
479
+ | `/openspec-propose` | Create a change and generate all artifacts |
480
+ | `/openspec-explore` | Think through problems before/during work |
481
+ | `/openspec-apply-change` | Implement tasks from a change |
482
+ | `/openspec-archive-change` | Archive a completed change |
483
+
484
+ **Additional commands** (only if installed - availability depends on your profile):
485
+
486
+ | Command | What it does |
487
+ |--------------------|----------------------------------------------------------|
488
+ | `/openspec-new-change` | Start a new change, step through artifacts one at a time |
489
+ | `/openspec-continue-change` | Continue working on an existing change |
490
+ | `/openspec-ff-change` | Fast-forward: create all artifacts at once |
491
+ | `/openspec-verify-change` | Verify implementation matches artifacts |
492
+
493
+ ---
494
+
495
+ ## What's Next?
496
+
497
+ Try `/openspec-propose` on something you actually want to build. You've got the rhythm now!
498
+ ```
499
+
500
+ ---
501
+
502
+ ## Graceful Exit Handling
503
+
504
+ ### User wants to stop mid-way
505
+
506
+ If the user says they need to stop, want to pause, or seem disengaged:
507
+
508
+ ```
509
+ No problem! Your change is saved at the `changeRoot` reported by `openspec status --change "<name>" --json`.
510
+
511
+ To pick up where we left off later:
512
+ - `/openspec-continue-change <name>` - Resume artifact creation (if installed; otherwise `openspec status --change "<name>" --json` shows the next artifact)
513
+ - `/openspec-apply-change <name>` - Jump to implementation (if tasks exist)
514
+
515
+ The work won't be lost. Come back whenever you're ready.
516
+ ```
517
+
518
+ Exit gracefully without pressure.
519
+
520
+ ### User just wants command reference
521
+
522
+ If the user says they just want to see the commands or skip the tutorial:
523
+
524
+ ```
525
+ ## OpenSpec Quick Reference
526
+
527
+ **Core workflow:**
528
+
529
+ | Command | What it does |
530
+ |--------------------------|--------------------------------------------|
531
+ | `/openspec-propose <name>` | Create a change and generate all artifacts |
532
+ | `/openspec-explore` | Think through problems (no code changes) |
533
+ | `/openspec-apply-change <name>` | Implement tasks |
534
+ | `/openspec-archive-change <name>` | Archive when done |
535
+
536
+ **Additional commands** (only if installed - availability depends on your profile):
537
+
538
+ | Command | What it does |
539
+ |---------------------------|-------------------------------------|
540
+ | `/openspec-new-change <name>` | Start a new change, step by step |
541
+ | `/openspec-continue-change <name>` | Continue an existing change |
542
+ | `/openspec-ff-change <name>` | Fast-forward: all artifacts at once |
543
+ | `/openspec-verify-change <name>` | Verify implementation |
544
+
545
+ Try `/openspec-propose` to start your first change.
546
+ ```
547
+
548
+ Exit gracefully.
549
+
550
+ ---
551
+
552
+ ## Guardrails
553
+
554
+ - **Follow the EXPLAIN → DO → SHOW → PAUSE pattern** at key transitions (after explore, after proposal draft, after tasks, after archive)
555
+ - **Keep narration light** during implementation—teach without lecturing
556
+ - **Don't skip phases** even if the change is small—the goal is teaching the workflow
557
+ - **Pause for acknowledgment** at marked points, but don't over-pause
558
+ - **Handle exits gracefully**—never pressure the user to continue
559
+ - **Use real codebase tasks**—don't simulate or use fake examples
560
+ - **Adjust scope gently**—guide toward smaller tasks but respect user choice