@pigcloud/skills 1.0.11 → 1.1.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.
Files changed (298) hide show
  1. package/CHANGELOG.md +25 -20
  2. package/README.en.md +41 -75
  3. package/README.md +26 -39
  4. package/bin/cli.js +260 -151
  5. package/bin/rules-loader.js +271 -484
  6. package/codex-commands/README.md +25 -23
  7. package/codex-commands/commands/analyze.md +21 -22
  8. package/codex-commands/commands/build.md +22 -22
  9. package/codex-commands/commands/design.md +21 -22
  10. package/codex-commands/commands/distill.md +21 -21
  11. package/codex-commands/commands/doc.md +21 -22
  12. package/codex-commands/commands/infra.md +21 -21
  13. package/codex-commands/commands/init.md +20 -20
  14. package/codex-commands/commands/kb.md +21 -20
  15. package/codex-commands/commands/perf.md +21 -21
  16. package/codex-commands/commands/prd.md +21 -22
  17. package/codex-commands/commands/review.md +21 -22
  18. package/codex-commands/commands/security.md +21 -22
  19. package/codex-commands/commands/test.md +21 -21
  20. package/codex-commands/commands/workflow.md +21 -20
  21. package/package.json +5 -2
  22. package/rules/core/index.md +26 -41
  23. package/rules/delivery/index.md +25 -0
  24. package/rules/design/index.md +25 -0
  25. package/rules/discovery/index.md +25 -0
  26. package/rules/implementation/index.md +25 -0
  27. package/rules/index.md +24 -39
  28. package/rules/overlays/index.md +19 -19
  29. package/rules/overlays/pig-cloud.md +20 -45
  30. package/rules/shared/index.md +25 -0
  31. package/rules/skill-stage-map.json +26 -0
  32. package/rules/stages.json +48 -0
  33. package/rules/validation/index.md +25 -0
  34. package/scripts/add-skill-reference-nav.js +3 -0
  35. package/scripts/bootstrap-skill-specs.js +96 -0
  36. package/scripts/ci-validator.sh +51 -114
  37. package/scripts/generate-skill-prompt-library.js +3 -0
  38. package/scripts/golden-prompt-suite.current.js +211 -0
  39. package/scripts/migrate-skill-packages.js +309 -0
  40. package/scripts/run-golden-replays.js +110 -79
  41. package/scripts/validate-rules.js +128 -125
  42. package/scripts/validate-skill-replay-signals.js +45 -57
  43. package/scripts/validate-skill-shapes.js +153 -127
  44. package/scripts/validate-skill-stop-rules.js +54 -46
  45. package/skills/01-discovery/ambiguity-detection/SKILL.md +30 -0
  46. package/skills/01-discovery/ambiguity-detection/assets/golden-prompt-suite.current.js +22 -0
  47. package/skills/01-discovery/ambiguity-detection/references/README.md +17 -0
  48. package/skills/01-discovery/ambiguity-detection/references/cases.md +26 -0
  49. package/skills/01-discovery/ambiguity-detection/references/prompt-template.md +18 -0
  50. package/skills/01-discovery/ambiguity-detection/skill-spec.json +26 -0
  51. package/skills/01-discovery/business-analysis/SKILL.md +30 -0
  52. package/skills/01-discovery/business-analysis/assets/golden-prompt-suite.current.js +22 -0
  53. package/skills/01-discovery/business-analysis/references/README.md +17 -0
  54. package/skills/01-discovery/business-analysis/references/cases.md +26 -0
  55. package/skills/01-discovery/business-analysis/references/prompt-template.md +18 -0
  56. package/skills/01-discovery/business-analysis/skill-spec.json +26 -0
  57. package/skills/01-discovery/impact-analysis/SKILL.md +30 -0
  58. package/skills/01-discovery/impact-analysis/assets/golden-prompt-suite.current.js +22 -0
  59. package/skills/01-discovery/impact-analysis/references/README.md +17 -0
  60. package/skills/01-discovery/impact-analysis/references/cases.md +26 -0
  61. package/skills/01-discovery/impact-analysis/references/prompt-template.md +18 -0
  62. package/skills/01-discovery/impact-analysis/skill-spec.json +26 -0
  63. package/skills/01-discovery/requirement-discovery/SKILL.md +30 -0
  64. package/skills/01-discovery/requirement-discovery/assets/golden-prompt-suite.current.js +24 -0
  65. package/skills/01-discovery/requirement-discovery/references/README.md +17 -0
  66. package/skills/01-discovery/requirement-discovery/references/cases.md +28 -0
  67. package/skills/01-discovery/requirement-discovery/references/prompt-template.md +18 -0
  68. package/skills/01-discovery/requirement-discovery/skill-spec.json +26 -0
  69. package/skills/02-design/api-design/SKILL.md +29 -0
  70. package/skills/02-design/api-design/assets/golden-prompt-suite.current.js +22 -0
  71. package/skills/02-design/api-design/references/README.md +17 -0
  72. package/skills/02-design/api-design/references/cases.md +26 -0
  73. package/skills/02-design/api-design/references/prompt-template.md +18 -0
  74. package/skills/02-design/api-design/skill-spec.json +25 -0
  75. package/skills/02-design/architecture-design/SKILL.md +29 -0
  76. package/skills/02-design/architecture-design/assets/golden-prompt-suite.current.js +22 -0
  77. package/skills/02-design/architecture-design/references/README.md +17 -0
  78. package/skills/02-design/architecture-design/references/cases.md +26 -0
  79. package/skills/02-design/architecture-design/references/prompt-template.md +18 -0
  80. package/skills/02-design/architecture-design/skill-spec.json +25 -0
  81. package/skills/02-design/database-design/SKILL.md +29 -0
  82. package/skills/02-design/database-design/assets/golden-prompt-suite.current.js +22 -0
  83. package/skills/02-design/database-design/references/README.md +17 -0
  84. package/skills/02-design/database-design/references/cases.md +26 -0
  85. package/skills/02-design/database-design/references/prompt-template.md +18 -0
  86. package/skills/02-design/database-design/skill-spec.json +25 -0
  87. package/skills/02-design/task-breakdown/SKILL.md +29 -0
  88. package/skills/02-design/task-breakdown/assets/golden-prompt-suite.current.js +22 -0
  89. package/skills/02-design/task-breakdown/references/README.md +17 -0
  90. package/skills/02-design/task-breakdown/references/cases.md +26 -0
  91. package/skills/02-design/task-breakdown/references/prompt-template.md +18 -0
  92. package/skills/02-design/task-breakdown/skill-spec.json +25 -0
  93. package/skills/03-implementation/backend-development/SKILL.md +29 -0
  94. package/skills/03-implementation/backend-development/assets/golden-prompt-suite.current.js +22 -0
  95. package/skills/03-implementation/backend-development/references/README.md +17 -0
  96. package/skills/03-implementation/backend-development/references/cases.md +26 -0
  97. package/skills/03-implementation/backend-development/references/prompt-template.md +18 -0
  98. package/skills/03-implementation/backend-development/skill-spec.json +25 -0
  99. package/skills/03-implementation/bug-fix/SKILL.md +29 -0
  100. package/skills/03-implementation/bug-fix/assets/golden-prompt-suite.current.js +22 -0
  101. package/skills/03-implementation/bug-fix/references/README.md +17 -0
  102. package/skills/03-implementation/bug-fix/references/cases.md +26 -0
  103. package/skills/03-implementation/bug-fix/references/prompt-template.md +18 -0
  104. package/skills/03-implementation/bug-fix/skill-spec.json +25 -0
  105. package/skills/03-implementation/database-change/SKILL.md +29 -0
  106. package/skills/03-implementation/database-change/assets/golden-prompt-suite.current.js +22 -0
  107. package/skills/03-implementation/database-change/references/README.md +17 -0
  108. package/skills/03-implementation/database-change/references/cases.md +26 -0
  109. package/skills/03-implementation/database-change/references/prompt-template.md +18 -0
  110. package/skills/03-implementation/database-change/skill-spec.json +25 -0
  111. package/skills/03-implementation/frontend-development/SKILL.md +29 -0
  112. package/skills/03-implementation/frontend-development/assets/golden-prompt-suite.current.js +22 -0
  113. package/skills/03-implementation/frontend-development/references/README.md +17 -0
  114. package/skills/03-implementation/frontend-development/references/cases.md +26 -0
  115. package/skills/03-implementation/frontend-development/references/prompt-template.md +18 -0
  116. package/skills/03-implementation/frontend-development/skill-spec.json +25 -0
  117. package/skills/04-validation/code-review/SKILL.md +29 -0
  118. package/skills/04-validation/code-review/assets/golden-prompt-suite.current.js +22 -0
  119. package/skills/04-validation/code-review/references/README.md +17 -0
  120. package/skills/04-validation/code-review/references/cases.md +26 -0
  121. package/skills/04-validation/code-review/references/prompt-template.md +18 -0
  122. package/skills/04-validation/code-review/skill-spec.json +25 -0
  123. package/skills/04-validation/performance-review/SKILL.md +29 -0
  124. package/skills/04-validation/performance-review/assets/golden-prompt-suite.current.js +22 -0
  125. package/skills/04-validation/performance-review/references/README.md +17 -0
  126. package/skills/04-validation/performance-review/references/cases.md +26 -0
  127. package/skills/04-validation/performance-review/references/prompt-template.md +18 -0
  128. package/skills/04-validation/performance-review/skill-spec.json +25 -0
  129. package/skills/04-validation/regression-check/SKILL.md +29 -0
  130. package/skills/04-validation/regression-check/assets/golden-prompt-suite.current.js +22 -0
  131. package/skills/04-validation/regression-check/references/README.md +17 -0
  132. package/skills/04-validation/regression-check/references/cases.md +26 -0
  133. package/skills/04-validation/regression-check/references/prompt-template.md +18 -0
  134. package/skills/04-validation/regression-check/skill-spec.json +25 -0
  135. package/skills/04-validation/security-review/SKILL.md +29 -0
  136. package/skills/04-validation/security-review/assets/golden-prompt-suite.current.js +22 -0
  137. package/skills/04-validation/security-review/references/README.md +17 -0
  138. package/skills/04-validation/security-review/references/cases.md +26 -0
  139. package/skills/04-validation/security-review/references/prompt-template.md +18 -0
  140. package/skills/04-validation/security-review/skill-spec.json +25 -0
  141. package/skills/04-validation/unit-test/SKILL.md +29 -0
  142. package/skills/04-validation/unit-test/assets/golden-prompt-suite.current.js +22 -0
  143. package/skills/04-validation/unit-test/references/README.md +17 -0
  144. package/skills/04-validation/unit-test/references/cases.md +26 -0
  145. package/skills/04-validation/unit-test/references/prompt-template.md +18 -0
  146. package/skills/04-validation/unit-test/skill-spec.json +25 -0
  147. package/skills/05-delivery/change-log/SKILL.md +29 -0
  148. package/skills/05-delivery/change-log/assets/golden-prompt-suite.current.js +22 -0
  149. package/skills/05-delivery/change-log/references/README.md +17 -0
  150. package/skills/05-delivery/change-log/references/cases.md +26 -0
  151. package/skills/05-delivery/change-log/references/prompt-template.md +18 -0
  152. package/skills/05-delivery/change-log/skill-spec.json +25 -0
  153. package/skills/05-delivery/deployment-guide/SKILL.md +29 -0
  154. package/skills/05-delivery/deployment-guide/assets/golden-prompt-suite.current.js +22 -0
  155. package/skills/05-delivery/deployment-guide/references/README.md +17 -0
  156. package/skills/05-delivery/deployment-guide/references/cases.md +26 -0
  157. package/skills/05-delivery/deployment-guide/references/prompt-template.md +18 -0
  158. package/skills/05-delivery/deployment-guide/skill-spec.json +25 -0
  159. package/skills/05-delivery/release-check/SKILL.md +29 -0
  160. package/skills/05-delivery/release-check/assets/golden-prompt-suite.current.js +22 -0
  161. package/skills/05-delivery/release-check/references/README.md +17 -0
  162. package/skills/05-delivery/release-check/references/cases.md +26 -0
  163. package/skills/05-delivery/release-check/references/prompt-template.md +18 -0
  164. package/skills/05-delivery/release-check/skill-spec.json +25 -0
  165. package/skills/05-delivery/release-validation/SKILL.md +29 -0
  166. package/skills/05-delivery/release-validation/assets/golden-prompt-suite.current.js +22 -0
  167. package/skills/05-delivery/release-validation/references/README.md +17 -0
  168. package/skills/05-delivery/release-validation/references/cases.md +26 -0
  169. package/skills/05-delivery/release-validation/references/prompt-template.md +18 -0
  170. package/skills/05-delivery/release-validation/skill-spec.json +25 -0
  171. package/skills/shared/codebase-learning/SKILL.md +29 -0
  172. package/skills/shared/codebase-learning/assets/golden-prompt-suite.current.js +22 -0
  173. package/skills/shared/codebase-learning/references/README.md +17 -0
  174. package/skills/shared/codebase-learning/references/cases.md +26 -0
  175. package/skills/shared/codebase-learning/references/prompt-template.md +18 -0
  176. package/skills/shared/codebase-learning/skill-spec.json +25 -0
  177. package/skills/shared/evidence-collector/SKILL.md +29 -0
  178. package/skills/shared/evidence-collector/assets/golden-prompt-suite.current.js +22 -0
  179. package/skills/shared/evidence-collector/references/README.md +17 -0
  180. package/skills/shared/evidence-collector/references/cases.md +26 -0
  181. package/skills/shared/evidence-collector/references/prompt-template.md +18 -0
  182. package/skills/shared/evidence-collector/skill-spec.json +25 -0
  183. package/skills/shared/framework-guide/SKILL.md +28 -0
  184. package/skills/shared/framework-guide/assets/golden-prompt-suite.current.js +22 -0
  185. package/skills/shared/framework-guide/references/README.md +17 -0
  186. package/skills/shared/framework-guide/references/cases.md +26 -0
  187. package/skills/shared/framework-guide/references/prompt-template.md +18 -0
  188. package/skills/shared/framework-guide/skill-spec.json +24 -0
  189. package/rules/bundles.json +0 -358
  190. package/rules/coding/analysis.md +0 -27
  191. package/rules/coding/backend/cache-invalidation.md +0 -30
  192. package/rules/coding/backend/cache-keying.md +0 -30
  193. package/rules/coding/backend/cache.md +0 -37
  194. package/rules/coding/backend/database.md +0 -32
  195. package/rules/coding/backend/feign.md +0 -30
  196. package/rules/coding/backend/index.md +0 -42
  197. package/rules/coding/backend/query.md +0 -32
  198. package/rules/coding/backend/remote.md +0 -33
  199. package/rules/coding/backend/transaction-boundary.md +0 -30
  200. package/rules/coding/backend/transaction-rollback.md +0 -30
  201. package/rules/coding/backend/transaction.md +0 -38
  202. package/rules/coding/boundary.md +0 -25
  203. package/rules/coding/implementation.md +0 -26
  204. package/rules/coding/index.md +0 -38
  205. package/rules/coding/scaffold.md +0 -28
  206. package/rules/coding/testing.md +0 -29
  207. package/rules/coding/validation.md +0 -29
  208. package/rules/core/code-quality.md +0 -30
  209. package/rules/core/evidence.md +0 -26
  210. package/rules/core/interface.md +0 -26
  211. package/rules/core/iteration.md +0 -26
  212. package/rules/core/layer-boundary.md +0 -25
  213. package/rules/core/logging.md +0 -26
  214. package/rules/core/security.md +0 -26
  215. package/rules/core/task-boundary.md +0 -27
  216. package/rules/docs/api.md +0 -34
  217. package/rules/docs/capture-summary.md +0 -29
  218. package/rules/docs/capture.md +0 -34
  219. package/rules/docs/contract.md +0 -30
  220. package/rules/docs/decision-log.md +0 -32
  221. package/rules/docs/examples.md +0 -28
  222. package/rules/docs/index.md +0 -49
  223. package/rules/docs/reference.md +0 -32
  224. package/rules/overlays/pig-cloud/controller.md +0 -33
  225. package/rules/overlays/pig-cloud/dto-vo.md +0 -33
  226. package/rules/overlays/pig-cloud/entity.md +0 -32
  227. package/rules/overlays/pig-cloud/exception.md +0 -32
  228. package/rules/overlays/pig-cloud/layering.md +0 -31
  229. package/rules/overlays/pig-cloud/mapper.md +0 -32
  230. package/rules/overlays/pig-cloud/query-style.md +0 -32
  231. package/rules/overlays/pig-cloud/rest-response.md +0 -33
  232. package/rules/overlays/pig-cloud/service.md +0 -33
  233. package/rules/overlays/pig-cloud/transactions.md +0 -32
  234. package/rules/overlays/pig-cloud/validation.md +0 -33
  235. package/rules/product/acceptance.md +0 -25
  236. package/rules/product/briefing.md +0 -27
  237. package/rules/product/index.md +0 -36
  238. package/rules/product/intake.md +0 -27
  239. package/rules/product/modeling.md +0 -25
  240. package/rules/product/project-context.md +0 -29
  241. package/rules/review/code.md +0 -35
  242. package/rules/review/evidence.md +0 -31
  243. package/rules/review/index.md +0 -50
  244. package/rules/review/java.md +0 -42
  245. package/rules/review/performance.md +0 -38
  246. package/rules/review/rubric.md +0 -28
  247. package/rules/review/security.md +0 -38
  248. package/rules/review/ts.md +0 -33
  249. package/rules/review/vue.md +0 -33
  250. package/rules/skill-profile-map.json +0 -59
  251. package/rules/skill-profile-map.md +0 -29
  252. package/rules/workflow/handoff.md +0 -25
  253. package/rules/workflow/index.md +0 -37
  254. package/rules/workflow/refinement.md +0 -29
  255. package/rules/workflow/router.md +0 -25
  256. package/rules/workflow/selection.md +0 -25
  257. package/rules/workflow/stop.md +0 -25
  258. package/skills/api-contract-docs/SKILL.md +0 -77
  259. package/skills/business-fact-extraction/SKILL.md +0 -337
  260. package/skills/business-fact-extraction/scripts/write-knowledge-base.js +0 -228
  261. package/skills/code-review/SKILL.md +0 -136
  262. package/skills/code-review/references/findings-template.md +0 -51
  263. package/skills/code-review/references/performance-checklist.md +0 -213
  264. package/skills/code-review/references/rubric.md +0 -232
  265. package/skills/code-review/references/rules.md +0 -32
  266. package/skills/code-review/references/security-checklist.md +0 -178
  267. package/skills/code-review/references/stack-notes.md +0 -25
  268. package/skills/code-review/references/template-review.md +0 -39
  269. package/skills/code-review/scripts/lint-code-review.mjs +0 -431
  270. package/skills/domain-modeling/SKILL.md +0 -81
  271. package/skills/domain-modeling/references/README.md +0 -134
  272. package/skills/domain-modeling/references/distillation-checklist.md +0 -44
  273. package/skills/domain-modeling/references/test-cases-template.md +0 -128
  274. package/skills/environment-deploy/SKILL.md +0 -81
  275. package/skills/feature-build/SKILL.md +0 -122
  276. package/skills/feature-build/references/coding-checklist.md +0 -97
  277. package/skills/feature-build/references/comment-specification.md +0 -89
  278. package/skills/knowledge-capture/SKILL.md +0 -93
  279. package/skills/performance-audit/SKILL.md +0 -118
  280. package/skills/project-bootstrap/SKILL.md +0 -81
  281. package/skills/references/anti-rationalization.md +0 -144
  282. package/skills/references/business-fact-extraction.md +0 -415
  283. package/skills/references/engineering-delivery-method.md +0 -64
  284. package/skills/references/engineering-delivery-template.md +0 -81
  285. package/skills/references/golden-prompt-suite.js +0 -436
  286. package/skills/references/golden-prompt-suite.md +0 -33
  287. package/skills/references/project-requirement-alignment.md +0 -42
  288. package/skills/references/rule-loading-map.md +0 -117
  289. package/skills/references/skill-authoring-standard.md +0 -74
  290. package/skills/references/skill-boundary-template.md +0 -71
  291. package/skills/references/skill-enhanced-template.md +0 -103
  292. package/skills/references/skill-reference-matrix.md +0 -62
  293. package/skills/security-audit/SKILL.md +0 -119
  294. package/skills/spec-refinement/SKILL.md +0 -149
  295. package/skills/technical-design/SKILL.md +0 -106
  296. package/skills/technical-design/references/solid-checklist.md +0 -199
  297. package/skills/test-design/SKILL.md +0 -92
  298. package/skills/workflow-router/SKILL.md +0 -86
