@soleri/core 2.1.0 → 2.5.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 (377) hide show
  1. package/dist/brain/brain.d.ts +10 -1
  2. package/dist/brain/brain.d.ts.map +1 -1
  3. package/dist/brain/brain.js +116 -13
  4. package/dist/brain/brain.js.map +1 -1
  5. package/dist/brain/intelligence.d.ts +36 -1
  6. package/dist/brain/intelligence.d.ts.map +1 -1
  7. package/dist/brain/intelligence.js +119 -14
  8. package/dist/brain/intelligence.js.map +1 -1
  9. package/dist/brain/types.d.ts +34 -2
  10. package/dist/brain/types.d.ts.map +1 -1
  11. package/dist/cognee/client.d.ts +3 -0
  12. package/dist/cognee/client.d.ts.map +1 -1
  13. package/dist/cognee/client.js +17 -0
  14. package/dist/cognee/client.js.map +1 -1
  15. package/dist/cognee/sync-manager.d.ts +94 -0
  16. package/dist/cognee/sync-manager.d.ts.map +1 -0
  17. package/dist/cognee/sync-manager.js +293 -0
  18. package/dist/cognee/sync-manager.js.map +1 -0
  19. package/dist/control/identity-manager.d.ts +22 -0
  20. package/dist/control/identity-manager.d.ts.map +1 -0
  21. package/dist/control/identity-manager.js +233 -0
  22. package/dist/control/identity-manager.js.map +1 -0
  23. package/dist/control/intent-router.d.ts +32 -0
  24. package/dist/control/intent-router.d.ts.map +1 -0
  25. package/dist/control/intent-router.js +242 -0
  26. package/dist/control/intent-router.js.map +1 -0
  27. package/dist/control/types.d.ts +68 -0
  28. package/dist/control/types.d.ts.map +1 -0
  29. package/dist/control/types.js +9 -0
  30. package/dist/control/types.js.map +1 -0
  31. package/dist/curator/curator.d.ts +37 -1
  32. package/dist/curator/curator.d.ts.map +1 -1
  33. package/dist/curator/curator.js +199 -1
  34. package/dist/curator/curator.js.map +1 -1
  35. package/dist/errors/classify.d.ts +13 -0
  36. package/dist/errors/classify.d.ts.map +1 -0
  37. package/dist/errors/classify.js +97 -0
  38. package/dist/errors/classify.js.map +1 -0
  39. package/dist/errors/index.d.ts +6 -0
  40. package/dist/errors/index.d.ts.map +1 -0
  41. package/dist/errors/index.js +4 -0
  42. package/dist/errors/index.js.map +1 -0
  43. package/dist/errors/retry.d.ts +40 -0
  44. package/dist/errors/retry.d.ts.map +1 -0
  45. package/dist/errors/retry.js +97 -0
  46. package/dist/errors/retry.js.map +1 -0
  47. package/dist/errors/types.d.ts +48 -0
  48. package/dist/errors/types.d.ts.map +1 -0
  49. package/dist/errors/types.js +59 -0
  50. package/dist/errors/types.js.map +1 -0
  51. package/dist/facades/types.d.ts +1 -1
  52. package/dist/governance/governance.d.ts +42 -0
  53. package/dist/governance/governance.d.ts.map +1 -0
  54. package/dist/governance/governance.js +488 -0
  55. package/dist/governance/governance.js.map +1 -0
  56. package/dist/governance/index.d.ts +3 -0
  57. package/dist/governance/index.d.ts.map +1 -0
  58. package/dist/governance/index.js +2 -0
  59. package/dist/governance/index.js.map +1 -0
  60. package/dist/governance/types.d.ts +102 -0
  61. package/dist/governance/types.d.ts.map +1 -0
  62. package/dist/governance/types.js +3 -0
  63. package/dist/governance/types.js.map +1 -0
  64. package/dist/index.d.ts +52 -3
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +47 -1
  67. package/dist/index.js.map +1 -1
  68. package/dist/intake/content-classifier.d.ts +14 -0
  69. package/dist/intake/content-classifier.d.ts.map +1 -0
  70. package/dist/intake/content-classifier.js +125 -0
  71. package/dist/intake/content-classifier.js.map +1 -0
  72. package/dist/intake/dedup-gate.d.ts +17 -0
  73. package/dist/intake/dedup-gate.d.ts.map +1 -0
  74. package/dist/intake/dedup-gate.js +66 -0
  75. package/dist/intake/dedup-gate.js.map +1 -0
  76. package/dist/intake/intake-pipeline.d.ts +63 -0
  77. package/dist/intake/intake-pipeline.d.ts.map +1 -0
  78. package/dist/intake/intake-pipeline.js +373 -0
  79. package/dist/intake/intake-pipeline.js.map +1 -0
  80. package/dist/intake/types.d.ts +65 -0
  81. package/dist/intake/types.d.ts.map +1 -0
  82. package/dist/intake/types.js +3 -0
  83. package/dist/intake/types.js.map +1 -0
  84. package/dist/intelligence/loader.js +1 -1
  85. package/dist/intelligence/loader.js.map +1 -1
  86. package/dist/intelligence/types.d.ts +3 -1
  87. package/dist/intelligence/types.d.ts.map +1 -1
  88. package/dist/logging/logger.d.ts +37 -0
  89. package/dist/logging/logger.d.ts.map +1 -0
  90. package/dist/logging/logger.js +145 -0
  91. package/dist/logging/logger.js.map +1 -0
  92. package/dist/logging/types.d.ts +19 -0
  93. package/dist/logging/types.d.ts.map +1 -0
  94. package/dist/logging/types.js +2 -0
  95. package/dist/logging/types.js.map +1 -0
  96. package/dist/loop/loop-manager.d.ts +100 -0
  97. package/dist/loop/loop-manager.d.ts.map +1 -0
  98. package/dist/loop/loop-manager.js +379 -0
  99. package/dist/loop/loop-manager.js.map +1 -0
  100. package/dist/loop/types.d.ts +103 -0
  101. package/dist/loop/types.d.ts.map +1 -0
  102. package/dist/loop/types.js +11 -0
  103. package/dist/loop/types.js.map +1 -0
  104. package/dist/persistence/index.d.ts +3 -0
  105. package/dist/persistence/index.d.ts.map +1 -0
  106. package/dist/persistence/index.js +2 -0
  107. package/dist/persistence/index.js.map +1 -0
  108. package/dist/persistence/sqlite-provider.d.ts +25 -0
  109. package/dist/persistence/sqlite-provider.d.ts.map +1 -0
  110. package/dist/persistence/sqlite-provider.js +59 -0
  111. package/dist/persistence/sqlite-provider.js.map +1 -0
  112. package/dist/persistence/types.d.ts +36 -0
  113. package/dist/persistence/types.d.ts.map +1 -0
  114. package/dist/persistence/types.js +8 -0
  115. package/dist/persistence/types.js.map +1 -0
  116. package/dist/planning/gap-analysis.d.ts +72 -0
  117. package/dist/planning/gap-analysis.d.ts.map +1 -0
  118. package/dist/planning/gap-analysis.js +442 -0
  119. package/dist/planning/gap-analysis.js.map +1 -0
  120. package/dist/planning/gap-types.d.ts +29 -0
  121. package/dist/planning/gap-types.d.ts.map +1 -0
  122. package/dist/planning/gap-types.js +28 -0
  123. package/dist/planning/gap-types.js.map +1 -0
  124. package/dist/planning/planner.d.ts +421 -4
  125. package/dist/planning/planner.d.ts.map +1 -1
  126. package/dist/planning/planner.js +949 -21
  127. package/dist/planning/planner.js.map +1 -1
  128. package/dist/playbooks/generic/brainstorming.d.ts +9 -0
  129. package/dist/playbooks/generic/brainstorming.d.ts.map +1 -0
  130. package/dist/playbooks/generic/brainstorming.js +105 -0
  131. package/dist/playbooks/generic/brainstorming.js.map +1 -0
  132. package/dist/playbooks/generic/code-review.d.ts +11 -0
  133. package/dist/playbooks/generic/code-review.d.ts.map +1 -0
  134. package/dist/playbooks/generic/code-review.js +176 -0
  135. package/dist/playbooks/generic/code-review.js.map +1 -0
  136. package/dist/playbooks/generic/subagent-execution.d.ts +9 -0
  137. package/dist/playbooks/generic/subagent-execution.d.ts.map +1 -0
  138. package/dist/playbooks/generic/subagent-execution.js +68 -0
  139. package/dist/playbooks/generic/subagent-execution.js.map +1 -0
  140. package/dist/playbooks/generic/systematic-debugging.d.ts +9 -0
  141. package/dist/playbooks/generic/systematic-debugging.d.ts.map +1 -0
  142. package/dist/playbooks/generic/systematic-debugging.js +87 -0
  143. package/dist/playbooks/generic/systematic-debugging.js.map +1 -0
  144. package/dist/playbooks/generic/tdd.d.ts +9 -0
  145. package/dist/playbooks/generic/tdd.d.ts.map +1 -0
  146. package/dist/playbooks/generic/tdd.js +70 -0
  147. package/dist/playbooks/generic/tdd.js.map +1 -0
  148. package/dist/playbooks/generic/verification.d.ts +9 -0
  149. package/dist/playbooks/generic/verification.d.ts.map +1 -0
  150. package/dist/playbooks/generic/verification.js +74 -0
  151. package/dist/playbooks/generic/verification.js.map +1 -0
  152. package/dist/playbooks/index.d.ts +4 -0
  153. package/dist/playbooks/index.d.ts.map +1 -0
  154. package/dist/playbooks/index.js +5 -0
  155. package/dist/playbooks/index.js.map +1 -0
  156. package/dist/playbooks/playbook-registry.d.ts +42 -0
  157. package/dist/playbooks/playbook-registry.d.ts.map +1 -0
  158. package/dist/playbooks/playbook-registry.js +227 -0
  159. package/dist/playbooks/playbook-registry.js.map +1 -0
  160. package/dist/playbooks/playbook-seeder.d.ts +47 -0
  161. package/dist/playbooks/playbook-seeder.d.ts.map +1 -0
  162. package/dist/playbooks/playbook-seeder.js +104 -0
  163. package/dist/playbooks/playbook-seeder.js.map +1 -0
  164. package/dist/playbooks/playbook-types.d.ts +132 -0
  165. package/dist/playbooks/playbook-types.d.ts.map +1 -0
  166. package/dist/playbooks/playbook-types.js +12 -0
  167. package/dist/playbooks/playbook-types.js.map +1 -0
  168. package/dist/project/project-registry.d.ts +79 -0
  169. package/dist/project/project-registry.d.ts.map +1 -0
  170. package/dist/project/project-registry.js +274 -0
  171. package/dist/project/project-registry.js.map +1 -0
  172. package/dist/project/types.d.ts +28 -0
  173. package/dist/project/types.d.ts.map +1 -0
  174. package/dist/project/types.js +5 -0
  175. package/dist/project/types.js.map +1 -0
  176. package/dist/prompts/index.d.ts +4 -0
  177. package/dist/prompts/index.d.ts.map +1 -0
  178. package/dist/prompts/index.js +3 -0
  179. package/dist/prompts/index.js.map +1 -0
  180. package/dist/prompts/parser.d.ts +17 -0
  181. package/dist/prompts/parser.d.ts.map +1 -0
  182. package/dist/prompts/parser.js +47 -0
  183. package/dist/prompts/parser.js.map +1 -0
  184. package/dist/prompts/template-manager.d.ts +25 -0
  185. package/dist/prompts/template-manager.d.ts.map +1 -0
  186. package/dist/prompts/template-manager.js +71 -0
  187. package/dist/prompts/template-manager.js.map +1 -0
  188. package/dist/prompts/types.d.ts +26 -0
  189. package/dist/prompts/types.d.ts.map +1 -0
  190. package/dist/prompts/types.js +5 -0
  191. package/dist/prompts/types.js.map +1 -0
  192. package/dist/runtime/admin-extra-ops.d.ts +15 -0
  193. package/dist/runtime/admin-extra-ops.d.ts.map +1 -0
  194. package/dist/runtime/admin-extra-ops.js +595 -0
  195. package/dist/runtime/admin-extra-ops.js.map +1 -0
  196. package/dist/runtime/admin-ops.d.ts +15 -0
  197. package/dist/runtime/admin-ops.d.ts.map +1 -0
  198. package/dist/runtime/admin-ops.js +329 -0
  199. package/dist/runtime/admin-ops.js.map +1 -0
  200. package/dist/runtime/capture-ops.d.ts +15 -0
  201. package/dist/runtime/capture-ops.d.ts.map +1 -0
  202. package/dist/runtime/capture-ops.js +363 -0
  203. package/dist/runtime/capture-ops.js.map +1 -0
  204. package/dist/runtime/cognee-sync-ops.d.ts +12 -0
  205. package/dist/runtime/cognee-sync-ops.d.ts.map +1 -0
  206. package/dist/runtime/cognee-sync-ops.js +55 -0
  207. package/dist/runtime/cognee-sync-ops.js.map +1 -0
  208. package/dist/runtime/core-ops.d.ts +9 -3
  209. package/dist/runtime/core-ops.d.ts.map +1 -1
  210. package/dist/runtime/core-ops.js +693 -10
  211. package/dist/runtime/core-ops.js.map +1 -1
  212. package/dist/runtime/curator-extra-ops.d.ts +9 -0
  213. package/dist/runtime/curator-extra-ops.d.ts.map +1 -0
  214. package/dist/runtime/curator-extra-ops.js +71 -0
  215. package/dist/runtime/curator-extra-ops.js.map +1 -0
  216. package/dist/runtime/domain-ops.d.ts.map +1 -1
  217. package/dist/runtime/domain-ops.js +61 -15
  218. package/dist/runtime/domain-ops.js.map +1 -1
  219. package/dist/runtime/grading-ops.d.ts +14 -0
  220. package/dist/runtime/grading-ops.d.ts.map +1 -0
  221. package/dist/runtime/grading-ops.js +105 -0
  222. package/dist/runtime/grading-ops.js.map +1 -0
  223. package/dist/runtime/intake-ops.d.ts +14 -0
  224. package/dist/runtime/intake-ops.d.ts.map +1 -0
  225. package/dist/runtime/intake-ops.js +110 -0
  226. package/dist/runtime/intake-ops.js.map +1 -0
  227. package/dist/runtime/loop-ops.d.ts +14 -0
  228. package/dist/runtime/loop-ops.d.ts.map +1 -0
  229. package/dist/runtime/loop-ops.js +251 -0
  230. package/dist/runtime/loop-ops.js.map +1 -0
  231. package/dist/runtime/memory-cross-project-ops.d.ts +12 -0
  232. package/dist/runtime/memory-cross-project-ops.d.ts.map +1 -0
  233. package/dist/runtime/memory-cross-project-ops.js +165 -0
  234. package/dist/runtime/memory-cross-project-ops.js.map +1 -0
  235. package/dist/runtime/memory-extra-ops.d.ts +13 -0
  236. package/dist/runtime/memory-extra-ops.d.ts.map +1 -0
  237. package/dist/runtime/memory-extra-ops.js +173 -0
  238. package/dist/runtime/memory-extra-ops.js.map +1 -0
  239. package/dist/runtime/orchestrate-ops.d.ts +17 -0
  240. package/dist/runtime/orchestrate-ops.d.ts.map +1 -0
  241. package/dist/runtime/orchestrate-ops.js +246 -0
  242. package/dist/runtime/orchestrate-ops.js.map +1 -0
  243. package/dist/runtime/planning-extra-ops.d.ts +25 -0
  244. package/dist/runtime/planning-extra-ops.d.ts.map +1 -0
  245. package/dist/runtime/planning-extra-ops.js +663 -0
  246. package/dist/runtime/planning-extra-ops.js.map +1 -0
  247. package/dist/runtime/playbook-ops.d.ts +14 -0
  248. package/dist/runtime/playbook-ops.d.ts.map +1 -0
  249. package/dist/runtime/playbook-ops.js +141 -0
  250. package/dist/runtime/playbook-ops.js.map +1 -0
  251. package/dist/runtime/project-ops.d.ts +15 -0
  252. package/dist/runtime/project-ops.d.ts.map +1 -0
  253. package/dist/runtime/project-ops.js +186 -0
  254. package/dist/runtime/project-ops.js.map +1 -0
  255. package/dist/runtime/runtime.d.ts.map +1 -1
  256. package/dist/runtime/runtime.js +65 -3
  257. package/dist/runtime/runtime.js.map +1 -1
  258. package/dist/runtime/types.d.ts +29 -0
  259. package/dist/runtime/types.d.ts.map +1 -1
  260. package/dist/runtime/vault-extra-ops.d.ts +10 -0
  261. package/dist/runtime/vault-extra-ops.d.ts.map +1 -0
  262. package/dist/runtime/vault-extra-ops.js +536 -0
  263. package/dist/runtime/vault-extra-ops.js.map +1 -0
  264. package/dist/telemetry/telemetry.d.ts +48 -0
  265. package/dist/telemetry/telemetry.d.ts.map +1 -0
  266. package/dist/telemetry/telemetry.js +87 -0
  267. package/dist/telemetry/telemetry.js.map +1 -0
  268. package/dist/vault/playbook.d.ts +34 -0
  269. package/dist/vault/playbook.d.ts.map +1 -0
  270. package/dist/vault/playbook.js +60 -0
  271. package/dist/vault/playbook.js.map +1 -0
  272. package/dist/vault/vault.d.ts +97 -4
  273. package/dist/vault/vault.d.ts.map +1 -1
  274. package/dist/vault/vault.js +424 -65
  275. package/dist/vault/vault.js.map +1 -1
  276. package/package.json +7 -3
  277. package/src/__tests__/admin-extra-ops.test.ts +467 -0
  278. package/src/__tests__/admin-ops.test.ts +271 -0
  279. package/src/__tests__/brain-intelligence.test.ts +205 -0
  280. package/src/__tests__/brain.test.ts +134 -3
  281. package/src/__tests__/capture-ops.test.ts +509 -0
  282. package/src/__tests__/cognee-integration.test.ts +80 -0
  283. package/src/__tests__/cognee-sync-manager.test.ts +103 -0
  284. package/src/__tests__/core-ops.test.ts +292 -2
  285. package/src/__tests__/curator-extra-ops.test.ts +381 -0
  286. package/src/__tests__/domain-ops.test.ts +66 -0
  287. package/src/__tests__/errors.test.ts +388 -0
  288. package/src/__tests__/governance.test.ts +522 -0
  289. package/src/__tests__/grading-ops.test.ts +361 -0
  290. package/src/__tests__/identity-manager.test.ts +243 -0
  291. package/src/__tests__/intake-pipeline.test.ts +162 -0
  292. package/src/__tests__/intent-router.test.ts +222 -0
  293. package/src/__tests__/logger.test.ts +200 -0
  294. package/src/__tests__/loop-ops.test.ts +469 -0
  295. package/src/__tests__/memory-cross-project-ops.test.ts +248 -0
  296. package/src/__tests__/memory-extra-ops.test.ts +352 -0
  297. package/src/__tests__/orchestrate-ops.test.ts +289 -0
  298. package/src/__tests__/persistence.test.ts +225 -0
  299. package/src/__tests__/planner.test.ts +416 -7
  300. package/src/__tests__/planning-extra-ops.test.ts +706 -0
  301. package/src/__tests__/playbook-registry.test.ts +326 -0
  302. package/src/__tests__/playbook-seeder.test.ts +163 -0
  303. package/src/__tests__/playbook.test.ts +389 -0
  304. package/src/__tests__/project-ops.test.ts +381 -0
  305. package/src/__tests__/template-manager.test.ts +222 -0
  306. package/src/__tests__/vault-extra-ops.test.ts +482 -0
  307. package/src/brain/brain.ts +185 -16
  308. package/src/brain/intelligence.ts +179 -10
  309. package/src/brain/types.ts +40 -2
  310. package/src/cognee/client.ts +18 -0
  311. package/src/cognee/sync-manager.ts +389 -0
  312. package/src/control/identity-manager.ts +354 -0
  313. package/src/control/intent-router.ts +326 -0
  314. package/src/control/types.ts +102 -0
  315. package/src/curator/curator.ts +295 -1
  316. package/src/errors/classify.ts +102 -0
  317. package/src/errors/index.ts +5 -0
  318. package/src/errors/retry.ts +132 -0
  319. package/src/errors/types.ts +81 -0
  320. package/src/governance/governance.ts +698 -0
  321. package/src/governance/index.ts +18 -0
  322. package/src/governance/types.ts +111 -0
  323. package/src/index.ts +213 -2
  324. package/src/intake/content-classifier.ts +146 -0
  325. package/src/intake/dedup-gate.ts +92 -0
  326. package/src/intake/intake-pipeline.ts +503 -0
  327. package/src/intake/types.ts +69 -0
  328. package/src/intelligence/loader.ts +1 -1
  329. package/src/intelligence/types.ts +3 -1
  330. package/src/logging/logger.ts +154 -0
  331. package/src/logging/types.ts +21 -0
  332. package/src/loop/loop-manager.ts +448 -0
  333. package/src/loop/types.ts +115 -0
  334. package/src/persistence/index.ts +7 -0
  335. package/src/persistence/sqlite-provider.ts +62 -0
  336. package/src/persistence/types.ts +44 -0
  337. package/src/planning/gap-analysis.ts +775 -0
  338. package/src/planning/gap-types.ts +61 -0
  339. package/src/planning/planner.ts +1273 -24
  340. package/src/playbooks/generic/brainstorming.ts +110 -0
  341. package/src/playbooks/generic/code-review.ts +181 -0
  342. package/src/playbooks/generic/subagent-execution.ts +74 -0
  343. package/src/playbooks/generic/systematic-debugging.ts +92 -0
  344. package/src/playbooks/generic/tdd.ts +75 -0
  345. package/src/playbooks/generic/verification.ts +79 -0
  346. package/src/playbooks/index.ts +27 -0
  347. package/src/playbooks/playbook-registry.ts +284 -0
  348. package/src/playbooks/playbook-seeder.ts +119 -0
  349. package/src/playbooks/playbook-types.ts +162 -0
  350. package/src/project/project-registry.ts +370 -0
  351. package/src/project/types.ts +31 -0
  352. package/src/prompts/index.ts +3 -0
  353. package/src/prompts/parser.ts +59 -0
  354. package/src/prompts/template-manager.ts +77 -0
  355. package/src/prompts/types.ts +28 -0
  356. package/src/runtime/admin-extra-ops.ts +652 -0
  357. package/src/runtime/admin-ops.ts +340 -0
  358. package/src/runtime/capture-ops.ts +404 -0
  359. package/src/runtime/cognee-sync-ops.ts +63 -0
  360. package/src/runtime/core-ops.ts +787 -9
  361. package/src/runtime/curator-extra-ops.ts +85 -0
  362. package/src/runtime/domain-ops.ts +67 -15
  363. package/src/runtime/grading-ops.ts +130 -0
  364. package/src/runtime/intake-ops.ts +126 -0
  365. package/src/runtime/loop-ops.ts +277 -0
  366. package/src/runtime/memory-cross-project-ops.ts +191 -0
  367. package/src/runtime/memory-extra-ops.ts +186 -0
  368. package/src/runtime/orchestrate-ops.ts +278 -0
  369. package/src/runtime/planning-extra-ops.ts +718 -0
  370. package/src/runtime/playbook-ops.ts +169 -0
  371. package/src/runtime/project-ops.ts +202 -0
  372. package/src/runtime/runtime.ts +77 -3
  373. package/src/runtime/types.ts +29 -0
  374. package/src/runtime/vault-extra-ops.ts +606 -0
  375. package/src/telemetry/telemetry.ts +118 -0
  376. package/src/vault/playbook.ts +87 -0
  377. package/src/vault/vault.ts +575 -98
@@ -0,0 +1,110 @@
1
+ /**
2
+ * Generic Playbook: Brainstorming
3
+ *
4
+ * Design-before-code enforcement.
5
+ * Ported from Salvador's brainstorming playbook.
6
+ */
7
+
8
+ import type { PlaybookDefinition } from '../playbook-types.js';
9
+
10
+ export const brainstormingPlaybook: PlaybookDefinition = {
11
+ id: 'generic-brainstorming',
12
+ tier: 'generic',
13
+ title: 'Brainstorming — Design Before Code',
14
+ trigger:
15
+ 'Use when the request is creative, ambiguous, or involves building something new. Activates before any implementation work to ensure design is explored and approved.',
16
+ description:
17
+ 'Structured design exploration before writing any code. The agent explores context, asks clarifying questions, proposes 2-3 approaches with trade-offs, and presents the design in digestible sections for approval. No code is written until the design is approved. This prevents the common failure mode of jumping into implementation before understanding what to build.',
18
+ steps: `1. EXPLORE CONTEXT
19
+ - What exists? Read relevant code, docs, prior art
20
+ - What constraints apply? Tech stack, patterns, conventions
21
+ - What's been tried before? Search vault for related patterns
22
+
23
+ 2. ASK CLARIFYING QUESTIONS
24
+ - Surface assumptions that could derail implementation
25
+ - Ask about edge cases, error handling, user expectations
26
+ - Ask about scope boundaries — what's explicitly NOT included
27
+
28
+ 3. PROPOSE 2-3 APPROACHES
29
+ - Each approach with clear trade-offs (complexity, performance, maintainability)
30
+ - Recommend one with rationale
31
+ - Wait for user feedback before proceeding
32
+
33
+ 4. PRESENT DESIGN IN SECTIONS
34
+ - Break design into chunks short enough to read and digest
35
+ - Architecture, data flow, API surface, error handling, testing strategy
36
+ - Get approval on each section before moving to next
37
+
38
+ 5. WRITE DESIGN DOCUMENT
39
+ - Save approved design to docs/ or vault
40
+ - Include decisions and rationale
41
+ - This becomes the source of truth for implementation
42
+
43
+ HARD GATE: No implementation code until design is approved.`,
44
+ expectedOutcome:
45
+ 'A clear, approved design document that eliminates ambiguity. Implementation follows a known path. Decisions are documented with rationale. No surprises during coding.',
46
+ category: 'methodology',
47
+ tags: ['brainstorming', 'design', 'planning', 'exploration', 'generic'],
48
+ matchIntents: ['BUILD', 'PLAN'],
49
+ matchKeywords: [
50
+ 'build',
51
+ 'create',
52
+ 'design',
53
+ 'architect',
54
+ 'plan',
55
+ 'new feature',
56
+ 'from scratch',
57
+ 'rethink',
58
+ ],
59
+ brainstormSections: [
60
+ {
61
+ title: 'Architecture',
62
+ description: 'High-level structure, components, and their relationships.',
63
+ questions: [
64
+ 'What are the main building blocks?',
65
+ 'How do they communicate?',
66
+ 'What are the boundaries and interfaces?',
67
+ ],
68
+ },
69
+ {
70
+ title: 'Data Flow',
71
+ description: 'How data moves through the system — inputs, transformations, outputs.',
72
+ questions: [
73
+ 'What data does this consume and produce?',
74
+ 'Where does state live?',
75
+ 'What are the data dependencies?',
76
+ ],
77
+ },
78
+ {
79
+ title: 'Error Handling',
80
+ description: 'What can go wrong and how to handle it gracefully.',
81
+ questions: [
82
+ 'What are the failure modes?',
83
+ 'How should errors be surfaced to users?',
84
+ 'What recovery strategies are needed?',
85
+ ],
86
+ },
87
+ {
88
+ title: 'Testing Strategy',
89
+ description: 'How to verify correctness at each level.',
90
+ questions: [
91
+ 'What are the critical behaviors to test?',
92
+ 'Unit vs integration vs e2e — what balance?',
93
+ 'What edge cases matter most?',
94
+ ],
95
+ },
96
+ ],
97
+ gates: [
98
+ {
99
+ phase: 'brainstorming',
100
+ requirement: 'Design must be explored and approved before plan creation',
101
+ checkType: 'brainstorm',
102
+ },
103
+ ],
104
+ taskTemplates: [],
105
+ toolInjections: ['search_intelligent'],
106
+ verificationCriteria: [
107
+ 'Design document exists and covers architecture, data flow, and error handling',
108
+ 'User approved the design before implementation started',
109
+ ],
110
+ };
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Generic Playbook: Code Review
3
+ *
4
+ * Structured PR review discipline — 7-category grading with smell detection.
5
+ * Ported from Salvador's code-review playbook.
6
+ * Based on vault knowledge: "Structured Code Review: Grade Each Category Then Provide Verdict"
7
+ * and "5-Step Systematic Refactoring: Ingest → Scan → Plan → Edit → Verify".
8
+ */
9
+
10
+ import type { PlaybookDefinition } from '../playbook-types.js';
11
+
12
+ export const codeReviewPlaybook: PlaybookDefinition = {
13
+ id: 'generic-code-review',
14
+ tier: 'generic',
15
+ title: 'Structured Code Review',
16
+ trigger:
17
+ 'Use when reviewing a pull request, code diff, or any code submission. Activates for REVIEW intent or when keywords like "review", "PR", "pull request", "diff", "check code" appear.',
18
+ description:
19
+ 'Systematic code review using 7 independent grading categories (A-F). Each category is evaluated separately so no area hides behind others. Combines automated smell detection heuristics with human judgment. Produces a structured verdict with prioritized action items.',
20
+ steps: `1. UNDERSTAND THE CHANGE
21
+ - Read the PR description, linked issues, and acceptance criteria
22
+ - Understand the WHY before judging the HOW
23
+ - Identify the blast radius — what areas of the codebase are touched?
24
+ - Check: is this a feature, bugfix, refactor, or infrastructure change?
25
+
26
+ 2. AUTOMATED SMELL SCAN
27
+ - Deep nesting: any indentation 8+ spaces (3+ levels)
28
+ - Else after return: guard clause opportunities missed
29
+ - Long functions: >35 LOC = critical, 25-35 = warning, <15 = ideal
30
+ - Long parameter lists: >5 params = data clump smell
31
+ - Magic numbers: unnamed numeric literals in conditions
32
+ - Duplication: similar blocks of 3+ lines
33
+ - Dead code: commented-out code, unreachable branches
34
+ - Utils/helpers anti-modules: catch-all files with unrelated functions
35
+
36
+ 3. GRADE 7 CATEGORIES (A-F each)
37
+ A. NAMING
38
+ - Variables, functions, classes reveal intent?
39
+ - Consistent naming convention (camelCase, PascalCase, etc.)?
40
+ - No abbreviations or single-letter names (except i/j in loops)?
41
+ - Boolean names read as questions (isActive, hasPermission)?
42
+
43
+ B. FUNCTION DESIGN
44
+ - Each function does ONE thing (the "and" test)?
45
+ - Function length within limits (<15 ideal, >35 critical)?
46
+ - Parameters count reasonable (<5)?
47
+ - Return types explicit and consistent?
48
+ - Pure functions where possible?
49
+
50
+ C. COMMENTS & DOCUMENTATION
51
+ - Comments explain WHY, never WHAT?
52
+ - No commented-out code (version control is your backup)?
53
+ - Public API has JSDoc/TSDoc?
54
+ - Complex algorithms are documented?
55
+ - No redundant comments restating the code?
56
+
57
+ D. STRUCTURE & LAYOUT
58
+ - Single Responsibility at file/module level?
59
+ - Imports organized and minimal?
60
+ - No circular dependencies introduced?
61
+ - Consistent file organization matching project conventions?
62
+ - Changes are in the right place architecturally?
63
+
64
+ E. ERROR HANDLING
65
+ - Errors handled at the right level (not swallowed)?
66
+ - Error messages are actionable (not just "Something went wrong")?
67
+ - Edge cases covered (null, empty, boundary values)?
68
+ - No bare catch blocks that hide failures?
69
+ - Async errors properly propagated?
70
+
71
+ F. CODE SMELLS & CLEANLINESS
72
+ - No duplication (DRY without premature abstraction)?
73
+ - Guard clauses used instead of deep nesting?
74
+ - Early returns flatten control flow?
75
+ - No feature envy (method using another object's data excessively)?
76
+ - No shotgun surgery risk (change requires touching many files)?
77
+
78
+ G. SOLID & DESIGN PRINCIPLES
79
+ - Open/Closed: can this be extended without modification?
80
+ - Dependency Inversion: depends on abstractions, not concretions?
81
+ - Interface Segregation: no forcing unused dependencies on consumers?
82
+ - Liskov: subtypes are substitutable without surprises?
83
+ - Single Responsibility (already in Structure, reinforce here)?
84
+
85
+ 4. SECURITY & PERFORMANCE QUICK-CHECK
86
+ - No secrets, tokens, or credentials in code?
87
+ - No SQL injection, XSS, or command injection vectors?
88
+ - No N+1 query patterns or unbounded loops?
89
+ - No memory leaks (event listeners, subscriptions not cleaned up)?
90
+
91
+ 5. DELIVER VERDICT
92
+ - Overall grade (A-F) based on category grades
93
+ - Top 3 prioritized action items (most impactful first)
94
+ - Specific line references for each issue
95
+ - Praise what's done well — reinforcement matters
96
+ - Classify: APPROVE, REQUEST CHANGES, or COMMENT
97
+
98
+ GRADING SCALE:
99
+ | Grade | Meaning |
100
+ |-------|---------|
101
+ | A | Excellent — clean, idiomatic, well-designed |
102
+ | B | Good — minor issues, mostly clean |
103
+ | C | Acceptable — some issues need attention |
104
+ | D | Below standard — significant issues |
105
+ | F | Critical — must fix before merge |`,
106
+ expectedOutcome:
107
+ 'Every PR receives a structured, fair, and thorough review. Each category is graded independently. The verdict includes specific, actionable feedback with line references. Good patterns are celebrated, problems are caught early.',
108
+ category: 'methodology',
109
+ tags: ['code-review', 'pr-review', 'quality', 'refactoring', 'smells', 'grading', 'generic'],
110
+ matchIntents: ['REVIEW'],
111
+ matchKeywords: [
112
+ 'review',
113
+ 'code review',
114
+ 'pr review',
115
+ 'pull request',
116
+ 'diff',
117
+ 'check code',
118
+ 'review code',
119
+ 'critique',
120
+ 'feedback',
121
+ 'approve',
122
+ 'merge',
123
+ ],
124
+ gates: [
125
+ {
126
+ phase: 'pre-execution',
127
+ requirement: 'PR description and linked issues must be read before reviewing code',
128
+ checkType: 'review-context',
129
+ },
130
+ {
131
+ phase: 'post-task',
132
+ requirement: 'All 7 categories must have an explicit grade (A-F) with notes',
133
+ checkType: 'review-grading-complete',
134
+ },
135
+ {
136
+ phase: 'completion',
137
+ requirement: 'Verdict must include prioritized action items with specific line references',
138
+ checkType: 'review-verdict',
139
+ },
140
+ ],
141
+ taskTemplates: [
142
+ {
143
+ taskType: 'verification',
144
+ titleTemplate: 'Automated smell scan for: {objective}',
145
+ acceptanceCriteria: [
146
+ 'Scanned for deep nesting (8+ spaces / 3+ levels)',
147
+ 'Scanned for else-after-return patterns',
148
+ 'Scanned for long functions (>35 LOC)',
149
+ 'Scanned for long parameter lists (>5 params)',
150
+ 'Scanned for magic numbers in conditions',
151
+ 'Scanned for dead/commented-out code',
152
+ 'Scanned for duplication across changed files',
153
+ ],
154
+ tools: [],
155
+ order: 'before-implementation',
156
+ },
157
+ {
158
+ taskType: 'verification',
159
+ titleTemplate: 'Grade 7 categories for: {objective}',
160
+ acceptanceCriteria: [
161
+ 'Naming graded A-F with specific notes',
162
+ 'Function Design graded A-F with specific notes',
163
+ 'Comments graded A-F with specific notes',
164
+ 'Structure graded A-F with specific notes',
165
+ 'Error Handling graded A-F with specific notes',
166
+ 'Smells graded A-F with specific notes',
167
+ 'SOLID graded A-F with specific notes',
168
+ ],
169
+ tools: [],
170
+ order: 'after-implementation',
171
+ },
172
+ ],
173
+ toolInjections: [],
174
+ verificationCriteria: [
175
+ 'All 7 categories have explicit A-F grades',
176
+ 'At least 3 prioritized action items with line references',
177
+ 'Security quick-check completed (no secrets, no injection vectors)',
178
+ 'Automated smell scan results documented',
179
+ 'Overall verdict delivered: APPROVE, REQUEST CHANGES, or COMMENT',
180
+ ],
181
+ };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Generic Playbook: Subagent-Driven Execution
3
+ *
4
+ * One fresh subagent per task with two-stage review.
5
+ * Ported from Salvador's subagent-execution playbook.
6
+ */
7
+
8
+ import type { PlaybookDefinition } from '../playbook-types.js';
9
+
10
+ export const subagentExecutionPlaybook: PlaybookDefinition = {
11
+ id: 'generic-subagent-execution',
12
+ tier: 'generic',
13
+ title: 'Subagent-Driven Execution',
14
+ trigger:
15
+ 'Use when a plan has 3 or more tasks. Dispatches a fresh subagent per task with two-stage review (spec compliance, then code quality). The controller agent manages the queue but never implements.',
16
+ description:
17
+ 'Each plan task is executed by a fresh subagent that receives the full task spec, context, and self-review checklist. After each task completes, two reviewer subagents verify the work: first for spec compliance (did it do what was asked?), then for code quality (is it well-built?). The controller never writes implementation code — it only dispatches, reviews, and integrates.',
18
+ steps: `1. PREPARE DISPATCH
19
+ - Read the full task spec from the plan
20
+ - Gather relevant vault knowledge for this task
21
+ - Build the implementer prompt with task spec + context + self-review checklist
22
+
23
+ 2. DISPATCH IMPLEMENTER
24
+ - Spawn a fresh subagent with the implementer prompt
25
+ - Subagent asks clarifying questions before starting (blockers gate)
26
+ - Subagent implements, self-reviews, and reports back
27
+
28
+ 3. REVIEW STAGE 1: SPEC COMPLIANCE
29
+ - Spawn spec-reviewer subagent
30
+ - Reviewer reads ACTUAL CODE, not the implementer's report
31
+ - Compares implementation against task acceptance criteria line by line
32
+ - Returns: pass or fail with specific file:line references
33
+
34
+ 4. REVIEW STAGE 2: CODE QUALITY (only if Stage 1 passes)
35
+ - Spawn code-quality-reviewer subagent
36
+ - Reviews architecture, naming, error handling, test quality
37
+ - Returns: pass or issues by severity (critical blocks, others noted)
38
+
39
+ 5. INTEGRATE OR RETRY
40
+ - If both stages pass: mark task complete, move to next
41
+ - If Stage 1 fails: dispatch new implementer with failure feedback
42
+ - If Stage 2 has critical issues: dispatch targeted fix subagent
43
+ - Maximum 2 retries per task before escalating to human
44
+
45
+ 6. FINAL REVIEW
46
+ - After all tasks: one final review of the complete implementation
47
+ - Check cross-cutting concerns (consistency, integration points)`,
48
+ expectedOutcome:
49
+ 'Each task is independently verified by reviewers who read actual code. The controller maintains oversight without implementation bias. Failed tasks get specific feedback and retry.',
50
+ category: 'methodology',
51
+ tags: ['subagent', 'execution', 'review', 'dispatch', 'generic'],
52
+ matchIntents: ['BUILD', 'IMPROVE'],
53
+ matchKeywords: ['implement', 'execute', 'build', 'multi-step', 'parallel'],
54
+ gates: [
55
+ {
56
+ phase: 'post-task',
57
+ requirement: 'Spec compliance review must pass before code quality review',
58
+ checkType: 'spec-review',
59
+ },
60
+ {
61
+ phase: 'post-task',
62
+ requirement:
63
+ 'Code quality review must pass (no critical issues) before task is marked complete',
64
+ checkType: 'quality-review',
65
+ },
66
+ ],
67
+ taskTemplates: [],
68
+ toolInjections: [],
69
+ verificationCriteria: [
70
+ 'All tasks passed spec compliance review',
71
+ 'All tasks passed code quality review (no critical issues)',
72
+ 'Final cross-cutting review completed',
73
+ ],
74
+ };
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Generic Playbook: Systematic Debugging
3
+ *
4
+ * 4-phase root cause process. No fixes without understanding.
5
+ * Ported from Salvador's systematic-debugging playbook.
6
+ */
7
+
8
+ import type { PlaybookDefinition } from '../playbook-types.js';
9
+
10
+ export const systematicDebuggingPlaybook: PlaybookDefinition = {
11
+ id: 'generic-systematic-debugging',
12
+ tier: 'generic',
13
+ title: 'Systematic Debugging',
14
+ trigger:
15
+ 'Use when something is broken, failing, or behaving unexpectedly. Activates for any FIX intent. Prevents the common failure mode of guessing at fixes without understanding the root cause.',
16
+ description:
17
+ 'Four-phase root cause analysis: gather evidence, analyze patterns, form and test hypotheses, then implement the minimal fix. No fix is applied without first understanding WHY the bug exists. If 3+ fix attempts fail, the architecture is questioned rather than trying more patches.',
18
+ steps: `1. ROOT CAUSE ANALYSIS
19
+ - Reproduce the bug reliably (exact steps, exact output)
20
+ - Trace backward: symptom → immediate cause → what called this → original trigger
21
+ - Read the actual error output — do not guess from the description
22
+ - Search vault for similar bugs and their root causes
23
+
24
+ 2. PATTERN ANALYSIS
25
+ - Is this a known pattern? (race condition, stale cache, off-by-one, null ref)
26
+ - Has this module had bugs before? Check git history
27
+ - Are there related symptoms elsewhere?
28
+ - Map the failure boundary: what works, what doesn't, what's the edge
29
+
30
+ 3. HYPOTHESIS TESTING
31
+ - Form 1-3 specific hypotheses about the root cause
32
+ - For each: predict what you'd see if this hypothesis is correct
33
+ - Test each prediction with the smallest possible experiment
34
+ - One hypothesis at a time — don't combine changes
35
+
36
+ 4. MINIMAL FIX
37
+ - Fix the root cause, not the symptom
38
+ - Write a test that reproduces the bug FIRST (RED)
39
+ - Apply the smallest change that fixes it (GREEN)
40
+ - Verify no regressions (run full test suite)
41
+ - If 3+ fixes fail: stop and question the architecture
42
+
43
+ IRON LAW: No fix without root cause understanding. No "try this and see."`,
44
+ expectedOutcome:
45
+ 'Bug is fixed at the root cause with a regression test. The fix is minimal and targeted. Understanding is documented for future reference.',
46
+ category: 'methodology',
47
+ tags: ['debugging', 'root-cause', 'systematic', 'fix', 'generic'],
48
+ matchIntents: ['FIX'],
49
+ matchKeywords: [
50
+ 'bug',
51
+ 'broken',
52
+ 'fix',
53
+ 'error',
54
+ 'failing',
55
+ 'crash',
56
+ 'wrong',
57
+ 'unexpected',
58
+ 'regression',
59
+ ],
60
+ gates: [
61
+ {
62
+ phase: 'pre-execution',
63
+ requirement: 'Root cause must be identified before any fix is attempted',
64
+ checkType: 'root-cause',
65
+ },
66
+ {
67
+ phase: 'completion',
68
+ requirement: 'Regression test exists and passes',
69
+ checkType: 'regression-test',
70
+ },
71
+ ],
72
+ taskTemplates: [
73
+ {
74
+ taskType: 'test',
75
+ titleTemplate: 'Write regression test reproducing: {objective}',
76
+ acceptanceCriteria: [
77
+ 'Test reproduces the exact bug (fails without fix)',
78
+ 'Test passes after fix is applied',
79
+ 'Test is specific enough to catch this exact regression',
80
+ ],
81
+ tools: ['search_intelligent'],
82
+ order: 'before-implementation',
83
+ },
84
+ ],
85
+ toolInjections: ['search_intelligent'],
86
+ verificationCriteria: [
87
+ 'Root cause is documented (not just "it works now")',
88
+ 'Regression test exists and fails without fix, passes with fix',
89
+ 'Full test suite passes (no new regressions)',
90
+ 'Fix is minimal — only the root cause is addressed',
91
+ ],
92
+ };
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Generic Playbook: Test-Driven Development
3
+ *
4
+ * RED -> GREEN -> REFACTOR cycle.
5
+ * Ported from Salvador's TDD playbook with agent-agnostic tool injections.
6
+ */
7
+
8
+ import type { PlaybookDefinition } from '../playbook-types.js';
9
+
10
+ export const tddPlaybook: PlaybookDefinition = {
11
+ id: 'generic-tdd',
12
+ tier: 'generic',
13
+ title: 'Test-Driven Development',
14
+ trigger:
15
+ 'Use when intent is BUILD or FIX and implementation involves writing new code or modifying existing behavior. Activates for any task that produces production code.',
16
+ description:
17
+ 'Enforces the RED-GREEN-REFACTOR cycle: write a failing test first, implement minimal code to pass it, then refactor. No production code exists without a test that demanded it. Tests drive the design — if something is hard to test, the design needs simplification.',
18
+ steps: `1. RED — Write the test first
19
+ - Write a test that describes the desired behavior
20
+ - Run it and watch it FAIL (read the actual output)
21
+ - If it passes without new code, the test is wrong or the feature already exists
22
+
23
+ 2. GREEN — Write minimal code to pass
24
+ - Write the simplest implementation that makes the test pass
25
+ - Do NOT write more code than the test demands
26
+ - Run the test and watch it PASS (read the actual output)
27
+
28
+ 3. REFACTOR — Clean up while green
29
+ - Improve structure, naming, duplication — without changing behavior
30
+ - Run tests after every change — they must stay green
31
+ - Commit when clean
32
+
33
+ 4. REPEAT — Next behavior, next test
34
+ - Each cycle should take 2-5 minutes
35
+ - If a cycle takes longer, the step is too big — break it down
36
+
37
+ IRON LAW: If you wrote production code before the test, DELETE IT and start over.`,
38
+ expectedOutcome:
39
+ 'Every piece of production code is demanded by a failing test. Test suite is comprehensive, fast, and trustworthy. Design emerges from testing pressure — simple, decoupled, focused.',
40
+ category: 'methodology',
41
+ tags: ['tdd', 'testing', 'red-green-refactor', 'discipline', 'generic'],
42
+ matchIntents: ['BUILD', 'FIX'],
43
+ matchKeywords: ['implement', 'build', 'create', 'add', 'fix', 'refactor', 'feature', 'code'],
44
+ gates: [
45
+ {
46
+ phase: 'post-task',
47
+ requirement: 'Test must exist and fail before implementation code is written',
48
+ checkType: 'tdd-red',
49
+ },
50
+ {
51
+ phase: 'completion',
52
+ requirement: 'All tests pass with actual output verified (not self-reported)',
53
+ checkType: 'tdd-green',
54
+ },
55
+ ],
56
+ taskTemplates: [
57
+ {
58
+ taskType: 'test',
59
+ titleTemplate: 'Write failing tests for: {objective}',
60
+ acceptanceCriteria: [
61
+ 'Tests describe desired behavior, not implementation details',
62
+ 'Tests run and FAIL (output read and verified)',
63
+ 'No production code written yet',
64
+ ],
65
+ tools: ['search_intelligent'],
66
+ order: 'before-implementation',
67
+ },
68
+ ],
69
+ toolInjections: ['search_intelligent'],
70
+ verificationCriteria: [
71
+ 'Test suite passes (run command, read output)',
72
+ 'No skipped or pending tests',
73
+ 'Coverage covers the new/modified code paths',
74
+ ],
75
+ };
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Generic Playbook: Verification Before Completion
3
+ *
4
+ * Evidence-based completion — no self-reported success.
5
+ * Ported from Salvador's verification playbook.
6
+ */
7
+
8
+ import type { PlaybookDefinition } from '../playbook-types.js';
9
+
10
+ export const verificationPlaybook: PlaybookDefinition = {
11
+ id: 'generic-verification',
12
+ tier: 'generic',
13
+ title: 'Verification Before Completion',
14
+ trigger:
15
+ 'Use at the completion of any task or plan. Activates automatically as a completion gate. Prevents the common failure mode of claiming success without running verification commands.',
16
+ description:
17
+ 'Every completion claim must be backed by evidence: run the command, read the output, only then assert the result. No self-reported success. No "the tests should pass." Actual output or it didn\'t happen.',
18
+ steps: `1. IDENTIFY VERIFICATION COMMANDS
19
+ - What commands prove this works? (test runner, build, lint, type check)
20
+ - What manual checks are needed? (UI renders, API responds, file exists)
21
+ - What acceptance criteria need evidence?
22
+
23
+ 2. RUN EACH COMMAND
24
+ - Execute each verification command
25
+ - READ THE ACTUAL OUTPUT (not just the exit code)
26
+ - If any command fails: the task is NOT complete
27
+
28
+ 3. COLLECT EVIDENCE
29
+ - For each claim, record the command and its output
30
+ - "Tests pass" → show the test runner output
31
+ - "Build succeeds" → show the build output
32
+ - "No regressions" → show the full test suite output
33
+
34
+ 4. VERIFY AGAINST ACCEPTANCE CRITERIA
35
+ - Check each acceptance criterion against collected evidence
36
+ - Mark each as: VERIFIED (with evidence) or UNVERIFIED
37
+ - If any criterion is UNVERIFIED: the task is NOT complete
38
+
39
+ COMMON FALSE COMPLETIONS:
40
+ | Claim | NOT Sufficient | Required |
41
+ |-------|---------------|----------|
42
+ | "Tests pass" | "I believe tests pass" | npm test output showing all pass |
43
+ | "Build works" | "Should compile fine" | npm run build output with 0 errors |
44
+ | "No regressions" | "Didn't change much" | Full test suite output |
45
+ | "Types correct" | "Looks right to me" | tsc --noEmit output |`,
46
+ expectedOutcome:
47
+ 'Every completion claim is backed by command output evidence. No ambiguity about whether the work is actually done.',
48
+ category: 'methodology',
49
+ tags: ['verification', 'evidence', 'completion', 'discipline', 'generic'],
50
+ matchIntents: ['BUILD', 'FIX', 'IMPROVE', 'DELIVER'],
51
+ matchKeywords: ['done', 'complete', 'finish', 'ship', 'merge', 'deploy', 'release'],
52
+ gates: [
53
+ {
54
+ phase: 'completion',
55
+ requirement: 'All acceptance criteria must have evidence (command output, not self-report)',
56
+ checkType: 'verification-evidence',
57
+ },
58
+ ],
59
+ taskTemplates: [
60
+ {
61
+ taskType: 'verification',
62
+ titleTemplate: 'Verify: {objective}',
63
+ acceptanceCriteria: [
64
+ 'All verification commands executed and output read',
65
+ 'All acceptance criteria matched against evidence',
66
+ 'No unverified claims remain',
67
+ ],
68
+ tools: [],
69
+ order: 'after-implementation',
70
+ },
71
+ ],
72
+ toolInjections: [],
73
+ verificationCriteria: [
74
+ 'Test suite passes (actual output, not self-report)',
75
+ 'Build succeeds (actual output)',
76
+ 'Type checking passes (actual output)',
77
+ 'All acceptance criteria have matching evidence',
78
+ ],
79
+ };
@@ -0,0 +1,27 @@
1
+ // ─── Playbook Types ─────────────────────────────────────────────────
2
+ export type {
3
+ PlaybookTier,
4
+ PlaybookIntent,
5
+ BrainstormSection,
6
+ PlaybookGate,
7
+ PlaybookTaskTemplate,
8
+ PlaybookDefinition,
9
+ MergedPlaybook,
10
+ PlaybookMatchResult,
11
+ } from './playbook-types.js';
12
+
13
+ // ─── Playbook Registry ──────────────────────────────────────────────
14
+ export {
15
+ getBuiltinPlaybook,
16
+ getAllBuiltinPlaybooks,
17
+ scorePlaybook,
18
+ mergePlaybooks,
19
+ matchPlaybooks,
20
+ } from './playbook-registry.js';
21
+
22
+ // ─── Playbook Seeder ────────────────────────────────────────────────
23
+ export {
24
+ playbookDefinitionToEntry,
25
+ entryToPlaybookDefinition,
26
+ seedDefaultPlaybooks,
27
+ } from './playbook-seeder.js';