@joshuafolkken/kit 1.1455.0 → 1.1514.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 (374) hide show
  1. package/.claude/settings.json +6 -6
  2. package/.claude/skills/dependency-update/SKILL.md +26 -55
  3. package/.claude/skills/epic-commands/SKILL.md +83 -156
  4. package/.claude/skills/epic-commands/epic-bundle.md +51 -79
  5. package/.claude/skills/epic-commands/execution-waves.md +43 -81
  6. package/.claude/skills/verify-ui/SKILL.md +24 -50
  7. package/.claude/skills/workflow-commands/SKILL.md +7 -9
  8. package/.claude/skills/workflow-commands/background-commands.md +31 -46
  9. package/.claude/skills/workflow-commands/backlogrun-child.md +65 -85
  10. package/.claude/skills/workflow-commands/backlogrun-lanes.md +86 -125
  11. package/.claude/skills/workflow-commands/backlogrun-park.md +68 -118
  12. package/.claude/skills/workflow-commands/backlogrun-progress.md +17 -28
  13. package/.claude/skills/workflow-commands/backlogrun-recovery.md +17 -26
  14. package/.claude/skills/workflow-commands/backlogrun-steps.md +35 -52
  15. package/.claude/skills/workflow-commands/backlogrun.md +31 -50
  16. package/.claude/skills/workflow-commands/chain-rule.md +31 -40
  17. package/.claude/skills/workflow-commands/delegation.md +12 -8
  18. package/.claude/skills/workflow-commands/entry-sequence.md +1 -3
  19. package/.claude/skills/workflow-commands/followup.md +55 -77
  20. package/.claude/skills/workflow-commands/fullrun-steps.md +3 -5
  21. package/.claude/skills/workflow-commands/fullrun.md +4 -6
  22. package/.claude/skills/workflow-commands/halfrun.md +3 -7
  23. package/.claude/skills/workflow-commands/into-target.md +1 -2
  24. package/.claude/skills/workflow-commands/issue-comments.md +43 -60
  25. package/.claude/skills/workflow-commands/issue-scout.md +3 -2
  26. package/.claude/skills/workflow-commands/kickoff.md +65 -74
  27. package/.claude/skills/workflow-commands/latest-gate.md +2 -6
  28. package/.claude/skills/workflow-commands/needs-human-review.md +2 -5
  29. package/.claude/skills/workflow-commands/observation-filing.md +59 -118
  30. package/.claude/skills/workflow-commands/observation-ledger.md +52 -112
  31. package/.claude/skills/workflow-commands/pre-gate-cut.md +88 -142
  32. package/.claude/skills/workflow-commands/prerequisite.md +11 -17
  33. package/.claude/skills/workflow-commands/progress-watcher.md +23 -33
  34. package/.claude/skills/workflow-commands/prrun.md +3 -5
  35. package/.claude/skills/workflow-commands/retrospective.md +35 -54
  36. package/.claude/skills/workflow-commands/split-assessment.md +32 -58
  37. package/.claude/skills/workflow-commands/target-repository.md +1 -2
  38. package/.claude/skills/workflow-commands/working-tree-hold.md +54 -73
  39. package/.codex/hooks.json +6 -6
  40. package/.github/actions/setup-node/action.yml +1 -1
  41. package/.github/workflows/ci.yml +1 -1
  42. package/.github/workflows/publish.yml +2 -2
  43. package/CLAUDE.md +7 -6
  44. package/cspell/index.yaml +7 -0
  45. package/dist/CLAUDE.md +7 -6
  46. package/dist/commands/document-section-cli.js +67 -34
  47. package/dist/hooks/batch-guard.js +6 -6
  48. package/dist/hooks/chunk-4KKD2UTK.js +66 -0
  49. package/dist/hooks/{chunk-GPLGZ6IC.js → chunk-6TS2JD6D.js} +14 -3
  50. package/dist/hooks/chunk-7DSBJVFH.js +50 -0
  51. package/dist/hooks/{chunk-5H4SSDSD.js → chunk-A65Y4YOR.js} +3 -3
  52. package/dist/hooks/{chunk-3C4XRYG6.js → chunk-APUO6U4J.js} +102 -19
  53. package/dist/hooks/{chunk-IX6TTTI6.js → chunk-EFXE6C37.js} +8 -22
  54. package/dist/hooks/chunk-GP4IEC4O.js +20 -0
  55. package/dist/hooks/chunk-JP45SOCJ.js +56 -0
  56. package/dist/hooks/{chunk-OLMO72ON.js → chunk-LAOV7NLM.js} +1 -1
  57. package/dist/hooks/chunk-M4HGZV7U.js +83 -0
  58. package/dist/hooks/{chunk-TBJFTSUY.js → chunk-O6GDRNJB.js} +9 -7
  59. package/dist/hooks/{chunk-HFGWYGUV.js → chunk-PF2NZL2A.js} +5 -5
  60. package/dist/hooks/{chunk-WNLVGT7E.js → chunk-PTICX4OL.js} +4 -5
  61. package/dist/hooks/{chunk-HHI6FO3R.js → chunk-RT27QRJW.js} +763 -1515
  62. package/dist/hooks/{chunk-7WQBPLUN.js → chunk-SYOTDYCI.js} +1149 -1095
  63. package/dist/hooks/{chunk-LIAFCXL7.js → chunk-TNUMY6NL.js} +1519 -1332
  64. package/dist/hooks/chunk-UPUZF3AN.js +279 -0
  65. package/dist/hooks/{chunk-Z4XI7CZS.js → chunk-WK6SMBIC.js} +1932 -784
  66. package/dist/hooks/codex-hook-adapter.js +17 -14
  67. package/dist/hooks/duplicate-read-guard.js +7 -7
  68. package/dist/hooks/format-edited.js +5 -4
  69. package/dist/hooks/inputs.json +302 -247
  70. package/dist/hooks/investigation-guard.js +8 -11
  71. package/dist/hooks/pretool-guard.js +16 -13
  72. package/dist/hooks/session-lang.js +372 -26
  73. package/dist/hooks/stop-guard.js +2593 -189
  74. package/dist/josh.js +2128 -282
  75. package/dist/managed-marker/index.js +1 -2
  76. package/dist/version/index.js +15 -12
  77. package/eslint/base.js +2 -1
  78. package/eslint/rules/unicorn.js +16 -0
  79. package/lefthook/base.yml +5 -3
  80. package/package.json +14 -12
  81. package/prompts/coding-standards.md +12 -22
  82. package/prompts/collaboration-workflow/file-edits.md +25 -45
  83. package/prompts/collaboration-workflow/gh-rest.md +19 -36
  84. package/prompts/collaboration-workflow/glossary.md +5 -7
  85. package/prompts/collaboration-workflow/issue-citation.md +6 -14
  86. package/prompts/collaboration-workflow/issue-template.md +40 -32
  87. package/prompts/collaboration-workflow/lane-instructions.md +35 -0
  88. package/prompts/collaboration-workflow/operating-rules.md +33 -46
  89. package/prompts/collaboration-workflow/output-bounds.md +15 -15
  90. package/prompts/collaboration-workflow/overview.md +14 -19
  91. package/prompts/collaboration-workflow/plan-comment.md +13 -13
  92. package/prompts/collaboration-workflow/principles.md +57 -54
  93. package/prompts/collaboration-workflow/proposal-request.md +1 -9
  94. package/prompts/collaboration-workflow/report-format.md +41 -49
  95. package/prompts/collaboration-workflow/residency.md +15 -11
  96. package/prompts/collaboration-workflow/rule-delivery.md +7 -15
  97. package/prompts/collaboration-workflow/shell-body.md +10 -20
  98. package/prompts/collaboration-workflow/turn-batching.md +8 -14
  99. package/prompts/collaboration-workflow/upstream-interrupt.md +26 -34
  100. package/prompts/collaboration-workflow/wip-cap.md +26 -32
  101. package/prompts/collaboration-workflow.md +25 -25
  102. package/prompts/refactoring.md +33 -43
  103. package/prompts/review-rubric.md +84 -129
  104. package/prompts/review.md +110 -141
  105. package/prompts/sonar-hotspot-handling.md +22 -50
  106. package/prompts/testing-guide.md +48 -99
  107. package/scripts/adopt/adopt-toolkits.ts +2 -4
  108. package/scripts/agent/agent-argv.ts +20 -4
  109. package/scripts/agent/agent-exit-record.ts +23 -1
  110. package/scripts/agent/agent-role-profile.ts +101 -45
  111. package/scripts/agent/agent-safe-text.ts +60 -0
  112. package/scripts/agent/claude-agent-argv.ts +14 -0
  113. package/scripts/agent/codex-agent-argv.ts +9 -2
  114. package/scripts/agent/lane-instructions.ts +144 -0
  115. package/scripts/backlog/backlog-budget-cli.ts +1 -2
  116. package/scripts/backlog/backlog-budget.ts +4 -4
  117. package/scripts/backlog/backlog-drive-carried.ts +26 -0
  118. package/scripts/backlog/backlog-drive-cli.ts +10 -5
  119. package/scripts/backlog/backlog-drive-named.ts +3 -5
  120. package/scripts/backlog/backlog-drive-restore.ts +28 -2
  121. package/scripts/backlog/backlog-drive-seats.ts +27 -0
  122. package/scripts/backlog/backlog-drive.ts +11 -6
  123. package/scripts/backlog/backlog-occupied.ts +56 -0
  124. package/scripts/backlog/backlog-ready.ts +59 -15
  125. package/scripts/behavior/behavior-rules.ts +3 -2
  126. package/scripts/cost-runtime/codex-usage.ts +4 -2
  127. package/scripts/cost-runtime/cost-cli.ts +1 -2
  128. package/scripts/delegation/duplicate-read-guard.ts +2 -2
  129. package/scripts/delegation/investigation-guard.ts +15 -65
  130. package/scripts/delegation/investigation-reads.ts +1 -2
  131. package/scripts/discovery/repo-discovery.ts +4 -2
  132. package/scripts/discovery/repo-origin.ts +2 -4
  133. package/scripts/doctor/doctor-logic.ts +6 -3
  134. package/scripts/document/document-byte-budget.ts +28 -27
  135. package/scripts/document/document-byte-check.ts +1 -2
  136. package/scripts/document/document-section-cli.ts +17 -5
  137. package/scripts/document/entry-read-budget.ts +3 -3
  138. package/scripts/document/read-set-cli.ts +4 -1
  139. package/scripts/epic/epic-audit-orphans.ts +5 -8
  140. package/scripts/epic/epic-audit-rationale.ts +8 -2
  141. package/scripts/epic/epic-audit.ts +52 -1
  142. package/scripts/epic/epic-bundle-cli.ts +1 -2
  143. package/scripts/epic/epic-bundle-evidence.ts +49 -26
  144. package/scripts/epic/epic-bundle-referenced.ts +14 -3
  145. package/scripts/epic/epic-bundle.ts +17 -9
  146. package/scripts/epic/epic-chains.ts +6 -2
  147. package/scripts/epic/epic-close-comment.ts +1 -2
  148. package/scripts/followup/git-followup-workflow.ts +19 -1
  149. package/scripts/gate/check-inputs.ts +129 -0
  150. package/scripts/gate/check-reuse.ts +162 -0
  151. package/scripts/gate/core-budget.ts +93 -44
  152. package/scripts/gate/core-wait.ts +130 -0
  153. package/scripts/gate/free-cores.ts +49 -0
  154. package/scripts/gate/gate-ledger.ts +17 -3
  155. package/scripts/gate/gate-plan.ts +23 -1
  156. package/scripts/gate/gate-report.ts +15 -2
  157. package/scripts/gate/gate-run-steps.ts +150 -0
  158. package/scripts/gate/held-mark.ts +55 -0
  159. package/scripts/gate/machine-capacity.ts +70 -11
  160. package/scripts/gate/pre-commit-type-check.ts +14 -1
  161. package/scripts/gate/verification-gate.ts +65 -127
  162. package/scripts/gh/git-gh-issue-rest.ts +1 -0
  163. package/scripts/gh/git-gh-issue-write.ts +24 -2
  164. package/scripts/gh/git-pr.ts +19 -3
  165. package/scripts/git/git-common-directory.ts +3 -3
  166. package/scripts/git/git-diff-reads.ts +16 -9
  167. package/scripts/git/git-execa-error.ts +1 -2
  168. package/scripts/git/main-merge-regenerate.ts +78 -0
  169. package/scripts/git/main-merge.ts +14 -5
  170. package/scripts/hooks/batch-guard.ts +5 -8
  171. package/scripts/hooks/format-edited-file.ts +10 -4
  172. package/scripts/hooks/pre-commit-lint.ts +91 -0
  173. package/scripts/hooks/pre-push-unit.ts +15 -4
  174. package/scripts/hooks/pretool-guard.ts +48 -79
  175. package/scripts/hooks/reserved-run.ts +1 -0
  176. package/scripts/hooks/run-hook.sh +10 -12
  177. package/scripts/hooks/step-zero-notice.ts +3 -2
  178. package/scripts/hooks/stop-actions.ts +204 -0
  179. package/scripts/hooks/stop-guard.ts +62 -21
  180. package/scripts/init/hook-command-rewrite.ts +6 -2
  181. package/scripts/init/hook-launch.ts +12 -7
  182. package/scripts/init/init-logic-deploy-vps.ts +4 -2
  183. package/scripts/issue/behavior-change-lint.ts +12 -6
  184. package/scripts/issue/expected-effect-lint.ts +59 -0
  185. package/scripts/issue/issue-cite-cli.ts +35 -15
  186. package/scripts/issue/issue-classification.ts +1 -1
  187. package/scripts/issue/issue-lint-cli.ts +5 -3
  188. package/scripts/issue/issue-scout-cli.ts +22 -16
  189. package/scripts/issue/markdown-section.ts +19 -5
  190. package/scripts/josh/command-usage.ts +110 -0
  191. package/scripts/josh/file-map-stamp.ts +1 -3
  192. package/scripts/josh/hook-decision.ts +17 -2
  193. package/scripts/josh/josh-command-map.ts +2 -0
  194. package/scripts/josh/josh-command-types.ts +55 -9
  195. package/scripts/josh/josh-commands-ai.ts +13 -0
  196. package/scripts/josh/josh-commands-development.ts +1 -1
  197. package/scripts/josh/josh-commands-hooks.ts +6 -0
  198. package/scripts/josh/josh-commands-lane.ts +10 -1
  199. package/scripts/josh/josh-commands-workflow.ts +5 -0
  200. package/scripts/josh/josh-logic.ts +6 -15
  201. package/scripts/josh/josh-usage-automation.ts +121 -0
  202. package/scripts/josh/josh-usage-backlog.ts +180 -0
  203. package/scripts/josh/josh-usage-developer.ts +230 -0
  204. package/scripts/josh/josh-usage-hooks.ts +38 -0
  205. package/scripts/josh/josh-usage-issue.ts +205 -0
  206. package/scripts/josh/josh-usage-review.ts +101 -0
  207. package/scripts/josh/josh-usage-run.ts +252 -0
  208. package/scripts/josh/josh-usage-session.ts +238 -0
  209. package/scripts/josh/josh-usage-workflow.ts +212 -0
  210. package/scripts/josh/josh.ts +14 -5
  211. package/scripts/josh/package-directory.ts +20 -0
  212. package/scripts/lane/lane-await.ts +3 -2
  213. package/scripts/lane/lane-capacity.ts +8 -2
  214. package/scripts/lane/lane-check-stats.ts +56 -0
  215. package/scripts/lane/lane-child-invocation.ts +49 -5
  216. package/scripts/lane/lane-dispatch.ts +3 -3
  217. package/scripts/lane/lane-guard-policy.ts +5 -5
  218. package/scripts/lane/lane-handoff.ts +8 -1
  219. package/scripts/lane/lane-install.ts +12 -4
  220. package/scripts/lane/lane-ledger.ts +52 -1
  221. package/scripts/lane/lane-limit-cli.ts +8 -9
  222. package/scripts/lane/lane-load.ts +9 -2
  223. package/scripts/lane/lane-measure-cli.ts +4 -0
  224. package/scripts/lane/lane-parked.ts +18 -0
  225. package/scripts/lane/lane-preserve.ts +29 -1
  226. package/scripts/lane/lane-process-load.ts +125 -0
  227. package/scripts/lane/lane-process-stats.ts +93 -0
  228. package/scripts/lane/lane-registry.ts +17 -10
  229. package/scripts/lane/lane-restart.ts +5 -26
  230. package/scripts/lane/lane-session-action.ts +146 -0
  231. package/scripts/lane/lane-session-broker.ts +68 -125
  232. package/scripts/lane/lane-spent.ts +14 -3
  233. package/scripts/lane/lane-stats.ts +1 -0
  234. package/scripts/lane/lane-withdraw-cli.ts +71 -0
  235. package/scripts/lane/lane-withdraw.ts +182 -0
  236. package/scripts/lint/format.ts +4 -4
  237. package/scripts/lint/lint-parallel.ts +10 -3
  238. package/scripts/lint/lint-related-scope.ts +4 -1
  239. package/scripts/managed-marker/managed-marker-logic.ts +1 -2
  240. package/scripts/notify/telegram-test.ts +10 -5
  241. package/scripts/overrides/lockfile-overrides.ts +1 -3
  242. package/scripts/propagate/propagate.ts +1 -2
  243. package/scripts/release/release-progress.ts +3 -2
  244. package/scripts/report/report-format-reference.ts +2 -0
  245. package/scripts/report/report-lint.ts +7 -4
  246. package/scripts/review/acceptance-map-check.ts +61 -0
  247. package/scripts/review/acceptance-map.ts +205 -0
  248. package/scripts/review/review-brief-cli.ts +1 -1
  249. package/scripts/review/review-record-cli.ts +6 -2
  250. package/scripts/rules/agent-model.ts +59 -0
  251. package/scripts/rules/delivered-rules.ts +11 -2
  252. package/scripts/rules/destructive-command.ts +6 -9
  253. package/scripts/rules/direct-filing.ts +3 -7
  254. package/scripts/rules/early-heartbeat.ts +7 -18
  255. package/scripts/rules/file-body.ts +6 -13
  256. package/scripts/rules/filing-cap.ts +4 -6
  257. package/scripts/rules/firing-point.ts +6 -5
  258. package/scripts/rules/git-force.ts +5 -9
  259. package/scripts/rules/guard-remedy.ts +117 -0
  260. package/scripts/rules/implementation-cut.ts +37 -35
  261. package/scripts/rules/index-guard.ts +4 -7
  262. package/scripts/rules/issue-comments.ts +67 -16
  263. package/scripts/rules/josh-git-bare.ts +3 -6
  264. package/scripts/rules/lane-background.ts +10 -21
  265. package/scripts/rules/lane-carry-conflict.ts +7 -17
  266. package/scripts/rules/lane-interactive-ask.ts +6 -11
  267. package/scripts/rules/lane-park.ts +5 -13
  268. package/scripts/rules/lane-split-park.ts +2 -7
  269. package/scripts/rules/lane-switch-main.ts +9 -12
  270. package/scripts/rules/last-prompt.ts +50 -5
  271. package/scripts/rules/oracle-consulted.ts +4 -5
  272. package/scripts/rules/oracle-list-cli.ts +7 -0
  273. package/scripts/rules/piped-verification.ts +84 -32
  274. package/scripts/rules/poll-loop.ts +7 -17
  275. package/scripts/rules/pre-gate-cut.ts +7 -21
  276. package/scripts/rules/prior-comment-read.ts +7 -5
  277. package/scripts/rules/protected-files.ts +5 -9
  278. package/scripts/rules/raw-field-body.ts +3 -7
  279. package/scripts/rules/rule-body-guard.ts +4 -11
  280. package/scripts/rules/rule-list.ts +4 -1
  281. package/scripts/rules/rule-registry-rows.ts +10 -0
  282. package/scripts/rules/rule-registry.ts +7 -4
  283. package/scripts/rules/rule-rewrite.ts +114 -0
  284. package/scripts/rules/rule-value.ts +7 -1
  285. package/scripts/rules/run-tail-rule.ts +6 -22
  286. package/scripts/rules/shell-body-trigger.ts +4 -6
  287. package/scripts/rules/shell-segments.ts +22 -0
  288. package/scripts/rules/stop-decision.ts +77 -0
  289. package/scripts/rules/stop-rules.ts +164 -77
  290. package/scripts/rules/tail-commands.ts +15 -1
  291. package/scripts/rules/test-declared-commit.ts +4 -10
  292. package/scripts/rules/third-party-write.ts +5 -10
  293. package/scripts/rules/worktree-guard.ts +5 -12
  294. package/scripts/run/board/run-board-cli.ts +2 -0
  295. package/scripts/run/board/run-board-closed.ts +8 -2
  296. package/scripts/run/board/run-board-github.ts +19 -3
  297. package/scripts/run/board/run-board-header.ts +4 -1
  298. package/scripts/run/board/run-board-idle.ts +31 -0
  299. package/scripts/run/board/run-board-labels.ts +2 -0
  300. package/scripts/run/board/run-board-layout.ts +1 -1
  301. package/scripts/run/board/run-board-read.ts +25 -12
  302. package/scripts/run/board/run-board-reason.ts +17 -4
  303. package/scripts/run/board/run-board-render-legend.ts +1 -0
  304. package/scripts/run/board/run-board-render-slot.ts +1 -1
  305. package/scripts/run/board/run-board-render-waits.ts +41 -0
  306. package/scripts/run/board/run-board-render.ts +6 -1
  307. package/scripts/run/board/run-board-row-yield.ts +1 -0
  308. package/scripts/run/board/run-board-state.ts +9 -0
  309. package/scripts/run/board/run-board-status.ts +89 -23
  310. package/scripts/run/board/run-board-thanks.ts +7 -2
  311. package/scripts/run/board/run-board-tick.ts +37 -8
  312. package/scripts/run/carry/run-carry-args.ts +1 -3
  313. package/scripts/run/carry/run-carry-conversation.ts +7 -2
  314. package/scripts/run/cut/run-cut-cli.ts +18 -22
  315. package/scripts/run/cut/run-cut-decline.ts +72 -0
  316. package/scripts/run/cut/run-cut-ready.ts +74 -0
  317. package/scripts/run/cut/run-cut-report.ts +29 -0
  318. package/scripts/run/cut/run-cut.ts +10 -1
  319. package/scripts/run/detached-launch.ts +23 -4
  320. package/scripts/run/entry/run-entry-cli.ts +8 -1
  321. package/scripts/run/event/run-event-render.ts +1 -0
  322. package/scripts/run/event/run-event-scope.ts +19 -1
  323. package/scripts/run/event/run-event-stream-emit.ts +13 -6
  324. package/scripts/run/event/run-event-stream.ts +4 -0
  325. package/scripts/run/hold/run-hold-cli.ts +14 -3
  326. package/scripts/run/hold/run-hold-session.ts +46 -0
  327. package/scripts/run/hold/run-hold.ts +13 -4
  328. package/scripts/run/launch-priority.ts +32 -0
  329. package/scripts/run/merge/run-merge-cli.ts +16 -42
  330. package/scripts/run/merge/run-merge-ship.ts +59 -1
  331. package/scripts/run/merge/run-merge-signals.ts +99 -0
  332. package/scripts/run/merge/run-merge-steps.ts +11 -1
  333. package/scripts/run/merge/run-merge.ts +22 -9
  334. package/scripts/run/run-ending.ts +31 -3
  335. package/scripts/run/run-liveness.ts +1 -1
  336. package/scripts/run/run-parent-cut-hook.ts +5 -10
  337. package/scripts/run/run-poll-hook.ts +157 -0
  338. package/scripts/run/run-preflight.ts +1 -2
  339. package/scripts/run/run-step-cli.ts +22 -15
  340. package/scripts/run/run-step-section.ts +85 -0
  341. package/scripts/run/run-stop-notify.ts +1 -2
  342. package/scripts/run/run-watcher-guard.ts +6 -3
  343. package/scripts/run/ship/run-ship-cli.ts +5 -12
  344. package/scripts/run/ship/run-ship-detach.ts +9 -0
  345. package/scripts/run/ship/run-ship-next.ts +10 -2
  346. package/scripts/run/ship/run-ship-overlap.ts +195 -0
  347. package/scripts/run/ship/run-ship-pre-detach.ts +33 -15
  348. package/scripts/run/ship/run-ship-preflight.ts +28 -2
  349. package/scripts/run/ship/run-ship-return.ts +31 -7
  350. package/scripts/run/ship/run-ship-review-steps.ts +25 -14
  351. package/scripts/run/ship/run-ship-review.ts +15 -2
  352. package/scripts/run/ship/run-ship-steps.ts +1 -1
  353. package/scripts/run/ship/run-ship-stop-context.ts +206 -0
  354. package/scripts/run/ship/run-ship-sync.ts +14 -6
  355. package/scripts/run/tidy/run-tidy-cli.ts +3 -3
  356. package/scripts/run/tidy/run-tidy-lanes.ts +3 -2
  357. package/scripts/safe-chain/project-config.ts +7 -2
  358. package/scripts/sync/sync-hook-safety.ts +8 -2
  359. package/scripts/test/test-e2e-guard.ts +30 -5
  360. package/scripts/test/test-unit-guard.ts +16 -1
  361. package/scripts/test/unit-worker-share.ts +26 -3
  362. package/scripts/time-runtime/time-batch-guard.ts +3 -3
  363. package/scripts/time-runtime/time-hook-transcript.ts +3 -2
  364. package/scripts/time-runtime/time-shell.ts +39 -4
  365. package/scripts/time-runtime/time-spans.ts +1 -0
  366. package/scripts/time-runtime/time-tool-call.ts +7 -0
  367. package/scripts/version/effective-upstream.ts +3 -4
  368. package/scripts/version/kit-version-config.ts +8 -2
  369. package/scripts/version/latest-corepack.ts +1 -2
  370. package/scripts/version/release-hold.ts +11 -4
  371. package/scripts/version/version-commands.ts +12 -4
  372. package/templates/gitignore +6 -2
  373. package/dist/hooks/chunk-D5QBTOCZ.js +0 -68
  374. package/dist/hooks/chunk-UT7YC3N2.js +0 -56
