Skip to content

Commit 1d34e72

Browse files
cheolwanparkclaude
andauthored
fix: use Skill tool for sync invocation in archive templates (#632)
* fix: use Skill tool for sync invocation in archive templates Update archive skill templates to properly instruct the AI to use the Skill tool to invoke sync commands instead of executing command logic directly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: use Task tool subagent for sync in archive templates Skill tool terminates after completion and doesn't return control to the caller, causing archive to not continue after sync. Changed to spawn a subagent via Task tool which properly returns control after completion. Also updated opsx:sync references to openspec-sync-specs for semantic coherence across templates. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 36fbc89 commit 1d34e72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/templates/skill-templates.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@ export function getArchiveChangeSkillTemplate(): SkillTemplate {
21552155
- If changes needed: "Sync now (recommended)", "Archive without syncing"
21562156
- If already synced: "Archive now", "Sync anyway", "Cancel"
21572157
2158-
If user chooses sync, execute /opsx:sync logic (use the openspec-sync-specs skill). Proceed to archive regardless of choice.
2158+
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.
21592159
21602160
5. **Perform the archive**
21612161
@@ -2832,7 +2832,7 @@ export function getOpsxArchiveCommandTemplate(): CommandTemplate {
28322832
- If changes needed: "Sync now (recommended)", "Archive without syncing"
28332833
- If already synced: "Archive now", "Sync anyway", "Cancel"
28342834
2835-
If user chooses sync, execute \`/opsx:sync\` logic. Proceed to archive regardless of choice.
2835+
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.
28362836
28372837
5. **Perform the archive**
28382838
@@ -2926,7 +2926,7 @@ Target archive directory already exists.
29262926
- Don't block archive on warnings - just inform and confirm
29272927
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
29282928
- Show clear summary of what happened
2929-
- If sync is requested, use /opsx:sync approach (agent-driven)
2929+
- If sync is requested, use the Skill tool to invoke \`openspec-sync-specs\` (agent-driven)
29302930
- If delta specs exist, always run the sync assessment and show the combined summary before prompting`
29312931
};
29322932
}

0 commit comments

Comments
 (0)