|
1 | 1 | <p align="center"> |
2 | | - <a href="https://github.com/Fission-AI/OpenSpec"> |
| 2 | + <a href="https://github.com/studyzy/openspec-cn"> |
3 | 3 | <picture> |
4 | 4 | <source srcset="assets/openspec_bg.png"> |
5 | 5 | <img src="assets/openspec_bg.png" alt="OpenSpec logo"> |
|
9 | 9 |
|
10 | 10 | <p align="center"> |
11 | 11 | <a href="https://github.com/Fission-AI/OpenSpec/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/Fission-AI/OpenSpec/actions/workflows/ci.yml/badge.svg" /></a> |
12 | | - <a href="https://www.npmjs.com/package/@fission-ai/openspec"><img alt="npm version" src="https://img.shields.io/npm/v/@fission-ai/openspec?style=flat-square" /></a> |
| 12 | + <a href="https://www.npmjs.com/package/@studyzy/openspec-cn"><img alt="npm version" src="https://img.shields.io/npm/v/@studyzy/openspec-cn?style=flat-square" /></a> |
13 | 13 | <a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" /></a> |
14 | 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 | 15 | </p> |
16 | 16 |
|
| 17 | +> [!NOTE] |
| 18 | +> 本项目为中文汉化分支:**openspec-cn**(npm:`@studyzy/openspec-cn`)。 |
| 19 | +> |
| 20 | +> 原版项目:OpenSpec(仓库:`https://github.com/Fission-AI/OpenSpec`,npm:`@fission-ai/openspec`)。 |
| 21 | +
|
17 | 22 | <details> |
18 | | -<summary><strong>The most loved spec framework.</strong></summary> |
| 23 | +<summary><strong>最受喜爱的规范(spec)框架。</strong></summary> |
19 | 24 |
|
20 | | -[](https://github.com/Fission-AI/OpenSpec/stargazers) |
21 | | -[](https://www.npmjs.com/package/@fission-ai/openspec) |
22 | | -[](https://github.com/Fission-AI/OpenSpec/graphs/contributors) |
| 25 | +[](https://github.com/studyzy/openspec-cn/stargazers) |
| 26 | +[](https://www.npmjs.com/package/@studyzy/openspec-cn) |
| 27 | +[](https://github.com/studyzy/openspec-cn/graphs/contributors) |
23 | 28 |
|
24 | 29 | </details> |
25 | 30 | <p></p> |
26 | | -Our philosophy: |
| 31 | +我们的理念: |
27 | 32 |
|
28 | 33 | ```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 | +→ 简单,而非复杂 |
| 37 | +→ 面向存量项目(brownfield),而不只是新项目(greenfield) |
| 38 | +→ 从个人项目到企业规模都可扩展 |
34 | 39 | ``` |
35 | 40 |
|
36 | 41 | > [!TIP] |
37 | | -> **New workflow now available!** We've rebuilt OpenSpec with a new artifact-guided workflow. |
| 42 | +> **全新工作流现已上线!** 我们用一种全新的“以制品(artifact)为导向”的工作流重构了 OpenSpec。 |
38 | 43 | > |
39 | | -> Run `/opsx:onboard` to get started. → [Learn more here](docs/opsx.md) |
| 44 | +> 运行 `/opsx:onboard` 开始使用。→ [在此了解更多](docs/opsx.md) |
40 | 45 |
|
41 | 46 | <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">OpenSpec Discord</a> for help and questions. |
| 47 | + 关注 <a href="https://x.com/0xTab">X 上的 @0xTab</a> 获取更新 · 加入 <a href="https://discord.gg/YctCnvvshC">OpenSpec Discord</a> 获取帮助与答疑。 |
43 | 48 | </p> |
44 | 49 |
|
45 | | -### Teams |
| 50 | +### 团队使用 |
46 | 51 |
|
47 | | -Using OpenSpec in a team? [Email here](mailto:teams@openspec.dev) for access to our Slack channel. |
| 52 | +团队正在使用 OpenSpec?可 [发送邮件](mailto:teams@openspec.dev) 获取我们 Slack 频道的访问权限。 |
48 | 53 |
|
49 | | -<!-- TODO: Add GIF demo of /opsx:new → /opsx:archive workflow --> |
| 54 | +<!-- TODO: 添加 /opsx:new → /opsx:archive 工作流的 GIF 演示 --> |
50 | 55 |
|
51 | | -## See it in action |
| 56 | +## 看看效果 |
52 | 57 |
|
53 | 58 | ```text |
54 | | -You: /opsx:new add-dark-mode |
55 | | -AI: Created openspec/changes/add-dark-mode/ |
56 | | - Ready to create: proposal |
57 | | -
|
58 | | -You: /opsx:ff # "fast-forward" - generate all planning docs |
59 | | -AI: ✓ proposal.md — why we're doing this, what's changing |
60 | | - ✓ specs/ — requirements and scenarios |
61 | | - ✓ design.md — technical approach |
62 | | - ✓ tasks.md — implementation checklist |
63 | | - Ready for implementation! |
64 | | -
|
65 | | -You: /opsx:apply |
66 | | -AI: Implementing tasks... |
67 | | - ✓ 1.1 Add theme context provider |
68 | | - ✓ 1.2 Create toggle component |
69 | | - ✓ 2.1 Add CSS variables |
70 | | - ✓ 2.2 Wire up localStorage |
71 | | - All tasks complete! |
72 | | -
|
73 | | -You: /opsx:archive |
74 | | -AI: Archived to openspec/changes/archive/2025-01-23-add-dark-mode/ |
75 | | - Specs updated. Ready for the next feature. |
| 59 | +你:/opsx:new add-dark-mode |
| 60 | +AI:创建 openspec/changes/add-dark-mode/ |
| 61 | + 准备创建:proposal |
| 62 | +
|
| 63 | +你:/opsx:ff # "fast-forward" - 生成全部规划文档 |
| 64 | +AI:✓ proposal.md — 为什么要做、会改什么 |
| 65 | + ✓ specs/ — 需求与场景 |
| 66 | + ✓ design.md — 技术方案 |
| 67 | + ✓ tasks.md — 实现清单 |
| 68 | + 准备进入实现! |
| 69 | +
|
| 70 | +你:/opsx:apply |
| 71 | +AI:开始实现任务... |
| 72 | + ✓ 1.1 添加主题上下文 Provider |
| 73 | + ✓ 1.2 创建切换组件 |
| 74 | + ✓ 2.1 添加 CSS 变量 |
| 75 | + ✓ 2.2 接入 localStorage |
| 76 | + 所有任务已完成! |
| 77 | +
|
| 78 | +你:/opsx:archive |
| 79 | +AI:已归档至 openspec/changes/archive/2025-01-23-add-dark-mode/ |
| 80 | + Specs 已更新。可以开始下一个功能了。 |
76 | 81 | ``` |
77 | 82 |
|
78 | 83 | <details> |
79 | | -<summary><strong>OpenSpec Dashboard</strong></summary> |
| 84 | +<summary><strong>OpenSpec 仪表盘</strong></summary> |
80 | 85 |
|
81 | 86 | <p align="center"> |
82 | 87 | <img src="assets/openspec_dashboard.png" alt="OpenSpec dashboard preview" width="90%"> |
83 | 88 | </p> |
84 | 89 |
|
85 | 90 | </details> |
86 | 91 |
|
87 | | -## Quick Start |
| 92 | +## 快速开始 |
88 | 93 |
|
89 | | -**Requires Node.js 20.19.0 or higher.** |
| 94 | +**需要 Node.js 20.19.0 或更高版本。** |
90 | 95 |
|
91 | | -Install OpenSpec globally: |
| 96 | +全局安装 openspec-cn: |
92 | 97 |
|
93 | 98 | ```bash |
94 | | -npm install -g @fission-ai/openspec@latest |
| 99 | +npm install -g @studyzy/openspec-cn@latest |
95 | 100 | ``` |
96 | 101 |
|
97 | | -Then navigate to your project directory and initialize: |
| 102 | +然后进入你的项目目录并初始化: |
98 | 103 |
|
99 | 104 | ```bash |
100 | 105 | cd your-project |
101 | | -openspec init |
| 106 | +openspec-cn init |
| 107 | + |
102 | 108 | ``` |
103 | 109 |
|
104 | | -Now tell your AI: `/opsx:new <what-you-want-to-build>` |
| 110 | +现在告诉你的 AI:`/opsx:new <你想要实现的功能>` |
105 | 111 |
|
106 | 112 | > [!NOTE] |
107 | | -> Not sure if your tool is supported? [View the full list](docs/supported-tools.md) – we support 20+ tools and growing. |
| 113 | +> 不确定你的工具是否受支持?[查看完整列表](docs/supported-tools.md) – 我们支持 20+ 工具,并仍在持续增长。 |
108 | 114 | > |
109 | | -> Also works with pnpm, yarn, bun, and nix. [See installation options](docs/installation.md). |
| 115 | +> 同样支持 pnpm、yarn、bun 和 nix。可查看 [安装选项](docs/installation.md)。 |
110 | 116 |
|
111 | | -## Docs |
| 117 | +## 文档 |
112 | 118 |
|
113 | | -→ **[Getting Started](docs/getting-started.md)**: first steps<br> |
114 | | -→ **[Workflows](docs/workflows.md)**: combos and patterns<br> |
115 | | -→ **[Commands](docs/commands.md)**: slash commands & skills<br> |
116 | | -→ **[CLI](docs/cli.md)**: terminal reference<br> |
117 | | -→ **[Supported Tools](docs/supported-tools.md)**: tool integrations & install paths<br> |
118 | | -→ **[Concepts](docs/concepts.md)**: how it all fits<br> |
119 | | -→ **[Multi-Language](docs/multi-language.md)**: multi-language support<br> |
120 | | -→ **[Customization](docs/customization.md)**: make it yours |
| 119 | +→ **[快速入门](docs/getting-started.md)**:开始使用<br> |
| 120 | +→ **[工作流](docs/workflows.md)**:组合与模式<br> |
| 121 | +→ **[命令](docs/commands.md)**:斜杠命令与技能<br> |
| 122 | +→ **[CLI](docs/cli.md)**:终端参考手册<br> |
| 123 | +→ **[支持的工具](docs/supported-tools.md)**:工具集成与安装路径<br> |
| 124 | +→ **[概念](docs/concepts.md)**:整体如何运转<br> |
| 125 | +→ **[多语言](docs/multi-language.md)**:多语言支持<br> |
| 126 | +→ **[自定义](docs/customization.md)**:打造你的版本 |
121 | 127 |
|
122 | 128 |
|
123 | | -## Why OpenSpec? |
| 129 | +## 为什么选择 OpenSpec? |
124 | 130 |
|
125 | | -AI coding assistants are powerful but unpredictable when requirements live only in chat history. OpenSpec adds a lightweight spec layer so you agree on what to build before any code is written. |
| 131 | +AI 编程助手很强大,但当需求只存在于聊天记录里时,结果往往难以预测。OpenSpec 增加了一层轻量的规范(spec)机制,让你在写任何代码前先对齐要做什么。 |
126 | 132 |
|
127 | | -- **Agree before you build** — human and AI align on specs before code gets written |
128 | | -- **Stay organized** — each change gets its own folder with proposal, specs, design, and tasks |
129 | | -- **Work fluidly** — update any artifact anytime, no rigid phase gates |
130 | | -- **Use your tools** — works with 20+ AI assistants via slash commands |
| 133 | +- **先对齐,再开工** —— 人类与 AI 在写代码前先在规范上达成一致 |
| 134 | +- **保持有序** —— 每个变更都有自己的目录:proposal、specs、design、tasks |
| 135 | +- **流式协作** —— 任意制品都可以随时更新,不设僵硬的阶段门槛 |
| 136 | +- **用你现有的工具** —— 通过斜杠命令支持 20+ AI 助手 |
131 | 137 |
|
132 | | -### How we compare |
| 138 | +### 我们如何对比 |
133 | 139 |
|
134 | | -**vs. [Spec Kit](https://github.com/github/spec-kit)** (GitHub) — Thorough but heavyweight. Rigid phase gates, lots of Markdown, Python setup. OpenSpec is lighter and lets you iterate freely. |
| 140 | +**对比 [Spec Kit](https://github.com/github/spec-kit)**(GitHub)—— 很全面但偏厚重:阶段门槛严格、Markdown 很多、需要 Python 环境。OpenSpec 更轻量,也更适合自由迭代。 |
135 | 141 |
|
136 | | -**vs. [Kiro](https://kiro.dev)** (AWS) — Powerful but you're locked into their IDE and limited to Claude models. OpenSpec works with the tools you already use. |
| 142 | +**对比 [Kiro](https://kiro.dev)**(AWS)—— 功能强大,但会被锁定在他们的 IDE 中,并且模型选择受限(主要是 Claude)。OpenSpec 可与您已有的工具协作。 |
137 | 143 |
|
138 | | -**vs. nothing** — AI coding without specs means vague prompts and unpredictable results. OpenSpec brings predictability without the ceremony. |
| 144 | +**对比“什么都不用”** —— 只靠聊天做 AI 编程容易产生模糊需求和不可预测的实现。OpenSpec 在不增加太多仪式感的前提下,带来更可预期的结果。 |
139 | 145 |
|
140 | | -## Updating OpenSpec |
| 146 | +## 更新 OpenSpec |
141 | 147 |
|
142 | | -**Upgrade the package** |
| 148 | +**升级包版本** |
143 | 149 |
|
144 | 150 | ```bash |
145 | | -npm install -g @fission-ai/openspec@latest |
| 151 | +npm install -g @studyzy/openspec-cn@latest |
146 | 152 | ``` |
147 | 153 |
|
148 | | -**Refresh agent instructions** |
| 154 | +**刷新代理指令(agent instructions)** |
149 | 155 |
|
150 | | -Run this inside each project to regenerate AI guidance and ensure the latest slash commands are active: |
| 156 | +在每个项目里运行一次,用于重新生成 AI 指引,并确保最新斜杠命令可用: |
151 | 157 |
|
152 | 158 | ```bash |
153 | | -openspec update |
| 159 | +openspec-cn update |
154 | 160 | ``` |
155 | 161 |
|
156 | | -## Usage Notes |
| 162 | +## 使用注意事项 |
157 | 163 |
|
158 | | -**Model selection**: OpenSpec works best with high-reasoning models. We recommend Opus 4.5 and GPT 5.2 for both planning and implementation. |
| 164 | +**模型选择**:OpenSpec 更适合高推理模型。我们推荐在规划与实现阶段都使用 Opus 4.5 和 GPT 5.2。 |
159 | 165 |
|
160 | | -**Context hygiene**: OpenSpec benefits from a clean context window. Clear your context before starting implementation and maintain good context hygiene throughout your session. |
| 166 | +**上下文卫生**:OpenSpec 受益于更干净的上下文窗口。在开始实现前清理上下文,并在整个会话中保持良好的上下文卫生。 |
161 | 167 |
|
162 | | -## Contributing |
| 168 | +## 参与贡献 |
163 | 169 |
|
164 | | -**Small fixes** — Bug fixes, typo corrections, and minor improvements can be submitted directly as PRs. |
| 170 | +**小修小补** —— Bug 修复、错别字修正与小型改进可以直接提交 PR。 |
165 | 171 |
|
166 | | -**Larger changes** — For new features, significant refactors, or architectural changes, please submit an OpenSpec change proposal first so we can align on intent and goals before implementation begins. |
| 172 | +**较大改动** —— 对于新功能、重大重构或架构调整,请先提交一个 OpenSpec 变更提案,以便在实现前对齐意图与目标。 |
167 | 173 |
|
168 | | -When writing proposals, keep the OpenSpec philosophy in mind: we serve a wide variety of users across different coding agents, models, and use cases. Changes should work well for everyone. |
| 174 | +撰写提案时,请牢记 OpenSpec 的理念:我们服务于各种不同的编码代理、模型与使用场景。改动应对所有人都工作良好。 |
169 | 175 |
|
170 | | -**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"). |
| 176 | +**欢迎 AI 生成代码** —— 只要经过测试与验证即可。包含 AI 生成代码的 PR 应注明使用的编码代理与模型(例如:"Generated with Claude Code using claude-opus-4-5-20251101")。 |
171 | 177 |
|
172 | | -### Development |
| 178 | +### 开发 |
173 | 179 |
|
174 | | -- Install dependencies: `pnpm install` |
175 | | -- Build: `pnpm run build` |
176 | | -- Test: `pnpm test` |
177 | | -- Develop CLI locally: `pnpm run dev` or `pnpm run dev:cli` |
178 | | -- Conventional commits (one-line): `type(scope): subject` |
| 180 | +- 安装依赖:`pnpm install` |
| 181 | +- 构建:`pnpm run build` |
| 182 | +- 测试:`pnpm test` |
| 183 | +- 本地开发 CLI:`pnpm run dev` 或 `pnpm run dev:cli` |
| 184 | +- 约定式提交(单行):`type(scope): subject` |
179 | 185 |
|
180 | | -## Other |
| 186 | +## 其他 |
181 | 187 |
|
182 | 188 | <details> |
183 | | -<summary><strong>Telemetry</strong></summary> |
| 189 | +<summary><strong>遥测(Telemetry)</strong></summary> |
184 | 190 |
|
185 | | -OpenSpec collects anonymous usage stats. |
| 191 | +OpenSpec 会收集匿名使用统计。 |
186 | 192 |
|
187 | | -We collect only command names and version to understand usage patterns. No arguments, paths, content, or PII. Automatically disabled in CI. |
| 193 | +我们只收集命令名与版本号,用于理解使用模式;不会收集参数、路径、内容或任何个人信息。CI 中会自动禁用。 |
188 | 194 |
|
189 | | -**Opt-out:** `export OPENSPEC_TELEMETRY=0` or `export DO_NOT_TRACK=1` |
| 195 | +**退出(Opt-out):** `export OPENSPEC_TELEMETRY=0` 或 `export DO_NOT_TRACK=1` |
190 | 196 |
|
191 | 197 | </details> |
192 | 198 |
|
193 | 199 | <details> |
194 | | -<summary><strong>Maintainers & Advisors</strong></summary> |
| 200 | +<summary><strong>维护者与顾问</strong></summary> |
195 | 201 |
|
196 | | -See [MAINTAINERS.md](MAINTAINERS.md) for the list of core maintainers and advisors who help guide the project. |
| 202 | +核心维护者与顾问列表见 [MAINTAINERS.md](MAINTAINERS.md)。 |
197 | 203 |
|
198 | 204 | </details> |
199 | 205 |
|
200 | 206 |
|
201 | 207 |
|
202 | | -## License |
| 208 | +## 许可证 |
203 | 209 |
|
204 | 210 | MIT |
0 commit comments