@joshuafolkken/kit 1.1387.0 → 1.1453.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 (278) hide show
  1. package/.claude/skills/epic-commands/SKILL.md +1 -1
  2. package/.claude/skills/epic-commands/epic-bundle.md +5 -0
  3. package/.claude/skills/workflow-commands/backlogrun-lanes.md +5 -3
  4. package/.claude/skills/workflow-commands/backlogrun-park.md +2 -0
  5. package/.claude/skills/workflow-commands/backlogrun-steps.md +13 -10
  6. package/.claude/skills/workflow-commands/backlogrun.md +3 -2
  7. package/.claude/skills/workflow-commands/chain-rule.md +4 -2
  8. package/.claude/skills/workflow-commands/fullrun-steps.md +1 -1
  9. package/.claude/skills/workflow-commands/halfrun.md +1 -1
  10. package/.claude/skills/workflow-commands/issue-comments.md +6 -0
  11. package/.claude/skills/workflow-commands/kickoff.md +12 -13
  12. package/.claude/skills/workflow-commands/observation-filing.md +1 -1
  13. package/.claude/skills/workflow-commands/observation-ledger.md +3 -2
  14. package/.claude/skills/workflow-commands/pre-gate-cut.md +5 -3
  15. package/.claude/skills/workflow-commands/prerequisite.md +6 -0
  16. package/.claude/skills/workflow-commands/retrospective.md +5 -5
  17. package/.claude/skills/workflow-commands/split-assessment.md +2 -2
  18. package/README.md +27 -4
  19. package/dist/hooks/audit-provision.js +2 -2
  20. package/dist/hooks/batch-guard.js +7 -7
  21. package/dist/hooks/{chunk-2YSW3CXH.js → chunk-3C4XRYG6.js} +35 -11
  22. package/dist/hooks/{chunk-GJ7JPIHN.js → chunk-5C7L6FRC.js} +2704 -190
  23. package/dist/hooks/{chunk-FZ6FUSBM.js → chunk-723HKZO5.js} +1 -1
  24. package/dist/hooks/{chunk-STDSEPWU.js → chunk-D3NJXN5M.js} +4 -4
  25. package/dist/hooks/{chunk-NEC4AT4Z.js → chunk-DGT54IH5.js} +4 -0
  26. package/dist/hooks/{chunk-LMWBRJIP.js → chunk-EF5GQ6WS.js} +3 -3
  27. package/dist/hooks/{chunk-JBBMAPC4.js → chunk-IX6TTTI6.js} +4 -0
  28. package/dist/hooks/{chunk-IYVOLN6A.js → chunk-LBFYEOXJ.js} +3 -3
  29. package/dist/hooks/{chunk-SL4GQ2XP.js → chunk-MBJYQPEK.js} +106 -23
  30. package/dist/hooks/{chunk-WNFJLBXI.js → chunk-NO4AALP5.js} +3 -3
  31. package/dist/hooks/{chunk-J3KSS7II.js → chunk-OLMO72ON.js} +1 -1
  32. package/dist/hooks/{chunk-DCY2GWHC.js → chunk-SHYUQOIS.js} +5 -5
  33. package/dist/hooks/{chunk-EAQEGME7.js → chunk-UT7YC3N2.js} +1 -1
  34. package/dist/hooks/{chunk-EBSHN25W.js → chunk-W5ZKGTSY.js} +4 -4
  35. package/dist/hooks/{chunk-GNDJ7NJ7.js → chunk-Y3GKIKGW.js} +209 -56
  36. package/dist/hooks/{chunk-U32VSRNG.js → chunk-Z4XI7CZS.js} +89 -34
  37. package/dist/hooks/codex-hook-adapter.js +15 -15
  38. package/dist/hooks/duplicate-read-guard.js +8 -8
  39. package/dist/hooks/format-edited.js +5 -5
  40. package/dist/hooks/inputs.json +261 -201
  41. package/dist/hooks/investigation-guard.js +8 -8
  42. package/dist/hooks/pretool-guard.js +14 -14
  43. package/dist/hooks/session-lang.js +69 -16
  44. package/dist/hooks/stop-guard.js +13 -38
  45. package/dist/josh.js +95 -19
  46. package/package.json +4 -3
  47. package/prompts/collaboration-workflow/issue-template.md +10 -8
  48. package/prompts/review.md +30 -4
  49. package/scripts/agent/claude-agent-argv.ts +13 -1
  50. package/scripts/auth/auth-setup-cli.ts +101 -0
  51. package/scripts/auth/claude-token-output.ts +78 -0
  52. package/scripts/auth/claude-token.ts +68 -0
  53. package/scripts/auto-ok/auto-ok-judge-cli.ts +125 -0
  54. package/scripts/auto-ok/auto-ok-judge-read.ts +95 -0
  55. package/scripts/auto-ok/auto-ok-judge-write.ts +109 -0
  56. package/scripts/auto-ok/auto-ok-judge.ts +67 -0
  57. package/scripts/backlog/backlog-drive-cli.ts +14 -0
  58. package/scripts/backlog/backlog-drive-epic.ts +24 -8
  59. package/scripts/backlog/backlog-drive-launch.ts +3 -0
  60. package/scripts/backlog/backlog-drive-named-offer.ts +7 -2
  61. package/scripts/backlog/backlog-drive-named.ts +4 -2
  62. package/scripts/backlog/backlog-drive-unread.ts +56 -0
  63. package/scripts/backlog/backlog-drive.ts +38 -11
  64. package/scripts/backlog/backlog-overlap.ts +22 -5
  65. package/scripts/backlog/backlog-ready.ts +1 -3
  66. package/scripts/backlog/backlogrun-args.ts +13 -2
  67. package/scripts/backlog/backlogrun-cli.ts +91 -19
  68. package/scripts/backlog/backlogrun-launch.ts +24 -0
  69. package/scripts/backlog/backlogrun-replace.ts +166 -0
  70. package/scripts/backlog/backlogrun-stop.ts +178 -0
  71. package/scripts/behavior/behavior-cli.ts +6 -1
  72. package/scripts/doctor/doctor-io.ts +60 -9
  73. package/scripts/doctor/doctor.ts +20 -1
  74. package/scripts/document/document-byte-budget.ts +3 -3
  75. package/scripts/epic/epic-bundle-cli.ts +8 -8
  76. package/scripts/epic/epic-bundle-referenced.ts +2 -5
  77. package/scripts/epic/epic-bundle.ts +39 -4
  78. package/scripts/exports/unused-members-cli.ts +2 -1
  79. package/scripts/followup/followup-checks-event.ts +82 -0
  80. package/scripts/followup/git-followup-finish.ts +16 -2
  81. package/scripts/followup/git-followup-workflow.ts +5 -2
  82. package/scripts/followup/git-pr-followup-checks.ts +18 -4
  83. package/scripts/followup/git-pr-followup-wrapup.ts +5 -0
  84. package/scripts/followup/git-pr-followup.ts +4 -1
  85. package/scripts/fresh-machine/fresh-machine-cli.ts +204 -0
  86. package/scripts/fresh-machine/fresh-machine-docker.ts +65 -0
  87. package/scripts/fresh-machine/fresh-machine-image.ts +62 -0
  88. package/scripts/fresh-machine/fresh-machine-log.ts +61 -0
  89. package/scripts/fresh-machine/fresh-machine-patterns.ts +175 -0
  90. package/scripts/fresh-machine/fresh-machine-run.ts +215 -0
  91. package/scripts/fresh-machine/fresh-machine-script.ts +45 -0
  92. package/scripts/fresh-machine/fresh-machine-spec.ts +57 -0
  93. package/scripts/fresh-machine/specs/kit-test-backlogrun-python.json +34 -0
  94. package/scripts/fresh-machine/specs/kit-test-backlogrun.json +31 -0
  95. package/scripts/gate/gate-report.ts +70 -15
  96. package/scripts/gate/project-checks.ts +18 -4
  97. package/scripts/gate/scoped-green.ts +2 -1
  98. package/scripts/gate/verification-gate.ts +4 -3
  99. package/scripts/gh/gh-author-association.ts +14 -0
  100. package/scripts/gh/git-gh-conditional.ts +66 -0
  101. package/scripts/gh/git-gh-exec.ts +1 -1
  102. package/scripts/gh/git-gh-issue-read.ts +6 -3
  103. package/scripts/gh/git-gh-issue-rest.ts +1 -0
  104. package/scripts/gh/git-gh-issue-write.ts +5 -1
  105. package/scripts/gh/git-gh-issue.ts +13 -1
  106. package/scripts/gh/git-pr-checks-eval.ts +13 -0
  107. package/scripts/gh/git-pr-checks-parse.ts +8 -1
  108. package/scripts/gh/git-pr-checks-watch.ts +11 -4
  109. package/scripts/gh/git-pr-checks.ts +36 -2
  110. package/scripts/git/git-command.ts +16 -4
  111. package/scripts/git/git-schemas.ts +1 -0
  112. package/scripts/git/git-spawn-sync.ts +1 -1
  113. package/scripts/hooks/pretool-guard.ts +3 -1
  114. package/scripts/init/hook-command-rewrite.ts +31 -0
  115. package/scripts/init/init-actions.ts +7 -4
  116. package/scripts/init/init-ai-copy.ts +34 -11
  117. package/scripts/init/init-basic.ts +9 -4
  118. package/scripts/init/init-bootstrap.ts +6 -2
  119. package/scripts/init/init-dry-run-report.ts +150 -0
  120. package/scripts/init/init-dry-run.ts +189 -0
  121. package/scripts/init/init-install.ts +8 -1
  122. package/scripts/init/init-logic-toolchain.ts +76 -0
  123. package/scripts/init/init-logic.ts +2 -0
  124. package/scripts/init/init.ts +62 -42
  125. package/scripts/init/kit-setup-state.ts +11 -17
  126. package/scripts/init/own-formatter.ts +21 -0
  127. package/scripts/init/project-profile.ts +60 -12
  128. package/scripts/init/start-dry-run.ts +70 -0
  129. package/scripts/init/start-exec.ts +27 -1
  130. package/scripts/init/start-plan.ts +23 -3
  131. package/scripts/init/start-setup-pr.ts +13 -24
  132. package/scripts/init/start-steps.ts +62 -1
  133. package/scripts/init/start.ts +38 -17
  134. package/scripts/init/workflow-mark.ts +35 -0
  135. package/scripts/init/working-tree.ts +116 -0
  136. package/scripts/issue/issue-ack-cli.ts +84 -0
  137. package/scripts/issue/issue-auto-ok.ts +68 -99
  138. package/scripts/issue/issue-file-cli.ts +17 -17
  139. package/scripts/issue/issue-file.ts +1 -6
  140. package/scripts/issue/issue-labels.ts +46 -10
  141. package/scripts/issue/issue-release-cli.ts +69 -23
  142. package/scripts/issue/issue-release.ts +3 -1
  143. package/scripts/issue/issue-state-cli.ts +14 -4
  144. package/scripts/issue/issue-watch-diff.ts +152 -0
  145. package/scripts/issue/issue-watch-gate.ts +81 -0
  146. package/scripts/issue/issue-watch-hook.ts +54 -0
  147. package/scripts/issue/issue-watch.ts +240 -0
  148. package/scripts/issue/measure-rerun-cli.ts +3 -4
  149. package/scripts/josh/josh-command-map.ts +4 -0
  150. package/scripts/josh/josh-commands-ai.ts +11 -0
  151. package/scripts/josh/josh-commands-backlog.ts +2 -2
  152. package/scripts/josh/josh-commands-development.ts +1 -1
  153. package/scripts/josh/josh-commands-issue.ts +10 -3
  154. package/scripts/josh/josh-commands-lane.ts +11 -2
  155. package/scripts/josh/josh-commands-project.ts +26 -2
  156. package/scripts/josh/josh-verdict.ts +33 -4
  157. package/scripts/josh/process-identity.ts +32 -6
  158. package/scripts/lane/claude-lane-broker.ts +142 -0
  159. package/scripts/lane/lane-await.ts +6 -2
  160. package/scripts/lane/lane-broker-server.ts +69 -0
  161. package/scripts/lane/lane-cache.ts +37 -7
  162. package/scripts/lane/lane-capacity.ts +8 -6
  163. package/scripts/lane/lane-child-invocation.ts +1 -0
  164. package/scripts/lane/lane-cli.ts +15 -1
  165. package/scripts/lane/lane-close.ts +15 -6
  166. package/scripts/lane/lane-dispatch.ts +36 -10
  167. package/scripts/lane/lane-environment.ts +1 -1
  168. package/scripts/lane/lane-launch-cli.ts +13 -4
  169. package/scripts/lane/lane-ledger.ts +21 -3
  170. package/scripts/lane/lane-measure-cli.ts +10 -2
  171. package/scripts/lane/lane-open.ts +9 -1
  172. package/scripts/lane/lane-preserve.ts +49 -0
  173. package/scripts/lane/lane-reap.ts +20 -5
  174. package/scripts/lane/lane-registry.ts +6 -0
  175. package/scripts/lane/lane-restart-cli.ts +51 -0
  176. package/scripts/lane/lane-restart.ts +175 -0
  177. package/scripts/lane/lane-session-broker.ts +363 -0
  178. package/scripts/lane/lane-spent.ts +195 -0
  179. package/scripts/lane/lane-stage-stats.ts +27 -3
  180. package/scripts/lane/lane-stop-stats.ts +96 -0
  181. package/scripts/lane/openai-lane-supervisor.ts +2 -2
  182. package/scripts/lane/process-tools.ts +31 -0
  183. package/scripts/lib/buffered-process.ts +36 -2
  184. package/scripts/lib/pnpm-reach.ts +27 -0
  185. package/scripts/lib/status-icons.ts +5 -1
  186. package/scripts/lint/lint-parallel.ts +19 -2
  187. package/scripts/observations/observation-ledger-home.ts +1 -0
  188. package/scripts/observations/observation-ledger-migrate.ts +3 -15
  189. package/scripts/release/release-issue-close.ts +133 -0
  190. package/scripts/release/release-publish.ts +12 -1
  191. package/scripts/repo/repository-labels.ts +11 -1
  192. package/scripts/review/comment-ranges.ts +199 -0
  193. package/scripts/review/review-attest-cli.ts +21 -6
  194. package/scripts/review/review-brief-cli.ts +24 -7
  195. package/scripts/review/review-code-tree.ts +119 -0
  196. package/scripts/review/review-comment-round.ts +114 -0
  197. package/scripts/review/review-record-cli.ts +39 -17
  198. package/scripts/review/review-round2-cli.ts +16 -5
  199. package/scripts/review/review-round2.ts +30 -10
  200. package/scripts/review/review-stamps.ts +22 -1
  201. package/scripts/rules/implementation-cut.ts +3 -3
  202. package/scripts/rules/pre-gate-cut.ts +1 -1
  203. package/scripts/run/board/run-board-checks.ts +42 -0
  204. package/scripts/run/board/run-board-cli.ts +2 -0
  205. package/scripts/run/board/run-board-every.ts +3 -1
  206. package/scripts/run/board/run-board-fit.ts +16 -5
  207. package/scripts/run/board/run-board-fresh.ts +64 -0
  208. package/scripts/run/board/run-board-header.ts +129 -53
  209. package/scripts/run/board/run-board-labels.ts +47 -4
  210. package/scripts/run/board/run-board-lane-event.ts +66 -0
  211. package/scripts/run/board/run-board-layout.ts +57 -9
  212. package/scripts/run/board/run-board-now.ts +234 -0
  213. package/scripts/run/board/run-board-operation-read.ts +75 -0
  214. package/scripts/run/board/run-board-operation.ts +150 -0
  215. package/scripts/run/board/run-board-phase.ts +26 -1
  216. package/scripts/run/board/run-board-plan.ts +4 -6
  217. package/scripts/run/board/run-board-read.ts +49 -3
  218. package/scripts/run/board/run-board-reason.ts +124 -0
  219. package/scripts/run/board/run-board-render-checks.ts +55 -0
  220. package/scripts/run/board/run-board-render-legend.ts +12 -3
  221. package/scripts/run/board/run-board-render-slot.ts +2 -2
  222. package/scripts/run/board/run-board-render-tail.ts +128 -0
  223. package/scripts/run/board/run-board-render-thanks.ts +50 -0
  224. package/scripts/run/board/run-board-render-title.ts +58 -0
  225. package/scripts/run/board/run-board-render.ts +96 -80
  226. package/scripts/run/board/run-board-row-yield.ts +32 -0
  227. package/scripts/run/board/run-board-setup.ts +61 -13
  228. package/scripts/run/board/run-board-state.ts +10 -0
  229. package/scripts/run/board/run-board-status.ts +66 -7
  230. package/scripts/run/board/run-board-thanks-csv.ts +71 -0
  231. package/scripts/run/board/run-board-thanks-read.ts +112 -0
  232. package/scripts/run/board/run-board-thanks.ts +53 -0
  233. package/scripts/run/board/run-board-tick.ts +50 -21
  234. package/scripts/run/board/run-board-usual.ts +44 -0
  235. package/scripts/run/carry/run-carry-args.ts +9 -1
  236. package/scripts/run/carry/run-carry-cli.ts +2 -45
  237. package/scripts/run/carry/run-carry-end.ts +73 -0
  238. package/scripts/run/carry/run-carry.ts +8 -1
  239. package/scripts/run/entry/run-entry-cli.ts +5 -0
  240. package/scripts/run/event/run-event-checks.ts +54 -0
  241. package/scripts/run/event/run-event-render.ts +2 -0
  242. package/scripts/run/event/run-event-scope.ts +1 -0
  243. package/scripts/run/event/run-event-setup.ts +55 -11
  244. package/scripts/run/event/run-event-stream.ts +27 -11
  245. package/scripts/run/merge/run-merge-cli.ts +7 -4
  246. package/scripts/run/merge/run-merge-ship.ts +61 -0
  247. package/scripts/run/merge/run-merge-steps.ts +7 -14
  248. package/scripts/run/merge/run-merge-token.ts +16 -2
  249. package/scripts/run/run-headless.ts +1 -0
  250. package/scripts/run/run-step.ts +2 -0
  251. package/scripts/run/ship/run-ship-cli.ts +22 -2
  252. package/scripts/run/ship/run-ship-return.ts +31 -13
  253. package/scripts/run/ship/run-ship-review-steps.ts +17 -4
  254. package/scripts/run/ship/run-ship-stage.ts +1 -0
  255. package/scripts/run/wake/run-wake-await.ts +130 -0
  256. package/scripts/run/wake/run-wake-cli.ts +60 -71
  257. package/scripts/run/wake/run-wake-describe.ts +34 -2
  258. package/scripts/run/wake/run-wake-driver.ts +11 -4
  259. package/scripts/run/wake/run-wake-session.ts +20 -3
  260. package/scripts/run/wake/run-wake-stop.ts +37 -0
  261. package/scripts/run/wake/run-wake-supervise.ts +44 -0
  262. package/scripts/sync/claude-settings-merge.ts +144 -0
  263. package/scripts/sync/sync-ai-files.ts +28 -3
  264. package/scripts/sync/sync.ts +15 -0
  265. package/scripts/test/project-test-script.ts +73 -0
  266. package/scripts/test/skip-marker.ts +14 -1
  267. package/scripts/test/test-related.ts +3 -2
  268. package/scripts/test/test-unit-guard.ts +78 -14
  269. package/scripts/time-runtime/time-reported-failure.ts +11 -3
  270. package/scripts/uninstall/distributed-files.ts +92 -0
  271. package/scripts/uninstall/uninstall-plan.ts +119 -0
  272. package/scripts/uninstall/uninstall-report.ts +61 -0
  273. package/scripts/uninstall/uninstall.ts +206 -0
  274. package/templates/AGENTS.basic.md +4 -0
  275. package/templates/GEMINI.basic.md +6 -0
  276. package/dist/hooks/chunk-6V5OPIUU.js +0 -13
  277. package/scripts/lane/openai-review-broker.ts +0 -262
  278. package/scripts/run/board/run-board-track.ts +0 -22
