kiro-spec-engine 1.4.4 โ†’ 1.5.2

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/CHANGELOG.md CHANGED
@@ -5,7 +5,68 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [1.5.2] - 2026-01-24
9
+
10
+ ### Fixed
11
+ - Context exporter test assertion to match actual error message format
12
+
13
+ ## [1.5.1] - 2026-01-24
14
+
15
+ ### Fixed
16
+ - Cross-platform path normalization test compatibility (Windows vs Linux path separators)
17
+
18
+ ## [1.5.0] - 2026-01-24
19
+
20
+ ### Added
21
+ - **Interactive conflict resolution for kse adopt** ๐ŸŽฏ - Choose how to handle conflicting files
22
+ - Three resolution strategies: skip all, overwrite all, or review each file
23
+ - Per-file review with diff viewing capability
24
+ - Selective backup system (only backs up files being overwritten)
25
+ - Full support for --force, --auto, and --dry-run modes
26
+ - Clear conflict categorization (steering, documentation, tools)
27
+ - Usage: `kse adopt` (interactive prompts when conflicts detected)
28
+
29
+ **Benefits**:
30
+ - Full control over which files to keep or overwrite
31
+ - View differences before making decisions
32
+ - Efficient backups (only affected files)
33
+ - Safe adoption with automatic rollback support
34
+
35
+ ## [1.4.6] - 2026-01-24
36
+
37
+ ### Added
38
+ - **--force option for kse adopt** ๐Ÿ”ฅ - Force overwrite conflicting files during adoption
39
+ - Automatically creates backup before overwriting
40
+ - Shows clear warning when enabled
41
+ - Useful for upgrading template files to latest version
42
+ - Usage: `kse adopt --force`
43
+
44
+ ### Fixed
45
+ - Cross-platform path normalization test compatibility
46
+ - Restored missing Chinese README content
47
+
48
+ **Benefits**:
49
+ - Easy template upgrades without manual file management
50
+ - Safe overwriting with automatic backups
51
+ - Clear feedback about what will be changed
52
+
53
+ ## [1.4.5] - 2026-01-24
54
+
55
+ ### Added
56
+ - **Spec Numbering Strategy Guide** ๐Ÿ”ข - Comprehensive guide for choosing Spec numbering strategies
57
+ - English version: `docs/spec-numbering-guide.md`
58
+ - Chinese version: `docs/zh/spec-numbering-guide.md`
59
+ - Quick reference added to `docs/spec-workflow.md`
60
+ - Covers simple, complex, and hybrid numbering approaches
61
+ - Includes decision tree and practical examples
62
+ - Helps users choose between `XX-00` (simple) vs `XX-YY` (grouped) strategies
63
+
64
+ **Benefits**:
65
+ - Clear guidance on when to use major vs minor numbers
66
+ - Practical examples from real projects (kiro-spec-engine, e-commerce, SaaS)
67
+ - Decision tree for quick strategy selection
68
+ - Best practices and common pitfalls
69
+ - Supports both simple and complex project needs
9
70
 
10
71
  ## [1.4.4] - 2026-01-24
11
72
 
package/README.md CHANGED
@@ -227,6 +227,8 @@ sequenceDiagram
227
227
 
228
228
  ### Core Guides
229
229
  - ๐Ÿ“‹ **[Spec Workflow](docs/spec-workflow.md)** - Understanding Specs in depth
230
+ - ๐Ÿ”ข **[Spec Numbering Strategy](docs/spec-numbering-guide.md)** - How to number your Specs
231
+ - ๐Ÿ“„ **[Document Governance](docs/document-governance.md)** - Automated document management
230
232
  - ๐Ÿ”Œ **[Integration Modes](docs/integration-modes.md)** - Three ways to integrate kse
231
233
  - ๐Ÿ“ **[Command Reference](docs/command-reference.md)** - All kse commands
232
234
 
@@ -259,6 +261,13 @@ sequenceDiagram
259
261
  ### Spec-Driven Development
260
262
  Structure your work with Requirements โ†’ Design โ†’ Tasks workflow
261
263
 
264
+ ### Document Governance
265
+ - Automated document lifecycle management
266
+ - Clean project structure enforcement
267
+ - Temporary file cleanup
268
+ - Artifact organization
269
+ - Git hooks for compliance
270
+
262
271
  ### Multi-User Collaboration
263
272
  - Personal workspaces for team members
264
273
  - Task claiming and tracking
@@ -295,6 +304,13 @@ kse prompt generate <spec> <task> # Generate task-specific prompt
295
304
  kse task claim <spec> <task-id> # Claim a task
296
305
  kse task list <spec> # List claimed tasks
297
306
 
307
+ # Document governance
308
+ kse docs diagnose # Check document compliance
309
+ kse docs cleanup # Remove temporary files
310
+ kse docs validate # Validate document structure
311
+ kse docs archive --spec <name> # Organize Spec artifacts
312
+ kse docs hooks install # Install Git pre-commit hooks
313
+
298
314
  # Automation
299
315
  kse watch start # Start watch mode
300
316
  kse watch status # Check watch status
