@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
@@ -18,8 +18,7 @@ function is_marked(text) {
18
18
  return text.startsWith(MARKER_PREFIX);
19
19
  }
20
20
  function apply_marker_for_destination(destination, text, package_name) {
21
- if (!is_workflow_destination(destination)) return text;
22
- if (is_marked(text)) return text;
21
+ if (!is_workflow_destination(destination) || is_marked(text)) return text;
23
22
  return `${marker_block(package_name)}${text}`;
24
23
  }
25
24
  var managed_marker_logic = {
@@ -141,8 +141,7 @@ function read_matching_version(manifest_path, package_name) {
141
141
  const parsed = package_named_version_schema.safeParse(
142
142
  json_value.parse_or_undefined(readFileSync(manifest_path, "utf8"))
143
143
  );
144
- if (!parsed.success) return void 0;
145
- if (parsed.data.name !== package_name) return void 0;
144
+ if (!parsed.success || parsed.data.name !== package_name) return void 0;
146
145
  return parsed.data.version;
147
146
  }
148
147
  function walk_up_for_version(start_directory, package_name) {
@@ -152,9 +151,9 @@ function walk_up_for_version(start_directory, package_name) {
152
151
  }
153
152
  return void 0;
154
153
  }
155
- function resolve_from_base(base_url, package_name, resolve_marker) {
154
+ function resolve_from_base(base_url, package_name, resolve_marker = package_name) {
156
155
  try {
157
- return createRequire(base_url).resolve(resolve_marker ?? package_name);
156
+ return createRequire(base_url).resolve(resolve_marker);
158
157
  } catch {
159
158
  return void 0;
160
159
  }
@@ -281,8 +280,9 @@ function is_latest_withheld(times, latest, minimum_age_minutes, now_ms) {
281
280
  return published_ms > now_ms - minimum_age_minutes * MS_PER_MINUTE2;
282
281
  }
283
282
  function resolve_installable(times, latest, minimum_age_minutes, now_ms) {
284
- if (times === void 0) return void 0;
285
- if (!is_latest_withheld(times, latest, minimum_age_minutes, now_ms)) return void 0;
283
+ if (times === void 0 || !is_latest_withheld(times, latest, minimum_age_minutes, now_ms)) {
284
+ return void 0;
285
+ }
286
286
  const installable = release_age.select_aged_version(times, void 0, minimum_age_minutes, now_ms);
287
287
  return installable === latest ? void 0 : installable;
288
288
  }
@@ -307,8 +307,9 @@ function format_release_hold_note(version, latest, installable, minimum_age_minu
307
307
  return `${head}; an unpinned resolve lands on ${installable}`;
308
308
  }
309
309
  function build_release_hold_notes(version, latest, installable, minimum_age_minutes) {
310
- if (version === void 0 || installable === void 0) return [];
311
- if (!is_release_age_hold(version, latest, installable)) return [];
310
+ if (version === void 0 || installable === void 0 || !is_release_age_hold(version, latest, installable)) {
311
+ return [];
312
+ }
312
313
  return [format_release_hold_note(version, latest, installable, minimum_age_minutes)];
313
314
  }
314
315
  var release_hold = {
@@ -1399,8 +1400,9 @@ function build_extras(config) {
1399
1400
  }
1400
1401
  function build_upstream_effective(upstream, context) {
1401
1402
  const { resolve_effective_version, resolve_global_upgrade_command } = upstream;
1402
- if (resolve_effective_version === void 0) return void 0;
1403
- if (resolve_global_upgrade_command === void 0) return void 0;
1403
+ if (resolve_effective_version === void 0 || resolve_global_upgrade_command === void 0) {
1404
+ return void 0;
1405
+ }
1404
1406
  return {
1405
1407
  version: resolve_effective_version(context),
1406
1408
  upgrade_command: resolve_global_upgrade_command(context)
@@ -1485,8 +1487,9 @@ function build_idle_message(reports) {
1485
1487
  }
1486
1488
  function describe_effective_outcome(upstream, report, snapshot) {
1487
1489
  const { resolve_effective_version } = upstream;
1488
- if (resolve_effective_version === void 0 || report === void 0) return [];
1489
- if (version_check_logic.build_effective_upgrade_commands(report).length === 0) return [];
1490
+ if (resolve_effective_version === void 0 || report === void 0 || version_check_logic.build_effective_upgrade_commands(report).length === 0) {
1491
+ return [];
1492
+ }
1490
1493
  const after = resolve_effective_version({
1491
1494
  latest: snapshot.latest,
1492
1495
  upstream_latest: report.latest
package/eslint/base.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  SPEC_FILENAME_PATTERNS,
30
30
  } from './rules/test-filename.js'
31
31
  import { typescript_rules } from './rules/typescript.js'
32
- import { unicorn_rules } from './rules/unicorn.js'
32
+ import { unicorn_rules, unicorn_test_rules } from './rules/unicorn.js'
33
33
 
34
34
  const FILE_PATTERNS = {
35
35
  d_ts: ['**/*.d.ts'],
@@ -234,6 +234,7 @@ export function create_base_config({ gitignore_path, tsconfig_root_dir }) {
234
234
  // `expect(x).toBe(0.05)` compares deterministic config constants, not computed
235
235
  // floats; working around the rule only weakens the assertion.
236
236
  'sonarjs/no-floating-point-equality': 'off',
237
+ ...unicorn_test_rules,
237
238
  },
238
239
  },
239
240
  {
@@ -205,3 +205,19 @@ export const unicorn_rules = {
205
205
  // たびにエディタと衝突し、可読性の利得なく差分ノイズだけを生むため無効化する(joshuafolkken/kit#3273)。
206
206
  'unicorn/no-asterisk-prefix-in-documentation-comments': 'off',
207
207
  }
208
+
209
+ // unicorn 78 のベースライン方針(joshuafolkken/kit#3882): 78 は新ルール 2 つ
210
+ // (no-unnecessary-default-arguments / no-repeated-call-wrappers)に加え、型解決とコメントを含む
211
+ // コードの検査を広げたため、既存ルールが新たに報告する。prefer-combined-guards /
212
+ // prefer-minimal-ternary / no-negated-condition / prefer-default-parameters は正当な
213
+ // クリーンアップなので採用し、コードを直す。consistent-boolean-name だけは下記のとおり
214
+ // テストファイルで外す。
215
+ export const unicorn_test_rules = {
216
+ // 78 は vi.fn() / vi.spyOn() / vi.mocked() の戻り型を解決できるようになり、真偽値を返す関数の
217
+ // モックやスパイ(`const write = vi.spyOn(process.stdout, 'write')`)を真偽値の束縛として報告する。
218
+ // 関数値の const を checkVariables で検査するのはプラグインの文書どおりの仕様(77 でも
219
+ // `const f = () => true` は報告される)で、誤検知ではない。ただしテストの束縛はほぼすべて
220
+ // 差し替える関数を名前で示すテストダブルで、`is_write` のような名前は述語の結果のように読めて
221
+ // 誤解を招く。kit が関数名を検査しない(checkFunctions: 'never')のと同じ理由でテストでは外す。
222
+ 'unicorn/consistent-boolean-name': 'off',
223
+ }
package/lefthook/base.yml CHANGED
@@ -5,9 +5,11 @@ pre-commit:
5
5
  skip: git diff --cached --quiet
6
6
  run: pnpm josh prevent-main-commit
7
7
 
8
+ # cspell, prettier and eslint go through `josh pre-commit-lint`, which owns their flags so each
9
+ # cache location comes from the constant its ignore rules are asserted against (kit#3948).
8
10
  cspell:
9
11
  glob: '*.{ts,tsx,js,jsx,md,mdx,html,css,scss,yml,yaml,json,properties}'
10
- run: pnpm exec cspell lint --no-must-find-files --no-progress {staged_files}
12
+ run: pnpm josh pre-commit-lint cspell {staged_files}
11
13
 
12
14
  # Scans only staged files, so a secret is caught before it ever enters history —
13
15
  # GitHub push protection and the CodeRabbit gitleaks pass both fire after the fact,
@@ -22,11 +24,11 @@ pre-commit:
22
24
 
23
25
  prettier:
24
26
  glob: '*.{js,jsx,ts,tsx,mjs,cjs,html,css,scss,md,mdx,json,jsonc,yaml,yml}'
25
- run: pnpm exec prettier --check --ignore-unknown {staged_files}
27
+ run: pnpm josh pre-commit-lint prettier {staged_files}
26
28
 
27
29
  eslint:
28
30
  glob: '*.{js,jsx,ts,tsx,mjs,cjs}'
29
- run: pnpm exec eslint --quiet --cache --cache-strategy content {staged_files}
31
+ run: pnpm josh pre-commit-lint eslint {staged_files}
30
32
 
31
33
  # Routed through `josh pre-commit-type-check` rather than a bare `pnpm exec tsc --noEmit` so the
32
34
  # hook can read the record `pnpm josh gate` leaves behind (kit#1381) — the same reader the
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1455.0",
2
+ "version": "1.1514.0",
3
3
  "name": "@joshuafolkken/kit",
4
4
  "description": "Development toolkit for AI-assisted projects: formatting, AI assistant rules and a Git/GitHub Issue workflow for any repository, plus lint, type check, tests and hooks for Node projects",
5
5
  "keywords": [
@@ -72,6 +72,7 @@
72
72
  "!scripts/eval",
73
73
  "!scripts/time",
74
74
  "!scripts/cost",
75
+ "!scripts/cost-audit",
75
76
  "!scripts/retrospective",
76
77
  "!scripts/dogfood",
77
78
  "!scripts/metrics",
@@ -97,6 +98,7 @@
97
98
  "!scripts/exports/namespace-members.ts",
98
99
  "!scripts/exports/unused-members.ts",
99
100
  "!scripts/document/generate-catalog.ts",
101
+ "!scripts/document/generate-command-usage.ts",
100
102
  "!scripts/document/issue-citation-budget.ts",
101
103
  "!scripts/document/retired-phrases.ts",
102
104
  "!scripts/document/review-agent-type.ts",
@@ -178,7 +180,7 @@
178
180
  "eslint-plugin-import-x": "^4.17.1",
179
181
  "eslint-plugin-promise": "^7.3.0",
180
182
  "eslint-plugin-sonarjs": "^4.2.1",
181
- "eslint-plugin-unicorn": "^77.0.0",
183
+ "eslint-plugin-unicorn": "^78.0.0",
182
184
  "globals": "^17.12.0",
183
185
  "prettier": "^3.9.9",
184
186
  "prettier-plugin-svelte": "^4.1.1",
@@ -247,12 +249,12 @@
247
249
  "@eslint/compat": "^2.1.1",
248
250
  "@eslint/js": "^10.0.1",
249
251
  "@ianvs/prettier-plugin-sort-imports": "^4.7.1",
250
- "@playwright/test": "^1.64.0",
252
+ "@playwright/test": "^1.64.1",
251
253
  "@secretlint/secretlint-rule-preset-recommend": "^13.0.7",
252
254
  "@stylistic/eslint-plugin": "^5.10.0",
253
255
  "@types/node": "^26.6.5",
254
256
  "@types/semver": "^7.8.0",
255
- "cspell": "^10.3.6",
257
+ "cspell": "^10.4.0",
256
258
  "esbuild": "^0.28.2",
257
259
  "eslint": "^10.12.0",
258
260
  "eslint-config-prettier": "^10.1.8",
@@ -260,24 +262,24 @@
260
262
  "eslint-plugin-import-x": "^4.17.1",
261
263
  "eslint-plugin-promise": "^7.3.0",
262
264
  "eslint-plugin-sonarjs": "^4.2.2",
263
- "eslint-plugin-unicorn": "^77.0.0",
265
+ "eslint-plugin-unicorn": "^78.0.0",
264
266
  "eslint_d": "^15.0.3",
265
267
  "globals": "^17.13.0",
266
- "lefthook": "^2.2.1",
268
+ "lefthook": "^2.2.2",
267
269
  "prettier": "^3.9.10",
268
270
  "prettier-plugin-svelte": "^4.1.1",
269
271
  "prettier-plugin-tailwindcss": "^0.8.1",
270
- "rollup": "^4.64.5",
272
+ "rollup": "^4.64.7",
271
273
  "rollup-plugin-dts": "^6.5.1",
272
274
  "secretlint": "^13.0.7",
273
275
  "typescript": "^6.0.3",
274
- "typescript-eslint": "^8.71.1",
275
- "vitest": "^5.0.3"
276
+ "typescript-eslint": "^8.71.2",
277
+ "vitest": "^5.0.4"
276
278
  },
277
279
  "dependencies": {
278
280
  "cli-spinners": "^3.4.0",
279
281
  "csv-parse": "^7.0.3",
280
- "execa": "^10.1.0",
282
+ "execa": "^10.1.1",
281
283
  "js-yaml": "^5.4.3",
282
284
  "jsonc-parser": "^3.3.1",
283
285
  "ora": "^9.4.1",
@@ -285,12 +287,12 @@
285
287
  "string-width": "^8.3.0",
286
288
  "terminal-link": "^5.0.0",
287
289
  "tsx": "^4.23.15",
288
- "zod": "^4.6.6"
290
+ "zod": "^4.6.7"
289
291
  },
290
292
  "devEngines": {
291
293
  "packageManager": {
292
294
  "name": "pnpm",
293
- "version": "12.12.1+sha512.b7f98934c0b1f29a65f5da52f2d7f994e7faad573ffdddea1497fb4dcb5aec051590ee7c7d95a38172b4bfae103a5b83edf2ee866e11731c2cafa96063610ac5",
295
+ "version": "12.13.0+sha512.1e55719bf26e809dce5c5084fdebaa64efb3da9038ae5d68a9f8a68311f1a45841c8c3b76a37298c3b66f6bcc80409a9b7f33c78a7168a3e90fb65a5d8235ae4",
294
296
  "onFail": "download"
295
297
  }
296
298
  },
@@ -1,27 +1,21 @@
1
1
  # コーディング指針 — lint では表せない書き方
2
2
 
3
- 命名・エクスポート・ファイル名・内容の規約の単一ソースは下記「Conventions」、関数の構文・品質上限・型安全・早期 return・マジックナンバーの単一ソースは `CLAUDE.md` → "Critical Conventions (non-standard — always apply)" である。その大半は ESLint が強制する(クラスのプロパティ・メソッドの `snake_case` などここに書いていない細目は `eslint/rules/naming-convention.js` が持つ)。ただし **`function` 構文(アロー関数を使わない)と早期 return の 1 行形式は lint が検査しない**ので、書き手とレビューが確かめる。このファイルは本文を写さず、lint では表せない書き方の指針だけを持つ。
4
-
5
- lint・型検査の実行手順は `CLAUDE.md` → "Code Change Rules" の検証ゲート(`pnpm josh gate`、実装中は `pnpm josh lint:related` / `pnpm josh test:related`)が単一ソースである。
3
+ 関数の構文・品質上限・型安全・早期 return・マジックナンバーは `CLAUDE.md` → "Critical Conventions (non-standard — always apply)"、lint・型検査の実行は `CLAUDE.md` → "Code Change Rules"(`pnpm josh gate`、実装中は `pnpm josh lint:related` / `pnpm josh test:related`)に従う。ここにない命名の細目(クラスのプロパティ・メソッドの `snake_case` など)は `eslint/rules/naming-convention.js` が持つ。**`function` 構文(アロー関数を使わない)と早期 return の 1 行形式は lint が検査しない**ので、書き手とレビューが確かめる。
6
4
 
7
5
  ## Conventions
8
6
 
9
- `CLAUDE.md` から移した、lint が強制する規約の単一ソース。
10
-
11
- - **Naming**: `snake_case` variables / functions / params · `PascalCase` types / classes / interfaces / enums · `UPPER_CASE` enum members · booleans prefixed `is_` / `has_` / `should_` / `can_` / `will_` / `did_` · constants `UPPER_CASE` or `snake_case`
12
- - **Functions & exports**: multiple functions → a namespace object `export { my_module }` (constants exempt) · no `export default`
13
- - **Files**: Svelte `PascalCase.svelte(.ts)` · TypeScript `kebab-case.ts` · tests `*.test.ts` / `*.svelte.test.ts`, colocated, never `*.spec.ts` (`prompts/testing-guide.md`) · in `scripts/`, no `../` imports — use `#scripts/*`
14
- - **Content rules**: user-visible strings use i18n message keys in every locale · comments / test titles English only (`eslint/rules/` may explain rationale in Japanese) · no duplication; `/* @refactor-ignore */` at file top excludes a file from refactoring
7
+ - Naming: `snake_case` variables / functions / params · `PascalCase` types / classes / interfaces / enums · `UPPER_CASE` enum members · booleans prefixed `is_` / `has_` / `should_` / `can_` / `will_` / `did_` · constants `UPPER_CASE` or `snake_case`
8
+ - Functions & exports: multiple functions → a namespace object `export { my_module }` (constants exempt) · no `export default`
9
+ - Files: Svelte `PascalCase.svelte(.ts)` · TypeScript `kebab-case.ts` · tests `*.test.ts` / `*.svelte.test.ts`, colocated, never `*.spec.ts` (`prompts/testing-guide.md`) · in `scripts/`, no `../` imports — use `#scripts/*`
10
+ - Content rules: user-visible strings use i18n message keys in every locale · comments / test titles English only (`eslint/rules/` may explain rationale in Japanese) · no duplication; `/* @refactor-ignore */` at file top excludes a file from refactoring
15
11
 
16
12
  ## 📝 基本方針
17
13
 
18
- 一般的な書き方の助言(シンプルさ・命名・過度な抽象化の回避など)は繰り返さない。lint が強制せず、一般論でもない指針だけを置く。
19
-
20
- - **意図が不明瞭な処理は関数に抽出する**: 条件式や処理の意図がわかりにくければ、たとえ 1 行でも抽出し、関数名で意図を表す(`if (is_eligible_for_service(user))`)
21
- - **コメントは「なぜ」だけ、経緯は書かない**: 残すのは一行の理由(そのルールの意図)だけ。「以前は…」という経緯、Issue 番号への参照、計測値は git 履歴と Issue が保持している
22
- - **文字列も定数化する**: 数値リテラルの抽出は lint が強制するが、繰り返し使用する文字列や識別子も定数化し、意味の分かる名前を付ける
14
+ - **意図が不明瞭な処理は関数に抽出する**: 1 行でも抽出し、関数名で意図を表す(`if (is_eligible_for_service(user))`)
15
+ - **コメントは「なぜ」だけ**: 一行の理由だけを残す。「以前は…」の経緯・Issue 番号・計測値は書かない(git 履歴と Issue が持つ)
16
+ - **文字列も定数化する**: 繰り返す文字列や識別子にも意味の分かる名前の定数を付ける
23
17
  - **既存のコード体系に寄り添う**: そのうえで、より良く書けるなら目指す
24
- - **仕組みを足す前に原因を問う**: 設計時の判断は `prompts/collaboration-workflow/principles.md` → "elegant-design" の担当。コメントの英語限定と重複の撲滅は上の「Conventions」と `principles.md` → "no-clones" が単一ソースである
18
+ - **仕組みを足す前に原因を問う**: `prompts/collaboration-workflow/principles.md` → "elegant-design"。重複の撲滅は "no-clones"
25
19
 
26
20
  ## 📁 新規作成時の手順
27
21
 
@@ -34,16 +28,12 @@ find src -name "*.ts" -o -name "*.svelte" | grep -i [関連キーワード]
34
28
 
35
29
  ### 2. ファイル分割の指針
36
30
 
37
- - **上限に近づいたら分割を検討**: 関数やファイルが `CLAUDE.md` → "Quality limits" の上限に近づいたら分割を検討する。編集前に `pnpm josh lines <path>` で余裕を確認する
38
- - **責任が複数ある場合**: 1つのファイルが複数の責任を持つ場合は、責任ごとにファイルを分割
39
- - **再利用性**: 他のファイルからも使用される可能性があるロジックは、別ファイルに分離
40
- - **メインファイルの肥大化を避ける**: メインファイルの肥大化を避けることを優先する。再利用可能な機能や独立した責任を持つ機能は、積極的に別ファイルに分割する。メインファイルは主要な処理フローに集中し、詳細な実装は別ファイルに分離する
41
- - **過度な分割は避ける**: 小さすぎるファイルの分割は避け、関連する機能は同じファイルにまとめる
31
+ - `CLAUDE.md` → "Quality limits" の上限に近づいたら分割を検討する。編集前に `pnpm josh lines <path>` で余裕を確認する
32
+ - 責任ごと、また他ファイルからも使われうるロジックごとに別ファイルに分け、メインファイルは主要な処理フローに集中させる
33
+ - 小さすぎる分割は避け、関連する機能は同じファイルにまとめる
42
34
 
43
35
  ### 3. 名前空間オブジェクトの名付け方
44
36
 
45
- 複数の関数を名前空間オブジェクトにまとめてエクスポートする規則そのものは上記「Conventions」にある(定数は個別エクスポートでよい)。ここでは名付け方だけを述べる。
46
-
47
37
  - ファイル名と名前空間名で意図を明確にする(例: `git-command.ts` → `git_command`)
48
38
  - メソッド名は短く、名前空間で補完する(例: `exec_git_branch()` → `git_command.branch()`)
49
39
 
@@ -1,12 +1,12 @@
1
1
  ## ファイル編集はコマンド本文に本文を載せない
2
2
 
3
- 「ファイル本文をシェルに載せない」規則の正典。`CLAUDE.md` からは [`rule-delivery.md`](./rule-delivery.md) →「配送されている規則」を経て届く。
3
+ `CLAUDE.md` からは [`rule-delivery.md`](./rule-delivery.md) →「配送されている規則」を経て届く。
4
4
 
5
- `pnpm josh rule:guard`(file-body の行)が、既存ファイルを書き戻すヒアドキュメント・書き込みを伴うインタプリタ heredoc / `node -e`・書き込むスクリプトファイルを作るヒアドキュメント・in-place `perl -0pi -e` を、コマンドの何行目にあってもその呼び出しで拒否し、規則を述べる。**このファイルが担うのはガードに見えないもの**である — Bash を通らない Edit / Write の全文書き直し、ガードを素通りする `sed -i` の 4 条件、そしてコストである。
5
+ `pnpm josh rule:guard`(file-body の行)が、既存ファイルを書き戻すヒアドキュメント・書き込むインタプリタ heredoc / `node -e`・書き込むスクリプトを作るヒアドキュメント・`perl -0pi -e` を拒否する。ガードに見えない Edit / Write の全文書き直しと `sed -i` は以下に従う。
6
6
 
7
7
  ### 何を禁じているか
8
8
 
9
- **編集後のテキストを丸ごとコマンド行に載せる形を禁じる。** 典型は、インタプリタを起動して領域を書き戻す次の形である。
9
+ **編集後のテキストを丸ごとコマンド行に載せる形を禁じる。** 典型(`NEW_REGION` には置換後の本文が載る):
10
10
 
11
11
  ```bash
12
12
  python3 - <<'PY' # ← 禁止
@@ -15,64 +15,44 @@ open('CLAUDE.md', 'w').write(text.replace(OLD_REGION, NEW_REGION))
15
15
  PY
16
16
  ```
17
17
 
18
- `NEW_REGION` は変数ではない。実際には**置換後の本文そのもの**がここに直接書かれ、コマンド行に載る。それがコストの正体である。
19
-
20
- 領域を指定して書き換える編集は **Edit ツール**(old / new の差分)で行う。`node -e`、`cat > file <<'EOF'`、`tee file <<'EOF'`、`perl -0pi -e` に長い置換文字列を渡す形も同じ理由で禁止される。
18
+ 領域を書き換える編集は Edit ツール(old / new の差分)で行う。`node -e`、`cat > file <<'EOF'`、`tee file <<'EOF'`、`perl -0pi -e` に長い置換文字列を渡す形も禁止。
21
19
 
22
20
  ### 判断基準は「本文を丸ごと運ぶか」であり、ツール名ではない
23
21
 
24
- 禁止の対象は**ツールの種類ではない**。判断は 1 問で決まる。
25
-
26
22
  > **そのコマンドは、置換後のテキストを丸ごとコマンド本文に載せているか。**
27
23
 
28
24
  - yes → 禁止。Edit を使う
29
- - no → 許可
30
-
31
- したがって短い置換に `sed -i` を使うのは**許される**。パターンと置換語しか運ばないので、Edit の `old_string` / `new_string` より本文が小さい。逆に「Edit を使ったから安全」も成り立たない — 300 行のファイルを全文 `new_string` に入れれば、禁じている形と同じコストになる。次節はその後半を条件として書き下したものである。
25
+ - no → 許可(短い置換の `sed -i` は下の 4 条件つきで可)
32
26
 
33
27
  ### 編集は指摘された箇所だけを対象にする(全文書き直しの条件)
34
28
 
35
- **既定は部分編集である。** 直す行が決まっているなら、`old_string` / `new_string` はその行の周辺までに狭める。数か所を直せば済むファイルを全文書き直しで出力する形は、`python3` の heredoc と同じコストを、ツールを替えただけで払っている。
36
-
37
- **ファイルを全文書いてよいのは、ファイルそのものを置き換える意図があるときだけである。** 該当するのは次の 3 つで、それ以外は部分編集にする。
38
-
39
- - **新規ファイルの作成** — 既存本文が無いので、運ぶ重複がそもそも発生しない
40
- - **ファイル全体の作り直し** — 構成の組み替えや生成物の再生成で、変更後の本文が元の本文とほとんど共有しない場合
41
- - **部分編集のほうが大きくなる場合** — 変更箇所がファイル全域に散っていて、`old_string` / `new_string` の合計が全文を超えるとき。このときも全文は **Write ツール**で書く — ヒアドキュメントやインタプリタで書き戻す形は、この例外でもガードに拒否される
29
+ **既定は部分編集である。** `old_string` / `new_string` は直す行の周辺までに狭める — Edit / Write の全文書き直しは禁じている形と同じコストを払う。全文を書いてよいのは次の 3 つだけ:
42
30
 
43
- **レビュー指摘の修正がこの規則の主戦場である。** 「この行の条件が逆」「この定数を切り出す」といった局所的な指摘ほど、部分編集は小さくなる。一方で全文書き直しのコストはファイルの大きさで決まり、指摘の小ささでは下がらない。**指摘が局所的であるほど、全文書き直しとの差は開く。**
44
-
45
- 実測では 1 ランで約 2 分 45 秒が、すでに存在する行を打ち直すことに使われていた(joshuafolkken/kit#1260)。内訳は `docs/maintainers/file-edits-rationale.md` → "Measured cost of whole-file rewrites"。
31
+ - 新規ファイルの作成
32
+ - ファイル全体の作り直し — 変更後の本文が元とほとんど共有しない場合
33
+ - 部分編集のほうが大きくなる場合 — `old_string` / `new_string` の合計が全文を超えるとき(このときも Write で書く)
46
34
 
47
35
  ### `sed -i` を使う前に満たす 4 条件
48
36
 
49
- `sed` が安いのは事実だが、Edit と違って**一致した全行**を書き換え、**一致が 0 件でも黙って成功する**。Edit の一意性検査に相当するものが無いので、使う前に次を満たす。
37
+ `sed` は一致した全行を書き換え、一致 0 件でも黙って成功する。使う前に次を満たす。
50
38
 
51
- 1. **出現回数を先に数える** — `grep -o '<pattern>' <file> | wc -l` が `1` であること。**`grep -c` を使ってはならない** — 数えるのは一致した「行数」であって出現回数ではないので、同じ行に 2 回出る場合も `1` を返す。`s///` は 1 行につき 1 回しか置換しないため、そこを一意と読むと**半分だけ書き換わったファイル**が黙って残る。`0` なら何も起きないまま成功して返る
52
- 2. **メタ文字を持ち込まない — パターン側と置換語側の両方** — 区切りの `/`、`&`、`\`、正規表現の `.` `*` `[` `]` `^` `$` のいずれかがどちらかに入るなら Edit を使う。散文が対象のこの repository では `/` とバッククォートが頻出し、**危ないのはむしろパターン側**である(`s/prompts\/…/…/` はエスケープを 1 つ落とすだけで `unterminated 's' command`、`.` は書き手が意図していない箇所に静かに一致する)
53
- 3. **`-i` の引数はプラットフォームで違う** — BSD / macOS は `sed -i '' 's/…/…/' file`、GNU / Linux は `sed -i 's/…/…/' file`。片方の形を他方で走らせると、エラーになるか `''` という名前のバックアップファイルが残る。**配布ドキュメントに手順として書くときは必ずこの差を明示する** — kit の成果物は両方のプラットフォームの consumer に届く
54
- 4. **編集後に自分で整形する** — `.claude/settings.json` の `PostToolUse` フックは `Bash` にも一致する(joshuafolkken/kit#1337)が、渡されるペイロードにはコマンドしか入らずファイルパスが無いため、Bash 経由の編集では整形は走らない。`sed` で表の行や折り返しのある段落に触れたら、続けて `pnpm josh format` を走らせる。**`format:edited` は手で呼べない** — フックが渡す JSON を stdin から読んで `tool_input.file_path` を取り出す設計で、引数にパスを取らないからである。放置すると `pnpm josh lint`(`prettier --check .`)が後から落ちる
39
+ 1. **出現回数を先に数える** — `grep -o '<pattern>' <file> | wc -l` が `1` であること。`grep -c` は行数を数えるので使わない
40
+ 2. **メタ文字を持ち込まない — パターン側と置換語側の両方** — `/`、`&`、`\`、`.` `*` `[` `]` `^` `$` のいずれかが入るなら Edit を使う
41
+ 3. **`-i` の引数はプラットフォームで違う** — BSD / macOS は `sed -i '' 's/…/…/' file`、GNU / Linux は `sed -i 's/…/…/' file`。配布ドキュメントに書くときはこの差を明示する
42
+ 4. **編集後に自分で整形する** — Bash 経由の編集では `PostToolUse` の整形が走らない(joshuafolkken/kit#1337)ので `pnpm josh format` を走らせる(`format:edited` は手で呼べない)
55
43
 
56
- **4 条件のどれかが面倒に見えたら、そこが Edit を使う場所である。** `sed` はコストを下げるための例外であって、既定の編集手段ではない。
44
+ **4 条件のどれかが面倒に見えたら、そこが Edit を使う場所である。**
57
45
 
58
- | 形 | 可否 | 理由 |
59
- | -------------------------------------------------- | ------------ | --------------------------------------------------------- |
60
- | Edit(数行の old / new) | 可 | 差分だけが本文に載る |
61
- | `sed -i` の短い置換 | 条件付きで可 | パターンと置換語しか載らない。上の 4 条件を満たすこと |
62
- | `python3 - <<'PY'` で領域を書き戻す | 不可 | 置換後の本文が丸ごと載る |
63
- | `cat > file <<'EOF'` で既存ファイルを書き直す | 不可 | 同上 |
64
- | `cat > new-file <<'EOF'` で新規ファイルを作る | 可 | 既存本文を運んでいない。ただし長文なら Write のほうが安い |
65
- | `cat > edit.py <<'EOF'` で書き込むスクリプトを作る | 不可 | 実行を 1 呼び出し後ろにずらしただけで、置換後の本文が載る |
66
- | 読み取り・検索(`cat` / `sed -n` / `grep`) | 可 | 本文を運ばない |
46
+ | 形 | 可否 |
47
+ | ------------------------------------------------ | ------------------- |
48
+ | Edit(数行の old / new) | 可 |
49
+ | `sed -i` の短い置換 | 上の 4 条件つきで可 |
50
+ | `python3 - <<'PY'` で書き戻す | 不可 |
51
+ | `cat > file <<'EOF'`(既存ファイル) | 不可 |
52
+ | `cat > new-file <<'EOF'`(新規、長文なら Write) | 可 |
53
+ | `cat > edit.py <<'EOF'`(書き込むスクリプト) | 不可 |
54
+ | 読み取り(`cat` / `sed -n` / `grep`) | 可 |
67
55
 
68
56
  ### なぜコストが二重になるか
69
57
 
70
- インタプリタで書き戻す形は、編集後の本文が**コマンド本文とファイルの両方**に載る。さらに悪いのは持続性である。**コマンド本文は、書いた時点以降のすべてのリクエストで読み直される。** ランの序盤に書いた編集スクリプトほど、そのランの残り全リクエストぶん課金され続ける。ファイル側は次に読んだときだけ載るのに対し、コマンド側は消えない。実測の内訳は `docs/maintainers/file-edits-rationale.md` → "Measured breakdown of command text"。
71
-
72
- ### なぜ resident に置くか
73
-
74
- 根拠は `docs/maintainers/file-edits-rationale.md` → "Why it is resident"。
75
-
76
- ### マーカーテスト
77
-
78
- 固定している内容は `docs/maintainers/file-edits-rationale.md` → "Marker tests"。
58
+ 書き戻す形は本文がコマンドとファイルの両方に載り、コマンドは以降の全リクエストで読み直される。
@@ -2,54 +2,37 @@
2
2
 
3
3
  ## 規則
4
4
 
5
- **GitHub への操作は `gh api`(REST)で書く。`gh issue …` / `gh pr …` / `gh repo …` といったサブコマンド
6
- 形は使わない。** クラウドセッション(エージェントのコンテナ)では GitHub の GraphQL エンドポイントへの
7
- egress が `403` で拒否されるため、GraphQL を経由するサブコマンドはそこで一切動かない。
5
+ **GitHub への操作は `gh api`(REST)で書く。** `gh issue …` / `gh pr …` / `gh repo …` のサブコマンド形は使わない —
6
+ クラウドセッションでは GraphQL への egress が `403` で拒否される。
8
7
 
9
- 例外は 2 つだけである。
8
+ 例外は 2 つだけ:
10
9
 
11
- - **`gh auth token`** — ローカルの CLI が既に持っている認証情報を返すだけで、どのエンドポイントにも
12
- 接続しない。REST で書き換えられる呼び出しが存在しない。読み出すのはローカルの認証情報だけである。
13
- - **GitHub Actions のワークフロー** — ランナー上では `gh` が通常どおり動き、`gh pr merge --auto` が使う
14
- API は GraphQL にしか存在しない。
10
+ - `gh auth token` — ローカルの認証情報を返すだけで、どのエンドポイントにも接続しない
11
+ - GitHub Actions のワークフロー — ランナー上では `gh` が動き、`gh pr merge --auto` の API は GraphQL にしか無い
15
12
 
16
13
  ## 認証は環境によって別物である
17
14
 
18
- **手元では `gh auth login` を一度実行すれば足り、`GH_TOKEN` は要らない。** 認証情報は OS のキーチェーンに
19
- 入り、`gh auth status` が読めるのはそれである。
20
-
21
- **CI とクラウドセッションにはそのキーチェーンが無いので、`GH_TOKEN` を設定する。** どちらか一方しか書かない
22
- 説明は、もう一方の環境で誤った案内になる —— 手元で `gh auth login` 済みの機械に `GH_TOKEN` を設定させたり、
23
- クラウドで存在しないキーチェーンを探させたりする。
15
+ **手元では `gh auth login` を一度実行すれば足り、`GH_TOKEN` は要らない**(認証情報は OS のキーチェーン)。
16
+ **CI とクラウドセッションにはキーチェーンが無いので、`GH_TOKEN` を設定する。** 説明を書くときは両方を書く。
24
17
 
25
18
  ## 散文でも「指示の形」なら REST で書く
26
19
 
27
- **この規則はフェンス付きコードブロックの中だけの話ではない。文書の散文に書かれたコマンドでも、読み手に
28
- 実行を指示する形であれば REST で書く。**
20
+ **文書の散文に書いたコマンドでも、読み手に実行を指示する形なら REST で書く。**
29
21
 
30
- - **指示の形**(REST で書く)— 「数えるのはコマンド 1 つで済む: `…`」「各子 Issue に `…` でコメントを
31
- 書く」のように、読み手がそのまま打つことを期待している書き方。
32
- - **引用の形**(そのままでよい)— 「`gh issue create` は使わない」のような禁止の引用や、「このサブコマンドは
33
- GraphQL を経由する」のような CLI の対応状況の記録。書き換えると、何を禁じているのかが読めなくなる。
22
+ - 指示の形(REST で書く)— 「数えるのはコマンド 1 つで済む: `…`」「各子 Issue に `…` でコメントを書く」のように、
23
+ 読み手がそのまま打つ書き方
24
+ - 引用の形(そのままでよい)— 「`gh issue create` は使わない」のような禁止の引用や、CLI の対応状況の記録
34
25
 
35
- **この区別は機械には引けない** — 文書ガードはフェンス付きコードブロックだけを走査するので、散文の側は
36
- 書き手がこの区別で守る(`docs/maintainers/gh-rest-rationale.md` → "Why the document guard scans fences only")。
26
+ 文書ガードはフェンス付きコードブロックだけを走査するので、散文は書き手がこの区別で守る。
37
27
 
38
- **書き換えるときは `pnpm josh` のコマンドで置き換えられないかを先に見る。** 例えば Issue の状態を読むのは
39
- `gh issue view` ではなく `pnpm josh issue:state <N>` で、これはラベルと `human_review` まで一度に返す。
28
+ 書き換えるときは先に `pnpm josh` のコマンドで置き換えられないかを見る(例: `gh issue view` ではなく
29
+ `pnpm josh issue:state <N>`)。
40
30
 
41
31
  ## REST 化は `gh` を不要にしない
42
32
 
43
- **すべての REST 呼び出しは今も `execa('gh', ['api', …])` である。** サブコマンドをやめたことで消えたのは
44
- GraphQL への依存であって、バイナリへの依存ではない。**`gh` が入っていないコンテナは実在する** — その環境
45
- では `pnpm josh epic:next` も `pnpm josh pr` も `pnpm josh followup` も完了できず、`fullrun`
46
- は GitHub に一切到達しない。`git push` が通り `GH_TOKEN` が効いていても、である。
47
-
48
- `check_gh_installed` は `gh CLI is not installed` と明示するが、git remote からリポジトリを読む側の
49
- コマンド(`epic:next` / `epic:bundle` / `issue:scout` / `epic --add`)は「Could not read this
50
- repository from `git remote`, so the children cannot be keyed by repository — check `gh auth status`
51
- and that this is a checkout with an `origin` remote.」と出るため、原因が `gh` の不在であることが読み取り
52
- にくい。**そのメッセージを見たら、まず `gh` の有無を確かめる。**
33
+ REST 呼び出しも `execa('gh', ['api', …])` なので、`gh` が無いコンテナでは `pnpm josh epic:next` /
34
+ `pnpm josh pr` / `pnpm josh followup` も完了しない。`epic:next` / `epic:bundle` / `issue:scout` / `epic --add` が
35
+ 「Could not read this repository from `git remote`, so the children cannot be keyed by repository — check
36
+ `gh auth status` and that this is a checkout with an `origin` remote.」と出したら、**まず `gh` の有無を確かめる。**
53
37
 
54
- 環境ごとの前提と、開けるべきホストの一覧は
55
- [`docs/cloud-session.md`](https://github.com/joshuafolkken/kit/blob/main/docs/cloud-session.md) にある。
38
+ 環境ごとの前提とホストは [`docs/cloud-session.md`](https://github.com/joshuafolkken/kit/blob/main/docs/cloud-session.md)。
@@ -1,17 +1,15 @@
1
1
  # ワークフロー用語集
2
2
 
3
- **これは定義集であり、規則を定める場所ではない。** 各語は 1〜2 行の定義と、その語の本文がある単一ソースへのポインタだけを持つ。手順・条件・数値は指し先が持ち、ここでは言い換えない — 言い換えた行は指し先より先に古くなる(joshuafolkken/kit#3080)。
3
+ 各語は 1〜2 行の定義と本文へのポインタだけを持つ。手順・条件・数値はここで言い換えない(joshuafolkken/kit#3080)。
4
4
 
5
- `scripts/document/workflow-glossary.test.ts` が、下の主要語が定義されていることと、各ポインタが実在する節に解決することを検査する。
6
-
7
- - **lane** — `backlogrun` が子 Issue を並行実行するための、専用ブランチ・`.env`・ポートを持つ git worktree。実装・ゲート・レビューは並行し、マージは直列。→ `.claude/skills/workflow-commands/backlogrun-lanes.md` → "Lanes — running more than one child at a time"
8
- - **cut** — 実行中のプロセスを意図して終わらせ、新しいプロセスが同じ作業を引き継ぐ境界。レーン子のゲート前の cut と、`backlogrun` のセッション cut がある。→ `.claude/skills/workflow-commands/pre-gate-cut.md` → "The pre-gate cut"、`.claude/skills/workflow-commands/backlogrun-progress.md` → "The hand-off"
5
+ - **lane** — `backlogrun` が子 Issue を並行実行する、専用ブランチ・`.env`・ポートを持つ git worktree。マージは直列。→ `.claude/skills/workflow-commands/backlogrun-lanes.md` → "Lanes — running more than one child at a time"
6
+ - **cut** — プロセスを意図して終わらせ、新しいプロセスが作業を引き継ぐ境界(ゲート前の cut、セッション cut)。→ `.claude/skills/workflow-commands/pre-gate-cut.md` → "The pre-gate cut"、`.claude/skills/workflow-commands/backlogrun-progress.md` → "The hand-off"
9
7
  - **hold** — 1 つの作業ツリーを 1 つのランが占有しているという記録。`pnpm josh run:hold` が取り、`pnpm josh run:release` が外す。→ `.claude/skills/workflow-commands/working-tree-hold.md` → "The working-tree hold"
10
8
  - **park** — `backlogrun` が自分で決められない子を `needs-decision` で止め、バッチ全体は止めずに次の子へ進むこと。→ `.claude/skills/workflow-commands/backlogrun-park.md` → "park and continue"
11
- - **point of use** — 文書を入口ではなく、その文書に従うべき操作と同じターンで、その操作の直前に読むこと。→ `.claude/skills/workflow-commands/SKILL.md` → "Four documents are read at the point of use, not at the entry"
9
+ - **point of use** — 文書を入口ではなく、従うべき操作の直前に同じターンで読むこと。→ `.claude/skills/workflow-commands/SKILL.md` → "Four documents are read at the point of use, not at the entry"
12
10
  - **entry read** — コマンド起動時に読む文書の集合。`pnpm josh read:set` がその集合と費用を答える。→ `.claude/skills/workflow-commands/SKILL.md` → "Which file to read"
13
11
  - **oracle** — 機械的に読める入力だけから規則の答えを計算するコマンド。一覧は `pnpm josh oracle:list`。→ `prompts/collaboration-workflow/residency.md` → "第 0 問"
14
- - **interrupt** — WIP 上限を超えても起票できる、3 条件で決まる発見。別パッケージ起因の上流起票(割り込み Issue)とは別の区分。→ `prompts/collaboration-workflow/wip-cap.md` → "割り込み起票"、`prompts/collaboration-workflow/upstream-interrupt.md` → "別パッケージ起因の問題は割り込み Issue で対応する"
12
+ - **interrupt** — WIP 上限を超えても起票できる、3 条件で決まる発見。上流起票の割り込み Issue とは別。→ `prompts/collaboration-workflow/wip-cap.md` → "割り込み起票"、`prompts/collaboration-workflow/upstream-interrupt.md` → "別パッケージ起因の問題は割り込み Issue で対応する"
15
13
  - **Tier** — 判断点の 3 区分。A は可逆で自分で決める、B は拮抗していて人に聞く、C は不可逆・共有状態で明示指示が要る。→ `CLAUDE.md` → "Decision autonomy"、`prompts/collaboration-workflow/operating-rules.md` → "decision-autonomy"
16
14
  - **carry** — `backlogrun` の 1 回の起動の予算と進捗を、セッション cut をまたいで引き継ぐ記録(`pnpm josh run:carry`)。→ `.claude/skills/workflow-commands/backlogrun-steps.md` → "The session cut is inside the invocation"
17
15
  - **wave** — エピックの子をまとめて並行実行する組。仕組みではなく、依存宣言で表す形。→ `.claude/skills/epic-commands/execution-waves.md` → "Execution waves — parallel, then one alone, then the rest"
@@ -2,33 +2,25 @@
2
2
 
3
3
  ## セッション向け出力で Issue はリンク+セッション言語の短い要約で参照する(joshuafolkken/kit#1758)
4
4
 
5
- 番号だけの言及では、読み手は番号を内容に解決するために毎回 GitHub を開くことになる(`docs/maintainers/issue-citation-rationale.md` → "Why the rule exists")。発火点が `CLAUDE.md` に常駐している理由は `docs/maintainers/issue-citation-rationale.md` → "Why the trigger is resident in CLAUDE.md" にある。
6
-
7
- **規則**: セッション向け出力で Issue を指すときは、次の 2 つを必ず添える。
5
+ **規則**: セッション向け出力で Issue を指すときは、次の 2 つを必ず添える(対応前の「これから走らせる」「待機中」「対象外」の言及も含む)。
8
6
 
9
7
  1. 番号にチケットへの markdown リンク
10
- 2. セッション言語(`JOSH_SESSION_LANG`、既定 `ja`)の短い要約タイトル
11
-
12
- 書き方の例:
8
+ 2. セッション言語(`JOSH_SESSION_LANG`、既定 `ja`)の短い要約タイトル(全訳でなくてよい)
13
9
 
14
10
  - `[#<N>](https://github.com/<owner>/<repo>/issues/<N>) — <その Issue が何をするものかの短い要約>`
15
11
 
16
- **この引用行は手で組み立てるものではなく、`pnpm josh issue:cite <N> [<N> ...]` が出す。** 番号を並べて渡すと、貼れる引用行を 1 呼び出しでまとめて出す(複数 Issue に 1 回、他リポジトリは `--repo <owner/repo>` あるいは `owner/repo#N` 表記。`docs/maintainers/issue-citation-rationale.md` → "Why issue:cite prints the line")。要約はその Issue のタイトルをそのまま用いる。詳細は [docs/josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md) の `josh issue:cite` を参照。josh がセッション向けに出す警告・進捗行・要約行の Issue 番号は、はじめからリンク形で出るので、転記するときに組み直さなくてよい。コミットメッセージ・PR 本文・イベント行・Telegram 本文など GitHub やプログラムが読むために素の `#N` のまま出る行を写すときは、引用形に直す(`docs/maintainers/issue-citation-rationale.md` → "Why josh prints the citation form itself")。
17
-
18
- **要約タイトルは全訳ではなく要約でよい。** 何をするものか分かれば足りる。長い訳を作ることが目的ではない。`issue:cite` が出すタイトルを、必要ならセッション言語に言い換えて使う。
19
-
20
- **対応前の言及も対象である。** 「これから走らせる」「待機中」「対象外」を並べる場面も含む。
12
+ **この引用行は `pnpm josh issue:cite <N> [<N> ...]` が出す。** 複数 Issue は 1 呼び出しにまとめ、他リポジトリは `--repo <owner/repo>` か `owner/repo#N` 表記(詳細は [docs/josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md) の `josh issue:cite`)。タイトルは必要ならセッション言語に言い換える。素の `#N` の行(コミットメッセージ・PR 本文・イベント行・Telegram 本文)を写すときは引用形に直す。
21
13
 
22
14
  ### 適用範囲
23
15
 
24
16
  **対象** — セッション向け出力。会話の説明、計画の提示、進捗報告、完了報告、`AskUserQuestion` の選択肢。
25
17
 
26
- **対象外** — GitHub 上の artifact prose(Issue 本文、Issue / PR コメント)。GitHub は issue 参照を自動でリンクし、ホバーでタイトルを出すため、この規則が解決しようとしている問題がそもそも起きない。
18
+ **対象外** — Issue 本文、Issue / PR コメント。
27
19
 
28
20
  ### 英語固定の 3 つとは衝突しない
29
21
 
30
- 英語のままにするものは従来どおり 3 つ(`overview.md` →「出力の言語(`JOSH_SESSION_LANG`)」)。番号に添えるセッション言語の要約は GitHub 上の**タイトル**ではなく、セッション内の散文の一部なので、タイトルの英語固定とは矛盾しない。
22
+ 要約はタイトルではなくセッション内の散文なので、`overview.md` →「出力の言語(`JOSH_SESSION_LANG`)」の英語固定とは矛盾しない。
31
23
 
32
24
  ### 停止時の担保(joshuafolkken/kit#2247)
33
25
 
34
- `Stop` フック `pnpm josh stop:guard` が返信の地の文に裸の `#N` を見つけると**停止をブロックし**、その番号と `pnpm josh issue:cite <N...>` の実行形を差し戻す。差し戻されたら、その実行形で引用し直す(仕組みは `docs/maintainers/issue-citation-rationale.md` → "How the Stop hook delivers it")。検出が外す範囲は [docs/josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md) の `josh stop:guard` を参照。
26
+ `Stop` フック `pnpm josh stop:guard` は返信の地の文に裸の `#N` があると、`issue:cite` と同じ処理で引用行を作り `systemMessage` として表示する(モデルの手番は使わない)。引用できない番号があったときだけ停止をブロックし、`pnpm josh issue:cite <N...>` の実行形を差し戻す。差し戻されたらその実行形で引用し直す(検出が外す範囲は [docs/josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md) の `josh stop:guard`)。