You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/openspec-bulk-archive-change/SKILL.md
+20-9Lines changed: 20 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,19 +122,28 @@ This skill allows you to batch-archive changes, handling spec conflicts intellig
122
122
so match what the user picked rather than the wording above:
123
123
- "Cancel" — stop, do not archive. Report that nothing was archived and skip the remaining steps.
124
124
- The archive-everything option — proceed with every selected change
125
-
- The ready-only option — proceed with only the changes the step 6 table marks `Ready` or `Ready*`, and record the rest as Skipped in step 8c. If a `Ready*` change's conflict partner is skipped, re-derive that conflict's resolution using only the changes being archived.
125
+
- The ready-only option — proceed with only the changes the step 6 table marks `Ready` or `Ready*`, and record the rest as Skipped in step 8d. If a `Ready*` change's conflict partner is skipped, re-derive that conflict's resolution using only the changes being archived.
126
126
- Anything else — ask again rather than archiving
127
127
128
128
8.**Execute archive for each confirmed change**
129
129
130
130
Process changes in the determined order (respecting conflict resolution):
131
131
132
132
a. **Sync specs** if delta specs exist:
133
-
-Use the openspec-sync-specs approach (agent-driven intelligent merge)
134
-
- For conflicts, apply in resolved order
135
-
-Track if sync was done
133
+
-Run the `openspec-sync-specs` workflow inline (agent-driven intelligent merge) for each change, passing the delta spec analysis, and wait for it to finish.
134
+
- For conflicts, apply in resolved order.
135
+
-Do not delegate to a background task — step 8c would move `changeRoot` out from under a sync that is still reading it.
136
136
137
-
b. **Perform the archive**:
137
+
b. **Verify main specs before moving changeRoot**:
138
+
- Re-run the comparison against every capability that has a delta spec in `artifactPaths.specs.existingOutputPaths` against main spec at `<planningHome.root>/openspec/specs/<capability>/spec.md` (use the store-aware `planningHome.root` from step 3 status JSON, not a hardcoded repo path).
139
+
- Verify that main specs are updated:
140
+
- ADDED requirements present
141
+
- MODIFIED requirements carrying scenario and description changes named in the delta, with their other scenarios intact
142
+
- REMOVED requirements gone
143
+
- RENAMED requirements present under the new name and absent under the old one
144
+
- If sync failed or any capability does not match verification, report what differs and fail/skip moving that change's `changeRoot` — do not archive that change. `changeRoot` remains intact.
145
+
146
+
c. **Perform the archive**:
138
147
139
148
Target name: use the change name as-is when it already starts with a `YYYY-MM-DD-` prefix; otherwise prepend the current date as `YYYY-MM-DD-<name>` (same rule as `openspec archive`).
140
149
@@ -143,9 +152,9 @@ This skill allows you to batch-archive changes, handling spec conflicts intellig
@@ -193,7 +202,7 @@ Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
193
202
194
203
Example 2: Both implemented
195
204
```text
196
-
Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
205
+
Conflict: <planningHome.root>/openspec/specs/api/spec.md touched by [add-rest-api, add-graphql]
197
206
198
207
Checking add-rest-api (created 2026-01-10):
199
208
- Delta adds "REST Endpoints" requirement
@@ -257,3 +266,5 @@ No active changes found. Create a new change to get started.
257
266
- Preserve .openspec.yaml when moving to archive
258
267
- Archive directory target uses current date: YYYY-MM-DD-<name>; a name that already starts with a `YYYY-MM-DD-` prefix is used as-is (never stack a second date)
259
268
- If archive target exists, fail that change but continue with others
269
+
- If sync is requested, run the `openspec-sync-specs` workflow inline (agent-driven) for each change
270
+
- Never archive a change while a spec sync is still in flight — run the sync inline and verify main specs at `<planningHome.root>/openspec/specs/<capability>/spec.md` before moving `changeRoot`
Copy file name to clipboardExpand all lines: src/core/templates/workflows/archive-change.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -207,7 +207,7 @@ ${STORE_SELECTION_GUIDANCE}
207
207
- "Sync now" or "Sync anyway" — sync, then verify (below)
208
208
- Anything else — ask again rather than archiving
209
209
210
-
To sync, run the \`openspec-sync-specs\` workflow inline (agent-driven intelligent merge) for change '<name>', passing the delta spec analysis from above, and wait for it to finish. Do not delegate it to a background task — step 5 would move \`changeRoot\` out from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result.
210
+
To sync, run the \`/opsx:sync\` workflow inline (agent-driven intelligent merge) for change '<name>', passing the delta spec analysis from above, and wait for it to finish. Do not delegate it to a background task — step 5 would move \`changeRoot\` out from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result.
211
211
212
212
Then re-run the comparison from the top of this step against every capability that has a delta spec in \`artifactPaths.specs.existingOutputPaths\` — not only the ones the sync reports it touched. A successful sync leaves nothing left to apply, so each capability must now read as already synced:
Copy file name to clipboardExpand all lines: src/core/templates/workflows/bulk-archive-change.ts
+42-20Lines changed: 42 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -124,19 +124,28 @@ ${STORE_SELECTION_GUIDANCE}
124
124
so match what the user picked rather than the wording above:
125
125
- "Cancel" — stop, do not archive. Report that nothing was archived and skip the remaining steps.
126
126
- The archive-everything option — proceed with every selected change
127
-
- The ready-only option — proceed with only the changes the step 6 table marks \`Ready\` or \`Ready*\`, and record the rest as Skipped in step 8c. If a \`Ready*\` change's conflict partner is skipped, re-derive that conflict's resolution using only the changes being archived.
127
+
- The ready-only option — proceed with only the changes the step 6 table marks \`Ready\` or \`Ready*\`, and record the rest as Skipped in step 8d. If a \`Ready*\` change's conflict partner is skipped, re-derive that conflict's resolution using only the changes being archived.
128
128
- Anything else — ask again rather than archiving
129
129
130
130
8. **Execute archive for each confirmed change**
131
131
132
132
Process changes in the determined order (respecting conflict resolution):
133
133
134
134
a. **Sync specs** if delta specs exist:
135
-
- Use the openspec-sync-specs approach (agent-driven intelligent merge)
136
-
- For conflicts, apply in resolved order
137
-
- Track if sync was done
135
+
- Run the \`openspec-sync-specs\` workflow inline (agent-driven intelligent merge) for each change, passing the delta spec analysis, and wait for it to finish.
136
+
- For conflicts, apply in resolved order.
137
+
- Do not delegate to a background task — step 8c would move \`changeRoot\` out from under a sync that is still reading it.
138
138
139
-
b. **Perform the archive**:
139
+
b. **Verify main specs before moving changeRoot**:
140
+
- Re-run the comparison against every capability that has a delta spec in \`artifactPaths.specs.existingOutputPaths\` against main spec at \`<planningHome.root>/openspec/specs/<capability>/spec.md\` (use the store-aware \`planningHome.root\` from step 3 status JSON, not a hardcoded repo path).
141
+
- Verify that main specs are updated:
142
+
- ADDED requirements present
143
+
- MODIFIED requirements carrying scenario and description changes named in the delta, with their other scenarios intact
144
+
- REMOVED requirements gone
145
+
- RENAMED requirements present under the new name and absent under the old one
146
+
- If sync failed or any capability does not match verification, report what differs and fail/skip moving that change's \`changeRoot\` — do not archive that change. \`changeRoot\` remains intact.
147
+
148
+
c. **Perform the archive**:
140
149
141
150
Target name: use the change name as-is when it already starts with a \`YYYY-MM-DD-\` prefix; otherwise prepend the current date as \`YYYY-MM-DD-<name>\` (same rule as \`openspec archive\`).
@@ -195,7 +204,7 @@ Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
195
204
196
205
Example 2: Both implemented
197
206
\`\`\`text
198
-
Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
207
+
Conflict: <planningHome.root>/openspec/specs/api/spec.md touched by [add-rest-api, add-graphql]
199
208
200
209
Checking add-rest-api (created 2026-01-10):
201
210
- Delta adds "REST Endpoints" requirement
@@ -258,7 +267,9 @@ No active changes found. Create a new change to get started.
258
267
- Track and report all outcomes (success/skip/fail)
259
268
- Preserve .openspec.yaml when moving to archive
260
269
- Archive directory target uses current date: YYYY-MM-DD-<name>; a name that already starts with a \`YYYY-MM-DD-\` prefix is used as-is (never stack a second date)
261
-
- If archive target exists, fail that change but continue with others`,
270
+
- If archive target exists, fail that change but continue with others
271
+
- If sync is requested, run the \`openspec-sync-specs\` workflow inline (agent-driven) for each change
272
+
- Never archive a change while a spec sync is still in flight — run the sync inline and verify main specs at \`<planningHome.root>/openspec/specs/<capability>/spec.md\` before moving \`changeRoot\``,
262
273
license: 'MIT',
263
274
compatibility: 'Requires openspec CLI.',
264
275
metadata: {author: 'openspec',version: '1.0'},
@@ -384,19 +395,28 @@ ${STORE_SELECTION_GUIDANCE}
384
395
so match what the user picked rather than the wording above:
385
396
- "Cancel" — stop, do not archive. Report that nothing was archived and skip the remaining steps.
386
397
- The archive-everything option — proceed with every selected change
387
-
- The ready-only option — proceed with only the changes the step 6 table marks \`Ready\` or \`Ready*\`, and record the rest as Skipped in step 8c. If a \`Ready*\` change's conflict partner is skipped, re-derive that conflict's resolution using only the changes being archived.
398
+
- The ready-only option — proceed with only the changes the step 6 table marks \`Ready\` or \`Ready*\`, and record the rest as Skipped in step 8d. If a \`Ready*\` change's conflict partner is skipped, re-derive that conflict's resolution using only the changes being archived.
388
399
- Anything else — ask again rather than archiving
389
400
390
401
8. **Execute archive for each confirmed change**
391
402
392
403
Process changes in the determined order (respecting conflict resolution):
393
404
394
405
a. **Sync specs** if delta specs exist:
395
-
- Use the openspec-sync-specs approach (agent-driven intelligent merge)
396
-
- For conflicts, apply in resolved order
397
-
- Track if sync was done
406
+
- Run the \`/opsx:sync\` workflow inline (agent-driven intelligent merge) for each change, passing the delta spec analysis, and wait for it to finish.
407
+
- For conflicts, apply in resolved order.
408
+
- Do not delegate to a background task — step 8c would move \`changeRoot\` out from under a sync that is still reading it.
409
+
410
+
b. **Verify main specs before moving changeRoot**:
411
+
- Re-run the comparison against every capability that has a delta spec in \`artifactPaths.specs.existingOutputPaths\` against main spec at \`<planningHome.root>/openspec/specs/<capability>/spec.md\` (use the store-aware \`planningHome.root\` from step 3 status JSON, not a hardcoded repo path).
412
+
- Verify that main specs are updated:
413
+
- ADDED requirements present
414
+
- MODIFIED requirements carrying scenario and description changes named in the delta, with their other scenarios intact
415
+
- REMOVED requirements gone
416
+
- RENAMED requirements present under the new name and absent under the old one
417
+
- If sync failed or any capability does not match verification, report what differs and fail/skip moving that change's \`changeRoot\` — do not archive that change. \`changeRoot\` remains intact.
398
418
399
-
b. **Perform the archive**:
419
+
c. **Perform the archive**:
400
420
401
421
Target name: use the change name as-is when it already starts with a \`YYYY-MM-DD-\` prefix; otherwise prepend the current date as \`YYYY-MM-DD-<name>\` (same rule as \`openspec archive\`).
@@ -455,7 +475,7 @@ Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
455
475
456
476
Example 2: Both implemented
457
477
\`\`\`text
458
-
Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
478
+
Conflict: <planningHome.root>/openspec/specs/api/spec.md touched by [add-rest-api, add-graphql]
459
479
460
480
Checking add-rest-api (created 2026-01-10):
461
481
- Delta adds "REST Endpoints" requirement
@@ -518,6 +538,8 @@ No active changes found. Create a new change to get started.
518
538
- Track and report all outcomes (success/skip/fail)
519
539
- Preserve .openspec.yaml when moving to archive
520
540
- Archive directory target uses current date: YYYY-MM-DD-<name>; a name that already starts with a \`YYYY-MM-DD-\` prefix is used as-is (never stack a second date)
521
-
- If archive target exists, fail that change but continue with others`
541
+
- If archive target exists, fail that change but continue with others
542
+
- If sync is requested, run the \`/opsx:sync\` workflow inline (agent-driven) for each change
543
+
- Never archive a change while a spec sync is still in flight — run the sync inline and verify main specs at \`<planningHome.root>/openspec/specs/<capability>/spec.md\` before moving \`changeRoot\``
0 commit comments