@joshuafolkken/kit 1.1010.0 → 1.1050.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 (350) hide show
  1. package/.claude/settings.json +1 -5
  2. package/.claude/skills/dependency-update/SKILL.md +6 -3
  3. package/.claude/skills/epic-commands/SKILL.md +46 -17
  4. package/.claude/skills/verify-ui/SKILL.md +1 -1
  5. package/.claude/skills/workflow-commands/SKILL.md +10 -25
  6. package/.claude/skills/workflow-commands/background-commands.md +1 -1
  7. package/.claude/skills/workflow-commands/backlogrun-child.md +6 -4
  8. package/.claude/skills/workflow-commands/backlogrun-lanes.md +1 -1
  9. package/.claude/skills/workflow-commands/backlogrun-park.md +6 -0
  10. package/.claude/skills/workflow-commands/backlogrun-progress.md +30 -36
  11. package/.claude/skills/workflow-commands/backlogrun-steps.md +16 -16
  12. package/.claude/skills/workflow-commands/backlogrun.md +3 -12
  13. package/.claude/skills/workflow-commands/chain-rule.md +2 -2
  14. package/.claude/skills/workflow-commands/followup-reference.md +2 -2
  15. package/.claude/skills/workflow-commands/fullrun-steps.md +4 -3
  16. package/.claude/skills/workflow-commands/fullrun.md +1 -1
  17. package/.claude/skills/workflow-commands/halfrun.md +2 -1
  18. package/.claude/skills/workflow-commands/into-target.md +1 -1
  19. package/.claude/skills/workflow-commands/issue-comments.md +1 -1
  20. package/.claude/skills/workflow-commands/observation-filing.md +80 -126
  21. package/.claude/skills/workflow-commands/pre-gate-cut.md +33 -36
  22. package/.claude/skills/workflow-commands/prerequisite.md +1 -1
  23. package/.claude/skills/workflow-commands/working-tree-hold.md +2 -2
  24. package/.codex/hooks.json +1 -5
  25. package/.github/workflows/auto-tag.yml +21 -0
  26. package/.github/workflows/publish.yml +9 -10
  27. package/.github/workflows/sonar-qube.yml +1 -1
  28. package/AGENTS.md +4 -25
  29. package/CLAUDE.md +24 -38
  30. package/GEMINI.md +4 -24
  31. package/README.md +22 -56
  32. package/dist/CLAUDE.md +24 -38
  33. package/dist/hooks/batch-guard.js +4 -4
  34. package/dist/hooks/{chunk-6PSTVOLH.js → chunk-5BK3K7V4.js} +114 -90
  35. package/dist/hooks/{chunk-PAXMLGSS.js → chunk-7VPDUBRN.js} +93 -175
  36. package/dist/hooks/{chunk-KPZN42RT.js → chunk-DMQN45FN.js} +3 -3
  37. package/dist/hooks/{chunk-WMIR5SNX.js → chunk-EJDX2TOB.js} +13 -3
  38. package/dist/hooks/{chunk-A2H5I2VD.js → chunk-GQ7KP45M.js} +2 -2
  39. package/dist/hooks/{chunk-4GDR2YTV.js → chunk-HJIISEAC.js} +4 -4
  40. package/dist/hooks/{chunk-AWTFKKFW.js → chunk-NAS4C7GP.js} +6 -33
  41. package/dist/hooks/{chunk-56LGMJJV.js → chunk-NJQOBE6L.js} +2 -2
  42. package/dist/hooks/{chunk-EZLHXKJ6.js → chunk-RLDX5SOC.js} +1222 -941
  43. package/dist/hooks/{chunk-GBJUERYK.js → chunk-WQ4OSBSS.js} +10 -3
  44. package/dist/hooks/codex-hook-adapter.js +10 -10
  45. package/dist/hooks/duplicate-read-guard.js +5 -5
  46. package/dist/hooks/format-edited.js +15 -34
  47. package/dist/hooks/investigation-guard.js +5 -5
  48. package/dist/hooks/pretool-guard.js +23 -16
  49. package/dist/hooks/stop-guard.js +21 -200
  50. package/dist/josh.js +42 -125
  51. package/dist/version/index.js +466 -42
  52. package/eslint/base.js +2 -11
  53. package/package.json +36 -10
  54. package/prompts/coding-standards.md +15 -290
  55. package/prompts/collaboration-workflow/cross-repo-epic.md +2 -51
  56. package/prompts/collaboration-workflow/epic-audit.md +2 -53
  57. package/prompts/collaboration-workflow/epic-bundle.md +2 -106
  58. package/prompts/collaboration-workflow/file-edits.md +6 -53
  59. package/prompts/collaboration-workflow/issue-template.md +4 -4
  60. package/prompts/collaboration-workflow/operating-rules.md +18 -75
  61. package/prompts/collaboration-workflow/principles.md +74 -0
  62. package/prompts/collaboration-workflow/residency.md +55 -15
  63. package/prompts/collaboration-workflow/rule-delivery.md +5 -46
  64. package/prompts/collaboration-workflow/shell-body.md +7 -9
  65. package/prompts/collaboration-workflow/turn-batching.md +21 -37
  66. package/prompts/collaboration-workflow/upstream-interrupt.md +1 -1
  67. package/prompts/collaboration-workflow/wip-cap.md +15 -18
  68. package/prompts/collaboration-workflow.md +22 -28
  69. package/prompts/sonar-hotspot-handling.md +1 -1
  70. package/scripts/adopt/adopt-logic.ts +2 -2
  71. package/scripts/adopt/adopt-toolkits.ts +3 -1
  72. package/scripts/adopt/adopt.ts +2 -2
  73. package/scripts/agent/agent-event.ts +2 -9
  74. package/scripts/agent/agent-exit-record.ts +2 -9
  75. package/scripts/auto-ok/auto-ok-cli.ts +9 -9
  76. package/scripts/backlog/backlog-budget-cli.ts +2 -6
  77. package/scripts/backlog/backlog-drive-cli.ts +20 -10
  78. package/scripts/backlog/backlog-drive.ts +50 -16
  79. package/scripts/backlog/backlog-next.ts +24 -8
  80. package/scripts/backlog/backlog-offer-cli.ts +6 -5
  81. package/scripts/backlog/backlog-plan-cli.ts +5 -1
  82. package/scripts/backlog/backlog-plan.ts +1 -1
  83. package/scripts/backlog/backlog-pool.ts +31 -11
  84. package/scripts/backlog/backlog-rank.ts +106 -0
  85. package/scripts/backlog/backlog-waves.ts +42 -29
  86. package/scripts/build/build-bin.ts +2 -1
  87. package/scripts/build/build-config-merge.ts +2 -1
  88. package/scripts/build/build-hooks.ts +31 -6
  89. package/scripts/build/build-managed-marker.ts +2 -1
  90. package/scripts/build/build-self-sync-guard.ts +2 -1
  91. package/scripts/build/build-version.ts +2 -1
  92. package/scripts/cases/cases-logic.ts +2 -6
  93. package/scripts/ci/pr-classification.ts +13 -11
  94. package/scripts/cost-runtime/cost-transcript.ts +4 -11
  95. package/scripts/delegation/delegation-policy.ts +11 -0
  96. package/scripts/doctor/doctor-consumer.ts +5 -12
  97. package/scripts/doctor/doctor-ports.ts +2 -2
  98. package/scripts/document/document-byte-budget.ts +13 -21
  99. package/scripts/document/document-section.ts +2 -6
  100. package/scripts/document/entry-read-budget.ts +6 -5
  101. package/scripts/{git/git-epic-add-body.ts → epic/epic-add-body.ts} +23 -23
  102. package/scripts/{git/git-epic-add-plan.ts → epic/epic-add-plan.ts} +23 -26
  103. package/scripts/{git/git-epic-add.ts → epic/epic-add.ts} +17 -17
  104. package/scripts/epic/epic-audit-cli.ts +4 -4
  105. package/scripts/epic/epic-audit-orphans.ts +2 -2
  106. package/scripts/epic/epic-audit-rationale.ts +1 -1
  107. package/scripts/epic/epic-audit.ts +1 -1
  108. package/scripts/{git/git-epic-body.ts → epic/epic-body.ts} +6 -6
  109. package/scripts/epic/epic-bundle-cli.ts +1 -1
  110. package/scripts/epic/epic-bundle.ts +2 -2
  111. package/scripts/epic/epic-candidate-confirm.ts +2 -1
  112. package/scripts/{git/git-epic-chains.ts → epic/epic-chains.ts} +4 -4
  113. package/{scripts-ai → scripts/epic}/epic-check.ts +5 -4
  114. package/{scripts-ai → scripts/epic}/epic-cli.ts +4 -4
  115. package/scripts/{git/git-epic-close-comment.ts → epic/epic-close-comment.ts} +9 -9
  116. package/scripts/{git/git-epic-close.ts → epic/epic-close.ts} +23 -19
  117. package/scripts/epic/epic-cross-repo.ts +21 -38
  118. package/scripts/{git/git-epic-decision.ts → epic/epic-decision.ts} +12 -14
  119. package/scripts/epic/epic-fetch.ts +3 -3
  120. package/scripts/epic/epic-graph.ts +3 -3
  121. package/scripts/epic/epic-index.ts +2 -2
  122. package/scripts/epic/epic-issue.ts +1 -1
  123. package/scripts/epic/epic-lane-offer.ts +11 -22
  124. package/scripts/epic/epic-next.ts +3 -3
  125. package/scripts/{git/git-epic-parse.ts → epic/epic-parse.ts} +3 -3
  126. package/scripts/{git/git-epic-promote.ts → epic/epic-promote.ts} +10 -10
  127. package/scripts/epic/epic-rank.ts +37 -0
  128. package/scripts/{git/git-epic-read.ts → epic/epic-read.ts} +9 -9
  129. package/scripts/{git/git-epic-reconcile.ts → epic/epic-reconcile.ts} +18 -20
  130. package/scripts/{git/git-epic-reference.ts → epic/epic-reference.ts} +4 -23
  131. package/scripts/epic/epic-relation-recheck.ts +4 -3
  132. package/scripts/{git/git-epic-relations.ts → epic/epic-relations.ts} +5 -5
  133. package/scripts/{git/git-epic-remove-plan.ts → epic/epic-remove-plan.ts} +17 -19
  134. package/scripts/{git/git-epic-remove.ts → epic/epic-remove.ts} +13 -13
  135. package/scripts/{git/git-epic-run.ts → epic/epic-run.ts} +27 -27
  136. package/scripts/{git/git-epic-sections.ts → epic/epic-sections.ts} +6 -6
  137. package/scripts/{git/git-epic-shape.ts → epic/epic-shape.ts} +7 -7
  138. package/scripts/epic/epic-solo.ts +29 -28
  139. package/scripts/{git/git-epic-validate.ts → epic/epic-validate.ts} +13 -13
  140. package/{scripts-ai → scripts/epic}/epic.ts +17 -16
  141. package/scripts/gh/fix-gh-packages.ts +2 -1
  142. package/scripts/gh/gh-spawn.ts +12 -10
  143. package/scripts/git/constants.ts +1 -1
  144. package/scripts/git/git-branch.ts +10 -1
  145. package/scripts/git/git-command.ts +2 -2
  146. package/scripts/git/git-error.ts +2 -5
  147. package/scripts/git/git-execa-error.ts +6 -1
  148. package/{scripts-ai → scripts/git}/git-followup-finish.ts +7 -7
  149. package/scripts/git/git-followup-flush.ts +74 -48
  150. package/scripts/git/git-followup-issue-close.ts +2 -2
  151. package/scripts/git/git-followup-label.ts +1 -1
  152. package/scripts/git/git-followup-pending.ts +1 -1
  153. package/{scripts-ai → scripts/git}/git-followup-workflow.ts +23 -11
  154. package/scripts/git/git-gh-exec.ts +85 -26
  155. package/scripts/git/git-gh-issue-read.ts +2 -2
  156. package/scripts/git/git-gh-issue-rest.ts +2 -2
  157. package/scripts/git/git-gh-issue-write.ts +6 -6
  158. package/scripts/git/git-gh-pr-read.ts +0 -21
  159. package/scripts/git/git-gh-pr.ts +2 -23
  160. package/scripts/git/git-next-issues.ts +34 -5
  161. package/scripts/git/git-pr-followup-wrapup.ts +2 -6
  162. package/scripts/git/git-preflight.ts +25 -10
  163. package/scripts/git/git-push-transport.ts +12 -69
  164. package/scripts/git/git-spawn.ts +79 -3
  165. package/scripts/git/git-ssh-keepalive.ts +74 -0
  166. package/scripts/git/git-staging.ts +21 -9
  167. package/{scripts-ai → scripts/git}/git-workflow.ts +11 -11
  168. package/scripts/git/github-issue-url.ts +1 -1
  169. package/scripts/git/gone-branch.ts +3 -2
  170. package/scripts/git/issue-labels.ts +13 -1
  171. package/scripts/git/issue-rank.ts +89 -0
  172. package/scripts/git/issue-reference.ts +19 -0
  173. package/scripts/git/main-merge.ts +2 -1
  174. package/scripts/git/main-sync.ts +3 -2
  175. package/scripts/git/schemas.ts +1 -1
  176. package/scripts/git/stash-pop-args.ts +7 -13
  177. package/scripts/git/stash-pop-cli.ts +2 -1
  178. package/{scripts-ai → scripts/git}/telegram-test-logic.ts +2 -2
  179. package/{scripts-ai → scripts/git}/telegram-test.ts +7 -7
  180. package/scripts/hooks/format-edited-cli.ts +15 -0
  181. package/scripts/hooks/format-edited-file.ts +2 -9
  182. package/scripts/hooks/format-rewrite-notice.ts +2 -8
  183. package/scripts/hooks/pretool-guard-cli.ts +21 -0
  184. package/scripts/hooks/pretool-guard.ts +14 -15
  185. package/scripts/init/init-ai-copy.ts +2 -5
  186. package/scripts/init/init.ts +8 -4
  187. package/scripts/init/start-exec.ts +7 -1
  188. package/scripts/init/start-plan.ts +18 -5
  189. package/scripts/init/start-setup-pr.ts +46 -19
  190. package/scripts/init/start-steps.ts +43 -10
  191. package/scripts/init/start.ts +42 -11
  192. package/scripts/issue/issue-cite.ts +19 -1
  193. package/scripts/issue/issue-comment-cli.ts +2 -1
  194. package/scripts/issue/issue-file-cli.ts +2 -1
  195. package/scripts/issue/issue-fold-cli.ts +9 -16
  196. package/scripts/issue/issue-scout-cli.ts +8 -13
  197. package/scripts/issue/measure-rerun-cli.ts +7 -6
  198. package/scripts/josh/josh-command-map.ts +0 -102
  199. package/scripts/josh/josh-commands-ai.ts +2 -2
  200. package/scripts/josh/josh-commands-backlog.ts +1 -1
  201. package/scripts/josh/josh-commands-development.ts +3 -3
  202. package/scripts/josh/josh-commands-project.ts +1 -1
  203. package/scripts/josh/josh-commands-workflow.ts +4 -4
  204. package/scripts/lane/lane-child-marker.ts +16 -2
  205. package/scripts/lane/lane-cli.ts +34 -15
  206. package/scripts/lane/lane-open.ts +3 -2
  207. package/scripts/lane/lane-registry.ts +3 -6
  208. package/scripts/lane/lane-report.ts +10 -4
  209. package/scripts/lib/cli-flags.ts +20 -2
  210. package/scripts/lib/error-message.ts +9 -0
  211. package/scripts/lib/read-file.ts +26 -2
  212. package/scripts/observations/observation-ledger-home.ts +98 -26
  213. package/scripts/observations/observation-ledger-migrate.ts +26 -21
  214. package/scripts/observations/observation-ledger-prepare.ts +10 -20
  215. package/scripts/observations/observation-ledger.ts +58 -25
  216. package/scripts/observations/observations-flush-cli.ts +6 -23
  217. package/scripts/observations/observations-flush-landing.ts +2 -1
  218. package/scripts/observations/observations-flush.ts +29 -20
  219. package/scripts/package/package-scout-cli.ts +8 -16
  220. package/scripts/ports/port-command.ts +2 -1
  221. package/scripts/propagate/propagate-plan.ts +185 -0
  222. package/scripts/propagate/propagate-publish.ts +6 -7
  223. package/scripts/propagate/propagate-run.ts +5 -1
  224. package/scripts/propagate/propagate-steps.ts +18 -2
  225. package/scripts/propagate/propagate-targets.ts +13 -2
  226. package/scripts/propagate/propagate.ts +63 -44
  227. package/scripts/refactor/import-graph.ts +2 -6
  228. package/scripts/registry-migration/migrate-logic.ts +1 -0
  229. package/scripts/registry-migration/migrate.ts +3 -2
  230. package/scripts/registry-migration/user-npmrc.ts +2 -2
  231. package/scripts/release/github-release.ts +1 -1
  232. package/scripts/release/release-cli.ts +2 -1
  233. package/scripts/repo/repo-setting.ts +10 -8
  234. package/scripts/review/review-attest.ts +44 -0
  235. package/scripts/review/review-brief-cli.ts +49 -2
  236. package/scripts/review/review-brief.ts +46 -1
  237. package/scripts/review/review-finding-ledger.ts +3 -3
  238. package/scripts/review/review-findings-cli.ts +4 -11
  239. package/scripts/review/review-record-cli.ts +14 -11
  240. package/scripts/review/review-record.ts +6 -16
  241. package/scripts/review/review-stamps.ts +7 -0
  242. package/scripts/rules/decision-oracle.ts +2 -2
  243. package/scripts/rules/implementation-cut.ts +1 -1
  244. package/scripts/rules/issue-fold.ts +1 -2
  245. package/scripts/rules/lane-carry-conflict.ts +1 -2
  246. package/scripts/rules/lane-park.ts +1 -2
  247. package/scripts/rules/pre-gate-cut.ts +2 -2
  248. package/scripts/rules/rule-body-guard.ts +2 -2
  249. package/scripts/rules/rule-value-cache.ts +99 -0
  250. package/scripts/rules/rule-value-cli.ts +10 -9
  251. package/scripts/rules/rule-value.ts +1 -1
  252. package/scripts/run/run-carry-args.ts +2 -6
  253. package/scripts/run/run-carry-cli.ts +5 -7
  254. package/scripts/run/run-cut-args.ts +7 -13
  255. package/scripts/run/run-ending-cli.ts +4 -7
  256. package/scripts/run/run-event-stream.ts +2 -5
  257. package/scripts/run/run-headless.ts +22 -6
  258. package/scripts/run/run-liveness-cli.ts +4 -7
  259. package/scripts/run/run-parent-cut-hook.ts +144 -0
  260. package/scripts/run/run-progress-args.ts +2 -6
  261. package/scripts/run/run-progress-cli.ts +2 -1
  262. package/scripts/run/run-progress-read.ts +2 -1
  263. package/scripts/run/run-progress.ts +21 -8
  264. package/scripts/run/run-ship-cli.ts +6 -74
  265. package/scripts/run/run-ship-preflight.ts +87 -0
  266. package/scripts/run/run-ship-review-steps.ts +5 -26
  267. package/scripts/run/run-ship-review.ts +9 -0
  268. package/scripts/run/run-ship-scoped.ts +44 -0
  269. package/scripts/run/run-ship-stage.ts +5 -1
  270. package/scripts/run/run-ship-steps.ts +105 -0
  271. package/scripts/run/run-ship.ts +2 -0
  272. package/scripts/run/run-tail-cli.ts +3 -3
  273. package/scripts/run/run-tidy-stashes.ts +7 -14
  274. package/scripts/run/run-wake-cli.ts +4 -8
  275. package/scripts/run/run-wake-describe.ts +19 -1
  276. package/scripts/run/run-wake-driver.ts +15 -2
  277. package/scripts/run/run-wake-session.ts +14 -4
  278. package/scripts/run/run-watcher-hook.ts +1 -1
  279. package/scripts/safe-chain/project-config.ts +3 -6
  280. package/scripts/security/security-audit-provision.ts +6 -7
  281. package/scripts/sonar/sonar-hotspots-cli.ts +2 -1
  282. package/scripts/sync/directory-copy-guard.ts +2 -1
  283. package/scripts/sync/sync-ai-files.ts +3 -3
  284. package/scripts/sync/template-source-logic.ts +3 -4
  285. package/scripts/test/e2e-retry-check.ts +3 -6
  286. package/scripts/time-runtime/time-bundle-call.ts +2 -2
  287. package/scripts/ui/ui-routes-cli.ts +3 -6
  288. package/scripts/version/bump-version.ts +2 -1
  289. package/scripts/version/npm-registry.ts +97 -0
  290. package/scripts/version/version-commands.ts +5 -4
  291. package/scripts/version/version-remote.ts +38 -33
  292. package/scripts/version/version-targets.ts +3 -3
  293. package/.claude/skills/workflow-commands/rule-residency.md +0 -267
  294. package/evals/scenarios/consult-not-execute.json +0 -20
  295. package/evals/scenarios/no-implicit-workflow.json +0 -26
  296. package/evals/scenarios/overrides-both-locations.json +0 -29
  297. package/evals/scenarios/upstream-interrupt.json +0 -23
  298. package/evals/scenarios/workflow-skill-loaded.json +0 -16
  299. package/prompts/agent-lint-protocol.json +0 -79
  300. package/prompts/agent-rules.md +0 -63
  301. package/prompts/collaboration-workflow/consultation-vs-execution.md +0 -8
  302. package/prompts/collaboration-workflow/distributed-docs.md +0 -7
  303. package/prompts/collaboration-workflow/durable-rules.md +0 -24
  304. package/prompts/collaboration-workflow/latest-first.md +0 -14
  305. package/prompts/collaboration-workflow/no-clones.md +0 -11
  306. package/prompts/collaboration-workflow/simplicity-first.md +0 -9
  307. package/prompts/collaboration-workflow/single-source-rules.md +0 -13
  308. package/scripts/build/shim-shell.ts +0 -25
  309. package/scripts/claude/skill-meta.ts +0 -37
  310. package/scripts/document/document-scan.ts +0 -108
  311. package/scripts/document/generate-catalog.ts +0 -69
  312. package/scripts/document/retired-phrases.ts +0 -143
  313. package/scripts/document/review-agent-type.ts +0 -46
  314. package/scripts/document/single-source.ts +0 -73
  315. package/scripts/git/git-fixture-workspace.ts +0 -88
  316. package/scripts/hooks/format-edited-file-fixtures.ts +0 -109
  317. package/scripts/hooks/prompt-hooks.ts +0 -38
  318. package/scripts/init/hook-command-bootstrap.ts +0 -83
  319. package/scripts/issue/issue-logic.ts +0 -50
  320. package/scripts/josh/__snapshots__/josh-command-map.test.ts.snap +0 -1227
  321. package/scripts/josh/josh-script-reader.ts +0 -11
  322. package/scripts/package/production-dependency-graph.ts +0 -68
  323. package/scripts/retrospective/retrospective-cli.ts +0 -97
  324. package/scripts/retrospective/retrospective.ts +0 -127
  325. package/scripts/rules/delivered-rules-harness.ts +0 -72
  326. package/scripts/rules/top-level-scripts-guard.ts +0 -47
  327. package/scripts/run/run-carry-flush.ts +0 -58
  328. package/scripts/run/run-transcript.golden.txt +0 -57
  329. package/scripts/run/run-wake-work.ts +0 -108
  330. package/scripts/sync/dependabot-pin-logic.ts +0 -135
  331. package/scripts/test/classify-isolation.ts +0 -149
  332. package/scripts/test/http-fault-injection.ts +0 -79
  333. package/scripts/test/josh-harness-environment.ts +0 -260
  334. package/scripts/test/josh-harness.ts +0 -96
  335. package/scripts/test/pilot-files.ts +0 -452
  336. package/scripts/test/pilot-measure.ts +0 -78
  337. package/scripts/test/test-network-guard.ts +0 -453
  338. package/scripts/test/test-repository-guard.ts +0 -317
  339. package/scripts/test/test-state-guard.ts +0 -85
  340. package/scripts/test/test-stdout-guard.ts +0 -54
  341. package/scripts/test/test-telegram-guard.ts +0 -90
  342. package/scripts/test/unit-guard-environment.ts +0 -12
  343. package/scripts/test/unit-projects.ts +0 -139
  344. package/scripts/test/vitest-include-globs.ts +0 -12
  345. package/scripts/time-runtime/time-batch-guard-fixtures.ts +0 -66
  346. package/scripts-ai/completion-gate.ts +0 -13
  347. package/scripts-ai/environment-loader.ts +0 -9
  348. /package/{scripts-ai → scripts/epic}/epic-cli-argv.ts +0 -0
  349. /package/{scripts-ai → scripts/epic}/epic-cli-remove.ts +0 -0
  350. /package/{scripts-ai → scripts/git}/followup-issue-number.ts +0 -0
