@draht/coding-agent 2026.7.30 → 2026.9.5-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 (459) hide show
  1. package/CHANGELOG.md +154 -0
  2. package/README.md +46 -2
  3. package/agents/debugger.md +12 -1
  4. package/agents/git-committer.md +1 -0
  5. package/agents/implementer.md +20 -0
  6. package/agents/investigator.md +75 -0
  7. package/agents/reviewer.md +7 -0
  8. package/agents/spec-reviewer.md +66 -0
  9. package/agents/verifier.md +4 -3
  10. package/bin/draht-tools.cjs +472 -41
  11. package/dist/agents/debugger.md +12 -1
  12. package/dist/agents/git-committer.md +1 -0
  13. package/dist/agents/implementer.md +20 -0
  14. package/dist/agents/investigator.md +75 -0
  15. package/dist/agents/reviewer.md +7 -0
  16. package/dist/agents/spec-reviewer.md +66 -0
  17. package/dist/agents/verifier.md +4 -3
  18. package/dist/cli/args.d.ts +10 -0
  19. package/dist/cli/args.d.ts.map +1 -1
  20. package/dist/cli/args.js +69 -2
  21. package/dist/cli/args.js.map +1 -1
  22. package/dist/cli/attach-mode.d.ts +61 -0
  23. package/dist/cli/attach-mode.d.ts.map +1 -1
  24. package/dist/cli/attach-mode.js +243 -5
  25. package/dist/cli/attach-mode.js.map +1 -1
  26. package/dist/cli/credential-print.d.ts +1 -1
  27. package/dist/cli/credential-print.d.ts.map +1 -1
  28. package/dist/cli/credential-print.js +5 -4
  29. package/dist/cli/credential-print.js.map +1 -1
  30. package/dist/config.d.ts +9 -0
  31. package/dist/config.d.ts.map +1 -1
  32. package/dist/config.js +31 -4
  33. package/dist/config.js.map +1 -1
  34. package/dist/core/agent-session-runtime.d.ts +17 -1
  35. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  36. package/dist/core/agent-session-runtime.js +87 -30
  37. package/dist/core/agent-session-runtime.js.map +1 -1
  38. package/dist/core/agent-session-services.d.ts +1 -1
  39. package/dist/core/agent-session-services.d.ts.map +1 -1
  40. package/dist/core/agent-session-services.js +1 -0
  41. package/dist/core/agent-session-services.js.map +1 -1
  42. package/dist/core/agent-session.d.ts +35 -16
  43. package/dist/core/agent-session.d.ts.map +1 -1
  44. package/dist/core/agent-session.js +149 -64
  45. package/dist/core/agent-session.js.map +1 -1
  46. package/dist/core/auth-storage.d.ts +5 -1
  47. package/dist/core/auth-storage.d.ts.map +1 -1
  48. package/dist/core/auth-storage.js +72 -15
  49. package/dist/core/auth-storage.js.map +1 -1
  50. package/dist/core/builtins/checkpoints.d.ts +20 -0
  51. package/dist/core/builtins/checkpoints.d.ts.map +1 -0
  52. package/dist/core/builtins/checkpoints.js +161 -0
  53. package/dist/core/builtins/checkpoints.js.map +1 -0
  54. package/dist/core/builtins/duet.d.ts +26 -0
  55. package/dist/core/builtins/duet.d.ts.map +1 -0
  56. package/dist/core/builtins/duet.js +660 -0
  57. package/dist/core/builtins/duet.js.map +1 -0
  58. package/dist/core/builtins/index.d.ts.map +1 -1
  59. package/dist/core/builtins/index.js +7 -1
  60. package/dist/core/builtins/index.js.map +1 -1
  61. package/dist/core/builtins/subagent.d.ts +24 -4
  62. package/dist/core/builtins/subagent.d.ts.map +1 -1
  63. package/dist/core/builtins/subagent.js +278 -35
  64. package/dist/core/builtins/subagent.js.map +1 -1
  65. package/dist/core/checkpoints/checkpoint-cli.d.ts +17 -0
  66. package/dist/core/checkpoints/checkpoint-cli.d.ts.map +1 -0
  67. package/dist/core/checkpoints/checkpoint-cli.js +78 -0
  68. package/dist/core/checkpoints/checkpoint-cli.js.map +1 -0
  69. package/dist/core/checkpoints/checkpoint-manager.d.ts +294 -0
  70. package/dist/core/checkpoints/checkpoint-manager.d.ts.map +1 -0
  71. package/dist/core/checkpoints/checkpoint-manager.js +865 -0
  72. package/dist/core/checkpoints/checkpoint-manager.js.map +1 -0
  73. package/dist/core/checkpoints/rewind.d.ts +141 -0
  74. package/dist/core/checkpoints/rewind.d.ts.map +1 -0
  75. package/dist/core/checkpoints/rewind.js +246 -0
  76. package/dist/core/checkpoints/rewind.js.map +1 -0
  77. package/dist/core/compaction/branch-summarization.d.ts +1 -1
  78. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  79. package/dist/core/compaction/branch-summarization.js +9 -4
  80. package/dist/core/compaction/branch-summarization.js.map +1 -1
  81. package/dist/core/compaction/compaction.d.ts +5 -0
  82. package/dist/core/compaction/compaction.d.ts.map +1 -1
  83. package/dist/core/compaction/compaction.js +25 -4
  84. package/dist/core/compaction/compaction.js.map +1 -1
  85. package/dist/core/extensions/index.d.ts +1 -1
  86. package/dist/core/extensions/index.d.ts.map +1 -1
  87. package/dist/core/extensions/index.js.map +1 -1
  88. package/dist/core/extensions/loader.d.ts.map +1 -1
  89. package/dist/core/extensions/loader.js +83 -20
  90. package/dist/core/extensions/loader.js.map +1 -1
  91. package/dist/core/extensions/runner.d.ts +13 -2
  92. package/dist/core/extensions/runner.d.ts.map +1 -1
  93. package/dist/core/extensions/runner.js +37 -2
  94. package/dist/core/extensions/runner.js.map +1 -1
  95. package/dist/core/extensions/types.d.ts +189 -6
  96. package/dist/core/extensions/types.d.ts.map +1 -1
  97. package/dist/core/extensions/types.js.map +1 -1
  98. package/dist/core/http-dispatcher.d.ts.map +1 -1
  99. package/dist/core/http-dispatcher.js +7 -0
  100. package/dist/core/http-dispatcher.js.map +1 -1
  101. package/dist/core/index.d.ts +1 -1
  102. package/dist/core/index.d.ts.map +1 -1
  103. package/dist/core/index.js.map +1 -1
  104. package/dist/core/keybindings.d.ts +5 -0
  105. package/dist/core/keybindings.d.ts.map +1 -1
  106. package/dist/core/keybindings.js +1 -0
  107. package/dist/core/keybindings.js.map +1 -1
  108. package/dist/core/model-registry.d.ts +3 -2
  109. package/dist/core/model-registry.d.ts.map +1 -1
  110. package/dist/core/model-registry.js +8 -8
  111. package/dist/core/model-registry.js.map +1 -1
  112. package/dist/core/model-resolver.d.ts.map +1 -1
  113. package/dist/core/model-resolver.js +34 -7
  114. package/dist/core/model-resolver.js.map +1 -1
  115. package/dist/core/model-runtime.d.ts +7 -1
  116. package/dist/core/model-runtime.d.ts.map +1 -1
  117. package/dist/core/model-runtime.js +30 -10
  118. package/dist/core/model-runtime.js.map +1 -1
  119. package/dist/core/multi-agent/permission-gate.d.ts.map +1 -1
  120. package/dist/core/multi-agent/permission-gate.js +4 -3
  121. package/dist/core/multi-agent/permission-gate.js.map +1 -1
  122. package/dist/core/multi-agent/worktree.d.ts +2 -0
  123. package/dist/core/multi-agent/worktree.d.ts.map +1 -1
  124. package/dist/core/multi-agent/worktree.js +2 -2
  125. package/dist/core/multi-agent/worktree.js.map +1 -1
  126. package/dist/core/package-manager.d.ts +7 -1
  127. package/dist/core/package-manager.d.ts.map +1 -1
  128. package/dist/core/package-manager.js +21 -44
  129. package/dist/core/package-manager.js.map +1 -1
  130. package/dist/core/permission-relay/index.d.ts +19 -0
  131. package/dist/core/permission-relay/index.d.ts.map +1 -0
  132. package/dist/core/permission-relay/index.js +49 -0
  133. package/dist/core/permission-relay/index.js.map +1 -0
  134. package/dist/core/permission-relay/relay-ui-context.d.ts +39 -0
  135. package/dist/core/permission-relay/relay-ui-context.d.ts.map +1 -0
  136. package/dist/core/permission-relay/relay-ui-context.js +788 -0
  137. package/dist/core/permission-relay/relay-ui-context.js.map +1 -0
  138. package/dist/core/permission-relay/types.d.ts +222 -0
  139. package/dist/core/permission-relay/types.d.ts.map +1 -0
  140. package/dist/core/permission-relay/types.js +15 -0
  141. package/dist/core/permission-relay/types.js.map +1 -0
  142. package/dist/core/pi-manifest.d.ts +14 -0
  143. package/dist/core/pi-manifest.d.ts.map +1 -0
  144. package/dist/core/pi-manifest.js +35 -0
  145. package/dist/core/pi-manifest.js.map +1 -0
  146. package/dist/core/project-trust.js +2 -2
  147. package/dist/core/project-trust.js.map +1 -1
  148. package/dist/core/resource-loader.d.ts +21 -0
  149. package/dist/core/resource-loader.d.ts.map +1 -1
  150. package/dist/core/resource-loader.js +101 -24
  151. package/dist/core/resource-loader.js.map +1 -1
  152. package/dist/core/sandbox/bash-operations.d.ts +149 -0
  153. package/dist/core/sandbox/bash-operations.d.ts.map +1 -0
  154. package/dist/core/sandbox/bash-operations.js +163 -0
  155. package/dist/core/sandbox/bash-operations.js.map +1 -0
  156. package/dist/core/sandbox/env.d.ts +83 -0
  157. package/dist/core/sandbox/env.d.ts.map +1 -0
  158. package/dist/core/sandbox/env.js +123 -0
  159. package/dist/core/sandbox/env.js.map +1 -0
  160. package/dist/core/sandbox/executor.d.ts +104 -0
  161. package/dist/core/sandbox/executor.d.ts.map +1 -0
  162. package/dist/core/sandbox/executor.js +92 -0
  163. package/dist/core/sandbox/executor.js.map +1 -0
  164. package/dist/core/sandbox/index.d.ts +36 -0
  165. package/dist/core/sandbox/index.d.ts.map +1 -0
  166. package/dist/core/sandbox/index.js +36 -0
  167. package/dist/core/sandbox/index.js.map +1 -0
  168. package/dist/core/sandbox/linux.d.ts +121 -0
  169. package/dist/core/sandbox/linux.d.ts.map +1 -0
  170. package/dist/core/sandbox/linux.js +260 -0
  171. package/dist/core/sandbox/linux.js.map +1 -0
  172. package/dist/core/sandbox/policy.d.ts +142 -0
  173. package/dist/core/sandbox/policy.d.ts.map +1 -0
  174. package/dist/core/sandbox/policy.js +297 -0
  175. package/dist/core/sandbox/policy.js.map +1 -0
  176. package/dist/core/sandbox/real-path.d.ts +112 -0
  177. package/dist/core/sandbox/real-path.d.ts.map +1 -0
  178. package/dist/core/sandbox/real-path.js +158 -0
  179. package/dist/core/sandbox/real-path.js.map +1 -0
  180. package/dist/core/sandbox/seatbelt-profile.d.ts +95 -0
  181. package/dist/core/sandbox/seatbelt-profile.d.ts.map +1 -0
  182. package/dist/core/sandbox/seatbelt-profile.js +239 -0
  183. package/dist/core/sandbox/seatbelt-profile.js.map +1 -0
  184. package/dist/core/sandbox/seatbelt.d.ts +95 -0
  185. package/dist/core/sandbox/seatbelt.d.ts.map +1 -0
  186. package/dist/core/sandbox/seatbelt.js +154 -0
  187. package/dist/core/sandbox/seatbelt.js.map +1 -0
  188. package/dist/core/sandbox/self-test.d.ts +109 -0
  189. package/dist/core/sandbox/self-test.d.ts.map +1 -0
  190. package/dist/core/sandbox/self-test.js +369 -0
  191. package/dist/core/sandbox/self-test.js.map +1 -0
  192. package/dist/core/sandbox/spawn.d.ts +33 -0
  193. package/dist/core/sandbox/spawn.d.ts.map +1 -0
  194. package/dist/core/sandbox/spawn.js +87 -0
  195. package/dist/core/sandbox/spawn.js.map +1 -0
  196. package/dist/core/sdk.d.ts.map +1 -1
  197. package/dist/core/sdk.js +3 -1
  198. package/dist/core/sdk.js.map +1 -1
  199. package/dist/core/session-manager.d.ts +60 -1
  200. package/dist/core/session-manager.d.ts.map +1 -1
  201. package/dist/core/session-manager.js +53 -6
  202. package/dist/core/session-manager.js.map +1 -1
  203. package/dist/core/settings-manager.d.ts +21 -0
  204. package/dist/core/settings-manager.d.ts.map +1 -1
  205. package/dist/core/settings-manager.js +36 -16
  206. package/dist/core/settings-manager.js.map +1 -1
  207. package/dist/core/skills.d.ts +3 -1
  208. package/dist/core/skills.d.ts.map +1 -1
  209. package/dist/core/skills.js +19 -6
  210. package/dist/core/skills.js.map +1 -1
  211. package/dist/core/slash-commands.d.ts.map +1 -1
  212. package/dist/core/slash-commands.js +1 -0
  213. package/dist/core/slash-commands.js.map +1 -1
  214. package/dist/core/soak/soak-log.d.ts +298 -0
  215. package/dist/core/soak/soak-log.d.ts.map +1 -0
  216. package/dist/core/soak/soak-log.js +660 -0
  217. package/dist/core/soak/soak-log.js.map +1 -0
  218. package/dist/core/soak/soak-reader.d.ts +60 -0
  219. package/dist/core/soak/soak-reader.d.ts.map +1 -0
  220. package/dist/core/soak/soak-reader.js +106 -0
  221. package/dist/core/soak/soak-reader.js.map +1 -0
  222. package/dist/core/socket-server/discovery.d.ts +78 -1
  223. package/dist/core/socket-server/discovery.d.ts.map +1 -1
  224. package/dist/core/socket-server/discovery.js +356 -37
  225. package/dist/core/socket-server/discovery.js.map +1 -1
  226. package/dist/core/socket-server/index.d.ts +10 -4
  227. package/dist/core/socket-server/index.d.ts.map +1 -1
  228. package/dist/core/socket-server/index.js +6 -3
  229. package/dist/core/socket-server/index.js.map +1 -1
  230. package/dist/core/socket-server/permission-delivery.d.ts +125 -0
  231. package/dist/core/socket-server/permission-delivery.d.ts.map +1 -0
  232. package/dist/core/socket-server/permission-delivery.js +152 -0
  233. package/dist/core/socket-server/permission-delivery.js.map +1 -0
  234. package/dist/core/socket-server/permission-registry.d.ts +301 -0
  235. package/dist/core/socket-server/permission-registry.d.ts.map +1 -0
  236. package/dist/core/socket-server/permission-registry.js +410 -0
  237. package/dist/core/socket-server/permission-registry.js.map +1 -0
  238. package/dist/core/socket-server/permission-relay.d.ts +81 -0
  239. package/dist/core/socket-server/permission-relay.d.ts.map +1 -0
  240. package/dist/core/socket-server/permission-relay.js +528 -0
  241. package/dist/core/socket-server/permission-relay.js.map +1 -0
  242. package/dist/core/socket-server/safe-text.d.ts +83 -0
  243. package/dist/core/socket-server/safe-text.d.ts.map +1 -0
  244. package/dist/core/socket-server/safe-text.js +277 -0
  245. package/dist/core/socket-server/safe-text.js.map +1 -0
  246. package/dist/core/socket-server/session-integration.d.ts +65 -2
  247. package/dist/core/socket-server/session-integration.d.ts.map +1 -1
  248. package/dist/core/socket-server/session-integration.js +434 -32
  249. package/dist/core/socket-server/session-integration.js.map +1 -1
  250. package/dist/core/socket-server/socket-client.d.ts +21 -2
  251. package/dist/core/socket-server/socket-client.d.ts.map +1 -1
  252. package/dist/core/socket-server/socket-client.js +52 -1
  253. package/dist/core/socket-server/socket-client.js.map +1 -1
  254. package/dist/core/socket-server/socket-server.d.ts +152 -1
  255. package/dist/core/socket-server/socket-server.d.ts.map +1 -1
  256. package/dist/core/socket-server/socket-server.js +775 -26
  257. package/dist/core/socket-server/socket-server.js.map +1 -1
  258. package/dist/core/socket-server/types.d.ts +106 -2
  259. package/dist/core/socket-server/types.d.ts.map +1 -1
  260. package/dist/core/socket-server/types.js +13 -1
  261. package/dist/core/socket-server/types.js.map +1 -1
  262. package/dist/core/system-prompt.d.ts.map +1 -1
  263. package/dist/core/system-prompt.js +8 -9
  264. package/dist/core/system-prompt.js.map +1 -1
  265. package/dist/core/tools/bash.d.ts +1 -1
  266. package/dist/core/tools/bash.d.ts.map +1 -1
  267. package/dist/core/tools/bash.js +5 -2
  268. package/dist/core/tools/bash.js.map +1 -1
  269. package/dist/core/tools/edit.d.ts.map +1 -1
  270. package/dist/core/tools/edit.js +17 -2
  271. package/dist/core/tools/edit.js.map +1 -1
  272. package/dist/core/tools/find.d.ts +3 -0
  273. package/dist/core/tools/find.d.ts.map +1 -1
  274. package/dist/core/tools/find.js +11 -18
  275. package/dist/core/tools/find.js.map +1 -1
  276. package/dist/core/trust-manager.d.ts +6 -4
  277. package/dist/core/trust-manager.d.ts.map +1 -1
  278. package/dist/core/trust-manager.js +55 -21
  279. package/dist/core/trust-manager.js.map +1 -1
  280. package/dist/extensions/index.d.ts.map +1 -1
  281. package/dist/extensions/index.js +5 -1
  282. package/dist/extensions/index.js.map +1 -1
  283. package/dist/extensions/llama/provider.d.ts.map +1 -1
  284. package/dist/extensions/llama/provider.js +5 -1
  285. package/dist/extensions/llama/provider.js.map +1 -1
  286. package/dist/extensions/stub-provider/index.d.ts +9 -0
  287. package/dist/extensions/stub-provider/index.d.ts.map +1 -0
  288. package/dist/extensions/stub-provider/index.js +13 -0
  289. package/dist/extensions/stub-provider/index.js.map +1 -0
  290. package/dist/extensions/stub-provider/provider.d.ts +77 -0
  291. package/dist/extensions/stub-provider/provider.d.ts.map +1 -0
  292. package/dist/extensions/stub-provider/provider.js +193 -0
  293. package/dist/extensions/stub-provider/provider.js.map +1 -0
  294. package/dist/hooks/gsd/draht-quality-gate.js +3 -3
  295. package/dist/index.d.ts +1 -1
  296. package/dist/index.d.ts.map +1 -1
  297. package/dist/index.js.map +1 -1
  298. package/dist/main.d.ts.map +1 -1
  299. package/dist/main.js +242 -45
  300. package/dist/main.js.map +1 -1
  301. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  302. package/dist/modes/interactive/components/config-selector.js +3 -2
  303. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  304. package/dist/modes/interactive/components/extension-selector.d.ts +49 -0
  305. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  306. package/dist/modes/interactive/components/extension-selector.js +202 -5
  307. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  308. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  309. package/dist/modes/interactive/components/session-selector.js +10 -2
  310. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  311. package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
  312. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  313. package/dist/modes/interactive/components/settings-selector.js +10 -0
  314. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  315. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  316. package/dist/modes/interactive/components/tool-execution.js +10 -1
  317. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  318. package/dist/modes/interactive/components/tree-selector.d.ts +20 -2
  319. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  320. package/dist/modes/interactive/components/tree-selector.js +21 -5
  321. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  322. package/dist/modes/interactive/interactive-mode.d.ts +97 -3
  323. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  324. package/dist/modes/interactive/interactive-mode.js +394 -24
  325. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  326. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  327. package/dist/modes/rpc/rpc-mode.js +165 -7
  328. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  329. package/dist/modes/rpc/rpc-types.d.ts +68 -1
  330. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  331. package/dist/modes/rpc/rpc-types.js.map +1 -1
  332. package/dist/prompts/commands/atomic-commit.md +1 -12
  333. package/dist/prompts/commands/brainstorm.md +12 -15
  334. package/dist/prompts/commands/create-verification-skill.md +108 -0
  335. package/dist/prompts/commands/discuss-phase.md +3 -14
  336. package/dist/prompts/commands/execute-phase.md +3 -11
  337. package/dist/prompts/commands/fix.md +41 -18
  338. package/dist/prompts/commands/grill.md +66 -0
  339. package/dist/prompts/commands/init-project.md +5 -15
  340. package/dist/prompts/commands/map-codebase.md +1 -13
  341. package/dist/prompts/commands/new-project.md +5 -15
  342. package/dist/prompts/commands/next-milestone.md +1 -13
  343. package/dist/prompts/commands/orchestrate.md +1 -1
  344. package/dist/prompts/commands/pause-work.md +1 -13
  345. package/dist/prompts/commands/plan-phase.md +2 -11
  346. package/dist/prompts/commands/progress.md +0 -13
  347. package/dist/prompts/commands/quick.md +3 -11
  348. package/dist/prompts/commands/resolve-conflicts.md +71 -0
  349. package/dist/prompts/commands/resume-work.md +0 -13
  350. package/dist/prompts/commands/review.md +4 -13
  351. package/dist/prompts/commands/triage.md +159 -0
  352. package/dist/prompts/commands/verify-work.md +4 -14
  353. package/dist/prompts/commands/why.md +135 -0
  354. package/dist/skills/atomic-reasoning/SKILL.md +115 -0
  355. package/dist/skills/blast-radius/SKILL.md +55 -0
  356. package/dist/skills/epistemics/SKILL.md +99 -0
  357. package/dist/skills/hexagon-animation/SKILL.md +49 -0
  358. package/dist/skills/hexagon-animation/generate.mjs +81 -0
  359. package/dist/skills/hexagon-animation/template.html +361 -0
  360. package/dist/skills/typescript-discipline/SKILL.md +50 -0
  361. package/dist/skills/typescript-discipline/references/patterns.md +294 -0
  362. package/dist/skills/unslop/SKILL.md +101 -0
  363. package/dist/utils/canonical-path.d.ts +28 -0
  364. package/dist/utils/canonical-path.d.ts.map +1 -0
  365. package/dist/utils/canonical-path.js +90 -0
  366. package/dist/utils/canonical-path.js.map +1 -0
  367. package/dist/utils/child-process.d.ts +12 -1
  368. package/dist/utils/child-process.d.ts.map +1 -1
  369. package/dist/utils/child-process.js +25 -8
  370. package/dist/utils/child-process.js.map +1 -1
  371. package/dist/utils/clipboard.d.ts +1 -1
  372. package/dist/utils/clipboard.d.ts.map +1 -1
  373. package/dist/utils/clipboard.js +22 -2
  374. package/dist/utils/clipboard.js.map +1 -1
  375. package/dist/utils/exif-orientation.d.ts.map +1 -1
  376. package/dist/utils/exif-orientation.js +2 -3
  377. package/dist/utils/exif-orientation.js.map +1 -1
  378. package/dist/utils/paths.d.ts +2 -7
  379. package/dist/utils/paths.d.ts.map +1 -1
  380. package/dist/utils/paths.js +13 -15
  381. package/dist/utils/paths.js.map +1 -1
  382. package/dist/utils/shell.d.ts.map +1 -1
  383. package/dist/utils/shell.js +6 -4
  384. package/dist/utils/shell.js.map +1 -1
  385. package/dist/utils/tools-manager.d.ts.map +1 -1
  386. package/dist/utils/tools-manager.js +3 -5
  387. package/dist/utils/tools-manager.js.map +1 -1
  388. package/docs/attachable-sessions.md +79 -0
  389. package/docs/compaction.md +21 -21
  390. package/docs/containerization.md +23 -23
  391. package/docs/custom-provider.md +16 -16
  392. package/docs/development.md +9 -9
  393. package/docs/docs.json +6 -2
  394. package/docs/duet.md +42 -0
  395. package/docs/extensions.md +58 -58
  396. package/docs/index.md +10 -10
  397. package/docs/json.md +7 -7
  398. package/docs/keybindings.md +6 -5
  399. package/docs/llama-cpp.md +6 -6
  400. package/docs/models.md +6 -6
  401. package/docs/packages.md +43 -43
  402. package/docs/prompt-templates.md +4 -4
  403. package/docs/providers.md +12 -12
  404. package/docs/quickstart.md +32 -32
  405. package/docs/rpc.md +83 -12
  406. package/docs/sdk.md +15 -15
  407. package/docs/security.md +18 -18
  408. package/docs/session-format.md +35 -13
  409. package/docs/sessions.md +17 -14
  410. package/docs/settings.md +25 -18
  411. package/docs/shell-aliases.md +2 -2
  412. package/docs/skills.md +12 -11
  413. package/docs/terminal-setup.md +12 -12
  414. package/docs/termux.md +6 -6
  415. package/docs/themes.md +11 -11
  416. package/docs/tmux.md +4 -4
  417. package/docs/tui.md +5 -5
  418. package/docs/usage.md +50 -50
  419. package/docs/windows.md +2 -2
  420. package/examples/extensions/overlay-qa-tests.ts +3 -3
  421. package/hooks/gsd/draht-quality-gate.js +3 -3
  422. package/package.json +11 -10
  423. package/prompts/commands/atomic-commit.md +1 -12
  424. package/prompts/commands/brainstorm.md +12 -15
  425. package/prompts/commands/create-verification-skill.md +108 -0
  426. package/prompts/commands/discuss-phase.md +3 -14
  427. package/prompts/commands/execute-phase.md +3 -11
  428. package/prompts/commands/fix.md +41 -18
  429. package/prompts/commands/grill.md +66 -0
  430. package/prompts/commands/init-project.md +5 -15
  431. package/prompts/commands/map-codebase.md +1 -13
  432. package/prompts/commands/new-project.md +5 -15
  433. package/prompts/commands/next-milestone.md +1 -13
  434. package/prompts/commands/orchestrate.md +1 -1
  435. package/prompts/commands/pause-work.md +1 -13
  436. package/prompts/commands/plan-phase.md +2 -11
  437. package/prompts/commands/progress.md +0 -13
  438. package/prompts/commands/quick.md +3 -11
  439. package/prompts/commands/resolve-conflicts.md +71 -0
  440. package/prompts/commands/resume-work.md +0 -13
  441. package/prompts/commands/review.md +4 -13
  442. package/prompts/commands/triage.md +159 -0
  443. package/prompts/commands/verify-work.md +4 -14
  444. package/prompts/commands/why.md +135 -0
  445. package/skills/atomic-reasoning/SKILL.md +115 -0
  446. package/skills/blast-radius/SKILL.md +55 -0
  447. package/skills/epistemics/SKILL.md +99 -0
  448. package/skills/hexagon-animation/SKILL.md +49 -0
  449. package/skills/hexagon-animation/generate.mjs +81 -0
  450. package/skills/hexagon-animation/template.html +361 -0
  451. package/skills/typescript-discipline/SKILL.md +50 -0
  452. package/skills/typescript-discipline/references/patterns.md +294 -0
  453. package/skills/unslop/SKILL.md +101 -0
  454. package/dist/prompts/agents/build.md +0 -86
  455. package/dist/prompts/agents/plan.md +0 -79
  456. package/dist/prompts/agents/verify.md +0 -69
  457. package/prompts/agents/build.md +0 -86
  458. package/prompts/agents/plan.md +0 -79
  459. package/prompts/agents/verify.md +0 -69
