Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions skills/openspec-archive-change/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Archive a completed change in the experimental workflow.
- "Sync now" or "Sync anyway" — sync, then verify (below)
- Anything else — ask again rather than archiving

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.
To sync, run the `openspec-sync-specs` workflow inline (agent-driven intelligent merge) for change '<name>' (if `openspec-sync-specs` is not installed, perform the spec sync directly by merging delta specs into main specs under `openspec/specs/`), 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Use the store-aware main-spec root for direct sync.

  • skills/openspec-archive-change/SKILL.md#L75-L75: replace literal openspec/specs/ with the <planningHome.root>/openspec/specs/ location established earlier.
  • src/core/templates/workflows/archive-change.ts#L77-L77: update the source template accordingly, then regenerate the installed skill.
📍 Affects 2 files
  • skills/openspec-archive-change/SKILL.md#L75-L75 (this comment)
  • src/core/templates/workflows/archive-change.ts#L77-L77
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/openspec-archive-change/SKILL.md` at line 75, Update the direct
spec-sync instruction in skills/openspec-archive-change/SKILL.md to use the
store-aware <planningHome.root>/openspec/specs/ path instead of the literal
openspec/specs/ path. Apply the same change in the archive-change template at
src/core/templates/workflows/archive-change.ts, then regenerate the installed
skill from the updated template.


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:
- ADDED requirements present
Expand Down Expand Up @@ -127,6 +127,6 @@ Archive a completed change in the experimental workflow.
- Don't block archive on warnings - just inform and confirm
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
- Show clear summary of what happened
- If sync is requested, run the `openspec-sync-specs` workflow inline (agent-driven)
- If sync is requested, run the `openspec-sync-specs` workflow inline (agent-driven), or perform the spec sync directly if that workflow is not installed
- Never archive while a spec sync is still in flight — run the sync inline and verify the main specs before moving `changeRoot`
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
2 changes: 1 addition & 1 deletion skills/openspec-bulk-archive-change/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ This skill allows you to batch-archive changes, handling spec conflicts intellig
Process changes in the determined order (respecting conflict resolution):

a. **Sync specs** if delta specs exist:
- Use the openspec-sync-specs approach (agent-driven intelligent merge)
- Use the openspec-sync-specs approach (agent-driven intelligent merge, or merge delta specs directly into main specs if sync workflow is not installed)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
- For conflicts, apply in resolved order
- Track if sync was done

Expand Down
4 changes: 2 additions & 2 deletions src/core/templates/workflows/archive-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ ${STORE_SELECTION_GUIDANCE}
- "Sync now" or "Sync anyway" — sync, then verify (below)
- Anything else — ask again rather than archiving

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.
To sync, run the \`openspec-sync-specs\` workflow inline (agent-driven intelligent merge) for change '<name>' (if \`openspec-sync-specs\` is not installed, perform the spec sync directly by merging delta specs into main specs under \`openspec/specs/\`), 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.

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:
- ADDED requirements present
Expand Down Expand Up @@ -129,7 +129,7 @@ ${STORE_SELECTION_GUIDANCE}
- Don't block archive on warnings - just inform and confirm
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
- Show clear summary of what happened
- If sync is requested, run the \`openspec-sync-specs\` workflow inline (agent-driven)
- If sync is requested, run the \`openspec-sync-specs\` workflow inline (agent-driven), or perform the spec sync directly if that workflow is not installed
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- Never archive while a spec sync is still in flight — run the sync inline and verify the main specs before moving \`changeRoot\`
- If delta specs exist, always run the sync assessment and show the combined summary before prompting`,
license: 'MIT',
Expand Down
4 changes: 2 additions & 2 deletions src/core/templates/workflows/bulk-archive-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ ${STORE_SELECTION_GUIDANCE}
Process changes in the determined order (respecting conflict resolution):

a. **Sync specs** if delta specs exist:
- Use the openspec-sync-specs approach (agent-driven intelligent merge)
- Use the openspec-sync-specs approach (agent-driven intelligent merge, or merge delta specs directly into main specs if sync workflow is not installed)
- For conflicts, apply in resolved order
- Track if sync was done

Expand Down Expand Up @@ -392,7 +392,7 @@ ${STORE_SELECTION_GUIDANCE}
Process changes in the determined order (respecting conflict resolution):