@@ -56,11 +56,7 @@
56
56
  "hooks": [
57
57
  {
58
58
  "type": "command",
59
- "command": "echo 'MANDATORY before writing any implementation code: present the two-layer work summary in the session language — 3 plain sentences (Now / Change / Check) a non-programmer can follow. Name the concrete subject in each line — subject-less prose is not acceptable; no file paths, function or type names, or CLI option flags — only internal identifiers are banned, not names the reader sees on screen. Then Details, then every change with its test. Ordinary markdown, never wrapped in a code fence. Required in fullrun/halfrun/backlogrun even when the Issue body was filled; presentation only, never a confirmation stop. Completion reports lead with Cause / Fix / Result. Tests are required for ALL changes; zero tests without explicit approval is a violation. Full rule: Code Change Rules Step 0 in CLAUDE.md.'"
60
- },
61
- {
62
- "type": "command",
63
- "command": "echo 'Deleting a git-tracked file is reversible, so it is NOT Tier C — do not ask for confirmation on reversibility grounds. Still inspect the target first and surface anything that contradicts the task.'"
59
+ "command": "echo 'MANDATORY before writing any implementation code: present the two-layer work summary (Now / Change / Check, then every change with its test). Full rule: Code Change Rules Step 0 in CLAUDE.md.'"
64
60
  },
65
61
  {
66
62
  "type": "command",
@@ -11,8 +11,10 @@ half: what you actually run to find out whether a command already touched them,
11
11
  one change that is expected. It applies after `pnpm update`, `josh latest`, `pnpm josh overrides`,
12
12
  a Dependabot merge, or any other command that can rewrite dependency versions.
13
13
 
14
- The canonical extended reference is `prompts/collaboration-workflow/operating-rules.md` → the overrides protection
15
- section; this skill is the operational procedure, and the two must agree.
14
+ This skill is the single source of the overrides protection's procedure;
15
+ `prompts/collaboration-workflow/operating-rules.md` only points here. Overrides were added on
16
+ purpose — for security, compatibility or a working guarantee (for example
17
+ `"esbuild@<=0.24.2": ">=0.25.0"` for Workers build compatibility).
16
18
 
17
19
  ## 1. Effective overrides live in the workspace — inspect both files
18
20
 
@@ -35,7 +37,8 @@ git diff -- pnpm-workspace.yaml package.json
35
37
  and confirm the effective `overrides:` block in `pnpm-workspace.yaml` and any historical
36
38
  `pnpm.overrides` declarations in `package.json` are untouched, **and** that `devDependencies`
37
39
  versions still respect the effective overrides. If any entry was removed, modified, or bumped past
38
- an override, restore it immediately.
40
+ an override, restore it immediately, investigate why it changed, and report that to the user — never
41
+ keep the change without explicit approval.
39
42
 
40
43
  `josh latest` prints its own verdict as its last overrides line (`✔ overrides unchanged (<n> from
41
44
  <file>)`, or a `⚠ overrides changed` warning), and `pnpm josh overrides` compares effective workspace
@@ -6,8 +6,9 @@ description: The procedures for the `josh epic:*` commands that make an epic run
6
6
  # The `josh epic:*` commands
7
7
 
8
8
  These three commands are what turn an epic from a list of issue numbers into something a run can
9
- execute unattended. The canonical extended reference is `prompts/collaboration-workflow/` — `epic-bundle.md`, `epic-audit.md` and `cross-repo-epic.md` between them; this
10
- skill is the operational procedure, and the two must agree.
9
+ execute unattended. **This skill is their single source**: `prompts/collaboration-workflow/` keeps
10
+ `epic-bundle.md`, `epic-audit.md` and `cross-repo-epic.md` only as pointers here, and the history
11
+ behind the rules is `docs/maintainers/epic-commands-rationale.md` (joshuafolkken/kit#2892).
11
12
 
12
13
  The workflow keywords themselves — `kickoff`, `fullrun`, `halfrun`, `backlogrun` — live in the
13
14
  `workflow-commands` skill.
@@ -80,9 +81,12 @@ adds is reading *inside* the children:
80
81
  | The search for those issues could not read the open backlog | **error** |
81
82
  | That search stopped before the end of the backlog | warning |
82
83
 
83
- **Only errors fail it.** The first check fires on a legitimate forward reference as readily as on a
84
- real missing dependency; failing on both would make design notes unwritable. A forward reference the
85
- other child *already depends on* is not reported at all.
84
+ **Only errors fail it** (exit 1); a warning leaves the exit code alone. The first check fires on a
85
+ legitimate forward reference as readily as on a real missing dependency; failing on both would make
86
+ design notes unwritable, so the reader judges and the machine only keeps it from being missed. A
87
+ forward reference the other child *already depends on* is not reported at all. Acceptance criteria
88
+ that require what a child free to run later produces cannot be met however anyone decides, which is
89
+ why that check is an error.
86
90
 
87
91
  **A pair with either child closed is a warning, not an error.** What makes an undeclared order a
88
92
  contradiction is that the criteria's child *can run first*, and one end closing is enough to make
@@ -92,11 +96,13 @@ audit forever, which stops every future run of that epic at the first step. It i
92
96
  dropped because dropping it hands the same pair to the first check, which reports it as an implicit
93
97
  dependency instead: the same one line, minus the detail that the name is in the acceptance criteria
94
98
  (joshuafolkken/kit#1010, widened from both-closed to either-closed by joshuafolkken/kit#1597 after a
95
- closed child citing an open sibling **as evidence** held an epic red at step one).
99
+ closed child citing an open sibling **as evidence** held an epic red at step one). **The demotion
100
+ needs the closed state confirmed**: `epic_issue.normalize_state` maps every state but `CLOSED`
101
+ (`MERGED` included) to `OPEN`, so a state that could not be confirmed stays an error.
96
102
 
97
103
  **Fixing what it finds is Tier A** — re-pointing a dependency or correcting prose is reversible and
98
- will otherwise stall the work. Park with `needs-decision` only when the contradiction is a design
99
- choice nobody has made.
104
+ will otherwise stall the work, so fix it without asking and record why on the issue. Park with
105
+ `needs-decision` only when the contradiction is a design choice nobody has made.
100
106
 
101
107
  **The two `orphan search` findings are the exception, because neither is a contradiction.** They are
102
108
  about the search itself rather than about anything the children say (joshuafolkken/kit#1033):
@@ -114,6 +120,8 @@ about the search itself rather than about anything the children say (joshuafolkk
114
120
  state or artifact, list the existing code referencing that concept and confirm some child owns
115
121
  updating it. Label names are single-sourced in `scripts/git/issue-labels.ts`.
116
122
 
123
+ History: `docs/maintainers/epic-commands-rationale.md` → "`epic:audit` — why the children are read across".
124
+
117
125
  ## `josh epic:next <E…>` — what is runnable
118
126
 
119
127
  Returns **every** runnable child, bundled per repository with the local checkout to run it in.
@@ -243,12 +251,12 @@ in `Dependencies` — is what a wave has to satisfy, and editing the body alone
243
251
  with nothing after it** — which is exactly what a hub is the moment the earlier wave has been chained
244
252
  into it. `chains_containing` finds several indices; `is_branching_after` does not hold, because it
245
253
  requires a successor in **every** chain naming the target and a hub has none in any of them; so
246
- `ambiguous_position_error` is raised (`scripts/git/git-epic-chains.ts`). **The first child of the
254
+ `ambiguous_position_error` is raised (`scripts/epic/epic-chains.ts`). **The first child of the
247
255
  next wave therefore goes into the declaration by hand**, with its `blocked-by` recorded to match.
248
256
  Once the hub has a successor, `--after <hub>` branches a new line and the rest of that wave goes in
249
257
  with it.
250
258
 
251
- **Nothing in the parsing or the consistency check forbids this.** `DECLARED_CHAIN_LINE` in `scripts/git/git-epic-parse.ts`
259
+ **Nothing in the parsing or the consistency check forbids this.** `DECLARED_CHAIN_LINE` in `scripts/epic/epic-parse.ts`
252
260
  asks only that a line be *nothing but* a chain, so there may be any number of chain lines and **one
253
261
  child may be an endpoint of several of them** — `parse_dependency_links` expands each line
254
262
  independently and flattens the result, dropping only self-loops. `find_anomalies` in
@@ -328,7 +336,11 @@ to implement.
328
336
  - **The epic auto-closes only when every cross-repository child's state could actually be read.** One
329
337
  unreadable child leaves it open, exactly as before.
330
338
  - **An epic in another repository must be referenced as `owner/repo#N`** — `backlogrun
331
- joshuafolkken/kit#858 --only`. A bare `#N` resolves to *this* repository's issue of that number.
339
+ joshuafolkken/kit#858 --only`, `epic:next joshuafolkken/kit#858 --repo joshuafolkken/app-kit`. A
340
+ bare `#N` resolves to *this* repository's issue of that number. A cross-repository epic exists in
341
+ one repository only.
342
+ - **`epic:next` prints each candidate's repository and local checkout** from joshuafolkken/kit#869's
343
+ map; a repository with no checkout prints `(no local checkout)` and is **never cloned on its own**.
332
344
 
333
345
  **A dependency that crosses a repository is not satisfied by the blocking issue closing.** Merging
334
346
  does not publish: the merge, the auto-tag and the publish run one after another, so a consumer told
@@ -341,12 +353,17 @@ default branch declares has appeared in the registry.
341
353
  wait on — so a closed blocker there resolves rather than waiting until the run's own eight-hour
342
354
  timeout with nothing an operator can edit to clear it. The answer is read from the blocker
343
355
  repository's own manifest and never from the registry: a registry 404 also means "this token may not
344
- see it", so resolving on one would start a consumer child before its blocker's release existed.
356
+ see it", so resolving on one would start a consumer child before its blocker's release existed. A
357
+ manifest read that fails (rather than answering 404) is told apart by HTTP status and still waits.
345
358
 
346
359
  **The evaluation is an AND in that order.** While the blocker is open the registry is never
347
360
  consulted, so a run never stalls on a publish from the moment it starts. The target is that exact
348
361
  version, never "something newer" — a consumer several releases behind would otherwise be satisfied by
349
- a publish that predates the change.
362
+ a publish that predates the change. **A child no longer bumps the version** (joshuafolkken/kit#1486):
363
+ the version moves only when `pnpm josh release` runs, so the target is the release that includes the
364
+ blocker, and the default branch's version just after its merge is the previous release, which would
365
+ satisfy the wait at once. The publish check shares `josh propagate`'s implementation; it is not
366
+ defined twice. History: `docs/maintainers/epic-commands-rationale.md` → "Cross-repository epics".
350
367
 
351
368
  ## `josh epic:bundle <N>` — does this new issue belong with one already filed?
352
369
 
@@ -373,14 +390,18 @@ all: `repos/{owner}/{repo}/issues/<N>` serves one too, and a merged PR does not
373
390
 
374
391
  **A number that does not exist is not a gap.** A typo, or another repository's number quoted in
375
392
  prose, is dropped in silence — neither a candidate nor something the command reports it could not
376
- read. Reported as a gap it puts `⚠ Could not read #N.` above the verdict, and the rule below stops an
377
- unattended run on exactly that, for a reference that never existed (joshuafolkken/kit#957). **The two
393
+ read. Reported as a gap it puts `⚠ Could not read #N.` above the verdict, and the could-not-answer rule
394
+ (`prompts/review.md` → "Three-way disposition after the cap") stops an unattended run on exactly that, for a reference that never existed (joshuafolkken/kit#957). **The two
378
395
  are told apart by HTTP status, never by `gh`'s wording**: 404 is nothing at that number, 403 and 429
379
396
  are a rate limit. GitHub answers 404 for an issue the token may not see as well, so as not to leak
380
397
  its existence — which does not reach this command, because it probes the repository whose open issues
381
398
  it has just listed. The probe costs one REST request and runs **only** when a read has already
382
399
  failed, and only on the path that needs the distinction: the backlog's own relation reads, up to two
383
- hundred of them, never pay it.
400
+ hundred of them, never pay it, and the referenced-number reads are capped at twenty. **Only the
401
+ subject's own body is followed** — the reverse direction would scan every closed issue, and a
402
+ follow-up already names its parent. The reference parsing is the same implementation as
403
+ `epic:audit`'s implicit-dependency check, applied to the backlog instead of one epic. The open backlog
404
+ is small enough to scan whole, so there is no index or cache.
384
405
 
385
406
  | Candidates | Do | Tier |
386
407
  | --- | --- | --- |
@@ -392,6 +413,11 @@ hundred of them, never pay it.
392
413
  | No strong signal | Nothing | — |
393
414
  | **The epic listing was cut short** | **Nothing** — every placing row above is withheld | — |
394
415
 
416
+ **`none` is a legitimate answer** — a self-review outside any workflow has no current issue to point
417
+ at, so the issue stays in the backlog: what the procedure requires is running the command and
418
+ following its answer, not landing every issue in an epic. The review-cap follow-up's filing and the
419
+ answer table it acts on are `prompts/review.md` → "Three-way disposition after the cap".
420
+
395
421
  **Every row that *places* the issue asserts a negative, so a cut epic listing withholds all of them**
396
422
  (joshuafolkken/kit#1697). "No epic already tracks this issue" — which `create_epic` asserts about the
397
423
  candidates too — is only as good as the listing it was read from, and an epic past the cut tracks its
@@ -399,7 +425,8 @@ children invisibly. **`add_to_epic` rests on it as much as `create_epic` does**:
399
425
  the epic a *candidate* sits in, while an unseen epic already tracks the issue itself, is the same
400
426
  duplicate by another route. The cut was already on standard error
401
427
  (`⚠ The epic listing …`) while standard output went on printing an executable
402
- instruction such as `Create an epic for these (Tier A — do it).` — and the rule below that reads a warning as "could not answer" is written for one above
428
+ instruction such as `Create an epic for these (Tier A — do it).` — and the rule that reads a warning as "could not answer" (`prompts/review.md` → "Three-way
429
+ disposition after the cap") is written for one above
403
430
  `Nothing to bundle.`, so it never reached this verdict. Acted on as Tier A, that is a **second epic
404
431
  over an already-tracked issue**, which the auto-close and `epic:next` cannot both be right about
405
432
  (joshuafolkken/kit#943). The verdict now says so itself:
@@ -462,3 +489,5 @@ Full behavior: `docs/josh-commands.md` → "`josh issue:file`".
462
489
  **When the relation carries an order, record it** in `blocked-by` and in the epic's `Dependencies` —
463
490
  on an addition as much as on a new epic. Without it the batch survives and the reason for it does
464
491
  not. An order **nobody declared is not invented**.
492
+
493
+ History: `docs/maintainers/epic-commands-rationale.md` → "`epic:bundle` — why issues filed apart are bundled afterwards".
@@ -15,7 +15,7 @@ green while spacing, layout and styling are visibly broken. This skill is the lo
15
15
  In order:
16
16
 
17
17
  1. The routes given as arguments (`/verify-ui / /blog`).
18
- 2. Otherwise, derive the candidates with `pnpm josh ui:routes` (alias `josh uir`): it reads the
18
+ 2. Otherwise, derive the candidates with `pnpm josh ui:routes`: it reads the
19
19
  change (the branch diff, or the staged diff with `--staged`) and lists the routes it touches,
20
20
  tracing a changed shared component to the routes that render it. From that list **pick the ones a
21
21
  reader would notice** — that narrowing is the judgement the command leaves to you.
@@ -28,16 +28,8 @@ resident in the AI documents, because it has to hold when this skill has *not* b
28
28
  - The rule applies even when the user authorized a related workflow in an earlier turn. Each
29
29
  invocation must be re-typed by the user in the current turn.
30
30
 
31
- **A session cut inside a declared budget is not a new invocation.** A `backlogrun` that is cut and
32
- resumed is still the one invocation a person typed — the keyword authorized the declared budget, and
33
- the cut is an execution detail of spending it. What this rule forbids is _inferring_ a workflow from a
34
- request's shape. **The reading covers `backlogrun` and it alone** — a `fullrun` cut still waits for
35
- the keyword, because a `fullrun` ends at one issue and has nothing to carry.
36
-
37
- **`backlogrun-steps.md` → "The session cut is inside the invocation" is the single source of the
38
- mechanism** — the record, the two commands, and what each answer means, and how a named-issue
39
- `backlogrun #N1 #N2 …` pins its list to what was typed while the issues it has finished live in the
40
- record's `done` field rather than shrinking the string.
31
+ **A session cut inside a declared budget is not a new invocation — for `backlogrun` alone**; its
32
+ single source is `backlogrun-steps.md` → "The session cut is inside the invocation".
41
33
 
42
34
  ## 1. Which file to read
43
35
 
@@ -62,7 +54,7 @@ lists `backlogrun.md` alone: its parent orchestrates and never implements, so `f
62
54
  Every procedure for *running* a `backlogrun` item — lanes (`backlogrun-lanes.md`), park-and-continue,
63
55
  the guards — stays `backlogrun.md`'s. The on-demand sections `into-target.md` (an `into` suffix) and `target-repository.md`
64
56
  (an `owner/repo#` prefix) are read only when their trigger is typed, and §3's residency procedure lives
65
- in `rule-residency.md`, reached only when a rule is placed, moved or retired.
57
+ in `prompts/collaboration-workflow/residency.md`, reached only when a rule is placed, moved or retired.
66
58
 
67
59
  ### The fetch is one `Read` call per file
68
60
 
@@ -100,8 +92,8 @@ procedure alone, and the rest of `backlogrun-park.md` is read only when it is re
100
92
  **A pointer written `` `X.md` → "Heading" `` is read as that section, never by opening `X.md` whole:**
101
93
 
102
94
  ```bash
103
- pnpm josh doc:section <file.md> "<heading>" # the section, verbatim ; alias: josh ds
104
- pnpm josh read:set [<keyword>] # what an entry reads, and what it costs ; alias: josh rs
95
+ pnpm josh doc:section <file.md> "<heading>" # the section, verbatim
96
+ pnpm josh read:set [<keyword>] # what an entry reads, and what it costs
105
97
  ```
106
98
 
107
99
  The section is fetched in the same turn, printed verbatim with its subsections; **a heading that does
@@ -251,15 +243,8 @@ there. A dispatched lane child never runs the retrospective.
251
243
 
252
244
  ## 3. What stays resident, and what is read from here
253
245
 
254
- **The residency criterion and its procedure are `rule-residency.md`, read only when a rule is being
255
- placed, moved or retired — never at any entry, and never during a run.** It carries question 0 (is the
256
- answer computable from mechanically readable inputs, so it is a decision oracle — `pnpm josh
257
- oracle:list`), the ordering question (does it decide *when or in what order* rather than *what*, so it
258
- goes in the run driver `pnpm josh run:step` — `prompts/collaboration-workflow/residency.md` → ordering
259
- question), the first question (can the trigger be named as one tool call, so the body moves out of
260
- `CLAUDE.md` to a hook via `prompts/collaboration-workflow/rule-delivery.md`), the second question
261
- (does it have to fire on a turn where no skill was loaded, so it stays in `CLAUDE.md`), and the
262
- procedure that decides how much of a resident rule is resident — the trigger-plus-pointer shape, the
263
- enumeration of every resident rule with an on-demand counterpart, and the retirement route and its
264
- three tests. `rule-residency.md` is the single source; the moment it binds is a turn spent editing
265
- these documents, never a turn spent executing an Issue.
246
+ **The residency criterion is `prompts/collaboration-workflow/residency.md`, its single source — read
247
+ only when a rule is being placed, moved or retired, never at any entry and never during a run.** Its
248
+ questions are asked there in order — question 0 (`pnpm josh oracle:list`), the ordering question
249
+ (`pnpm josh run:step`), the first and the second — beside how much of a resident rule stays and the
250
+ retirement route; none is restated here.
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Background the gate and push
4
4
 
5
- - **The clean path folds the region into one backgrounded `pnpm josh ship`** (gate → `git -y` →
5
+ - **The clean path folds the region into one backgrounded `pnpm josh ship`** (preflight → gate → `git -y` →
6
6
  foreground `followup` → `run:tail`; joshuafolkken/kit#2398). The calls below serve a due second round.
7
7
  - Background `pnpm josh gate` beside the review; join it before commit.
8
8
  - Issue `pnpm josh git -y` in the background; its completion resumes the run, so the turn never ends
@@ -117,8 +117,10 @@ summary is bounded the way it is".
117
117
  discretionary observation has**: a child files `route:tier-a` and `route:interrupt` only, and the
118
118
  parent files what survives — `SKILL.md` → §2i, the single source. **What the parent does with the
119
119
  rest is append it, not drop it**: an observation that cannot cite the depth-0 work it blocked
120
- becomes one line in the observation ledger, and a second line under the same key files it. **The
121
- child never writes that file** — it cannot tell its observation from the sibling lane's.
120
+ becomes one line in the observation ledger, and a second line under the same key files it. **A
121
+ child appends only to its own issue's file, `docs/maintainers/observations/<N>.md`, in its own
122
+ lane** (joshuafolkken/kit#2919) — it merges with the child's pull request, and a sibling lane's
123
+ file is never one it touches.
122
124
  4. **Decisions taken and why**, where the decision was not already logged as an Issue comment.
123
125
  5. **What was left undone**, and under whose authority.
124
126
 
@@ -162,7 +164,7 @@ unit was given** — this session's own unless the unit was handed a separate wo
162
164
  the recovery below is taken there too.
163
165
 
164
166
  ```bash
165
- pnpm josh run:liveness <N> --output <path> --process none # alias: josh rv
167
+ pnpm josh run:liveness <N> --output <path> --process none
166
168
  pnpm josh run:liveness <N> --output <path> --process alive
167
169
  pnpm josh run:liveness <N> --output <path> --process none --window 45 --repo <owner/repo>
168
170
  ```
@@ -288,7 +290,7 @@ separate command to ask first. Rationale: `docs/maintainers/backlogrun-child-rat
288
290
  preflight is part of the claim".
289
291
 
290
292
  ```bash
291
- answer=$(pnpm josh run:hold 926) # alias: josh rh ; one token on stdout, prose on stderr
293
+ answer=$(pnpm josh run:hold 926) # one token on stdout, prose on stderr
292
294
  ```
293
295
 
294
296
  | Answer | What it found | What to do |
@@ -137,7 +137,7 @@ runs `lane:open`, then — only when `--stash` is given, which is the first lane
137
137
  into the lane and re-installs against the lock it brought in, then `lane:dispatch`:
138
138
 
139
139
  ```bash
140
- pid=$(pnpm josh lane:launch "$n") || exit 1 # the child's pid on stdout, nothing else; alias: josh lnla
140
+ pid=$(pnpm josh lane:launch "$n") || exit 1 # the child's pid on stdout, nothing else
141
141
  pid=$(pnpm josh lane:launch "$n" --stash "backlogrun: josh latest before lanes") || exit 1 # the first lane only, and only if `josh latest` stashed
142
142
  ```
143
143
 
@@ -33,6 +33,12 @@ authorization, whether it came from a named epic or from the opted-in pool:
33
33
  is Tier A" carries the re-dispatch itself. A released child takes a lane exactly as any batch child
34
34
  does.
35
35
 
36
+ ## The parent does not investigate a lane failure itself
37
+
38
+ **A lane failure whose reason is not on its Issue is read by a unit** — `pnpm josh delegate
39
+ lane-failure-investigation` (joshuafolkken/kit#2947); the parent checks the cited lines and
40
+ `pnpm josh issue:state` before it parks, re-dispatches or files.
41
+
36
42
  ## `needs-human-review` — the one stop that is not a park
37
43
 
38
44
  A child carrying **`needs-human-review`** is degraded to a `halfrun`-shaped stop and **the whole run ends
@@ -50,11 +50,11 @@ for a whole interval (that exit says so on standard error). **Nothing in flight
50
50
  parked, a stop — run `pnpm josh run:progress --mark` in the same turn to restart the silence clock. The clock is silence, never a timer
51
51
  (`docs/josh-commands.md` → "`josh run:progress`").
52
52
 
53
- **Do not keep a progress clock of your own** — the hook refuses the arm rather than asking.
54
- `scripts/rules/early-heartbeat.ts` → `decide` refuses a sleep-only `Bash` call on three tests — a timer it already allowed is still live, the
55
- report it would produce would land before the interval is up, or the wait runs longer than the interval
56
- — so **a single correctly-spaced arm is allowed**. It is still not the way to report; the step above
57
- prints without arming anything, and `--wait` is not a wait timer.
53
+ **Do not keep a progress clock of your own** — the hook refuses the arm rather than asking
54
+ (`scripts/rules/early-heartbeat.ts` → `decide`), though **a single correctly-spaced arm is allowed**. It
55
+ is still not the way to report; the step above prints without arming anything, and `--wait` is not a
56
+ wait timer. Rationale: `docs/maintainers/backlogrun-progress-rationale.md` → "Why the heartbeat reads
57
+ as it does".
58
58
 
59
59
  **The default interval is twenty minutes, overridable — by the person, not the run.**
60
60
  `JOSH_PROGRESS_INTERVAL_MINUTES` moves both sides (the guard reads it through the watcher's reader);
@@ -65,14 +65,11 @@ moves the watcher alone** — it makes the watcher quieter than the floor, never
65
65
  **Every unscheduled progress statement is answered by `pnpm josh run:progress --once`** — presented in
66
66
  the same five field lines, the reply to an explicit ask and the note just after a run starts alike.
67
67
  **Never write a clock time the command did not print** (not an approximation, not a placeholder — where
68
- a field is missing, say so). **`--once` records the report**, so no `--mark` beside it. **A live timer
69
- is counted from the record the guard writes when it allows one**, never from the machine's `sleep`
70
- processes.
68
+ a field is missing, say so). **`--once` records the report**, so no `--mark` beside it.
71
69
 
72
70
  **Every report opens with the time the observation was taken** — not only how long it has been quiet: an
73
- absolute instant, `at YYYY-MM-DD HH:MM±HH:MM / YYYY-MM-DDTHH:MMZ`. **The date is part of it**, and **the local clock
74
- leads with UTC beside it and the offset that ties them**. **It is added, never substituted for the
75
- elapsed figure**, and **the presented line needs no stamp computed for it** — the command prints the
71
+ absolute instant, `at YYYY-MM-DD HH:MM±HH:MM / YYYY-MM-DDTHH:MMZ`. **It is added, never substituted for
72
+ the elapsed figure**, and **the presented line needs no stamp computed for it** — the command prints the
76
73
  `at` stamp and the `next` field.
77
74
 
78
75
  **The line carries observations, never "still running", and nothing in it is a verification result** —
@@ -87,8 +84,8 @@ promoted to interrupt, never demoted to requested.**
87
84
 
88
85
  **The report surface belongs to the run, not to the session** (joshuafolkken/kit#2207). The run's
89
86
  session-facing events — a plan posted, a child launched, a PR opened, a review round, a park, a cut, a
90
- stop, a merge — are appended to one ordered stream keyed to the run's identity (`pnpm josh run:event`),
91
- which survives the cut because it is the run's and not any one session's. **Every session is a writer;
87
+ stop, a merge — are appended to one ordered stream keyed to the run's identity (`pnpm josh run:event`).
88
+ **Every session is a writer;
92
89
  the reader is a script in a pane of the person's own, never a conversation** (#2492):
93
90
  `pnpm josh run:event --watch` prints each event the moment it lands, in the session language, and the
94
91
  `heartbeat` events say the run is alive when quiet. **No session relays the stream** — name the watch command once, at the first cut or when
@@ -106,8 +103,7 @@ remaining child blocked behind a parked one, the backlog drained of anything run
106
103
  streak tripped — is pushed to the interrupt tier: `pnpm josh run:carry --end --stopped "<reason>"` sends one ⏸️ confirmation
107
104
  as it ends the record, and because the record is gone by the second `--end` the same stop never notifies
108
105
  twice. A parked child is pushed by the child itself, which records the park and sends its own
109
- `confirmation` before it stops (`backlogrun-park.md`). **Nothing new carries either one** — both ride the
110
- existing notification types and the record the watcher already keeps. Rationale for the tiers:
106
+ `confirmation` before it stops (`backlogrun-park.md`). Rationale for the tiers:
111
107
  `docs/maintainers/backlogrun-progress-rationale.md` → "Why the signal tiers are split this way".
112
108
 
113
109
  **A heartbeat is emitted from the moment a run has started, even before any child carries
@@ -146,9 +142,8 @@ long.
146
142
  watcher's scope and placement: `docs/maintainers/backlogrun-progress-rationale.md` → "Why the watcher
147
143
  runs where it does".
148
144
 
149
- **A run that merges needs no teardown; a run that stops has to end the reporting itself.** The issue
150
- leaves the `in-progress` listing at the merge, so whatever is waiting prints nothing and `--hours` ends
151
- it. **A stop keeps that label on purpose** — so **no further `--wait` is started** after the stop
145
+ **A run that merges needs no teardown; a run that stops has to end the reporting itself.** **A stop
146
+ keeps the `in-progress` label on purpose** — so **no further `--wait` is started** after the stop
152
147
  notification, and any long-running watcher still in the background is stopped in the same turn. That
153
148
  covers `halfrun`'s stop before commit, a `needs-human-review` stop, a split or prerequisite stop, and
154
149
  a `backlogrun` named issue's failure stop.
@@ -167,9 +162,9 @@ answers=$(pnpm josh epic:next 858 909 --repo joshuafolkken/kit --lanes)
167
162
  # every named epic, merged into the same pool — "Several epics in one run" above
168
163
  ```
169
164
 
170
- **`--lanes` is the form to use.** A lane's branch is `<N>-lane`, which `pnpm josh git` commits from, so
171
- a child handed a lane runs the whole `fullrun` procedure inside it. Read a line per child, and treat a
172
- single non-numeric line as the verdict.
165
+ **`--lanes` is the form to use.** Read a line per child, and treat a single non-numeric line as the
166
+ verdict. Rationale: `docs/maintainers/backlogrun-progress-rationale.md` → "Why a named epic's children
167
+ run in lanes".
173
168
 
174
169
  1. Run the command above.
175
170
  2. **One or more numbers** — where the child runs in this session's own checkout, its `fullrun` claim
@@ -317,8 +312,8 @@ the next turn of this session costs more than the threshold in billed input.
317
312
 
318
313
  **135,000 is shared by the scheduler entry, scheduler hand-off and lane worker implementation cut.**
319
314
  The value is `CONTEXT_CUT_THRESHOLD` in `scripts/cost-runtime/context-cut-threshold.ts`; `cost --cut`,
320
- `run:merge` and `run_cut.IMPLEMENTATION_CONTEXT_THRESHOLD` all read it rather than carrying separate
321
- numbers. The output ceiling and the entry-read figure are a separate 150,000, not this threshold.
315
+ `run:merge`, `run_cut.IMPLEMENTATION_CONTEXT_THRESHOLD` and the parent hand-off guard all read it. The
316
+ output ceiling and the entry-read figure are a separate 150,000, not this threshold.
322
317
 
323
318
  ### The check is asked at every merge, and delegation does not excuse it
324
319
 
@@ -333,7 +328,7 @@ answer, and take `over`'s branch at that child.
333
328
 
334
329
  ### When to ask, and what to do
335
330
 
336
- **Ask once per child, immediately after its merge and `pnpm josh ms`** — never mid-child.
331
+ **Ask once per child, immediately after its merge and `pnpm josh ms`**; mid-child, a hook asks (#2947).
337
332
 
338
333
  ### A parent without a completion callback hands off at its first dispatch
339
334
 
@@ -443,10 +438,9 @@ survive the cut is re-dispatched, never adopted** — `pnpm josh lane:open <N>`
443
438
  progress comment is generated from it** (joshuafolkken/kit#2024) — children run, Issues filed,
444
439
  **consecutive failures**, and the time the run started. `pnpm josh run:merge` writes the merge into
445
440
  the record and mirrors the counters onto the epic comment at every child's merge. **The
446
- consecutive-failure count is the one that matters** — the stopped-unit section leans on it to notice
447
- the environment is at fault, and a merge resets it. **The record survives a session cut and a
448
- compaction alike.** Rationale: `docs/maintainers/backlogrun-progress-rationale.md` → "Why state lives
449
- in records, not the conversation".
441
+ consecutive-failure count is the one that matters**, and a merge resets it. Rationale:
442
+ `docs/maintainers/backlogrun-progress-rationale.md` → "Why state lives in records, not the
443
+ conversation".
450
444
 
451
445
  ### What carries over, and where it lives
452
446
 
@@ -463,16 +457,18 @@ in records, not the conversation".
463
457
 
464
458
  ## Waiting, and never waiting forever
465
459
 
466
- | Setting | Value | Why |
460
+ | Setting | Value | Meaning |
467
461
  | --- | --- | --- |
468
462
  | Polling interval | 60 s | **A floor between two asks, never a clock the parent sets.** It bounds a re-ask made while the parent is *already awake*; what wakes it is "The parent keeps no clock of its own" below. |
469
463
  | `backlogrun` idle-watch poll | 5 min | Not the interval above, and a floor in the same sense. |
470
464
  | Silent delegated unit | 30 min | Not the child's duration — the time its output has gone **unchanged**. Past it, run the traces above and book a stopped unit as a failure. |
471
- | Stale `in-progress` | 90 min | Longer than any single child has taken; past it, the other session is gone. |
465
+ | Stale `in-progress` | 90 min | Past it, the other session is gone. |
472
466
  | Publish wait | 10 min | `josh propagate`'s own budget. A failed publish never appears. |
473
- | Whole run | 8 h | An unattended run that has not finished overnight needs a person, not more waiting. |
467
+ | Whole run | 8 h | Past it, the run needs a person. |
474
468
 
475
- Each timeout **ends the wait and reports** — none is retried indefinitely. A stale child's label is
469
+ Each timeout **ends the wait and reports** — none is retried indefinitely. Rationale for the figures:
470
+ `docs/maintainers/backlogrun-progress-rationale.md` → "Why the parent waits on classification, not a
471
+ clock". A stale child's label is
476
472
  removed first, so the next poll can offer it. **A graph that has deadlocked on a cycle is not this loop's
477
473
  to untangle**: `epic:next` detects it and exits with an error.
478
474
 
@@ -487,9 +483,7 @@ source and `run:report` the final report.
487
483
  `docs/maintainers/backlogrun-progress-rationale.md` → "Why the parent waits on classification, not a
488
484
  clock".
489
485
 
490
- The driver checks lane completion every five seconds and makes a new backlog offer no sooner than one
491
- minute after the previous offer, except after collecting a child — waits that cost no AI turns. The
492
- watcher reports on its own interval, and a judgment session may take its exit as a prompt to act.
486
+ The watcher reports on its own interval, and a judgment session may take its exit as a prompt to act.
493
487
 
494
488
  #### The wake exists only while something is in flight
495
489
 
@@ -527,7 +521,7 @@ Per-child completion notifications are unchanged: `pnpm josh followup` sends one
527
521
  **start** notification when the run begins, and an epic **completion** summary at the end. **Do not
528
522
  compose that summary by hand — `pnpm josh run:report` generates it from this invocation's events**
529
523
  (joshuafolkken/kit#2249, scoped in #2393): it renders what merged, what parked and why, and what was cut,
530
- reusing `format_event`, closing with the release tail below. Its output is the Telegram body too — pass it to
524
+ closing with the release tail below. Its output is the Telegram body too — pass it to
531
525
  `pnpm josh notify --body-file`.
532
526
 
533
527
  **That same session asks `pnpm josh release:scope` once, after the last child has merged** — in the
@@ -131,7 +131,7 @@ single source.
131
131
  carried in a record rather than in the conversation:
132
132
 
133
133
  ```bash
134
- pnpm josh run:carry --begin "backlogrun --max 5 --idle 30" --owner "$PPID" # alias: josh rc
134
+ pnpm josh run:carry --begin "backlogrun --max 5 --idle 30" --owner "$PPID"
135
135
  pnpm josh run:carry --json # read it back in a resumed session
136
136
  ```
137
137
 
@@ -204,7 +204,7 @@ judgment starts an AI session, with the branch result and resume flags in its pr
204
204
  **Start it in the same turn as `--begin`, and stop it in the same turn as `--end`:**
205
205
 
206
206
  ```bash
207
- pnpm josh run:wake --start # alias: josh rw ; right after `run:carry --begin`
207
+ pnpm josh run:wake --start # right after `run:carry --begin`
208
208
  pnpm josh run:wake --stop # in the same turn as `run:carry --end`
209
209
  ```
210
210
 
@@ -267,7 +267,7 @@ run.
267
267
  **The plan is one command's output, not an assembly of several:**
268
268
 
269
269
  ```bash
270
- pnpm josh backlog:plan # alias: josh blp
270
+ pnpm josh backlog:plan
271
271
  ```
272
272
 
273
273
  **It renders the same classified pool `backlog:next` answers from**, so **the plan cannot promise an
@@ -282,9 +282,8 @@ order the run does not take**. Its four sections are:
282
282
  is distinguished from "not reached yet".
283
283
 
284
284
  **Report all four to the person, in the session language, before the first child starts.** Epic
285
- children are enumerated individually rather than summarized under their root. A `⚠` about a truncated
286
- listing is reported with them: the plan is then partial, and saying so is what keeps it from reading as
287
- complete.
285
+ children are enumerated individually rather than summarized under their root. Report a truncated-listing
286
+ `⚠` with them: the plan is then partial.
288
287
 
289
288
  ### Resolve what the plan can resolve, before starting
290
289
 
@@ -293,27 +292,28 @@ stop at a time.**
293
292
 
294
293
  - **Decide everything decidable from the issue itself.** Read the issue's body **and its comments**
295
294
  (`SKILL.md` → §2g), and where the answer is already there, record it as an Issue comment and
296
- **remove the label** — `CLAUDE.md` → "Decision autonomy" already makes that Tier A. **Read every one
297
- of them in one call** — `pnpm josh issue:read <N> <N> …`, the numbers the plan just listed under
298
- "Waiting on a person" — rather than a `gh api` pair per issue.
295
+ **remove the label** — `CLAUDE.md` → "Decision autonomy" already makes that Tier A. **Read them all in
296
+ one `pnpm josh issue:read <N> <N> …` call**, not a `gh api` pair per issue.
299
297
  - **Never measure in order to decide.** A question needing a benchmark, a profile, or a run of the
300
298
  thing itself is not settled here: it stays labelled and the plan says so.
301
- - **Label what you find.** An issue that turns out to need a person's judgement has `needs-decision`
302
- applied — the same label a parked child gets, applied the way `backlogrun-park.md` → "park and continue"
303
- applies it. **The next plan then classifies it by reading the label alone**, never by reading the
304
- body again.
299
+ - **Label what you find.** An issue needing a person's judgement gets `needs-decision`, applied as
300
+ `backlogrun-park.md` → "park and continue" does. **The next plan classifies it by the label alone**,
301
+ never the body.
305
302
  - **Order and isolate the pool in the same pass** (joshuafolkken/kit#2776), from the same
306
303
  `issue:read`: an issue that must land first (it builds what another reuses, or both edit one code
307
304
  path) becomes a native `blocked-by`; an issue the `wip-cap.md` → 「実行のしかた」 enumeration hits
308
305
  gets `run:solo`, **every other one `run:lane`**. Comment the reason; the offer commands enforce all
309
306
  three, answering `triage` while an issue has neither.
307
+ - **`priority:high` puts an issue first** (joshuafolkken/kit#2928; ranking: `docs/josh-commands.md` →
308
+ `josh backlog:next`). Apply it only on a cited ground — a stated deadline or urgency, or a person's
309
+ written policy — commenting the ground; **never remove it**.
310
310
  - **Report the order those labels produce — `pnpm josh backlog:plan --waves`** (joshuafolkken/kit#2778),
311
311
  `backlog:next` played forward wave by wave. Report it with the plan, never an order derived by hand.
312
312
  - **Then start the loop.** Whatever is still labelled is reported as parked and left standing; the
313
313
  run does not wait on it.
314
314
 
315
- **`needs-decision`, `run:solo` and `run:lane` are the workflow labels a run may apply, and none is
316
- `auto-ok` or `needs-human-review`.** Those two stay a person's alone (this file, `SKILL.md` → §2z); a
315
+ **`needs-decision`, `run:solo`, `run:lane` and `priority:high` are the workflow labels a run may
316
+ apply, and none is `auto-ok` or `needs-human-review`.** Those two stay a person's alone (this file, `SKILL.md` → §2z); a
317
317
  run parks with `needs-decision` and a person clears it.
318
318
 
319
319
  Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the plan and the decision pass come first"
@@ -331,7 +331,7 @@ returns the verdict with the issues to start. It stays both halves' contract sou
331
331
  *means* changes here.
332
332
 
333
333
  ```bash
334
- offer=$(pnpm josh backlog:offer --started "$started" --active "$active") # alias: josh blo
334
+ offer=$(pnpm josh backlog:offer --started "$started" --active "$active")
335
335
  offer=$(pnpm josh backlog:offer --started "$started" --active "$active" --exclude 1630,1631) # after #1630, #1631 merged
336
336
  ```
337
337
 
@@ -27,18 +27,9 @@ therefore runs exactly one epic's children and stops.
27
27
 
28
28
  ## Explicit invocation required (MANDATORY)
29
29
 
30
- **Never start a `backlogrun` unless the user has typed the keyword in the current turn's prompt.**
31
- This is the same rule the other entry points carry, at the same strength — `SKILL.md` → §0 is its
32
- single source, and `CLAUDE.md` → "Explicit invocation required (MANDATORY)" is where it stays resident
33
- so it binds on a turn where nothing here has been read. It matters more here than anywhere else,
34
- because this is the entry point with the widest authorization: a conversational "clear the backlog" is
35
- **not** an invocation, a confirmation question is no substitute for the keyword, and an earlier turn's
36
- authorization does not carry.
37
-
38
- **The keystroke starts the invocation; it does not have to land in every session that invocation
39
- spans.** A `backlogrun` cut mid-run and resumed is still that one invocation
40
- (`backlogrun-steps.md` → "The session cut is inside the invocation"). This reading covers `backlogrun`
41
- and it alone — a `fullrun` cut still waits for the keyword.
30
+ **Never start a `backlogrun` unless the user has typed the keyword in the current turn's prompt** —
31
+ `SKILL.md` → "0. The rule that fires before any of them — explicit invocation"; a cut and resumed run
32
+ is still that one invocation (`backlogrun-steps.md` → "The session cut is inside the invocation").
42
33
 
43
34
  ## The manifest — the ordered flow
44
35
 
@@ -35,8 +35,8 @@ Review results and successful pushes are never turn boundaries.
35
35
  **`pnpm josh followup` refuses the merge until the round is recorded**
36
36
  (`pnpm josh review:record --check --issue <N>`, joshuafolkken/kit#2343).
37
37
  5. **The clean path ships in one call** — with no second round due, background
38
- `pnpm josh ship "<title> #<N>" --body-file <evidence.md>`: gate → `git -y` → foreground `followup` → `run:tail`, stopping at the
39
- first failure (joshuafolkken/kit#2398). `--review` runs both rounds (#2489). **Else a due round 2
38
+ `pnpm josh ship "<title> #<N>" --body-file <evidence.md>`: PR preflight (#2946) → gate → `git -y` →
39
+ `followup` → `run:tail`, stopping at the first failure (#2398). `--review` runs both rounds (#2489). **Else a due round 2
40
40
  does not fit `ship`**: the PR opens between the rounds — background `pnpm josh git -y "<title> #<N>"`, round 2 beside CI, then
41
41
  `pnpm josh followup`.
42
42