package/docs/usage.md CHANGED
@@ -1,4 +1,4 @@
1
- # Using Pi
1
+ # Using draht
2
2
 
3
3
  This page collects day-to-day usage details that do not fit on the quickstart page.
4
4
 
@@ -55,7 +55,7 @@ Type `/` in the editor to open command completion. Extensions can register custo
55
55
  | `/reload` | Reload keybindings, extensions, skills, prompts, themes, and context files |
56
56
  | `/hotkeys` | Show all keyboard shortcuts |
57
57
  | `/changelog` | Display version history |
58
- | `/quit` | Quit pi |
58
+ | `/quit` | Quit draht |
59
59
 
60
60
  ## Message Queue
61
61
 
@@ -66,21 +66,21 @@ You can submit messages while the agent is still working:
66
66
  - **Escape** aborts and restores queued messages to the editor.
67
67
  - **Alt+Up** retrieves queued messages back to the editor.
68
68
 
69
- On Windows Terminal, Alt+Enter is fullscreen by default. Remap it as described in [Terminal setup](terminal-setup.md) if you want pi to receive the shortcut.
69
+ On Windows Terminal, Alt+Enter is fullscreen by default. Remap it as described in [Terminal setup](terminal-setup.md) if you want draht to receive the shortcut.
70
70
 
