@pigcloud/skills 1.0.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 (161) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/LICENSE +201 -0
  3. package/README.en.md +84 -0
  4. package/README.md +79 -0
  5. package/bin/cli.js +663 -0
  6. package/bin/postinstall.js +60 -0
  7. package/bin/rules-loader.js +484 -0
  8. package/bin/runtime-bootstrap.js +121 -0
  9. package/index.js +7 -0
  10. package/install.cmd +5 -0
  11. package/install.ps1 +74 -0
  12. package/install.sh +168 -0
  13. package/package.json +70 -0
  14. package/pig-cloud-skills-commands/.codex-plugin/plugin.json +35 -0
  15. package/pig-cloud-skills-commands/README.md +24 -0
  16. package/pig-cloud-skills-commands/commands/analyze.md +21 -0
  17. package/pig-cloud-skills-commands/commands/build.md +21 -0
  18. package/pig-cloud-skills-commands/commands/design.md +21 -0
  19. package/pig-cloud-skills-commands/commands/distill.md +21 -0
  20. package/pig-cloud-skills-commands/commands/doc.md +21 -0
  21. package/pig-cloud-skills-commands/commands/infra.md +21 -0
  22. package/pig-cloud-skills-commands/commands/init.md +20 -0
  23. package/pig-cloud-skills-commands/commands/kb.md +20 -0
  24. package/pig-cloud-skills-commands/commands/perf.md +20 -0
  25. package/pig-cloud-skills-commands/commands/prd.md +21 -0
  26. package/pig-cloud-skills-commands/commands/review.md +21 -0
  27. package/pig-cloud-skills-commands/commands/security.md +21 -0
  28. package/pig-cloud-skills-commands/commands/test.md +21 -0
  29. package/pig-cloud-skills-commands/commands/workflow.md +20 -0
  30. package/rules/bundles.json +358 -0
  31. package/rules/coding/analysis.md +27 -0
  32. package/rules/coding/backend/cache-invalidation.md +30 -0
  33. package/rules/coding/backend/cache-keying.md +30 -0
  34. package/rules/coding/backend/cache.md +37 -0
  35. package/rules/coding/backend/database.md +32 -0
  36. package/rules/coding/backend/feign.md +30 -0
  37. package/rules/coding/backend/index.md +42 -0
  38. package/rules/coding/backend/query.md +32 -0
  39. package/rules/coding/backend/remote.md +33 -0
  40. package/rules/coding/backend/transaction-boundary.md +30 -0
  41. package/rules/coding/backend/transaction-rollback.md +30 -0
  42. package/rules/coding/backend/transaction.md +38 -0
  43. package/rules/coding/boundary.md +25 -0
  44. package/rules/coding/implementation.md +30 -0
  45. package/rules/coding/index.md +38 -0
  46. package/rules/coding/scaffold.md +28 -0
  47. package/rules/coding/testing.md +29 -0
  48. package/rules/coding/validation.md +29 -0
  49. package/rules/core/code-quality.md +30 -0
  50. package/rules/core/evidence.md +26 -0
  51. package/rules/core/index.md +41 -0
  52. package/rules/core/interface.md +26 -0
  53. package/rules/core/iteration.md +26 -0
  54. package/rules/core/layer-boundary.md +25 -0
  55. package/rules/core/logging.md +26 -0
  56. package/rules/core/security.md +26 -0
  57. package/rules/core/task-boundary.md +27 -0
  58. package/rules/docs/api.md +34 -0
  59. package/rules/docs/capture-summary.md +29 -0
  60. package/rules/docs/capture.md +34 -0
  61. package/rules/docs/contract.md +30 -0
  62. package/rules/docs/decision-log.md +32 -0
  63. package/rules/docs/examples.md +28 -0
  64. package/rules/docs/index.md +49 -0
  65. package/rules/docs/reference.md +32 -0
  66. package/rules/index.md +46 -0
  67. package/rules/overlays/index.md +28 -0
  68. package/rules/overlays/pig-cloud/controller.md +33 -0
  69. package/rules/overlays/pig-cloud/dto-vo.md +33 -0
  70. package/rules/overlays/pig-cloud/entity.md +32 -0
  71. package/rules/overlays/pig-cloud/exception.md +32 -0
  72. package/rules/overlays/pig-cloud/layering.md +31 -0
  73. package/rules/overlays/pig-cloud/mapper.md +32 -0
  74. package/rules/overlays/pig-cloud/query-style.md +32 -0
  75. package/rules/overlays/pig-cloud/rest-response.md +33 -0
  76. package/rules/overlays/pig-cloud/service.md +33 -0
  77. package/rules/overlays/pig-cloud/transactions.md +32 -0
  78. package/rules/overlays/pig-cloud/validation.md +33 -0
  79. package/rules/overlays/pig-cloud.md +45 -0
  80. package/rules/product/acceptance.md +25 -0
  81. package/rules/product/briefing.md +27 -0
  82. package/rules/product/index.md +36 -0
  83. package/rules/product/intake.md +27 -0
  84. package/rules/product/modeling.md +25 -0
  85. package/rules/product/project-context.md +29 -0
  86. package/rules/review/code.md +35 -0
  87. package/rules/review/evidence.md +31 -0
  88. package/rules/review/index.md +50 -0
  89. package/rules/review/java.md +42 -0
  90. package/rules/review/performance.md +38 -0
  91. package/rules/review/rubric.md +28 -0
  92. package/rules/review/security.md +38 -0
  93. package/rules/review/ts.md +33 -0
  94. package/rules/review/vue.md +33 -0
  95. package/rules/skill-profile-map.json +58 -0
  96. package/rules/skill-profile-map.md +28 -0
  97. package/rules/workflow/handoff.md +25 -0
  98. package/rules/workflow/index.md +37 -0
  99. package/rules/workflow/refinement.md +29 -0
  100. package/rules/workflow/router.md +25 -0
  101. package/rules/workflow/selection.md +25 -0
  102. package/rules/workflow/stop.md +25 -0
  103. package/scripts/ci-validator.sh +114 -0
  104. package/scripts/run-golden-replays.js +312 -0
  105. package/scripts/validate-rules.js +125 -0
  106. package/scripts/validate-skill-replay-signals.js +75 -0
  107. package/scripts/validate-skill-shapes.js +141 -0
  108. package/scripts/validate-skill-stop-rules.js +139 -0
  109. package/scripts/validate-skills.cmd +3 -0
  110. package/scripts/validate-skills.ps1 +42 -0
  111. package/scripts/validate-skills.sh +36 -0
  112. package/skills/api-docs/SKILL.md +76 -0
  113. package/skills/code-review/SKILL.md +135 -0
  114. package/skills/code-review/references/findings-template.md +51 -0
  115. package/skills/code-review/references/performance-checklist.md +213 -0
  116. package/skills/code-review/references/rubric.md +232 -0
  117. package/skills/code-review/references/rules.md +32 -0
  118. package/skills/code-review/references/security-checklist.md +178 -0
  119. package/skills/code-review/references/stack-notes.md +25 -0
  120. package/skills/code-review/references/template-review.md +214 -0
  121. package/skills/code-review/scripts/lint-code-review.mjs +431 -0
  122. package/skills/domain-modeling/SKILL.md +80 -0
  123. package/skills/domain-modeling/references/README.md +134 -0
  124. package/skills/domain-modeling/references/distillation-checklist.md +152 -0
  125. package/skills/domain-modeling/references/test-cases-template.md +128 -0
  126. package/skills/environment-deploy/SKILL.md +81 -0
  127. package/skills/feature-build/SKILL.md +122 -0
  128. package/skills/feature-build/references/coding-checklist.md +97 -0
  129. package/skills/feature-build/references/comment-specification.md +102 -0
  130. package/skills/knowledge-capture/SKILL.md +84 -0
  131. package/skills/performance-check/SKILL.md +117 -0
  132. package/skills/product-intake/SKILL.md +98 -0
  133. package/skills/project-bootstrap/SKILL.md +80 -0
  134. package/skills/references/agent-personas.md +34 -0
  135. package/skills/references/anti-rationalization.md +144 -0
  136. package/skills/references/engineering-delivery-method.md +63 -0
  137. package/skills/references/engineering-delivery-template.md +80 -0
  138. package/skills/references/flow-test-cases.md +62 -0
  139. package/skills/references/full-chain-replay-scenarios.md +79 -0
  140. package/skills/references/golden-prompt-suite.js +385 -0
  141. package/skills/references/golden-prompt-suite.md +33 -0
  142. package/skills/references/hooks.md +67 -0
  143. package/skills/references/negative-replay-scenarios.md +49 -0
  144. package/skills/references/project-requirement-alignment.md +41 -0
  145. package/skills/references/prompt-replay-checklist.md +128 -0
  146. package/skills/references/requirements-separation-map.md +71 -0
  147. package/skills/references/rule-loading-map.md +108 -0
  148. package/skills/references/skill-authoring-standard.md +73 -0
  149. package/skills/references/skill-boundary-template.md +38 -0
  150. package/skills/references/skill-enhanced-template.md +53 -0
  151. package/skills/references/skill-reference-matrix.md +53 -0
  152. package/skills/references/slash-commands.md +34 -0
  153. package/skills/security-review/SKILL.md +117 -0
  154. package/skills/spec-refinement/SKILL.md +143 -0
  155. package/skills/spec-refinement/references/ears-syntax.md +127 -0
  156. package/skills/spec-refinement/references/requirement-checklist.md +139 -0
  157. package/skills/spec-refinement/references/spec-workbook.md +75 -0
  158. package/skills/technical-design/SKILL.md +105 -0
  159. package/skills/technical-design/references/solid-checklist.md +199 -0
  160. package/skills/test-design/SKILL.md +91 -0
  161. package/skills/workflow-router/SKILL.md +86 -0
