claude-auto 0.12.4

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 (327) hide show
  1. package/.claude-auto/.claude.hooks.json +25 -0
  2. package/.claude-auto/reminders/reminder-auto.md +145 -0
  3. package/.claude-auto/reminders/reminder-documentation.md +30 -0
  4. package/.claude-auto/reminders/reminder-emergent-design.md +41 -0
  5. package/.claude-auto/reminders/reminder-extreme-ownership.md +27 -0
  6. package/.claude-auto/reminders/reminder-ide-diagnostics.md +25 -0
  7. package/.claude-auto/reminders/reminder-parallelization.md +27 -0
  8. package/.claude-auto/reminders/reminder-rethink-after-revert.md +25 -0
  9. package/.claude-auto/reminders/reminder-sub-agent-rules.md +27 -0
  10. package/.claude-auto/reminders/reminder-test-title-matches-spec.md +37 -0
  11. package/.claude-auto/validators/appeal-system.md +55 -0
  12. package/.claude-auto/validators/backwards-compat.md +33 -0
  13. package/.claude-auto/validators/burst-atomicity.md +37 -0
  14. package/.claude-auto/validators/coverage-rules.md +34 -0
  15. package/.claude-auto/validators/dead-code.md +36 -0
  16. package/.claude-auto/validators/hygiene.md +34 -0
  17. package/.claude-auto/validators/infra-commit-format.md +37 -0
  18. package/.claude-auto/validators/ketchup-plan-format.md +42 -0
  19. package/.claude-auto/validators/new-code-requires-tests.md +36 -0
  20. package/.claude-auto/validators/no-comments.md +35 -0
  21. package/.claude-auto/validators/no-dangerous-git.md +35 -0
  22. package/.claude-auto/validators/tcr-workflow.md +31 -0
  23. package/.claude-auto/validators/testing-no-state-peeking.md +37 -0
  24. package/.claude-auto/validators/testing-structure.md +37 -0
  25. package/.claude-auto/validators/testing-stubs-over-mocks.md +42 -0
  26. package/.claude-auto/validators/testing-weak-assertions.md +36 -0
  27. package/.claude-auto/validators/type-organization.md +30 -0
  28. package/README.md +172 -0
  29. package/bin/cli.ts +6 -0
  30. package/dist/bin/cli.d.ts +3 -0
  31. package/dist/bin/cli.d.ts.map +1 -0
  32. package/dist/bin/cli.js +7 -0
  33. package/dist/bin/cli.js.map +1 -0
  34. package/dist/bundle/scripts/auto-continue.js +5045 -0
  35. package/dist/bundle/scripts/pre-tool-use.js +11719 -0
  36. package/dist/bundle/scripts/session-start.js +8571 -0
  37. package/dist/bundle/scripts/user-prompt-submit.js +8585 -0
  38. package/dist/scripts/auto-continue.d.ts +3 -0
  39. package/dist/scripts/auto-continue.d.ts.map +1 -0
  40. package/dist/scripts/auto-continue.js +65 -0
  41. package/dist/scripts/auto-continue.js.map +1 -0
  42. package/dist/scripts/generate-changeset.d.ts +13 -0
  43. package/dist/scripts/generate-changeset.d.ts.map +1 -0
  44. package/dist/scripts/generate-changeset.js +322 -0
  45. package/dist/scripts/generate-changeset.js.map +1 -0
  46. package/dist/scripts/pre-tool-use.d.ts +3 -0
  47. package/dist/scripts/pre-tool-use.d.ts.map +1 -0
  48. package/dist/scripts/pre-tool-use.js +78 -0
  49. package/dist/scripts/pre-tool-use.js.map +1 -0
  50. package/dist/scripts/session-start.d.ts +3 -0
  51. package/dist/scripts/session-start.d.ts.map +1 -0
  52. package/dist/scripts/session-start.js +76 -0
  53. package/dist/scripts/session-start.js.map +1 -0
  54. package/dist/scripts/user-prompt-submit.d.ts +3 -0
  55. package/dist/scripts/user-prompt-submit.d.ts.map +1 -0
  56. package/dist/scripts/user-prompt-submit.js +76 -0
  57. package/dist/scripts/user-prompt-submit.js.map +1 -0
  58. package/dist/src/activity-logger.d.ts +2 -0
  59. package/dist/src/activity-logger.d.ts.map +1 -0
  60. package/dist/src/activity-logger.js +47 -0
  61. package/dist/src/activity-logger.js.map +1 -0
  62. package/dist/src/activity-logger.test.d.ts +2 -0
  63. package/dist/src/activity-logger.test.d.ts.map +1 -0
  64. package/dist/src/activity-logger.test.js +121 -0
  65. package/dist/src/activity-logger.test.js.map +1 -0
  66. package/dist/src/clean-logs.d.ts +6 -0
  67. package/dist/src/clean-logs.d.ts.map +1 -0
  68. package/dist/src/clean-logs.js +38 -0
  69. package/dist/src/clean-logs.js.map +1 -0
  70. package/dist/src/clean-logs.test.d.ts +2 -0
  71. package/dist/src/clean-logs.test.d.ts.map +1 -0
  72. package/dist/src/clean-logs.test.js +101 -0
  73. package/dist/src/clean-logs.test.js.map +1 -0
  74. package/dist/src/cli/cli.d.ts +3 -0
  75. package/dist/src/cli/cli.d.ts.map +1 -0
  76. package/dist/src/cli/cli.js +32 -0
  77. package/dist/src/cli/cli.js.map +1 -0
  78. package/dist/src/cli/cli.test.d.ts +2 -0
  79. package/dist/src/cli/cli.test.d.ts.map +1 -0
  80. package/dist/src/cli/cli.test.js +27 -0
  81. package/dist/src/cli/cli.test.js.map +1 -0
  82. package/dist/src/cli/doctor.d.ts +7 -0
  83. package/dist/src/cli/doctor.d.ts.map +1 -0
  84. package/dist/src/cli/doctor.js +67 -0
  85. package/dist/src/cli/doctor.js.map +1 -0
  86. package/dist/src/cli/doctor.test.d.ts +2 -0
  87. package/dist/src/cli/doctor.test.d.ts.map +1 -0
  88. package/dist/src/cli/doctor.test.js +87 -0
  89. package/dist/src/cli/doctor.test.js.map +1 -0
  90. package/dist/src/cli/install.d.ts +10 -0
  91. package/dist/src/cli/install.d.ts.map +1 -0
  92. package/dist/src/cli/install.js +116 -0
  93. package/dist/src/cli/install.js.map +1 -0
  94. package/dist/src/cli/install.test.d.ts +2 -0
  95. package/dist/src/cli/install.test.d.ts.map +1 -0
  96. package/dist/src/cli/install.test.js +217 -0
  97. package/dist/src/cli/install.test.js.map +1 -0
  98. package/dist/src/cli/reminders.d.ts +12 -0
  99. package/dist/src/cli/reminders.d.ts.map +1 -0
  100. package/dist/src/cli/reminders.js +52 -0
  101. package/dist/src/cli/reminders.js.map +1 -0
  102. package/dist/src/cli/reminders.test.d.ts +2 -0
  103. package/dist/src/cli/reminders.test.d.ts.map +1 -0
  104. package/dist/src/cli/reminders.test.js +72 -0
  105. package/dist/src/cli/reminders.test.js.map +1 -0
  106. package/dist/src/cli/repair.d.ts +11 -0
  107. package/dist/src/cli/repair.d.ts.map +1 -0
  108. package/dist/src/cli/repair.js +91 -0
  109. package/dist/src/cli/repair.js.map +1 -0
  110. package/dist/src/cli/repair.test.d.ts +2 -0
  111. package/dist/src/cli/repair.test.d.ts.map +1 -0
  112. package/dist/src/cli/repair.test.js +95 -0
  113. package/dist/src/cli/repair.test.js.map +1 -0
  114. package/dist/src/cli/status.d.ts +10 -0
  115. package/dist/src/cli/status.d.ts.map +1 -0
  116. package/dist/src/cli/status.js +55 -0
  117. package/dist/src/cli/status.js.map +1 -0
  118. package/dist/src/cli/status.test.d.ts +2 -0
  119. package/dist/src/cli/status.test.d.ts.map +1 -0
  120. package/dist/src/cli/status.test.js +80 -0
  121. package/dist/src/cli/status.test.js.map +1 -0
  122. package/dist/src/clue-collector.d.ts +23 -0
  123. package/dist/src/clue-collector.d.ts.map +1 -0
  124. package/dist/src/clue-collector.js +221 -0
  125. package/dist/src/clue-collector.js.map +1 -0
  126. package/dist/src/clue-collector.test.d.ts +2 -0
  127. package/dist/src/clue-collector.test.d.ts.map +1 -0
  128. package/dist/src/clue-collector.test.js +278 -0
  129. package/dist/src/clue-collector.test.js.map +1 -0
  130. package/dist/src/commit-validator.d.ts +53 -0
  131. package/dist/src/commit-validator.d.ts.map +1 -0
  132. package/dist/src/commit-validator.js +356 -0
  133. package/dist/src/commit-validator.js.map +1 -0
  134. package/dist/src/commit-validator.test.d.ts +2 -0
  135. package/dist/src/commit-validator.test.d.ts.map +1 -0
  136. package/dist/src/commit-validator.test.js +733 -0
  137. package/dist/src/commit-validator.test.js.map +1 -0
  138. package/dist/src/config-loader.d.ts +15 -0
  139. package/dist/src/config-loader.d.ts.map +1 -0
  140. package/dist/src/config-loader.js +12 -0
  141. package/dist/src/config-loader.js.map +1 -0
  142. package/dist/src/config-loader.test.d.ts +2 -0
  143. package/dist/src/config-loader.test.d.ts.map +1 -0
  144. package/dist/src/config-loader.test.js +69 -0
  145. package/dist/src/config-loader.test.js.map +1 -0
  146. package/dist/src/debug-logger.d.ts +2 -0
  147. package/dist/src/debug-logger.d.ts.map +1 -0
  148. package/dist/src/debug-logger.js +23 -0
  149. package/dist/src/debug-logger.js.map +1 -0
  150. package/dist/src/debug-logger.test.d.ts +2 -0
  151. package/dist/src/debug-logger.test.d.ts.map +1 -0
  152. package/dist/src/debug-logger.test.js +63 -0
  153. package/dist/src/debug-logger.test.js.map +1 -0
  154. package/dist/src/default-validators.test.d.ts +2 -0
  155. package/dist/src/default-validators.test.d.ts.map +1 -0
  156. package/dist/src/default-validators.test.js +119 -0
  157. package/dist/src/default-validators.test.js.map +1 -0
  158. package/dist/src/deny-list.d.ts +3 -0
  159. package/dist/src/deny-list.d.ts.map +1 -0
  160. package/dist/src/deny-list.js +62 -0
  161. package/dist/src/deny-list.js.map +1 -0
  162. package/dist/src/deny-list.test.d.ts +2 -0
  163. package/dist/src/deny-list.test.d.ts.map +1 -0
  164. package/dist/src/deny-list.test.js +93 -0
  165. package/dist/src/deny-list.test.js.map +1 -0
  166. package/dist/src/e2e.test.d.ts +2 -0
  167. package/dist/src/e2e.test.d.ts.map +1 -0
  168. package/dist/src/e2e.test.js +82 -0
  169. package/dist/src/e2e.test.js.map +1 -0
  170. package/dist/src/gitignore-manager.d.ts +2 -0
  171. package/dist/src/gitignore-manager.d.ts.map +1 -0
  172. package/dist/src/gitignore-manager.js +45 -0
  173. package/dist/src/gitignore-manager.js.map +1 -0
  174. package/dist/src/gitignore-manager.test.d.ts +2 -0
  175. package/dist/src/gitignore-manager.test.d.ts.map +1 -0
  176. package/dist/src/gitignore-manager.test.js +65 -0
  177. package/dist/src/gitignore-manager.test.js.map +1 -0
  178. package/dist/src/hook-input.d.ts +9 -0
  179. package/dist/src/hook-input.d.ts.map +1 -0
  180. package/dist/src/hook-input.js +7 -0
  181. package/dist/src/hook-input.js.map +1 -0
  182. package/dist/src/hook-input.test.d.ts +2 -0
  183. package/dist/src/hook-input.test.d.ts.map +1 -0
  184. package/dist/src/hook-input.test.js +20 -0
  185. package/dist/src/hook-input.test.js.map +1 -0
  186. package/dist/src/hook-logger.d.ts +16 -0
  187. package/dist/src/hook-logger.d.ts.map +1 -0
  188. package/dist/src/hook-logger.js +90 -0
  189. package/dist/src/hook-logger.js.map +1 -0
  190. package/dist/src/hook-logger.test.d.ts +2 -0
  191. package/dist/src/hook-logger.test.d.ts.map +1 -0
  192. package/dist/src/hook-logger.test.js +205 -0
  193. package/dist/src/hook-logger.test.js.map +1 -0
  194. package/dist/src/hook-state.d.ts +44 -0
  195. package/dist/src/hook-state.d.ts.map +1 -0
  196. package/dist/src/hook-state.js +128 -0
  197. package/dist/src/hook-state.js.map +1 -0
  198. package/dist/src/hook-state.test.d.ts +2 -0
  199. package/dist/src/hook-state.test.d.ts.map +1 -0
  200. package/dist/src/hook-state.test.js +204 -0
  201. package/dist/src/hook-state.test.js.map +1 -0
  202. package/dist/src/hooks/auto-continue.d.ts +21 -0
  203. package/dist/src/hooks/auto-continue.d.ts.map +1 -0
  204. package/dist/src/hooks/auto-continue.js +70 -0
  205. package/dist/src/hooks/auto-continue.js.map +1 -0
  206. package/dist/src/hooks/auto-continue.test.d.ts +2 -0
  207. package/dist/src/hooks/auto-continue.test.d.ts.map +1 -0
  208. package/dist/src/hooks/auto-continue.test.js +171 -0
  209. package/dist/src/hooks/auto-continue.test.js.map +1 -0
  210. package/dist/src/hooks/pre-tool-use.d.ts +14 -0
  211. package/dist/src/hooks/pre-tool-use.d.ts.map +1 -0
  212. package/dist/src/hooks/pre-tool-use.js +66 -0
  213. package/dist/src/hooks/pre-tool-use.js.map +1 -0
  214. package/dist/src/hooks/pre-tool-use.test.d.ts +2 -0
  215. package/dist/src/hooks/pre-tool-use.test.d.ts.map +1 -0
  216. package/dist/src/hooks/pre-tool-use.test.js +255 -0
  217. package/dist/src/hooks/pre-tool-use.test.js.map +1 -0
  218. package/dist/src/hooks/session-start.d.ts +20 -0
  219. package/dist/src/hooks/session-start.d.ts.map +1 -0
  220. package/dist/src/hooks/session-start.js +27 -0
  221. package/dist/src/hooks/session-start.js.map +1 -0
  222. package/dist/src/hooks/session-start.test.d.ts +2 -0
  223. package/dist/src/hooks/session-start.test.d.ts.map +1 -0
  224. package/dist/src/hooks/session-start.test.js +125 -0
  225. package/dist/src/hooks/session-start.test.js.map +1 -0
  226. package/dist/src/hooks/user-prompt-submit.d.ts +17 -0
  227. package/dist/src/hooks/user-prompt-submit.d.ts.map +1 -0
  228. package/dist/src/hooks/user-prompt-submit.js +28 -0
  229. package/dist/src/hooks/user-prompt-submit.js.map +1 -0
  230. package/dist/src/hooks/user-prompt-submit.test.d.ts +2 -0
  231. package/dist/src/hooks/user-prompt-submit.test.d.ts.map +1 -0
  232. package/dist/src/hooks/user-prompt-submit.test.js +119 -0
  233. package/dist/src/hooks/user-prompt-submit.test.js.map +1 -0
  234. package/dist/src/hooks/validate-commit.d.ts +12 -0
  235. package/dist/src/hooks/validate-commit.d.ts.map +1 -0
  236. package/dist/src/hooks/validate-commit.js +58 -0
  237. package/dist/src/hooks/validate-commit.js.map +1 -0
  238. package/dist/src/hooks/validate-commit.test.d.ts +2 -0
  239. package/dist/src/hooks/validate-commit.test.d.ts.map +1 -0
  240. package/dist/src/hooks/validate-commit.test.js +150 -0
  241. package/dist/src/hooks/validate-commit.test.js.map +1 -0
  242. package/dist/src/index.d.ts +18 -0
  243. package/dist/src/index.d.ts.map +1 -0
  244. package/dist/src/index.js +42 -0
  245. package/dist/src/index.js.map +1 -0
  246. package/dist/src/linker.d.ts +6 -0
  247. package/dist/src/linker.d.ts.map +1 -0
  248. package/dist/src/linker.js +78 -0
  249. package/dist/src/linker.js.map +1 -0
  250. package/dist/src/linker.test.d.ts +2 -0
  251. package/dist/src/linker.test.d.ts.map +1 -0
  252. package/dist/src/linker.test.js +192 -0
  253. package/dist/src/linker.test.js.map +1 -0
  254. package/dist/src/logger.d.ts +21 -0
  255. package/dist/src/logger.d.ts.map +1 -0
  256. package/dist/src/logger.js +117 -0
  257. package/dist/src/logger.js.map +1 -0
  258. package/dist/src/logger.test.d.ts +2 -0
  259. package/dist/src/logger.test.d.ts.map +1 -0
  260. package/dist/src/logger.test.js +159 -0
  261. package/dist/src/logger.test.js.map +1 -0
  262. package/dist/src/path-resolver.d.ts +9 -0
  263. package/dist/src/path-resolver.d.ts.map +1 -0
  264. package/dist/src/path-resolver.js +52 -0
  265. package/dist/src/path-resolver.js.map +1 -0
  266. package/dist/src/reminder-loader.d.ts +24 -0
  267. package/dist/src/reminder-loader.d.ts.map +1 -0
  268. package/dist/src/reminder-loader.js +84 -0
  269. package/dist/src/reminder-loader.js.map +1 -0
  270. package/dist/src/reminder-loader.test.d.ts +2 -0
  271. package/dist/src/reminder-loader.test.d.ts.map +1 -0
  272. package/dist/src/reminder-loader.test.js +152 -0
  273. package/dist/src/reminder-loader.test.js.map +1 -0
  274. package/dist/src/root-finder.d.ts +2 -0
  275. package/dist/src/root-finder.d.ts.map +1 -0
  276. package/dist/src/root-finder.js +71 -0
  277. package/dist/src/root-finder.js.map +1 -0
  278. package/dist/src/root-finder.test.d.ts +2 -0
  279. package/dist/src/root-finder.test.d.ts.map +1 -0
  280. package/dist/src/root-finder.test.js +111 -0
  281. package/dist/src/root-finder.test.js.map +1 -0
  282. package/dist/src/settings-merger.d.ts +2 -0
  283. package/dist/src/settings-merger.d.ts.map +1 -0
  284. package/dist/src/settings-merger.js +133 -0
  285. package/dist/src/settings-merger.js.map +1 -0
  286. package/dist/src/settings-merger.test.d.ts +2 -0
  287. package/dist/src/settings-merger.test.d.ts.map +1 -0
  288. package/dist/src/settings-merger.test.js +379 -0
  289. package/dist/src/settings-merger.test.js.map +1 -0
  290. package/dist/src/settings-template.test.d.ts +2 -0
  291. package/dist/src/settings-template.test.d.ts.map +1 -0
  292. package/dist/src/settings-template.test.js +88 -0
  293. package/dist/src/settings-template.test.js.map +1 -0
  294. package/dist/src/state-manager.d.ts +5 -0
  295. package/dist/src/state-manager.d.ts.map +1 -0
  296. package/dist/src/state-manager.js +55 -0
  297. package/dist/src/state-manager.js.map +1 -0
  298. package/dist/src/state-manager.test.d.ts +2 -0
  299. package/dist/src/state-manager.test.d.ts.map +1 -0
  300. package/dist/src/state-manager.test.js +85 -0
  301. package/dist/src/state-manager.test.js.map +1 -0
  302. package/dist/src/subagent-classifier.d.ts +4 -0
  303. package/dist/src/subagent-classifier.d.ts.map +1 -0
  304. package/dist/src/subagent-classifier.js +53 -0
  305. package/dist/src/subagent-classifier.js.map +1 -0
  306. package/dist/src/subagent-classifier.test.d.ts +2 -0
  307. package/dist/src/subagent-classifier.test.d.ts.map +1 -0
  308. package/dist/src/subagent-classifier.test.js +84 -0
  309. package/dist/src/subagent-classifier.test.js.map +1 -0
  310. package/dist/src/validator-loader.d.ts +9 -0
  311. package/dist/src/validator-loader.d.ts.map +1 -0
  312. package/dist/src/validator-loader.js +71 -0
  313. package/dist/src/validator-loader.js.map +1 -0
  314. package/dist/src/validator-loader.test.d.ts +2 -0
  315. package/dist/src/validator-loader.test.d.ts.map +1 -0
  316. package/dist/src/validator-loader.test.js +140 -0
  317. package/dist/src/validator-loader.test.js.map +1 -0
  318. package/package.json +91 -0
  319. package/scripts/auto-continue.ts +39 -0
  320. package/scripts/generate-changeset.ts +405 -0
  321. package/scripts/pre-tool-use.ts +44 -0
  322. package/scripts/session-start.ts +42 -0
  323. package/scripts/tail-logs.sh +17 -0
  324. package/scripts/test-hooks.sh +910 -0
  325. package/scripts/user-prompt-submit.ts +42 -0
  326. package/templates/settings.json +48 -0
  327. package/templates/settings.local.json +48 -0
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: infra-commit-format
3
+ description: Validates commit message format for config-only commits
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** This validator ONLY applies when ALL changed files are infrastructure/config files.
14
+
15
+ **Config files include:**
16
+ - package.json, package-lock.json, pnpm-lock.yaml
17
+ - tsconfig.json, tsconfig.*.json
18
+ - *.config.ts, *.config.js (vite.config.ts, vitest.config.ts, etc.)
19
+ - wrangler.toml
20
+ - .gitignore, .npmignore, .eslintrc*, .prettierrc*
21
+ - ketchup-plan.md
22
+ - Any file in .claude/ directory
23
+
24
+ **ACK immediately if:**
25
+ - ANY .ts or .tsx file (not *.config.ts) is in the changed files list
26
+ - The commit includes behavioral code, not just config
27
+
28
+ **When ONLY config files are changed:**
29
+ - ACK if commit message starts with `chore(scope):` or `chore:` format
30
+ - NACK if commit message uses `feat:`, `fix:`, `test:` for config-only changes
31
+
32
+ **Examples:**
33
+ - Good: `chore(deps): update vitest to 1.0`
34
+ - Good: `chore: add ketchup-plan.md`
35
+ - Bad: `feat: update package.json` (for config-only commit)
36
+
37
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: ketchup-plan-format
3
+ description: Validates ketchup-plan.md structure and format
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** Validate ketchup-plan.md when it is included in the commit.
14
+
15
+ **ACK immediately if:**
16
+ - ketchup-plan.md is not in the changed files
17
+
18
+ **When ketchup-plan.md is changed, validate:**
19
+
20
+ **Required structure:**
21
+ - Must have `## TODO` section
22
+ - Must have `## DONE` section
23
+
24
+ **Burst format:**
25
+ - Bursts should include `[depends: ...]` notation
26
+ - Format: `- [ ] Burst N: description [depends: none]` or `[depends: N, M]`
27
+ - Completed bursts in DONE should show commit hash: `- [x] Burst N: description (abc1234)`
28
+
29
+ **Bottle naming:**
30
+ - Bottles should be named by capability, not sequence number
31
+ - Format: `### Bottle: SettingsMerger` not `### Bottle 1`
32
+
33
+ **NACK if:**
34
+ - ketchup-plan.md lacks TODO or DONE sections
35
+ - Bursts are missing dependency notation
36
+ - Bottles are named by number instead of capability
37
+
38
+ **ACK if:**
39
+ - ketchup-plan.md follows the required structure
40
+ - Or ketchup-plan.md is not in the diff
41
+
42
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: new-code-requires-tests
3
+ description: Enforces that new behavioral code has accompanying tests
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** Validate .ts and .tsx files (not config files) in the diff.
14
+
15
+ Let tests drive all code. New behavioral code requires tests.
16
+
17
+ **NACK if:**
18
+ - New .ts/.tsx files are added without corresponding .test.ts/.test.tsx files
19
+ - New conditional branches (`if`, `else`, `? :`, `??`, `||`) appear without test coverage
20
+ - Functions are added without any test calling them
21
+
22
+ **ACK if:**
23
+ - New .ts files have accompanying .test.ts files in the commit
24
+ - The diff only modifies existing code (not adding new files)
25
+ - The diff only contains config files (*.config.ts, tsconfig.json, etc.)
26
+ - The diff only contains test files
27
+ - The new code is in an `index.ts` barrel file (re-exports only)
28
+
29
+ **Config files that don't need tests:**
30
+ - package.json, tsconfig.json, wrangler.toml
31
+ - vite.config.ts, vitest.config.ts
32
+ - .gitignore, ketchup-plan.md
33
+
34
+ **First behavioral .ts file rule:** The first non-config .ts file in a project must have a test.
35
+
36
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: no-comments
3
+ description: Enforces self-documenting code without inline comments
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** Only validate .ts and .tsx files in the diff (not .test.ts, not .md, not config files).
14
+
15
+ Code should be self-documenting. No comments to explain what code does.
16
+
17
+ **NACK if the diff adds:**
18
+ - Single-line comments: `// explanation`
19
+ - Multi-line comments: `/* explanation */`
20
+ - TODO comments: `// TODO:`, `// FIXME:`, `// HACK:`
21
+ - Explanatory comments describing what the code does
22
+
23
+ **ACK if:**
24
+ - No inline comments are added in .ts/.tsx source files
25
+ - The diff only contains .md, .json, .test.ts, or config files
26
+ - JSDoc comments for exported public APIs (these document the contract, not implementation)
27
+ - Comments that are part of string literals or template strings
28
+ - License headers at the top of files
29
+
30
+ **Refactoring guidance:** If code needs a comment to explain it, the code should be refactored instead:
31
+ - Rename variables to be self-describing
32
+ - Extract functions with descriptive names
33
+ - Simplify complex logic
34
+
35
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: no-dangerous-git
3
+ description: Blocks dangerous git commands
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** Validate git commands for dangerous operations.
14
+
15
+ These operations are forbidden and cannot be overridden:
16
+
17
+ **ALWAYS NACK if the command contains:**
18
+ - `--force` or `-f` with push (destroys remote history)
19
+ - `--no-verify` (bypasses pre-commit hooks)
20
+ - `git reset --hard` on shared branches
21
+ - `git push` to main/master with `--force`
22
+ - `git commit --amend` on already-pushed commits
23
+
24
+ **NACK reasoning:**
25
+ - `--force` can destroy team members' work
26
+ - `--no-verify` bypasses all safety checks
27
+ - These are explicitly listed as "DO NOT EVER ALLOW" in CLAUDE.md
28
+
29
+ **ACK if:**
30
+ - The git command does not contain dangerous flags
31
+ - The command is a normal commit, push, or other safe operation
32
+
33
+ **No plea system override:** These rules cannot be bypassed with a plea. They require explicit human approval outside the commit validator system.
34
+
35
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: tcr-workflow
3
+ description: Enforces Test && Commit || Revert workflow
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** Validate commit context for TCR workflow compliance.
14
+
15
+ Enforce the TCR (Test && Commit || Revert) workflow:
16
+
17
+ **Core principle:** Red → Green → TCR → Refactor → TCR → Done
18
+
19
+ **NACK if:**
20
+ - The commit message or context indicates tests are failing
21
+ - The commit appears to be "patching" failing code rather than reverting and rethinking
22
+ - Evidence suggests the commit bypasses the test-first workflow
23
+
24
+ **ACK if:**
25
+ - The commit appears to follow the TCR pattern
26
+ - Tests are expected to pass (behavioral code has accompanying tests)
27
+ - The commit represents a clean, tested change
28
+
29
+ **Note:** This validator cannot run tests itself. It validates the commit context and message for TCR compliance indicators.
30
+
31
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: testing-no-state-peeking
3
+ description: Prohibits testing internal state instead of behavior
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** Only validate .test.ts and .test.tsx files in the diff.
14
+
15
+ Tests must verify observable behavior, not internal state.
16
+
17
+ **NACK if the diff contains:**
18
+ - Private field access: `obj["privateField"]`, `service["internalMap"]`
19
+ - Bracket notation to access non-public properties
20
+ - Calls to methods that exist solely for testing: `.getCount()`, `.getActiveSessionCount()`, `.getInternalState()`
21
+ - Direct assertions on internal collections: `expect(tracker.items.length)`
22
+
23
+ **Litmus test:** "If I changed the internal data structure (e.g., Map to Array), would this test still pass?" If no, it's testing implementation.
24
+
25
+ **ACK if:**
26
+ - Tests verify via return values from public methods
27
+ - Tests verify via callbacks/events
28
+ - Tests verify via thrown exceptions
29
+ - Tests use the public API only
30
+ - The diff only contains non-test files
31
+
32
+ **Allowed patterns:**
33
+ - `tracker.onEvent(e => events.push(e))` - observable via callback
34
+ - `expect(createUser({name: 'Alice'})).toEqual({...})` - observable via return value
35
+ - Testing cleanup by re-triggering and verifying callback fires again
36
+
37
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: testing-structure
3
+ description: Enforces test structure and whole object assertions
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** Only validate .test.ts and .test.tsx files in the diff.
14
+
15
+ Enforce proper test structure:
16
+
17
+ **NACK if the diff contains:**
18
+ - Multiple execute/verify cycles in one test (squint test violation)
19
+ - Cherry-picked property assertions instead of whole object assertions
20
+ - Bad: `expect(result.id).toBe(1); expect(result.name).toBe('foo');`
21
+ - Good: `expect(result).toEqual({ id: 1, name: 'foo' })`
22
+ - Tests with multiple `expect()` calls on different operations
23
+
24
+ **Required structure (Squint Test):**
25
+ 1. SETUP - prepare test data
26
+ 2. EXECUTE - single function call
27
+ 3. VERIFY - whole object assertion
28
+
29
+ **ACK if:**
30
+ - Tests follow SETUP → EXECUTE → VERIFY pattern
31
+ - Whole objects are asserted with `toEqual({...})`
32
+ - One assertion per behavior
33
+ - The diff only contains non-test files
34
+
35
+ **Note:** Multiple `expect()` calls are OK if they assert different aspects of the SAME operation result (e.g., checking both return value and side effect callback).
36
+
37
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: testing-stubs-over-mocks
3
+ description: Prefers deterministic stubs over mocks
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** Only validate .test.ts and .test.tsx files in the diff.
14
+
15
+ Prefer deterministic stubs over mocks. Mock only at system boundaries.
16
+
17
+ **NACK if the diff contains:**
18
+ - Heavy mocking of internal modules/functions that could use stubs
19
+ - `jest.mock()` or `vi.mock()` for internal application code
20
+ - Mock implementations that could be replaced with simple stub objects
21
+ - Spy assertions on internal function calls (`toHaveBeenCalledWith` on non-boundary code)
22
+
23
+ **ACK if:**
24
+ - Deterministic stubs are used (plain objects/functions with predictable behavior)
25
+ - Mocks are only used at system boundaries:
26
+ - External APIs (fetch, axios calls)
27
+ - Databases
28
+ - File system
29
+ - Third-party services
30
+ - The diff only contains non-test files
31
+
32
+ **Stub example (preferred):**
33
+ ```typescript
34
+ const fakeRepo = { findById: (id) => ({ id, name: 'Test' }) }
35
+ ```
36
+
37
+ **Mock example (only at boundaries):**
38
+ ```typescript
39
+ vi.mock('./external-api', () => ({ fetch: vi.fn() }))
40
+ ```
41
+
42
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: testing-weak-assertions
3
+ description: Prohibits weak test assertions
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** Only validate .test.ts and .test.tsx files in the diff.
14
+
15
+ Enforce strong assertions that verify exact values:
16
+
17
+ **NACK if the diff contains:**
18
+ - `toBeDefined()` - assert the actual value instead
19
+ - `toBeTruthy()` - assert the exact truthy value
20
+ - `toBeFalsy()` - assert the exact falsy value
21
+ - `not.toBeNull()` - assert what it actually is
22
+ - `not.toBeUndefined()` - assert the actual value
23
+ - `toBeGreaterThan(0)` when exact value is known
24
+
25
+ **Preferred alternatives:**
26
+ - `toEqual({...})` for objects
27
+ - `toBe(exactValue)` for primitives
28
+ - `expect.any(String)` or `expect.any(Number)` when exact value is unknown but type is known
29
+ - `toMatch(/pattern/)` for string patterns
30
+
31
+ **ACK if:**
32
+ - Tests use strong assertions (`toEqual`, `toBe`, `toMatch`, `toThrow`)
33
+ - `expect.any()` is used for dynamic values like IDs or timestamps
34
+ - The diff only contains non-test files
35
+
36
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: type-organization
3
+ description: Enforces inline type definitions, no standalone type files
4
+ enabled: true
5
+ ---
6
+
7
+ You are a commit validator. You MUST respond with ONLY a JSON object, no other text.
8
+
9
+ Valid responses:
10
+ {"decision":"ACK"}
11
+ {"decision":"NACK","reason":"one sentence explanation"}
12
+
13
+ **Scope:** Validate file organization for type definitions.
14
+
15
+ Types must live inline where they are used, not in standalone files.
16
+
17
+ **NACK if the diff adds or modifies:**
18
+ - `types.ts` files
19
+ - `interfaces.ts` files
20
+ - `types/index.ts` or any file in a `types/` directory
21
+ - Any standalone file whose sole purpose is exporting types/interfaces
22
+
23
+ **ACK if:**
24
+ - Types are defined inline in the files that use them
25
+ - No standalone type files are created
26
+ - The diff modifies existing files without creating type-only files
27
+
28
+ **Rationale:** Types should emerge from behavior (tests). Standalone type files encourage type-first design which violates the emergent design principle.
29
+
30
+ RESPOND WITH JSON ONLY - NO PROSE, NO MARKDOWN, NO EXPLANATION OUTSIDE THE JSON.
package/README.md ADDED
@@ -0,0 +1,172 @@
1
+ # Claude Auto
2
+
3
+ **Put Claude on Auto.**
4
+
5
+ [![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE) [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue?style=flat-square)]()
6
+
7
+ ---
8
+
9
+ ## The Problem: You're an AI Babysitter
10
+
11
+ AI-assisted coding captured your cognitive load.
12
+
13
+ Every session demands your full attention. Watching, nudging, correcting. You can't walk away because you don't trust the system.
14
+
15
+ - You can't context-switch while supervising
16
+ - One task at a time, full attention required
17
+ - The bottleneck is your attention, not AI's speed
18
+
19
+ That's not multiplication. That's marginally faster serial work.
20
+
21
+ ---
22
+
23
+ ## The Solution: The Quality Stack
24
+
25
+ Claude Auto creates trust. Trust enables parallelization.
26
+
27
+ | Component | What It Does | Result |
28
+ | ------------------ | -------------------------------------------- | ------------------------------- |
29
+ | **Auto-Planner** | Generates plan from your requirements | No need to specify every detail |
30
+ | **Supervisor AI** | Validates every commit against your criteria | Automated review |
31
+ | **TCR Discipline** | Test && Commit \|\| Revert | Bad code auto-reverts |
32
+ | **Auto-Continue** | Keeps going until the plan is done | No nudging required |
33
+
34
+ The system is trustworthy. That's what frees you.
35
+
36
+ ---
37
+
38
+ ## The Multiplier: Git Worktrees
39
+
40
+ Git worktrees let you run multiple isolated workspaces from the same repo.
41
+
42
+ ```bash
43
+ # Create worktrees for parallel features
44
+ git worktree add ../feature-auth feature/auth
45
+ git worktree add ../feature-payments feature/payments
46
+ git worktree add ../feature-dashboard feature/dashboard
47
+ ```
48
+
49
+ Each runs a Claude Auto instance. All quality-validated.
50
+
51
+ | Approach | Features/Week |
52
+ | ----------------------------- | ------------- |
53
+ | Manual coding | 1 |
54
+ | AI-assisted (babysitting) | 1-2 |
55
+ | **Claude Auto + Worktrees** | **5-10** |
56
+
57
+ ---
58
+
59
+ ## Three Steps
60
+
61
+ ### 1. Install
62
+
63
+ ```bash
64
+ npx claude-auto install
65
+ ```
66
+
67
+ Feed your requirements. Claude Auto auto-generates the plan with Bottles, Bursts, and Dependencies.
68
+
69
+ ### 2. Release
70
+
71
+ Start execution and walk away. The Supervisor validates every commit. Auto-continue keeps it going until done.
72
+
73
+ ### 3. Multiply
74
+
75
+ Open another worktree. Start another instance. Three features. Five features. All in parallel.
76
+
77
+ ---
78
+
79
+ ## The Transformation
80
+
81
+ | Before (Babysitter) | After (Bionic) |
82
+ | -------------------------------- | ------------------------------ |
83
+ | Watching one AI session | Directing multiple workstreams |
84
+ | Nudging, correcting in real-time | Defining, approving, releasing |
85
+ | Serial productivity | Parallel productivity |
86
+ | Marginal gains (1.5x) | Multiplicative gains (5-10x) |
87
+ | Brain captured by supervision | Brain freed for the next thing |
88
+
89
+ From Babysitter to Bionic.
90
+
91
+ ---
92
+
93
+ ## Installation
94
+
95
+ ```bash
96
+ # Install Claude Auto
97
+ npx claude-auto install
98
+
99
+ # Verify installation
100
+ npx claude-auto doctor
101
+
102
+ # You're ready to become Bionic
103
+ ```
104
+
105
+ After installation, claude-auto automatically:
106
+
107
+ - Injects hooks that validate every commit
108
+ - Creates reminders that inject your guidelines
109
+ - Sets up file protection via deny-lists
110
+ - Merges settings with smart project/local overrides
111
+
112
+ ---
113
+
114
+ ## Authority: Battle-Tested
115
+
116
+ Built on foundations from Kent Beck's TCR and Extreme Programming principles. Refined through production features at Auto.
117
+
118
+ The on.auto team ships 5-10 features per week. Not 1-2.
119
+
120
+ **[Read the origin story →](./docs/origin-story.md)**
121
+
122
+ ---
123
+
124
+ ## CLI Reference
125
+
126
+ | Command | Description |
127
+ | ------------------------- | --------------------------------------------------- |
128
+ | `claude-auto install` | Install and configure claude-auto in your project |
129
+ | `claude-auto init` | Initialize configuration |
130
+ | `claude-auto status` | Show symlink status for hook scripts and reminders |
131
+ | `claude-auto doctor` | Diagnose installation health |
132
+ | `claude-auto repair` | Recreate broken or missing symlinks |
133
+ | `claude-auto reminders` | List active reminders with metadata |
134
+ | `claude-auto clean-logs` | Remove old log files (use `--older-than=N` to keep N recent logs) |
135
+
136
+ ---
137
+
138
+ ## Documentation
139
+
140
+ | Guide | Description |
141
+ | ------------------------------------------------ | ------------------------------- |
142
+ | [Getting Started](./docs/getting-started.md) | 5-minute transformation |
143
+ | [Installation](./docs/installation.md) | Detailed installation guide |
144
+ | [The Quality Stack](./docs/ketchup-technique.md) | Why you can walk away |
145
+ | [Configuration](./docs/configuration.md) | All configuration options |
146
+ | [Hooks Guide](./docs/hooks-guide.md) | Configure your supervision |
147
+ | [Reminders Guide](./docs/reminders-guide.md) | Context injection system |
148
+ | [Validators Guide](./docs/validators-guide.md) | Commit validation rules |
149
+ | [API Reference](./docs/api-reference.md) | Programmatic access |
150
+ | [Architecture](./docs/architecture.md) | System design internals |
151
+
152
+ ---
153
+
154
+ ## Development
155
+
156
+ ```bash
157
+ git clone https://github.com/BeOnAuto/claude-auto.git
158
+ cd claude-auto
159
+ pnpm install
160
+ pnpm test
161
+ pnpm build
162
+ ```
163
+
164
+ ---
165
+
166
+ ## License
167
+
168
+ MIT © 2025 BeOnAuto, Inc.
169
+
170
+ See [LICENSE](LICENSE) for details.
171
+
172
+ ---
package/bin/cli.ts ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { createCli } from '../src/cli/cli.js';
4
+
5
+ const program = createCli();
6
+ program.parse();
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../bin/cli.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const cli_js_1 = require("../src/cli/cli.js");
5
+ const program = (0, cli_js_1.createCli)();
6
+ program.parse();
7
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../bin/cli.ts"],"names":[],"mappings":";;;AAEA,8CAA8C;AAE9C,MAAM,OAAO,GAAG,IAAA,kBAAS,GAAE,CAAC;AAC5B,OAAO,CAAC,KAAK,EAAE,CAAC"}