@joshuafolkken/kit 1.972.0 → 1.983.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 (87) hide show
  1. package/.claude/skills/epic-commands/SKILL.md +6 -5
  2. package/.claude/skills/workflow-commands/SKILL.md +9 -9
  3. package/.claude/skills/workflow-commands/background-commands.md +1 -1
  4. package/.claude/skills/workflow-commands/fullrun-steps.md +8 -8
  5. package/.claude/skills/workflow-commands/fullrun.md +1 -0
  6. package/.claude/skills/workflow-commands/halfrun.md +16 -12
  7. package/.claude/skills/workflow-commands/issue-comments.md +1 -1
  8. package/.claude/skills/workflow-commands/issue-scout.md +21 -22
  9. package/.claude/skills/workflow-commands/kickoff.md +8 -9
  10. package/.claude/skills/workflow-commands/observation-filing.md +9 -10
  11. package/.claude/skills/workflow-commands/prerequisite.md +7 -6
  12. package/.claude/skills/workflow-commands/retrospective.md +5 -5
  13. package/.claude/skills/workflow-commands/rule-residency.md +2 -2
  14. package/.claude/skills/workflow-commands/split-assessment.md +4 -3
  15. package/.claude/skills/workflow-commands/target-repository.md +7 -6
  16. package/.claude/skills/workflow-commands/working-tree-hold.md +16 -1
  17. package/README.md +24 -20
  18. package/dist/hooks/batch-guard.js +4 -4
  19. package/dist/hooks/{chunk-ZPLXLJ7O.js → chunk-47SPMGOD.js} +16 -1
  20. package/dist/hooks/{chunk-BVMSPG3M.js → chunk-5JX6HXDX.js} +3 -3
  21. package/dist/hooks/{chunk-KQG4776P.js → chunk-APVOACVT.js} +1 -1
  22. package/dist/hooks/{chunk-2K52BRWV.js → chunk-ASUZGZFT.js} +2 -2
  23. package/dist/hooks/{chunk-CRGJTD6E.js → chunk-ERXMJJOV.js} +1 -1
  24. package/dist/hooks/{chunk-WWTMHHZU.js → chunk-IM3KM25Y.js} +61 -30
  25. package/dist/hooks/{chunk-BNWIOJFU.js → chunk-LBXQHXMC.js} +138 -358
  26. package/dist/hooks/{chunk-NXL3SBXY.js → chunk-P3UX7SFN.js} +2 -2
  27. package/dist/hooks/{chunk-F6OM6SIG.js → chunk-RFPHKU7C.js} +12 -12
  28. package/dist/hooks/{chunk-ZYYSBNR6.js → chunk-ZT65LR3U.js} +4 -4
  29. package/dist/hooks/codex-hook-adapter.js +10 -10
  30. package/dist/hooks/duplicate-read-guard.js +5 -5
  31. package/dist/hooks/format-edited.js +2 -2
  32. package/dist/hooks/investigation-guard.js +5 -5
  33. package/dist/hooks/pretool-guard.js +9 -9
  34. package/dist/hooks/stop-guard.js +4 -4
  35. package/dist/josh.js +16 -1
  36. package/package.json +2 -2
  37. package/prompts/collaboration-workflow/epic-bundle.md +8 -8
  38. package/prompts/collaboration-workflow/issue-template.md +5 -5
  39. package/prompts/collaboration-workflow/rule-delivery.md +43 -30
  40. package/prompts/collaboration-workflow/upstream-interrupt.md +1 -1
  41. package/prompts/collaboration-workflow/wip-cap.md +3 -3
  42. package/prompts/review.md +11 -9
  43. package/scripts/ci/pr-classification.ts +13 -12
  44. package/scripts/delegation/delegation-policy.ts +9 -9
  45. package/scripts/document/document-byte-budget.ts +1 -1
  46. package/scripts/git/issue-labels.ts +52 -5
  47. package/scripts/init/init-bootstrap.ts +92 -0
  48. package/scripts/init/init-install.ts +4 -1
  49. package/scripts/init/init-logic-workspace.ts +1 -1
  50. package/scripts/init/init.ts +23 -5
  51. package/scripts/init/start-plan.ts +1 -1
  52. package/scripts/init/start-steps.ts +5 -28
  53. package/scripts/issue/issue-file-cli.ts +188 -0
  54. package/scripts/issue/issue-file.ts +192 -0
  55. package/scripts/issue/issue-lint-cli.ts +1 -1
  56. package/scripts/issue/issue-scout-cli.ts +41 -97
  57. package/scripts/issue/issue-scout-closed.ts +102 -0
  58. package/scripts/josh/__snapshots__/josh-command-map.test.ts.snap +9 -1
  59. package/scripts/josh/josh-command-map.ts +1 -0
  60. package/scripts/josh/josh-commands-issue.ts +11 -0
  61. package/scripts/josh/josh-commands-project.ts +5 -1
  62. package/scripts/propagate/propagate-run.ts +1 -0
  63. package/scripts/propagate/propagate-select.ts +72 -0
  64. package/scripts/propagate/propagate-targets.ts +5 -3
  65. package/scripts/propagate/propagate.ts +86 -24
  66. package/scripts/repo/repository-labels.ts +91 -0
  67. package/scripts/rules/bash-triggers.ts +19 -6
  68. package/scripts/rules/delivered-rules.ts +28 -32
  69. package/scripts/rules/direct-filing.ts +38 -0
  70. package/scripts/rules/filing-cap.ts +11 -8
  71. package/scripts/rules/issue-fold.ts +4 -4
  72. package/scripts/rules/oracle-consulted.ts +4 -4
  73. package/scripts/rules/oracle-firing.ts +13 -16
  74. package/scripts/rules/rule-body-guard.ts +6 -9
  75. package/scripts/rules/stop-rules.ts +3 -2
  76. package/scripts/run/run-entry-cli.ts +34 -1
  77. package/scripts/run/run-halfrun-resume.ts +104 -0
  78. package/scripts/run/run-hold-cli.ts +27 -4
  79. package/scripts/run/run-hold.ts +11 -0
  80. package/scripts/security/security-audit.ts +12 -1
  81. package/scripts/sync/sync.ts +6 -0
  82. package/scripts/test/pilot-files.ts +0 -1
  83. package/scripts/version/fresh-metadata-cache.ts +36 -0
  84. package/scripts/version/latest-update.ts +2 -1
  85. package/scripts/rules/issue-bug-label.ts +0 -85
  86. package/scripts/rules/issue-filing-args.ts +0 -50
  87. package/scripts/rules/issue-scout.ts +0 -64
