@joshuafolkken/kit 1.1383.0 → 1.1435.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 (244) 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-steps.md +4 -3
  5. package/.claude/skills/workflow-commands/backlogrun.md +1 -0
  6. package/.claude/skills/workflow-commands/chain-rule.md +4 -2
  7. package/.claude/skills/workflow-commands/issue-comments.md +6 -0
  8. package/.claude/skills/workflow-commands/observation-ledger.md +3 -2
  9. package/.claude/skills/workflow-commands/pre-gate-cut.md +5 -3
  10. package/README.md +25 -0
  11. package/dist/hooks/audit-provision.js +2 -2
  12. package/dist/hooks/batch-guard.js +7 -7
  13. package/dist/hooks/{chunk-LOJTBU5V.js → chunk-2G5F2YCD.js} +3 -3
  14. package/dist/hooks/{chunk-4MGHBTOM.js → chunk-3LE6VLSR.js} +25 -8
  15. package/dist/hooks/{chunk-Y5R47QHU.js → chunk-4BHUPFKF.js} +1 -1
  16. package/dist/hooks/{chunk-KC6LUZZ2.js → chunk-5SJSSCJG.js} +1 -1
  17. package/dist/hooks/{chunk-FZ6FUSBM.js → chunk-723HKZO5.js} +1 -1
  18. package/dist/hooks/{chunk-RYP3TSUJ.js → chunk-7KMN5QB5.js} +3 -3
  19. package/dist/hooks/{chunk-NEC4AT4Z.js → chunk-DGT54IH5.js} +4 -0
  20. package/dist/hooks/{chunk-YKUITFT7.js → chunk-EMB55BDF.js} +4 -4
  21. package/dist/hooks/{chunk-JBBMAPC4.js → chunk-IX6TTTI6.js} +4 -0
  22. package/dist/hooks/{chunk-6MAW7BCM.js → chunk-JXQBK323.js} +2677 -190
  23. package/dist/hooks/{chunk-KCF2YE7O.js → chunk-MSYSUSY6.js} +5 -5
  24. package/dist/hooks/{chunk-LC56R53A.js → chunk-MU4LJFIV.js} +4 -4
  25. package/dist/hooks/{chunk-7VSZ2N4B.js → chunk-QL6QTPWN.js} +3 -3
  26. package/dist/hooks/{chunk-TT742SIO.js → chunk-XER6SSIB.js} +92 -19
  27. package/dist/hooks/{chunk-2X2ART5G.js → chunk-YW452ZAX.js} +500 -29
  28. package/dist/hooks/{chunk-6AC4C2IO.js → chunk-YZXYOAZ3.js} +187 -443
  29. package/dist/hooks/codex-hook-adapter.js +15 -15
  30. package/dist/hooks/duplicate-read-guard.js +8 -8
  31. package/dist/hooks/format-edited.js +5 -5
  32. package/dist/hooks/inputs.json +262 -201
  33. package/dist/hooks/investigation-guard.js +8 -8
  34. package/dist/hooks/pretool-guard.js +14 -14
  35. package/dist/hooks/session-lang.js +124 -15
  36. package/dist/hooks/stop-guard.js +98 -55
  37. package/dist/josh.js +63 -10
  38. package/package.json +4 -3
  39. package/prompts/review.md +22 -0
  40. package/scripts/agent/claude-agent-argv.ts +13 -1
  41. package/scripts/auth/auth-setup-cli.ts +101 -0
  42. package/scripts/auth/claude-token-output.ts +78 -0
  43. package/scripts/auth/claude-token.ts +68 -0
  44. package/scripts/backlog/backlog-drive-cli.ts +2 -4
  45. package/scripts/backlog/backlog-drive-epic.ts +24 -8
  46. package/scripts/backlog/backlog-drive-launch.ts +5 -0
  47. package/scripts/backlog/backlog-drive-named-offer.ts +7 -2
  48. package/scripts/backlog/backlog-drive-named.ts +4 -2
  49. package/scripts/backlog/backlog-drive-owner.ts +72 -5
  50. package/scripts/backlog/backlog-drive-unread.ts +56 -0
  51. package/scripts/backlog/backlog-drive.ts +16 -8
  52. package/scripts/backlog/backlog-overlap.ts +22 -5
  53. package/scripts/backlog/backlog-ready.ts +1 -3
  54. package/scripts/backlog/backlogrun-args.ts +13 -2
  55. package/scripts/backlog/backlogrun-cli.ts +91 -19
  56. package/scripts/backlog/backlogrun-launch.ts +80 -5
  57. package/scripts/backlog/backlogrun-replace.ts +166 -0
  58. package/scripts/backlog/backlogrun-stop.ts +178 -0
  59. package/scripts/behavior/behavior-cli.ts +6 -1
  60. package/scripts/doctor/doctor-io.ts +60 -9
  61. package/scripts/doctor/doctor.ts +20 -1
  62. package/scripts/document/document-byte-budget.ts +3 -3
  63. package/scripts/epic/epic-bundle-cli.ts +8 -8
  64. package/scripts/epic/epic-bundle-referenced.ts +2 -5
  65. package/scripts/epic/epic-bundle.ts +39 -4
  66. package/scripts/exports/unused-members-cli.ts +2 -1
  67. package/scripts/followup/followup-checks-event.ts +82 -0
  68. package/scripts/followup/git-followup-finish.ts +16 -2
  69. package/scripts/followup/git-followup-workflow.ts +5 -2
  70. package/scripts/followup/git-pr-followup-checks.ts +18 -4
  71. package/scripts/followup/git-pr-followup-wrapup.ts +5 -0
  72. package/scripts/followup/git-pr-followup.ts +4 -1
  73. package/scripts/fresh-machine/fresh-machine-cli.ts +204 -0
  74. package/scripts/fresh-machine/fresh-machine-docker.ts +65 -0
  75. package/scripts/fresh-machine/fresh-machine-image.ts +62 -0
  76. package/scripts/fresh-machine/fresh-machine-log.ts +61 -0
  77. package/scripts/fresh-machine/fresh-machine-patterns.ts +130 -0
  78. package/scripts/fresh-machine/fresh-machine-run.ts +215 -0
  79. package/scripts/fresh-machine/fresh-machine-script.ts +45 -0
  80. package/scripts/fresh-machine/fresh-machine-spec.ts +57 -0
  81. package/scripts/fresh-machine/specs/kit-test-backlogrun-python.json +34 -0
  82. package/scripts/fresh-machine/specs/kit-test-backlogrun.json +31 -0
  83. package/scripts/gate/gate-report.ts +70 -15
  84. package/scripts/gate/project-checks.ts +13 -2
  85. package/scripts/gate/scoped-green.ts +2 -1
  86. package/scripts/gate/verification-gate.ts +4 -3
  87. package/scripts/gh/gh-author-association.ts +14 -0
  88. package/scripts/gh/git-gh-conditional.ts +66 -0
  89. package/scripts/gh/git-gh-exec.ts +1 -1
  90. package/scripts/gh/git-gh-issue-read.ts +6 -3
  91. package/scripts/gh/git-gh-issue-write.ts +5 -1
  92. package/scripts/gh/git-gh-issue.ts +4 -1
  93. package/scripts/gh/git-pr-checks-eval.ts +13 -0
  94. package/scripts/gh/git-pr-checks-parse.ts +8 -1
  95. package/scripts/gh/git-pr-checks-watch.ts +11 -4
  96. package/scripts/gh/git-pr-checks.ts +36 -2
  97. package/scripts/git/git-command.ts +16 -4
  98. package/scripts/git/git-schemas.ts +1 -0
  99. package/scripts/git/git-spawn-sync.ts +1 -1
  100. package/scripts/hooks/pretool-guard.ts +3 -1
  101. package/scripts/init/hook-command-rewrite.ts +31 -0
  102. package/scripts/init/init-actions.ts +4 -1
  103. package/scripts/init/init-ai-copy.ts +33 -10
  104. package/scripts/init/init-basic.ts +8 -3
  105. package/scripts/init/init-logic-toolchain.ts +76 -0
  106. package/scripts/init/init-logic.ts +2 -0
  107. package/scripts/init/init.ts +5 -23
  108. package/scripts/init/project-profile.ts +36 -7
  109. package/scripts/init/start-exec.ts +27 -1
  110. package/scripts/init/start-plan.ts +30 -4
  111. package/scripts/init/start-steps.ts +77 -3
  112. package/scripts/init/start.ts +21 -13
  113. package/scripts/init/workflow-mark.ts +35 -0
  114. package/scripts/issue/issue-ack-cli.ts +84 -0
  115. package/scripts/issue/issue-labels.ts +40 -8
  116. package/scripts/issue/issue-state-cli.ts +14 -4
  117. package/scripts/issue/issue-watch-diff.ts +152 -0
  118. package/scripts/issue/issue-watch-gate.ts +81 -0
  119. package/scripts/issue/issue-watch-hook.ts +54 -0
  120. package/scripts/issue/issue-watch.ts +240 -0
  121. package/scripts/issue/measure-rerun-cli.ts +3 -4
  122. package/scripts/josh/josh-command-map.ts +4 -0
  123. package/scripts/josh/josh-commands-backlog.ts +2 -2
  124. package/scripts/josh/josh-commands-development.ts +1 -1
  125. package/scripts/josh/josh-commands-issue.ts +7 -0
  126. package/scripts/josh/josh-commands-lane.ts +11 -2
  127. package/scripts/josh/josh-commands-project.ts +25 -1
  128. package/scripts/josh/josh-verdict.ts +33 -4
  129. package/scripts/lane/claude-lane-broker.ts +142 -0
  130. package/scripts/lane/lane-await.ts +6 -2
  131. package/scripts/lane/lane-cache.ts +37 -7
  132. package/scripts/lane/lane-capacity.ts +8 -6
  133. package/scripts/lane/lane-child-invocation.ts +1 -0
  134. package/scripts/lane/lane-cli.ts +15 -1
  135. package/scripts/lane/lane-close.ts +15 -6
  136. package/scripts/lane/lane-dispatch.ts +36 -10
  137. package/scripts/lane/lane-environment.ts +1 -1
  138. package/scripts/lane/lane-launch-cli.ts +13 -4
  139. package/scripts/lane/lane-ledger.ts +21 -3
  140. package/scripts/lane/lane-measure-cli.ts +10 -2
  141. package/scripts/lane/lane-open.ts +9 -1
  142. package/scripts/lane/lane-preserve.ts +49 -0
  143. package/scripts/lane/lane-reap.ts +20 -5
  144. package/scripts/lane/lane-registry.ts +6 -0
  145. package/scripts/lane/lane-restart-cli.ts +51 -0
  146. package/scripts/lane/lane-restart.ts +175 -0
  147. package/scripts/lane/{openai-review-broker.ts → lane-session-broker.ts} +106 -28
  148. package/scripts/lane/lane-spent.ts +195 -0
  149. package/scripts/lane/lane-stage-stats.ts +27 -3
  150. package/scripts/lane/lane-stop-stats.ts +96 -0
  151. package/scripts/lane/openai-lane-supervisor.ts +2 -2
  152. package/scripts/lane/process-tools.ts +31 -0
  153. package/scripts/lib/buffered-process.ts +36 -2
  154. package/scripts/lib/pnpm-reach.ts +27 -0
  155. package/scripts/lib/status-icons.ts +5 -1
  156. package/scripts/lint/lint-parallel.ts +19 -2
  157. package/scripts/observations/observation-ledger-home.ts +1 -0
  158. package/scripts/review/review-attest-cli.ts +21 -6
  159. package/scripts/review/review-brief-cli.ts +2 -2
  160. package/scripts/review/review-comment-round.ts +114 -0
  161. package/scripts/review/review-record-cli.ts +39 -17
  162. package/scripts/rules/implementation-cut.ts +3 -3
  163. package/scripts/rules/pre-gate-cut.ts +1 -1
  164. package/scripts/run/board/run-board-checks.ts +42 -0
  165. package/scripts/run/board/run-board-cli.ts +2 -0
  166. package/scripts/run/board/run-board-every.ts +3 -1
  167. package/scripts/run/board/run-board-fit.ts +16 -5
  168. package/scripts/run/board/run-board-fresh.ts +64 -0
  169. package/scripts/run/board/run-board-header.ts +139 -37
  170. package/scripts/run/board/run-board-labels.ts +47 -4
  171. package/scripts/run/board/run-board-lane-event.ts +66 -0
  172. package/scripts/run/board/run-board-layout.ts +57 -9
  173. package/scripts/run/board/run-board-now.ts +234 -0
  174. package/scripts/run/board/run-board-operation-read.ts +75 -0
  175. package/scripts/run/board/run-board-operation.ts +150 -0
  176. package/scripts/run/board/run-board-phase.ts +26 -1
  177. package/scripts/run/board/run-board-plan.ts +4 -6
  178. package/scripts/run/board/run-board-read.ts +58 -5
  179. package/scripts/run/board/run-board-reason.ts +124 -0
  180. package/scripts/run/board/run-board-render-checks.ts +55 -0
  181. package/scripts/run/board/run-board-render-legend.ts +12 -3
  182. package/scripts/run/board/run-board-render-slot.ts +2 -2
  183. package/scripts/run/board/run-board-render-tail.ts +128 -0
  184. package/scripts/run/board/run-board-render-thanks.ts +50 -0
  185. package/scripts/run/board/run-board-render-title.ts +58 -0
  186. package/scripts/run/board/run-board-render.ts +96 -80
  187. package/scripts/run/board/run-board-row-yield.ts +32 -0
  188. package/scripts/run/board/run-board-setup.ts +121 -0
  189. package/scripts/run/board/run-board-span.ts +49 -7
  190. package/scripts/run/board/run-board-state.ts +10 -0
  191. package/scripts/run/board/run-board-status.ts +76 -13
  192. package/scripts/run/board/run-board-thanks-csv.ts +71 -0
  193. package/scripts/run/board/run-board-thanks-read.ts +112 -0
  194. package/scripts/run/board/run-board-thanks.ts +53 -0
  195. package/scripts/run/board/run-board-tick.ts +53 -16
  196. package/scripts/run/board/run-board-usual.ts +44 -0
  197. package/scripts/run/carry/run-carry-added.ts +1 -1
  198. package/scripts/run/carry/run-carry-args.ts +9 -1
  199. package/scripts/run/carry/run-carry-change.ts +1 -1
  200. package/scripts/run/carry/run-carry-cli.ts +39 -52
  201. package/scripts/run/carry/run-carry-end.ts +73 -0
  202. package/scripts/run/carry/run-carry-ended.ts +9 -1
  203. package/scripts/run/carry/run-carry.ts +24 -1
  204. package/scripts/run/entry/run-entry-cli.ts +5 -0
  205. package/scripts/run/event/run-event-checks.ts +54 -0
  206. package/scripts/run/event/run-event-render.ts +3 -0
  207. package/scripts/run/event/run-event-scope.ts +1 -0
  208. package/scripts/run/event/run-event-setup.ts +91 -0
  209. package/scripts/run/event/run-event-stream.ts +46 -9
  210. package/scripts/run/merge/run-merge-cli.ts +7 -4
  211. package/scripts/run/merge/run-merge-ship.ts +61 -0
  212. package/scripts/run/merge/run-merge-steps.ts +7 -14
  213. package/scripts/run/merge/run-merge-token.ts +16 -2
  214. package/scripts/run/run-headless.ts +1 -0
  215. package/scripts/run/run-step.ts +2 -0
  216. package/scripts/run/run-stranded-detect.ts +58 -12
  217. package/scripts/run/ship/run-ship-cli.ts +22 -2
  218. package/scripts/run/ship/run-ship-return.ts +31 -13
  219. package/scripts/run/ship/run-ship-review-steps.ts +17 -4
  220. package/scripts/run/ship/run-ship-stage.ts +1 -0
  221. package/scripts/run/wake/run-wake-await.ts +130 -0
  222. package/scripts/run/wake/run-wake-cli.ts +108 -74
  223. package/scripts/run/wake/run-wake-describe.ts +36 -2
  224. package/scripts/run/wake/run-wake-driver.ts +21 -5
  225. package/scripts/run/wake/run-wake-handoff.ts +1 -1
  226. package/scripts/run/wake/run-wake-session.ts +20 -3
  227. package/scripts/run/wake/run-wake-stop.ts +37 -0
  228. package/scripts/run/wake/run-wake-supervise.ts +44 -0
  229. package/scripts/sync/claude-settings-merge.ts +144 -0
  230. package/scripts/sync/sync-ai-files.ts +28 -3
  231. package/scripts/sync/sync.ts +15 -0
  232. package/scripts/test/project-test-script.ts +73 -0
  233. package/scripts/test/skip-marker.ts +14 -1
  234. package/scripts/test/test-related.ts +3 -2
  235. package/scripts/test/test-unit-guard.ts +78 -14
  236. package/scripts/time-runtime/time-reported-failure.ts +11 -3
  237. package/scripts/uninstall/distributed-files.ts +92 -0
  238. package/scripts/uninstall/uninstall-plan.ts +119 -0
  239. package/scripts/uninstall/uninstall-report.ts +61 -0
  240. package/scripts/uninstall/uninstall.ts +206 -0
  241. package/templates/AGENTS.basic.md +4 -0
  242. package/templates/GEMINI.basic.md +6 -0
  243. package/dist/hooks/chunk-6V5OPIUU.js +0 -13
  244. package/scripts/run/board/run-board-track.ts +0 -22
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  investigation_reads
3
- } from "./chunk-7VSZ2N4B.js";
3
+ } from "./chunk-QL6QTPWN.js";
4
4
  import {
5
5
  lane_guard_policy
6
- } from "./chunk-KC6LUZZ2.js";
6
+ } from "./chunk-5SJSSCJG.js";
7
7
  import {
8
8
  hook_decision
9
- } from "./chunk-LC56R53A.js";
9
+ } from "./chunk-MU4LJFIV.js";
10
10
  import {
11
11
  time_spans
12
- } from "./chunk-TT742SIO.js";
12
+ } from "./chunk-XER6SSIB.js";
13
13
  import {
14
14
  json_value
15
- } from "./chunk-4MGHBTOM.js";
15
+ } from "./chunk-3LE6VLSR.js";
16
16
 
