@draht/coding-agent 2026.10.20 → 2026.10.23-1

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 (744) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/agents/advisor.md +2 -2
  3. package/agents/architect.md +11 -33
  4. package/agents/debugger.md +13 -54
  5. package/agents/git-committer.md +18 -42
  6. package/agents/implementer.md +14 -36
  7. package/agents/investigator.md +12 -63
  8. package/agents/reviewer.md +16 -44
  9. package/agents/security-auditor.md +22 -56
  10. package/agents/spec-reviewer.md +13 -53
  11. package/agents/verifier.md +14 -33
  12. package/bin/drahtbank.mjs +4 -0
  13. package/dist/agents/advisor.md +2 -2
  14. package/dist/agents/architect.md +11 -33
  15. package/dist/agents/debugger.md +13 -54
  16. package/dist/agents/git-committer.md +18 -42
  17. package/dist/agents/implementer.md +14 -36
  18. package/dist/agents/investigator.md +12 -63
  19. package/dist/agents/reviewer.md +16 -44
  20. package/dist/agents/security-auditor.md +22 -56
  21. package/dist/agents/spec-reviewer.md +13 -53
  22. package/dist/agents/verifier.md +14 -33
  23. package/dist/bundle/chunks/anthropic-messages-G57VPNTF.js +6 -0
  24. package/dist/bundle/chunks/anthropic.js +1 -1
  25. package/dist/bundle/chunks/azure-openai-responses-AYUCZ5WN.js +2 -0
  26. package/dist/bundle/chunks/bedrock-converse-stream.js +31 -28
  27. package/dist/bundle/chunks/chunk-2JZLKNZ4.js +3 -0
  28. package/dist/bundle/chunks/chunk-3GDEPGTR.js +16 -0
  29. package/dist/bundle/chunks/chunk-5JW3NSTV.js +2 -0
  30. package/dist/bundle/chunks/{chunk-KVH4HR57.js → chunk-6WESOD4H.js} +1 -1
  31. package/dist/bundle/chunks/chunk-76YNMQ57.js +2 -0
  32. package/dist/bundle/chunks/chunk-AC3MSTC6.js +2 -0
  33. package/dist/bundle/chunks/chunk-ACLWH5WQ.js +2 -0
  34. package/dist/bundle/chunks/chunk-BL72B6LV.js +82 -0
  35. package/dist/bundle/chunks/chunk-CLKG6K6Z.js +7 -0
  36. package/dist/bundle/chunks/chunk-DN7SM3LX.js +479 -0
  37. package/dist/bundle/chunks/{chunk-D6TMD5Q2.js → chunk-DOUMZTXH.js} +10 -10
  38. package/dist/bundle/chunks/chunk-DQ4G4IS4.js +20 -0
  39. package/dist/bundle/chunks/chunk-E4VZJRJ2.js +9 -0
  40. package/dist/bundle/chunks/chunk-FOYIPAAD.js +6 -0
  41. package/dist/bundle/chunks/chunk-FXCTQRNN.js +2 -0
  42. package/dist/bundle/chunks/chunk-GBFVS2SF.js +12 -0
  43. package/dist/bundle/chunks/chunk-GQXRTK54.js +20 -0
  44. package/dist/bundle/chunks/chunk-IGO52ZOY.js +132 -0
  45. package/dist/bundle/chunks/chunk-IT4RIOZD.js +2 -0
  46. package/dist/bundle/chunks/chunk-JJKPUMH2.js +1424 -0
  47. package/dist/bundle/chunks/chunk-JNWRE5F4.js +2 -0
  48. package/dist/bundle/chunks/chunk-KSGHCBHT.js +2 -0
  49. package/dist/bundle/chunks/chunk-LO6CVU2L.js +6 -0
  50. package/dist/bundle/chunks/chunk-MBFTIGLS.js +2 -0
  51. package/dist/bundle/chunks/chunk-N26RGV3K.js +11 -0
  52. package/dist/bundle/chunks/{chunk-KPO5375S.js → chunk-RCRGGYLW.js} +1 -1
  53. package/dist/bundle/chunks/chunk-UCJ7FLSO.js +166 -0
  54. package/dist/bundle/chunks/chunk-USCN7R2E.js +2 -0
  55. package/dist/bundle/chunks/chunk-WFHH5SX6.js +4 -0
  56. package/dist/bundle/chunks/chunk-WYWBXNDO.js +6 -0
  57. package/dist/bundle/chunks/chunk-ZRPAOMVB.js +2 -0
  58. package/dist/bundle/chunks/{cli-PYJB6AQ3.js → cli-HTUB6WOG.js} +6 -6
  59. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-RRSO6OXX.js +2 -0
  60. package/dist/bundle/chunks/codemode-worker.js +188 -21
  61. package/dist/bundle/chunks/execute-UUPNZJJG.js +31 -0
  62. package/dist/bundle/chunks/github-copilot.js +1 -1
  63. package/dist/bundle/chunks/google-generative-ai-VJSS5EBX.js +2 -0
  64. package/dist/bundle/chunks/google-vertex-K23DBWTT.js +2 -0
  65. package/dist/bundle/chunks/https-proxy-agent-WQIRL24U.js +13 -0
  66. package/dist/bundle/chunks/image-resize-worker.js +1 -1
  67. package/dist/bundle/chunks/lib-ULKZYRGD.js +9 -0
  68. package/dist/bundle/chunks/{llama-cpp-classify-EJ5XMSQL.js → llama-cpp-classify-3VDXTYVJ.js} +3 -3
  69. package/dist/bundle/chunks/mistral-conversations-SKVQJGFZ.js +5 -0
  70. package/dist/bundle/chunks/{multipart-parser-AZP5BX2W.js → multipart-parser-HMCXZ4BD.js} +1 -1
  71. package/dist/bundle/chunks/node-DXZFQBEO.js +16 -0
  72. package/dist/bundle/chunks/{node-C2JGH2OB.js → node-LBZLUIBE.js} +1 -1
  73. package/dist/bundle/chunks/openai-chatgpt.js +1 -1
  74. package/dist/bundle/chunks/openai-codex-responses-LV4RIZL3.js +10 -0
  75. package/dist/bundle/chunks/openai-codex.js +1 -1
  76. package/dist/bundle/chunks/openai-completions-PUIR2V25.js +7 -0
  77. package/dist/bundle/chunks/openai-decisions-2DJLSYQF.js +5 -0
  78. package/dist/bundle/chunks/openai-responses-6ESQOXAF.js +4 -0
  79. package/dist/bundle/chunks/opencode-go.js +1 -1
  80. package/dist/bundle/chunks/openrouter-images-TVXBMY3V.js +2 -0
  81. package/dist/bundle/chunks/pi-messages-XS7FDWQI.js +8 -0
  82. package/dist/bundle/chunks/runtime-IB3XQ7E3.js +2 -0
  83. package/dist/bundle/chunks/runtime-LB35PK4J.js +3 -0
  84. package/dist/bundle/chunks/settings-manager-YNY5F4RU.js +2 -0
  85. package/dist/bundle/chunks/src-KDGO7EGF.js +4 -0
  86. package/dist/bundle/chunks/typesafe-system-one-67GAWZXE.js +2 -0
  87. package/dist/bundle/chunks/virtual-modules-U4CBGVMI.js +2 -0
  88. package/dist/bundle/cli-runtime.js +1 -1
  89. package/dist/bundle/index.js +1 -1
  90. package/dist/bundle/rpc-entry.js +1 -1
  91. package/dist/cli/args.d.ts +2 -1
  92. package/dist/cli/args.d.ts.map +1 -1
  93. package/dist/cli/args.js +30 -8
  94. package/dist/cli/args.js.map +1 -1
  95. package/dist/cli/credential-print.d.ts.map +1 -1
  96. package/dist/cli/credential-print.js +4 -4
  97. package/dist/cli/credential-print.js.map +1 -1
  98. package/dist/config.d.ts +18 -1
  99. package/dist/config.d.ts.map +1 -1
  100. package/dist/config.js +44 -6
  101. package/dist/config.js.map +1 -1
  102. package/dist/core/agent-session.d.ts +65 -8
  103. package/dist/core/agent-session.d.ts.map +1 -1
  104. package/dist/core/agent-session.js +240 -102
  105. package/dist/core/agent-session.js.map +1 -1
  106. package/dist/core/auth-storage.d.ts.map +1 -1
  107. package/dist/core/auth-storage.js +20 -13
  108. package/dist/core/auth-storage.js.map +1 -1
  109. package/dist/core/bash-executor.d.ts.map +1 -1
  110. package/dist/core/bash-executor.js +42 -52
  111. package/dist/core/bash-executor.js.map +1 -1
  112. package/dist/core/bug-report.d.ts +9 -1
  113. package/dist/core/bug-report.d.ts.map +1 -1
  114. package/dist/core/builtins/completion-checks.d.ts +3 -0
  115. package/dist/core/builtins/completion-checks.d.ts.map +1 -0
  116. package/dist/core/builtins/completion-checks.js +142 -0
  117. package/dist/core/builtins/completion-checks.js.map +1 -0
  118. package/dist/core/builtins/duet.d.ts.map +1 -1
  119. package/dist/core/builtins/duet.js +7 -5
  120. package/dist/core/builtins/duet.js.map +1 -1
  121. package/dist/core/builtins/git-safety.d.ts +3 -0
  122. package/dist/core/builtins/git-safety.d.ts.map +1 -0
  123. package/dist/core/builtins/git-safety.js +34 -0
  124. package/dist/core/builtins/git-safety.js.map +1 -0
  125. package/dist/core/builtins/index.d.ts.map +1 -1
  126. package/dist/core/builtins/index.js +4 -0
  127. package/dist/core/builtins/index.js.map +1 -1
  128. package/dist/core/client-identity.d.ts +8 -0
  129. package/dist/core/client-identity.d.ts.map +1 -0
  130. package/dist/core/client-identity.js +15 -0
  131. package/dist/core/client-identity.js.map +1 -0
  132. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  133. package/dist/core/compaction/branch-summarization.js +1 -2
  134. package/dist/core/compaction/branch-summarization.js.map +1 -1
  135. package/dist/core/compaction/compaction.d.ts +2 -2
  136. package/dist/core/compaction/compaction.d.ts.map +1 -1
  137. package/dist/core/compaction/compaction.js +20 -15
  138. package/dist/core/compaction/compaction.js.map +1 -1
  139. package/dist/core/compaction/utils.d.ts +6 -0
  140. package/dist/core/compaction/utils.d.ts.map +1 -1
  141. package/dist/core/compaction/utils.js +7 -8
  142. package/dist/core/compaction/utils.js.map +1 -1
  143. package/dist/core/export-html/index.d.ts.map +1 -1
  144. package/dist/core/export-html/index.js +2 -0
  145. package/dist/core/export-html/index.js.map +1 -1
  146. package/dist/core/export-html/template.html +1 -0
  147. package/dist/core/export-html/template.js +23 -17
  148. package/dist/core/export-html/tool-renderer.d.ts +3 -3
  149. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  150. package/dist/core/export-html/tool-renderer.js +5 -3
  151. package/dist/core/export-html/tool-renderer.js.map +1 -1
  152. package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
  153. package/dist/core/export-html/vendor/marked.min.js +30 -29
  154. package/dist/core/extensions/index.d.ts +1 -1
  155. package/dist/core/extensions/index.d.ts.map +1 -1
  156. package/dist/core/extensions/index.js.map +1 -1
  157. package/dist/core/extensions/loader.d.ts.map +1 -1
  158. package/dist/core/extensions/loader.js +7 -0
  159. package/dist/core/extensions/loader.js.map +1 -1
  160. package/dist/core/extensions/runner.d.ts +6 -2
  161. package/dist/core/extensions/runner.d.ts.map +1 -1
  162. package/dist/core/extensions/runner.js +16 -4
  163. package/dist/core/extensions/runner.js.map +1 -1
  164. package/dist/core/extensions/types.d.ts +61 -7
  165. package/dist/core/extensions/types.d.ts.map +1 -1
  166. package/dist/core/extensions/types.js.map +1 -1
  167. package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
  168. package/dist/core/extensions/virtual-modules.js +2 -0
  169. package/dist/core/extensions/virtual-modules.js.map +1 -1
  170. package/dist/core/key-id-schema.d.ts +6 -0
  171. package/dist/core/key-id-schema.d.ts.map +1 -0
  172. package/dist/core/key-id-schema.js +16 -0
  173. package/dist/core/key-id-schema.js.map +1 -0
  174. package/dist/core/keybindings-schema.d.ts +4 -0
  175. package/dist/core/keybindings-schema.d.ts.map +1 -0
  176. package/dist/core/keybindings-schema.js +16 -0
  177. package/dist/core/keybindings-schema.js.map +1 -0
  178. package/dist/core/keybindings.d.ts +242 -75
  179. package/dist/core/keybindings.d.ts.map +1 -1
  180. package/dist/core/keybindings.js +30 -23
  181. package/dist/core/keybindings.js.map +1 -1
  182. package/dist/core/mcp-servers.d.ts +22 -0
  183. package/dist/core/mcp-servers.d.ts.map +1 -1
  184. package/dist/core/mcp-servers.js +72 -11
  185. package/dist/core/mcp-servers.js.map +1 -1
  186. package/dist/core/model-config.d.ts +1623 -74
  187. package/dist/core/model-config.d.ts.map +1 -1
  188. package/dist/core/model-config.js +70 -184
  189. package/dist/core/model-config.js.map +1 -1
  190. package/dist/core/model-registry.d.ts +3 -1
  191. package/dist/core/model-registry.d.ts.map +1 -1
  192. package/dist/core/model-registry.js +4 -0
  193. package/dist/core/model-registry.js.map +1 -1
  194. package/dist/core/model-resolver.d.ts +56 -43
  195. package/dist/core/model-resolver.d.ts.map +1 -1
  196. package/dist/core/model-resolver.js +253 -358
  197. package/dist/core/model-resolver.js.map +1 -1
  198. package/dist/core/model-runtime.d.ts.map +1 -1
  199. package/dist/core/model-runtime.js +19 -10
  200. package/dist/core/model-runtime.js.map +1 -1
  201. package/dist/core/nested-tool-calls.d.ts +1 -0
  202. package/dist/core/nested-tool-calls.d.ts.map +1 -1
  203. package/dist/core/nested-tool-calls.js +1 -0
  204. package/dist/core/nested-tool-calls.js.map +1 -1
  205. package/dist/core/package-manager.js +3 -3
  206. package/dist/core/package-manager.js.map +1 -1
  207. package/dist/core/polyphase/keyword.js +1 -1
  208. package/dist/core/polyphase/keyword.js.map +1 -1
  209. package/dist/core/polyphase/model-selection.d.ts.map +1 -1
  210. package/dist/core/polyphase/model-selection.js +15 -7
  211. package/dist/core/polyphase/model-selection.js.map +1 -1
  212. package/dist/core/polyphase/workflow/prelude.d.ts +2 -0
  213. package/dist/core/polyphase/workflow/prelude.d.ts.map +1 -1
  214. package/dist/core/polyphase/workflow/prelude.js +12 -16
  215. package/dist/core/polyphase/workflow/prelude.js.map +1 -1
  216. package/dist/core/polyphase/workflow/runtime.d.ts.map +1 -1
  217. package/dist/core/polyphase/workflow/runtime.js +2 -1
  218. package/dist/core/polyphase/workflow/runtime.js.map +1 -1
  219. package/dist/core/project-trust.d.ts.map +1 -1
  220. package/dist/core/project-trust.js +2 -1
  221. package/dist/core/project-trust.js.map +1 -1
  222. package/dist/core/prompt-templates.d.ts.map +1 -1
  223. package/dist/core/prompt-templates.js +7 -2
  224. package/dist/core/prompt-templates.js.map +1 -1
  225. package/dist/core/provider-composer.d.ts +2 -1
  226. package/dist/core/provider-composer.d.ts.map +1 -1
  227. package/dist/core/provider-composer.js +13 -0
  228. package/dist/core/provider-composer.js.map +1 -1
  229. package/dist/core/radius.d.ts +2 -0
  230. package/dist/core/radius.d.ts.map +1 -1
  231. package/dist/core/radius.js +2 -0
  232. package/dist/core/radius.js.map +1 -1
  233. package/dist/core/remote-catalog-provider.d.ts +12 -1
  234. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  235. package/dist/core/remote-catalog-provider.js +84 -24
  236. package/dist/core/remote-catalog-provider.js.map +1 -1
  237. package/dist/core/resource-loader.d.ts +3 -0
  238. package/dist/core/resource-loader.d.ts.map +1 -1
  239. package/dist/core/resource-loader.js +7 -4
  240. package/dist/core/resource-loader.js.map +1 -1
  241. package/dist/core/sdk.d.ts +13 -4
  242. package/dist/core/sdk.d.ts.map +1 -1
  243. package/dist/core/sdk.js +27 -15
  244. package/dist/core/sdk.js.map +1 -1
  245. package/dist/core/settings-defaults.d.ts +65 -0
  246. package/dist/core/settings-defaults.d.ts.map +1 -0
  247. package/dist/core/settings-defaults.js +66 -0
  248. package/dist/core/settings-defaults.js.map +1 -0
  249. package/dist/core/settings-manager.d.ts +17 -178
  250. package/dist/core/settings-manager.d.ts.map +1 -1
  251. package/dist/core/settings-manager.js +86 -57
  252. package/dist/core/settings-manager.js.map +1 -1
  253. package/dist/core/settings-schema.d.ts +269 -0
  254. package/dist/core/settings-schema.d.ts.map +1 -0
  255. package/dist/core/settings-schema.js +318 -0
  256. package/dist/core/settings-schema.js.map +1 -0
  257. package/dist/core/skills.d.ts +4 -1
  258. package/dist/core/skills.d.ts.map +1 -1
  259. package/dist/core/skills.js +6 -1
  260. package/dist/core/skills.js.map +1 -1
  261. package/dist/core/system-prompt.d.ts +6 -0
  262. package/dist/core/system-prompt.d.ts.map +1 -1
  263. package/dist/core/system-prompt.js +10 -5
  264. package/dist/core/system-prompt.js.map +1 -1
  265. package/dist/core/tools/bash.d.ts.map +1 -1
  266. package/dist/core/tools/bash.js +3 -5
  267. package/dist/core/tools/bash.js.map +1 -1
  268. package/dist/core/tools/grep.d.ts +8 -0
  269. package/dist/core/tools/grep.d.ts.map +1 -1
  270. package/dist/core/tools/grep.js +19 -7
  271. package/dist/core/tools/grep.js.map +1 -1
  272. package/dist/core/tools/index.d.ts +2 -0
  273. package/dist/core/tools/index.d.ts.map +1 -1
  274. package/dist/core/tools/index.js +2 -0
  275. package/dist/core/tools/index.js.map +1 -1
  276. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  277. package/dist/core/tools/output-accumulator.js +4 -10
  278. package/dist/core/tools/output-accumulator.js.map +1 -1
  279. package/dist/core/tools/path-utils.d.ts +1 -1
  280. package/dist/core/tools/path-utils.d.ts.map +1 -1
  281. package/dist/core/tools/path-utils.js +6 -6
  282. package/dist/core/tools/path-utils.js.map +1 -1
  283. package/dist/core/tools/read.d.ts +13 -0
  284. package/dist/core/tools/read.d.ts.map +1 -1
  285. package/dist/core/tools/read.js +32 -2
  286. package/dist/core/tools/read.js.map +1 -1
  287. package/dist/core/tools/render-utils.d.ts +20 -0
  288. package/dist/core/tools/render-utils.d.ts.map +1 -1
  289. package/dist/core/tools/render-utils.js +67 -0
  290. package/dist/core/tools/render-utils.js.map +1 -1
  291. package/dist/core/tools/renderers/bash.d.ts.map +1 -1
  292. package/dist/core/tools/renderers/bash.js +7 -35
  293. package/dist/core/tools/renderers/bash.js.map +1 -1
  294. package/dist/core/tools/renderers/edit.d.ts.map +1 -1
  295. package/dist/core/tools/renderers/edit.js +5 -4
  296. package/dist/core/tools/renderers/edit.js.map +1 -1
  297. package/dist/core/tools/renderers/index.d.ts +2 -2
  298. package/dist/core/tools/renderers/index.d.ts.map +1 -1
  299. package/dist/core/tools/renderers/index.js.map +1 -1
  300. package/dist/core/tools/renderers/read.d.ts.map +1 -1
  301. package/dist/core/tools/renderers/read.js +7 -11
  302. package/dist/core/tools/renderers/read.js.map +1 -1
  303. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  304. package/dist/extensions/codemode/execute.js +391 -80
  305. package/dist/extensions/codemode/execute.js.map +1 -1
  306. package/dist/extensions/codemode/index.d.ts.map +1 -1
  307. package/dist/extensions/codemode/index.js +3 -1
  308. package/dist/extensions/codemode/index.js.map +1 -1
  309. package/dist/extensions/codemode/renderer.d.ts +2 -2
  310. package/dist/extensions/codemode/renderer.d.ts.map +1 -1
  311. package/dist/extensions/codemode/renderer.js +9 -3
  312. package/dist/extensions/codemode/renderer.js.map +1 -1
  313. package/dist/extensions/codemode/tool.d.ts +22 -21
  314. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  315. package/dist/extensions/codemode/tool.js +96 -123
  316. package/dist/extensions/codemode/tool.js.map +1 -1
  317. package/dist/extensions/llama/provider.d.ts.map +1 -1
  318. package/dist/extensions/llama/provider.js +34 -11
  319. package/dist/extensions/llama/provider.js.map +1 -1
  320. package/dist/extensions/mcp/cli.d.ts.map +1 -1
  321. package/dist/extensions/mcp/cli.js +27 -33
  322. package/dist/extensions/mcp/cli.js.map +1 -1
  323. package/dist/extensions/mcp/config.d.ts +15 -3
  324. package/dist/extensions/mcp/config.d.ts.map +1 -1
  325. package/dist/extensions/mcp/config.js +49 -12
  326. package/dist/extensions/mcp/config.js.map +1 -1
  327. package/dist/extensions/mcp/index.d.ts +4 -1
  328. package/dist/extensions/mcp/index.d.ts.map +1 -1
  329. package/dist/extensions/mcp/index.js +279 -129
  330. package/dist/extensions/mcp/index.js.map +1 -1
  331. package/dist/extensions/mcp/oauth.d.ts +21 -11
  332. package/dist/extensions/mcp/oauth.d.ts.map +1 -1
  333. package/dist/extensions/mcp/oauth.js +166 -45
  334. package/dist/extensions/mcp/oauth.js.map +1 -1
  335. package/dist/extensions/mcp/resources.d.ts +3 -10
  336. package/dist/extensions/mcp/resources.d.ts.map +1 -1
  337. package/dist/extensions/mcp/resources.js +4 -5
  338. package/dist/extensions/mcp/resources.js.map +1 -1
  339. package/dist/extensions/mcp/runtime.d.ts +7 -7
  340. package/dist/extensions/mcp/runtime.d.ts.map +1 -1
  341. package/dist/extensions/mcp/runtime.js +31 -45
  342. package/dist/extensions/mcp/runtime.js.map +1 -1
  343. package/dist/extensions/mcp/tools.d.ts +7 -5
  344. package/dist/extensions/mcp/tools.d.ts.map +1 -1
  345. package/dist/extensions/mcp/tools.js +87 -29
  346. package/dist/extensions/mcp/tools.js.map +1 -1
  347. package/dist/extensions/mcp/ui.d.ts +3 -3
  348. package/dist/extensions/mcp/ui.d.ts.map +1 -1
  349. package/dist/extensions/mcp/ui.js +18 -6
  350. package/dist/extensions/mcp/ui.js.map +1 -1
  351. package/dist/extensions/tool-search/tool.d.ts +0 -2
  352. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  353. package/dist/extensions/tool-search/tool.js +2 -4
  354. package/dist/extensions/tool-search/tool.js.map +1 -1
  355. package/dist/hooks/checks/checks-runtime.cjs +215 -0
  356. package/dist/hooks/checks/git-safety.cjs +198 -0
  357. package/dist/hooks/checks/git-safety.d.cts +1 -0
  358. package/dist/hooks/gsd/draht-post-task.js +78 -39
  359. package/dist/hooks/gsd/draht-quality-gate.js +210 -122
  360. package/dist/hooks/gsd/package.json +3 -0
  361. package/dist/index.d.ts +5 -4
  362. package/dist/index.d.ts.map +1 -1
  363. package/dist/index.js +3 -2
  364. package/dist/index.js.map +1 -1
  365. package/dist/main.d.ts.map +1 -1
  366. package/dist/main.js +11 -3
  367. package/dist/main.js.map +1 -1
  368. package/dist/modes/interactive/components/auth-url.d.ts +14 -0
  369. package/dist/modes/interactive/components/auth-url.d.ts.map +1 -0
  370. package/dist/modes/interactive/components/auth-url.js +37 -0
  371. package/dist/modes/interactive/components/auth-url.js.map +1 -0
  372. package/dist/modes/interactive/components/bash-execution.d.ts +5 -1
  373. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  374. package/dist/modes/interactive/components/bash-execution.js +17 -14
  375. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  376. package/dist/modes/interactive/components/branch-summary-message.d.ts +2 -1
  377. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  378. package/dist/modes/interactive/components/branch-summary-message.js +5 -2
  379. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  380. package/dist/modes/interactive/components/compaction-summary-message.d.ts +2 -1
  381. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  382. package/dist/modes/interactive/components/compaction-summary-message.js +5 -2
  383. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  384. package/dist/modes/interactive/components/custom-entry.d.ts +3 -1
  385. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  386. package/dist/modes/interactive/components/custom-entry.js +8 -2
  387. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  388. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  389. package/dist/modes/interactive/components/custom-message.js +1 -0
  390. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  391. package/dist/modes/interactive/components/login-dialog.d.ts +3 -0
  392. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  393. package/dist/modes/interactive/components/login-dialog.js +38 -10
  394. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  395. package/dist/modes/interactive/components/oauth-selector.d.ts +8 -2
  396. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  397. package/dist/modes/interactive/components/oauth-selector.js +24 -21
  398. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  399. package/dist/modes/interactive/components/radius-login-selector.d.ts +15 -0
  400. package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -0
  401. package/dist/modes/interactive/components/radius-login-selector.js +85 -0
  402. package/dist/modes/interactive/components/radius-login-selector.js.map +1 -0
  403. package/dist/modes/interactive/components/settings-selector.d.ts +3 -3
  404. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  405. package/dist/modes/interactive/components/settings-selector.js +9 -8
  406. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  407. package/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -1
  408. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  409. package/dist/modes/interactive/components/skill-invocation-message.js +5 -2
  410. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  411. package/dist/modes/interactive/components/status-indicator.d.ts +1 -1
  412. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  413. package/dist/modes/interactive/components/status-indicator.js +2 -2
  414. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  415. package/dist/modes/interactive/components/tool-execution.d.ts +12 -13
  416. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  417. package/dist/modes/interactive/components/tool-execution.js +32 -45
  418. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  419. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  420. package/dist/modes/interactive/components/tree-selector.js +2 -9
  421. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  422. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  423. package/dist/modes/interactive/components/user-message.js +5 -4
  424. package/dist/modes/interactive/components/user-message.js.map +1 -1
  425. package/dist/modes/interactive/interactive-mode.d.ts +43 -48
  426. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  427. package/dist/modes/interactive/interactive-mode.js +362 -278
  428. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  429. package/dist/modes/interactive/program-status-reporter.d.ts +34 -0
  430. package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
  431. package/dist/modes/interactive/program-status-reporter.js +110 -0
  432. package/dist/modes/interactive/program-status-reporter.js.map +1 -0
  433. package/dist/modes/interactive/theme/dark.json +1 -1
  434. package/dist/modes/interactive/theme/light.json +1 -1
  435. package/dist/modes/interactive/theme/system-theme.d.ts +2 -1
  436. package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -1
  437. package/dist/modes/interactive/theme/system-theme.js +16 -5
  438. package/dist/modes/interactive/theme/system-theme.js.map +1 -1
  439. package/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
  440. package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
  441. package/dist/modes/interactive/theme/theme-schema.js +105 -0
  442. package/dist/modes/interactive/theme/theme-schema.js.map +1 -0
  443. package/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
  444. package/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
  445. package/dist/modes/interactive/theme/theme-tokens.js +94 -0
  446. package/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
  447. package/dist/modes/interactive/theme/theme.d.ts +13 -16
  448. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  449. package/dist/modes/interactive/theme/theme.js +22 -29
  450. package/dist/modes/interactive/theme/theme.js.map +1 -1
  451. package/dist/modes/print-mode.d.ts.map +1 -1
  452. package/dist/modes/print-mode.js +4 -0
  453. package/dist/modes/print-mode.js.map +1 -1
  454. package/dist/package-manager-cli.d.ts.map +1 -1
  455. package/dist/package-manager-cli.js +26 -1
  456. package/dist/package-manager-cli.js.map +1 -1
  457. package/dist/prompts/commands/atomic-commit.md +8 -6
  458. package/dist/prompts/commands/brainstorm.md +5 -149
  459. package/dist/prompts/commands/create-verification-skill.md +8 -48
  460. package/dist/prompts/commands/discuss-phase.md +6 -10
  461. package/dist/prompts/commands/execute-phase.md +18 -45
  462. package/dist/prompts/commands/fix.md +16 -128
  463. package/dist/prompts/commands/grill.md +6 -53
  464. package/dist/prompts/commands/init-project.md +13 -18
  465. package/dist/prompts/commands/map-codebase.md +3 -3
  466. package/dist/prompts/commands/new-project.md +12 -17
  467. package/dist/prompts/commands/next-milestone.md +4 -8
  468. package/dist/prompts/commands/orchestrate-loop.md +12 -12
  469. package/dist/prompts/commands/orchestrate.md +12 -11
  470. package/dist/prompts/commands/pause-work.md +1 -1
  471. package/dist/prompts/commands/plan-phase.md +15 -37
  472. package/dist/prompts/commands/quick.md +11 -64
  473. package/dist/prompts/commands/resolve-conflicts.md +2 -15
  474. package/dist/prompts/commands/triage.md +3 -14
  475. package/dist/prompts/commands/verify-work.md +15 -63
  476. package/dist/prompts/commands/why.md +18 -118
  477. package/dist/skills/atomic-reasoning/SKILL.md +6 -105
  478. package/dist/skills/blast-radius/SKILL.md +1 -1
  479. package/dist/skills/epistemics/SKILL.md +12 -87
  480. package/dist/skills/explainers/SKILL.md +1 -1
  481. package/dist/skills/typescript-discipline/SKILL.md +12 -42
  482. package/dist/skills/typescript-discipline/references/patterns.md +25 -266
  483. package/dist/skills/unslop/SKILL.md +14 -105
  484. package/dist/utils/ansi.d.ts +8 -0
  485. package/dist/utils/ansi.d.ts.map +1 -1
  486. package/dist/utils/ansi.js +30 -11
  487. package/dist/utils/ansi.js.map +1 -1
  488. package/dist/utils/clipboard-command.d.ts.map +1 -1
  489. package/dist/utils/clipboard-command.js +3 -0
  490. package/dist/utils/clipboard-command.js.map +1 -1
  491. package/dist/utils/clipboard.d.ts.map +1 -1
  492. package/dist/utils/clipboard.js +18 -12
  493. package/dist/utils/clipboard.js.map +1 -1
  494. package/dist/utils/draht-user-agent.d.ts +1 -0
  495. package/dist/utils/draht-user-agent.d.ts.map +1 -1
  496. package/dist/utils/draht-user-agent.js +3 -2
  497. package/dist/utils/draht-user-agent.js.map +1 -1
  498. package/dist/utils/image-convert.d.ts +12 -0
  499. package/dist/utils/image-convert.d.ts.map +1 -1
  500. package/dist/utils/image-convert.js +45 -6
  501. package/dist/utils/image-convert.js.map +1 -1
  502. package/dist/utils/image-resize-core.d.ts +12 -0
  503. package/dist/utils/image-resize-core.d.ts.map +1 -1
  504. package/dist/utils/image-resize-core.js +5 -0
  505. package/dist/utils/image-resize-core.js.map +1 -1
  506. package/dist/utils/image-resize-worker.js +3 -2
  507. package/dist/utils/image-resize-worker.js.map +1 -1
  508. package/dist/utils/image-resize.d.ts.map +1 -1
  509. package/dist/utils/image-resize.js +9 -10
  510. package/dist/utils/image-resize.js.map +1 -1
  511. package/dist/utils/output-files.d.ts +15 -0
  512. package/dist/utils/output-files.d.ts.map +1 -0
  513. package/dist/utils/output-files.js +30 -0
  514. package/dist/utils/output-files.js.map +1 -0
  515. package/dist/utils/shell.d.ts.map +1 -1
  516. package/dist/utils/shell.js +43 -13
  517. package/dist/utils/shell.js.map +1 -1
  518. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  519. package/dist/utils/syntax-highlight.js +6 -1
  520. package/dist/utils/syntax-highlight.js.map +1 -1
  521. package/dist/utils/tools-manager.d.ts.map +1 -1
  522. package/dist/utils/tools-manager.js +4 -3
  523. package/dist/utils/tools-manager.js.map +1 -1
  524. package/docs/cli-integration.md +1 -1
  525. package/docs/cli.md +30 -26
  526. package/docs/codemode.md +230 -0
  527. package/docs/compaction.md +5 -5
  528. package/docs/containerization.md +1 -1
  529. package/docs/custom-provider.md +53 -1
  530. package/docs/docs.json +17 -1
  531. package/docs/drahtbank.md +163 -0
  532. package/docs/environment-variables.md +5 -2
  533. package/docs/extensions.md +143 -13
  534. package/docs/index.md +1 -1
  535. package/docs/json.md +3 -3
  536. package/docs/keybindings.md +9 -5
  537. package/docs/llama-cpp.md +9 -2
  538. package/docs/mcp.md +59 -3
  539. package/docs/message-types.md +22 -4
  540. package/docs/models-configuration.md +187 -0
  541. package/docs/models.md +67 -4
  542. package/docs/nvidia-rtx-llama-cpp.md +96 -0
  543. package/docs/providers.md +70 -5
  544. package/docs/sdk.md +1 -1
  545. package/docs/settings.md +10 -8
  546. package/docs/terminal-setup.md +14 -0
  547. package/docs/themes.md +4 -2
  548. package/docs/tui.md +71 -1
  549. package/docs/usage.md +1 -1
  550. package/docs/windows.md +16 -2
  551. package/eval/drahtbank/adapters.d.mts +35 -0
  552. package/eval/drahtbank/adapters.mjs +192 -0
  553. package/eval/drahtbank/bank.d.mts +141 -0
  554. package/eval/drahtbank/bank.mjs +515 -0
  555. package/eval/drahtbank/cases-v2.d.mts +28 -0
  556. package/eval/drahtbank/cases-v2.mjs +164 -0
  557. package/eval/drahtbank/cases.d.mts +17 -0
  558. package/eval/drahtbank/cases.mjs +198 -0
  559. package/eval/drahtbank/cli.mjs +120 -0
  560. package/eval/drahtbank/grading-v2.d.mts +26 -0
  561. package/eval/drahtbank/grading-v2.mjs +227 -0
  562. package/eval/drahtbank/isolated-tools.ts +223 -0
  563. package/eval/drahtbank/isolation-worker.mjs +53 -0
  564. package/eval/drahtbank/isolation.d.mts +52 -0
  565. package/eval/drahtbank/isolation.mjs +345 -0
  566. package/eval/drahtbank/runtime-checks.d.mts +15 -0
  567. package/eval/drahtbank/runtime-checks.mjs +187 -0
  568. package/examples/extensions/dynamic-resources/dynamic.json +1 -1
  569. package/examples/extensions/minimal-mode.ts +4 -5
  570. package/examples/extensions/overlay-test.ts +2 -2
  571. package/examples/extensions/plan-mode/index.ts +6 -2
  572. package/examples/extensions/subagent/index.ts +4 -6
  573. package/hooks/checks/checks-runtime.cjs +215 -0
  574. package/hooks/checks/git-safety.cjs +198 -0
  575. package/hooks/checks/git-safety.d.cts +1 -0
  576. package/hooks/gsd/draht-post-task.js +78 -39
  577. package/hooks/gsd/draht-quality-gate.js +210 -122
  578. package/hooks/gsd/package.json +3 -0
  579. package/package.json +21 -16
  580. package/prompts/commands/atomic-commit.md +8 -6
  581. package/prompts/commands/brainstorm.md +5 -149
  582. package/prompts/commands/create-verification-skill.md +8 -48
  583. package/prompts/commands/discuss-phase.md +6 -10
  584. package/prompts/commands/execute-phase.md +18 -45
  585. package/prompts/commands/fix.md +16 -128
  586. package/prompts/commands/grill.md +6 -53
  587. package/prompts/commands/init-project.md +13 -18
  588. package/prompts/commands/map-codebase.md +3 -3
  589. package/prompts/commands/new-project.md +12 -17
  590. package/prompts/commands/next-milestone.md +4 -8
  591. package/prompts/commands/orchestrate-loop.md +12 -12
  592. package/prompts/commands/orchestrate.md +12 -11
  593. package/prompts/commands/pause-work.md +1 -1
  594. package/prompts/commands/plan-phase.md +15 -37
  595. package/prompts/commands/quick.md +11 -64
  596. package/prompts/commands/resolve-conflicts.md +2 -15
  597. package/prompts/commands/triage.md +3 -14
  598. package/prompts/commands/verify-work.md +15 -63
  599. package/prompts/commands/why.md +18 -118
  600. package/schemas/keybindings.schema.json +433 -0
  601. package/schemas/models.schema.json +1190 -0
  602. package/schemas/settings.schema.json +849 -0
  603. package/schemas/theme.schema.json +365 -0
  604. package/skills/atomic-reasoning/SKILL.md +6 -105
  605. package/skills/blast-radius/SKILL.md +1 -1
  606. package/skills/epistemics/SKILL.md +12 -87
  607. package/skills/explainers/SKILL.md +1 -1
  608. package/skills/typescript-discipline/SKILL.md +12 -42
  609. package/skills/typescript-discipline/references/patterns.md +25 -266
  610. package/skills/unslop/SKILL.md +14 -105
  611. package/dist/bundle/chunks/anthropic-messages-GAKYXF65.js +0 -6
  612. package/dist/bundle/chunks/azure-openai-responses-ZIXMK6JO.js +0 -2
  613. package/dist/bundle/chunks/chunk-2E5VODES.js +0 -2
  614. package/dist/bundle/chunks/chunk-2VAF4XJI.js +0 -146
  615. package/dist/bundle/chunks/chunk-4TVQYRQY.js +0 -2
  616. package/dist/bundle/chunks/chunk-6MSE6LZ3.js +0 -6
  617. package/dist/bundle/chunks/chunk-6ZJKIMU7.js +0 -2
  618. package/dist/bundle/chunks/chunk-736QBNUZ.js +0 -12
  619. package/dist/bundle/chunks/chunk-7TYCZN4Z.js +0 -137
  620. package/dist/bundle/chunks/chunk-BXSHCX3G.js +0 -11
  621. package/dist/bundle/chunks/chunk-GVXA72ZA.js +0 -2
  622. package/dist/bundle/chunks/chunk-I5OKY6RH.js +0 -11
  623. package/dist/bundle/chunks/chunk-IWTUBX6V.js +0 -4
  624. package/dist/bundle/chunks/chunk-KU5HAKZL.js +0 -4
  625. package/dist/bundle/chunks/chunk-MO3SCGBN.js +0 -18
  626. package/dist/bundle/chunks/chunk-N2QZNJT6.js +0 -65
  627. package/dist/bundle/chunks/chunk-PGJAHC3R.js +0 -107
  628. package/dist/bundle/chunks/chunk-QVFELZW2.js +0 -312
  629. package/dist/bundle/chunks/chunk-RZKPFWMH.js +0 -42
  630. package/dist/bundle/chunks/chunk-SDRCE6OP.js +0 -2
  631. package/dist/bundle/chunks/chunk-SVNWI7EV.js +0 -8
  632. package/dist/bundle/chunks/chunk-TIA2T6EO.js +0 -3
  633. package/dist/bundle/chunks/chunk-TOWVIJ2O.js +0 -1623
  634. package/dist/bundle/chunks/chunk-XBUEMKIY.js +0 -2
  635. package/dist/bundle/chunks/chunk-ZA4QNPJY.js +0 -82
  636. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-MJKOAE5S.js +0 -2
  637. package/dist/bundle/chunks/execute-6N7T7VLY.js +0 -18
  638. package/dist/bundle/chunks/google-generative-ai-RPUPQ6PM.js +0 -2
  639. package/dist/bundle/chunks/google-vertex-EZES5QVQ.js +0 -2
  640. package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +0 -13
  641. package/dist/bundle/chunks/lib-XOG5PI3Y.js +0 -9
  642. package/dist/bundle/chunks/mistral-conversations-AOYGU43Y.js +0 -5
  643. package/dist/bundle/chunks/node-LQ52KV6B.js +0 -16
  644. package/dist/bundle/chunks/openai-codex-responses-M2Y77JEQ.js +0 -10
  645. package/dist/bundle/chunks/openai-completions-A4OKYOYV.js +0 -7
  646. package/dist/bundle/chunks/openai-responses-6IXV53T3.js +0 -3
  647. package/dist/bundle/chunks/openrouter-images-LYV4NKFM.js +0 -2
  648. package/dist/bundle/chunks/pi-messages-KKMEUT3Z.js +0 -8
  649. package/dist/bundle/chunks/runtime-363BOYEO.js +0 -3
  650. package/dist/bundle/chunks/runtime-D3KV73AE.js +0 -2
  651. package/dist/bundle/chunks/settings-manager-GEOZJXFQ.js +0 -2
  652. package/dist/bundle/chunks/src-TIBHS42X.js +0 -4
  653. package/dist/bundle/chunks/typesafe-system-one-YBEEY5XU.js +0 -2
  654. package/dist/bundle/chunks/virtual-modules-RLC4Y5MX.js +0 -2
  655. package/dist/core/provider-attribution.d.ts +0 -4
  656. package/dist/core/provider-attribution.d.ts.map +0 -1
  657. package/dist/core/provider-attribution.js +0 -72
  658. package/dist/core/provider-attribution.js.map +0 -1
  659. package/dist/experimental/micro/api.d.ts +0 -81
  660. package/dist/experimental/micro/api.d.ts.map +0 -1
  661. package/dist/experimental/micro/api.js +0 -2
  662. package/dist/experimental/micro/api.js.map +0 -1
  663. package/dist/experimental/micro/main.d.ts +0 -3
  664. package/dist/experimental/micro/main.d.ts.map +0 -1
  665. package/dist/experimental/micro/main.js +0 -21
  666. package/dist/experimental/micro/main.js.map +0 -1
  667. package/dist/experimental/micro/models.d.ts +0 -11
  668. package/dist/experimental/micro/models.d.ts.map +0 -1
  669. package/dist/experimental/micro/models.js +0 -95
  670. package/dist/experimental/micro/models.js.map +0 -1
  671. package/dist/experimental/micro/runtime.d.ts +0 -12
  672. package/dist/experimental/micro/runtime.d.ts.map +0 -1
  673. package/dist/experimental/micro/runtime.js +0 -465
  674. package/dist/experimental/micro/runtime.js.map +0 -1
  675. package/dist/experimental/micro/sessions.d.ts +0 -10
  676. package/dist/experimental/micro/sessions.d.ts.map +0 -1
  677. package/dist/experimental/micro/sessions.js +0 -41
  678. package/dist/experimental/micro/sessions.js.map +0 -1
  679. package/dist/experimental/micro/tools.d.ts +0 -10
  680. package/dist/experimental/micro/tools.d.ts.map +0 -1
  681. package/dist/experimental/micro/tools.js +0 -96
  682. package/dist/experimental/micro/tools.js.map +0 -1
  683. package/dist/experimental/micro/tui.d.ts +0 -3
  684. package/dist/experimental/micro/tui.d.ts.map +0 -1
  685. package/dist/experimental/micro/tui.js +0 -510
  686. package/dist/experimental/micro/tui.js.map +0 -1
  687. package/dist/experimental/mini/main.d.ts +0 -7
  688. package/dist/experimental/mini/main.d.ts.map +0 -1
  689. package/dist/experimental/mini/main.js +0 -21
  690. package/dist/experimental/mini/main.js.map +0 -1
  691. package/dist/experimental/mini/server/entry.d.ts +0 -3
  692. package/dist/experimental/mini/server/entry.d.ts.map +0 -1
  693. package/dist/experimental/mini/server/entry.js +0 -11
  694. package/dist/experimental/mini/server/entry.js.map +0 -1
  695. package/dist/experimental/mini/server/run.d.ts +0 -13
  696. package/dist/experimental/mini/server/run.d.ts.map +0 -1
  697. package/dist/experimental/mini/server/run.js +0 -150
  698. package/dist/experimental/mini/server/run.js.map +0 -1
  699. package/dist/experimental/mini/shared/protocol.d.ts +0 -127
  700. package/dist/experimental/mini/shared/protocol.d.ts.map +0 -1
  701. package/dist/experimental/mini/shared/protocol.js +0 -13
  702. package/dist/experimental/mini/shared/protocol.js.map +0 -1
  703. package/dist/experimental/mini/shared/rpc.d.ts +0 -49
  704. package/dist/experimental/mini/shared/rpc.d.ts.map +0 -1
  705. package/dist/experimental/mini/shared/rpc.js +0 -171
  706. package/dist/experimental/mini/shared/rpc.js.map +0 -1
  707. package/dist/experimental/mini/shared/transport.d.ts +0 -35
  708. package/dist/experimental/mini/shared/transport.d.ts.map +0 -1
  709. package/dist/experimental/mini/shared/transport.js +0 -94
  710. package/dist/experimental/mini/shared/transport.js.map +0 -1
  711. package/dist/experimental/mini/tui/run.d.ts +0 -9
  712. package/dist/experimental/mini/tui/run.d.ts.map +0 -1
  713. package/dist/experimental/mini/tui/run.js +0 -62
  714. package/dist/experimental/mini/tui/run.js.map +0 -1
  715. package/dist/experimental/mini/tui/session.d.ts +0 -26
  716. package/dist/experimental/mini/tui/session.d.ts.map +0 -1
  717. package/dist/experimental/mini/tui/session.js +0 -94
  718. package/dist/experimental/mini/tui/session.js.map +0 -1
  719. package/dist/experimental/mini/tui/view.d.ts +0 -10
  720. package/dist/experimental/mini/tui/view.d.ts.map +0 -1
  721. package/dist/experimental/mini/tui/view.js +0 -461
  722. package/dist/experimental/mini/tui/view.js.map +0 -1
  723. package/dist/experimental/mini/worker/entry.d.ts +0 -3
  724. package/dist/experimental/mini/worker/entry.d.ts.map +0 -1
  725. package/dist/experimental/mini/worker/entry.js +0 -10
  726. package/dist/experimental/mini/worker/entry.js.map +0 -1
  727. package/dist/experimental/mini/worker/lane-service.d.ts +0 -44
  728. package/dist/experimental/mini/worker/lane-service.d.ts.map +0 -1
  729. package/dist/experimental/mini/worker/lane-service.js +0 -97
  730. package/dist/experimental/mini/worker/lane-service.js.map +0 -1
  731. package/dist/experimental/mini/worker/models-service.d.ts +0 -19
  732. package/dist/experimental/mini/worker/models-service.d.ts.map +0 -1
  733. package/dist/experimental/mini/worker/models-service.js +0 -136
  734. package/dist/experimental/mini/worker/models-service.js.map +0 -1
  735. package/dist/experimental/mini/worker/run.d.ts +0 -14
  736. package/dist/experimental/mini/worker/run.d.ts.map +0 -1
  737. package/dist/experimental/mini/worker/run.js +0 -88
  738. package/dist/experimental/mini/worker/run.js.map +0 -1
  739. package/dist/modes/interactive/theme/theme-json.d.ts +0 -85
  740. package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
  741. package/dist/modes/interactive/theme/theme-json.js +0 -132
  742. package/dist/modes/interactive/theme/theme-json.js.map +0 -1
  743. package/dist/modes/interactive/theme/theme-schema.json +0 -361
  744. /package/dist/bundle/chunks/{chunk-ZZD35WKM.js → chunk-MOOADNVS.js} +0 -0