@@ -1,7 +1,4 @@
1
1
  #!/usr/bin/env tsx
2
- import {
3
- session_language
4
- } from "./chunk-6V5OPIUU.js";
5
2
  import {
6
3
  agent_role_profile,
7
4
  detached_launch,
@@ -9,23 +6,24 @@ import {
9
6
  issue_cite,
10
7
  run_event_stream,
11
8
  run_event_stream_emit,
12
- run_headless
13
- } from "./chunk-U32VSRNG.js";
9
+ run_headless,
10
+ session_language
11
+ } from "./chunk-Z4XI7CZS.js";
14
12
  import {
15
13
  error_text
16
14
  } from "./chunk-CDY4NFQG.js";
17
15
  import {
18
16
  josh_environment_file
19
- } from "./chunk-J3KSS7II.js";
17
+ } from "./chunk-OLMO72ON.js";
20
18
  import {
21
19
  agent_session_environment,
22
20
  json_value,
23
21
  process_identity,
24
22
  run_carry
25
- } from "./chunk-2YSW3CXH.js";
23
+ } from "./chunk-3C4XRYG6.js";
26
24
  import {
27
25
  stamp_file
28
- } from "./chunk-NEC4AT4Z.js";
26
+ } from "./chunk-DGT54IH5.js";
29
27
 