17
17
  // scripts/delegation/duplicate-read-guard.ts
18
18
  import { statSync } from "node:fs";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  time_density_hook,
3
3
  time_hook_transcript
4
- } from "./chunk-TT742SIO.js";
4
+ } from "./chunk-XER6SSIB.js";
5
5
  import {
6
6
  josh_environment_file
7
- } from "./chunk-Y5R47QHU.js";
7
+ } from "./chunk-4BHUPFKF.js";
8
8
  import {
9
9
  json_value
10
- } from "./chunk-4MGHBTOM.js";
10
+ } from "./chunk-3LE6VLSR.js";
11
11
  import {
12
12
  stamp_file
13
- } from "./chunk-NEC4AT4Z.js";
13
+ } from "./chunk-DGT54IH5.js";
14
14
 
15
15
  // scripts/josh/hook-decision.ts
16
16
  import { z } from "zod";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  hook_decision
3
- } from "./chunk-LC56R53A.js";
3
+ } from "./chunk-MU4LJFIV.js";
4
4
  import {
5
5
  cost_blocks,
6
6
  time_batch_guard,
7
7
  time_bundle_call,
8
8
  time_shell,
9
9
  time_spans
10
- } from "./chunk-TT742SIO.js";
10
+ } from "./chunk-XER6SSIB.js";
11
11
  import {
12
12
  cost_transcript
13
- } from "./chunk-4MGHBTOM.js";
13
+ } from "./chunk-3LE6VLSR.js";
14
14
 
