@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,44 +1,34 @@
1
1
  # The observation filing procedure
2
2
 
3
- **Read when an observation turns up — not at the entry.** `SKILL.md` → §2's
4
- table points here for the rule itself: who is asked before a filing, the depth test, what the test
5
- turns away, and carrying the run on. This file is that rule, the depth table, the `issue:file` flags
6
- and what a delegated child does instead. **An observation the depth test turns away, and the kind of miss behind a
7
- user-reported bug, are recorded by `observation-ledger.md` — read it only then**, in the turn that
8
- appends.
9
-
10
- **An unattended run files without asking; an interactive session asks first.** Unattended is a session kit launched under `claude -p` (a lane child, a woken session), a dispatched
11
- lane child, or the `backlogrun` parent — nobody is there to answer, so an offer to file is sent back
12
- by the `Stop` hook. In an interactive session, propose the Issue and file it
13
- once the user confirms; the hook lets the offer through. A current-turn instruction to file, and a
14
- typed command whose own procedure files (a split, a prerequisite, an upstream interrupt), are that
15
- confirmation already.
3
+ **Read when an observation turns up — not at the entry.** `SKILL.md` → §2's table points here. **An
4
+ observation the depth test turns away, and the kind of miss behind a user-reported bug, are recorded by
5
+ `observation-ledger.md` — read it only then**, in the turn that appends.
6
+
7
+ **An unattended run files without asking; an interactive session asks first.** Unattended means a
8
+ `claude -p` session (a lane child, a woken session), a dispatched lane child, or the `backlogrun`
9
+ parent; the `Stop` hook sends an offer to file back. Interactively, propose the Issue and file it
10
+ once the user confirms. A current-turn instruction to file, or a typed command whose procedure files (a
11
+ split, a prerequisite, an upstream interrupt), is that confirmation already.
16
12
 
17
13
  **The trigger is the judgement, not the run's progress** — an ended run, a `kickoff` and a mid-talk
18
14
  turn all file or propose.
19
15
 
20
- **An unattended run that judges something worth filing files it, and does not ask.** An upstream defect stops the
21
- run, a split replaces it, and a prerequisite goes in front of it (`prerequisite.md`). An ordinary
22
- observation changes none of those: it carries no `route:` label, causes no stash or park, and the run
23
- continues. A first-party target is Tier A, decided by `pnpm josh repo:party`; a third-party target is
24
- Tier C (`CLAUDE.md`). Name what was filed in the completion report. An observation nobody would act
25
- on is dropped rather than filed.
16
+ **An unattended run that judges something worth filing files it, and does not ask.** An ordinary
17
+ observation carries no `route:` label, causes no stash or park, and the run continues (unlike an
18
+ upstream defect, a split or a prerequisite — `prerequisite.md`). First-party target: Tier A, by
19
+ `pnpm josh repo:party`; third-party: Tier C (`CLAUDE.md`). Name what was filed in the completion
20
+ report. Drop an observation nobody would act on.
26
21
 
27
22
  **Below the filing bar, a line that could still change a person's judgement is a board note**:
28
23
  `pnpm josh run:event --append note "#<N> <text>"`, shown by `pnpm josh run:board`
29
24
  (`docs/josh-commands-run.md` → "`josh run:board`").
30
25
 
31
- **The filing ceilings still apply.** Count this filing in the ten-Issue limit for the run. An
32
- observation is discretionary, so above the WIP cap in the target repository, close one first or do
33
- not file (`prompts/collaboration-workflow/wip-cap.md`). File it with `pnpm josh issue:file`
34
- (`issue-scout.md`), which lints the body against `prompts/collaboration-workflow/issue-template.md`,
35
- applies the classification labels it declares, runs the duplicate scan, and runs `epic:bundle` on the
36
- new Issue so it is offered by its epic; an `auto-ok` epic adds it to the backlog pool
37
- (`backlogrun-steps.md` → "What one invocation approves"). When it is the second filing of the run, the
38
- command asks the fold question itself and holds a `fold`
39
- (`split-assessment.md` → "The same two questions decide the filing-time fold").
40
-
41
- The marker suite pins the rules below.
26
+ **The filing ceilings still apply.** Count it in the run's ten-Issue limit; above the target
27
+ repository's WIP cap, close one first or do not file (`prompts/collaboration-workflow/wip-cap.md`).
28
+ File with `pnpm josh issue:file` (`issue-scout.md`): it lints the body, applies the classification
29
+ labels, scans for duplicates and runs `epic:bundle` (an `auto-ok` epic adds it to the backlog pool —
30
+ `backlogrun-steps.md` → "What one invocation approves"). On the second filing of the run it asks the fold
31
+ question and holds a `fold` (`split-assessment.md` → "The same two questions decide the filing-time fold").
42
32
 