30
28
  // scripts/josh/session-language-cli.ts
31
29
  import { fileURLToPath } from "node:url";
@@ -104,7 +102,14 @@ var agent_diagnostics = { check };
104
102
  import { existsSync } from "node:fs";
105
103
  import path from "node:path";
106
104
  var AGENT_COMMAND = "claude";
107
- var AGENT_FLAGS = ["-p", "--verbose", "--output-format", "stream-json"];
105
+ var PERMISSION_FLAGS = ["--permission-mode", "bypassPermissions"];
106
+ var AGENT_FLAGS = [
107
+ "-p",
108
+ "--verbose",
109
+ "--output-format",
110
+ "stream-json",
111
+ ...PERMISSION_FLAGS
112
+ ];
108
113
  var MODEL_FLAG = "--model";
109
114
  var EFFORT_FLAG = "--effort";
110
115
  var RESUME_FLAG = "--resume";
@@ -311,24 +316,57 @@ var STAGE = {
311
316
  // `run:carry --begin` claimed the run, and the parent is planning it.
312
317
  PLANNING: "planning",
313
318
  // The supervisor took the run over from the parent and is asking for the first offer.
314
- HANDING_OFF: "handing off"
319
+ HANDING_OFF: "handing off",
320
+ // The driver answered something only a session can act on — an untriaged child, an epic left to a
321
+ // person — and the supervisor is waking one. The next hand-off replaces it.
322
+ JUDGING: "waiting on judgment",
323
+ // The supervisor started that session, which is now acting on the driver's answer. It is detached, so
324
+ // its end is the supervisor's next hand-off, which replaces this.
325
+ SESSION: "judgment session running",
326
+ // The driver's launch of a lane returned without a child: no lane was free to open, or a step after
327
+ // the open failed. It names no issue, so the lane's own stage ends here whatever the driver does next.
328
+ NO_CHILD: "no child launched"
315
329
  };
