@joshuafolkken/kit 1.1178.0 → 1.1229.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (425) hide show
  1. package/.claude/.claude-plugin/plugin.json +1 -1
  2. package/.claude/settings.json +2 -2
  3. package/.claude/skills/dependency-update/SKILL.md +4 -8
  4. package/.claude/skills/epic-commands/SKILL.md +2 -2
  5. package/.claude/skills/epic-commands/epic-bundle.md +1 -1
  6. package/.claude/skills/workflow-commands/SKILL.md +2 -4
  7. package/.claude/skills/workflow-commands/backlogrun-child.md +6 -4
  8. package/.claude/skills/workflow-commands/backlogrun-lanes.md +6 -2
  9. package/.claude/skills/workflow-commands/backlogrun-park.md +23 -2
  10. package/.claude/skills/workflow-commands/backlogrun-progress.md +7 -2
  11. package/.claude/skills/workflow-commands/backlogrun-recovery.md +4 -3
  12. package/.claude/skills/workflow-commands/backlogrun-steps.md +21 -13
  13. package/.claude/skills/workflow-commands/chain-rule.md +1 -1
  14. package/.claude/skills/workflow-commands/delegation.md +2 -2
  15. package/.claude/skills/workflow-commands/followup.md +5 -0
  16. package/.claude/skills/workflow-commands/fullrun-steps.md +1 -1
  17. package/.claude/skills/workflow-commands/halfrun.md +1 -1
  18. package/.claude/skills/workflow-commands/issue-scout.md +1 -1
  19. package/.claude/skills/workflow-commands/kickoff.md +1 -1
  20. package/.claude/skills/workflow-commands/observation-ledger.md +3 -3
  21. package/.claude/skills/workflow-commands/pre-gate-cut.md +6 -1
  22. package/.claude/skills/workflow-commands/prerequisite.md +2 -2
  23. package/.claude/skills/workflow-commands/progress-watcher.md +1 -1
  24. package/.claude/skills/workflow-commands/working-tree-hold.md +1 -1
  25. package/.codex/hooks.json +2 -2
  26. package/.cursorrules +6 -41
  27. package/.github/actions/setup-node/action.yml +1 -1
  28. package/.github/workflows/auto-tag.yml +3 -4
  29. package/.github/workflows/ci.yml +32 -31
  30. package/.github/workflows/dependabot-auto-merge.yml +13 -6
  31. package/.github/workflows/publish.yml +48 -4
  32. package/.github/workflows/sonar-qube.yml +3 -0
  33. package/.pnpmfile.mjs +4 -3
  34. package/.prettierignore +8 -2
  35. package/CLAUDE.md +18 -20
  36. package/README.md +26 -19
  37. package/SECURITY.md +15 -1
  38. package/dist/CLAUDE.md +18 -20
  39. package/dist/commands/document-section-cli.js +734 -0
  40. package/dist/hooks/audit-provision.js +346 -0
  41. package/dist/hooks/batch-guard.js +5 -4
  42. package/dist/hooks/{chunk-S6X6WYKR.js → chunk-55HHG5PX.js} +1210 -711
  43. package/dist/hooks/{chunk-ZAL3NRGL.js → chunk-5VMKCCC4.js} +25 -10
  44. package/dist/hooks/chunk-5VNDSNG3.js +12 -0
  45. package/dist/hooks/{chunk-32GQTL4F.js → chunk-6HJJXRBX.js} +4 -2
  46. package/dist/hooks/chunk-CDY4NFQG.js +15 -0
  47. package/dist/hooks/chunk-ELCN5LCH.js +135 -0
  48. package/dist/hooks/{chunk-VESKRQOF.js → chunk-F56MFS4B.js} +3 -3
  49. package/dist/hooks/{chunk-UAGLLIGZ.js → chunk-FIVDHQGT.js} +7 -6
  50. package/dist/hooks/{chunk-3V37IID6.js → chunk-JBBMAPC4.js} +23 -14
  51. package/dist/hooks/{chunk-G6KRCKEC.js → chunk-JUDKDCDP.js} +496 -378
  52. package/dist/hooks/{chunk-GDS5N2KB.js → chunk-NV2JRZZO.js} +718 -681
  53. package/dist/hooks/{chunk-VQLLNFNT.js → chunk-RNWHN5BP.js} +3 -3
  54. package/dist/hooks/{chunk-DO6NWWHU.js → chunk-TQNPDZNH.js} +4 -4
  55. package/dist/hooks/{chunk-I4XSL4TT.js → chunk-VC3PZPZO.js} +1 -1
  56. package/dist/hooks/codex-hook-adapter.js +14 -12
  57. package/dist/hooks/duplicate-read-guard.js +6 -5
  58. package/dist/hooks/format-edited.js +4 -3
  59. package/dist/hooks/inputs.json +217 -195
  60. package/dist/hooks/investigation-guard.js +6 -5
  61. package/dist/hooks/pretool-guard.js +12 -10
  62. package/dist/hooks/session-lang.js +2 -4
  63. package/dist/hooks/stop-guard.js +66 -58
  64. package/dist/josh.js +868 -74
  65. package/dist/version/index.d.ts +7 -2
  66. package/dist/version/index.js +152 -75
  67. package/eslint/base.js +23 -1
  68. package/eslint/rules/code-quality.js +3 -0
  69. package/eslint/rules/early-return-one-liner.js +98 -0
  70. package/eslint/rules/unicorn.js +16 -1
  71. package/package.json +7 -6
  72. package/pnpm-workspace.yaml +9 -4
  73. package/prettier/basic.d.ts +3 -1
  74. package/prettier/index.d.ts +3 -1
  75. package/prettier/static.d.ts +3 -1
  76. package/prompts/coding-standards.md +1 -1
  77. package/prompts/collaboration-workflow/file-edits.md +4 -4
  78. package/prompts/collaboration-workflow/glossary.md +1 -1
  79. package/prompts/collaboration-workflow/operating-rules.md +17 -9
  80. package/prompts/collaboration-workflow/overview.md +2 -2
  81. package/prompts/collaboration-workflow/principles.md +14 -12
  82. package/prompts/collaboration-workflow/report-format.md +1 -1
  83. package/prompts/collaboration-workflow/residency.md +1 -1
  84. package/prompts/collaboration-workflow/rule-delivery.md +6 -6
  85. package/prompts/collaboration-workflow/shell-body.md +6 -6
  86. package/prompts/collaboration-workflow/turn-batching.md +1 -1
  87. package/prompts/collaboration-workflow/upstream-interrupt.md +12 -2
  88. package/prompts/collaboration-workflow/wip-cap.md +10 -10
  89. package/prompts/review-rubric.md +1 -2
  90. package/prompts/review.md +1 -1
  91. package/scripts/agent/agent-headless.ts +29 -0
  92. package/scripts/agent/agent-launch-environment.ts +6 -2
  93. package/scripts/agent/codex-agent-argv.ts +2 -1
  94. package/scripts/auto-ok/auto-ok-cli.ts +1 -1
  95. package/scripts/backlog/backlog-arrival.ts +3 -3
  96. package/scripts/backlog/backlog-budget.ts +1 -1
  97. package/scripts/backlog/backlog-drive-args.ts +135 -0
  98. package/scripts/backlog/backlog-drive-cli.ts +11 -137
  99. package/scripts/backlog/backlog-drive-launch.ts +39 -0
  100. package/scripts/backlog/backlog-drive-named-offer.ts +3 -5
  101. package/scripts/backlog/backlog-drive-named.ts +3 -3
  102. package/scripts/backlog/backlog-drive-offer-argv.ts +1 -1
  103. package/scripts/backlog/backlog-drive-owner.ts +1 -1
  104. package/scripts/backlog/backlog-drive-restore.ts +1 -1
  105. package/scripts/backlog/backlog-drive-retrospective.ts +1 -1
  106. package/scripts/backlog/backlog-drive.ts +1 -1
  107. package/scripts/backlog/backlog-next.ts +16 -5
  108. package/scripts/backlog/backlog-offer-cli.ts +6 -6
  109. package/scripts/backlog/backlog-offer.ts +1 -1
  110. package/scripts/backlog/backlog-plan-cli.ts +1 -1
  111. package/scripts/backlog/backlog-pool.ts +57 -11
  112. package/scripts/backlog/backlog-ready.ts +1 -1
  113. package/scripts/backlog/backlog-scope.ts +1 -1
  114. package/scripts/backlog/backlog-stalled-detect.ts +2 -2
  115. package/scripts/backlog/backlog-stalled.ts +1 -1
  116. package/scripts/build/build-codex-hooks.ts +3 -1
  117. package/scripts/build/build-commands.ts +66 -0
  118. package/scripts/build/build-hooks.ts +2 -1
  119. package/scripts/build/build-library.ts +12 -3
  120. package/scripts/build/build.ts +70 -0
  121. package/scripts/build/local-bin.ts +3 -13
  122. package/scripts/delegation/investigation-reads.ts +3 -1
  123. package/scripts/discovery/repo-origin.ts +5 -5
  124. package/scripts/doctor/doctor-consumer.ts +2 -2
  125. package/scripts/doctor/doctor-io.ts +2 -3
  126. package/scripts/document/capped-print-part.ts +30 -0
  127. package/scripts/document/capped-print.ts +3 -4
  128. package/scripts/document/document-byte-budget.ts +11 -2
  129. package/scripts/document/document-scan.ts +117 -0
  130. package/scripts/document/document-section.ts +143 -16
  131. package/scripts/document/entry-read-budget.ts +5 -3
  132. package/scripts/document/entry-read-set.ts +10 -89
  133. package/scripts/document/read-set-cost.ts +98 -0
  134. package/scripts/epic/epic-add-body.ts +1 -0
  135. package/scripts/epic/epic-audit-checks.ts +1 -1
  136. package/scripts/epic/epic-audit-rationale.ts +4 -3
  137. package/scripts/epic/epic-bundle-cli.ts +14 -3
  138. package/scripts/epic/epic-bundle-poll.ts +41 -0
  139. package/scripts/epic/epic-busy.ts +1 -1
  140. package/scripts/epic/epic-candidate-confirm.ts +3 -2
  141. package/scripts/epic/epic-classify.ts +1 -1
  142. package/scripts/epic/epic-cli-argv.ts +78 -46
  143. package/scripts/epic/epic-cli-remove.ts +11 -19
  144. package/scripts/epic/epic-cli.ts +74 -73
  145. package/scripts/epic/epic-close-comment.ts +1 -1
  146. package/scripts/epic/epic-close.ts +1 -1
  147. package/scripts/epic/epic-cross-repo.ts +5 -5
  148. package/scripts/epic/epic-graph.ts +1 -1
  149. package/scripts/epic/epic-index.ts +1 -1
  150. package/scripts/epic/epic-issue.ts +2 -6
  151. package/scripts/epic/epic-lane-offer.ts +2 -2
  152. package/scripts/epic/epic-next.ts +29 -42
  153. package/scripts/epic/epic-solo-stale.ts +1 -1
  154. package/scripts/epic/epic-triage.ts +8 -4
  155. package/scripts/epic/epic-validate.ts +1 -1
  156. package/scripts/followup/git-followup-finish.ts +2 -2
  157. package/scripts/followup/git-followup-label.ts +2 -2
  158. package/scripts/followup/git-followup-merged.ts +2 -2
  159. package/scripts/followup/git-pr-followup-checks.ts +142 -0
  160. package/scripts/followup/git-pr-followup.ts +4 -129
  161. package/scripts/gate/core-budget.ts +69 -1
  162. package/scripts/gate/gate-plan.ts +47 -7
  163. package/scripts/gate/gate-skip.ts +38 -7
  164. package/scripts/gate/hook-gate-reuse.ts +12 -10
  165. package/scripts/gate/pre-commit-type-check.ts +4 -1
  166. package/scripts/gate/project-checks.ts +6 -9
  167. package/scripts/gate/type-check-step.ts +2 -3
  168. package/scripts/gate/verification-gate.ts +27 -8
  169. package/scripts/gh/git-gh-api-path.ts +2 -2
  170. package/scripts/gh/git-gh-issue-rest.ts +3 -3
  171. package/scripts/gh/git-gh-issue-write.ts +53 -7
  172. package/scripts/gh/git-gh-pr-read.ts +64 -19
  173. package/scripts/gh/git-gh-pr-rest.ts +1 -1
  174. package/scripts/gh/git-gh-pr.ts +5 -1
  175. package/scripts/gh/git-pr-ai-review.ts +1 -1
  176. package/scripts/gh/git-pr-checks-eval.ts +1 -3
  177. package/scripts/gh/git-pr-checks-parse.ts +1 -1
  178. package/scripts/gh/git-pr-checks-watch.ts +6 -5
  179. package/scripts/gh/git-pr-checks.ts +7 -5
  180. package/scripts/gh/git-pr-coderabbit.ts +1 -1
  181. package/scripts/gh/git-pr-error.ts +1 -3
  182. package/scripts/gh/git-pr.ts +9 -13
  183. package/scripts/gh/github-issue-url.ts +2 -2
  184. package/scripts/git/constants.ts +2 -6
  185. package/scripts/git/git-command.ts +20 -218
  186. package/scripts/git/git-diff-reads.ts +225 -0
  187. package/scripts/git/git-error.ts +4 -12
  188. package/scripts/git/git-pre-push-hook.ts +139 -0
  189. package/scripts/git/git-prompt.ts +2 -6
  190. package/scripts/git/git-spawn-sync.ts +3 -1
  191. package/scripts/git/git-spawn.ts +1 -1
  192. package/scripts/git/git-staging.ts +4 -6
  193. package/scripts/git/git-status.ts +3 -9
  194. package/scripts/hooks/codex-hook-adapter.ts +1 -1
  195. package/scripts/hooks/edited-cspell.ts +2 -4
  196. package/scripts/hooks/format-edited-file.ts +3 -12
  197. package/scripts/hooks/pre-push-unit.ts +31 -9
  198. package/scripts/hooks/reserved-run.ts +2 -2
  199. package/scripts/hooks/run-hook.sh +5 -4
  200. package/scripts/hooks/stop-guard.ts +5 -3
  201. package/scripts/init/init-actions.ts +0 -5
  202. package/scripts/init/init-ai-copy.ts +13 -2
  203. package/scripts/init/init-logic-json-merge.ts +19 -0
  204. package/scripts/init/init-logic-secretlint.ts +7 -7
  205. package/scripts/init/init-logic-workspace.ts +41 -2
  206. package/scripts/init/init-logic.ts +16 -26
  207. package/scripts/init/init.ts +5 -15
  208. package/scripts/init/initial-commit.ts +4 -4
  209. package/scripts/init/kit-development-versions.ts +40 -0
  210. package/scripts/init/kit-setup-state.ts +2 -2
  211. package/scripts/init/start-exec.ts +68 -19
  212. package/scripts/init/start-setup-pr.ts +9 -9
  213. package/scripts/init/start-steps.ts +6 -10
  214. package/scripts/issue/defect-rate-cli.ts +1 -1
  215. package/scripts/issue/git-next-issues.ts +1 -1
  216. package/scripts/issue/issue-auto-ok.ts +1 -1
  217. package/scripts/issue/issue-backlinks-cli.ts +2 -2
  218. package/scripts/issue/issue-backlinks.ts +9 -9
  219. package/scripts/issue/issue-comment-cli.ts +19 -13
  220. package/scripts/issue/issue-file-cli.ts +45 -18
  221. package/scripts/issue/issue-file.ts +24 -1
  222. package/scripts/issue/issue-scout-closed.ts +1 -1
  223. package/scripts/issue/issue-state-cli.ts +30 -74
  224. package/scripts/josh/josh-command-map.ts +2 -0
  225. package/scripts/josh/josh-command-types.ts +11 -0
  226. package/scripts/josh/josh-commands-ai.ts +4 -4
  227. package/scripts/josh/josh-commands-backlog.ts +4 -1
  228. package/scripts/josh/josh-commands-development.ts +10 -0
  229. package/scripts/josh/josh-commands-document.ts +1 -0
  230. package/scripts/josh/josh-commands-lane.ts +22 -0
  231. package/scripts/josh/josh-commands-maintenance.ts +4 -4
  232. package/scripts/josh/josh-commands-run.ts +12 -7
  233. package/scripts/josh/josh-in-process.ts +28 -9
  234. package/scripts/josh/josh-logic.ts +33 -15
  235. package/scripts/josh/process-identity.ts +1 -3
  236. package/scripts/josh/session-language-cli.ts +3 -4
  237. package/scripts/lane/lane-await.ts +5 -1
  238. package/scripts/lane/lane-child-invocation.ts +2 -2
  239. package/scripts/lane/lane-cli.ts +3 -3
  240. package/scripts/lane/lane-dispatch.ts +14 -10
  241. package/scripts/lane/lane-environment.ts +5 -1
  242. package/scripts/lane/lane-handoff.ts +1 -1
  243. package/scripts/lane/lane-install.ts +2 -13
  244. package/scripts/lane/lane-launch-cli.ts +15 -1
  245. package/scripts/lane/lane-ledger.ts +145 -0
  246. package/scripts/lane/lane-leftover.ts +1 -1
  247. package/scripts/lane/lane-load.ts +108 -0
  248. package/scripts/lane/lane-measure-cli.ts +149 -0
  249. package/scripts/lane/lane-occupancy.ts +3 -0
  250. package/scripts/lane/lane-reap.ts +1 -3
  251. package/scripts/lane/lane-relaunch.ts +1 -1
  252. package/scripts/lane/lane-stats.ts +224 -0
  253. package/scripts/lane/lane-vacant.ts +36 -0
  254. package/scripts/lane/openai-lane-ship.ts +2 -2
  255. package/scripts/lane/openai-lane-supervisor-owner.ts +180 -0
  256. package/scripts/lane/openai-lane-supervisor.ts +7 -165
  257. package/scripts/lane/openai-review-broker.ts +2 -4
  258. package/scripts/lib/ancestor-directories.ts +35 -0
  259. package/scripts/lib/animation-helpers.ts +2 -2
  260. package/scripts/lib/buffered-process.ts +3 -7
  261. package/scripts/lib/cli-flags.ts +71 -1
  262. package/scripts/lib/spawn-exit.ts +2 -2
  263. package/scripts/lib/timeouts.ts +35 -2
  264. package/scripts/lines/line-budget.ts +4 -6
  265. package/scripts/notify/telegram-test.ts +6 -0
  266. package/scripts/observations/observation-ledger-line.ts +6 -6
  267. package/scripts/observations/observation-ledger-migrate.ts +55 -4
  268. package/scripts/observations/observation-ledger.ts +26 -7
  269. package/scripts/overrides/lockfile-overrides.ts +1 -1
  270. package/scripts/overrides/overrides-logic.ts +1 -1
  271. package/scripts/propagate/propagate-git.ts +1 -1
  272. package/scripts/propagate/propagate-publish.ts +2 -2
  273. package/scripts/propagate/propagate-steps.ts +20 -15
  274. package/scripts/propagate/propagate.ts +36 -27
  275. package/scripts/refactor/import-graph.ts +18 -1
  276. package/scripts/refactor/refactor-lint.ts +4 -4
  277. package/scripts/repo/repository-labels.ts +2 -2
  278. package/scripts/repo/required-checks-logic.ts +1 -3
  279. package/scripts/review/live-evidence.ts +2 -4
  280. package/scripts/review/review-brief-cli.ts +1 -1
  281. package/scripts/review/review-finding-ledger.ts +1 -1
  282. package/scripts/review/review-findings-cli.ts +1 -3
  283. package/scripts/rules/decision-oracle-batch.ts +128 -0
  284. package/scripts/rules/decision-oracle-tokens.ts +21 -0
  285. package/scripts/rules/decision-oracle.ts +8 -120
  286. package/scripts/rules/delivered-rules.ts +26 -182
  287. package/scripts/rules/direct-filing.ts +1 -1
  288. package/scripts/rules/early-heartbeat.ts +3 -3
  289. package/scripts/rules/git-argv.ts +1 -1
  290. package/scripts/rules/git-force.ts +1 -1
  291. package/scripts/rules/implementation-cut.ts +2 -2
  292. package/scripts/rules/index-guard.ts +1 -1
  293. package/scripts/rules/issue-comments.ts +118 -0
  294. package/scripts/rules/{issue-fold.ts → issue-fold-rule.ts} +2 -2
  295. package/scripts/rules/lane-background.ts +2 -2
  296. package/scripts/rules/lane-park.ts +18 -0
  297. package/scripts/rules/lane-split-park.ts +128 -0
  298. package/scripts/rules/oracle-firing.ts +1 -1
  299. package/scripts/rules/poll-loop.ts +1 -1
  300. package/scripts/rules/pre-gate-cut.ts +1 -1
  301. package/scripts/rules/protected-files.ts +59 -4
  302. package/scripts/rules/{run-tail.ts → run-tail-rule.ts} +2 -2
  303. package/scripts/rules/shell-body-trigger.ts +1 -1
  304. package/scripts/rules/stop-rules.ts +18 -7
  305. package/scripts/rules/test-declared-commit.ts +4 -4
  306. package/scripts/rules/wip-cap.ts +63 -0
  307. package/scripts/run/{run-carry-args.ts → carry/run-carry-args.ts} +37 -13
  308. package/scripts/run/{run-carry-change.ts → carry/run-carry-change.ts} +29 -7
  309. package/scripts/run/{run-carry-cli.ts → carry/run-carry-cli.ts} +4 -6
  310. package/scripts/run/{run-carry.ts → carry/run-carry.ts} +1 -1
  311. package/scripts/run/{run-cut-args.ts → cut/run-cut-args.ts} +1 -1
  312. package/scripts/run/{run-cut-cli.ts → cut/run-cut-cli.ts} +2 -2
  313. package/scripts/run/{run-cut.ts → cut/run-cut.ts} +1 -1
  314. package/scripts/run/{run-entry-cli.ts → entry/run-entry-cli.ts} +11 -11
  315. package/scripts/run/{run-entry.ts → entry/run-entry.ts} +2 -2
  316. package/scripts/run/{run-event-scope.ts → event/run-event-scope.ts} +1 -1
  317. package/scripts/run/{run-event-stream-emit.ts → event/run-event-stream-emit.ts} +1 -1
  318. package/scripts/run/{run-event-stream.ts → event/run-event-stream.ts} +16 -2
  319. package/scripts/run/{run-hold-cli.ts → hold/run-hold-cli.ts} +5 -5
  320. package/scripts/run/{run-merge-cli.ts → merge/run-merge-cli.ts} +10 -5
  321. package/scripts/run/{run-merge-steps.ts → merge/run-merge-steps.ts} +53 -5
  322. package/scripts/run/{run-merge.ts → merge/run-merge.ts} +1 -1
  323. package/scripts/run/{run-progress-cli.ts → progress/run-progress-cli.ts} +1 -1
  324. package/scripts/run/{run-progress-config.ts → progress/run-progress-config.ts} +2 -17
  325. package/scripts/run/{run-progress-read.ts → progress/run-progress-read.ts} +5 -5
  326. package/scripts/run/{run-progress.ts → progress/run-progress.ts} +1 -1
  327. package/scripts/run/{run-review-steps.ts → review/run-review-steps.ts} +2 -3
  328. package/scripts/run/run-ending.ts +2 -2
  329. package/scripts/run/run-halfrun-resume.ts +6 -1
  330. package/scripts/run/run-headless.ts +1 -1
  331. package/scripts/run/run-invocation.ts +85 -84
  332. package/scripts/run/run-liveness.ts +1 -1
  333. package/scripts/run/run-parent-cut-hook.ts +1 -1
  334. package/scripts/run/run-preflight.ts +6 -6
  335. package/scripts/run/run-prep-cli.ts +1 -1
  336. package/scripts/run/run-prrun-resume.ts +1 -1
  337. package/scripts/run/run-report-cli.ts +4 -4
  338. package/scripts/run/run-report.ts +2 -2
  339. package/scripts/run/run-status-cli.ts +1 -1
  340. package/scripts/run/run-step-cli.ts +3 -3
  341. package/scripts/run/run-step.ts +2 -2
  342. package/scripts/run/run-stop-notify.ts +1 -1
  343. package/scripts/run/run-stranded-detect.ts +4 -4
  344. package/scripts/run/run-stranded.ts +2 -2
  345. package/scripts/run/run-watcher-guard-cli.ts +1 -1
  346. package/scripts/run/run-watcher-guard.ts +5 -3
  347. package/scripts/run/run-watcher-hook.ts +1 -1
  348. package/scripts/run/{run-ship-cli.ts → ship/run-ship-cli.ts} +2 -2
  349. package/scripts/run/{run-ship-detach.ts → ship/run-ship-detach.ts} +3 -3
  350. package/scripts/run/ship/run-ship-lock.ts +50 -0
  351. package/scripts/run/{run-ship-preflight.ts → ship/run-ship-preflight.ts} +6 -2
  352. package/scripts/run/{run-ship-probe.ts → ship/run-ship-probe.ts} +2 -2
  353. package/scripts/run/{run-ship-return.ts → ship/run-ship-return.ts} +4 -3
  354. package/scripts/run/{run-ship-review-steps.ts → ship/run-ship-review-steps.ts} +3 -3
  355. package/scripts/run/{run-ship-scoped.ts → ship/run-ship-scoped.ts} +10 -1
  356. package/scripts/run/{run-ship-steps.ts → ship/run-ship-steps.ts} +11 -12
  357. package/scripts/run/ship/run-ship-stop-text.ts +13 -0
  358. package/scripts/run/{run-ship-sync.ts → ship/run-ship-sync.ts} +25 -11
  359. package/scripts/run/{run-tidy-lanes.ts → tidy/run-tidy-lanes.ts} +1 -1
  360. package/scripts/run/{run-wake-cli.ts → wake/run-wake-cli.ts} +23 -8
  361. package/scripts/run/{run-wake-describe.ts → wake/run-wake-describe.ts} +3 -3
  362. package/scripts/run/{run-wake-driver.ts → wake/run-wake-driver.ts} +59 -8
  363. package/scripts/run/{run-wake-handoff.ts → wake/run-wake-handoff.ts} +1 -1
  364. package/scripts/run/{run-wake-loop.ts → wake/run-wake-loop.ts} +8 -2
  365. package/scripts/run/wake/run-wake-restart.ts +58 -0
  366. package/scripts/run/{run-wake-session.ts → wake/run-wake-session.ts} +3 -3
  367. package/scripts/run/{run-wake.ts → wake/run-wake.ts} +1 -1
  368. package/scripts/safe-chain/preinstall-command.ts +20 -21
  369. package/scripts/safe-chain/project-config.ts +19 -15
  370. package/scripts/sync/sync-ai-files.ts +1 -1
  371. package/scripts/sync/sync-configs.ts +2 -1
  372. package/scripts/sync/sync.ts +15 -2
  373. package/scripts/test/unit-worker-share.ts +1 -0
  374. package/scripts/time-runtime/time-background.ts +5 -1
  375. package/scripts/time-runtime/time-instant.ts +3 -1
  376. package/scripts/time-runtime/time-spans.ts +6 -139
  377. package/scripts/time-runtime/time-tool-call.ts +160 -0
  378. package/scripts/version/effective-upstream.ts +2 -20
  379. package/scripts/version/latest-corepack.ts +17 -17
  380. package/scripts/version/latest-regression.ts +1 -1
  381. package/scripts/version/latest-update.ts +4 -4
  382. package/scripts/version/npm-registry.ts +20 -5
  383. package/scripts/version/publishable-range-check.ts +2 -2
  384. package/scripts/version/publishable-range.ts +1 -1
  385. package/scripts/version/release-age.ts +48 -38
  386. package/scripts/version/release-hold.ts +1 -1
  387. package/scripts/version/safe-chain-version-update.ts +40 -0
  388. package/scripts/version/upgrade-shell-command.ts +48 -8
  389. package/scripts/version/version-check-logic.ts +23 -14
  390. package/scripts/version/version-commands.ts +23 -11
  391. package/scripts/version/version-remote.ts +28 -13
  392. package/templates/pnpm-workspace.basic.yaml +4 -0
  393. package/templates/workflows/dependabot-auto-merge.yml +5 -5
  394. package/templates/workflows/github-release.yml +2 -0
  395. package/scripts/build/build-config-merge.ts +0 -27
  396. package/scripts/build/build-managed-marker.ts +0 -27
  397. package/scripts/build/build-self-sync-guard.ts +0 -27
  398. package/scripts/build/build-version.ts +0 -26
  399. package/scripts/version/preinstall-version-update.ts +0 -86
  400. /package/scripts/git/{schemas.ts → git-schemas.ts} +0 -0
  401. /package/scripts/overrides/{schemas.ts → overrides-schemas.ts} +0 -0
  402. /package/scripts/run/{run-carry-conversation.ts → carry/run-carry-conversation.ts} +0 -0
  403. /package/scripts/run/{run-carry-reclaim.ts → carry/run-carry-reclaim.ts} +0 -0
  404. /package/scripts/run/{run-carry-stash.ts → carry/run-carry-stash.ts} +0 -0
  405. /package/scripts/run/{run-carry-streak.ts → carry/run-carry-streak.ts} +0 -0
  406. /package/scripts/run/{run-cut-handoff.ts → cut/run-cut-handoff.ts} +0 -0
  407. /package/scripts/run/{run-cut-report.ts → cut/run-cut-report.ts} +0 -0
  408. /package/scripts/run/{run-entry-stop.ts → entry/run-entry-stop.ts} +0 -0
  409. /package/scripts/run/{run-event-cli.ts → event/run-event-cli.ts} +0 -0
  410. /package/scripts/run/{run-event-follow.ts → event/run-event-follow.ts} +0 -0
  411. /package/scripts/run/{run-event-render.ts → event/run-event-render.ts} +0 -0
  412. /package/scripts/run/{run-event-watch.ts → event/run-event-watch.ts} +0 -0
  413. /package/scripts/run/{run-hold.ts → hold/run-hold.ts} +0 -0
  414. /package/scripts/run/{run-progress-args.ts → progress/run-progress-args.ts} +0 -0
  415. /package/scripts/run/{run-progress-clock.ts → progress/run-progress-clock.ts} +0 -0
  416. /package/scripts/run/{run-review-cli.ts → review/run-review-cli.ts} +0 -0
  417. /package/scripts/run/{run-review.ts → review/run-review.ts} +0 -0
  418. /package/scripts/run/{run-ship-next.ts → ship/run-ship-next.ts} +0 -0
  419. /package/scripts/run/{run-ship-pre-detach.ts → ship/run-ship-pre-detach.ts} +0 -0
  420. /package/scripts/run/{run-ship-review.ts → ship/run-ship-review.ts} +0 -0
  421. /package/scripts/run/{run-ship-stage.ts → ship/run-ship-stage.ts} +0 -0
  422. /package/scripts/run/{run-ship.ts → ship/run-ship.ts} +0 -0
  423. /package/scripts/run/{run-tidy-cli.ts → tidy/run-tidy-cli.ts} +0 -0
  424. /package/scripts/run/{run-tidy-stashes.ts → tidy/run-tidy-stashes.ts} +0 -0
  425. /package/scripts/run/{run-tidy.ts → tidy/run-tidy.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kit",
3
- "description": "joshuafolkken/kit distributed skills: the Issue-driven workflow commands (kickoff/fullrun/halfrun/backlogrun), the epic:* commands, the post-dependency-update verification, the UI-verification gate.",
3
+ "description": "joshuafolkken/kit distributed skills: the Issue-driven workflow commands (kickoff/fullrun/halfrun/prrun/backlogrun), the epic:* commands, the post-dependency-update verification, the UI-verification gate.",
4
4
  "author": {
5
5
  "name": "joshuafolkken",
6
6
  "url": "https://github.com/joshuafolkken"
@@ -46,11 +46,11 @@
46
46
  "hooks": {
47
47
  "SessionStart": [
48
48
  {
49
- "matcher": "",
49
+ "matcher": "startup",
50
50
  "hooks": [
51
51
  {
52
52
  "type": "command",
53
- "command": "pnpm josh audit:provision",
53
+ "command": "project_root=\"$(env -u GIT_ALTERNATE_OBJECT_DIRECTORIES -u GIT_COMMON_DIR -u GIT_DIR -u GIT_INDEX_FILE -u GIT_NAMESPACE -u GIT_OBJECT_DIRECTORY -u GIT_WORK_TREE git rev-parse --show-toplevel 2>/dev/null || git rev-parse --show-toplevel)\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh audit-provision",
54
54
  "timeout": 180
55
55
  }
56
56
  ]
@@ -69,11 +69,7 @@ than `josh latest`.
69
69
 
70
70
  ## 4. When the bump breaks something — fix forward
71
71
 
72
- Adopt the newest versions by default and resolve breakage **forward**: fix consumer code where a new
73
- rule or error is legitimate, and add or scope rule overrides at the correct layer (the shared kit /
74
- app-kit config), not as an ad-hoc consumer disable. When the breakage originates in a first-party
75
- package, file an issue there rather than only working around it in the consumer.
76
-
77
- Pinning back is a **last resort**, only when fixing forward is genuinely blocked. Record why, and
78
- open a tracking issue to return to latest. Fix-forward never authorizes a silent edit to a protected
79
- pin: the approval gates in sections 1–3 still apply.
72
+ The procedure — latest-first, fix forward at the correct layer, pin back only as a last resort with a
73
+ tracking issue — has its single source in
74
+ `prompts/collaboration-workflow/principles.md` → "latest-first". Fix-forward never authorizes a silent edit to a protected pin: the
75
+ approval gates in sections 1–3 still apply.
@@ -166,7 +166,7 @@ command prints a ⚠️ line naming that child rather than reporting a reorderin
166
166
  `owner/repo#number` and kept by the epic named earlier; withheld there, it stays withheld, because a
167
167
  `blocked-by` relation belongs to the issue rather than to the epic listing it. **One unusable graph
168
168
  refuses the whole answer**, and **one reference that does not parse fails the read** rather than
169
- being dropped. `docs/josh-commands-automation.md` → "`josh epic:next`" carries the worked form.
169
+ being dropped. `docs/josh-commands-backlog.md` → "`josh epic:next`" carries the worked form.
170
170
 
171
171
  **An `in-progress` issue occupies a lane rather than the whole repository.** The occupancy is counted
172
172
  from that repository's own `in-progress` listing — never from anything the session remembers, since
@@ -209,7 +209,7 @@ inherits; open and tracked by none, the child waits on a person and the
209
209
  blocker is named on standard error; a state the relation did not carry reads as waiting. **So an order
210
210
  between two epics is recorded with a native `blocked-by` relation and honoured by naming both epics**
211
211
  — `epic:next 1936 1931`, or `backlog:next`, whose set is the whole opted-in backlog. The table is
212
- `docs/josh-commands-automation.md` → "`josh epic:next`".
212
+ `docs/josh-commands-backlog.md` → "`josh epic:next`".
213
213
 
214
214
  Two things stop the command rather than being worked around: a **circular dependency**, and a
215
215
  **disagreement between the epic body and the `blocked-by` relations** (an epic written before `josh`
@@ -108,7 +108,7 @@ than restated — and beside it the one thing this one deliberately refuses: whe
108
108
  already been filed, from a title comparison (joshuafolkken/kit#1252). **Both run**, and neither
109
109
  replaces the other: `pnpm josh issue:file` runs the scout before it creates the issue, and
110
110
  `epic:bundle` afterwards, from the real number and the relations recorded against it.
111
- Full behavior: `docs/josh-commands-automation.md` → "`josh issue:file`".
111
+ Full behavior: `docs/josh-commands-backlog.md` → "`josh issue:file`".
112
112
 
113
113
  **When the relation carries an order, record it** in `blocked-by` and in the epic's `Dependencies` —
114
114
  on an addition as much as on a new epic. Without it the batch survives and the reason for it does
@@ -11,10 +11,8 @@ never a procedure** (joshuafolkken/kit#3174): each rule is stated once, in the f
11
11
 
12
12
  ## 0. The rule that fires before any of them — explicit invocation
13
13
 
14
- **Never start a `kickoff` / `halfrun` / `prrun` / `fullrun` / `backlogrun` workflow (including their
15
- `#N` and `new` variants) unless the user has typed the keyword in the current turn's prompt.** Its
16
- single source is `CLAUDE.md` → "Explicit invocation required (MANDATORY)", resident because it holds
17
- when this skill is not loaded. **A session cut inside a declared budget is not a new invocation — for `backlogrun`
14
+ Its single source is `CLAUDE.md` → "Explicit invocation required (MANDATORY)", resident because it
15
+ holds when this skill is not loaded. **A session cut inside a declared budget is not a new invocation — for `backlogrun`
18
16
  alone**: `backlogrun-steps.md` → "The session cut is inside the invocation".
19
17
 
20
18
  ## 1. Which file to read
@@ -94,7 +94,7 @@ child over" in `backlogrun-lanes.md` carries the command.
94
94
  JSONL. `JOSH_WORKER_MODEL` overrides Claude Code only; `JOSH_WORKER_EFFORT` covers both providers,
95
95
  and legacy `JOSH_LANE_*` applies only here. Bad markers, missing CLI/auth and failure
96
96
  refuse or park without fallback or retry.
97
- `docs/josh-commands-automation.md` → "`josh lane:dispatch`" is the single source.
97
+ `docs/josh-commands-run.md` → "`josh lane:dispatch`" is the single source.
98
98
 
99
99
  **The parent reads GitHub, never the summary.** That is `epic-child`'s verifier: a unit that reports
100
100
  a child finished without its PR merged leaves that child open, and `pnpm josh issue:state <N>` says so
@@ -118,7 +118,7 @@ summary is bounded the way it is".
118
118
  parent files what survives — `observation-filing.md`, the single source. **What the parent does with the
119
119
  rest is append it, not drop it**: an observation that cannot cite the depth-0 work it blocked
120
120
  becomes one line in the observation ledger, and a second line under the same key files it. **A
121
- child appends only to its own issue's file, `docs/maintainers/observations/<N>.md`, in its own
121
+ child appends only to its own issue's file, `.josh/observations/<N>.md`, in its own
122
122
  lane** (joshuafolkken/kit#2919) — it merges with the child's pull request, and a sibling lane's
123
123
  file is never one it touches.
124
124
  4. **Decisions taken and why**, where the decision was not already logged as an Issue comment.
@@ -190,7 +190,9 @@ and a child that skips it implements on a stale main. Only the dependency update
190
190
  lanes it changes hands**: no lane can switch to the default branch, so the parent runs it in the primary
191
191
  checkout **before each `lane:open`**. **And in a lane `josh latest` is not even asked** — `latest:scope`
192
192
  skips and `latest:guard` refuses. The stash that carries the lock file into the first lane is in
193
- `backlogrun-lanes.md` → "Once per repository, before the first lane opens".
193
+ `backlogrun-lanes.md` → "Once per repository, before the first lane opens": the parent runs the update
194
+ and pushes the stash in the primary checkout before `backlog:drive` starts, and the driver passes it
195
+ to the first lane it launches.
194
196
 
195
197
  This is the same rule `latest-gate.md` is the single source of.
196
198
 
@@ -204,6 +206,6 @@ session".
204
206
  `pnpm josh run:hold <N>`, the first call of the child's `fullrun`, checks for an interrupted run's
205
207
  leftovers before it claims the tree, and prints the step for each answer (`reclaim` / `resume` /
206
208
  `park`) on stderr — follow it, and report a reclaim or resume with its stash reference. The answers are
207
- `docs/josh-commands-automation.md` → "`josh run:hold`"; rationale:
209
+ `docs/josh-commands-run.md` → "`josh run:hold`"; rationale:
208
210
  `docs/maintainers/backlogrun-child-rationale.md` → "Why the preflight is part of the claim".
209
211
 
@@ -65,7 +65,7 @@ it is".
65
65
 
66
66
  `pnpm josh epic:next <E> --repo <owner/repo> --lanes` answers with **one issue number per line**, up to
67
67
  the number of free lanes, and each of those children runs in a **lane** of its own: a linked git work
68
- tree with its own branch, its own `.env` and its own dev and preview ports (`docs/josh-commands-automation.md` →
68
+ tree with its own branch, its own `.env` and its own dev and preview ports (`docs/josh-commands-run.md` →
69
69
  "`josh lane:open` / `josh lane:close` / `josh lane:list` / `josh lane:prune`"). **Implementation, the
70
70
  verification gate and the review run in parallel; the merges stay serial** — each one lands on the
71
71
  `main` the next is then measured against.
@@ -89,7 +89,7 @@ two from its filing, because an issue with neither answers `triage` and nothing
89
89
  the other lanes for one reason only: a batch run on broken verification leaves nobody's result
90
90
  trustworthy** — that the issue's own verification sits under the defect is the issue's own concern,
91
91
  checked by the verification after the fix. This paragraph is the rule's single source; rationale:
92
- `docs/maintainers/wip-cap-rationale.md` → 「単独実行の理由と由来」.
92
+ `docs/maintainers/wip-cap-rationale.md` → "Why a solo run".
93
93
 
94
94
  **A lane's review does not inherit the lane, and `pnpm josh review:brief` is what closes that.**
95
95
  `pnpm josh review:brief` prints the lane's absolute root, branch and HEAD, hands over targets written
@@ -135,6 +135,10 @@ Record it on that first child's Issue — the comment is what gets it popped if
135
135
  **The first lane's `pnpm josh lane:launch "$n" --stash "backlogrun: josh latest before lanes"` pops it
136
136
  by message, after `lane:open`'s own install** — never a positional `git -C "$dir" stash pop`: the stash
137
137
  is a repository-wide stack every lane shares, so a positional pop would take whichever lane last pushed.
138
+ **Under the supervisor's `backlog:drive` the driver passes it, never you**:
139
+ each launch asks whether a stash under that message is on the stack and, if one is, hands it to
140
+ `lane:launch --stash` — the pop consumes it, so the first lane takes it and every later one launches
141
+ without. The push above stays the parent's, before the driver starts.
138
142
 
139
143
  ### Opening one lane and dispatching its child
140
144
 
@@ -63,8 +63,8 @@ flight finish; no new lane is opened.
63
63
 
64
64
  ## park and continue
65
65
 
66
- When a child hits something this run may not decide — a Tier B toss-up, a Tier C action, an upstream
67
- defect, a split that needs a person — **park the child and keep going.**
66
+ When a child hits something only a person can decide — → "Only a person's judgement carries
67
+ `needs-decision`" below — **park the child and keep going.**
68
68
 
69
69
  ```bash
70
70
  gh api repos/{owner}/{repo}/issues/<N>/labels -f 'labels[]=needs-decision'
@@ -107,6 +107,27 @@ parent that implements the released child inline is the failure the orchestrator
107
107
  Without removing the label the parked child never runs again — it is the second half of the
108
108
  human-in-the-loop cycle, not an optional tidy-up.
109
109
 
110
+ ## Only a person's judgement carries `needs-decision`
111
+
112
+ **`needs-decision` means "a person has to choose", and nothing else.** This is the single source of
113
+ when a run may apply it, by hand or through a park. It carries only:
114
+
115
+ - a design choice nobody has made;
116
+ - a Tier B toss-up, or a Tier C action (`CLAUDE.md` → "Decision autonomy");
117
+ - an upstream defect in another package, whose wait-or-defer is the person's (`upstream-interrupt.md`).
118
+
119
+ It never carries:
120
+
121
+ - a choice with a clearly better default — that is Tier A: decide it and record it as an Issue comment;
122
+ - whether to run something already planned and opted in with `auto-ok` — the opt-in is that decision;
123
+ - a defect in the running repository's own run tooling — the run fixes it and resumes
124
+ (`prompts/collaboration-workflow/upstream-interrupt.md` → "実行中のリポジトリ自身のラン機構の不具合").
125
+
126
+ **When in doubt, it is Tier A**: decide, comment the decision, and continue. A label a person has to
127
+ clear for nothing spends their attention and stalls the child. **A label a mechanical step applied** — a
128
+ failed or abandoned child, a lost merge race's four conditions — is read against this list once its
129
+ reason is known, and removed (Tier A, above) when the reason is not on it.
130
+
110
131
  ## `in-progress` is removed by whoever finds it stale
111
132
 
112
133
  A run's own ending removes `in-progress` — `pnpm josh followup` on a merge, `pnpm josh run:release <N>`
@@ -50,7 +50,7 @@ run in lanes".
50
50
  lane — and in the same turn start `pnpm josh lane:await <N...> --owner "$PPID"` in the background** (joshuafolkken/kit#2113).
51
51
  `lane:await` watches local process presence and exits when any named child confirms-complete. **The
52
52
  re-confirm delay and poll interval are the command's, not the agent's** — pass only the issue
53
- numbers and `--owner` (why: `docs/josh-commands-automation.md` → `josh lane:await`). Without that wake (Codex), hand off instead — "A parent without a completion callback".
53
+ numbers and `--owner` (why: `docs/josh-commands-run.md` → `josh lane:await`). Without that wake (Codex), hand off instead — "A parent without a completion callback".
54
54
 
55
55
  **A `lane:await` wake is a confirmed-gone process, so classify the ending at once — do not wait out
56
56
  the silent-unit window** (joshuafolkken/kit#2277). On a `lane:await` wake go straight to `pnpm josh run:merge <N> --output <path>` — the composite reads the child's **exit
@@ -94,7 +94,8 @@ run in lanes".
94
94
  **not** parked and **not** counted against the consecutive-failure guard, and stays re-dispatchable
95
95
  (joshuafolkken/kit#2240); a **failed** child (OPEN, neither label, not an outage) has its stale
96
96
  `in-progress` dropped, is parked with `needs-decision`, and is counted against the consecutive-failure
97
- guard.
97
+ guard. The label stays only once its reason passes `backlogrun-park.md` → "Only a person's judgement
98
+ carries `needs-decision`".
98
99
 
99
100
  **Beyond the offer `epic:next` prints** (`run` becomes numbers; `wait` / `stop` / `complete` /
100
101
  `error` pass through), the composite adds six verdict tokens: `over` — the merge crossed the budget,
@@ -256,6 +257,10 @@ lane needs when its child has to be finished by hand.
256
257
  **Restart the progress watcher by name** — `pnpm josh run:progress --wait --output <handed-over paths>`
257
258
  in the background, in the same turn as that first `lane:list`. The wired `run:watcher:guard` stops a resume that skips this (joshuafolkken/kit#2353).
258
259
 
260
+ **A session woken by the driver's hand-off does neither**: with `Driver
261
+ result:` in its prompt, the `run:wake` driver watches the lanes, so it acts on its branch and cuts as
262
+ its `Next:` line says. The watcher guard and the headless stop rule stand aside for it.
263
+
259
264
  ### A carried-over merge does not stand in front of the next lane
260
265
 
261
266
  **A carried-over child finishes in its own detached unit, and the resumed parent does not stand in front
@@ -82,11 +82,12 @@ guard, and go back to step 1.
82
82
  session**: `lane:dispatch` reads the `session_id` off the exit record and relaunches with
83
83
  `--resume`; with no session id it falls back to a fresh `fullrun`, and the report says which path
84
84
  it took. **Outages inside a two-minute window count once** toward the streak. The re-dispatch is
85
- bounded by `CONSECUTIVE_OUTAGE_LIMIT` in `scripts/run/run-merge.ts`: *distinct* outages trip the
85
+ bounded by `CONSECUTIVE_OUTAGE_LIMIT` in `scripts/run/merge/run-merge.ts`: *distinct* outages trip the
86
86
  separate outage guard, at which point the command prints `environment` and the run stops. It never
87
87
  re-dispatches into a dead API forever.
88
88
  - **abandoned** — counted against the consecutive-failure guard and parked with `needs-decision`,
89
- exactly as a failed child. Never retried silently.
89
+ exactly as a failed child — the label then answers to `backlogrun-park.md` → "Only a person's
90
+ judgement carries `needs-decision`". Never retried silently.
90
91
  3. **Read the token it printed and take that branch** — a next child number to run (the re-dispatched
91
92
  outage child among them), `environment` / `stop` to end the run, or `busy` / `retry` to re-read —
92
93
  the same tokens the merge event reads (`backlogrun-progress.md` → "Running a named epic's children").
@@ -146,7 +147,7 @@ carries no judgement.**
146
147
  this condition too.
147
148
 
148
149
  Meeting any of the four, the child is parked — `needs-decision` plus a comment naming which of the four
149
- it was — and its lane is **kept**, because the pushed branch is the resume path
150
+ it was, read against `backlogrun-park.md` → "Only a person's judgement carries `needs-decision`" — and its lane is **kept**, because the pushed branch is the resume path
150
151
  (`backlogrun-lanes.md` → "What happens to a lane").
151
152
 
152
153
  **Leave the tree clean before parking: `git merge --abort` precedes a park under conditions 1, 2 or 4.**
@@ -143,7 +143,7 @@ be answered and every standing record is refused rather than resumed. A live PID
143
143
  the sandbox cannot read is held as `busy`.
144
144
 
145
145
  **Ask it before the plan, in the same turn as the first `git switch main && git pull`.** The contract
146
- is `docs/josh-commands-automation.md` → "`josh run:carry`"; what this loop does with each answer is here:
146
+ is `docs/josh-commands-run.md` → "`josh run:carry`"; what this loop does with each answer is here:
147
147
 
148
148
  | It answers | What the run does |
149
149
  | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -151,7 +151,7 @@ is `docs/josh-commands-automation.md` → "`josh run:carry`"; what this loop doe
151
151
  | `resumed` | **This session is continuing a run that was cut** — a `--cut` handed the record off, or a `--resume` adopted it. Read the record with `--json` and take the budget figures from it, never from this session's own zero. Report the plan again — the pool has moved — and skip nothing else |
152
152
  | `busy` | The record's **owner process is still running and no cut handed it off**: another parent is spending this budget right now. **Stop; do not open a lane.** (A record a `--cut` _did_ hand off answers `resumed` here even with its owner still alive.) Nothing here is yours to end — either that run finishes and ends its own record, or a person decides it is over |
153
153
  | `over` | This session is over the context-cut threshold, so it claims nothing (joshuafolkken/kit#2760). **End the conversation**; retype the invocation in a fresh session |
154
- | `standing` | A record is here that **no cut or supervisor handed off** — an unwatched crash, and the same command retyped over it. **Stop; do not open a lane**, and do not guess: the choice is the person's. Report the two commands the answer names — `pnpm josh run:carry --resume "<invocation>" --owner "$PPID"` to carry that budget on, or `pnpm josh run:carry --end` and begin again to discard it. Pass `--owner` to the resume as to the begin |
154
+ | `standing` | A record is here that **no cut or supervisor handed off** — an unwatched crash, and the same command retyped over it. **Stop; do not open a lane**: the choice is the person's. Report the two commands the answer names — `pnpm josh run:carry --resume "<invocation>" --owner "$PPID"` to carry that budget on, or `pnpm josh run:carry --end` and begin again to discard it. A crash from a run-tooling defect this run has since fixed is the one you resume yourself (`upstream-interrupt.md` → "実行中のリポジトリ自身のラン機構の不具合") |
155
155
  | `mismatch` | A record is here for a **different** invocation — a run that never reached `--end`. **Stop; do not open a lane**, and never resume into it. End it deliberately, with `pnpm josh run:carry --end`, once you know that run is over |
156
156
  | `expired` | The 8-hour whole-run bound is spent. **Where a `--cut` handed the record off it is this run's own bound**, so this is the verdict on standard output and the run ends: report it and stop, and clear the record with `pnpm josh run:carry --end` once it is genuinely over. Where nothing handed it off it is printed on standard error ahead of a `began` instead — a person typing the keyword again over a spent record is starting a new run, and the record is replaced. A `--resume` over a spent record answers `expired` and adopts nothing |
157
157
  | `unreadable` | Report what it printed and **stop before opening a lane** |
@@ -161,9 +161,11 @@ is `docs/josh-commands-automation.md` → "`josh run:carry`"; what this loop doe
161
161
  child and nothing about the invocation's budget. **`--begin` claims the record exclusively and names
162
162
  the owning process, so a second parent is answered `busy`.**
163
163
 
164
- **Count into the record rather than into your head** — `--merged 1 --owner "$PPID"` at every child's
164
+ **Count into the record rather than into your head** — `--merged <N> --owner "$PPID"` at every child's
165
165
  merge, `--filed 1 --owner "$PPID"` at every Issue this run files, and `--cut --owner "$PPID"`
166
- immediately before the cut. Every counter is an increment. **`--owner "$PPID"` is not optional on a
166
+ immediately before the cut. `--merged` names the merged issue, never a count
167
+ (`scripts/run/carry/run-carry-args.ts`): `run:merge` records the same issue, so a merge counted on both paths counts
168
+ once. Every other counter is an increment. **`--owner "$PPID"` is not optional on a
167
169
  count**: a count that does not name the record's owning process is refused.
168
170
 
169
171
  **`--cut` hands the record off, and so does `run:wake` for a dead owner** (joshuafolkken/kit#2437): the
@@ -217,6 +219,9 @@ owner prevents a second driver from taking it over. On `none`, `expired` or `unr
217
219
  8-hour whole-run bound therefore still comes from the carry record. **A new authorization is still a
218
220
  person's**: the supervisor spends the declared budget and never declares another.
219
221
 
222
+ **A supervisor stopped by a run-tooling defect is restarted by the AI once the fix lands** —
223
+ `upstream-interrupt.md` → "実行中のリポジトリ自身のラン機構の不具合".
224
+
220
225
  **What may be run is untouched.** The driver takes named issues from the invocation and pool issues
221
226
  from the existing offer command. The supervisor writes no label of its own; `auto-ok` arrives only
222
227
  through `issue:file`'s default. A judgment session receives
@@ -231,7 +236,7 @@ before each launch, and a failed named issue skips the remaining named prefix.
231
236
 
232
237
  **A person keeps control of it** — `pnpm josh run:wake --list` names the running supervisor and `--stop`
233
238
  ends it. Its failure warnings, log file, progress relay and the provider / model / effort each
234
- unattended role runs with are `docs/josh-commands-automation.md` → "`josh run:wake`".
239
+ unattended role runs with are `docs/josh-commands-run.md` → "`josh run:wake`".
235
240
 
236
241
  **The completion report names how many sessions were woken beside the record's `cuts`** — one wake per
237
242
  cut is the invariant, and what counts is a carry record actually claimed, never a process started.
@@ -278,15 +283,15 @@ stop at a time.**
278
283
  one `pnpm josh issue:read <N> <N> …` call**, not a `gh api` pair per issue.
279
284
  - **Never measure in order to decide.** A question needing a benchmark, a profile, or a run of the
280
285
  thing itself is not settled here: it stays labelled and the plan says so.
281
- - **Label what you find.** An issue needing a person's judgement gets `needs-decision`, applied as
282
- `backlogrun-park.md` → "park and continue" does. **The next plan classifies it by the label alone**,
286
+ - **Label what you find.** An issue needing a person's judgement — `backlogrun-park.md` → "Only a
287
+ person's judgement carries `needs-decision`" — gets the label, applied as "park and continue" does. **The next plan classifies it by the label alone**,
283
288
  never the body.
284
289
  - **Order and isolate the pool in the same pass** (joshuafolkken/kit#2776), from the same
285
290
  `issue:read`: an issue that must land first (it builds what another reuses, or both edit one code
286
291
  path) becomes a native `blocked-by`; an issue meeting all three of the `backlogrun-lanes.md` →
287
292
  "Lanes — running more than one child at a time" conditions gets `run:solo`, **every other one `run:lane`**. Comment the reason; the offer commands enforce all
288
293
  three, answering `triage` while an issue has neither.
289
- - **`priority:high` puts an issue first** (joshuafolkken/kit#2928; ranking: `docs/josh-commands-automation.md` →
294
+ - **`priority:high` puts an issue first** (joshuafolkken/kit#2928; ranking: `docs/josh-commands-backlog.md` →
290
295
  `josh backlog:next`). Apply it only on a cited ground — a stated deadline or urgency, or a person's
291
296
  written policy — commenting the ground; **never remove it**.
292
297
  - **Report the order those labels produce — `pnpm josh backlog:plan --waves`** (joshuafolkken/kit#2778),
@@ -297,8 +302,8 @@ stop at a time.**
297
302
  **`needs-decision`, `run:solo`, `run:lane` and `priority:high` are the workflow labels a run may
298
303
  apply by hand, and none is `auto-ok` or `needs-human-review`.** `needs-human-review` stays a
299
304
  person's alone (`needs-human-review.md`); `auto-ok` reaches only a run's own filing, through
300
- `issue:file`'s default ("What one invocation approves"). A run parks with `needs-decision` and a
301
- person clears it.
305
+ `issue:file`'s default ("What one invocation approves"). A run parks with `needs-decision` only on
306
+ `backlogrun-park.md` → "Only a person's judgement carries `needs-decision`", and a person clears it.
302
307
 
303
308
  Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the plan and the decision pass come first"
304
309
 
@@ -306,7 +311,7 @@ Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the plan an
306
311
 
307
312
  **The loop is computed, not walked by hand.** The `run:wake` supervisor runs `pnpm josh backlog:drive`,
308
313
  whose head is `pnpm josh backlog:offer`: the answer-to-budget mapping, the retry count, the `--exclude`
309
- feedback and the lane count are its own (`docs/josh-commands-automation.md` → "`josh backlog:offer`"
314
+ feedback and the lane count are its own (`docs/josh-commands-backlog.md` → "`josh backlog:offer`"
310
315
  and "`josh backlog:drive`"). **An AI session reaches this section only when the driver hands a branch
311
316
  back** — the `Driver result:` line names it, and its `Next:` line is the order: claim the record with
312
317
  `pnpm josh run:carry --resume "<invocation>" --owner "$PPID"`, act on the branch, then hand the loop
@@ -321,6 +326,9 @@ back with `pnpm josh run:carry --cut --owner "$PPID"`:
321
326
  | `watch` | The backlog drained with nothing in flight; the retrospective is owed (`run:step`) |
322
327
  | `window` | The driver's wait window ran out with nothing to judge; hand the loop back as is |
323
328
 
329
+ **`window`, `merge busy` and `merge retry` reach a session only after the supervisor's own re-runs run
330
+ out** (`run-wake-driver.ts`).
331
+
324
332
  **A candidate only in another repository is never a token** — report it with its checkout and leave it
325
333
  to a session running there (`backlogrun-lanes.md` → "Concurrency").
326
334
 
@@ -386,7 +394,7 @@ again at its full budget. Both are ISO-8601 timestamps (`date -u +%FT%TZ`), and
386
394
  `--active` is refused. `--merged` is what has merged and `--running` what is still in a lane; **both
387
395
  count against the maximum**. **No ending abandons a lane**: whatever would have ended the run answers
388
396
  `watch` while `--running` is above zero, so the lanes drain and their merges reach the report. The full
389
- contract is `docs/josh-commands-automation.md` → "`josh backlog:budget`".
397
+ contract is `docs/josh-commands-backlog.md` → "`josh backlog:budget`".
390
398
 
391
399
  **The completion report names three things the budgets make meaningful**: how many issues this run
392
400
  took, how many of them were picked up during an idle watch, and the termination reason — quoted from
@@ -450,7 +458,7 @@ All of these are this file's, and are reached here in the same order and for the
450
458
  | --- | --- |
451
459
  | `git switch main && git pull`, then `pnpm josh latest:scope`, then `pnpm josh lane:prune` — in the primary checkout, before the first lane opens | `backlogrun-lanes.md` → "Once per repository, before the first lane opens" |
452
460
  | `josh latest` on `required` only, asked once at the first child and never in a lane | `backlogrun-child.md` → "`josh latest` runs once per session, not once per child" |
453
- | `pnpm josh run:hold <N>`'s preflight check, before each child that is not in a lane — act on what it prints | `docs/josh-commands-automation.md` → "`josh run:hold`" |
461
+ | `pnpm josh run:hold <N>`'s preflight check, before each child that is not in a lane — act on what it prints | `docs/josh-commands-run.md` → "`josh run:hold`" |
454
462
  | `pnpm josh run:progress --wait` in the background, `--mark` at every real report | `progress-watcher.md` → "Progress while the run is quiet" |
455
463
  | `pnpm josh release:scope` once, after the last issue has merged and the last lane is closed | `followup.md` → "When `pnpm josh release` runs" |
456
464
 
@@ -9,7 +9,7 @@ Review results and successful pushes are never turn boundaries.
9
9
  "<title> #<N>"` (`--cite <N>`), then **end the turn** on `launched`/`busy`. A stop relaunches a child
10
10
  whose prompt names `pnpm josh ship --log <N>` and (Anthropic lane, #2964) the re-detach to run after
11
11
  the fix — `pnpm josh ship --detach`, `--review` only if the stopped ship carried it and stopped before
12
- round 2, which is final (`scripts/run/run-ship-next.ts`); the supervisor skips a recorded round 1.
12
+ round 2, which is final (`scripts/run/ship/run-ship-next.ts`); the supervisor skips a recorded round 1.
13
13
  `failed` → step 1. A backgrounded `ship` issued alone is moved to the foreground by the hook
14
14
  rather than refused (#3154).
15
15
  1. Run `pnpm josh main:merge`. **Then issue `pnpm josh run:cut <N>` alone, before the scoped pair and
@@ -17,13 +17,13 @@ pnpm josh delegate --list # the enumeration, and what was rejected and why
17
17
  **how a wrong result is caught** cheaply in the parent tier, not merely by being unlikely to fail.
18
18
  `pnpm josh delegate --list` names both delegatable and rejected steps; a rejected step either has no
19
19
  verifier or lets a wrong result propagate too far. The command distinguishes `kept deliberately`
20
- from `kept by default`. `docs/josh-commands-automation.md` → "`josh delegate`" carries the full enumeration.
20
+ from `kept by default`. `docs/josh-commands-backlog.md` → "`josh delegate`" carries the full enumeration.
21
21
 
22
22
  **The mechanism is not the unit.** `pnpm josh delegate` covers a run step, a file-disjoint Step 0
23
23
  implementation unit (`pnpm josh fanout`), and `epic-child` — an epic's child and a named issue of a
24
24
  `backlogrun` alike. Do not add a second batch-child mechanism. Read `backlogrun-child.md` → "Each child
25
25
  runs in a delegated unit" at child dispatch; `backlogrun-steps.md` → "Named issues run first, in order"
26
- applies to named issues. `docs/josh-commands-automation.md` → "`josh fanout`" carries file-disjoint dispatch.
26
+ applies to named issues. `docs/josh-commands-backlog.md` → "`josh fanout`" carries file-disjoint dispatch.
27
27
 
28
28
  **`followup-filing` delegates the late review-finding filing chain** with the parent's finding text;
29
29
  the parent verifies the new Issue using `pnpm josh issue:state <new>`. For `epic-child`, the parent
@@ -24,6 +24,11 @@ review scan and the merge and runs only the post-merge tail; a completion report
24
24
  is not posted or notified twice, so re-running is safe. Keep the default Issue target. Ignore a
25
25
  finding only after verifying it is inapplicable; rate-limit text is not a finding.
26
26
 
27
+ **A red rate-limited CodeRabbit check is cleared by a retrigger, not a bypass.** Wait out the window
28
+ the rate-limit comment states, post `@coderabbitai review` on the pull request, and rerun `followup`.
29
+ Bypassing the check is Tier C — only on explicit user instruction, and only when the stated window is
30
+ impractically long or the retrigger is rate-limited again.
31
+
27
32
  A pre-merge failure stops the run; an unverifiable AI finding or CI failure needing input receives a
28
33
  `confirmation` Telegram. Post-merge cleanup failures are named and do not undo the merge; run the
29
34
  named recovery without rerunning it. Because notification precedes merge, the printed result is
@@ -55,7 +55,7 @@ that covers the same work stops the run rather than filing a second Issue (`issu
55
55
  `gh api repos/{owner}/{repo}/issues/<N>/labels -f 'labels[]=in-progress'`. (4) Post the agreed plan
56
56
  in the session language: fill the body if blank,
57
57
  otherwise add a comment. (5) If the working tree already has staged or modified files,
58
- `git stash push -m "fullrun new: pre-existing changes" -- ':!docs/maintainers/observations'` first
58
+ `git stash push -m "fullrun new: pre-existing changes" -- ':!.josh/observations'` first
59
59
  (joshuafolkken/kit#2919). (6) `git switch main && git pull`. (7)
60
60
  `pnpm josh latest:scope`; on `required` run `josh latest` and load the `dependency-update` skill; on
61
61
  `skip` neither runs (`latest-gate.md` is the single source). If you stashed in (5),
@@ -44,7 +44,7 @@ back with fixes, treat each as a new round: implement, re-run `pnpm josh gate`,
44
44
  mirror `fullrun new` (1)–(8): derive an English title (or use the provided one) → create the Issue
45
45
  (`pnpm josh issue:file "<title>" --body-file <body-file> --depth <n>`, body per
46
46
  `prompts/collaboration-workflow/issue-template.md`; its duplicate scan is read per `issue-scout.md`) → add `in-progress` (as `fullrun new` (3)) → post the agreed plan → stash
47
- any pre-existing changes with `git stash push -m "halfrun new: pre-existing changes" -- ':!docs/maintainers/observations'`
47
+ any pre-existing changes with `git stash push -m "halfrun new: pre-existing changes" -- ':!.josh/observations'`
48
48
  (the pathspec keeps the observation ledger in the tree for this run's commit; joshuafolkken/kit#2919), popped by
49
49
  message with `pnpm josh stash:pop "halfrun new: pre-existing changes"`, never a positional `git stash pop` →
50
50
  `git switch main && git pull` → `pnpm josh latest:scope` → implement → run the gate (as above, `pnpm
@@ -41,4 +41,4 @@ pnpm josh issue:file "<title>" --body-file <complete-draft.md> --depth <n> --dis
41
41
  - **The split path files each child through the same command.** The epic is created with
42
42
  `pnpm josh epic` over children that were scanned.
43
43
 
44
- Full behavior: `docs/josh-commands-automation.md` → "`josh issue:file`" and "`josh issue:scout`".
44
+ Full behavior: `docs/josh-commands-backlog.md` → "`josh issue:file`" and "`josh issue:scout`".
@@ -85,4 +85,4 @@ split is found.
85
85
  creation call. (3) Send Telegram notification listing all created issues. (4) Present the command
86
86
  `backlogrun #<E> --only`. (5) **Stop** — do not implement.
87
87
 
88
- `pnpm josh issue:file` lints the body and applies the classification labels it declares, following `prompts/collaboration-workflow/issue-template.md` for classification (`docs/josh-commands-automation.md` → `josh issue:file`).
88
+ `pnpm josh issue:file` lints the body and applies the classification labels it declares, following `prompts/collaboration-workflow/issue-template.md` for classification (`docs/josh-commands-backlog.md` → `josh issue:file`).
@@ -11,7 +11,7 @@ second-sighting promotion.
11
11
  (joshuafolkken/kit#1728). Rationale: `docs/maintainers/observation-ledger-rationale.md` → "Why the
12
12
  ledger exists".
13
13
 
14
- - **The destination is the `docs/maintainers/observations/` directory in the repository the
14
+ - **The destination is the `.josh/observations/` directory in the repository the
15
15
  observation is about** — the same repository the Issue would have been filed into — **one file per
16
16
  issue** (joshuafolkken/kit#2919): append to `<N>.md` for the issue the run is executing (the number
17
17
  its branch leads with, a lane's included), or to `<YYYY-MM-DD>.md` for a line written on the
@@ -70,7 +70,7 @@ wherever an exit status is being watched. **A missing directory is still a first
70
70
  complains on standard error and the count is zero; the append below creates the directory.
71
71
 
72
72
  ```bash
73
- cat <that repository's checkout>/docs/maintainers/observations/*.md | grep -c '^- k:<slug> |' || true
73
+ cat <that repository's checkout>/.josh/observations/*.md | grep -c '^- k:<slug> |' || true
74
74
  ```
75
75
 
76
76
  Free-text comparison is what the key exists to replace, so two lines that read alike under different
@@ -87,7 +87,7 @@ could not.
87
87
  `docs/maintainers/observation-ledger-rationale.md` → "Why the ledger has a commit path".
88
88
 
89
89
  - **A run's appended lines ride its own commit** (joshuafolkken/kit#2763). `pnpm josh git` stages
90
- `docs/maintainers/observations/` with the run's other changes, in the one staging step every entry
90
+ `.josh/observations/` with the run's other changes, in the one staging step every entry
91
91
  point goes through (`scripts/git/git-staging.ts`), so the lines are reviewed and merged with the
92
92
  pull request of the run that recorded them, and the run's CI is the only wait they cost.
93
93
  **Record before the commit, not after the merge:** a finding recorded with `pnpm josh review:record`
@@ -190,13 +190,18 @@ the push is never a turn boundary (`chain-rule.md`).
190
190
  ## A lane child records its park before it stops
191
191
 
192
192
  **The trigger**: a dispatched lane child about to stop for a decision (a Tier B toss-up, a Tier C
193
- action, an upstream defect, a split) parks its own Issue first — `backlogrun-park.md` → "park and
193
+ action, an upstream defect) parks its own Issue first — `backlogrun-park.md` → "park and
194
194
  continue" — so the parent's `pnpm josh run:liveness` reads it `settled` (joshuafolkken/kit#2034),
195
195
  after #2012 and #2011. A `needs-human-review` or `already-done` stop already carries its label.
196
196
  `pnpm josh rule:guard` refuses `pnpm josh notify --task-type confirmation` from a marked child until
197
197
  then — **It fires once per run.**, and a person's own `fullrun` is never refused
198
198
  (`scripts/rules/lane-park.ts`).
199
199
 
200
+ **A split is not a park**: the parent reads an open Issue carrying `epic` as
201
+ a split, so a child that promoted its Issue stops without `needs-decision` — `backlogrun-park.md` →
202
+ "Splitting a child mid-run". `pnpm josh rule:guard` refuses a `needs-decision` write onto the epic
203
+ the child promoted this run, on every occurrence (`scripts/rules/lane-split-park.ts`).
204
+
200
205
  ### The interactive ask is refused one call earlier
201
206
 
202
207
  **The trigger**: a headless session ends the turn on an interactive ask, so the notify guard never
@@ -18,7 +18,7 @@ another is the failure this section exists to prevent:
18
18
  | A defect originating in **another package** | File the upstream Issue and **stop** — Tier A for a first-party target; a third-party one is Tier C, recorded and drafted rather than filed (`CLAUDE.md` → "Cross-package problems"; `prompts/collaboration-workflow/upstream-interrupt.md`) |
19
19
  | This Issue was really **several** (a split) | File the children and the epic and **stop** — except under `backlogrun`, whose authorization already covers a batch, so the children are filed and run through (`split-assessment.md`) |
20
20
  | Another Issue in **this** repository has to land first (**a prerequisite**) | This section |
21
- | Something worth filing that is **none of the three** (**an observation**) | File it **without asking** — Tier A for a first-party target — and **carry the run straight on**: nothing is stashed, nothing is parked (`observation-filing.md`). **A delegated child does not file here**, and a filing at depth 1 or deeper cites the depth-0 work it blocked; one that cannot cite it goes to the run's own `docs/maintainers/observations/<N>.md` and is filed on its second sighting — all of them `observation-filing.md`'s |
21
+ | Something worth filing that is **none of the three** (**an observation**) | File it **without asking** — Tier A for a first-party target — and **carry the run straight on**: nothing is stashed, nothing is parked (`observation-filing.md`). **A delegated child does not file here**, and a filing at depth 1 or deeper cites the depth-0 work it blocked; one that cannot cite it goes to the run's own `.josh/observations/<N>.md` and is filed on its second sighting — all of them `observation-filing.md`'s |
22
22
 
23
23
  **File the prerequisite with the `route:tier-a` label**, so a Tier A filing made during implementation
24
24
  stays countable by filing route afterwards. **This paragraph belongs to the prerequisite row, not to
@@ -31,7 +31,7 @@ pnpm josh issue:file "<title>" --body-file <body-file> --depth <n> --route tier-
31
31
 
32
32
  The command lints the body against `prompts/collaboration-workflow/issue-template.md`, applies the
33
33
  classification labels it declares, and runs the duplicate scan and `epic:bundle` itself
34
- (`docs/josh-commands-automation.md` → `josh issue:file`).
34
+ (`docs/josh-commands-backlog.md` → `josh issue:file`).
35
35
 
36
36
  Every "file the prerequisite" below means that labelled filing, and it always happens **first**: the
37
37
  steps after it name a number that does not exist until it is. **Its duplicate scan is read exactly as
@@ -33,7 +33,7 @@ flight and the watcher's life record has gone stale — once per run, so the res
33
33
 
34
34
  **`--mark` at every real report.** Whenever the run reports something of its own, run
35
35
  `pnpm josh run:progress --mark` in the same turn to restart the silence clock. The clock is silence,
36
- never a timer (`docs/josh-commands-automation.md` → "`josh run:progress`").
36
+ never a timer (`docs/josh-commands-run.md` → "`josh run:progress`").
37
37
 
38
38
  **Do not keep a progress clock of your own** — the hook refuses the arm rather than asking
39
39
  (`scripts/rules/early-heartbeat.ts` → `decide`), though a single correctly-spaced arm is allowed.
@@ -65,7 +65,7 @@ or release once the work is done; only an expired record over a clean tree is re
65
65
  **The batch entry points claim per child, not per batch.** `backlogrun` never
66
66
  call it themselves; each child runs the `fullrun` procedure, so it claims on entry and `pnpm josh
67
67
  followup` releases it at that child's merge. The command's behavior and the answer table are
68
- `docs/josh-commands-automation.md` → "`josh run:hold` / `josh run:release`"; this file is the single source of
68
+ `docs/josh-commands-run.md` → "`josh run:hold` / `josh run:release`"; this file is the single source of
69
69
  the procedure.
70
70
 
71
71
  ## The halfrun resume
package/.codex/hooks.json CHANGED
@@ -2,11 +2,11 @@
2
2
  "hooks": {
3
3
  "SessionStart": [
4
4
  {
5
- "matcher": "",
5
+ "matcher": "startup",
6
6
  "hooks": [
7
7
  {
8
8
  "type": "command",
9
- "command": "pnpm josh audit:provision",
9
+ "command": "project_root=\"$(env -u GIT_ALTERNATE_OBJECT_DIRECTORIES -u GIT_COMMON_DIR -u GIT_DIR -u GIT_INDEX_FILE -u GIT_NAMESPACE -u GIT_OBJECT_DIRECTORY -u GIT_WORK_TREE git rev-parse --show-toplevel 2>/dev/null || git rev-parse --show-toplevel)\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh audit-provision",
10
10
  "timeout": 180
11
11
  }
12
12
  ]