@@ -1,31 +0,0 @@
1
- # Review Evidence Rules
2
-
3
- ## 默认做法
4
-
5
- - Tie every finding to a file, location, behavior, or observable output.
6
- - State why the issue matters and how to verify the fix.
7
- - Mark uncertainty instead of overstating it.
8
- - Prefer logs, tests, diffs, or reproducible output over inference.
9
- - If the proof is indirect, say what would make it direct.
10
- - Keep the evidence short enough to cite in the review itself.
11
-
12
- ## 禁区
13
-
14
- - Do not use vague concerns as findings.
15
- - Do not claim a risk without showing the source.
16
- - Do not bury the proof in narrative that cannot be checked.
17
-
18
- ## 检查
19
-
20
- - Can another reviewer confirm the finding from the evidence?
21
- - Is the proof close to the code path?
22
- - Would the evidence still make sense if the reporter were unavailable?
23
- - Does the evidence support the recommendation without extra interpretation?
24
-
25
- ## 回放信号
26
-
27
- - Trigger when the review needs stronger proof, reproducibility, or traceability.
28
-
29
- ## References
30
-
31
- - `review/index.md`
@@ -1,50 +0,0 @@
1
- # Review Rules
2
-
3
- `review/` is the review entry point for correctness, security, performance, and stack-specific review guidance.
4
-
5
- ## 默认做法
6
-
7
- - Inspect the submitted change, not the whole repo.
8
- - Produce concrete findings that are verifiable, actionable, and tied to the diff.
9
- - Keep each finding anchored to one file, one issue, and one fix path.
10
- - Include evidence, impact, and recommendation in the review output.
11
- - If evidence is weak, route the task to `evidence` before filing a finding.
12
-
13
- ## 禁区
14
-
15
- - Do not rewrite the implementation during review.
16
- - Do not turn review into a new design discussion.
17
- - Do not file findings without proof.
18
- - Do not stretch the generic profile into a stack-specific baseline.
19
-
20
- ## 检查
21
-
22
- - Are findings concrete?
23
- - Is the fix path small enough to act on?
24
- - Should the report move to `code`, `code-java`, `code-vue`, `code-ts`, `security`, or `performance`?
25
- - Is the finding specific enough to reproduce from the diff?
26
- - Does the finding include the smallest reproducible proof?
27
-
28
- ## 回放信号
29
-
30
- - Trigger when the request is about diff review, risk review, or a quality gate.
31
-
32
- ## References
33
-
34
- - `review/code.md`
35
- - `review/java.md`
36
- - `review/vue.md`
37
- - `review/ts.md`
38
- - `review/security.md`
39
- - `review/performance.md`
40
- - `review/rubric.md`
41
- - `review/evidence.md`
42
-
43
- ## 选择
44
-
45
- - `code` is the generic review profile.
46
- - `code-java` is the Java / Spring / MyBatis / Pig Cloud review overlay.
47
- - `code-vue` is the Vue 3 / frontend review overlay.
48
- - `code-ts` is the TypeScript / frontend utility review overlay.
49
- - `security` stays focused on auth, secrets, and data exposure.
50
- - `performance` stays focused on latency, throughput, and resource usage.
@@ -1,42 +0,0 @@
1
- # Java Review Rules
2
-
3
- ## 默认做法
4
-
5
- - Apply this profile after `review/code.md` when the repository uses Java, Spring, MyBatis, and the Pig Cloud style baseline.
6
- - Use this profile to check the Java-specific contracts that generic review should not own.
7
- - Keep the profile focused on framework conventions, layer boundaries, and persistence behavior.
8
- - If a different stack appears later, add a new stack profile instead of broadening this one.
9
-
10
- ## 禁区
11
-
12
- - Do not use this profile for non-Java syntax or non-Java framework conventions.
13
- - Do not move generic review logic here.
14
- - Do not turn this profile into a second copy of `review/code.md`.
15
-
16
- ## 检查
17
-
18
- - Controller should call Service, not Mapper.
19
- - REST responses should use the unified `Result<T>` wrapper.
20
- - Entities should follow the project delete-base and primary-key conventions.
21
- - Write endpoints should use validation annotations consistently.
22
- - Service-layer transactions should cover multi-write operations.
23
- - MyBatis query code should prefer lambda-style field access.
24
- - Mapper XML should avoid injection-prone `${}` usage unless the value is fully safe and justified.
25
-
26
- ## 回放信号
27
-
28
- - Trigger when the diff touches Java controllers, services, entities, mappers, DTO / VO types, or MyBatis XML.
29
- - Trigger when the task references the Pig Cloud application framework conventions.
30
-
31
- ## References
32
-
33
- - `review/code.md`
34
- - `../overlays/pig-cloud.md`
35
- - `../overlays/pig-cloud/controller.md`
36
- - `../overlays/pig-cloud/service.md`
37
- - `../overlays/pig-cloud/mapper.md`
38
- - `../overlays/pig-cloud/entity.md`
39
- - `../overlays/pig-cloud/rest-response.md`
40
- - `../overlays/pig-cloud/validation.md`
41
- - `../overlays/pig-cloud/query-style.md`
42
- - `../overlays/pig-cloud/transactions.md`
@@ -1,38 +0,0 @@
1
- # Performance Review Rules
2
-
3
- ## 默认做法
4
-
5
- - Check hotspots, unnecessary work, and scalability risks.
6
- - Keep findings tied to observable behavior or code paths.
7
- - Separate constant-factor waste from algorithmic or I/O bottlenecks.
8
- - State the expected impact only when the evidence supports it.
9
- - Mention whether the issue is CPU, memory, network, database, or allocation pressure.
10
- - Prefer a concrete slower path over a vague "this may be slow" statement.
11
-
12
- ## 禁区
13
-
14
- - Do not guess about performance without evidence.
15
- - Do not turn the review into a redesign discussion.
16
- - Do not claim a hotspot without identifying the path that repeats or expands.
17
-
18
- ## 检查
19
-
20
- - Is the bottleneck credible?
21
- - Is the improvement path practical?
22
- - Can the reported issue be observed without speculative load assumptions?
23
- - Can a maintainer reproduce the concern from the code path alone?
24
-
25
- ## Output Shapes
26
-
27
- - Use `location`, `bottleneck type`, `evidence`, `expected impact`, and `optimization advice`.
28
- - Anchor to one query, cache path, allocation path, concurrency path, or hot loop.
29
- - State whether the pressure is CPU, memory, network, database, or allocation-related.
30
- - If the bottleneck is inferred, say what measurement would confirm it.
31
-
32
- ## 回放信号
33
-
34
- - Trigger when the request mentions latency, throughput, load, or resource usage.
35
-
36
- ## References
37
-
38
- - `review/index.md`
@@ -1,28 +0,0 @@
1
- # Review Rubric Rules
2
-
3
- ## 默认做法
4
-
5
- - Score findings by impact, likelihood, and blast radius.
6
- - Keep each finding focused on one issue.
7
- - Prefer a clear severity band over vague language.
8
- - Treat reproducibility and user impact as part of the score.
9
-
10
- ## 禁区
11
-
12
- - Do not merge unrelated issues into one finding.
13
- - Do not bury severity under explanation.
14
-
15
- ## 检查
16
-
17
- - Does each finding have a clear severity?
18
- - Is the recommendation actionable?
19
- - Does the rubric separate severity from the report narrative?
20
- - Can the score be explained in one sentence with evidence?
21
-
22
- ## 回放信号
23
-
24
- - Trigger when a review report needs ranked findings rather than a simple pass/fail.
25
-
26
- ## References
27
-
28
- - `review/index.md`
@@ -1,38 +0,0 @@
1
- # Security Review Rules
2
-
3
- ## 默认做法
4
-
5
- - Check authentication, authorization, secrets, and data exposure.
6
- - Keep findings evidence-based.
7
- - Prefer the smallest proof that demonstrates the exposure or bypass.
8
- - Name the violated trust boundary when it is clear.
9
- - State the attack path, impacted asset, and the minimum change needed to close it.
10
- - Prefer the weakest permission, token, or input that proves the issue.
11
-
12
- ## 禁区
13
-
14
- - Do not assume a vulnerability without proof.
15
- - Do not rewrite the implementation while reviewing.
16
- - Do not report a generic security smell as a confirmed flaw.
17
-
18
- ## 检查
19
-
20
- - Is the risk real and specific?
21
- - Is the fix path small and safe?
22
- - Could the issue be reproduced from the reported evidence?
23
- - Can the reader see why the trust boundary breaks?
24
-
25
- ## Output Shapes
26
-
27
- - Use `location`, `risk level`, `attack path`, `impacted asset`, `evidence`, and `mitigation advice`.
28
- - Anchor to one endpoint, auth flow, permission boundary, secret path, or exposure path.
29
- - State the violated trust boundary when it is clear.
30
- - If the proof is indirect, say what direct evidence is still missing.
31
-
32
- ## 回放信号
33
-
34
- - Trigger when the request mentions secrets, auth, privilege, or data leakage.
35
-
36
- ## References
37
-
38
- - `review/index.md`
@@ -1,33 +0,0 @@
1
- # TypeScript Review Rules
2
-
3
- ## 默认做法
4
-
5
- - Apply this overlay when the diff touches TypeScript source, typed frontend state modules, or TS build/config files.
6
- - Use this overlay to check type boundaries, module boundaries, async control flow, and shared utility correctness.
7
- - Keep the overlay focused on TypeScript-specific conventions. Do not move generic review logic here.
8
- - If the diff also touches Vue files, this overlay should stack with the Vue overlay, not replace it.
9
-
10
- ## 禁区
11
-
12
- - Do not use this overlay for plain JavaScript-only backend files.
13
- - Do not turn this overlay into a second generic review file.
14
- - Do not let type concerns hide data-flow, lifecycle, or API-contract issues.
15
-
16
- ## 检查
17
-
18
- - Types should encode real domain intent, not incidental implementation detail.
19
- - Public interfaces should avoid unnecessary `any` and unsafe narrowing.
20
- - Async functions should handle error and cancellation paths explicitly.
21
- - Shared utilities should be deterministic and side-effect aware.
22
- - State modules should keep mutation and derived state separated.
23
- - Build/config files should stay aligned with the actual TypeScript entrypoints.
24
-
25
- ## 回放信号
26
-
27
- - Trigger when the diff touches `.ts`, `.tsx`, `.d.ts`, `tsconfig*.json`, or TypeScript build configuration.
28
- - Trigger when the task references TypeScript, typed state, or frontend utility review.
29
-
30
- ## References
31
-
32
- - `review/code.md`
33
- - `review/index.md`
@@ -1,33 +0,0 @@
1
- # Vue Review Rules
2
-
3
- ## 默认做法
4
-
5
- - Apply this overlay when the diff touches Vue 3, frontend components, or the frontend build layer.
6
- - Use this overlay to check component boundaries, reactivity usage, template correctness, and state flow.
7
- - Keep the overlay focused on Vue-specific conventions. Do not move generic review logic here.
8
- - If the diff also touches backend code, this overlay should stack with the Java overlay, not replace it.
9
-
10
- ## 禁区
11
-
12
- - Do not use this overlay for backend-only files.
13
- - Do not turn this overlay into a second generic review file.
14
- - Do not let component style concerns hide correctness or data-flow issues.
15
-
16
- ## 检查
17
-
18
- - Component props and emits should be explicit and stable.
19
- - `v-for` should use stable keys.
20
- - Computed state should not be replaced by ad hoc duplication.
21
- - Watchers and effects should have a clear trigger and cleanup path.
22
- - Async UI behavior should handle loading, empty, and error states.
23
- - Shared state should live in the right layer, not inside random components.
24
-
25
- ## 回放信号
26
-
27
- - Trigger when the diff touches `.vue` files, Vue components, frontend state modules, or Vue-specific build configuration.
28
- - Trigger when the task references Vue 3, Composition API, Pinia, or frontend component review.
29
-
30
- ## References
31
-
32
- - `review/code.md`
33
- - `review/index.md`
@@ -1,59 +0,0 @@
1
- {
2
- "workflow-router": {
3
- "bundle": "workflow",
4
- "profile": "router"
5
- },
6
- "spec-refinement": {
7
- "bundle": "workflow",
8
- "profile": "refinement"
9
- },
10
- "technical-design": {
11
- "bundle": "coding",
12
- "profile": "analysis"
13
- },
14
- "feature-build": {
15
- "bundle": "coding",
16
- "profile": "implementation"
17
- },
18
- "test-design": {
19
- "bundle": "coding",
20
- "profile": "testing"
21
- },
22
- "code-review": {
23
- "bundle": "review",
24
- "profile": "code"
25
- },
26
- "domain-modeling": {
27
- "bundle": "product",
28
- "profile": "modeling"
29
- },
30
- "business-fact-extraction": {
31
- "bundle": "product",
32
- "profile": "modeling"
33
- },
34
- "api-contract-docs": {
35
- "bundle": "docs",
36
- "profile": "api"
37
- },
38
- "security-audit": {
39
- "bundle": "review",
40
- "profile": "security"
41
- },
42
- "performance-audit": {
43
- "bundle": "review",
44
- "profile": "performance"
45
- },
46
- "knowledge-capture": {
47
- "bundle": "docs",
48
- "profile": "capture"
49
- },
50
- "project-bootstrap": {
51
- "bundle": "coding",
52
- "profile": "scaffold"
53
- },
54
- "environment-deploy": {
55
- "bundle": "coding",
56
- "profile": "scaffold"
57
- }
58
- }
59
-
@@ -1,29 +0,0 @@
1
- # Rule Profile Map
2
-
3
- This file explains which canonical skill loads which rules bundle and profile.
4
-
5
- ## Mapping
6
-
7
- | Skill | Bundle | Profile |
8
- |---|---|---|
9
- | `workflow-router` | `workflow` | `router` |
10
- | `spec-refinement` | `workflow` | `refinement` |
11
- | `technical-design` | `coding` | `analysis` |
12
- | `feature-build` | `coding` | `implementation` |
13
- | `test-design` | `coding` | `testing` |
14
- | `code-review` | `review` | `code` |
15
- | `domain-modeling` | `product` | `modeling` |
16
- | `business-fact-extraction` | `product` | `modeling` |
17
- | `api-contract-docs` | `docs` | `api` |
18
- | `security-audit` | `review` | `security` |
19
- | `performance-audit` | `review` | `performance` |
20
- | `knowledge-capture` | `docs` | `capture` |
21
- | `project-bootstrap` | `coding` | `scaffold` |
22
- | `environment-deploy` | `coding` | `scaffold` |
23
-
24
- ## Notes
25
-
26
- - `rule_profile` in skill frontmatter is the source of truth.
27
- - `skill-profile-map.json` is kept as a validation and routing fallback.
28
- - `code-review` intentionally uses the generic `code` profile in this repository. Stack-specific review behavior is added by overlays.
29
-
@@ -1,25 +0,0 @@
1
- # Workflow Handoff Rules
2
-
3
- ## 默认做法
4
-
5
- - Capture the current stage outcome and the next owner.
6
- - Keep the transfer note short and specific.
7
- - Link the handoff to the artifact that was just produced.
8
-
9
- ## 禁区
10
-
11
- - Do not re-open completed upstream work.
12
- - Do not start the next stage inside the handoff note.
13
-
14
- ## 检查
15
-
16
- - Is the next owner clear?
17
- - Is the artifact ready to reuse?
18
-
19
- ## 回放信号
20
-
21
- - Trigger when the request is about transfer, wrap-up, or stage transition.
22
-
23
- ## References
24
-
25
- - `workflow/index.md`
@@ -1,37 +0,0 @@
1
- # Workflow Rules
2
-
3
- `workflow/` contains collaboration and handoff rules. It decides how a task moves between stages.
4
-
5
- ## 默认做法
6
-
7
- - Route first, work second.
8
- - Keep handoff boundaries explicit.
9
- - Stop when the current stage has produced its expected artifact.
10
- - Pick the smallest workflow step that can safely move the task forward.
11
-
12
- ## 禁区
13
-
14
- - Do not let workflow rules turn into implementation rules.
15
- - Do not let a routing file contain long task explanations.
16
- - Do not skip the stop boundary.
17
- - Do not skip the stage decision when the input is ambiguous.
18
-
19
- ## 检查
20
-
21
- - Is the current stage clear?
22
- - Is the next stage and handoff target clear?
23
- - Is the artifact ready for the next skill?
24
- - Is the current step ending cleanly?
25
-
26
- ## 回放信号
27
-
28
- - Use this bundle when the input is still ambiguous or the task is mainly about stage selection.
29
- - Use this bundle when a request must be narrowed before product, coding, docs, or review work starts.
30
-
31
- ## References
32
-
33
- - `workflow/router.md`
34
- - `workflow/refinement.md`
35
- - `workflow/handoff.md`
36
- - `workflow/selection.md`
37
- - `workflow/stop.md`
@@ -1,29 +0,0 @@
1
- # Workflow Refinement Rules
2
-
3
- ## 默认做法
4
-
5
- - Turn rough input into a clear brief or scope note.
6
- - Clarify boundaries, assumptions, and missing inputs.
7
- - Stop before implementation detail.
8
- - Capture unresolved questions as explicit follow-up items.
9
- - Preserve decisions that the next stage must not reopen.
10
-
11
- ## 禁区
12
-
13
- - Do not write code.
14
- - Do not turn refinement into product discovery from scratch.
15
- - Do not leave unresolved scope drift in the output.
16
-
17
- ## 检查
18
-
19
- - Is the scope clear enough for the next stage?
20
- - Are assumptions and open questions explicit?
21
- - Can the next stage start without re-interpreting the request?
22
-
23
- ## 回放信号
24
-
25
- - Trigger when the request needs narrowing before product, coding, or review work starts.
26
-
27
- ## References
28
-
29
- - `workflow/index.md`
@@ -1,25 +0,0 @@
1
- # Workflow Router Rules
2
-
3
- ## 默认做法
4
-
5
- - Identify the next stage and the next skill.
6
- - Return a minimal handoff note.
7
- - Do not do the target skill's work.
8
-
9
- ## 禁区
10
-
11
- - Do not start analysis, coding, or review work.
12
- - Do not add rule details to routing output.
13
-
14
- ## 检查
15
-
16
- - Is the next skill unambiguous?
17
- - Is the handoff note minimal and actionable?
18
-
19
- ## 回放信号
20
-
21
- - Trigger when the request only needs stage selection or handoff routing.
22
-
23
- ## References
24
-
25
- - `workflow/index.md`
@@ -1,25 +0,0 @@
1
- # Workflow Selection Rules
2
-
3
- ## 默认做法
4
-
5
- - Decide the next skill based on the current artifact, not the final desired outcome.
6
- - Prefer the earliest stage that can safely absorb the input.
7
- - If the stage is unclear, choose routing over execution.
8
-
9
- ## 禁区
10
-
11
- - Do not skip to implementation when the input is still vague.
12
- - Do not choose a deeper stage just because it is more convenient.
13
-
14
- ## 检查
15
-
16
- - Is the next stage the smallest safe step?
17
- - Is the reason for selection visible?
18
-
19
- ## 回放信号
20
-
21
- - Trigger when the request is asking "what should happen next" or "where should this go".
22
-
23
- ## References
24
-
25
- - `workflow/index.md`
@@ -1,25 +0,0 @@
1
- # Workflow Stop Rules
2
-
3
- ## 默认做法
4
-
5
- - Stop as soon as the current stage has produced its expected artifact.
6
- - Preserve a clean handoff note for the next owner.
7
- - Do not carry next-stage work into the current stage.
8
-
9
- ## 禁区
10
-
11
- - Do not keep refining past the stage boundary.
12
- - Do not smuggle implementation work into a routing or handoff task.
13
-
14
- ## 检查
15
-
16
- - Is the artifact complete for this stage?
17
- - Is the next stage ready to take over?
18
-
19
- ## 回放信号
20
-
21
- - Trigger when a stage boundary, handoff, or stop condition needs to be enforced.
22
-
23
- ## References
24
-
25
- - `workflow/index.md`
@@ -1,77 +0,0 @@
1
- ---
2
- name: api-contract-docs
3
- description: 当接口需要可复用参考文档时,记录稳定的 API 行为、请求、响应契约和示例
4
- lifecycle_stage: capture
5
- rule_profile: api
6
- dependencies:
7
- - spec-refinement
8
- triggers:
9
- - API docs
10
- - contract
11
- - endpoint
12
- - request response
13
- - OpenAPI
14
- - API reference
15
- inputs:
16
- - interface behavior
17
- - endpoint list
18
- - request and response shapes
19
- outputs:
20
- - API document
21
- - contract notes
22
- - examples
23
- workflow:
24
- - extract endpoint behavior
25
- - write request and response contracts
26
- - include examples and constraints
27
- - hand off an API document to knowledge-capture
28
- gates:
29
- - stop at documentation
30
- - do not change implementation
31
- - do not rewrite product scope
32
- refs:
33
- - skills/references/rule-loading-map.md
34
- - skills/references/prompt-replay-checklist.md
35
- - skills/references/full-chain-replay-scenarios.md
36
- - rules/index.md
37
- ---
38
-
39
- # API Contract Docs
40
-
41
- ## Purpose
42
-
43
- Write clear API documentation and contracts for already defined behavior.
44
-
45
- ## Suitable / Unsuitable
46
-
47
- - Suitable: endpoint docs, request/response contracts, examples, API notes
48
- - Unsuitable: implementation changes, product scope changes, rewrite of behavior
49
-
50
- ## Workflow
51
-
52
- 1. Extract endpoint behavior.
53
- 2. Write request and response contracts.
54
- 3. Include examples and constraints.
55
- 4. Hand off an API document to `knowledge-capture`.
56
-
57
- ## Replay Signals
58
-
59
- - Input signal: interface behavior, endpoint list, request and response shapes.
60
- - Output to verify: API document, contract notes, examples.
61
- - Stop signal: implementation changes or product scope changes.
62
- - Handoff signal: an API document is ready for `knowledge-capture`.
63
-
64
- ## Stop Rules
65
-
66
- - Stop at documentation.
67
- - Do not change implementation.
68
- - Do not rewrite product scope.
69
- - Do not turn the task into implementation notes.
70
-
71
- ## References
72
-
73
- - `skills/references/rule-loading-map.md`
74
- - `skills/references/prompt-replay-checklist.md`
75
- - `skills/references/full-chain-replay-scenarios.md`
76
- - `rules/index.md`
77
-