316
330
  var OPENING = "opening lane";
331
+ var INSTALLING = "installing dependencies";
332
+ var DISPATCHING = "dispatching";
333
+ var LANE_STAGE = { OPENING, INSTALLING, DISPATCHING };
317
334
  function opening_lane(issue) {
318
335
  return `${OPENING} ${issue_cite.plain(issue)}`;
319
336
  }
337
+ function installing(issue) {
338
+ return `${INSTALLING} ${issue_cite.plain(issue)}`;
339
+ }
340
+ function dispatching(issue) {
341
+ return `${DISPATCHING} ${issue_cite.plain(issue)}`;
342
+ }
320
343
  async function emit(text) {
321
344
  await run_event_stream_emit.emit(run_event_stream.EVENT_KIND.SETUP, text);
322
345
  }
323
- function emit_in(repository, text, at) {
346
+ function append_stage(resolve_target, text, at) {
324
347
  try {
325
- const target = run_event_stream.target_of(repository);
326
- run_event_stream.append(target, run_event_stream.EVENT_KIND.SETUP, text, at.toISOString());
348
+ const { SETUP } = run_event_stream.EVENT_KIND;
349
+ run_event_stream.append(resolve_target(), SETUP, text, at.toISOString());
327
350
  } catch (error) {
328
- error_text.trace_swallowed("run_event_setup.emit_in", error);
351
+ error_text.trace_swallowed("run_event_setup.append_stage", error);
329
352
  }
330
353
  }
331
- var run_event_setup = { STAGE, emit, emit_in, opening_lane };
354
+ function emit_in(repository, text, at) {
355
+ append_stage(() => run_event_stream.target_of(repository), text, at);
356
+ }
357
+ function emit_to(target, text, at) {
358
+ append_stage(() => target, text, at);
359
+ }
360
+ var run_event_setup = {
361
+ LANE_STAGE,
362
+ STAGE,
363
+ dispatching,
364
+ emit,
365
+ emit_in,
366
+ emit_to,
367
+ installing,
368
+ opening_lane
369
+ };
332
370
 
333
371
  // scripts/backlog/backlogrun-launch.ts
334
372
  import { z } from "zod";
@@ -406,6 +444,20 @@ function started_for(git_directory, owner_pid) {
406
444
  const started_ms = Date.parse(record.started_at);
407
445
  return Number.isNaN(started_ms) ? void 0 : new Date(started_ms);
408
446
  }
447
+ function signal_parent(pid) {
448
+ try {
449
+ process.kill(pid, "SIGTERM");
450
+ } catch {
451
+ note_to_stderr(`process ${String(pid)} could not be signalled; its launch record is removed.`);
452
+ }
453
+ }
454
+ function stop_parent(git_directory) {
455
+ const record = live_launch(git_directory);
456
+ stamp_file.remove_stamp(launch_path(git_directory));
457
+ if (record === void 0) return void 0;
458
+ signal_parent(record.pid);
459
+ return record.pid;
460
+ }
409
461
  function spawn_parent(argv, provider, target) {
410
462
  const environment = {
411
463
  ...run_headless.environment(),
@@ -440,7 +492,8 @@ var backlogrun_launch = {
440
492
  is_running,
441
493
  pending_launch,
442
494
  start,
443
- started_for
495
+ started_for,
496
+ stop_parent
444
497
  };
445
498
 
446
499
  // scripts/josh/session-language-cli.ts
@@ -3,9 +3,8 @@ import {
3
3
  RUN_LANE_LABEL,
4
4
  RUN_SOLO_LABEL,
5
5
  filing_cap,
6
- git_gh_api_path,
6
+ gh_spawn,
7
7
  git_gh_command,
8
- git_gh_exec,
9
8
  has_label_name,
10
9
  issue_citation,
11
10
  lane_background,
@@ -14,10 +13,7 @@ import {
14
13
  repo_party,
15
14
  run_cut,
16
15
  run_hold
17
- } from "./chunk-GNDJ7NJ7.js";
18
- import {
19
- session_language
20
- } from "./chunk-6V5OPIUU.js";
16
+ } from "./chunk-Y3GKIKGW.js";
21
17
  import {
22
18
  agent_headless,
23
19
  agent_role_profile,
@@ -25,23 +21,24 @@ import {
25
21
  lane_registry,
26
22
  run_event_stream,
27
23
  run_event_stream_emit,
28
- run_headless
29
- } from "./chunk-U32VSRNG.js";
24
+ run_headless,
25
+ session_language
26
+ } from "./chunk-Z4XI7CZS.js";
30
27
  import {
31
28
  timed_fetch
32
- } from "./chunk-FZ6FUSBM.js";
29
+ } from "./chunk-723HKZO5.js";
33
30
  import "./chunk-CDY4NFQG.js";
34
31
  import {
35
32
  hook_decision
36
- } from "./chunk-EBSHN25W.js";
33
+ } from "./chunk-W5ZKGTSY.js";
37
34
  import {
38
35
  time_density_hook,
39
36
  time_hook_transcript,
40
37
  time_reported_failure
41
- } from "./chunk-SL4GQ2XP.js";
38
+ } from "./chunk-MBJYQPEK.js";
42
39
  import {
43
40
  lane_child_marker
44
- } from "./chunk-J3KSS7II.js";
41
+ } from "./chunk-OLMO72ON.js";
45
42
  import {
46
43
  backlog_budget,
47
44
  issue_number_shape,
@@ -50,11 +47,10 @@ import {
50
47
  process_owner_schema,
51
48
  run_carry,
52
49
  run_invocation
53
- } from "./chunk-2YSW3CXH.js";
50
+ } from "./chunk-3C4XRYG6.js";
54
51
  import {
55
- PROJECT_ROOT,
56
52
  stamp_file
57
- } from "./chunk-NEC4AT4Z.js";
53
+ } from "./chunk-DGT54IH5.js";
58
54
 
59
55
  // scripts/hooks/stop-guard.ts
60
56
  import { text } from "node:stream/consumers";
