synarcx 0.3.0 → 0.3.2
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.
- package/README.md +297 -296
- package/dist/core/migration.js +5 -5
- package/dist/core/shared/skill-generation.js +12 -12
- package/dist/core/templates/workflows/debug.js +20 -3
- package/dist/core/templates/workflows/refactor.js +58 -5
- package/dist/core/templates/workflows/review.js +273 -273
- package/dist/core/update.d.ts +7 -0
- package/dist/core/update.js +28 -2
- package/package.json +1 -2
|
@@ -3,177 +3,177 @@ export function getSynReviewSkillTemplate() {
|
|
|
3
3
|
return {
|
|
4
4
|
name: 'syn-review',
|
|
5
5
|
description: 'Quality gate that verifies implementation, runs sanity checks (test/lint/typecheck), and presents a three-way decision: archive, add more work, or start a new change.',
|
|
6
|
-
instructions: `Review a completed change — verify implementation, run sanity checks, and decide next steps.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Steps
|
|
11
|
-
|
|
12
|
-
1. **Select the change**
|
|
13
|
-
|
|
14
|
-
If a name is provided, use it. Otherwise:
|
|
15
|
-
- Infer from conversation context if the user mentioned a change
|
|
16
|
-
- Auto-select if only one active change exists
|
|
17
|
-
- If ambiguous, run \`synarcx list --json\` to get available changes and use the **AskUserQuestion tool** to let the user select
|
|
18
|
-
|
|
19
|
-
Always announce: "Reviewing change: <name>" and how to override (e.g., \`/syn:review <other>\`).
|
|
20
|
-
|
|
21
|
-
2. **Check status**
|
|
22
|
-
|
|
23
|
-
\`\`\`bash
|
|
24
|
-
synarcx status --change "<name>" --json
|
|
25
|
-
\`\`\`
|
|
26
|
-
|
|
27
|
-
Parse the JSON to get \`schemaName\` and \`artifacts\` status.
|
|
28
|
-
|
|
29
|
-
**Verify artifact completion**: If all apply-required artifacts are not done, stop and tell the user to use \`/syn:propose\` or \`/syn:apply\` first.
|
|
30
|
-
|
|
31
|
-
3. **Gate on task completion**
|
|
32
|
-
|
|
33
|
-
Read \`tasks.md\` and count checkboxes. If any tasks remain unchecked:
|
|
34
|
-
- Show progress: "N/M tasks complete"
|
|
35
|
-
- Do NOT run any checks
|
|
36
|
-
- Suggest: "/syn:apply to finish the remaining tasks, then run /syn:review again"
|
|
37
|
-
- Stop here
|
|
38
|
-
|
|
39
|
-
4. **Collect change state**
|
|
40
|
-
|
|
41
|
-
- \`git diff --stat\` to get files changed, additions, deletions
|
|
42
|
-
- Read \`tasks.md\` for complete/incomplete counts
|
|
43
|
-
|
|
44
|
-
5. **Discover and run sanity checks**
|
|
45
|
-
|
|
46
|
-
Probe the project for check commands. Discovery order:
|
|
47
|
-
1. Check \`package.json\` scripts for \`test\`, \`lint\`, \`typecheck\`
|
|
48
|
-
2. If \`Cargo.toml\` exists, check for \`cargo test\`
|
|
49
|
-
3. If no check commands found, skip with a note
|
|
50
|
-
|
|
51
|
-
For each discovered command, run it and capture:
|
|
52
|
-
- **Pass**: note the pass count
|
|
53
|
-
- **Fail**: capture error details, route to \`/syn:apply\`
|
|
54
|
-
- **Crash/error**: note "command crashed" with error message, do NOT block the fork
|
|
55
|
-
|
|
56
|
-
**Important**: For any failed check, capture only summary counts (pass/fail), not full logs — unless user asks for details.
|
|
57
|
-
|
|
58
|
-
6. **Build the output**
|
|
59
|
-
|
|
60
|
-
**Structured summary first** (scanable at a glance):
|
|
61
|
-
|
|
62
|
-
\`\`\`
|
|
63
|
-
Tasks: N/M ✓
|
|
64
|
-
Files: N changed (+A -D)
|
|
65
|
-
Tests: N/N passed ✓ (or "N failed" or "ERR — command crashed" or "skipped")
|
|
66
|
-
Lint: 0 errors ✓ (or "N errors" or "ERR — command crashed" or "skipped")
|
|
67
|
-
Typecheck: clean ✓ (or "N errors" or "ERR — command crashed" or "skipped")
|
|
68
|
-
\`\`\`
|
|
69
|
-
|
|
70
|
-
**Then a narrative paragraph** (context):
|
|
71
|
-
|
|
72
|
-
"Change <name> completed N of N tasks across N files (+A -D). All N tests pass, lint is clean, type checking passes. No issues detected."
|
|
73
|
-
|
|
74
|
-
Or for failures: "Change <name> completed N of N tasks. N tests failed, lint found N errors. Review the findings below."
|
|
75
|
-
|
|
76
|
-
7. **Present the fork**
|
|
77
|
-
|
|
78
|
-
**If ALL checks pass** (clean):
|
|
79
|
-
|
|
80
|
-
Present three options:
|
|
81
|
-
|
|
82
|
-
| Option | Label | What happens | Next |
|
|
83
|
-
|---|---|---|---|
|
|
84
|
-
| A | Archive now | AI moves change to archive/ | Done |
|
|
85
|
-
| B | Add more work | AI appends new tasks, suggests refinement loop | /syn:clarify → /syn:analyze → /syn:apply |
|
|
86
|
-
| C | Start a new change | AI suggests creating a fresh change | /syn:propose |
|
|
87
|
-
|
|
88
|
-
**For option B (add more work)**: Ask the user what else is needed. If the new work fits within the existing change's scope (same capabilities, same specs, related code), append unchecked tasks to \`tasks.md\` and say: "Run /syn:clarify to refine the new requirements, then /syn:analyze, then /syn:apply." If the new work involves different capabilities, different specs, or unrelated code, tell the user: "This is outside this change's scope. Start a new change with /syn:propose instead."
|
|
89
|
-
|
|
90
|
-
**If any checks failed** (dirty):
|
|
91
|
-
|
|
92
|
-
Show each finding with context and route to the correct command:
|
|
93
|
-
|
|
94
|
-
| Finding | Route |
|
|
95
|
-
|---|---|
|
|
96
|
-
| Test failures | /syn:apply — fix implementation |
|
|
97
|
-
| Lint errors | /syn:apply — fix implementation |
|
|
98
|
-
| Artifact inconsistency | /syn:analyze — reconcile |
|
|
99
|
-
| Unclear requirement | /syn:clarify — refine |
|
|
100
|
-
| Incomplete artifacts | /syn:analyze — complete artifacts |
|
|
101
|
-
|
|
102
|
-
List ALL findings in a single output. Let the user decide which to address first.
|
|
103
|
-
|
|
104
|
-
**Note**: /syn:quick bypasses review entirely. Quick is the low-risk fast path.
|
|
105
|
-
|
|
106
|
-
8. **Archive inline** (when user picks option A)
|
|
107
|
-
|
|
108
|
-
- Create \`synspec/changes/archive/\` if it doesn't exist
|
|
109
|
-
- Target name: \`YYYY-MM-DD-<change-name>\`
|
|
110
|
-
- If target already exists: fail with error, suggest renaming existing archive or using a different approach
|
|
111
|
-
- Move: \`mv synspec/changes/<name> synspec/changes/archive/YYYY-MM-DD-<name>\`
|
|
112
|
-
- Confirm: "Archived <change-name> to synspec/changes/archive/YYYY-MM-DD-<name>/"
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Output (Clean)
|
|
117
|
-
|
|
118
|
-
\`\`\`
|
|
119
|
-
Tasks: 7/7 ✓
|
|
120
|
-
Files: 5 changed (+124 -12)
|
|
121
|
-
Tests: 42/42 passed ✓
|
|
122
|
-
Lint: 0 errors ✓
|
|
123
|
-
Typecheck: clean ✓
|
|
124
|
-
|
|
125
|
-
Change add-user-auth completed 7 of 7 tasks across 5 files (+124 -12). All 42 tests pass, lint is clean, type checking passes. No issues detected.
|
|
126
|
-
|
|
127
|
-
This change is clean. What would you like to do?
|
|
128
|
-
[A] Archive now [B] Add more work [C] Start a new change
|
|
129
|
-
\`\`\`
|
|
130
|
-
|
|
131
|
-
## Output (Dirty)
|
|
132
|
-
|
|
133
|
-
\`\`\`
|
|
134
|
-
Tasks: 7/7 ✓
|
|
135
|
-
Files: 5 changed (+124 -12)
|
|
136
|
-
Tests: 38/42 passed ⚠ 4 failing
|
|
137
|
-
Lint: 3 errors ⚠
|
|
138
|
-
Typecheck: clean ✓
|
|
139
|
-
|
|
140
|
-
Change add-user-auth completed 7 of 7 tasks. 4 tests failing in auth.test.ts, lint found 3 style issues. Type checking passes.
|
|
141
|
-
|
|
142
|
-
Findings:
|
|
143
|
-
╳ 4 tests failing in auth.test.ts
|
|
144
|
-
→ Try /syn:apply to fix the implementation
|
|
145
|
-
|
|
146
|
-
╳ 3 lint errors in src/auth.ts
|
|
147
|
-
→ Try /syn:apply to fix the implementation
|
|
148
|
-
\`\`\`
|
|
149
|
-
|
|
150
|
-
## Output (Tasks Incomplete — Gate)
|
|
151
|
-
|
|
152
|
-
\`\`\`
|
|
153
|
-
Tasks: 4/7 tasks complete
|
|
154
|
-
|
|
155
|
-
This change still has 3 tasks remaining.
|
|
156
|
-
→ Use /syn:apply to finish the remaining tasks, then run /syn:review again.
|
|
157
|
-
\`\`\`
|
|
158
|
-
|
|
159
|
-
## Output (Archived)
|
|
160
|
-
|
|
161
|
-
\`\`\`
|
|
162
|
-
## Archive Complete
|
|
163
|
-
|
|
164
|
-
**Change:** <change-name>
|
|
165
|
-
**Archived to:** synspec/changes/archive/YYYY-MM-DD-<name>/
|
|
166
|
-
|
|
167
|
-
All tasks complete. All checks passed. Change archived.
|
|
168
|
-
\`\`\`
|
|
169
|
-
|
|
170
|
-
## Guardrails
|
|
171
|
-
- Do NOT run checks if tasks are incomplete — gate at step 3
|
|
172
|
-
- Checks are read-only — do not modify project files during checks
|
|
173
|
-
- Archive move is the only write operation (step 8)
|
|
174
|
-
- Always list ALL findings at once, don't ask "fix one at a time"
|
|
175
|
-
- For failed checks, show only summary counts unless user asks for details
|
|
176
|
-
- If user picks "add more work," evaluate scope before appending tasks
|
|
6
|
+
instructions: `Review a completed change — verify implementation, run sanity checks, and decide next steps.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Select the change**
|
|
13
|
+
|
|
14
|
+
If a name is provided, use it. Otherwise:
|
|
15
|
+
- Infer from conversation context if the user mentioned a change
|
|
16
|
+
- Auto-select if only one active change exists
|
|
17
|
+
- If ambiguous, run \`synarcx list --json\` to get available changes and use the **AskUserQuestion tool** to let the user select
|
|
18
|
+
|
|
19
|
+
Always announce: "Reviewing change: <name>" and how to override (e.g., \`/syn:review <other>\`).
|
|
20
|
+
|
|
21
|
+
2. **Check status**
|
|
22
|
+
|
|
23
|
+
\`\`\`bash
|
|
24
|
+
synarcx status --change "<name>" --json
|
|
25
|
+
\`\`\`
|
|
26
|
+
|
|
27
|
+
Parse the JSON to get \`schemaName\` and \`artifacts\` status.
|
|
28
|
+
|
|
29
|
+
**Verify artifact completion**: If all apply-required artifacts are not done, stop and tell the user to use \`/syn:propose\` or \`/syn:apply\` first.
|
|
30
|
+
|
|
31
|
+
3. **Gate on task completion**
|
|
32
|
+
|
|
33
|
+
Read \`tasks.md\` and count checkboxes. If any tasks remain unchecked:
|
|
34
|
+
- Show progress: "N/M tasks complete"
|
|
35
|
+
- Do NOT run any checks
|
|
36
|
+
- Suggest: "/syn:apply to finish the remaining tasks, then run /syn:review again"
|
|
37
|
+
- Stop here
|
|
38
|
+
|
|
39
|
+
4. **Collect change state**
|
|
40
|
+
|
|
41
|
+
- \`git diff --stat\` to get files changed, additions, deletions
|
|
42
|
+
- Read \`tasks.md\` for complete/incomplete counts
|
|
43
|
+
|
|
44
|
+
5. **Discover and run sanity checks**
|
|
45
|
+
|
|
46
|
+
Probe the project for check commands. Discovery order:
|
|
47
|
+
1. Check \`package.json\` scripts for \`test\`, \`lint\`, \`typecheck\`
|
|
48
|
+
2. If \`Cargo.toml\` exists, check for \`cargo test\`
|
|
49
|
+
3. If no check commands found, skip with a note
|
|
50
|
+
|
|
51
|
+
For each discovered command, run it and capture:
|
|
52
|
+
- **Pass**: note the pass count
|
|
53
|
+
- **Fail**: capture error details, route to \`/syn:apply\`
|
|
54
|
+
- **Crash/error**: note "command crashed" with error message, do NOT block the fork
|
|
55
|
+
|
|
56
|
+
**Important**: For any failed check, capture only summary counts (pass/fail), not full logs — unless user asks for details.
|
|
57
|
+
|
|
58
|
+
6. **Build the output**
|
|
59
|
+
|
|
60
|
+
**Structured summary first** (scanable at a glance):
|
|
61
|
+
|
|
62
|
+
\`\`\`
|
|
63
|
+
Tasks: N/M ✓
|
|
64
|
+
Files: N changed (+A -D)
|
|
65
|
+
Tests: N/N passed ✓ (or "N failed" or "ERR — command crashed" or "skipped")
|
|
66
|
+
Lint: 0 errors ✓ (or "N errors" or "ERR — command crashed" or "skipped")
|
|
67
|
+
Typecheck: clean ✓ (or "N errors" or "ERR — command crashed" or "skipped")
|
|
68
|
+
\`\`\`
|
|
69
|
+
|
|
70
|
+
**Then a narrative paragraph** (context):
|
|
71
|
+
|
|
72
|
+
"Change <name> completed N of N tasks across N files (+A -D). All N tests pass, lint is clean, type checking passes. No issues detected."
|
|
73
|
+
|
|
74
|
+
Or for failures: "Change <name> completed N of N tasks. N tests failed, lint found N errors. Review the findings below."
|
|
75
|
+
|
|
76
|
+
7. **Present the fork**
|
|
77
|
+
|
|
78
|
+
**If ALL checks pass** (clean):
|
|
79
|
+
|
|
80
|
+
Present three options:
|
|
81
|
+
|
|
82
|
+
| Option | Label | What happens | Next |
|
|
83
|
+
|---|---|---|---|
|
|
84
|
+
| A | Archive now | AI moves change to archive/ | Done |
|
|
85
|
+
| B | Add more work | AI appends new tasks, suggests refinement loop | /syn:clarify → /syn:analyze → /syn:apply |
|
|
86
|
+
| C | Start a new change | AI suggests creating a fresh change | /syn:propose |
|
|
87
|
+
|
|
88
|
+
**For option B (add more work)**: Ask the user what else is needed. If the new work fits within the existing change's scope (same capabilities, same specs, related code), append unchecked tasks to \`tasks.md\` and say: "Run /syn:clarify to refine the new requirements, then /syn:analyze, then /syn:apply." If the new work involves different capabilities, different specs, or unrelated code, tell the user: "This is outside this change's scope. Start a new change with /syn:propose instead."
|
|
89
|
+
|
|
90
|
+
**If any checks failed** (dirty):
|
|
91
|
+
|
|
92
|
+
Show each finding with context and route to the correct command:
|
|
93
|
+
|
|
94
|
+
| Finding | Route |
|
|
95
|
+
|---|---|
|
|
96
|
+
| Test failures | /syn:apply — fix implementation |
|
|
97
|
+
| Lint errors | /syn:apply — fix implementation |
|
|
98
|
+
| Artifact inconsistency | /syn:analyze — reconcile |
|
|
99
|
+
| Unclear requirement | /syn:clarify — refine |
|
|
100
|
+
| Incomplete artifacts | /syn:analyze — complete artifacts |
|
|
101
|
+
|
|
102
|
+
List ALL findings in a single output. Let the user decide which to address first.
|
|
103
|
+
|
|
104
|
+
**Note**: /syn:quick bypasses review entirely. Quick is the low-risk fast path.
|
|
105
|
+
|
|
106
|
+
8. **Archive inline** (when user picks option A)
|
|
107
|
+
|
|
108
|
+
- Create \`synspec/changes/archive/\` if it doesn't exist
|
|
109
|
+
- Target name: \`YYYY-MM-DD-<change-name>\`
|
|
110
|
+
- If target already exists: fail with error, suggest renaming existing archive or using a different approach
|
|
111
|
+
- Move: \`mv synspec/changes/<name> synspec/changes/archive/YYYY-MM-DD-<name>\`
|
|
112
|
+
- Confirm: "Archived <change-name> to synspec/changes/archive/YYYY-MM-DD-<name>/"
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Output (Clean)
|
|
117
|
+
|
|
118
|
+
\`\`\`
|
|
119
|
+
Tasks: 7/7 ✓
|
|
120
|
+
Files: 5 changed (+124 -12)
|
|
121
|
+
Tests: 42/42 passed ✓
|
|
122
|
+
Lint: 0 errors ✓
|
|
123
|
+
Typecheck: clean ✓
|
|
124
|
+
|
|
125
|
+
Change add-user-auth completed 7 of 7 tasks across 5 files (+124 -12). All 42 tests pass, lint is clean, type checking passes. No issues detected.
|
|
126
|
+
|
|
127
|
+
This change is clean. What would you like to do?
|
|
128
|
+
[A] Archive now [B] Add more work [C] Start a new change
|
|
129
|
+
\`\`\`
|
|
130
|
+
|
|
131
|
+
## Output (Dirty)
|
|
132
|
+
|
|
133
|
+
\`\`\`
|
|
134
|
+
Tasks: 7/7 ✓
|
|
135
|
+
Files: 5 changed (+124 -12)
|
|
136
|
+
Tests: 38/42 passed ⚠ 4 failing
|
|
137
|
+
Lint: 3 errors ⚠
|
|
138
|
+
Typecheck: clean ✓
|
|
139
|
+
|
|
140
|
+
Change add-user-auth completed 7 of 7 tasks. 4 tests failing in auth.test.ts, lint found 3 style issues. Type checking passes.
|
|
141
|
+
|
|
142
|
+
Findings:
|
|
143
|
+
╳ 4 tests failing in auth.test.ts
|
|
144
|
+
→ Try /syn:apply to fix the implementation
|
|
145
|
+
|
|
146
|
+
╳ 3 lint errors in src/auth.ts
|
|
147
|
+
→ Try /syn:apply to fix the implementation
|
|
148
|
+
\`\`\`
|
|
149
|
+
|
|
150
|
+
## Output (Tasks Incomplete — Gate)
|
|
151
|
+
|
|
152
|
+
\`\`\`
|
|
153
|
+
Tasks: 4/7 tasks complete
|
|
154
|
+
|
|
155
|
+
This change still has 3 tasks remaining.
|
|
156
|
+
→ Use /syn:apply to finish the remaining tasks, then run /syn:review again.
|
|
157
|
+
\`\`\`
|
|
158
|
+
|
|
159
|
+
## Output (Archived)
|
|
160
|
+
|
|
161
|
+
\`\`\`
|
|
162
|
+
## Archive Complete
|
|
163
|
+
|
|
164
|
+
**Change:** <change-name>
|
|
165
|
+
**Archived to:** synspec/changes/archive/YYYY-MM-DD-<name>/
|
|
166
|
+
|
|
167
|
+
All tasks complete. All checks passed. Change archived.
|
|
168
|
+
\`\`\`
|
|
169
|
+
|
|
170
|
+
## Guardrails
|
|
171
|
+
- Do NOT run checks if tasks are incomplete — gate at step 3
|
|
172
|
+
- Checks are read-only — do not modify project files during checks
|
|
173
|
+
- Archive move is the only write operation (step 8)
|
|
174
|
+
- Always list ALL findings at once, don't ask "fix one at a time"
|
|
175
|
+
- For failed checks, show only summary counts unless user asks for details
|
|
176
|
+
- If user picks "add more work," evaluate scope before appending tasks
|
|
177
177
|
- Quick bypasses review — do not suggest review to users who used /syn:quick`,
|
|
178
178
|
license: 'MIT',
|
|
179
179
|
compatibility: 'Requires synarcx CLI.',
|
|
@@ -185,108 +185,108 @@ export function getSynReviewCommandTemplate() {
|
|
|
185
185
|
name: 'syn:review',
|
|
186
186
|
description: 'Review a completed change — verify implementation, run sanity checks, and decide next steps',
|
|
187
187
|
tags: ['workflow', 'review'],
|
|
188
|
-
content: `Review a completed change — verify implementation, run sanity checks, and decide next steps.
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
## Steps
|
|
193
|
-
|
|
194
|
-
1. **Select the change**
|
|
195
|
-
|
|
196
|
-
If a name is provided (e.g., \`/syn:review add-auth\`), use it. Otherwise:
|
|
197
|
-
- Infer from conversation context
|
|
198
|
-
- Auto-select if only one active change exists
|
|
199
|
-
- If ambiguous, run \`synarcx list --json\` and prompt
|
|
200
|
-
|
|
201
|
-
2. **Check status**
|
|
202
|
-
|
|
203
|
-
\`\`\`bash
|
|
204
|
-
synarcx status --change "<name>" --json
|
|
205
|
-
\`\`\`
|
|
206
|
-
|
|
207
|
-
Verify all apply-required artifacts are done. If not, stop.
|
|
208
|
-
|
|
209
|
-
3. **Gate on task completion**
|
|
210
|
-
|
|
211
|
-
Read \`tasks.md\`. If any tasks remain unchecked:
|
|
212
|
-
- Show "N/M tasks complete"
|
|
213
|
-
- Suggest \`/syn:apply\` to finish
|
|
214
|
-
- Stop
|
|
215
|
-
|
|
216
|
-
4. **Collect change state**
|
|
217
|
-
- \`git diff --stat\` for file summary
|
|
218
|
-
- Read tasks.md for progress
|
|
219
|
-
|
|
220
|
-
5. **Discover and run sanity checks**
|
|
221
|
-
|
|
222
|
-
Probe \`package.json\` scripts for \`test\`, \`lint\`, \`typecheck\`. Fall back to known tools (cargo test, ruff, etc.). Omit if none found.
|
|
223
|
-
|
|
224
|
-
For each command: capture pass/fail/crash. Summary only, not full logs.
|
|
225
|
-
|
|
226
|
-
6. **Build output**
|
|
227
|
-
|
|
228
|
-
Structured summary first:
|
|
229
|
-
\`\`\`
|
|
230
|
-
Tasks: N/M ✓
|
|
231
|
-
Files: N changed (+A -D)
|
|
232
|
-
Tests: N/N passed ✓
|
|
233
|
-
Lint: 0 errors ✓
|
|
234
|
-
Typecheck: clean ✓
|
|
235
|
-
\`\`\`
|
|
236
|
-
|
|
237
|
-
Then narrative paragraph.
|
|
238
|
-
|
|
239
|
-
7. **Present the fork**
|
|
240
|
-
|
|
241
|
-
**If all checks pass:**
|
|
242
|
-
- Archive now → AI moves to archive/
|
|
243
|
-
- Add more work → AI appends tasks (scope-checked), suggests \`/syn:clarify\` → \`/syn:analyze\` → \`/syn:apply\`
|
|
244
|
-
- Start a new change → \`/syn:propose\`
|
|
245
|
-
|
|
246
|
-
**If issues found:**
|
|
247
|
-
- Show each finding with route: \`/syn:apply\`, \`/syn:clarify\`, \`/syn:analyze\`
|
|
248
|
-
- List all findings at once
|
|
249
|
-
|
|
250
|
-
8. **Archive inline** (when user picks archive)
|
|
251
|
-
|
|
252
|
-
- Create \`synspec/changes/archive/\` if missing
|
|
253
|
-
- Target: \`YYYY-MM-DD-<change-name>\`
|
|
254
|
-
- Fail if target exists
|
|
255
|
-
- Move: \`mv synspec/changes/<name> synspec/changes/archive/YYYY-MM-DD-<name>\`
|
|
256
|
-
- Confirm
|
|
257
|
-
|
|
258
|
-
---
|
|
259
|
-
|
|
260
|
-
## Output (Clean)
|
|
261
|
-
|
|
262
|
-
\`\`\`
|
|
263
|
-
Tasks: 7/7 ✓
|
|
264
|
-
Files: 5 changed (+124 -12)
|
|
265
|
-
Tests: 42/42 passed ✓
|
|
266
|
-
Lint: 0 errors ✓
|
|
267
|
-
Typecheck: clean ✓
|
|
268
|
-
|
|
269
|
-
All checks pass. What would you like to do?
|
|
270
|
-
[A] Archive now [B] Add more work [C] Start a new change
|
|
271
|
-
\`\`\`
|
|
272
|
-
|
|
273
|
-
## Output (Dirty)
|
|
274
|
-
|
|
275
|
-
\`\`\`
|
|
276
|
-
Tasks: 7/7 ✓
|
|
277
|
-
Files: 5 changed (+124 -12)
|
|
278
|
-
Tests: 38/42 passed ⚠
|
|
279
|
-
Lint: 3 errors ⚠
|
|
280
|
-
|
|
281
|
-
Findings:
|
|
282
|
-
╳ 4 tests failing → /syn:apply to fix
|
|
283
|
-
╳ 3 lint errors → /syn:apply to fix
|
|
284
|
-
\`\`\`
|
|
285
|
-
|
|
286
|
-
## Guardrails
|
|
287
|
-
- Gate on task completion — no checks until all tasks are done
|
|
288
|
-
- Summary only for failed checks (not full logs)
|
|
289
|
-
- Scope-check before appending tasks
|
|
188
|
+
content: `Review a completed change — verify implementation, run sanity checks, and decide next steps.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Steps
|
|
193
|
+
|
|
194
|
+
1. **Select the change**
|
|
195
|
+
|
|
196
|
+
If a name is provided (e.g., \`/syn:review add-auth\`), use it. Otherwise:
|
|
197
|
+
- Infer from conversation context
|
|
198
|
+
- Auto-select if only one active change exists
|
|
199
|
+
- If ambiguous, run \`synarcx list --json\` and prompt
|
|
200
|
+
|
|
201
|
+
2. **Check status**
|
|
202
|
+
|
|
203
|
+
\`\`\`bash
|
|
204
|
+
synarcx status --change "<name>" --json
|
|
205
|
+
\`\`\`
|
|
206
|
+
|
|
207
|
+
Verify all apply-required artifacts are done. If not, stop.
|
|
208
|
+
|
|
209
|
+
3. **Gate on task completion**
|
|
210
|
+
|
|
211
|
+
Read \`tasks.md\`. If any tasks remain unchecked:
|
|
212
|
+
- Show "N/M tasks complete"
|
|
213
|
+
- Suggest \`/syn:apply\` to finish
|
|
214
|
+
- Stop
|
|
215
|
+
|
|
216
|
+
4. **Collect change state**
|
|
217
|
+
- \`git diff --stat\` for file summary
|
|
218
|
+
- Read tasks.md for progress
|
|
219
|
+
|
|
220
|
+
5. **Discover and run sanity checks**
|
|
221
|
+
|
|
222
|
+
Probe \`package.json\` scripts for \`test\`, \`lint\`, \`typecheck\`. Fall back to known tools (cargo test, ruff, etc.). Omit if none found.
|
|
223
|
+
|
|
224
|
+
For each command: capture pass/fail/crash. Summary only, not full logs.
|
|
225
|
+
|
|
226
|
+
6. **Build output**
|
|
227
|
+
|
|
228
|
+
Structured summary first:
|
|
229
|
+
\`\`\`
|
|
230
|
+
Tasks: N/M ✓
|
|
231
|
+
Files: N changed (+A -D)
|
|
232
|
+
Tests: N/N passed ✓
|
|
233
|
+
Lint: 0 errors ✓
|
|
234
|
+
Typecheck: clean ✓
|
|
235
|
+
\`\`\`
|
|
236
|
+
|
|
237
|
+
Then narrative paragraph.
|
|
238
|
+
|
|
239
|
+
7. **Present the fork**
|
|
240
|
+
|
|
241
|
+
**If all checks pass:**
|
|
242
|
+
- Archive now → AI moves to archive/
|
|
243
|
+
- Add more work → AI appends tasks (scope-checked), suggests \`/syn:clarify\` → \`/syn:analyze\` → \`/syn:apply\`
|
|
244
|
+
- Start a new change → \`/syn:propose\`
|
|
245
|
+
|
|
246
|
+
**If issues found:**
|
|
247
|
+
- Show each finding with route: \`/syn:apply\`, \`/syn:clarify\`, \`/syn:analyze\`
|
|
248
|
+
- List all findings at once
|
|
249
|
+
|
|
250
|
+
8. **Archive inline** (when user picks archive)
|
|
251
|
+
|
|
252
|
+
- Create \`synspec/changes/archive/\` if missing
|
|
253
|
+
- Target: \`YYYY-MM-DD-<change-name>\`
|
|
254
|
+
- Fail if target exists
|
|
255
|
+
- Move: \`mv synspec/changes/<name> synspec/changes/archive/YYYY-MM-DD-<name>\`
|
|
256
|
+
- Confirm
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Output (Clean)
|
|
261
|
+
|
|
262
|
+
\`\`\`
|
|
263
|
+
Tasks: 7/7 ✓
|
|
264
|
+
Files: 5 changed (+124 -12)
|
|
265
|
+
Tests: 42/42 passed ✓
|
|
266
|
+
Lint: 0 errors ✓
|
|
267
|
+
Typecheck: clean ✓
|
|
268
|
+
|
|
269
|
+
All checks pass. What would you like to do?
|
|
270
|
+
[A] Archive now [B] Add more work [C] Start a new change
|
|
271
|
+
\`\`\`
|
|
272
|
+
|
|
273
|
+
## Output (Dirty)
|
|
274
|
+
|
|
275
|
+
\`\`\`
|
|
276
|
+
Tasks: 7/7 ✓
|
|
277
|
+
Files: 5 changed (+124 -12)
|
|
278
|
+
Tests: 38/42 passed ⚠
|
|
279
|
+
Lint: 3 errors ⚠
|
|
280
|
+
|
|
281
|
+
Findings:
|
|
282
|
+
╳ 4 tests failing → /syn:apply to fix
|
|
283
|
+
╳ 3 lint errors → /syn:apply to fix
|
|
284
|
+
\`\`\`
|
|
285
|
+
|
|
286
|
+
## Guardrails
|
|
287
|
+
- Gate on task completion — no checks until all tasks are done
|
|
288
|
+
- Summary only for failed checks (not full logs)
|
|
289
|
+
- Scope-check before appending tasks
|
|
290
290
|
- Quick bypasses review — do not suggest review after /syn:quick`
|
|
291
291
|
});
|
|
292
292
|
}
|
package/dist/core/update.d.ts
CHANGED
|
@@ -38,6 +38,13 @@ export declare class UpdateCommand {
|
|
|
38
38
|
* Displays a note about extra workflows installed that aren't in the current profile.
|
|
39
39
|
*/
|
|
40
40
|
private displayExtraWorkflowsNote;
|
|
41
|
+
/**
|
|
42
|
+
* Ensures a 'custom' profile always contains all current ALL_WORKFLOWS entries.
|
|
43
|
+
* Runs on every `synarcx update` so any newly introduced workflow (e.g. syn:review)
|
|
44
|
+
* is automatically added to the saved custom workflow list rather than silently dropped.
|
|
45
|
+
* No-op for 'core' profile (it derives workflows from ALL_WORKFLOWS directly).
|
|
46
|
+
*/
|
|
47
|
+
private syncNewCoreWorkflowsToCustomProfile;
|
|
41
48
|
/**
|
|
42
49
|
* Suggest opting back into core when a custom profile still matches the old
|
|
43
50
|
* pre-sync core set. Keep custom profiles user-owned; do not mutate them.
|
package/dist/core/update.js
CHANGED
|
@@ -15,7 +15,7 @@ import { generateCommands, CommandAdapterRegistry, } from './command-generation/
|
|
|
15
15
|
import { getToolVersionStatus, getSkillTemplates, getCommandContents, generateSkillContent, getToolsWithSkillsDir, } from './shared/index.js';
|
|
16
16
|
import { detectLegacyArtifacts, cleanupLegacyArtifacts, formatCleanupSummary, formatDetectionSummary, getToolsFromLegacyArtifacts, } from './legacy-cleanup.js';
|
|
17
17
|
import { isInteractive } from '../utils/interactive.js';
|
|
18
|
-
import { getGlobalConfig } from './global-config.js';
|
|
18
|
+
import { getGlobalConfig, saveGlobalConfig } from './global-config.js';
|
|
19
19
|
import { getProfileWorkflows } from './profiles.js';
|
|
20
20
|
import { ALL_WORKFLOWS } from './shared/workflow-registry.js';
|
|
21
21
|
import { removeSkillDirs, removeUnselectedSkillDirs, removeCommandFiles, removeUnselectedCommandFiles, } from './shared/artifact-cleanup.js';
|
|
@@ -57,7 +57,13 @@ export class UpdateCommand {
|
|
|
57
57
|
const globalConfig = getGlobalConfig();
|
|
58
58
|
const profile = globalConfig.profile ?? 'core';
|
|
59
59
|
const delivery = globalConfig.delivery ?? 'both';
|
|
60
|
-
|
|
60
|
+
// 3b. For custom profiles, auto-merge any new ALL_WORKFLOWS entries that aren't
|
|
61
|
+
// listed yet (e.g. 'syn:review' added in a new release). This prevents future
|
|
62
|
+
// versions from silently dropping new commands for existing custom-profile users.
|
|
63
|
+
this.syncNewCoreWorkflowsToCustomProfile(globalConfig);
|
|
64
|
+
// Re-read after potential mutation so desiredWorkflows is always current.
|
|
65
|
+
const effectiveConfig = getGlobalConfig();
|
|
66
|
+
const profileWorkflows = getProfileWorkflows(profile, effectiveConfig.workflows);
|
|
61
67
|
const desiredWorkflows = profileWorkflows.filter((workflow) => ALL_WORKFLOWS.includes(workflow));
|
|
62
68
|
const shouldGenerateSkills = delivery !== 'commands';
|
|
63
69
|
const shouldGenerateCommands = delivery !== 'skills';
|
|
@@ -266,6 +272,26 @@ export class UpdateCommand {
|
|
|
266
272
|
console.log(chalk.dim(`Note: ${extraWorkflows.length} extra workflows not in profile (use \`synarcx config profile\` to manage)`));
|
|
267
273
|
}
|
|
268
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* Ensures a 'custom' profile always contains all current ALL_WORKFLOWS entries.
|
|
277
|
+
* Runs on every `synarcx update` so any newly introduced workflow (e.g. syn:review)
|
|
278
|
+
* is automatically added to the saved custom workflow list rather than silently dropped.
|
|
279
|
+
* No-op for 'core' profile (it derives workflows from ALL_WORKFLOWS directly).
|
|
280
|
+
*/
|
|
281
|
+
syncNewCoreWorkflowsToCustomProfile(config) {
|
|
282
|
+
if (config.profile !== 'custom')
|
|
283
|
+
return;
|
|
284
|
+
const current = config.workflows ?? [];
|
|
285
|
+
const currentSet = new Set(current);
|
|
286
|
+
const missing = ALL_WORKFLOWS.filter(w => !currentSet.has(w));
|
|
287
|
+
if (missing.length === 0)
|
|
288
|
+
return;
|
|
289
|
+
config.workflows = [...current, ...missing];
|
|
290
|
+
saveGlobalConfig(config);
|
|
291
|
+
const listed = missing.map(w => `/syn:${w}`).join(', ');
|
|
292
|
+
console.log(chalk.dim(`Auto-added new workflow(s) to your profile: ${listed}`));
|
|
293
|
+
console.log();
|
|
294
|
+
}
|
|
269
295
|
/**
|
|
270
296
|
* Suggest opting back into core when a custom profile still matches the old
|
|
271
297
|
* pre-sync core set. Keep custom profiles user-owned; do not mutate them.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "synarcx",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Structured engineering workflows for AI coding assistants — persistent project memory, spec-driven development, and architecture drift prevention across every session.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-workflow",
|
|
@@ -77,7 +77,6 @@
|
|
|
77
77
|
"cross-spawn": "7.0.6",
|
|
78
78
|
"fast-glob": "^3.3.3",
|
|
79
79
|
"ora": "^8.2.0",
|
|
80
|
-
"synarcx": "link:",
|
|
81
80
|
"yaml": "^2.8.2",
|
|
82
81
|
"zod": "^4.0.17"
|
|
83
82
|
}
|