@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,91 +1,64 @@
1
1
  # Code Review Rubric
2
2
 
3
- This document is the **rubric the reviewer applies**: how a finding earns its severity, the output
4
- format for each round, the nine categories that must all be checked, and the conditions that stop a
5
- review. It is handed to `/code-review` by `pnpm josh review:brief`, which prints its absolute path
6
- and instructs the review to read and apply it — `/code-review` runs in a forked process that reads
7
- none of this repository's other documents, so this file has to stand on its own.
8
-
9
- The orchestration around a review — when it runs, which round is due, how the gate runs beside it,
10
- when the pull request opens — is not here; it lives in `prompts/review.md` and the
11
- `workflow-commands` skill, and the run has already resolved it into the brief. This file is only what
12
- the reviewer needs to read the diff.
13
-
14
- **Default hypothesis: this diff contains at least one non-trivial issue.** Your job is not to confirm
15
- the implementation is correct — it is to find the issue. Work through each category assuming the code
16
- is wrong until you can prove otherwise. Do not declare a category clean unless you have actively
17
- tried to break it.
18
-
19
- **In the second round that hypothesis is aimed at the fix delta, not at the whole diff again.**
20
- Applied twice to one diff it returns new findings whether or not the code changed, because returning
21
- none is what it rules out — see "The second round is a verification pass" below.
3
+ The rubric the reviewer applies: severity, output format, the nine categories and stop conditions.
4
+ `pnpm josh review:brief` prints its absolute path for `/code-review`, which runs in a forked process
5
+ reading no other repository document, so this file stands alone. Orchestration (when a review runs,
6
+ which round is due, the gate, the PR) is in `prompts/review.md` and the `workflow-commands` skill,
7
+ already resolved into the brief.
8
+
9
+ **Default hypothesis: this diff contains at least one non-trivial issue.** Your job is to find it, not
10
+ to confirm correctness. Assume each category is wrong until proven otherwise; declare one clean only
11
+ after actively trying to break it. In the second round the hypothesis is aimed at the fix delta, not
12
+ the whole diff (see "The second round is a verification pass" below).
22
13
 
23
14
  ---
24
15
 
25
16
  ## Severity (decided by a test, never by discretion)
26
17
 
27
- The output format below demands a severity on every finding. `medium` is a blocker — it must be
28
- fixed before the PR is opened — so a borderline finding rated `medium` costs a whole round, and
29
- whether it got one must not be left to whoever happened to be reviewing.
18
+ `medium` blocks opening the PR, so a borderline `medium` costs a whole round — decide it by test.
30
19
 
31
20
  **A finding is `medium` or higher only when both of these hold:**
32
21
 
33
- 1. **It reaches something real** — a runtime code path, a distributed artifact a consumer reads, **or
34
- the verification that guards either**: a test, fixture or CI check whose defect lets one of the
35
- first two ship unnoticed. The third member is not decoration. `package.json` excludes
36
- `**/*.test.ts` and `**/*-fixture.ts` from what it ships, so without it a vacuous or wrongly-pinned
37
- suite — the failure mode this repository's marker suites exist to prevent — could never exceed
38
- `low` and would always be skippable in one line.
22
+ 1. **It reaches something real** — a runtime code path, a distributed artifact a consumer reads, or
23
+ the verification that guards either (a test, fixture or CI check whose defect lets one of the first
24
+ two ship unnoticed). `package.json` does not ship `**/*.test.ts` or `**/*-fixture.ts`, so without
25
+ this third member a vacuous or wrongly-pinned suite could never exceed `low`.
39
26
  2. **You can write the concrete failure scenario** — the inputs or state, and the wrong output,
40
27
  breakage or misreading that follows. Not "this could be confusing": the actual sequence.
41
28
 
42
- **Fail either test and the finding is `low`.** In particular, **a finding whose failure scenario you
43
- cannot write is `low` however uncomfortable it looks** — that is the whole of the second test, and it
44
- is the one that decides borderline cases.
45
-
46
- **Test 2 asks whether a scenario can be written, not whether you wrote one.** The cheap action — not
47
- attempting it — produces the non-blocking severity. So the obligation is to **attempt the scenario
48
- for every finding that passes test 1, and to say so when the attempt failed**: "no failure scenario —
49
- <what you tried>" is the evidence, and a `low` on a test-1 finding without it is not a severity, it
50
- is a skipped step.
29
+ Fail either test and the finding is `low` — **a finding whose failure scenario you cannot write is
30
+ `low` however uncomfortable it looks**.
51
31
 
