@ias-ai/zhima-spec 1.3.6 → 1.3.9

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 (64) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +206 -206
  3. package/bin/zhima.js +1 -1
  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/index.d.ts +1 -0
  23. package/dist/core/command-generation/adapters/index.js +1 -0
  24. package/dist/core/command-generation/adapters/junie.js +5 -5
  25. package/dist/core/command-generation/adapters/kilocode.js +1 -1
  26. package/dist/core/command-generation/adapters/kiro.js +5 -5
  27. package/dist/core/command-generation/adapters/lingma.js +8 -8
  28. package/dist/core/command-generation/adapters/opencode.js +5 -5
  29. package/dist/core/command-generation/adapters/pi.js +5 -5
  30. package/dist/core/command-generation/adapters/qoder.js +8 -8
  31. package/dist/core/command-generation/adapters/qwen.js +5 -5
  32. package/dist/core/command-generation/adapters/roocode.js +5 -5
  33. package/dist/core/command-generation/adapters/vjsp.d.ts +1 -1
  34. package/dist/core/command-generation/adapters/vjsp.js +8 -8
  35. package/dist/core/command-generation/adapters/windsurf.js +8 -8
  36. package/dist/core/command-generation/adapters/zcode.d.ts +13 -0
  37. package/dist/core/command-generation/adapters/zcode.js +27 -0
  38. package/dist/core/command-generation/registry.js +4 -0
  39. package/dist/core/completions/generators/bash-generator.js +41 -41
  40. package/dist/core/completions/generators/fish-generator.js +7 -7
  41. package/dist/core/completions/generators/powershell-generator.js +29 -29
  42. package/dist/core/completions/generators/zsh-generator.js +33 -33
  43. package/dist/core/completions/templates/bash-templates.js +24 -24
  44. package/dist/core/completions/templates/fish-templates.js +38 -38
  45. package/dist/core/completions/templates/powershell-templates.js +28 -28
  46. package/dist/core/completions/templates/zsh-templates.js +39 -39
  47. package/dist/core/config.js +1 -0
  48. package/dist/core/shared/skill-generation.js +12 -12
  49. package/dist/core/templates/workflows/apply-change.js +294 -294
  50. package/dist/core/templates/workflows/archive-change.js +257 -257
  51. package/dist/core/templates/workflows/bulk-archive-change.js +472 -472
  52. package/dist/core/templates/workflows/continue-change.js +214 -214
  53. package/dist/core/templates/workflows/explore.js +439 -439
  54. package/dist/core/templates/workflows/feedback.js +97 -97
  55. package/dist/core/templates/workflows/ff-change.js +180 -180
  56. package/dist/core/templates/workflows/new-change.js +123 -123
  57. package/dist/core/templates/workflows/onboard.js +540 -540
  58. package/dist/core/templates/workflows/propose.js +198 -198
  59. package/dist/core/templates/workflows/sync-specs.js +270 -270
  60. package/dist/core/templates/workflows/verify-change.js +318 -318
  61. package/dist/core/workspace/open-surface.js +11 -11
  62. package/package.json +82 -82
  63. package/schemas/spec-driven/schema.yaml +153 -153
  64. package/schemas/spec-driven/templates/proposal.md +23 -23
