kiro-spec-engine 1.3.0 → 1.4.0

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 (36) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +223 -369
  3. package/README.zh.md +0 -330
  4. package/docs/README.md +223 -0
  5. package/docs/command-reference.md +252 -0
  6. package/docs/examples/add-export-command/design.md +194 -0
  7. package/docs/examples/add-export-command/requirements.md +110 -0
  8. package/docs/examples/add-export-command/tasks.md +88 -0
  9. package/docs/examples/add-rest-api/design.md +855 -0
  10. package/docs/examples/add-rest-api/requirements.md +323 -0
  11. package/docs/examples/add-rest-api/tasks.md +355 -0
  12. package/docs/examples/add-user-dashboard/design.md +192 -0
  13. package/docs/examples/add-user-dashboard/requirements.md +143 -0
  14. package/docs/examples/add-user-dashboard/tasks.md +91 -0
  15. package/docs/faq.md +696 -0
  16. package/docs/integration-modes.md +525 -0
  17. package/docs/integration-philosophy.md +313 -0
  18. package/docs/quick-start-with-ai-tools.md +374 -0
  19. package/docs/quick-start.md +711 -0
  20. package/docs/spec-workflow.md +453 -0
  21. package/docs/tools/claude-guide.md +653 -0
  22. package/docs/tools/cursor-guide.md +705 -0
  23. package/docs/tools/generic-guide.md +445 -0
  24. package/docs/tools/kiro-guide.md +308 -0
  25. package/docs/tools/vscode-guide.md +444 -0
  26. package/docs/tools/windsurf-guide.md +390 -0
  27. package/docs/troubleshooting.md +795 -0
  28. package/docs/zh/README.md +275 -0
  29. package/docs/zh/quick-start.md +711 -0
  30. package/docs/zh/tools/claude-guide.md +348 -0
  31. package/docs/zh/tools/cursor-guide.md +280 -0
  32. package/docs/zh/tools/generic-guide.md +498 -0
  33. package/docs/zh/tools/kiro-guide.md +342 -0
  34. package/docs/zh/tools/vscode-guide.md +448 -0
  35. package/docs/zh/tools/windsurf-guide.md +377 -0
  36. package/package.json +1 -1