@@ -0,0 +1,97 @@
1
+ # 编码检查清单
2
+
3
+ > 以规则层为主,保留可执行检查,不重复展开规则正文。默认基线见 [rules/overlays/pig-cloud.md](/D:/work/java/pig-skills/rules/overlays/pig-cloud.md)。
4
+
5
+ ---
6
+
7
+ ## Entity Layer
8
+
9
+ - 基类继承是否符合 [rules/overlays/pig-cloud/entity.md](/D:/work/java/pig-skills/rules/overlays/pig-cloud/entity.md)
10
+ - 主键策略是否符合项目约定
11
+ - 状态字段是否使用约定枚举编码
12
+ - 表名是否显式且稳定
13
+
14
+ ---
15
+
16
+ ## DTO Layer
17
+
18
+ - CreateDTO 是否具备必要校验
19
+ - UpdateDTO 是否包含 id
20
+ - VO 是否做好脱敏和输出边界控制
21
+ - DTO / VO / Entity 是否严格分离
22
+
23
+ ---
24
+
25
+ ## Mapper Layer
26
+
27
+ - 是否只负责数据访问
28
+ - 是否保持 lambda query / update 风格
29
+ - 是否避免字符串列名和 `${}` 注入风险
30
+ - 是否避免业务逻辑下沉到 Mapper
31
+
32
+ ---
33
+
34
+ ## Service Layer
35
+
36
+ - 是否通过 Service 统一组织业务编排
37
+ - 是否在 Service 层管理事务边界
38
+ - 是否避免事务内远程调用
39
+ - 是否避免把接口层语义带入业务层
40
+
41
+ ---
42
+
43
+ ## Controller Layer
44
+
45
+ - 是否只负责接入、参数接收和结果返回
46
+ - 是否通过 Service 调用业务逻辑
47
+ - 是否符合 [rules/overlays/pig-cloud/validation.md](/D:/work/java/pig-skills/rules/overlays/pig-cloud/validation.md)
48
+ - 是否避免直接访问 Mapper 和写事务
49
+
50
+ ---
51
+
52
+ ## Comment Layer
53
+
54
+ - 类注释是否一句话说明职责
55
+ - 方法注释是否说明目的、输入、输出和异常
56
+ - 复杂逻辑是否有必要的步骤说明
57
+ - 外部调用和状态流转是否留下注释
58
+
59
+ ---
60
+
61
+ ## Logging Layer
62
+
63
+ - 外部调用是否记录接口名、参数和耗时
64
+ - 业务事件是否记录关键上下文
65
+ - 异常日志是否保留足够上下文
66
+ - 敏感数据是否已脱敏
67
+
68
+ ---
69
+
70
+ ## Shared Tools
71
+
72
+ - String 是否使用统一工具
73
+ - JSON 是否使用统一工具
74
+ - Bean Copy 是否使用统一工具
75
+ - DateTime 是否使用统一工具
76
+ - Password 是否使用统一工具
77
+ - Pagination 是否使用统一工具
78
+ - Exception 是否使用统一异常类型
79
+
80
+ ---
81
+
82
+ ## Anti-rationalization
83
+
84
+ - 是否出现“临时方案”“以后再优化”“不会发生”的借口
85
+ - 是否把边界问题推迟到未来处理
86
+ - 是否把细节复杂度低估
87
+ - 是否把覆盖率、性能、异常和安全问题合理化
88
+
89
+ ---
90
+
91
+ ## Verification Gates
92
+
93
+ - 编译是否通过
94
+ - 每个任务的本地自测是否有证据
95
+ - 规则检查是否通过
96
+ - 分层检查是否通过
97
+ - 安全检查是否通过
@@ -0,0 +1,102 @@
1
+ # 娉ㄩ噴瑙勮寖
2
+
3
+ > 浠g爜娉ㄩ噴鏍囧噯锛岀敤浜庝繚鎸佸彲璇绘€у拰鍙淮鎶ゆ€с€傝繖閲屽彧淇濈暀娉ㄩ噴瀵嗗害銆佹ā鏉垮拰妫€鏌ラ」锛涘叿浣撲笟鍔?鍒嗗眰鍩虹嚎浼樺厛寮曠敤 [rules/overlays/pig-cloud.md](/D:/work/java/pig-skills/rules/overlays/pig-cloud.md) 鍙婂叾瀛愯鍒欍€?
4
+ ## Class Comment
5
+
6
+ ### 蹇呰鍐呭
7
+
8
+ | 鍐呭 | 璇存槑 |
9
+ |------|------|
10
+ | 绫昏鏄?| 涓€鍙ヨ瘽鎻忚堪鑱岃矗 |
11
+ | 浣滆€?| 鍒涘缓鑰?|
12
+ | 鏃ユ湡 | 鍒涘缓鏃ユ湡 |
13
+ | 鐗堟湰 | 鍙€?|
14
+
15
+ ### 妯℃澘
16
+
17
+ ```java
18
+ /**
19
+ * 璁㈠崟鏈嶅姟瀹炵幇绫伙紝澶勭悊璁㈠崟鐩稿叧涓氬姟閫昏緫
20
+ *
21
+ * @author zhangsan
22
+ * @date 2026-06-16
23
+ */
24
+ @Service
25
+ @RequiredArgsConstructor
26
+ public class OrderServiceImpl implements OrderService {
27
+ }
28
+ ```
29
+
30
+ ## Method Comment
31
+
32
+ ### 蹇呰鍐呭
33
+
34
+ | 鍐呭 | 璇存槑 |
35
+ |------|------|
36
+ | 鏂规硶璇存槑 | 涓€鍙ヨ瘽鎻忚堪鍔熻兘 |
37
+ | 鍙傛暟璇存槑 | 姣忎釜鍙傛暟鐨勫惈涔?|
38
+ | 杩斿洖璇存槑 | 杩斿洖鍊煎惈涔?|
39
+ | 寮傚父璇存槑 | 鍙兘鎶涘嚭鐨勫紓甯?|
40
+ | 鍓嶇疆鏉′欢 | 鎵ц鍓嶉渶瑕佹弧瓒崇殑鏉′欢 |
41
+ | 鍚庣疆鏉′欢 | 鎵ц鍚庣殑鐘舵€佸彉鍖?|
42
+
43
+ ### 妯℃澘
44
+
45
+ ```java
46
+ /**
47
+ * 鍒涘缓璁㈠崟锛屾牎楠屽簱瀛樺苟鐢熸垚璁㈠崟璁板綍
48
+ *
49
+ * @param dto 璁㈠崟鍒涘缓璇锋眰DTO
50
+ * @return 璁㈠崟ID
51
+ * @throws BusinessException 搴撳瓨涓嶈冻鏃舵姏鍑?
52
+ */
53
+ public Result<Long> create(OrderCreateDTO dto) {
54
+ }
55
+ ```
56
+
57
+ ## Logic Comment
58
+
59
+ ### 閫傜敤鍦烘櫙
60
+
61
+ - 澶氭潯浠跺垽鏂?- 鐘舵€佹祦杞?- 澶嶆潅璁$畻
62
+ - 澶栭儴璋冪敤
63
+ - 鏁版嵁杞崲
64
+ - 鍒嗛〉/鎵归噺閫昏緫
65
+
66
+ ### 瑙勫垯
67
+
68
+ - 鐢?`Step 1/2/3` 鏍囪娴佺▼
69
+ - 鍙В閲婁笟鍔℃剰鍥撅紝涓嶈В閲婃樉鑰屾槗瑙佺殑璇硶
70
+ - 澶嶆潅閫昏緫蹇呴』鐣欎笅鑳界湅鎳傜殑涓婁笅鏂?
71
+ ## External Call Comment
72
+
73
+ ### 蹇呰鍐呭
74
+
75
+ - 璋冪敤鐩殑
76
+ - 璋冪敤鎺ュ彛
77
+ - 浼犲叆鍙傛暟
78
+ - 棰勬湡杩斿洖
79
+ - 寮傚父澶勭悊
80
+
81
+ ### 绀轰緥
82
+
83
+ ```java
84
+ // 杩滅▼璋冪敤锛氭煡璇㈢敤鎴蜂俊鎭紝鐢ㄤ簬璁㈠崟鍒涘缓鍓嶆牎楠?UserDTO user = userApi.findById(dto.getUserId()).assertSucceed();
85
+ ```
86
+
87
+ ## Comment Density
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
+
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: knowledge-capture
3
+ description: Capture reusable decisions, requirements knowledge, realtime code facts, codewiki facts, and handoff notes when downstream work needs a durable summary
4
+ lifecycle_stage: capture
5
+ rule_profile: capture
6
+ dependencies: []
7
+ triggers:
8
+ - capture
9
+ - handoff
10
+ - note
11
+ - summary
12
+ - decision log
13
+ - knowledge
14
+ inputs:
15
+ - approved artifacts
16
+ - findings
17
+ - decisions
18
+ outputs:
19
+ - reusable note
20
+ - knowledge page
21
+ - handoff summary
22
+ workflow:
23
+ - collect the produced artifact
24
+ - normalize it into a reusable note
25
+ - separate requirement knowledge, realtime code facts, CodeWiki facts, and decision-log content
26
+ - link it to the originating skill
27
+ - publish the handoff summary for downstream reuse
28
+ gates:
29
+ - stop at capture and organization
30
+ - do not redo upstream analysis
31
+ - do not generate new requirements or code
32
+ refs:
33
+ - skills/references/skill-reference-matrix.md
34
+ - skills/references/rule-loading-map.md
35
+ - skills/references/flow-test-cases.md
36
+ - skills/references/full-chain-replay-scenarios.md
37
+ - skills/references/prompt-replay-checklist.md
38
+ - docs/codewiki-knowledge-base.md
39
+ ---
40
+
41
+ # Knowledge Capture
42
+
43
+ ## Purpose
44
+
45
+ Store decisions, artifacts, and handoff notes so other skills can reuse them later.
46
+
47
+ ## Suitable / Unsuitable
48
+
49
+ - Suitable: summaries, decision logs, reusable knowledge, artifact handoff, CodeWiki facts, requirements knowledge, realtime code facts
50
+ - Unsuitable: requirement discovery, design, implementation, review, test authoring
51
+
52
+ ## Workflow
53
+
54
+ 1. Collect the produced artifact.
55
+ 2. Normalize it into a reusable note.
56
+ 3. Separate requirement knowledge, realtime code facts, CodeWiki facts, decision log entries, and pitfall notes.
57
+ 4. Link it back to the originating skill.
58
+ 5. Publish the handoff summary for downstream reuse.
59
+
60
+ ## Replay Signals
61
+
62
+ - Input signal: approved artifacts, findings, or decisions.
63
+ - Output to verify: reusable note, knowledge page, handoff summary, decision log entry, codewiki update, enterprise knowledge note.
64
+ - Stop signal: redoing upstream analysis or generating new requirements/code.
65
+ - Handoff signal: the reusable note is ready for later reuse by other skills.
66
+
67
+ ## Stop Rules
68
+
69
+ - Stop at capture and organization.
70
+ - Do not redo upstream analysis.
71
+ - Do not generate new requirements or code.
72
+ - Do not merge requirement knowledge, code facts, and decisions into one blob.
73
+
74
+ ## Examples
75
+
76
+ - Input: "Capture the decisions and pitfalls from this task."
77
+ - Output: reusable note, knowledge page, handoff summary
78
+ - Stop: do not re-open the design or implementation debate
79
+
80
+ ## References
81
+
82
+ - `skills/references/skill-reference-matrix.md`
83
+ - `skills/references/rule-loading-map.md`
84
+ - `skills/references/flow-test-cases.md`
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: performance-check
3
+ description: Review a change for latency, throughput, or resource bottlenecks when performance findings are needed
4
+ lifecycle_stage: review
5
+ rule_profile: performance
6
+ dependencies:
7
+ - feature-build
8
+ triggers:
9
+ - performance
10
+ - slow
11
+ - latency
12
+ - cache
13
+ - bottleneck
14
+ - slow path
15
+ - hotspot
16
+ inputs:
17
+ - diff
18
+ - hotspots
19
+ - response timings
20
+ outputs:
21
+ - performance findings
22
+ - bottleneck map
23
+ - optimization advice
24
+ - measured path summary
25
+ - review summary
26
+ workflow:
27
+ - locate the expensive path
28
+ - inspect queries, cache, memory, and concurrency
29
+ - route correctness-only issues to `code-review`
30
+ - rank the bottlenecks by impact
31
+ - produce optimization advice
32
+ gates:
33
+ - stop at performance findings
34
+ - do not rewrite code
35
+ - do not become a general review
36
+ refs:
37
+ - skills/references/rule-loading-map.md
38
+ - skills/references/prompt-replay-checklist.md
39
+ - skills/references/full-chain-replay-scenarios.md
40
+ - rules/index.md
41
+ ---
42
+
43
+ # Performance Check
44
+
45
+ ## Purpose
46
+
47
+ Find performance bottlenecks and optimization opportunities.
48
+
49
+ ## Suitable / Unsuitable
50
+
51
+ - Suitable: slow paths, latency, cache behavior, query cost, concurrency, measurable bottlenecks
52
+ - Unsuitable: implementation work, broad code review, requirement discovery, generic correctness review
53
+
54
+ ## Quick Start
55
+
56
+ - Identify the hottest path first.
57
+ - Check queries, cache, memory, and concurrency in that order.
58
+ - Return a bottleneck map plus optimization advice.
59
+ - If the issue is only about correctness or maintainability, hand off to `code-review`.
60
+
61
+ ## Report Format
62
+
63
+ - Use one entry per bottleneck.
64
+ - Include `location`, `bottleneck type`, `evidence`, `expected impact`, and `optimization advice`.
65
+ - Anchor each bottleneck to the smallest relevant performance surface:
66
+ - query, cache path, allocation path, concurrency path, or hot loop
67
+ - Keep the bottleneck map explicit about CPU, memory, network, database, or allocation pressure.
68
+ - Keep the review summary short when no performance issue is present.
69
+ - If there are no findings, explain what was measured or inspected and why it was acceptable.
70
+
71
+ ## Inputs / Outputs
72
+
73
+ - Inputs:
74
+ - diff
75
+ - hotspots
76
+ - response timings
77
+ - Outputs:
78
+ - performance findings
79
+ - bottleneck map
80
+ - optimization advice
81
+ - measured path summary
82
+
83
+ ## Workflow
84
+
85
+ 1. Locate the expensive path.
86
+ 2. Inspect queries, cache, memory, and concurrency.
87
+ 3. Route correctness-only issues to `code-review`.
88
+ 4. Rank the bottlenecks by impact.
89
+ 5. Produce optimization advice.
90
+
91
+ ## Replay Signals
92
+
93
+ - Input signal: diff, hotspots, response timings, or a performance concern.
94
+ - Output to verify: performance findings, bottleneck map, optimization advice, measured path summary, review summary.
95
+ - Stop signal: rewrite code or turn into a general review.
96
+ - Handoff signal: the findings are ready for `knowledge-capture`.
97
+
98
+ ## Gotchas
99
+
100
+ - Do not stop at vague "slow" labels.
101
+ - Do not turn the task into a generic review.
102
+ - Do not skip the bottleneck map.
103
+ - Do not give advice without an identifiable path.
104
+ - Do not file a generic correctness issue as a performance finding.
105
+
106
+ ## Stop Rules
107
+
108
+ - Stop at performance findings.
109
+ - Do not rewrite code.
110
+ - Do not become a general review.
111
+
112
+ ## References
113
+
114
+ - `skills/references/rule-loading-map.md`
115
+ - `skills/references/prompt-replay-checklist.md`
116
+ - `skills/references/full-chain-replay-scenarios.md`
117
+ - `rules/index.md`
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: product-intake
3
+ description: Capture product intent and separate it from project facts, prototypes, and current implementation facts into a PRD-ready brief when the goal, scope, or priority is still fuzzy
4
+ lifecycle_stage: intake
5
+ rule_profile: intake
6
+ dependencies: []
7
+ triggers:
8
+ - business goal
9
+ - user need
10
+ - PRD
11
+ - scope
12
+ - priority
13
+ - problem framing
14
+ inputs:
15
+ - business goals
16
+ - user feedback
17
+ - meeting notes
18
+ - release context
19
+ - prototype notes
20
+ - current implementation facts
21
+ outputs:
22
+ - brief
23
+ - scope
24
+ - acceptance outline
25
+ - current project facts
26
+ - prototype notes
27
+ - implementation facts
28
+ - open questions
29
+ workflow:
30
+ - confirm the problem and desired outcome
31
+ - separate in-scope and out-of-scope
32
+ - capture current project facts, prototypes, and implementation facts separately from product intent
33
+ - capture acceptance criteria and open questions
34
+ - hand off a PRD-ready brief plus project facts, prototype notes, implementation facts, and open questions to spec-refinement
35
+ gates:
36
+ - stop at product-level framing
37
+ - do not write implementation details
38
+ - do not choose rule bundles
39
+ - do not produce code-oriented specs
40
+ refs:
41
+ - skills/references/requirements-separation-map.md
42
+ - skills/references/project-requirement-alignment.md
43
+ - skills/references/rule-loading-map.md
44
+ - skills/references/flow-test-cases.md
45
+ - skills/references/full-chain-replay-scenarios.md
46
+ - skills/references/prompt-replay-checklist.md
47
+ - skills/spec-refinement/SKILL.md
48
+ ---
49
+
50
+ # Product Intake
51
+
52
+ ## Purpose
53
+
54
+ Turn business input into a PRD-ready brief. This skill ends when the product intent is clear enough for engineering refinement.
55
+
56
+ ## Suitable / Unsuitable
57
+
58
+ - Suitable: goals, user pain points, scope, priority, release intent, meeting notes, product context, prototypes, current implementation facts
59
+ - Unsuitable: implementation details, rule choice, coding tasks, test design, code review
60
+
61
+ ## Workflow
62
+
63
+ 1. Confirm the problem, target user, and expected outcome.
64
+ 2. Separate in-scope, out-of-scope, and assumptions.
65
+ 3. Capture current project facts, prototypes, and implementation facts separately from product intent.
66
+ 4. Write acceptance criteria and open questions.
67
+ 5. Hand off a PRD-ready brief plus project facts, prototypes, and implementation facts to `spec-refinement`.
68
+ 6. Stop before implementation analysis or rule selection.
69
+
70
+ ## Replay Signals
71
+
72
+ - Input signal: business goal, user pain point, release intent, or meeting notes.
73
+ - Output to verify: product objective, scope, acceptance outline, current project facts, prototype notes, implementation facts, open questions, assumptions.
74
+ - Stop signal: any implementation detail, architecture choice, or rule.
75
+ - Handoff signal: a PRD-ready brief is ready for `spec-refinement`.
76
+
77
+ ## Examples
78
+
79
+ - Input: "We need a login reminder feature for inactive users."
80
+ - Output: PRD-ready brief, scope, acceptance outline, current project facts, open questions
81
+ - Stop: do not decide implementation details or rule bundles
82
+
83
+ ## Stop Rules
84
+
85
+ - Stop at product-level framing.
86
+ - Do not write implementation details.
87
+ - Do not write technical design.
88
+ - Do not choose rule bundles.
89
+ - Do not invent technical constraints.
90
+ - Do not generate code-level specs.
91
+ - Do not produce code-oriented specs.
92
+
93
+ ## References
94
+
95
+ - `skills/references/requirements-separation-map.md`
96
+ - `skills/references/rule-loading-map.md`
97
+ - `skills/references/flow-test-cases.md`
98
+ - `skills/spec-refinement/SKILL.md`
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: project-bootstrap
3
+ description: Bootstrap a new workspace with the right skills and rules bundle when a project needs initial setup
4
+ lifecycle_stage: scaffold
5
+ rule_profile: scaffold
6
+ dependencies: []
7
+ triggers:
8
+ - bootstrap
9
+ - init
10
+ - new project
11
+ - workspace setup
12
+ - starter
13
+ - setup
14
+ inputs:
15
+ - client type
16
+ - workspace markers
17
+ - desired rules bundle
18
+ outputs:
19
+ - starter structure
20
+ - installed bundle
21
+ - setup notes
22
+ workflow:
23
+ - detect the target client
24
+ - install the required skill and rules layout
25
+ - write the starter files
26
+ - hand off to the router or intake skill
27
+ gates:
28
+ - stop after setup
29
+ - do not design product scope
30
+ - do not generate application code
31
+ refs:
32
+ - skills/references/rule-loading-map.md
33
+ - skills/references/prompt-replay-checklist.md
34
+ - skills/references/full-chain-replay-scenarios.md
35
+ - rules/index.md
36
+ ---
37
+
38
+ # Project Bootstrap
39
+
40
+ ## Purpose
41
+
42
+ Create a new workspace with the right skills and rules layout.
43
+
44
+ ## Suitable / Unsuitable
45
+
46
+ - Suitable: workspace setup, starter files, rules bundle installation
47
+ - Unsuitable: product discovery, architecture design, feature implementation
48
+
49
+ ## Workflow
50
+
51
+ 1. Detect the target client.
52
+ 2. Install the required skill and rules layout.
53
+ 3. Write the starter files.
54
+ 4. Hand off to the router or intake skill.
55
+
56
+ ## Replay Signals
57
+
58
+ - Input signal: client type, workspace markers, desired rules bundle.
59
+ - Output to verify: starter structure, installed bundle, setup notes.
60
+ - Stop signal: product scope design or application code generation.
61
+ - Handoff signal: the workspace is ready for `workflow-router` or `product-intake`.
62
+
63
+ ## Examples
64
+
65
+ - Input: "Set up a new workspace for Codex with the right skills and rules."
66
+ - Output: starter structure, installed bundle, setup notes
67
+ - Stop: do not design product scope or generate application code
68
+
69
+ ## Stop Rules
70
+
71
+ - Stop after setup.
72
+ - Do not design product scope.
73
+ - Do not generate application code.
74
+
75
+ ## References
76
+
77
+ - `skills/references/rule-loading-map.md`
78
+ - `skills/references/prompt-replay-checklist.md`
79
+ - `skills/references/full-chain-replay-scenarios.md`
80
+ - `rules/index.md`
@@ -0,0 +1,34 @@
1
+ # 角色画像
2
+
3
+ 这个文档定义的是面向审查的角色,以及它们对应的 canonical skill。
4
+
5
+ ## 角色映射
6
+
7
+ | 角色 | 主要 skill | 审查重点 | 输出 |
8
+ |---|---|---|---|
9
+ | 代码审查者 | `code-review` | 分层、命名、可维护性 | 审查报告 |
10
+ | 安全审查者 | `security-review` | 注入、密钥、授权 | 安全报告 |
11
+ | 性能审查者 | `performance-check` | N+1、缓存、延迟、内存 | 性能报告 |
12
+ | 架构审查者 | `spec-refinement` | 边界检查、模块拆分、依赖方向 | 设计补充 |
13
+ | 测试审查者 | `test-design` | 覆盖率、边界场景、回归 | 测试报告 |
14
+
15
+ ## 触发关键词
16
+
17
+ - `code-review`:review、diff、refactor、maintainability
18
+ - `security-review`:security、injection、secret、permission
19
+ - `performance-check`:performance、slow、cache、latency
20
+ - `spec-refinement`:design、architecture、boundary、module split
21
+ - `test-design`:test、coverage、regression、boundary case
22
+
23
+ ## 协作链路
24
+
25
+ ```text
26
+ code-review -> security-review -> performance-check
27
+ spec-refinement -> technical-design -> feature-build
28
+ test-design -> code-review
29
+ ```
30
+
31
+ ## 输出规则
32
+
33
+ - 每个角色只产出一个聚焦的工件。
34
+ - 只有相关审查门禁都通过后,才合并结果。