71
71
  Configure delivery in [Settings](settings.md) with `steeringMode` and `followUpMode`.
72
72
 
73
73
  ## Sessions
74
74
 
75
- Sessions are saved automatically to `~/.pi/agent/sessions/`, organized by working directory.
75
+ Sessions are saved automatically to `~/.draht/agent/sessions/`, organized by working directory.
76
76
 
77
77
  ```bash
78
- pi -c # Continue most recent session
79
- pi -r # Browse and select a session
80
- pi --no-session # Ephemeral mode; do not save
81
- pi --name "my task" # Set session display name at startup
82
- pi --session <path|id> # Use a specific session file or session ID
83
- pi --fork <path|id> # Fork a session into a new session file
78
+ draht -c # Continue most recent session
79
+ draht -r # Browse and select a session
80
+ draht --no-session # Ephemeral mode; do not save
81
+ draht --name "my task" # Set session display name at startup
82
+ draht --session <path|id> # Use a specific session file or session ID
83
+ draht --fork <path|id> # Fork a session into a new session file
84
84
  ```
85
85
 
86
86
  Useful session commands:
@@ -95,9 +95,9 @@ See [Sessions](sessions.md) and [Compaction](compaction.md) for details.
95
95
 
96
96
  ## Context Files
97
97
 
