@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,99 +1,74 @@
1
1
  # `backlogrun` — a child that cannot finish
2
2
 
3
3
  **Read this file in full when a child cannot finish** — before parking it, before a
4
- `needs-human-review` stop, or before recording a mid-run prerequisite or split. It is a point-of-use
5
- document, never an entry read: the entry procedure is `backlogrun.md`, which points here at that
6
- moment. This file is the single source of park-and-continue, the
7
- `needs-human-review` stop, a stale `in-progress`, a prerequisite discovered mid-run, and a mid-run
8
- split. Provenance of each rule: `docs/maintainers/backlogrun-park-rationale.md` → "Where each rule came from".
4
+ `needs-human-review` stop, or before recording a mid-run prerequisite or split.
9
5
 
10
6
  ## What happens to a child that cannot finish
11
7
 
12
- Nothing here is new, and nothing here is restated — a `backlogrun` child is a `fullrun` under a batch
13
- authorization, whether it came from a named epic or from the opted-in pool:
14
-
15
- - **A stop that would end the run parks one issue and the run continues** — → "park
16
- and continue", which is that rule's single source, including what happens to the issue's lane.
17
- - **A prerequisite discovered mid-run is recorded as a dependency rather than parked** —
18
- → "A prerequisite discovered mid-run", and `prerequisite.md` for the three-way
19
- distinction between a prerequisite, a split and an upstream defect. With no epic there is no
20
- `pnpm josh epic --add` to record the ordering into, so the `blocked-by` relation is written on the
21
- issue itself (step 3 below) — still a dependency, never a `needs-decision` park.
22
- - **A split found mid-run** files the children and the epic and does not stop the batch, because the
23
- keyword already authorized a batch — `split-assessment.md` for the assessment, → "Splitting a child
24
- mid-run" for the branch. The split child is not parked or counted as a failure; its new children
25
- remain available to the normal `backlog:next` / `epic:next` offer.
26
- - **`in-progress` left behind by an interrupted run** is → "`in-progress` is removed by
27
- whoever finds it stale".
8
+ A `backlogrun` child is a `fullrun` under a batch authorization:
9
+
10
+ - **A stop that would end the run parks one issue and the run continues** — → "park and continue".
11
+ - **A prerequisite discovered mid-run is recorded as a dependency rather than parked** — → "A
12
+ prerequisite discovered mid-run"; `prerequisite.md` separates prerequisite, split and upstream
13
+ defect. With no epic, the `blocked-by` is written on the issue itself.
14
+ - **A split found mid-run** files the children and the epic and does not stop the batch —
15
+ `split-assessment.md`, → "Splitting a child mid-run". Not a park, not a failure.
16
+ - **`in-progress` left behind by an interrupted run** — → "`in-progress` is removed by whoever finds
17
+ it stale".
28
18
  - **A child released from `needs-decision` is re-dispatched to a lane, never implemented by the
29
- parent.** The parent is an orchestrator: `backlogrun.md` → "Claim nothing at the entry — this
30
- parent orchestrates and never implements" is the single source, and "Removing the label
31
- is Tier A" below carries the re-dispatch itself. A released child takes a lane exactly as any batch child
32
- does.
19
+ parent** — `backlogrun.md` → "Claim nothing at the entry — this parent orchestrates and never
20
+ implements".
33
21
 
34
22
  ## The parent does not investigate a lane failure itself
35
23
 
36
24
  **A lane failure whose reason is not on its Issue is read by a unit** — `pnpm josh delegate
37
- lane-failure-investigation`; the parent checks the cited lines and
38
- `pnpm josh issue:state` before it parks, re-dispatches or files.
25
+ lane-failure-investigation`; the parent checks the cited lines and `pnpm josh issue:state` before it
26
+ parks, re-dispatches or files.
39
27
 
40
28
  ## `needs-human-review` — the one stop that is not a park
41
29
 
42
- A child carrying **`needs-human-review`** is degraded to a `halfrun`-shaped stop and **the whole run ends
43
- there** — implementation and the verification gate run, nothing is committed, the working tree is left
44
- dirty and unstashed, a `confirmation` Telegram carrying the resume command goes out, and the remaining
45
- children are not started.
46
-
47
- **This is the exception to park-and-continue below** — rationale:
48
- `docs/maintainers/backlogrun-park-rationale.md` → "Why `needs-human-review` ends the run instead of parking".
30
+ A child carrying **`needs-human-review`** stops `halfrun`-shaped and **the whole run ends there**:
31
+ implementation and the gate run, nothing is committed, the tree is left dirty and unstashed, a
32
+ `confirmation` Telegram carries the resume command, and the remaining children are not started.
49
33
 
50
- **The child goes on holding its repository.** `needs-decision` outranks `in-progress` in the
51
- per-repository exclusion so a parked child releases the checkout; this label deliberately does not,
52
- because releasing it would start the next child on top of uncommitted work. **Its lane is left open and
53
- untouched**, for the same reason. **Name the lane directory in the stop report and in the Telegram.** The lanes
54
- already in flight finish; no new lane is opened.
34
+ **The child goes on holding its repository**, and **its lane is left open and untouched**. **Name the
35
+ lane directory in the stop report and in the Telegram.** Lanes in flight finish; no new lane opens.
55
36
 
56
- **Never apply or remove the label** — a person's alone. Full definition and the
57
- `needs-decision` comparison: `needs-human-review.md`, which is the single source.
37
+ **Never apply or remove the label** — a person's alone (`needs-human-review.md`, the single source).
58
38
 
59
39
  ## park and continue
60
40
 
61
- When a child hits something only a person can decide — → "Only a person's judgement carries
62
- `needs-decision`" below — **park the child and keep going.**
41
+ When a child hits something only a person can decide (→ "Only a person's judgement carries
42
+ `needs-decision`"), **park the child and keep going**:
63
43
 
64
44
  ```bash
