@joshuafolkken/kit 1.1010.0 → 1.1050.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/.claude/settings.json +1 -5
  2. package/.claude/skills/dependency-update/SKILL.md +6 -3
  3. package/.claude/skills/epic-commands/SKILL.md +46 -17
  4. package/.claude/skills/verify-ui/SKILL.md +1 -1
  5. package/.claude/skills/workflow-commands/SKILL.md +10 -25
  6. package/.claude/skills/workflow-commands/background-commands.md +1 -1
  7. package/.claude/skills/workflow-commands/backlogrun-child.md +6 -4
  8. package/.claude/skills/workflow-commands/backlogrun-lanes.md +1 -1
  9. package/.claude/skills/workflow-commands/backlogrun-park.md +6 -0
  10. package/.claude/skills/workflow-commands/backlogrun-progress.md +30 -36
  11. package/.claude/skills/workflow-commands/backlogrun-steps.md +16 -16
  12. package/.claude/skills/workflow-commands/backlogrun.md +3 -12
  13. package/.claude/skills/workflow-commands/chain-rule.md +2 -2
  14. package/.claude/skills/workflow-commands/followup-reference.md +2 -2
  15. package/.claude/skills/workflow-commands/fullrun-steps.md +4 -3
  16. package/.claude/skills/workflow-commands/fullrun.md +1 -1
  17. package/.claude/skills/workflow-commands/halfrun.md +2 -1
  18. package/.claude/skills/workflow-commands/into-target.md +1 -1
  19. package/.claude/skills/workflow-commands/issue-comments.md +1 -1
  20. package/.claude/skills/workflow-commands/observation-filing.md +80 -126
  21. package/.claude/skills/workflow-commands/pre-gate-cut.md +33 -36
  22. package/.claude/skills/workflow-commands/prerequisite.md +1 -1
  23. package/.claude/skills/workflow-commands/working-tree-hold.md +2 -2
  24. package/.codex/hooks.json +1 -5
  25. package/.github/workflows/auto-tag.yml +21 -0
  26. package/.github/workflows/publish.yml +9 -10
  27. package/.github/workflows/sonar-qube.yml +1 -1
  28. package/AGENTS.md +4 -25
  29. package/CLAUDE.md +24 -38
  30. package/GEMINI.md +4 -24
  31. package/README.md +22 -56
  32. package/dist/CLAUDE.md +24 -38
  33. package/dist/hooks/batch-guard.js +4 -4
  34. package/dist/hooks/{chunk-6PSTVOLH.js → chunk-5BK3K7V4.js} +114 -90
  35. package/dist/hooks/{chunk-PAXMLGSS.js → chunk-7VPDUBRN.js} +93 -175
  36. package/dist/hooks/{chunk-KPZN42RT.js → chunk-DMQN45FN.js} +3 -3
  37. package/dist/hooks/{chunk-WMIR5SNX.js → chunk-EJDX2TOB.js} +13 -3
  38. package/dist/hooks/{chunk-A2H5I2VD.js → chunk-GQ7KP45M.js} +2 -2
  39. package/dist/hooks/{chunk-4GDR2YTV.js → chunk-HJIISEAC.js} +4 -4
  40. package/dist/hooks/{chunk-AWTFKKFW.js → chunk-NAS4C7GP.js} +6 -33
  41. package/dist/hooks/{chunk-56LGMJJV.js → chunk-NJQOBE6L.js} +2 -2
  42. package/dist/hooks/{chunk-EZLHXKJ6.js → chunk-RLDX5SOC.js} +1222 -941
  43. package/dist/hooks/{chunk-GBJUERYK.js → chunk-WQ4OSBSS.js} +10 -3
  44. package/dist/hooks/codex-hook-adapter.js +10 -10
  45. package/dist/hooks/duplicate-read-guard.js +5 -5
  46. package/dist/hooks/format-edited.js +15 -34
  47. package/dist/hooks/investigation-guard.js +5 -5
  48. package/dist/hooks/pretool-guard.js +23 -16
  49. package/dist/hooks/stop-guard.js +21 -200
  50. package/dist/josh.js +42 -125
  51. package/dist/version/index.js +466 -42
  52. package/eslint/base.js +2 -11
  53. package/package.json +36 -10
  54. package/prompts/coding-standards.md +15 -290
  55. package/prompts/collaboration-workflow/cross-repo-epic.md +2 -51
  56. package/prompts/collaboration-workflow/epic-audit.md +2 -53
  57. package/prompts/collaboration-workflow/epic-bundle.md +2 -106
  58. package/prompts/collaboration-workflow/file-edits.md +6 -53
  59. package/prompts/collaboration-workflow/issue-template.md +4 -4
  60. package/prompts/collaboration-workflow/operating-rules.md +18 -75
  61. package/prompts/collaboration-workflow/principles.md +74 -0
  62. package/prompts/collaboration-workflow/residency.md +55 -15
  63. package/prompts/collaboration-workflow/rule-delivery.md +5 -46
  64. package/prompts/collaboration-workflow/shell-body.md +7 -9
  65. package/prompts/collaboration-workflow/turn-batching.md +21 -37
  66. package/prompts/collaboration-workflow/upstream-interrupt.md +1 -1
  67. package/prompts/collaboration-workflow/wip-cap.md +15 -18
  68. package/prompts/collaboration-workflow.md +22 -28
  69. package/prompts/sonar-hotspot-handling.md +1 -1
  70. package/scripts/adopt/adopt-logic.ts +2 -2
  71. package/scripts/adopt/adopt-toolkits.ts +3 -1
  72. package/scripts/adopt/adopt.ts +2 -2
  73. package/scripts/agent/agent-event.ts +2 -9
  74. package/scripts/agent/agent-exit-record.ts +2 -9
  75. package/scripts/auto-ok/auto-ok-cli.ts +9 -9
  76. package/scripts/backlog/backlog-budget-cli.ts +2 -6
  77. package/scripts/backlog/backlog-drive-cli.ts +20 -10
  78. package/scripts/backlog/backlog-drive.ts +50 -16
  79. package/scripts/backlog/backlog-next.ts +24 -8
  80. package/scripts/backlog/backlog-offer-cli.ts +6 -5
  81. package/scripts/backlog/backlog-plan-cli.ts +5 -1
  82. package/scripts/backlog/backlog-plan.ts +1 -1
  83. package/scripts/backlog/backlog-pool.ts +31 -11
  84. package/scripts/backlog/backlog-rank.ts +106 -0
  85. package/scripts/backlog/backlog-waves.ts +42 -29
  86. package/scripts/build/build-bin.ts +2 -1
  87. package/scripts/build/build-config-merge.ts +2 -1
  88. package/scripts/build/build-hooks.ts +31 -6
  89. package/scripts/build/build-managed-marker.ts +2 -1
  90. package/scripts/build/build-self-sync-guard.ts +2 -1
  91. package/scripts/build/build-version.ts +2 -1
  92. package/scripts/cases/cases-logic.ts +2 -6
  93. package/scripts/ci/pr-classification.ts +13 -11
  94. package/scripts/cost-runtime/cost-transcript.ts +4 -11
  95. package/scripts/delegation/delegation-policy.ts +11 -0
  96. package/scripts/doctor/doctor-consumer.ts +5 -12
  97. package/scripts/doctor/doctor-ports.ts +2 -2
  98. package/scripts/document/document-byte-budget.ts +13 -21
  99. package/scripts/document/document-section.ts +2 -6
  100. package/scripts/document/entry-read-budget.ts +6 -5
  101. package/scripts/{git/git-epic-add-body.ts → epic/epic-add-body.ts} +23 -23
  102. package/scripts/{git/git-epic-add-plan.ts → epic/epic-add-plan.ts} +23 -26
  103. package/scripts/{git/git-epic-add.ts → epic/epic-add.ts} +17 -17
  104. package/scripts/epic/epic-audit-cli.ts +4 -4
  105. package/scripts/epic/epic-audit-orphans.ts +2 -2
  106. package/scripts/epic/epic-audit-rationale.ts +1 -1
  107. package/scripts/epic/epic-audit.ts +1 -1
  108. package/scripts/{git/git-epic-body.ts → epic/epic-body.ts} +6 -6
  109. package/scripts/epic/epic-bundle-cli.ts +1 -1
  110. package/scripts/epic/epic-bundle.ts +2 -2
  111. package/scripts/epic/epic-candidate-confirm.ts +2 -1
  112. package/scripts/{git/git-epic-chains.ts → epic/epic-chains.ts} +4 -4
  113. package/{scripts-ai → scripts/epic}/epic-check.ts +5 -4
  114. package/{scripts-ai → scripts/epic}/epic-cli.ts +4 -4
  115. package/scripts/{git/git-epic-close-comment.ts → epic/epic-close-comment.ts} +9 -9
  116. package/scripts/{git/git-epic-close.ts → epic/epic-close.ts} +23 -19
  117. package/scripts/epic/epic-cross-repo.ts +21 -38
  118. package/scripts/{git/git-epic-decision.ts → epic/epic-decision.ts} +12 -14
  119. package/scripts/epic/epic-fetch.ts +3 -3
  120. package/scripts/epic/epic-graph.ts +3 -3
  121. package/scripts/epic/epic-index.ts +2 -2
  122. package/scripts/epic/epic-issue.ts +1 -1
  123. package/scripts/epic/epic-lane-offer.ts +11 -22
  124. package/scripts/epic/epic-next.ts +3 -3
  125. package/scripts/{git/git-epic-parse.ts → epic/epic-parse.ts} +3 -3
  126. package/scripts/{git/git-epic-promote.ts → epic/epic-promote.ts} +10 -10
  127. package/scripts/epic/epic-rank.ts +37 -0
  128. package/scripts/{git/git-epic-read.ts → epic/epic-read.ts} +9 -9
  129. package/scripts/{git/git-epic-reconcile.ts → epic/epic-reconcile.ts} +18 -20
  130. package/scripts/{git/git-epic-reference.ts → epic/epic-reference.ts} +4 -23
  131. package/scripts/epic/epic-relation-recheck.ts +4 -3
  132. package/scripts/{git/git-epic-relations.ts → epic/epic-relations.ts} +5 -5
  133. package/scripts/{git/git-epic-remove-plan.ts → epic/epic-remove-plan.ts} +17 -19
  134. package/scripts/{git/git-epic-remove.ts → epic/epic-remove.ts} +13 -13
  135. package/scripts/{git/git-epic-run.ts → epic/epic-run.ts} +27 -27
  136. package/scripts/{git/git-epic-sections.ts → epic/epic-sections.ts} +6 -6
  137. package/scripts/{git/git-epic-shape.ts → epic/epic-shape.ts} +7 -7
  138. package/scripts/epic/epic-solo.ts +29 -28
  139. package/scripts/{git/git-epic-validate.ts → epic/epic-validate.ts} +13 -13
  140. package/{scripts-ai → scripts/epic}/epic.ts +17 -16
  141. package/scripts/gh/fix-gh-packages.ts +2 -1
  142. package/scripts/gh/gh-spawn.ts +12 -10
  143. package/scripts/git/constants.ts +1 -1
  144. package/scripts/git/git-branch.ts +10 -1
  145. package/scripts/git/git-command.ts +2 -2
  146. package/scripts/git/git-error.ts +2 -5
  147. package/scripts/git/git-execa-error.ts +6 -1
  148. package/{scripts-ai → scripts/git}/git-followup-finish.ts +7 -7
  149. package/scripts/git/git-followup-flush.ts +74 -48
  150. package/scripts/git/git-followup-issue-close.ts +2 -2
  151. package/scripts/git/git-followup-label.ts +1 -1
  152. package/scripts/git/git-followup-pending.ts +1 -1
  153. package/{scripts-ai → scripts/git}/git-followup-workflow.ts +23 -11
  154. package/scripts/git/git-gh-exec.ts +85 -26
  155. package/scripts/git/git-gh-issue-read.ts +2 -2
  156. package/scripts/git/git-gh-issue-rest.ts +2 -2
  157. package/scripts/git/git-gh-issue-write.ts +6 -6
  158. package/scripts/git/git-gh-pr-read.ts +0 -21
  159. package/scripts/git/git-gh-pr.ts +2 -23
  160. package/scripts/git/git-next-issues.ts +34 -5
  161. package/scripts/git/git-pr-followup-wrapup.ts +2 -6
  162. package/scripts/git/git-preflight.ts +25 -10
  163. package/scripts/git/git-push-transport.ts +12 -69
  164. package/scripts/git/git-spawn.ts +79 -3
  165. package/scripts/git/git-ssh-keepalive.ts +74 -0
  166. package/scripts/git/git-staging.ts +21 -9
  167. package/{scripts-ai → scripts/git}/git-workflow.ts +11 -11
  168. package/scripts/git/github-issue-url.ts +1 -1
  169. package/scripts/git/gone-branch.ts +3 -2
  170. package/scripts/git/issue-labels.ts +13 -1
  171. package/scripts/git/issue-rank.ts +89 -0
  172. package/scripts/git/issue-reference.ts +19 -0
  173. package/scripts/git/main-merge.ts +2 -1
  174. package/scripts/git/main-sync.ts +3 -2
  175. package/scripts/git/schemas.ts +1 -1
  176. package/scripts/git/stash-pop-args.ts +7 -13
  177. package/scripts/git/stash-pop-cli.ts +2 -1
  178. package/{scripts-ai → scripts/git}/telegram-test-logic.ts +2 -2
  179. package/{scripts-ai → scripts/git}/telegram-test.ts +7 -7
  180. package/scripts/hooks/format-edited-cli.ts +15 -0
  181. package/scripts/hooks/format-edited-file.ts +2 -9
  182. package/scripts/hooks/format-rewrite-notice.ts +2 -8
  183. package/scripts/hooks/pretool-guard-cli.ts +21 -0
  184. package/scripts/hooks/pretool-guard.ts +14 -15
  185. package/scripts/init/init-ai-copy.ts +2 -5
  186. package/scripts/init/init.ts +8 -4
  187. package/scripts/init/start-exec.ts +7 -1
  188. package/scripts/init/start-plan.ts +18 -5
  189. package/scripts/init/start-setup-pr.ts +46 -19
  190. package/scripts/init/start-steps.ts +43 -10
  191. package/scripts/init/start.ts +42 -11
  192. package/scripts/issue/issue-cite.ts +19 -1
  193. package/scripts/issue/issue-comment-cli.ts +2 -1
  194. package/scripts/issue/issue-file-cli.ts +2 -1
  195. package/scripts/issue/issue-fold-cli.ts +9 -16
  196. package/scripts/issue/issue-scout-cli.ts +8 -13
  197. package/scripts/issue/measure-rerun-cli.ts +7 -6
  198. package/scripts/josh/josh-command-map.ts +0 -102
  199. package/scripts/josh/josh-commands-ai.ts +2 -2
  200. package/scripts/josh/josh-commands-backlog.ts +1 -1
  201. package/scripts/josh/josh-commands-development.ts +3 -3
  202. package/scripts/josh/josh-commands-project.ts +1 -1
  203. package/scripts/josh/josh-commands-workflow.ts +4 -4
  204. package/scripts/lane/lane-child-marker.ts +16 -2
  205. package/scripts/lane/lane-cli.ts +34 -15
  206. package/scripts/lane/lane-open.ts +3 -2
  207. package/scripts/lane/lane-registry.ts +3 -6
  208. package/scripts/lane/lane-report.ts +10 -4
  209. package/scripts/lib/cli-flags.ts +20 -2
  210. package/scripts/lib/error-message.ts +9 -0
  211. package/scripts/lib/read-file.ts +26 -2
  212. package/scripts/observations/observation-ledger-home.ts +98 -26
  213. package/scripts/observations/observation-ledger-migrate.ts +26 -21
  214. package/scripts/observations/observation-ledger-prepare.ts +10 -20
  215. package/scripts/observations/observation-ledger.ts +58 -25
  216. package/scripts/observations/observations-flush-cli.ts +6 -23
  217. package/scripts/observations/observations-flush-landing.ts +2 -1
  218. package/scripts/observations/observations-flush.ts +29 -20
  219. package/scripts/package/package-scout-cli.ts +8 -16
  220. package/scripts/ports/port-command.ts +2 -1
  221. package/scripts/propagate/propagate-plan.ts +185 -0
  222. package/scripts/propagate/propagate-publish.ts +6 -7
  223. package/scripts/propagate/propagate-run.ts +5 -1
  224. package/scripts/propagate/propagate-steps.ts +18 -2
  225. package/scripts/propagate/propagate-targets.ts +13 -2
  226. package/scripts/propagate/propagate.ts +63 -44
  227. package/scripts/refactor/import-graph.ts +2 -6
  228. package/scripts/registry-migration/migrate-logic.ts +1 -0
  229. package/scripts/registry-migration/migrate.ts +3 -2
  230. package/scripts/registry-migration/user-npmrc.ts +2 -2
  231. package/scripts/release/github-release.ts +1 -1
  232. package/scripts/release/release-cli.ts +2 -1
  233. package/scripts/repo/repo-setting.ts +10 -8
  234. package/scripts/review/review-attest.ts +44 -0
  235. package/scripts/review/review-brief-cli.ts +49 -2
  236. package/scripts/review/review-brief.ts +46 -1
  237. package/scripts/review/review-finding-ledger.ts +3 -3
  238. package/scripts/review/review-findings-cli.ts +4 -11
  239. package/scripts/review/review-record-cli.ts +14 -11
  240. package/scripts/review/review-record.ts +6 -16
  241. package/scripts/review/review-stamps.ts +7 -0
  242. package/scripts/rules/decision-oracle.ts +2 -2
  243. package/scripts/rules/implementation-cut.ts +1 -1
  244. package/scripts/rules/issue-fold.ts +1 -2
  245. package/scripts/rules/lane-carry-conflict.ts +1 -2
  246. package/scripts/rules/lane-park.ts +1 -2
  247. package/scripts/rules/pre-gate-cut.ts +2 -2
  248. package/scripts/rules/rule-body-guard.ts +2 -2
  249. package/scripts/rules/rule-value-cache.ts +99 -0
  250. package/scripts/rules/rule-value-cli.ts +10 -9
  251. package/scripts/rules/rule-value.ts +1 -1
  252. package/scripts/run/run-carry-args.ts +2 -6
  253. package/scripts/run/run-carry-cli.ts +5 -7
  254. package/scripts/run/run-cut-args.ts +7 -13
  255. package/scripts/run/run-ending-cli.ts +4 -7
  256. package/scripts/run/run-event-stream.ts +2 -5
  257. package/scripts/run/run-headless.ts +22 -6
  258. package/scripts/run/run-liveness-cli.ts +4 -7
  259. package/scripts/run/run-parent-cut-hook.ts +144 -0
  260. package/scripts/run/run-progress-args.ts +2 -6
  261. package/scripts/run/run-progress-cli.ts +2 -1
  262. package/scripts/run/run-progress-read.ts +2 -1
  263. package/scripts/run/run-progress.ts +21 -8
  264. package/scripts/run/run-ship-cli.ts +6 -74
  265. package/scripts/run/run-ship-preflight.ts +87 -0
  266. package/scripts/run/run-ship-review-steps.ts +5 -26
  267. package/scripts/run/run-ship-review.ts +9 -0
  268. package/scripts/run/run-ship-scoped.ts +44 -0
  269. package/scripts/run/run-ship-stage.ts +5 -1
  270. package/scripts/run/run-ship-steps.ts +105 -0
  271. package/scripts/run/run-ship.ts +2 -0
  272. package/scripts/run/run-tail-cli.ts +3 -3
  273. package/scripts/run/run-tidy-stashes.ts +7 -14
  274. package/scripts/run/run-wake-cli.ts +4 -8
  275. package/scripts/run/run-wake-describe.ts +19 -1
  276. package/scripts/run/run-wake-driver.ts +15 -2
  277. package/scripts/run/run-wake-session.ts +14 -4
  278. package/scripts/run/run-watcher-hook.ts +1 -1
  279. package/scripts/safe-chain/project-config.ts +3 -6
  280. package/scripts/security/security-audit-provision.ts +6 -7
  281. package/scripts/sonar/sonar-hotspots-cli.ts +2 -1
  282. package/scripts/sync/directory-copy-guard.ts +2 -1
  283. package/scripts/sync/sync-ai-files.ts +3 -3
  284. package/scripts/sync/template-source-logic.ts +3 -4
  285. package/scripts/test/e2e-retry-check.ts +3 -6
  286. package/scripts/time-runtime/time-bundle-call.ts +2 -2
  287. package/scripts/ui/ui-routes-cli.ts +3 -6
  288. package/scripts/version/bump-version.ts +2 -1
  289. package/scripts/version/npm-registry.ts +97 -0
  290. package/scripts/version/version-commands.ts +5 -4
  291. package/scripts/version/version-remote.ts +38 -33
  292. package/scripts/version/version-targets.ts +3 -3
  293. package/.claude/skills/workflow-commands/rule-residency.md +0 -267
  294. package/evals/scenarios/consult-not-execute.json +0 -20
  295. package/evals/scenarios/no-implicit-workflow.json +0 -26
  296. package/evals/scenarios/overrides-both-locations.json +0 -29
  297. package/evals/scenarios/upstream-interrupt.json +0 -23
  298. package/evals/scenarios/workflow-skill-loaded.json +0 -16
  299. package/prompts/agent-lint-protocol.json +0 -79
  300. package/prompts/agent-rules.md +0 -63
  301. package/prompts/collaboration-workflow/consultation-vs-execution.md +0 -8
  302. package/prompts/collaboration-workflow/distributed-docs.md +0 -7
  303. package/prompts/collaboration-workflow/durable-rules.md +0 -24
  304. package/prompts/collaboration-workflow/latest-first.md +0 -14
  305. package/prompts/collaboration-workflow/no-clones.md +0 -11
  306. package/prompts/collaboration-workflow/simplicity-first.md +0 -9
  307. package/prompts/collaboration-workflow/single-source-rules.md +0 -13
  308. package/scripts/build/shim-shell.ts +0 -25
  309. package/scripts/claude/skill-meta.ts +0 -37
  310. package/scripts/document/document-scan.ts +0 -108
  311. package/scripts/document/generate-catalog.ts +0 -69
  312. package/scripts/document/retired-phrases.ts +0 -143
  313. package/scripts/document/review-agent-type.ts +0 -46
  314. package/scripts/document/single-source.ts +0 -73
  315. package/scripts/git/git-fixture-workspace.ts +0 -88
  316. package/scripts/hooks/format-edited-file-fixtures.ts +0 -109
  317. package/scripts/hooks/prompt-hooks.ts +0 -38
  318. package/scripts/init/hook-command-bootstrap.ts +0 -83
  319. package/scripts/issue/issue-logic.ts +0 -50
  320. package/scripts/josh/__snapshots__/josh-command-map.test.ts.snap +0 -1227
  321. package/scripts/josh/josh-script-reader.ts +0 -11
  322. package/scripts/package/production-dependency-graph.ts +0 -68
  323. package/scripts/retrospective/retrospective-cli.ts +0 -97
  324. package/scripts/retrospective/retrospective.ts +0 -127
  325. package/scripts/rules/delivered-rules-harness.ts +0 -72
  326. package/scripts/rules/top-level-scripts-guard.ts +0 -47
  327. package/scripts/run/run-carry-flush.ts +0 -58
  328. package/scripts/run/run-transcript.golden.txt +0 -57
  329. package/scripts/run/run-wake-work.ts +0 -108
  330. package/scripts/sync/dependabot-pin-logic.ts +0 -135
  331. package/scripts/test/classify-isolation.ts +0 -149
  332. package/scripts/test/http-fault-injection.ts +0 -79
  333. package/scripts/test/josh-harness-environment.ts +0 -260
  334. package/scripts/test/josh-harness.ts +0 -96
  335. package/scripts/test/pilot-files.ts +0 -452
  336. package/scripts/test/pilot-measure.ts +0 -78
  337. package/scripts/test/test-network-guard.ts +0 -453
  338. package/scripts/test/test-repository-guard.ts +0 -317
  339. package/scripts/test/test-state-guard.ts +0 -85
  340. package/scripts/test/test-stdout-guard.ts +0 -54
  341. package/scripts/test/test-telegram-guard.ts +0 -90
  342. package/scripts/test/unit-guard-environment.ts +0 -12
  343. package/scripts/test/unit-projects.ts +0 -139
  344. package/scripts/test/vitest-include-globs.ts +0 -12
  345. package/scripts/time-runtime/time-batch-guard-fixtures.ts +0 -66
  346. package/scripts-ai/completion-gate.ts +0 -13
  347. package/scripts-ai/environment-loader.ts +0 -9
  348. /package/{scripts-ai → scripts/epic}/epic-cli-argv.ts +0 -0
  349. /package/{scripts-ai → scripts/epic}/epic-cli-remove.ts +0 -0
  350. /package/{scripts-ai → scripts/git}/followup-issue-number.ts +0 -0