98
- Pi loads `AGENTS.md` or `CLAUDE.md` at startup from:
98
+ draht loads `AGENTS.md` or `CLAUDE.md` at startup from:
99
99
 
100
- - `~/.pi/agent/AGENTS.md` for global instructions
100
+ - `~/.draht/agent/AGENTS.md` for global instructions
101
101
  - parent directories, walking up from the current working directory
102
102
  - the current directory
103
103
 
@@ -107,24 +107,24 @@ Use context files for project conventions, commands, safety rules, and preferenc
107
107
 
108
108
  Replace the default system prompt with:
109
109
 
110
- - `.pi/SYSTEM.md` for a project
111
- - `~/.pi/agent/SYSTEM.md` globally
110
+ - `.draht/SYSTEM.md` for a project
111
+ - `~/.draht/agent/SYSTEM.md` globally
112
112
 
113
113
  Append to the default prompt without replacing it with `APPEND_SYSTEM.md` in either location.
114
114
 
115
115
  ### Project Trust
116
116
 
117
- On interactive startup, pi asks before trusting a project folder that contains project-local extensions or settings and has no saved decision for the folder or a parent folder in `~/.pi/agent/trust.json`. Trusting a project allows pi to load `.pi/settings.json` and `.pi` resources, install missing project packages, and execute project extensions.
117
+ On interactive startup, draht asks before trusting a project folder that contains project-local extensions or settings and has no saved decision for the folder or a parent folder in `~/.draht/agent/trust.json`. Trusting a project allows draht to load `.draht/settings.json` and `.draht` resources, install missing project packages, and execute project extensions.
118
118
 
119
- Before the trust decision, pi loads only context files, user/global extensions, and CLI `-e` extensions so they can handle the `project_trust` event. Project-local extensions, project package-managed extensions, and project settings are loaded only after the project is trusted. This split also applies when switching to a session from a different cwd whose trust has not been resolved in the current process.
119
+ Before the trust decision, draht loads only context files, user/global extensions, and CLI `-e` extensions so they can handle the `project_trust` event. Project-local extensions, project package-managed extensions, and project settings are loaded only after the project is trusted. This split also applies when switching to a session from a different cwd whose trust has not been resolved in the current process.
120
120
 