43
33
  ### The depth test — a discretionary filing cites the product work it blocked
44
34
 
@@ -51,78 +41,44 @@ The marker suite pins the rules below.
51
41
  | **2** | What measures a run | `josh cost` and the run-timing report |
52
42
 
53
43
  **The depth is recorded on the Issue as a label, and the label is applied when the Issue is filed.**
54
- `depth:0`, `depth:1` and `depth:2` are the three, defined once in
55
- `scripts/issue/issue-labels.ts` and carrying no definition of their own — **the table above is the
56
- single source**, and a label description that paraphrased it would be a second copy of the rule.
57
- **Every filing route applies one**, this route and the other three of `prerequisite.md`'s table alike: a `new`
58
- entry point, a `route:tier-a` prerequisite, a `route:interrupt`, a split child and a review round
59
- cap's branch-2 filing all pass through a `pnpm josh issue:file` call, and the depth goes in it as
60
- `--depth <n>` beside whatever `--route` that call already carries.
44
+ `depth:0` / `depth:1` / `depth:2` are defined in `scripts/issue/issue-labels.ts` with no definition of
45
+ their own — **the table above is the single source**. **Every filing route applies one**: each route
46
+ of `prerequisite.md`'s table, a split child and a review branch-2 filing pass `--depth <n>` to
47
+ `pnpm josh issue:file`, beside any `--route`.
61
48
 
62
49
  ```bash
63
50
  pnpm josh issue:file "<title>" --body-file <body-file> --depth 1
64
51
  gh api repos/{owner}/{repo}/issues/<N>/labels -f 'labels[]=depth:1' # an Issue already filed
65
52
  ```
66
53
 
67
- **A repository missing the three gets them from `issue:file` itself** — it creates any missing
68
- workflow label, with the color and description `DEPTH_LABELS` in `scripts/issue/issue-labels.ts`
69
- defines, before the create call.
54
+ `issue:file` creates any missing workflow label from `DEPTH_LABELS` before the create call.
70
55
 
71
- - **It is read off the subject, exactly as the table is** — so applying it is not a judgement and not
72
- a person's to make, which is what separates it from `auto-ok` and `needs-human-review`. Those two
73
- decide what a run may do (`auto-ok` by `issue:file`'s judgement against the criteria —
74
- `backlogrun-steps.md` → "What one invocation approves"); this one records what an Issue is about
75
- and withholds nothing.
56
+ - **It is read off the subject, exactly as the table is** — not a judgement, unlike `auto-ok` and
57
+ `needs-human-review`; it withholds nothing.
76
58
  - **Applied at filing, not at completion.**
77
- - **An Issue carrying more than one counts as the lowest depth present**, the one closest to the
78
- consumer.
79
- - **An `epic` takes no depth label**, because it has no subject of its own to read one off — its
80
- children carry the subjects, and the share below excludes it from the denominator for that same
81
- reason.
82
-
83
- Rationale: `docs/maintainers/observation-filing-rationale.md` → "Why the depth label is applied at filing".
59
+ - **An Issue carrying more than one counts as the lowest depth present.**
60
+ - **An `epic` takes no depth label** and is excluded from the share's denominator.
84
61
 
85
62
  - **A discretionary observation at depth 1 or deeper is filed only where it can cite the depth-0 work