package/dist/josh.js CHANGED
@@ -1,9 +1,35 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // scripts/doctor/doctor-consumer.ts
4
- import { existsSync, readFileSync } from "node:fs";
4
+ import { existsSync } from "node:fs";
5
5
  import path from "node:path";
6
6
 
7
+ // scripts/lib/read-file.ts
8
+ import { readFileSync } from "node:fs";
9
+ var ABSENT_CODE = "ENOENT";
10
+ function is_absent(error) {
11
+ return error instanceof Error && "code" in error && error.code === ABSENT_CODE;
12
+ }
13
+ function read_optional(path5) {
14
+ try {
15
+ return readFileSync(path5, "utf8");
16
+ } catch (error) {
17
+ if (is_absent(error)) return void 0;
18
+ throw error;
19
+ }
20
+ }
21
+ function read_file_or_empty(path5) {
22
+ return read_optional(path5) ?? "";
23
+ }
24
+ function read_if_readable(path5) {
25
+ try {
26
+ return readFileSync(path5, "utf8");
27
+ } catch {
28
+ return void 0;
29
+ }
30
+ }
31
+ var file_reader = { read_optional, read_file_or_empty, read_if_readable };
32
+
7
33
  // scripts/lib/spawn-exit.ts
8
34
  var SPAWN_ERROR_EXIT_CODE = 2;
