@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,74 +0,0 @@
1
- # Skill Authoring Standard
2
-
3
- ## Goal
4
- Make every skill easy for AI to detect, cheap to read, and hard to misuse.
5
-
6
- ## Required Shape
7
- - `name`: one canonical skill name
8
- - `description`: action + trigger + scope in one sentence
9
- - `lifecycle_stage`: stable stage label
10
- - `slash_commands`: only when the skill has a real command surface
11
- - `dependencies`: only true hard prerequisites
12
- - `triggers`: exact user phrases and intent keywords
13
- - `inputs`: what the skill consumes
14
- - `outputs`: what the skill must produce
15
- - `workflow`: short ordered steps
16
- - `gates`: objective completion checks
17
- - `refs`: where the long detail lives
18
- - `rule_profile`: optional hint for which rules bundle profile a skill should load
19
-
20
- ## Template Levels
21
- - `short`: use [`skill-boundary-template.md`](skill-boundary-template.md) for routing, intake, capture, and other low-complexity skills.
22
- - `enhanced`: use [`skill-enhanced-template.md`](skill-enhanced-template.md) for design, implementation, review, and other high-density skills.
23
- - Keep one skill on one level unless the skill clearly crosses into a more complex phase.
24
-
25
- ## Token Saving Rules
26
- - Keep the skill body short.
27
- - Move templates, long examples, and repeated background into `references/`.
28
- - Keep rule bundles in `rules/` and point `refs` at the smallest needed bundle.
29
- - Reuse `skills/references/skill-boundary-template.md` for the common skill shape.
30
- - Write once, reference many.
31
- - Prefer bullets over paragraphs.
32
- - Avoid repeating rule bundles in every skill.
33
-
34
- ## AI Recognition Rules
35
- - Put trigger words in the first screen.
36
- - Use one name for one capability.
37
- - Make `description` concrete: verb + object + outcome.
38
- - Keep `lifecycle_stage` and `dependencies` stable.
39
- - Encode hard prerequisites in `dependencies`; keep soft routing hints in `triggers`.
40
- - When a skill needs rules, declare its preferred `rule_profile` rather than repeating rules in prose.
41
- - Add `閫傚悎 / 涓嶉€傚悎` when the skill needs fast routing.
42
- - Put hard-stop rules in `gates`, not in prose.
43
- - Use `Quick Start`, `Inputs / Outputs`, and `Gotchas` only in enhanced skills.
44
-
45
- ## Canonical Order
46
- 1. Purpose
47
- 2. Suitable / Unsuitable
48
- 3. Quick Start
49
- 4. Inputs / Outputs
50
- 5. Workflow
51
- 6. Replay Signals
52
- 7. Gotchas
53
- 8. Stop Rules
54
- 9. References
55
- 10. Safety
56
-
57
- ## What Belongs Outside
58
- - Long tutorials
59
- - Large examples
60
- - Repeated rule details
61
- - External comparison notes
62
- - Shared templates
63
- - Negative replay scenarios
64
-
65
- ## Template Selection
66
- - Short template: `workflow-router`, `knowledge-capture`, `api-contract-docs`, `test-design`, `domain-modeling`, `project-bootstrap`, `environment-deploy`
67
- - Enhanced template: `spec-refinement`, `technical-design`, `feature-build`, `code-review`, `security-audit`, `performance-audit`, `business-fact-extraction`
68
-
69
- ## Quality Bar
70
- - A model should know whether to use the skill in under 10 seconds.
71
- - A model should know what output to produce in under 20 seconds.
72
- - A human should be able to maintain the skill without reading half the repo.
73
- - A reviewer should be able to see the stop boundary and replay signal in one screen.
74
-
@@ -1,71 +0,0 @@
1
- # Skill Boundary Template
2
-
3
- Use this template for simple routing, capture, or handoff skills where the body should stay very small. If the skill needs Quick Start, Inputs / Outputs, or Gotchas, it should probably use the enhanced template instead.
4
-
5
- ## Copyable SKILL.md skeleton
6
-
7
- ```markdown
8
- ---
9
- name: example-skill
10
- description: What the skill does and when to use it, written as one clear sentence.
11
- lifecycle_stage: [routing|capture|scaffold]
12
- rule_profile: [router|capture|scaffold]
13
- dependencies:
14
- - [only hard prerequisites]
15
- triggers:
16
- - [exact phrases or intent keywords]
17
- inputs:
18
- - [artifacts or facts the skill consumes]
19
- outputs:
20
- - [artifacts the skill must produce]
21
- workflow:
22
- - [step 1]
23
- - [step 2]
24
- - [step 3]
25
- gates:
26
- - [objective stop condition]
27
- refs:
28
- - [smallest needed reference file]
29
- ---
30
-
31
- # Example Skill
32
-
33
- ## Purpose
34
-
35
- Describe the skill in one sentence. Keep it narrow.
36
-
37
- ## Suitable / Unsuitable
38
-
39
- - Suitable: [what this skill should handle]
40
- - Unsuitable: [what this skill should not handle]
41
-
42
- ## Workflow
43
-
44
- 1. Identify the request type and boundary.
45
- 2. Do the one bounded step.
46
- 3. Produce the handoff artifact or stop.
47
-
48
- ## Replay Signals
49
-
50
- - Input signal: [what should trigger this skill]
51
- - Output to verify: [what a correct output should include]
52
- - Stop signal: [what means the skill has gone too far]
53
- - Handoff signal: [when to pass control onward]
54
-
55
- ## Stop Rules
56
-
57
- - Stop after the bounded step is complete.
58
- - Do not expand into adjacent skills.
59
- - Do not add long background or policy details.
60
-
61
- ## References
62
-
63
- - [skill-authoring-standard.md](skill-authoring-standard.md)
64
- - [skill-enhanced-template.md](skill-enhanced-template.md)
65
- ```
66
-
67
- ## When to choose the short template
68
-
69
- - Use it for routing-only, capture-only, or single-boundary skills.
70
- - Keep replay signals and stop rules concise.
71
- - Move any detailed guidance into `references/` only if it is truly needed.
@@ -1,103 +0,0 @@
1
- # Skill Enhanced Template
2
-
3
- Use this template for complex skills that need a clear boundary, explicit replay signals, and a small amount of reusable structure. Keep the final skill body short; move long explanations into `references/`.
4
-
5
- ## Copyable SKILL.md skeleton
6
-
7
- ```markdown
8
- ---
9
- name: example-skill
10
- description: What the skill does and when to use it, written as one clear sentence.
11
- lifecycle_stage: [routing|refinement|analysis|implementation|testing|capture|scaffold]
12
- rule_profile: [router|refinement|analysis|implementation|testing|capture|api|scaffold|security|performance|modeling|code]
13
- dependencies:
14
- - [only hard prerequisites]
15
- triggers:
16
- - [exact phrases or intent keywords]
17
- inputs:
18
- - [artifacts or facts the skill consumes]
19
- outputs:
20
- - [artifacts the skill must produce]
21
- workflow:
22
- - [step 1]
23
- - [step 2]
24
- - [step 3]
25
- gates:
26
- - [objective stop condition]
27
- refs:
28
- - [smallest needed reference file]
29
- ---
30
-
31
- # Example Skill
32
-
33
- ## Purpose
34
-
35
- Describe the skill in one sentence. State the outcome, not the implementation.
36
-
37
- ## Suitable / Unsuitable
38
-
39
- - Suitable: [what this skill should handle]
40
- - Unsuitable: [what this skill should not handle]
41
-
42
- ## Quick Start
43
-
44
- - State the first action the model should take.
45
- - State the first artifact it should inspect or produce.
46
- - State the handoff point if another skill should continue.
47
-
48
- ## Inputs / Outputs
49
-
50
- - Inputs:
51
- - [input 1]
52
- - [input 2]
53
- - Outputs:
54
- - [output 1]
55
- - [output 2]
56
-
57
- ## Workflow
58
-
59
- 1. Identify the request type and the boundary.
60
- 2. Gather only the facts needed for this step.
61
- 3. Produce the step-specific artifact.
62
- 4. Hand off or stop when the boundary is reached.
63
-
64
- ## Replay Signals
65
-
66
- - Input signal: [what should trigger this skill]
67
- - Output to verify: [what a correct output should include]
68
- - Stop signal: [what means the skill has gone too far]
69
- - Handoff signal: [when to pass control onward]
70
-
71
- ## Gotchas
72
-
73
- - [common failure mode 1]
74
- - [common failure mode 2]
75
- - [common failure mode 3]
76
-
77
- ## Stop Rules
78
-
79
- - Stop when the step-specific artifact is complete.
80
- - Do not cross into the next skill's work.
81
- - Do not add unrelated context or policy details.
82
-
83
- ## References
84
-
85
- - [skill-authoring-standard.md](skill-authoring-standard.md)
86
- - [skill-boundary-template.md](skill-boundary-template.md)
87
- - [rule-loading-map.md](rule-loading-map.md)
88
- ```
89
-
90
- ## How to use this template
91
-
92
- - Start with the `description` field. It is the primary trigger.
93
- - Keep `dependencies` for hard prerequisites only.
94
- - Put exact trigger phrases in `triggers`.
95
- - Use `workflow` for the minimal reliable procedure.
96
- - Put hard stop conditions in `gates` and `Stop Rules`.
97
- - Keep detailed notes, examples, and variant-specific guidance in `references/`.
98
-
99
- ## When to choose the enhanced template
100
-
101
- - Use it for skills with multiple steps, strict boundaries, or meaningful handoff behavior.
102
- - Use the short template in `skill-boundary-template.md` for simpler routing or capture tasks.
103
- - Prefer the smallest possible reference set that still keeps the skill reliable.
@@ -1,62 +0,0 @@
1
- # Skill Reference Matrix
2
-
3
- ## Governance Context
4
-
5
- - Skills are the execution layer.
6
- - Rules are the constraint layer.
7
- - Workflow decides routing before execution.
8
- - For a broader system view, see [docs/agent-governance-overview.md](../../docs/agent-governance-overview.md).
9
-
10
- ## Borrowed Patterns
11
-
12
- | Source | Best Practice | Applies To |
13
- |---|---|---|
14
- | GitHub Spec Kit | Define before build | `spec-refinement` |
15
- | AWS Kiro EARS | Structured requirement writing | `spec-refinement` |
16
- | RIPER | Research / Innovate / Plan / Execute / Review | `spec-refinement` / routing context |
17
- | Claude Code | Short, dense prompts | all skills |
18
- | open-code-review | Deterministic review plus agent review | `code-review` |
19
- | Skill Reviewer | Rubric-based review gate | `code-review` / `performance-audit` / `security-audit` |
20
- | Short boundary template | One screen for Purpose / Workflow / Replay Signals / Stop Rules | low-complexity skills |
21
- | Enhanced template | Add Quick Start / Inputs / Outputs / Gotchas / References | `spec-refinement` / `technical-design` / `feature-build` / `code-review` / `security-audit` / `performance-audit` |
22
- | Negative replay | Use counterexamples to verify stop boundaries | `spec-refinement` / `technical-design` / `feature-build` / `test-design` |
23
- | Engineering delivery method | Decide complexity first, then split and implement inside `feature-build` | `feature-build` / `test-design` / `code-review` |
24
- | Engineering delivery template | One-page task card with facts, complexity, tasks, self-test, and validation | `feature-build` / `test-design` |
25
-
26
- ## Skill Principles
27
-
28
- - Collect the boundary first, then expand output.
29
- - Use verifiable facts instead of guesses.
30
- - Keep existing boundaries during iteration.
31
- - Let objective gates take priority over narrative explanation.
32
- - Move long content into dedicated references.
33
- - Keep framework rules in `rules/`; do not write them into skill bodies.
34
-
35
- ## Applicable Skills
36
-
37
- - `spec-refinement`: turn product input, current facts, and implementation evidence into an executable spec-refinement
38
- - `technical-design`: turn complex changes into boundaries, dependencies, and rollback
39
- - `feature-build`: turn the confirmed spec-refinement into code
40
- - `test-design`: turn implementation results into a validation plan
41
- - `knowledge-capture`: turn product and engineering facts into requirements knowledge, realtime code facts, CodeWiki entries, enterprise knowledge, and persisted knowledge-base packs
42
- - `api-contract-docs`: turn confirmed interfaces into docs
43
- - `domain-modeling`: turn domain language into boundaries
44
- - `business-fact-extraction`: turn code-backed evidence into code facts, business facts, CodeWiki deltas, and file targets
45
- - `workflow-router`: route the stage
46
- - `code-review`: output generic review findings
47
- - `security-audit`: output security findings
48
- - `performance-audit`: output performance findings
49
-
50
- ## Template Selection
51
-
52
- - Short template: `workflow-router`, `knowledge-capture`, `api-contract-docs`, `test-design`, `domain-modeling`, `project-bootstrap`, `environment-deploy`
53
- - Enhanced template: `spec-refinement`, `technical-design`, `feature-build`, `code-review`, `security-audit`, `performance-audit`, `business-fact-extraction`
54
-
55
- ## Rules Loading
56
-
57
- - `rules/` is the only source for framework knowledge.
58
- - Use `skills/references/rule-loading-map.md` to decide which bundle to load.
59
- - Load the smallest bundle that covers the task.
60
- - Skills should reference at least one `rules` bundle when the task touches code.
61
-
62
-
@@ -1,119 +0,0 @@
1
- ---
2
- name: security-audit
3
- description: 当需要安全结论时,对 diff、接口或设计说明中的认证、密钥或数据暴露风险进行审查
4
- lifecycle_stage: review
5
- rule_profile: security
6
- dependencies:
7
- - feature-build
8
- triggers:
9
- - security
10
- - injection
11
- - secret
12
- - permission
13
- - auth
14
- - data exposure
15
- - trust boundary
16
- inputs:
17
- - diff
18
- - design notes
19
- - endpoint behavior
20
- outputs:
21
- - security findings
22
- - risk level
23
- - mitigation advice
24
- - trust boundary summary
25
- - review summary
26
- workflow:
27
- - identify trust boundaries and sensitive flows
28
- - inspect input validation and authorization
29
- - route generic correctness issues to `code-review`
30
- - rank the risks by severity
31
- - produce mitigation advice
32
- gates:
33
- - stop at security findings
34
- - do not rewrite code
35
- - do not turn into 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
- # Security Audit
44
-
45
- ## Purpose
46
-
47
- Find and rank security risks before release.
48
-
49
- ## Suitable / Unsuitable
50
-
51
- - Suitable: injection, secrets, permissions, auth, data exposure, trust boundary breaks
52
- - Unsuitable: implementation work, broad code review, requirement discovery, generic correctness review
53
-
54
- ## Quick Start
55
-
56
- - Start by mapping trust boundaries and sensitive flows.
57
- - Inspect authorization and input validation before anything else.
58
- - Keep the output focused on findings and mitigation 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 security finding.
64
- - Include `location`, `risk level`, `attack path`, `impacted asset`, `evidence`, and `mitigation advice`.
65
- - Anchor each finding to the smallest relevant security surface:
66
- - endpoint, auth flow, permission boundary, secret handling path, or data exposure path
67
- - State the violated trust boundary when it is clear.
68
- - Keep the review summary short when no security issue is present.
69
- - If there are no findings, say what was checked and why the change is acceptable.
70
-
71
- ## Inputs / Outputs
72
-
73
- - Inputs:
74
- - diff
75
- - design notes
76
- - endpoint behavior
77
- - Outputs:
78
- - security findings
79
- - risk level
80
- - mitigation advice
81
- - trust boundary summary
82
-
83
- ## Workflow
84
-
85
- 1. Identify trust boundaries and sensitive flows.
86
- 2. Inspect input validation and authorization.
87
- 3. Route generic correctness issues to `code-review`.
88
- 4. Rank the risks by severity.
89
- 5. Produce mitigation advice.
90
-
91
- ## Replay Signals
92
-
93
- - Input signal: diff, design notes, endpoint behavior, or a security concern.
94
- - Output to verify: security findings, risk level, mitigation advice, trust boundary 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 blur security review into generic correctness review.
101
- - Do not skip trust boundaries.
102
- - Do not omit risk level when reporting findings.
103
- - Do not approve changes without explicit evidence.
104
- - Do not file a generic code-quality issue as a security finding.
105
-
106
- ## Stop Rules
107
-
108
- - Stop at security findings.
109
- - Do not rewrite code.
110
- - Do not turn into 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`
118
-
119
- # Security Audit
@@ -1,149 +0,0 @@
1
- ---
2
- name: spec-refinement
3
- description: 当需求需要澄清并在设计或实现前对齐时,将 PRD、原型、项目事实、实现事实和知识库证据整理为可执行的规格说明、任务拆分和确认包
4
- lifecycle_stage: refinement
5
- rule_profile: refinement
6
- dependencies:
7
- - workflow-router
8
- triggers:
9
- - spec-refinement
10
- - requirement clarification
11
- - acceptance gap
12
- - engineering spec-refinement
13
- - task breakdown
14
- - execution direction
15
- - confirmation package
16
- inputs:
17
- - approved product brief
18
- - current project facts
19
- - prototype notes
20
- - implementation facts
21
- - scope decisions
22
- - open questions
23
- - rules bundle
24
- outputs:
25
- - executable spec-refinement
26
- - execution direction plan
27
- - acceptance criteria
28
- - impact scope
29
- - implementation inputs
30
- - alignment notes
31
- - task breakdown plan
32
- - conflict map
33
- - confirmation package
34
- workflow:
35
- - verify the product brief is approved
36
- - compare the brief with current project facts, prototype notes, implementation facts, and knowledge snippets
37
- - clarify boundaries, assumptions, acceptance gaps, and fact conflicts
38
- - decide the task execution direction before splitting tasks
39
- - extract a task breakdown plan for user confirmation
40
- - define implementation-facing constraints and verification inputs
41
- - assemble a confirmation package for user sign-off
42
- - hand off to `technical-design` or `feature-build` only after confirmation
43
- gates:
44
- - stop at spec-refinement clarity
45
- - do not restart PRD writing
46
- - do not generate code
47
- - do not skip the selected rules bundle
48
- refs:
49
- - skills/references/requirements-separation-map.md
50
- - skills/references/project-requirement-alignment.md
51
- - skills/references/engineering-delivery-method.md
52
- - skills/references/engineering-delivery-template.md
53
- - skills/references/rule-loading-map.md
54
- - skills/references/flow-test-cases.md
55
- - skills/references/full-chain-replay-scenarios.md
56
- - skills/references/prompt-replay-checklist.md
57
- - rules/index.md
58
- ---
59
-
60
- # Spec Refinement
61
-
62
- ## Purpose
63
-
64
- Turn product input, current project facts, and implementation evidence into an executable engineering spec-refinement.
65
-
66
- ## Suitable / Unsuitable
67
-
68
- - Suitable: requirement clarification, boundary checks, acceptance gaps, impact analysis, project-fact alignment, prototype alignment, implementation-fact alignment, task breakdown, user confirmation
69
- - Unsuitable: redoing the PRD, writing code, selecting rule bundles, skipping the rules bundle, starting implementation before confirmation
70
-
71
- ## Quick Start
72
-
73
- - Start from the approved brief and compare it with current project facts, prototype notes, implementation facts, code, docs, and knowledge snippets.
74
- - Identify acceptance gaps and fact conflicts before writing any implementation-facing spec-refinement.
75
- - Decide the task execution direction before extracting the task breakdown plan.
76
- - Extract the task breakdown plan so feature-build can break the work into small tasks.
77
- - Convert the result into an executable spec-refinement that AI can follow without re-interpreting the PRD.
78
- - Package the spec-refinement, task plan, and acceptance criteria into a confirmation package before execution starts.
79
- - If scope is still unstable, stop and keep the output at spec-refinement clarity.
80
-
81
- ## Inputs / Outputs
82
-
83
- - Inputs:
84
- - approved product brief
85
- - current project facts
86
- - prototype notes
87
- - implementation facts
88
- - knowledge snippets
89
- - scope decisions
90
- - open questions
91
- - rules bundle
92
- - Outputs:
93
- - executable spec-refinement
94
- - execution direction plan
95
- - acceptance criteria
96
- - impact scope
97
- - implementation inputs
98
- - alignment notes
99
- - conflict map
100
- - task breakdown plan
101
- - confirmation package
102
-
103
- ## Workflow
104
-
105
- 1. Verify the product brief is approved.
106
- 2. Compare the brief with current project facts, prototype notes, implementation facts, docs, and known constraints.
107
- 3. Clarify boundaries, assumptions, acceptance gaps, and fact conflicts.
108
- 4. Extract the task breakdown plan for later implementation.
109
- 5. Write the execution direction plan, executable spec-refinement, task breakdown plan, conflict map, implementation inputs, and confirmation package.
110
- 6. Hand off to `technical-design` or `feature-build` when the scope is stable and confirmed.
111
- 7. Stop before code generation.
112
-
113
- ## Replay Signals
114
-
115
- - Input signal: approved PRD, open acceptance gaps, or code-to-requirement alignment work.
116
- - Output to verify: executable spec-refinement, execution direction plan, acceptance criteria, impact scope, alignment notes, conflict map, task breakdown plan, implementation input summary, confirmation package.
117
- - Stop signal: code generation, implementation detail expansion, or redoing the PRD.
118
- - Handoff signal: the spec-refinement is stable enough for `technical-design` or `feature-build`.
119
-
120
- ## Gotchas
121
-
122
- - Do not reopen product discovery.
123
- - Do not ignore current project facts.
124
- - Do not ignore knowledge-base evidence.
125
- - Do not rewrite the PRD during spec-refinement.
126
- - Do not let implementation details leak into the brief.
127
- - Do not collapse the task breakdown plan into one coarse requirement.
128
- - Do not skip the selected rules bundle.
129
-
130
- ## Stop Rules
131
-
132
- - Stop at spec-refinement clarity.
133
- - Do not restart PRD writing.
134
- - Do not rewrite the PRD.
135
- - Do not jump into implementation.
136
- - Do not generate code.
137
- - Do not ignore the selected rules bundle.
138
- - Do not skip the selected rules bundle.
139
-
140
- ## References
141
-
142
- - `skills/references/requirements-separation-map.md`
143
- - `skills/references/project-requirement-alignment.md`
144
- - `skills/references/engineering-delivery-method.md`
145
- - `skills/references/engineering-delivery-template.md`
146
- - `skills/references/rule-loading-map.md`
147
- - `rules/index.md`
148
-
149
-
@@ -1,106 +0,0 @@
1
- ---
2
- name: technical-design
3
- description: 当模块、接口或依赖仍需决策时,在稳定规格基础上梳理架构与实现边界
4
- lifecycle_stage: design
5
- rule_profile: analysis
6
- dependencies:
7
- - spec-refinement
8
- triggers:
9
- - architecture decision
10
- - module split
11
- - interface contract
12
- - dependency direction
13
- - design boundary
14
- inputs:
15
- - executable spec-refinement
16
- - selected rules bundle
17
- - existing module context
18
- outputs:
19
- - design decisions
20
- - dependency map
21
- - interface contract
22
- - implementation constraints
23
- workflow:
24
- - confirm the spec-refinement is stable enough for design work
25
- - define boundaries, dependencies, and interfaces
26
- - map design decisions to the rules bundle
27
- - hand off to feature-build
28
- gates:
29
- - stop at design decisions
30
- - do not reopen product discovery
31
- - do not produce full code
32
- - do not skip rule loading
33
- refs:
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
- - rules/index.md
39
- ---
40
-
41
- # Technical Design
42
-
43
- ## Purpose
44
-
45
- Turn a stable spec-refinement into concrete architecture and implementation boundaries.
46
-
47
- ## Suitable / Unsuitable
48
-
49
- - Suitable: architecture decisions, module split, interfaces, dependency direction, constraint mapping
50
- - Unsuitable: requirement discovery, code generation, redesigning the PRD, unresolved scope gaps, ignoring the rules bundle
51
-
52
- ## Quick Start
53
-
54
- - Start from the stable spec-refinement and isolate the decisions that affect boundaries or dependencies.
55
- - Load the smallest rules bundle that matches the current task context.
56
- - Turn design choices into implementation constraints, not code.
57
- - If the spec-refinement is still unstable, stop and return to `spec-refinement`.
58
-
59
- ## Inputs / Outputs
60
-
61
- - Inputs:
62
- - executable spec-refinement
63
- - selected rules bundle
64
- - existing module context
65
- - Outputs:
66
- - design decisions
67
- - dependency map
68
- - interface contract
69
- - implementation constraints
70
-
71
- ## Workflow
72
-
73
- 1. Confirm the spec-refinement is stable enough for design work.
74
- 2. Define boundaries, dependencies, and interfaces.
75
- 3. Route scope gaps back to `spec-refinement` instead of forcing design decisions.
76
- 4. Map design decisions to the rules bundle.
77
- 5. Produce implementation constraints for `feature-build`.
78
-
79
- ## Replay Signals
80
-
81
- - Input signal: multi-module change, boundary ambiguity, dependency risk, or compatibility concern.
82
- - Output to verify: design decisions, dependency map, interface contract, implementation constraints.
83
- - Stop signal: full code, reopened product discovery, or skipped rules loading.
84
- - Handoff signal: implementation can start inside `feature-build`.
85
-
86
- ## Gotchas
87
-
88
- - Do not turn unresolved requirement issues into design decisions.
89
- - Do not skip rule loading when rule constraints matter.
90
- - Do not output full code or pseudo-code as the design artifact.
91
- - Do not collapse boundaries just to reduce context.
92
- - Do not keep working if the spec-refinement is not stable enough to design.
93
-
94
- ## Stop Rules
95
-
96
- - Stop at design decisions.
97
- - Do not reopen product discovery.
98
- - Do not produce full code.
99
- - Do not skip rule loading.
100
-
101
- ## References
102
-
103
- - `skills/references/rule-loading-map.md`
104
- - `skills/references/flow-test-cases.md`
105
- - `rules/index.md`
106
-