52
- **A distributed artifact is on that list deliberately.** `CLAUDE.md`, `prompts/**`, `.claude/**` and
53
- `docs/**` are reviewed at the same level as runtime code — a dangling pointer or a citation naming the
54
- wrong file reaches every consumer, and no test covers prose.
32
+ Test 2 asks whether a scenario can be written, not whether you wrote one: attempt it for every finding
33
+ that passes test 1, and when the attempt fails write "no failure scenario — <what you tried>". A `low`
34
+ on a test-1 finding without that line is a skipped step.
55
35
 
56
- **`high` and `low`.** A `high` is fixed before committing and blocks the merge regardless of round
57
- count; a `low` that does not reach the user may be skipped with a one-line reason. This section
58
- decides which findings reach `medium`, not what a severity then does.
36
+ Distributed artifacts — `CLAUDE.md`, `prompts/**`, `.claude/**`, `docs/**` — are reviewed at the same
37
+ level as runtime code: a dangling pointer or a citation naming the wrong file reaches every consumer,
38
+ and no test covers prose.
59
39
 
60
- **A `low` is not automatically droppable.** A finding that passed test 1 and was rated `low` only for
61
- want of a failure scenario still reaches the user, so where it closes in a few lines inside a file
62
- the diff already touches it is fixed rather than dropped. A `low` that fails test 1 — one that does
63
- not reach the user — is the droppable kind.
40
+ `high` is fixed before committing and blocks the merge regardless of round count. A `low` that fails
41
+ test 1 (does not reach the user) may be dropped with a one-line reason; a `low` that passed test 1 and
42
+ lacks only a failure scenario still reaches the user, so if it closes in a few lines inside a file the
43
+ diff already touches, fix it.
64
44
 
65
45
  ---
66
46
 
67
47
  ## The second round is a verification pass, not a second full review
68
48
 
69
- **The second round asks a different question from the first.** Read one diff twice under the
70
- "assume it is wrong" instruction and the two readings return different findings whether or not the
71
- code changed, because returning none is what the instruction rules out. So a Medium would stand at
72
- the second round even where the fixes were sufficient. The second round is narrowed to remove that.
73
-
74
- **What changes is the question, never the standard.** A confirmed High still blocks the merge
75
- whatever the round count, the cap in `prompts/review.md` → "Review round cap" still holds, and every rule here applies to this pass
76
- unchanged.
49
+ Read twice under "assume it is wrong", one diff returns new findings whether or not the code changed,
50
+ so round 2 asks a different question. **The question changes, never the standard**: a confirmed High
51
+ still blocks the merge, the cap in `prompts/review.md` → "Review round cap" still holds, and every rule
52
+ here applies unchanged.
77
53
 
78
- | | The first round | The second round |
79
- | -------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
80
- | **Scope** | the whole change | the **fix delta**: what the first round's fixes wrote, plus the call sites of any signature they changed |
81
- | **Question** | "review this change" | "did each first-round finding actually close, and did the fix itself introduce a defect?" |
82
- | **Categories** | all nine | category 1 (Bug risks & logic errors), plus the categories the fix delta actually touches — i18n only if a fix added a user-visible string, Tests only if a fix changed a test |
83
- | **Output** | the full template | one line per first-round finding with its resolution, then any new finding **inside the fix delta** |
54
+ | | First round | Second round |
55
+ | -------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------- |
56
+ | **Scope** | the whole change | the fix delta: what round 1's fixes wrote, plus call sites of any signature they changed |
57
+ | **Question** | "review this change" | "did each first-round finding close, and did the fix introduce a defect?" |
58
+ | **Categories** | all nine | category 1, plus categories the fix delta touches (i18n only for an added user-visible string, Tests only for a test) |
59
+ | **Output** | the full template | one line per first-round finding with its resolution, then new findings inside the fix delta |
84
60
 
85
- The brief for round 2 names the exact files that are in scope. Do not re-read the parts of the diff
86
- no fix touched.
87
-
88
- Template for the second round:
61
+ The round-2 brief names the in-scope files; do not re-read parts no fix touched.
89
62
 
90
63
  ```md
91
64
  ### First-round findings
@@ -102,35 +75,27 @@ Template for the second round:
102
75
  <counts by severity across both sections, and overall go/no-go>
103
76
  ```
104
77
 
105
- **A first-round finding the fix did not close is still a finding, at its original severity.** The
106
- pass narrows what is read, not what counts — an unresolved High blocks exactly as it did in the first
107
- round.
78
+ An unclosed first-round finding keeps its original severity; an unresolved High blocks as before.
108
79
 
109
80
  ---
110
81
 
111
82
  ## Review output format
112
83
 
113
- Output every category below with an explicit verdict. Do **not** omit categories.
114
-
115
- **This is the first round's format.** The second round is a verification pass and has its own,
116
- narrower one — see above.
84
+ First-round format (round 2 uses the one above). Give every category an explicit verdict; omit none.
117
85
 
