synarcx 0.2.0 → 0.2.1

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 (46) hide show
  1. package/README.md +233 -39
  2. package/dist/commands/config.js +7 -6
  3. package/dist/core/command-generation/adapters/bob.js +7 -20
  4. package/dist/core/command-generation/adapters/claude.js +9 -29
  5. package/dist/core/command-generation/adapters/cursor.js +9 -22
  6. package/dist/core/command-generation/adapters/pi.js +6 -19
  7. package/dist/core/command-generation/adapters/windsurf.js +9 -29
  8. package/dist/core/command-generation/yaml-utils.d.ts +3 -0
  9. package/dist/core/command-generation/yaml-utils.js +12 -0
  10. package/dist/core/completions/installers/bash-installer.d.ts +1 -0
  11. package/dist/core/completions/installers/bash-installer.js +14 -3
  12. package/dist/core/completions/installers/powershell-installer.d.ts +1 -0
  13. package/dist/core/completions/installers/powershell-installer.js +18 -10
  14. package/dist/core/config.js +0 -3
  15. package/dist/core/index.js +1 -1
  16. package/dist/core/init.d.ts +0 -2
  17. package/dist/core/init.js +27 -77
  18. package/dist/core/migration.js +1 -2
  19. package/dist/core/profile-sync-drift.d.ts +0 -7
  20. package/dist/core/profile-sync-drift.js +2 -17
  21. package/dist/core/profiles.d.ts +0 -11
  22. package/dist/core/profiles.js +1 -20
  23. package/dist/core/shared/artifact-cleanup.d.ts +5 -0
  24. package/dist/core/shared/artifact-cleanup.js +89 -0
  25. package/dist/core/shared/tool-detection.d.ts +4 -10
  26. package/dist/core/shared/tool-detection.js +3 -31
  27. package/dist/core/shared/workflow-registry.d.ts +40 -0
  28. package/dist/core/shared/workflow-registry.js +19 -0
  29. package/dist/core/templates/types.d.ts +7 -0
  30. package/dist/core/templates/types.js +9 -1
  31. package/dist/core/templates/workflows/analyze.js +84 -84
  32. package/dist/core/templates/workflows/apply-change.js +291 -291
  33. package/dist/core/templates/workflows/archive-change.js +254 -254
  34. package/dist/core/templates/workflows/clarify.js +91 -91
  35. package/dist/core/templates/workflows/debug.js +100 -100
  36. package/dist/core/templates/workflows/explore.js +462 -462
  37. package/dist/core/templates/workflows/propose.js +199 -199
  38. package/dist/core/templates/workflows/quick.js +112 -112
  39. package/dist/core/templates/workflows/refactor.js +109 -109
  40. package/dist/core/templates/workflows/sync.js +148 -148
  41. package/dist/core/update.d.ts +1 -21
  42. package/dist/core/update.js +18 -117
  43. package/dist/core/view.js +8 -8
  44. package/dist/core/workspace/open-surface.d.ts +2 -2
  45. package/dist/core/workspace/open-surface.js +13 -13
  46. package/package.json +84 -76