121
121
  Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore trust-gated project inputs, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
122
122
 
123
- If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.pi/agent/settings.json`, or change it with `/settings`.
123
+ If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.draht/agent/settings.json`, or change it with `/settings`.
124
124
 
125
- `pi config` and package commands use the same project trust flow. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
125
+ `draht config` and package commands use the same project trust flow. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
126
126
 
127
- Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.pi/agent/trust.json` only; the current session is not reloaded, so restart pi for changes to take effect.
127
+ Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.draht/agent/trust.json` only; the current session is not reloaded, so restart draht for changes to take effect.
128
128
 
129
129
 
130
130
  ## Exporting and Sharing Sessions
@@ -133,32 +133,32 @@ Use `/export [file]` to write a session to HTML.
133
133
 
134
134
  Use `/share` to upload a private GitHub gist with a shareable HTML link.
135
135
 
136
- If you use pi for open source work and want to publish sessions for model, prompt, tool, and evaluation research, see [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf). It publishes sessions to Hugging Face datasets.
136
+ If you use draht for open source work and want to publish sessions for model, prompt, tool, and evaluation research, see [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf). It publishes sessions to Hugging Face datasets.
137
137
 
138
138
  ## CLI Reference
139
139
 
140
140
  ```bash
141
- pi [options] [@files...] [messages...]
141
+ draht [options] [@files...] [messages...]
142
142
  ```
143
143
 
144
144
  ### Package Commands
145
145
 
146
146
  ```bash
147
- pi install <source> [-l] # Install package, -l for project-local
148
- pi remove <source> [-l] # Remove package
149
- pi uninstall <source> [-l] # Alias for remove
150
- pi update [source|self|pi] # Update pi and packages; reconcile pinned git refs
151
- pi update --extensions # Update packages only; reconcile pinned git refs
152
- pi update --models # Refresh model catalogs only
153
- pi update --self # Update pi only
154
- pi update --extension <src> # Update one package
155
- pi list # List installed packages
156
- pi config # Enable/disable package resources
147
+ draht install <source> [-l] # Install package, -l for project-local
148
+ draht remove <source> [-l] # Remove package
149
+ draht uninstall <source> [-l] # Alias for remove
150
+ draht update [source|self|pi] # Update draht and packages; reconcile pinned git refs
151
+ draht update --extensions # Update packages only; reconcile pinned git refs
152
+ draht update --models # Refresh model catalogs only
153
+ draht update --self # Update draht only
154
+ draht update --extension <src> # Update one package
155
+ draht list # List installed packages
156
+ draht config # Enable/disable package resources
157
157
  ```
158
158
 