@@ -290,6 +290,16 @@ var ISSUE_COMMANDS = {
290
290
  description: "Post one comment to an issue from a file, so no shell expands the body",
291
291
  category: "AI tools",
292
292
  reference: ["<issue> --body <text> | --body-file <path>", "automation", ["network"]]
293
+ },
294
+ "issue:file": {
295
+ script: "scripts/issue/issue-file-cli.ts",
296
+ description: "File an Issue with every filing step: lint, Origin, duplicate scout, labels, then epic:bundle",
297
+ category: "AI tools",
298
+ reference: [
299
+ "<title> --body-file <path> --depth <0|1|2> [--route <route>] [--label <name>] [--repo <owner/repo>] [--distinct <N,\u2026>]",
300
+ "automation",
301
+ ["network"]
302
+ ]
293
303
  }
294
304
  };
295
305
 
@@ -1068,7 +1078,11 @@ var PROJECT_COMMANDS = {
1068
1078
  script: "scripts/propagate/propagate.ts",
1069
1079
  description: "Carry the published release into every consumer repository next to this one",
1070
1080
  category: "Project",
1071
- reference: ["[--dry-run] [--skip-publish-wait]", "maintainer", ["files", "network"]]
1081
+ reference: [
1082
+ "[--dry-run] [--skip-publish-wait] [--target <repo>]",
1083
+ "maintainer",
1084
+ ["files", "network"]
1085
+ ]
1072
1086
  },
1073
1087
  adopt: {
1074
1088
  script: "scripts/adopt/adopt.ts",
@@ -1306,6 +1320,7 @@ var ALIASES = {
1306
1320
  ird: "issue:read",
1307
1321
  ist: "issue:state",
1308
1322
  isc: "issue:scout",
1323
+ ifl: "issue:file",
1309
1324
  isf: "issue:fold",
1310
1325
  isfe: "issue:fold-existing",
1311
1326
  dfr: "defect:rate",
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  investigation_reads
3
- } from "./chunk-F6OM6SIG.js";
3
+ } from "./chunk-RFPHKU7C.js";
4
4
  import {
5
5
  lane_guard_policy
6
- } from "./chunk-2K52BRWV.js";
6
+ } from "./chunk-ASUZGZFT.js";
7
7
  import {
8
8
  hook_decision
9
- } from "./chunk-KQG4776P.js";
9
+ } from "./chunk-APVOACVT.js";
10
10
 
