@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.
- package/LICENSE +22 -22
- package/README.md +206 -206
- package/bin/zhima.js +1 -1
- package/dist/commands/feedback.js +4 -4
- package/dist/commands/schema.js +60 -60
- package/dist/core/command-generation/adapters/amazon-q.js +5 -5
- package/dist/core/command-generation/adapters/antigravity.js +5 -5
- package/dist/core/command-generation/adapters/auggie.js +6 -6
- package/dist/core/command-generation/adapters/bob.js +6 -6
- package/dist/core/command-generation/adapters/claude.js +8 -8
- package/dist/core/command-generation/adapters/cline.js +5 -5
- package/dist/core/command-generation/adapters/codebuddy.js +7 -7
- package/dist/core/command-generation/adapters/codex.js +6 -6
- package/dist/core/command-generation/adapters/continue.js +7 -7
- package/dist/core/command-generation/adapters/costrict.js +6 -6
- package/dist/core/command-generation/adapters/crush.js +8 -8
- package/dist/core/command-generation/adapters/cursor.js +8 -8
- package/dist/core/command-generation/adapters/factory.js +6 -6
- package/dist/core/command-generation/adapters/gemini.js +5 -5
- package/dist/core/command-generation/adapters/github-copilot.js +5 -5
- package/dist/core/command-generation/adapters/iflow.js +8 -8
- package/dist/core/command-generation/adapters/index.d.ts +1 -0
- package/dist/core/command-generation/adapters/index.js +1 -0
- package/dist/core/command-generation/adapters/junie.js +5 -5
- package/dist/core/command-generation/adapters/kilocode.js +1 -1
- package/dist/core/command-generation/adapters/kiro.js +5 -5
- package/dist/core/command-generation/adapters/lingma.js +8 -8
- package/dist/core/command-generation/adapters/opencode.js +5 -5
- package/dist/core/command-generation/adapters/pi.js +5 -5
- package/dist/core/command-generation/adapters/qoder.js +8 -8
- package/dist/core/command-generation/adapters/qwen.js +5 -5
- package/dist/core/command-generation/adapters/roocode.js +5 -5
- package/dist/core/command-generation/adapters/vjsp.d.ts +1 -1
- package/dist/core/command-generation/adapters/vjsp.js +8 -8
- package/dist/core/command-generation/adapters/windsurf.js +8 -8
- package/dist/core/command-generation/adapters/zcode.d.ts +13 -0
- package/dist/core/command-generation/adapters/zcode.js +27 -0
- package/dist/core/command-generation/registry.js +4 -0
- package/dist/core/completions/generators/bash-generator.js +41 -41
- package/dist/core/completions/generators/fish-generator.js +7 -7
- package/dist/core/completions/generators/powershell-generator.js +29 -29
- package/dist/core/completions/generators/zsh-generator.js +33 -33
- package/dist/core/completions/templates/bash-templates.js +24 -24
- package/dist/core/completions/templates/fish-templates.js +38 -38
- package/dist/core/completions/templates/powershell-templates.js +28 -28
- package/dist/core/completions/templates/zsh-templates.js +39 -39
- package/dist/core/config.js +1 -0
- package/dist/core/shared/skill-generation.js +12 -12
- package/dist/core/templates/workflows/apply-change.js +294 -294
- package/dist/core/templates/workflows/archive-change.js +257 -257
- package/dist/core/templates/workflows/bulk-archive-change.js +472 -472
- package/dist/core/templates/workflows/continue-change.js +214 -214
- package/dist/core/templates/workflows/explore.js +439 -439
- package/dist/core/templates/workflows/feedback.js +97 -97
- package/dist/core/templates/workflows/ff-change.js +180 -180
- package/dist/core/templates/workflows/new-change.js +123 -123
- package/dist/core/templates/workflows/onboard.js +540 -540
- package/dist/core/templates/workflows/propose.js +198 -198
- package/dist/core/templates/workflows/sync-specs.js +270 -270
- package/dist/core/templates/workflows/verify-change.js +318 -318
- package/dist/core/workspace/open-surface.js +11 -11
- package/package.json +82 -82
- package/schemas/spec-driven/schema.yaml +153 -153
- package/schemas/spec-driven/templates/proposal.md +23 -23
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 ZhiMa Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 ZhiMa Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
CHANGED
|
@@ -1,206 +1,206 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="https://gitlab.oneberry.cc:2083/zhima-agent/ias-workflow">
|
|
3
|
-
<picture>
|
|
4
|
-
<source srcset="assets/zhima_bg.png">
|
|
5
|
-
<img src="assets/zhima_bg.png" alt="ZhiMa logo">
|
|
6
|
-
</picture>
|
|
7
|
-
</a>
|
|
8
|
-
</p>
|
|
9
|
-
|
|
10
|
-
<p align="center">
|
|
11
|
-
<a href="https://gitlab.oneberry.cc:2083/zhima-agent/ias-workflow/actions/workflows/ci.yml"><img alt="CI" src="https://gitlab.oneberry.cc:2083/zhima-agent/ias-workflow/actions/workflows/ci.yml/badge.svg" /></a>
|
|
12
|
-
<a href="https://www.npmjs.com/package/@ias-ai/zhima-spec"><img alt="npm version" src="https://img.shields.io/npm/v/@ias-ai/zhima-spec?style=flat-square" /></a>
|
|
13
|
-
<a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" /></a>
|
|
14
|
-
<a href="https://discord.gg/YctCnvvshC"><img alt="Discord" src="https://img.shields.io/discord/1411657095639601154?style=flat-square&logo=discord&logoColor=white&label=Discord&suffix=%20online" /></a>
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
<details>
|
|
18
|
-
<summary><strong>The most loved spec framework.</strong></summary>
|
|
19
|
-
|
|
20
|
-
[](https://gitlab.oneberry.cc:2083/zhima-agent/ias-workflow/stargazers)
|
|
21
|
-
[](https://www.npmjs.com/package/@ias-ai/zhima-spec)
|
|
22
|
-
[](https://gitlab.oneberry.cc:2083/zhima-agent/ias-workflow/graphs/contributors)
|
|
23
|
-
|
|
24
|
-
</details>
|
|
25
|
-
<p></p>
|
|
26
|
-
Our philosophy:
|
|
27
|
-
|
|
28
|
-
```text
|
|
29
|
-
→ fluid not rigid
|
|
30
|
-
→ iterative not waterfall
|
|
31
|
-
→ easy not complex
|
|
32
|
-
→ built for brownfield not just greenfield
|
|
33
|
-
→ scalable from personal projects to enterprises
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
> [!TIP]
|
|
37
|
-
> **New workflow now available!** We've rebuilt ZhiMa with a new artifact-guided workflow.
|
|
38
|
-
>
|
|
39
|
-
> Run `/zm:propose "your idea"` to get started. → [Learn more here](docs/zm.md)
|
|
40
|
-
|
|
41
|
-
<p align="center">
|
|
42
|
-
Follow <a href="https://x.com/0xTab">@0xTab on X</a> for updates · Join the <a href="https://discord.gg/YctCnvvshC">ZhiMa Discord</a> for help and questions.
|
|
43
|
-
</p>
|
|
44
|
-
|
|
45
|
-
<!-- TODO: Add GIF demo of /zm:propose → /zm:archive workflow -->
|
|
46
|
-
|
|
47
|
-
## See it in action
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
You: /zm:propose add-dark-mode
|
|
51
|
-
AI: Created zhima/changes/add-dark-mode/
|
|
52
|
-
✓ proposal.md — why we're doing this, what's changing
|
|
53
|
-
✓ specs/ — requirements and scenarios
|
|
54
|
-
✓ design.md — technical approach
|
|
55
|
-
✓ tasks.md — implementation checklist
|
|
56
|
-
Ready for implementation!
|
|
57
|
-
|
|
58
|
-
You: /zm:apply
|
|
59
|
-
AI: Implementing tasks...
|
|
60
|
-
✓ 1.1 Add theme context provider
|
|
61
|
-
✓ 1.2 Create toggle component
|
|
62
|
-
✓ 2.1 Add CSS variables
|
|
63
|
-
✓ 2.2 Wire up localStorage
|
|
64
|
-
All tasks complete!
|
|
65
|
-
|
|
66
|
-
You: /zm:archive
|
|
67
|
-
AI: Archived to zhima/changes/archive/2025-01-23-add-dark-mode/
|
|
68
|
-
Specs updated. Ready for the next feature.
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
<details>
|
|
72
|
-
<summary><strong>ZhiMa Dashboard</strong></summary>
|
|
73
|
-
|
|
74
|
-
<p align="center">
|
|
75
|
-
<img src="assets/zhima_dashboard.png" alt="ZhiMa dashboard preview" width="90%">
|
|
76
|
-
</p>
|
|
77
|
-
|
|
78
|
-
</details>
|
|
79
|
-
|
|
80
|
-
## Quick Start
|
|
81
|
-
|
|
82
|
-
**Requires Node.js 20.19.0 or higher.**
|
|
83
|
-
|
|
84
|
-
Install ZhiMa globally:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
npm install -g @ias-ai/zhima-spec@latest
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Then navigate to your project directory and initialize:
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
cd your-project
|
|
94
|
-
zhima init
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Now tell your AI: `/zm:propose <what-you-want-to-build>`
|
|
98
|
-
|
|
99
|
-
If you want the expanded workflow (`/zm:new`, `/zm:continue`, `/zm:ff`, `/zm:verify`, `/zm:bulk-archive`, `/zm:onboard`), select it with `zhima config profile` and apply with `zhima update`.
|
|
100
|
-
|
|
101
|
-
> [!NOTE]
|
|
102
|
-
> Not sure if your tool is supported? [View the full list](docs/supported-tools.md) – we support 25+ tools and growing.
|
|
103
|
-
>
|
|
104
|
-
> Also works with pnpm, yarn, bun, and nix. [See installation options](docs/installation.md).
|
|
105
|
-
|
|
106
|
-
## Docs
|
|
107
|
-
|
|
108
|
-
→ **[Getting Started](docs/getting-started.md)**: first steps<br>
|
|
109
|
-
→ **[Workflows](docs/workflows.md)**: combos and patterns<br>
|
|
110
|
-
→ **[Commands](docs/commands.md)**: slash commands & skills<br>
|
|
111
|
-
→ **[CLI](docs/cli.md)**: terminal reference<br>
|
|
112
|
-
→ **[Supported Tools](docs/supported-tools.md)**: tool integrations & install paths<br>
|
|
113
|
-
→ **[Concepts](docs/concepts.md)**: how it all fits<br>
|
|
114
|
-
→ **[Multi-Language](docs/multi-language.md)**: multi-language support<br>
|
|
115
|
-
→ **[Customization](docs/customization.md)**: make it yours
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
## Community schemas
|
|
119
|
-
|
|
120
|
-
Third-party schema bundles distributed via standalone repositories — these provide opinionated workflows that integrate ZhiMa with other tools, similar to how [github/spec-kit's community extension catalog](https://github.com/github/spec-kit/tree/main/extensions) handles tool integrations.
|
|
121
|
-
|
|
122
|
-
→ **[Browse the catalog](docs/customization.md#community-schemas)** in the customization docs.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
## Why ZhiMa?
|
|
126
|
-
|
|
127
|
-
AI coding assistants are powerful but unpredictable when requirements live only in chat history. ZhiMa adds a lightweight spec layer so you agree on what to build before any code is written.
|
|
128
|
-
|
|
129
|
-
- **Agree before you build** — human and AI align on specs before code gets written
|
|
130
|
-
- **Stay organized** — each change gets its own folder with proposal, specs, design, and tasks
|
|
131
|
-
- **Work fluidly** — update any artifact anytime, no rigid phase gates
|
|
132
|
-
- **Use your tools** — works with 20+ AI assistants via slash commands
|
|
133
|
-
|
|
134
|
-
### How we compare
|
|
135
|
-
|
|
136
|
-
**vs. [Spec Kit](https://github.com/github/spec-kit)** (GitHub) — Thorough but heavyweight. Rigid phase gates, lots of Markdown, Python setup. ZhiMa is lighter and lets you iterate freely.
|
|
137
|
-
|
|
138
|
-
**vs. [Kiro](https://kiro.dev)** (AWS) — Powerful but you're locked into their IDE and limited to Claude models. ZhiMa works with the tools you already use.
|
|
139
|
-
|
|
140
|
-
**vs. nothing** — AI coding without specs means vague prompts and unpredictable results. ZhiMa brings predictability without the ceremony.
|
|
141
|
-
|
|
142
|
-
## Updating ZhiMa
|
|
143
|
-
|
|
144
|
-
**Upgrade the package**
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
npm install -g @ias-ai/zhima-spec@latest
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
**Refresh agent instructions**
|
|
151
|
-
|
|
152
|
-
Run this inside each project to regenerate AI guidance and ensure the latest slash commands are active:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
zhima update
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
## Usage Notes
|
|
159
|
-
|
|
160
|
-
**Model selection**: ZhiMa works best with high-reasoning models. We recommend Codex 5.5 and Opus 4.7 for both planning and implementation.
|
|
161
|
-
|
|
162
|
-
**Context hygiene**: ZhiMa benefits from a clean context window. Clear your context before starting implementation and maintain good context hygiene throughout your session.
|
|
163
|
-
|
|
164
|
-
## Contributing
|
|
165
|
-
|
|
166
|
-
**Small fixes** — Bug fixes, typo corrections, and minor improvements can be submitted directly as PRs.
|
|
167
|
-
|
|
168
|
-
**Larger changes** — For new features, significant refactors, or architectural changes, please submit an ZhiMa change proposal first so we can align on intent and goals before implementation begins.
|
|
169
|
-
|
|
170
|
-
When writing proposals, keep the ZhiMa philosophy in mind: we serve a wide variety of users across different coding agents, models, and use cases. Changes should work well for everyone.
|
|
171
|
-
|
|
172
|
-
**AI-generated code is welcome** — as long as it's been tested and verified. PRs containing AI-generated code should mention the coding agent and model used (e.g., "Generated with Claude Code using claude-opus-4-5-20251101").
|
|
173
|
-
|
|
174
|
-
### Development
|
|
175
|
-
|
|
176
|
-
- Install dependencies: `pnpm install`
|
|
177
|
-
- Build: `pnpm run build`
|
|
178
|
-
- Test: `pnpm test`
|
|
179
|
-
- Develop CLI locally: `pnpm run dev` or `pnpm run dev:cli`
|
|
180
|
-
- Conventional commits (one-line): `type(scope): subject`
|
|
181
|
-
|
|
182
|
-
## Other
|
|
183
|
-
|
|
184
|
-
<details>
|
|
185
|
-
<summary><strong>Telemetry</strong></summary>
|
|
186
|
-
|
|
187
|
-
ZhiMa collects anonymous usage stats.
|
|
188
|
-
|
|
189
|
-
We collect only command names and version to understand usage patterns. No arguments, paths, content, or PII. Automatically disabled in CI.
|
|
190
|
-
|
|
191
|
-
**Opt-out:** `export OPENSPEC_TELEMETRY=0` or `export DO_NOT_TRACK=1`
|
|
192
|
-
|
|
193
|
-
</details>
|
|
194
|
-
|
|
195
|
-
<details>
|
|
196
|
-
<summary><strong>Maintainers & Advisors</strong></summary>
|
|
197
|
-
|
|
198
|
-
See [MAINTAINERS.md](MAINTAINERS.md) for the list of core maintainers and advisors who help guide the project.
|
|
199
|
-
|
|
200
|
-
</details>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
## License
|
|
205
|
-
|
|
206
|
-
MIT
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://gitlab.oneberry.cc:2083/zhima-agent/ias-workflow">
|
|
3
|
+
<picture>
|
|
4
|
+
<source srcset="assets/zhima_bg.png">
|
|
5
|
+
<img src="assets/zhima_bg.png" alt="ZhiMa logo">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://gitlab.oneberry.cc:2083/zhima-agent/ias-workflow/actions/workflows/ci.yml"><img alt="CI" src="https://gitlab.oneberry.cc:2083/zhima-agent/ias-workflow/actions/workflows/ci.yml/badge.svg" /></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/@ias-ai/zhima-spec"><img alt="npm version" src="https://img.shields.io/npm/v/@ias-ai/zhima-spec?style=flat-square" /></a>
|
|
13
|
+
<a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" /></a>
|
|
14
|
+
<a href="https://discord.gg/YctCnvvshC"><img alt="Discord" src="https://img.shields.io/discord/1411657095639601154?style=flat-square&logo=discord&logoColor=white&label=Discord&suffix=%20online" /></a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<details>
|
|
18
|
+
<summary><strong>The most loved spec framework.</strong></summary>
|
|
19
|
+
|
|
20
|
+
[](https://gitlab.oneberry.cc:2083/zhima-agent/ias-workflow/stargazers)
|
|
21
|
+
[](https://www.npmjs.com/package/@ias-ai/zhima-spec)
|
|
22
|
+
[](https://gitlab.oneberry.cc:2083/zhima-agent/ias-workflow/graphs/contributors)
|
|
23
|
+
|
|
24
|
+
</details>
|
|
25
|
+
<p></p>
|
|
26
|
+
Our philosophy:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
→ fluid not rigid
|
|
30
|
+
→ iterative not waterfall
|
|
31
|
+
→ easy not complex
|
|
32
|
+
→ built for brownfield not just greenfield
|
|
33
|
+
→ scalable from personal projects to enterprises
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
> [!TIP]
|
|
37
|
+
> **New workflow now available!** We've rebuilt ZhiMa with a new artifact-guided workflow.
|
|
38
|
+
>
|
|
39
|
+
> Run `/zm:propose "your idea"` to get started. → [Learn more here](docs/zm.md)
|
|
40
|
+
|
|
41
|
+
<p align="center">
|
|
42
|
+
Follow <a href="https://x.com/0xTab">@0xTab on X</a> for updates · Join the <a href="https://discord.gg/YctCnvvshC">ZhiMa Discord</a> for help and questions.
|
|
43
|
+
</p>
|
|
44
|
+
|
|
45
|
+
<!-- TODO: Add GIF demo of /zm:propose → /zm:archive workflow -->
|
|
46
|
+
|
|
47
|
+
## See it in action
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
You: /zm:propose add-dark-mode
|
|
51
|
+
AI: Created zhima/changes/add-dark-mode/
|
|
52
|
+
✓ proposal.md — why we're doing this, what's changing
|
|
53
|
+
✓ specs/ — requirements and scenarios
|
|
54
|
+
✓ design.md — technical approach
|
|
55
|
+
✓ tasks.md — implementation checklist
|
|
56
|
+
Ready for implementation!
|
|
57
|
+
|
|
58
|
+
You: /zm:apply
|
|
59
|
+
AI: Implementing tasks...
|
|
60
|
+
✓ 1.1 Add theme context provider
|
|
61
|
+
✓ 1.2 Create toggle component
|
|
62
|
+
✓ 2.1 Add CSS variables
|
|
63
|
+
✓ 2.2 Wire up localStorage
|
|
64
|
+
All tasks complete!
|
|
65
|
+
|
|
66
|
+
You: /zm:archive
|
|
67
|
+
AI: Archived to zhima/changes/archive/2025-01-23-add-dark-mode/
|
|
68
|
+
Specs updated. Ready for the next feature.
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
<details>
|
|
72
|
+
<summary><strong>ZhiMa Dashboard</strong></summary>
|
|
73
|
+
|
|
74
|
+
<p align="center">
|
|
75
|
+
<img src="assets/zhima_dashboard.png" alt="ZhiMa dashboard preview" width="90%">
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
</details>
|
|
79
|
+
|
|
80
|
+
## Quick Start
|
|
81
|
+
|
|
82
|
+
**Requires Node.js 20.19.0 or higher.**
|
|
83
|
+
|
|
84
|
+
Install ZhiMa globally:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm install -g @ias-ai/zhima-spec@latest
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Then navigate to your project directory and initialize:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
cd your-project
|
|
94
|
+
zhima init
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Now tell your AI: `/zm:propose <what-you-want-to-build>`
|
|
98
|
+
|
|
99
|
+
If you want the expanded workflow (`/zm:new`, `/zm:continue`, `/zm:ff`, `/zm:verify`, `/zm:bulk-archive`, `/zm:onboard`), select it with `zhima config profile` and apply with `zhima update`.
|
|
100
|
+
|
|
101
|
+
> [!NOTE]
|
|
102
|
+
> Not sure if your tool is supported? [View the full list](docs/supported-tools.md) – we support 25+ tools and growing.
|
|
103
|
+
>
|
|
104
|
+
> Also works with pnpm, yarn, bun, and nix. [See installation options](docs/installation.md).
|
|
105
|
+
|
|
106
|
+
## Docs
|
|
107
|
+
|
|
108
|
+
→ **[Getting Started](docs/getting-started.md)**: first steps<br>
|
|
109
|
+
→ **[Workflows](docs/workflows.md)**: combos and patterns<br>
|
|
110
|
+
→ **[Commands](docs/commands.md)**: slash commands & skills<br>
|
|
111
|
+
→ **[CLI](docs/cli.md)**: terminal reference<br>
|
|
112
|
+
→ **[Supported Tools](docs/supported-tools.md)**: tool integrations & install paths<br>
|
|
113
|
+
→ **[Concepts](docs/concepts.md)**: how it all fits<br>
|
|
114
|
+
→ **[Multi-Language](docs/multi-language.md)**: multi-language support<br>
|
|
115
|
+
→ **[Customization](docs/customization.md)**: make it yours
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## Community schemas
|
|
119
|
+
|
|
120
|
+
Third-party schema bundles distributed via standalone repositories — these provide opinionated workflows that integrate ZhiMa with other tools, similar to how [github/spec-kit's community extension catalog](https://github.com/github/spec-kit/tree/main/extensions) handles tool integrations.
|
|
121
|
+
|
|
122
|
+
→ **[Browse the catalog](docs/customization.md#community-schemas)** in the customization docs.
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
## Why ZhiMa?
|
|
126
|
+
|
|
127
|
+
AI coding assistants are powerful but unpredictable when requirements live only in chat history. ZhiMa adds a lightweight spec layer so you agree on what to build before any code is written.
|
|
128
|
+
|
|
129
|
+
- **Agree before you build** — human and AI align on specs before code gets written
|
|
130
|
+
- **Stay organized** — each change gets its own folder with proposal, specs, design, and tasks
|
|
131
|
+
- **Work fluidly** — update any artifact anytime, no rigid phase gates
|
|
132
|
+
- **Use your tools** — works with 20+ AI assistants via slash commands
|
|
133
|
+
|
|
134
|
+
### How we compare
|
|
135
|
+
|
|
136
|
+
**vs. [Spec Kit](https://github.com/github/spec-kit)** (GitHub) — Thorough but heavyweight. Rigid phase gates, lots of Markdown, Python setup. ZhiMa is lighter and lets you iterate freely.
|
|
137
|
+
|
|
138
|
+
**vs. [Kiro](https://kiro.dev)** (AWS) — Powerful but you're locked into their IDE and limited to Claude models. ZhiMa works with the tools you already use.
|
|
139
|
+
|
|
140
|
+
**vs. nothing** — AI coding without specs means vague prompts and unpredictable results. ZhiMa brings predictability without the ceremony.
|
|
141
|
+
|
|
142
|
+
## Updating ZhiMa
|
|
143
|
+
|
|
144
|
+
**Upgrade the package**
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npm install -g @ias-ai/zhima-spec@latest
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Refresh agent instructions**
|
|
151
|
+
|
|
152
|
+
Run this inside each project to regenerate AI guidance and ensure the latest slash commands are active:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
zhima update
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Usage Notes
|
|
159
|
+
|
|
160
|
+
**Model selection**: ZhiMa works best with high-reasoning models. We recommend Codex 5.5 and Opus 4.7 for both planning and implementation.
|
|
161
|
+
|
|
162
|
+
**Context hygiene**: ZhiMa benefits from a clean context window. Clear your context before starting implementation and maintain good context hygiene throughout your session.
|
|
163
|
+
|
|
164
|
+
## Contributing
|
|
165
|
+
|
|
166
|
+
**Small fixes** — Bug fixes, typo corrections, and minor improvements can be submitted directly as PRs.
|
|
167
|
+
|
|
168
|
+
**Larger changes** — For new features, significant refactors, or architectural changes, please submit an ZhiMa change proposal first so we can align on intent and goals before implementation begins.
|
|
169
|
+
|
|
170
|
+
When writing proposals, keep the ZhiMa philosophy in mind: we serve a wide variety of users across different coding agents, models, and use cases. Changes should work well for everyone.
|
|
171
|
+
|
|
172
|
+
**AI-generated code is welcome** — as long as it's been tested and verified. PRs containing AI-generated code should mention the coding agent and model used (e.g., "Generated with Claude Code using claude-opus-4-5-20251101").
|
|
173
|
+
|
|
174
|
+
### Development
|
|
175
|
+
|
|
176
|
+
- Install dependencies: `pnpm install`
|
|
177
|
+
- Build: `pnpm run build`
|
|
178
|
+
- Test: `pnpm test`
|
|
179
|
+
- Develop CLI locally: `pnpm run dev` or `pnpm run dev:cli`
|
|
180
|
+
- Conventional commits (one-line): `type(scope): subject`
|
|
181
|
+
|
|
182
|
+
## Other
|
|
183
|
+
|
|
184
|
+
<details>
|
|
185
|
+
<summary><strong>Telemetry</strong></summary>
|
|
186
|
+
|
|
187
|
+
ZhiMa collects anonymous usage stats.
|
|
188
|
+
|
|
189
|
+
We collect only command names and version to understand usage patterns. No arguments, paths, content, or PII. Automatically disabled in CI.
|
|
190
|
+
|
|
191
|
+
**Opt-out:** `export OPENSPEC_TELEMETRY=0` or `export DO_NOT_TRACK=1`
|
|
192
|
+
|
|
193
|
+
</details>
|
|
194
|
+
|
|
195
|
+
<details>
|
|
196
|
+
<summary><strong>Maintainers & Advisors</strong></summary>
|
|
197
|
+
|
|
198
|
+
See [MAINTAINERS.md](MAINTAINERS.md) for the list of core maintainers and advisors who help guide the project.
|
|
199
|
+
|
|
200
|
+
</details>
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
## License
|
|
205
|
+
|
|
206
|
+
MIT
|
package/bin/zhima.js
CHANGED
|
@@ -59,10 +59,10 @@ function generateMetadata() {
|
|
|
59
59
|
const version = getVersion();
|
|
60
60
|
const platform = getPlatform();
|
|
61
61
|
const timestamp = getTimestamp();
|
|
62
|
-
return `---
|
|
63
|
-
Submitted via ZhiMa CLI
|
|
64
|
-
- Version: ${version}
|
|
65
|
-
- Platform: ${platform}
|
|
62
|
+
return `---
|
|
63
|
+
Submitted via ZhiMa CLI
|
|
64
|
+
- Version: ${version}
|
|
65
|
+
- Platform: ${platform}
|
|
66
66
|
- Timestamp: ${timestamp}`;
|
|
67
67
|
}
|
|
68
68
|
/**
|
package/dist/commands/schema.js
CHANGED
|
@@ -795,74 +795,74 @@ export function registerSchemaCommand(program) {
|
|
|
795
795
|
function createDefaultTemplate(artifactId) {
|
|
796
796
|
switch (artifactId) {
|
|
797
797
|
case 'proposal':
|
|
798
|
-
return `## Why
|
|
799
|
-
|
|
800
|
-
<!-- Describe the motivation for this change -->
|
|
801
|
-
|
|
802
|
-
## What Changes
|
|
803
|
-
|
|
804
|
-
<!-- Describe what will change -->
|
|
805
|
-
|
|
806
|
-
## Capabilities
|
|
807
|
-
|
|
808
|
-
### New Capabilities
|
|
809
|
-
<!-- List new capabilities -->
|
|
810
|
-
|
|
811
|
-
### Modified Capabilities
|
|
812
|
-
<!-- List modified capabilities -->
|
|
813
|
-
|
|
814
|
-
## Impact
|
|
815
|
-
|
|
816
|
-
<!-- Describe the impact on existing functionality -->
|
|
798
|
+
return `## Why
|
|
799
|
+
|
|
800
|
+
<!-- Describe the motivation for this change -->
|
|
801
|
+
|
|
802
|
+
## What Changes
|
|
803
|
+
|
|
804
|
+
<!-- Describe what will change -->
|
|
805
|
+
|
|
806
|
+
## Capabilities
|
|
807
|
+
|
|
808
|
+
### New Capabilities
|
|
809
|
+
<!-- List new capabilities -->
|
|
810
|
+
|
|
811
|
+
### Modified Capabilities
|
|
812
|
+
<!-- List modified capabilities -->
|
|
813
|
+
|
|
814
|
+
## Impact
|
|
815
|
+
|
|
816
|
+
<!-- Describe the impact on existing functionality -->
|
|
817
817
|
`;
|
|
818
818
|
case 'specs':
|
|
819
|
-
return `## ADDED Requirements
|
|
820
|
-
|
|
821
|
-
### Requirement: Example requirement
|
|
822
|
-
|
|
823
|
-
Description of the requirement.
|
|
824
|
-
|
|
825
|
-
#### Scenario: Example scenario
|
|
826
|
-
- **WHEN** some condition
|
|
827
|
-
- **THEN** some outcome
|
|
819
|
+
return `## ADDED Requirements
|
|
820
|
+
|
|
821
|
+
### Requirement: Example requirement
|
|
822
|
+
|
|
823
|
+
Description of the requirement.
|
|
824
|
+
|
|
825
|
+
#### Scenario: Example scenario
|
|
826
|
+
- **WHEN** some condition
|
|
827
|
+
- **THEN** some outcome
|
|
828
828
|
`;
|
|
829
829
|
case 'design':
|
|
830
|
-
return `## Context
|
|
831
|
-
|
|
832
|
-
<!-- Background and context -->
|
|
833
|
-
|
|
834
|
-
## Goals / Non-Goals
|
|
835
|
-
|
|
836
|
-
**Goals:**
|
|
837
|
-
<!-- List goals -->
|
|
838
|
-
|
|
839
|
-
**Non-Goals:**
|
|
840
|
-
<!-- List non-goals -->
|
|
841
|
-
|
|
842
|
-
## Decisions
|
|
843
|
-
|
|
844
|
-
### 1. Decision Name
|
|
845
|
-
|
|
846
|
-
Description and rationale.
|
|
847
|
-
|
|
848
|
-
**Alternatives considered:**
|
|
849
|
-
- Alternative 1: Rejected because...
|
|
850
|
-
|
|
851
|
-
## Risks / Trade-offs
|
|
852
|
-
|
|
853
|
-
<!-- List risks and trade-offs -->
|
|
830
|
+
return `## Context
|
|
831
|
+
|
|
832
|
+
<!-- Background and context -->
|
|
833
|
+
|
|
834
|
+
## Goals / Non-Goals
|
|
835
|
+
|
|
836
|
+
**Goals:**
|
|
837
|
+
<!-- List goals -->
|
|
838
|
+
|
|
839
|
+
**Non-Goals:**
|
|
840
|
+
<!-- List non-goals -->
|
|
841
|
+
|
|
842
|
+
## Decisions
|
|
843
|
+
|
|
844
|
+
### 1. Decision Name
|
|
845
|
+
|
|
846
|
+
Description and rationale.
|
|
847
|
+
|
|
848
|
+
**Alternatives considered:**
|
|
849
|
+
- Alternative 1: Rejected because...
|
|
850
|
+
|
|
851
|
+
## Risks / Trade-offs
|
|
852
|
+
|
|
853
|
+
<!-- List risks and trade-offs -->
|
|
854
854
|
`;
|
|
855
855
|
case 'tasks':
|
|
856
|
-
return `## Implementation Tasks
|
|
857
|
-
|
|
858
|
-
- [ ] Task 1
|
|
859
|
-
- [ ] Task 2
|
|
860
|
-
- [ ] Task 3
|
|
856
|
+
return `## Implementation Tasks
|
|
857
|
+
|
|
858
|
+
- [ ] Task 1
|
|
859
|
+
- [ ] Task 2
|
|
860
|
+
- [ ] Task 3
|
|
861
861
|
`;
|
|
862
862
|
default:
|
|
863
|
-
return `## ${artifactId}
|
|
864
|
-
|
|
865
|
-
<!-- Add content here -->
|
|
863
|
+
return `## ${artifactId}
|
|
864
|
+
|
|
865
|
+
<!-- Add content here -->
|
|
866
866
|
`;
|
|
867
867
|
}
|
|
868
868
|
}
|
|
@@ -15,11 +15,11 @@ export const amazonQAdapter = {
|
|
|
15
15
|
return path.join('.amazonq', 'prompts', `zm-${commandId}.md`);
|
|
16
16
|
},
|
|
17
17
|
formatFile(content) {
|
|
18
|
-
return `---
|
|
19
|
-
description: ${content.description}
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
${content.body}
|
|
18
|
+
return `---
|
|
19
|
+
description: ${content.description}
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
${content.body}
|
|
23
23
|
`;
|
|
24
24
|
},
|
|
25
25
|
};
|
|
@@ -15,11 +15,11 @@ export const antigravityAdapter = {
|
|
|
15
15
|
return path.join('.agent', 'workflows', `zm-${commandId}.md`);
|
|
16
16
|
},
|
|
17
17
|
formatFile(content) {
|
|
18
|
-
return `---
|
|
19
|
-
description: ${content.description}
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
${content.body}
|
|
18
|
+
return `---
|
|
19
|
+
description: ${content.description}
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
${content.body}
|
|
23
23
|
`;
|
|
24
24
|
},
|
|
25
25
|
};
|