@joshuafolkken/kit 1.1128.0 → 1.1166.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 (192) hide show
  1. package/.claude/agents/investigator.md +17 -0
  2. package/.claude/settings.json +5 -4
  3. package/.claude/skills/epic-commands/SKILL.md +27 -239
  4. package/.claude/skills/epic-commands/epic-bundle.md +115 -0
  5. package/.claude/skills/epic-commands/execution-waves.md +126 -0
  6. package/.claude/skills/workflow-commands/SKILL.md +48 -194
  7. package/.claude/skills/workflow-commands/background-commands.md +1 -1
  8. package/.claude/skills/workflow-commands/backlogrun-child.md +12 -123
  9. package/.claude/skills/workflow-commands/backlogrun-lanes.md +11 -60
  10. package/.claude/skills/workflow-commands/backlogrun-park.md +10 -8
  11. package/.claude/skills/workflow-commands/backlogrun-progress.md +19 -175
  12. package/.claude/skills/workflow-commands/backlogrun-recovery.md +155 -0
  13. package/.claude/skills/workflow-commands/backlogrun-steps.md +64 -144
  14. package/.claude/skills/workflow-commands/backlogrun.md +5 -4
  15. package/.claude/skills/workflow-commands/chain-rule.md +3 -2
  16. package/.claude/skills/workflow-commands/delegation.md +7 -3
  17. package/.claude/skills/workflow-commands/entry-sequence.md +62 -0
  18. package/.claude/skills/workflow-commands/followup.md +104 -181
  19. package/.claude/skills/workflow-commands/fullrun-steps.md +8 -9
  20. package/.claude/skills/workflow-commands/fullrun.md +16 -73
  21. package/.claude/skills/workflow-commands/halfrun.md +10 -36
  22. package/.claude/skills/workflow-commands/into-target.md +4 -4
  23. package/.claude/skills/workflow-commands/issue-comments.md +7 -8
  24. package/.claude/skills/workflow-commands/issue-scout.md +6 -6
  25. package/.claude/skills/workflow-commands/kickoff.md +6 -6
  26. package/.claude/skills/workflow-commands/needs-human-review.md +6 -6
  27. package/.claude/skills/workflow-commands/observation-filing.md +21 -172
  28. package/.claude/skills/workflow-commands/observation-ledger.md +150 -0
  29. package/.claude/skills/workflow-commands/pre-gate-cut.md +33 -93
  30. package/.claude/skills/workflow-commands/prerequisite.md +6 -6
  31. package/.claude/skills/workflow-commands/progress-watcher.md +90 -0
  32. package/.claude/skills/workflow-commands/prrun.md +5 -5
  33. package/.claude/skills/workflow-commands/retrospective.md +9 -9
  34. package/.claude/skills/workflow-commands/split-assessment.md +2 -2
  35. package/.claude/skills/workflow-commands/target-repository.md +2 -2
  36. package/.claude/skills/workflow-commands/working-tree-hold.md +7 -5
  37. package/.codex/hooks.json +4 -4
  38. package/AGENTS.md +1 -6
  39. package/CLAUDE.md +58 -120
  40. package/GEMINI.md +1 -6
  41. package/SECURITY.md +1 -0
  42. package/dist/CLAUDE.md +58 -120
  43. package/dist/hooks/batch-guard.js +4 -4
  44. package/dist/hooks/{chunk-MKVGBQPA.js → chunk-5KTCMCOT.js} +14 -1
  45. package/dist/hooks/{chunk-NXYMNPUQ.js → chunk-A6P7PN7P.js} +59 -21
  46. package/dist/hooks/{chunk-77J7IEQM.js → chunk-ANJ2WGFD.js} +1 -1
  47. package/dist/hooks/{chunk-4JZDP5X5.js → chunk-DYAVAM6S.js} +572 -127
  48. package/dist/hooks/{chunk-7HVB7SZG.js → chunk-ENA7P5FB.js} +4 -4
  49. package/dist/hooks/{chunk-M7QKEKWO.js → chunk-GU5MATVE.js} +214 -85
  50. package/dist/hooks/chunk-GYNGP7HI.js +56 -0
  51. package/dist/hooks/{chunk-5SD2YM7Z.js → chunk-URJA6XY4.js} +4 -4
  52. package/dist/hooks/{chunk-XYUIQOW3.js → chunk-V2BTOZHT.js} +6 -4
  53. package/dist/hooks/{chunk-AIOIOMPX.js → chunk-ZDZ555YH.js} +225 -78
  54. package/dist/hooks/codex-hook-adapter.js +10 -10
  55. package/dist/hooks/duplicate-read-guard.js +5 -5
  56. package/dist/hooks/format-edited.js +2 -2
  57. package/dist/hooks/inputs.json +186 -184
  58. package/dist/hooks/investigation-guard.js +5 -5
  59. package/dist/hooks/pretool-guard.js +11 -10
  60. package/dist/hooks/stop-guard.js +5 -5
  61. package/dist/josh.js +33 -3
  62. package/dist/version/index.js +5 -1
  63. package/package.json +7 -4
  64. package/prompts/collaboration-workflow/file-edits.md +11 -10
  65. package/prompts/collaboration-workflow/gh-rest.md +2 -4
  66. package/prompts/collaboration-workflow/glossary.md +1 -1
  67. package/prompts/collaboration-workflow/issue-citation.md +5 -9
  68. package/prompts/collaboration-workflow/issue-template.md +40 -115
  69. package/prompts/collaboration-workflow/operating-rules.md +4 -5
  70. package/prompts/collaboration-workflow/output-bounds.md +12 -78
  71. package/prompts/collaboration-workflow/overview.md +7 -13
  72. package/prompts/collaboration-workflow/plan-comment.md +11 -39
  73. package/prompts/collaboration-workflow/principles.md +3 -4
  74. package/prompts/collaboration-workflow/report-format.md +28 -74
  75. package/prompts/collaboration-workflow/residency.md +12 -109
  76. package/prompts/collaboration-workflow/rule-delivery.md +98 -97
  77. package/prompts/collaboration-workflow/shell-body.md +3 -13
  78. package/prompts/collaboration-workflow/turn-batching.md +14 -88
  79. package/prompts/collaboration-workflow/upstream-interrupt.md +12 -14
  80. package/prompts/collaboration-workflow/wip-cap.md +6 -45
  81. package/prompts/collaboration-workflow.md +1 -13
  82. package/prompts/review-rubric.md +8 -71
  83. package/prompts/review.md +25 -55
  84. package/prompts/testing-guide.md +18 -67
  85. package/scripts/agent/agent-role-profile.ts +1 -1
  86. package/scripts/agent/codex-hooks.ts +3 -12
  87. package/scripts/backlog/backlog-budget.ts +1 -1
  88. package/scripts/backlog/backlog-drive-cli.ts +4 -3
  89. package/scripts/backlog/backlog-drive-offer-argv.ts +10 -1
  90. package/scripts/backlog/backlog-offer.ts +6 -6
  91. package/scripts/behavior/behavior-rules.ts +11 -4
  92. package/scripts/delegation/delegation-policy.ts +9 -1
  93. package/scripts/delegation/investigation-guard.ts +1 -1
  94. package/scripts/delegation/investigation-reads.ts +109 -23
  95. package/scripts/discovery/repo-discovery.ts +21 -7
  96. package/scripts/discovery/repo-origin.ts +26 -0
  97. package/scripts/discovery/repo-party.ts +42 -1
  98. package/scripts/document/backlogrun-parent-read-set.ts +14 -15
  99. package/scripts/document/capped-print.ts +74 -0
  100. package/scripts/document/document-byte-budget.ts +34 -20
  101. package/scripts/document/document-section-cli.ts +4 -3
  102. package/scripts/document/entry-read-budget.ts +21 -9
  103. package/scripts/document/lane-child-read-set.ts +12 -14
  104. package/scripts/document/read-set-cli.ts +4 -4
  105. package/scripts/document/read-set-point-of-use.ts +10 -2
  106. package/scripts/document/resident-budget.ts +47 -0
  107. package/scripts/epic/epic-shape.ts +10 -13
  108. package/scripts/epic/epic-solo.ts +1 -1
  109. package/scripts/exports/unused-members-cli.ts +7 -3
  110. package/scripts/gate/scoped-green.ts +25 -14
  111. package/scripts/gh/git-gh-api-path.ts +7 -0
  112. package/scripts/hooks/pretool-guard-cli.ts +2 -2
  113. package/scripts/hooks/pretool-guard.ts +45 -2
  114. package/scripts/hooks/run-hook.sh +41 -0
  115. package/scripts/init/claude-kit-only-settings.ts +29 -0
  116. package/scripts/init/hook-command-rewrite.ts +18 -35
  117. package/scripts/init/hook-launch.ts +21 -32
  118. package/scripts/init/init-copy-content.ts +8 -2
  119. package/scripts/init/initial-commit.ts +24 -0
  120. package/scripts/init/start-exec.ts +16 -3
  121. package/scripts/init/start-steps.ts +8 -12
  122. package/scripts/issue/issue-auto-ok.ts +95 -0
  123. package/scripts/issue/issue-file-cli.ts +53 -7
  124. package/scripts/issue/issue-file.ts +28 -5
  125. package/scripts/issue/issue-labels.ts +12 -12
  126. package/scripts/issue/issue-rank.ts +1 -1
  127. package/scripts/issue/issue-read-cli.ts +4 -3
  128. package/scripts/issue/issue-read.ts +2 -2
  129. package/scripts/issue/issue-report-failures.ts +6 -2
  130. package/scripts/issue/issue-scout-cli.ts +2 -2
  131. package/scripts/issue/issue-state-cli.ts +2 -2
  132. package/scripts/issue/issue-state.ts +2 -2
  133. package/scripts/issue/issue-wip.ts +70 -0
  134. package/scripts/josh/hook-decision.ts +17 -0
  135. package/scripts/josh/josh-commands-development.ts +10 -0
  136. package/scripts/josh/josh-commands-issue.ts +2 -2
  137. package/scripts/josh/josh-commands-lane.ts +1 -1
  138. package/scripts/josh/josh-commands-project.ts +7 -0
  139. package/scripts/lane/lane-await.ts +46 -2
  140. package/scripts/lane/lane-cli.ts +11 -13
  141. package/scripts/lines/bytes-command.ts +29 -6
  142. package/scripts/observations/observation-ledger-line.ts +1 -1
  143. package/scripts/release/github-release-environment.ts +1 -0
  144. package/scripts/release/github-release.ts +103 -17
  145. package/scripts/release/release-progress.ts +167 -0
  146. package/scripts/release/release-publish.ts +19 -8
  147. package/scripts/release/release-tag.ts +22 -8
  148. package/scripts/rules/decision-oracle-stage.ts +1 -1
  149. package/scripts/rules/decision-oracle.ts +6 -6
  150. package/scripts/rules/delivered-rules.ts +11 -11
  151. package/scripts/rules/direct-pr-create.ts +110 -0
  152. package/scripts/rules/file-body.ts +98 -42
  153. package/scripts/rules/filing-cap.ts +2 -2
  154. package/scripts/rules/filing-offer.ts +1 -1
  155. package/scripts/rules/gh-api.ts +18 -1
  156. package/scripts/rules/implementation-cut.ts +3 -1
  157. package/scripts/rules/lane-background.ts +67 -10
  158. package/scripts/rules/permission-guards.ts +10 -2
  159. package/scripts/rules/stop-rules.ts +4 -4
  160. package/scripts/rules/test-declared-commit.ts +1 -1
  161. package/scripts/rules/third-party-write.ts +56 -12
  162. package/scripts/run/run-carry-cli.ts +3 -1
  163. package/scripts/run/run-carry-conversation.ts +94 -0
  164. package/scripts/run/run-carry-reclaim.ts +37 -0
  165. package/scripts/run/run-carry.ts +21 -5
  166. package/scripts/run/run-cut-handoff.ts +21 -1
  167. package/scripts/run/run-entry-cli.ts +11 -3
  168. package/scripts/run/run-hold-cli.ts +16 -2
  169. package/scripts/run/run-label.ts +50 -0
  170. package/scripts/run/run-merge-steps.ts +12 -4
  171. package/scripts/run/run-merge.ts +1 -1
  172. package/scripts/run/run-prep-cli.ts +6 -2
  173. package/scripts/run/run-prep.ts +17 -0
  174. package/scripts/run/run-ship-preflight.ts +34 -3
  175. package/scripts/run/run-ship-review-steps.ts +1 -1
  176. package/scripts/run/run-ship-review.ts +26 -5
  177. package/scripts/run/run-step-cli.ts +20 -7
  178. package/scripts/run/run-wake-driver.ts +24 -1
  179. package/scripts/run/run-wake-session.ts +2 -1
  180. package/scripts/test/test-declared-logic.ts +1 -1
  181. package/scripts/test/test-related.ts +1 -6
  182. package/scripts/test/test-unit-guard.ts +21 -7
  183. package/scripts/time-runtime/time-batch-guard.ts +52 -16
  184. package/scripts/time-runtime/time-density-hook.ts +20 -2
  185. package/scripts/time-runtime/time-density.ts +4 -3
  186. package/scripts/time-runtime/time-markers.ts +15 -4
  187. package/scripts/time-runtime/time-spans.ts +4 -0
  188. package/scripts/version/npm-registry.ts +11 -1
  189. package/templates/workflows/ci.yml +9 -1
  190. package/templates/workflows/github-release.yml +13 -25
  191. package/.claude/skills/workflow-commands/followup-reference.md +0 -118
  192. package/dist/hooks/chunk-QVLT52OV.js +0 -464