a. **Sync specs** if delta specs exist:
- Use the openspec-sync-specs approach (agent-driven intelligent merge)
- Use the openspec-sync-specs approach (agent-driven intelligent merge, or merge delta specs directly into main specs if sync workflow is not installed)
- For conflicts, apply in resolved order
- Track if sync was done

Expand Down
10 changes: 5 additions & 5 deletions test/core/templates/skill-templates-parity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ const EXPECTED_FUNCTION_HASHES: Record<string, string> = {
getOpsxContinueCommandTemplate: '5c3968174001c20737ba39d2473ecec0f3b76591a80f7e2fc3974904d3da9dcd',
getOpsxApplyCommandTemplate: '147408d7085b468981a400cc725804252c3fd84e519c57c5f6f83562e32606ee',
getOpsxFfCommandTemplate: '264b514cc4849f91fb4414f639484c4181f1e5850d0d788ef276c851efa92859',
getArchiveChangeSkillTemplate: '206a22b6778e97c30da9145ef51fdad449b8c995538f6fc25752ef551a37b675',
getBulkArchiveChangeSkillTemplate: '2b74b1f73380ff32e35f580734780d843c6161a2748c39edb07f1e00453771b4',
getArchiveChangeSkillTemplate: 'fd45f7f6f4b33549763fbb6a9bd1f2fd9c61b10f5976a1a571037dde2ac2c3b5',
getBulkArchiveChangeSkillTemplate: '63a75524d151b1899d0de93a6bcfb8aae98086a3bb661296d181dac31e65f8f8',
getOpsxSyncCommandTemplate: 'df0240a79f7b4943a54c7413ab088ee48f5bf5fe19f9347c170d695c8ec777a4',
getVerifyChangeSkillTemplate: 'cab4db01b5d2b1243d63d90c53747d8b39e488c60f76eba3fe8b994467f69267',
getOpsxArchiveCommandTemplate: '7dea65d0e2e17db366bb666ba6ae5e205ea02707b8c5c7707565200875c78916',
getOpsxOnboardCommandTemplate: '16a68b8c9819e2a7bab013c3b49a3e49ea258b68c4e7f47f0d598e30815e0a80',
getOpsxBulkArchiveCommandTemplate: 'da7be1a7318f15b915f5aae8eb638797a8a24a31e5fc7fc0a2bad01bba137686',
getOpsxBulkArchiveCommandTemplate: '9008e579046d3f55821152948c5c73b958375c891c2e2eb18101506bc7429d94',
getOpsxVerifyCommandTemplate: 'f01c0c0cef53be0956de52363d955d4ace131b1b2d77adf902f35fead9a1486d',
getOpsxProposeSkillTemplate: '57fb556a060e2eb246b500922837af7573a6e100a6ed7dfaa7bd4ce0f5daffd3',
getOpsxProposeCommandTemplate: '434cae3ee20835725bb1d2ccb9698310a850c5b95ed669ea15fc7a0125371c59',
Expand All @@ -71,8 +71,8 @@ const EXPECTED_GENERATED_SKILL_CONTENT_HASHES: Record<string, string> = {
'openspec-apply-change': '2f7a8e7a7528d9f8d89b508a8cbc909ba47bdff473db19317008d156b9ba5893',
'openspec-ff-change': 'ff3bd3eac427a1e50071ad7c70f73b556cffa3db43e90da2726e96849c3fc886',
'openspec-sync-specs': '74de778dd8a8fd4987a09621147358cc32505bb58110492ab2b4ffe7f35aa48f',
'openspec-archive-change': '64b1611dd7aee04ca268820d1b193e8bf0a39ff3672ec6ba21fb0a1bcb1786c2',
'openspec-bulk-archive-change': '49d410bda408c0411decd584be9c2355335e3b3db760fc6a0adcd82c172a280f',
'openspec-archive-change': '23e1933afe94464f055dffb7bc8ee4f6f00764d8fcf249baa32ae04855b57fb9',
'openspec-bulk-archive-change': '25a9e25e60740ad78c8a29b776992738db2f1ac45328d3948decaaa47e89a602',
'openspec-verify-change': '57693d22940f06080c6cf8d590ac2f48240d4a5e9ce7074dacd0f8d3c9945afa',
'openspec-onboard': '1d581c12d4928d751eb79de099e275dabe9c99fc15dc1f502abebd99ad7cb7d2',
'openspec-propose': '4638400113946f4f1ee9f0bd0e965aafb200bd89b64ec7f5406ef5e948e8e218',
Expand Down