@@ -1,52 +1,41 @@
1
1
  # The split assessment — one definition, every entry point
2
2
 
3
- Before any entry point starts work on an Issue, decide whether the request is really **one**
4
- deliverable or several. This file is the single definition; every command applies it identically.
3
+ Before any entry point starts work on an Issue, decide whether the request is **one** deliverable or
4
+ several. Every command applies it identically.
5
5
 
6
6
  ## The question
7
7
 
8
- **The default is not to split.** Two questions have to answer yes **together**; either one alone
9
- leaves the work as one Issue:
8
+ **The default is not to split.** Two questions have to answer yes **together**:
10
9
 
11
10
  1. **Does the request contain two or more deliverables that could each be merged separately?**
12
11
  2. **Does the whole of it clearly exceed what one verification gate can confirm in one pass?** The
13
12
  guide is **about 10 changed files and about 400 changed lines** (test files excluded).
14
13
  Under that, it is one Issue however many separable pieces a reader can name inside it.
15
14
 
16
- Separately mergeable is still the first test, and it is unchanged: a change that must land in one
17
- commit to be correct is one deliverable however big it is. What changed is that **separability alone
18
- no longer splits anything** — it is now a necessary condition rather than a sufficient one.
19
-
20
- **The guide is a guide, and "clearly" is the operative word.** A run that has to argue itself past the
21
- numbers has already answered no. They are read against the whole request's estimate, not against the
22
- diff a first pass happens to produce, and a request that lands at 11 files is not thereby a split.
15
+ A change that must land in one commit to be correct is one deliverable however big it is; **separability
16
+ alone no longer splits anything**. **"Clearly" is the operative word** — a run that has to argue past
17
+ the numbers has answered no. They are read against the whole request's estimate, and 11 files is not
18
+ thereby a split.
23
19
 