9
35
  var SIGNAL_KILL_EXIT_CODE = 1;
@@ -50,15 +76,8 @@ var settings_schema = z.object({
50
76
  var STATE_OK = "ok";
51
77
  var STATE_TARGET_MISSING = "target-missing";
52
78
  var STATE_MISSING = "missing";
53
- function read_optional(file_path) {
54
- try {
55
- return existsSync(file_path) ? readFileSync(file_path, "utf8") : void 0;
56
- } catch {
57
- return void 0;
58
- }
59
- }
60
79
  function parse_manifest(root) {
61
- const content = read_optional(path.join(root, "package.json"));
80
+ const content = file_reader.read_if_readable(path.join(root, "package.json"));
62
81
  if (content === void 0) return void 0;
63
82
  const parsed = manifest_schema.safeParse(safe_json_parse(content));
64
83
  return parsed.success ? parsed.data : void 0;
@@ -73,7 +92,7 @@ function is_kit_consumer(root) {
73
92
  return lists_kit_dependency(manifest) || existsSync(path.join(root, NODE_MODULES, KIT_PACKAGE_NAME));
74
93
  }
75
94
  function is_plugin_declared(root) {
76
- const content = read_optional(path.join(root, SETTINGS_PATH));
95
+ const content = file_reader.read_if_readable(path.join(root, SETTINGS_PATH));
77
96
  if (content === void 0) return false;
78
97
  const parsed = settings_schema.safeParse(safe_json_parse(content));
79
98
  return parsed.success && parsed.data.enabledPlugins?.[PLUGIN_ID] === true;
@@ -87,7 +106,7 @@ function configured_hooks_path(root) {
87
106
  return value === "" ? void 0 : value;
88
107
  }
89
108
  function claude_md_state(root) {
90
- const content = read_optional(path.join(root, CLAUDE_MD));
109
+ const content = file_reader.read_if_readable(path.join(root, CLAUDE_MD));
91
110
  if (content === void 0) return STATE_MISSING;
92
111
  if (!content.includes(CLAUDE_MD_POINTER)) return STATE_OK;
93
112
  return existsSync(path.join(root, NODE_MODULES, KIT_PACKAGE_NAME, "dist", CLAUDE_MD)) ? STATE_OK : STATE_TARGET_MISSING;
@@ -313,7 +332,7 @@ var BACKLOG_COMMANDS = {
313
332
  script: "scripts/backlog/backlog-offer-cli.ts",
314
333
  description: "Collapse a backlogrun loop-head event into one call: read backlog:next, ask backlog:budget, return the verdict and any issues to start",
315
334
  category: "AI tools",
316
- reference: ["[options]", "automation", ["network"]]
335
+ reference: ["[options]", "automation", ["files", "network", "processes"]]
317
336
  },
318
337
  "backlog:drive": {
319
338
  script: "scripts/backlog/backlog-drive-cli.ts",
@@ -550,7 +569,7 @@ var AI_COMMANDS = {
550
569
  reference: ["<message>", "automation", ["git"]]
551
570
  },
552
571
  epic: {
553
- script: "scripts-ai/epic.ts",
572
+ script: "scripts/epic/epic.ts",
554
573
  description: "Create an epic issue from its child issue numbers",
555
574
  category: "AI tools",
556
575
  reference: ["<title> <issue...> [--ordered]", "automation", ["network"]]
@@ -574,7 +593,7 @@ var AI_COMMANDS = {
574
593
  reference: ["<epic>", "automation", ["network"]]
575
594
  },
576
595
  "epic:check": {
577
- script: "scripts-ai/epic-check.ts",
596
+ script: "scripts/epic/epic-check.ts",
578
597
  description: "Check an epic issue against the tracking requirements",
579
598
  category: "AI tools",
580
599
  reference: ["<epic>", "automation", ["network"]]
@@ -901,7 +920,7 @@ var DEV_COMMANDS = {
901
920
  script: "scripts/rules/rule-value-cli.ts",
902
921
  description: "Print each delivered rule's unaided compliance \u2014 runs reached, kept rate, refusals",
903
922
  category: "AI tools",
904
- reference: ["", "developer", ["none"]]
923
+ reference: ["[--refresh]", "developer", ["files"]]
905
924
  },
906
925
  format: {
907
926
  script: "scripts/lint/format.ts",
@@ -910,7 +929,7 @@ var DEV_COMMANDS = {
910
929
  reference: ["", "developer", ["files", "processes"]]
911
930
  },
912
931
  "format:edited": {
913
- script: "scripts/hooks/format-edited-file.ts",
932
+ script: "scripts/hooks/format-edited-cli.ts",
914
933
  description: "Claude Code hook: format the file just edited (reads the tool call on stdin)",
915
934
  category: "Development",
916
935
  reference: ["", "automation", ["files", "processes"]]
@@ -928,7 +947,7 @@ var DEV_COMMANDS = {
928
947
  // node's own `--env-file` parser with node's own precedence.
929
948
  },
930
949
  "pretool:guard": {
931
- script: "scripts/hooks/pretool-guard.ts",
950
+ script: "scripts/hooks/pretool-guard-cli.ts",
932
951
  description: "Claude Code hook: the batch, investigation and rule guards in one process (reads the tool call on stdin)",
933
952
  category: "Development",
934
953
  reference: ["", "automation", ["none"]]
@@ -1186,7 +1205,7 @@ var PROJECT_COMMANDS = {
1186
1205
  description: "Set a project up for the GitHub Issue workflow, from git init to the setup PR",
1187
1206
  category: "Project",
1188
1207
  reference: [
1189
- `${PROFILE_ARGUMENTS} [--yes] [--github] [--public]`,
1208
+ `${PROFILE_ARGUMENTS} [--yes] [--github] [--public] [--init-command <command>]`,
1190
1209
  "developer",
1191
1210
  ["files", "git", "network", "processes"]
1192
1211
  ]
@@ -1294,7 +1313,7 @@ var VERSIONING_COMMANDS = {
1294
1313
  };
1295
1314
 
1296
1315
  // scripts/josh/josh-commands-workflow.ts
1297
- var GIT_WORKFLOW_SCRIPT = "scripts-ai/git-workflow.ts";
1316
+ var GIT_WORKFLOW_SCRIPT = "scripts/git/git-workflow.ts";
1298
1317
  var GIT_MESSAGE_ARGUMENTS = "[-y] <message>";
1299
1318
  var WORKFLOW_COMMANDS = {
1300
1319
  git: {
@@ -1319,7 +1338,7 @@ var WORKFLOW_COMMANDS = {
1319
1338
  // session, and `followup` with them the merge step of every `fullrun` there. `doctor` was moved to
1320
1339
  // this form for the same reason in joshuafolkken/kit#869.
1321
1340
  //
1322
- // Nothing is lost by relaxing it: both scripts already call `load_optional_environment()`
1341
+ // Nothing is lost by relaxing it: both scripts already load `.env` through `josh_environment_file`
1323
1342
  // themselves, so the file is read either way and node's precedence — an existing environment
1324
1343
  // variable wins over the file — is node's own in both spellings.
1325
1344
  //
@@ -1327,7 +1346,7 @@ var WORKFLOW_COMMANDS = {
1327
1346
  // than dropped: `telegram_notify.send` now throws on missing credentials and on a failed send, so
1328
1347
  // `josh notify` exits non-zero instead of warning and answering 0.
1329
1348
  followup: {
1330
- script: "scripts-ai/git-followup-workflow.ts",
1349
+ script: "scripts/git/git-followup-workflow.ts",
1331
1350
  description: "Follow-up git workflow",
1332
1351
  category: "Workflow",
1333
1352
  reference: [
@@ -1338,7 +1357,7 @@ var WORKFLOW_COMMANDS = {
1338
1357
  tsx_arguments: OPTIONAL_ENV_FILE_FLAGS
1339
1358
  },
1340
1359
  notify: {
1341
- script: "scripts-ai/telegram-test.ts",
1360
+ script: "scripts/git/telegram-test.ts",
1342
1361
  description: "Send Telegram notification",
1343
1362
  category: "Workflow",
1344
1363
  reference: ["--task-type <type> --body <text>", "automation", ["notifications"]],
@@ -1431,8 +1450,6 @@ var ALIASES = {
1431
1450
  ln: "lines",
1432
1451
  by: "bytes",
1433
1452
  f: "format",
1434
- fd: "format:edited",
1435
- bg: "batch:guard",
1436
1453
  sd: "cspell:dot",
1437
1454
  bh: "behavior",
1438
1455
  t: "test",
@@ -1441,8 +1458,6 @@ var ALIASES = {
1441
1458
  td: "test:declared",
1442
1459
  trd: "test:red",
1443
1460
  te: "test:e2e",
1444
- er: "e2e:retry-check",
1445
- sl: "session:lang",
1446
1461
  c: "check",
1447
1462
  pt: "port",
1448
1463
  i: "init",
@@ -1450,19 +1465,12 @@ var ALIASES = {
1450
1465
  st: "start",
1451
1466
  sy: "sync",
1452
1467
  rmi: "registry:migrate",
1453
- sys: "sync:scope",
1454
1468
  g: "git",
1455
1469
  gp: "pr",
1456
- prc: "pr:classification",
1457
- fu: "followup",
1458
- nf: "notify",
1459
- obf: "observations:flush",
1460
- mrr: "measure:rerun",
1461
1470
  ms: "main:sync",
1462
1471
  mm: "main:merge",
1463
1472
  bp: "bump",
1464
1473
  re: "release",
1465
- res: "release:scope",
1466
1474
  v: "version",
1467
1475
  r: "ranges",
1468
1476
  dr: "doctor",
@@ -1470,107 +1478,16 @@ var ALIASES = {
1470
1478
  ad: "adopt",
1471
1479
  ov: "overrides",
1472
1480
  a: "audit",
1473
- ap: "audit:provision",
1474
1481
  rt: "reconcile-templates",
1475
1482
  u: "latest",
1476
- lg: "latest:guard",
1477
1483
  lc: "latest:corepack",
1478
1484
  lu: "latest:update",
1479
- ls: "latest:scope",
1480
- pm: "prevent-main-commit",
1481
- cm: "check-commit-message",
1482
- ss: "secretlint-scan",
1483
- ppu: "pre-push-unit",
1484
- rer: "reserved-run",
1485
- ptc: "pre-commit-type-check",
1486
- ird: "issue:read",
1487
- ist: "issue:state",
1488
- isc: "issue:scout",
1489
- ifl: "issue:file",
1490
- isf: "issue:fold",
1491
- isfe: "issue:fold-existing",
1492
- dfr: "defect:rate",
1493
- ici: "issue:cite",
1494
- icm: "issue:comment",
1495
- pks: "pkg:scout",
1496
- iln: "issue:lint",
1497
- ibl: "issue:backlinks",
1498
- rl: "report:lint",
1499
- ep: "epic",
1500
- ec: "epic:check",
1501
- en: "epic:next",
1502
- ea: "epic:audit",
1503
- eb: "epic:bundle",
1504
- ao: "auto-ok:next",
1505
- bl: "backlog:next",
1506
- blo: "backlog:offer",
1507
- bld: "backlog:drive",
1508
- blp: "backlog:plan",
1509
- bls: "backlog:stalled",
1510
- bb: "backlog:budget",
1511
- co: "cost",
1512
- ds: "doc:section",
1513
- rs: "read:set",
1514
- dcr: "doc:read",
1515
- rf: "read:files",
1516
- ef: "edit:files",
1517
- rfs: "refactor:scan",
1518
1485
  tm: "time",
1519
1486
  tmd: "time:density",
1520
1487
  rtr: "retrospective",
1521
- rb: "review:brief",
1522
- r2: "review:round2",
1523
- ra: "review:attest",
1524
- rvr: "review:record",
1525
1488
  rvf: "review:findings",
1526
- dp: "disposition",
1527
- dg: "delegate",
1528
- fo: "fanout",
1529
- rh: "run:hold",
1530
- rr: "run:release",
1531
- rc: "run:carry",
1532
- rtd: "run:tidy",
1533
- rw: "run:wake",
1534
- rct: "run:cut",
1535
- rv: "run:liveness",
1536
- red: "run:ending",
1537
- rg: "run:progress",
1538
- rp: "run:prep",
1539
- ren: "run:entry",
1540
- rtl: "run:tail",
1541
- shp: "ship",
1542
- rst: "run:status",
1543
- rn: "run:next",
1544
- rsp: "run:step",
1545
- rpy: "repo:party",
1546
- rmg: "run:merge",
1547
- rrp: "run:report",
1548
- rrv: "run:review",
1549
- rev: "run:event",
1550
- sp: "stash:pop",
1551
- lno: "lane:open",
1552
- lnc: "lane:close",
1553
- lnl: "lane:list",
1554
- lnp: "lane:prune",
1555
- lnv: "lane:output",
1556
- lnd: "lane:dispatch",
1557
- lna: "lane:await",
1558
- lnla: "lane:launch",
1559
- rwg: "run:watcher:guard",
1560
- rsd: "run:stranded",
1561
- ig: "investigation:guard",
1562
- drg: "duplicate-read:guard",
1563
- rug: "rule:guard",
1564
1489
  ruv: "rule:value",
1565
- ptg: "pretool:guard",
1566
- sg: "stop:guard",
1567
- ev: "eval",
1568
- ol: "oracle:list",
1569
- sa: "split:assess",
1570
- shs: "sonar:hotspots",
1571
- uir: "ui:routes",
1572
- cs: "clone:scan",
1573
- ca: "cases"
1490
+ ev: "eval"
1574
1491
  };
1575
1492
 
1576
1493
  // scripts/josh/josh-composite-arguments.ts