@@ -12,7 +12,7 @@ restating any of it.
12
12
  **One `backlogrun` approves every merge of every issue `pnpm josh backlog:next` offers** — the issues
13
13
  carrying `auto-ok`, every child of an epic whose root carries it, **and an issue this run filed, once
14
14
  it has become such a child**. A filing is placed into an epic by `pnpm josh epic:bundle`, which
15
- `prompts/review.md` → "Review round cap" and `SKILL.md` → §2i both make **Tier A rather than
15
+ `prompts/review.md` → "Review round cap" and `observation-filing.md` both make **Tier A rather than
16
16
  optional**; where that epic's root carries `auto-ok`, the child is offered from the next ask onwards
17
17
  without anybody having labelled it.
18
18
 
@@ -24,23 +24,26 @@ bounds it instead is "The brake that replaces the promise" below.
24
24
  epic"** — what runs is stated by the keyword and its arguments, never inferred from the shape of a
25
25
  request.
26
26
 
27
- **Which issues may be opted in stays a person's decision.** `auto-ok` is applied only by a person —
28
- this file is that rule's single source. **Which ones carry the label, a person; in what order and how
29
- many at once, the run.** An issue the run files and bundles into an already opted-in epic is offered
30
- from the next ask onwards, and the brake below bounds that quantity rather than the membership.
27
+ **An issue found by opted-in work is opted in by default** (joshuafolkken/kit#3213) — this file is
28
+ that rule's single source, and `pnpm josh issue:file` computes it (`scripts/issue/issue-auto-ok.ts`),
29
+ printing `auto-ok: applied` or `auto-ok: not applied` with the reason. It applies `auto-ok` while a
30
+ `backlogrun` carry record is live, or when the issue the current branch names carries `auto-ok`,
31
+ and never on a `--repo` filing to another repository. **Pass `--no-auto-ok` only when the new issue needs a person's judgement** — a Tier B toss-up or a
32
+ Tier C action inside it; a choice with a clear recommendation is Tier A and does not qualify.
33
+ Outside those signals `auto-ok` stays a person's to apply. **Which ones carry the label, that rule;
34
+ in what order and how many at once, the run** — the brake below bounds the quantity, not the
35
+ membership.
31
36
 
32
- **The end-of-run retrospective is the one carve-out** (joshuafolkken/kit#2328): when a run drains its
33
- backlog, the retrospective files the improvements worth carrying into the next run and applies
34
- `auto-ok` to them. Its filings are counted against every brake in "The brake that replaces the
35
- promise" below with no exception, and a retrospective that judges nothing worth carrying files
36
- nothing. Every other filing route is unchanged: `auto-ok` stays a person's to apply.
37
+ The end-of-run retrospective is no longer a separate carve-out: it files
38
+ while the carry record is live, so the same default opts its filings in, counted against every brake
39
+ in "The brake that replaces the promise" below.
37
40
 
38
41
  A Tier C action inside a child still stops that child, exactly as it does for any batch child.
39
42
 
40
43
  **A named issue is approved by the keyword and its number, not by `auto-ok`** (joshuafolkken/kit#1984).
41
- `backlogrun #N1 #N2 …` runs those issues whether or not they carry the label. The pool that follows is
42
- unchanged: still `auto-ok`, still a person's to opt in. "Named issues run first, in order" below is the
43
- procedure.
44
+ `backlogrun #N1 #N2 …` runs those issues whether or not they carry the label. The pool that follows
45
+ is unchanged: still `auto-ok`, opted in as "Which ones carry the label" above says. "Named issues
46
+ run first, in order" below is the procedure.
44
47
 
45
48
  Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the authorization boundary is shaped this way"
46
49
 
@@ -53,23 +56,23 @@ inside the invocation" below):
53
56
  | --- | --- | --- |
54
57
  | `--max` | how many issues one invocation may merge — a run's own filing competes for that number rather than extending it | `run:carry --merged` |
55
58
  | `--idle`, and the 8-hour whole-run bound | how long one invocation may go on looking for more | the record's `started_at` |
56
- | **Ten filings per invocation** | how much one invocation may add to the pool at all, on **every** filing route (`SKILL.md` → §2d) | `run:carry --filed` |
59
+ | **Ten filings per invocation** | how much one invocation may add to the pool at all, on **every** filing route (`prerequisite.md`) | `run:carry --filed` |
57
60
  | The WIP cap on open issues | how large the pool may become, across invocations | `prompts/collaboration-workflow/wip-cap.md` |
58
61
 
59
62
  One invocation may add at most ten issues to the pool and merge at most `--max` of them, after which
60
63
  the run ends and the next one waits for a person to type the keyword.
61
64
 
62
- **Two filing routes are exempt from the depth test (`SKILL.md` → §2i), and the ten-filings ceiling
65
+ **Two filing routes are exempt from the depth test (`observation-filing.md`), and the ten-filings ceiling
63
66
  still covers them:**
64
67
 
65
- - **`route:tier-a` and `route:interrupt` stay exempt.** **Their number is still capped**: §2d's
68
+ - **`route:tier-a` and `route:interrupt` stay exempt.** **Their number is still capped**: `prerequisite.md`'s
66
69
  ten-filings ceiling is stated "at every entry point", and `run:carry --filed` counts it across
67
70
  session cuts.
68
71
  - **A review branch-2 filing stays exempt** — a confirmed defect reaching a runtime path, with a
69
72
  written failure scenario.
70
73
 
71
74
  **This section is the single source of how the `epic:bundle` obligation and this authorization
72
- boundary meet.** `SKILL.md` → §2i points here rather than restating it.
75
+ boundary meet.** `observation-filing.md` points here rather than restating it.
73
76
 
74
77
  ## Named issues run first, in order
75
78
 
@@ -95,7 +98,7 @@ issues it did not start. `backlog_named.after_failure` is the single source.
95
98
 
96
99
  - A named issue read back `CLOSED` — merged, or already `already-done` — is finished; continue with the
97
100
  next.
98
- - A **`needs-human-review`** named issue stops the whole run before its commit (`SKILL.md` → §2z),
101
+ - A **`needs-human-review`** named issue stops the whole run before its commit (`needs-human-review.md`),
99
102
  exactly as any child does — the named issues after it are not started and neither is the pool.
100
103
  - Everything else about running one — the verification gate, the hand-off, the guards — is
101
104
  this file's and is not restated here.
@@ -189,11 +192,11 @@ the maximum, the whole-run bound), or the consecutive-failure guard tripped —
189
192
  it clears the record; the reason is the stop verdict's, in the session language. A clean completion
190
193
  takes the bare `--end` and stays silent, having its own report; a parked _child_ is pushed by the child
191
194
  that parked it (`backlogrun-park.md`). Because `--end` removes the record, a re-run's second `--end`
192
- finds nothing and never re-sends that confirmation — `backlogrun-progress.md` →
195
+ finds nothing and never re-sends that confirmation — `progress-watcher.md` →
193
196
  "Progress while the run is quiet" is the single source of the pull-versus-push split.
194
197
 
195
- **The record widens nothing.** It carries a budget and nothing else: `auto-ok` is still applied only
196
- by a person. A pool grown across the cut by this run's own bundled filings is "What one invocation
198
+ **The record widens nothing but the default.** It carries a budget, and its being live is what
199
+ opts this run's filings in ("What one invocation approves"); no other label follows from it. A pool grown across the cut by this run's own bundled filings is "What one invocation
197
200
  approves", its ceiling counted from the record's `filed`.
198
201
 
199
202
  **Nothing waits for a person any more — `pnpm josh run:wake` supervises the driver**. After a cut or
@@ -215,7 +218,8 @@ owner prevents a second driver from taking it over. On `none`, `expired` or `unr
215
218
  person's**: the supervisor spends the declared budget and never declares another.
216
219
 
217
220
  **What may be run is untouched.** The driver takes named issues from the invocation and pool issues
218
- from the existing offer command. The supervisor writes no `auto-ok` label. A judgment session receives
221
+ from the existing offer command. The supervisor writes no label of its own; `auto-ok` arrives only
222
+ through `issue:file`'s default. A judgment session receives
219
223
  the original invocation plus the driver's reason and resume state.
220
224
  For a named epic, the driver hands off `epic #N` with the original invocation. The judgment session
221
225
  follows the named epic procedure and dispatches its children; the epic root is never launched as a
@@ -225,31 +229,9 @@ from the carry record's remaining named list, so the next driver pass can advanc
225
229
  also consults the carried maximum and whole-run bound
226
230
  before each launch, and a failed named issue skips the remaining named prefix.
227
231
 
228
- **A failure is visible rather than silent.** A judgment wake that never claims the carry record is retried, and
229
- once the retries are spent the supervisor stops and sends a `warning` Telegram; a carry record that
230
- expired or cannot be read ends it the same way. `none` — the run having finished — and a person's own
231
- `--stop` stay silent. Everything the supervisor starts writes to one log file per repository, named by
232
- `--list` and by every warning, so a silent exit stays diagnosable.
233
-
234
- **A person keeps control of it.** `pnpm josh run:wake --list` names the running supervisor and
235
- `--stop` ends it; the full contract, what it launches and why that is a constant rather than a
236
- setting are `docs/josh-commands-automation.md` → "`josh run:wake`".
237
-
238
- **Every unattended role runs with the provider selected from the invoking CLI and its own profile.**
239
- Codex sessions use OpenAI; Claude Code sessions use Anthropic. Anthropic uses scheduler
240
- `claude-opus-5-5`, worker `claude-opus-5-5` and reviewer `claude-opus-5-5`; OpenAI uses `gpt-6.1-sol`,
241
- with role efforts `medium`/`medium`/`high` (scheduler / worker / reviewer) for both. Role overrides
242
- resolve before launch; model overrides apply only to Claude Code, effort overrides to either provider,
243
- and legacy `JOSH_LANE_*` values to the worker only. Invalid configuration, a missing or conflicting
244
- session marker, or a missing, outdated or unauthenticated CLI refuses without fallback, promotion or
245
- worker retry. `run:wake --list`, `lane:list`, the review brief and each launch
246
- log expose the resolved provider, role, model and effort.
247
- `docs/josh-commands-automation.md` → "`josh lane:dispatch`" and `backlogrun-child.md` → "Each child runs in a
248
- delegated unit" are the single sources.
249
-
250
- **It relays progress from the existing report record.** The driver keeps the same `run:merge` event
251
- stream and `run:report` finish path; `pnpm josh run:wake --list` relays the latest line from that
252
- record. Telegram notifications retain their existing generation points (→ "It goes to the session only").
232
+ **A person keeps control of it** — `pnpm josh run:wake --list` names the running supervisor and `--stop`
233
+ ends it. Its failure warnings, log file, progress relay and the provider / model / effort each
234
+ unattended role runs with are `docs/josh-commands-automation.md` → "`josh run:wake`".
253
235
 
254
236
  **The completion report names how many sessions were woken beside the record's `cuts`** — one wake per
255
237
  cut is the invariant, and what counts is a carry record actually claimed, never a process started.
@@ -291,7 +273,7 @@ children are enumerated individually rather than summarized under their root. Re
291
273
  stop at a time.**
292
274
 
293
275
  - **Decide everything decidable from the issue itself.** Read the issue's body **and its comments**
294
- (`SKILL.md` → §2g), and where the answer is already there, record it as an Issue comment and
276
+ (`issue-comments.md`), and where the answer is already there, record it as an Issue comment and
295
277
  **remove the label** — `CLAUDE.md` → "Decision autonomy" already makes that Tier A. **Read them all in
296
278
  one `pnpm josh issue:read <N> <N> …` call**, not a `gh api` pair per issue.
297
279
  - **Never measure in order to decide.** A question needing a benchmark, a profile, or a run of the
@@ -301,8 +283,8 @@ stop at a time.**
301
283
  never the body.
302
284
  - **Order and isolate the pool in the same pass** (joshuafolkken/kit#2776), from the same
303
285
  `issue:read`: an issue that must land first (it builds what another reuses, or both edit one code
304
- path) becomes a native `blocked-by`; an issue meeting all three of the `wip-cap.md` → 「実行のしかた」
305
- conditions gets `run:solo`, **every other one `run:lane`**. Comment the reason; the offer commands enforce all
286
+ path) becomes a native `blocked-by`; an issue meeting all three of the `backlogrun-lanes.md` →
287
+ "Lanes — running more than one child at a time" conditions gets `run:solo`, **every other one `run:lane`**. Comment the reason; the offer commands enforce all
306
288
  three, answering `triage` while an issue has neither.
307
289
  - **`priority:high` puts an issue first** (joshuafolkken/kit#2928; ranking: `docs/josh-commands-automation.md` →
308
290
  `josh backlog:next`). Apply it only on a cited ground — a stated deadline or urgency, or a person's
@@ -313,96 +295,33 @@ stop at a time.**
313
295
  run does not wait on it.
314
296
 
315
297
  **`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
- run parks with `needs-decision` and a person clears it.
298
+ apply by hand, and none is `auto-ok` or `needs-human-review`.** `needs-human-review` stays a
299
+ person's alone (`needs-human-review.md`); `auto-ok` reaches only a run's own filing, through
300
+ `issue:file`'s default ("What one invocation approves"). A run parks with `needs-decision` and a
301
+ person clears it.
318
302
 
319
303
  Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the plan and the decision pass come first"
320
304
 
321
305
  ## The loop
322
306
 
323
- **The detached `run:wake` supervisor runs `backlog:drive`** after the carry record is handed off.
324
- Its driver keeps the loop below running without a parent AI turn. A returned judgment branch includes
325
- the first-line verdict, affected issue and `resume:` flags in the AI prompt; `stop` reports and ends
326
- inside the driver.
307
+ **The loop is computed, not walked by hand.** The `run:wake` supervisor runs `pnpm josh backlog:drive`,
308
+ whose head is `pnpm josh backlog:offer`: the answer-to-budget mapping, the retry count, the `--exclude`
309
+ feedback and the lane count are its own (`docs/josh-commands-automation.md` → "`josh backlog:offer`"
310
+ and "`josh backlog:drive`"). **An AI session reaches this section only when the driver hands a branch
311
+ back** — the `Driver result:` line names it, and the session acts on it, then hands the loop back with
312
+ `pnpm josh run:carry --cut --owner "$PPID"`:
327
313
 
328
- **The loop's head is one command — `pnpm josh backlog:offer`** (joshuafolkken/kit#2162). It runs
329
- `backlog:next`, maps its answer to the budget word the table below fixes, runs `backlog:budget`, and
330
- returns the verdict with the issues to start. It stays both halves' contract source: what an answer
331
- *means* changes here.
332
-
333
- ```bash
334
- offer=$(pnpm josh backlog:offer --started "$started" --active "$active")
335
- offer=$(pnpm josh backlog:offer --started "$started" --active "$active" --exclude 1630,1631) # after #1630, #1631 merged
336
- ```
314
+ | Handed back | What the session judges |
315
+ | --- | --- |
316
+ | `triage` | Label each issue stderr names `run:solo` or `run:lane` (with `blocked-by` where one must land first), as "Resolve what the plan can resolve" does; running children continue |
317
+ | `offer` | `backlog:offer` itself could not answer. Report what stderr printed; **never pick an issue by hand** |
318
+ | `launch #N` | A lane failed after it opened. Read the lane's log and park `#N` (`backlogrun-park.md` → "park and continue") |
319
+ | `merge [<token>] #N` | `run:merge` stopped on `environment`, `busy`, `retry` or `over`, or printed nothing: `environment` ends the run, the others re-read the child (`backlogrun-progress.md` → "Running a named epic's children") |
320
+ | `watch` | The backlog drained with nothing in flight; the retrospective is owed (`run:step`) |
321
+ | `window` | The driver's wait window ran out with nothing to judge; hand the loop back as is |
337
322
 
338
- **The first line of standard output is the budget verdict; on `run`, the issue numbers to start
339
- follow, one per line.** `backlog:offer` forwards `--exclude` and `--repo` to `backlog:next` and
340
- `--started` / `--active` / `--merged` / `--running` / `--max` / `--idle` to `backlog:budget`, computes
341
- `--answer` itself, and carries the consecutive-retry count on the last stderr line (`retries: <n>`) and
342
- in `--json`. **The verdict table is "The two budgets" below; the answer-to-word mapping it applies is
343
- this section's table.**
344
-
345
- **`backlog:next`'s output contract is `docs/josh-commands-automation.md` → "`josh backlog:next`", and four parts
346
- of it decide how the mapping is written:**
347
-
348
- 1. **Standard output is one token per line, and everything else is standard error.**
349
- 2. **The tokens are bare issue numbers, scoped to the repository the command runs in.** A runnable
350
- child in *another* repository is reported on standard error with its repository and checkout, and
351
- is never a token; this repository having no candidate of its own is answered `wait`. **So
352
- `backlogrun` takes no `owner/repo#N` token.** Report the other repository's candidates in the run
353
- summary and leave them to a session running there (`backlogrun-lanes.md` → "Concurrency").
354
- 3. **The verdict words are `wait`, `stop`, `triage`, `retry`, `error` and `none`** — `none` is
355
- `epic:next`'s `complete` under this command's spelling, and there is no `complete` here. **`retry`
356
- is the one with no `epic:next` counterpart**: it says GitHub did not answer.
357
- 4. **Exit code 0 covers all six verdicts, and 1 means the listing could not be read** — no answer at
358
- all. **`error` cannot be told apart by exit code, so read the token rather than the status.**
359
-
360
- **What the answer means is this table's; whether the run may act on it is `pnpm josh backlog:budget`'s**
361
- (joshuafolkken/kit#1632). The right-hand column ends in the word each answer is handed to that command
362
- as. Nothing here decides an ending on its own — the two budgets and every termination live in the next
363
- subsection.
364
-
365
- | Answer | What to do | Budget answer |
366
- | --- | --- | --- |
367
- | One or more issue numbers | Start each one as a child, up to the free lanes — `backlogrun-lanes.md` → "Lanes" and "Each child runs in a delegated unit", unchanged. Then **ask the command again**, with the merged numbers added to `--exclude` | `candidates` |
368
- | `wait`, with something of this run's own still in flight | Everything opted in is blocked or already running, so waiting can still change the answer. **Ask the command again on the in-flight wake — `pnpm josh lane:await` or the progress watcher's arrival exit, never a report** — the parent starts no sleep of its own, and the interval is a floor on the re-ask rather than a clock (`backlogrun-progress.md` → "Waiting, and never waiting forever" and "The parent keeps no clock of its own") | `blocked` |
369
- | `wait` this checkout can never resolve — the only candidates the command reported on standard error are in other repositories, and this run has nothing of its own in flight | Report those candidates with their checkouts. **Waiting cannot resolve them, but a person opting a new issue in here still can**, so the ending is the idle watch's rather than this row's | `exhausted` |
370
- | `stop` | Nothing can proceed without a person. Report the parked issues and finish | `parked` |
371
- | `triage` | A candidate lacks `run:solo` / `run:lane` (joshuafolkken/kit#2779). Judge each one stderr names as the pre-start pass does, then **ask again**; running children continue | `untriaged` |
372
- | `retry`, on fewer than three consecutive asks | GitHub did not answer, so the graph was never read. Sleep the polling interval and **ask the command again** — **this is one of the states with no watcher-delivered wake** (`backlogrun-progress.md` → "The wake exists only while something is in flight"). This is the one answer re-asking is allowed on, and the count is consecutive: any other answer resets it to zero | `blocked` |
373
- | `retry` for a third consecutive time | The outage is not a hiccup. Report what the command printed on standard error and finish | `unreadable` |
374
- | `error` | The graph could not be resolved — report what the command printed on standard error and finish. **Never re-ask hoping for a different answer**, and never fall back to picking an issue by hand | `unreadable` |
375
- | `none` | Nothing opted in is left | `exhausted` |
376
- | Exit 1, empty standard output | The listing could not be read. Report it and finish — **it is not `none`** | `unreadable` |
377
-
378
- **Three consecutive `retry` answers end the run**, and any other answer resets the count to zero, so
379
- `backlog:budget` is told `blocked` while retries remain and `unreadable` on the third.
380
-
381
- **Feed every issue this run has merged back through `--exclude`** — a just-merged issue can still read
382
- as open on the next ask. The flag takes a comma-separated list and may be repeated; it drops the issue
383
- from every bucket rather than only from the offer.
384
-
385
- **A short offer is not proof the backlog is empty**: the standalone half is capped at the five rows
386
- `🗒 Next issues` shows, so a sixth opted-in issue appears on the next ask; an epic's children come
387
- through its own graph, uncapped.
388
-
389
- **The epic side is found server-side by the `epic` label**, so an epic without it is invisible and
390
- tracks nothing — a known limit of the listing (joshuafolkken/kit#1633).
391
-
392
- **A child is offered on its own `auto-ok` unless the epic tracking it is opted in**
393
- (joshuafolkken/kit#1668). An epic that **is** opted in owns its children entirely and sequences them;
394
- ordering survives the standalone route on the children's own `blocked-by` relations, which `--ordered`
395
- records.
396
-
397
- **An order between two epics holds too** (joshuafolkken/kit#1943). A `blocked-by` relation whose
398
- blocker sits in another opted-in epic — or is an opted-in standalone issue — makes the child wait on
399
- time, so one `backlogrun` runs both epics in that order. A blocker outside the opted-in backlog, or one
400
- inside it that itself waits on a person, makes the child wait on a person instead, and a cycle across
401
- epics answers `error`. The table is `docs/josh-commands-automation.md` → "`josh epic:next`".
402
-
403
- **New work is picked up without restarting anything.** The command re-derives its pool from GitHub
404
- labels on every ask, so an issue filed and opted in while the run is going is offered on the next
405
- iteration, once triaged.
323
+ **A candidate only in another repository is never a token** — report it with its checkout and leave it
324
+ to a session running there (`backlogrun-lanes.md` → "Concurrency").
406
325
 
407
326
  Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the loop's contract is shaped this way"
408
327
 
@@ -428,13 +347,13 @@ at the first empty backlog. The default's single source is `scripts/backlog/back
428
347
  `DEFAULT_IDLE_MINUTES`. **A watch is polled every 5 minutes, not at the loop's 60-second interval** —
429
348
  read the interval from the reason `backlog:budget` prints rather than remembering it.
430
349
 
431
- **To become a candidate an issue needs `auto-ok`, which only a person applies** — except an issue this
432
- run filed and bundled under an already opted-in epic, which is admitted ("What one invocation
433
- approves") and bounded by the brake there, never the watch. No issue nobody opted in is ever picked up
434
- during a watch.
350
+ **To become a candidate an issue needs `auto-ok`** — applied by a person, or by `issue:file`'s
351
+ default to an issue this run filed ("What one invocation approves") — or to be a child this run
352
+ filed and bundled under an already opted-in epic. Either is bounded by the brake there, never the
353
+ watch. No issue that neither a person nor that default opted in is ever picked up during a watch.
435
354
 
436
355
  **`backlog:offer` asks `backlog:budget` for you on every iteration** — it maps `backlog:next`'s answer
437
- to the word the table above fixes and hands it over, so the loop makes the one call and reads back the
356
+ to the word "The loop" points to and hands it over, so the loop makes the one call and reads back the
438
357
  verdict:
439
358
 
440
359
  ```bash
@@ -445,7 +364,7 @@ offer=$(pnpm josh backlog:offer --started "$started" --active "$active" \
445
364
  **`--active` is required of every ask, because the watch is on unless it was turned off** — an
446
365
  invocation whose watch is on and that carries no `--active` is **refused** by `backlog:budget`. Only
447
366
  `--idle 0` excuses it. **`--running` also decides `wait` and `--retries` decides `retry`** — the two
448
- context branches the table above carries, applied inside the command from the counts the loop already
367
+ context branches that mapping carries, applied inside the command from the counts the loop already
449
368
  tracks.
450
369
 
451
370
  | Verdict | What the loop does |
@@ -511,12 +430,13 @@ Termination is decided by what the loop is told, never by a judgement that enoug
511
430
  rather than per epic: children per run, Issues filed per run, and consecutive child failures. The
512
431
  maximum above is a person's declaration of scale and does not replace any of them — whichever binds
513
432
  first ends the run.
514
- - **A `needs-human-review` child stops the whole run** before its commit — `SKILL.md` → §2z, which is
433
+ - **A `needs-human-review` child stops the whole run** before its commit — `needs-human-review.md`, which is
515
434
  the single source, and `backlogrun-park.md` → "`needs-human-review` — the one stop that is not a park" for
516
435
  what happens to its lane.
517
436
  - **The hand-off check** — `pnpm josh cost --cut` at every child's merge, and the lane
518
437
  hand-over that follows an `over` — is `backlogrun-progress.md` → "The hand-off", unchanged. It is
519
- **not** asked during an idle watch: "The cost check is not asked during a watch" above.
438
+ **not** asked during an idle watch: "The cost check is not asked during a watch" above, nor by the
439
+ supervisor's `backlog:drive`, which has no session to cut (joshuafolkken/kit#3156).
520
440
  - **Parking is not stopping.** A child that needs a decision, and a delegated unit that stopped
521
441
  without reporting, are **parked** and the run continues (`backlogrun-park.md` → "park and
522
442
  continue"); only the consecutive-failure guard above can turn repeated parks into a stop.
@@ -529,9 +449,9 @@ All of these are this file's, and are reached here in the same order and for the
529
449
  | --- | --- |
530
450
  | `git switch main && git pull`, then `pnpm josh latest:scope`, then `pnpm josh lane:prune` — in the primary checkout, before the first lane opens | `backlogrun-lanes.md` → "Once per repository, before the first lane opens" |
531
451
  | `josh latest` on `required` only, asked once at the first child and never in a lane | `backlogrun-child.md` → "`josh latest` runs once per session, not once per child" |
532
- | `pnpm josh run:hold <N>`'s preflight check, before each child that is not in a lane | `backlogrun-child.md` → "Preflight" |
533
- | `pnpm josh run:progress --wait` in the background, `--mark` at every real report | `backlogrun-progress.md` → "Progress while the run is quiet" |
534
- | `pnpm josh release:scope` once, after the last issue has merged and the last lane is closed | `followup-reference.md` → "When `pnpm josh release` runs" |
452
+ | `pnpm josh run:hold <N>`'s preflight check, before each child that is not in a lane — act on what it prints | `docs/josh-commands-automation.md` → "`josh run:hold`" |
453
+ | `pnpm josh run:progress --wait` in the background, `--mark` at every real report | `progress-watcher.md` → "Progress while the run is quiet" |
454
+ | `pnpm josh release:scope` once, after the last issue has merged and the last lane is closed | `followup.md` → "When `pnpm josh release` runs" |
535
455
 
536
456
  **Two more run once per session and are this file's own**:
537
457
  `pnpm josh run:carry --begin "<the invocation, single-spaced>" --owner "$PPID"` before the plan and
@@ -45,11 +45,11 @@ Each step is a terse trigger and a pointer; the procedure is read on demand from
45
45
  `backlogrun-steps.md` → "The session cut is inside the invocation".
46
46
  3. **What this invocation approves** — `backlogrun-steps.md` → "What one invocation approves": the
47
47
  opted-in pool, a run's own filings once bundled, and the brake (`--max`, ten filings, the WIP cap)
48
- that bounds the amount. `auto-ok` is a person's alone.
48
+ that bounds the amount. `auto-ok` reaches a run's own filings only through `issue:file`'s default.
49
49
  4. **Report the plan before the first child** — `pnpm josh backlog:plan`, then resolve every
50
50
  `needs-decision` issue decidable from its body in one pass. In the same pass, record `blocked-by`
51
51
  between issues that must land in order, and apply `run:solo` where all three of the
52
- `wip-cap.md` → 「実行のしかた」 conditions hold, `run:lane` elsewhere. `backlogrun-steps.md` → "The plan,
52
+ `backlogrun-lanes.md` → "Lanes — running more than one child at a time" conditions hold, `run:lane` elsewhere. `backlogrun-steps.md` → "The plan,
53
53
  before the first child starts" and its "Resolve what the plan can resolve, before starting".
54
54
  5. **Named issues run first, in order** — `backlogrun-steps.md` → "Named issues run first, in order":
55
55
  the supervisor's driver dispatches each as a delegated `fullrun`, one at a time, then drains the
@@ -57,7 +57,7 @@ Each step is a terse trigger and a pointer; the procedure is read on demand from
57
57
  6. **The loop belongs to the supervisor** — `run:wake` runs `backlog:drive`; the driver uses
58
58
  `pnpm josh backlog:offer` as its loop head and returns a branch to an AI session only when it needs
59
59
  judgment. `backlogrun-steps.md` → "The loop"
60
- fixes the answer-to-word mapping, "The two budgets" the `run` / `watch` / `stop` verdict, "The cost
60
+ fixes what a handed-back branch asks, "The two budgets" the `run` / `watch` / `stop` verdict, "The cost
61
61
  check is not asked during a watch", and "Where the run stops" every termination.
62
62
  7. **What runs once per session, not once per issue** — `backlogrun-steps.md` → "What runs once per
63
63
  session, not once per issue": the per-repository preflight, `josh latest` on `required`, the
@@ -80,7 +80,8 @@ named step reaches it, exactly as `backlogrun-steps.md` and the shared gate docu
80
80
  | --- | --- | --- |
81
81
  | `backlogrun-child.md` | dispatching the first child (`pnpm josh delegate epic-child`, `pnpm josh lane:dispatch`) | the shared per-child `fullrun`, a bare non-epic `#N`, the delegated unit and its summary bound, liveness recovery, and the once-per-session setup (audit, `josh latest`, preflight) |
82
82
  | `backlogrun-lanes.md` | opening the first lane (`pnpm josh lane:open`) | the per-repository lane ceiling and the lane lifecycle, and how a merge conflict is resolved |
83
- | `backlogrun-progress.md` | starting the progress watcher (`pnpm josh run:progress --wait`) and the hand-off check at a merge (`pnpm josh cost --cut`) | the heartbeat, the hand-off and the cut/resume, waiting without waiting forever, and the end-of-run summary and propagate |
83
+ | `progress-watcher.md` | starting the progress watcher (`pnpm josh run:progress --wait`) | the heartbeat, shared with every implementing run |
84
+ | `backlogrun-progress.md` | dispatching the first child and the hand-off check at a merge (`pnpm josh cost --cut`) | the hand-off and the cut/resume, waiting without waiting forever, and the end-of-run summary and propagate |
84
85
  | `backlogrun-park.md` | a child cannot finish | park-and-continue, the `needs-human-review` stop, a stale `in-progress`, a prerequisite discovered mid-run, and a mid-run split |
85
86
 
86
87
  ## Guards
@@ -10,7 +10,8 @@ Review results and successful pushes are never turn boundaries.
10
10
  whose prompt names `pnpm josh ship --log <N>` and (Anthropic lane, #2964) the re-detach to run after
11
11
  the fix — `pnpm josh ship --detach`, `--review` only if the stopped ship carried it and stopped before
12
12
  round 2, which is final (`scripts/run/run-ship-next.ts`); the supervisor skips a recorded round 1.
13
- `failed` → step 1.
13
+ `failed` → step 1. A backgrounded `ship` issued alone is moved to the foreground by the hook
14
+ rather than refused (#3154).
14
15
  1. Run `pnpm josh main:merge`. **Then issue `pnpm josh run:cut <N>` alone, before the scoped pair and
15
16
  the gate** — the pre-gate cut (a no-op outside a lane, joshuafolkken/kit#2177). Then run the final scoped lint/test pair and `pnpm josh run:review`: it starts
16
17
  `pnpm josh gate` in the background and prints the `/code-review` brief in one call, so the two overlap
@@ -62,7 +63,7 @@ once here; the measurements that motivated each one live in the linked Issues.
62
63
  - **origin/main is merged in before the gate** — `pnpm josh main:merge` merges `origin/<default>` into
63
64
  the branch before the gate and the review start, so the gate verifies the tree that will actually
64
65
  merge rather than one that never existed (joshuafolkken/kit#1837). It is the last edit, so the scoped
65
- pair and the gate run once over it. A conflict here fires `backlogrun-lanes.md` → "Conflicts are not predicted"
66
+ pair and the gate run once over it. A conflict here fires `backlogrun-recovery.md` → "Conflicts are not predicted"
66
67
  early. **This is the one place a conflicted merge's procedure is written** (joshuafolkken/kit#2445):
67
68
  `main:merge` refuses before merging when uncommitted changes touch a path the default branch also
68
69
  changed, or when the index still holds unresolved or staged paths — commit the work first with
@@ -1,4 +1,4 @@
1
- # Delegation decisions — `SKILL.md` §2b's procedure
1
+ # Delegation decisions — the procedure
2
2
 
3
3
  Read this file when the first delegation decision arises during a run, not at workflow entry.
4
4
 
@@ -28,7 +28,7 @@ applies to named issues. `docs/josh-commands-automation.md` → "`josh fanout`"
28
28
  **`followup-filing` delegates the late review-finding filing chain** with the parent's finding text;
29
29
  the parent verifies the new Issue using `pnpm josh issue:state <new>`. For `epic-child`, the parent
30
30
  likewise verifies `pnpm josh issue:state <N>` after the unit returns. Read `human_review:` too: an open
31
- `needs-human-review` child is the authorized stop (`SKILL.md` → §2z), not a failed child. The per-entry
31
+ `needs-human-review` child is the authorized stop (`needs-human-review.md`), not a failed child. The per-entry
32
32
  classification lives in `backlogrun-child.md` → "Each child runs in a delegated unit".
33
33
 
34
34
  ## The pre-implementation reading — what goes to a unit, and from which file
@@ -40,7 +40,11 @@ a temporary probe script and return its output.
40
40
  **The threshold is 3 files, and it is a count, not a forecast.** When the next read reaches it,
41
41
  delegate the unread investigation. Brief the unit on what was already read; do not re-read it there.
42
42
  **A delegation resets the counter rather than spending it**; `pnpm josh investigation:guard` counts
43
- unedited files and refuses the threshold read. `pnpm josh delegate --list` prints the threshold.
43
+ unedited files and search turns and refuses the threshold call. `pnpm josh delegate --list` prints
44
+ the threshold.
45
+
46
+ **Dispatch the unit as the `investigator` agent** (`kit:investigator` in a consumer) — the parent's
47
+ model at a lowered effort, read-only.
44
48
  `docs/josh-commands-automation.md` → "`josh investigation:guard`" carries the command's counting details.
45
49
 
46
50
  **The main line does not idle while the unit reads:** read files this run will edit, then verify the
@@ -0,0 +1,62 @@
1
+ # The entry sequence and the stop branches — shared by `fullrun`, `halfrun` and `prrun`
2
+
3
+ **This file is the part of the three implementing manifests that is one procedure**
4
+ (joshuafolkken/kit#3174). `fullrun.md`, `halfrun.md` and `prrun.md` name only how their own run
5
+ differs from it; `pnpm josh run:step <N>` prints the run's next single action.
6
+
7
+ ## The ordered entry sequence
8
+
9
+ **One call folds the mechanical steps** (joshuafolkken/kit#2372): `pnpm josh run:entry <N> --to
10
+ <command>` claims the tree, reads the budget, bundles the reads and decides the pre-implementation
11
+ step — steps 1, 3, 4 and 5 below in one round trip. Its `stage #<N>` line says where the run starts
12
+ (`start: reached` redoes nothing — stop), and its `entry #<N> — hold: … · cost: … · verdict: …` line
13
+ carries the three facts the run branches on; a `busy` / `unknown` hold or an `over` budget
14
+ short-circuits with a non-zero exit. The numbered steps are the detail behind each fact.
15
+
16
+ 1. **Claim the working tree — first, before anything else.** `#N`: `pnpm josh run:entry <N> --to
17
+ <command>` (no `--to` is `fullrun`), which calls `run:hold` as its first step. `new`: bare `pnpm
18
+ josh run:hold`, ahead of the title and the filing. `hold` continues; `busy` / `unknown` stop with a
19
+ `confirmation` Telegram carrying stderr (`run:entry` sends it). `working-tree-hold.md` is the single
20
+ source; a cross-repository target resolves its checkout from `pnpm josh doctor` first
21
+ (`target-repository.md`).
22
+ 2. **`in-progress` rides on the hold** — for a `#N`, `run:entry` applies it once the tree is held and
23
+ the budget allows the run; a `new` entry applies it right after filing (`fullrun-steps.md`). Every
24
+ stop that leaves the tree clean ends with `pnpm josh run:release <N>`, which removes the label with
25
+ the record (a `new` entry's bare release does not — `working-tree-hold.md`).
26
+ 3. **Ask the session boundary in the same turn as the hold** — `pnpm josh cost --cut`. `under`
27
+ continues; `over` (or unanswerable) stops before the title — `run:entry` sends the `confirmation`
28
+ Telegram and runs `run:release` (`stop notified: …`); by hand only for `new`. **Skip it when
29
+ dispatched by a batch** (that batch owns the question). The verdict and the shared 135,000 threshold
30
+ are the command's own.
31
+ 4. **Gather the mechanical reads — `pnpm josh run:prep <N>`**: `issue:read`'s body and comments
32
+ (`issue-comments.md`), `issue:state`'s state, labels and `human_review`, and `latest:scope`'s
33
+ dependency scope in one report; a `new` entry runs it once filed. The comment stops, the
34
+ `human_review` stop (`needs-human-review.md`) and the dependency decision are read off it.
35
+ 5. **Print the next action — `pnpm josh run:step <N>`** — and follow it into the command's step list.
36
+ Before implementing, `git switch main && git pull`, then `pnpm josh latest:scope` — update
37
+ dependencies only on `required` (`latest-gate.md`), never on every run. `run:step` names every later
38
+ action in order, each read at the point-of-use document `SKILL.md` lists, never re-narrated here
39
+ (`residency.md` → "順序の問い").
40
+
41
+ **Start the progress watcher once the hold is claimed** — `pnpm josh run:progress --wait` in the
42
+ background, started once and relayed never, and `pnpm josh run:progress --mark` in the same turn as
43
+ every real report (`progress-watcher.md` → "Progress while the run is quiet"). A run dispatched as a
44
+ lane child starts none and never reads that document (`pnpm josh read:set lane-child`).
45
+
46
+ ## The stop branches
47
+
48
+ - **`needs-human-review`** — implement and gate, then stop before the commit, keeping the hold and
49
+ `in-progress`; `needs-human-review.md`.
50
+ - **A split** — the assessment (`split-assessment.md` → "The question") finds two or more
51
+ separately-mergeable deliverables over one gate: file the children (each `route:split`) and the epic,
52
+ then **STOP** with "Please run `backlogrun #<E> --only` to execute this epic." Typing the command
53
+ approved **one** Issue, never a batch.
54
+ - **A prerequisite** — file it (`route:tier-a`), stash, record the dependency, and **STOP** with
55
+ "Please run `backlogrun #<E> --only` to execute this epic"; `prerequisite.md` is the single source of
56
+ the filing, the `-u` stash and the epic:bundle branch.
57
+ - **An observation** — file it without asking and carry on; `observation-filing.md`.
58
+
59
+ **Automatic filing is capped at 10 Issues per run.** On reaching it, stop and report.
60
+
61
+ **The `into <target>` suffix** (a `new` entry) inserts the artifact into a named epic —
62
+ `into-target.md`, read when the suffix is typed.