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