@@ -136,7 +132,7 @@ var lane_seed_policy = {
136
132
  };
137
133
 
138
134
  // scripts/lane/lane-capacity.ts
139
- var DEFAULT_LANE_LIMIT = 6;
135
+ var DEFAULT_LANE_LIMIT = 4;
140
136
  var LANE_LIMIT_KEY = "JOSH_LANE_LIMIT";
141
137
  var POSITIVE_INTEGER = /^[1-9]\d*$/u;
142
138
  var NO_LANES = 0;
@@ -245,8 +241,7 @@ var backlog_stalled = {
245
241
  var NO_FREE = 0;
246
242
  var NONE2 = 0;
247
243
  async function live_lane_count() {
248
- const lanes = await lane_registry.list_lanes();
249
- return lanes.filter((lane) => !lane.is_stranded).length;
244
+ return lane_registry.live_count(await lane_registry.list_lanes());
250
245
  }
251
246
  async function free_under(limit) {
252
247
  return lane_capacity.free_lanes(limit, await live_lane_count());
@@ -320,26 +315,6 @@ var backlog_ready = {
320
315
  ready_line
321
316
  };
322
317
 
323
- // scripts/gh/gh-spawn.ts
324
- var NO_BUDGET = 0;
325
- function fetch_repo_name(timeout_ms) {
326
- const stdout = git_gh_exec.read_gh_api_sync({
327
- path: git_gh_api_path.repo_api_path(),
328
- jq_filter: ".full_name",
329
- cwd: PROJECT_ROOT,
330
- timeout_ms: timeout_ms ?? NO_BUDGET
331
- });
332
- const name = stdout?.trim();
333
- return name === "" ? void 0 : name;
334
- }
335
- function get_repo_name_with_owner() {
336
- return fetch_repo_name(void 0);
337
- }
338
- function get_repo_name_with_owner_within(timeout_ms) {
339
- return fetch_repo_name(timeout_ms);
340
- }
341
- var gh_spawn = { get_repo_name_with_owner, get_repo_name_with_owner_within };
342
-
343
318
  // scripts/notify/telegram-notify.ts
344
319
  import { z } from "zod";
345
320
  var TELEGRAM_API_BASE = "https://api.telegram.org";
package/dist/josh.js CHANGED
@@ -395,6 +395,7 @@ var START_TIME_FORMAT = "lstart=";
395
395
  var PID_FLAG = "-p";
396
396
  var PROBE_ENVIRONMENT = { TZ: "UTC", LC_ALL: "C" };
397
397
  var LIVENESS_SIGNAL = 0;
398
+ var NO_SUCH_PROCESS = "ESRCH";
398
399
  var LOWEST_REAL_PID = 1;
399
400
  var PROC_START_FIELD_INDEX = 19;
400
401
  var BEACON_SCHEME = "socket:";
@@ -409,15 +410,20 @@ var BEACON_GONE_STATUS = 2;
409
410
  var SOCKET_PROBE_SOURCE = `const net=require('node:net');const socket=net.createConnection(process.argv[1]);socket.once('connect',()=>process.exit(${String(BEACON_LIVE_STATUS)}));socket.once('error',(error)=>process.exit(['ECONNREFUSED','ENOENT'].includes(error.code)?${String(BEACON_GONE_STATUS)}:${String(BEACON_UNKNOWN_STATUS)}));socket.setTimeout(1000,()=>process.exit(${String(BEACON_UNKNOWN_STATUS)}));`;
410
411
  var beacons = /* @__PURE__ */ new Map();
411
412
  var exit_cleanup = { is_registered: false };
412
- function is_live_pid(pid) {
413
- if (pid < LOWEST_REAL_PID) return false;
413
+ function signal_refusal(pid) {
414
414
  try {
415
415
  process.kill(pid, LIVENESS_SIGNAL);
416
- return true;
417
- } catch {
418
- return false;
416
+ return void 0;
417
+ } catch (error) {
418
+ return error.code ?? NO_SUCH_PROCESS;
419
419
  }
420
420
  }
421
+ function is_live_pid(pid) {
422
+ return pid >= LOWEST_REAL_PID && signal_refusal(pid) === void 0;
423
+ }
424
+ function is_present_pid(pid) {
425
+ return pid >= LOWEST_REAL_PID && signal_refusal(pid) !== NO_SUCH_PROCESS;
426
+ }
421
427
  function read_proc_start(pid) {
422
428
  try {
423
429
  const stat = readFileSync3(`/proc/${String(pid)}/stat`, "utf8");
@@ -543,6 +549,11 @@ function is_same_process(pid, recorded_start, read2 = read_start) {
543
549
  if (recorded_start === void 0) return void 0;
544
550
  return matches_recorded_start(pid, recorded_start, read2);
545
551
  }
552
+ function is_present_process(pid, recorded_start, read2 = read_start) {
553
+ if (!is_present_pid(pid)) return false;
554
+ if (recorded_start === void 0) return void 0;
555
+ return matches_recorded_start(pid, recorded_start, read2);
556
+ }
546
557
  function is_own_process(pid, recorded_start) {
547
558
  return pid === process.pid && recorded_start === own_start();
548
559
  }
@@ -551,6 +562,8 @@ var process_identity = {
551
562
  is_live_beacon,
552
563
  is_live_pid,
553
564
  is_own_process,
565
+ is_present_pid,
566
+ is_present_process,
554
567
  is_same_process,
555
568
  open_beacon,
556
569
  own_fields,
@@ -1275,10 +1288,10 @@ var BACKLOG_COMMANDS = {
1275
1288
  // Started from a terminal: the `backlogrun` keyword's launcher, and the board.
1276
1289
  backlogrun: {
1277
1290
  script: "scripts/backlog/backlogrun-cli.ts",
1278
- description: "Start a backlogrun in the background and show its board; with one already running, only show the board",
1291
+ description: "Start a backlogrun in the background and show its board; with one already running, only show the board, or replace it when it is idle and the invocation differs; --stop stops it",
1279
1292
  category: "AI tools",
1280
1293
  reference: [
1281
- "[#<n>...] [--only] [--max <n>] [--idle <minutes>] [--agent claude|codex]",
1294
+ "[<n>...] [--only] [--max <n>] [--idle <minutes>] [--agent claude|codex] | --stop",
1282
1295
  "developer",
1283
1296
  ["files", "network", "processes"]
1284
1297
  ]
@@ -1388,6 +1401,12 @@ var GUARD_COMMANDS = {
1388
1401
  // scripts/josh/josh-commands-issue.ts
1389
1402
  var ISSUES_WITH_REPO = "<issue...> [--repo <owner/repo>]";
1390
1403
  var ISSUE_COMMANDS = {
1404
+ "issue:ack": {
1405
+ script: "scripts/issue/issue-ack-cli.ts",
1406
+ description: "Record that the run read a person's update to its issue, printing the update it acknowledges",
1407
+ category: "AI tools",
1408
+ reference: ["<issue>", "automation", ["network"]]
1409
+ },
1391
1410
  "issue:read": {
1392
1411
  script: "scripts/issue/issue-read-cli.ts",
1393
1412
  description: "Print each issue's title, body and every comment on it, in one call",
@@ -1441,16 +1460,16 @@ var ISSUE_COMMANDS = {
1441
1460
  description: "File an Issue with every filing step: lint, Origin, fold, WIP cap, duplicate scout, labels, then epic:bundle",
1442
1461
  category: "AI tools",
1443
1462
  reference: [
1444
- "<title> --body-file <path> --depth <0|1|2> [--route <route>] [--label <name>] [--repo <owner/repo>] [--distinct <N,\u2026>] [--over-cap] [--no-auto-ok] [--requested] [--release]",
1463
+ "<title> --body-file <path> --depth <0|1|2> [--route <route>] [--label <name>] [--repo <owner/repo>] [--distinct <N,\u2026>] [--over-cap] [--no-auto-ok] [--release]",
1445
1464
  "automation",
1446
1465
  ["network"]
1447
1466
  ]
1448
1467
  },
1449
1468
  "issue:release": {
1450
1469
  script: "scripts/issue/issue-release-cli.ts",
1451
- description: "Link an Issue to the repository's open release Issue as its blocker, filing one when none is open",
1470
+ description: "Link an Issue to the repository's open release Issue as its blocker (or, with --wait, as waiting on it), filing one when none is open",
1452
1471
  category: "AI tools",
1453
- reference: ["<issue>", "automation", ["network"]]
1472
+ reference: ["<issue> [--wait]", "automation", ["network"]]
1454
1473
  }
1455
1474
  };
1456
1475
 
@@ -1486,7 +1505,7 @@ var LANE_COMMANDS = {
1486
1505
  },
1487
1506
  "lane:prune": {
1488
1507
  ...LANE_ARGUMENTS,
1489
- description: "Close every lane an interruption left without its work tree, then sweep unregistered leftovers under the lanes root",
1508
+ description: "Close every lane an interruption left without its work tree and every spent lane, then sweep unregistered leftovers under the lanes root",
1490
1509
  category: "AI tools",
1491
1510
  reference: ["", "automation", ["files", "git"]],
1492
1511
  default_script_arguments: ["prune"]
@@ -1518,6 +1537,14 @@ var LANE_COMMANDS = {
1518
1537
  category: "AI tools",
1519
1538
  reference: ["<issue> [--stash <message>]", "automation", ["files", "git", "processes"]]
1520
1539
  },
1540
+ // `.env` is read for `JOSH_LANE_ROOT`, as every lane command reads it, so the lane is found.
1541
+ "lane:restart": {
1542
+ script: "scripts/lane/lane-restart-cli.ts",
1543
+ tsx_arguments: OPTIONAL_ENV_FILE_FLAGS,
1544
+ description: "Stop a running lane child, stash its uncommitted work and re-dispatch its issue in a fresh session \u2014 not counted as an outage or a failure",
1545
+ category: "AI tools",
1546
+ reference: ["<issue>", "developer", ["files", "git", "processes", "network"]]
1547
+ },
1521
1548
  // A live run's lane limit: `.env` is read so the bare form reports the
1522
1549
  // `JOSH_LANE_LIMIT` a person set there when no override stands.
1523
1550
  "lane:limit": {
@@ -1538,7 +1565,7 @@ var LANE_COMMANDS = {
1538
1565
  },
1539
1566
  "lane:stats": {
1540
1567
  ...MEASURE_ARGUMENTS,
1541
- description: "Print one table row of lane throughput, gate duration and machine load over a period, and the per-stage durations of a lane under it",
1568
+ description: "Print one table row of lane throughput, gate duration and machine load over a period, the per-stage durations of a lane under it, and the wait after each ship stop reason under those",
1542
1569
  category: "AI tools",
1543
1570
  reference: ["--period <days> [--limit <lane-limit>]", "maintainer", ["none"]],
1544
1571
  default_script_arguments: ["stats"]
@@ -1727,6 +1754,16 @@ var AI_COMMANDS = {
1727
1754
  category: "AI tools",
1728
1755
  reference: ["[--exclude <n>[,<n>...]] [--label <name>]", "automation", ["network"]]
1729
1756
  },
1757
+ "auto-ok:judge": {
1758
+ script: "scripts/auto-ok/auto-ok-judge-cli.ts",
1759
+ description: "List the open issues backlogrun owes an auto-ok judgement, or record one (--apply / --decline)",
1760
+ category: "AI tools",
1761
+ reference: [
1762
+ "[--apply <n> (--lane | --solo) | --decline <n> --reason <text>]",
1763
+ "automation",
1764
+ ["network"]
1765
+ ]
1766
+ },
1730
1767
  ...BACKLOG_COMMANDS,
1731
1768
  cost: {
1732
1769
  script: "scripts/cost-runtime/cost-cli.ts",
@@ -1905,17 +1942,27 @@ import { availableParallelism as availableParallelism4 } from "node:os";
1905
1942
  // scripts/lib/status-icons.ts
1906
1943
  var FAIL_ICON = "\u2717";
1907
1944
  var PASS_ICON = "\u2714";
1908
- var status_icons = { FAIL_ICON, PASS_ICON };
1945
+ var WARN_ICON = "\u26A0";
1946
+ var status_icons = { FAIL_ICON, PASS_ICON, WARN_ICON };
1909
1947
 
1910
1948
  // scripts/josh/josh-verdict.ts
1911
- var { FAIL_ICON: FAIL_ICON2, PASS_ICON: PASS_ICON2 } = status_icons;
1949
+ var { FAIL_ICON: FAIL_ICON2, PASS_ICON: PASS_ICON2, WARN_ICON: WARN_ICON2 } = status_icons;
1912
1950
  var GATE_SUBJECT = "verification gate";
1913
1951
  var GATE_PASSED_PREFIX = `${PASS_ICON2} ${GATE_SUBJECT} passed`;
1914
1952
  var GATE_FAILED_PREFIX = `${FAIL_ICON2} ${GATE_SUBJECT} failed`;
1953
+ var GATE_UNVERIFIED_PREFIX = `${WARN_ICON2} ${GATE_SUBJECT} not verified`;
1915
1954
  var PASSED_VERDICT = "passed";
1916
1955
  var FAILED_VERDICT = "failed";
1917
- function format_gate_passed(step_count, total) {
1918
- return `${GATE_PASSED_PREFIX} (${step_count} checks) in ${total}.`;
1956
+ var UNVERIFIED_VERDICT = "unverified";
1957
+ function format_counts(counts) {
1958
+ if (counts.skipped === 0) return `${String(counts.ran)} checks`;
1959
+ return `${String(counts.ran)} ran, ${String(counts.skipped)} skipped`;
1960
+ }
1961
+ function format_gate_passed(counts, total) {
1962
+ return `${GATE_PASSED_PREFIX} (${format_counts(counts)}) in ${total}.`;
1963
+ }
1964
+ function format_gate_unverified(skipped, total) {
1965
+ return `${GATE_UNVERIFIED_PREFIX} (0 ran, ${String(skipped)} skipped) in ${total}.`;
1919
1966
  }
1920
1967
  function format_gate_failed(failed_labels, total) {
1921
1968
  return `${GATE_FAILED_PREFIX}: ${failed_labels} (${total})`;
@@ -1930,13 +1977,16 @@ function read_verdict(line) {
1930
1977
  const trimmed = line.trimStart();
1931
1978
  if (trimmed.startsWith(GATE_FAILED_PREFIX)) return FAILED_VERDICT;
1932
1979
  if (trimmed.startsWith(GATE_PASSED_PREFIX)) return PASSED_VERDICT;
1980
+ if (trimmed.startsWith(GATE_UNVERIFIED_PREFIX)) return UNVERIFIED_VERDICT;
1933
1981
  return void 0;
1934
1982
  }
1935
1983
  var josh_verdict = {
1936
1984
  PASSED_VERDICT,
1937
1985
  FAILED_VERDICT,
1986
+ UNVERIFIED_VERDICT,
1938
1987
  format_gate_passed,
1939
1988
  format_gate_failed,
1989
+ format_gate_unverified,
1940
1990
  GATE_OPENING_MARK,
1941
1991
  GATE_OPENING_PREFIX,
1942
1992
  is_gate_opening,
@@ -2269,7 +2319,7 @@ var DEV_COMMANDS = {
2269
2319
  },
2270
2320
  "test:unit": {
2271
2321
  script: "scripts/test/test-unit-guard.ts",
2272
- description: "Run unit tests with Vitest (skips when Vitest is absent; fails when it has no tests)",
2322
+ description: "Run unit tests with Vitest (without Vitest: a basic project runs its own test script, others skip; fails when Vitest has no tests)",
2273
2323
  category: "Development",
2274
2324
  reference: [FILTER_ARGUMENTS, "developer", ["processes"]],
2275
2325
  core_weight: gate_plan.direct_unit_weight,
@@ -2501,7 +2551,7 @@ var PROJECT_COMMANDS = {
2501
2551
  description: "Set a project up for the GitHub Issue workflow, from git init to the setup PR",
2502
2552
  category: "Project",
2503
2553
  reference: [
2504
- `${PROFILE_ARGUMENTS} [--yes] [--github] [--public] [--init-command <command>] [--push-preflight-command <command>]`,
2554
+ `${PROFILE_ARGUMENTS} [--yes] [--github] [--public] [--dry-run] [--init-command <command>] [--push-preflight-command <command>]`,
2505
2555
  "developer",
2506
2556
  ["files", "git", "network", "processes"]
2507
2557
  ]
@@ -2513,12 +2563,28 @@ var PROJECT_COMMANDS = {
2513
2563
  reference: ["<dir>", "automation", ["files", "git"]],
2514
2564
  is_kit_only: true
2515
2565
  },
2566
+ "fresh:run": {
2567
+ script: "scripts/fresh-machine/fresh-machine-cli.ts",
2568
+ description: "Run an install scenario in a Docker container of a machine with nothing installed, and keep the log",
2569
+ category: "Project",
2570
+ reference: [
2571
+ "<pattern> | --spec <file.json> [--package-version <version>] [--log-dir <dir>] [--rebuild] | --list",
2572
+ "maintainer",
2573
+ ["files", "network", "processes"]
2574
+ ]
2575
+ },
2576
+ "auth:setup": {
2577
+ script: "scripts/auth/auth-setup-cli.ts",
2578
+ description: "Save the long-lived Claude Code token `claude setup-token` prints in the macOS keychain, for josh fresh:run",
2579
+ category: "Project",
2580
+ reference: ["[--check]", "maintainer", ["network", "processes"]]
2581
+ },
2516
2582
  init: {
2517
2583
  script: "scripts/init/init.ts",
2518
2584
  description: "Initialize config in a new project",
2519
2585
  category: "Project",
2520
2586
  reference: [
2521
- `${PROFILE_ARGUMENTS} [--no-install]`,
2587
+ `${PROFILE_ARGUMENTS} [--no-install] [--dry-run]`,
2522
2588
  "developer",
2523
2589
  ["files", "network", "processes"]
2524
2590
  ]
@@ -2529,6 +2595,12 @@ var PROJECT_COMMANDS = {
2529
2595
  category: "Project",
2530
2596
  reference: ["", "developer", ["files"]]
2531
2597
  },
2598
+ uninstall: {
2599
+ script: "scripts/uninstall/uninstall.ts",
2600
+ description: "Remove what kit added to a project and list what is left to review by hand",
2601
+ category: "Project",
2602
+ reference: [`${PROFILE_ARGUMENTS} [--yes]`, "developer", ["files", "processes"]]
2603
+ },
2532
2604
  "registry:migrate": {
2533
2605
  script: "scripts/registry-migration/migrate.ts",
2534
2606
  description: "Migrate a project from GitHub Packages to public npm",
@@ -2791,6 +2863,7 @@ var ALIASES = {
2791
2863
  pf: "profile",
2792
2864
  st: "start",
2793
2865
  sy: "sync",
2866
+ un: "uninstall",
2794
2867
  rmi: "registry:migrate",
2795
2868
  g: "git",
2796
2869
  gp: "pr",
@@ -2816,9 +2889,12 @@ var ALIASES = {
2816
2889
  rvf: "review:findings",
2817
2890
  ruv: "rule:value",
2818
2891
  ev: "eval",
2892
+ fr: "fresh:run",
2893
+ as: "auth:setup",
2819
2894
  lsm: "lane:sample",
2820
2895
  lst: "lane:stats",
2821
2896
  lli: "lane:limit",
2897
+ lrs: "lane:restart",
2822
2898
  blr: "backlogrun"
2823
2899
  };
2824
2900
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1387.0",
2
+ "version": "1.1453.0",
3
3
  "name": "@joshuafolkken/kit",
4
4
  "description": "Development toolkit for AI-assisted projects: formatting, AI assistant rules and a Git/GitHub Issue workflow for any repository, plus lint, type check, tests and hooks for Node projects",
5
5
  "keywords": [
@@ -276,6 +276,7 @@
276
276
  },
277
277
  "dependencies": {
278
278
  "cli-spinners": "^3.4.0",
279
+ "csv-parse": "^7.0.3",
279
280
  "execa": "^10.1.0",
280
281
  "js-yaml": "^5.4.3",
281
282
  "jsonc-parser": "^3.3.1",
@@ -284,12 +285,12 @@
284
285
  "string-width": "^8.3.0",
285
286
  "terminal-link": "^5.0.0",
286
287
  "tsx": "^4.23.15",
287
- "zod": "^4.6.5"
288
+ "zod": "^4.6.6"
288
289
  },
289
290
  "devEngines": {
290
291
  "packageManager": {
291
292
  "name": "pnpm",
292
- "version": "12.12.0+sha512.2ee06ac86db554cf384421461220f0e336a487bfd41b2acd04e17a86b1487832fe45e8d1743f7fc52acc77de12d2356b536fedf8229fc483239e40b13d474449",
293
+ "version": "12.12.1+sha512.b7f98934c0b1f29a65f5da52f2d7f994e7faad573ffdddea1497fb4dcb5aec051590ee7c7d95a38172b4bfae103a5b83edf2ee866e11731c2cafa96063610ac5",
293
294
  "onFail": "download"
294
295
  }
295
296
  },
@@ -6,6 +6,7 @@
6
6
  ## 背景
7
7
 
8
8
  <不具合なら `- 種別: 不具合`、そうでなければ `- 種別: 非不具合` を宣言する>
9
+ <人の判断が要らなければ `- 人の判断: 不要`、要るなら `- 人の判断: 要(<方針の判断 / 外部アカウント / 目視確認>)` を宣言する>
9
10
 
10
11
  <なぜ必要か>
11
12
 
@@ -49,15 +50,16 @@
49
50
 
50
51
  ### `## 背景` 直下の宣言と分類ラベル
51
52
 
52
- 起票は `pnpm josh issue:file "<title>" --body-file <本文ファイル> --depth <n>` で行う。本文の検査(`pnpm josh issue:lint <path>` と同じ)と、下表の宣言から決まる分類ラベルの付与は、このコマンドが 1 回の作成リクエストで行う。**宣言を選ぶのは起票者の判断であり、コマンドは単語から推測しない。** 人が依頼した起票(会話での依頼も含む)には `--requested` を付ける(`kickoff.md` → "Words typed after `new`")。
53
+ 起票は `pnpm josh issue:file "<title>" --body-file <本文ファイル> --depth <n>` で行う。本文の検査(`pnpm josh issue:lint <path>` と同じ)と、下表の宣言から決まる分類ラベルの付与は、このコマンドが 1 回の作成リクエストで行う。**宣言を選ぶのは起票者の判断であり、コマンドは単語から推測しない。** `- 人の判断:` の行は必須で、`issue:file` だけが検査し(`issue:lint` は見ない)、`auto-ok` の判定に使う。判定は人が依頼した起票も含めてすべて同じ(`scripts/issue/issue-auto-ok.ts`、`docs/how-to/run-backlog.md`)。**`不要` を宣言する起票には `--label run:lane`(kit 自身の検証の不具合なら `run:solo`)も付ける** — 付いていなければ `issue:file` が拒否する。
53
54
 
54
- | 宣言 | 付くラベル | 選ぶ基準 |
55
- | ---------------------- | ----------------- | ------------------------------------------------------------------------------------------ |
56
- | `- 種別: 不具合` | `bug` | 報告された症状を直す。`- 種別: 非不具合` とどちらか一方を必ず置く |
57
- | `- 目的: 機能追加` | `enhancement` | 新しい機能。不具合修正・文書のみ・依存更新・保守作業には書かない |
58
- | `- 目的: 機能改善` | `enhancement` | 既存機能の改善。目的が曖昧なら期待結果と受け入れ条件を具体化してから選ぶ |
59
- | `- 互換性: 破壊的変更` | `breaking-change` | 既存の利用者・API・設定の契約を変える。移行措置があっても書き、廃止対象と影響を説明する |
60
- | `- 種別: 振る舞い変更` | なし | AI の振る舞いを変える。`## 発火点` / `## ベースライン` / `## 再現` の 3 見出しが必須になる |
55
+ | 宣言 | 付くラベル | 選ぶ基準 |
56
+ | ---------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------- |
57
+ | `- 種別: 不具合` | `bug` | 報告された症状を直す。`- 種別: 非不具合` とどちらか一方を必ず置く |
58
+ | `- 目的: 機能追加` | `enhancement` | 新しい機能。不具合修正・文書のみ・依存更新・保守作業には書かない |
59
+ | `- 目的: 機能改善` | `enhancement` | 既存機能の改善。目的が曖昧なら期待結果と受け入れ条件を具体化してから選ぶ |
60
+ | `- 互換性: 破壊的変更` | `breaking-change` | 既存の利用者・API・設定の契約を変える。移行措置があっても書き、廃止対象と影響を説明する |
61
+ | `- 種別: 振る舞い変更` | なし | AI の振る舞いを変える。`## 発火点` / `## ベースライン` / `## 再現` の 3 見出しが必須になる |
62
+ | `- 人の判断: 不要` | `auto-ok`(除外ラベルがなければ) | 方針の判断・外部アカウント・人の目視確認のどれも要らない。`- 人の判断: 要(<どれか>)` とどちらか一方を必ず置く |
61
63
 
62
64
  - **持ち主の意図と違う動きは、コード・コメント・テストに書かれた設計どおりでも `- 種別: 不具合` とする。** コードは意図を写したもので、意図そのものではない。変更の形(コードか文書か)でも決めない。例: コメントとテストに固定されたまま意図より広く働く自動付与、文書だけでも意図と違う分類を生む基準
63
65
  - **`- 種別: 不具合` の Issue の回帰テストは、利用者が症状を見たのと同じ粒度で書く。** 修正前のツリーでも緑になるテストは `pnpm josh git -y` がコミットを拒否する(joshuafolkken/kit#2448)
package/prompts/review.md CHANGED
@@ -27,6 +27,28 @@ is a verification pass over the fixes, not the first review again
27
27
 
28
28
  ---
29
29
 
30
+ ## Before round 1 — the implementer's self-check
31
+
32
+ **Answer these five over your own diff before the scoped pair that precedes round 1.** A round-1
33
+ High/Medium makes round 2 due, and most of them are of a kind the implementer clears more cheaply
34
+ than a reviewer finds: in a sample of 135 round-1 High/Medium findings, about two in three fell under one of these questions. Fix what an answer turns up; the review, its
35
+ severity tests and the round cap are unchanged.
36
+
37
+ 1. **Tests pin the change** — for each condition, branch or call you added or changed, name the test
38
+ that turns red when it is deleted or inverted, and check its fixture actually reaches that branch
39
+ (no assert on a string the code never draws, no comparison against a literal copy).
40
+ 2. **Prose matches the code** — grep the docs, prompts and comments for the old wording of every
41
+ behavior, constant, command and heading you changed, moved or removed, `"the table above"` and
42
+ rewritten sentences included.
43
+ 3. **Failure is not a negative answer** — every timeout, non-zero exit or `gh` failure on a path you
44
+ touched returns something a caller can tell apart from `false`, `undefined` or "nothing found".
45
+ 4. **Every caller moved with it** — grep every reference to a function, list or command you changed,
46
+ and update each sibling path (the other CLI, the registry, the consumer side) in the same change.
47
+ 5. **The Issue is met on HEAD** — the premises you relied on hold on the current tree, and each
48
+ acceptance criterion is checked off one by one against the diff.
49
+
50
+ ---
51
+
30
52
  ## Review level (decided by `pnpm josh review:brief --level-only`, never by judgement)
31
53
 
32
54
  **Run `pnpm josh review:brief --level-only` and use what it prints** — `low` or `medium`, from the
@@ -78,10 +100,14 @@ round-1 High/Medium finding actually closed — by a fix in this working tree, o
78
100
  positive — and none was filed or deferred. **Without the flag the answer is `required`**, which is also
79
101
  what the command answers to every uncertainty it meets, a missing round-1 snapshot included.
80
102
 
81
- **`skip` has exactly two arms** — **A** (no fix code: the fix delta is empty) and **B** (inert fix
82
- code: every path in the fix delta is inert by the review-level classification above); the reason line
83
- names which fired. Why neither weakens the standard: `docs/maintainers/review-history.md` → "The two
84
- skip arms".
103
+ **`skip` has exactly two arms** — **A** (no fix code: the fix delta is empty) and **B** (a fix that
104
+ leaves what executes unchanged: every path in the fix delta is inert by the review-level classification
105
+ above, `docs/**/*.md`, the root `README.md`, under `prompts/`, or a `.ts` / `.js` / `.svelte` file
106
+ outside `.claude/` whose only change is in comments, a directive comment — lint, type-check, coverage
107
+ or bundler — counting as code); the reason line names which fired. **One path
108
+ outside that set makes the round `required`** — `.claude/**`, `CLAUDE.md`, a test, configuration, a
109
+ code line, or a source file whose comment-free text cannot be read. Why neither arm weakens the
110
+ standard: `docs/maintainers/review-history.md` → "The two skip arms".
85
111
 
86
112
  **A skipped round is recorded on the Issue**, so the condition stays auditable and can be withdrawn if
87
113
  a defect is later traced to a skipped delta: