@xhulz/nina 0.68.1 → 0.69.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 (266) hide show
  1. package/package.json +1 -1
  2. package/releases/0.68.2/core/GAPS.md +125 -0
  3. package/releases/0.68.2/core/answered.json +80 -0
  4. package/releases/0.68.2/core/defaults/tree/.claude/agents/architect.md +1 -0
  5. package/releases/0.68.2/core/defaults/tree/.claude/agents/dba.md +3 -0
  6. package/releases/0.68.2/core/defaults/tree/.claude/agents/devops.md +1 -0
  7. package/releases/0.68.2/core/defaults/tree/.claude/agents/implementer.md +1 -0
  8. package/releases/0.68.2/core/defaults/tree/.claude/agents/integration-tester.md +3 -0
  9. package/releases/0.68.2/core/defaults/tree/.claude/agents/qa.md +7 -0
  10. package/releases/0.68.2/core/defaults/tree/.claude/agents/reviewer.md +3 -0
  11. package/releases/0.68.2/core/defaults/tree/.claude/agents/secops.md +3 -0
  12. package/releases/0.68.2/core/defaults/tree/.claude/agents/solidity-auditor.md +3 -0
  13. package/releases/0.68.2/core/defaults/tree/.claude/agents/solidity-dev.md +3 -0
  14. package/releases/0.68.2/core/tree/.claude/agents/architect.md +134 -0
  15. package/releases/0.68.2/core/tree/.claude/agents/dba.md +119 -0
  16. package/releases/0.68.2/core/tree/.claude/agents/design-reviewer.md +76 -0
  17. package/releases/0.68.2/core/tree/.claude/agents/devops.md +118 -0
  18. package/releases/0.68.2/core/tree/.claude/agents/implementer.md +178 -0
  19. package/releases/0.68.2/core/tree/.claude/agents/integration-tester.md +170 -0
  20. package/releases/0.68.2/core/tree/.claude/agents/planner.md +132 -0
  21. package/releases/0.68.2/core/tree/.claude/agents/qa.md +150 -0
  22. package/releases/0.68.2/core/tree/.claude/agents/reviewer.md +187 -0
  23. package/releases/0.68.2/core/tree/.claude/agents/secops.md +120 -0
  24. package/releases/0.68.2/core/tree/.claude/agents/solidity-auditor.md +126 -0
  25. package/releases/0.68.2/core/tree/.claude/agents/solidity-dev.md +123 -0
  26. package/releases/0.68.2/core/tree/.claude/agents-overview.md +65 -0
  27. package/releases/0.68.2/core/tree/.claude/frontend.md +10 -0
  28. package/releases/0.68.2/core/tree/.claude/graph.md +79 -0
  29. package/releases/0.68.2/core/tree/.claude/patterns.md +252 -0
  30. package/releases/0.68.2/core/tree/.claude/pills/README.md +150 -0
  31. package/releases/0.68.2/core/tree/.claude/pipeline.md +101 -0
  32. package/releases/0.68.2/core/tree/.claude/retrieval.md +103 -0
  33. package/releases/0.68.2/core/tree/.claude/router.md +218 -0
  34. package/releases/0.68.2/core/tree/.claude/templates/integration.md +48 -0
  35. package/releases/0.68.2/core/tree/CLAUDE.md +166 -0
  36. package/releases/0.68.2/core/tree/scripts/cost-watch.mjs +25 -0
  37. package/releases/0.68.2/core/tree/scripts/edit-guard.mjs +24 -0
  38. package/releases/0.68.2/core/tree/scripts/harness-check.mjs +81 -0
  39. package/releases/0.68.2/core/tree/scripts/loop-gate.mjs +19 -0
  40. package/releases/0.68.2/core/vocabulary.json +14 -0
  41. package/releases/0.68.2/surfaces/blockchain/tree/.claude/agents/architect.md +5 -0
  42. package/releases/0.68.2/surfaces/blockchain/tree/.claude/agents/devops.md +5 -0
  43. package/releases/0.68.2/surfaces/blockchain/tree/.claude/agents/reviewer.md +5 -0
  44. package/releases/0.68.2/surfaces/blockchain/tree/.claude/agents/solidity-auditor.md +18 -0
  45. package/releases/0.68.2/surfaces/blockchain/tree/.claude/agents/solidity-dev.md +16 -0
  46. package/releases/0.68.2/surfaces/blockchain/tree/.claude/agents-overview.md +6 -0
  47. package/releases/0.68.2/surfaces/blockchain/tree/.claude/graph.md +11 -0
  48. package/releases/0.68.2/surfaces/blockchain/tree/.claude/router.md +6 -0
  49. package/releases/0.68.2/surfaces/blockchain/tree/CLAUDE.md +12 -0
  50. package/releases/0.68.2/surfaces/d1/tree/.claude/agents/dba.md +15 -0
  51. package/releases/0.68.2/surfaces/d1/tree/.claude/agents/devops.md +2 -0
  52. package/releases/0.68.2/surfaces/d1/tree/.claude/agents/implementer.md +2 -0
  53. package/releases/0.68.2/surfaces/d1/tree/.claude/patterns.md +8 -0
  54. package/releases/0.68.2/surfaces/d1/tree/CLAUDE.md +2 -0
  55. package/releases/0.68.2/surfaces/db/tree/.claude/agents/architect.md +5 -0
  56. package/releases/0.68.2/surfaces/db/tree/.claude/agents/dba.md +54 -0
  57. package/releases/0.68.2/surfaces/db/tree/.claude/agents/devops.md +5 -0
  58. package/releases/0.68.2/surfaces/db/tree/.claude/agents/implementer.md +2 -0
  59. package/releases/0.68.2/surfaces/db/tree/.claude/agents/integration-tester.md +10 -0
  60. package/releases/0.68.2/surfaces/db/tree/.claude/agents/planner.md +2 -0
  61. package/releases/0.68.2/surfaces/db/tree/.claude/agents/reviewer.md +22 -0
  62. package/releases/0.68.2/surfaces/db/tree/.claude/agents/secops.md +2 -0
  63. package/releases/0.68.2/surfaces/db/tree/.claude/agents-overview.md +5 -0
  64. package/releases/0.68.2/surfaces/db/tree/.claude/graph.md +8 -0
  65. package/releases/0.68.2/surfaces/db/tree/.claude/patterns.md +22 -0
  66. package/releases/0.68.2/surfaces/db/tree/.claude/pipeline.md +13 -0
  67. package/releases/0.68.2/surfaces/db/tree/.claude/retrieval.md +5 -0
  68. package/releases/0.68.2/surfaces/db/tree/.claude/router.md +4 -0
  69. package/releases/0.68.2/surfaces/db/tree/CLAUDE.md +17 -0
  70. package/releases/0.68.2/surfaces/drizzle/tree/.claude/agents/dba.md +9 -0
  71. package/releases/0.68.2/surfaces/drizzle/tree/.claude/agents/devops.md +5 -0
  72. package/releases/0.68.2/surfaces/drizzle/tree/.claude/agents/implementer.md +2 -0
  73. package/releases/0.68.2/surfaces/drizzle/tree/.claude/patterns.md +7 -0
  74. package/releases/0.68.2/surfaces/edge-cf/tree/.claude/agents/architect.md +14 -0
  75. package/releases/0.68.2/surfaces/edge-cf/tree/.claude/agents/dba.md +2 -0
  76. package/releases/0.68.2/surfaces/edge-cf/tree/.claude/agents/devops.md +29 -0
  77. package/releases/0.68.2/surfaces/edge-cf/tree/.claude/agents/implementer.md +14 -0
  78. package/releases/0.68.2/surfaces/edge-cf/tree/.claude/agents/integration-tester.md +11 -0
  79. package/releases/0.68.2/surfaces/edge-cf/tree/.claude/agents/qa.md +3 -0
  80. package/releases/0.68.2/surfaces/edge-cf/tree/.claude/agents/reviewer.md +8 -0
  81. package/releases/0.68.2/surfaces/edge-cf/tree/.claude/agents/secops.md +8 -0
  82. package/releases/0.68.2/surfaces/edge-cf/tree/.claude/patterns.md +17 -0
  83. package/releases/0.68.2/surfaces/edge-cf/tree/.claude/retrieval.md +8 -0
  84. package/releases/0.68.2/surfaces/edge-cf/tree/CLAUDE.md +27 -0
  85. package/releases/0.68.2/surfaces/frontend/tree/.claude/agents/architect.md +20 -0
  86. package/releases/0.68.2/surfaces/frontend/tree/.claude/agents/devops.md +28 -0
  87. package/releases/0.68.2/surfaces/frontend/tree/.claude/agents/implementer.md +25 -0
  88. package/releases/0.68.2/surfaces/frontend/tree/.claude/agents/qa.md +17 -0
  89. package/releases/0.68.2/surfaces/frontend/tree/.claude/agents/reviewer.md +56 -0
  90. package/releases/0.68.2/surfaces/frontend/tree/.claude/patterns.md +8 -0
  91. package/releases/0.68.2/surfaces/frontend/tree/.claude/retrieval.md +2 -0
  92. package/releases/0.68.2/surfaces/frontend/tree/.claude/router.md +14 -0
  93. package/releases/0.68.2/surfaces/frontend/tree/CLAUDE.md +5 -0
  94. package/releases/0.68.2/surfaces/integrations/tree/.claude/agents/architect.md +16 -0
  95. package/releases/0.68.2/surfaces/integrations/tree/.claude/agents/implementer.md +12 -0
  96. package/releases/0.68.2/surfaces/integrations/tree/.claude/agents/integration-tester.md +20 -0
  97. package/releases/0.68.2/surfaces/integrations/tree/.claude/agents/planner.md +2 -0
  98. package/releases/0.68.2/surfaces/integrations/tree/.claude/agents/reviewer.md +21 -0
  99. package/releases/0.68.2/surfaces/integrations/tree/.claude/agents/secops.md +2 -0
  100. package/releases/0.68.2/surfaces/integrations/tree/.claude/agents-overview.md +8 -0
  101. package/releases/0.68.2/surfaces/integrations/tree/.claude/graph.md +10 -0
  102. package/releases/0.68.2/surfaces/integrations/tree/.claude/patterns.md +38 -0
  103. package/releases/0.68.2/surfaces/integrations/tree/.claude/pipeline.md +16 -0
  104. package/releases/0.68.2/surfaces/integrations/tree/.claude/retrieval.md +16 -0
  105. package/releases/0.68.2/surfaces/integrations/tree/.claude/router.md +6 -0
  106. package/releases/0.68.2/surfaces/integrations/tree/CLAUDE.md +17 -0
  107. package/releases/0.68.2/surfaces/money/tree/.claude/agents/architect.md +12 -0
  108. package/releases/0.68.2/surfaces/money/tree/.claude/agents/dba.md +14 -0
  109. package/releases/0.68.2/surfaces/money/tree/.claude/agents/implementer.md +11 -0
  110. package/releases/0.68.2/surfaces/money/tree/.claude/agents/integration-tester.md +3 -0
  111. package/releases/0.68.2/surfaces/money/tree/.claude/agents/reviewer.md +23 -0
  112. package/releases/0.68.2/surfaces/money/tree/.claude/agents/secops.md +5 -0
  113. package/releases/0.68.2/surfaces/money/tree/.claude/agents/solidity-auditor.md +4 -0
  114. package/releases/0.68.2/surfaces/money/tree/.claude/agents/solidity-dev.md +4 -0
  115. package/releases/0.68.2/surfaces/money/tree/.claude/graph.md +2 -0
  116. package/releases/0.68.2/surfaces/money/tree/.claude/patterns.md +49 -0
  117. package/releases/0.68.2/surfaces/money/tree/.claude/pipeline.md +2 -0
  118. package/releases/0.68.2/surfaces/money/tree/.claude/retrieval.md +2 -0
  119. package/releases/0.68.2/surfaces/money/tree/CLAUDE.md +11 -0
  120. package/releases/0.68.2/surfaces/pii/tree/.claude/agents/dba.md +2 -0
  121. package/releases/0.68.2/surfaces/pii/tree/.claude/agents/devops.md +8 -0
  122. package/releases/0.68.2/surfaces/pii/tree/.claude/agents/reviewer.md +8 -0
  123. package/releases/0.68.2/surfaces/pii/tree/.claude/agents/secops.md +2 -0
  124. package/releases/0.68.2/surfaces/pii/tree/.claude/agents/solidity-auditor.md +5 -0
  125. package/releases/0.68.2/surfaces/pii/tree/CLAUDE.md +5 -0
  126. package/releases/0.68.2/surfaces/prisma/tree/.claude/agents/architect.md +2 -0
  127. package/releases/0.68.2/surfaces/prisma/tree/.claude/agents/dba.md +42 -0
  128. package/releases/0.68.2/surfaces/prisma/tree/.claude/agents/devops.md +11 -0
  129. package/releases/0.68.2/surfaces/prisma/tree/.claude/agents/implementer.md +2 -0
  130. package/releases/0.68.2/surfaces/prisma/tree/.claude/agents/integration-tester.md +2 -0
  131. package/releases/0.68.2/surfaces/prisma/tree/.claude/agents/reviewer.md +2 -0
  132. package/releases/0.68.2/surfaces/prisma/tree/.claude/patterns.md +15 -0
  133. package/releases/0.68.2/surfaces/prisma/tree/CLAUDE.md +5 -0
  134. package/releases/0.69.0/core/GAPS.md +125 -0
  135. package/releases/0.69.0/core/answered.json +83 -0
  136. package/releases/0.69.0/core/defaults/tree/.claude/agents/architect.md +1 -0
  137. package/releases/0.69.0/core/defaults/tree/.claude/agents/dba.md +3 -0
  138. package/releases/0.69.0/core/defaults/tree/.claude/agents/devops.md +1 -0
  139. package/releases/0.69.0/core/defaults/tree/.claude/agents/implementer.md +1 -0
  140. package/releases/0.69.0/core/defaults/tree/.claude/agents/integration-tester.md +3 -0
  141. package/releases/0.69.0/core/defaults/tree/.claude/agents/qa.md +7 -0
  142. package/releases/0.69.0/core/defaults/tree/.claude/agents/reviewer.md +3 -0
  143. package/releases/0.69.0/core/defaults/tree/.claude/agents/secops.md +3 -0
  144. package/releases/0.69.0/core/defaults/tree/.claude/agents/solidity-auditor.md +3 -0
  145. package/releases/0.69.0/core/defaults/tree/.claude/agents/solidity-dev.md +3 -0
  146. package/releases/0.69.0/core/tree/.claude/agents/architect.md +135 -0
  147. package/releases/0.69.0/core/tree/.claude/agents/dba.md +119 -0
  148. package/releases/0.69.0/core/tree/.claude/agents/design-reviewer.md +78 -0
  149. package/releases/0.69.0/core/tree/.claude/agents/devops.md +118 -0
  150. package/releases/0.69.0/core/tree/.claude/agents/implementer.md +178 -0
  151. package/releases/0.69.0/core/tree/.claude/agents/integration-tester.md +170 -0
  152. package/releases/0.69.0/core/tree/.claude/agents/planner.md +132 -0
  153. package/releases/0.69.0/core/tree/.claude/agents/qa.md +150 -0
  154. package/releases/0.69.0/core/tree/.claude/agents/reviewer.md +187 -0
  155. package/releases/0.69.0/core/tree/.claude/agents/secops.md +120 -0
  156. package/releases/0.69.0/core/tree/.claude/agents/solidity-auditor.md +126 -0
  157. package/releases/0.69.0/core/tree/.claude/agents/solidity-dev.md +123 -0
  158. package/releases/0.69.0/core/tree/.claude/agents-overview.md +65 -0
  159. package/releases/0.69.0/core/tree/.claude/frontend.md +10 -0
  160. package/releases/0.69.0/core/tree/.claude/graph.md +79 -0
  161. package/releases/0.69.0/core/tree/.claude/patterns.md +252 -0
  162. package/releases/0.69.0/core/tree/.claude/pills/README.md +150 -0
  163. package/releases/0.69.0/core/tree/.claude/pipeline.md +101 -0
  164. package/releases/0.69.0/core/tree/.claude/retrieval.md +103 -0
  165. package/releases/0.69.0/core/tree/.claude/router.md +219 -0
  166. package/releases/0.69.0/core/tree/.claude/templates/integration.md +48 -0
  167. package/releases/0.69.0/core/tree/CLAUDE.md +166 -0
  168. package/releases/0.69.0/core/tree/scripts/cost-watch.mjs +25 -0
  169. package/releases/0.69.0/core/tree/scripts/edit-guard.mjs +24 -0
  170. package/releases/0.69.0/core/tree/scripts/harness-check.mjs +81 -0
  171. package/releases/0.69.0/core/tree/scripts/loop-gate.mjs +19 -0
  172. package/releases/0.69.0/core/vocabulary.json +14 -0
  173. package/releases/0.69.0/surfaces/blockchain/tree/.claude/agents/architect.md +5 -0
  174. package/releases/0.69.0/surfaces/blockchain/tree/.claude/agents/devops.md +5 -0
  175. package/releases/0.69.0/surfaces/blockchain/tree/.claude/agents/reviewer.md +5 -0
  176. package/releases/0.69.0/surfaces/blockchain/tree/.claude/agents/solidity-auditor.md +18 -0
  177. package/releases/0.69.0/surfaces/blockchain/tree/.claude/agents/solidity-dev.md +16 -0
  178. package/releases/0.69.0/surfaces/blockchain/tree/.claude/agents-overview.md +6 -0
  179. package/releases/0.69.0/surfaces/blockchain/tree/.claude/graph.md +11 -0
  180. package/releases/0.69.0/surfaces/blockchain/tree/.claude/router.md +6 -0
  181. package/releases/0.69.0/surfaces/blockchain/tree/CLAUDE.md +12 -0
  182. package/releases/0.69.0/surfaces/d1/tree/.claude/agents/dba.md +15 -0
  183. package/releases/0.69.0/surfaces/d1/tree/.claude/agents/devops.md +2 -0
  184. package/releases/0.69.0/surfaces/d1/tree/.claude/agents/implementer.md +2 -0
  185. package/releases/0.69.0/surfaces/d1/tree/.claude/patterns.md +8 -0
  186. package/releases/0.69.0/surfaces/d1/tree/CLAUDE.md +2 -0
  187. package/releases/0.69.0/surfaces/db/tree/.claude/agents/architect.md +5 -0
  188. package/releases/0.69.0/surfaces/db/tree/.claude/agents/dba.md +54 -0
  189. package/releases/0.69.0/surfaces/db/tree/.claude/agents/devops.md +5 -0
  190. package/releases/0.69.0/surfaces/db/tree/.claude/agents/implementer.md +2 -0
  191. package/releases/0.69.0/surfaces/db/tree/.claude/agents/integration-tester.md +10 -0
  192. package/releases/0.69.0/surfaces/db/tree/.claude/agents/planner.md +2 -0
  193. package/releases/0.69.0/surfaces/db/tree/.claude/agents/reviewer.md +22 -0
  194. package/releases/0.69.0/surfaces/db/tree/.claude/agents/secops.md +2 -0
  195. package/releases/0.69.0/surfaces/db/tree/.claude/agents-overview.md +5 -0
  196. package/releases/0.69.0/surfaces/db/tree/.claude/graph.md +8 -0
  197. package/releases/0.69.0/surfaces/db/tree/.claude/patterns.md +22 -0
  198. package/releases/0.69.0/surfaces/db/tree/.claude/pipeline.md +13 -0
  199. package/releases/0.69.0/surfaces/db/tree/.claude/retrieval.md +5 -0
  200. package/releases/0.69.0/surfaces/db/tree/.claude/router.md +4 -0
  201. package/releases/0.69.0/surfaces/db/tree/CLAUDE.md +17 -0
  202. package/releases/0.69.0/surfaces/drizzle/tree/.claude/agents/dba.md +9 -0
  203. package/releases/0.69.0/surfaces/drizzle/tree/.claude/agents/devops.md +5 -0
  204. package/releases/0.69.0/surfaces/drizzle/tree/.claude/agents/implementer.md +2 -0
  205. package/releases/0.69.0/surfaces/drizzle/tree/.claude/patterns.md +7 -0
  206. package/releases/0.69.0/surfaces/edge-cf/tree/.claude/agents/architect.md +14 -0
  207. package/releases/0.69.0/surfaces/edge-cf/tree/.claude/agents/dba.md +2 -0
  208. package/releases/0.69.0/surfaces/edge-cf/tree/.claude/agents/devops.md +29 -0
  209. package/releases/0.69.0/surfaces/edge-cf/tree/.claude/agents/implementer.md +14 -0
  210. package/releases/0.69.0/surfaces/edge-cf/tree/.claude/agents/integration-tester.md +11 -0
  211. package/releases/0.69.0/surfaces/edge-cf/tree/.claude/agents/qa.md +3 -0
  212. package/releases/0.69.0/surfaces/edge-cf/tree/.claude/agents/reviewer.md +8 -0
  213. package/releases/0.69.0/surfaces/edge-cf/tree/.claude/agents/secops.md +8 -0
  214. package/releases/0.69.0/surfaces/edge-cf/tree/.claude/patterns.md +17 -0
  215. package/releases/0.69.0/surfaces/edge-cf/tree/.claude/retrieval.md +8 -0
  216. package/releases/0.69.0/surfaces/edge-cf/tree/CLAUDE.md +27 -0
  217. package/releases/0.69.0/surfaces/frontend/tree/.claude/agents/architect.md +20 -0
  218. package/releases/0.69.0/surfaces/frontend/tree/.claude/agents/devops.md +28 -0
  219. package/releases/0.69.0/surfaces/frontend/tree/.claude/agents/implementer.md +25 -0
  220. package/releases/0.69.0/surfaces/frontend/tree/.claude/agents/qa.md +17 -0
  221. package/releases/0.69.0/surfaces/frontend/tree/.claude/agents/reviewer.md +56 -0
  222. package/releases/0.69.0/surfaces/frontend/tree/.claude/patterns.md +8 -0
  223. package/releases/0.69.0/surfaces/frontend/tree/.claude/retrieval.md +2 -0
  224. package/releases/0.69.0/surfaces/frontend/tree/.claude/router.md +14 -0
  225. package/releases/0.69.0/surfaces/frontend/tree/CLAUDE.md +5 -0
  226. package/releases/0.69.0/surfaces/integrations/tree/.claude/agents/architect.md +16 -0
  227. package/releases/0.69.0/surfaces/integrations/tree/.claude/agents/implementer.md +12 -0
  228. package/releases/0.69.0/surfaces/integrations/tree/.claude/agents/integration-tester.md +20 -0
  229. package/releases/0.69.0/surfaces/integrations/tree/.claude/agents/planner.md +2 -0
  230. package/releases/0.69.0/surfaces/integrations/tree/.claude/agents/reviewer.md +21 -0
  231. package/releases/0.69.0/surfaces/integrations/tree/.claude/agents/secops.md +2 -0
  232. package/releases/0.69.0/surfaces/integrations/tree/.claude/agents-overview.md +8 -0
  233. package/releases/0.69.0/surfaces/integrations/tree/.claude/graph.md +10 -0
  234. package/releases/0.69.0/surfaces/integrations/tree/.claude/patterns.md +38 -0
  235. package/releases/0.69.0/surfaces/integrations/tree/.claude/pipeline.md +16 -0
  236. package/releases/0.69.0/surfaces/integrations/tree/.claude/retrieval.md +16 -0
  237. package/releases/0.69.0/surfaces/integrations/tree/.claude/router.md +6 -0
  238. package/releases/0.69.0/surfaces/integrations/tree/CLAUDE.md +17 -0
  239. package/releases/0.69.0/surfaces/money/tree/.claude/agents/architect.md +12 -0
  240. package/releases/0.69.0/surfaces/money/tree/.claude/agents/dba.md +14 -0
  241. package/releases/0.69.0/surfaces/money/tree/.claude/agents/implementer.md +11 -0
  242. package/releases/0.69.0/surfaces/money/tree/.claude/agents/integration-tester.md +3 -0
  243. package/releases/0.69.0/surfaces/money/tree/.claude/agents/reviewer.md +23 -0
  244. package/releases/0.69.0/surfaces/money/tree/.claude/agents/secops.md +5 -0
  245. package/releases/0.69.0/surfaces/money/tree/.claude/agents/solidity-auditor.md +4 -0
  246. package/releases/0.69.0/surfaces/money/tree/.claude/agents/solidity-dev.md +4 -0
  247. package/releases/0.69.0/surfaces/money/tree/.claude/graph.md +2 -0
  248. package/releases/0.69.0/surfaces/money/tree/.claude/patterns.md +49 -0
  249. package/releases/0.69.0/surfaces/money/tree/.claude/pipeline.md +2 -0
  250. package/releases/0.69.0/surfaces/money/tree/.claude/retrieval.md +2 -0
  251. package/releases/0.69.0/surfaces/money/tree/CLAUDE.md +11 -0
  252. package/releases/0.69.0/surfaces/pii/tree/.claude/agents/dba.md +2 -0
  253. package/releases/0.69.0/surfaces/pii/tree/.claude/agents/devops.md +8 -0
  254. package/releases/0.69.0/surfaces/pii/tree/.claude/agents/reviewer.md +8 -0
  255. package/releases/0.69.0/surfaces/pii/tree/.claude/agents/secops.md +2 -0
  256. package/releases/0.69.0/surfaces/pii/tree/.claude/agents/solidity-auditor.md +5 -0
  257. package/releases/0.69.0/surfaces/pii/tree/CLAUDE.md +5 -0
  258. package/releases/0.69.0/surfaces/prisma/tree/.claude/agents/architect.md +2 -0
  259. package/releases/0.69.0/surfaces/prisma/tree/.claude/agents/dba.md +42 -0
  260. package/releases/0.69.0/surfaces/prisma/tree/.claude/agents/devops.md +11 -0
  261. package/releases/0.69.0/surfaces/prisma/tree/.claude/agents/implementer.md +2 -0
  262. package/releases/0.69.0/surfaces/prisma/tree/.claude/agents/integration-tester.md +2 -0
  263. package/releases/0.69.0/surfaces/prisma/tree/.claude/agents/reviewer.md +2 -0
  264. package/releases/0.69.0/surfaces/prisma/tree/.claude/patterns.md +15 -0
  265. package/releases/0.69.0/surfaces/prisma/tree/CLAUDE.md +5 -0
  266. package/src/office.mjs +139 -20
@@ -0,0 +1,10 @@
1
+ <!-- nina:slot integrations.1 -->
2
+ - `integration-tester` — gate: runs the real dependency when the diff touches what its spec lists
3
+
4
+ <!-- nina:slot integrations.2 -->
5
+ - `implementer` → `integration-tester` on `DIFF-READY` — the diff touches what its spec lists
6
+ - `integration-tester` → `qa` on `APPROVED` — once the reviewer, and every other gate the diff went to, approved too
7
+ - `integration-tester` → `architect` on `REJECTED` — a premise is wrong · max 2
8
+ - `architect` → `integration-tester` on `BLOCKED` — a premise of a live service must be observed before the design can settle; the report goes back to the architect · max 2
9
+ - `integration-tester` → `implementer` on `REJECTED` — the premise holds and the code does not honor it · max 2
10
+ - `qa` → `integration-tester` on `FAIL` — the failure is the environment, not the code · max 2
@@ -0,0 +1,38 @@
1
+ <!-- nina:slot integrations.1 -->
2
+ - **Queue** (`{{API_DIR}}/src/queues/<q>.ts`) / **Webhook** (`{{API_DIR}}/src/routes/<source>-webhook.ts`): same discipline — validate the input, build deps, call one service function.
3
+
4
+ <!-- nina:slot integrations.2 -->
5
+ - **Every integration is reached through its boundary module.** Services import the boundary's typed interface; they never construct an HTTP client, an SDK instance or a binding handle themselves.
6
+
7
+ <!-- nina:slot integrations.3 -->
8
+
9
+ ---
10
+
11
+ ## Integrations (enforced by integration-tester + reviewer)
12
+
13
+ An **integration** is a dependency whose behavior this project does not define. Each one is declared in `.nina/profile.json` with a `kind`, or a list of them, and a premise's kind decides what counts as evidence for it:
14
+
15
+ | kind | what it is | a premise is settled by |
16
+ |---|---|---|
17
+ | `installed-library` | code on disk under `node_modules` | `<package dir>/node_modules/<lib>/<file>:<line>`, the version beside it; one no package links, through the one that depends on it: `<package dir>/node_modules/<parent> → <lib>@<version>/<file>:<line>` |
18
+ | `live-api` | a third-party HTTP API | a contract-test case, or a response observed against the service and captured verbatim |
19
+ | `platform-binding` | a runtime the host provides | behavior observed under the local emulator, plus the platform's installed types |
20
+
21
+ - **One boundary per integration.** All access goes through the module named as its `boundary`. A service, route, queue consumer or scheduled handler that reaches the dependency directly is a hard reject: there is then no single place to mock it, retry it, log it, or fix it.
22
+ - **A `live-api` gets two implementations behind one interface** — the real client, and a deterministic in-memory mock. One **contract-test suite** exercises the interface and **BOTH** must pass it. The mock passing alone proves nothing about production; when the two disagree, the mock is wrong, never the other way round.
23
+ - **Validate responses at the boundary**, in both implementations, so drift in the dependency surfaces structurally instead of as a type error three layers downstream.
24
+ - **Typed errors at the boundary.** It maps the dependency's failures to this project's own error types; callers never handle a raw HTTP status or a vendor error code.
25
+
26
+ ### Adding an integration
27
+
28
+ Four things, and none of them is optional:
29
+
30
+ 1. **The doc** — `.claude/integrations/<slug>.md`, from `.claude/templates/integration.md`. It opens with a premise index, then one `## P<n>` section per premise: a one-sentence claim, and the evidence that settles it in the form its kind requires.
31
+ 2. **The boundary** — one module, named in the profile entry. For a `live-api`: the interface, both implementations, and the contract suite.
32
+ 3. **The profile entry** — `slug`, `name`, `kind`, `boundary` and `skill` in `.nina/profile.json`. This is what makes the integration visible to the gates; an integration that is not declared is not gated.
33
+ 4. **The skill binding, when one exists.** If an installed skill covers this dependency, name it in the entry's `skill` field and add its row to the *Skills you MUST consult* table of every agent that touches the surface. The table ends in a `skills` slot for exactly this: write the row in `.nina/project/tree/.claude/agents/<role>.md` under that slot's marker (`nina where .claude/agents/<role>.md` names it), with the skill in the first cell and the trigger in the second (where the section is a list or a paragraph, the skill in bold), then `nina compose`. `nina check` confirms the agent's `tools:` grants `Skill`, which is an allowlist, not a hint. **If no installed skill covers it, bind none:** an invented binding is worse than none, because it reads as retrieval while being recall.
34
+
35
+ The **integration-tester** owns the doc: it creates it on first contact and appends a premise whenever it observes behavior the doc does not yet carry. The architect cites it, the implementer honors it, and the reviewer refuses a spec that touches the surface without it.
36
+
37
+ <!-- nina:slot integrations.4 -->
38
+ - **`live-api` integrations:** the contract-test suite for the boundary runs against BOTH implementations. Tests elsewhere inject the mock; the integration gate exercises the real service.
@@ -0,0 +1,16 @@
1
+ <!-- nina:slot integrations.1 -->
2
+
3
+ ### Integration-tester (mandatory for integration boundaries)
4
+
5
+ - **Trigger:** any diff touching the boundary module of a declared integration, or adding a call into one.
6
+ - **Input:** architect spec (with its **Integration premises** section) + implementer diff + repo state.
7
+ - **Output:** approve or reject. Approve includes a verified-premise table (premise → verdict → citation). Reject identifies which premise or contract case failed, and whether the fix is upstream (respec) or in code.
8
+ - **Tools:** Read, Write, Edit, Glob, Grep, Bash. Edits scoped to integration/contract test dirs and `.claude/integrations/**`.
9
+ - **Checks:**
10
+ - **`installed-library` / `platform-binding`:** run the real flow against the real dependency. Read `.claude/integrations/<slug>.md` and probe each premise it lists.
11
+ - **`live-api`:** run the **contract-test suite** for that boundary against **both** implementations. A mock that is green while the real client is not is a lie. Confirm nothing reaches the service outside its boundary module.
12
+ - Update `.claude/integrations/<slug>.md` when new behavior is observed.
13
+ - **Position:** after implementer, in parallel with any other gate the diff triggered. Reviewer verifies both gates ran.
14
+
15
+ <!-- nina:slot integrations.2 -->
16
+ - **If an integration boundary was touched → integration-tester approved.**
@@ -0,0 +1,16 @@
1
+ <!-- nina:slot integrations.1 -->
2
+
3
+ ## Integration docs (load whenever an integration is touched)
4
+
5
+ `.claude/integrations/<slug>.md` holds the verified premises for one integration. The architect MUST cite premises from it — or add new ones, carrying the evidence the integration's kind requires — in any spec that touches the boundary. The integration-tester probes each cited premise before `qa` goes out.
6
+
7
+ This project's integrations:
8
+
9
+ <!-- nina:slot integrations.2 -->
10
+
11
+ The integration-tester owns these docs. It creates one on first contact with a dependency and appends a premise whenever it observes behavior the doc does not yet carry, written against the version actually installed here or the response actually observed — never against the vendor's documentation.
12
+
13
+ Read the doc's index and the premise sections your task cites. **Not the whole file:** an integration doc for a large dependency runs to thousands of lines, and reading it end to end is one of the biggest time sinks in this pipeline.
14
+
15
+ <!-- nina:slot integrations.3 -->
16
+ | Integration boundary change | `.claude/integrations/<slug>.md`, and the boundary module named in the profile | architect (cites premises) → implementer → reviewer + **integration-tester** → qa |
@@ -0,0 +1,6 @@
1
+ <!-- nina:slot integrations.1 -->
2
+
3
+ ### Integration-tester is a guardrail for integration boundaries
4
+ Invoke **integration-tester** any time the diff touches the boundary module of a declared integration, or adds a call into one. It runs the real dependency, never a mock of it; for a `live-api` it runs the **contract-test suite against BOTH implementations**, so the mock can never pass while the live path is broken. No such change merges without its approval.
5
+
6
+ The architect's spec MUST carry an **Integration premises** section: every behavior the implementation relies on, each with the evidence its kind requires — `<package dir>/node_modules/<lib>/<file>:<line>` with its version for an installed library, a contract case or an observed response for a live API, the local emulator for a platform binding. Never by inference. An architect `BLOCKED` on a live service's premise gets it observed by the integration-tester, then resumes with its report.
@@ -0,0 +1,17 @@
1
+ <!-- nina:slot integrations.1 -->
2
+ | **ANY integration surface** (the boundary module of a declared integration, or a new call into one) | architect cites a premise, with the evidence its kind requires, for every dependency behavior the code relies on; **+ integration-tester beside the reviewer** |
3
+
4
+ <!-- nina:slot integrations.3 -->
5
+ - **integration-tester** → mandatory gate on any integration boundary; runs the real dependency rather than a mock of it, and for a `live-api` runs the contract-test suite against both implementations so they cannot diverge; verifies every cited premise; keeps `.claude/integrations/<slug>.md` current
6
+
7
+ <!-- nina:slot integrations.4 -->
8
+ 11. **Every integration has one boundary and one doc.** A dependency whose behavior you do not define — an installed library, a live third-party API, a platform binding — is reached through exactly ONE module, and nothing else speaks to it: no raw HTTP, SDK instance or binding handle in a route, service, queue consumer or scheduled handler. Each is declared in `.nina/profile.json` with its `kind` — a list, where it is more than one — and `boundary`, and documented at `.claude/integrations/<slug>.md`. A `live-api` carries two implementations behind one interface — the real client and a deterministic mock — and one contract-test suite that BOTH must pass; a mock that is green while the real client is not is a lie, and a hard reject.
9
+
10
+ <!-- nina:slot integrations.5 -->
11
+ 12. **A premise about an integration requires a citation, and the form depends on the kind.** The architect MAY NOT state a dependency's behavior as fact without evidence: for an `installed-library`, `<package dir>/node_modules/<lib>/<file>:<line>` with the version installed here beside it — the package's own link, not the store directory a peer change renames, and for a dependency of a dependency, which no package links, its parent's: `<package dir>/node_modules/<parent> → <lib>@<version>/<file>:<line>`; for a `live-api`, a contract-test case or a response observed against the service and captured verbatim — observed by the integration-tester, before the spec when the design depends on it; for a `platform-binding`, behavior observed under the local emulator. An integration of two kinds — a client library over a platform binding — cites each premise by the kind it is about: the library's own behavior from its source, the binding's from the emulator. Vendor docs, a README, a changelog and recall are NOT citations. An uncited premise is an assumption, and the spec is rejected by the reviewer.
12
+
13
+ <!-- nina:slot integrations.6 -->
14
+ 13. **Integration boundaries require the integration-tester gate before qa.** Any diff touching a boundary module, or adding a call into one, MUST pass the integration-tester, which runs beside the reviewer, before `qa` goes out. Unit-test mocks honor the spec, not the dependency — a mock is green because we wrote it that way. Only a run against the real thing, or a contract suite both implementations pass, catches drift.
15
+
16
+ <!-- nina:slot integrations.7 -->
17
+ - **an integration boundary**: a call to an external service, or a webhook or callback from one
@@ -0,0 +1,12 @@
1
+ <!-- nina:slot money.1 -->
2
+ - **Money invariants** — if the spec touches distribution, transfer generation, or a send to the payment integration, explicitly confirm the design honors:
3
+ - Money is integer {{MINOR_UNIT}} end to end; percentages are basis points. Never a floating-point type.
4
+ - A distribution may NEVER exceed the amount → **block** (reject the operation, do not clamp it).
5
+ - A distribution **less** than the amount → **allow**, surface the shortfall, leave the remainder **parked** — never silently distributed.
6
+ - Transfers are **idempotent** — never sent twice. Dedupe happens at the serialization point, via the key, before the side effect.
7
+ - Every legal state transition writes an audit row (who / when / from → to). Illegal transitions throw.
8
+
9
+ If the design cannot satisfy all of these, redesign before submitting the spec.
10
+
11
+ <!-- nina:slot money.2 -->
12
+ - Design a money movement that can exceed the amount it distributes, silently absorb a shortfall, or send a transfer twice. If the design needs monetary computation, that computation lives in `{{CORE_PKG}}` as a pure function — never inline in a service or route.
@@ -0,0 +1,14 @@
1
+ <!-- nina:slot money.1 -->
2
+ - **No cache on a read that feeds a money write.** Anything that loads an amount or a balance before computing, approving or dispatching a transfer MUST NOT be cached. A stale amount contaminates a real money movement, and that damage is not undone by fixing the cache afterwards. **Hard reject if violated.**
3
+
4
+ <!-- nina:slot money.2 -->
5
+ - **Monetary columns are integer.** Money is stored as an integer of the currency's minor unit ({{MINOR_UNIT}}); percentages are basis points. Reject `Decimal`, `Float`, or any type that can hold a fraction of the minor unit.
6
+
7
+ <!-- nina:slot money.3 -->
8
+ - **Money-integrity constraints.** When the change touches the record of an outbound transfer, verify the **unique constraint on its idempotency key** exists (`@unique` in the schema → `UNIQUE` in the migration SQL). That constraint is what still holds when the application-level guard fails; a missing or dropped one is a **hard reject**. Verify likewise any uniqueness the ownership model depends on. Report it in its own *Money-integrity* section, before the final verdict.
9
+
10
+ <!-- nina:slot money.4 -->
11
+ - Approve a cache policy on a query that feeds a money write.
12
+
13
+ <!-- nina:slot money.5 -->
14
+ - Approve a change to an outbound-transfer record that lacks the unique constraint on its idempotency key.
@@ -0,0 +1,11 @@
1
+ <!-- nina:slot money.1 -->
2
+
3
+ ## Money invariants you MUST honor
4
+ - **A distribution may NEVER exceed the amount** → block. Implement the reject; never clamp and continue.
5
+ - **A shortfall is parked, not distributed.** Surface it and leave the remainder where it is — never auto-distribute it, never absorb it quietly.
6
+ - **Transfers are idempotent — never sent twice.** Dedupe at the serialization point via the key, *before* the side effect. A retry, a re-delivered message or a double-click must not produce a second transfer.
7
+ - **Every state transition writes an audit row** (entity, from → to, actor). No transition without a trail.
8
+ - The deterministic money logic lives in `{{CORE_PKG}}` — call it as a pure function; never embed the arithmetic in a service.
9
+
10
+ <!-- nina:slot money.2 -->
11
+ - Embed money arithmetic (sums, deltas, value comparisons, distribution math) inline in a service. Computation lives in `{{CORE_PKG}}`.
@@ -0,0 +1,3 @@
1
+ <!-- nina:slot money.1 -->
2
+ - **Confirm idempotency holds end to end.** Two sends with the same key → one logical transfer, no double send, and the serialization point refuses the second. This is the highest-blast-radius invariant in the system — drive it explicitly against the real service; do not infer it from reading the code.
3
+ - **Confirm money crosses the boundary as an integer of the minor unit**, and that conversion happens only in the module that owns it — never in a service, never through a floating-point type.
@@ -0,0 +1,23 @@
1
+ <!-- nina:slot money.1 -->
2
+ - **Enforce the money invariants. Each violation is a HARD REJECT → loop back to architect:**
3
+ - **A distribution may NEVER exceed the amount.** It is blocked, not clamped. A retention is just another destination — same arithmetic, in integer {{MINOR_UNIT}}.
4
+ - **A shortfall must be parked, not silently distributed.** The remainder stays where it is, and the shortfall is surfaced to whoever is owed it.
5
+ - **Transfers must be idempotent — never sent twice.** Every transfer carries a key, and dedupe happens at the serialization point before the side effect. A retry, a re-delivered message or a double-click must never produce a second transfer.
6
+ - **Every state transition writes an audit row** (entity type, id, from, to, actor) and follows the transitions declared in `.claude/architecture.md`. An undeclared transition, or one missing its audit row, is a hard reject.
7
+
8
+ <!-- nina:slot money.2 -->
9
+ - **money-invariants** — a distribution never exceeds the amount; a shortfall is parked, never
10
+ distributed; transfers idempotent at the serialization point; an audit row on every transition;
11
+ integer {{MINOR_UNIT}} and basis points; no arithmetic outside `{{CORE_PKG}}`.
12
+
13
+ <!-- nina:slot money.3 -->
14
+ - `{{CORE_PKG}}` money logic touched (distribution and transfer generation are high-blast-radius)
15
+
16
+ <!-- nina:slot money.4 -->
17
+ - Approve a change that lets a distribution exceed the amount, silently distributes a shortfall, sends a transfer without idempotent dedupe, or skips an audit row — those are hard rejects, loop back to architect.
18
+
19
+ <!-- nina:slot money.5 -->
20
+ - **If APPROVED:** ≤300 words. Sections: Verification commands run (typecheck/lint/build only — NEVER vitest), Spec-match (✅/❌ per item), Hard-rule checks (tenant scoping ✅, integer {{MINOR_UNIT}} / bps ✅, each gate the diff triggered ✅ (`.claude/graph.md`), money invariants ✅ — distribution ≤ amount, shortfall parked, idempotent transfer, audit row on transition), QA-attention flags (list any condition from the "stricter audit" list so QA knows what to focus on), Final verdict.
21
+
22
+ <!-- nina:slot money.6 -->
23
+ - Money invariant violated (distribution exceeds the amount, shortfall silently distributed, non-idempotent transfer, missing audit row) → back to **architect** for redesign.
@@ -0,0 +1,5 @@
1
+ <!-- nina:slot money.1 -->
2
+ - **Money-movement abuse (Hard Rules #3, #4, #5)** — **the money path reaches a real service; this is not a stub audit.** Is the idempotency contract actually enforced at the seam — the unique key, the serialization point, and the dedupe happening *before* the side effect? Can a replay, a double-click, a queue redelivery, or a manual reset of processed state cause a double send? Can a distribution exceed the amount, or a shortfall be silently distributed? Is whatever authorizes money OUT forgeable — a webhook without a verified signature, a callback trusted on its word? Is every state transition forced through an audit write? Flag any seam that is structurally unable to enforce its invariant, even where nothing has exploited it yet.
3
+
4
+ <!-- nina:slot money.2 -->
5
+ - **Idempotency-key & replay surface** — keys unguessable and collision-resistant where it matters; dedup enforced before the side effect, not after.
@@ -0,0 +1,4 @@
1
+ <!-- nina:slot money.1 -->
2
+ - **The conservation property, asserted rather than argued.** Find the test that proves in equals
3
+ out plus retained, and check it holds on the adversarial paths too, not only the intended one.
4
+ Rounding that always favours the same party is a finding; so is a fee path with no upper bound.
@@ -0,0 +1,4 @@
1
+ <!-- nina:slot money.1 -->
2
+ - **State the conservation property and assert it in the suite.** A contract that holds or routes an
3
+ amount has one — what goes in equals what goes out plus what is retained — and it belongs in a
4
+ test, not in a comment. Rounding is part of it: say which way it goes and who it favours.
@@ -0,0 +1,2 @@
1
+ <!-- nina:slot money.1 -->
2
+ - `reviewer` → `architect` on `REJECTED` — a money invariant is broken (a distribution over the amount, a shortfall distributed, a transfer that is not idempotent, a transition with no audit row): a design question before it is a code one · max 2
@@ -0,0 +1,49 @@
1
+ <!-- nina:slot money.1 -->
2
+
3
+ ---
4
+
5
+ ## Monetary values & percentages
6
+
7
+ - **Money is an integer of the currency's minor unit**, end to end — {{MINOR_UNIT}}, never a float, never a type that can hold a fraction of one. Source of precision: `{{MONEY_MODULE}}`.
8
+ - **Percentages are basis points** (`40% → 4000`, `100% → 10000`) so a distribution is exact without floating point.
9
+ - **Parsing, formatting and percentage arithmetic live in one module and nowhere else.** A second place that turns a string into money is a second rounding rule, and the two will disagree on a value somebody is owed.
10
+ - **Never** convert to a floating-point type before formatting, and never let a display format round a stored value.
11
+ - Monetary database columns are integer. JSON responses serialize them as **strings**, not numbers, so no client parses them into a float. The service owns the conversion.
12
+
13
+ <!-- nina:slot money.2 -->
14
+
15
+ ---
16
+
17
+ ## Distribution invariants (enforced by reviewer + unit tests)
18
+
19
+ The distribution engine lives in `{{CORE_PKG}}`. It is pure and total over integer {{MINOR_UNIT}}:
20
+
21
+ - A destination is either a percentage (basis points of the amount) or a fixed value.
22
+ - `total = Σ destinations`, computed in {{MINOR_UNIT}}.
23
+ - `total > amount` → **reject.** Never clamp, never distribute what is not there.
24
+ - `total < amount` → **allow**, surface the shortfall, and leave the remainder **parked**. Silence is the defect here: an unexplained remainder is indistinguishable from a bug.
25
+ - `total = amount` → OK.
26
+ - A retention is just another destination — the same arithmetic applies to it, with no special case.
27
+
28
+ <!-- nina:slot money.3 -->
29
+
30
+ ---
31
+
32
+ ## State machines & idempotency (enforced by reviewer)
33
+
34
+ - **Every money-moving entity is a state machine.** Its states and legal transitions are declared in `.claude/architecture.md`; the code follows the declaration, not the other way round. Illegal transitions throw; they are never silently coerced.
35
+ - **Every transition writes an audit row** (entity type, entity id, from, to, actor). No transition without a trail — the trail is what makes a money bug diagnosable after the money has moved.
36
+ - **Outbound transfers are idempotent.** Each carries a unique key, and dedupe happens before the side effect, at the serialization point.
37
+ - **One serialization point per balance.** Whatever computes and dispatches against a single balance never runs concurrently with itself. Two concurrent runs over one balance is how a double send happens even when every individual write is correct.
38
+
39
+ <!-- nina:slot money.4 -->
40
+ - **Money computation and dispatch go through the serialization point.** Routes, queue consumers and tools never run a distribution or a transfer synchronously in the request path.
41
+
42
+ <!-- nina:slot money.5 -->
43
+ - **The distribution engine lives in `{{CORE_PKG}}`.** Services call it as a pure function; they do not embed money logic inline.
44
+
45
+ <!-- nina:slot money.6 -->
46
+ - Idempotency on money-moving writes: the record carries an idempotency key, and the serialization point refuses the second attempt *before* the side effect.
47
+
48
+ <!-- nina:slot money.7 -->
49
+ - `{{CORE_PKG}}` is the most-tested package — pure functions over fixtures. Cover the distribution invariants exhaustively: over, under, exact, mixed percentage and fixed, and rounding.
@@ -0,0 +1,2 @@
1
+ <!-- nina:slot money.1 -->
2
+ - **Money invariants respected** — a distribution never exceeds the amount; a shortfall is parked, not distributed; transfers idempotent; every transition audited.
@@ -0,0 +1,2 @@
1
+ <!-- nina:slot money.1 -->
2
+ | New distribution / transfer logic | `.claude/architecture.md` § *Money*, `.claude/patterns.md` § *Distribution invariants*, `{{CORE_PKG}}/` | architect → implementer → reviewer → qa |
@@ -0,0 +1,11 @@
1
+ <!-- nina:slot money.1 -->
2
+ 3. **An outbound transfer is idempotent — it is NEVER sent twice.** Every transfer carries an idempotency key, and deduplication happens at a single serialization point **before** the side effect, never after it. A retry, a re-delivered queue message, a double-click and a replayed webhook must all collapse to one transfer. This is the highest-blast-radius invariant in the system: almost everything else can be corrected afterwards, and a duplicated transfer cannot.
3
+
4
+ <!-- nina:slot money.2 -->
5
+ 4. **Conservation — what comes in equals what goes out plus what is retained.** A distribution may NEVER exceed the amount it distributes → **block**. If it is **less**, **alert** and leave the remainder **parked** and visible — never silently distributed, never silently absorbed. All arithmetic is integer {{MINOR_UNIT}}; percentages are basis points. The LLM never computes a monetary value.
6
+
7
+ <!-- nina:slot money.3 -->
8
+ 5. **State-machine integrity.** Every money-moving entity has an explicit set of states and legal transitions, declared in `.claude/architecture.md` § *State machines* — not inferred from whatever code happens to exist. Only declared transitions are legal; an illegal one throws and is never silently coerced. **Every transition writes an audit row** (entity, id, from → to, actor, when). Skipping a state, inventing one, or landing a transition with no audit row is a hard reject.
9
+
10
+ <!-- nina:slot money.4 -->
11
+ - **money movement**: anything that creates, moves, settles or records a balance
@@ -0,0 +1,2 @@
1
+ <!-- nina:slot pii.1 -->
2
+ - **Privacy.** No sensitive value in clear text where it must not be. The categories are declared in `.claude/architecture.md` § *Privacy* — they are not decided per query, and not decided by you. **Document bytes live only in the object store, referenced by key: the column holds the key, never the bytes.** Any column the architect's spec flagged for masking must be encrypted at rest. Reject a schema that widens what is stored in the clear.
@@ -0,0 +1,8 @@
1
+ <!-- nina:slot pii.1 -->
2
+
3
+ **Point it at an UNAUTHENTICATED route — a sign-in page is the right one.** Never sign in, and never
4
+ screenshot a signed-in page. Accounts on deployed environments hold real personal data, and a
5
+ screenshot or a console dump pulls it into agent transcripts and logs, where it persists and nobody
6
+ ever looks for it again. That is a privacy leak with no upside here: the sign-in page proves
7
+ everything this check is for. It renders from the same bundle, it exercises the same build-time env
8
+ inlining (a missing variable blanks it identically), and it needs no session.
@@ -0,0 +1,8 @@
1
+ <!-- nina:slot pii.1 -->
2
+ - Check for privacy regressions: **no sensitive value in a log, an error message — a library's own included — a URL or a test fixture**, per the categories in `.claude/architecture.md` § *Privacy*; document bytes only in the object store, never plaintext in the database; no leaked secret.
3
+
4
+ <!-- nina:slot pii.2 -->
5
+ - **privacy** — the privacy check above, in full: no sensitive value in a log, an error message, a
6
+ URL or a test fixture; document bytes only in the object store; no leaked secret. Where
7
+ **tenant-and-privacy** is dispatched, its reviewer owns this too and there is no separate one; where
8
+ it is not, this is a dimension of its own. Either way it is never nobody's.
@@ -0,0 +1,2 @@
1
+ <!-- nina:slot pii.1 -->
2
+ - **Privacy (Hard Rule #8)** — the categories declared in `.claude/architecture.md` § *Privacy* must never appear in logs, in responses that do not need them, in error paths, or in the database in clear text. Check every endpoint that returns a person's record for fields it includes by accident: a `select` that quietly grew a column is the usual way this leaks. Check the error paths too — they are written last and reviewed least — and what the libraries on them print or carry in their own errors, bound values included.
@@ -0,0 +1,5 @@
1
+ <!-- nina:slot pii.1 -->
2
+ - **Nothing personal reaches the chain.** What is written on-chain is public, permanent, and beyond
3
+ deletion by anyone — including by you, and including after a subject asks. A hash of a personal
4
+ identifier is not a protection: it is a lookup table for whoever holds the input set. Reject a
5
+ personal datum stored in state, emitted in an event, or passed as calldata.
@@ -0,0 +1,5 @@
1
+ <!-- nina:slot pii.1 -->
2
+ 8. **Sensitive personal data is classified, and the classification is enforced.** What counts as sensitive here — identity documents, financial identifiers, anything a person would not expect to be readable by whoever can read a log — is declared in `.claude/architecture.md` § *Privacy*, along with the regime that governs it ({{PRIVACY_REGIME}}). Encrypted at rest. **No sensitive value in a log, an error message, a URL, an analytics event, or an agent transcript** — the places nobody thinks about are exactly the ones that persist. That includes what a library puts in its own errors and prints itself: a database client's error can carry the query and every bound value, and a framework can log a whole error past the logger it was given. A database error is mapped at the data layer to a typed error from a closed list before anything logs or returns it, and a test proves that a bound value it writes reaches no thrown error. Document bytes live only in the object store, referenced by key, never in the database in clear text.
3
+
4
+ <!-- nina:slot pii.2 -->
5
+ - **personal data**: where it is collected, stored, logged or sent
@@ -0,0 +1,2 @@
1
+ <!-- nina:slot prisma.1 -->
2
+ | `prisma-client-api` | a new or changed Prisma query |
@@ -0,0 +1,42 @@
1
+ <!-- nina:slot prisma.1 -->
2
+ | `prisma-cli` | **before ANY `prisma` CLI command** — `validate`, `format`, `migrate dev`, `migrate diff`, `migrate deploy`. Flags differ between versions, and one of them (`migrate diff --shadow-database-url` against a live database) destroys the database it points at |
3
+ | `prisma-client-api` | auditing a new or changed query — filters, operators, `$transaction` semantics. Through a driver adapter, cite the adapter's installed source for what a transaction does: the skill describes the default engine, and an adapter can roll back less |
4
+
5
+ <!-- nina:slot prisma.2 -->
6
+ Neither skill covers a **caching or edge layer sitting on top of the client** — cache strategy,
7
+ edge-client behaviour and the rule about never caching a read that authorizes a write belong to that
8
+ layer's own integration doc, declared like any other integration. A skill does not replace it.
9
+
10
+ <!-- nina:slot prisma.3 -->
11
+ - **With Prisma, both offline.** Run `pnpm --filter {{DB_PKG_NAME}} exec prisma validate`; it must pass. Then run `prisma migrate diff` in its **offline, file-only form** and read the generated SQL, not just the Prisma delta. Its flags changed in Prisma 7, so read the installed major (`prisma --version`) before writing the command:
12
+
13
+ ```
14
+ # Prisma 6. Compare the PREVIOUS schema against the working one — pure file-to-file, no database.
15
+ git show HEAD:{{DB_PKG}}/prisma/schema.prisma > /tmp/schema-head.prisma
16
+ pnpm --filter {{DB_PKG_NAME}} exec prisma migrate diff \
17
+ --from-schema-datamodel /tmp/schema-head.prisma \
18
+ --to-schema-datamodel prisma/schema.prisma \
19
+ --script
20
+ ```
21
+
22
+ From Prisma 7 the two flags are `--from-schema` and `--to-schema`, and the schema engine starts from the
23
+ datasource in `prisma.config.ts` even for this diff: with none there, it prints nothing and exits 0. For
24
+ SQLite a placeholder the diff never opens is enough, a `file:` URL under a gitignored directory; for any
25
+ other provider, find out what the diff opens before you give it one. Never a real database's URL. A first schema has nothing at `HEAD`: diff it `--from-empty`. Compare the output against the
26
+ hand-written `migration.sql` to confirm the declarative parts match.
27
+
28
+ ⚠️ **Do NOT reach for `--from-migrations`.** It looks like the natural choice and it is a trap:
29
+ Prisma refuses it without a shadow database (`--shadow-database-url`, or from Prisma 7 a
30
+ `shadowDatabaseUrl` in `prisma.config.ts`), which pushes you toward supplying a database URL — the exact move that destroys databases (below). The file-to-file form above answers the
31
+ same question with no database involved.
32
+
33
+ ⛔ **NEVER point `--shadow-database-url`, `--from-url`, `--to-url`, `--from-schema-datasource` — or, from Prisma 7, a `shadowDatabaseUrl` or the config datasource behind `--from-config-datasource` — at a real database, most of all not the one `{{SECRETS_LOCAL}}` names.** Prisma **executes** the entire migration history against whatever database those flags name, which **DESTROYS ALL DATA** in it. A shadow database must be a disposable, empty database and nothing else. It does not announce itself: the command completes with a reassuring "empty migration" result and no error, having already destroyed everything in the database it was pointed at. If the offline form above cannot answer your question, **STOP and report that to the orchestrator** instead of reaching for a database URL.
34
+
35
+ <!-- nina:slot prisma.4 -->
36
+ - **Where reads are cached through Prisma Accelerate,** every `findUnique` / `findMany` on a hot read path names its `cacheStrategy` (`ttl` / `swr`), and one that feeds a correctness-critical write names none.
37
+
38
+ <!-- nina:slot prisma.5 -->
39
+ - **On an edge runtime,** new Prisma code paths use the edge client of the installed major: `@prisma/client/edge` up to Prisma 6; from 7, the client the `prisma-client` generator writes with the platform's `runtime` set, imported from where it is generated — `@prisma/client/edge` fails there with `MODULE_NOT_FOUND`.
40
+
41
+ <!-- nina:slot prisma.6 -->
42
+ - Run a Prisma command that writes to a real database — `prisma migrate dev`, `migrate deploy`, `migrate reset`, `migrate resolve`, `db push`, `db execute`, `$executeRaw*` — or **any `prisma migrate diff` variant carrying a database URL**, which silently wipes the database it points at.
@@ -0,0 +1,11 @@
1
+ <!-- nina:slot prisma.1 -->
2
+ - **`prisma-cli`** — before `migrate deploy` or any other Prisma CLI command against a real database.
3
+
4
+ <!-- nina:slot prisma.2 -->
5
+ - **Prisma migrations go out with `prisma migrate deploy`**, and nothing else changes a shared database's schema.
6
+
7
+ <!-- nina:slot prisma.3 -->
8
+ - Run `prisma migrate diff --shadow-database-url <url>` against any live database. It **executes** the migration history against that database, destroying everything in it, and reports success. Use a disposable shadow database or don't run it.
9
+
10
+ <!-- nina:slot prisma.4 -->
11
+ - Run `prisma migrate reset` against a shared database, ever.
@@ -0,0 +1,2 @@
1
+ <!-- nina:slot prisma.1 -->
2
+ | `prisma-client-api` | a new or changed Prisma query |
@@ -0,0 +1,2 @@
1
+ <!-- nina:slot prisma.1 -->
2
+ | `prisma-cli` | a Prisma CLI command |
@@ -0,0 +1,2 @@
1
+ <!-- nina:slot prisma.1 -->
2
+ | `prisma-client-api` | a new or changed Prisma query |
@@ -0,0 +1,15 @@
1
+ <!-- nina:slot prisma.1 -->
2
+ - **Database table/column names** (Prisma `@map` / `@@map`): `snake_case` in SQL, `camelCase` in TS.
3
+
4
+ <!-- nina:slot prisma.2 -->
5
+ - Where Prisma reads are cached through Accelerate, `cacheStrategy` lives in `{{DB_PKG}}`: services do not add, strip, or override cache policies.
6
+
7
+ <!-- nina:slot prisma.3 -->
8
+
9
+ ### Prisma
10
+
11
+ - Schema lives in `{{DB_PKG}}/prisma/schema.prisma`. Nowhere else.
12
+ - **Never write raw SQL** unless justified in a code comment with perf data.
13
+ - N+1 is solved with `include` / `select`, chosen deliberately.
14
+ - Where reads are cached through Accelerate, every `findUnique` / `findMany` on a hot path defines its `cacheStrategy`, and no direct connection string is embedded in code.
15
+ - Tests run a real Prisma client against a real database; the client is never mocked.
@@ -0,0 +1,5 @@
1
+ <!-- nina:slot prisma.1 -->
2
+ | Run any `prisma` CLI command (the database gate, devops, and the integration gate where there is one) | `prisma-cli` | flags differ between versions; `migrate diff --shadow-database-url` against a live DB wiped dev/staging once |
3
+
4
+ <!-- nina:slot prisma.2 -->
5
+ | Write or audit a Prisma query (architect, implementer, the database gate, reviewer) | `prisma-client-api` | filters, operators, `$transaction` semantics. a caching or edge layer on top of the client is **NOT covered** — its cache strategy belongs to that layer's own integration doc |
@@ -0,0 +1,125 @@
1
+ # Known gaps
2
+
3
+ The harness was extracted by slicing one live project, and a slice cannot be cleaner than the
4
+ thing it was cut from. This file tracks what is still shaped by that origin.
5
+
6
+ ## Closed
7
+
8
+ **Domain examples in the core.** The extraction had to leave money and PII nouns in otherwise
9
+ invariant rules, because byte-exact recomposition was the proof that nothing was lost and
10
+ rewriting a line broke it. Once projects started pinning a release, that constraint lifted:
11
+ the core no longer names payouts, escrow, KYC, PIX, CPF or a single provider, and the
12
+ `db` surface no longer assumes the write it protects is a money movement. `fixtures/acme`
13
+ holds the line — it declares no `money` and no `pii` surface, and the test fails on any of
14
+ those words reappearing.
15
+
16
+ **The single-provider assumption.** `external-api` became `integrations`, plural, cut by how
17
+ a premise is settled (`installed-library` / `live-api` / `platform-binding`) rather than by
18
+ one project's payment provider.
19
+
20
+ **The `money` surface was one project's money path.** It shipped that project's state machine
21
+ (`DETECTADA → CASADA | DIVERGENTE | SEM_REGRA`) as a harness rule, named its models, its
22
+ currency and its escrow vocabulary, and assumed one payment provider. It now states the
23
+ invariants and nothing else: conservation, idempotency of an irreversible send, one
24
+ serialization point per balance, integer minor units, and a state machine the **project**
25
+ declares in its own `.claude/architecture.md`. `fixtures/ledger` holds that line — a money
26
+ project whose minor unit is `cents`, whose engine is `packages/settlement`, and whose deny
27
+ list fails on `escrow`, `centavos`, `Payout`, `DETECTADA` or any of the rest reappearing.
28
+
29
+ **The `pii` surface was one country's regime.** It named CPF/CNPJ, PIX keys, KYC documents, LGPD,
30
+ R2 and Postgres as if they were universal categories. It now says that sensitive categories are
31
+ **declared by the project** in its own `.claude/architecture.md`, and states what is invariant:
32
+ classified, encrypted at rest, never in a log, an error, a URL, an analytics event or an agent
33
+ transcript, and document bytes only in the object store. `fixtures/ledger` declares `pii` with a
34
+ `GDPR` regime and fails on any of the old words returning.
35
+
36
+ **Incident dates that read as false history.** Five places told a rule through a date it happened
37
+ on — a wiped database on 2026-09-16, a blocked deploy on 2026-09-21, specs split across two
38
+ directories before 2026-09-04. In the project where it happened that is provenance; in a new one it
39
+ is a claim about a past it does not have, and an agent will go looking for it. The rules keep their
40
+ force without the date: *"the command completes with a reassuring 'empty migration' result and no
41
+ error, having already destroyed everything in the database it was pointed at."*
42
+
43
+ **A rule cross-reference that pointed at nothing.** The hard rules are one numbered list assembled
44
+ from several layers, so a project that declares no `integrations` surface has no rule 12 — while the
45
+ core still said "the premise rule (#12 below)". `compose-test` now checks every `Hard Rule #N`
46
+ against the rules the project actually composed, and `fixtures/plain` declares no surface at all, so
47
+ the most reduced case is exercised on every run.
48
+
49
+ **Invariant rules that landed in the project layer.** Four rules were generically valuable but were
50
+ stated through an incident or an inventory belonging to one project, so the project layer swallowed
51
+ them and a new project got nothing. Each was restated in the layer that actually owns it:
52
+
53
+ | Spec | What it got back |
54
+ |---|---|
55
+ | secops | the **AuthN / session** dimension is now core: credential issuance and consumption, cookie flags, fixation across a privilege change, origin allowlist, and any dev bypass that could reach production. The project slot survives for the auth library and the bypasses that project actually has. |
56
+ | qa | the *"pre-existing failure"* traps moved to `surfaces/frontend` — they are facts about a jsdom + vitest harness, not about one feature. The project slot held only the provenance, so it was dropped. |
57
+ | architect, implementer | both specs now state the Route → Service → Data rule themselves instead of only `patterns.md` stating it. The project slot survives for the package names. |
58
+ | patterns | *"when correcting a document, delete what you are correcting"* is now a core section. |
59
+
60
+ **The threat model was numbered, and the numbers came from slots.** Dimensions 1–8 lived in surface
61
+ fragments and 9–10 in the core, so a project declaring every surface got 1–10 and everyone else got
62
+ a list with holes: `acme` read `2, 3, 6, 8, 9, 10`, and a surfaceless project began at **9**. The
63
+ list is bullets now, valid under any combination. The core's rate-limiting dimension also named one
64
+ project's auth strategy (`magic-link request, dev routes`); it says `issues a credential` instead.
65
+
66
+ **A surface's technology was named in files nothing gated.** The item above used to bundle two
67
+ different things under "stack-specific", and only one of them was a choice. `Prisma` appeared in 7
68
+ ungated core files and Cloudflare's runtime in 10 — technologies that already *have* surfaces, named
69
+ in text every project composes. A frontend-only project read a `CLAUDE.md` that discussed Prisma, a
70
+ `patterns.md` headed *API (Cloudflare Worker / Hono) conventions*, and a qa spec telling it to kill
71
+ stray `workerd` processes that could not exist. The reviewer even pointed at `CLAUDE.md` §
72
+ *Cloudflare plugin skills*, a section that lives in the edge-cf surface — a dangling cross-reference
73
+ of exactly the kind already closed once here.
74
+
75
+ 42 sites were fixed by saying what the rule means rather than which product implements it: "if the
76
+ database was touched" instead of "if Prisma touched", "deploy config" instead of "wrangler config",
77
+ "the local emulator" instead of "Miniflare". None of it lost precision, because the instruction was
78
+ never about the product. Where a genuine specific was worth keeping it moved into `surfaces/edge-cf`
79
+ behind a slot.
80
+
81
+ The deny lists never caught this, and could not: they guard one fixture's output against *domain*
82
+ leaks, and a substring match makes a word like `Hono` unusable because it fires on `Honor`. The
83
+ guard is now a layer audit in `compose:test` — for every core file, a surface's technology may be
84
+ named only if the file is gated on that surface. It asks the question once, of everything, instead
85
+ of only of what a fixture happens to compose.
86
+
87
+ **Money in the core, and the heavy-gate list that carried it.** The extraction closed money's nouns
88
+ (payout, escrow, the state machine) but not the word itself: ten places in the core listed "money, the
89
+ database, auth, an integration" as the changes that are always gated in full, so a project with no
90
+ money was told that under-gating a money movement was a protocol violation, and its devops that a
91
+ production deploy "moves real money". The audit now holds `money` like a technology, and found 19 of
92
+ them. The list is one definition of **critical paths** in `CLAUDE.md` — auth in the core, and the
93
+ database, an integration boundary, money movement, personal data and contract code each added by its
94
+ own surface — and the ten places say "a critical path". Two copies of money's own rules had also
95
+ landed in `surfaces/db` (`BigInt` columns, a money-integrity check in the dba's report), contradicting
96
+ the money surface's integer minor unit; they are gone, since the money surface already says it better.
97
+ The same pass found Cloudflare's `Pages`, `Worker` and a capitalised `Wrangler` in the core and in
98
+ two surfaces, and the leftovers no audit could name: a model called `DestinationAccount` and a spec
99
+ set called `retention-spec1..8` in the router's examples, "all nine stages" where a profile composes
100
+ seven to eleven, `userId` as the name of owner scoping, and "the harness's first three months" told
101
+ as the history of whichever project was reading it.
102
+
103
+ ## Open
104
+
105
+ **The core is domain-agnostic, not stack-agnostic — deliberately.** The stack's own commands are
106
+ vocabulary now, with the release's defaults (`core/vocabulary.json`): the typecheck, lint and build
107
+ commands a spec tells a stage to run, and the test command every stage but qa is told not to run. qa's
108
+ own targeted `vitest run` stays literal. What remains is the stack's substance, not its commands:
109
+ `vitest` and its memory discipline, `TSDoc`, `TypeScript`, `turbo`, and `pnpm` wherever a sentence
110
+ describes the workspace rather than a command to run. That is the single track
111
+ this harness is for, and most of it is load-bearing: the qa spec's memory discipline is a fact about
112
+ vitest, not about testing. Unlike the surface leak above, this is not a defect — there is no
113
+ `pnpm` surface a project could decline. It becomes a gap only when a project on another stack
114
+ appears. The `.js`-extension and barrel-export rules are the sharpest case — they assume a
115
+ TypeScript monorepo that emits `dist/`, and `fixtures/plain` needs `PKG_SCOPE` and `EMITTING_PKGS`
116
+ in its vocabulary to compose at all. If a second stack ever arrives, those are a `ts-monorepo`
117
+ surface, not core.
118
+
119
+ **A composed project is not a finished project — by design.** With no project layer, `CLAUDE.md`
120
+ still opens with blank lines and no title, mission or stack. That is not a defect to fix in the
121
+ core: the missing text is the part only this project can say. `init` conducts the interview and
122
+ writes it to `.nina/TODO.md`, and it deliberately writes **no stub fragments**, because a stub is
123
+ a filled slot as far as every tool is concerned — a tree of TODOs would compose and check clean
124
+ while saying nothing. So `compose` keeps naming the unfilled slots until a person fills them, and
125
+ the blank opening is that list being honest rather than the core being incomplete.