@joshuafolkken/kit 1.1094.0 → 1.1128.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 (149) hide show
  1. package/.claude/skills/workflow-commands/SKILL.md +1 -1
  2. package/.claude/skills/workflow-commands/background-commands.md +36 -85
  3. package/.claude/skills/workflow-commands/backlogrun-progress.md +29 -32
  4. package/.claude/skills/workflow-commands/backlogrun-steps.md +2 -2
  5. package/.claude/skills/workflow-commands/fullrun.md +5 -4
  6. package/.claude/skills/workflow-commands/halfrun.md +5 -4
  7. package/.claude/skills/workflow-commands/latest-gate.md +7 -15
  8. package/.claude/skills/workflow-commands/pre-gate-cut.md +4 -8
  9. package/.claude/skills/workflow-commands/split-assessment.md +4 -18
  10. package/.github/actions/setup-node/action.yml +33 -0
  11. package/.github/actions/setup-pnpm/action.yml +4 -4
  12. package/.github/workflows/auto-tag.yml +2 -3
  13. package/.github/workflows/ci.yml +7 -8
  14. package/.github/workflows/dependabot-auto-merge.yml +1 -0
  15. package/.github/workflows/pr-classification.yml +1 -3
  16. package/.github/workflows/production.yml +1 -0
  17. package/.github/workflows/publish.yml +10 -9
  18. package/.github/workflows/sonar-qube.yml +17 -13
  19. package/.pnpmfile.mjs +29 -0
  20. package/AGENTS.md +4 -11
  21. package/CLAUDE.md +24 -17
  22. package/GEMINI.md +4 -13
  23. package/README.md +8 -3
  24. package/SECURITY.md +1 -0
  25. package/cspell/index.yaml +4 -0
  26. package/dist/CLAUDE.basic.md +6 -6
  27. package/dist/CLAUDE.md +24 -17
  28. package/dist/CLAUDE.static.md +6 -6
  29. package/dist/config-merge/index.js +33 -9
  30. package/dist/hooks/batch-guard.js +4 -4
  31. package/dist/hooks/{chunk-NKOG3XAV.js → chunk-4JZDP5X5.js} +2 -2
  32. package/dist/hooks/{chunk-3C4YCCEF.js → chunk-5SD2YM7Z.js} +4 -4
  33. package/dist/hooks/{chunk-OIZUHPJI.js → chunk-77J7IEQM.js} +1 -1
  34. package/dist/hooks/{chunk-KHWHKJOM.js → chunk-7HVB7SZG.js} +3 -3
  35. package/dist/hooks/{chunk-UD24EAIL.js → chunk-AIOIOMPX.js} +1875 -104
  36. package/dist/hooks/{chunk-M2XDCUKD.js → chunk-M7QKEKWO.js} +88 -1783
  37. package/dist/hooks/{chunk-E54KGFEQ.js → chunk-MKVGBQPA.js} +1 -1
  38. package/dist/hooks/{chunk-7ZPFAVR7.js → chunk-NXYMNPUQ.js} +3 -3
  39. package/dist/hooks/{chunk-O4LL4HTI.js → chunk-QVLT52OV.js} +2 -2
  40. package/dist/hooks/{chunk-IL27YTPH.js → chunk-XYUIQOW3.js} +2 -2
  41. package/dist/hooks/codex-hook-adapter.js +12 -47
  42. package/dist/hooks/duplicate-read-guard.js +5 -5
  43. package/dist/hooks/format-edited.js +2 -2
  44. package/dist/hooks/inputs.json +180 -179
  45. package/dist/hooks/investigation-guard.js +5 -5
  46. package/dist/hooks/pretool-guard.js +9 -9
  47. package/dist/hooks/stop-guard.js +17 -12
  48. package/dist/josh.js +79 -30
  49. package/dist/version/index.js +36 -20
  50. package/eslint/rules/unicorn.js +3 -2
  51. package/package.json +18 -2
  52. package/pnpm-workspace.yaml +5 -7
  53. package/prompts/collaboration-workflow/glossary.md +17 -0
  54. package/prompts/collaboration-workflow/issue-template.md +1 -1
  55. package/prompts/collaboration-workflow/operating-rules.md +1 -1
  56. package/prompts/collaboration-workflow/principles.md +9 -0
  57. package/prompts/collaboration-workflow.md +1 -0
  58. package/scripts/backlog/backlog-arrival.ts +30 -10
  59. package/scripts/backlog/backlog-budget-cli.ts +15 -16
  60. package/scripts/backlog/backlog-offer-cli.ts +6 -14
  61. package/scripts/backlog/backlog-plan.ts +29 -18
  62. package/scripts/backlog/backlog-ready.ts +20 -7
  63. package/scripts/config-merge/parse-jsonc.ts +33 -3
  64. package/scripts/config-merge/patch-json-key.ts +13 -6
  65. package/scripts/cost-runtime/cost-cli.ts +3 -7
  66. package/scripts/doctor/doctor-consumer.ts +3 -5
  67. package/scripts/doctor/doctor-io.ts +9 -13
  68. package/scripts/document/backlogrun-parent-read-set.ts +12 -1
  69. package/scripts/document/document-byte-budget.ts +1 -0
  70. package/scripts/document/entry-read-budget.ts +13 -7
  71. package/scripts/document/entry-read-set.ts +32 -8
  72. package/scripts/document/lane-child-read-set.ts +7 -0
  73. package/scripts/document/read-set-point-of-use.ts +8 -3
  74. package/scripts/document/read-set-trim.ts +3 -1
  75. package/scripts/epic/epic-audit.ts +3 -18
  76. package/scripts/gh/git-gh-issue-list.ts +12 -11
  77. package/scripts/gh/git-gh-issue-write.ts +4 -1
  78. package/scripts/gh/git-gh-pr-auto-merge.ts +4 -1
  79. package/scripts/git/git-command.ts +6 -1
  80. package/scripts/git/git-spawn-sync.ts +65 -0
  81. package/scripts/git/git-spawn.ts +5 -4
  82. package/scripts/git/stash/stash-pop-args.ts +1 -6
  83. package/scripts/init/init-file-action.ts +54 -0
  84. package/scripts/init/init-logic-migrate.ts +35 -17
  85. package/scripts/init/init-logic-secretlint.ts +1 -1
  86. package/scripts/init/init-logic.ts +6 -22
  87. package/scripts/init/init.ts +11 -68
  88. package/scripts/init/kit-written-paths.ts +2 -0
  89. package/scripts/init/project-profile.ts +3 -6
  90. package/scripts/init/start-steps.ts +2 -1
  91. package/scripts/issue/defect-rate-cli.ts +61 -20
  92. package/scripts/issue/issue-backlinks.ts +7 -14
  93. package/scripts/issue/issue-cite.ts +12 -6
  94. package/scripts/issue/issue-file.ts +5 -12
  95. package/scripts/issue/markdown-section.ts +21 -6
  96. package/scripts/issue/measure-rerun-cli.ts +73 -14
  97. package/scripts/josh/josh-commands-project.ts +1 -1
  98. package/scripts/josh/josh-commands-workflow.ts +1 -1
  99. package/scripts/josh/run-github-prerequisite.ts +3 -6
  100. package/scripts/lane/lane-await.ts +43 -13
  101. package/scripts/lane/lane-close.ts +4 -1
  102. package/scripts/lane/lane-launch-cli.ts +10 -16
  103. package/scripts/lane/openai-review-broker.ts +4 -1
  104. package/scripts/lib/cli-flags.ts +31 -2
  105. package/scripts/lib/error-message.ts +12 -1
  106. package/scripts/lines/line-targets.ts +0 -11
  107. package/scripts/lines/lines-command.ts +5 -3
  108. package/scripts/propagate/propagate-git.ts +3 -8
  109. package/scripts/refactor/refactor-scan.ts +2 -1
  110. package/scripts/registry-migration/migrate-logic.ts +28 -19
  111. package/scripts/registry-migration/migrate.ts +6 -5
  112. package/scripts/release/github-release-cli.ts +14 -3
  113. package/scripts/release/release-publish.ts +36 -2
  114. package/scripts/release/release-worktree.ts +97 -2
  115. package/scripts/review/review-checkout.ts +3 -2
  116. package/scripts/review/review-record-cli.ts +9 -16
  117. package/scripts/rules/early-heartbeat.ts +4 -3
  118. package/scripts/rules/lane-park.ts +9 -0
  119. package/scripts/rules/stop-rules.ts +7 -4
  120. package/scripts/run/run-carry-args.ts +8 -12
  121. package/scripts/run/run-cut-args.ts +1 -6
  122. package/scripts/run/run-ending-cli.ts +1 -5
  123. package/scripts/run/run-entry-cli.ts +40 -9
  124. package/scripts/run/run-entry-stop.ts +104 -0
  125. package/scripts/run/run-event-stream-emit.ts +7 -2
  126. package/scripts/run/run-hold.ts +4 -1
  127. package/scripts/run/run-liveness-cli.ts +1 -5
  128. package/scripts/run/run-merge-cli.ts +2 -10
  129. package/scripts/run/run-parent-cut-hook.ts +4 -1
  130. package/scripts/run/run-prep-cli.ts +4 -1
  131. package/scripts/run/run-progress-args.ts +20 -4
  132. package/scripts/run/run-progress-cli.ts +31 -29
  133. package/scripts/run/run-progress-clock.ts +4 -1
  134. package/scripts/run/run-ship-cli.ts +8 -16
  135. package/scripts/run/run-ship-probe.ts +4 -1
  136. package/scripts/run/run-status-cli.ts +2 -15
  137. package/scripts/run/run-tidy-lanes.ts +4 -1
  138. package/scripts/run/run-wake-cli.ts +2 -10
  139. package/scripts/run/run-watcher-guard.ts +9 -5
  140. package/scripts/safe-chain/pack-hook.ts +92 -0
  141. package/scripts/sync/sync-ai-files.ts +4 -0
  142. package/scripts/test/test-declared-changed.ts +13 -16
  143. package/scripts/test/test-declared.ts +3 -7
  144. package/scripts/version/version-commands.ts +11 -1
  145. package/templates/CLAUDE.basic.md +6 -6
  146. package/templates/workflows/ci.yml +16 -82
  147. package/templates/workflows/dependabot-auto-merge.yml +1 -0
  148. package/templates/workflows/github-release.yml +1 -3
  149. package/tsconfig.sonar.json +4 -22
@@ -56,15 +56,39 @@ var string_array_schema = z.array(z.string());
56
56
  var string_record_schema = z.record(z.string(), z.string());
57
57
 
58
58
  // scripts/config-merge/parse-jsonc.ts
59
- import strip_json_comments from "strip-json-comments";
59
+ import { parseTree, printParseErrorCode } from "jsonc-parser";
60
+ function property_key(property) {
61
+ return String(property.children?.[0]?.value);
62
+ }
63
+ function node_value(node) {
64
+ if (node === void 0) return void 0;
65
+ const children = node.children ?? [];
66
+ if (node.type === "array") return children.map((child) => node_value(child));
67
+ if (node.type !== "object") return node.value;
68
+ return Object.fromEntries(
69
+ children.map((property) => [property_key(property), node_value(property.children?.[1])])
70
+ );
71
+ }
60
72
  function parse_jsonc(content) {
61
- const stripped = strip_json_comments(content, { trailingCommas: true });
62
- return json_object_schema.parse(JSON.parse(stripped));
73
+ const errors = [];
74
+ const tree = parseTree(content, errors, { allowTrailingComma: true });
75
+ const [first_error] = errors;
76
+ if (first_error !== void 0) {
77
+ throw new SyntaxError(
78
+ `Invalid JSONC: ${printParseErrorCode(first_error.error)} at offset ${String(first_error.offset)}`
79
+ );
80
+ }
81
+ return json_object_schema.parse(node_value(tree));
63
82
  }
64
83
 
65
84
  // scripts/config-merge/patch-json-key.ts
66
- import { createScanner, findNodeAtLocation, getNodeValue, parseTree } from "jsonc-parser";
67
- import strip_json_comments2 from "strip-json-comments";
85
+ import {
86
+ createScanner,
87
+ findNodeAtLocation,
88
+ getNodeValue,
89
+ parseTree as parseTree2,
90
+ stripComments
91
+ } from "jsonc-parser";
68
92
 
69
93
  // scripts/config-merge/json-format.ts
70
94
  var PRINT_WIDTH = 100;
@@ -146,7 +170,7 @@ function render_value(key, value, has_trailing_comma) {
146
170
  return document.slice(prefix.length, document.length - suffix.length);
147
171
  }
148
172
  function parse_root(content) {
149
- const root = parseTree(content);
173
+ const root = parseTree2(content);
150
174
  return root?.type === "object" ? root : void 0;
151
175
  }
152
176
  function replace_range(content, range, text) {
@@ -192,7 +216,7 @@ function separator_offset(content, offset, limit) {
192
216
  function has_separator_after(content, offset, limit) {
193
217
  return separator_offset(content, offset, limit) !== -1;
194
218
  }
195
- function property_key(property) {
219
+ function property_key2(property) {
196
220
  const key = property.children?.[0]?.value;
197
221
  return typeof key === "string" ? key : void 0;
198
222
  }
@@ -202,7 +226,7 @@ function target_value_end(property) {
202
226
  }
203
227
  function contains_comment(content, node) {
204
228
  const text = content.slice(node.offset, node.offset + node.length);
205
- return strip_json_comments2(text) !== text;
229
+ return stripComments(text) !== text;
206
230
  }
207
231
  function rebalanced_value(content, key, value_node, has_trailing_comma) {
208
232
  if (contains_comment(content, value_node)) return void 0;
@@ -216,7 +240,7 @@ function rebalanced_value(content, key, value_node, has_trailing_comma) {
216
240
  return rendered === current ? void 0 : rendered;
217
241
  }
218
242
  function rebalance(content, property, has_trailing_comma) {
219
- const key = property_key(property);
243
+ const key = property_key2(property);
220
244
  const value_node = property.children?.[1];
221
245
  if (key === void 0 || value_node === void 0) return content;
222
246
  const rendered = rebalanced_value(content, key, value_node, has_trailing_comma);
@@ -9,10 +9,10 @@ import {
9
9
  load_environment_file,
10
10
  notice_refusal_path,
11
11
  refusal_path
12
- } from "./chunk-IL27YTPH.js";
13
- import "./chunk-O4LL4HTI.js";
14
- import "./chunk-E54KGFEQ.js";
15
- import "./chunk-NKOG3XAV.js";
12
+ } from "./chunk-XYUIQOW3.js";
13
+ import "./chunk-QVLT52OV.js";
14
+ import "./chunk-MKVGBQPA.js";
15
+ import "./chunk-4JZDP5X5.js";
16
16
  import "./chunk-WPALEIRX.js";
17
17
  import "./chunk-RKUAD3I6.js";
18
18
  export {
@@ -1077,7 +1077,7 @@ var PROJECT_COMMANDS = {
1077
1077
  },
1078
1078
  "registry:migrate": {
1079
1079
  script: "scripts/registry-migration/migrate.ts",
1080
- description: "Migrate a kit-only project from GitHub Packages to public npm",
1080
+ description: "Migrate a project from GitHub Packages to public npm",
1081
1081
  category: "Project",
1082
1082
  reference: ["", "developer", ["files", "network", "processes"]]
1083
1083
  },
@@ -1263,7 +1263,7 @@ var WORKFLOW_COMMANDS = {
1263
1263
  script: "scripts/issue/measure-rerun-cli.ts",
1264
1264
  description: "Re-run a merged issue\u2019s baseline command and print the before/after pair",
1265
1265
  category: "Workflow",
1266
- reference: ["<path>", "automation", ["processes", "files"]]
1266
+ reference: ["<issue-number>", "automation", ["network", "processes", "files"]]
1267
1267
  },
1268
1268
  // A script rather than an `sh -c` chain, because it has a precondition to enforce: run inside a
1269
1269
  // linked work tree it would hijack the default branch from every other one (joshuafolkken/kit#1535).
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  investigation_reads
3
- } from "./chunk-7ZPFAVR7.js";
3
+ } from "./chunk-NXYMNPUQ.js";
4
4
  import {
5
5
  lane_guard_policy
6
- } from "./chunk-O4LL4HTI.js";
6
+ } from "./chunk-QVLT52OV.js";
7
7
  import {
8
8
  hook_decision
9
- } from "./chunk-E54KGFEQ.js";
9
+ } from "./chunk-MKVGBQPA.js";
10
10
  import {
11
11
  json_value,
12
12
  time_spans
13
- } from "./chunk-NKOG3XAV.js";
13
+ } from "./chunk-4JZDP5X5.js";
14
14
 
15
15
  // scripts/delegation/duplicate-read-guard.ts
16
16
  import { statSync } from "node:fs";
@@ -6,7 +6,7 @@ import {
6
6
  ESLINT_EDIT_CACHE_FLAGS,
7
7
  file_reader,
8
8
  time_density_hook
9
- } from "./chunk-NKOG3XAV.js";
9
+ } from "./chunk-4JZDP5X5.js";
10
10
 
11
11
  // scripts/hooks/format-edited-file.ts
12
12
  import { existsSync as existsSync2 } from "node:fs";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  investigation_reads
3
- } from "./chunk-7ZPFAVR7.js";
3
+ } from "./chunk-NXYMNPUQ.js";
4
4
  import {
5
5
  lane_guard_policy
6
- } from "./chunk-O4LL4HTI.js";
6
+ } from "./chunk-QVLT52OV.js";
7
7
  import {
8
8
  hook_decision
9
- } from "./chunk-E54KGFEQ.js";
9
+ } from "./chunk-MKVGBQPA.js";
10
10
 
11
11
  // scripts/delegation/investigation-guard.ts
12
12
  import { text } from "node:stream/consumers";