86
- it stopped or delayed** — named as an Issue number or a run, never as "this would slow runs down".
87
- **Cannot cite one, it is not filed**: it goes to the ledger (`observation-ledger.md`), and what files it later is
88
- either the blockage arriving or a second sighting of the same thing. Pull rather than push — the
89
- fix follows the jam or the repeat, never the lone sighting.
90
- - **A depth-0 observation does not take this test.** That is the product, and the two ceilings above
91
- stay its only limits.
92
- - **`route:tier-a` and `route:interrupt` do not take it either**, at any depth: a filing the run
93
- cannot proceed without is already citing its own blockage.
94
- - **A depth-2 filing — one whose subject is what measures a run — carries a further requirement, on
95
- top of the depth-0 citation above rather than in place of it.** A
96
- discretionary depth-2 filing states two things the depth-0 citation does not force:
97
- - **The decision the number would change, named** — the Issue number holding the choice it is
98
- waiting on, or a decision a person is about to make. "Slow", "large" and "worth knowing" are not a
99
- decision.
100
- - **Which way it tips** — what range of the number selects which choice. A number that selects the
101
- same action whatever it turns out to be changes no decision, and a filing that cannot write this
102
- line is describing one.
103
- - **Cannot write both, it is not filed** — the same exit the depth-0 gate takes: the ledger,
104
- pulled into an Issue by the jam arriving or the second sighting, never pushed by the lone idea.
105
- - **This narrows depth 2 alone, and the exemptions above carry over unchanged.** `route:tier-a` and
106
- `route:interrupt` do not take this requirement any more than they take the depth-0 citation, a
107
- depth-0 observation does not take it because it is the product, and a review round cap's branch-2
108
- filing (below) clears its own bar and never reaches this one.
109
-
110
- Rationale: `docs/maintainers/observation-filing-rationale.md` → "Why depth gates a discretionary filing".
111
-
112
- **It governs this route only — the fourth row of `prerequisite.md`'s table.** A review finding routed to branch 2
113
- of `prompts/review.md` → "Review round cap" is filed under that section's own bar — a confirmed
114
- defect reaching a runtime path, with a written failure scenario — and **does not take the depth
115
- test**: it has already cleared a bar this route has not, so gating it on a citation as well would
116
- drop the one kind of finding both documents agree is never dropped. **That bar is the reason, and the
117
- subject's depth is not.** Rationale: `docs/maintainers/observation-filing-rationale.md` → "Why a
118
- review branch-2 filing skips the depth test".
119
-
120
- **And a PR that *adds* a measurement names its reader in the same way.** The requirement above binds
121
- a depth-2 Issue that *proposes* a measurement; a pull request that *adds* one — a new report column,
122
- section, scope or subcommand, a diagnostic step — states in its body the reader that consumes it: the
123
- Issue number that read the value to decide something, or the path of the rule that reads it. **A
124
- measurement with no reader is not added.** `route:tier-a` and
125
- `route:interrupt` carry over unchanged.
63
+ it stopped or delayed** — an Issue number or a run, never "this would slow runs down". **Cannot cite
64
+ one, it is not filed**: it goes to the ledger (`observation-ledger.md`); the blockage arriving or a
65
+ second sighting files it later.
66
+ - **A depth-0 observation does not take this test**; the two ceilings are its only limits.
67
+ - **`route:tier-a` and `route:interrupt` do not take it either**, at any depth.
68
+ - **A depth-2 filing also states, on top of the depth-0 citation:**
69
+ - **The decision the number would change, named** — the Issue holding the choice, or a decision a
70
+ person is about to make. "Slow", "large" and "worth knowing" are not a decision.
71
+ - **Which way it tips** — what range of the number selects which choice.
72
+ - **Cannot write both, it is not filed** — it goes to the ledger.
73
+ - **This narrows depth 2 alone, and the exemptions above carry over unchanged.**
74
+
75
+ **It governs this route only — the fourth row of `prerequisite.md`'s table.** A review finding routed
76
+ to branch 2 of `prompts/review.md` → "Review round cap" is filed under that section's own bar and
77
+ **does not take the depth test**. **That bar is the reason, and the subject's depth is not.**
78
+
79
+ **And a PR that *adds* a measurement names its reader in the same way** — the Issue that read the value
80
+ to decide something, or the path of the rule that reads it. **A measurement with no reader is not
81
+ added.** `route:tier-a` and `route:interrupt` carry over unchanged.
126
82
 
127
83
  ### The depth-0 share — what is counted
128
84
 
@@ -131,38 +87,23 @@ measurement with no reader is not added.** `route:tier-a` and
131
87
  **The denominator is a rule, not a choice, and this is it:**
132
88
 
133
89
  - **Counted: every open Issue that does not carry `epic`.**
134
- - **`route:tier-a` and `route:interrupt` are counted like anything else.** The depth test above
135
- exempts them from its *citation* requirement; it never said they are not work.
90
+ - **`route:tier-a` and `route:interrupt` are counted like anything else.**
136
91
  - **An Issue with no depth label is in the denominator**, counted separately as `unlabelled`.