65
45
  gh api repos/{owner}/{repo}/issues/<N>/labels -f 'labels[]=needs-decision'
66
46
  pnpm josh issue:comment <N> --body-file <path> # what needs deciding, and the options
67
47
  ```
68
48
 
69
- `in-progress` is left as it is, and the parked child does **not** hold the repository — `epic:next` gives
70
- `needs-decision` precedence over `in-progress`, so the next child is offered normally. Then return to
71
- step 1; the other children are unaffected unless they depend on this one.
49
+ `in-progress` stays; the parked child does **not** hold the repository (`needs-decision` takes
50
+ precedence in `epic:next`). Return to step 1.
72
51
 
73
52
  **A parked child's lane is kept, whether or not it had committed**, and every parked ending owes
74
- `pnpm josh run:release <N>` — `backlogrun-lanes.md` → "What happens to a lane", the single source. A
75
- lost merge race resolves in its lane instead (`backlogrun-recovery.md` → "Conflicts are not predicted").
53
+ `pnpm josh run:release <N>` — `backlogrun-lanes.md` → "What happens to a lane". A lost merge race
54
+ resolves in its lane instead (`backlogrun-recovery.md` → "Conflicts are not predicted").
76
55
 
77
56
  **Parking replaces stopping the session, not the rule that produced the stop** — an upstream defect is
78
57
  still filed at once, and a workaround is still forbidden. `epic:bundle`'s `ask` is Tier A, not a park:
79
- add the epic you recommend with `pnpm josh epic --add <E> <N> --after <M>` and record it on both
80
- Issues' `## Decisions`.
58
+ `pnpm josh epic --add <E> <N> --after <M>` and record it on both Issues' `## Decisions`.
81
59
 
82
- **Removing the label is Tier A — do it without asking**, once the decision is recorded; without it the
83
- parked child never runs again:
60
+ **Removing the label is Tier A — do it without asking**, once the decision is recorded:
84
61
 
85
62
  ```bash
86
63
  gh api -X DELETE repos/{owner}/{repo}/issues/<N>/labels/needs-decision 2>/dev/null || true
87
64
  ```
88
65
 
89
66
  **The released child goes back to a lane, never into the parent's own context** — `pnpm josh
90
- lane:launch <N>` (`backlogrun.md` → "Claim nothing at the entry — this parent orchestrates and never
91
- implements").
67
+ lane:launch <N>`.
92
68
 
93
69
  ## Only a person's judgement carries `needs-decision`
94
70
 
95
- **`needs-decision` means "a person has to choose", and nothing else.** This is the single source of
96
- when a run may apply it, by hand or through a park. It carries only:
71
+ **`needs-decision` means "a person has to choose", and nothing else.** It carries only:
97
72
 
98
73
  - a design choice nobody has made;
99
74
  - a Tier B toss-up, or a Tier C action (`CLAUDE.md` → "Decision autonomy");
@@ -108,34 +83,24 @@ It never carries:
108
83
  - a defect in the running repository's own run tooling — the run fixes it and resumes
109
84
  (`prompts/collaboration-workflow/upstream-interrupt.md` → "実行中のリポジトリ自身のラン機構の不具合").
110
85
 
111
- **When in doubt, it is Tier A**: decide, comment the decision, and continue. **A label a mechanical step applied** — a
112
- failed or abandoned child, a lost merge race's four conditions — is read against this list once its
113
- reason is known, and removed (Tier A, above) when the reason is not on it. Rationale:
114
- `docs/maintainers/backlogrun-park-rationale.md` → "Why a run spends no attention on a non-finding".
86
+ **When in doubt, it is Tier A**: decide, comment the decision, and continue. **A label a mechanical step
87
+ applied** (a failed or abandoned child, a lost merge race) is read against this list once its reason is
88
+ known, and removed when the reason is not on it.
115
89
 
116
90
  ## `in-progress` is removed by whoever finds it stale
117
91
 
