Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 src/core/templates/workflows/archive-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ${STORE_SELECTION_GUIDANCE}
Use \`artifactPaths.specs.existingOutputPaths\` from status JSON to check for delta specs. If none exist, proceed without sync prompt.

**If delta specs exist:**
- Compare each delta spec with its corresponding main spec at \`openspec/specs/<capability>/spec.md\`
- Compare each delta spec with its corresponding main spec at \`<planningHome.root>/openspec/specs/<capability>/spec.md\` (use the store-aware \`planningHome.root\` from step 2, not a hardcoded repo path)
- Determine what changes would be applied (adds, modifications, removals, renames)
- Show a combined summary before prompting

Expand Down Expand Up @@ -178,7 +178,7 @@ ${STORE_SELECTION_GUIDANCE}
Use \`artifactPaths.specs.existingOutputPaths\` from status JSON to check for delta specs. If none exist, proceed without sync prompt.

**If delta specs exist:**
- Compare each delta spec with its corresponding main spec at \`openspec/specs/<capability>/spec.md\`
- Compare each delta spec with its corresponding main spec at \`<planningHome.root>/openspec/specs/<capability>/spec.md\` (use the store-aware \`planningHome.root\` from step 2, not a hardcoded repo path)
- Determine what changes would be applied (adds, modifications, removals, renames)
- Show a combined summary before prompting

Expand Down
16 changes: 10 additions & 6 deletions src/core/templates/workflows/sync-specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ ${STORE_SELECTION_GUIDANCE}
openspec status --change "<name>" --json
\`\`\`

The JSON includes \`planningHome.root\`. Main specs live under \`<planningHome.root>/openspec/specs/\` — use that (store-aware) root for every main-spec path below, not a hardcoded repo path. When a store is selected it points at the store, not the current repository.

3. **Find delta specs**

Use \`artifactPaths.specs.existingOutputPaths\` from the status JSON as the list of delta spec files.
Expand All @@ -50,11 +52,11 @@ ${STORE_SELECTION_GUIDANCE}

4. **For each delta spec, apply changes to main specs**

For each repo-local capability delta spec path returned by the CLI:
For each capability delta spec path returned by the CLI (these may belong to a selected store, not the repo):

a. **Read the delta spec** to understand the intended changes

b. **Read the main spec** at \`openspec/specs/<capability>/spec.md\` (may not exist yet)
b. **Read the main spec** at \`<planningHome.root>/openspec/specs/<capability>/spec.md\` (may not exist yet)

c. **Apply changes intelligently**:

Expand All @@ -77,7 +79,7 @@ ${STORE_SELECTION_GUIDANCE}
- Find the FROM requirement, rename to TO

d. **Create new main spec** if capability doesn't exist yet:
- Create \`openspec/specs/<capability>/spec.md\`
- Create \`<planningHome.root>/openspec/specs/<capability>/spec.md\`
- Add Purpose section (can be brief, mark as TBD)
- Add Requirements section with the ADDED requirements

Expand Down Expand Up @@ -184,6 +186,8 @@ ${STORE_SELECTION_GUIDANCE}
openspec status --change "<name>" --json
\`\`\`

The JSON includes \`planningHome.root\`. Main specs live under \`<planningHome.root>/openspec/specs/\` — use that (store-aware) root for every main-spec path below, not a hardcoded repo path. When a store is selected it points at the store, not the current repository.

3. **Find delta specs**

Use \`artifactPaths.specs.existingOutputPaths\` from the status JSON as the list of delta spec files.
Expand All @@ -198,11 +202,11 @@ ${STORE_SELECTION_GUIDANCE}

4. **For each delta spec, apply changes to main specs**

For each repo-local capability delta spec path returned by the CLI:
For each capability delta spec path returned by the CLI (these may belong to a selected store, not the repo):

a. **Read the delta spec** to understand the intended changes

b. **Read the main spec** at \`openspec/specs/<capability>/spec.md\` (may not exist yet)
b. **Read the main spec** at \`<planningHome.root>/openspec/specs/<capability>/spec.md\` (may not exist yet)

c. **Apply changes intelligently**:

Expand All @@ -225,7 +229,7 @@ ${STORE_SELECTION_GUIDANCE}
- Find the FROM requirement, rename to TO

d. **Create new main spec** if capability doesn't exist yet:
- Create \`openspec/specs/<capability>/spec.md\`
- Create \`<planningHome.root>/openspec/specs/<capability>/spec.md\`
- Add Purpose section (can be brief, mark as TBD)
- Add Requirements section with the ADDED requirements

Expand Down
12 changes: 6 additions & 6 deletions test/core/templates/skill-templates-parity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ const EXPECTED_FUNCTION_HASHES: Record<string, string> = {
getContinueChangeSkillTemplate: '1bb28875d6e5946ea2ec5f12e90f55d9784c2fa1f6e4c4e2d0eda53d861d4c75',
getApplyChangeSkillTemplate: '0f5a15fc7fb9ad6059a5643d0e01365d27642637a4aaebf182f9eabb45348197',
getFfChangeSkillTemplate: '9f4c12a1c58c723c9c45a139307eb90caf39cedd93c435bc960d0817328875e2',
getSyncSpecsSkillTemplate: '75abb20572256e2b8a647e77befae99f109ab5c4dc954a9c3c184829b5fcaa40',
getSyncSpecsSkillTemplate: 'c8d928f9cfef7f002fcf2fb0b3cdf5ca2833a06c22ac5bf2c21805f397eb63c7',
getOnboardSkillTemplate: 'e871d8ce172bb805ae62a7611aee7a3154d89414f427ad5ef31721c903f13002',
getOpsxExploreCommandTemplate: '37e53590aae7ac6621d4393aa80a5b8af21881323887fa924ed329199fda27e0',
getOpsxNewCommandTemplate: '57c600cce318d16b9b4308a18d0d983ea3c0673034e606a7cceec07b4c705e87',
getOpsxContinueCommandTemplate: '418108b417107a87019d4020b26c105792d2ef0110fe6920445e255889216716',
getOpsxApplyCommandTemplate: 'daeb507206707169de73c828e199648dde5732cbc17791ef2a027adffd028574',
getOpsxFfCommandTemplate: '36973ae0dd00ab169fbaaa42bf565f97e1bc97cf63ae7c07307734cc1ca8c1fd',
getArchiveChangeSkillTemplate: 'c511a1c943bcfc5f9f3833b8c0ff284b22d34864a08f5f553cec471ee485d38f',
getArchiveChangeSkillTemplate: '0aba77084000cdb92948ebccdc24a0c247aee47803d5ed0b8fb39676dc495355',
getBulkArchiveChangeSkillTemplate: '0f635913757ae3d1609e111f4a8f699443ca47cbaaf8a1b21eb652f7b96a1d13',
getOpsxSyncCommandTemplate: '86cf706886d0f18069e2cfa16948b7357028fd348210efb58588c88c416d8622',
getOpsxSyncCommandTemplate: 'e86d0b1a52e53afada1bbcdc95bd2e53576035f314a08ef15627844c532e7173',
getVerifyChangeSkillTemplate: 'd718c79aad649223a73fdb11036c93fb3842ac5a780f4934d50bfa03c9692683',
getOpsxArchiveCommandTemplate: '6985bddb310cb45b6b50350bfcebe31bf67146135ca0084c94930920280970a4',
getOpsxArchiveCommandTemplate: '633587a52503a0124ea95443157bd8ea0ecda60fb39db81988a5ffd8768dfec4',
getOpsxOnboardCommandTemplate: '0673f34a0f81fd173bcfb8c3ac83e2b1c617f7b7564e24e5298d3bd5665a05a9',
getOpsxBulkArchiveCommandTemplate: '9f444fc7b27a5b788077b5e3aa4f61af45aa8c8004ac8d899d204fa362ff89b7',
getOpsxVerifyCommandTemplate: '011509480a20a60342c993906f0f9280c0e9ba5d019d335bdc1ef4d53213a5a8',
Expand All @@ -70,8 +70,8 @@ const EXPECTED_GENERATED_SKILL_CONTENT_HASHES: Record<string, string> = {
'openspec-continue-change': '39b4467a4873cde7c97d52c80d53ac647b220bf7c9d96f4e6505f3188e1a1642',
'openspec-apply-change': '09c0e1cdf5ccc82416d0969d6bd715cc70616bdbc3531358a5c36057f78be55a',
'openspec-ff-change': '8d5a8890eccbd97d714fbab1d73472f79ad9104b519e000264ae43d752cdf631',
'openspec-sync-specs': 'f6a1581eb11a30061795c42582db6fa4f5e1f213b4b7cad9f3cbfbe3e9fb2d97',
'openspec-archive-change': '1821aee5a06afd895d59d1e1d16495e484b6087ecf59ec93460d7d5e7851e772',
'openspec-sync-specs': 'd7e9079b2ba7e8dd449c96872ca8b3adcb6eaefb117fd2aa132c5697c7bcac04',
'openspec-archive-change': 'b17e2a12c7fcabf5f2a8e4dd1cd64a755c24b928a0c311c6ad98c014a4538de0',
'openspec-bulk-archive-change': '7b09b04a440809dd7dbf0b1d7b695cbb8c41184d8d104eb32e82d7cdfb476d18',
'openspec-verify-change': '9a8735eaaa34c278d2193eb32fa736f4b111d1c47e675971c8df40f81d20c8c3',
'openspec-onboard': 'b1b6fc9a1b3ff64dafe9b8c39a761ee1bd001b542d47b4e4deaf058e0aa21256',
Expand Down
Loading