137
92
  - **The numerator is what is left**: open, non-epic Issues carrying `depth:0`.
138
93
 
139
- **Two readings of the same backlog give the same number**: nothing in the count is left to the
140
- counter's judgement.
141
-
142
- Rationale: `docs/maintainers/observation-filing-rationale.md` → "Why the depth-0 denominator is fixed".
94
+ **Two readings of the same backlog give the same number.**
143
95
 
144
- **What the number is for is not decided here.** Changing what `backlog:next` offers on the strength
145
- of it, and setting a target value, are both out of scope until the current value has
146
- been measured the same way more than once.
96
+ **What the number is for is not decided here** — no `backlog:next` change and no target value until it
97
+ has been measured the same way more than once.
147
98
 
148
99
  ### A delegated child does not take this route
149
100
 
150
- **A delegated child files `route:tier-a` and `route:interrupt` only.** Its discretionary
151
- observations are not filed by the child at all: they go back in the summary's "Observations that
152
- could bite later" line (`backlogrun-child.md` → "What the summary carries, and how long it may be"), and the
153
- parent files what survives — under the depth test above, and inside the run's ceiling.
101
+ **A delegated child files `route:tier-a` and `route:interrupt` only.** Its discretionary observations
102
+ go in the summary's "Observations that could bite later" line (`backlogrun-child.md` → "What the
103
+ summary carries, and how long it may be"); the parent files what survives the depth test, inside the
104
+ run's ceiling.
154
105
 
155
106
  **A delegated child does not append to the ledger either — the parent collapses the duplicates and
156
- appends what is left.** The child's only route is the summary's "Observations that could bite later"
157
- line; the parent chooses the key, checks the count and writes the line. **The 10-per-run ceiling for this route is the parent's to
158
- count.** **Lines its own `review:record` and `measure:rerun` write are not this route** — they go to
159
- its issue's file in its lane (`observation-ledger.md` → "The ledger — where an observation that
160
- cannot cite a blockage goes").
161
-
162
- Rationale: `docs/maintainers/observation-filing-rationale.md` → "Why a delegated child neither files
163
- nor appends".
164
-
165
- **This file is the single source of every procedure above**, and `SKILL.md` → §2's table carries the
166
- trigger of the rule they carry out; nothing under `prompts/collaboration-workflow/` restates either.
167
-
168
- Provenance: `docs/maintainers/observation-filing-rationale.md` → "Where each rule came from".
107
+ appends what is left.** **The 10-per-run ceiling for this route is the parent's to count.** **Lines
108
+ its own `review:record` and `measure:rerun` write are not this route** — they go to its issue's file in
109
+ its lane (`observation-ledger.md` → "The ledger — where an observation that cannot cite a blockage goes").
@@ -2,38 +2,22 @@
2
2
 
3
3
  **Read only when the depth test in `observation-filing.md` turns an observation away, or a user
4
4
  reports a bug** (its kind of miss, below), in the turn that appends the line.
5
- A run that files outright, or finds nothing, never reads it. This file is the single source of the ledger's grammar, its commit path and the
6
- second-sighting promotion. Provenance: `docs/maintainers/observation-ledger-rationale.md` → "Where
7
- each rule came from".
8
5
 
9
6
  ## The ledger — where an observation that cannot cite a blockage goes
10
7
 
11
8
  **An observation the depth test turns away is recorded in the ledger, not discarded.**