@@ -1,109 +1,110 @@
1
+ import { commandFromSkill } from '../types.js';
1
2
  export function getSynArchiveSkillTemplate() {
2
3
  return {
3
4
  name: 'syn-archive',
4
5
  description: 'Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.',
5
- instructions: `Archive a completed change in the experimental workflow.
6
-
7
- **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
8
-
9
- **Steps**
10
-
11
- 1. **If no change name provided, prompt for selection**
12
-
13
- Run \`synarcx list --json\` to get available changes. Use the **AskUserQuestion tool** to let the user select.
14
-
15
- Show only active changes (not already archived).
16
- Include the schema used for each change if available.
17
-
18
- **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
19
-
20
- 2. **Check artifact completion status**
21
-
22
- Run \`synarcx status --change "<name>" --json\` to check artifact completion.
23
-
24
- Parse the JSON to understand:
25
- - \`schemaName\`: The workflow being used
26
- - \`artifacts\`: List of artifacts with their status (\`done\` or other)
27
-
28
- **If any artifacts are not \`done\`:**
29
- - Display warning listing incomplete artifacts
30
- - Use **AskUserQuestion tool** to confirm user wants to proceed
31
- - Proceed if user confirms
32
-
33
- 3. **Check task completion status**
34
-
35
- Read the tasks file (typically \`tasks.md\`) to check for incomplete tasks.
36
-
37
- Count tasks marked with \`- [ ]\` (incomplete) vs \`- [x]\` (complete).
38
-
39
- **If incomplete tasks found:**
40
- - Display warning showing count of incomplete tasks
41
- - Use **AskUserQuestion tool** to confirm user wants to proceed
42
- - Proceed if user confirms
43
-
44
- **If no tasks file exists:** Proceed without task-related warning.
45
-
46
- 4. **Assess delta spec sync state**
47
-
48
- Check for delta specs at \`synspec/changes/<name>/specs/\`. If none exist, proceed without sync prompt.
49
-
50
- **If delta specs exist:**
51
- - Compare each delta spec with its corresponding main spec at \`synspec/specs/<capability>/spec.md\`
52
- - Determine what changes would be applied (adds, modifications, removals, renames)
53
- - Show a combined summary before prompting
54
-
55
- **Prompt options:**
56
- - If changes needed: "Sync now (recommended)", "Archive without syncing"
57
- - If already synced: "Archive now", "Sync anyway", "Cancel"
58
-
59
- If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke syn:archive for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
60
-
61
- 5. **Perform the archive**
62
-
63
- Create the archive directory if it doesn't exist:
64
- \`\`\`bash
65
- mkdir -p synspec/changes/archive
66
- \`\`\`
67
-
68
- Generate target name using current date: \`YYYY-MM-DD-<change-name>\`
69
-
70
- **Check if target already exists:**
71
- - If yes: Fail with error, suggest renaming existing archive or using different date
72
- - If no: Move the change directory to archive
73
-
74
- \`\`\`bash
75
- mv synspec/changes/<name> synspec/changes/archive/YYYY-MM-DD-<name>
76
- \`\`\`
77
-
78
- 6. **Display summary**
79
-
80
- Show archive completion summary including:
81
- - Change name
82
- - Schema that was used
83
- - Archive location
84
- - Whether specs were synced (if applicable)
85
- - Note about any warnings (incomplete artifacts/tasks)
86
-
87
- **Output On Success**
88
-
89
- \`\`\`
90
- ## Archive Complete
91
-
92
- **Change:** <change-name>
93
- **Schema:** <schema-name>
94
- **Archived to:** synspec/changes/archive/YYYY-MM-DD-<name>/
95
- **Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
96
-
97
- All artifacts complete. All tasks complete.
98
- \`\`\`
99
-
100
- **Guardrails**
101
- - Always prompt for change selection if not provided
102
- - Use artifact graph (synarcx status --json) for completion checking
103
- - Don't block archive on warnings - just inform and confirm
104
- - Preserve .synspec.yaml when moving to archive (it moves with the directory)
105
- - Show clear summary of what happened
106
- - If sync is requested, use syn:archive approach (agent-driven)
6
+ instructions: `Archive a completed change in the experimental workflow.
7
+
8
+ **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
9
+
10
+ **Steps**
11
+
12
+ 1. **If no change name provided, prompt for selection**
13
+
14
+ Run \`synarcx list --json\` to get available changes. Use the **AskUserQuestion tool** to let the user select.
15
+
16
+ Show only active changes (not already archived).
17
+ Include the schema used for each change if available.
18
+
19
+ **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
20
+
21
+ 2. **Check artifact completion status**
22
+
23
+ Run \`synarcx status --change "<name>" --json\` to check artifact completion.
24
+
25
+ Parse the JSON to understand:
26
+ - \`schemaName\`: The workflow being used
27
+ - \`artifacts\`: List of artifacts with their status (\`done\` or other)
28
+
29
+ **If any artifacts are not \`done\`:**
30
+ - Display warning listing incomplete artifacts
31
+ - Use **AskUserQuestion tool** to confirm user wants to proceed
32
+ - Proceed if user confirms
33
+
34
+ 3. **Check task completion status**
35
+
36
+ Read the tasks file (typically \`tasks.md\`) to check for incomplete tasks.
37
+
38
+ Count tasks marked with \`- [ ]\` (incomplete) vs \`- [x]\` (complete).
39
+
40
+ **If incomplete tasks found:**
41
+ - Display warning showing count of incomplete tasks
42
+ - Use **AskUserQuestion tool** to confirm user wants to proceed
43
+ - Proceed if user confirms
44
+
45
+ **If no tasks file exists:** Proceed without task-related warning.
46
+
47
+ 4. **Assess delta spec sync state**
48
+
49
+ Check for delta specs at \`synspec/changes/<name>/specs/\`. If none exist, proceed without sync prompt.
50
+
51
+ **If delta specs exist:**
52
+ - Compare each delta spec with its corresponding main spec at \`synspec/specs/<capability>/spec.md\`
53
+ - Determine what changes would be applied (adds, modifications, removals, renames)
54
+ - Show a combined summary before prompting
55
+
56
+ **Prompt options:**
57
+ - If changes needed: "Sync now (recommended)", "Archive without syncing"
58
+ - If already synced: "Archive now", "Sync anyway", "Cancel"
59
+
60
+ If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke syn:archive for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
61
+
62
+ 5. **Perform the archive**
63
+
64
+ Create the archive directory if it doesn't exist:
65
+ \`\`\`bash
66
+ mkdir -p synspec/changes/archive
67
+ \`\`\`
68
+
69
+ Generate target name using current date: \`YYYY-MM-DD-<change-name>\`
70
+
71
+ **Check if target already exists:**
72
+ - If yes: Fail with error, suggest renaming existing archive or using different date
73
+ - If no: Move the change directory to archive
74
+
75
+ \`\`\`bash
76
+ mv synspec/changes/<name> synspec/changes/archive/YYYY-MM-DD-<name>
77
+ \`\`\`
78
+
79
+ 6. **Display summary**
80
+
81
+ Show archive completion summary including:
82
+ - Change name
83
+ - Schema that was used
84
+ - Archive location
85
+ - Whether specs were synced (if applicable)
86
+ - Note about any warnings (incomplete artifacts/tasks)
87
+
88
+ **Output On Success**
89
+
90
+ \`\`\`
91
+ ## Archive Complete
92
+
93
+ **Change:** <change-name>
94
+ **Schema:** <schema-name>
95
+ **Archived to:** synspec/changes/archive/YYYY-MM-DD-<name>/
96
+ **Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
97
+
98
+ All artifacts complete. All tasks complete.
99
+ \`\`\`
100
+
101
+ **Guardrails**
102
+ - Always prompt for change selection if not provided
103
+ - Use artifact graph (synarcx status --json) for completion checking
104
+ - Don't block archive on warnings - just inform and confirm
105
+ - Preserve .synspec.yaml when moving to archive (it moves with the directory)
106
+ - Show clear summary of what happened
107
+ - If sync is requested, use syn:archive approach (agent-driven)
107
108
  - If delta specs exist, always run the sync assessment and show the combined summary before prompting`,
108
109
  license: 'MIT',
109
110
  compatibility: 'Requires synarcx CLI.',
@@ -111,161 +112,160 @@ All artifacts complete. All tasks complete.
111
112
  };
112
113
  }