11
11
  // scripts/delegation/investigation-guard.ts
12
12
  import { text } from "node:stream/consumers";
@@ -3,7 +3,7 @@ import {
3
3
  stamp_file,
4
4
  time_density_hook,
5
5
  time_hook_transcript
6
- } from "./chunk-ZPLXLJ7O.js";
6
+ } from "./chunk-47SPMGOD.js";
7
7
  import {
8
8
  josh_environment_file
9
9
  } from "./chunk-WPALEIRX.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  lane_child_marker
3
- } from "./chunk-KQG4776P.js";
3
+ } from "./chunk-APVOACVT.js";
4
4
  import {
5
5
  time_bundle_call,
6
6
  time_format,
7
7
  time_round_trips,
8
8
  time_spans,
9
9
  time_transcript_line
10
- } from "./chunk-ZPLXLJ7O.js";
10
+ } from "./chunk-47SPMGOD.js";
11
11
 
12
12
  // scripts/lane/lane-guard-policy.ts
13
13
  var DEFAULT_MODE = "refuse";
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  ESLINT_EDIT_CACHE_FLAGS,
7
7
  time_density_hook
8
- } from "./chunk-ZPLXLJ7O.js";
8
+ } from "./chunk-47SPMGOD.js";
9
9
 
10
10
  // scripts/hooks/format-edited-file.ts
11
11
  import { existsSync as existsSync2 } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  lane_child_marker,
3
3
  run_issue_number
