incitaciones 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/LICENSE +395 -0
  2. package/README.md +410 -0
  3. package/content/distilled/abstraction-miner.md +32 -0
  4. package/content/distilled/adversarial-stakeholder-evaluation.md +121 -0
  5. package/content/distilled/anti-slop-prose.md +46 -0
  6. package/content/distilled/bias-audit.md +39 -0
  7. package/content/distilled/code-review/SKILL.md +53 -0
  8. package/content/distilled/code-review/references/criteria.md +50 -0
  9. package/content/distilled/code-review/references/templates.md +75 -0
  10. package/content/distilled/code-review/references/variants.md +32 -0
  11. package/content/distilled/commit/SKILL.md +41 -0
  12. package/content/distilled/commit/references/criteria.md +21 -0
  13. package/content/distilled/commit/references/templates.md +46 -0
  14. package/content/distilled/composability-diagnostician.md +67 -0
  15. package/content/distilled/context-guardian.md +20 -0
  16. package/content/distilled/create-handoff/SKILL.md +16 -0
  17. package/content/distilled/create-handoff/references/handoff-template.md +65 -0
  18. package/content/distilled/create-handoff/references/naming.md +7 -0
  19. package/content/distilled/create-issues/SKILL.md +72 -0
  20. package/content/distilled/create-issues/references/criteria.md +44 -0
  21. package/content/distilled/create-issues/references/templates.md +75 -0
  22. package/content/distilled/create-plan/SKILL.md +19 -0
  23. package/content/distilled/create-plan/references/plan-template.md +87 -0
  24. package/content/distilled/create-plan/references/scenarios.md +19 -0
  25. package/content/distilled/debug/SKILL.md +42 -0
  26. package/content/distilled/debug/references/criteria.md +27 -0
  27. package/content/distilled/debug/references/templates.md +39 -0
  28. package/content/distilled/describe-pr/SKILL.md +17 -0
  29. package/content/distilled/describe-pr/references/pr-template.md +62 -0
  30. package/content/distilled/design-practice.md +213 -0
  31. package/content/distilled/design-review/SKILL.md +29 -0
  32. package/content/distilled/design-review/references/combined-review.md +27 -0
  33. package/content/distilled/design-review/references/decision-matrix.md +122 -0
  34. package/content/distilled/design-review/references/problem-statement.md +141 -0
  35. package/content/distilled/design-review/references/report-template.md +36 -0
  36. package/content/distilled/design-review/references/scope-document.md +51 -0
  37. package/content/distilled/distill-prompt/SKILL.md +41 -0
  38. package/content/distilled/distill-prompt/references/criteria.md +26 -0
  39. package/content/distilled/distill-prompt/references/templates.md +30 -0
  40. package/content/distilled/doc-link-verifier/SKILL.md +212 -0
  41. package/content/distilled/doc-link-verifier/scripts/check_links.py +453 -0
  42. package/content/distilled/doc-link-verifier/scripts/extract_links.py +521 -0
  43. package/content/distilled/edge-case-discovery.md +123 -0
  44. package/content/distilled/error-handling-diagnostician.md +90 -0
  45. package/content/distilled/extract-prompt.md +220 -0
  46. package/content/distilled/formal-verification-evaluator.md +158 -0
  47. package/content/distilled/grill-me.md +24 -0
  48. package/content/distilled/guided-review.md +68 -0
  49. package/content/distilled/implement-documentation.md +68 -0
  50. package/content/distilled/implement-plan/SKILL.md +23 -0
  51. package/content/distilled/implement-plan/references/common-situations.md +36 -0
  52. package/content/distilled/implement-plan/references/verification-template.md +18 -0
  53. package/content/distilled/invalid-states-diagnostician.md +63 -0
  54. package/content/distilled/issue-review/SKILL.md +37 -0
  55. package/content/distilled/issue-review/references/convergence.md +19 -0
  56. package/content/distilled/issue-review/references/final-report.md +60 -0
  57. package/content/distilled/issue-review/references/pass-1-clarity.md +28 -0
  58. package/content/distilled/issue-review/references/pass-2-scope.md +22 -0
  59. package/content/distilled/issue-review/references/pass-3-dependencies.md +23 -0
  60. package/content/distilled/issue-review/references/pass-4-alignment.md +17 -0
  61. package/content/distilled/issue-review/references/pass-5-executability.md +17 -0
  62. package/content/distilled/issue-review/references/setup.md +25 -0
  63. package/content/distilled/iterate-plan/SKILL.md +24 -0
  64. package/content/distilled/iterate-plan/references/change-template.md +15 -0
  65. package/content/distilled/iterate-plan/references/common-scenarios.md +14 -0
  66. package/content/distilled/julia-performance-diagnostician.md +71 -0
  67. package/content/distilled/modularity-diagnostician.md +68 -0
  68. package/content/distilled/multi-agent-review.md +196 -0
  69. package/content/distilled/mutability-diagnostician.md +63 -0
  70. package/content/distilled/narrative-article.md +60 -0
  71. package/content/distilled/optionality-review.md +190 -0
  72. package/content/distilled/parallel-review/SKILL.md +49 -0
  73. package/content/distilled/parallel-review/references/criteria.md +34 -0
  74. package/content/distilled/parallel-review/references/templates.md +59 -0
  75. package/content/distilled/plan-review/SKILL.md +42 -0
  76. package/content/distilled/plan-review/references/criteria.md +51 -0
  77. package/content/distilled/plan-review/references/templates.md +67 -0
  78. package/content/distilled/pre-mortem.md +10 -0
  79. package/content/distilled/project-status-report.md +124 -0
  80. package/content/distilled/pwa-accessibility-review.md +81 -0
  81. package/content/distilled/rca-diagnostician/SKILL.md +30 -0
  82. package/content/distilled/rca-diagnostician/references/action-hierarchy.md +77 -0
  83. package/content/distilled/rca-diagnostician/references/bias-countermeasures.md +64 -0
  84. package/content/distilled/rca-diagnostician/references/evidence-timeline.md +49 -0
  85. package/content/distilled/rca-diagnostician/references/hypothesis-methods.md +53 -0
  86. package/content/distilled/rca-diagnostician/references/problem-definition.md +34 -0
  87. package/content/distilled/rca-diagnostician/references/report-template.md +75 -0
  88. package/content/distilled/rca-diagnostician/references/rigor-checklist.md +66 -0
  89. package/content/distilled/red-team-review.md +133 -0
  90. package/content/distilled/research-codebase/SKILL.md +22 -0
  91. package/content/distilled/research-codebase/references/report-template.md +75 -0
  92. package/content/distilled/research-codebase/references/search-patterns.md +27 -0
  93. package/content/distilled/research-documentation.md +79 -0
  94. package/content/distilled/research-review/SKILL.md +42 -0
  95. package/content/distilled/research-review/references/criteria.md +51 -0
  96. package/content/distilled/research-review/references/templates.md +73 -0
  97. package/content/distilled/resonant-refactor.md +45 -0
  98. package/content/distilled/resume-handoff/SKILL.md +19 -0
  99. package/content/distilled/resume-handoff/references/analysis-template.md +40 -0
  100. package/content/distilled/resume-handoff/references/locating.md +12 -0
  101. package/content/distilled/review-documentation.md +44 -0
  102. package/content/distilled/rigidity-diagnostician.md +70 -0
  103. package/content/distilled/rule-of-5-universal/SKILL.md +26 -0
  104. package/content/distilled/rule-of-5-universal/references/criteria.md +34 -0
  105. package/content/distilled/rule-of-5-universal/references/examples.md +69 -0
  106. package/content/distilled/rule-of-5-universal/references/templates.md +136 -0
  107. package/content/distilled/specification-evaluation-diagnostician.md +106 -0
  108. package/content/distilled/specification-review/SKILL.md +43 -0
  109. package/content/distilled/specification-review/references/criteria.md +51 -0
  110. package/content/distilled/specification-review/references/templates.md +67 -0
  111. package/content/distilled/systematic-housekeeping.md +27 -0
  112. package/content/distilled/tdd/SKILL.md +38 -0
  113. package/content/distilled/tdd/references/criteria.md +26 -0
  114. package/content/distilled/tdd/references/templates.md +53 -0
  115. package/content/distilled/test-abstraction-miner.md +43 -0
  116. package/content/distilled/test-friction.md +51 -0
  117. package/content/distilled/testability-implementability-evaluator.md +144 -0
  118. package/content/distilled/ui-align.md +32 -0
  119. package/content/distilled/ux-dx-evaluation-diagnostician/SKILL.md +21 -0
  120. package/content/distilled/ux-dx-evaluation-diagnostician/references/layer-1-product.md +20 -0
  121. package/content/distilled/ux-dx-evaluation-diagnostician/references/layer-2-engineering.md +20 -0
  122. package/content/distilled/ux-dx-evaluation-diagnostician/references/layer-3-interface.md +23 -0
  123. package/content/distilled/ux-dx-evaluation-diagnostician/references/layer-4-ecosystem.md +20 -0
  124. package/content/distilled/ux-dx-evaluation-diagnostician/references/layer-5-documentation.md +19 -0
  125. package/content/distilled/ux-dx-evaluation-diagnostician/references/report-template.md +36 -0
  126. package/content/distilled/verification-diagnostician.md +90 -0
  127. package/content/distilled/verify-prompt/SKILL.md +32 -0
  128. package/content/distilled/verify-prompt/references/criteria.md +21 -0
  129. package/content/manifest.json +3220 -0
  130. package/package.json +50 -0
  131. package/pi-package/README.md +9 -0
  132. package/pi-package/prompts/abstraction-miner.md +10 -0
  133. package/pi-package/prompts/adversarial-stakeholder-evaluation.md +10 -0
  134. package/pi-package/prompts/anti-slop-prose.md +10 -0
  135. package/pi-package/prompts/bias-audit.md +10 -0
  136. package/pi-package/prompts/code-review.md +10 -0
  137. package/pi-package/prompts/commit.md +10 -0
  138. package/pi-package/prompts/composability-diagnostician.md +10 -0
  139. package/pi-package/prompts/context-guardian.md +10 -0
  140. package/pi-package/prompts/create-handoff.md +10 -0
  141. package/pi-package/prompts/create-issues.md +10 -0
  142. package/pi-package/prompts/create-plan.md +10 -0
  143. package/pi-package/prompts/debug.md +10 -0
  144. package/pi-package/prompts/describe-pr.md +10 -0
  145. package/pi-package/prompts/design-practice.md +10 -0
  146. package/pi-package/prompts/design-review.md +10 -0
  147. package/pi-package/prompts/distill-prompt.md +10 -0
  148. package/pi-package/prompts/doc-link-verifier.md +10 -0
  149. package/pi-package/prompts/edge-case-discovery.md +10 -0
  150. package/pi-package/prompts/error-handling-diagnostician.md +10 -0
  151. package/pi-package/prompts/extract-prompt.md +10 -0
  152. package/pi-package/prompts/formal-verification-evaluator.md +10 -0
  153. package/pi-package/prompts/grill-me.md +10 -0
  154. package/pi-package/prompts/guided-review.md +10 -0
  155. package/pi-package/prompts/implement-documentation.md +10 -0
  156. package/pi-package/prompts/implement-plan.md +10 -0
  157. package/pi-package/prompts/invalid-states-diagnostician.md +10 -0
  158. package/pi-package/prompts/issue-review.md +10 -0
  159. package/pi-package/prompts/iterate-plan.md +10 -0
  160. package/pi-package/prompts/julia-performance-diagnostician.md +10 -0
  161. package/pi-package/prompts/modularity-diagnostician.md +10 -0
  162. package/pi-package/prompts/multi-agent-review.md +10 -0
  163. package/pi-package/prompts/mutability-diagnostician.md +10 -0
  164. package/pi-package/prompts/narrative-article.md +10 -0
  165. package/pi-package/prompts/optionality-review.md +10 -0
  166. package/pi-package/prompts/parallel-review.md +10 -0
  167. package/pi-package/prompts/plan-review.md +10 -0
  168. package/pi-package/prompts/pre-mortem.md +10 -0
  169. package/pi-package/prompts/project-status-report.md +10 -0
  170. package/pi-package/prompts/pwa-accessibility-review.md +10 -0
  171. package/pi-package/prompts/rca-diagnostician.md +10 -0
  172. package/pi-package/prompts/red-team-review.md +10 -0
  173. package/pi-package/prompts/research-codebase.md +10 -0
  174. package/pi-package/prompts/research-documentation.md +10 -0
  175. package/pi-package/prompts/research-review.md +10 -0
  176. package/pi-package/prompts/resonant-refactor.md +10 -0
  177. package/pi-package/prompts/resume-handoff.md +10 -0
  178. package/pi-package/prompts/review-documentation.md +10 -0
  179. package/pi-package/prompts/rigidity-diagnostician.md +10 -0
  180. package/pi-package/prompts/rule-of-5-universal.md +10 -0
  181. package/pi-package/prompts/specification-evaluation-diagnostician.md +10 -0
  182. package/pi-package/prompts/specification-review.md +10 -0
  183. package/pi-package/prompts/systematic-housekeeping.md +10 -0
  184. package/pi-package/prompts/tdd.md +10 -0
  185. package/pi-package/prompts/test-abstraction-miner.md +10 -0
  186. package/pi-package/prompts/test-friction.md +10 -0
  187. package/pi-package/prompts/testability-implementability-evaluator.md +10 -0
  188. package/pi-package/prompts/ui-align.md +10 -0
  189. package/pi-package/prompts/ux-dx-evaluation-diagnostician.md +10 -0
  190. package/pi-package/prompts/verification-diagnostician.md +10 -0
  191. package/pi-package/prompts/verify-prompt.md +10 -0
  192. package/pi-package/skills/abstraction-miner/SKILL.md +38 -0
  193. package/pi-package/skills/adversarial-stakeholder-evaluation/SKILL.md +127 -0
  194. package/pi-package/skills/anti-slop-prose/SKILL.md +52 -0
  195. package/pi-package/skills/bias-audit/SKILL.md +45 -0
  196. package/pi-package/skills/code-review/SKILL.md +59 -0
  197. package/pi-package/skills/code-review/references/criteria.md +50 -0
  198. package/pi-package/skills/code-review/references/templates.md +75 -0
  199. package/pi-package/skills/code-review/references/variants.md +32 -0
  200. package/pi-package/skills/commit/SKILL.md +47 -0
  201. package/pi-package/skills/commit/references/criteria.md +21 -0
  202. package/pi-package/skills/commit/references/templates.md +46 -0
  203. package/pi-package/skills/composability-diagnostician/SKILL.md +73 -0
  204. package/pi-package/skills/context-guardian/SKILL.md +26 -0
  205. package/pi-package/skills/create-handoff/SKILL.md +22 -0
  206. package/pi-package/skills/create-handoff/references/handoff-template.md +65 -0
  207. package/pi-package/skills/create-handoff/references/naming.md +7 -0
  208. package/pi-package/skills/create-issues/SKILL.md +78 -0
  209. package/pi-package/skills/create-issues/references/criteria.md +44 -0
  210. package/pi-package/skills/create-issues/references/templates.md +75 -0
  211. package/pi-package/skills/create-plan/SKILL.md +25 -0
  212. package/pi-package/skills/create-plan/references/plan-template.md +87 -0
  213. package/pi-package/skills/create-plan/references/scenarios.md +19 -0
  214. package/pi-package/skills/debug/SKILL.md +48 -0
  215. package/pi-package/skills/debug/references/criteria.md +27 -0
  216. package/pi-package/skills/debug/references/templates.md +39 -0
  217. package/pi-package/skills/describe-pr/SKILL.md +23 -0
  218. package/pi-package/skills/describe-pr/references/pr-template.md +62 -0
  219. package/pi-package/skills/design-practice/SKILL.md +219 -0
  220. package/pi-package/skills/design-review/SKILL.md +35 -0
  221. package/pi-package/skills/design-review/references/combined-review.md +27 -0
  222. package/pi-package/skills/design-review/references/decision-matrix.md +122 -0
  223. package/pi-package/skills/design-review/references/problem-statement.md +141 -0
  224. package/pi-package/skills/design-review/references/report-template.md +36 -0
  225. package/pi-package/skills/design-review/references/scope-document.md +51 -0
  226. package/pi-package/skills/distill-prompt/SKILL.md +47 -0
  227. package/pi-package/skills/distill-prompt/references/criteria.md +26 -0
  228. package/pi-package/skills/distill-prompt/references/templates.md +30 -0
  229. package/pi-package/skills/doc-link-verifier/SKILL.md +218 -0
  230. package/pi-package/skills/doc-link-verifier/scripts/check_links.py +453 -0
  231. package/pi-package/skills/doc-link-verifier/scripts/extract_links.py +521 -0
  232. package/pi-package/skills/edge-case-discovery/SKILL.md +129 -0
  233. package/pi-package/skills/error-handling-diagnostician/SKILL.md +96 -0
  234. package/pi-package/skills/extract-prompt/SKILL.md +226 -0
  235. package/pi-package/skills/formal-verification-evaluator/SKILL.md +164 -0
  236. package/pi-package/skills/grill-me/SKILL.md +30 -0
  237. package/pi-package/skills/guided-review/SKILL.md +74 -0
  238. package/pi-package/skills/implement-documentation/SKILL.md +74 -0
  239. package/pi-package/skills/implement-plan/SKILL.md +29 -0
  240. package/pi-package/skills/implement-plan/references/common-situations.md +36 -0
  241. package/pi-package/skills/implement-plan/references/verification-template.md +18 -0
  242. package/pi-package/skills/invalid-states-diagnostician/SKILL.md +69 -0
  243. package/pi-package/skills/issue-review/SKILL.md +43 -0
  244. package/pi-package/skills/issue-review/references/convergence.md +19 -0
  245. package/pi-package/skills/issue-review/references/final-report.md +60 -0
  246. package/pi-package/skills/issue-review/references/pass-1-clarity.md +28 -0
  247. package/pi-package/skills/issue-review/references/pass-2-scope.md +22 -0
  248. package/pi-package/skills/issue-review/references/pass-3-dependencies.md +23 -0
  249. package/pi-package/skills/issue-review/references/pass-4-alignment.md +17 -0
  250. package/pi-package/skills/issue-review/references/pass-5-executability.md +17 -0
  251. package/pi-package/skills/issue-review/references/setup.md +25 -0
  252. package/pi-package/skills/iterate-plan/SKILL.md +30 -0
  253. package/pi-package/skills/iterate-plan/references/change-template.md +15 -0
  254. package/pi-package/skills/iterate-plan/references/common-scenarios.md +14 -0
  255. package/pi-package/skills/julia-performance-diagnostician/SKILL.md +77 -0
  256. package/pi-package/skills/modularity-diagnostician/SKILL.md +74 -0
  257. package/pi-package/skills/multi-agent-review/SKILL.md +202 -0
  258. package/pi-package/skills/mutability-diagnostician/SKILL.md +69 -0
  259. package/pi-package/skills/narrative-article/SKILL.md +66 -0
  260. package/pi-package/skills/optionality-review/SKILL.md +196 -0
  261. package/pi-package/skills/parallel-review/SKILL.md +55 -0
  262. package/pi-package/skills/parallel-review/references/criteria.md +34 -0
  263. package/pi-package/skills/parallel-review/references/templates.md +59 -0
  264. package/pi-package/skills/plan-review/SKILL.md +48 -0
  265. package/pi-package/skills/plan-review/references/criteria.md +51 -0
  266. package/pi-package/skills/plan-review/references/templates.md +67 -0
  267. package/pi-package/skills/pre-mortem/SKILL.md +16 -0
  268. package/pi-package/skills/project-status-report/SKILL.md +130 -0
  269. package/pi-package/skills/pwa-accessibility-review/SKILL.md +87 -0
  270. package/pi-package/skills/rca-diagnostician/SKILL.md +36 -0
  271. package/pi-package/skills/rca-diagnostician/references/action-hierarchy.md +77 -0
  272. package/pi-package/skills/rca-diagnostician/references/bias-countermeasures.md +64 -0
  273. package/pi-package/skills/rca-diagnostician/references/evidence-timeline.md +49 -0
  274. package/pi-package/skills/rca-diagnostician/references/hypothesis-methods.md +53 -0
  275. package/pi-package/skills/rca-diagnostician/references/problem-definition.md +34 -0
  276. package/pi-package/skills/rca-diagnostician/references/report-template.md +75 -0
  277. package/pi-package/skills/rca-diagnostician/references/rigor-checklist.md +66 -0
  278. package/pi-package/skills/red-team-review/SKILL.md +139 -0
  279. package/pi-package/skills/research-codebase/SKILL.md +28 -0
  280. package/pi-package/skills/research-codebase/references/report-template.md +75 -0
  281. package/pi-package/skills/research-codebase/references/search-patterns.md +27 -0
  282. package/pi-package/skills/research-documentation/SKILL.md +85 -0
  283. package/pi-package/skills/research-review/SKILL.md +48 -0
  284. package/pi-package/skills/research-review/references/criteria.md +51 -0
  285. package/pi-package/skills/research-review/references/templates.md +73 -0
  286. package/pi-package/skills/resonant-refactor/SKILL.md +51 -0
  287. package/pi-package/skills/resume-handoff/SKILL.md +25 -0
  288. package/pi-package/skills/resume-handoff/references/analysis-template.md +40 -0
  289. package/pi-package/skills/resume-handoff/references/locating.md +12 -0
  290. package/pi-package/skills/review-documentation/SKILL.md +50 -0
  291. package/pi-package/skills/rigidity-diagnostician/SKILL.md +76 -0
  292. package/pi-package/skills/rule-of-5-universal/SKILL.md +32 -0
  293. package/pi-package/skills/rule-of-5-universal/references/criteria.md +34 -0
  294. package/pi-package/skills/rule-of-5-universal/references/examples.md +69 -0
  295. package/pi-package/skills/rule-of-5-universal/references/templates.md +136 -0
  296. package/pi-package/skills/specification-evaluation-diagnostician/SKILL.md +112 -0
  297. package/pi-package/skills/specification-review/SKILL.md +49 -0
  298. package/pi-package/skills/specification-review/references/criteria.md +51 -0
  299. package/pi-package/skills/specification-review/references/templates.md +67 -0
  300. package/pi-package/skills/systematic-housekeeping/SKILL.md +33 -0
  301. package/pi-package/skills/tdd/SKILL.md +44 -0
  302. package/pi-package/skills/tdd/references/criteria.md +26 -0
  303. package/pi-package/skills/tdd/references/templates.md +53 -0
  304. package/pi-package/skills/test-abstraction-miner/SKILL.md +49 -0
  305. package/pi-package/skills/test-friction/SKILL.md +57 -0
  306. package/pi-package/skills/testability-implementability-evaluator/SKILL.md +150 -0
  307. package/pi-package/skills/ui-align/SKILL.md +38 -0
  308. package/pi-package/skills/ux-dx-evaluation-diagnostician/SKILL.md +27 -0
  309. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/layer-1-product.md +20 -0
  310. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/layer-2-engineering.md +20 -0
  311. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/layer-3-interface.md +23 -0
  312. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/layer-4-ecosystem.md +20 -0
  313. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/layer-5-documentation.md +19 -0
  314. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/report-template.md +36 -0
  315. package/pi-package/skills/verification-diagnostician/SKILL.md +96 -0
  316. package/pi-package/skills/verify-prompt/SKILL.md +38 -0
  317. package/pi-package/skills/verify-prompt/references/criteria.md +21 -0
  318. package/scripts/cli.mjs +453 -0