113
114
  export function getSynArchiveCommandTemplate() {
114
- return {
115
+ return commandFromSkill(getSynArchiveSkillTemplate(), {
115
116
  name: 'syn:archive',
116
117
  description: 'Archive a completed change in the experimental workflow',
117
- category: 'Workflow',
118
118
  tags: ['workflow', 'archive', 'experimental'],
119
- content: `Archive a completed change in the experimental workflow.
120
-
121
- **Input**: Optionally specify a change name after \`/syn:archive\` (e.g., \`/syn:archive add-auth\`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
122
-
123
- **Steps**
124
-
125
- 1. **If no change name provided, prompt for selection**
126
-
127
- Run \`synarcx list --json\` to get available changes. Use the **AskUserQuestion tool** to let the user select.
128
-
129
- Show only active changes (not already archived).
130
- Include the schema used for each change if available.
131
-
132
- **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
133
-
134
- 2. **Check artifact completion status**
135
-
136
- Run \`synarcx status --change "<name>" --json\` to check artifact completion.
137
-
138
- Parse the JSON to understand:
139
- - \`schemaName\`: The workflow being used
140
- - \`artifacts\`: List of artifacts with their status (\`done\` or other)
141
-
142
- **If any artifacts are not \`done\`:**
143
- - Display warning listing incomplete artifacts
144
- - Prompt user for confirmation to continue
145
- - Proceed if user confirms
146
-
147
- 3. **Check task completion status**
148
-
149
- Read the tasks file (typically \`tasks.md\`) to check for incomplete tasks.
150
-
151
- Count tasks marked with \`- [ ]\` (incomplete) vs \`- [x]\` (complete).
152
-
153
- **If incomplete tasks found:**
154
- - Display warning showing count of incomplete tasks
155
- - Prompt user for confirmation to continue
156
- - Proceed if user confirms
157
-
158
- **If no tasks file exists:** Proceed without task-related warning.
159
-
160
- 4. **Assess delta spec sync state**
161
-
162
- Check for delta specs at \`synspec/changes/<name>/specs/\`. If none exist, proceed without sync prompt.
163
-
164
- **If delta specs exist:**
165
- - Compare each delta spec with its corresponding main spec at \`synspec/specs/<capability>/spec.md\`
166
- - Determine what changes would be applied (adds, modifications, removals, renames)
167
- - Show a combined summary before prompting
168
-
169
- **Prompt options:**
170
- - If changes needed: "Sync now (recommended)", "Archive without syncing"
171
- - If already synced: "Archive now", "Sync anyway", "Cancel"
172
-
173
- If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke syn:archive for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
174
-
175
- 5. **Perform the archive**
176
-
177
- Create the archive directory if it doesn't exist:
178
- \`\`\`bash
179
- mkdir -p synspec/changes/archive
180
- \`\`\`
181
-
182
- Generate target name using current date: \`YYYY-MM-DD-<change-name>\`
183
-
184
- **Check if target already exists:**
185
- - If yes: Fail with error, suggest renaming existing archive or using different date
186
- - If no: Move the change directory to archive
187
-
188
- \`\`\`bash
189
- mv synspec/changes/<name> synspec/changes/archive/YYYY-MM-DD-<name>
190
- \`\`\`
191
-
192
- 6. **Display summary**
193
-
194
- Show archive completion summary including:
195
- - Change name
196
- - Schema that was used
197
- - Archive location
198
- - Spec sync status (synced / sync skipped / no delta specs)
199
- - Note about any warnings (incomplete artifacts/tasks)
200
-
201
- **Output On Success**
202
-
203
- \`\`\`
204
- ## Archive Complete
205
-
206
- **Change:** <change-name>
207
- **Schema:** <schema-name>
208
- **Archived to:** synspec/changes/archive/YYYY-MM-DD-<name>/
209
- **Specs:** ✓ Synced to main specs
210
-
211
- All artifacts complete. All tasks complete.
212
- \`\`\`
213
-
214
- **Output On Success (No Delta Specs)**
215
-
216
- \`\`\`
217
- ## Archive Complete
218
-
219
- **Change:** <change-name>
220
- **Schema:** <schema-name>
221
- **Archived to:** synspec/changes/archive/YYYY-MM-DD-<name>/
222
- **Specs:** No delta specs
223
-
224
- All artifacts complete. All tasks complete.
225
- \`\`\`
226
-
227
- **Output On Success With Warnings**
228
-
229
- \`\`\`
230
- ## Archive Complete (with warnings)
231
-
232
- **Change:** <change-name>
233
- **Schema:** <schema-name>
234
- **Archived to:** synspec/changes/archive/YYYY-MM-DD-<name>/
235
- **Specs:** Sync skipped (user chose to skip)
236
-
237
- **Warnings:**
238
- - Archived with 2 incomplete artifacts
239
- - Archived with 3 incomplete tasks
240
- - Delta spec sync was skipped (user chose to skip)
241
-
242
- Review the archive if this was not intentional.
243
- \`\`\`
244
-
245
- **Output On Error (Archive Exists)**
246
-
247
- \`\`\`
248
- ## Archive Failed
249
-
250
- **Change:** <change-name>
251
- **Target:** synspec/changes/archive/YYYY-MM-DD-<name>/
252
-
253
- Target archive directory already exists.
254
-
255
- **Options:**
256
- 1. Rename the existing archive
257
- 2. Delete the existing archive if it's a duplicate
258
- 3. Wait until a different date to archive
259
- \`\`\`
260
-
261
- **Guardrails**
262
- - Always prompt for change selection if not provided
263
- - Use artifact graph (synarcx status --json) for completion checking
264
- - Don't block archive on warnings - just inform and confirm
265
- - Preserve .synspec.yaml when moving to archive (it moves with the directory)
266
- - Show clear summary of what happened
267
- - If sync is requested, use the Skill tool to invoke \`syn:archive\` (agent-driven)
119
+ content: `Archive a completed change in the experimental workflow.
120
+
121
+ **Input**: Optionally specify a change name after \`/syn:archive\` (e.g., \`/syn:archive add-auth\`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
122
+
123
+ **Steps**
124
+
125
+ 1. **If no change name provided, prompt for selection**
126
+
127
+ Run \`synarcx list --json\` to get available changes. Use the **AskUserQuestion tool** to let the user select.
128
+
129
+ Show only active changes (not already archived).
130
+ Include the schema used for each change if available.
131
+
132
+ **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
133
+
134
+ 2. **Check artifact completion status**
135
+
136
+ Run \`synarcx status --change "<name>" --json\` to check artifact completion.
137
+
138
+ Parse the JSON to understand:
139
+ - \`schemaName\`: The workflow being used
140
+ - \`artifacts\`: List of artifacts with their status (\`done\` or other)
141
+
142
+ **If any artifacts are not \`done\`:**
143
+ - Display warning listing incomplete artifacts
144
+ - Prompt user for confirmation to continue
145
+ - Proceed if user confirms
146
+
147
+ 3. **Check task completion status**
148
+
149
+ Read the tasks file (typically \`tasks.md\`) to check for incomplete tasks.
150
+
151
+ Count tasks marked with \`- [ ]\` (incomplete) vs \`- [x]\` (complete).
152
+
153
+ **If incomplete tasks found:**
154
+ - Display warning showing count of incomplete tasks
155
+ - Prompt user for confirmation to continue
156
+ - Proceed if user confirms
157
+
158
+ **If no tasks file exists:** Proceed without task-related warning.
159
+
160
+ 4. **Assess delta spec sync state**
161
+
162
+ Check for delta specs at \`synspec/changes/<name>/specs/\`. If none exist, proceed without sync prompt.
163
+
164
+ **If delta specs exist:**
165
+ - Compare each delta spec with its corresponding main spec at \`synspec/specs/<capability>/spec.md\`
166
+ - Determine what changes would be applied (adds, modifications, removals, renames)
167
+ - Show a combined summary before prompting
168
+
169
+ **Prompt options:**
170
+ - If changes needed: "Sync now (recommended)", "Archive without syncing"
171
+ - If already synced: "Archive now", "Sync anyway", "Cancel"
172
+
173
+ If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke syn:archive for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
174
+
175
+ 5. **Perform the archive**
176
+
177
+ Create the archive directory if it doesn't exist:
178
+ \`\`\`bash
179
+ mkdir -p synspec/changes/archive
180
+ \`\`\`
181
+
182
+ Generate target name using current date: \`YYYY-MM-DD-<change-name>\`
183
+
184
+ **Check if target already exists:**
185
+ - If yes: Fail with error, suggest renaming existing archive or using different date
186
+ - If no: Move the change directory to archive
187
+
188
+ \`\`\`bash
189
+ mv synspec/changes/<name> synspec/changes/archive/YYYY-MM-DD-<name>
190
+ \`\`\`
191
+
192
+ 6. **Display summary**
193
+
194
+ Show archive completion summary including:
195
+ - Change name
196
+ - Schema that was used
197
+ - Archive location
198
+ - Spec sync status (synced / sync skipped / no delta specs)
199
+ - Note about any warnings (incomplete artifacts/tasks)
200
+
201
+ **Output On Success**
202
+
203
+ \`\`\`
204
+ ## Archive Complete
205
+
206
+ **Change:** <change-name>
207
+ **Schema:** <schema-name>
208
+ **Archived to:** synspec/changes/archive/YYYY-MM-DD-<name>/
209
+ **Specs:** ✓ Synced to main specs
210
+
211
+ All artifacts complete. All tasks complete.
212
+ \`\`\`
213
+
214
+ **Output On Success (No Delta Specs)**
215
+
216
+ \`\`\`
217
+ ## Archive Complete
218
+
219
+ **Change:** <change-name>
220
+ **Schema:** <schema-name>
221
+ **Archived to:** synspec/changes/archive/YYYY-MM-DD-<name>/
222
+ **Specs:** No delta specs
223
+
224
+ All artifacts complete. All tasks complete.
225
+ \`\`\`
226
+
227
+ **Output On Success With Warnings**
228
+
229
+ \`\`\`
230
+ ## Archive Complete (with warnings)
231
+
232
+ **Change:** <change-name>
233
+ **Schema:** <schema-name>
234
+ **Archived to:** synspec/changes/archive/YYYY-MM-DD-<name>/
235
+ **Specs:** Sync skipped (user chose to skip)
236
+
237
+ **Warnings:**
238
+ - Archived with 2 incomplete artifacts
239
+ - Archived with 3 incomplete tasks
240
+ - Delta spec sync was skipped (user chose to skip)
241
+
242
+ Review the archive if this was not intentional.
243
+ \`\`\`
244
+
245
+ **Output On Error (Archive Exists)**
246
+
247
+ \`\`\`
248
+ ## Archive Failed
249
+
250
+ **Change:** <change-name>
251
+ **Target:** synspec/changes/archive/YYYY-MM-DD-<name>/
252
+
253
+ Target archive directory already exists.
254
+
255
+ **Options:**
256
+ 1. Rename the existing archive
257
+ 2. Delete the existing archive if it's a duplicate
258
+ 3. Wait until a different date to archive
259
+ \`\`\`
260
+
261
+ **Guardrails**
262
+ - Always prompt for change selection if not provided
263
+ - Use artifact graph (synarcx status --json) for completion checking
264
+ - Don't block archive on warnings - just inform and confirm
265
+ - Preserve .synspec.yaml when moving to archive (it moves with the directory)
266
+ - Show clear summary of what happened
267
+ - If sync is requested, use the Skill tool to invoke \`syn:archive\` (agent-driven)
268
268
  - If delta specs exist, always run the sync assessment and show the combined summary before prompting`
269
- };
269
+ });
270
270
  }
271
271
  //# sourceMappingURL=archive-change.js.map