118
- A run's own ending removes `in-progress` — `pnpm josh followup` on a merge, `pnpm josh run:release <N>`
119
- on a stop. An interrupted run reaches neither and leaves it behind, and a child that carries it is
120
- excluded from every future `epic:next` — permanently. The removal below is the one hand-written call
121
- left, for a label no live run owns: another tree's record is not this tree's to release.
122
- **A session that detects a stale child removes the label itself** (Tier A) and reports it, before
123
- continuing the loop.
124
-
125
- **It costs more than that one child now.** An open issue carrying `in-progress` occupies one of the
126
- repository's lanes — whichever epic it belongs to — so a stale label narrows every epic that touches
127
- that checkout. **The rule therefore applies to any open issue in the repository, not only to this epic's
128
- children**, and `epic:next` names the holders on standard error. **Age alone is not the test.** Check the
129
- 90-minute window below *and* look at what is holding it, because three states hold the label legitimately
130
- for longer: a `halfrun` stopped for manual verification, any run paused mid-child, and a child stopped by
131
- `needs-human-review` (which waits on a person reading an artifact, and carries its own label alongside
132
- `in-progress`). **All three leave uncommitted work in the checkout**, so `git status` there is the
133
- decisive read: a dirty tree means the hold is real — leave the label alone and report, never strip it and
134
- start a second child on top of that work.
135
-
136
- **A closed issue's labels are neither a finding nor something to clean up.** A closed issue holds no lane
137
- (`epic-busy.ts` counts holders from the open listing alone) and `epic:next` never offers it, so
138
- `in-progress` left behind on one changes nothing. **Do not report it, and do not strip it.**
92
+ An interrupted run leaves `in-progress` behind, which excludes the child from `epic:next` permanently
93
+ and occupies a lane. **A session that detects a stale child removes the label itself** (Tier A) and
94
+ reports it, before continuing. **The rule therefore applies to any open issue in the repository, not
95
+ only to this epic's children** (`epic:next` names the holders on standard error).
96
+
97
+ **Age alone is not the test.** Past the 90-minute window, check what holds it: a `halfrun` stopped for
98
+ manual verification, a run paused mid-child, and a `needs-human-review` child hold it legitimately.
99
+ **All three leave uncommitted work in the checkout**, so `git status` there decides: a dirty tree means
100
+ the hold is real — leave the label and report.
101
+
102
+ **A closed issue's labels are neither a finding nor something to clean up** (no lane, never offered).
103
+ **Do not report it, and do not strip it.**
139
104
 
140
105
  ```bash
141
106
  gh api -X DELETE repos/{owner}/{repo}/issues/<N>/labels/in-progress 2>/dev/null || true
@@ -143,50 +108,35 @@ gh api -X DELETE repos/{owner}/{repo}/issues/<N>/labels/in-progress 2>/dev/null
143
108
 
144
109
  ## A prerequisite discovered mid-run
145
110
 
146
- Finding that something else in **this** repository has to land first is not a split, and not an upstream
147
- defect. The child in hand is still one deliverable; it just needs another one before it. The three-way
148
- distinction, the `route:tier-a` filing command and the filing ceiling are `prerequisite.md`, the single
149
- source; what follows is this entry's branch.
150
-
151
- `<M>` below is the child being implemented when the prerequisite turned up; `<N>` is the new Issue.
111
+ Something else in **this** repository has to land first: not a split, not an upstream defect.
112
+ `prerequisite.md` is the single source of the distinction, the `route:tier-a` filing and the ceiling.
113
+ `<M>` is the child in hand; `<N>` the new Issue.
152
114
 
153
- 1. File the prerequisite Issue `<N>` with the `route:tier-a` label — Tier A for a first-party
154
- repository, no confirmation. It is filed **first** because the next step names it.
155
- 2. **Stash the work in progress.** A child is implemented on the default branch with an uncommitted tree,
156
- so `<M>`'s half-finished edits are sitting there, and the next child's `pnpm josh ms`
157
- would refuse or carry them into the prerequisite's branch and PR.
115
+ 1. File the prerequisite `<N>` with `route:tier-a` (Tier A, first-party, no confirmation) — **first**,
116
+ because the next step names it.
117
+ 2. **Stash the work in progress**:
158
118
 
159
119
  ```bash
160
120
  git stash push -u -m "backlogrun: paused #<M> for prerequisite #<N>"
161
121
  pnpm josh issue:comment <M> --body-file <path> # what was stashed, and that #<N> must land first