24
20
  ## The same two questions decide the filing-time fold
25
21
 
26
22
  **The entry's split decision and the filing-time fold decision are the same two conditions, stated
27
- here once.** This assessment asks whether *one request* is several deliverables; the fold decision asks
28
- whether *several findings from one session* are one Issue — and reads the **same two questions in the
29
- same conjunction**: separability, and whether the whole clearly exceeds one gate.
30
- `pnpm josh issue:fold "<title>" …` answers `fold` / `separate` / `no-fold-needed`; its size half is
31
- `pnpm josh split:assess`, called not recomputed, and `separate` needs both halves exactly as `split`
32
- does. A diff with no non-test file, or none readable, answers `undetermined`: the size is then the
33
- whole request's estimate above. **There is no second criterion.** `observation-filing.md`'s observation, the review round cap's branch 2 and `prerequisite.md`'s
23
+ here once** — the fold asks whether *several findings from one session* are one Issue, with the same
24
+ conjunction. `pnpm josh issue:fold "<title>" …` answers `fold` / `separate` / `no-fold-needed`; its size
25
+ half is `pnpm josh split:assess`, called not recomputed. A diff with no readable non-test file answers
26
+ `undetermined`, and the size is the request's estimate. **There is no second criterion.**
27
+ `observation-filing.md`'s observation, the review round cap's branch 2 and `prerequisite.md`'s
34
28
  prerequisite each route a second filing through it — `pnpm josh issue:file` asks it itself at the
35
29
  run's second filing, never the first, and holds only a `fold`.
36
30
 
37
31
  ## Diff size is not a reason to split, and that is measured
38
32
 
39
- **Size is a bar a split has to clear; it is never a reason to split.** Question 2 is a *minimum* — below
40
- it the work stays whole — and nothing makes a large diff a reason to divide one. **A proposal to add a
41
- size threshold that splits more is required to say why the round-1 measurement does not reach it.**
42
- Rationale: `docs/maintainers/split-assessment-rationale.md` → "Why the default is not to split" and
43
- `docs/maintainers/split-assessment-rationale.md` → "Why diff size is not a reason to split".
33
+ **Size is a bar a split has to clear; it is never a reason to split.** **A proposal to add a size
34
+ threshold that splits more is required to say why the round-1 measurement does not reach it.**
44
35
 
45
- **The size half is measured, not eyeballed — `pnpm josh split:assess`.** It counts the branch's
46
- changed files and changed lines with test files excluded and answers `split` / `single` on size
47
- alone, so the guide can be checked against real diffs after the fact rather than trusted from an
48
- estimate. It answers the **size** question only; separability (question 1) stays a judgement, which is
49
- why a `split` from this command is the size condition met, not a decision to divide the Issue.
36
+ **The size half is measured, not eyeballed — `pnpm josh split:assess`** counts the branch's changed
37
+ files and lines, test files excluded, and answers `split` / `single` on size alone. Separability stays
38
+ a judgement, so its `split` is the size condition met, not a decision to divide.
50
39
 
51
40
  ## What each entry point does with the answer
52
41
 
@@ -59,26 +48,19 @@ why a `split` from this command is the size condition met, not a decision to div
59
48
 
60
49
  ## A prerequisite is not a split
61
50
 
62
- "This needs something else done first" is a different answer from "this is really several things". A
63
- split means the request in hand contains two or more deliverables; a prerequisite means it is still
64
- **one** deliverable that has another one in front of it. The prerequisite rule is `prerequisite.md`, its
65
- single source; each entry's own branch is in `backlogrun-park.md` → "A prerequisite discovered mid-run" and, for
66
- the stopping entry points, in `fullrun.md` / `halfrun.md`.
51
+ A split means the request contains several deliverables; a prerequisite means it is **one** deliverable
52
+ with another in front of it. `prerequisite.md` is the single source; each entry's branch is in
53
+ `backlogrun-park.md` → "A prerequisite discovered mid-run" and `fullrun.md` / `halfrun.md`.
67
54
 
68
55
  ## Two or more always means an epic
69
56
 
70
57
  **Splitting into two or more Issues always creates an epic. There is no count threshold and no ordering
71
- condition to evaluate.** This is about what follows a split, never about whether to make one — the bar
72
- for that is "The question" above. **An entry point that applies a different condition is a defect** —
73
- the whole point of one definition is that where the split was noticed cannot change what happens next.
74
-
75
- The epic is the non-closing home for the split rationale. A comment on the first child is buried the
76
- moment that child merges and closes.
58
+ condition to evaluate.** **An entry point that applies a different condition is a defect.** The epic
59
+ is the non-closing home for the split rationale.
77
60
 
78
61
  **Each split child is filed with the `route:split` label** —
79
- `pnpm josh issue:file "<sub-title>" --body-file <body-file> --depth <n> --route split` — so the
80
- backlog's composition stays countable by filing route rather than by grepping issue bodies. Each child
81
- is judged for `auto-ok` like any filing (`kickoff.md` → "Words typed after `new`").
62
+ `pnpm josh issue:file "<sub-title>" --body-file <body-file> --depth <n> --route split` — and judged for
63
+ `auto-ok` like any filing (`kickoff.md` → "Words typed after `new`").
82
64
 
83
65
  ## Promote, or create a new epic
84
66
 
@@ -87,33 +69,25 @@ on the Issue, without asking.
87
69
 
88
70
  - **`#N` is a request, a discussion, or a container → promote it.**
89
71
  `pnpm josh epic --promote <N> <N1> <N2> ... [--ordered]`. The body is appended to, never replaced.
90
- - **`#N` is itself one of the deliverables → keep `#N` as a child and create a new epic.** A bug report
91
- that turns out to need three fixes is the case: promoting the report would leave the report itself
92
- with nowhere to live.
72
+ - **`#N` is itself one of the deliverables → keep `#N` as a child and create a new epic** — e.g. a bug
73
+ report that needs three fixes.
93
74
 
94
75
  ## `backlogrun` is the one entry that does not stop
95
76
 
96
- `backlogrun` asked for the batch's authorization, so a split found under it is filed and continued through
97
- rather than stopped — including when the `backlogrun` was given a bare, non-epic Issue, where the split is
98
- what creates the epic (`backlogrun-child.md` → "When `#N` is not an epic"). The assessment itself is identical;
99
- only what follows the answer differs.
77
+ A split found under `backlogrun` is filed and continued through — including from a bare, non-epic
78
+ Issue, where the split creates the epic (`backlogrun-child.md` → "When `#N` is not an epic").
100
79
 
101
80
  ## Finding a split mid-run stops the run
102
81
 
103
- `fullrun` and `halfrun` **stop** after filing the children and the epic. They do not continue into
104
- implementation, and they do not silently become a `backlogrun`. Typing `fullrun` approved implementing and
105
- merging **one** Issue; a batch of N is a different authorization. Report what was filed and end with:
82
+ `fullrun` and `halfrun` **stop** after filing the children and the epic — typing `fullrun` approved
83
+ **one** Issue. Report what was filed and end with:
106
84
 
107
85
  > Please run `backlogrun #<E> --only` to execute this epic.
108
86
 
109
87
  ## There is no `kickoff epic`
110
88
 
111
- A separate keyword for "split this conversation into an epic" would duplicate `kickoff new` exactly,
112
- leaving a person to decide which of two commands to type for one job. The assessment above is how a
113
- split is reached from every entry.
89
+ It would duplicate `kickoff new`; the assessment above reaches a split from every entry.
114
90
 
115
91
  ## Issues filed separately, found related later
116
92
 
117
- Issues that were filed at different times and turn out to be related afterwards are **not** a split — a
118
- split is about one request in hand containing several deliverables. That case is outside this
119
- assessment, and `pnpm josh epic --promote` is what handles it.
93
+ Not a split — `pnpm josh epic --promote` handles it.
@@ -2,8 +2,7 @@
2
2
 
3
3
  **This file is the prefix's single source, read at its point of use — the moment an entry is typed with an
4
4
  `owner/repo#` prefix (or a short `repo#` name), not at any entry.** A run given a bare `#N` or `new`
5
- targets the session's own repository and never reaches it. `SKILL.md` → §2's table keeps the trigger and
6
- points here. Rationale: `docs/maintainers/target-repository-rationale.md` → "Why the prefix reads as it does".
5
+ targets the session's own repository and never reaches it.
7
6
 
8
7
  Every entry point takes the target repository in front of the Issue reference. Without it the target
9
8
  is the repository the session runs in.
@@ -1,12 +1,10 @@
1
1
  # The working-tree hold — one run per tree
2
2
 
3
- **The single source of the hold**, read at its point of use — the moment a run is about to claim or
4
- release the tree. History: `docs/maintainers/working-tree-hold-rationale.md` → "Where each rule came from".
3
+ Read the moment a run is about to claim or release the tree.
5
4
 
6
- **Ask `pnpm josh run:hold` before anything else, and obey what it answers.** It is the first call of
7
- `fullrun` and `halfrun` alike — before the title is normalized, before `pnpm josh ms`, and **before
8
- a `new` entry files its Issue**, because a run stopped after the filing has already left behind the
9
- artifact it should not have created.
5
+ **Ask `pnpm josh run:hold` before anything else, and obey what it answers** — the first call of
6
+ `fullrun` and `halfrun`, before the title, before `pnpm josh ms`, and **before a `new` entry files its
7
+ Issue**.
10
8
 
11
9
  ```bash
12
10
  pnpm josh run:hold <N> # a `#N` entry point
@@ -17,81 +15,64 @@ pnpm josh run:release --force # a record left behind by a run that has ended
17
15
  ```
18
16
 
19
17
  - **`hold` — this run now holds the tree. Continue.**
20
- - **`busy` — another run holds it. Stop.** Send a `confirmation` Telegram carrying what the command
21
- printed on stderr (the holder, when the record was written, and the release command) and stop.
22
- **File nothing, create no branch, edit nothing.**
18
+ - **`busy` — another run holds it. Stop.** Send a `confirmation` Telegram carrying its stderr (the
19
+ holder, when the record was written, the release command). **File nothing, create no branch, edit
20
+ nothing.**
23
21
  - **`unknown` — nothing was established. Stop the same way.** It is not "the tree is free".
24
22
 
25
23
  **The unit is the working tree** — one branch, one index and one uncommitted diff, and a linked work
26
- tree has its own three. **`backlogrun`'s per-repository guard (`epic-busy.ts`) is a separate layer and is
27
- unchanged.**
28
-
29
- **`kickoff` does not claim it** — it touches GitHub, never the branch, index or diff. Rationale for both:
30
- `docs/maintainers/working-tree-hold-rationale.md` → "Why the unit is the working tree".
31
-
32
- **Claim it in the checkout the run will edit.** The record is keyed to the work tree the command runs
33
- in, so a cross-repository `fullrun owner/repo#N` resolves that repository's checkout from `pnpm josh
34
- doctor` **first** — that resolution is a read and writes nothing — and claims there.
35
-
36
- **A release names the run it belongs to.** `pnpm josh run:release <N>` removes the record only where the
37
- record names `<N>`, the bare form only the unnumbered run's, and a record belonging to anything else
38
- answers **`held`** and is left standing. **`pnpm josh run:release --force` is the one spelling that
39
- removes a record this run did not write**, and the `busy` stop message names it rather than the
40
- ordinary one.
41
-
42
- **Release what the claim recorded, which is not always the Issue number.** A `#N` entry claimed `<N>`
43
- and releases `<N>`; a **`new` entry claimed before its Issue existed**, so it releases with the
44
- **bare** form however many numbers the run has acquired since — so a `fullrun new` that stops on a
45
- split types `pnpm josh run:release`, not `pnpm josh run:release <N>`. The bare form removes no
46
- label, so every `new` stop that releases — a split, a prerequisite or a third-party target — also runs `gh api -X DELETE repos/{owner}/{repo}/issues/<N>/labels/in-progress
47
- 2>/dev/null || true`.
48
-
49
- **Releasing is the run's, not a person's memory.** `pnpm josh followup` releases the hold on a merged
50
- run, and a record abandoned by a crashed session expires after 8 hours. **A stop that leaves the tree
51
- clean releases it explicitly**: a `fullrun` / `halfrun` that stops on a split, a prerequisite or a
52
- third-party target ends with `pnpm josh run:release <N>` (bare where that run entered as `new`, followed by the label DELETE above).
53
- **`halfrun`'s stop before commit keeps the hold**, and so does a `needs-human-review` stop: the
54
- uncommitted work still in the tree is exactly what a second run would trample, so the release command
55
- goes in the stop report and the Telegram for the person to type. **`fullrun #<N>` of the same issue
56
- adopts a `halfrun`'s kept hold** rather than being refused `busy` by it — "The halfrun resume" below. **An expired record over a tree that
57
- still has uncommitted changes does not free it**: the command answers `busy` and says to commit, stash,
58
- or release once the work is done; only an expired record over a clean tree is replaced.
59
-
60
- **The batch entry points claim per child, not per batch.** `backlogrun` never
61
- call it themselves; each child runs the `fullrun` procedure, so it claims on entry and `pnpm josh
62
- followup` releases it at that child's merge. The command's behavior and the answer table are
63
- `docs/josh-commands-run.md` → "`josh run:hold` / `josh run:release`"; this file is the single source of
64
- the procedure.
24
+ tree has its own three. **`backlogrun`'s per-repository guard (`epic-busy.ts`) is a separate layer.** **`kickoff`
25
+ does not claim it.**
26
+
27
+ **Claim it in the checkout the run will edit** — a cross-repository `fullrun owner/repo#N` resolves
28
+ that checkout from `pnpm josh doctor` **first** (a read) and claims there.
29
+
30
+ **A release names the run it belongs to.** `pnpm josh run:release <N>` removes only a record naming
31
+ `<N>`, the bare form only the unnumbered run's; anything else answers **`held`** and stands. **`pnpm
32
+ josh run:release --force` is the one spelling that removes a record this run did not write**, and the
33
+ `busy` message names it.
34
+
35
+ **Release what the claim recorded.** A `#N` entry releases `<N>`; a **`new` entry claimed before its
36
+ Issue existed**, so it releases with the **bare** form — a `fullrun new` that stops on a split types
37
+ `pnpm josh run:release`. The bare form removes no label, so every `new` stop that releases also runs
38
+ `gh api -X DELETE repos/{owner}/{repo}/issues/<N>/labels/in-progress 2>/dev/null || true`.
39
+
40
+ **Releasing is the run's, not a person's memory.** `pnpm josh followup` releases on a merged run; an
41
+ abandoned record expires after 8 hours. **A stop that leaves the tree clean releases it explicitly** —
42
+ a split, a prerequisite or a third-party target ends with `pnpm josh run:release <N>` (bare for a `new`
43
+ entry, plus the label DELETE). **`halfrun`'s stop before commit keeps the hold**, as does a
44
+ `needs-human-review` stop: the release command goes in the stop report and the Telegram for the person
45
+ to type. **`fullrun #<N>` of the same issue adopts a `halfrun`'s kept hold** — "The halfrun resume"
46
+ below. **An expired record over a tree that still has uncommitted changes does not free it** — it
47
+ answers `busy`; only an expired record over a clean tree is replaced.
48
+
49
+ **The batch entry points claim per child, not per batch** — each `backlogrun` child claims on entry and
50
+ `pnpm josh followup` releases at its merge. The answer table is `docs/josh-commands-run.md` → "`josh
51
+ run:hold` / `josh run:release`".
65
52
 
66
53
  ## The halfrun resume
67
54
 
68
- **`fullrun #<N>` or `prrun #<N>` after a `halfrun` stop resumes it instead of claiming.** The
69
- stop is **recorded, never inferred**: the `halfrun` ends with `pnpm josh run:hold <N> --halfrun-stop`,
70
- which marks its own record (re-keying a `halfrun new`'s unnumbered one to the filed issue) — a
71
- `halfrun` still implementing or a `backlogrun` child leaves the same hold over the same dirty tree, and
72
- must not be adopted. On a marked hold for `#<N>` over a dirty tree, `run:entry` asks the session budget
73
- (`over` stops as usual), adopts the hold with the `fullrun` mark and prints `entry #<N> — resume:
74
- halfrun`. **Skip the title, the plan, the split assessment, `pnpm josh ms`,
75
- `latest:scope` and the implementation**: the diff in the tree is what the person verified. Re-read the
76
- issue (`pnpm josh issue:read <N>`), then run the gate **in full** from the refactor (`chain-rule.md` →
77
- "Run the review-to-merge chain") — a fix made during the manual check has had no gate — and ship as
78
- any `fullrun` does.
55
+ **`fullrun #<N>` or `prrun #<N>` after a `halfrun` stop resumes it instead of claiming.** The stop is
56
+ **recorded, never inferred**: the `halfrun` ends with `pnpm josh run:hold <N> --halfrun-stop`, marking
57
+ its record (re-keying a `halfrun new`'s unnumbered one) — a `halfrun` still implementing or a
58
+ `backlogrun` child leaves the same dirty tree and is not adopted. On a marked hold for `#<N>`,
59
+ `run:entry` asks the session budget, adopts the hold and prints `entry #<N> — resume: halfrun`. **Skip
60
+ the title, the plan, the split assessment, `pnpm josh ms`, `latest:scope` and the implementation**;
61
+ re-read the issue (`pnpm josh issue:read <N>`), run the gate **in full** from the refactor
62
+ (`chain-rule.md` → "Run the review-to-merge chain"), and ship as any `fullrun` does.
79
63
 
80
64
  ## The prrun resume
81
65
 
82
- **`fullrun #<N>` after a `prrun` stop resumes it the same way.** The `prrun`
83
- ends with `pnpm josh run:hold <N> --prrun-stop`, which writes the commit its pull request is on into its
84
- own record; only a record carrying that commit is adopted. `run:entry` asks the session budget, adopts
85
- the hold with the `fullrun` mark and prints one of three tokens — read, never inferred:
86
-
87
- - **`resume: prrun-merged`** — a person merged the pull request. Run `pnpm josh followup "<title>
88
- #<N>"` alone: it detects the merge and runs only the post-merge tail.
89
- - **`resume: prrun-merge`** — the branch is still on the stop's commit, both here and on the pull
90
- request, and the tree is clean, so what was verified is what would merge. Skip the gate and the
91
- review; run `pnpm josh followup` to merge.
92
- - **`resume: prrun-gate`** — the branch moved (locally, or by a push made on GitHub), its pull request
93
- could not be read, or the tree is dirty: a person changed something. Run the
94
- gate **in full** and the review (`chain-rule.md` → "Run the review-to-merge chain"), then ship as any
95
- `fullrun` does.
66
+ **`fullrun #<N>` after a `prrun` stop resumes it the same way.** The `prrun` ends with `pnpm josh
67
+ run:hold <N> --prrun-stop`, which records its pull request's commit; only a record carrying it is
68
+ adopted. `run:entry` prints one of three tokens — read, never inferred:
69
+
70
+ - **`resume: prrun-merged`** — a person merged it. Run `pnpm josh followup "<title> #<N>"` alone; it
71
+ runs only the post-merge tail.
72
+ - **`resume: prrun-merge`** — branch and pull request still on the stop's commit, tree clean. Skip the
73
+ gate and the review; run `pnpm josh followup` to merge.
74
+ - **`resume: prrun-gate`** — the branch moved, its pull request could not be read, or the tree is
75
+ dirty. Run the gate **in full** and the review (`chain-rule.md` → "Run the review-to-merge chain"),
76
+ then ship.
96
77
 
97
78
  All three skip the title, the plan, the split assessment and the implementation.
package/.codex/hooks.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "hooks": [
7
7
  {
8
8
  "type": "command",
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",
9
+ "command": "if project_root=\"$(unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null)\"; then unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; else project_root=\"$(git rev-parse --show-toplevel)\"; fi && cd \"$project_root\" && sh scripts/hooks/run-hook.sh audit-provision",
10
10
  "timeout": 180
11
11
  }
12
12
  ]
@@ -17,7 +17,7 @@
17
17
  "hooks": [
18
18
  {
19
19
  "type": "command",
20
- "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 session-lang",
20
+ "command": "if project_root=\"$(unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null)\"; then unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; else project_root=\"$(git rev-parse --show-toplevel)\"; fi && cd \"$project_root\" && sh scripts/hooks/run-hook.sh session-lang",
21
21
  "timeout": 10
22
22
  }
23
23
  ]
@@ -25,11 +25,11 @@
25
25
  ],
26
26
  "PreToolUse": [
27
27
  {
28
- "matcher": "Bash|Edit|Read|Write|AskUserQuestion|apply_patch",
28
+ "matcher": "Bash|Edit|Read|Write|AskUserQuestion|Agent|Task|apply_patch",
29
29
  "hooks": [
30
30
  {
31
31
  "type": "command",
32
- "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 codex-hook-adapter pretool",
32
+ "command": "if project_root=\"$(unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null)\"; then unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; else project_root=\"$(git rev-parse --show-toplevel)\"; fi && cd \"$project_root\" && sh scripts/hooks/run-hook.sh codex-hook-adapter pretool",
33
33
  "timeout": 20
34
34
  }
35
35
  ]
@@ -41,7 +41,7 @@
41
41
  "hooks": [
42
42
  {
43
43
  "type": "command",
44
- "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 codex-hook-adapter posttool",
44
+ "command": "if project_root=\"$(unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null)\"; then unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; else project_root=\"$(git rev-parse --show-toplevel)\"; fi && cd \"$project_root\" && sh scripts/hooks/run-hook.sh codex-hook-adapter posttool",
45
45
  "timeout": 90
46
46
  }
47
47
  ]
@@ -53,7 +53,7 @@
53
53
  "hooks": [
54
54
  {
55
55
  "type": "command",
56
- "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 stop-guard",
56
+ "command": "if project_root=\"$(unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null)\"; then unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; else project_root=\"$(git rev-parse --show-toplevel)\"; fi && cd \"$project_root\" && sh scripts/hooks/run-hook.sh stop-guard",
57
57
  "timeout": 20
58
58
  }
59
59
  ]
@@ -26,7 +26,7 @@ runs:
26
26
  using: composite
27
27
  steps:
28
28
  - name: Setup Node.js
29
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
29
+ uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
30
30
  with:
31
31
  node-version: '24'
32
32
  registry-url: ${{ inputs.registry-url }}
@@ -493,7 +493,7 @@ jobs:
493
493
  uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
494
494
 
495
495
  - name: Run security audit
496
- uses: google/osv-scanner-action/osv-scanner-action@a345acffa64b0eaede81a3d9aae6141214d9c8fc # v2.6.0
496
+ uses: google/osv-scanner-action/osv-scanner-action@b1d267aea5211fa648d9d442fa64b90dbdcbdd36 # v2.7.0
497
497
  with:
498
498
  scan-args: --lockfile=pnpm-lock.yaml
499
499
 
@@ -83,7 +83,7 @@ jobs:
83
83
  env:
84
84
  LATEST: ${{ steps.registry-latest.outputs.latest }}
85
85
 
86
- - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
86
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
87
87
  with:
88
88
  name: kit-package
89
89
  path: ${{ runner.temp }}
@@ -126,7 +126,7 @@ jobs:
126
126
  with:
127
127
  cache: 'false'
128
128
 
129
- - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
129
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
130
130
  with:
131
131
  name: kit-package
132
132
  path: ${{ runner.temp }}
package/CLAUDE.md CHANGED
@@ -7,13 +7,14 @@ Stack: TypeScript · pnpm · SvelteKit · Vitest · Playwright · TailwindCSS ·
7
7
  ## Communication
8
8
 
9
9
  - **Answer opinion-seeking questions from a neutral standpoint.** A leading question is not a cue to agree — recommend the option you genuinely judge best.
10
- - **Fix root causes, not symptoms.** Where the proper fix is out of scope, surface the root cause instead of papering over it.
10
+ - **Fix root causes, not symptoms.** Where the proper fix is out of scope, surface it instead of papering over it.
11
11
  - **Cross-package problems → file the upstream Issue, then stop.** A defect in another package (a dependency, or `josh` / kit tooling) is never worked around locally — **weakening a verification gate is a workaround too**. File it (first-party Tier A, third-party Tier C) and stop. `prompts/collaboration-workflow/upstream-interrupt.md`. Your own repository's run tooling is not another package: `upstream-interrupt.md` → "実行中のリポジトリ自身のラン機構の不具合".
12
12
  - **Third-party repositories are Tier C.** Decide the party with `pnpm josh repo:party`; every write to a tracker we do not own needs explicit current-turn instruction. `prompts/collaboration-workflow/upstream-interrupt.md`.
13
13
  - **No clones — single-source, even across package boundaries.** Duplicate non-trivial logic only after presenting the alternative and getting explicit approval. `prompts/collaboration-workflow/principles.md` → "no-clones".
14
14
  - **Design for elegance and simplicity first.** Before adding a hook, guard, rule or abstraction, ask whether fixing the cause makes it unnecessary. `prompts/collaboration-workflow/principles.md` → "elegant-design"; conflicting quality goals → "quality-priority".
15
+ - **Write concise prose: conditions and actions only.** `prompts/collaboration-workflow/principles.md` → "concise-prose".
15
16
  - **Distinguish consultation from execution.** A question or goal statement asks for analysis only — act on an explicit imperative or a workflow keyword. `prompts/collaboration-workflow/principles.md` → "consult-vs-execute".
16
- - **Route distributed-doc / config changes upstream to kit.** In a consumer repo never edit kit-distributed docs/config (`josh sync` overwrites them); in kit you are the source. `prompts/collaboration-workflow/principles.md` → "upstream-to-kit".
17
+ - **Route distributed-doc / config changes upstream to kit.** In a consumer repo never edit kit-distributed docs/config; in kit you are the source. `prompts/collaboration-workflow/principles.md` → "upstream-to-kit".
17
18
  - **Latest-first, fix forward — pin back only as a last resort.** `prompts/collaboration-workflow/principles.md` → "latest-first".
18
19
  - **Output language follows `JOSH_SESSION_LANG`** (default `ja`) for session output and artifact prose; English for Issue/PR titles, code comments, test titles, commit messages and script strings. `prompts/collaboration-workflow/overview.md`.
19
20
  - **Durable rules belong in prompts/docs, not local MEMORY.** `prompts/collaboration-workflow/principles.md` → "durable-rules".
@@ -31,16 +32,16 @@ Log auto-decisions: an Issue comment in an Issue workflow, else a one-line "Auto
31
32
 
32
33
  ## Critical Conventions (non-standard — always apply)
33
34
 
34
- Naming, exports, file names and content rules are enforced by `eslint/rules/`; their single source is `prompts/coding-standards.md` → "Conventions". `function` syntax, not arrows (named SvelteKit route handlers may use the typed-const arrow idiom) — lint does not check it.
35
+ Naming, exports, file names and content rules are enforced by `eslint/rules/`; their single source is `prompts/coding-standards.md` → "Conventions". `function` syntax, not arrows (named SvelteKit route handlers may use typed-const arrows); lint does not check it.
35
36
 
36
37
  ### Quality limits
37
38
 
38
- - Function complexity ≤5 · nesting ≤2 · function ≤25 lines · file ≤300 lines · params ≤4 · statements per function ≤10 · cognitive complexity ≤4 — line counts are code lines, not physical lines (`pnpm josh lint`); test files allow 35 code lines per function.
39
+ - Function complexity ≤5 · nesting ≤2 · function ≤25 lines · file ≤300 lines · params ≤4 · statements per function ≤10 · cognitive complexity ≤4 — line counts are code lines, not physical lines; test functions allow 35 code lines.
39
40
  - No magic numbers beyond `0`, `1`, `-1` · no `any` · restricted `as` · explicit param and return types · single short early return → one-liner `if (x) return y`.
40
41
 
41
42
  ## Package-First Development
42
43
 
43
- Before building a feature, check for a well-maintained package — measure with `pnpm josh pkg:scout <keywords>`: `clear` → select it (Tier A), `close` → ask (Tier B).
44
+ Before building a feature, run `pnpm josh pkg:scout <keywords>`: `clear` → use it (Tier A), `close` → ask (Tier B).
44
45
 
45
46
  ## Code Change Rules
46
47
 
@@ -79,7 +80,7 @@ Never start a `kickoff` / `halfrun` / `prrun` / `fullrun` / `backlogrun` workflo
79
80
 
80
81
  #### Mid-workflow stop notification (`confirmation`)
81
82
 
82
- Before pausing **any** run for the user — a command's stop, an upstream-Issue interrupt, a Tier C confirmation — send once per stop (skip when the user asked for the stop this turn):
83
+ The `Stop` hook sends it when your held run awaits a decision — lead with the reason, end with `Recommended: <choice>`. Send it yourself only when the hook refuses the stop:
83
84
 
84
85
  ```bash
85
86
  pnpm josh notify --task-type confirmation --issue-url "<url>" --body=$'<reason>' --recommended "<choice>" --alternative "<other>"
package/cspell/index.yaml CHANGED
@@ -26,11 +26,17 @@ ignorePaths:
26
26
  # joshuafolkken/kit#1347: `josh lint:related` has its own for the same reason — an implementation
27
27
  # loop calls it while the gate lints the whole tree, and two eslint runs on one cache file discard
28
28
  # each other's entries.
29
+ # joshuafolkken/kit#3948: prettier's gate and scoped caches, and the pre-commit hook's own cspell and
30
+ # eslint caches — a staged-files run on the gate's file would prune or narrow it.
29
31
  - '**/.eslintcache'
30
32
  - '**/.eslintcache.edit'
31
33
  - '**/.eslintcache.related'
34
+ - '**/.eslintcache.commit'
32
35
  - '**/.tsbuildinfo'
33
36
  - '**/.cspellcache'
37
+ - '**/.cspellcache.commit'
38
+ - '**/.prettiercache'
39
+ - '**/.prettiercache.related'
34
40
  - '**/.gitignore'
35
41
  - '**/pnpm-lock.yaml'
36
42
  - '**/.vscode/**'
@@ -110,6 +116,7 @@ words:
110
116
  - domcontentloaded
111
117
  - esbuild
112
118
  - eslintcache
119
+ - prettiercache
113
120
  - fetchpriority
114
121
  - fullrun
115
122
  - halfrun
package/dist/CLAUDE.md CHANGED
@@ -7,13 +7,14 @@ Stack: TypeScript · pnpm · SvelteKit · Vitest · Playwright · TailwindCSS ·
7
7
  ## Communication
8
8
 
9
9
  - **Answer opinion-seeking questions from a neutral standpoint.** A leading question is not a cue to agree — recommend the option you genuinely judge best.
10
- - **Fix root causes, not symptoms.** Where the proper fix is out of scope, surface the root cause instead of papering over it.
10
+ - **Fix root causes, not symptoms.** Where the proper fix is out of scope, surface it instead of papering over it.
11
11
  - **Cross-package problems → file the upstream Issue, then stop.** A defect in another package (a dependency, or `josh` / kit tooling) is never worked around locally — **weakening a verification gate is a workaround too**. File it (first-party Tier A, third-party Tier C) and stop. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/upstream-interrupt.md`. Your own repository's run tooling is not another package: `upstream-interrupt.md` → "実行中のリポジトリ自身のラン機構の不具合".
12
12
  - **Third-party repositories are Tier C.** Decide the party with `pnpm josh repo:party`; every write to a tracker we do not own needs explicit current-turn instruction. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/upstream-interrupt.md`.
13
13
  - **No clones — single-source, even across package boundaries.** Duplicate non-trivial logic only after presenting the alternative and getting explicit approval. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/principles.md` → "no-clones".
14
14
  - **Design for elegance and simplicity first.** Before adding a hook, guard, rule or abstraction, ask whether fixing the cause makes it unnecessary. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/principles.md` → "elegant-design"; conflicting quality goals → "quality-priority".
15
+ - **Write concise prose: conditions and actions only.** `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/principles.md` → "concise-prose".
15
16
  - **Distinguish consultation from execution.** A question or goal statement asks for analysis only — act on an explicit imperative or a workflow keyword. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/principles.md` → "consult-vs-execute".
16
- - **Route distributed-doc / config changes upstream to kit.** In a consumer repo never edit kit-distributed docs/config (`josh sync` overwrites them); in kit you are the source. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/principles.md` → "upstream-to-kit".
17
+ - **Route distributed-doc / config changes upstream to kit.** In a consumer repo never edit kit-distributed docs/config; in kit you are the source. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/principles.md` → "upstream-to-kit".
17
18
  - **Latest-first, fix forward — pin back only as a last resort.** `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/principles.md` → "latest-first".
18
19
  - **Output language follows `JOSH_SESSION_LANG`** (default `ja`) for session output and artifact prose; English for Issue/PR titles, code comments, test titles, commit messages and script strings. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/overview.md`.
19
20
  - **Durable rules belong in prompts/docs, not local MEMORY.** `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/principles.md` → "durable-rules".
@@ -31,16 +32,16 @@ Log auto-decisions: an Issue comment in an Issue workflow, else a one-line "Auto
31
32
 
32
33
  ## Critical Conventions (non-standard — always apply)
33
34
 
34
- Naming, exports, file names and content rules are enforced by `node_modules/@joshuafolkken/kit/eslint/rules/`; their single source is `node_modules/@joshuafolkken/kit/prompts/coding-standards.md` → "Conventions". `function` syntax, not arrows (named SvelteKit route handlers may use the typed-const arrow idiom) — lint does not check it.
35
+ Naming, exports, file names and content rules are enforced by `node_modules/@joshuafolkken/kit/eslint/rules/`; their single source is `node_modules/@joshuafolkken/kit/prompts/coding-standards.md` → "Conventions". `function` syntax, not arrows (named SvelteKit route handlers may use typed-const arrows); lint does not check it.
35
36
 
36
37
  ### Quality limits
37
38
 
38
- - Function complexity ≤5 · nesting ≤2 · function ≤25 lines · file ≤300 lines · params ≤4 · statements per function ≤10 · cognitive complexity ≤4 — line counts are code lines, not physical lines (`pnpm josh lint`); test files allow 35 code lines per function.
39
+ - Function complexity ≤5 · nesting ≤2 · function ≤25 lines · file ≤300 lines · params ≤4 · statements per function ≤10 · cognitive complexity ≤4 — line counts are code lines, not physical lines; test functions allow 35 code lines.
39
40
  - No magic numbers beyond `0`, `1`, `-1` · no `any` · restricted `as` · explicit param and return types · single short early return → one-liner `if (x) return y`.
40
41
 
41
42
  ## Package-First Development
42
43
 
43
- Before building a feature, check for a well-maintained package — measure with `pnpm josh pkg:scout <keywords>`: `clear` → select it (Tier A), `close` → ask (Tier B).
44
+ Before building a feature, run `pnpm josh pkg:scout <keywords>`: `clear` → use it (Tier A), `close` → ask (Tier B).
44
45
 
45
46
  ## Code Change Rules
46
47
 
@@ -79,7 +80,7 @@ Never start a `kickoff` / `halfrun` / `prrun` / `fullrun` / `backlogrun` workflo
79
80
 
80
81
  #### Mid-workflow stop notification (`confirmation`)
81
82
 
82
- Before pausing **any** run for the user — a command's stop, an upstream-Issue interrupt, a Tier C confirmation — send once per stop (skip when the user asked for the stop this turn):
83
+ The `Stop` hook sends it when your held run awaits a decision — lead with the reason, end with `Recommended: <choice>`. Send it yourself only when the hook refuses the stop:
83
84
 
84
85
  ```bash
85
86
  pnpm josh notify --task-type confirmation --issue-url "<url>" --body=$'<reason>' --recommended "<choice>" --alternative "<other>"