package/README.zh.md CHANGED
@@ -0,0 +1,380 @@
1
+ # kse - 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
+ **AI ็ผ–็ ๅทฅๅ…ท็š„ไธŠไธ‹ๆ–‡ๆไพ›่€…** - ็ป“ๆž„ๅŒ–ไฝ ็š„้กน็›ฎ้œ€ๆฑ‚ใ€่ฎพ่ฎกๅ’ŒไปปๅŠก๏ผŒ่ฎฉ AI ๅŠฉๆ‰‹ๅธฎไฝ ๆž„ๅปบๆ›ดๅฅฝ็š„่ฝฏไปถใ€‚
7
+
8
+ [English](README.md) | ็ฎ€ไฝ“ไธญๆ–‡
9
+
10
+ ---
11
+
12
+ ## ไป€ไนˆๆ˜ฏ kse๏ผŸ
13
+
14
+ **kse (Kiro Spec Engine) ๆ˜ฏไธ€ไธช AI ่พ…ๅŠฉๅผ€ๅ‘็š„ไธŠไธ‹ๆ–‡็ฎก็†็ณป็ปŸใ€‚** ๅฎƒๅธฎๅŠฉไฝ ๅฐ†้กน็›ฎไฟกๆฏ็ป„็ป‡ๆˆ็ป“ๆž„ๅŒ–็š„ "Spec"๏ผˆ้œ€ๆฑ‚ โ†’ ่ฎพ่ฎก โ†’ ไปปๅŠก๏ผ‰๏ผŒ่ฎฉ AI ๅทฅๅ…ท่ƒฝๅคŸ็†่งฃๅ’Œๆœ‰ๆ•ˆไฝฟ็”จใ€‚
15
+
16
+ ๆŠŠ kse ๆƒณ่ฑกๆˆ **AI ๅŠฉๆ‰‹็š„ๅ›พไนฆ็ฎก็†ๅ‘˜** - ๅฎƒ็ป„็ป‡ๅ’Œๅ‘ˆ็Žฐ้กน็›ฎไธŠไธ‹ๆ–‡๏ผŒ่ฎฉไฝ ็š„ AI ๅทฅๅ…ทๅ‡†็กฎ็Ÿฅ้“ไฝ ๅœจๆž„ๅปบไป€ไนˆใ€ไธบไป€ไนˆๆž„ๅปบไปฅๅŠๅฆ‚ไฝ•ๆž„ๅปบใ€‚
17
+
18
+ ### ๅทฅไฝœๅŽŸ็†
19
+
20
+ ```mermaid
21
+ graph LR
22
+ A[ไฝ ๅˆ›ๅปบ Spec] --> B[kse ็ป„็ป‡ไธŠไธ‹ๆ–‡]
23
+ B --> C[AI ๅทฅๅ…ท่ฏปๅ–ไธŠไธ‹ๆ–‡]
24
+ C --> D[AI ็”Ÿๆˆๆ›ดๅฅฝ็š„ไปฃ็ ]
25
+ ```
26
+
27
+ 1. **ไฝ ๅˆ›ๅปบ Spec** - ๅœจ็ป“ๆž„ๅŒ–็š„ markdown ๆ–‡ไปถไธญ็ผ–ๅ†™้œ€ๆฑ‚ใ€่ฎพ่ฎกๅ’ŒไปปๅŠก
28
+ 2. **kse ็ป„็ป‡ไธŠไธ‹ๆ–‡** - ๅฏผๅ‡บไธบ AI ๅทฅๅ…ทไผ˜ๅŒ–็š„ๆ ผๅผ
29
+ 3. **AI ๅทฅๅ…ท่ฏปๅ–ไธŠไธ‹ๆ–‡** - ไฝ ็š„ AI ๅŠฉๆ‰‹็†่งฃ้กน็›ฎ็ป“ๆž„
30
+ 4. **AI ็”Ÿๆˆๆ›ดๅฅฝ็š„ไปฃ็ ** - ็ฌฆๅˆไฝ ่ฎพ่ฎกๅ’Œ้œ€ๆฑ‚็š„ไปฃ็ 
31
+
32
+ ### kse ไธๆ˜ฏไป€ไนˆ
33
+
34
+ - โŒ **ไธๆ˜ฏไปฃ็ ็”Ÿๆˆๅ™จ** - kse ไธๅ†™ไปฃ็ ๏ผ›ไฝ ็š„ AI ๅทฅๅ…ทๅ†™ไปฃ็ 
35
+ - โŒ **ไธๆ˜ฏ IDE** - kse ไธŽไฝ ็Žฐๆœ‰็š„ๅผ€ๅ‘ๅทฅๅ…ท้…ๅˆไฝฟ็”จ
36
+ - โŒ **ไธๆ˜ฏ็‰นๅฎš AI ๅทฅๅ…ท** - ้€‚็”จไบŽ Claudeใ€Cursorใ€Windsurfใ€Copilot ็ญ‰ไปปไฝ• AI ๅทฅๅ…ท
37
+ - โŒ **ไธๆ˜ฏๆ–‡ๆกฃ็š„ๆ›ฟไปฃๅ“** - ๅฎƒๆ˜ฏ็ป„็ป‡้กน็›ฎไธŠไธ‹ๆ–‡็š„็ป“ๆž„ๅŒ–ๆ–นๅผ
38
+
39
+ ### ่ฐๅบ”่ฏฅไฝฟ็”จ kse๏ผŸ
40
+
41
+ - โœ… ไฝฟ็”จ AI ็ผ–็ ๅŠฉๆ‰‹็š„ๅผ€ๅ‘่€…๏ผˆClaudeใ€Cursorใ€Copilot ็ญ‰๏ผ‰
42
+ - โœ… ้œ€่ฆ็ป“ๆž„ๅŒ–้กน็›ฎๆ–‡ๆกฃ็š„ๅ›ข้˜Ÿ
43
+ - โœ… ๆž„ๅปบ้œ€่ฆๆธ…ๆ™ฐ้œ€ๆฑ‚ๅ’Œ่ฎพ่ฎก็š„ๅŠŸ่ƒฝ็š„ไปปไฝ•ไบบ
44
+ - โœ… ๅ—็›ŠไบŽ Spec ้ฉฑๅŠจๅผ€ๅ‘็š„้กน็›ฎ
45
+
46
+ ---
47
+
48
+ ## ๅฟซ้€Ÿๅผ€ๅง‹๏ผˆ5 ๅˆ†้’Ÿ๏ผ‰
49
+
50
+ ### ๆญฅ้ชค 1๏ผšๅฎ‰่ฃ… kse๏ผˆ30 ็ง’๏ผ‰
51
+
52
+ ```bash
53
+ npm install -g kiro-spec-engine
54
+ ```
55
+
56
+ ้ชŒ่ฏๅฎ‰่ฃ…๏ผš
57
+ ```bash
58
+ kse --version
59
+ ```
60
+
61
+ ### ๆญฅ้ชค 2๏ผšๅœจ้กน็›ฎไธญ้‡‡็”จ kse๏ผˆ1 ๅˆ†้’Ÿ๏ผ‰
62
+
63
+ ๅฏผ่ˆชๅˆฐ้กน็›ฎ็›ฎๅฝ•ๅนถ่ฟ่กŒ๏ผš
64
+
65
+ ```bash
66
+ cd your-project
67
+ kse adopt
68
+ ```
69
+
70
+ ่ฟ™ไผšๅˆ›ๅปบไธ€ไธช `.kiro/` ็›ฎๅฝ•๏ผŒๅŒ…ๅซ๏ผš
71
+ - `specs/` - Spec ๅญ˜ๆ”พไฝ็ฝฎ
72
+ - `steering/` - AI ่กŒไธบ่ง„ๅˆ™๏ผˆๅฏ้€‰๏ผ‰
73
+
74
+ ### ๆญฅ้ชค 3๏ผšๅˆ›ๅปบ็ฌฌไธ€ไธช Spec๏ผˆ2 ๅˆ†้’Ÿ๏ผ‰
75
+
76
+ ```bash
77
+ kse create-spec 01-00-user-login
78
+ ```
79
+
80
+ ่ฟ™ไผšๅœจ `.kiro/specs/01-00-user-login/` ไธญๅˆ›ๅปบไธ‰ไธชๆ–‡ไปถ๏ผš
81
+
82
+ **requirements.md** - ไฝ ่ฆๆž„ๅปบไป€ไนˆ๏ผš
83
+ ```markdown
84
+ # ็”จๆˆท็™ปๅฝ•ๅŠŸ่ƒฝ
85
+
86
+ ## ็”จๆˆทๆ•…ไบ‹
87
+ - ไฝœไธบ็”จๆˆท๏ผŒๆˆ‘ๆƒณ็”จ้‚ฎ็ฎฑๅ’Œๅฏ†็ ็™ปๅฝ•
88
+ - ไฝœไธบ็”จๆˆท๏ผŒๆˆ‘ๆƒณๅœจๅ‡ญๆฎ้”™่ฏฏๆ—ถ็œ‹ๅˆฐ้”™่ฏฏๆ็คบ
89
+
90
+ ## ้ชŒๆ”ถๆ ‡ๅ‡†
91
+ - ๅฝ“็”จๆˆท่พ“ๅ…ฅๆœ‰ๆ•ˆๅ‡ญๆฎๆ—ถ๏ผŒๅˆ™็”จๆˆท็™ปๅฝ•ๆˆๅŠŸ
92
+ - ๅฝ“็”จๆˆท่พ“ๅ…ฅๆ— ๆ•ˆๅ‡ญๆฎๆ—ถ๏ผŒๅˆ™ๆ˜พ็คบ้”™่ฏฏๆถˆๆฏ
93
+ ```
94
+
95
+ **design.md** - ๅฆ‚ไฝ•ๆž„ๅปบ๏ผš
96
+ ```markdown
97
+ # ่ฎพ่ฎก
98
+
99
+ ## API ่ฎพ่ฎก
100
+ - POST /api/auth/login
101
+ - ่ฏทๆฑ‚๏ผš{ email: string, password: string }
102
+ - ๅ“ๅบ”๏ผš{ token: string } ๆˆ– { error: string }
103
+
104
+ ## ็ป„ไปถ
105
+ - AuthController - ๅค„็†็™ปๅฝ•้€ป่พ‘
106
+ - validateEmail() - ้ชŒ่ฏ้‚ฎ็ฎฑๆ ผๅผ
107
+ - validatePassword() - ๆฃ€ๆŸฅๅฏ†็ ่ฆๆฑ‚
108
+ ```
109
+
110
+ **tasks.md** - ๅˆ†ๆญฅๅฎž็Žฐ๏ผš
111
+ ```markdown
112
+ - [ ] 1.1 ๅˆ›ๅปบ AuthController ็ฑป
113
+ - [ ] 1.2 ๅฎž็Žฐ้‚ฎ็ฎฑ้ชŒ่ฏ
114
+ - [ ] 1.3 ๅฎž็Žฐๅฏ†็ ้ชŒ่ฏ
115
+ - [ ] 1.4 ๅฎž็Žฐ็™ปๅฝ•็ซฏ็‚น
116
+ - [ ] 1.5 ็ผ–ๅ†™ๅ•ๅ…ƒๆต‹่ฏ•
117
+ ```
118
+
119
+ ### ๆญฅ้ชค 4๏ผš่ฎฉ AI ๅทฅๅ…ทไฝฟ็”จ Spec๏ผˆ1 ๅˆ†้’Ÿ๏ผ‰
120
+
121
+ ็Žฐๅœจไฝ ็š„ AI ๅทฅๅ…ทๅฏไปฅ่ฎฟ้—ฎ Spec ๆฅ็”Ÿๆˆๆ›ดๅฅฝ็š„ไปฃ็ ใ€‚
122
+
123
+ **ๅฏนไบŽๆ”ฏๆŒๅ‘ฝไปคๆ‰ง่กŒ็š„ AI ๅทฅๅ…ท๏ผˆCursorใ€Windsurfใ€Claude Desktop๏ผ‰๏ผš**
124
+
125
+ ๅช้œ€ๅ‘Š่ฏ‰ไฝ ็š„ AI๏ผš
126
+ ```
127
+ "ๆˆ‘ๆœ‰ไธ€ไธช 01-00-user-login ็š„ Specใ€‚่ฏทๅฎž็ŽฐไปปๅŠก 1.1"
128
+ ```
129
+
130
+ AI ไผš๏ผš
131
+ 1. ๆ‰ง่กŒ `kse context export 01-00-user-login`
132
+ 2. ่ฏปๅ– Spec๏ผˆ้œ€ๆฑ‚ใ€่ฎพ่ฎกใ€ไปปๅŠก๏ผ‰
133
+ 3. ็”Ÿๆˆ้ตๅพชไฝ ่ฎพ่ฎก็š„ไปฃ็ 
134
+ 4. ่‡ชๅŠจๆ›ดๆ–ฐไปปๅŠก็Šถๆ€
135
+
136
+ **ๅฏนไบŽๅŸบไบŽ Web ็š„ AI ๅทฅๅ…ท๏ผˆChatGPTใ€Claude web๏ผ‰๏ผš**
137
+
138
+ ```bash
139
+ # ๅฏผๅ‡บไธŠไธ‹ๆ–‡ไธ€ๆฌก
140
+ kse context export 01-00-user-login
141
+
142
+ # ๅคๅˆถๅˆฐๅ‰ช่ดดๆฟ
143
+ cat .kiro/specs/01-00-user-login/context-export.md | pbcopy # macOS
144
+ type .kiro\specs\01-00-user-login\context-export.md | clip # Windows
145
+
146
+ # ็ฒ˜่ดดๅˆฐ AI ๅทฅๅ…ทๅนถ่ฏด๏ผš
147
+ "่ฟ™ๆ˜ฏๆˆ‘็š„ Specใ€‚่ฏทๅฎž็ŽฐไปปๅŠก 1.1"
148
+ ```
149
+
150
+ **ๅ…ณ้”ฎๆดžๅฏŸ๏ผš** ไฝ ็•™ๅœจ AI ๅทฅๅ…ทไธญใ€‚AI ่ฏปๅ– Spec ๅนถ็”Ÿๆˆ็ฌฆๅˆไฝ ่ฎพ่ฎก็š„ไปฃ็ ใ€‚
151
+
152
+ ### ๆญฅ้ชค 5๏ผšไธ‹ไธ€ๆญฅ๏ผˆ30 ็ง’๏ผ‰
153
+
154
+ - ๐Ÿ“– ้˜…่ฏป[ๅฟซ้€Ÿๅผ€ๅง‹ๆŒ‡ๅ—](docs/zh/quick-start.md)่Žทๅ–่ฏฆ็ป†็คบไพ‹
155
+ - ๐Ÿ”ง ๆŸฅ็œ‹ไฝ ็š„ๅทฅๅ…ท้›†ๆˆๆŒ‡ๅ—๏ผš[Cursor](docs/zh/tools/cursor-guide.md) | [Claude](docs/zh/tools/claude-guide.md) | [Windsurf](docs/zh/tools/windsurf-guide.md)
156
+ - ๐Ÿ’ก ไบ†่งฃ[้›†ๆˆๆจกๅผ](docs/integration-modes.md)
157
+
158
+ ---
159
+
160
+ ## ๆ ธๅฟƒๆฆ‚ๅฟต
161
+
162
+ ### Spec
163
+
164
+ **Spec** ๆ˜ฏๅŠŸ่ƒฝๆˆ–้กน็›ฎ็ป„ไปถ็š„็ป“ๆž„ๅŒ–ๆ่ฟฐใ€‚ๆฏไธช Spec ๅŒ…ๅซ๏ผš
165
+
166
+ - **้œ€ๆฑ‚** (`requirements.md`) - ไฝ ่ฆๆž„ๅปบไป€ไนˆไปฅๅŠไธบไป€ไนˆ
167
+ - **่ฎพ่ฎก** (`design.md`) - ๅฆ‚ไฝ•ๆž„ๅปบ๏ผˆๆžถๆž„ใ€APIใ€็ป„ไปถ๏ผ‰
168
+ - **ไปปๅŠก** (`tasks.md`) - ๅˆ†ๆญฅๅฎž็Žฐๆธ…ๅ•
169
+
170
+ ### ไธŠไธ‹ๆ–‡ๅฏผๅ‡บ
171
+
172
+ **ไธŠไธ‹ๆ–‡ๅฏผๅ‡บ**ๅฐ†ไฝ ็š„ Spec ่ฝฌๆขไธบ AI ๅทฅๅ…ทไผ˜ๅŒ–็š„ๆ ผๅผใ€‚ๅฎƒๅŒ…ๆ‹ฌ๏ผš
173
+ - ๆ‰€ๆœ‰้œ€ๆฑ‚ใ€่ฎพ่ฎกๅ†ณ็ญ–ๅ’ŒไปปๅŠก
174
+ - ้กน็›ฎ็ป“ๆž„ๅ’Œ็บฆๅฎš
175
+ - Steering ่ง„ๅˆ™๏ผˆๅฏ้€‰๏ผ‰็”จไบŽ AI ่กŒไธบ
176
+
177
+ ### ้›†ๆˆๆจกๅผ
178
+
179
+ kse ๆ”ฏๆŒไธ‰็งไธŽ AI ๅทฅๅ…ทๅไฝœ็š„ๆ–นๅผ๏ผš
180
+
181
+ 1. **ๅŽŸ็”Ÿ้›†ๆˆ** - AI ๅทฅๅ…ท็›ดๆŽฅ่ฎฟ้—ฎ kse๏ผˆKiro IDE๏ผ‰
182
+ 2. **ๆ‰‹ๅŠจๅฏผๅ‡บ** - ไฝ ๅฏผๅ‡บๅนถ็ฒ˜่ดดไธŠไธ‹ๆ–‡๏ผˆClaudeใ€ChatGPTใ€Cursor๏ผ‰
183
+ 3. **Watch ๆจกๅผ** - ๆ–‡ไปถๆ›ดๆ”นๆ—ถ่‡ชๅŠจๆ›ดๆ–ฐไธŠไธ‹ๆ–‡๏ผˆๆ‰€ๆœ‰ๅทฅๅ…ท๏ผ‰
184
+
185
+ ไบ†่งฃๆ›ดๅคš๏ผš[้›†ๆˆๆจกๅผๆŒ‡ๅ—](docs/integration-modes.md)
186
+
187
+ ---
188
+
189
+ ## ไธŽ AI ๅทฅๅ…ท้›†ๆˆ
190
+
191
+ kse ้€‚็”จไบŽไปปไฝ• AI ็ผ–็ ๅŠฉๆ‰‹ใ€‚้€‰ๆ‹ฉไฝ ็š„ๅทฅๅ…ท่Žทๅ–ๅ…ทไฝ“ๆŒ‡ๅฏผ๏ผš
192
+
193
+ ### ๆต่กŒ็š„ AI ๅทฅๅ…ท
194
+
195
+ - **[Cursor](docs/zh/tools/cursor-guide.md)** - ๅธฆ AI ็ป“ๅฏน็ผ–็จ‹็š„ IDE
196
+ - **[Claude Code](docs/zh/tools/claude-guide.md)** - Anthropic ็š„็ผ–็ ๅŠฉๆ‰‹
197
+ - **[Windsurf](docs/zh/tools/windsurf-guide.md)** - ๆ”ฏๆŒๅ‘ฝไปคๆ‰ง่กŒ็š„ AI ไปฃ็†
198
+ - **[Kiro](docs/zh/tools/kiro-guide.md)** - ๅŽŸ็”Ÿ้›†ๆˆ๏ผŒๆ— ้œ€ๆ‰‹ๅŠจๅฏผๅ‡บ
199
+ - **[VS Code + Copilot](docs/zh/tools/vscode-guide.md)** - GitHub Copilot ้›†ๆˆ
200
+ - **[้€š็”จ AI ๅทฅๅ…ท](docs/zh/tools/generic-guide.md)** - ้€‚็”จไบŽไปปไฝ• AI ๅŠฉๆ‰‹
201
+
202
+ ### ้›†ๆˆๅทฅไฝœๆต
203
+
204
+ ```mermaid
205
+ sequenceDiagram
206
+ participant ไฝ 
207
+ participant AIๅทฅๅ…ท
208
+ participant kse
209
+ ไฝ ->>AIๅทฅๅ…ท: "ๆˆ‘ๆœ‰ไธ€ไธช user-login ็š„ Spec๏ผŒๅฎž็ŽฐไปปๅŠก 1.1"
210
+ AIๅทฅๅ…ท->>kse: kse context export user-login
211
+ kse->>AIๅทฅๅ…ท: Spec ๅ†…ๅฎน๏ผˆ้œ€ๆฑ‚ใ€่ฎพ่ฎกใ€ไปปๅŠก๏ผ‰
212
+ AIๅทฅๅ…ท->>AIๅทฅๅ…ท: ๆ นๆฎ Spec ็”Ÿๆˆไปฃ็ 
213
+ AIๅทฅๅ…ท->>ไฝ : ่ฟ™ๆ˜ฏๅฎž็Žฐ
214
+ AIๅทฅๅ…ท->>kse: ๆ›ดๆ–ฐ tasks.md๏ผˆๆ ‡่ฎฐไปปๅŠกๅฎŒๆˆ๏ผ‰
215
+ ```
216
+
217
+ **ๅ…ณ้”ฎๆดžๅฏŸ๏ผš** ไฝ ็•™ๅœจ AI ๅทฅๅ…ทไธญใ€‚AI ่ฏปๅ– Spec ๅนถ็”Ÿๆˆ็ฌฆๅˆไฝ ่ฎพ่ฎก็š„ไปฃ็ ใ€‚
218
+
219
+ ---
220
+
221
+ ## ๆ–‡ๆกฃ
222
+
223
+ ### ๅ…ฅ้—จๆŒ‡ๅ—
224
+ - ๐Ÿ“– **[ๅฟซ้€Ÿๅผ€ๅง‹ๆŒ‡ๅ—](docs/zh/quick-start.md)** - ่ฏฆ็ป†็š„ 5 ๅˆ†้’Ÿๆ•™็จ‹
225
+ - ๐Ÿค” **[ๅธธ่ง้—ฎ้ข˜](docs/faq.md)** - ๅธธ่ง้—ฎ้ข˜่งฃ็ญ”
226
+ - ๐Ÿ”ง **[ๆ•…้šœๆŽ’้™ค](docs/troubleshooting.md)** - ๅธธ่ง้—ฎ้ข˜ๅ’Œ่งฃๅ†ณๆ–นๆกˆ
227
+
228
+ ### ๆ ธๅฟƒๆŒ‡ๅ—
229
+ - ๐Ÿ“‹ **[Spec ๅทฅไฝœๆต](docs/spec-workflow.md)** - ๆทฑๅ…ฅ็†่งฃ Spec
230
+ - ๐Ÿ”ข **[Spec ็ผ–ๅท็ญ–็•ฅ](docs/zh/spec-numbering-guide.md)** - ๅฆ‚ไฝ•ไธบ Spec ็ผ–ๅท
231
+ - ๐Ÿ“„ **[ๆ–‡ๆกฃๆฒป็†](docs/document-governance.md)** - ่‡ชๅŠจๅŒ–ๆ–‡ๆกฃ็ฎก็†
232
+ - ๐Ÿ”Œ **[้›†ๆˆๆจกๅผ](docs/integration-modes.md)** - ไธ‰็ง้›†ๆˆ kse ็š„ๆ–นๅผ
233
+ - ๐Ÿ“ **[ๅ‘ฝไปคๅ‚่€ƒ](docs/command-reference.md)** - ๆ‰€ๆœ‰ kse ๅ‘ฝไปค
234
+
235
+ ### ๅทฅๅ…ท็‰นๅฎšๆŒ‡ๅ—
236
+ - [Cursor ้›†ๆˆ](docs/zh/tools/cursor-guide.md)
237
+ - [Claude Code ้›†ๆˆ](docs/zh/tools/claude-guide.md)
238
+ - [Windsurf ้›†ๆˆ](docs/zh/tools/windsurf-guide.md)
239
+ - [Kiro ้›†ๆˆ](docs/zh/tools/kiro-guide.md)
240
+ - [VS Code + Copilot ้›†ๆˆ](docs/zh/tools/vscode-guide.md)
241
+ - [้€š็”จ AI ๅทฅๅ…ท](docs/zh/tools/generic-guide.md)
242
+
243
+ ### ็คบไพ‹
244
+ - [API ๅŠŸ่ƒฝ็คบไพ‹](docs/examples/add-rest-api/) - RESTful API Spec
245
+ - [UI ๅŠŸ่ƒฝ็คบไพ‹](docs/examples/add-user-dashboard/) - React ไปช่กจๆฟ Spec
246
+ - [CLI ๅŠŸ่ƒฝ็คบไพ‹](docs/examples/add-export-command/) - CLI ๅ‘ฝไปค Spec
247
+
248
+ ### ้ซ˜็บงไธป้ข˜
249
+ - [้‡‡็”จๆŒ‡ๅ—](docs/adoption-guide.md) - ๅœจ็Žฐๆœ‰้กน็›ฎไธญ้‡‡็”จ kse
250
+ - [ๅ‡็บงๆŒ‡ๅ—](docs/upgrade-guide.md) - ็‰ˆๆœฌๅ‡็บง่ฏดๆ˜Ž
251
+ - [ๆ‰‹ๅŠจๅทฅไฝœๆต](docs/manual-workflows-guide.md) - ๅˆ†ๆญฅๅทฅไฝœๆต
252
+ - [ๅผ€ๅ‘่€…ๆŒ‡ๅ—](docs/developer-guide.md) - ่ดก็Œฎๅ’Œๆ‰ฉๅฑ• kse
253
+
254
+ ### ๅฎŒๆ•ดๆ–‡ๆกฃ
255
+ - ๐Ÿ“š **[ๆ–‡ๆกฃ็ดขๅผ•](docs/zh/README.md)** - ๆ‰€ๆœ‰ๆ–‡ๆกฃ้›†ไธญๅœจไธ€ๅค„
256
+
257
+ ---
258
+
259
+ ## ไธป่ฆๅŠŸ่ƒฝ
260
+
261
+ ### Spec ้ฉฑๅŠจๅผ€ๅ‘
262
+ ไฝฟ็”จ้œ€ๆฑ‚ โ†’ ่ฎพ่ฎก โ†’ ไปปๅŠกๅทฅไฝœๆต็ป“ๆž„ๅŒ–ไฝ ็š„ๅทฅไฝœ
263
+
264
+ ### ๆ–‡ๆกฃๆฒป็†
265
+ - ่‡ชๅŠจๅŒ–ๆ–‡ๆกฃ็”Ÿๅ‘ฝๅ‘จๆœŸ็ฎก็†
266
+ - ๅผบๅˆถๆ‰ง่กŒๆธ…ๆด้กน็›ฎ็ป“ๆž„
267
+ - ไธดๆ—ถๆ–‡ไปถๆธ…็†
268
+ - ไบง็‰ฉ็ป„็ป‡
269
+ - Git hooks ๅˆ่ง„ๆ€งๆฃ€ๆŸฅ
270
+
271
+ ### ๅคš็”จๆˆทๅไฝœ
272
+ - ๅ›ข้˜Ÿๆˆๅ‘˜็š„ไธชไบบๅทฅไฝœ็ฉบ้—ด
273
+ - ไปปๅŠก่ฎค้ข†ๅ’Œ่ทŸ่ธช
274
+ - ๅทฅไฝœ็ฉบ้—ดๅŒๆญฅ
275
+
276
+ ### ่ทจๅทฅๅ…ทๅ…ผๅฎนๆ€ง
277
+ ไธบ Claude Codeใ€Cursorใ€Windsurfใ€Copilot ็ญ‰ๅฏผๅ‡บไธŠไธ‹ๆ–‡
278
+
279
+ ### Watch ๆจกๅผ่‡ชๅŠจๅŒ–
280
+ ่‡ชๅŠจๆ–‡ไปถ็›‘ๆŽงๅ’ŒไธŠไธ‹ๆ–‡ๆ›ดๆ–ฐ
281
+
282
+ ### ่ดจ้‡ๅขžๅผบ
283
+ - ๆ–‡ๆกฃ่ดจ้‡่ฏ„ๅˆ†๏ผˆ0-10 ๅˆ†๏ผ‰
284
+ - ๆ™บ่ƒฝๆ”น่ฟ›ๅปบ่ฎฎ
285
+ - ไธ“ไธšๆ ‡ๅ‡†ๆ‰ง่กŒ
286
+
287
+ ### ๅคš่ฏญ่จ€ๆ”ฏๆŒ
288
+ ่‹ฑๆ–‡ๅ’Œไธญๆ–‡็•Œ้ข
289
+
290
+ ---
291
+
292
+ ## ๅ‘ฝไปคๆฆ‚่งˆ
293
+
294
+ ```bash
295
+ # ้กน็›ฎ่ฎพ็ฝฎ
296
+ kse adopt # ๅœจ็Žฐๆœ‰้กน็›ฎไธญ้‡‡็”จ kse
297
+ kse create-spec <name> # ๅˆ›ๅปบๆ–ฐ Spec
298
+
299
+ # ไธŠไธ‹ๆ–‡็ฎก็†
300
+ kse context export <spec-name> # ไธบ AI ๅทฅๅ…ทๅฏผๅ‡บไธŠไธ‹ๆ–‡
301
+ kse prompt generate <spec> <task> # ็”ŸๆˆไปปๅŠก็‰นๅฎšๆ็คบ
302
+
303
+ # ไปปๅŠก็ฎก็†
304
+ kse task claim <spec> <task-id> # ่ฎค้ข†ไปปๅŠก
305
+ kse task list <spec> # ๅˆ—ๅ‡บๅทฒ่ฎค้ข†ไปปๅŠก
306
+
307
+ # ๆ–‡ๆกฃๆฒป็†
308
+ kse docs diagnose # ๆฃ€ๆŸฅๆ–‡ๆกฃๅˆ่ง„ๆ€ง
309
+ kse docs cleanup # ๅˆ ้™คไธดๆ—ถๆ–‡ไปถ
310
+ kse docs validate # ้ชŒ่ฏๆ–‡ๆกฃ็ป“ๆž„
311
+ kse docs archive --spec <name> # ็ป„็ป‡ Spec ไบง็‰ฉ
312
+ kse docs hooks install # ๅฎ‰่ฃ… Git pre-commit hooks
313
+
314
+ # ่‡ชๅŠจๅŒ–
315
+ kse watch start # ๅฏๅŠจ watch ๆจกๅผ
316
+ kse watch status # ๆฃ€ๆŸฅ watch ็Šถๆ€
317
+
318
+ # ้กน็›ฎไฟกๆฏ
319
+ kse status # ้กน็›ฎ็Šถๆ€
320
+ kse workflows # ๅˆ—ๅ‡บๅฏ็”จๅทฅไฝœๆต
321
+ ```
322
+
323
+ ๆŸฅ็œ‹[ๅ‘ฝไปคๅ‚่€ƒ](docs/command-reference.md)่Žทๅ–ๅฎŒๆ•ดๆ–‡ๆกฃใ€‚
324
+
325
+ ---
326
+
327
+ ## ่ดก็ŒฎไธŽๆ”ฏๆŒ
328
+
329
+ ### ่Žทๅ–ๅธฎๅŠฉ
330
+
331
+ - ๐Ÿ“– **ๆ–‡ๆกฃ**๏ผšไปŽ[ๅฟซ้€Ÿๅผ€ๅง‹ๆŒ‡ๅ—](docs/zh/quick-start.md)ๅผ€ๅง‹
332
+ - ๐Ÿ› **Bug ๆŠฅๅ‘Š**๏ผš[GitHub Issues](https://github.com/heguangyong/kiro-spec-engine/issues)
333
+ - ๐Ÿ’ฌ **่ฎจ่ฎบ**๏ผš[GitHub Discussions](https://github.com/heguangyong/kiro-spec-engine/discussions)
334
+
335
+ ### ่ดก็Œฎ
336
+
337
+ ๆˆ‘ไปฌๆฌข่ฟŽ่ดก็Œฎ๏ผๆŸฅ็œ‹ๆˆ‘ไปฌ็š„[่ดก็ŒฎๆŒ‡ๅ—](CONTRIBUTING.md)ไบ†่งฃ๏ผš
338
+ - ไปฃ็ ่ดก็Œฎ
339
+ - ๆ–‡ๆกฃๆ”น่ฟ›
340
+ - Bug ๆŠฅๅ‘Šๅ’ŒๅŠŸ่ƒฝ่ฏทๆฑ‚
341
+ - ็ฟป่ฏ‘ๅธฎๅŠฉ
342
+
343
+ ### ๅผ€ๅ‘่ฎพ็ฝฎ
344
+
345
+ ```bash
346
+ git clone https://github.com/heguangyong/kiro-spec-engine.git
347
+ cd kiro-spec-engine
348
+ npm install
349
+ npm link # ็”จไบŽๆœฌๅœฐๅผ€ๅ‘
350
+ npm test # ่ฟ่กŒๆต‹่ฏ•
351
+ ```
352
+
353
+ ---
354
+
355
+ ## ่ฎธๅฏ่ฏ
356
+
357
+ MIT ่ฎธๅฏ่ฏ - ่ฏฆ่ง [LICENSE](LICENSE) ๆ–‡ไปถใ€‚
358
+
359
+ ---
360
+
361
+ ## ่‡ด่ฐข
362
+
363
+ - ๅ— **่ฅฟ่ฅฟๅผ—ๆ–ฏ** ็ฅž่ฏๅ’Œ้ซ˜่ดตๅฅ‹ๆ–—ๆฆ‚ๅฟต็š„ๅฏๅ‘
364
+ - ๅปบ็ซ‹ๅœจ **Kiro** Spec ้ฉฑๅŠจๅผ€ๅ‘็š„ๅŸบ็ก€ไธŠ
365
+ - ๅ— **oh-my-opencode** ๅ’Œ Ultrawork ๅฎฃ่จ€็š„ๅฝฑๅ“
366
+
367
+ ---
368
+
369
+ **ๅ‡†ๅค‡ๅฅฝๅขžๅผบไฝ ็š„ AI ่พ…ๅŠฉๅผ€ๅ‘ไบ†ๅ—๏ผŸ** ๐Ÿš€
370
+
371
+ ```bash
372
+ npm install -g kiro-spec-engine
373
+ kse adopt
374
+ kse create-spec 01-00-my-first-feature
375
+ ```
376
+
377
+ ---
378
+
379
+ **็‰ˆๆœฌ**๏ผš1.4.5
380
+ **ๆœ€ๅŽๆ›ดๆ–ฐ**๏ผš2026-01-24
@@ -173,8 +173,9 @@ program
173
173
  program
174
174
  .command('doctor')
175
175
  .description(t('cli.commands.doctor.description'))
176
- .action(() => {
177
- doctorCommand();
176
+ .option('--docs', 'Show detailed document governance diagnostics')
177
+ .action((options) => {
178
+ doctorCommand(options);
178
179
  });
179
180
 
180
181
  // ้กน็›ฎๆŽฅ็ฎกๅ‘ฝไปค
@@ -184,6 +185,7 @@ program
184
185
  .option('--auto', 'Skip confirmations (use with caution)')
185
186
  .option('--dry-run', 'Show what would change without making changes')
186
187
  .option('--mode <mode>', 'Force specific adoption mode (fresh/partial/full)')
188
+ .option('--force', 'Force overwrite conflicting files (creates backup first)')
187
189
  .action((options) => {
188
190
  adoptCommand(options);
189
191
  });
@@ -210,51 +212,15 @@ program
210
212
  });
211
213
 
212
214
  // ็Šถๆ€ๆฃ€ๆŸฅๅ‘ฝไปค
215
+ const statusCommand = require('../lib/commands/status');
216
+
213
217
  program
214
218
  .command('status')
215
219
  .description('Check project status and available specs')
216
- .action(async () => {
217
- const kiroDir = path.join(process.cwd(), '.kiro');
218
-
219
- if (!fs.existsSync(kiroDir)) {
220
- console.log(chalk.yellow('โš ๏ธ No Kiro Spec Engine project found in current directory'));
221
- console.log('Run: ' + chalk.cyan('kiro-spec-engine init') + ' to initialize');
222
- return;
223
- }
224
-
225
- console.log(chalk.red('๐Ÿ”ฅ') + ' Kiro Spec Engine Project Status');
226
- console.log();
227
-
228
- // ๆฃ€ๆŸฅๅทฅๅ…ท็Šถๆ€
229
- const toolPath = path.join(kiroDir, 'tools/ultrawork_enhancer.py');
230
- const toolStatus = fs.existsSync(toolPath) ? chalk.green('โœ… Available') : chalk.red('โŒ Missing');
231
- console.log('Ultrawork Tool:', toolStatus);
232
-
233
- // ๅˆ—ๅ‡บ Specs
234
- const specsDir = path.join(kiroDir, 'specs');
235
- if (fs.existsSync(specsDir)) {
236
- const specs = fs.readdirSync(specsDir).filter(item =>
237
- fs.statSync(path.join(specsDir, item)).isDirectory()
238
- );
239
-
240
- console.log();
241
- console.log(chalk.blue('๐Ÿ“‹ Available Specs:'));
242
- if (specs.length === 0) {
243
- console.log(' No specs found');
244
- } else {
245
- specs.forEach(spec => {
246
- const specPath = path.join(specsDir, spec);
247
- const hasReq = fs.existsSync(path.join(specPath, 'requirements.md'));
248
- const hasDesign = fs.existsSync(path.join(specPath, 'design.md'));
249
- const hasTasks = fs.existsSync(path.join(specPath, 'tasks.md'));
250
-
251
- console.log(` ${spec}:`);
252
- console.log(` Requirements: ${hasReq ? chalk.green('โœ…') : chalk.gray('โšช')}`);
253
- console.log(` Design: ${hasDesign ? chalk.green('โœ…') : chalk.gray('โšช')}`);
254
- console.log(` Tasks: ${hasTasks ? chalk.green('โœ…') : chalk.gray('โšช')}`);
255
- });
256
- }
257
- }
220
+ .option('--verbose', 'Show detailed information')
221
+ .option('--team', 'Show team activity')
222
+ .action(async (options) => {
223
+ await statusCommand(options);
258
224
  });
259
225
 
260
226
  // ็‰ˆๆœฌไฟกๆฏๅ‘ฝไปค
@@ -326,6 +292,98 @@ const workflowsCmd = program
326
292
  await workflowsCommand(action, workflowId);
327
293
  });
328
294
 
295
+ // Document governance commands
296
+ const docsCommand = require('../lib/commands/docs');
297
+
298
+ const docsCmd = program
299
+ .command('docs')
300
+ .description('Document governance and lifecycle management');
301
+
302
+ docsCmd
303
+ .command('diagnose')
304
+ .alias('diagnostic')
305
+ .description('Scan project for document violations')
306
+ .action(async () => {
307
+ const exitCode = await docsCommand('diagnose');
308
+ process.exit(exitCode);
309
+ });
310
+
311
+ docsCmd
312
+ .command('cleanup')
313
+ .description('Remove temporary documents')
314
+ .option('--dry-run, --dry', 'Preview changes without applying them')
315
+ .option('-i, --interactive', 'Prompt for confirmation before each deletion')
316
+ .option('--spec <name>', 'Target specific Spec directory')
317
+ .action(async (options) => {
318
+ const exitCode = await docsCommand('cleanup', options);
319
+ process.exit(exitCode);
320
+ });
321
+
322
+ docsCmd
323
+ .command('validate')
324
+ .description('Validate document structure')
325
+ .option('--spec <name>', 'Validate specific Spec directory')
326
+ .option('--all', 'Validate all Spec directories')
327
+ .action(async (options) => {
328
+ const exitCode = await docsCommand('validate', options);
329
+ process.exit(exitCode);
330
+ });
331
+
332
+ docsCmd
333
+ .command('archive')
334
+ .description('Organize Spec artifacts into subdirectories')
335
+ .option('--spec <name>', 'Target Spec directory (required)')
336
+ .option('--dry-run, --dry', 'Preview changes without applying them')
337
+ .action(async (options) => {
338
+ const exitCode = await docsCommand('archive', options);
339
+ process.exit(exitCode);
340
+ });
341
+
342
+ docsCmd
343
+ .command('hooks <action>')
344
+ .description('Manage Git hooks (install, uninstall, status)')
345
+ .action(async (action) => {
346
+ const exitCode = await docsCommand('hooks', { _: [action] });
347
+ process.exit(exitCode);
348
+ });
349
+
350
+ docsCmd
351
+ .command('config [key] [value]')
352
+ .description('Display or modify configuration')
353
+ .option('--set', 'Set configuration value (use with key and value arguments)')
354
+ .option('--reset', 'Reset configuration to defaults')
355
+ .action(async (key, value, options) => {
356
+ // Build options object for the docs command
357
+ const cmdOptions = {
358
+ set: options.set,
359
+ reset: options.reset,
360
+ _: ['config']
361
+ };
362
+
363
+ // Add key and value if provided
364
+ if (key) cmdOptions._.push(key);
365
+ if (value) cmdOptions._.push(value);
366
+
367
+ const exitCode = await docsCommand('config', cmdOptions);
368
+ process.exit(exitCode);
369
+ });
370
+
371
+ docsCmd
372
+ .command('stats')
373
+ .description('Display compliance statistics')
374
+ .action(async () => {
375
+ const exitCode = await docsCommand('stats');
376
+ process.exit(exitCode);
377
+ });
378
+
379
+ docsCmd
380
+ .command('report')
381
+ .description('Generate compliance report')
382
+ .action(async () => {
383
+ const exitCode = await docsCommand('report');
384
+ process.exit(exitCode);
385
+ });
386
+
329
387
  // ๆ›ดๆ–ฐ้กน็›ฎ้…็ฝฎ็š„่พ…ๅŠฉๅ‡ฝๆ•ฐ
330
388
  async function updateProjectConfig(projectName) {
331
389
  const envPath = path.join(process.cwd(), '.kiro/steering/ENVIRONMENT.md');