162
122
  ```
163
123
 
164
- **`-u` is not optional** (a new `*.test.ts` is untracked). The comment makes the paused state
165
- auditable and tells the session that resumes `<M>` a stash is waiting. **Pop it by message, never by
166
- position** — `pnpm josh stash:pop "backlogrun: paused #<M> for prerequisite #<N>"` — when `epic:next`
167
- offers `<M>` again, after its `pnpm josh ms`. The stash is a repository-wide stack
168
- every lane shares, so a bare `git stash pop` would take whichever lane last pushed; the message
169
- targets this one. The prerequisite has merged by then, so expect to resolve conflicts.
170
-
171
- 3. `pnpm josh epic --add <E> <N> --before <M>` — one command writes the task-list row, the declaration
172
- and the `blocked-by` relation together. Never edit the body by hand: the declaration and the relations
173
- then disagree, `epic:next` returns `error`, and the unattended run stops.
174
- **With no epic** (a pool child), record the relation alone, `<M>` blocked by `<N>`, with the
175
- `gh api …/dependencies/blocked_by` call in `prompts/collaboration-workflow/issue-template.md` →
176
- "複数 Issue に分割するときの epic Issue", step 4.
177
- 4. **Remove `in-progress` from `<M>`** — `pnpm josh run:release <M>`, which removes the label with the hold.
178
- This is what lets `<M>` run again: `epic:next` classifies a child carrying `in-progress` as waiting on
179
- time **before** it looks at any blocker, so a child left labelled is never offered again.
180
- 5. **Do not park.** Go back to step 1 of the loop. `epic:next` classifies the original child as resolving
181
- on its own and hands back the prerequisite first, so the order is kept with no human input.
182
-
183
- **A stop a dependency can express is never parked**, and a defect in this repository's own gate or run
184
- tooling is such a stop — `prerequisite.md` holds that rule and what the driver does with it.
124
+ **`-u` is not optional** (new test files are untracked). **Pop it by message, never by position** —
125
+ `pnpm josh stash:pop "backlogrun: paused #<M> for prerequisite #<N>"` — when `epic:next` offers `<M>`
126
+ again, after its `pnpm josh ms`; expect conflicts.
127
+ 3. `pnpm josh epic --add <E> <N> --before <M>` — row, declaration and `blocked-by` in one command;
128
+ never a hand edit. **With no epic**, record `<M>` blocked by `<N>` alone with the `gh api
129
+ …/dependencies/blocked_by` call in
130
+ `prompts/collaboration-workflow/issue-template.md` → "複数 Issue に分割するときの epic Issue", step 4.
131
+ 4. **Remove `in-progress` from `<M>`** — `pnpm josh run:release <M>`; a labelled child is never offered again.
132
+ 5. **Do not park.** Back to step 1 of the loop; `epic:next` hands back the prerequisite first.
133
+
134
+ **A stop a dependency can express is never parked**, including a defect in this repository's own gate
135
+ or run tooling — `prerequisite.md`.
185
136
 
186
137
  ## Splitting a child mid-run
187
138
 
188
- Discovering that a child is really several is not a reason to stop. File the new children with the
189
- `route:split` label (Tier A for a first-party repository — no confirmation), then add them with
190
- `pnpm josh epic --add <E> <N...> [--before <M> | --after <M>]` rather than editing the epic body by hand.
191
- Use the same split criteria as `kickoff`. If what remains of the original child needs a person, park
192
- **that** child and move on. Splitting alone never adds `needs-decision` to the promoted epic.
139
+ Not a reason to stop. File the new children with `route:split` (Tier A, first-party), then
140
+ `pnpm josh epic --add <E> <N...> [--before <M> | --after <M>]` — never a hand edit. Same criteria as
141
+ `kickoff`. If what remains needs a person, park **that** child and move on. Splitting alone never adds
142
+ `needs-decision` to the promoted epic.
@@ -1,14 +1,11 @@
1
1
  # `backlogrun` — progress, the hand-off, resume and waiting
2
2
 
3
- Point-of-use, read one section at a time from `backlogrun.md` → "The route table"; the heartbeat is `progress-watcher.md` → "Progress while the run is quiet".
3
+ Point-of-use, read one section at a time from `backlogrun.md` → "The manifest — the ordered flow"; the heartbeat is `progress-watcher.md` → "Progress while the run is quiet".
4
4
 
5
5
  ## Running a named epic's children
6
6
 
7
- **`backlog:drive` walks this loop on its own; a session runs it when the driver hands back `epic #N`**
8
- (the loop: `docs/maintainers/backlogrun-driver.md`; rationale:
9
- `docs/maintainers/backlogrun-progress-rationale.md` → "Why a named epic's children run in lanes";
10
- `docs/maintainers/backlogrun-progress-rationale.md` → "Why state lives in records, not the
11
- conversation"). Each child runs as `fullrun #<N>` in a lane —
7
+ **`backlog:drive` walks this loop on its own; a session runs it when the driver hands back `epic #N`.**
8
+ Each child runs as `fullrun #<N>` in a lane —
12
9
  `pnpm josh lane:launch <N>` (`backlogrun-lanes.md` → "Opening one lane and dispatching its child"),
13
10
  then `pnpm josh lane:await <N...> --owner "$PPID"` in the background — and every ending is read by one
14
11
  command:
@@ -20,10 +17,7 @@ next=$(pnpm josh run:merge <N> --epic <E> --repo <owner/repo> --owner "$PPID" --
20
17
  **`pnpm josh run:merge <N>` is the only reading of how a child ended** — never
21
18
  classify `issue:state` by hand or ask `epic:next` in its place. **Pass `--output <path>`, the child's
22
19
  transcript**; the named-epic flags are dropped for the opted-in backlog. It classifies, counts, closes
23
- the lane and comments itself; act on the token. Rationale:
24
- `docs/maintainers/backlogrun-progress-rationale.md` → "Why a child's ending is read by `run:merge` alone";
25
- `docs/maintainers/backlogrun-progress-rationale.md` → "Why a child's ending is classified at once";
26
- provenance of each rule: `docs/maintainers/backlogrun-progress-rationale.md` → "Where each rule came from".
20
+ the lane and comments itself; act on the token.
27
21
 
28
22
  | It prints | What the run does |
29
23
  | --- | --- |
@@ -41,10 +35,9 @@ provenance of each rule: `docs/maintainers/backlogrun-progress-rationale.md` →
41
35
  ## After a named epic completes
42
36
 
43
37
  **When a named epic's children are all processed — merged or parked — the run advances to the next
44
- named item, and then drains the opted-in backlog** (unless `--only`, which stops after the named
45
- list). A completed epic is one step of the invocation, never its end. A named item that is a bare,
46
- non-epic Issue reaches the same point when it merges. The epic's own completion summary is sent by the
47
- session standing in the repository that owns it ("Who sends the summary, and who propagates" below).
38
+ named item, and then drains the opted-in backlog** (unless `--only`). A completed epic — or a merged
39
+ bare named Issue — is one step of the invocation, never its end. Its summary is sent per "Who sends the
40
+ summary, and who propagates" below.
48
41
 
49
42
  ## The hand-off — one session does not have to run the whole batch
50
43
 
@@ -53,8 +46,7 @@ after every child's merge and `pnpm josh ms`, never wired to `pnpm josh delegate
53
46
  carrying the budget** (`backlogrun-steps.md` → "The session cut is inside the invocation"); it is not a
54
47
  stop. The threshold is `CONTEXT_CUT_THRESHOLD` in `scripts/cost-runtime/context-cut-threshold.ts`
55
48
  (135,000, shared by the scheduler entry, hand-off and the lane worker cut, `pre-gate-cut.md` → "The
56
- implementation-phase cut"). Rationale: `docs/maintainers/backlogrun-progress-rationale.md` → "Why the
57
- hand-off check is asked at every merge".
49
+ implementation-phase cut").
58
50
 
59
51
  | It answers | What the run does |
60
52
  | --- | --- |
@@ -73,8 +65,7 @@ and output path; fill a missing path with `pnpm josh lane:output <N> <path>`:
73
65
  closed by `pnpm josh lane:prune`.
74
66
  - **Every in-flight lane records a path** — count everything, run `pnpm josh run:carry --cut --owner
75
67
  "$PPID"`, post the progress comment naming every lane and its path with `pnpm josh run:board`, and end
76
- the turn; the `run:wake` driver polls the lanes. Rationale:
77
- `docs/maintainers/backlogrun-progress-rationale.md` → "Why lanes are handed over rather than drained".
68
+ the turn; the `run:wake` driver polls the lanes.
78
69
  - **`--cut` answers `capped`** (`MAX_CUTS`) — **do not `run:wake` or hand off**;
79
70
  carry this session on and re-ask at the next merge.
80
71
 
@@ -88,13 +79,12 @@ park** — nothing is labelled, stashed or filed.
88
79
 
89
80
  ### Picking the lanes up in the fresh session
90
81
 
91
- **Start no child again and open no lane already open.** In one turn: `pnpm josh lane:list` (every line
92
- with a path is a handed-over child, polled per `backlogrun-recovery.md` → "A delegated unit that stopped
82
+ **Start no child again and open no lane already open.** In one turn: `pnpm josh lane:list` (a line
83
+ with a path is a handed-over child, waited on per `backlogrun-recovery.md` → "A delegated unit that stopped
93
84
  without reporting"), `pnpm josh run:progress --wait --output <handed-over paths>` in the background
94
- (the `run:watcher:guard` enforces it), `pnpm josh run:liveness`, and
95
- `epic:next --lanes` with a lane for each child it offers. **A carried-over child finishes in its own
96
- unit — never run its `followup` yourself**; one that did not survive the cut is re-dispatched with
97
- `pnpm josh lane:open <N>` then `pnpm josh lane:dispatch <N>`, never adopted.
85
+ (`run:watcher:guard`), `pnpm josh run:liveness`, and `epic:next --lanes`, a lane per child it offers.
86
+ **A carried-over child finishes in its own unit — never run its `followup` yourself**; one lost in the
87
+ cut is re-dispatched with `pnpm josh lane:open <N>` then `pnpm josh lane:dispatch <N>`.
98
88
 
99
89
  ### What carries over
100
90
 
@@ -106,15 +96,14 @@ the epic body; what merged the epic's task list.
106
96
 
107
97
  | Setting | Value | Meaning |
108
98
  | --- | --- | --- |
109
- | Polling interval | 60 s | **In flight, a floor between two asks, never a clock** — the wake is `lane:await`'s completion or the watcher's arrival exit, never a report. **With nothing in flight no wake comes: it is the parent's own clock.** A `backlogrun` idle watch is polled at this same interval. |
99
+ | Re-ask floor | 60 s | **In flight, never a clock — the wait is `backlog:drive` or `lane:await`**, and the wake is their exit or the watcher's arrival exit, never a report; a state read repeated with nothing decided in between is refused. **With nothing in flight no wake comes: it is the parent's own clock.** A `backlogrun` idle watch re-asks at this same floor. |
110
100
  | Silent delegated unit | 30 min | Not the child's duration — the time its output has gone **unchanged**. Past it, ask `run:liveness` and book a stopped unit as a failure. |
111
101
  | Stale `in-progress` | 90 min | Past it, the other session is gone. |
112
102
  | Publish wait | 10 min | `josh propagate`'s own budget. A failed publish never appears. |
113
103
  | `backlogrun` idle watch | 8 h | Counted from when the run's hands became free, never from its start; `pnpm josh backlog:budget` decides it. |
114
104
 
115
- Each timeout **ends the wait and reports** — none is retried indefinitely. Rationale for the figures:
116
- `docs/maintainers/backlogrun-progress-rationale.md` → "Why the parent waits on classification, not a
117
- clock". A stale child's label is removed first, so the next poll can offer it. **A graph that has
105
+ Each timeout **ends the wait and reports** — none is retried indefinitely. A stale child's label is
106
+ removed first, so the next ask can offer it. **A graph that has
118
107
  deadlocked on a cycle is not this loop's to untangle**: `epic:next` detects it and exits with an error.
119
108
 
120
109
  ## Who sends the summary, and who propagates
@@ -4,7 +4,8 @@ Point-of-use, read one section at the failure that reaches it; the single source
4
4
 
5
5
  ## A delegated unit that stopped without reporting
6
6
 
7
- **A stop from outside leaves no notification behind, so the parent polls rather than waits.** Record
7
+ **A stop from outside leaves no notification behind, so the parent waits on `lane:await`, whose exit
8
+ covers it.** Record
8
9
  where a lane child writes with `pnpm josh lane:output <N> <path>` in the dispatch turn, and once its
9
10
  output has been unchanged for the silent-unit window (`backlogrun-progress.md` → "Waiting, and never
10
11
  waiting forever") **ask the command rather than combining the traces yourself**, in the checkout the
@@ -18,14 +19,11 @@ pnpm josh run:liveness <N> --output <absolute path> --process <command lines nam
18
19
 
19
20
  | Answer | What the parent does |
20
21
  | --- | --- |
21
- | `alive` | Keep polling; touch nothing |
22
+ | `alive` | Wait on `lane:await` again; touch nothing |
22
23
  | `settled` | Re-read with `pnpm josh run:status <N>` and take the branch its state section says |
23
24
  | `undetermined` | Read the trace that failed and ask again. **A second in a row on the same child is a fault in the check**: send a `confirmation` naming the trace and stop — never escalate it to `stopped` |
24
25
  | `stopped` | The recovery below |
25
26
 
26
- Rationale: `docs/maintainers/backlogrun-recovery-rationale.md` → "Why liveness needs silence and no
27
- process together".
28
-
29
27
  **On `stopped`, re-read with `pnpm josh run:status <N>`.** **A re-read carrying `needs-decision`** — the
30
28
  unit parked it, then stopped: leave the label on and count nothing. Otherwise, while `state: OPEN`:
31
29
 
@@ -39,27 +37,22 @@ unit parked it, then stopped: leave the label on and count nothing. Otherwise, w
39
37
  the stale `in-progress` itself.
40
38
  3. **Act on the token it printed** — `backlogrun-progress.md` → "Running a named epic's children".
41
39
 
42
- Rationale: `docs/maintainers/backlogrun-recovery-rationale.md` → "Why the poll routes through `run:merge`".
43
-
44
- ## Conflicts are not predicted
40
+ ## A person withdraws a running child
45
41
 
46
- **The child merges `origin/main` into its lane before its gate now, so this path is the fallback rather
47
- than the first line.** Every `fullrun` runs `pnpm josh main:merge` ahead of the gate
48
- (`chain-rule.md` → "origin/main is merged in before the gate", the single source), so an overlap
49
- already on `main` is resolved before the gate reads the tree. What this section covers is an overlap
50
- that lands on `main` *after* it, which `followup` still reports as a conflict.
42
+ On a person's instruction to drop a running child's issue, run `pnpm josh lane:withdraw <N>
43
+ --reason "<their reason>"` — `docs/josh-commands.md` → "`josh lane:withdraw`".
51
44
 
52
- **Nothing here forecasts which children will overlap.** The overlap surfaces where GitHub already
53
- reports it: a pull request that conflicts with its base comes back `mergeStateStatus: DIRTY`, which
54
- `git-pr-checks-eval.ts` reads as a **failure** rather than polling through it — so `pnpm josh followup`
55
- ends that child with a named conflict in about ten seconds.
45
+ ## Conflicts are not predicted
56
46
 
57
- **That child does not stop: it resolves the conflict in its own lane.** It is **not** counted against
58
- the consecutive-failure guard either way.
47
+ **This path is the fallback**: every `fullrun` runs `pnpm josh main:merge` ahead of the gate
48
+ (`chain-rule.md` → "origin/main is merged in before the gate"), so it covers an overlap that lands on
49
+ `main` *after* it. **Nothing here forecasts which children will overlap** — a conflicting pull request
50
+ comes back `mergeStateStatus: DIRTY`, which `git-pr-checks-eval.ts` reads as a **failure**, so `pnpm josh
51
+ followup` ends that child with a named conflict in about ten seconds.
59
52
 
60
- **The merge direction is `origin/main` into the lane's branch, never a rebase**, and no step below
61
- rewrites a pushed commit. Rationale: `docs/maintainers/backlogrun-recovery-rationale.md` → "Why a conflict
62
- is resolved in the lane rather than handed to a person".
53
+ **That child does not stop: it resolves the conflict in its own lane**, uncounted by the
54
+ consecutive-failure guard. **The merge direction is `origin/main` into the lane's branch, never a
55
+ rebase**; no step rewrites a pushed commit.
63
56
 
64
57
  1. **Resolve in the lane.** `git fetch origin main`, merge `origin/main` into the lane's branch, resolve
65
58
  in place. Do not close the lane, open another, or switch its branch.
@@ -96,7 +89,5 @@ Meeting any of the four, the child is parked — `needs-decision` plus a comment
96
89
  it was, read against `backlogrun-park.md` → "Only a person's judgement carries `needs-decision`" — and its lane is **kept**, because the pushed branch is the resume path
97
90
  (`backlogrun-lanes.md` → "What happens to a lane").
98
91
 
99
- **Leave the tree clean before parking: `git merge --abort` precedes a park under conditions 1, 2 or 4.**
100
- Conditions 1 and 2 are read mid-merge with conflict markers still in the tree, condition 4 after a merge
101
- that is resolved but not committed; condition 3 fires before any merge is started, so there is nothing
102
- to abort.
92
+ **Leave the tree clean before parking: `git merge --abort` precedes a park under conditions 1, 2 or 4**
93
+ (condition 3 fires before any merge starts).
@@ -1,26 +1,22 @@
1
1
  # `backlogrun` — the detailed procedure behind the manifest
2
2
 
3
- Point-of-use, read one section at a time from `backlogrun.md` → "The route table"; how the driver runs the loop on its own is `docs/maintainers/backlogrun-driver.md`.
3
+ Point-of-use, read one section at a time from `backlogrun.md` → "The manifest — the ordered flow".
4
4
 
5
5
  ## What one invocation approves
6
6
 
7
7
  **One `backlogrun` approves every merge of every issue `pnpm josh backlog:next` offers** — `auto-ok`
8
8
  issues, every child of an epic whose root carries it, and a run's own filing once `pnpm josh
9
9
  epic:bundle` (Tier A, `observation-filing.md`) has placed it under such a root. **A named issue is
10
- approved by the keyword and its number, not by `auto-ok`** ("Named issues run first, in order"). What
11
- runs is stated by the keyword and its arguments, never inferred from a request's shape. **Two repairs
12
- that would bound this the other way are prohibited** — dropping a run's own filings, and requiring a
13
- person's `auto-ok` on a child; the brake below bounds it. A Tier C action inside a child still stops that child.
10
+ approved by the keyword and its number, not by `auto-ok`**. What runs is stated by the keyword and its
11
+ arguments, never inferred. **Two repairs that would bound this the other way are prohibited** —
12
+ dropping a run's own filings, and requiring a person's `auto-ok` on a child; the brake below bounds it.
13
+ A Tier C action inside a child still stops that child.
14
14
 
15
15
  **`pnpm josh issue:file` judges `auto-ok` and prints it** — `auto-ok: applied` or
16
- `auto-ok: not applied` with the reason; `scripts/issue/issue-auto-ok.ts` is the single source. Every
17
- filing is judged the same way, whoever asked for it: the excluded labels, then the body's
18
- `- 人の判断:` declaration (`issue-template.md`). **Declare `- 人の判断: 要` when the new issue needs a
19
- person's judgement** — a Tier B toss-up or a Tier C action inside it; `--no-auto-ok` withholds it too.
20
- The retrospective's filings are judged the same way and count against the same brake.
21
-
22
- Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the authorization boundary is shaped this way";
23
- provenance of each rule: `docs/maintainers/backlogrun-steps-rationale.md` → "Where each rule came from"
16
+ `auto-ok: not applied` with the reason (`scripts/issue/issue-auto-ok.ts`). Every filing, the
17
+ retrospective's included, is judged the same way: the excluded labels, then the body's `- 人の判断:`
18
+ declaration (`issue-template.md`). **Declare `- 人の判断: 要` when the new issue needs a person's
19
+ judgement** — a Tier B toss-up or a Tier C action inside it; `--no-auto-ok` withholds it too.
24
20
 
25
21
  ### The brake that replaces the promise
26
22
 
@@ -33,30 +29,26 @@ provenance of each rule: `docs/maintainers/backlogrun-steps-rationale.md` → "W
33
29
  | **Ten filings per invocation** | additions to the pool on **every** filing route (`prerequisite.md`) — `route:tier-a`, `route:interrupt` and a review branch-2 filing are exempt from the depth test (`observation-filing.md`), never from this ceiling | `run:carry --filed` |
34
30
  | The WIP cap on open issues | the pool across invocations | `prompts/collaboration-workflow/wip-cap.md` |
35
31
 
36
- **This section is the single source of how the `epic:bundle` obligation and this authorization
37
- boundary meet.** `observation-filing.md` points here rather than restating it.
32
+ **This section is the single source of how the `epic:bundle` obligation and this boundary meet.**
38
33
 
39
34
  ## Named issues run first, in order
40
35
 
41
- **`backlogrun #N1 #N2 …` runs the named issues before it touches the pool**,
42
- in the order typed, **one at a time — no lanes**, each as a full `fullrun` in a delegated unit
43
- (`backlogrun-child.md` → "Each child runs in a delegated unit"); the parent reads each one's state back
44
- with `pnpm josh issue:state <N>`, never the unit's summary. `pnpm josh backlog:plan #N1 #N2 …` renders
45
- the order, and `scripts/backlog/backlog-named.ts` is its single source.
36
+ **`backlogrun #N1 #N2 …` runs the named issues before it touches the pool**, in the order typed, **one
37
+ at a time — no lanes**, each as a `fullrun` in a delegated unit (`backlogrun-child.md` → "Each child
38
+ runs in a delegated unit"), read back with `pnpm josh issue:state <N>`. `pnpm josh backlog:plan #N1
39
+ #N2 …` renders the order (`scripts/backlog/backlog-named.ts`).
46
40
 
47
- **A named issue that cannot finish parks, and the rest of the named list is skipped**; the run then
48
- drains the pool, and the report lists what was not started (`backlog_named.after_failure`). A
49
- `needs-human-review` named issue stops the whole run (`needs-human-review.md`). **`--only` runs the
50
- named list and stops there, draining no pool** — a failure under `--only` ends the run, and `--only`
51
- with no named issues is refused before anything starts (`backlog_named.startup`).
41
+ **A named issue that cannot finish parks, and the rest of the named list is skipped**; the run drains
42
+ the pool and reports what was not started (`backlog_named.after_failure`). A `needs-human-review` named
43
+ issue stops the whole run. **`--only` runs the named list and stops there, draining no pool** — a
44
+ failure ends the run, and `--only` with no named issues is refused (`backlog_named.startup`).
52
45
 
53
46
  ## The session cut is inside the invocation
54
47
 
55
48
  **Typing `backlogrun` once authorizes the declared budget, and a session cut does not end the run** —
56
- the next session picks the same invocation up from the carry record (`backlogrun-progress.md` → "The
57
- hand-off"). The record keeps the opening invocation string, `--only` and the named list included; a
58
- resumed session runs `remaining` from `--json`. The contract is `docs/josh-commands-run.md` →
59
- "`josh run:carry`".
49
+ the next session resumes the invocation from the carry record (`backlogrun-progress.md` → "The
50
+ hand-off"), which keeps the invocation string, `--only` and the named list; it runs `remaining` from
51
+ `--json` (`docs/josh-commands-run.md` → "`josh run:carry`").
60
52
 
61
53
  ```bash
62
54
  pnpm josh run:carry --begin "backlogrun --max 5 --idle 30" --owner "$PPID"
@@ -64,9 +56,9 @@ pnpm josh run:carry --json # r
64
56
  pnpm josh run:wake --start # same turn as --begin; `running` under `josh backlogrun`
65
57
  ```
66
58
 
67
- **Always pass `--owner "$PPID"`**, and ask it before the plan, in the same turn as the first `pnpm josh
68
- ms`. **The record is the parent loop's, and a lane never touches it**; count into it with `--merged <N>`
69
- and `--filed 1`, and **`--cut` is the session's last write**.
59
+ **Always pass `--owner "$PPID"`**, before the plan, in the same turn as the first `pnpm josh ms`. **The
60
+ record is the parent loop's; a lane never touches it**. Count with `--merged <N>` and `--filed 1`;
61
+ **`--cut` is the session's last write**.
70
62
 
71
63
  | It answers | What the run does |
72
64
  | --- | --- |
@@ -85,30 +77,27 @@ named epic's children", never the root as a standalone `fullrun`, then ask `pnpm
85
77
  a child number or `complete` continues; only `stop` or a failure records `pnpm josh run:carry --done <E>
86
78
  --owner "$PPID"`.
87
79
 
88
- **A person keeps control of the run** — `pnpm josh run:wake --list` reads it, `pnpm josh backlogrun
89
- --stop` stops it (`docs/josh-commands.md` → "`josh backlogrun`").
90
-
91
- Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why a session cut does not end the run"
80
+ **A person keeps control** — `pnpm josh run:wake --list` reads it, `pnpm josh backlogrun --stop` stops
81
+ it (`docs/josh-commands.md` → "`josh backlogrun`").
92
82
 
93
83
  ## The plan, before the first child starts
94
84
 
95
85
  **Report the plan before anything is dispatched. The plan is one command's output** — `pnpm josh
96
- backlog:plan`, rendered from the same
97
- pool `backlog:next` answers from. Report all four of its sections (Ready now, Waiting, Waiting on a
98
- person, Out of scope) to the person in the session language, with any truncated-listing `⚠`.
86
+ backlog:plan`, from the pool `backlog:next` answers from. Report all four sections (Ready now, Waiting,
87
+ Waiting on a person, Out of scope) in the session language, with any truncated-listing `⚠`.
99
88
 
100
89
  ### Resolve what the plan can resolve, before starting
101
90
 
102
91
  **Settle every `needs-decision` issue the plan listed in one pass**, from one `pnpm josh issue:read <N>
103
- <N> …` call (body and comments, `issue-comments.md`):
92
+ <N> …` call (`issue-comments.md`):
104
93
 
105
94
  - **An answer already in the issue** — record it as a comment and **remove the label** (Tier A).
106
95
  **Never measure in order to decide**: a question needing a benchmark or a run stays labelled.
107
96
  - **A person's judgement** — apply `needs-decision` (`backlogrun-park.md` → "Only a person's judgement
108
- carries `needs-decision`"); the next plan classifies it by the label alone.
109
- - **Order and isolate** — a native `blocked-by` where one must land first;
110
- `run:solo` on all three `backlogrun-lanes.md` → "A solo run" conditions, **every other one `run:lane`**,
111
- commenting the reason.
97
+ carries `needs-decision`").
98
+ - **Order and isolate** — a native `blocked-by` where one must land first; `run:solo` on all three
99
+ `backlogrun-lanes.md` → "A solo run" conditions, **every other one `run:lane`**, commenting the
100
+ reason.
112
101
  - **`priority:high`** only on a cited ground (a stated deadline, a person's written policy), commented;
113
102
  **never remove it**.
114
103
  - **Report `pnpm josh backlog:plan --waves`** with the plan, never an order derived by hand; then start
@@ -116,9 +105,7 @@ person, Out of scope) to the person in the session language, with any truncated-
116
105
 
117
106
  **`needs-decision`, `run:solo`, `run:lane` and `priority:high` are the only workflow labels a run
118
107
  applies by hand** — never `needs-human-review` (`needs-human-review.md`), and `auto-ok` only through
119
- `pnpm josh issue:file` or `pnpm josh auto-ok:judge`, which check the exclusions first.
120
-
121
- Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the plan and the decision pass come first"
108
+ `pnpm josh issue:file` or `pnpm josh auto-ok:judge`.
122
109
 
123
110
  ## The loop
124
111
 
@@ -140,11 +127,7 @@ section the row names:
140
127
  | `window` | Hand the loop back as is | — |
141
128
 
142
129
  **A candidate only in another repository is never a token** — report it with its checkout. The budgets,
143
- verdicts and stops are the driver's own: `docs/maintainers/backlogrun-driver.md` (rationale:
144
- `docs/maintainers/backlogrun-steps-rationale.md` → "Why the idle watch lasts 8 hours from when the hands became free";
145
- `docs/maintainers/backlogrun-steps-rationale.md` → "Why the cost check skips a watch").
146
-
147
- Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the loop's contract is shaped this way"
130
+ verdicts and stops are the driver's own.
148
131
 
149
132
  ## What runs once per session, not once per issue
150
133