12
- Rationale: `docs/maintainers/observation-ledger-rationale.md` → "Why the
13
- ledger exists".
14
-
15
- - **The destination is the `.josh/observations/` directory in the repository the
16
- observation is about** — the same repository the Issue would have been filed into — **one file per
17
- issue**: append to `<N>.md` for the issue the run is executing (the number
18
- its branch leads with, a lane's included), or to `<YYYY-MM-DD>.md` for a line written on the
19
- default branch outside any issue's run. Parallel lanes therefore write different files, and their
20
- pull requests never conflict on the ledger. **The count and the append are both run in that
21
- repository's checkout** — in this repository, the work tree the run is in, a lane's inside a lane —
22
- resolved the way `target-repository.md` resolves any cross-repository target, and the
23
- directory is created on the first append where that repository has none. **The subject decides, never the
24
- working directory**: an observation about this package's own orchestration, seen while a run is
25
- inside a repository that consumes it, is recorded here rather than there — the append follows the
26
- subject, never the working directory. **A third-party target gets no line either** — Tier C covers
27
- the ledger exactly as it covers the Issue that would otherwise have been filed there.
28
- - **It is append-only.** A line is never edited and never deleted, because the count of lines
29
- carrying one key is what says whether an observation has recurred; a second sighting is a second
30
- line, not a rewrite of the first. **A merge conflict in it is resolved by keeping both sides** —
31
- one file per issue should keep it from arising, but a repeated key is the whole signal, so
32
- dropping either side destroys exactly what the ledger is for.
33
- - **The completion report keeps its line too.** The ledger is what the next run can read; the report
34
- is what this run's reader sees. Neither replaces the other.
35
- - **The append is not the end of it** — a line only becomes readable to anyone else once it has
36
- merged, and "The commit path" below is how it gets there.
9
+
10
+ - **The destination is the `.josh/observations/` directory in the repository the observation is
11
+ about**, **one file per issue**: `<N>.md` for the issue the run is executing (its branch's number,
12
+ a lane's included), or `<YYYY-MM-DD>.md` on the default branch outside any issue's run. **The count
13
+ and the append are both run in that repository's checkout** (resolved as `target-repository.md`
14
+ resolves a target). **The subject decides, never the working directory.** **A third-party target
15
+ gets no line either** (Tier C).
16
+ - **It is append-only.** Never edit or delete a line; a second sighting is a second line. **A merge
17
+ conflict in it is resolved by keeping both sides.**
18
+ - **The completion report keeps its line too.**
19
+ - **The append is not the end of it** — → "The commit path — how an appended line reaches the
20
+ default branch" below.
37
21
 
38
22
  **One observation is one line: five fields, each separated from the next by a vertical bar with one
39
23
  space on either side.**
@@ -44,118 +28,74 @@ space on either side.**
44
28
 
45
29
  | Field | What it holds |
46
30
  | -------------- | ------------------------------------------------------------------------------------------------------------------------- |
47
- | `k:<slug>` | The identity key — lowercase letters and digits, in words joined by `-`. This is what makes a repeat machine-readable |
48
- | `d<n>` | The depth of the subject — `d1`, `d2`, or whatever deeper depth `observation-filing.md`'s depth table may one day name. **There is no `d0` line**: a depth-0 observation is filed outright and never reaches the ledger |
31
+ | `k:<slug>` | The identity key — lowercase letters and digits, in words joined by `-` |
32
+ | `d<n>` | The depth of the subject — `d1`, `d2`, or deeper. **There is no `d0` line**: depth 0 is filed outright |
49
33
  | `<YYYY-MM-DD>` | The date of **this** sighting |
50
34
  | `<where>` | One file path or one command — where the thing was seen |
51
35
  | `<what>` | The phenomenon, one sentence, carrying no vertical bar of its own |
52
36
 
53
- A sample, in the shape a real entry takes:
54
-
55
37
  ```
56
38
  - k:example | d1 | 2026-09-10 | pnpm josh run:progress | The report printed a fill-in placeholder where a clock time belonged
57
39
  ```
58
40
 
59
- **`k:example` is reserved for this sample and is never used by a real observation**, so the count
60
- below can be run over the whole ledger without the sample answering for one. **The grammar is defined
61
- here rather than in the ledger** (`docs/maintainers/observation-ledger-rationale.md` → "Why the
62
- ledger exists").
41
+ **`k:example` is reserved for this sample and is never used by a real observation.**
63
42
 
64
43
  **The identity key is the whole of the repeat test — never a similarity judgement about the prose.**
65
- Choose the key from the phenomenon rather than from the run, then record the sighting with one
66
- command — it counts what the ledger already holds for the key, appends the line and prints the
67
- verdict:
44
+ Choose it from the phenomenon, not the run, and record with one command:
68
45
 
69
46
  ```bash
70
47
  pnpm josh observation:record <slug> d<n> '<where>' '<what>' [--checkout <that repository's checkout>]
71
48
  ```
72
49
 
73
- Standard output is one token: `file` (this is the second sighting — file it, below) or `ledger` (the
74
- line is the record, nothing to file); standard error lists the earlier sightings and the file
75
- appended to. A line that breaks the grammar, or uses `k:example`, is refused with exit 1 and nothing
76
- appended. **Every
77
- file of the directory is counted**, in the named checkout rather than the working directory, because
78
- a recurrence is a recurrence whichever issue's file each sighting sits in; a missing directory is a
79
- first sighting, and the append creates it.
80
-
81
- Free-text comparison is what the key exists to replace, so two lines that read alike under different
82
- keys are two observations, and a mis-keyed entry is corrected by appending a correctly-keyed line
83
- rather than by editing the one already written.
50
+ Standard output is one token: `file` (second sighting — file it, below) or `ledger` (nothing to file);
51
+ standard error lists earlier sightings and the file appended to. A broken line, or `k:example`, exits
52
+ 1 with nothing appended. **Every file of the directory is counted**, in the named checkout. A
53
+ mis-keyed entry is corrected by appending a correctly-keyed line.
84
54
 
85
- **The depth gate is not withdrawn, and this is not a way around it.** An observation that *can* cite
86
- the depth-0 work it stopped is filed exactly as it was before — this route is only for the ones that
87
- could not.
55
+ **The depth gate is not withdrawn, and this is not a way around it** — an observation that *can* cite
56
+ blocked depth-0 work is filed as before.
88
57
 
89
58
  ## The commit path — how an appended line reaches the default branch
90
59
 
91
- **An append nobody commits is an append nobody can count.** Rationale:
92
- `docs/maintainers/observation-ledger-rationale.md` → "Why the ledger has a commit path".
93
-
94
- - **A run's appended lines ride its own commit.** `pnpm josh git` stages
95
- `.josh/observations/` with the run's other changes, in the one staging step every entry
96
- point goes through (`scripts/git/git-staging.ts`), so the lines are reviewed and merged with the
97
- pull request of the run that recorded them, and the run's CI is the only wait they cost.
98
- **Record before the commit, not after the merge:** a finding recorded with `pnpm josh review:record`
99
- before `pnpm josh git -y` is carried; the time while CI runs is for the records that need no CI
100
- result — filing an observation Issue, drafting the completion report.
101
- - **A line that breaks the grammar is not carried.** The staging step parses
102
- every file of the ledger first — after moving lines still on an old single-file path — and on a broken line leaves the ledger out of the
103
- commit and says so; the commit itself goes ahead.
60
+ **An append nobody commits is an append nobody can count.**
61
+
62
+ - **A run's appended lines ride its own commit** — `pnpm josh git` stages `.josh/observations/`
63
+ (`scripts/git/git-staging.ts`). **Record before the commit, not after the merge:** a finding recorded
64
+ with `pnpm josh review:record` before `pnpm josh git -y` is carried.
65
+ - **A line that breaks the grammar is not carried** — the ledger is left out of the commit, which
66
+ goes ahead.
104
67
  - **A review round that passes after the pull request opened is recorded on the Issue, not in the
105
- ledger** — `pnpm josh review:record --issue <N> --comment` posts the same `- rf:` lines as a comment
106
- and appends nothing. That round reads only, so no commit of the run's follows it; a line in the tree
107
- would be pushed onto the open pull request and its CI would start over. `pnpm josh ship --review`
108
- does this for a passing round 2. **A round 2 that blocks records in the tree as before** — the fix it
109
- stops for is pushed anyway and carries the lines. Once the Issue is closed, the next round recorded
110
- to the ledger carries the comment's lines into `<N>-comment-rounds.md` with its own commit, so
111
- `pnpm josh review:findings` and the retrospective count them (`review-comment-round.ts`).
68
+ ledger** — `pnpm josh review:record --issue <N> --comment` (`pnpm josh ship --review` does this for a
69
+ passing round 2), so CI does not restart. **A round 2 that blocks records in the tree as before.**
70
+ Once the Issue closes, the next ledger round carries the comment's lines into
71
+ `<N>-comment-rounds.md` (`review-comment-round.ts`).
112
72
  - **`pnpm josh followup` commits any other line appended after the run's commit onto the pull request,
113
- before the merge** — the residual path, for an observation recorded between the commit and the
114
- merge. After the merge gates and before the CI wait, `followup` reads the tree and, **only when the
115
- ledger holds a pending append**, stages the ledger paths alone, commits them and pushes the branch;
116
- that push restarts the pull request's CI, and the wait that follows covers it. A broken line refuses
117
- the merge, because the line would otherwise be lost with the branch. A run whose lines rode its
118
- commit pays nothing.
119
- - **A lane carries its own lines, in its own pull request.** Its writers
120
- append to its own tree's `<N>.md`, so the two steps above take them to the default branch exactly as
121
- they do for a run in the primary checkout. **Nothing is held in the primary checkout for later.**
122
- - **`pnpm josh observations:flush` is left for a line written outside any issue's run** — the
123
- date-named file a retrospective or a hand append on the default branch writes. It stages the ledger
124
- and nothing else, commits it on a branch of its own, opens a docs-only pull request, waits on the
125
- same required checks every other pull request waits on, merges it and returns the checkout to the
126
- default branch; a single run's `run:tail` runs it after the merge. It refuses off the default branch
127
- and refuses a working tree holding anything besides the ledger, so a run in progress cannot be
128
- flushed out from under. **Nothing is committed to the default branch directly.**
129
- - **Nothing to flush is an answer, not a failure.** With the ledger matching the commit it sits on
130
- the command prints `clean` and exits 0.
73
+ before the merge** — only when the ledger holds a pending append; a broken line refuses the merge.
74
+ - **A lane carries its own lines, in its own pull request.**
75
+ **Nothing is held in the primary checkout for later.**
76
+ - **`pnpm josh observations:flush` is left for a line written outside any issue's run**: it commits the
77
+ ledger alone on its own branch, opens a docs-only pull request, waits on the required checks, merges
78
+ and returns to the default branch (a single run's `run:tail` runs it). It refuses off the default
79
+ branch or with anything besides the ledger in the tree. **Nothing is committed to the default branch
80
+ directly.**
81
+ - **Nothing to flush is an answer, not a failure** — `clean`, exit 0.
131
82
  - **The count the promotion below reads is a count of the default branch.**
132
83
 
133
84
  ## The second sighting is what files it
134
85
 
135
- **A repeat is the citation**, so the gate has a second way through, and it is counted rather than
136
- judged (rationale: `docs/maintainers/observation-ledger-rationale.md` → "Why a second sighting
137
- files"):
86
+ **A repeat is the citation** — counted, not judged:
138
87
 
139
88
  - **On `observation:record` answering `file`, the observation is filed**, at depth 1 or deeper, with
140
- no depth-0 citation. It answers `file` only when exactly one earlier sighting exists — a higher
141
- count means the Issue was already opened by the sighting before. The line is appended either way,
142
- because the ledger stays append-only.
143
- - **The Issue quotes the ledger's own dates — the first sighting's and this one's**, both on the
144
- command's standard error — so the reader can check the promotion against the file instead of
145
- taking the run's word for it.
146
- - **Both ceilings still apply**, exactly as `observation-filing.md` states them: the 10-per-run cap counts a promoted
147
- filing, and the WIP cap still bites, since a promoted observation blocks nothing and is therefore
148
- still discretionary.
149
-
150
- **A third and later sighting appends a line and files nothing more.** The Issue from the second one
151
- is already open, and `pnpm josh issue:scout` is what finds it; the extra lines are evidence for that
152
- Issue, not new ones.
89
+ no depth-0 citation (only when exactly one earlier sighting exists).
90
+ - **The Issue quotes the ledger's own dates — the first sighting's and this one's.**
91
+ - **Both ceilings still apply** (`observation-filing.md`): the 10-per-run cap and the WIP cap.
92
+
93
+ **A third and later sighting appends a line and files nothing more** — `pnpm josh issue:scout` finds
94
+ the open Issue.
153
95
 
154
96
  ## A user-found bug is recorded by its kind of miss (user-found)
155
97
 
156
98
  **A user-reported bug is fixed or filed as always; this records the *kind of miss* alongside so the
157
- category never recurs as a first sighting.** The key is the **category of
158
- oversight** — `k:missed-case-worktree` — so a second bug of the same kind counts against the first.
159
- **Depth `d1`, never `d0`**: the *kind of miss* is what a run fails to enumerate, which the table puts
160
- at depth 1. Nothing else changes; the `<what>` field leads with `User-reported:`, and no second
161
- ledger, format or threshold is added.
99
+ category never recurs as a first sighting.** The key is the **category of oversight** —
100
+ `k:missed-case-worktree`. **Depth `d1`, never `d0`**. The `<what>` field leads with `User-reported:`;
101
+ nothing else changes.