synarcx 0.1.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.
- package/README.md +240 -34
- package/dist/commands/config.js +7 -6
- package/dist/core/command-generation/adapters/bob.js +7 -20
- package/dist/core/command-generation/adapters/claude.js +9 -29
- package/dist/core/command-generation/adapters/cursor.js +9 -22
- package/dist/core/command-generation/adapters/pi.js +6 -19
- package/dist/core/command-generation/adapters/windsurf.js +9 -29
- package/dist/core/command-generation/yaml-utils.d.ts +3 -0
- package/dist/core/command-generation/yaml-utils.js +12 -0
- package/dist/core/completions/installers/bash-installer.d.ts +1 -0
- package/dist/core/completions/installers/bash-installer.js +14 -3
- package/dist/core/completions/installers/powershell-installer.d.ts +1 -0
- package/dist/core/completions/installers/powershell-installer.js +18 -10
- package/dist/core/config.js +0 -3
- package/dist/core/index.js +1 -1
- package/dist/core/init.d.ts +0 -2
- package/dist/core/init.js +27 -75
- package/dist/core/migration.js +1 -2
- package/dist/core/profile-sync-drift.d.ts +0 -7
- package/dist/core/profile-sync-drift.js +2 -15
- package/dist/core/profiles.d.ts +0 -11
- package/dist/core/profiles.js +1 -18
- package/dist/core/shared/artifact-cleanup.d.ts +5 -0
- package/dist/core/shared/artifact-cleanup.js +89 -0
- package/dist/core/shared/skill-generation.js +5 -1
- package/dist/core/shared/tool-detection.d.ts +4 -10
- package/dist/core/shared/tool-detection.js +3 -27
- package/dist/core/shared/workflow-registry.d.ts +40 -0
- package/dist/core/shared/workflow-registry.js +19 -0
- package/dist/core/templates/skill-templates.d.ts +2 -0
- package/dist/core/templates/skill-templates.js +2 -0
- package/dist/core/templates/types.d.ts +7 -0
- package/dist/core/templates/types.js +9 -1
- package/dist/core/templates/workflows/analyze.js +84 -84
- package/dist/core/templates/workflows/apply-change.js +291 -291
- package/dist/core/templates/workflows/archive-change.js +254 -254
- package/dist/core/templates/workflows/clarify.js +91 -91
- package/dist/core/templates/workflows/debug.js +104 -104
- package/dist/core/templates/workflows/explore.js +462 -462
- package/dist/core/templates/workflows/propose.js +199 -199
- package/dist/core/templates/workflows/quick.d.ts +4 -0
- package/dist/core/templates/workflows/quick.js +129 -0
- package/dist/core/templates/workflows/refactor.d.ts +4 -0
- package/dist/core/templates/workflows/refactor.js +126 -0
- package/dist/core/templates/workflows/sync.js +152 -95
- package/dist/core/update.d.ts +1 -21
- package/dist/core/update.js +18 -117
- package/dist/core/view.js +8 -8
- package/dist/core/workspace/open-surface.d.ts +2 -2
- package/dist/core/workspace/open-surface.js +13 -13
- package/package.json +84 -76
|
@@ -1,105 +1,106 @@
|
|
|
1
|
+
import { commandFromSkill } from '../types.js';
|
|
1
2
|
export function getSynProposeSkillTemplate() {
|
|
2
3
|
return {
|
|
3
4
|
name: 'syn-propose',
|
|
4
5
|
description: 'Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.',
|
|
5
|
-
instructions: `Propose a new change - create the change and generate all artifacts in one step.
|
|
6
|
-
|
|
7
|
-
I'll create a change with artifacts:
|
|
8
|
-
- proposal.md (what & why)
|
|
9
|
-
- design.md (how)
|
|
10
|
-
- tasks.md (implementation steps)
|
|
11
|
-
|
|
12
|
-
When ready to refine, run /syn:clarify — or skip to implementation with /syn:apply
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
17
|
-
|
|
18
|
-
**Steps**
|
|
19
|
-
|
|
20
|
-
1. **If no clear input provided, ask what they want to build**
|
|
21
|
-
|
|
22
|
-
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
23
|
-
> "What change do you want to work on? Describe what you want to build or fix."
|
|
24
|
-
|
|
25
|
-
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
26
|
-
|
|
27
|
-
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
28
|
-
|
|
29
|
-
2. **Create the change directory**
|
|
30
|
-
\`\`\`bash
|
|
31
|
-
synarcx new change "<name>"
|
|
32
|
-
\`\`\`
|
|
33
|
-
This creates a scaffolded change at \`synspec/changes/<name>/\` with \`.synspec.yaml\`.
|
|
34
|
-
|
|
35
|
-
3. **Get the artifact build order**
|
|
36
|
-
\`\`\`bash
|
|
37
|
-
synarcx status --change "<name>" --json
|
|
38
|
-
\`\`\`
|
|
39
|
-
Parse the JSON to get:
|
|
40
|
-
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
41
|
-
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
42
|
-
|
|
43
|
-
4. **Create artifacts in sequence until apply-ready**
|
|
44
|
-
|
|
45
|
-
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
46
|
-
|
|
47
|
-
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
48
|
-
|
|
49
|
-
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
50
|
-
- Get instructions:
|
|
51
|
-
\`\`\`bash
|
|
52
|
-
synarcx instructions <artifact-id> --change "<name>" --json
|
|
53
|
-
\`\`\`
|
|
54
|
-
- The instructions JSON includes:
|
|
55
|
-
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
56
|
-
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
57
|
-
- \`template\`: The structure to use for your output file
|
|
58
|
-
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
59
|
-
- \`outputPath\`: Where to write the artifact
|
|
60
|
-
- \`dependencies\`: Completed artifacts to read for context
|
|
61
|
-
- Read any completed dependency files for context
|
|
62
|
-
- Create the artifact file using \`template\` as the structure
|
|
63
|
-
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
64
|
-
- Show brief progress: "Created <artifact-id>"
|
|
65
|
-
|
|
66
|
-
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
67
|
-
- After creating each artifact, re-run \`synarcx status --change "<name>" --json\`
|
|
68
|
-
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
69
|
-
- Stop when all \`applyRequires\` artifacts are done
|
|
70
|
-
|
|
71
|
-
c. **If an artifact requires user input** (unclear context):
|
|
72
|
-
- Use **AskUserQuestion tool** to clarify
|
|
73
|
-
- Then continue with creation
|
|
74
|
-
|
|
75
|
-
5. **Show final status**
|
|
76
|
-
\`\`\`bash
|
|
77
|
-
synarcx status --change "<name>"
|
|
78
|
-
\`\`\`
|
|
79
|
-
|
|
80
|
-
**Output**
|
|
81
|
-
|
|
82
|
-
After completing all artifacts, summarize:
|
|
83
|
-
- Change name and location
|
|
84
|
-
- List of artifacts created with brief descriptions
|
|
85
|
-
- What's ready: "All artifacts created! Ready for refinement."
|
|
86
|
-
- Prompt: "Run \`/syn:clarify\` to refine the artifacts, or \`/syn:apply\` to start implementation."
|
|
87
|
-
|
|
88
|
-
**Artifact Creation Guidelines**
|
|
89
|
-
|
|
90
|
-
- Follow the \`instruction\` field from \`synarcx instructions\` for each artifact type
|
|
91
|
-
- The schema defines what each artifact should contain - follow it
|
|
92
|
-
- Read dependency artifacts for context before creating new ones
|
|
93
|
-
- Use \`template\` as the structure for your output file - fill in its sections
|
|
94
|
-
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
95
|
-
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
96
|
-
- These guide what you write, but should never appear in the output
|
|
97
|
-
|
|
98
|
-
**Guardrails**
|
|
99
|
-
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
100
|
-
- Always read dependency artifacts before creating a new one
|
|
101
|
-
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
102
|
-
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
6
|
+
instructions: `Propose a new change - create the change and generate all artifacts in one step.
|
|
7
|
+
|
|
8
|
+
I'll create a change with artifacts:
|
|
9
|
+
- proposal.md (what & why)
|
|
10
|
+
- design.md (how)
|
|
11
|
+
- tasks.md (implementation steps)
|
|
12
|
+
|
|
13
|
+
When ready to refine, run /syn:clarify — or skip to implementation with /syn:apply
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
18
|
+
|
|
19
|
+
**Steps**
|
|
20
|
+
|
|
21
|
+
1. **If no clear input provided, ask what they want to build**
|
|
22
|
+
|
|
23
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
24
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
25
|
+
|
|
26
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
27
|
+
|
|
28
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
29
|
+
|
|
30
|
+
2. **Create the change directory**
|
|
31
|
+
\`\`\`bash
|
|
32
|
+
synarcx new change "<name>"
|
|
33
|
+
\`\`\`
|
|
34
|
+
This creates a scaffolded change at \`synspec/changes/<name>/\` with \`.synspec.yaml\`.
|
|
35
|
+
|
|
36
|
+
3. **Get the artifact build order**
|
|
37
|
+
\`\`\`bash
|
|
38
|
+
synarcx status --change "<name>" --json
|
|
39
|
+
\`\`\`
|
|
40
|
+
Parse the JSON to get:
|
|
41
|
+
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
42
|
+
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
43
|
+
|
|
44
|
+
4. **Create artifacts in sequence until apply-ready**
|
|
45
|
+
|
|
46
|
+
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
47
|
+
|
|
48
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
49
|
+
|
|
50
|
+
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
51
|
+
- Get instructions:
|
|
52
|
+
\`\`\`bash
|
|
53
|
+
synarcx instructions <artifact-id> --change "<name>" --json
|
|
54
|
+
\`\`\`
|
|
55
|
+
- The instructions JSON includes:
|
|
56
|
+
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
57
|
+
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
58
|
+
- \`template\`: The structure to use for your output file
|
|
59
|
+
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
60
|
+
- \`outputPath\`: Where to write the artifact
|
|
61
|
+
- \`dependencies\`: Completed artifacts to read for context
|
|
62
|
+
- Read any completed dependency files for context
|
|
63
|
+
- Create the artifact file using \`template\` as the structure
|
|
64
|
+
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
65
|
+
- Show brief progress: "Created <artifact-id>"
|
|
66
|
+
|
|
67
|
+
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
68
|
+
- After creating each artifact, re-run \`synarcx status --change "<name>" --json\`
|
|
69
|
+
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
70
|
+
- Stop when all \`applyRequires\` artifacts are done
|
|
71
|
+
|
|
72
|
+
c. **If an artifact requires user input** (unclear context):
|
|
73
|
+
- Use **AskUserQuestion tool** to clarify
|
|
74
|
+
- Then continue with creation
|
|
75
|
+
|
|
76
|
+
5. **Show final status**
|
|
77
|
+
\`\`\`bash
|
|
78
|
+
synarcx status --change "<name>"
|
|
79
|
+
\`\`\`
|
|
80
|
+
|
|
81
|
+
**Output**
|
|
82
|
+
|
|
83
|
+
After completing all artifacts, summarize:
|
|
84
|
+
- Change name and location
|
|
85
|
+
- List of artifacts created with brief descriptions
|
|
86
|
+
- What's ready: "All artifacts created! Ready for refinement."
|
|
87
|
+
- Prompt: "Run \`/syn:clarify\` to refine the artifacts, or \`/syn:apply\` to start implementation."
|
|
88
|
+
|
|
89
|
+
**Artifact Creation Guidelines**
|
|
90
|
+
|
|
91
|
+
- Follow the \`instruction\` field from \`synarcx instructions\` for each artifact type
|
|
92
|
+
- The schema defines what each artifact should contain - follow it
|
|
93
|
+
- Read dependency artifacts for context before creating new ones
|
|
94
|
+
- Use \`template\` as the structure for your output file - fill in its sections
|
|
95
|
+
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
96
|
+
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
97
|
+
- These guide what you write, but should never appear in the output
|
|
98
|
+
|
|
99
|
+
**Guardrails**
|
|
100
|
+
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
101
|
+
- Always read dependency artifacts before creating a new one
|
|
102
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
103
|
+
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
103
104
|
- Verify each artifact file exists after writing before proceeding to next`,
|
|
104
105
|
license: 'MIT',
|
|
105
106
|
compatibility: 'Requires synarcx CLI.',
|
|
@@ -107,110 +108,109 @@ After completing all artifacts, summarize:
|
|
|
107
108
|
};
|
|
108
109
|
}
|
|
109
110
|
export function getSynProposeCommandTemplate() {
|
|
110
|
-
return {
|
|
111
|
+
return commandFromSkill(getSynProposeSkillTemplate(), {
|
|
111
112
|
name: 'syn:propose',
|
|
112
113
|
description: 'Propose a new change - create it and generate all artifacts in one step',
|
|
113
|
-
category: 'Workflow',
|
|
114
114
|
tags: ['workflow', 'artifacts', 'experimental'],
|
|
115
|
-
content: `Propose a new change - create the change and generate all artifacts in one step.
|
|
116
|
-
|
|
117
|
-
I'll create a change with artifacts:
|
|
118
|
-
- proposal.md (what & why)
|
|
119
|
-
- design.md (how)
|
|
120
|
-
- tasks.md (implementation steps)
|
|
121
|
-
|
|
122
|
-
When ready to refine, run /syn:clarify — or skip to implementation with /syn:apply
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
**Input**: The argument after \`/syn:propose\` is the change name (kebab-case), OR a description of what the user wants to build.
|
|
127
|
-
|
|
128
|
-
**Steps**
|
|
129
|
-
|
|
130
|
-
1. **If no input provided, ask what they want to build**
|
|
131
|
-
|
|
132
|
-
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
133
|
-
> "What change do you want to work on? Describe what you want to build or fix."
|
|
134
|
-
|
|
135
|
-
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
136
|
-
|
|
137
|
-
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
138
|
-
|
|
139
|
-
2. **Create the change directory**
|
|
140
|
-
\`\`\`bash
|
|
141
|
-
synarcx new change "<name>"
|
|
142
|
-
\`\`\`
|
|
143
|
-
This creates a scaffolded change at \`synspec/changes/<name>/\` with \`.synspec.yaml\`.
|
|
144
|
-
|
|
145
|
-
3. **Get the artifact build order**
|
|
146
|
-
\`\`\`bash
|
|
147
|
-
synarcx status --change "<name>" --json
|
|
148
|
-
\`\`\`
|
|
149
|
-
Parse the JSON to get:
|
|
150
|
-
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
151
|
-
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
152
|
-
|
|
153
|
-
4. **Create artifacts in sequence until apply-ready**
|
|
154
|
-
|
|
155
|
-
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
156
|
-
|
|
157
|
-
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
158
|
-
|
|
159
|
-
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
160
|
-
- Get instructions:
|
|
161
|
-
\`\`\`bash
|
|
162
|
-
synarcx instructions <artifact-id> --change "<name>" --json
|
|
163
|
-
\`\`\`
|
|
164
|
-
- The instructions JSON includes:
|
|
165
|
-
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
166
|
-
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
167
|
-
- \`template\`: The structure to use for your output file
|
|
168
|
-
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
169
|
-
- \`outputPath\`: Where to write the artifact
|
|
170
|
-
- \`dependencies\`: Completed artifacts to read for context
|
|
171
|
-
- Read any completed dependency files for context
|
|
172
|
-
- Create the artifact file using \`template\` as the structure
|
|
173
|
-
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
174
|
-
- Show brief progress: "Created <artifact-id>"
|
|
175
|
-
|
|
176
|
-
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
177
|
-
- After creating each artifact, re-run \`synarcx status --change "<name>" --json\`
|
|
178
|
-
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
179
|
-
- Stop when all \`applyRequires\` artifacts are done
|
|
180
|
-
|
|
181
|
-
c. **If an artifact requires user input** (unclear context):
|
|
182
|
-
- Use **AskUserQuestion tool** to clarify
|
|
183
|
-
- Then continue with creation
|
|
184
|
-
|
|
185
|
-
5. **Show final status**
|
|
186
|
-
\`\`\`bash
|
|
187
|
-
synarcx status --change "<name>"
|
|
188
|
-
\`\`\`
|
|
189
|
-
|
|
190
|
-
**Output**
|
|
191
|
-
|
|
192
|
-
After completing all artifacts, summarize:
|
|
193
|
-
- Change name and location
|
|
194
|
-
- List of artifacts created with brief descriptions
|
|
195
|
-
- What's ready: "All artifacts created! Ready for refinement."
|
|
196
|
-
- Prompt: "Run \`/syn:clarify\` to refine the artifacts, or \`/syn:apply\` to start implementation."
|
|
197
|
-
|
|
198
|
-
**Artifact Creation Guidelines**
|
|
199
|
-
|
|
200
|
-
- Follow the \`instruction\` field from \`synarcx instructions\` for each artifact type
|
|
201
|
-
- The schema defines what each artifact should contain - follow it
|
|
202
|
-
- Read dependency artifacts for context before creating new ones
|
|
203
|
-
- Use \`template\` as the structure for your output file - fill in its sections
|
|
204
|
-
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
205
|
-
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
206
|
-
- These guide what you write, but should never appear in the output
|
|
207
|
-
|
|
208
|
-
**Guardrails**
|
|
209
|
-
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
210
|
-
- Always read dependency artifacts before creating a new one
|
|
211
|
-
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
212
|
-
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
115
|
+
content: `Propose a new change - create the change and generate all artifacts in one step.
|
|
116
|
+
|
|
117
|
+
I'll create a change with artifacts:
|
|
118
|
+
- proposal.md (what & why)
|
|
119
|
+
- design.md (how)
|
|
120
|
+
- tasks.md (implementation steps)
|
|
121
|
+
|
|
122
|
+
When ready to refine, run /syn:clarify — or skip to implementation with /syn:apply
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
**Input**: The argument after \`/syn:propose\` is the change name (kebab-case), OR a description of what the user wants to build.
|
|
127
|
+
|
|
128
|
+
**Steps**
|
|
129
|
+
|
|
130
|
+
1. **If no input provided, ask what they want to build**
|
|
131
|
+
|
|
132
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
133
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
134
|
+
|
|
135
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
136
|
+
|
|
137
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
138
|
+
|
|
139
|
+
2. **Create the change directory**
|
|
140
|
+
\`\`\`bash
|
|
141
|
+
synarcx new change "<name>"
|
|
142
|
+
\`\`\`
|
|
143
|
+
This creates a scaffolded change at \`synspec/changes/<name>/\` with \`.synspec.yaml\`.
|
|
144
|
+
|
|
145
|
+
3. **Get the artifact build order**
|
|
146
|
+
\`\`\`bash
|
|
147
|
+
synarcx status --change "<name>" --json
|
|
148
|
+
\`\`\`
|
|
149
|
+
Parse the JSON to get:
|
|
150
|
+
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
151
|
+
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
152
|
+
|
|
153
|
+
4. **Create artifacts in sequence until apply-ready**
|
|
154
|
+
|
|
155
|
+
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
156
|
+
|
|
157
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
158
|
+
|
|
159
|
+
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
160
|
+
- Get instructions:
|
|
161
|
+
\`\`\`bash
|
|
162
|
+
synarcx instructions <artifact-id> --change "<name>" --json
|
|
163
|
+
\`\`\`
|
|
164
|
+
- The instructions JSON includes:
|
|
165
|
+
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
166
|
+
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
167
|
+
- \`template\`: The structure to use for your output file
|
|
168
|
+
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
169
|
+
- \`outputPath\`: Where to write the artifact
|
|
170
|
+
- \`dependencies\`: Completed artifacts to read for context
|
|
171
|
+
- Read any completed dependency files for context
|
|
172
|
+
- Create the artifact file using \`template\` as the structure
|
|
173
|
+
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
174
|
+
- Show brief progress: "Created <artifact-id>"
|
|
175
|
+
|
|
176
|
+
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
177
|
+
- After creating each artifact, re-run \`synarcx status --change "<name>" --json\`
|
|
178
|
+
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
179
|
+
- Stop when all \`applyRequires\` artifacts are done
|
|
180
|
+
|
|
181
|
+
c. **If an artifact requires user input** (unclear context):
|
|
182
|
+
- Use **AskUserQuestion tool** to clarify
|
|
183
|
+
- Then continue with creation
|
|
184
|
+
|
|
185
|
+
5. **Show final status**
|
|
186
|
+
\`\`\`bash
|
|
187
|
+
synarcx status --change "<name>"
|
|
188
|
+
\`\`\`
|
|
189
|
+
|
|
190
|
+
**Output**
|
|
191
|
+
|
|
192
|
+
After completing all artifacts, summarize:
|
|
193
|
+
- Change name and location
|
|
194
|
+
- List of artifacts created with brief descriptions
|
|
195
|
+
- What's ready: "All artifacts created! Ready for refinement."
|
|
196
|
+
- Prompt: "Run \`/syn:clarify\` to refine the artifacts, or \`/syn:apply\` to start implementation."
|
|
197
|
+
|
|
198
|
+
**Artifact Creation Guidelines**
|
|
199
|
+
|
|
200
|
+
- Follow the \`instruction\` field from \`synarcx instructions\` for each artifact type
|
|
201
|
+
- The schema defines what each artifact should contain - follow it
|
|
202
|
+
- Read dependency artifacts for context before creating new ones
|
|
203
|
+
- Use \`template\` as the structure for your output file - fill in its sections
|
|
204
|
+
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
205
|
+
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
206
|
+
- These guide what you write, but should never appear in the output
|
|
207
|
+
|
|
208
|
+
**Guardrails**
|
|
209
|
+
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
210
|
+
- Always read dependency artifacts before creating a new one
|
|
211
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
212
|
+
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
213
213
|
- Verify each artifact file exists after writing before proceeding to next`
|
|
214
|
-
};
|
|
214
|
+
});
|
|
215
215
|
}
|
|
216
216
|
//# sourceMappingURL=propose.js.map
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { commandFromSkill } from '../types.js';
|
|
2
|
+
export function getSynQuickSkillTemplate() {
|
|
3
|
+
return {
|
|
4
|
+
name: 'syn-quick',
|
|
5
|
+
description: 'Fast-path for small, low-risk changes — reads context, shows change inline, asks confirmation, applies. No artifacts created.',
|
|
6
|
+
instructions: `Apply a small, low-risk change directly — no proposal, no specs, no artifacts. Describes the change inline, asks the user to confirm, then applies after confirmation.
|
|
7
|
+
|
|
8
|
+
**Input**: The user describes the change to make. If no description provided, ask what they want to change.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Scope Check
|
|
13
|
+
|
|
14
|
+
Before proceeding, evaluate whether the described change is small enough for the quick path:
|
|
15
|
+
|
|
16
|
+
**Good for /syn:quick:**
|
|
17
|
+
- Typo fixes
|
|
18
|
+
- Single-line config changes
|
|
19
|
+
- Renaming a variable or function (single file, no callers to update across modules)
|
|
20
|
+
- Simple dependency version bump
|
|
21
|
+
- One-off formatting fix
|
|
22
|
+
- Small comment or documentation fix
|
|
23
|
+
|
|
24
|
+
**Too large for /syn:quick (warn and suggest alternative):**
|
|
25
|
+
- Multi-file changes
|
|
26
|
+
- Changes that add new behavior or logic
|
|
27
|
+
- Architectural or structural changes
|
|
28
|
+
- Changes requiring design decisions
|
|
29
|
+
- Refactoring that touches multiple modules
|
|
30
|
+
- Any change that would normally warrant a proposal
|
|
31
|
+
|
|
32
|
+
If the change description implies multi-file, new behavior, or architectural impact:
|
|
33
|
+
1. Warn: "This looks too large for \`/syn:quick\`. Consider \`/syn:explore\` to think it through or \`/syn:propose\` to create a full change."
|
|
34
|
+
2. If the user acknowledges and chooses to proceed anyway, continue with the quick apply.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Read Context
|
|
39
|
+
|
|
40
|
+
Read the relevant source files to understand current state.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Show Change Inline
|
|
45
|
+
|
|
46
|
+
Present the proposed change clearly:
|
|
47
|
+
|
|
48
|
+
\`\`\`
|
|
49
|
+
### Proposed Change
|
|
50
|
+
|
|
51
|
+
**File**: path/to/file.ts
|
|
52
|
+
**Current**: <existing code or content>
|
|
53
|
+
**Proposed**: <modified code or content>
|
|
54
|
+
**Reason**: <brief explanation>
|
|
55
|
+
\`\`\`
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Ask Confirmation
|
|
60
|
+
|
|
61
|
+
Use the AskUserQuestion tool to confirm:
|
|
62
|
+
> "Apply this change?"
|
|
63
|
+
|
|
64
|
+
Options: Yes (proceed), No (cancel).
|
|
65
|
+
|
|
66
|
+
Apply only after explicit confirmation.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Apply
|
|
71
|
+
|
|
72
|
+
Make the change. Commit is optional based on user preference.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Output
|
|
77
|
+
|
|
78
|
+
After applying:
|
|
79
|
+
- Summarize what was changed
|
|
80
|
+
- Note that no synspec artifacts were created`,
|
|
81
|
+
license: 'MIT',
|
|
82
|
+
compatibility: 'Requires synarcx CLI.',
|
|
83
|
+
metadata: { author: 'synarcx', version: '0.1' },
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export function getSynQuickCommandTemplate() {
|
|
87
|
+
return commandFromSkill(getSynQuickSkillTemplate(), {
|
|
88
|
+
name: 'syn:quick',
|
|
89
|
+
description: 'Apply a small, low-risk change directly — no artifacts, inline preview, confirmation step',
|
|
90
|
+
tags: ['workflow', 'quick', 'fast'],
|
|
91
|
+
content: `Apply a small, low-risk change directly — no proposal, no specs, no artifacts. Describes the change inline, asks the user to confirm, then applies after confirmation.
|
|
92
|
+
|
|
93
|
+
**Input**: The argument after \`/syn:quick\` describes the change to make.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Scope Check
|
|
98
|
+
|
|
99
|
+
- **Good for**: typo fixes, single-line config changes, renames (single file), dep bumps, minor formatting, comment fixes.
|
|
100
|
+
- **Too large**: multi-file changes, new behavior, architectural changes, design decisions, multi-module refactoring.
|
|
101
|
+
|
|
102
|
+
If too large → warn and suggest \`/syn:explore\` or \`/syn:propose\`. If user confirms anyway, proceed.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Read Context
|
|
107
|
+
|
|
108
|
+
Read the relevant source files to understand current state.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Show Change Inline
|
|
113
|
+
|
|
114
|
+
Present: file, current content, proposed content, reason.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Ask Confirmation
|
|
119
|
+
|
|
120
|
+
Ask "Apply this change?" with Yes/No options. Apply only after confirmation.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Apply
|
|
125
|
+
|
|
126
|
+
Make the change. No synspec artifacts are created.`
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=quick.js.map
|