rpi-kit 2.4.0 → 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 (47) hide show
  1. package/.claude-plugin/marketplace.json +2 -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 +9 -0
  44. package/README.md +6 -6
  45. package/bin/cli.js +60 -18
  46. package/marketplace.json +2 -2
  47. package/package.json +2 -1
@@ -5,14 +5,14 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
8
- "version": "2.4.0"
8
+ "version": "2.5.0"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "rpi-kit",
13
13
  "source": "./",
14
14
  "description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
15
- "version": "2.4.0",
15
+ "version": "2.5.0",
16
16
  "author": {
17
17
  "name": "Daniel Mendes"
18
18
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rpi-kit",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
5
5
  "author": {
6
6
  "name": "Daniel Mendes",
@@ -0,0 +1,149 @@
1
+ description = "Implement tasks from an OpenSpec change (Experimental)"
2
+
3
+ prompt = """
4
+ Implement tasks from an OpenSpec change.
5
+
6
+ **Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
7
+
8
+ **Steps**
9
+
10
+ 1. **Select the change**
11
+
12
+ If a name is provided, use it. Otherwise:
13
+ - Infer from conversation context if the user mentioned a change
14
+ - Auto-select if only one active change exists
15
+ - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
16
+
17
+ Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
18
+
19
+ 2. **Check status to understand the schema**
20
+ ```bash
21
+ openspec status --change "<name>" --json
22
+ ```
23
+ Parse the JSON to understand:
24
+ - `schemaName`: The workflow being used (e.g., "spec-driven")
25
+ - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
26
+
27
+ 3. **Get apply instructions**
28
+
29
+ ```bash
30
+ openspec instructions apply --change "<name>" --json
31
+ ```
32
+
33
+ This returns:
34
+ - Context file paths (varies by schema)
35
+ - Progress (total, complete, remaining)
36
+ - Task list with status
37
+ - Dynamic instruction based on current state
38
+
39
+ **Handle states:**
40
+ - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue`
41
+ - If `state: "all_done"`: congratulate, suggest archive
42
+ - Otherwise: proceed to implementation
43
+
44
+ 4. **Read context files**
45
+
46
+ Read the files listed in `contextFiles` from the apply instructions output.
47
+ The files depend on the schema being used:
48
+ - **spec-driven**: proposal, specs, design, tasks
49
+ - Other schemas: follow the contextFiles from CLI output
50
+
51
+ 5. **Show current progress**
52
+
53
+ Display:
54
+ - Schema being used
55
+ - Progress: "N/M tasks complete"
56
+ - Remaining tasks overview
57
+ - Dynamic instruction from CLI
58
+
59
+ 6. **Implement tasks (loop until done or blocked)**
60
+
61
+ For each pending task:
62
+ - Show which task is being worked on
63
+ - Make the code changes required
64
+ - Keep changes minimal and focused
65
+ - Mark task complete in the tasks file: `- [ ]` → `- [x]`
66
+ - Continue to next task
67
+
68
+ **Pause if:**
69
+ - Task is unclear → ask for clarification
70
+ - Implementation reveals a design issue → suggest updating artifacts
71
+ - Error or blocker encountered → report and wait for guidance
72
+ - User interrupts
73
+
74
+ 7. **On completion or pause, show status**
75
+
76
+ Display:
77
+ - Tasks completed this session
78
+ - Overall progress: "N/M tasks complete"
79
+ - If all done: suggest archive
80
+ - If paused: explain why and wait for guidance
81
+
82
+ **Output During Implementation**
83
+
84
+ ```
85
+ ## Implementing: <change-name> (schema: <schema-name>)
86
+
87
+ Working on task 3/7: <task description>
88
+ [...implementation happening...]
89
+ ✓ Task complete
90
+
91
+ Working on task 4/7: <task description>
92
+ [...implementation happening...]
93
+ ✓ Task complete
94
+ ```
95
+
96
+ **Output On Completion**
97
+
98
+ ```
99
+ ## Implementation Complete
100
+
101
+ **Change:** <change-name>
102
+ **Schema:** <schema-name>
103
+ **Progress:** 7/7 tasks complete ✓
104
+
105
+ ### Completed This Session
106
+ - [x] Task 1
107
+ - [x] Task 2
108
+ ...
109
+
110
+ All tasks complete! You can archive this change with `/opsx:archive`.
111
+ ```
112
+
113
+ **Output On Pause (Issue Encountered)**
114
+
115
+ ```
116
+ ## Implementation Paused
117
+
118
+ **Change:** <change-name>
119
+ **Schema:** <schema-name>
120
+ **Progress:** 4/7 tasks complete
121
+
122
+ ### Issue Encountered
123
+ <description of the issue>
124
+
125
+ **Options:**
126
+ 1. <option 1>
127
+ 2. <option 2>
128
+ 3. Other approach
129
+
130
+ What would you like to do?
131
+ ```
132
+
133
+ **Guardrails**
134
+ - Keep going through tasks until done or blocked
135
+ - Always read context files before starting (from the apply instructions output)
136
+ - If task is ambiguous, pause and ask before implementing
137
+ - If implementation reveals issues, pause and suggest artifact updates
138
+ - Keep code changes minimal and scoped to each task
139
+ - Update task checkbox immediately after completing each task
140
+ - Pause on errors, blockers, or unclear requirements - don't guess
141
+ - Use contextFiles from CLI output, don't assume specific file names
142
+
143
+ **Fluid Workflow Integration**
144
+
145
+ This skill supports the "actions on a change" model:
146
+
147
+ - **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
148
+ - **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
149
+ """
@@ -0,0 +1,154 @@
1
+ description = "Archive a completed change in the experimental workflow"
2
+
3
+ prompt = """
4
+ Archive a completed change in the experimental workflow.
5
+
6
+ **Input**: Optionally specify a change name after `/opsx:archive` (e.g., `/opsx:archive add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
7
+
8
+ **Steps**
9
+
10
+ 1. **If no change name provided, prompt for selection**
11
+
12
+ Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
13
+
14
+ Show only active changes (not already archived).
15
+ Include the schema used for each change if available.
16
+
17
+ **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
18
+
19
+ 2. **Check artifact completion status**
20
+
21
+ Run `openspec status --change "<name>" --json` to check artifact completion.
22
+
23
+ Parse the JSON to understand:
24
+ - `schemaName`: The workflow being used
25
+ - `artifacts`: List of artifacts with their status (`done` or other)
26
+
27
+ **If any artifacts are not `done`:**
28
+ - Display warning listing incomplete artifacts
29
+ - Prompt user for confirmation to continue
30
+ - Proceed if user confirms
31
+
32
+ 3. **Check task completion status**
33
+
34
+ Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
35
+
36
+ Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
37
+
38
+ **If incomplete tasks found:**
39
+ - Display warning showing count of incomplete tasks
40
+ - Prompt user for confirmation to continue
41
+ - Proceed if user confirms
42
+
43
+ **If no tasks file exists:** Proceed without task-related warning.
44
+
45
+ 4. **Assess delta spec sync state**
46
+
47
+ Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
48
+
49
+ **If delta specs exist:**
50
+ - Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
51
+ - Determine what changes would be applied (adds, modifications, removals, renames)
52
+ - Show a combined summary before prompting
53
+
54
+ **Prompt options:**
55
+ - If changes needed: "Sync now (recommended)", "Archive without syncing"
56
+ - If already synced: "Archive now", "Sync anyway", "Cancel"
57
+
58
+ If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
59
+
60
+ 5. **Perform the archive**
61
+
62
+ Create the archive directory if it doesn't exist:
63
+ ```bash
64
+ mkdir -p openspec/changes/archive
65
+ ```
66
+
67
+ Generate target name using current date: `YYYY-MM-DD-<change-name>`
68
+
69
+ **Check if target already exists:**
70
+ - If yes: Fail with error, suggest renaming existing archive or using different date
71
+ - If no: Move the change directory to archive
72
+
73
+ ```bash
74
+ mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
75
+ ```
76
+
77
+ 6. **Display summary**
78
+
79
+ Show archive completion summary including:
80
+ - Change name
81
+ - Schema that was used
82
+ - Archive location
83
+ - Spec sync status (synced / sync skipped / no delta specs)
84
+ - Note about any warnings (incomplete artifacts/tasks)
85
+
86
+ **Output On Success**
87
+
88
+ ```
89
+ ## Archive Complete
90
+
91
+ **Change:** <change-name>
92
+ **Schema:** <schema-name>
93
+ **Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
94
+ **Specs:** ✓ Synced to main specs
95
+
96
+ All artifacts complete. All tasks complete.
97
+ ```
98
+
99
+ **Output On Success (No Delta Specs)**
100
+
101
+ ```
102
+ ## Archive Complete
103
+
104
+ **Change:** <change-name>
105
+ **Schema:** <schema-name>
106
+ **Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
107
+ **Specs:** No delta specs
108
+
109
+ All artifacts complete. All tasks complete.
110
+ ```
111
+
112
+ **Output On Success With Warnings**
113
+
114
+ ```
115
+ ## Archive Complete (with warnings)
116
+
117
+ **Change:** <change-name>
118
+ **Schema:** <schema-name>
119
+ **Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
120
+ **Specs:** Sync skipped (user chose to skip)
121
+
122
+ **Warnings:**
123
+ - Archived with 2 incomplete artifacts
124
+ - Archived with 3 incomplete tasks
125
+ - Delta spec sync was skipped (user chose to skip)
126
+
127
+ Review the archive if this was not intentional.
128
+ ```
129
+
130
+ **Output On Error (Archive Exists)**
131
+
132
+ ```
133
+ ## Archive Failed
134
+
135
+ **Change:** <change-name>
136
+ **Target:** openspec/changes/archive/YYYY-MM-DD-<name>/
137
+
138
+ Target archive directory already exists.
139
+
140
+ **Options:**
141
+ 1. Rename the existing archive
142
+ 2. Delete the existing archive if it's a duplicate
143
+ 3. Wait until a different date to archive
144
+ ```
145
+
146
+ **Guardrails**
147
+ - Always prompt for change selection if not provided
148
+ - Use artifact graph (openspec status --json) for completion checking
149
+ - Don't block archive on warnings - just inform and confirm
150
+ - Preserve .openspec.yaml when moving to archive (it moves with the directory)
151
+ - Show clear summary of what happened
152
+ - If sync is requested, use the Skill tool to invoke `openspec-sync-specs` (agent-driven)
153
+ - If delta specs exist, always run the sync assessment and show the combined summary before prompting
154
+ """
@@ -0,0 +1,239 @@
1
+ description = "Archive multiple completed changes at once"
2
+
3
+ prompt = """
4
+ Archive multiple completed changes in a single operation.
5
+
6
+ This skill allows you to batch-archive changes, handling spec conflicts intelligently by checking the codebase to determine what's actually implemented.
7
+
8
+ **Input**: None required (prompts for selection)
9
+
10
+ **Steps**
11
+
12
+ 1. **Get active changes**
13
+
14
+ Run `openspec list --json` to get all active changes.
15
+
16
+ If no active changes exist, inform user and stop.
17
+
18
+ 2. **Prompt for change selection**
19
+
20
+ Use **AskUserQuestion tool** with multi-select to let user choose changes:
21
+ - Show each change with its schema
22
+ - Include an option for "All changes"
23
+ - Allow any number of selections (1+ works, 2+ is the typical use case)
24
+
25
+ **IMPORTANT**: Do NOT auto-select. Always let the user choose.
26
+
27
+ 3. **Batch validation - gather status for all selected changes**
28
+
29
+ For each selected change, collect:
30
+
31
+ a. **Artifact status** - Run `openspec status --change "<name>" --json`
32
+ - Parse `schemaName` and `artifacts` list
33
+ - Note which artifacts are `done` vs other states
34
+
35
+ b. **Task completion** - Read `openspec/changes/<name>/tasks.md`
36
+ - Count `- [ ]` (incomplete) vs `- [x]` (complete)
37
+ - If no tasks file exists, note as "No tasks"
38
+
39
+ c. **Delta specs** - Check `openspec/changes/<name>/specs/` directory
40
+ - List which capability specs exist
41
+ - For each, extract requirement names (lines matching `### Requirement: <name>`)
42
+
43
+ 4. **Detect spec conflicts**
44
+
45
+ Build a map of `capability -> [changes that touch it]`:
46
+
47
+ ```
48
+ auth -> [change-a, change-b] <- CONFLICT (2+ changes)
49
+ api -> [change-c] <- OK (only 1 change)
50
+ ```
51
+
52
+ A conflict exists when 2+ selected changes have delta specs for the same capability.
53
+
54
+ 5. **Resolve conflicts agentically**
55
+
56
+ **For each conflict**, investigate the codebase:
57
+
58
+ a. **Read the delta specs** from each conflicting change to understand what each claims to add/modify
59
+
60
+ b. **Search the codebase** for implementation evidence:
61
+ - Look for code implementing requirements from each delta spec
62
+ - Check for related files, functions, or tests
63
+
64
+ c. **Determine resolution**:
65
+ - If only one change is actually implemented -> sync that one's specs
66
+ - If both implemented -> apply in chronological order (older first, newer overwrites)
67
+ - If neither implemented -> skip spec sync, warn user
68
+
69
+ d. **Record resolution** for each conflict:
70
+ - Which change's specs to apply
71
+ - In what order (if both)
72
+ - Rationale (what was found in codebase)
73
+
74
+ 6. **Show consolidated status table**
75
+
76
+ Display a table summarizing all changes:
77
+
78
+ ```
79
+ | Change | Artifacts | Tasks | Specs | Conflicts | Status |
80
+ |---------------------|-----------|-------|---------|-----------|--------|
81
+ | schema-management | Done | 5/5 | 2 delta | None | Ready |
82
+ | project-config | Done | 3/3 | 1 delta | None | Ready |
83
+ | add-oauth | Done | 4/4 | 1 delta | auth (!) | Ready* |
84
+ | add-verify-skill | 1 left | 2/5 | None | None | Warn |
85
+ ```
86
+
87
+ For conflicts, show the resolution:
88
+ ```
89
+ * Conflict resolution:
90
+ - auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
91
+ ```
92
+
93
+ For incomplete changes, show warnings:
94
+ ```
95
+ Warnings:
96
+ - add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
97
+ ```
98
+
99
+ 7. **Confirm batch operation**
100
+
101
+ Use **AskUserQuestion tool** with a single confirmation:
102
+
103
+ - "Archive N changes?" with options based on status
104
+ - Options might include:
105
+ - "Archive all N changes"
106
+ - "Archive only N ready changes (skip incomplete)"
107
+ - "Cancel"
108
+
109
+ If there are incomplete changes, make clear they'll be archived with warnings.
110
+
111
+ 8. **Execute archive for each confirmed change**
112
+
113
+ Process changes in the determined order (respecting conflict resolution):
114
+
115
+ a. **Sync specs** if delta specs exist:
116
+ - Use the openspec-sync-specs approach (agent-driven intelligent merge)
117
+ - For conflicts, apply in resolved order
118
+ - Track if sync was done
119
+
120
+ b. **Perform the archive**:
121
+ ```bash
122
+ mkdir -p openspec/changes/archive
123
+ mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
124
+ ```
125
+
126
+ c. **Track outcome** for each change:
127
+ - Success: archived successfully
128
+ - Failed: error during archive (record error)
129
+ - Skipped: user chose not to archive (if applicable)
130
+
131
+ 9. **Display summary**
132
+
133
+ Show final results:
134
+
135
+ ```
136
+ ## Bulk Archive Complete
137
+
138
+ Archived 3 changes:
139
+ - schema-management-cli -> archive/2026-01-19-schema-management-cli/
140
+ - project-config -> archive/2026-01-19-project-config/
141
+ - add-oauth -> archive/2026-01-19-add-oauth/
142
+
143
+ Skipped 1 change:
144
+ - add-verify-skill (user chose not to archive incomplete)
145
+
146
+ Spec sync summary:
147
+ - 4 delta specs synced to main specs
148
+ - 1 conflict resolved (auth: applied both in chronological order)
149
+ ```
150
+
151
+ If any failures:
152
+ ```
153
+ Failed 1 change:
154
+ - some-change: Archive directory already exists
155
+ ```
156
+
157
+ **Conflict Resolution Examples**
158
+
159
+ Example 1: Only one implemented
160
+ ```
161
+ Conflict: specs/auth/spec.md touched by [add-oauth, add-jwt]
162
+
163
+ Checking add-oauth:
164
+ - Delta adds "OAuth Provider Integration" requirement
165
+ - Searching codebase... found src/auth/oauth.ts implementing OAuth flow
166
+
167
+ Checking add-jwt:
168
+ - Delta adds "JWT Token Handling" requirement
169
+ - Searching codebase... no JWT implementation found
170
+
171
+ Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
172
+ ```
173
+
174
+ Example 2: Both implemented
175
+ ```
176
+ Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
177
+
178
+ Checking add-rest-api (created 2026-01-10):
179
+ - Delta adds "REST Endpoints" requirement
180
+ - Searching codebase... found src/api/rest.ts
181
+
182
+ Checking add-graphql (created 2026-01-15):
183
+ - Delta adds "GraphQL Schema" requirement
184
+ - Searching codebase... found src/api/graphql.ts
185
+
186
+ Resolution: Both implemented. Will apply add-rest-api specs first,
187
+ then add-graphql specs (chronological order, newer takes precedence).
188
+ ```
189
+
190
+ **Output On Success**
191
+
192
+ ```
193
+ ## Bulk Archive Complete
194
+
195
+ Archived N changes:
196
+ - <change-1> -> archive/YYYY-MM-DD-<change-1>/
197
+ - <change-2> -> archive/YYYY-MM-DD-<change-2>/
198
+
199
+ Spec sync summary:
200
+ - N delta specs synced to main specs
201
+ - No conflicts (or: M conflicts resolved)
202
+ ```
203
+
204
+ **Output On Partial Success**
205
+
206
+ ```
207
+ ## Bulk Archive Complete (partial)
208
+
209
+ Archived N changes:
210
+ - <change-1> -> archive/YYYY-MM-DD-<change-1>/
211
+
212
+ Skipped M changes:
213
+ - <change-2> (user chose not to archive incomplete)
214
+
215
+ Failed K changes:
216
+ - <change-3>: Archive directory already exists
217
+ ```
218
+
219
+ **Output When No Changes**
220
+
221
+ ```
222
+ ## No Changes to Archive
223
+
224
+ No active changes found. Create a new change to get started.
225
+ ```
226
+
227
+ **Guardrails**
228
+ - Allow any number of changes (1+ is fine, 2+ is the typical use case)
229
+ - Always prompt for selection, never auto-select
230
+ - Detect spec conflicts early and resolve by checking codebase
231
+ - When both changes are implemented, apply specs in chronological order
232
+ - Skip spec sync only when implementation is missing (warn user)
233
+ - Show clear per-change status before confirming
234
+ - Use single confirmation for entire batch
235
+ - Track and report all outcomes (success/skip/fail)
236
+ - Preserve .openspec.yaml when moving to archive
237
+ - Archive directory target uses current date: YYYY-MM-DD-<name>
238
+ - If archive target exists, fail that change but continue with others
239
+ """
@@ -0,0 +1,111 @@
1
+ description = "Continue working on a change - create the next artifact (Experimental)"
2
+
3
+ prompt = """
4
+ Continue working on a change by creating the next artifact.
5
+
6
+ **Input**: Optionally specify a change name after `/opsx:continue` (e.g., `/opsx:continue add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
7
+
8
+ **Steps**
9
+
10
+ 1. **If no change name provided, prompt for selection**
11
+
12
+ Run `openspec list --json` to get available changes sorted by most recently modified. Then use the **AskUserQuestion tool** to let the user select which change to work on.
13
+
14
+ Present the top 3-4 most recently modified changes as options, showing:
15
+ - Change name
16
+ - Schema (from `schema` field if present, otherwise "spec-driven")
17
+ - Status (e.g., "0/5 tasks", "complete", "no tasks")
18
+ - How recently it was modified (from `lastModified` field)
19
+
20
+ Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.
21
+
22
+ **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
23
+
24
+ 2. **Check current status**
25
+ ```bash
26
+ openspec status --change "<name>" --json
27
+ ```
28
+ Parse the JSON to understand current state. The response includes:
29
+ - `schemaName`: The workflow schema being used (e.g., "spec-driven")
30
+ - `artifacts`: Array of artifacts with their status ("done", "ready", "blocked")
31
+ - `isComplete`: Boolean indicating if all artifacts are complete
32
+
33
+ 3. **Act based on status**:
34
+
35
+ ---
36
+
37
+ **If all artifacts are complete (`isComplete: true`)**:
38
+ - Congratulate the user
39
+ - Show final status including the schema used
40
+ - Suggest: "All artifacts created! You can now implement this change with `/opsx:apply` or archive it with `/opsx:archive`."
41
+ - STOP
42
+
43
+ ---
44
+
45
+ **If artifacts are ready to create** (status shows artifacts with `status: "ready"`):
46
+ - Pick the FIRST artifact with `status: "ready"` from the status output
47
+ - Get its instructions:
48
+ ```bash
49
+ openspec instructions <artifact-id> --change "<name>" --json
50
+ ```
51
+ - Parse the JSON. The key fields are:
52
+ - `context`: Project background (constraints for you - do NOT include in output)
53
+ - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
54
+ - `template`: The structure to use for your output file
55
+ - `instruction`: Schema-specific guidance
56
+ - `outputPath`: Where to write the artifact
57
+ - `dependencies`: Completed artifacts to read for context
58
+ - **Create the artifact file**:
59
+ - Read any completed dependency files for context
60
+ - Use `template` as the structure - fill in its sections
61
+ - Apply `context` and `rules` as constraints when writing - but do NOT copy them into the file
62
+ - Write to the output path specified in instructions
63
+ - Show what was created and what's now unlocked
64
+ - STOP after creating ONE artifact
65
+
66
+ ---
67
+
68
+ **If no artifacts are ready (all blocked)**:
69
+ - This shouldn't happen with a valid schema
70
+ - Show status and suggest checking for issues
71
+
72
+ 4. **After creating an artifact, show progress**
73
+ ```bash
74
+ openspec status --change "<name>"
75
+ ```
76
+
77
+ **Output**
78
+
79
+ After each invocation, show:
80
+ - Which artifact was created
81
+ - Schema workflow being used
82
+ - Current progress (N/M complete)
83
+ - What artifacts are now unlocked
84
+ - Prompt: "Run `/opsx:continue` to create the next artifact"
85
+
86
+ **Artifact Creation Guidelines**
87
+
88
+ The artifact types and their purpose depend on the schema. Use the `instruction` field from the instructions output to understand what to create.
89
+
90
+ Common artifact patterns:
91
+
92
+ **spec-driven schema** (proposal → specs → design → tasks):
93
+ - **proposal.md**: Ask user about the change if not clear. Fill in Why, What Changes, Capabilities, Impact.
94
+ - The Capabilities section is critical - each capability listed will need a spec file.
95
+ - **specs/<capability>/spec.md**: Create one spec per capability listed in the proposal's Capabilities section (use the capability name, not the change name).
96
+ - **design.md**: Document technical decisions, architecture, and implementation approach.
97
+ - **tasks.md**: Break down implementation into checkboxed tasks.
98
+
99
+ For other schemas, follow the `instruction` field from the CLI output.
100
+
101
+ **Guardrails**
102
+ - Create ONE artifact per invocation
103
+ - Always read dependency artifacts before creating a new one
104
+ - Never skip artifacts or create out of order
105
+ - If context is unclear, ask the user before creating
106
+ - Verify the artifact file exists after writing before marking progress
107
+ - Use the schema's artifact sequence, don't assume specific artifact names
108
+ - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
109
+ - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
110
+ - These guide what you write, but should never appear in the output
111
+ """