@@ -4,69 +4,21 @@ description: "Acceptance testing of completed phase work (parallel verifier + se
4
4
 
5
5
  # /verify-work
6
6
 
7
- Walk through acceptance testing of completed phase work, using subagents for parallel verification — including a spec-compliance pass against the phase's plan files.
8
-
9
- ## Usage
10
- ```
11
- /verify-work [N]
12
- ```
7
+ Verify the selected GSD phase against its acceptance criteria.
13
8
 
14
9
  Phase: $1
15
10
 
16
- ## Atomic Reasoning
17
-
18
- Decompose the work into independently verifiable units before acting; the `atomic-reasoning` skill holds the full discipline — load it when the decomposition is not obvious.
19
-
20
- ## Steps
21
- 1. Run `draht-tools extract-deliverables $1` to get testable items
22
- 2. Discover the phase's plan files (`.planning/phases/<N>-*/<N>-NN-PLAN.md`). Each plan is the spec the spec-reviewer evaluates against.
23
- 3. **Run parallel verification via subagents:**
24
- Use the `subagent` tool in **parallel mode** with these tasks:
25
- - `verifier` agent: "Run the full test suite for this project. Check package.json for the test command. Record pass/fail counts. Then run any available lint and typecheck commands (e.g. npm run check, npm run lint, npx tsc --noEmit). Report all results with error details. If a project verification skill exists (a `verify-<app>` skill under `.draht/skills/`, generated by /create-verification-skill), drive the app with it: launch, run its Doctor check, drive ONE mapped feature from its feature map the way a user would, capture the evidence artifacts it names, and clean up per its Cleanup section — cleanup never removes the evidence. Report which feature you drove and where the evidence lives; this is observed evidence of user-visible behaviour. If no such skill exists, say so: test output is then the ceiling of the evidence. End with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`. Do NOT run draht, draht-tools, or pi commands (launching and driving the target app itself is in scope)."
26
- - `security-auditor` agent: "Audit the recent code changes (use git log and git diff, scoped to this phase's commits). Check for injection risks, auth bypasses, secrets in code, unsafe patterns. Report findings by severity. End with `STATUS: ...`. Do NOT run draht, draht-tools, or pi commands."
27
- - `reviewer` agent: "Review the recent code changes for this phase. Check domain language compliance against `.planning/DOMAIN.md` if it exists — scan for identifiers not in the glossary and cross-context boundary violations. Report Must fix / Should fix / Consider. End with `STATUS: ...`. Do NOT run draht, draht-tools, or pi commands."
28
- - `spec-reviewer` agent: "Phase-level spec compliance check for phase $1. The phase has these plan files (each is a spec): <list of .planning/phases/<N>-*/<N>-NN-PLAN.md paths>. For each plan, evaluate whether the phase's commits implement exactly what the plan's <task> elements asked — no missing tasks, no over-builds. Use git log and git diff against the phase commit range. Output a per-plan compliance verdict with omissions and over-builds. End with `STATUS: ...`."
29
-
30
- 4. **Spot-check before aggregating.** Subagent claims are inputs, not verdicts. Before accepting the verifier's `DONE`, re-run the test suite headline yourself and read the counts. Before accepting the spec-reviewer's compliance verdict, read one plan's diff yourself. A pass you only heard about is an "assumed pass" — and an assumed pass is not a pass. This costs two commands and catches the most expensive failure mode this command has: trust laundered into evidence.
31
-
32
- 5. **Read each subagent's `STATUS:` line.** Treat the phase as failed if any of these is `BLOCKED`:
33
- - `verifier` (tests / lint / typecheck failed)
34
- - `security-auditor` (Critical or High findings)
35
- - `spec-reviewer` (any plan non-compliant)
36
- - `reviewer` (Must-fix correctness issues)
37
-
38
- 6. Collect results and walk user through each deliverable, incorporating findings.
39
- 7. Record results (pass/fail/partially/skip). Label each: **observed** (you or a subagent ran it and quoted output), **derived** (follows necessarily from something observed), or **assumed** (unchecked). Verdicts inherit the weakest label they rest on.
40
- 8. For failures: diagnose and create fix plans via `draht-tools create-fix-plan $1 P`
41
- - Fix plans MUST include a reproducing test that demonstrates the failure before any implementation — held to the /fix Phase 1 red-capable standard: one named command, already run once, invocation and output shown, asserting the exact failing symptom (red now, green once fixed)
42
- - Spec-reviewer omissions become explicit fix-plan tasks (one task per omission)
43
- 9. Write UAT report: `draht-tools write-uat $1`
44
- - Order: **verdict first** (phase pass/fail, X/Y deliverables, in the first line), **evidence second** (test health summary with pass/fail/coverage, security audit results, spec compliance summary per plan, domain model status, deliverable results with labels), **risk last** (what was NOT tested and how it could bite). Never bury a failure under passes.
45
- - Report prose follows the `unslop` skill — plain words, active voice, no filler; quoted command output and the verdict-first ordering stay untouched.
46
- - When the user asks, also write an HTML explainer of the UAT report per the `explainers` skill, with the deliverable results and their observed/derived/assumed labels as its data block. The UAT report stays the source of truth.
47
- 10. If all passed: mark phase complete.
48
- - If more phases remain in the milestone: tell the user to start a new session and run `/discuss-phase N+1`.
49
- - If ALL phases in the milestone are complete: tell the user to start a new session and run `/next-milestone`.
50
- 11. If failures: route to `execute-phase $1 --gaps-only`
51
-
52
- ## Why a phase-level spec-reviewer
53
-
54
- `/execute-phase` already runs spec-reviewer **per task** before the next task starts. The phase-level pass here catches things the per-task loop can miss:
55
- - A whole plan was skipped (no implementer ever ran on it)
56
- - A task's commit was reverted or rebased away
57
- - Out-of-scope drift that accumulated across multiple tasks
58
-
59
- Cheap insurance — the diff and plans already exist; the agent maps one to the other.
60
-
61
- ## Workflow
62
- This is the last step in the per-phase cycle. Each step runs in its own session (`/new` between steps):
63
-
64
- ```
65
- /discuss-phase N → /new → /plan-phase N → /new → /execute-phase N → /new → /verify-work N
66
- ```
67
-
68
- After verify-work passes:
69
- - More phases remaining → `/new` → `/discuss-phase N+1`
70
- - ALL phases in milestone verified → `/new` → `/next-milestone`
71
-
72
- `/next-milestone` is ONLY for generating new phases after every phase in the current milestone is complete.
11
+ 1. Run `draht-tools extract-deliverables $1` and read the phase's plans. Identify the exact commit range and any uncommitted work being verified; retain the baseline and relevant configuration.
12
+ 2. Collect verification evidence and focused reviews. Parallelize independent roles where useful:
13
+ - Dispatch `verifier` with the deliverables, changed scope, required commands, and any existing check records. It must inspect actual command outcomes and run missing, stale, or insufficient checks. Use a relevant project `verify-<app>` skill for user-visible behavior when available; preserve its artifacts and cleanup rules. Without such a skill, other direct behavior checks remain possible.
14
+ - Dispatch `security-auditor` with the phase diff and relevant deployment/threat context. Request confirmed findings and actionable suspected risks with severity and evidence.
15
+ - Dispatch `reviewer` with the phase diff and established project conventions. Existing domain documentation and graph impact can inform the review; an unknown glossary word or cross-directory import alone is not a defect.
16
+ - Dispatch `spec-reviewer` with the plan paths, phase diff, and acceptance criteria. Request per-plan compliance, omissions, and over-builds, including work lost or reverted since task reviews.
17
+
18
+ Require every role to finish with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`. Supply missing available context; stop a blocked required review rather than treating it as a pass. At most 3 re-dispatches for missing context or correction; preserve the execution workflow's combined repair cap.
19
+ 3. Inspect the evidence and load-bearing review findings. Reuse a check only when its source, tests, configuration, dependencies, and execution environment are unchanged and its scope covers the claim. A status line alone is not evidence. Rerun missing, stale, or unverifiable checks; do not repeat a suite merely because an agent ran it.
20
+ 4. Honor the project's required deterministic quality checks. A failed process, signal, timeout, required unavailable check, non-compliant plan, Must-fix review issue, or confirmed Critical/High security issue prevents a passing phase verdict. Review remaining concerns explicitly.
21
+ 5. Record each deliverable as pass/fail/partial/skip with evidence. Preserve the labels **observed** (executed behavior with output), **derived** (conclusion supported by observations), and **assumed** (unchecked). Ask for human verification only where automation and available evidence cannot resolve the acceptance criterion.
22
+ 6. For failures, use `draht-tools create-fix-plan $1 P`. Include a reproduction with observed output where feasible, or the exact missing evidence/access needed to construct one. Group corrections by coherent behavior; no implementation starts on an invented diagnosis.
23
+ 7. Write the UAT report with `draht-tools write-uat $1`: **verdict first**, **evidence second**, **risk last**. Include deliverable outcomes, commands/checked state, review findings, and material gaps. Follow `unslop` for prose and `explainers` when a diagram or requested HTML report helps.
24
+ 8. Mark the phase complete only when acceptance and required checks pass. Otherwise route to `/execute-phase $1 --gaps-only`. More phases lead to `/discuss-phase N+1`; `/next-milestone` is only for when all phases are verified. A fresh session is optional.
@@ -4,136 +4,36 @@ description: "Investigate why code is the way it is — parallel evidence invest
4
4
 
5
5
  # /why
6
6
 
7
- Reconstruct why code is the way it is — the design rationale, the history, the rejected alternatives — from the evidence the repository and its surroundings actually carry. The output is a confidence-tiered, citation-backed answer with an explicit coverage map, never a plausible story.
8
-
9
- ## Usage
10
- ```
11
- /why <file, symbol, or question>
12
- ```
13
-
14
7
  Question: $ARGUMENTS
15
8
 
16
- > **Tool note**: Use the `subagent` tool in **parallel mode** with the `investigator` agent — one task per available evidence category, dispatched in a single call. To escalate a contested synthesis, consult the `advisor` agent.
17
-
18
- ## Routing
19
-
20
- `/why` answers intent, history, and forces. Something misbehaving right now is a defect — route it to `/fix`, which is reproduction-gated. A `/why` run that uncovers a live defect hands off to `/fix`; a `/fix` that needs design intent (is this behaviour a decision or an accident?) consults `/why`. For structure and architecture walkthroughs — what the code IS rather than why it is that way — use `/map-codebase`.
21
-
22
- ## Epistemics
23
-
24
- Every claim in the output follows the `epistemics` skill — five confidence tiers, cite-or-label-as-inference, null results as evidence. Load it before synthesising; the epistemic framing is the product, and de-hedging it to sound authoritative is the exact failure this command exists to prevent.
25
-
26
- ## Steps
27
-
28
- ### 1 — Parse the target and the question archetype
29
-
30
- Identify what is being asked about (file, symbol, pattern, value) and which archetype the question is: design rationale ("why is this a queue?"), tradeoff-vs-alternative ("why X instead of Y?"), defensive reasoning ("why the triple-check here?"), external forcing function ("why did this change in March?"), dead code ("why does this exist at all?"), or a broad sweep ("why is this module shaped like this?"). If the target is vague, state your best-guess interpretation from context and proceed — do not block on a clarifying question.
31
-
32
- ### 2 — Build the code anchor
33
-
34
- Cheap, done once by the lead, pasted into every brief:
35
-
36
- - file paths and line ranges; the key symbols involved
37
- - `git blame -L <range> <file>` on the target lines
38
- - `git log --follow --oneline -20 <file>`
39
- - PR numbers extracted from `(#N)` commit subjects; for each, `gh pr view <n> --json title,body,author,createdAt,mergedAt,labels,closingIssuesReferences,comments,reviews`
40
- - linked ticket and ADR identifiers found along the way
41
- - optionally a pasted `draht-tools graph-context <file>` slice for orientation (lead-only; subagents cannot run draht-tools)
42
-
43
- ### 3 — Probe the evidence map
44
-
45
- Five categories. Probe availability before dispatching; each row is the assigned investigator's playbook.
46
-
47
- | Category | Availability probe | What it uniquely surfaces + playbook |
48
- |---|---|---|
49
- | Git history | Always available | Pickaxe (`git log -S`/`-G`), blame, `git show`; test names encoding edge cases; `red:`/`green:`/`refactor:` and `docs:` prefixes as semantic signal. Pitfalls: squash flatlands → fall back to the PR record; misleading messages → read the diff; cargo-culted patterns → investigate the origin commit; bot commits carry no motivation. |
50
- | Review record | `git remote` + `gh auth status` | PR bodies, review threads, linked issues — the argument that happened before merge, including rejected alternatives. |
51
- | Planning record | `.planning/` exists | `STATE.md` `## Decisions` (dated, attributed) and `## Lessons`; `phases/NN-*/` PLAN, SUMMARY, VERIFICATION, and UAT files (observed/derived/assumed labels); `specs/`; `quick/`; `loop/PROGRESS.md`; `CONTINUE-HERE.md`. Probe before assuming `.planning/decisions/` and `.planning/tickets/` — they exist only when a grill chose that output. |
52
- | Decision records | `docs/adr/` and `CHANGELOG.md` files exist | ADR titles are decisions; dated Update blocks cite forcing commits; per-package changelogs date user-visible shifts. |
53
- | External systems | A registered extension tool only | Tracker, chat, observability, error tracking, analytics — the conversational and operational record. Searchable only via a project-registered tool; when none exists, do not dispatch: record one Sources Consulted gap line — "External records: unavailable — no tool registered in this runtime; the conversational and operational record was not searched." |
54
-
55
- The map is extensible: a project-registered tool adds an investigator with the same brief shape; an unavailable category is a coverage gap, never a silent drop.
56
-
57
- **Incident overlay**: when the target looks defensive — null guards, retry, timeout, rate limiting, feature flags — instruct every investigator to hunt incident-shaped evidence inside its own category: revert-then-reapply chains, `## Lessons` entries, ADR Update blocks, UAT failure verdicts.
58
-
59
- ### 4 — Dispatch parallel investigators
60
-
61
- Dispatch one `investigator` agent per AVAILABLE category in one parallel-mode call; follow the subagent tool limits (max 8 tasks, 4 concurrent) — if the category count ever exceeds them, fold overflow into the nearest category. Skip rules:
62
-
63
- - A skip needs a written justification that surfaces in Sources Consulted. Unavailability is a gap, not a choice.
64
- - "Provably irrelevant, not just probably" — a build-time script with no runtime path provably cannot appear in runtime error tracking; "it's feature code, error tracking won't have anything" is a guess, so search it.
65
-
66
- Each brief is standalone:
67
-
68
- ```
69
- You are investigating ONE evidence category for a why-question. Gather evidence, not narrative — a verbatim quote with a precise citation beats a paragraph of plausible summary.
70
-
71
- Question: <the question and its archetype>
72
-
73
- Code anchor:
74
- <the anchor from Step 2>
75
-
76
- Your category: <name + the playbook row from Step 3>
77
- <if the incident overlay applies: hunt incident-shaped evidence inside your category — revert/re-apply chains, Lessons entries, ADR Update blocks, UAT failure verdicts>
78
-
79
- Report using exactly these sections: Source / What I Searched (queries verbatim) / Direct Evidence Found / Indirect-Circumstantial Evidence (inference chain + alternative readings) / Contradictions / Gaps / Additional Leads.
80
-
81
- Stay inside your category; record cross-category references under Additional Leads for the owning investigator — never chase them.
82
-
83
- Do NOT run draht, draht-tools, or pi commands.
84
-
85
- End with STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
86
- ```
87
-
88
- `NEEDS_CONTEXT` / `BLOCKED` → supply the missing info and re-dispatch. Hard cap: 3 re-dispatches total.
89
-
90
- ### 5 — Synthesize (the lead, in this context)
9
+ Explain historical intent from evidence. Use `epistemics` to distinguish direct statements, supported conclusions, inference, speculation, and unknowns. Current defects belong in `/fix`; a structural walkthrough may use `/map-codebase`.
91
10
 
92
- - Investigator claims are inputs, not verdicts — spot-verify load-bearing citations with git/gh before repeating them.
93
- - Merge duplicate citations into one authoritative reference.
94
- - Surface contradictions without picking a side.
95
- - Tier every claim per the `epistemics` skill.
96
- - Hand each investigator's Additional Leads to the owning category's follow-up, or record them as gaps.
97
- - When competing hypotheses are decision-changing for an imminent code change, consult the `advisor` agent with the tiered findings for a steer.
11
+ ## Investigate
98
12
 
99
- ### 6 — Output contract
13
+ Identify the target files/symbols and the specific decision being asked about. Read the relevant source, blame, and history; use `git log --follow`, pickaxe, and linked PR/issue discussions to trace the decision. Source mechanics alone do not establish motivation.
100
14
 
101
- Exact section order:
15
+ Select evidence sources that can answer the question:
102
16
 
103
- 1. **The Question**
104
- 2. **The Code in Question** — what it does mechanically, in two or three sentences
105
- 3. **What We Found** — [Direct] and [Supported] bullets, each cited
106
- 4. **What We Can Reasonably Infer** — [Inferred] bullets with the chain visible: "Given A and B, C is likely because D"
107
- 5. **Competing Hypotheses** — hypothesis + evidence for + evidence against. Don't force a winner. Skip only when there is one clear answer.
108
- 6. **What We Don't Know** — specific searches that came up empty, named unavailable sources, people who would know
109
- 7. **Sources Consulted** — one line per category INCLUDING empties, gaps, and justified skips: `- <Category>: <what was searched>. <found / no relevant results / skipped: reason / unavailable: gap>`
110
- 8. **Confidence Summary** — 1-2 sentences
17
+ - Git history and changed tests: origin, later changes, reversions, and constraints.
18
+ - PR/review record: rejected alternatives and discussion before merge.
19
+ - Existing planning records: decisions, lessons, summaries, verification, and handoffs.
20
+ - ADRs and changelogs: recorded rationale and later revisions.
21
+ - Available external tools: relevant tracker, conversation, or operational evidence. Do not invent access or contact people.
111
22
 
112
- Report prose follows the `unslop` skill; citations and quoted evidence stay verbatim.
23
+ Follow decisive leads, including incident evidence for defensive code. A direct answer in a relevant record may be sufficient; do not require an investigator for every category. Report unavailable sources when they materially limit the answer.
113
24
 
114
- **Diagram**: when the answer is a chain — the commits that built the code, a forcing sequence, a call path — add one Mermaid diagram after What We Can Reasonably Infer, per the `explainers` skill. Solid edges carry [Direct] or [Supported] facts; [Inferred] links are dashed and labelled. **HTML**: when the user asks, also render the report as an HTML explainer per the same skill; the Markdown report stays the source of truth.
25
+ ## Delegate when useful
115
26
 
116
- **Closing hook**: when the question precedes a change, convert the findings into a Preserve / Change / Avoid / Risk constraint set suitable for `/discuss-phase` or `/plan-phase`.
27
+ Use `investigator` agents for independent evidence searches. Give each only the question, code anchor, assigned sources, relevant leads, and read-only scope. Shared investigator instructions already define citations and reporting; avoid copying the entire protocol into every task.
117
28
 
118
- **Effort valve**: a trivial single-commit target whose PR or commit already answers the question may be handled inline by the lead running the git-history archaeology itself — only after stating why the other available categories would be redundant. The output contract and the coverage map still apply.
29
+ Require `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`. Supply available missing context for `NEEDS_CONTEXT`; an unavailable required tool is a blocker, not a reason to retry unchanged. At most 3 re-dispatches total.
119
30
 
120
- ## Failure Modes — STOP
31
+ The lead checks load-bearing citations, merges duplicate evidence, and resolves cross-source leads. Consult the `advisor` agent when a contested inference would change an imminent implementation decision.
121
32
 
122
- Stop immediately if you catch yourself:
33
+ ## Report
123
34
 
124
- - **Confident storytelling** — an uncited bullet belongs under Inferred or Hypotheses, never under What We Found
125
- - Citing code as evidence of its own intent
126
- - Recency bias — explaining an accretion as one decision; trace back
127
- - Sycophantic agreement with the asker's embedded hypothesis
128
- - Skipping the gaps section
129
- - Skipping investigators by anticipation — a null result is a data point; a skipped search is a blind spot
130
- - Collapsing categories into one investigator
35
+ Lead with the answer and its confidence. Separate what sources establish from what is inferred; cite each material claim and preserve contradictions. Include unresolved hypotheses only when they help answer the question.
131
36
 
132
- ## Rationalization Table
37
+ End with a concise **Sources Consulted** account of the searches, relevant null results, and material coverage gaps. Do not require empty headings or searches unrelated to the question. Follow `unslop` for prose and `explainers` when a timeline, dependency, or causal diagram helps.
133
38
 
134
- | Excuse | Reality |
135
- |--------|---------|
136
- | "The commit message says X, done" | One source is a lead, not a verdict — the record contradicts itself more often than it lies consistently. |
137
- | "The code obviously does this for performance" | Code is mechanics; motivation needs an external source or an [Inferred] label. |
138
- | "The user already told me why" | That is a hypothesis; check it independently. |
139
- | "No .planning/ here, nothing to search" | git and gh still exist; report the missing categories as gaps, don't invent. |
39
+ When this investigation precedes a change, state the resulting Preserve / Change / Avoid / Risk constraints. These can guide ordinary implementation or an explicitly selected GSD plan.
@@ -1,115 +1,16 @@
1
1
  ---
2
2
  name: atomic-reasoning
3
- description: Decompose work into atomic reasoning units before acting — state the logical component, validate independence, verify correctness. The discipline that opens every draht slash command. Use whenever planning, designing, refactoring, breaking down a feature, structuring a commit, or scoping work. Triggers on "plan", "decompose", "break down", "scope", "split", "atomic", "how should I structure", or any moment the agent is about to spawn many parallel changes without first carving the work into independently-verifiable units.
3
+ description: Decompose complex work into coherent, independently verifiable units when planning dependencies, parallel implementation, or atomic commits.
4
4
  ---
5
5
 
6
6
  # Atomic Reasoning
7
7
 
8
- A meta-discipline. Before acting on any non-trivial piece of work, decompose it into atomic units — pieces that can be reasoned about, built, and verified independently.
8
+ Use decomposition when it helps coordinate or verify the work. Small tasks can be implemented directly; this skill does not open every command or require a written plan.
9
9
 
10
- This is the discipline that opens every draht slash command (`/plan-phase`, `/execute-phase`, `/fix`, `/quick`, `/verify-work`, `/atomic-commit`). The skill makes it explicit and available outside those commands too.
10
+ For each unit, identify its intended outcome, dependencies, affected scope, and proving checks. Keep changes together when splitting them would leave an incoherent intermediate state. Split unrelated outcomes. A unit may span files or layers when one behavior requires them; neither a time estimate nor a file count determines atomicity.
11
11
 
12
- ## The Three Questions
12
+ Use `draht-tools graph-context <files>` and `graph-impact <files>` when the repository has a map and dependency boundaries are unclear. Structural clusters are evidence about coupling, not a rule that each task must fit one cluster.
13
13
 
14
- For each unit of work you're about to undertake, answer these three questions before doing anything else:
14
+ Resolve uncertainty that could invalidate later work early. Parallelize units with independent ownership and explicit integration points. Give each subagent the outcome, scope, constraints, and acceptance checks; a blocker requires investigation, not automatic subdivision.
15
15
 
16
- ### 1. State the Logical Component
17
- - What does this change do? What is its singular purpose?
18
- - What observable outcome does it produce?
19
- - Does it complete a thought, or is it half of one?
20
-
21
- If you can't state the purpose in one sentence, the unit is not yet atomic — keep decomposing.
22
-
23
- ### 2. Validate Independence
24
- - Can this be done without touching unrelated features?
25
- - Does it depend on other units, or is it standalone?
26
- - Which files does it touch? Are those files coupled to anything outside this unit's concern?
27
- - If applied alone, would the codebase still build/run?
28
-
29
- If the answer to "would it build alone" is *no*, the unit is too small — pair it with the dependency. If the answer to "does it touch unrelated concerns" is *yes*, the unit is too big — split it.
30
-
31
- ### 3. Verify Correctness
32
- - What test or check would prove this unit works?
33
- - What inputs → what expected outputs or state changes?
34
- - What edge cases or failure modes exist?
35
-
36
- If you can't name the proving test, you don't yet understand what "correct" means for this unit. Define it before building.
37
-
38
- ## How to Apply
39
-
40
- ### Before planning a feature
41
- For each observable user-visible outcome:
42
- 1. State the logical component (what must be true for the user?)
43
- 2. Validate independence (which artifacts prove this? can it be built standalone?)
44
- 3. Verify correctness (what scenarios prove it works?)
45
-
46
- ### Validate a decomposition against the living map
47
- Run `draht-tools graph-context <file...>` on each unit's files: a unit whose files share one cluster/bounded context is atomic; a unit spanning multiple contexts should be split along the boundary.
48
-
49
- ### Before splitting a commit
50
- For each file in the diff:
51
- 1. State the logical component (what does this change accomplish?)
52
- 2. Validate independence (would this build alone? does it mix concerns?)
53
- 3. Verify correctness (is the change complete? does it leave a coherent intermediate state?)
54
-
55
- ### Before fixing a bug
56
- 1. State the logical component (what is the observed failure? what should happen vs what does?)
57
- 2. Validate independence (which components are involved? can we isolate it?)
58
- 3. Verify correctness (what test reproduces it reliably? what would prove it fixed?)
59
-
60
- ### Before refactoring
61
- 1. State the logical component (what structural change are you making?)
62
- 2. Validate independence (which behaviour-equivalence test proves this is a refactor, not a rewrite?)
63
- 3. Verify correctness (all tests stay green after the change?)
64
-
65
- ## Atomicity Heuristics
66
-
67
- A unit is atomic if:
68
- - ✅ It can be described in one sentence
69
- - ✅ It can be built or applied in 2–5 minutes of focused work
70
- - ✅ It can be verified by ONE test or check
71
- - ✅ It touches ONE concern in the codebase
72
- - ✅ All files in the atomic unit belong to one bounded context (or explicitly cross a documented boundary) — confirm with `draht-tools graph-context`
73
- - ✅ It produces ONE commit (or one TDD red→green→refactor trio)
74
- - ✅ Its `<files>` list contains specific paths, not "all relevant files"
75
- - ✅ Its outcome is a concrete state change, not "improve X"
76
-
77
- If any of these fail, decompose further.
78
-
79
- ## Order by Risk
80
-
81
- Decomposition tells you the units; it doesn't tell you which to do first. When the units are independent, sequence is a lever — use it to fail cheaply.
82
-
83
- Score each unit by **uncertainty** (has this codebase done it before?) × **blast radius** (how many other units become invalid if this one is wrong?). Do the highest-scoring unit first; push boilerplate last. Boilerplate never invalidates the plan — the risky, unfamiliar unit regularly does, and you want to discover that before you've built everything downstream of it.
84
-
85
- *Example:* a feature needs a third-party webhook and a settings screen. Both are atomic. Prove the webhook round-trip first — if the contract isn't what you assumed, the settings screen you'd have built on top of it was wasted. *Prevents:* sinking effort into work that a later, riskier unit turns out to obsolete.
86
-
87
- ## Anti-Patterns — STOP
88
-
89
- - **"Improve performance"** — not atomic. Pick one metric, one bottleneck, one change.
90
- - **"Refactor the X module"** — not atomic. Pick one structural change with one behaviour-equivalence proof.
91
- - **"Add error handling"** — not atomic. Pick one error case, one handler, one test.
92
- - **"Wire up the Y feature"** — not atomic. Decompose into the components, the data flow, and the integration.
93
- - **"And also fix the related bug while I'm there"** — that's a different atomic unit. Different commit.
94
-
95
- ## Relationship to TDD
96
-
97
- Atomicity and TDD reinforce each other:
98
- - TDD's RED phase forces you to name the proving test (Question 3) before building
99
- - Atomic units fit naturally inside one RED → GREEN → REFACTOR cycle
100
- - A test that requires changes in multiple unrelated files means the unit is not atomic
101
-
102
- ## Relationship to /atomic-commit
103
-
104
- `/atomic-commit` is this skill applied to the git history: each commit is one atomic unit. The questions are the same; the artifact is a commit instead of a plan task.
105
-
106
- ## Relationship to subagent dispatch
107
-
108
- Subagents work best on atomic units. When dispatching:
109
- - Each subagent task should answer the three questions inside its prompt
110
- - Parallel dispatch is only safe when units are genuinely independent (Question 2)
111
- - A subagent returning `STATUS: BLOCKED — complexity` often means the unit wasn't atomic — split it.
112
-
113
- ## Output
114
-
115
- This skill produces *thought*, not files. The artifact is a clearer plan / commit / fix scope before any code is written.
16
+ A commit should express one coherent change when commits are authorized. Testing and decomposition do not independently authorize commits. The `red:`, `green:`, and `refactor:` conventions apply when recording TDD phases.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: blast-radius
3
- description: Impact analysis beyond the diff — find what a change could break somewhere else before it ships, reduce the safety argument to the one falsifiable fact it rests on, and prove that fact by running real code, saying for every fact which rung of the evidence ladder it stopped at. Use for "what could this break", "blast radius of this change", or reviewing a small diff you don't trust yet. Not the uncertainty × blast-radius ordering heuristic in draht's planning commands — that phrase ranks risks for scheduling; this skill is the impact investigation itself.
3
+ description: Find what a change could break beyond the diff and prove the one fact its safety rests on by running real code — use when asked what a change could break, or before shipping one you distrust. Not the uncertainty × blast-radius ordering heuristic in planning commands.
4
4
  ---
5
5
 
6
6
  # Blast Radius
@@ -1,99 +1,24 @@
1
1
  ---
2
2
  name: epistemics
3
- description: Confidence calibration for investigation findings — five tiers (Direct, Supported, Inferred, Speculative, Unknown) that determine both which output section a claim goes in and how it is phrased; cite-or-label-as-inference; null results as first-class evidence; competing hypotheses without forcing a winner; the Sources Consulted coverage map. Use whenever reporting why code exists, summarising an investigation, writing a postmortem, or presenting findings whose evidence is historical, fragmentary, or secondhand. Triggers on "why was this built", "what's the history", "design rationale", "how confident are we", or any moment the agent is about to present an intent claim it cannot cite.
3
+ description: Calibrate historical or uncertain investigation findings, distinguish evidence from inference, and report source coverage and gaps.
4
4
  ---
5
5
 
6
6
  # Epistemics
7
7
 
8
- Code does not carry its own motivation. A diff shows what changed; nothing in it shows why. Every claim about intent, history, or rationale therefore rests on external evidence — a commit message, a PR description, a decision record, a planning note — and the honesty of a findings report lives in how precisely each claim's evidence is represented.
8
+ Cite evidence for claims about history or intent. Code demonstrates behavior; motivation requires a decision record, commit/PR discussion, source comment, or other relevant evidence. When those are absent, label the inference.
9
9
 
10
- ## The Core Rule
10
+ Use these tiers when they help communicate uncertainty:
11
11
 
12
- > **If you can't cite it, it's inference, not fact — and it must be labeled as such.**
12
+ - **Direct:** a cited explicit statement from a source in a position to know.
13
+ - **Supported:** independent indirect sources converge; explain that support without presenting it as an explicit statement.
14
+ - **Inferred:** a plausible interpretation of evidence; state the inference and what it rests on.
15
+ - **Speculative:** an unresolved hypothesis, separate from established findings.
16
+ - **Unknown:** evidence was unavailable or searches did not resolve the question.
13
17
 
14
- A report that states inferences as facts is not a summary, it is fiction with a confident tone. The calibration below is the product; de-hedging it to sound authoritative is the exact failure this skill exists to prevent.
18
+ Treat the user's suggested explanation as a candidate. Seek evidence that could contradict the leading interpretation. Surface conflicting sources instead of choosing a tidier narrative. Repeated code can reflect convention or copying; it does not establish intent by itself.
15
19
 
16
- ## The Five Tiers
20
+ Distinguish a search with no result from a source that was not searched. A null result means no evidence was found within the stated scope, not that no evidence exists. Report material gaps; do not invent a gap to satisfy a report template.
17
21
 
18
- The tier a claim earns determines **both** which output section it belongs in **and** the vocabulary allowed to phrase it.
22
+ For an investigation report, include a concise **Sources Consulted** summary with relevant queries, coverage, null results, and unavailable sources. Scope source collection to the question; do not require every service or evidence category for every answer. Follow any caller-specified report format.
19
23
 
20
- 1. **Direct** — an explicit statement of intent by someone in a position to know, citable verbatim. Phrase as fact with the citation adjacent.
21
- - A PR description: "Switching to cursor pagination because offset scans time out past 100k rows" (PR #212).
22
- - An ADR title and context section naming the decision and its forcing constraint.
23
- - A `.planning/STATE.md` `## Decisions` line, dated and attributed.
24
- 2. **Supported** — multiple independent indirect sources converge on the same reading. Phrase as fact with all citations, and say the support is convergent, not explicit.
25
- - A commit message names the symptom and the linked issue describes the incident it fixed.
26
- - An inline comment names an upstream constraint and the dependency's changelog confirms it existed at that date.
27
- 3. **Inferred** — one plausible reading of circumstantial evidence. Phrase with hedged vocabulary and show the inference chain: "Given A and B, C is likely because D."
28
- - The retry wrapper landed two days after a revert of the same call site — consistent with a reaction to a production failure, but nothing says so.
29
- 4. **Speculative** — a hypothesis the evidence neither supports nor rules out. Belongs only in a hypotheses section, phrased as a candidate, never in findings.
30
- 5. **Unknown** — the searches ran and came up empty, or the source that would know is unavailable. Reported explicitly, never silently omitted.
31
-
32
- ## Phrasing Guide
33
-
34
- Confidence-carrying words assert knowledge of intent. Each one demands a citation immediately adjacent:
35
-
36
- - "because", "the reason is", "was designed to", "fixes", "the team decided"
37
-
38
- Hedge words mark inference and are the only vocabulary allowed for tier 3:
39
-
40
- - "appears to", "likely", "suggests", "is consistent with", "one reading is"
41
-
42
- Banned words: "obviously", "clearly", "of course", "just". And replace "I think" with "the evidence suggests" — the reader needs the evidence's confidence, not yours.
43
-
44
- ## Never Cite Code as Evidence of Its Own Intent
45
-
46
- Code is mechanics; motivation is external. "The cache exists to reduce latency" cited to the cache implementation is circular — the code proves a cache exists, not why anyone wanted one. A performance rationale needs a source outside the code: a commit message, a benchmark in the PR, a decision record. Without one, it is an Inferred claim wearing a fact's clothes.
47
-
48
- ## Null Results Are Evidence; Skipped Searches Are Blind Spots
49
-
50
- - A **null result** — "searched the review record for pagination discussion across the file's full history; nothing found" — is a data point. It rules readings out and belongs in the report.
51
- - A **skipped search** is a blind spot. It rules nothing out and must be reported as a gap, not dressed up as a null result.
52
-
53
- The reader cannot tell the two apart unless the report distinguishes them. Always state what was searched (queries verbatim) so an empty result is meaningful.
54
-
55
- ## Contradictions Are Findings
56
-
57
- When two sources disagree — the commit message says performance, the linked ticket says a correctness bug — surface both with their citations. Do not pick the tidier narrative, do not average them into a vague middle. The historical record contradicts itself more often than it lies consistently, and the contradiction is usually the most informative thing the investigation found.
58
-
59
- ## The Sycophancy Trap
60
-
61
- When the question embeds a hypothesis — "why did we switch to X, was it performance?" — the embedded guess is a candidate to check independently, not a conclusion to confirm. Search for evidence that would support it AND evidence that would contradict it, at equal effort.
62
-
63
- > **The user's guess is a prompt for investigation, not a conclusion to validate.**
64
-
65
- ## Anti-Rationalization
66
-
67
- - Never retrofit intent: "this must have been for scalability" is storytelling unless a source says so.
68
- - A consistent pattern across files may be a deliberate convention — or copy-paste of the first instance. Investigate the origin, don't infer policy from repetition.
69
- - Absence of evidence is not evidence of absence: "no discussion found" supports "we found no discussion", not "there was no discussion".
70
-
71
- ## The Coverage-Map Contract
72
-
73
- Every findings report ends with a **Sources Consulted** map: one line per evidence category, including the empty ones. A category may be skipped only with a written justification, and only two justifications are valid:
74
-
75
- 1. **Unavailable in this runtime** — the source cannot be searched here. That is a coverage gap, not a choice, and is reported as one.
76
- 2. **Provably irrelevant, not probably.** A build-time script with no runtime path provably cannot appear in runtime error tracking. "It's feature code, error tracking won't have anything" is a probability judgment, not a proof — search it.
77
-
78
- ## Calibration Checklist
79
-
80
- Before finalizing any findings report:
81
-
82
- - Does every factual claim have a citation adjacent to it?
83
- - Is every uncited claim phrased with tier-3 hedge vocabulary and filed in an inference section?
84
- - Is any claim citing code as evidence of its own intent?
85
- - Is the gaps section present and specific? **If no gaps are mentioned, that's suspicious** — every real investigation has them.
86
-
87
- ## Failure Modes
88
-
89
- - **Confident storytelling** — a plausible narrative assembled from mechanics and phrased as history. The most common failure, and the hardest to spot from inside.
90
- - **Citing code as evidence of its own intent** — circular sourcing dressed as citation.
91
- - **Recency bias** — explaining the current shape as one decision when it is an accretion of many. Trace back through the history; the first version's rationale is usually not the current version's.
92
- - **Sycophantic confirmation** — finding only the evidence that agrees with the asker's framing.
93
- - **Skipping the gaps section** — shipping a coverage map with no empties is claiming a completeness no investigation has.
94
-
95
- ## Relationship to verification-gate
96
-
97
- `verification-gate` governs claims about **present** state that a command can prove — run the command, read the output, then claim. Epistemics governs claims about **historical intent** that no command can prove: there is nothing to run, so the discipline is to tier and cite instead. The two compose; neither substitutes for the other.
98
-
99
- One fixed-format carve-out: `verify-work`'s observed/derived/assumed labels and its verdict-first UAT ordering are fixed report formats — epistemics governs historical-intent claims and never rewords those labels or that ordering.
24
+ Use `verification-gate` for present-state claims that can be checked by execution. Preserve `verify-work`'s observed/derived/assumed labels and verdict-first ordering when that command is selected.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: explainers
3
- description: Pick the output form that lets a human understand agent work fastest, and build it from evidence — Mermaid diagrams for relational content, a self-contained HTML explainer for findings worth exploring, the STE register in unslop for procedures, and narrated video reels as a non-core option. Use when a report, review, plan, investigation, or handoff describes structure (dependencies, call paths, data flow, state machines, sequences, timelines, wave order), when the user asks to "draw", "diagram", "visualize", "show me", "explain as HTML", "make an explainer", or "Schaubild", or when prose alone would make the reader rebuild a graph in their head.
3
+ description: Choose prose, a Mermaid diagram, or a self-contained HTML explainer for agent output, built only from cited evidence. Use when output describes dependencies, call paths, sequences or state, or the user asks for a diagram.
4
4
  ---
5
5
 
6
6
  # Explainers
@@ -1,50 +1,20 @@
1
1
  ---
2
2
  name: typescript-discipline
3
- description: TypeScript type-system discipline — make illegal states unrepresentable with discriminated unions, build types constructively instead of guarding loose ones, brand semantic primitives, parse external data once at the boundary and trust types inside, keep functions total and strengthen a type only where partiality appears, make the compiler enforce exhaustiveness. Use when reading or editing any .ts or .tsx file, designing a type or function signature, reviewing a TypeScript diff, or deciding whether an `any`, an `as` cast, or a non-null `!` is acceptable.
3
+ description: Design or review TypeScript domain types, parsing boundaries, and type-safety trade-offs. Use when the task concerns type modeling, unsafe assertions, or exhaustive handling.
4
4
  ---
5
5
 
6
6
  # TypeScript Discipline
7
7
 
8
- The type checker is a proof assistant. Used well, it eliminates impossible states, mismatched primitives, and unhandled variants at compile time; every case the types let you ignore is a runtime failure the compiler could have stopped. Prefer defining errors out of existence over proliferating handlers — unrepresentable states, total functions, and boundary parsing are the tools for that.
8
+ Use types to express the cases callers must handle, with the least complexity that keeps operations correct.
9
9
 
10
- Two layers: the principles below hold in any statically-typed language; the rule table and `./references/patterns.md` ground them in TypeScript syntax.
10
+ - Model mutually exclusive states with discriminated unions. Enforce exhaustive handling so adding a variant reveals missing cases.
11
+ - Parse external data from `unknown` at the boundary into a named type. Keep business logic typed and avoid repeating already-established validation inside it.
12
+ - Prefer constructive representations when they remove invalid combinations. A non-empty tuple proves a head exists; it does not prove an arbitrary numeric index is in bounds.
13
+ - Strengthen a type where an operation requires it. An empty list is valid input for a sum; a head operation must require non-empty input or return an optional result.
14
+ - Brand primitives when mixing their meanings is a plausible defect. Match the project's brand convention and validate at construction.
15
+ - Avoid `any`, unchecked `as`, and non-null assertions. Narrow, validate, or revise the model; isolate and explain an assertion that the compiler cannot express.
16
+ - Derive shapes from authoritative schemas and existing types. Use `satisfies` to check a value against a type without a type assertion.
17
+ - Type predicates must check their full claim. A named guard is not evidence that its implementation is sound.
18
+ - Use named object arguments when they prevent confusion; follow existing APIs and consider allocation-sensitive paths.
11
19
 
12
- ## Principles
13
-
14
- - **Make illegal states unrepresentable.** Model variants as a discriminated union, not as a bag of optional fields where contradictory combinations compile. The canonical anti-pattern: `{ completed: boolean; completedAt?: Date }` admits `completed: true` with `completedAt: undefined`, which means nothing. Derive the boolean from a single source (`completedAt !== null`) or model the variants explicitly: `{ kind: 'open' } | { kind: 'done'; at: Date }`. If a bug ever forces the question "wait, can this combination actually happen?", the type is too loose.
15
- - **Types are constructions, not restrictions.** Build the type up from the values you want instead of carving them out of a looser type with runtime checks. A non-empty list is a head plus a rest, not a list with a length check. A valid time range is a start plus a duration, not two timestamps you must keep ordered. No representation is privileged — pick the shape that cannot build the illegal value, then expose the interface callers need on top of it.
16
- - **Brand semantic primitives.** A `UserId` and an `OrderId` are both strings underneath but must not be interchangeable. Brand them, validate once at creation, trust the type downstream.
17
- - **External data is untyped until parsed.** RPC payloads, JSON, CLI args, config files, environment variables, database rows: each gets a parse function at the boundary that turns unstructured input into the typed domain model. Validation lives at that boundary, once — inside the system there is typed data, no re-validation deep in call chains, and business logic in pure functions the boundary shell calls.
18
- - **Don't lie to the compiler.** Casts and assertions that bypass the checker are runtime crashes waiting to happen. If the compiler can't prove a fact, prove it — validate, narrow, refine the model — or accept that the cast is a hazard you are choosing to carry. The cast buried today is the postmortem written next week.
19
- - **Exhaustive matching is the compiler's job.** A match over a sum type must fail compilation when a new variant is added without a case, so the compiler tells the next author every place that needs updating.
20
- - **Derive types from authoritative schemas.** When a protocol buffer, OpenAPI spec, GraphQL schema, or database migration already defines a shape, derive from it instead of hand-rolling a parallel type. Manual duplication drifts.
21
- - **Strengthen a type only where partiality appears.** A runtime assertion, a null check, or a "should never happen" throw marks the spot where a type is too weak — push that check up into the type, then stop. The type system's job is to track the cases each use site must handle, not to describe the data as precisely as possible. `sum` of an empty list is 0, so it takes the plain list; `head` of an empty list has no answer, so it demands the non-empty one. Extra precision beyond totality costs reuse and ceremony and buys no safety.
22
-
23
- ## Rules (TypeScript syntax)
24
-
25
- | Rule | Summary |
26
- |------|---------|
27
- | Discriminated unions | Model variants with a `kind` literal discriminant so impossible states can't be represented. No optional-field bags. |
28
- | Branded types | Brand primitives with `& { readonly __brand: "X" }` so they can't be mixed up. Validate once at creation. |
29
- | Constructive modeling | Build the shape so the illegal value can't be constructed: `[T, ...T[]]` for non-empty, `[T, T][]` for even length, `start` plus `duration` for a range. Not a runtime guard, not a wish for refinement types. |
30
- | Simplest total type | Keep `T[]` while every operation on it stays total. Strengthen to a non-empty type only where the loose type forces a `!`, a cast, or a "should never happen" throw. |
31
- | `unknown` over `any` | External data is `unknown`. `any` disables type checking everywhere it touches. |
32
- | No `as` casts | Every `as` is a potential runtime crash. Cast only after validation has earned it. |
33
- | Narrowing hierarchy | Discriminant switch > `in` operator > `typeof`/`instanceof` > user-defined type guard > `as`. |
34
- | Type guards | Must verify the claim. A lying guard is worse than `as` — the bug hides behind a name that says it's safe. Name them `isX` or `hasX`. |
35
- | Exhaustiveness | Assign to a `never`-typed local in default arms so the compiler errors when a new variant is added. |
36
- | `satisfies` over `as` | Validates the value without widening literal types. |
37
- | Boundary validation | Parse where data crosses in — into a named domain type, once. `Record<string, unknown>` (however spelled) stops at that parse. Inside: trust the types, no redundant re-validation, logic in pure functions the boundary shell calls. |
38
- | Schema-derived types | Reach for `Pick`/`Omit`/`Parameters`/`ReturnType`/`Awaited`/`typeof` before declaring a new interface. |
39
- | Object args | Pass objects, not positional arguments, so call sites are self-documenting. Skip on hot paths (per-frame render, tokenizers, parsers). |
40
-
41
- Worked don't/do examples for every rule: `./references/patterns.md`.
42
-
43
- ## Self-Checks
44
-
45
- - "Can I write a comment explaining when this combination of fields is valid?" If yes, the type is too loose — split it into a discriminated union.
46
- - "Do two function arguments share a primitive type but mean different things?" Brand them.
47
- - "Where did this `any`, this `as`, this `!` come from?" Trace it to the boundary and validate there instead.
48
- - "If a new variant is added next month, will the compiler point at every place that needs a case?" If not, the match isn't exhaustive.
49
- - "Is this type duplicating a shape another file or schema owns?" Derive instead.
50
- - "Am I strengthening this type to keep an operation total, or just to be more precise?" If nothing would otherwise throw, keep the plain type.
20
+ See [boundary and totality patterns](./references/patterns.md) for the cases that commonly need care. Follow repository rules on imports and type definitions; consult installed dependency declarations rather than guessing external APIs.