@@ -2,68 +2,68 @@ export function getNewChangeSkillTemplate() {
2
2
  return {
3
3
  name: 'zhima-new-change',
4
4
  description: 'Start a new ZhiMa change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.',
5
- instructions: `Start a new change using the experimental artifact-driven approach.
6
-
7
- **Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
8
-
9
- **Steps**
10
-
11
- 1. **If no clear input provided, ask what they want to build**
12
-
13
- Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
14
- > "What change do you want to work on? Describe what you want to build or fix."
15
-
16
- From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
17
-
18
- **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
19
-
20
- 2. **Determine the workflow schema**
21
-
22
- Use the default schema (omit \`--schema\`) unless the user explicitly requests a different workflow.
23
-
24
- **Use a different schema only if the user mentions:**
25
- - A specific schema name → use \`--schema <name>\`
26
- - "show workflows" or "what workflows" → run \`zhima schemas --json\` and let them choose
27
-
28
- **Otherwise**: Omit \`--schema\` to use the default.
29
-
30
- 3. **Create the change directory**
31
- \`\`\`bash
32
- zhima new change "<name>"
33
- \`\`\`
34
- Add \`--schema <name>\` only if the user requested a specific workflow.
35
- This creates a scaffolded change in the planning home resolved by the CLI.
36
-
37
- 4. **Show the artifact status**
38
- \`\`\`bash
39
- zhima status --change "<name>" --json
40
- \`\`\`
41
- Use the returned \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`nextSteps\` instead of assuming repo-local paths.
42
-
43
- 5. **Get instructions for the first artifact**
44
- The first artifact depends on the schema (e.g., \`proposal\` for spec-driven).
45
- Check the status output to find the first artifact with status "ready".
46
- \`\`\`bash
47
- zhima instructions <first-artifact-id> --change "<name>"
48
- \`\`\`
49
- This outputs the template and context for creating the first artifact.
50
-
51
- 6. **STOP and wait for user direction**
52
-
53
- **Output**
54
-
55
- After completing the steps, summarize:
56
- - Change name and location
57
- - Schema/workflow being used and its artifact sequence
58
- - Current status (0/N artifacts complete)
59
- - The template for the first artifact
60
- - Prompt: "Ready to create the first artifact? Just describe what this change is about and I'll draft it, or ask me to continue."
61
-
62
- **Guardrails**
63
- - Do NOT create any artifacts yet - just show the instructions
64
- - Do NOT advance beyond showing the first artifact template
65
- - If the name is invalid (not kebab-case), ask for a valid name
66
- - If a change with that name already exists, suggest continuing that change instead
5
+ instructions: `Start a new change using the experimental artifact-driven approach.
6
+
7
+ **Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
8
+
9
+ **Steps**
10
+
11
+ 1. **If no clear input provided, ask what they want to build**
12
+
13
+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
14
+ > "What change do you want to work on? Describe what you want to build or fix."
15
+
16
+ From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
17
+
18
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
19
+
20
+ 2. **Determine the workflow schema**
21
+
22
+ Use the default schema (omit \`--schema\`) unless the user explicitly requests a different workflow.
23
+
24
+ **Use a different schema only if the user mentions:**
25
+ - A specific schema name → use \`--schema <name>\`
26
+ - "show workflows" or "what workflows" → run \`zhima schemas --json\` and let them choose
27
+
28
+ **Otherwise**: Omit \`--schema\` to use the default.
29
+
30
+ 3. **Create the change directory**
31
+ \`\`\`bash
32
+ zhima new change "<name>"
33
+ \`\`\`
34
+ Add \`--schema <name>\` only if the user requested a specific workflow.
35
+ This creates a scaffolded change in the planning home resolved by the CLI.
36
+
37
+ 4. **Show the artifact status**
38
+ \`\`\`bash
39
+ zhima status --change "<name>" --json
40
+ \`\`\`
41
+ Use the returned \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`nextSteps\` instead of assuming repo-local paths.
42
+
43
+ 5. **Get instructions for the first artifact**
44
+ The first artifact depends on the schema (e.g., \`proposal\` for spec-driven).
45
+ Check the status output to find the first artifact with status "ready".
46
+ \`\`\`bash
47
+ zhima instructions <first-artifact-id> --change "<name>"
48
+ \`\`\`
49
+ This outputs the template and context for creating the first artifact.
50
+
51
+ 6. **STOP and wait for user direction**
52
+
53
+ **Output**
54
+
55
+ After completing the steps, summarize:
56
+ - Change name and location
57
+ - Schema/workflow being used and its artifact sequence
58
+ - Current status (0/N artifacts complete)
59
+ - The template for the first artifact
60
+ - Prompt: "Ready to create the first artifact? Just describe what this change is about and I'll draft it, or ask me to continue."
61
+
62
+ **Guardrails**
63
+ - Do NOT create any artifacts yet - just show the instructions
64
+ - Do NOT advance beyond showing the first artifact template
65
+ - If the name is invalid (not kebab-case), ask for a valid name
66
+ - If a change with that name already exists, suggest continuing that change instead
67
67
  - Pass --schema if using a non-default workflow`,
68
68
  license: 'MIT',
69
69
  compatibility: 'Requires zhima CLI.',
@@ -76,67 +76,67 @@ export function getZmNewCommandTemplate() {
76
76
  description: 'Start a new change using the experimental artifact workflow (ZM)',
77
77
  category: 'Workflow',
78
78
  tags: ['workflow', 'artifacts', 'experimental'],
79
- content: `Start a new change using the experimental artifact-driven approach.
80
-
81
- **Input**: The argument after \`/zm:new\` is the change name (kebab-case), OR a description of what the user wants to build.
82
-
83
- **Steps**
84
-
85
- 1. **If no input provided, ask what they want to build**
86
-
87
- Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
88
- > "What change do you want to work on? Describe what you want to build or fix."
89
-
90
- From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
91
-
92
- **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
93
-
94
- 2. **Determine the workflow schema**
95
-
96
- Use the default schema (omit \`--schema\`) unless the user explicitly requests a different workflow.
97
-
98
- **Use a different schema only if the user mentions:**
99
- - A specific schema name → use \`--schema <name>\`
100
- - "show workflows" or "what workflows" → run \`zhima schemas --json\` and let them choose
101
-
102
- **Otherwise**: Omit \`--schema\` to use the default.
103
-
104
- 3. **Create the change directory**
105
- \`\`\`bash
106
- zhima new change "<name>"
107
- \`\`\`
108
- Add \`--schema <name>\` only if the user requested a specific workflow.
109
- This creates a scaffolded change in the planning home resolved by the CLI.
110
-
111
- 4. **Show the artifact status**
112
- \`\`\`bash
113
- zhima status --change "<name>" --json
114
- \`\`\`
115
- Use the returned \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`nextSteps\` instead of assuming repo-local paths.
116
-
117
- 5. **Get instructions for the first artifact**
118
- The first artifact depends on the schema. Check the status output to find the first artifact with status "ready".
119
- \`\`\`bash
120
- zhima instructions <first-artifact-id> --change "<name>"
121
- \`\`\`
122
- This outputs the template and context for creating the first artifact.
123
-
124
- 6. **STOP and wait for user direction**
125
-
126
- **Output**
127
-
128
- After completing the steps, summarize:
129
- - Change name and location
130
- - Schema/workflow being used and its artifact sequence
131
- - Current status (0/N artifacts complete)
132
- - The template for the first artifact
133
- - Prompt: "Ready to create the first artifact? Run \`/zm:continue\` or just describe what this change is about and I'll draft it."
134
-
135
- **Guardrails**
136
- - Do NOT create any artifacts yet - just show the instructions
137
- - Do NOT advance beyond showing the first artifact template
138
- - If the name is invalid (not kebab-case), ask for a valid name
139
- - If a change with that name already exists, suggest using \`/zm:continue\` instead
79
+ content: `Start a new change using the experimental artifact-driven approach.
80
+
81
+ **Input**: The argument after \`/zm:new\` is the change name (kebab-case), OR a description of what the user wants to build.
82
+
83
+ **Steps**
84
+
85
+ 1. **If no input provided, ask what they want to build**
86
+
87
+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
88
+ > "What change do you want to work on? Describe what you want to build or fix."
89
+
90
+ From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
91
+
92
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
93
+
94
+ 2. **Determine the workflow schema**
95
+
96
+ Use the default schema (omit \`--schema\`) unless the user explicitly requests a different workflow.
97
+
98
+ **Use a different schema only if the user mentions:**
99
+ - A specific schema name → use \`--schema <name>\`
100
+ - "show workflows" or "what workflows" → run \`zhima schemas --json\` and let them choose
101
+
102
+ **Otherwise**: Omit \`--schema\` to use the default.
103
+
104
+ 3. **Create the change directory**
105
+ \`\`\`bash
106
+ zhima new change "<name>"
107
+ \`\`\`
108
+ Add \`--schema <name>\` only if the user requested a specific workflow.
109
+ This creates a scaffolded change in the planning home resolved by the CLI.
110
+
111
+ 4. **Show the artifact status**
112
+ \`\`\`bash
113
+ zhima status --change "<name>" --json
114
+ \`\`\`
115
+ Use the returned \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`nextSteps\` instead of assuming repo-local paths.
116
+
117
+ 5. **Get instructions for the first artifact**
118
+ The first artifact depends on the schema. Check the status output to find the first artifact with status "ready".
119
+ \`\`\`bash
120
+ zhima instructions <first-artifact-id> --change "<name>"
121
+ \`\`\`
122
+ This outputs the template and context for creating the first artifact.
123
+
124
+ 6. **STOP and wait for user direction**
125
+
126
+ **Output**
127
+
128
+ After completing the steps, summarize:
129
+ - Change name and location
130
+ - Schema/workflow being used and its artifact sequence
131
+ - Current status (0/N artifacts complete)
132
+ - The template for the first artifact
133
+ - Prompt: "Ready to create the first artifact? Run \`/zm:continue\` or just describe what this change is about and I'll draft it."
134
+
135
+ **Guardrails**
136
+ - Do NOT create any artifacts yet - just show the instructions
137
+ - Do NOT advance beyond showing the first artifact template
138
+ - If the name is invalid (not kebab-case), ask for a valid name
139
+ - If a change with that name already exists, suggest using \`/zm:continue\` instead
140
140
  - Pass --schema if using a non-default workflow`
141
141
  };
142
142
  }