@pigcloud/skills 1.0.10 → 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 +282 -188
  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,30 +0,0 @@
1
- # Backend Transaction Rollback Rules
2
-
3
- ## 默认做法
4
-
5
- - Define rollback behavior for failure paths explicitly.
6
- - Keep local consistency and failure handling together.
7
- - Make retry or compensation decisions visible when needed.
8
- - Say what must roll back, what must compensate, and what can stay committed.
9
- - Mention when retry is safe and when it is not.
10
-
11
- ## 禁区
12
-
13
- - Do not rely on implicit rollback assumptions.
14
- - Do not leave partial-write behavior undocumented.
15
- - Do not hide compensation logic behind a generic failure note.
16
-
17
- ## 检查
18
-
19
- - Is rollback behavior explicit?
20
- - Are failure and compensation paths clear?
21
- - Can the reader see whether the action is retryable, compensatable, or both?
22
-
23
- ## 回放信号
24
-
25
- - Trigger when the task touches rollback, partial failure, or compensation.
26
-
27
- ## References
28
-
29
- - `coding/backend/index.md`
30
- - `coding/backend/transaction.md`
@@ -1,38 +0,0 @@
1
- # Backend Transaction Rules
2
-
3
- ## 默认做法
4
-
5
- - Use this file to choose between boundary and rollback notes.
6
- - Keep the top-level transaction rule focused on the scope decision.
7
- - Use the smallest transaction rule that answers the task.
8
- - If the task needs both scope and failure behavior, answer boundary first and rollback second.
9
- - Keep the result anchored to one service operation or one failure path.
10
- - Tell the reader whether the issue is boundary placement, rollback behavior, or both.
11
- - Use this file for transaction scope selection, not business logic.
12
-
13
- ## 禁区
14
-
15
- - Do not repeat boundary details that already belong in `transaction-boundary`.
16
- - Do not repeat rollback details that already belong in `transaction-rollback`.
17
- - Do not turn this file into a full transaction tutorial.
18
- - Do not hide a rollback concern inside a boundary-only answer.
19
- - Do not use this file as a generic service rule.
20
-
21
- ## 检查
22
-
23
- - Is the task about scope selection, not a detailed rule?
24
- - Should the answer come from the boundary or rollback subrule?
25
- - Is the file still short enough to stay an entry point?
26
- - Would the next step be obvious after reading the chosen subrule?
27
- - Did the answer keep one business operation in view?
28
- - Is this a transaction question rather than a service design question?
29
-
30
- ## 回放信号
31
-
32
- - Trigger when the task touches cross-step data consistency or rollback behavior.
33
-
34
- ## References
35
-
36
- - `coding/backend/index.md`
37
- - `coding/backend/transaction-boundary.md`
38
- - `coding/backend/transaction-rollback.md`
@@ -1,25 +0,0 @@
1
- # Coding Boundary Rules
2
-
3
- ## 默认做法
4
-
5
- - Keep the change inside the agreed technical boundary.
6
- - Respect layer direction, transaction scope, and dependency direction.
7
- - Prefer narrowing a change over pushing a larger refactor through.
8
-
9
- ## 禁区
10
-
11
- - Do not cross layers just to get the task done faster.
12
- - Do not widen the scope without an explicit boundary change.
13
-
14
- ## 检查
15
-
16
- - Does the change stay within the agreed boundary?
17
- - Are layer and dependency directions still intact?
18
-
19
- ## 回放信号
20
-
21
- - Trigger when the task needs boundary enforcement during coding or refactoring.
22
-
23
- ## References
24
-
25
- - `coding/index.md`
@@ -1,26 +0,0 @@
1
- # Coding Implementation Rules
2
-
3
- ## 默认做法
4
-
5
- - Implement only the confirmed scope.
6
- - Keep the change small, reviewable, and verifiable.
7
- - Preserve the agreed boundary while coding.
8
- - Prefer one implementation path over speculative alternatives unless the task explicitly asks for options.
9
-
10
- ## 禁区
11
-
12
- - Do not rewrite the spec-refinement while implementing.
13
- - Do not widen the scope because implementation is difficult.
14
- - Do not skip validation.
15
- - Do not bundle unrelated cleanup into the same change unless it reduces risk.
16
-
17
- ## 检查
18
-
19
- - Does the code stay within scope?
20
- - Can the result be validated locally?
21
- - Is the implementation easy to review in one pass?
22
- - Would the diff still make sense if the task title were removed?
23
-
24
- ## 回放信号
25
-
26
- - Trigger when the task is about implementing a confirmed change.
@@ -1,38 +0,0 @@
1
- # Coding Rules
2
-
3
- `coding/` contains rules for coding, refactoring, testing, and code-adjacent delivery.
4
-
5
- ## 默认做法
6
-
7
- - Keep changes within the confirmed scope.
8
- - Prefer the smallest correct code change that still passes validation.
9
- - Use code rules only when the task actually touches code.
10
- - Keep implementation and validation concerns separated.
11
-
12
- ## 禁区
13
-
14
- - Do not mix product discovery into coding rules.
15
- - Do not let coding rules become a rule encyclopedia.
16
- - Do not expand the implementation boundary because it is convenient.
17
- - Do not ship unvalidated code changes.
18
-
19
- ## 检查
20
-
21
- - Is the current task about code or code-adjacent delivery?
22
- - Is there a smaller bundle that still covers the task?
23
- - Is the change still within the agreed boundary?
24
- - Is there a validation path?
25
-
26
- ## 回放信号
27
-
28
- - Trigger when the request needs analysis, implementation, testing, or scaffolding around code.
29
-
30
- ## References
31
-
32
- - `coding/analysis.md`
33
- - `coding/implementation.md`
34
- - `coding/testing.md`
35
- - `coding/scaffold.md`
36
- - `coding/boundary.md`
37
- - `coding/validation.md`
38
- - `coding/backend/index.md`
@@ -1,28 +0,0 @@
1
- # Coding Scaffold Rules
2
-
3
- ## 默认做法
4
-
5
- - Create the minimum structure needed to start work safely.
6
- - Standardize package names, module layout, and baseline config.
7
- - Make the scaffold ready for the next stage.
8
- - Leave room for the implementation rules to take over without rework.
9
-
10
- ## 禁区
11
-
12
- - Do not add business logic to a scaffold task.
13
- - Do not preload unrelated system details.
14
- - Do not overfit the scaffold to one feature unless the task explicitly says so.
15
-
16
- ## 检查
17
-
18
- - Can the module start from the scaffold?
19
- - Is the next stage ready to take over?
20
- - Is the generated structure minimal and understandable?
21
-
22
- ## 回放信号
23
-
24
- - Trigger when the request is about project bootstrap, starter setup, or environment preparation.
25
-
26
- ## References
27
-
28
- - `coding/index.md`
@@ -1,29 +0,0 @@
1
- # Coding Testing Rules
2
-
3
- ## 默认做法
4
-
5
- - Turn the implementation into testable assertions.
6
- - Cover behavior, regressions, and important edge cases.
7
- - Keep the testing scope aligned with the change scope.
8
- - Prefer tests that fail for the right reason and explain the intended contract.
9
-
10
- ## 禁区
11
-
12
- - Do not write tests that ignore the actual behavior.
13
- - Do not change production code from the testing stage.
14
- - Do not add broad tests that cannot point to the changed behavior.
15
-
16
- ## 检查
17
-
18
- - Do the tests prove the expected behavior?
19
- - Do they expose the main regression risks?
20
- - Do they fail when the behavior changes in the wrong way?
21
- - Can another maintainer tell which assertion protects which behavior?
22
-
23
- ## 回放信号
24
-
25
- - Trigger when the request is about test design, regression coverage, or verification.
26
-
27
- ## References
28
-
29
- - `coding/index.md`
@@ -1,29 +0,0 @@
1
- # Coding Validation Rules
2
-
3
- ## 默认做法
4
-
5
- - Validate the change with the lightest checks that prove correctness.
6
- - Prefer compile, unit, and targeted regression checks before broad verification.
7
- - Keep validation evidence explicit.
8
- - Name the exact command, target, or dataset used for the proof.
9
-
10
- ## 禁区
11
-
12
- - Do not mark a coding task done without validation.
13
- - Do not rely on unverified assumptions about correctness.
14
- - Do not use a broad check when a targeted one already proves the point.
15
-
16
- ## 检查
17
-
18
- - Is there a runnable validation step?
19
- - Is the evidence easy to inspect?
20
- - Does the validation cover the changed path rather than the whole repo by default?
21
- - Can the result be reproduced with the same inputs?
22
-
23
- ## 回放信号
24
-
25
- - Trigger when the request needs compile, test, or local correctness verification.
26
-
27
- ## References
28
-
29
- - `coding/index.md`
@@ -1,30 +0,0 @@
1
- # 代码质量规则
2
-
3
- ## 默认做法
4
-
5
- - 命名遵守项目约定。
6
- - 简单对象可以减少样板代码,但不要以可读性为代价。
7
- - 代码必须可读、可测、可审查。
8
-
9
- ## 禁区
10
-
11
- - 重复 getter/setter。
12
- - 魔法值。
13
- - 过深嵌套。
14
-
15
- ## 检查
16
-
17
- | 类型 | 约定 |
18
- |---|---|
19
- | 类 | PascalCase |
20
- | 方法 | camelCase |
21
- | 常量 | UPPER_SNAKE_CASE |
22
- | 变量 | camelCase |
23
-
24
- ## 回放信号
25
-
26
- - 只要出现可读性、命名、复杂度,就应该读这里。
27
-
28
- ## References
29
-
30
- - `core/index.md`
@@ -1,26 +0,0 @@
1
- # Evidence Rules
2
-
3
- ## 默认做法
4
-
5
- - Base conclusions on inspectable facts, commands, files, or runtime output.
6
- - Mark uncertainty explicitly instead of filling gaps with guesses.
7
- - Prefer direct evidence over memory or impression.
8
-
9
- ## 禁区
10
-
11
- - Do not present speculation as fact.
12
- - Do not hide weak evidence behind confident wording.
13
- - Do not assume a rule applies if the source does not show it.
14
-
15
- ## 检查
16
-
17
- - Is there a file, command output, or runtime result backing the conclusion?
18
- - Is uncertainty labeled?
19
-
20
- ## 回放信号
21
-
22
- - Trigger when the task requires factual verification, comparison, or validation.
23
-
24
- ## References
25
-
26
- - `core/index.md`
@@ -1,26 +0,0 @@
1
- # 接口与契约规则
2
-
3
- ## 默认做法
4
-
5
- - 先定义契约,再写实现。
6
- - 输入输出字段要稳定。
7
- - 对外字段命名要清晰。
8
-
9
- ## 禁区
10
-
11
- - 先写实现再补接口。
12
- - 用临时字段名对外暴露。
13
- - 让一个接口同时承担多个职责。
14
-
15
- ## 检查
16
-
17
- - 入参是否足够表达业务。
18
- - 出参是否足够支撑下一阶段。
19
-
20
- ## 回放信号
21
-
22
- - 只要涉及 API 契约或内部接口边界,就应该读这里。
23
-
24
- ## References
25
-
26
- - `core/index.md`
@@ -1,26 +0,0 @@
1
- # Iteration Rules
2
-
3
- ## 默认做法
4
-
5
- - Use feedback to narrow the next pass instead of restarting the whole task.
6
- - Keep revision notes short and specific.
7
- - Preserve already confirmed boundaries while iterating.
8
-
9
- ## 禁区
10
-
11
- - Do not reopen completed decisions without cause.
12
- - Do not use iteration as a reason to drift scope.
13
- - Do not replace the current artifact when a focused fix is enough.
14
-
15
- ## 检查
16
-
17
- - Does the next iteration only change what is actually needed?
18
- - Are confirmed decisions still preserved?
19
-
20
- ## 回放信号
21
-
22
- - Trigger when the user asks for a refinement, correction, or follow-up pass.
23
-
24
- ## References
25
-
26
- - `core/index.md`
@@ -1,25 +0,0 @@
1
- # 分层边界规则
2
-
3
- ## 默认做法
4
-
5
- - 上层不直接穿透下层。
6
- - 业务编排放在明确的服务层。
7
- - 数据访问层不写业务规则。
8
-
9
- ## 禁区
10
-
11
- - 让控制层绕过服务层。
12
- - 让持久层承载业务编排。
13
- - 在一个层里混入多层职责。
14
-
15
- ## 检查
16
-
17
- - 每个变更是否只有一个主要职责。
18
-
19
- ## 回放信号
20
-
21
- - 只要出现“分层”“穿透”“越层”,就应该读这里。
22
-
23
- ## References
24
-
25
- - `core/index.md`
@@ -1,26 +0,0 @@
1
- # 日志规则
2
-
3
- ## 默认做法
4
-
5
- - 关键路径要留日志。
6
- - 错误要有上下文。
7
- - 日志不要泄漏敏感信息。
8
-
9
- ## 禁区
10
-
11
- - 打印密码、token、密钥。
12
- - 没有上下文的错误日志。
13
- - 过量噪声日志。
14
-
15
- ## 检查
16
-
17
- - 关键操作是否可追踪。
18
- - 故障信息是否能直接定位。
19
-
20
- ## 回放信号
21
-
22
- - 只要出现埋点、诊断、错误定位,就应该读这里。
23
-
24
- ## References
25
-
26
- - `core/index.md`
@@ -1,26 +0,0 @@
1
- # 安全规则
2
-
3
- ## 默认做法
4
-
5
- - 密钥、token、密码不能写进代码。
6
- - 外部输入必须校验。
7
- - 敏感输出必须脱敏。
8
-
9
- ## 禁区
10
-
11
- - 明文配置凭证。
12
- - 把安全检查留到上线后。
13
- - 忽略租户和权限边界。
14
-
15
- ## 检查
16
-
17
- - 是否存在凭证泄漏。
18
- - 是否存在越权或数据外泄。
19
-
20
- ## 回放信号
21
-
22
- - 只要出现认证、授权、密钥、敏感数据,就应该读这里。
23
-
24
- ## References
25
-
26
- - `core/index.md`
@@ -1,27 +0,0 @@
1
- # Task Boundary Rules
2
-
3
- ## 默认做法
4
-
5
- - Restate the task in one sentence before expanding it.
6
- - Separate in-scope, out-of-scope, and assumptions.
7
- - Keep the current step small enough to finish cleanly.
8
-
9
- ## 禁区
10
-
11
- - Do not silently widen the task.
12
- - Do not skip boundary confirmation when the request is ambiguous.
13
- - Do not continue after the stop condition is met.
14
-
15
- ## 检查
16
-
17
- - Is the task boundary explicit?
18
- - Are the expected outputs visible?
19
- - Is the stop condition clear?
20
-
21
- ## 回放信号
22
-
23
- - Trigger when the request is ambiguous, broad, or likely to drift.
24
-
25
- ## References
26
-
27
- - `core/index.md`
package/rules/docs/api.md DELETED
@@ -1,34 +0,0 @@
1
- # API Docs Rules
2
-
3
- ## 默认做法
4
-
5
- - Use this file to choose between `contract`, `examples`, and `reference`.
6
- - Route stable behavior and caller guarantees to `contract`.
7
- - Route walkthrough-style usage to `examples` only when the example adds value.
8
- - Route reusable background material to `reference` when it is not a usage guide.
9
- - If a request mixes all three, split the answer and name the owner of each part.
10
- - Prefer the smallest doc that can answer the request without repeating the full API surface.
11
-
12
- ## 禁区
13
-
14
- - Do not repeat the full contract when `contract` already owns it.
15
- - Do not turn API docs into implementation notes.
16
- - Do not invent behavior that the code does not support.
17
- - Do not let examples become the source of truth.
18
- - Do not hide breaking changes inside a reference page.
19
-
20
- ## 检查
21
-
22
- - Is the task about API docs routing, not the full write-up?
23
- - Should the answer come from contract, examples, or reference?
24
- - Are examples still aligned with the real behavior?
25
- - Would a reader know which file owns the final answer after reading this entry?
26
- - Is the output split cleanly when the request spans more than one doc type?
27
-
28
- ## 回放信号
29
-
30
- - Trigger when the task is about API reference docs or contract explanation.
31
-
32
- ## References
33
-
34
- - `docs/index.md`
@@ -1,29 +0,0 @@
1
- # Docs Capture Summary Rules
2
-
3
- ## 默认做法
4
-
5
- - Capture the minimal summary needed for future reuse.
6
- - Link the summary to the originating artifact and the key decision.
7
- - Keep the summary short enough to scan quickly.
8
- - Use it when the next stage needs only the essence, not the full note.
9
-
10
- ## 禁区
11
-
12
- - Do not recreate the whole discussion.
13
- - Do not mix stable reference content into the capture summary.
14
- - Do not expand the summary into a new decision log entry.
15
-
16
- ## 检查
17
-
18
- - Can another skill reuse the summary without rereading the conversation?
19
- - Is the origin artifact linked?
20
- - Is the summary small enough to fit into a handoff note?
21
-
22
- ## 回放信号
23
-
24
- - Trigger when the task is about a handoff summary or short reusable capture.
25
-
26
- ## References
27
-
28
- - `docs/index.md`
29
- - `docs/capture.md`
@@ -1,34 +0,0 @@
1
- # Knowledge Capture Rules
2
-
3
- ## 默认做法
4
-
5
- - Capture the minimum decisions, constraints, and handoff notes needed downstream.
6
- - Normalize the content so later work can reuse it.
7
- - Keep the capture focused on what the next actor needs, not the full discussion.
8
- - Prefer compact notes that can be copied into the next stage without cleanup.
9
- - Route the note into the correct knowledge layer: requirements knowledge, realtime code knowledge, CodeWiki, or enterprise knowledge.
10
-
11
- ## 禁区
12
-
13
- - Do not re-run upstream analysis.
14
- - Do not generate new requirements or code while capturing.
15
- - Do not mix in long-lived reference content.
16
- - Do not turn capture into a reference page or decision archive.
17
- - Do not merge different knowledge layers into one blob.
18
-
19
- ## 检查
20
-
21
- - Can another skill reuse the note without rereading the whole conversation?
22
- - Is the note concise and linked to its source?
23
- - Does it stay short enough to hand off without cleanup?
24
- - Does it avoid restating background that the next stage does not need?
25
- - Is the target knowledge layer explicit?
26
-
27
- ## 回放信号
28
-
29
- - Trigger when the request is about summaries, decision logs, or reusable handoff notes.
30
-
31
- ## References
32
-
33
- - `docs/index.md`
34
- - `docs/capture-summary.md`
@@ -1,30 +0,0 @@
1
- # Docs Contract Rules
2
-
3
- ## 默认做法
4
-
5
- - Document the stable behavior, inputs, outputs, and constraints.
6
- - Keep the contract independent of walkthrough style.
7
- - Preserve the source of truth for callers.
8
- - Treat the contract as the canonical answer for usage-facing behavior.
9
- - Make the contract testable, precise, and version-aware.
10
-
11
- ## 禁区
12
-
13
- - Do not smuggle implementation detail into the contract.
14
- - Do not make the contract depend on one-off examples.
15
- - Do not move time-bound decisions into the contract.
16
-
17
- ## 检查
18
-
19
- - Is the contract stable enough to survive code changes?
20
- - Can callers rely on it without reading examples?
21
- - Would a breaking change be visible here first?
22
- - Could a test or consumer validate the statement directly?
23
-
24
- ## 回放信号
25
-
26
- - Trigger when the task is about stable API or interface behavior.
27
-
28
- ## References
29
-
30
- - `docs/index.md`
@@ -1,32 +0,0 @@
1
- # Docs Decision Log Rules
2
-
3
- ## 默认做法
4
-
5
- - Record a decision, the reason for it, and the date or context.
6
- - Keep each entry concise and searchable.
7
- - Link each entry to the artifact or change it affects.
8
- - Keep decision logs separate from stable reference pages and captures.
9
- - Use one entry per decision when possible.
10
-
11
- ## 禁区
12
-
13
- - Do not rewrite the whole history.
14
- - Do not mix stable reference content into the decision log.
15
- - Do not turn the decision log into a reference manual.
16
- - Do not store reusable contract content here.
17
-
18
- ## 检查
19
-
20
- - Is the decision explicit?
21
- - Is the rationale concise and tied to the affected artifact?
22
- - Is the entry clearly time-bound?
23
- - Would a later reader know why the decision was made without inferring extra context?
24
- - Can the decision be located quickly by artifact or date?
25
-
26
- ## 回放信号
27
-
28
- - Trigger when the task is about capture, decision history, or a durable rationale note.
29
-
30
- ## References
31
-
32
- - `docs/index.md`
@@ -1,28 +0,0 @@
1
- # Docs Examples Rules
2
-
3
- ## 默认做法
4
-
5
- - Provide small examples that demonstrate the contract.
6
- - Keep examples aligned with the current behavior.
7
- - Prefer examples that help readers understand common use.
8
- - Keep examples subordinate to the contract, not parallel to it.
9
-
10
- ## 禁区
11
-
12
- - Do not let examples drift into hidden requirements.
13
- - Do not use examples to redefine the contract.
14
- - Do not mix example content with policy or decision history.
15
-
16
- ## 检查
17
-
18
- - Do examples match the contract?
19
- - Are they small and representative?
20
- - Can the example be updated without rewriting the rule?
21
-
22
- ## 回放信号
23
-
24
- - Trigger when the task is about usage samples, snippets, or walkthrough examples.
25
-
26
- ## References
27
-
28
- - `docs/index.md`