4
- } from "./chunk-KQG4776P.js";
4
+ } from "./chunk-APVOACVT.js";
5
5
  import {
6
6
  PLATFORM_TEMP_ROOT,
7
7
  cost_blocks,
@@ -12,7 +12,7 @@ import {
12
12
  time_density_hook,
13
13
  time_shell,
14
14
  time_transcript_line
15
- } from "./chunk-ZPLXLJ7O.js";
15
+ } from "./chunk-47SPMGOD.js";
16
16
  import {
17
17
  ENV_FILE_NAME,
18
18
  LANE_SEAT_KEY,
@@ -20,6 +20,22 @@ import {
20
20
  ports
21
21
  } from "./chunk-RKUAD3I6.js";
22
22
 
23
+ // scripts/rules/shell-segments.ts
24
+ var SEGMENT_SEPARATOR = /&&|\|\||;|\n/u;
25
+ function segments_of(command) {
26
+ return command.split(SEGMENT_SEPARATOR).map((segment) => segment.trim());
27
+ }
28
+ function is_josh_command(segment, names) {
29
+ const named = time_shell.josh_command_of(segment);
30
+ if (!named.startsWith(time_shell.JOSH_PREFIX)) return false;
31
+ return names.has(named.slice(time_shell.JOSH_PREFIX.length));
32
+ }
33
+ var shell_segments = {
34
+ SEGMENT_SEPARATOR,
35
+ is_josh_command,
36
+ segments_of
37
+ };
38
+
23
39
  // scripts/rules/bash-triggers.ts
24
40
  function on_bash_command(is_match) {
25
41
  return function is_trigger(call) {
@@ -30,11 +46,15 @@ function on_bash_command(is_match) {
30
46
  var ISSUE_CREATE_COMMAND = /\bgh\s+(?:\S+\s+)*?issue\s+create\b/u;
31
47
  var ISSUES_ENDPOINT = /repos\/[^\s'"]*\/issues(?=$|["'\s])/u;
32
48
  var TITLE_FIELD = /(?:-f|-F|--field|--raw-field)\s*'?title=/u;
33
- function is_issue_filing(command) {
49
+ function is_direct_filing(command) {
34
50
  if (ISSUE_CREATE_COMMAND.test(command)) return true;
35
51
  return ISSUES_ENDPOINT.test(command) && TITLE_FIELD.test(command);
36
52
  }
37
- var bash_triggers = { is_issue_filing, on_bash_command };
53
+ var FILING_NAMES = /* @__PURE__ */ new Set(["issue:file"]);
54
+ function is_issue_filing(command) {
55
+ return shell_segments.segments_of(command).some((segment) => shell_segments.is_josh_command(segment, FILING_NAMES));
56
+ }
57
+ var bash_triggers = { is_direct_filing, is_issue_filing, on_bash_command };
38
58
 
39
59
  // scripts/rules/tail-commands.ts
40
60
  function is_bash_use(block) {
@@ -58,7 +78,7 @@ function is_filing_use(block) {
58
78
  return bash_triggers.is_issue_filing(time_shell.bash_command(block.input));
59
79
  }
60
80
  function collect_block(block, found) {
61
- if (block.result_id !== "") found.refusals.set(block.result_id, block.refusal_guard);
81
+ if (block.result_id !== "" && block.is_error === true) found.failures.add(block.result_id);
62
82
  if (is_filing_use(block)) found.filing_ids.push(block.id);
63
83
  }
64
84
  function collect_line(line, found) {
@@ -67,13 +87,13 @@ function collect_line(line, found) {
67
87
  for (const block of parsed.blocks) collect_block(block, found);
68
88
  }
69
89
  function scan_tail(tail) {
70
- const found = { filing_ids: [], refusals: /* @__PURE__ */ new Map() };
90
+ const found = { filing_ids: [], failures: /* @__PURE__ */ new Set() };
71
91
  for (const line of tail.split("\n")) collect_line(line, found);
72
92
  return found;
73
93
  }
74
94
  function prior_filing_count(tail) {
75
- const { filing_ids, refusals } = scan_tail(tail);
76
- return filing_ids.filter((id) => (refusals.get(id) ?? "") === "").length;
95
+ const { filing_ids, failures } = scan_tail(tail);
96
+ return filing_ids.filter((id) => !failures.has(id)).length;
77
97
  }
78
98
  function is_prompt_line(line) {
79
99
  const parsed = time_transcript_line.parse_line(line);
@@ -547,7 +567,8 @@ var run_hold_schema = z.object({
547
567
  issue: z.string(),
548
568
  taken_at: z.string(),
549
569
  pid: z.number(),
550
- is_fullrun: z.boolean().optional()
570
+ is_fullrun: z.boolean().optional(),
571
+ is_halfrun_stop: z.boolean().optional()
551
572
  });
552
573
  function parse_hold(raw) {
553
574
  try {
@@ -582,6 +603,9 @@ function write_hold(target, issue, now = /* @__PURE__ */ new Date()) {
582
603
  function create_hold(target, issue, now = /* @__PURE__ */ new Date(), is_fullrun) {
583
604
  return stamp_file.create_stamp(target, build_hold(issue, now, is_fullrun));
584
605
  }
606
+ function create_halfrun_stop_hold(target, issue, now = /* @__PURE__ */ new Date()) {
607
+ return stamp_file.create_stamp(target, { ...build_hold(issue, now), is_halfrun_stop: true });
608
+ }
585
609
  async function is_tree_dirty() {
586
610
  try {
587
611
  const status2 = await git_command.status();
@@ -635,6 +659,7 @@ var run_hold = {
635
659
  RELEASE_COMMAND,
636
660
  UNNUMBERED_ISSUE,
637
661
  classify,
662
+ create_halfrun_stop_hold,
638
663
  create_hold,
639
664
  describe_holder,
640
665
  foreign_release_message,
@@ -1537,22 +1562,6 @@ var run_cut = {
1537
1562
  worktree_git_directory_sync
1538
1563
  };
1539
1564
 
1540
- // scripts/rules/shell-segments.ts
1541
- var SEGMENT_SEPARATOR = /&&|\|\||;|\n/u;
1542
- function segments_of(command) {
1543
- return command.split(SEGMENT_SEPARATOR).map((segment) => segment.trim());
1544
- }
1545
- function is_josh_command(segment, names) {
1546
- const named = time_shell.josh_command_of(segment);
1547
- if (!named.startsWith(time_shell.JOSH_PREFIX)) return false;
1548
- return names.has(named.slice(time_shell.JOSH_PREFIX.length));
1549
- }
1550
- var shell_segments = {
1551
- SEGMENT_SEPARATOR,
1552
- is_josh_command,
1553
- segments_of
1554
- };
1555
-
1556
1565
  // scripts/rules/run-tail.ts
1557
1566
  var SEGMENT_PREFIX = String.raw`(?:\(\s*)?(?:[A-Za-z_][A-Za-z0-9_]*=\S*\s+)*(?:npx\s+|pnpm\s+(?:exec\s+|run\s+)?)?`;
1558
1567
  var WORD_END = String.raw`(?=\s|$|\))`;
@@ -1653,7 +1662,6 @@ var lane_background = {
1653
1662
 
1654
1663
  // scripts/git/issue-labels.ts
1655
1664
  var EPIC_LABEL = "epic";
1656
- var BUG_LABEL = "bug";
1657
1665
  var ENHANCEMENT_LABEL = "enhancement";
1658
1666
  var BREAKING_CHANGE_LABEL = "breaking-change";
1659
1667
  var IN_PROGRESS_LABEL = "in-progress";
@@ -1732,6 +1740,28 @@ var WORKFLOW_LABELS = [
1732
1740
  ...FILING_ROUTE_LABELS,
1733
1741
  ...DEPTH_LABELS
1734
1742
  ];
1743
+ var BUGFIX_LABEL = "bugfix";
1744
+ var OTHER_CHANGE_LABEL = "other-change";
1745
+ var IGNORE_FOR_RELEASE_LABEL = "ignore-for-release";
1746
+ var RELEASE_CLASSIFICATION_NAMES = [
1747
+ BREAKING_CHANGE_LABEL,
1748
+ ENHANCEMENT_LABEL,
1749
+ BUGFIX_LABEL,
1750
+ OTHER_CHANGE_LABEL,
1751
+ IGNORE_FOR_RELEASE_LABEL
1752
+ ];
1753
+ var RELEASE_CLASSIFICATION_METADATA = {
1754
+ [BREAKING_CHANGE_LABEL]: { color: "d93f0b", description: "Release: a breaking change (major)" },
1755
+ [ENHANCEMENT_LABEL]: { color: "84b6eb", description: "Release: a new feature (minor)" },
1756
+ [BUGFIX_LABEL]: { color: "d73a4a", description: "Release: a bug fix (patch)" },
1757
+ [OTHER_CHANGE_LABEL]: { color: "c2e0c6", description: "Release: any other change (patch)" },
1758
+ [IGNORE_FOR_RELEASE_LABEL]: { color: "cfd3d7", description: "Release: left out of the notes" }
1759
+ };
1760
+ var RELEASE_CLASSIFICATION_LABELS = RELEASE_CLASSIFICATION_NAMES.map((name) => ({ name, ...RELEASE_CLASSIFICATION_METADATA[name] }));
1761
+ var REPOSITORY_LABELS = [
1762
+ ...WORKFLOW_LABELS,
1763
+ ...RELEASE_CLASSIFICATION_LABELS
1764
+ ];
1735
1765
  function has_any_label(labels, wanted) {
1736
1766
  return (labels ?? []).some((label) => wanted.has(label.name.toLowerCase()));
1737
1767
  }
@@ -3601,9 +3631,9 @@ var git_gh_exec = {
3601
3631
  };
3602
3632
 
3603
3633
  export {
3634
+ shell_segments,
3604
3635
  bash_triggers,
3605
3636
  run_progress_clock,
3606
- shell_segments,
3607
3637
  tail_commands,
3608
3638
  filing_cap,
3609
3639
  CONTEXT_CUT_THRESHOLD,
@@ -3615,7 +3645,8 @@ export {
3615
3645
  lane_child_invocation,
3616
3646
  run_hold,
3617
3647
  run_cut,
3618
- BUG_LABEL,
3648
+ run_tail,
3649
+ lane_background,
3619
3650
  ENHANCEMENT_LABEL,
3620
3651
  BREAKING_CHANGE_LABEL,
3621
3652
  IN_PROGRESS_LABEL,
@@ -3624,10 +3655,10 @@ export {
3624
3655
  RUN_LANE_LABEL,
3625
3656
  NEEDS_HUMAN_REVIEW_LABEL,
3626
3657
  ALREADY_DONE_LABEL,
3658
+ BUGFIX_LABEL,
3659
+ RELEASE_CLASSIFICATION_NAMES,
3627
3660
  has_any_label,
3628
3661
  has_label_name,
3629
- run_tail,
3630
- lane_background,
3631
3662
  lane_park,
3632
3663
  repo_party,
3633
3664
  FULL_PAGE_QUERY,