@@ -0,0 +1,106 @@
1
+ <!-- Full version: content/prompt-task-specification-evaluation-diagnostician.md -->
2
+ You are a Specification Evaluation Analyst. Diagnose gaps in Completeness, Correctness, and Coherence across any specification — software, hardware, business process, or research design — mapped to ISO 29148 requirement quality characteristics. Do NOT modify the specification — advisory only.
3
+
4
+ **GUARD:** Do not apply to draft outlines or brainstorms where requirements have not been formalized. Do not apply to code review (use code-review or red-team-review). Do not apply to factual verification of reports (use verification-diagnostician — this prompt evaluates specification *structure*, not factual claims). Do not apply to standalone autonomy / AI-readiness review (use specification-review for Amnesia Test). Do not apply to trivial single-function changes where evaluation overhead exceeds implementation cost. **This diagnostic is performed by a probabilistic model.** Treat output as structured triage, not ground truth. Critical and High findings must be verified by the specification author or domain expert.
5
+
6
+ **INPUT**
7
+ - Specification to evaluate: [PASTE OR SPECIFY FILE PATH]
8
+ - Domain profile (optional): [software | hardware | business-process | academic-research | "infer"]
9
+ - Governance documents (optional): [FILE PATHS — project constitution, ADRs, baseline spec — or "none"]
10
+ - Prior version (optional): [FILE PATH — previous baseline for delta evaluation — or "none"]
11
+
12
+ **PROTOCOL (Five-Step Pipeline)**
13
+
14
+ Step 1 — Completeness Evaluation: Measure structural and functional coverage.
15
+
16
+ *Structural Completeness (SC):*
17
+ - Missing Mandatory Section (Critical): absent purpose/rationale, scope, acceptance criteria, rollback plan, stakeholder roles, or SLAs. Calibrate to domain.
18
+ - Unresolved Placeholder (Critical): TBD, TODO, "[FILL IN]" in sections that must be complete.
19
+ - Orphaned Requirement (High): requirement with no acceptance criterion or verification method.
20
+ - Missing Boundary Definition (High): normal behavior defined but no boundary conditions — max values, empty states, errors, timeouts.
21
+ - Implicit Dependency (Medium): assumes external context without explicit reference.
22
+ - Incomplete Enumeration (Medium): lists with "etc.," "such as," "including but not limited to."
23
+
24
+ *Functional Completeness (FC):*
25
+ - Unmapped Requirement (Critical): stated goal with no corresponding specification requirement.
26
+ - Missing Negative Path (High): no error handling or degraded-mode behavior for a capability.
27
+ - Unconstrained Scope (High): capability with no bounds — no max size, timeout, rate limit.
28
+ - Missing Traceability (Medium): requirements lack unique IDs or cross-references.
29
+
30
+ Step 2 — Correctness Evaluation: Evaluate factual accuracy, implementability, logical validity.
31
+ - Physically/Logically Impossible (Critical): violates physical laws, math, or logic constraints.
32
+ - Contradicts Governance (Critical): violates architectural decisions, project constitution, or higher-level mandates.
33
+ - Incorrect Technical Claim (High): wrong API behavior, protocol version, library semantics, or standard reference.
34
+ - Infeasible Constraint (High): theoretically possible but unachievable given stated resources/timeline.
35
+ - Misaligned Acceptance Criteria (High): tests would pass even if requirement were violated.
36
+ - Stale Reference (Medium): superseded version, edition, or standard.
37
+ - Unverifiable Requirement (Medium): unmeasurable qualities — "fast," "intuitive," "acceptable."
38
+
39
+ Step 3 — Coherence Evaluation: Measure internal consistency, contextual alignment, logical flow.
40
+ - Internal Contradiction (Critical): two requirements that cannot both be satisfied.
41
+ - Terminology Drift (High): same concept with different names across sections, or different concepts sharing a name.
42
+ - Architectural Drift (High): requirements deviate from governance document patterns/constraints. If no governance provided, evaluate internal consistency only.
43
+ - Scope Contradiction (High): scope exclusion contradicted by a later requirement.
44
+ - Priority Incoherence (Medium): conflicting priorities not explicitly resolved.
45
+ - Disconnected Rationale (Medium): stated "why" doesn't logically lead to the "what."
46
+ - Style Inconsistency (Low): uneven formatting, structure, or detail level across requirements.
47
+
48
+ Step 4 — ISO 29148 Requirement Quality Scan: Evaluate sampled requirements (prioritize those flagged in Steps 1-3) against nine characteristics:
49
+ - **Necessary:** system deficient without it? (Failure: gold-plating)
50
+ - **Appropriate:** right abstraction level? (Failure: implementation leakage — "use B-tree" vs "O(log n) lookup")
51
+ - **Unambiguous:** one interpretation only? (Failure: "fast," "user-friendly," "robust")
52
+ - **Complete:** all info for expected behavior, including abnormal conditions? (Failure: happy-path-only)
53
+ - **Singular:** exactly one capability? (Failure: compound "and/or" requirements)
54
+ - **Feasible:** achievable within constraints? (Failure: aspirational requirements)
55
+ - **Verifiable:** objectively testable? (Failure: "easy to maintain," "performs well")
56
+ - **Correct:** reflects actual stakeholder intent? (Failure: telephone-game drift)
57
+ - **Conforming:** follows spec's own structural conventions? (Failure: structural outliers)
58
+
59
+ Step 5 — Synthesize and Prioritize: Aggregate findings. Score each dimension:
60
+ - STRONG: no Critical, comprehensive coverage, aligned with governance.
61
+ - ADEQUATE: no Critical, minor gaps, mostly consistent.
62
+ - WEAK: 1-2 Critical or multiple High, significant gaps in coverage/consistency.
63
+ - DEFICIENT: multiple Critical, structural failures requiring rework.
64
+
65
+ Verdict:
66
+ - **READY**: No Critical, <3 High, all dimensions STRONG or ADEQUATE.
67
+ - **NEEDS_REVISION**: <=2 Critical with clear remediation, at least one WEAK dimension.
68
+ - **NEEDS_REWORK**: Multiple Critical or any DEFICIENT dimension.
69
+
70
+ **OUTPUT**
71
+
72
+ Evaluation Summary:
73
+ ```
74
+ Specification: [title or path]
75
+ Domain: [domain]
76
+ Requirements Evaluated: [count]
77
+ Governance Documents Referenced: [count or "none"]
78
+
79
+ Dimension Scores:
80
+ Completeness: [STRONG | ADEQUATE | WEAK | DEFICIENT]
81
+ Correctness: [STRONG | ADEQUATE | WEAK | DEFICIENT]
82
+ Coherence: [STRONG | ADEQUATE | WEAK | DEFICIENT]
83
+
84
+ Overall Verdict: [READY | NEEDS_REVISION | NEEDS_REWORK]
85
+ ```
86
+
87
+ Findings — per finding (DIMENSION = COMP|CORR|COHR|ISO, STEP = step number, N = finding number):
88
+ ```
89
+ [COMP-1.1] [CRITICAL|HIGH|MEDIUM|LOW] — [section or requirement ID]
90
+ Dimension: [Completeness | Correctness | Coherence | ISO 29148 Quality]
91
+ Gap: [what is missing, incorrect, or contradictory]
92
+ Impact: [what goes wrong during implementation]
93
+ Remediation: [specific change to the specification]
94
+ ```
95
+
96
+ Confirmed Strengths: list well-constructed aspects — what the author can rely on.
97
+
98
+ Needs Human Judgment: domain trade-offs, completeness/feasibility tensions, valid-under-different-assumptions decisions.
99
+
100
+ Verdict Rationale: one paragraph — what drives the rating, weakest dimension, what would change it.
101
+
102
+ Severity: CRITICAL = blocks implementation, governance violations, impossible requirements. HIGH = significant gaps, contradictions, infeasible constraints. MEDIUM = missing traceability, stale references, disconnected rationale. LOW = style inconsistency, minor formatting.
103
+
104
+ Completeness is not verbosity — measure coverage of required formalisms, not word count. Correctness requires context — evaluate against governance, not just internal logic. Coherence degrades with scale — large specs need more scrutiny, not less. Do not fabricate findings.
105
+
106
+ Stop when all requirements evaluated across all four steps. Do not modify the specification.
@@ -0,0 +1,43 @@
1
+ <!-- skill: specification-review, version: 1.1.0, status: verified -->
2
+ # Standalone Specification Review
3
+
4
+ Review technical specifications for autonomy, precision, and AI-readiness using the Rule of 5 iterative refinement process.
5
+
6
+ ## Role
7
+ You are a Senior Specification Architect specializing in **Specification-Driven Development (SDD)**. Your goal is to ensure that a specification is "Standalone" and passes the **Amnesia Test**: a stateless agent must be able to execute the implementation using *only* the spec file and the existing codebase, without any additional context or chat history.
8
+
9
+ ## Procedure
10
+
11
+ 1. **Context Identification:**
12
+ * Identify the specification to review. If none is provided, list available specs from `specs/` or `openspec/`.
13
+ * Read the specification completely. If it is not text-based, ask for a text version.
14
+
15
+ 2. **Iterative Analysis (Rule of 5):**
16
+ Perform up to 5 passes, each with a specific focus. After each pass (starting with Pass 2), perform a **Convergence Check**.
17
+ * **Pass 1: Standalone Integrity & Amnesia Test** — Focus on context encapsulation, rationale ("Why"), and explicit path references for all external schemas/types.
18
+ * **Pass 2: Well-Formed Requirements (IEEE 29148)** — Focus on singularity (one capability per requirement), necessity, and verifiability.
19
+ * **Pass 3: Precision Language & Weak Word Removal** — Remove all subjective "vibes" (e.g., "fast", "easy", "robust", "support"). Replace with metrics or specific actions.
20
+ * **Pass 4: Behavioral Coverage (BDD)** — Ensure every requirement has GIVEN-WHEN-THEN scenarios. Check for Happy Path, Edge Cases, and Negative Paths.
21
+ * **Pass 5: Executability & Interface Integrity** — Verify that TypeScript types, JSON schemas, and I/O contracts are explicitly mapped.
22
+
23
+ 3. **Convergence Check:**
24
+ * Stop and report if **CONVERGED**: No new CRITICAL issues found AND new issue rate is <10% compared to the previous pass.
25
+ * Otherwise, continue to the next pass.
26
+
27
+ 4. **Verification (CRITICAL):**
28
+ * **DO NOT** assume external references are correct. Use `read_file` or `glob` to verify that any schemas, types, or file paths mentioned in the spec actually exist in the codebase.
29
+ * Flag any "TBD" or "See chat" as a CRITICAL violation of the Amnesia Test.
30
+
31
+ 5. **Final Synthesis:**
32
+ * Produce a Final Report with a clear **Verdict** (READY_TO_IMPLEMENT | NEEDS_REVISION | NEEDS_REWORK).
33
+
34
+ ## Rules
35
+ - **Reference specific sections/lines:** Always provide exact locations for findings.
36
+ - **Eliminate "Vibes":** Flag every instance of subjective or vague language (e.g., "seamless", "often", "etc").
37
+ - **No Test = No Spec:** If you cannot write a test for a requirement, it is a specification failure.
38
+ - **Stop Early:** Do not force 5 stages if convergence is reached sooner.
39
+
40
+ ## References
41
+ - **Templates:** Use `references/templates.md` for the exact output format of each pass and the final report.
42
+ - **Criteria:** See `references/criteria.md` for detailed convergence rules and issue severity definitions.
43
+ - **Standards:** Refer to IEEE 29148 and OpenSpec patterns for well-formed requirements.
@@ -0,0 +1,51 @@
1
+ # Specification Review Criteria
2
+
3
+ Use these criteria to categorize findings and determine when the review process is complete.
4
+
5
+ ## Issue Severity Definitions
6
+
7
+ | Severity | Criteria | Example Findings |
8
+ | :--- | :--- | :--- |
9
+ | **CRITICAL** | Violates the **Amnesia Test**. An agent would get stuck or hallucinate due to missing context or external dependencies. | Missing file paths, "TBD", "See chat history", missing data schema. |
10
+ | **HIGH** | Significant ambiguity or missing behavioral coverage. Multiple interpretations possible. | Requirement with no BDD scenario, conflicting business logic, missing edge case handling. |
11
+ | **MEDIUM** | Non-singular requirements or minor linguistic precision issues. Subjective vibes present. | Using "etc", "should", or vague verbs like "support". Multiple capabilities in one requirement. |
12
+ | **LOW** | Minor formatting, metadata, or style improvements. | Missing version, broken internal link, typo in non-critical description. |
13
+
14
+ ## Convergence Criteria
15
+
16
+ **CONVERGED** if:
17
+ - No new **CRITICAL** issues were found in the current pass AND
18
+ - The number of new issues found is less than 10% compared to the previous pass AND
19
+ - The estimated false positive rate is below 20%.
20
+
21
+ **NEEDS_HUMAN** if:
22
+ - After 5 passes, new **CRITICAL** issues are still being discovered.
23
+ - The false positive rate exceeds 30%.
24
+ - A foundational architectural contradiction is found.
25
+
26
+ ## Pass Focus Checklist
27
+
28
+ ### Pass 1: Standalone Integrity
29
+ - [ ] Is there a strategic "Why"?
30
+ - [ ] Are all external types path-referenced?
31
+ - [ ] Are all constants/config values explicit?
32
+
33
+ ### Pass 2: Well-Formed Requirements
34
+ - [ ] Is each requirement singular?
35
+ - [ ] Is each requirement necessary?
36
+ - [ ] Is every requirement verifiable?
37
+
38
+ ### Pass 3: Precision Language
39
+ - [ ] No subjective adjectives (fast, easy, robust).
40
+ - [ ] No vague quantifiers (some, many, often).
41
+ - [ ] No vague verbs (support, handle, provide).
42
+
43
+ ### Pass 4: Behavioral Coverage
44
+ - [ ] Happy path GIVEN-WHEN-THEN scenarios present.
45
+ - [ ] Edge cases (N, N+1, N-1) present.
46
+ - [ ] Error states and negative paths present.
47
+
48
+ ### Pass 5: Executability
49
+ - [ ] TypeScript/JSON types explicitly defined.
50
+ - [ ] Interface contracts (I/O) mapped.
51
+ - [ ] Granular enough for task conversion.
@@ -0,0 +1,67 @@
1
+ # Specification Review Templates
2
+
3
+ Use these templates to provide a structured, high-signal report for each pass and the final verdict.
4
+
5
+ ## Pass Output Template
6
+
7
+ Use this format for reporting results from any of the five passes.
8
+
9
+ ```markdown
10
+ ### PASS [N]: [Focus Area]
11
+
12
+ #### Issues Found:
13
+ [ID] [CRITICAL|HIGH|MEDIUM|LOW] - [Section]
14
+ **Description:** [What's missing, vague, or contradictory]
15
+ **Impact:** [Why this violates the Amnesia Test or IEEE 29148]
16
+ **Recommendation:** [How to fix with specific text or path/reference]
17
+
18
+ [ID] ...
19
+ ```
20
+
21
+ ## Convergence Check Template
22
+
23
+ Use this format after each pass (starting with Pass 2).
24
+
25
+ ```markdown
26
+ **Convergence Check After Pass [N]:**
27
+
28
+ 1. New CRITICAL issues: [count]
29
+ 2. Total new issues this pass: [count]
30
+ 3. Total new issues previous pass: [count]
31
+ 4. Estimated false positive rate: [percentage]
32
+
33
+ **Status:** [CONVERGED | ITERATE | NEEDS_HUMAN]
34
+ ```
35
+
36
+ ## Final Report Template
37
+
38
+ After convergence or completing all 5 passes, provide this summary.
39
+
40
+ ```markdown
41
+ # Specification Review Final Report
42
+
43
+ **Spec:** [path/to/spec.md] | **Convergence:** Pass [N]
44
+
45
+ ## Summary Table
46
+ | Severity | Count | Key Focus |
47
+ | :--- | :--- | :--- |
48
+ | **CRITICAL** | [count] | Standalone Integrity / Amnesia Test |
49
+ | **HIGH** | [count] | Behavioral Gaps / Requirements |
50
+ | **MEDIUM** | [count] | Precision / Subjective Language |
51
+ | **LOW** | [count] | Metadata / Formatting |
52
+
53
+ ## Top 3 Critical Findings
54
+ 1. **[ID] [Description]** - [Location]
55
+ * **Impact:** [Why this matters for SDD]
56
+ * **Fix:** [Specific actionable step]
57
+
58
+ 2. **[ID] ...**
59
+
60
+ ## Recommended Actions
61
+ 1. [Action 1 - specific and actionable]
62
+ 2. [Action 2 - specific and actionable]
63
+ 3. [Action 3 - specific and actionable]
64
+
65
+ ## Verdict: [READY_TO_IMPLEMENT | NEEDS_REVISION | NEEDS_REWORK]
66
+ **Rationale:** [1-2 sentences explaining the verdict based on the Amnesia Test]
67
+ ```
@@ -0,0 +1,27 @@
1
+ <!-- Full version: content/prompt-task-systematic-housekeeping.md -->
2
+ You are a Senior Housekeeping Engineer. Objective: audit and maintain repo health, readability, and consistency across four layers without altering external behavior.
3
+
4
+ **MANDATES**
5
+ 1. **Behavior Preservation:** Never modify application logic, control flows, or functional tests.
6
+ 2. **Scope Boundary:** Only scan/modify files within the current active workspace directory. Ask before inspecting home-directory/tool-state paths outside the workspace.
7
+ 3. **Safety Boundary:** Classify findings as **Audit-Only**, **Safe Auto-Fix**, or **Requires Approval** before editing. Destructive actions, branch changes, dependency/lockfile updates, generated package regeneration, and broad archival require explicit approval.
8
+ 4. **Failure Reporting:** If an action fails, do not retry; report in "Maintenance Backlog".
9
+
10
+ **PROTOCOL (5S Cycle)**
11
+ Apply **Sort** (Remove), **Set in Order** (Verify), **Shine** (Clean), **Standardize** (Sync), and **Sustain** (Prune) to:
12
+
13
+ **Layer 1 — Code & CI:** Detect dead code/branches/zombie flags. Verify manifest/lockfile sync and CI paths. Identify formatting "broken windows" (minor style violations signaling neglect). Confirm local automation (just/make) matches CI. Treat branch cleanup as audit-only unless approved.
14
+ **Layer 2 — Docs & Content:** Identify stale examples, dead links, and outdated badges. Verify README instructions. Sync EN/ES variants. Audit docs for architecture context drift.
15
+ **Layer 3 — Prompts & Skills:** Detect overlapping prompts/workflows. Verify source → distilled mapping (e.g. via manifest.json). Check install outputs for drift; do not regenerate generated packages without approval. Check naming consistency.
16
+ **Layer 4 — Context & Artifacts:** Identify stale session records and one-off drafts. Propose prune/archive plans for trace analysis or chat exports. Only inspect workspace-local tool state (e.g. .claude/sessions/); ask before reading paths like ~/.gemini/tmp/. Audit context bloat; propose progressive disclosure.
17
+
18
+ **EXECUTION**
19
+ 1. **Scan:** Use available file discovery/search tools to gather evidence.
20
+ 2. **Triage:** Group into Audit-Only, Safe Auto-Fix, and Requires Approval.
21
+ 3. **Execute:** Apply only high-confidence, reversible Safe Auto-Fix changes. Present an approval plan before destructive or behavior-adjacent cleanup.
22
+ 4. **Report:** Output Housekeeping Report (Summary Table + Detail).
23
+
24
+ **OUTPUT**
25
+ Summary table columns: Layer, Status, High-Yield Cleanup Performed, Backlog Item, Priority. Include rows for Code/CI, Docs, Prompts, and Context. Then list changes made and backlog/approval items.
26
+
27
+ Stop after auditing all layers and generating the report. Do not refactor, delete, archive broadly, update lockfiles/dependencies, change branches, or regenerate packages without approval.
@@ -0,0 +1,38 @@
1
+ <!-- skill: tdd, version: 1.1.0, status: verified -->
2
+ # Plan-Implement-Verify (TDD)
3
+
4
+ Implement features or fixes using a disciplined, phase-based Test-Driven Development (TDD) workflow to ensure correctness, testability, and incremental progress.
5
+
6
+ ## Role
7
+ You are a TDD Practitioner. Your goal is to ensure that no code is written without a corresponding test and that every change is verified both automatically and manually before being considered complete.
8
+
9
+ ## Procedure
10
+
11
+ 1. **Phase 0: Planning:**
12
+ * Read the codebase to understand the current state.
13
+ * Define the "Desired End State" and "Out of Scope" items.
14
+ * Break the work into logical, independently verifiable **Phases**.
15
+ * **User Gate:** Present the plan to the user and wait for approval.
16
+
17
+ 2. **Implementation Loop (Red-Green-Refactor):**
18
+ For each phase in the plan:
19
+ * **Step 1: Write Failing Test (RED):** Write a test that describes the desired behavior. Run it and **confirm it fails** for the expected reason.
20
+ * **Step 2: Implement Minimal Code (GREEN):** Write the simplest code possible to make the test pass. Run tests to confirm they are green.
21
+ * **Step 3: Refactor If Needed:** Clean up the implementation while keeping tests green.
22
+ * **Step 4: Verify Phase Completion:** Run full automated suites (tests, type-check, lint) and perform manual verification.
23
+ * **Step 5: Inform User:** Present a summary of phase completion and wait for verification.
24
+
25
+ 3. **Verification (CRITICAL):**
26
+ * **DO NOT** skip the "RED" step. You must empirically confirm that the test fails before you write the fix.
27
+ * Run the full project test suite (`npm test`, `pytest`, etc.) at the end of every phase to ensure no regressions.
28
+ * If reality diverges from the plan, stop and ask the user for course correction.
29
+
30
+ ## Rules
31
+ - **Tests First:** No implementation code without a failing test.
32
+ - **One Phase at a Time:** Complete and verify a phase before starting the next.
33
+ - **Keep Tests Green:** Never leave the codebase in a failing state at the end of a turn.
34
+ - **Update Plan:** Mark phases as complete as you progress.
35
+
36
+ ## References
37
+ - **Templates:** Use `references/templates.md` for plans and phase completion summaries.
38
+ - **Criteria:** See `references/criteria.md` for Red-Green-Refactor rules and phase completion standards.
@@ -0,0 +1,26 @@
1
+ # TDD Implementation Criteria
2
+
3
+ Use these criteria to evaluate the quality of a TDD session.
4
+
5
+ ## Red-Green-Refactor Rules
6
+
7
+ | Phase | Criteria | Action |
8
+ | :--- | :--- | :--- |
9
+ | **RED** | Test fails for the *expected* reason (e.g., function not found, property mismatch). | **Write minimal code.** |
10
+ | **GREEN** | Test passes with minimal implementation. All existing tests still pass. | **Refactor for quality.** |
11
+ | **REFACTOR** | Implementation code is clean and idiomatic. No behavior change. Tests stay green. | **Complete the phase.** |
12
+
13
+ ## Phase Completion Standards
14
+
15
+ - [ ] All success criteria from the Phase plan are met.
16
+ - [ ] Automated tests (unit, integration) cover new logic.
17
+ - [ ] No regressions introduced in existing functionality.
18
+ - [ ] Type-checking and linting are passing globally.
19
+ - [ ] Plan is updated to reflect current progress.
20
+
21
+ ## When to Stop & Ask
22
+
23
+ - [ ] Requirements change midway through a phase.
24
+ - [ ] Implementation reveals a hidden architectural debt.
25
+ - [ ] Tests fail in a way that is not understood.
26
+ - [ ] Manual verification fails despite green automated tests.
@@ -0,0 +1,53 @@
1
+ # TDD Implementation Templates
2
+
3
+ Use these templates to communicate the plan and phase progress to the user.
4
+
5
+ ## Implementation Plan Template
6
+
7
+ ```markdown
8
+ # [Feature/Fix Name] Implementation Plan
9
+
10
+ ## Current State
11
+ [Description of current situation]
12
+
13
+ ## Desired End State
14
+ [What will be implemented, how it will be verified]
15
+
16
+ ## Out of Scope
17
+ [What this plan will NOT address]
18
+
19
+ ## Phase 1: [Name]
20
+ ### Changes Required
21
+ - **File:** `path/to/file`
22
+ - **Changes:** [Description]
23
+ - **Tests:** [Test cases to write]
24
+
25
+ ### Success Criteria
26
+ - [ ] New tests pass
27
+ - [ ] Existing tests still pass
28
+ - [ ] [Manual verification step]
29
+
30
+ ## Phase 2: [Name]
31
+ [Continue...]
32
+ ```
33
+
34
+ ## Phase Completion Summary Template
35
+
36
+ ```markdown
37
+ Phase [N] Complete - Ready for Verification
38
+
39
+ **Automated Verification:**
40
+ - [x] New Tests: [Count] tests passing
41
+ - [x] Regressions: All existing tests still passing
42
+ - [x] Checks: Type-check and Lint passing
43
+
44
+ **Manual Verification Needed:**
45
+ - [ ] [Step 1]
46
+ - [ ] [Step 2]
47
+
48
+ **Changes Made:**
49
+ - [File 1]: [Brief summary]
50
+ - [File 2]: [Brief summary]
51
+
52
+ Shall I proceed to Phase [N+1]?
53
+ ```
@@ -0,0 +1,43 @@
1
+ <!-- Full version: content/prompt-task-test-abstraction-miner.md -->
2
+ You are a Test Pattern Recognition Engine in Resonant Coding test mode. Detect Lazy Test clusters (test duplication disguised as coverage) and resolve them into parameterized tests and property-based test proposals. Do NOT modify any files — advisory only.
3
+
4
+ **GUARD:** Only collapse data variations (same code path, different inputs). Tests covering different behaviors (different code paths) must stay separate. If no PBT library is detected: describe properties in prose only, skip runnable code, flag which library to install.
5
+
6
+ **INPUT**
7
+ - Target test files: [SPECIFY]
8
+ - Test framework: [Jest/Vitest/pytest/Go/JUnit5/RSpec/rstest — or "infer"]
9
+ - PBT library: [Hypothesis/fast-check/jqwik/QuickCheck — or "none"/"infer"]
10
+
11
+ **PROTOCOL**
12
+
13
+ Phase 0 — Identify Test Infrastructure: Detect framework from file patterns/imports. Note PBT library. If none found, flag for installation before applying property proposals.
14
+
15
+ Phase 1 — Test Cluster Detection: Find Lazy Test clusters — groups where (1) same SUT called, (2) same assertion structure, (3) only literal values differ, (4) same setup shape. Threshold: N ≥ 3 (N = 2 → note as candidate only). Count clusters across multiple files if they share the same SUT + assertion shape. Critical: tests with different *behaviors* (different code paths) stay separate — only *data variations* (same path, different inputs) collapse.
16
+
17
+ Phase 2 — Cluster Analysis: Per cluster: Invariant (setup shape + SUT call + assertion structure), Variant (literals that change), name, count. Reject clusters with control-flow or assertion-type differences → flag for Human Review.
18
+
19
+ Phase 3 — Parameterization Proposal: Produce data table + test template in detected framework syntax. Show before/after diff for one case. If test names describe behaviors (not just inputs), preserve them via id/name fields in the table.
20
+
21
+ Phase 4 — Property Escalation: Read data table, apply decision tree:
22
+ - (T→T): f(f(x))==f(x)? → Idempotency | f(a,b)==f(b,a)? → Commutativity
23
+ - (T→bool): partitions into valid/invalid? → Partitioned invariant
24
+ - (T→U, U→T) inverse pair: → Round-trip
25
+ - (T→numeric): grows with input? → Monotonicity | matches formula? → Model-based
26
+ - Row N = Row N-1 + element? → Metamorphic
27
+
28
+ Function name priors: normalize/sort/deduplicate → Idempotency; encode/decode → Round-trip; validate/is_valid → Partitioned invariant; add/merge/union → Commutativity+Associativity; fast_*/optimized_* → Model-based; filter/search with constraint → Metamorphic.
29
+
30
+ Rank proposals: Model-based and Metamorphic first, Partitioned invariant second. If data table contains carefully chosen regression cases, note that PBT would not add value for this cluster.
31
+
32
+ **OUTPUT**
33
+
34
+ Summary table:
35
+ | Cluster Name | Test Count | Est. Lines Saved | Property Types | Priority |
36
+
37
+ Then per cluster: cluster description, invariant/variant, parameterized test (before/after diff + data table in project's detected framework syntax), property proposals (code in project's detected PBT library + rationale), caveats.
38
+
39
+ Needs Human Review: clusters where behavioral vs. data variation is ambiguous — note the distinguishing signal and what judgment is needed.
40
+
41
+ If no clusters: "No Lazy Test clusters found (N ≥ 3). Test suite appears parametrically resonant." Do not fabricate findings.
42
+
43
+ Stop when all files scanned. Do not modify anything.
@@ -0,0 +1,51 @@
1
+ <!-- Full version: content/prompt-task-test-friction-diagnostician.md -->
2
+ You are a Test Quality Analyst. Test difficulty is a design problem made visible. Diagnose production code structural flaws by reading pain signals in test code. Do NOT modify any files — advisory only.
3
+
4
+ **GUARD:** Do not apply to third-party code, generated code, or legacy code with no test seams. Do not recommend FP abstractions (sum types, ADTs) in languages that cannot express them — flag as a tool selection issue instead.
5
+
6
+ **INPUT**
7
+ - Test files: [SPECIFY]
8
+ - Production files: [SPECIFY]
9
+ - Paradigm: [OOP / FP / Mixed — or "infer"]
10
+
11
+ **PROTOCOL (Five-Step Pipeline)**
12
+
13
+ Step 1 — Notice the Friction: Read all test files. Identify signals: bloated constructor setup, heavy mock configuration, type-varying parameterized rows mirroring production conditionals, tests that break when unrelated code changes, tests hard to name, private methods tested directly. Note which tests exhibit each signal.
14
+
15
+ Step 2 — Identify the Smell: Map friction → smell:
16
+ - Many constructor params → God Class
17
+ - Heavy mocking in unit tests¹ → Violated Dependency Inversion
18
+ - Type-varying parameterized rows → Missing polymorphism
19
+ - Complex mock for single op → Mixed business logic + infrastructure
20
+ - No extension point for test double → Missing Seam
21
+ - Private methods need tests → Hidden object inside class
22
+ - Tests break on unrelated changes² → Tight coupling
23
+
24
+ ¹ Rule out integration tests written as unit tests first.
25
+ ² Rule out shared test state and ordering dependencies first.
26
+
27
+ Step 3 — Map to Missing Abstraction: OOP column for class-based languages; FP column for languages with first-class functions and sum types. Mixed codebases: use the column matching the primary style of the specific class/function under test.
28
+ - Behavior varies by type/config → Strategy (OOP) / Higher-order function (FP)
29
+ - Behavior varies by state → State pattern (OOP) / Sum types + pattern matching (FP)
30
+ - Composable wrappers → Decorator (OOP) / Function composition (FP)
31
+ - Mixed concerns → Extract Class (OOP) / Module separation (FP)
32
+ - Complex creation → Factory/Builder (OOP) / Applicative/monadic construction (FP)
33
+ - Repeated null/error checks → Null Object (OOP) / Maybe monad (FP)
34
+ - Type checks repeated across methods → Polymorphic subclasses (OOP) / ADTs (FP)
35
+
36
+ Step 4 — Refactor Proposal: Name the specific refactoring move. Describe the structural change. Do not apply it. Follow Beck's constraint: never change behavior and structure simultaneously.
37
+
38
+ Step 5 — Success Signals: State the acceptance criteria that would confirm each refactoring worked — constructor params decrease, mock setups shrink or vanish, test names clarify, type-varying rows split into focused per-class tests.
39
+
40
+ **OUTPUT**
41
+
42
+ Summary table:
43
+ | Location | Friction Signal | Smell | Missing Abstraction | Priority |
44
+
45
+ If multiple signals point to the same root smell, consolidate into one finding and list all contributing signals. Then per finding: friction (specific tests), smell, missing abstraction, proposed refactoring (do not apply), success signals.
46
+
47
+ Needs Human Review: list cases where attribution is ambiguous (e.g., many mocks = tight coupling OR integration test written as unit test; tests break on unrelated changes = coupling OR shared test state).
48
+
49
+ If no signals found: "No test friction signals found. Tests appear well-structured. No refactoring proposals generated." Do not fabricate findings.
50
+
51
+ Stop when all files analyzed. Do not modify anything.