159
- These commands manage pi packages, not the pi CLI installation. To uninstall pi itself, see [Quickstart](quickstart.md#uninstall). `pi config` and project package commands accept `--approve`/`--no-approve` to trust or ignore project-local settings for one command.
159
+ These commands manage draht packages, not the draht CLI installation. To uninstall draht itself, see [Quickstart](quickstart.md#uninstall). `draht config` and project package commands accept `--approve`/`--no-approve` to trust or ignore project-local settings for one command.
160
160
 
161
- See [Pi Packages](packages.md) for package sources and security notes.
161
+ See [draht Packages](packages.md) for package sources and security notes.
162
162
 
163
163
  ### Modes
164
164
 
@@ -170,10 +170,10 @@ See [Pi Packages](packages.md) for package sources and security notes.
170
170
  | `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](rpc.md) |
171
171
  | `--export <in> [out]` | Export a session to HTML |
172
172
 
173
- In print mode, pi also reads piped stdin and merges it into the initial prompt:
173
+ In print mode, draht also reads piped stdin and merges it into the initial prompt:
174
174
 
175
175
  ```bash
176
- cat README.md | pi -p "Summarize this text"
176
+ cat README.md | draht -p "Summarize this text"
177
177
  ```
178
178
 
179
179
  ### Model Options
@@ -227,7 +227,7 @@ Built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`.
227
227
  Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings. Example:
228
228
 
229
229
  ```bash
230
- pi --no-extensions -e ./my-extension.ts
230
+ draht --no-extensions -e ./my-extension.ts
231
231
  ```
232
232
 
233
233
  ### Other Options
@@ -247,48 +247,48 @@ pi --no-extensions -e ./my-extension.ts
247
247
  Prefix files with `@` to include them in the message:
248
248
 
249
249
  ```bash
250
- pi @prompt.md "Answer this"
251
- pi -p @screenshot.png "What's in this image?"
252
- pi @code.ts @test.ts "Review these files"
250
+ draht @prompt.md "Answer this"
251
+ draht -p @screenshot.png "What's in this image?"
252
+ draht @code.ts @test.ts "Review these files"
253
253
  ```
254
254
 
255
255
  ### Examples
256
256
 
257
257
  ```bash
258
258
  # Interactive with initial prompt
259
- pi "List all .ts files in src/"
259
+ draht "List all .ts files in src/"
260
260
 
261
261
  # Non-interactive
262
- pi -p "Summarize this codebase"
262
+ draht -p "Summarize this codebase"
263
263
 
264
264
  # Non-interactive with piped stdin
265
- cat README.md | pi -p "Summarize this text"
265
+ cat README.md | draht -p "Summarize this text"
266
266
 
267
267
  # Named one-shot session
268
- pi --name "release audit" -p "Audit this repository"
268
+ draht --name "release audit" -p "Audit this repository"
269
269
 
270
270
  # Different model
271
- pi --provider openai --model gpt-4o "Help me refactor"
271
+ draht --provider openai --model gpt-4o "Help me refactor"
272
272
 
273
273
  # Model with provider prefix
274
- pi --model openai/gpt-4o "Help me refactor"
274
+ draht --model openai/gpt-4o "Help me refactor"
275
275
 
276
276
  # Model with thinking level shorthand
277
- pi --model sonnet:high "Solve this complex problem"
277
+ draht --model sonnet:high "Solve this complex problem"
278
278
 
279
279
  # Limit model cycling
280
- pi --models "claude-*,gpt-4o"
280
+ draht --models "claude-*,gpt-4o"
281
281
 
282
282
  # Read-only mode
283
- pi --tools read,grep,find,ls -p "Review the code"
283
+ draht --tools read,grep,find,ls -p "Review the code"
284
284
 
285
285
  # Disable one extension or built-in tool while keeping the rest available
286
- pi --exclude-tools ask_question
286
+ draht --exclude-tools ask_question
287
287
  ```
288
288
 
289
289
  ## Design Principles
290
290
 
291
- Pi keeps the core small and pushes workflow-specific behavior into extensions, skills, prompt templates, and packages.
291
+ draht keeps the core small and pushes workflow-specific behavior into extensions, skills, prompt templates, and packages.
292
292
 
293
293
  It intentionally does not include built-in MCP, sub-agents, permission popups, plan mode, to-dos, or background bash. You can build or install those workflows as extensions or packages, or use external tools such as containers and tmux.
294
294
 
package/docs/windows.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Windows Setup
2
2
 
3
- Pi requires a bash shell on Windows. Checked locations (in order):
3
+ draht requires a bash shell on Windows. Checked locations (in order):
4
4
 
5
- 1. Custom path from `~/.pi/agent/settings.json`
5
+ 1. Custom path from `~/.draht/agent/settings.json`
6
6
  2. Git Bash (`C:\Program Files\Git\bin\bash.exe`)
7
7
  3. `bash.exe` on PATH (Cygwin, MSYS2, WSL)
8
8
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Overlay QA Tests - comprehensive overlay positioning and edge case tests
3
3
  *
4
- * Usage: pi --extension ./examples/extensions/overlay-qa-tests.ts
4
+ * Usage: draht --extension ./examples/extensions/overlay-qa-tests.ts
5
5
  *
6
6
  * Commands:
7
7
  * /overlay-animation - Real-time animation demo (~30 FPS, proves DOOM-like rendering works)
@@ -485,13 +485,13 @@ class StreamingOverflowComponent extends BaseOverlay {
485
485
  echo ""
486
486
  for i in $(seq 1 100); do
487
487
  # Simulate long file paths with OSC 8 hyperlinks (clickable) - tests width overflow
488
- DIR="/Users/nicobailon/Documents/development/pi-mono/packages/coding-agent/src/modes/interactive"
488
+ DIR="/Users/nicobailon/Documents/development/draht-mono/packages/coding-agent/src/modes/interactive"
489
489
  FILE="\${DIR}/components/very-long-component-name-that-exceeds-width-\${i}.ts"
490
490
  echo -e "\\033]8;;file://\${FILE}\\007▶ read: \${FILE}\\033]8;;\\007"
491
491
 
492
492
  # Add some colored status messages with long text
493
493
  if [ $((i % 5)) -eq 0 ]; then
494
- echo -e " \\033[32m✓ Successfully processed \${i} files in /Users/nicobailon/Documents/development/pi-mono\\033[0m"
494
+ echo -e " \\033[32m✓ Successfully processed \${i} files in /Users/nicobailon/Documents/development/draht-mono\\033[0m"
495
495
  fi
496
496
  if [ $((i % 7)) -eq 0 ]; then
497
497
  echo -e " \\033[33m⚠ Warning: potential issue detected at line \${i} in very-long-component-name-that-exceeds-width.ts\\033[0m"
@@ -75,9 +75,9 @@ try {
75
75
  execSync(tsCmd, { timeout: 60000, encoding: "utf-8", cwd });
76
76
  } catch (error) {
77
77
  const output = error.stdout || error.stderr || "";
78
- const errorCount = (output.match(/error TS/g) || []).length;
79
- if (errorCount > 0) {
80
- issues.push({ severity: strict ? "error" : "warning", message: `${errorCount} TypeScript error(s)`, details: output.slice(0, 500) });
78
+ const errorLines = output.split("\n").filter((line) => /error TS/.test(line));
79
+ if (errorLines.length > 0) {
80
+ issues.push({ severity: strict ? "error" : "warning", message: `${errorLines.length} TypeScript error(s)`, details: errorLines.join("\n").slice(0, 500) });
81
81
  }
82
82
  }
83
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draht/coding-agent",
3
- "version": "2026.7.30",
3
+ "version": "2026.9.5-1",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "drahtConfig": {
@@ -28,6 +28,7 @@
28
28
  "docs",
29
29
  "examples",
30
30
  "prompts",
31
+ "skills",
31
32
  "hooks",
32
33
  "agents",
33
34
  "bin",
@@ -37,21 +38,21 @@
37
38
  "clean": "shx rm -rf dist",
38
39
  "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
39
40
  "build": "tsc -p tsconfig.build.json && shx chmod +x dist/cli.js dist/rpc-entry.js && bun run copy-assets",
40
- "build:binary": "bun run build && bun build --compile ./dist/cli.js ./src/utils/image-resize-worker.ts --outfile dist/draht && bun run copy-binary-assets",
41
- "copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/modes/interactive/assets && shx cp src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/ && shx rm -rf dist/prompts dist/hooks dist/agents && shx cp -r prompts dist/prompts && shx cp -r hooks dist/hooks && shx cp -r agents dist/agents",
42
- "copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/assets && shx cp src/modes/interactive/assets/*.png dist/assets/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp -r prompts dist/ && shx cp -r hooks dist/ && shx cp -r agents dist/ && shx cp ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/",
41
+ "build:binary": "bun run build && bun build --compile --no-compile-autoload-bunfig ./dist/cli.js ./src/utils/image-resize-worker.ts --outfile dist/draht && bun run copy-binary-assets",
42
+ "copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/modes/interactive/assets && shx cp src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/ && shx rm -rf dist/prompts dist/skills dist/hooks dist/agents && shx cp -r prompts dist/prompts && shx cp -r skills dist/skills && shx cp -r hooks dist/hooks && shx cp -r agents dist/agents",
43
+ "copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/assets && shx cp src/modes/interactive/assets/*.png dist/assets/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp -r prompts dist/ && shx cp -r skills dist/ && shx cp -r hooks dist/ && shx cp -r agents dist/ && node -e \"require('fs').copyFileSync(require.resolve('@silvia-odwyer/photon-node/photon_rs_bg.wasm'), 'dist/photon_rs_bg.wasm')\"",
43
44
  "sync-tools": "node ../../scripts/sync-draht-tools.mjs",
44
45
  "test": "vitest --run",
45
46
  "prepublishOnly": "node ../../scripts/sync-draht-tools.mjs && bun run clean && bun run build"
46
47
  },
47
48
  "dependencies": {
48
49
  "@mariozechner/jiti": "^2.6.2",
49
- "@draht/agent-core": "2026.7.30",
50
- "@draht/ai": "2026.7.30",
51
- "@draht/rlm": "2026.7.30",
52
- "@draht/router": "2026.7.30",
53
- "@draht/tools": "2026.7.30",
54
- "@draht/tui": "2026.7.30",
50
+ "@draht/agent-core": "2026.9.5-1",
51
+ "@draht/ai": "2026.9.5-1",
52
+ "@draht/rlm": "2026.9.5-1",
53
+ "@draht/router": "2026.9.5-1",
54
+ "@draht/tools": "2026.9.5-1",
55
+ "@draht/tui": "2026.9.5-1",
55
56
  "@silvia-odwyer/photon-node": "^0.3.4",
56
57
  "@sinclair/typebox": "^0.34.41",
57
58
  "chalk": "^5.6.2",
@@ -18,18 +18,7 @@ Surface any of these to the user and split the change set before continuing.
18
18
 
19
19
  ## Atomic Reasoning
20
20
 
21
- Before creating commits, decompose changes into atomic reasoning units:
22
-
23
- **For each file change:**
24
- 1. **State the logical component** — What does this change do? What is its purpose? Does it complete a thought?
25
- 2. **Validate independence** — Can this change be applied independently? Does it depend on other changes? Does it break the build alone?
26
- 3. **Verify correctness** — Is this change logically complete? Does it mix concerns? Should it be split further?
27
-
28
- **Synthesize commit strategy:**
29
- - Group changes by logical concern (one commit = one idea)
30
- - Order commits so each builds successfully
31
- - Write clear commit messages that explain WHY, not just WHAT
32
- - Ensure each commit is self-contained and reviewable
21
+ 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.
33
22
 
34
23
  ## Gathering Current State
35
24
 
@@ -6,6 +6,8 @@ description: "Refine a fuzzy idea into a written design spec before planning or
6
6
 
7
7
  The pre-planning gate. Before draht's GSD cycle runs, before code is scaffolded, before `/new-project` or `/init-project`, converge on the idea through dialogue and write it to `.planning/specs/`. This command enforces design-first discipline.
8
8
 
9
+ For subject-agnostic interrogation that does not presume a project — a spec, raw tickets, an architecture decision, an open discussion — use `/grill`; `/brainstorm` stays the project-creation entry and questions with the same whole-frontier protocol.
10
+
9
11
  ## Usage
10
12
  ```
11
13
  /brainstorm [idea or topic]
@@ -15,17 +17,7 @@ Topic: $ARGUMENTS
15
17
 
16
18
  ## Atomic Reasoning
17
19
 
18
- Before asking anything, decompose the idea into atomic reasoning units:
19
-
20
- 1. **State the logical component** — What problem does this solve? Who is it for? What changes for them when it ships?
21
- 2. **Validate independence** — What bounded contexts will exist? What is core vs peripheral? What can be built independently?
22
- 3. **Verify correctness** — What defines v1 success? What constraints exist (time, tech, team)? What is explicitly out of scope?
23
-
24
- **Synthesize design strategy:**
25
- - Ground questions in what is already on disk instead of asking what the user already told you
26
- - Sequence questions foundational → detailed, one at a time
27
- - Surface 2–3 approaches with trade-offs before committing
28
- - Record decisions (not proposals) in a spec file
20
+ 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.
29
21
 
30
22
  ## Hear the Problem Beneath the Ask
31
23
 
@@ -43,7 +35,7 @@ The user's words describe an artifact; the design must serve a need. They are ra
43
35
  ## The Hard Gate
44
36
 
45
37
  > Do NOT invoke any planning command, write any code, scaffold any project, or take any implementation action until you have:
46
- > 1. Asked clarifying questions one at a time
38
+ > 1. Worked the question frontier in rounds until it was empty
47
39
  > 2. Proposed 2–3 approaches with trade-offs
48
40
  > 3. Presented a structured design and the user has approved it
49
41
  > 4. Written the design to `.planning/specs/YYYY-MM-DD-<slug>-design.md`
@@ -64,9 +56,9 @@ If an existing codebase is in play (extending a real project), run `draht-tools
64
56
 
65
57
  Use this to ground questions in reality instead of asking things the user has already told you.
66
58
 
67
- ### 2. Ask Clarifying Questions — ONE at a time
59
+ ### 2. Question in Rounds — Ask the Whole Frontier
68
60
 
69
- Most failed projects come from rushing past ambiguity. Ask **one focused question per message**, not a long list. Wait for the answer, then ask the next.
61
+ Most failed projects come from rushing past ambiguity. Map the open decisions as a design tree — every decision branches into the decisions that hang off it. The **frontier** is every question whose prerequisites are already settled. Each round, ask the WHOLE frontier in one message: numbered, foundational → detailed, each question with a *Recommended:* answer line so the user can accept by number ("1 yes, 2: B, 3 later"). A question accepted by number or answered explicitly is **decided**; a recommendation acted on without confirmation is **assumed** and stays flagged. Questions that depend on still-open answers wait for a later round. Environment facts (files, git history, code structure) are your job, never the user's — dispatch a subagent non-blockingly; only the questions downstream of it wait.
70
62
 
71
63
  Question categories (sequence from foundational → detailed):
72
64
  - **Goal** — who is this for? what changes for them when it ships?
@@ -107,6 +99,8 @@ Once all sections are approved:
107
99
  .planning/specs/YYYY-MM-DD-<topic-slug>-design.md
108
100
  ```
109
101
 
102
+ Write spec prose through the `unslop` skill — name mechanisms, not feelings; the spec structure below stays as specified.
103
+
110
104
  The file should include:
111
105
  - Header with date and approver
112
106
  - All approved sections
@@ -142,7 +136,8 @@ The spec file becomes input to those commands.
142
136
 
143
137
  ## Anti-Patterns — STOP
144
138
 
145
- - **Asking multiple questions in one message** — splits the user's attention, lowers answer quality
139
+ - **Dribbling questions one at a time** — a serial interview hides the decision tree and wastes rounds; ask the whole frontier, numbered, with recommended answers
140
+ - **Asking the user for facts you can look up** — filesystem, git history, and code structure are your job; dispatch a subagent and keep the round moving
146
141
  - **Pre-deciding before they've answered** — "I'll just assume you mean X" is a failure mode
147
142
  - **Skipping the alternatives** — proposing only one approach hides the trade-space
148
143
  - **Writing the spec before approval** — the spec records *decisions*, not *proposals*. Get the decision first.
@@ -156,6 +151,8 @@ The spec file becomes input to those commands.
156
151
  | "User said 'just build it'" | They'll be unhappier when the wrong thing gets built. Surface the trade-off. |
157
152
  | "I already know what they want" | Verify by stating it back and getting confirmation. |
158
153
  | "Let's iterate after a first draft" | A first draft in code is more expensive to throw away than a first draft on paper. |
154
+ | "Ten questions at once will overwhelm them" | Numbered questions with recommended answers are skimmable — the user replies "1 yes, 2: B, 3 later". Serial questioning is the slower burden. |
155
+ | "I'll just ask what's in the repo" | Finding facts is your job, never the user's. Dispatch a subagent. |
159
156
 
160
157
  ## Output
161
158
 
@@ -0,0 +1,108 @@
1
+ ---
2
+ description: "Generate a committed project-local verify-<app> skill that drives the real app the way a user does and captures proof artifacts — proven end to end once before handover"
3
+ ---
4
+
5
+ # /create-verification-skill
6
+
7
+ Every serious project needs a scripted way to drive the real app and prove behaviour: launch it, exercise a feature the way a user would, and capture evidence. This command generates that as a committed project-local skill — `.draht/skills/verify-<app>/` — tailored to the repo, so verification is a versioned repo asset instead of per-session improvisation.
8
+
9
+ ## Usage
10
+ ```
11
+ /create-verification-skill [app or surface]
12
+ ```
13
+
14
+ Target: $ARGUMENTS (optional — when empty, the interview below picks the primary user-facing surface)
15
+
16
+ Write the generated skill for the next agent, not for a human: it will be read cold, mid-task, by an agent that has never seen the app.
17
+
18
+ ## Steps
19
+
20
+ ### 1 — Interview the repo, not the user
21
+
22
+ Answer these from the codebase and only ask the user what you cannot observe:
23
+
24
+ - **Surface:** what does a user actually touch? A web UI, a CLI/TUI, a desktop app, an API, a mobile app, a library? A repo can have several; pick the primary one and note the rest.
25
+ - **Run:** how does the app start locally? Prefer the repo's own documented dev command (package scripts, Makefile, README quickstart). Note ports, env vars, seed data, auth.
26
+ - **Drive:** how can an agent interact with it programmatically? Existing harnesses first — Playwright/Cypress specs, expect scripts, PTY helpers, curl-able endpoints, a debug port. Only then pick a generic recipe: a browser debug port (CDP) for web and Electron, a tmux/PTY harness for CLI and TUI, plain HTTP for services. Every recipe must run through plain shell commands — assume the runtime ships no browser-automation or app-control tooling of its own.
27
+ - **Observe:** what evidence can be captured? Screenshots, terminal transcripts, response bodies, logs, exit codes, DB state.
28
+ - **Isolate:** can two instances run side by side (ports, data dirs, profiles)? If not, say so in the generated skill: refusing to double-drive a shared instance beats corrupting the user's session.
29
+
30
+ If the checkout doesn't build or start as-is, fix that first (or report it precisely) before generating; a skill written against a broken base teaches wrong steps. When an irrelevant missing asset blocks startup (a static dir the API never serves, a sample config), the generated skill may create it, clearly marked as verification scaffolding, and remove it in cleanup.
31
+
32
+ ### 2 — Generate the skill
33
+
34
+ Write `.draht/skills/verify-<app>/SKILL.md`. `.draht/skills/` is the project-level skills directory, and project skills win name collisions against installed or shipped skills — the generated skill is authoritative for its repo. (If the target project's agents discover project skills at a different path, write the identical content there instead; the skill body is host-neutral.)
35
+
36
+ Frontmatter is `name: verify-<app>` plus a `description` that names the app, the surface, and when to reach for it — without frontmatter the skill never registers. Then these six sections, each grounded in what the interview actually found (no placeholders left):
37
+
38
+ - **Launch:** the exact command that starts the app for verification, and how to tell it's ready (a log line, a port answering, a prompt). Include teardown. For a short-lived CLI or TUI there is no server to keep alive: launch means build the binary (or install deps) once, then start each drive in its own isolated PTY or tmux session.
39
+ - **Doctor:** one read-only check that answers "is this instance worth driving?" — process up, right version/build, port owned by us, auth valid. Run it before the first drive and again whenever anything looks off.
40
+ - **Drive:** the harness recipe with real selectors/commands from this repo, not examples. Prefer stable handles (ARIA labels, data attributes, prompt strings, route paths) over coordinates and tab order.
41
+ - **Evidence:** what to capture for a proof and where it goes. State the proof standards: exercise the real user path, not internal setters or test-only endpoints; capture the action and the resulting state, not just the final screen; verify side effects (files written, rows inserted, messages sent) alongside what's visible; mocks only where a production boundary already isolates the external system. When the safe path is a dry-run or test mode, verify what it actually skips by observing (files, network, git refs) rather than trusting its name: some dry-runs still touch the network or open a browser.
42
+ - **Cleanup:** how to tear down instances the run created. Never kill by process name; kill what you started. Cleanup removes instances and scratch state, never the evidence: proof artifacts survive the teardown, in a location the skill names.
43
+ - **Helpers:** any script the skill ships is executable and its invocation is shown in the skill body. A helper the reader has to reverse-engineer is not a helper.
44
+
45
+ ### 3 — Seed the feature map
46
+
47
+ Create a `features/` directory inside the generated skill dir, holding `features/README.md` plus one file per user-facing feature you can identify (aim for the top 3-5 to start, from routes, commands, menus, or docs). The README carries the baseline preconditions (launch target, disposable data location, seed data, the Doctor requirement), the driving conventions (stable handles over positions, commands taken literally, restore mutated fixtures, never remove proof artifacts), the proof and skip-reporting rules (record the feature ID and entry point with every artifact; report an unreachable path with the attempted command and the unmet precondition; never report a skipped entry point as verified through a different path), and an index linking every feature file.
48
+
49
+ Each feature file starts with an H1 title and one paragraph of user-visible behaviour, then exactly four H2 sections in this order:
50
+
51
+ 1. `Sub-features` — short IDs with one line per behaviour.
52
+ 2. `How to get to it (user POV)` — every user entry point.
53
+ 3. `Driving it with <harness>` — starts with `Preconditions:`, then labelled bullets pairing each user action with an exact command and its observable result.
54
+ 4. `Gotchas` — traps that can waste or invalidate a verification run.
55
+
56
+ Keep implementation details out of the map: name only user paths, stable handles, required state, commands, and observable proof. A condensed example entry:
57
+
58
+ ```markdown
59
+ # Create a note
60
+
61
+ Create note lets a user save a titled note and confirm it from a second view.
62
+
63
+ ## Sub-features
64
+
65
+ - `create-save` persists a title and body.
66
+
67
+ ## How to get to it (user POV)
68
+
69
+ - Choose the `New note` button in the browser toolbar.
70
+
71
+ ## Driving it with the CDP harness
72
+
73
+ Preconditions:
74
+
75
+ - Notes is healthy at `http://127.0.0.1:4173` and no note is titled `Release checklist`.
76
+
77
+ - **Open editor.** Choose `New note`. Click the button with accessible name `New note`. A form named `Note editor` appears.
78
+ - **Save note.** Fill `Title` with `Release checklist`, choose `Save note`. A status named `Note saved` appears.
79
+ - **Proof.** Reopen the note from `All notes`; screenshot to `artifacts/create-note/list.png`. The list shows `Release checklist`.
80
+
81
+ ## Gotchas
82
+
83
+ - A save status alone is insufficient proof. Reopen the note from the list.
84
+ ```
85
+
86
+ The map is the repo's maintained verification source; a proof that drives one convenient entry point is incomplete when the map lists others.
87
+
88
+ ### 4 — Prove the generated skill before handing it over
89
+
90
+ Run its own instructions end to end once: launch, doctor, drive ONE mapped feature (one is enough — the map exists so later runs can cover the rest), capture evidence, clean up. After cleanup, confirm the evidence still exists at the named location — a cleanup that eats the proof fails this step. Fix what fails, and run the generated cleanup after every failed iteration too, so broken attempts don't strand processes and ports. A generated skill that was never executed is a draft, not a deliverable.
91
+
92
+ ### 5 — Commit and hand over
93
+
94
+ The generated skill versions with the app it verifies: commit `.draht/skills/verify-<app>/` (skill, feature map, helpers) to the target repo. Then tell the user two things:
95
+
96
+ - `/verify-work` picks it up: when a `verify-<app>` skill exists, the phase verifier drives one mapped feature and captures its evidence instead of stopping at the test suite.
97
+ - The map stays honest only if it changes with the app: a change that adds or reshapes a user-facing feature updates the matching feature file in the same change. A map entry the app has outgrown is worse than none — it teaches wrong steps with confidence.
98
+
99
+ ## Failure Modes — STOP
100
+
101
+ Stop immediately if you catch yourself:
102
+
103
+ - Writing recipes against an app you never started — generate from observed behaviour, not from reading the code
104
+ - Trusting a dry-run or test mode by its name instead of observing what it actually skips
105
+ - Proving a feature through a test-only endpoint or internal setter instead of the real user path
106
+ - Driving an instance this run did not start
107
+ - Writing a cleanup that deletes the proof artifacts
108
+ - Handing over a skill whose own instructions were never executed end to end
@@ -15,25 +15,14 @@ Phase: $1
15
15
 
16
16
  ## Atomic Reasoning
17
17
 
18
- Before questioning, decompose this phase scope into atomic reasoning units:
19
-
20
- **For each implementation decision:**
21
- 1. **State the logical component** — What gray area exists? What choice needs to be made? Why does this matter?
22
- 2. **Validate independence** — Can this decision be made independently, or does it depend on other choices? What downstream impacts does it have?
23
- 3. **Verify correctness** — What criteria determine the right answer? What trade-offs exist? What domain terms need clarification?
24
-
25
- **Synthesize discussion strategy:**
26
- - Identify critical decisions that block planning
27
- - Group related decisions (e.g., all API decisions together)
28
- - Sequence questions from foundational to detailed
29
- - Ensure domain language is established first
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.
30
19
 
31
20
  ## Steps
32
21
  1. Run `draht-tools phase-info $1` to load phase context
33
22
  2. Identify gray areas based on what's being built
34
- 3. Present 1-2 questions at a time about preferences
23
+ 3. Present the whole frontier of open decisions in one numbered round — every question whose prerequisites are settled, each with a recommended answer the user can accept by number; defer questions that depend on still-open answers to the next round. Environment facts are your job, never the user's — dispatch a subagent and only hold back the questions downstream of it.
35
24
  4. If `.planning/DOMAIN.md` exists, load it and validate discovered terms against the glossary. Add any new domain terms found during discussion.
36
- 5. Record decisions with `draht-tools save-context $1` — label each entry **decided** (the user explicitly chose) or **assumed** (you inferred from context). Assumed entries are flagged for confirmation; a plan built on an unlabeled assumption fails silently later.
25
+ 5. Record decisions with `draht-tools save-context $1` — label each entry **decided** (the user explicitly chose) or **assumed** (you inferred from context). An answer accepted by number counts as decided. Assumed entries are flagged for confirmation; a plan built on an unlabeled assumption fails silently later.
37
26
  6. Commit: `draht-tools commit-docs "capture phase $1 context"`
38
27
 
39
28
  ## Workflow
@@ -35,18 +35,9 @@ A plan's YAML frontmatter may declare `rlm: true` (alongside `phase`, `plan`, `d
35
35
 
36
36
  ## Atomic Reasoning
37
37
 
38
- Before executing, decompose this phase execution into atomic reasoning units:
38
+ 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.
39
39
 
40
- **For each plan in the phase:**
41
- 1. **State the logical component** — What is this plan's singular purpose? What observable outcome does it produce?
42
- 2. **Validate independence** — Can this plan execute in parallel with others, or does it depend on their outputs? Which files does it touch?
43
- 3. **Verify correctness** — What tests will prove this plan works? What failure modes exist?
44
-
45
- **Synthesize execution strategy:**
46
- - Identify parallel execution groups (plans with no shared files/dependencies)
47
- - Order dependent plans (plan B depends on plan A's outputs)
48
- - Within each group, dispatch the riskiest plan first (highest uncertainty × blast radius) — its failure invalidates the rest of the phase most cheaply, before effort has been sunk into work it would obsolete
49
- - Map each plan to a subagent task with clear success criteria
40
+ Within each group of independent plans, dispatch the riskiest plan first (highest uncertainty × blast radius) — its failure invalidates the rest of the phase most cheaply, before effort has been sunk into work it would obsolete.
50
41
 
51
42
  ## Steps
52
43
  1. Run `draht-tools discover-plans $1` to find and order plans
@@ -94,6 +85,7 @@ For each <task> in the plan, follow this TDD cycle:
94
85
  4. VERIFY — Run the <verify> step, confirm <done> criteria are met.
95
86
 
96
87
  Domain rules: Use ubiquitous language from .planning/DOMAIN.md (read it). Do not import across bounded context boundaries.
88
+ Comment discipline: comments exist ONLY for constraints the code cannot express — a protocol quirk, a deliberate deviation, a non-obvious invariant. If code needs comments to be understood, rewrite the code until it doesn't. Never narrate steps, restate the diff, or leave "removed X" / "this handles Y" breadcrumbs. Comment density above the surrounding file's norm is a defect — fix it before committing. A heavily-commented solution signals the design is wrong: redesign, don't annotate.
97
89
  Checkpoint handling: type="auto" → execute silently. type="checkpoint:human-verify" → stop and report back what was built. type="checkpoint:decision" → stop and report the options.
98
90
  RLM routing: if this plan's frontmatter has `rlm: true`, use the `rlm_query` tool instead of reading directly any task input file at or above ~200KB (see "RLM Routing for Oversize Inputs" above for the full rule and fallback behavior).
99
91