@localsummer/incspec 0.1.2 → 0.1.3
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/package.json +1 -1
- package/templates/AGENTS.md +10 -4
- package/templates/inc-spec-skill/SKILL.md +21 -14
package/package.json
CHANGED
package/templates/AGENTS.md
CHANGED
|
@@ -10,8 +10,14 @@ AI 编码助手使用 IncSpec 进行增量规格驱动开发的操作指南。
|
|
|
10
10
|
|
|
11
11
|
**快速模式 (5步)**:
|
|
12
12
|
- 启动: `incspec analyze <path> --quick`
|
|
13
|
-
- 按顺序执行:
|
|
14
|
-
-
|
|
13
|
+
- 按顺序执行:
|
|
14
|
+
- 步骤1: analyze (代码分析)
|
|
15
|
+
- 步骤2: collect-req (需求收集)
|
|
16
|
+
- [跳过步骤3: UI依赖采集]
|
|
17
|
+
- [跳过步骤4: 增量设计]
|
|
18
|
+
- 步骤5: apply (应用代码)
|
|
19
|
+
- 步骤6: merge (合并基线)
|
|
20
|
+
- 步骤7: archive (归档)
|
|
15
21
|
- 适用于: Bug 修复、简单功能、不涉及复杂 UI 依赖的变更
|
|
16
22
|
|
|
17
23
|
**核心约定**:
|
|
@@ -25,7 +31,7 @@ AI 编码助手使用 IncSpec 进行增量规格驱动开发的操作指南。
|
|
|
25
31
|
|
|
26
32
|
```
|
|
27
33
|
完整模式: [1分析] → [2需求] → [3UI依赖] → [4设计] → [5应用] → [6合并] → [7归档] → 循环
|
|
28
|
-
快速模式: [1分析] → [2需求]
|
|
34
|
+
快速模式: [1分析] → [2需求] ─(跳过3,4)─→ [5应用] → [6合并] → [7归档] → 循环
|
|
29
35
|
```
|
|
30
36
|
|
|
31
37
|
### 步骤 1: 分析代码工作流
|
|
@@ -105,7 +111,7 @@ AI 编码助手使用 IncSpec 进行增量规格驱动开发的操作指南。
|
|
|
105
111
|
|
|
106
112
|
**目的**: 将已完成的工作流产出归档到 `incspec/archives/YYYY-MM/{module}/`
|
|
107
113
|
|
|
108
|
-
**验证**: 归档前执行 `incspec validate`
|
|
114
|
+
**验证**: 归档前执行 `incspec validate` 确保项目健康。归档操作本身会验证文件移动正确性。
|
|
109
115
|
|
|
110
116
|
## 目录结构
|
|
111
117
|
|
|
@@ -31,20 +31,27 @@ description: 设计优先的前端功能增量编码工作流。适用于实现
|
|
|
31
31
|
```
|
|
32
32
|
1. 分析现有代码 → incspec analyze <path> --quick
|
|
33
33
|
2. 收集需求 → incspec collect-req
|
|
34
|
-
3
|
|
35
|
-
4
|
|
36
|
-
5.
|
|
34
|
+
[跳过 3: 依赖收集 - 简单变更无需此步]
|
|
35
|
+
[跳过 4: 增量设计 - 直接基于需求实现]
|
|
36
|
+
5. 应用代码变更 → incspec apply (基于需求文档)
|
|
37
|
+
6. 合并到基线 → incspec merge (重新分析生成)
|
|
38
|
+
7. 归档工作流 → incspec archive --yes
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
首次使用前初始化: `incspec init`
|
|
40
42
|
|
|
41
43
|
## 执行规则
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
当用户请求满足以下条件时,**立即启动工作流**,无需额外搜索或确认启动意图:
|
|
44
46
|
- 明确指定了模式(完整/快速)
|
|
45
47
|
- 提供了目标路径或基线文件
|
|
46
48
|
- 意图清晰无歧义
|
|
47
49
|
|
|
50
|
+
**重要说明**:
|
|
51
|
+
- "立即启动工作流"指无需确认是否开始执行,但**不跳过**工作流中定义的人工确认点
|
|
52
|
+
- 步骤2(需求收集)和步骤4(增量设计)仍然**必须**等待用户确认后才能继续
|
|
53
|
+
- 步骤7(归档)建议向用户确认归档范围
|
|
54
|
+
|
|
48
55
|
**默认行为**:
|
|
49
56
|
- 未指定模式时,默认使用完整模式
|
|
50
57
|
- 提供 `--baseline=<file>` 时,跳过步骤1的代码分析,直接使用已有基线
|
|
@@ -87,15 +94,15 @@ description: 设计优先的前端功能增量编码工作流。适用于实现
|
|
|
87
94
|
|
|
88
95
|
每个步骤与 `incspec` CLI同步以跟踪工作流状态:
|
|
89
96
|
|
|
90
|
-
| 步骤 | 开始 | 完成 |
|
|
91
|
-
|
|
92
|
-
| 分析 | `incspec analyze <path> --module=<m>` 或 `--baseline=<file>` | `--complete --output=<file>` |
|
|
93
|
-
| 需求 | `incspec collect-req` | `--complete` |
|
|
94
|
-
| 依赖 | `incspec collect-dep` | `--complete` |
|
|
95
|
-
| 设计 | `incspec design --feature=<f>` | `--complete --output=<file>` |
|
|
96
|
-
| 应用 | `incspec apply <report>` | `--complete` |
|
|
97
|
-
| 合并 | `incspec merge <report>` | `--complete --output=<file>` |
|
|
98
|
-
| 归档 | `incspec archive --yes` | - |
|
|
97
|
+
| 步骤 | 模式 | 开始 | 完成 |
|
|
98
|
+
|------|------|------|------|
|
|
99
|
+
| 分析 | 完整/快速 | `incspec analyze <path> --module=<m>` 或 `--baseline=<file>` | `--complete --output=<file>` |
|
|
100
|
+
| 需求 | 完整/快速 | `incspec collect-req` | `--complete` |
|
|
101
|
+
| 依赖 | 仅完整 | `incspec collect-dep` | `--complete` |
|
|
102
|
+
| 设计 | 仅完整 | `incspec design --feature=<f>` | `--complete --output=<file>` |
|
|
103
|
+
| 应用 | 完整/快速 | `incspec apply <report>` | `--complete` |
|
|
104
|
+
| 合并 | 完整/快速 | `incspec merge <report>` | `--complete --output=<file>` |
|
|
105
|
+
| 归档 | 完整/快速 | `incspec archive --yes` | - |
|
|
99
106
|
|
|
100
107
|
管理命令:
|
|
101
108
|
- `incspec status` - 查看工作流状态
|
|
@@ -281,7 +288,7 @@ incspec archive <file> --keep # 复制而非移动
|
|
|
281
288
|
|
|
282
289
|
## 使用示例
|
|
283
290
|
|
|
284
|
-
|
|
291
|
+
**完整任务模式:** 为产品仪表板添加筛选功能
|
|
285
292
|
|
|
286
293
|
```
|
|
287
294
|
步骤1: 分析产品仪表板代码流程
|