package/README.zh.md CHANGED
@@ -1,330 +0,0 @@
1
- # kiro-spec-engine
2
-
3
- [![npm version](https://badge.fury.io/js/kiro-spec-engine.svg)](https://badge.fury.io/js/kiro-spec-engine)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
-
6
- **Kiro Spec Engine** - 基于 Spec 的驱动规则引擎,融入 Ultrawork 精神的质量增强工具。
7
-
8
- > 🔥 用结构化的 Spec、Steering 规则和不懈的质量追求,改变你的开发工作流。
9
-
10
- [English](README.md) | 简体中文
11
-
12
- ## 🎯 什么是 Kiro Spec Engine?
13
-
14
- Kiro Spec Engine (KSE) 是一个 **基于 Spec 的驱动规则引擎**,为你的开发过程带来结构、质量和 **Ultrawork 精神**。它不仅仅是一个工具——更是一种以清晰和卓越构建软件的方法论。
15
-
16
- ### 核心概念:Spec 驱动规则引擎
17
-
18
- KSE 的核心是一个基于 **Specs** 运作的**规则引擎**:
19
-
20
- - **Specs** 定义你要构建什么(Requirements → Design → Tasks)
21
- - **Steering 规则** 指导 AI 助手如何帮助你构建
22
- - **Ultrawork 精神** 确保每个阶段的专业级质量
23
-
24
- ### 核心特性
25
-
26
- - ✅ **Spec 驱动开发**: 结构化的 Requirements → Design → Tasks 工作流
27
- - ✅ **Steering 规则系统**: 用项目特定规则控制 AI 行为
28
- - ✅ **质量评估**: 自动文档质量评分(0-10 分制)
29
- - ✅ **智能增强**: 通过 Ultrawork 自动识别和应用改进
30
- - ✅ **专业标准**: 确保生产就绪的文档
31
- - ✅ **多语言支持**: 支持中文和英文界面
32
- - ✅ **CLI 接口**: 易用的命令行工具
33
-
34
- ## 🚀 快速开始
35
-
36
- ### 安装
37
-
38
- 通过 npm 全局安装:
39
-
40
- ```bash
41
- npm install -g kiro-spec-engine
42
- ```
43
-
44
- 或使用短别名:
45
-
46
- ```bash
47
- npm install -g kiro-spec-engine
48
- # 创建 'kiro-spec-engine' 和 'kse' 两个命令
49
- ```
50
-
51
- ### 初始化项目
52
-
53
- ```bash
54
- # 在当前目录初始化
55
- kiro-spec-engine init
56
-
57
- # 或指定项目名称
58
- kiro-spec-engine init "我的超棒项目"
59
-
60
- # 使用中文界面
61
- kiro-spec-engine --lang zh init
62
-
63
- # 使用短别名
64
- kse init
65
- ```
66
-
67
- ### 创建并增强你的第一个 Spec
68
-
69
- ```bash
70
- # 创建新 Spec
71
- kse create-spec 01-00-user-authentication
72
-
73
- # 编写基础 requirements.md 文件
74
- # 然后使用 Ultrawork 增强
75
- kse enhance requirements .kiro/specs/01-00-user-authentication/requirements.md
76
- ```
77
-
78
- ## 📋 命令
79
-
80
- ### 项目管理
81
-
82
- ```bash
83
- # 初始化项目
84
- kse init [项目名称]
85
-
86
- # 接管现有项目
87
- kse adopt # 交互式接管
88
- kse adopt --auto # 跳过确认
89
- kse adopt --dry-run # 显示将要改变的内容
90
- kse adopt --mode fresh # 强制指定模式
91
-
92
- # 升级项目版本
93
- kse upgrade # 交互式升级
94
- kse upgrade --auto # 跳过确认
95
- kse upgrade --dry-run # 显示升级计划
96
- kse upgrade --to 1.2.0 # 升级到指定版本
97
-
98
- # 回滚到之前的状态
99
- kse rollback # 交互式回滚
100
- kse rollback --auto # 跳过确认
101
- kse rollback --backup <id> # 恢复指定备份
102
-
103
- # 检查项目状态
104
- kse status
105
-
106
- # 创建新 Spec
107
- kse create-spec <spec-名称>
108
-
109
- # 系统诊断
110
- kse doctor
111
-
112
- # 设置语言
113
- kse --lang zh <命令> # 中文
114
- kse --lang en <命令> # 英文
115
- ```
116
-
117
- ### 文档增强
118
-
119
- ```bash
120
- # 增强需求文档
121
- kse enhance requirements <文件>
122
-
123
- # 增强设计文档(需要需求文件)
124
- kse enhance design <设计文件> --requirements <需求文件>
125
-
126
- # 检查任务完成情况
127
- kse enhance tasks <任务文件>
128
- ```
129
-
130
- ### 示例
131
-
132
- ```bash
133
- # 完整工作流示例
134
- kse init "电商平台"
135
- kse create-spec 01-00-user-auth
136
- # 编辑 .kiro/specs/01-00-user-auth/requirements.md
137
- kse enhance requirements .kiro/specs/01-00-user-auth/requirements.md
138
- # 编辑 .kiro/specs/01-00-user-auth/design.md
139
- kse enhance design .kiro/specs/01-00-user-auth/design.md --requirements .kiro/specs/01-00-user-auth/requirements.md
140
- ```
141
-
142
- ## 📊 质量标准
143
-
144
- ### Requirements 阶段(0-10 评分)
145
- - **基础结构**(2分):概述、用户故事、功能需求、非功能需求
146
- - **EARS 格式**(2分):WHEN...THEN 验收标准
147
- - **用户故事**(2分):"作为...我希望...以便" 格式
148
- - **验收标准**(2分):完整的验收标准定义
149
- - **非功能需求**(1分):性能、安全、可用性等
150
- - **约束条件**(1分):技术约束、资源约束等
151
-
152
- ### Design 阶段(0-10 评分)
153
- - **基础结构**(2分):系统概述、架构设计、组件设计、接口设计
154
- - **需求追溯**(2分):需求到设计的双向追溯
155
- - **架构图**(1.5分):Mermaid 图或其他设计图
156
- - **技术选型**(1.5分):技术栈选择和理由
157
- - **非功能设计**(1.5分):性能设计、安全设计、可扩展性
158
- - **接口定义**(1.5分):API 设计、数据结构定义
159
-
160
- ### Tasks 阶段
161
- - **完成率分析**:统计已完成、进行中、未开始任务
162
- - **优先级识别**:基于关键词和任务编号识别优先级
163
- - **Ultrawork 激励**:提供 Sisyphus 精神激励和建议
164
- - **下一步指导**:建议具体的执行策略
165
-
166
- ## � 项目接管和升级
167
-
168
- ### 接管现有项目
169
-
170
- KSE 可以智能接管现有项目,支持三种模式:
171
-
172
- **全新接管**(无 `.kiro/` 目录):
173
- ```bash
174
- kse adopt
175
- # 从头创建完整的 .kiro/ 结构
176
- ```
177
-
178
- **部分接管**(`.kiro/` 存在但不完整):
179
- ```bash
180
- kse adopt
181
- # 保留现有的 specs/ 和 steering/
182
- # 添加缺失的组件
183
- ```
184
-
185
- **完整接管**(来自旧版本的完整 `.kiro/`):
186
- ```bash
187
- kse adopt
188
- # 将组件升级到当前版本
189
- # 保留所有用户内容
190
- # 更改前创建备份
191
- ```
192
-
193
- ### 升级到新版本
194
-
195
- 当 KSE 发布新版本时:
196
-
197
- ```bash
198
- # 检查当前版本
199
- kse --version
200
-
201
- # 升级到最新版本
202
- kse upgrade
203
-
204
- # 升级到指定版本
205
- kse upgrade --to 1.2.0
206
-
207
- # 预览升级计划
208
- kse upgrade --dry-run
209
- ```
210
-
211
- **渐进式升级**:KSE 自动处理版本差距,通过中间版本升级(例如 1.0.0 → 1.1.0 → 1.2.0)。
212
-
213
- ### 回滚和安全性
214
-
215
- 所有破坏性操作都会自动创建备份:
216
-
217
- ```bash
218
- # 列出可用备份
219
- kse rollback
220
-
221
- # 从指定备份恢复
222
- kse rollback --backup adopt-2026-01-23-100000
223
-
224
- # 快速回滚(交互式)
225
- kse rollback
226
- ```
227
-
228
- **安全特性**:
229
- - ✅ 接管/升级前自动备份
230
- - ✅ 备份验证和完整性检查
231
- - ✅ 轻松回滚到之前的状态
232
- - ✅ 预览模式查看更改
233
-
234
- ## 🛠️ 项目结构
235
-
236
- 初始化后,你的项目将包含:
237
-
238
- ```
239
- your-project/
240
- ├── .kiro/ # Kiro 核心目录
241
- │ ├── specs/ # Spec 存储
242
- │ │ └── SPEC_WORKFLOW_GUIDE.md
243
- │ ├── steering/ # AI 行为规则("规则引擎")
244
- │ │ ├── CORE_PRINCIPLES.md # 核心原则 + Ultrawork 精神
245
- │ │ ├── ENVIRONMENT.md # 环境配置
246
- │ │ ├── CURRENT_CONTEXT.md # 当前上下文
247
- │ │ └── RULES_GUIDE.md # 规则索引
248
- │ ├── tools/ # Ultrawork 工具
249
- │ │ └── ultrawork_enhancer.py # 核心增强工具
250
- │ └── README.md # Kiro 系统文档
251
- └── README.md # 项目文档
252
- ```
253
-
254
- ## 🔥 Ultrawork 精神
255
-
256
- > 受希腊神话中西西弗斯的启发,他被判永远推石上山,每次快到山顶时石头就会滚下来。
257
-
258
- Ultrawork 精神体现:
259
-
260
- - **不懈努力**:面对挑战永不放弃
261
- - **持续改进**:始终追求更好的质量
262
- - **专业标准**:在每个细节上追求卓越(9.0/10 目标)
263
- - **坚持执行**:持续推进直到完成
264
-
265
- Ultrawork 是 Kiro Spec Engine 中的**质量增强哲学**——它驱动引擎产出专业级结果。
266
-
267
- ## 🌍 多语言支持
268
-
269
- Kiro Spec Engine 支持多种语言:
270
-
271
- ### 设置语言
272
-
273
- ```bash
274
- # 使用命令行参数
275
- kse --lang zh init
276
-
277
- # 使用环境变量
278
- export KIRO_LANG=zh
279
- kse init
280
-
281
- # Windows
282
- set KIRO_LANG=zh
283
- kse init
284
- ```
285
-
286
- ### 支持的语言
287
-
288
- - 🇺🇸 English (en) - 默认
289
- - 🇨🇳 简体中文 (zh)
290
-
291
- 工具会自动检测你的系统语言并默认使用。你可以通过 `--lang` 选项或 `KIRO_LANG` 环境变量覆盖默认设置。
292
-
293
- ## 🤝 贡献
294
-
295
- 我们欢迎贡献!请查看我们的[贡献指南](CONTRIBUTING.md)了解详情。
296
-
297
- ### 开发设置
298
-
299
- ```bash
300
- git clone https://github.com/yourusername/kiro-spec-engine.git
301
- cd kiro-spec-engine
302
- npm install
303
- npm link # 用于本地开发
304
- ```
305
-
306
- ### 添加新语言
307
-
308
- 1. 在 `locales/` 目录创建新的语言文件(如 `ja.json`)
309
- 2. 复制 `en.json` 的结构并翻译所有文本
310
- 3. 在 `lib/i18n.js` 中添加语言检测逻辑
311
- 4. 更新 README 文档
312
-
313
- ## 📄 许可证
314
-
315
- MIT License - 详见 [LICENSE](LICENSE) 文件。
316
-
317
- ## 🙏 致谢
318
-
319
- - 受 **Sisyphus** 神话和高贵奋斗概念的启发
320
- - 基于 **Kiro** Spec 驱动开发的基础
321
- - 受 **oh-my-opencode** 和 Ultrawork Manifesto 的影响
322
-
323
- ---
324
-
325
- **今天就开始你的 Spec 驱动之旅!🔥**
326
-
327
- ```bash
328
- npm install -g kiro-spec-engine
329
- kse --lang zh init
330
- ```
package/docs/README.md ADDED
@@ -0,0 +1,223 @@
1
+ # kse Documentation Index
2
+
3
+ > Complete guide to kse (Kiro Spec Engine)
4
+
5
+ ---
6
+
7
+ **Version**: 1.0.0
8
+ **Last Updated**: 2026-01-23
9
+
10
+ ---
11
+
12
+ ## 🚀 Getting Started
13
+
14
+ **New to kse?** Start here:
15
+
16
+ - **[Quick Start Guide](quick-start.md)** - Get up and running in 5 minutes
17
+ - **[FAQ](faq.md)** - Frequently asked questions
18
+ - **[Troubleshooting](troubleshooting.md)** - Common issues and solutions
19
+
20
+ ---
21
+
22
+ ## 📖 Core Concepts
23
+
24
+ Understand how kse works:
25
+
26
+ - **[Spec Workflow](spec-workflow.md)** - Understanding the Spec-driven development process
27
+ - **[Integration Modes](integration-modes.md)** - Three ways to integrate kse with AI tools
28
+ - **[Command Reference](command-reference.md)** - Complete list of all kse commands
29
+
30
+ ---
31
+
32
+ ## 🛠️ Tool-Specific Guides
33
+
34
+ Choose your AI tool and learn how to integrate:
35
+
36
+ ### Native Integration
37
+ - **[Kiro IDE Guide](tools/kiro-guide.md)** - Fully automatic integration
38
+
39
+ ### Manual Export Integration
40
+ - **[Cursor Guide](tools/cursor-guide.md)** - Using kse with Cursor IDE
41
+ - **[Claude Code Guide](tools/claude-guide.md)** - Using kse with Claude Code
42
+ - **[VS Code + Copilot Guide](tools/vscode-guide.md)** - Using kse with VS Code and GitHub Copilot
43
+
44
+ ### Watch Mode Integration
45
+ - **[Windsurf Guide](tools/windsurf-guide.md)** - Using kse with Windsurf (supports watch mode)
46
+
47
+ ### Universal Integration
48
+ - **[Generic AI Tools Guide](tools/generic-guide.md)** - Using kse with any AI tool
49
+
50
+ ---
51
+
52
+ ## 📚 Examples
53
+
54
+ Learn by example with complete Spec demonstrations:
55
+
56
+ ### API Development
57
+ - **[REST API Example](examples/add-rest-api/)** - Complete RESTful API with authentication
58
+ - Requirements, design, and tasks for a task management API
59
+ - JWT authentication, CRUD operations, error handling
60
+ - Node.js + Express + PostgreSQL
61
+
62
+ ### UI Development
63
+ - **[User Dashboard Example](examples/add-user-dashboard/)** - React dashboard with data visualization
64
+ - Component hierarchy, state management, API integration
65
+ - Responsive design, charts, loading states
66
+ - React + Recharts
67
+
68
+ ### CLI Development
69
+ - **[Export Command Example](examples/add-export-command/)** - Adding a new CLI command
70
+ - Command structure, argument parsing, file I/O
71
+ - Multiple output formats (JSON, Markdown, HTML)
72
+ - Node.js + Commander.js
73
+
74
+ ---
75
+
76
+ ## 🔧 Reference
77
+
78
+ Detailed technical documentation:
79
+
80
+ - **[Command Reference](command-reference.md)** - All kse commands with examples
81
+ - **[Troubleshooting](troubleshooting.md)** - Solutions to common problems
82
+ - **[FAQ](faq.md)** - Answers to frequently asked questions
83
+
84
+ ---
85
+
86
+ ## 📋 Additional Guides
87
+
88
+ - **[Adoption Guide](adoption-guide.md)** - Adopting kse in existing projects
89
+ - **[Upgrade Guide](upgrade-guide.md)** - Upgrading kse to newer versions
90
+ - **[Developer Guide](developer-guide.md)** - Contributing to kse development
91
+ - **[Architecture](architecture.md)** - kse system architecture
92
+
93
+ ---
94
+
95
+ ## 🌍 Language
96
+
97
+ - **English** - You are here
98
+ - **[中文 (Chinese)](zh/README.md)** - Chinese documentation
99
+
100
+ ---
101
+
102
+ ## 📊 Documentation by Audience
103
+
104
+ ### For Beginners
105
+ 1. [Quick Start Guide](quick-start.md) - Start here!
106
+ 2. [FAQ](faq.md) - Common questions
107
+ 3. [Tool-Specific Guide](tools/) - Pick your AI tool
108
+ 4. [Examples](examples/) - Learn by example
109
+
110
+ ### For Intermediate Users
111
+ 1. [Spec Workflow](spec-workflow.md) - Deep dive into Specs
112
+ 2. [Integration Modes](integration-modes.md) - Choose the right mode
113
+ 3. [Command Reference](command-reference.md) - Master all commands
114
+ 4. [Troubleshooting](troubleshooting.md) - Solve problems
115
+
116
+ ### For Advanced Users
117
+ 1. [Developer Guide](developer-guide.md) - Contribute to kse
118
+ 2. [Architecture](architecture.md) - Understand internals
119
+ 3. [Manual Workflows Guide](manual-workflows-guide.md) - Advanced workflows
120
+
121
+ ---
122
+
123
+ ## 📊 Documentation by Task
124
+
125
+ ### Setting Up
126
+ - [Quick Start Guide](quick-start.md) - First-time setup
127
+ - [Adoption Guide](adoption-guide.md) - Add to existing project
128
+ - [Tool-Specific Guides](tools/) - Configure your AI tool
129
+
130
+ ### Creating Specs
131
+ - [Spec Workflow](spec-workflow.md) - How to create Specs
132
+ - [Examples](examples/) - See complete examples
133
+ - [Quick Start Guide](quick-start.md) - Your first Spec
134
+
135
+ ### Using with AI Tools
136
+ - [Integration Modes](integration-modes.md) - Choose integration mode
137
+ - [Tool-Specific Guides](tools/) - Tool-specific instructions
138
+ - [Command Reference](command-reference.md) - Export context commands
139
+
140
+ ### Troubleshooting
141
+ - [Troubleshooting](troubleshooting.md) - Common issues
142
+ - [FAQ](faq.md) - Quick answers
143
+ - [GitHub Issues](https://github.com/kiro-spec-engine/kse/issues) - Report bugs
144
+
145
+ ---
146
+
147
+ ## 🎯 Quick Links by Feature
148
+
149
+ ### Spec Management
150
+ - [Creating Specs](spec-workflow.md#stage-1-requirements)
151
+ - [Spec Structure](spec-workflow.md#the-spec-creation-workflow)
152
+ - [Example Specs](examples/)
153
+
154
+ ### Context Export
155
+ - [Manual Export Mode](integration-modes.md#mode-2-manual-export)
156
+ - [Export Commands](command-reference.md#context--prompts)
157
+ - [Using Exported Context](tools/)
158
+
159
+ ### Watch Mode
160
+ - [Watch Mode Guide](integration-modes.md#mode-3-watch-mode)
161
+ - [Watch Commands](command-reference.md#watch-mode)
162
+ - [Windsurf Integration](tools/windsurf-guide.md)
163
+
164
+ ### Task Management
165
+ - [Task Commands](command-reference.md#task-management)
166
+ - [Task Workflow](spec-workflow.md#stage-3-tasks)
167
+ - [Team Collaboration](workspace-info.md)
168
+
169
+ ---
170
+
171
+ ## 💡 Tips for Using This Documentation
172
+
173
+ **Finding Information:**
174
+ - Use your browser's search (Ctrl+F / Cmd+F) to find specific topics
175
+ - Check the [FAQ](faq.md) first for quick answers
176
+ - Browse [Examples](examples/) to learn by doing
177
+
178
+ **Learning Path:**
179
+ 1. **Day 1:** [Quick Start Guide](quick-start.md) + [Your Tool Guide](tools/)
180
+ 2. **Week 1:** [Spec Workflow](spec-workflow.md) + [Examples](examples/)
181
+ 3. **Month 1:** [Integration Modes](integration-modes.md) + [Advanced Features](command-reference.md)
182
+
183
+ **Getting Help:**
184
+ - **Quick answers:** [FAQ](faq.md)
185
+ - **Problems:** [Troubleshooting](troubleshooting.md)
186
+ - **Community:** [GitHub Discussions](https://github.com/kiro-spec-engine/kse/discussions)
187
+ - **Bugs:** [GitHub Issues](https://github.com/kiro-spec-engine/kse/issues)
188
+
189
+ ---
190
+
191
+ ## 📝 Documentation Status
192
+
193
+ | Document | Status | Last Updated |
194
+ |----------|--------|--------------|
195
+ | Quick Start | ✅ Complete | 2026-01-23 |
196
+ | Spec Workflow | ✅ Complete | 2026-01-23 |
197
+ | Integration Modes | ✅ Complete | 2026-01-23 |
198
+ | Tool Guides (6) | ✅ Complete | 2026-01-23 |
199
+ | Examples (3) | ✅ Complete | 2026-01-23 |
200
+ | FAQ | ✅ Complete | 2026-01-23 |
201
+ | Troubleshooting | ✅ Complete | 2026-01-23 |
202
+ | Command Reference | ✅ Complete | 2026-01-23 |
203
+
204
+ ---
205
+
206
+ ## 🤝 Contributing to Documentation
207
+
208
+ Found an error? Want to improve the docs?
209
+
210
+ 1. **Report issues:** [GitHub Issues](https://github.com/kiro-spec-engine/kse/issues)
211
+ 2. **Suggest improvements:** [GitHub Discussions](https://github.com/kiro-spec-engine/kse/discussions)
212
+ 3. **Submit changes:** [Contributing Guide](../CONTRIBUTING.md)
213
+
214
+ ---
215
+
216
+ ## 📄 License
217
+
218
+ Documentation is licensed under [MIT License](../LICENSE).
219
+
220
+ ---
221
+
222
+ **Happy Spec-ing!** 🚀
223
+