@pigcloud/skills 1.0.5 → 1.0.7
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 +34 -70
- package/README.en.md +4 -3
- package/README.md +54 -74
- package/bin/cli.js +16 -15
- package/package.json +69 -69
- package/rules/coding/implementation.md +26 -30
- package/rules/product/project-context.md +29 -29
- package/rules/skill-profile-map.json +6 -5
- package/rules/skill-profile-map.md +6 -5
- package/scripts/ci-validator.sh +19 -19
- package/scripts/validate-skill-shapes.js +5 -4
- package/skills/{api-docs → api-contract-docs}/SKILL.md +5 -4
- package/skills/{extract-business-facts → business-fact-extraction}/SKILL.md +9 -8
- package/skills/{extract-business-facts → business-fact-extraction}/scripts/write-knowledge-base.js +4 -3
- package/skills/code-review/SKILL.md +7 -6
- package/skills/code-review/references/template-review.md +39 -214
- package/skills/domain-modeling/SKILL.md +4 -3
- package/skills/domain-modeling/references/distillation-checklist.md +44 -152
- package/skills/feature-build/SKILL.md +10 -10
- package/skills/feature-build/references/comment-specification.md +89 -102
- package/skills/knowledge-capture/SKILL.md +1 -1
- package/skills/{performance-check → performance-audit}/SKILL.md +5 -4
- package/skills/project-bootstrap/SKILL.md +3 -2
- package/skills/references/business-fact-extraction.md +9 -8
- package/skills/references/engineering-delivery-method.md +4 -3
- package/skills/references/engineering-delivery-template.md +3 -2
- package/skills/references/golden-prompt-suite.js +44 -43
- package/skills/references/project-requirement-alignment.md +2 -1
- package/skills/references/rule-loading-map.md +4 -3
- package/skills/references/skill-authoring-standard.md +4 -3
- package/skills/references/skill-reference-matrix.md +15 -14
- package/skills/{security-review → security-audit}/SKILL.md +4 -2
- package/skills/{spec → spec-refinement}/SKILL.md +19 -18
- package/skills/technical-design/SKILL.md +11 -10
- package/skills/test-design/SKILL.md +2 -1
|
@@ -1,152 +1,44 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- [ ] `
|
|
12
|
-
- [ ] `
|
|
13
|
-
- [ ] `
|
|
14
|
-
- [ ] `
|
|
15
|
-
- [ ] `
|
|
16
|
-
- [ ] `
|
|
17
|
-
- [ ] `
|
|
18
|
-
- [ ] `
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- [ ]
|
|
23
|
-
- [ ]
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- [ ]
|
|
31
|
-
- [ ]
|
|
32
|
-
- [ ]
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- [ ]
|
|
37
|
-
- [ ]
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
- [ ] 每个接口有"输入"表(参数/类型/必填/说明/约束)
|
|
46
|
-
- [ ] 每个接口有"输出"表(字段/说明)
|
|
47
|
-
- [ ] 每个接口有"关键规则"段落
|
|
48
|
-
- [ ] 每条规则有执行方标注
|
|
49
|
-
- [ ] 每个接口有"涉及的数据对象"链接
|
|
50
|
-
- [ ] 每个接口有"可能的错误"表
|
|
51
|
-
- [ ] 每个接口有"调用示例"(真实可用)
|
|
52
|
-
- [ ] 每个接口有"写权限分级"
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
### 明细层检查
|
|
57
|
-
|
|
58
|
-
- [ ] Schema 表有"对应领域属性/API字段"列
|
|
59
|
-
- [ ] 枚举表有 ✅/⚠️ 标记
|
|
60
|
-
- [ ] 错误码表有"AI 应如何向用户解释"列
|
|
61
|
-
- [ ] 冲突清单有"本体/需求"、"代码"、"AI 影响"三列
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
### 交叉引用检查
|
|
66
|
-
|
|
67
|
-
- [ ] 所有链接使用 `[[slug]]` 格式
|
|
68
|
-
- [ ] 对象↔接口↔Schema 三者互相链接
|
|
69
|
-
- [ ] 无明显断链(链接目标不存在但未标记"待补")
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
### 命名规范检查
|
|
74
|
-
|
|
75
|
-
- [ ] 文件名使用小写 kebab-case
|
|
76
|
-
- [ ] API 字段沿用代码实际返回的命名
|
|
77
|
-
- [ ] 枚举值使用业务实际值(含中文)
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## 动态验证清单
|
|
82
|
-
|
|
83
|
-
### 读/查询场景
|
|
84
|
-
|
|
85
|
-
| 测试 | 验证内容 | 结果 |
|
|
86
|
-
|------|----------|------|
|
|
87
|
-
| 名称→ID 解析 | AI 能正确调用主数据接口解析名称 | ✅/❌ |
|
|
88
|
-
| 查询参数 | AI 能正确构造查询参数 | ✅/❌ |
|
|
89
|
-
| 结果解读 | AI 能正确解读返回结果 | ✅/❌ |
|
|
90
|
-
|
|
91
|
-
### 写/录入场景
|
|
92
|
-
|
|
93
|
-
| 测试 | 验证内容 | 结果 |
|
|
94
|
-
|------|----------|------|
|
|
95
|
-
| 必填字段 | AI 能识别必填字段并提示用户 | ✅/❌ |
|
|
96
|
-
| 用例编排 | AI 能按正确顺序调用接口 | ✅/❌ |
|
|
97
|
-
| 服务端维护字段 | AI 不传入服务端维护字段 | ✅/❌ |
|
|
98
|
-
| 回显确认 | 写操作前回显给用户确认 | ✅/❌ |
|
|
99
|
-
|
|
100
|
-
### 统计场景
|
|
101
|
-
|
|
102
|
-
| 测试 | 验证内容 | 结果 |
|
|
103
|
-
|------|----------|------|
|
|
104
|
-
| 口径理解 | AI 能正确理解统计接口口径 | ✅/❌ |
|
|
105
|
-
| 参数构造 | AI 能正确构造统计参数 | ✅/❌ |
|
|
106
|
-
|
|
107
|
-
### 规则反例场景
|
|
108
|
-
|
|
109
|
-
| 测试 | 验证内容 | 结果 |
|
|
110
|
-
|------|----------|------|
|
|
111
|
-
| 规则预判 | AI 能预判违反规则的错误 | ✅/❌ |
|
|
112
|
-
| 错误解释 | AI 能根据 error-codes.md 解释错误 | ✅/❌ |
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## 验证结论
|
|
117
|
-
|
|
118
|
-
| 检查项 | 通过数 | 总数 | 通过率 |
|
|
119
|
-
|--------|--------|------|--------|
|
|
120
|
-
| 目录结构 | | 13 | |
|
|
121
|
-
| 领域对象 | | 9 | |
|
|
122
|
-
| API 接口 | | 10 | |
|
|
123
|
-
| 明细层 | | 4 | |
|
|
124
|
-
| 交叉引用 | | 3 | |
|
|
125
|
-
| 命名规范 | | 3 | |
|
|
126
|
-
| 动态验证 | | 12 | |
|
|
127
|
-
|
|
128
|
-
**总通过率要求**: >= 90%
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
## 验证记录
|
|
133
|
-
|
|
134
|
-
| 日期 | 验证人 | 通过率 | 备注 |
|
|
135
|
-
|------|--------|--------|------|
|
|
136
|
-
| | | | |
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## 发现的问题
|
|
141
|
-
|
|
142
|
-
1.
|
|
143
|
-
2.
|
|
144
|
-
3.
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## 修复计划
|
|
149
|
-
|
|
150
|
-
| 问题 | 修复方案 | 状态 |
|
|
151
|
-
|------|----------|------|
|
|
152
|
-
| | | 待修复/已修复 |
|
|
1
|
+
# 领域提炼检查清单
|
|
2
|
+
|
|
3
|
+
> 用于检查领域建模提炼结果是否满足规范、是否可交接、是否可复用。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 目录结构
|
|
8
|
+
|
|
9
|
+
- [ ] `distilled/` 目录已创建
|
|
10
|
+
- [ ] `README.md` 已说明提炼目标
|
|
11
|
+
- [ ] `00-overview.md` 已说明 AI 的关键约束
|
|
12
|
+
- [ ] `01-glossary.md` 已收录术语
|
|
13
|
+
- [ ] `domain/_index.md` 已建立索引
|
|
14
|
+
- [ ] `domain/<name>.md` 每个核心域有独立文件
|
|
15
|
+
- [ ] `api/_index.md` 已建立接口索引
|
|
16
|
+
- [ ] `api/<group>/<name>.md` 每个接口组都有独立文件
|
|
17
|
+
- [ ] `reference/schema/*.md` 字段级 Schema 已整理
|
|
18
|
+
- [ ] `reference/enums.md` 枚举已整理
|
|
19
|
+
|
|
20
|
+
## 内容检查
|
|
21
|
+
|
|
22
|
+
- [ ] 领域边界已明确
|
|
23
|
+
- [ ] 核心概念已抽取
|
|
24
|
+
- [ ] 术语表与代码命名一致
|
|
25
|
+
- [ ] 当前事实与推断已区分
|
|
26
|
+
- [ ] 关键不变量已记录
|
|
27
|
+
|
|
28
|
+
## 证据检查
|
|
29
|
+
|
|
30
|
+
- [ ] 每个结论都有代码、文档或会议纪要支撑
|
|
31
|
+
- [ ] 关键例子可追溯到原始来源
|
|
32
|
+
- [ ] 没有把猜测写成事实
|
|
33
|
+
|
|
34
|
+
## 交接检查
|
|
35
|
+
|
|
36
|
+
- [ ] 输出可以交给 `spec-refinement`
|
|
37
|
+
- [ ] 输出可以交给 `technical-design`
|
|
38
|
+
- [ ] 输出可以交给 `knowledge-capture`
|
|
39
|
+
- [ ] 文件命名遵守 kebab-case
|
|
40
|
+
|
|
41
|
+
## 备注
|
|
42
|
+
|
|
43
|
+
- 如果某个目录暂时没有内容,也要在索引里明确说明。
|
|
44
|
+
- 如果有未确认项,单独列在“待确认”区域,不要隐藏。
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: feature-build
|
|
3
|
-
description: 在代码、重构或集成工作需要保持在既定边界内时,实现已批准的设计变更
|
|
4
|
-
lifecycle_stage: build
|
|
3
|
+
description: 在代码、重构或集成工作需要保持在既定边界内时,实现已批准的设计变更
|
|
5
4
|
rule_profile: implementation
|
|
6
5
|
dependencies:
|
|
7
6
|
- technical-design
|
|
@@ -14,7 +13,7 @@ triggers:
|
|
|
14
13
|
- service
|
|
15
14
|
- mapper
|
|
16
15
|
inputs:
|
|
17
|
-
- executable spec
|
|
16
|
+
- executable spec-refinement
|
|
18
17
|
- design decisions
|
|
19
18
|
- confirmed task breakdown plan
|
|
20
19
|
- rules bundle
|
|
@@ -33,7 +32,7 @@ workflow:
|
|
|
33
32
|
- hand off to test-design
|
|
34
33
|
gates:
|
|
35
34
|
- stop at implementation
|
|
36
|
-
- do not rewrite the spec
|
|
35
|
+
- do not rewrite the spec-refinement
|
|
37
36
|
- do not change the agreed boundaries
|
|
38
37
|
- do not bypass the rules bundle
|
|
39
38
|
refs:
|
|
@@ -59,7 +58,7 @@ Implement the approved design without changing the agreed scope.
|
|
|
59
58
|
|
|
60
59
|
- Load the selected rules bundle first.
|
|
61
60
|
- Implement only the confirmed scope from the approved design.
|
|
62
|
-
- Split work into small tasks before implementation if the spec is still too coarse.
|
|
61
|
+
- Split work into small tasks before implementation if the spec-refinement is still too coarse.
|
|
63
62
|
- Treat the task as the smallest implementation unit.
|
|
64
63
|
- Validate each task locally before starting the next one.
|
|
65
64
|
- Record evidence immediately after each task is complete.
|
|
@@ -68,7 +67,7 @@ Implement the approved design without changing the agreed scope.
|
|
|
68
67
|
## Inputs / Outputs
|
|
69
68
|
|
|
70
69
|
- Inputs:
|
|
71
|
-
- executable spec
|
|
70
|
+
- executable spec-refinement
|
|
72
71
|
- design decisions
|
|
73
72
|
- confirmed task breakdown plan
|
|
74
73
|
- rules bundle
|
|
@@ -90,14 +89,14 @@ Implement the approved design without changing the agreed scope.
|
|
|
90
89
|
|
|
91
90
|
## Replay Signals
|
|
92
91
|
|
|
93
|
-
- Input signal: confirmed spec, approved design, confirmed task breakdown plan, and selected rules bundle.
|
|
92
|
+
- Input signal: confirmed spec-refinement, approved design, confirmed task breakdown plan, and selected rules bundle.
|
|
94
93
|
- Output to verify: code changes, implementation notes, validation evidence, self-test evidence, task-level evidence.
|
|
95
|
-
- Stop signal: spec rewrites, scope expansion, or bypassing the rules bundle.
|
|
94
|
+
- Stop signal: spec-refinement rewrites, scope expansion, or bypassing the rules bundle.
|
|
96
95
|
- Handoff signal: implementation is ready for `test-design`.
|
|
97
96
|
|
|
98
97
|
## Gotchas
|
|
99
98
|
|
|
100
|
-
- Do not rewrite the spec while implementing.
|
|
99
|
+
- Do not rewrite the spec-refinement while implementing.
|
|
101
100
|
- Do not expand the boundary because implementation is inconvenient.
|
|
102
101
|
- Do not bypass the rules bundle for convenience.
|
|
103
102
|
- Do not leave validation evidence implicit.
|
|
@@ -108,7 +107,7 @@ Implement the approved design without changing the agreed scope.
|
|
|
108
107
|
## Stop Rules
|
|
109
108
|
|
|
110
109
|
- Stop at implementation.
|
|
111
|
-
- Do not rewrite the spec.
|
|
110
|
+
- Do not rewrite the spec-refinement.
|
|
112
111
|
- Do not change the agreed boundaries.
|
|
113
112
|
- Do not skip the rules bundle.
|
|
114
113
|
- Do not bypass the rules bundle.
|
|
@@ -120,3 +119,4 @@ Implement the approved design without changing the agreed scope.
|
|
|
120
119
|
- `skills/references/engineering-delivery-method.md`
|
|
121
120
|
- `skills/references/engineering-delivery-template.md`
|
|
122
121
|
- `rules/index.md`
|
|
122
|
+
|
|
@@ -1,102 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|------|---------|
|
|
91
|
-
| Entity | 绫绘敞閲?+ 瀛楁娉ㄩ噴 |
|
|
92
|
-
| DTO/VO | 绫绘敞閲?+ 瀛楁娉ㄩ噴 |
|
|
93
|
-
| Mapper | 绫绘敞閲婂嵆鍙?|
|
|
94
|
-
| Service | 绫绘敞閲?+ 鏂规硶娉ㄩ噴 + 閫昏緫娉ㄩ噴 |
|
|
95
|
-
| Controller | 绫绘敞閲?+ 鏂规硶娉ㄩ噴 |
|
|
96
|
-
| Convert | 绫绘敞閲婂嵆鍙?|
|
|
97
|
-
|
|
98
|
-
## Anti-rationalization
|
|
99
|
-
|
|
100
|
-
- 浠g爜寰堟竻妤氾紝涓嶉渶瑕佹敞閲?- 娉ㄩ噴浼氳繃鏃讹紝鎵€浠ヤ笉鍐?- 浠ュ悗鍐嶈ˉ娉ㄩ噴
|
|
101
|
-
- IDE 鍙互鑷姩鐢熸垚灏卞浜?
|
|
102
|
-
|
|
1
|
+
# 注释规范
|
|
2
|
+
|
|
3
|
+
> 代码注释标准,用于保持可读性和可维护性。这里只保留注释密度、模板和检查项;具体业务分层基线优先引用 `rules/overlays/pig-cloud.md` 及其子规则。
|
|
4
|
+
|
|
5
|
+
## Class Comment
|
|
6
|
+
|
|
7
|
+
### 必要内容
|
|
8
|
+
|
|
9
|
+
| 内容 | 说明 |
|
|
10
|
+
|------|------|
|
|
11
|
+
| 类说明 | 一句话描述职责 |
|
|
12
|
+
| 作者 | 创建者 |
|
|
13
|
+
| 日期 | 创建日期 |
|
|
14
|
+
| 版本 | 可选 |
|
|
15
|
+
|
|
16
|
+
### 模板
|
|
17
|
+
|
|
18
|
+
```java
|
|
19
|
+
/**
|
|
20
|
+
* 用户服务。
|
|
21
|
+
*
|
|
22
|
+
* <p>负责用户查询、创建与基础校验。</p>
|
|
23
|
+
*/
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Method Comment
|
|
27
|
+
|
|
28
|
+
### 必要内容
|
|
29
|
+
|
|
30
|
+
| 内容 | 说明 |
|
|
31
|
+
|------|------|
|
|
32
|
+
| 方法说明 | 方法做什么 |
|
|
33
|
+
| 参数说明 | 每个参数的含义 |
|
|
34
|
+
| 返回说明 | 返回值含义 |
|
|
35
|
+
| 异常说明 | 可能抛出的异常 |
|
|
36
|
+
| 前置条件 | 调用前要满足什么 |
|
|
37
|
+
| 后置条件 | 执行后的状态变化 |
|
|
38
|
+
|
|
39
|
+
### 模板
|
|
40
|
+
|
|
41
|
+
```java
|
|
42
|
+
/**
|
|
43
|
+
* 根据用户 ID 查询用户信息。
|
|
44
|
+
*
|
|
45
|
+
* @param userId 用户 ID
|
|
46
|
+
* @return 用户信息
|
|
47
|
+
* @throws BusinessException 用户不存在时抛出
|
|
48
|
+
*/
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Inline Comment
|
|
52
|
+
|
|
53
|
+
### 使用场景
|
|
54
|
+
|
|
55
|
+
- 多条件判断
|
|
56
|
+
- 状态流转
|
|
57
|
+
- 复杂计算
|
|
58
|
+
- 需要解释意图但代码本身又不适合再拆函数的地方
|
|
59
|
+
|
|
60
|
+
### 规则
|
|
61
|
+
|
|
62
|
+
- 注释要解释“为什么”,不要重复“是什么”。
|
|
63
|
+
- 复杂逻辑必须留下能看懂的上下文。
|
|
64
|
+
- 用短句说明约束、边界和原因。
|
|
65
|
+
|
|
66
|
+
## 示例
|
|
67
|
+
|
|
68
|
+
```java
|
|
69
|
+
// 远程调用:查询用户信息,用于订单创建前校验
|
|
70
|
+
UserDTO user = userApi.findById(dto.getUserId()).assertSucceed();
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 注释密度
|
|
74
|
+
|
|
75
|
+
| 场景 | 建议 |
|
|
76
|
+
|------|------|
|
|
77
|
+
| Entity | 类注释 + 字段注释 |
|
|
78
|
+
| DTO/VO | 类注释 + 字段注释 |
|
|
79
|
+
| Mapper | 类注释即可 |
|
|
80
|
+
| Service | 类注释 + 方法注释 + 逻辑注释 |
|
|
81
|
+
| Controller | 类注释 + 方法注释 |
|
|
82
|
+
| Convert | 类注释即可 |
|
|
83
|
+
|
|
84
|
+
## 不建议
|
|
85
|
+
|
|
86
|
+
- 代码很清楚,不需要注释。
|
|
87
|
+
- 注释会过时,所以不注释。
|
|
88
|
+
- 以后再补注释。
|
|
89
|
+
- IDE 自动生成就够了。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: knowledge-capture
|
|
3
|
-
description:
|
|
3
|
+
description: 当上游任务已经产出证据,需要整理、沉淀或交接而不想重做分析时,提炼可复用的决策、需求知识、实时代码事实、CodeWiki 事实和交接笔记
|
|
4
4
|
lifecycle_stage: capture
|
|
5
5
|
rule_profile: capture
|
|
6
6
|
dependencies: []
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: performance-
|
|
3
|
-
description: 当需要性能结论时,对变更中的延迟、吞吐量或资源瓶颈进行审查
|
|
4
|
-
lifecycle_stage: review
|
|
2
|
+
name: performance-audit
|
|
3
|
+
description: 当需要性能结论时,对变更中的延迟、吞吐量或资源瓶颈进行审查
|
|
5
4
|
rule_profile: performance
|
|
6
5
|
dependencies:
|
|
7
6
|
- feature-build
|
|
@@ -40,7 +39,7 @@ refs:
|
|
|
40
39
|
- rules/index.md
|
|
41
40
|
---
|
|
42
41
|
|
|
43
|
-
# Performance
|
|
42
|
+
# Performance Audit
|
|
44
43
|
|
|
45
44
|
## Purpose
|
|
46
45
|
|
|
@@ -115,3 +114,5 @@ Find performance bottlenecks and optimization opportunities.
|
|
|
115
114
|
- `skills/references/prompt-replay-checklist.md`
|
|
116
115
|
- `skills/references/full-chain-replay-scenarios.md`
|
|
117
116
|
- `rules/index.md`
|
|
117
|
+
|
|
118
|
+
# Performance Audit
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: project-bootstrap
|
|
3
|
-
description: 当项目需要初始化时,为新工作区装载合适的技能和规则包
|
|
3
|
+
description: 当项目需要初始化时,为新工作区装载合适的技能和规则包
|
|
4
4
|
lifecycle_stage: scaffold
|
|
5
5
|
rule_profile: scaffold
|
|
6
6
|
dependencies: []
|
|
@@ -58,7 +58,7 @@ Create a new workspace with the right skills and rules layout.
|
|
|
58
58
|
- Input signal: client type, workspace markers, desired rules bundle.
|
|
59
59
|
- Output to verify: starter structure, installed bundle, setup notes.
|
|
60
60
|
- Stop signal: product scope design or application code generation.
|
|
61
|
-
- Handoff signal: the workspace is ready for `workflow-router` or `spec`.
|
|
61
|
+
- Handoff signal: the workspace is ready for `workflow-router` or `spec-refinement`.
|
|
62
62
|
|
|
63
63
|
## Examples
|
|
64
64
|
|
|
@@ -78,3 +78,4 @@ Create a new workspace with the right skills and rules layout.
|
|
|
78
78
|
- `skills/references/prompt-replay-checklist.md`
|
|
79
79
|
- `skills/references/full-chain-replay-scenarios.md`
|
|
80
80
|
- `rules/index.md`
|
|
81
|
+
|
|
@@ -177,7 +177,7 @@ Use the strongest source available first:
|
|
|
177
177
|
|
|
178
178
|
## Auto-Write Pack
|
|
179
179
|
|
|
180
|
-
Use `skills/
|
|
180
|
+
Use `skills/business-fact-extraction/scripts/write-knowledge-base.js` when the staged readout should be written into the knowledge base.
|
|
181
181
|
|
|
182
182
|
### Input Shape
|
|
183
183
|
|
|
@@ -200,7 +200,7 @@ Use `skills/extract-business-facts/scripts/write-knowledge-base.js` when the sta
|
|
|
200
200
|
### Command
|
|
201
201
|
|
|
202
202
|
```bash
|
|
203
|
-
node skills/
|
|
203
|
+
node skills/business-fact-extraction/scripts/write-knowledge-base.js --input fact-pack.json
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
### Behavior
|
|
@@ -214,7 +214,7 @@ node skills/extract-business-facts/scripts/write-knowledge-base.js --input fact-
|
|
|
214
214
|
## Handoff Targets
|
|
215
215
|
|
|
216
216
|
- `domain-modeling` when the facts need boundary or concept normalization
|
|
217
|
-
- `spec` when the facts need to become a user-confirmable spec
|
|
217
|
+
- `spec-refinement` when the facts need to become a user-confirmable spec-refinement
|
|
218
218
|
- `knowledge-capture` when the facts are stable and ready to persist
|
|
219
219
|
|
|
220
220
|
## Sample Readout
|
|
@@ -252,7 +252,7 @@ node skills/extract-business-facts/scripts/write-knowledge-base.js --input fact-
|
|
|
252
252
|
- decision: inventory must be reserved before order confirmation
|
|
253
253
|
- reason: avoid overselling
|
|
254
254
|
- date or context: 2026-06-22, order flow review
|
|
255
|
-
- affected artifact: checkout spec
|
|
255
|
+
- affected artifact: checkout spec-refinement
|
|
256
256
|
- notes: failure should return a clear stock shortage message
|
|
257
257
|
|
|
258
258
|
#### `knowledge-base/requirements/acceptance.md`
|
|
@@ -292,7 +292,7 @@ node skills/extract-business-facts/scripts/write-knowledge-base.js --input fact-
|
|
|
292
292
|
|
|
293
293
|
### 1. Source Input
|
|
294
294
|
|
|
295
|
-
- PRD / spec note: checkout must not confirm when stock is insufficient
|
|
295
|
+
- PRD / spec-refinement note: checkout must not confirm when stock is insufficient
|
|
296
296
|
- code evidence: `order-service` reserves inventory before creating the order
|
|
297
297
|
- runtime evidence: shortage returns a stock error before commit
|
|
298
298
|
|
|
@@ -330,7 +330,7 @@ node skills/extract-business-facts/scripts/write-knowledge-base.js --input fact-
|
|
|
330
330
|
"decision": "inventory must be reserved before order confirmation",
|
|
331
331
|
"reason": "avoid overselling",
|
|
332
332
|
"date or context": "2026-06-22, checkout review",
|
|
333
|
-
"affected artifact": "checkout spec",
|
|
333
|
+
"affected artifact": "checkout spec-refinement",
|
|
334
334
|
"notes": "shortage returns a clear error"
|
|
335
335
|
}
|
|
336
336
|
],
|
|
@@ -357,7 +357,7 @@ node skills/extract-business-facts/scripts/write-knowledge-base.js --input fact-
|
|
|
357
357
|
### 4. Persist
|
|
358
358
|
|
|
359
359
|
```bash
|
|
360
|
-
node skills/
|
|
360
|
+
node skills/business-fact-extraction/scripts/write-knowledge-base.js --input fact-pack.json
|
|
361
361
|
```
|
|
362
362
|
|
|
363
363
|
### 5. `knowledge-capture`
|
|
@@ -392,7 +392,7 @@ node skills/extract-business-facts/scripts/write-knowledge-base.js --input fact-
|
|
|
392
392
|
- decision: inventory must be reserved before order confirmation
|
|
393
393
|
- reason: avoid overselling
|
|
394
394
|
- date or context: 2026-06-22, order flow review
|
|
395
|
-
- affected artifact: checkout spec
|
|
395
|
+
- affected artifact: checkout spec-refinement
|
|
396
396
|
- notes: failure should return a clear stock shortage message
|
|
397
397
|
|
|
398
398
|
### CodeWiki Update
|
|
@@ -412,3 +412,4 @@ node skills/extract-business-facts/scripts/write-knowledge-base.js --input fact-
|
|
|
412
412
|
- context: checkout path
|
|
413
413
|
- why it failed: allowed overselling under concurrent requests
|
|
414
414
|
- how to avoid it: reserve before committing the order
|
|
415
|
+
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Goal
|
|
4
4
|
|
|
5
|
-
Help engineering teams turn an approved spec into executable work, decide complexity before coding, implement inside `feature-build`, self-verify locally, and then hand off to validation and review.
|
|
5
|
+
Help engineering teams turn an approved spec-refinement into executable work, decide complexity before coding, implement inside `feature-build`, self-verify locally, and then hand off to validation and review.
|
|
6
6
|
|
|
7
7
|
Use [`engineering-delivery-template.md`](engineering-delivery-template.md) when you need the copyable one-page form.
|
|
8
8
|
|
|
9
9
|
## Flow
|
|
10
10
|
|
|
11
|
-
1. Start from an approved spec or executable design.
|
|
12
|
-
2. Align the spec with current project facts and selected rules.
|
|
11
|
+
1. Start from an approved spec-refinement or executable design.
|
|
12
|
+
2. Align the spec-refinement with current project facts and selected rules.
|
|
13
13
|
3. Plan the task execution direction before coding.
|
|
14
14
|
4. Decide whether the change is simple or complex before coding.
|
|
15
15
|
5. If the change is complex, produce `technical-design` first.
|
|
@@ -61,3 +61,4 @@ Use [`engineering-delivery-template.md`](engineering-delivery-template.md) when
|
|
|
61
61
|
- `skills/references/project-requirement-alignment.md`
|
|
62
62
|
- `skills/references/flow-test-cases.md`
|
|
63
63
|
- `skills/references/full-chain-replay-scenarios.md`
|
|
64
|
+
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## How to Use
|
|
4
4
|
|
|
5
|
-
- Start from an approved spec or executable design.
|
|
5
|
+
- Start from an approved spec-refinement or executable design.
|
|
6
6
|
- Fill this page before implementation.
|
|
7
7
|
- Keep each task small enough to implement and self-test independently.
|
|
8
8
|
- Do not add long background text.
|
|
@@ -73,8 +73,9 @@ Rules:
|
|
|
73
73
|
|
|
74
74
|
## Minimum Acceptance
|
|
75
75
|
|
|
76
|
-
- The spec is split into small tasks.
|
|
76
|
+
- The spec-refinement is split into small tasks.
|
|
77
77
|
- The execution direction is explicit before confirmation.
|
|
78
78
|
- Every task has a done criteria and a self-test.
|
|
79
79
|
- The implementation was verified task by task.
|
|
80
80
|
- The handoff includes evidence, not just code.
|
|
81
|
+
|