@ias-ai/zhima-spec 1.3.6 → 1.3.8

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 (59) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +206 -206
  3. package/bin/zhima.js +2 -2
  4. package/dist/commands/feedback.js +4 -4
  5. package/dist/commands/schema.js +60 -60
  6. package/dist/core/command-generation/adapters/amazon-q.js +5 -5
  7. package/dist/core/command-generation/adapters/antigravity.js +5 -5
  8. package/dist/core/command-generation/adapters/auggie.js +6 -6
  9. package/dist/core/command-generation/adapters/bob.js +6 -6
  10. package/dist/core/command-generation/adapters/claude.js +8 -8
  11. package/dist/core/command-generation/adapters/cline.js +5 -5
  12. package/dist/core/command-generation/adapters/codebuddy.js +7 -7
  13. package/dist/core/command-generation/adapters/codex.js +6 -6
  14. package/dist/core/command-generation/adapters/continue.js +7 -7
  15. package/dist/core/command-generation/adapters/costrict.js +6 -6
  16. package/dist/core/command-generation/adapters/crush.js +8 -8
  17. package/dist/core/command-generation/adapters/cursor.js +8 -8
  18. package/dist/core/command-generation/adapters/factory.js +6 -6
  19. package/dist/core/command-generation/adapters/gemini.js +5 -5
  20. package/dist/core/command-generation/adapters/github-copilot.js +5 -5
  21. package/dist/core/command-generation/adapters/iflow.js +8 -8
  22. package/dist/core/command-generation/adapters/junie.js +5 -5
  23. package/dist/core/command-generation/adapters/kilocode.js +1 -1
  24. package/dist/core/command-generation/adapters/kiro.js +5 -5
  25. package/dist/core/command-generation/adapters/lingma.js +8 -8
  26. package/dist/core/command-generation/adapters/opencode.js +5 -5
  27. package/dist/core/command-generation/adapters/pi.js +5 -5
  28. package/dist/core/command-generation/adapters/qoder.js +8 -8
  29. package/dist/core/command-generation/adapters/qwen.js +5 -5
  30. package/dist/core/command-generation/adapters/roocode.js +5 -5
  31. package/dist/core/command-generation/adapters/vjsp.d.ts +1 -1
  32. package/dist/core/command-generation/adapters/vjsp.js +8 -8
  33. package/dist/core/command-generation/adapters/windsurf.js +8 -8
  34. package/dist/core/command-generation/registry.js +2 -0
  35. package/dist/core/completions/generators/bash-generator.js +41 -41
  36. package/dist/core/completions/generators/fish-generator.js +7 -7
  37. package/dist/core/completions/generators/powershell-generator.js +29 -29
  38. package/dist/core/completions/generators/zsh-generator.js +33 -33
  39. package/dist/core/completions/templates/bash-templates.js +24 -24
  40. package/dist/core/completions/templates/fish-templates.js +38 -38
  41. package/dist/core/completions/templates/powershell-templates.js +28 -28
  42. package/dist/core/completions/templates/zsh-templates.js +39 -39
  43. package/dist/core/shared/skill-generation.js +12 -12
  44. package/dist/core/templates/workflows/apply-change.js +294 -294
  45. package/dist/core/templates/workflows/archive-change.js +257 -257
  46. package/dist/core/templates/workflows/bulk-archive-change.js +472 -472
  47. package/dist/core/templates/workflows/continue-change.js +214 -214
  48. package/dist/core/templates/workflows/explore.js +439 -439
  49. package/dist/core/templates/workflows/feedback.js +97 -97
  50. package/dist/core/templates/workflows/ff-change.js +180 -180
  51. package/dist/core/templates/workflows/new-change.js +123 -123
  52. package/dist/core/templates/workflows/onboard.js +540 -540
  53. package/dist/core/templates/workflows/propose.js +198 -198
  54. package/dist/core/templates/workflows/sync-specs.js +270 -270
  55. package/dist/core/templates/workflows/verify-change.js +318 -318
  56. package/dist/core/workspace/open-surface.js +11 -11
  57. package/package.json +18 -20
  58. package/schemas/spec-driven/schema.yaml +153 -153
  59. package/schemas/spec-driven/templates/proposal.md +23 -23