15
15
  // scripts/delegation/investigation-reads.ts
16
16
  import path2 from "node:path";
@@ -6,12 +6,12 @@ import {
6
6
  process_owner_schema,
7
7
  run_carry,
8
8
  time_instant
9
- } from "./chunk-4MGHBTOM.js";
9
+ } from "./chunk-3LE6VLSR.js";
10
10
  import {
11
11
  PLATFORM_TEMP_ROOT,
12
12
  PROBE_TIMEOUT_MS,
13
13
  stamp_file
14
- } from "./chunk-NEC4AT4Z.js";
14
+ } from "./chunk-DGT54IH5.js";
15
15
 
16
16
  // scripts/cost-runtime/cost-blocks.ts
17
17
  import { z } from "zod";
@@ -147,10 +147,10 @@ var BACKLOG_COMMANDS = {
147
147
  // Started from a terminal: the `backlogrun` keyword's launcher, and the board.
148
148
  backlogrun: {
149
149
  script: "scripts/backlog/backlogrun-cli.ts",
150
- description: "Start a backlogrun in the background and show its board; with one already running, only show the board",
150
+ 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",
151
151
  category: "AI tools",
152
152
  reference: [
153
- "[#<n>...] [--only] [--max <n>] [--idle <minutes>] [--agent claude|codex]",
153
+ "[<n>...] [--only] [--max <n>] [--idle <minutes>] [--agent claude|codex] | --stop",
154
154
  "developer",
155
155
  ["files", "network", "processes"]
156
156
  ]
@@ -260,6 +260,12 @@ var GUARD_COMMANDS = {
260
260
  // scripts/josh/josh-commands-issue.ts
261
261
  var ISSUES_WITH_REPO = "<issue...> [--repo <owner/repo>]";
262
262
  var ISSUE_COMMANDS = {
263
+ "issue:ack": {
264
+ script: "scripts/issue/issue-ack-cli.ts",
265
+ description: "Record that the run read a person's update to its issue, printing the update it acknowledges",
266
+ category: "AI tools",
267
+ reference: ["<issue>", "automation", ["network"]]
268
+ },
263
269
  "issue:read": {
264
270
  script: "scripts/issue/issue-read-cli.ts",
265
271
  description: "Print each issue's title, body and every comment on it, in one call",
@@ -358,7 +364,7 @@ var LANE_COMMANDS = {
358
364
  },
359
365
  "lane:prune": {
360
366
  ...LANE_ARGUMENTS,
361
- description: "Close every lane an interruption left without its work tree, then sweep unregistered leftovers under the lanes root",
367
+ description: "Close every lane an interruption left without its work tree and every spent lane, then sweep unregistered leftovers under the lanes root",
362
368
  category: "AI tools",
363
369
  reference: ["", "automation", ["files", "git"]],
364
370
  default_script_arguments: ["prune"]
@@ -390,6 +396,14 @@ var LANE_COMMANDS = {
390
396
  category: "AI tools",
391
397
  reference: ["<issue> [--stash <message>]", "automation", ["files", "git", "processes"]]
392
398
  },
399
+ // `.env` is read for `JOSH_LANE_ROOT`, as every lane command reads it, so the lane is found.
400
+ "lane:restart": {
401
+ script: "scripts/lane/lane-restart-cli.ts",
402
+ tsx_arguments: OPTIONAL_ENV_FILE_FLAGS,
403
+ 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",
404
+ category: "AI tools",
405
+ reference: ["<issue>", "developer", ["files", "git", "processes", "network"]]
406
+ },
393
407
  // A live run's lane limit: `.env` is read so the bare form reports the
394
408
  // `JOSH_LANE_LIMIT` a person set there when no override stands.
395
409
  "lane:limit": {
@@ -410,7 +424,7 @@ var LANE_COMMANDS = {
410
424
  },
411
425
  "lane:stats": {
412
426
  ...MEASURE_ARGUMENTS,
413
- 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",
427
+ 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",
414
428
  category: "AI tools",
415
429
  reference: ["--period <days> [--limit <lane-limit>]", "maintainer", ["none"]],
416
430
  default_script_arguments: ["stats"]
@@ -1307,17 +1321,27 @@ import { availableParallelism as availableParallelism4 } from "node:os";
1307
1321
  // scripts/lib/status-icons.ts
1308
1322
  var FAIL_ICON = "\u2717";
1309
1323
  var PASS_ICON = "\u2714";
1310
- var status_icons = { FAIL_ICON, PASS_ICON };
1324
+ var WARN_ICON = "\u26A0";
1325
+ var status_icons = { FAIL_ICON, PASS_ICON, WARN_ICON };
1311
1326
 
1312
1327
  // scripts/josh/josh-verdict.ts
1313
- var { FAIL_ICON: FAIL_ICON2, PASS_ICON: PASS_ICON2 } = status_icons;
1328
+ var { FAIL_ICON: FAIL_ICON2, PASS_ICON: PASS_ICON2, WARN_ICON: WARN_ICON2 } = status_icons;
1314
1329
  var GATE_SUBJECT = "verification gate";
1315
1330
  var GATE_PASSED_PREFIX = `${PASS_ICON2} ${GATE_SUBJECT} passed`;
1316
1331
  var GATE_FAILED_PREFIX = `${FAIL_ICON2} ${GATE_SUBJECT} failed`;
1332
+ var GATE_UNVERIFIED_PREFIX = `${WARN_ICON2} ${GATE_SUBJECT} not verified`;
1317
1333
  var PASSED_VERDICT = "passed";
1318
1334
  var FAILED_VERDICT = "failed";
1319
- function format_gate_passed(step_count, total) {
1320
- return `${GATE_PASSED_PREFIX} (${step_count} checks) in ${total}.`;
1335
+ var UNVERIFIED_VERDICT = "unverified";
1336
+ function format_counts(counts) {
1337
+ if (counts.skipped === 0) return `${String(counts.ran)} checks`;
1338
+ return `${String(counts.ran)} ran, ${String(counts.skipped)} skipped`;
1339
+ }
1340
+ function format_gate_passed(counts, total) {
1341
+ return `${GATE_PASSED_PREFIX} (${format_counts(counts)}) in ${total}.`;
1342
+ }
1343
+ function format_gate_unverified(skipped, total) {
1344
+ return `${GATE_UNVERIFIED_PREFIX} (0 ran, ${String(skipped)} skipped) in ${total}.`;
1321
1345
  }
1322
1346
  function format_gate_failed(failed_labels, total) {
1323
1347
  return `${GATE_FAILED_PREFIX}: ${failed_labels} (${total})`;
@@ -1332,13 +1356,16 @@ function read_verdict(line) {
1332
1356
  const trimmed = line.trimStart();
1333
1357
  if (trimmed.startsWith(GATE_FAILED_PREFIX)) return FAILED_VERDICT;
1334
1358
  if (trimmed.startsWith(GATE_PASSED_PREFIX)) return PASSED_VERDICT;
1359
+ if (trimmed.startsWith(GATE_UNVERIFIED_PREFIX)) return UNVERIFIED_VERDICT;
1335
1360
  return void 0;
1336
1361
  }
1337
1362
  var josh_verdict = {
1338
1363
  PASSED_VERDICT,
1339
1364
  FAILED_VERDICT,
1365
+ UNVERIFIED_VERDICT,
1340
1366
  format_gate_passed,
1341
1367
  format_gate_failed,
1368
+ format_gate_unverified,
1342
1369
  GATE_OPENING_MARK,
1343
1370
  GATE_OPENING_PREFIX,
1344
1371
  is_gate_opening,
@@ -1671,7 +1698,7 @@ var DEV_COMMANDS = {
1671
1698
  },
1672
1699
  "test:unit": {
1673
1700
  script: "scripts/test/test-unit-guard.ts",
1674
- description: "Run unit tests with Vitest (skips when Vitest is absent; fails when it has no tests)",
1701
+ description: "Run unit tests with Vitest (without Vitest: a basic project runs its own test script, others skip; fails when Vitest has no tests)",
1675
1702
  category: "Development",
1676
1703
  reference: [FILTER_ARGUMENTS, "developer", ["processes"]],
1677
1704
  core_weight: gate_plan.direct_unit_weight,
@@ -1903,7 +1930,7 @@ var PROJECT_COMMANDS = {
1903
1930
  description: "Set a project up for the GitHub Issue workflow, from git init to the setup PR",
1904
1931
  category: "Project",
1905
1932
  reference: [
1906
- `${PROFILE_ARGUMENTS} [--yes] [--github] [--public] [--init-command <command>]`,
1933
+ `${PROFILE_ARGUMENTS} [--yes] [--github] [--public] [--init-command <command>] [--push-preflight-command <command>]`,
1907
1934
  "developer",
1908
1935
  ["files", "git", "network", "processes"]
1909
1936
  ]
@@ -1915,6 +1942,22 @@ var PROJECT_COMMANDS = {
1915
1942
  reference: ["<dir>", "automation", ["files", "git"]],
1916
1943
  is_kit_only: true
1917
1944
  },
1945
+ "fresh:run": {
1946
+ script: "scripts/fresh-machine/fresh-machine-cli.ts",
1947
+ description: "Run an install scenario in a Docker container of a machine with nothing installed, and keep the log",
1948
+ category: "Project",
1949
+ reference: [
1950
+ "<pattern> | --spec <file.json> [--package-version <version>] [--log-dir <dir>] [--rebuild] | --list",
1951
+ "maintainer",
1952
+ ["files", "network", "processes"]
1953
+ ]
1954
+ },
1955
+ "auth:setup": {
1956
+ script: "scripts/auth/auth-setup-cli.ts",
1957
+ description: "Save the long-lived Claude Code token `claude setup-token` prints in the macOS keychain, for josh fresh:run",
1958
+ category: "Project",
1959
+ reference: ["[--check]", "maintainer", ["network", "processes"]]
1960
+ },
1918
1961
  init: {
1919
1962
  script: "scripts/init/init.ts",
1920
1963
  description: "Initialize config in a new project",
@@ -1931,6 +1974,12 @@ var PROJECT_COMMANDS = {
1931
1974
  category: "Project",
1932
1975
  reference: ["", "developer", ["files"]]
1933
1976
  },
1977
+ uninstall: {
1978
+ script: "scripts/uninstall/uninstall.ts",
1979
+ description: "Remove what kit added to a project and list what is left to review by hand",
1980
+ category: "Project",
1981
+ reference: [`${PROFILE_ARGUMENTS} [--yes]`, "developer", ["files", "processes"]]
1982
+ },
1934
1983
  "registry:migrate": {
1935
1984
  script: "scripts/registry-migration/migrate.ts",
1936
1985
  description: "Migrate a project from GitHub Packages to public npm",
@@ -2184,6 +2233,7 @@ var ALIASES = {
2184
2233
  pf: "profile",
2185
2234
  st: "start",
2186
2235
  sy: "sync",
2236
+ un: "uninstall",
2187
2237
  rmi: "registry:migrate",
2188
2238
  g: "git",
2189
2239
  gp: "pr",
@@ -2209,9 +2259,12 @@ var ALIASES = {
2209
2259
  rvf: "review:findings",
2210
2260
  ruv: "rule:value",
2211
2261
  ev: "eval",
2262
+ fr: "fresh:run",
2263
+ as: "auth:setup",
2212
2264
  lsm: "lane:sample",
2213
2265
  lst: "lane:stats",
2214
2266
  lli: "lane:limit",
2267
+ lrs: "lane:restart",
2215
2268
  blr: "backlogrun"
2216
2269
  };
2217
2270
  function canonical_command(name) {
@@ -2444,7 +2497,8 @@ var rollup_item_schema = z3.looseObject({
2444
2497
  status: z3.string().optional(),
2445
2498
  conclusion: z3.string().optional(),
2446
2499
  name: z3.string().optional(),
2447
- context: z3.string().optional()
2500
+ context: z3.string().optional(),
2501
+ description: z3.string().nullish()
2448
2502
  });
2449
2503
  var pr_raw_schema = z3.object({
2450
2504
  statusCheckRollup: z3.array(rollup_item_schema).optional(),
@@ -2517,6 +2571,7 @@ var KEY_STATUS = "status";
2517
2571
  var KEY_CONCLUSION = "conclusion";
2518
2572
  var KEY_NAME = "name";
2519
2573
  var KEY_CONTEXT = "context";
2574
+ var KEY_DESCRIPTION = "description";
2520
2575
  function read_string(value) {
2521
2576
  if (typeof value !== "string") return void 0;
2522
2577
  const trimmed = value.trim();
@@ -2552,7 +2607,9 @@ function read_rollup_array(parsed) {
2552
2607
  function parse_rollup_item(item) {
2553
2608
  const name = read_string(item[KEY_NAME]) ?? read_string(item[KEY_CONTEXT]);
2554
2609
  if (name === void 0) return void 0;
2555
- return { name, status: parse_rollup_status(item) };
2610
+ const check = { name, status: parse_rollup_status(item) };
2611
+ const description = read_string(item[KEY_DESCRIPTION]);
2612
+ return description === void 0 ? check : { ...check, description };
2556
2613
  }
2557
2614
  function parse_rollup_checks(raw_json) {
2558
2615
  const parsed = json_value.parse_or_undefined(raw_json);
@@ -2693,7 +2750,8 @@ var KIND = {
2693
2750
  GATE: "gate",
2694
2751
  LOAD: "load",
2695
2752
  DISPATCH: "dispatch",
2696
- STAGE: "stage"
2753
+ STAGE: "stage",
2754
+ STOP: "stop"
2697
2755
  };
2698
2756
  var merge_schema = z4.object({ kind: z4.literal(KIND.MERGE), at: z4.string(), issue: z4.number() });
2699
2757
  var gate_schema = z4.object({
@@ -2728,12 +2786,19 @@ var stage_schema = z4.object({
2728
2786
  elapsed_ms: z4.number(),
2729
2787
  issue: z4.number().optional()
2730
2788
  });
2789
+ var stop_schema = z4.object({
2790
+ kind: z4.literal(KIND.STOP),
2791
+ at: z4.string(),
2792
+ issue: z4.number(),
2793
+ reason: z4.string()
2794
+ });
2731
2795
  var entry_schema = z4.discriminatedUnion("kind", [
2732
2796
  merge_schema,
2733
2797
  gate_schema,
2734
2798
  load_schema,
2735
2799
  dispatch_schema,
2736
- stage_schema
2800
+ stage_schema,
2801
+ stop_schema
2737
2802
  ]);
2738
2803
  function target_of(repository) {
2739
2804
  return stamp_file.stamp_path(LEDGER_PREFIX, repository, LEDGER_SUFFIX);
@@ -2779,6 +2844,9 @@ async function record_dispatch(issue, path4) {
2779
2844
  async function record_stage(stage, path4) {
2780
2845
  await record({ kind: KIND.STAGE, at: now_iso(), ...stage }, path4);
2781
2846
  }
2847
+ async function record_stop(stop, path4) {
2848
+ await record({ kind: KIND.STOP, at: now_iso(), ...stop }, path4);
2849
+ }
2782
2850
  function parse_line2(line) {
2783
2851
  return entry_schema.safeParse(json_value.parse_or_undefined(line)).data;
2784
2852
  }
@@ -2800,6 +2868,7 @@ var lane_ledger = {
2800
2868
  record_gate,
2801
2869
  record_merge,
2802
2870
  record_stage,
2871
+ record_stop,
2803
2872
  target,
2804
2873
  target_of
2805
2874
  };
@@ -2984,8 +3053,12 @@ function is_failure_line(line) {
2984
3053
  function is_failed_verdict(line) {
2985
3054
  return josh_verdict.read_verdict(line) === josh_verdict.FAILED_VERDICT;
2986
3055
  }
2987
- function is_passed_verdict(line) {
2988
- return josh_verdict.read_verdict(line) === josh_verdict.PASSED_VERDICT;
3056
+ var GREEN_VERDICTS = /* @__PURE__ */ new Set([
3057
+ josh_verdict.PASSED_VERDICT,
3058
+ josh_verdict.UNVERIFIED_VERDICT
3059
+ ]);
3060
+ function is_green_verdict(line) {
3061
+ return GREEN_VERDICTS.has(josh_verdict.read_verdict(line));
2989
3062
  }
2990
3063
  function new_scan() {
2991
3064
  return {
@@ -3009,7 +3082,7 @@ function note_failure(scan) {
3009
3082
  scan.has_failure_before_region = true;
3010
3083
  }
3011
3084
  function scan_line(scan, line) {
3012
- if (is_passed_verdict(line)) {
3085
+ if (is_green_verdict(line)) {
3013
3086
  close_region(scan);
3014
3087
  return;
3015
3088
  }