118
86
  For each finding:
119
87
 
120
88
  - Cite `file_path:line_number`
121
- - State **severity** (`high` / `medium` / `low`) — decided by the two tests in "Severity" above, not
122
- by discretion
89
+ - State severity (`high` / `medium` / `low`) by the two tests in "Severity"
123
90
  - Explain the concrete problem and the minimal fix
124
- - On a finding that passes test 1 of "Severity" but is rated `low`, write the attempt: `no failure
125
- scenario — <what you tried>`
91
+ - On a test-1 finding rated `low`, write `no failure scenario — <what you tried>`
126
92
 
127
- For categories with no findings, you **must** write a brief proof statement — not just `No issues`.
128
- Example: `No issues — checked null returns on X, verified Y edge case, Z is guarded by type.` A bare
129
- `No issues` is only acceptable for Security, Performance, i18n, and Comments when there is genuinely
130
- nothing to check (no auth code, no hot paths, no user strings, no comments touched).
93
+ A category with no findings needs a proof statement, e.g. `No issues — checked null returns on X,
94
+ verified Y edge case, Z is guarded by type.` A bare `No issues` is allowed only for Security,
95
+ Performance, i18n and Comments when there is genuinely nothing to check (no auth code, hot paths, user
96
+ strings or comments touched).
131
97
 
132
- Template — one `###` heading per category, in the order of "Review categories" below, then
133
- `### Summary`:
98
+ Template — one `###` heading per category in the order of "Review categories", then `### Summary`:
134
99
 
135
100
  ```md
136
101
  ### Bug risks & logic errors
@@ -159,25 +124,23 @@ No issues — `parse_ids` returns what its name says; no near-copy of `split_ids
159
124
 
160
125
  ## Review categories (must all be checked)
161
126
 
162
- All nine are checked in the first round. **The second round checks category 1 plus the categories its
163
- fix delta actually touches** — the verification pass above is the only thing that narrows this list.
127
+ Round 1 checks all nine; round 2 checks category 1 plus the categories its fix delta touches.
164
128
 
165
129
  ### 1. Bug risks & logic errors
166
130
 
167
- Actively try to break the changed code before concluding it is correct.
131
+ Actively try to break the changed code.
168
132
 
169
- - **Off-by-one, nullability, promise handling, race conditions**: for every modified function that
170
- has branching logic, trace at least one non-happy-path scenario. Write the trace explicitly:
133
+ - Off-by-one, nullability, promise handling, race conditions: for every modified function with
134
+ branching, trace at least one non-happy path and write it:
171
135
  `Traced [input/state] → [result] — confirmed/flagged because [reason]`.
172
- - **Broken invariants, wrong return types, mishandled edge cases**
173
- - **Boundary values and concurrency**: empty / zero / max inputs, unawaited promises, shared state,
136
+ - Broken invariants, wrong return types, mishandled edge cases
137
+ - Boundary values and concurrency: empty / zero / max inputs, unawaited promises, shared state,
174
138
  re-entrancy
175
- - **Impact outside the diff**: for every changed export or signature, open its callers and verify
176
- they still hold; flag duplication the change introduces
177
- - **Regressions**: does the change break any existing behavior covered elsewhere?
139
+ - Impact outside the diff: open the callers of every changed export or signature and verify they still
140
+ hold; flag duplication the change introduces
141
+ - Regressions in existing behavior covered elsewhere
178
142
 
179
- `No issues` requires at least one explicit trace statement. Stating `No issues` without a trace is not
180
- allowed.
143
+ **`No issues` requires at least one explicit trace statement.**
181
144
 
182
145
  ### 2. Security
183
146
 
@@ -189,67 +152,59 @@ allowed.
189
152
 
190
153
  - Obvious hotspots, N+1 queries, unnecessary re-renders / reactive churn
191
154
  - Large payloads, unbounded loops, blocking I/O on request paths
192
- - Avoid speculative micro-optimization — flag only concrete impact
155
+ - Flag only concrete impact, not speculative micro-optimization
193
156
 
194
157
  ### 4. Project conventions (`CLAUDE.md`)
195
158
 
196
- **Do not re-check what lint enforces — the gate has already run; lint does not catch duplication
197
- that is not identical, a name whose shape passes but whose meaning misleads, grouping and file layout,
198
- Svelte semantics, or test placement beyond the `*.spec.*` / top-level `tests/` bans, so check those.**
199
- A lint gap the change opens — a disabled rule, an ignored path, an added `eslint-disable`, a block
200
- switching `no-restricted-syntax` off — is itself a finding.
159
+ Do not re-check what lint enforces (the gate already ran). Check what lint misses: non-identical
160
+ duplication, a name whose shape passes but whose meaning misleads, grouping and file layout, Svelte
161
+ semantics, and test placement beyond the `*.spec.*` / top-level `tests/` bans. **A lint gap the change
162
+ opens is itself a finding** — a disabled rule, an ignored path, an added `eslint-disable`, a block
163
+ switching `no-restricted-syntax` off.
201
164
 
202
165
  ### 5. i18n
203
166
 
204
167
  - All user-visible strings (labels, buttons, toasts, validation errors, page titles) use message keys
205
- - Message keys are added to **all** locale message files, not just one
206
- - No hardcoded user-visible strings slipped in
168
+ - Message keys are added to all locale message files, not just one
169
+ - No hardcoded user-visible strings
207
170
 
208
171
  ### 6. Tests
209
172
 
210
173
  - Every code change has a corresponding test (unit or E2E) per `CLAUDE.md` Code Change Rules Step 0
211
- - Test titles are English only
212
- - Test names describe behavior, not implementation
213
- - **Mutation check**: for the most critical test added or changed, ask: "If I inverted or removed the
214
- key assertion/condition in the implementation, would this test fail?" If the answer is no or
215
- uncertain, the test does not verify the behavior — rewrite it.
216
- - **Requirement check**: does the test verify the behavior described in the issue/task, or just that
217
- code executes without error?
174
+ - Test titles are English only and describe behavior, not implementation
175
+ - **Mutation check**: for the most critical test added or changed — if the key assertion/condition in
176
+ the implementation were inverted or removed, would it fail? If no or uncertain, rewrite it.
177
+ - **Requirement check**: does the test verify the behavior the issue/task describes, or only that code
178
+ runs without error?
218
179
 
219
180
  ### 7. Comments & content
220
181
 
221
182
  - Comments are English only
222
- - No narration comments (`// Added for issue #123`, `// TODO: refactor later`) — only comments
223
- explaining non-obvious _why_
183
+ - No narration comments (`// Added for issue #123`, `// TODO: refactor later`) — only non-obvious _why_
224
184
  - No duplicated logic that should be extracted
225
185
 
226
186
  ### 8. Assumptions audit
227
187
 
228
- List 2–3 implicit assumptions the implementation makes. For each, state what would break if the
229
- assumption were violated. This section cannot be empty or say "No assumptions."
230
-
231
- Examples of assumptions worth naming:
188
+ List 2–3 implicit assumptions and what breaks if each is violated. Never empty or "No assumptions."
232
189
 
233
- - "The API always returns an array (not null)" — would break with a null-ref if the API changes
234
- - "The locale file always has this key" — would silently show a key string if a locale is missing
235
- - "The animation completes before the next interaction" — race condition if the user acts fast
190
+ - "The API always returns an array (not null)" — null-ref if the API changes
191
+ - "The locale file always has this key" — shows a key string if a locale is missing
192
+ - "The animation completes before the next interaction" — race if the user acts fast
236
193
 
237
194
  ### 9. Confidence floor
238
195
 
239
- State the **one concrete thing** in this change you are least confident about, and explain why. This
240
- section cannot say "Nothing" or "No concerns." If genuinely nothing is uncertain, trace the exact
241
- logic path that gives you that confidence — that trace itself is the proof.
196
+ State the **one concrete thing** you are least confident about, and why. Never "Nothing" or "No
197
+ concerns"; if nothing is uncertain, trace the logic path that gives that confidence as the proof.
242
198
 
243
199
  ---
244
200
 
245
201
  ## Stop conditions
246
202
 
247
- - **A checkout that cannot be attested** → report `REVIEW TARGET MISMATCH` and **no findings**, and
248
- do not report a verdict of any kind. `pnpm josh review:attest <nonce>` exiting non-zero means this
249
- review read a tree the brief did not describe, so everything it would say — "no findings" above all
250
- — is about somebody else's code.
251
- - **High** findings → must fix before committing
252
- - **Medium** findings → must fix before opening the PR
253
- - **Low** findings → document in the PR body if skipped
203
+ - **A checkout that cannot be attested** (`pnpm josh review:attest <nonce>` exits non-zero) → report
204
+ `REVIEW TARGET MISMATCH`, no findings and no verdict of any kind: the review read a tree the brief did
205
+ not describe.
206
+ - High findings → must fix before committing
207
+ - Medium findings → must fix before opening the PR
208
+ - Low findings → document in the PR body if skipped
254
209
 
255
- If the diff is empty or trivial (e.g. whitespace only), state that explicitly and skip the review.
210
+ If the diff is empty or trivial (e.g. whitespace only), state that and skip the review.