@@ -2,105 +2,105 @@ export function getZmProposeSkillTemplate() {
2
2
  return {
3
3
  name: 'zhima-propose',
4
4
  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 implement, run /zm: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
- zhima new change "<name>"
32
- \`\`\`
33
- This creates a scaffolded change in the planning home resolved by the CLI with \`.zhima.yaml\`.
34
-
35
- 3. **Get the artifact build order**
36
- \`\`\`bash
37
- zhima 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
- - \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
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
- zhima 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
- - \`resolvedOutputPath\`: Resolved path or pattern 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 and write it to \`resolvedOutputPath\`
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 \`zhima 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
- zhima 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 implementation."
87
- - Prompt: "Run \`/zm:apply\` or ask me to implement to start working on the tasks."
88
-
89
- **Artifact Creation Guidelines**
90
-
91
- - Follow the \`instruction\` field from \`zhima 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
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 implement, run /zm: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
+ zhima new change "<name>"
32
+ \`\`\`
33
+ This creates a scaffolded change in the planning home resolved by the CLI with \`.zhima.yaml\`.
34
+
35
+ 3. **Get the artifact build order**
36
+ \`\`\`bash
37
+ zhima 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
+ - \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
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
+ zhima 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
+ - \`resolvedOutputPath\`: Resolved path or pattern 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 and write it to \`resolvedOutputPath\`
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 \`zhima 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
+ zhima 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 implementation."
87
+ - Prompt: "Run \`/zm:apply\` or ask me to implement to start working on the tasks."
88
+
89
+ **Artifact Creation Guidelines**
90
+
91
+ - Follow the \`instruction\` field from \`zhima 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
104
104
  - Verify each artifact file exists after writing before proceeding to next`,
105
105
  license: 'MIT',
106
106
  compatibility: 'Requires zhima CLI.',
@@ -113,105 +113,105 @@ export function getZmProposeCommandTemplate() {
113
113
  description: 'Propose a new change - create it and generate all artifacts in one step',
114
114
  category: 'Workflow',
115
115
  tags: ['workflow', 'artifacts', 'experimental'],
116
- content: `Propose a new change - create the change and generate all artifacts in one step.
117
-
118
- I'll create a change with artifacts:
119
- - proposal.md (what & why)
120
- - design.md (how)
121
- - tasks.md (implementation steps)
122
-
123
- When ready to implement, run /zm:apply
124
-
125
- ---
126
-
127
- **Input**: The argument after \`/zm:propose\` is the change name (kebab-case), OR a description of what the user wants to build.
128
-
129
- **Steps**
130
-
131
- 1. **If no input provided, ask what they want to build**
132
-
133
- Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
134
- > "What change do you want to work on? Describe what you want to build or fix."
135
-
136
- From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
137
-
138
- **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
139
-
140
- 2. **Create the change directory**
141
- \`\`\`bash
142
- zhima new change "<name>"
143
- \`\`\`
144
- This creates a scaffolded change in the planning home resolved by the CLI with \`.zhima.yaml\`.
145
-
146
- 3. **Get the artifact build order**
147
- \`\`\`bash
148
- zhima status --change "<name>" --json
149
- \`\`\`
150
- Parse the JSON to get:
151
- - \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
152
- - \`artifacts\`: list of all artifacts with their status and dependencies
153
- - \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
154
-
155
- 4. **Create artifacts in sequence until apply-ready**
156
-
157
- Use the **TodoWrite tool** to track progress through the artifacts.
158
-
159
- Loop through artifacts in dependency order (artifacts with no pending dependencies first):
160
-
161
- a. **For each artifact that is \`ready\` (dependencies satisfied)**:
162
- - Get instructions:
163
- \`\`\`bash
164
- zhima instructions <artifact-id> --change "<name>" --json
165
- \`\`\`
166
- - The instructions JSON includes:
167
- - \`context\`: Project background (constraints for you - do NOT include in output)
168
- - \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
169
- - \`template\`: The structure to use for your output file
170
- - \`instruction\`: Schema-specific guidance for this artifact type
171
- - \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
172
- - \`dependencies\`: Completed artifacts to read for context
173
- - Read any completed dependency files for context
174
- - Create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`
175
- - Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
176
- - Show brief progress: "Created <artifact-id>"
177
-
178
- b. **Continue until all \`applyRequires\` artifacts are complete**
179
- - After creating each artifact, re-run \`zhima status --change "<name>" --json\`
180
- - Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
181
- - Stop when all \`applyRequires\` artifacts are done
182
-
183
- c. **If an artifact requires user input** (unclear context):
184
- - Use **AskUserQuestion tool** to clarify
185
- - Then continue with creation
186
-
187
- 5. **Show final status**
188
- \`\`\`bash
189
- zhima status --change "<name>"
190
- \`\`\`
191
-
192
- **Output**
193
-
194
- After completing all artifacts, summarize:
195
- - Change name and location
196
- - List of artifacts created with brief descriptions
197
- - What's ready: "All artifacts created! Ready for implementation."
198
- - Prompt: "Run \`/zm:apply\` to start implementing."
199
-
200
- **Artifact Creation Guidelines**
201
-
202
- - Follow the \`instruction\` field from \`zhima instructions\` for each artifact type
203
- - The schema defines what each artifact should contain - follow it
204
- - Read dependency artifacts for context before creating new ones
205
- - Use \`template\` as the structure for your output file - fill in its sections
206
- - **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
207
- - Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
208
- - These guide what you write, but should never appear in the output
209
-
210
- **Guardrails**
211
- - Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
212
- - Always read dependency artifacts before creating a new one
213
- - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
214
- - If a change with that name already exists, ask if user wants to continue it or create a new one
116
+ content: `Propose a new change - create the change and generate all artifacts in one step.
117
+
118
+ I'll create a change with artifacts:
119
+ - proposal.md (what & why)
120
+ - design.md (how)
121
+ - tasks.md (implementation steps)
122
+
123
+ When ready to implement, run /zm:apply
124
+
125
+ ---
126
+
127
+ **Input**: The argument after \`/zm:propose\` is the change name (kebab-case), OR a description of what the user wants to build.
128
+
129
+ **Steps**
130
+
131
+ 1. **If no input provided, ask what they want to build**
132
+
133
+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
134
+ > "What change do you want to work on? Describe what you want to build or fix."
135
+
136
+ From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
137
+
138
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
139
+
140
+ 2. **Create the change directory**
141
+ \`\`\`bash
142
+ zhima new change "<name>"
143
+ \`\`\`
144
+ This creates a scaffolded change in the planning home resolved by the CLI with \`.zhima.yaml\`.
145
+
146
+ 3. **Get the artifact build order**
147
+ \`\`\`bash
148
+ zhima status --change "<name>" --json
149
+ \`\`\`
150
+ Parse the JSON to get:
151
+ - \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
152
+ - \`artifacts\`: list of all artifacts with their status and dependencies
153
+ - \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
154
+
155
+ 4. **Create artifacts in sequence until apply-ready**
156
+
157
+ Use the **TodoWrite tool** to track progress through the artifacts.
158
+
159
+ Loop through artifacts in dependency order (artifacts with no pending dependencies first):
160
+
161
+ a. **For each artifact that is \`ready\` (dependencies satisfied)**:
162
+ - Get instructions:
163
+ \`\`\`bash
164
+ zhima instructions <artifact-id> --change "<name>" --json
165
+ \`\`\`
166
+ - The instructions JSON includes:
167
+ - \`context\`: Project background (constraints for you - do NOT include in output)
168
+ - \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
169
+ - \`template\`: The structure to use for your output file
170
+ - \`instruction\`: Schema-specific guidance for this artifact type
171
+ - \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
172
+ - \`dependencies\`: Completed artifacts to read for context
173
+ - Read any completed dependency files for context
174
+ - Create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`
175
+ - Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
176
+ - Show brief progress: "Created <artifact-id>"
177
+
178
+ b. **Continue until all \`applyRequires\` artifacts are complete**
179
+ - After creating each artifact, re-run \`zhima status --change "<name>" --json\`
180
+ - Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
181
+ - Stop when all \`applyRequires\` artifacts are done
182
+
183
+ c. **If an artifact requires user input** (unclear context):
184
+ - Use **AskUserQuestion tool** to clarify
185
+ - Then continue with creation
186
+
187
+ 5. **Show final status**
188
+ \`\`\`bash
189
+ zhima status --change "<name>"
190
+ \`\`\`
191
+
192
+ **Output**
193
+
194
+ After completing all artifacts, summarize:
195
+ - Change name and location
196
+ - List of artifacts created with brief descriptions
197
+ - What's ready: "All artifacts created! Ready for implementation."
198
+ - Prompt: "Run \`/zm:apply\` to start implementing."
199
+
200
+ **Artifact Creation Guidelines**
201
+
202
+ - Follow the \`instruction\` field from \`zhima instructions\` for each artifact type
203
+ - The schema defines what each artifact should contain - follow it
204
+ - Read dependency artifacts for context before creating new ones
205
+ - Use \`template\` as the structure for your output file - fill in its sections
206
+ - **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
207
+ - Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
208
+ - These guide what you write, but should never appear in the output
209
+
210
+ **Guardrails**
211
+ - Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
212
+ - Always read dependency artifacts before creating a new one
213
+ - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
214
+ - If a change with that name already exists, ask if user wants to continue it or create a new one
215
215
  - Verify each artifact file exists after writing before proceeding to next`
216
216
  };
217
217
  }