@joshuafolkken/kit 1.1136.0 → 1.1166.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 (165) hide show
  1. package/.claude/settings.json +4 -4
  2. package/.claude/skills/epic-commands/SKILL.md +27 -239
  3. package/.claude/skills/epic-commands/epic-bundle.md +115 -0
  4. package/.claude/skills/epic-commands/execution-waves.md +126 -0
  5. package/.claude/skills/workflow-commands/SKILL.md +48 -194
  6. package/.claude/skills/workflow-commands/background-commands.md +1 -1
  7. package/.claude/skills/workflow-commands/backlogrun-child.md +12 -123
  8. package/.claude/skills/workflow-commands/backlogrun-lanes.md +11 -60
  9. package/.claude/skills/workflow-commands/backlogrun-park.md +10 -8
  10. package/.claude/skills/workflow-commands/backlogrun-progress.md +17 -173
  11. package/.claude/skills/workflow-commands/backlogrun-recovery.md +155 -0
  12. package/.claude/skills/workflow-commands/backlogrun-steps.md +64 -144
  13. package/.claude/skills/workflow-commands/backlogrun.md +5 -4
  14. package/.claude/skills/workflow-commands/chain-rule.md +3 -2
  15. package/.claude/skills/workflow-commands/delegation.md +2 -2
  16. package/.claude/skills/workflow-commands/entry-sequence.md +62 -0
  17. package/.claude/skills/workflow-commands/followup.md +104 -181
  18. package/.claude/skills/workflow-commands/fullrun-steps.md +8 -9
  19. package/.claude/skills/workflow-commands/fullrun.md +16 -73
  20. package/.claude/skills/workflow-commands/halfrun.md +10 -36
  21. package/.claude/skills/workflow-commands/into-target.md +4 -4
  22. package/.claude/skills/workflow-commands/issue-comments.md +7 -8
  23. package/.claude/skills/workflow-commands/issue-scout.md +6 -6
  24. package/.claude/skills/workflow-commands/kickoff.md +6 -6
  25. package/.claude/skills/workflow-commands/needs-human-review.md +6 -6
  26. package/.claude/skills/workflow-commands/observation-filing.md +21 -172
  27. package/.claude/skills/workflow-commands/observation-ledger.md +150 -0
  28. package/.claude/skills/workflow-commands/pre-gate-cut.md +33 -93
  29. package/.claude/skills/workflow-commands/prerequisite.md +6 -6
  30. package/.claude/skills/workflow-commands/progress-watcher.md +90 -0
  31. package/.claude/skills/workflow-commands/prrun.md +5 -5
  32. package/.claude/skills/workflow-commands/retrospective.md +9 -9
  33. package/.claude/skills/workflow-commands/split-assessment.md +2 -2
  34. package/.claude/skills/workflow-commands/target-repository.md +2 -2
  35. package/.claude/skills/workflow-commands/working-tree-hold.md +7 -5
  36. package/.codex/hooks.json +4 -4
  37. package/AGENTS.md +1 -6
  38. package/CLAUDE.md +58 -120
  39. package/GEMINI.md +1 -6
  40. package/dist/CLAUDE.md +58 -120
  41. package/dist/hooks/batch-guard.js +4 -4
  42. package/dist/hooks/{chunk-NFZGFGOR.js → chunk-5KTCMCOT.js} +14 -1
  43. package/dist/hooks/{chunk-LJBLGHEH.js → chunk-A6P7PN7P.js} +4 -6
  44. package/dist/hooks/{chunk-FO2I7UT7.js → chunk-ANJ2WGFD.js} +1 -1
  45. package/dist/hooks/{chunk-GDU26K3J.js → chunk-DYAVAM6S.js} +563 -126
  46. package/dist/hooks/{chunk-RFWWUI5F.js → chunk-ENA7P5FB.js} +3 -3
  47. package/dist/hooks/{chunk-KBXZLMRH.js → chunk-GU5MATVE.js} +213 -65
  48. package/dist/hooks/chunk-GYNGP7HI.js +56 -0
  49. package/dist/hooks/{chunk-HBKZLITF.js → chunk-URJA6XY4.js} +4 -4
  50. package/dist/hooks/{chunk-KOKOAV6D.js → chunk-V2BTOZHT.js} +6 -4
  51. package/dist/hooks/{chunk-JKKTVDAG.js → chunk-ZDZ555YH.js} +100 -20
  52. package/dist/hooks/codex-hook-adapter.js +10 -10
  53. package/dist/hooks/duplicate-read-guard.js +5 -5
  54. package/dist/hooks/format-edited.js +2 -2
  55. package/dist/hooks/inputs.json +193 -192
  56. package/dist/hooks/investigation-guard.js +5 -5
  57. package/dist/hooks/pretool-guard.js +11 -10
  58. package/dist/hooks/stop-guard.js +5 -5
  59. package/dist/josh.js +25 -2
  60. package/dist/version/index.js +5 -1
  61. package/package.json +2 -1
  62. package/prompts/collaboration-workflow/file-edits.md +11 -10
  63. package/prompts/collaboration-workflow/gh-rest.md +2 -4
  64. package/prompts/collaboration-workflow/glossary.md +1 -1
  65. package/prompts/collaboration-workflow/issue-citation.md +5 -9
  66. package/prompts/collaboration-workflow/issue-template.md +40 -115
  67. package/prompts/collaboration-workflow/operating-rules.md +4 -5
  68. package/prompts/collaboration-workflow/output-bounds.md +12 -78
  69. package/prompts/collaboration-workflow/overview.md +7 -13
  70. package/prompts/collaboration-workflow/plan-comment.md +11 -39
  71. package/prompts/collaboration-workflow/principles.md +3 -4
  72. package/prompts/collaboration-workflow/report-format.md +28 -74
  73. package/prompts/collaboration-workflow/residency.md +12 -109
  74. package/prompts/collaboration-workflow/rule-delivery.md +98 -97
  75. package/prompts/collaboration-workflow/shell-body.md +3 -13
  76. package/prompts/collaboration-workflow/turn-batching.md +14 -88
  77. package/prompts/collaboration-workflow/upstream-interrupt.md +12 -14
  78. package/prompts/collaboration-workflow/wip-cap.md +6 -45
  79. package/prompts/collaboration-workflow.md +1 -13
  80. package/prompts/review-rubric.md +8 -71
  81. package/prompts/review.md +25 -55
  82. package/prompts/testing-guide.md +18 -67
  83. package/scripts/agent/agent-role-profile.ts +1 -1
  84. package/scripts/agent/codex-hooks.ts +3 -12
  85. package/scripts/backlog/backlog-budget.ts +1 -1
  86. package/scripts/backlog/backlog-drive-cli.ts +4 -3
  87. package/scripts/backlog/backlog-drive-offer-argv.ts +10 -1
  88. package/scripts/backlog/backlog-offer.ts +6 -6
  89. package/scripts/behavior/behavior-rules.ts +11 -4
  90. package/scripts/delegation/investigation-reads.ts +5 -5
  91. package/scripts/discovery/repo-discovery.ts +21 -7
  92. package/scripts/discovery/repo-origin.ts +26 -0
  93. package/scripts/discovery/repo-party.ts +42 -1
  94. package/scripts/document/backlogrun-parent-read-set.ts +14 -15
  95. package/scripts/document/document-byte-budget.ts +34 -20
  96. package/scripts/document/entry-read-budget.ts +21 -9
  97. package/scripts/document/lane-child-read-set.ts +12 -14
  98. package/scripts/document/read-set-cli.ts +4 -4
  99. package/scripts/document/read-set-point-of-use.ts +10 -2
  100. package/scripts/document/resident-budget.ts +47 -0
  101. package/scripts/epic/epic-shape.ts +10 -13
  102. package/scripts/epic/epic-solo.ts +1 -1
  103. package/scripts/exports/unused-members-cli.ts +7 -3
  104. package/scripts/gh/git-gh-api-path.ts +7 -0
  105. package/scripts/hooks/pretool-guard-cli.ts +2 -2
  106. package/scripts/hooks/pretool-guard.ts +45 -2
  107. package/scripts/hooks/run-hook.sh +41 -0
  108. package/scripts/init/hook-command-rewrite.ts +18 -35
  109. package/scripts/init/hook-launch.ts +21 -32
  110. package/scripts/issue/issue-auto-ok.ts +95 -0
  111. package/scripts/issue/issue-file-cli.ts +53 -7
  112. package/scripts/issue/issue-file.ts +28 -5
  113. package/scripts/issue/issue-labels.ts +12 -12
  114. package/scripts/issue/issue-rank.ts +1 -1
  115. package/scripts/issue/issue-read-cli.ts +3 -3
  116. package/scripts/issue/issue-read.ts +2 -2
  117. package/scripts/issue/issue-scout-cli.ts +2 -2
  118. package/scripts/issue/issue-state-cli.ts +1 -1
  119. package/scripts/issue/issue-state.ts +2 -2
  120. package/scripts/issue/issue-wip.ts +70 -0
  121. package/scripts/josh/hook-decision.ts +17 -0
  122. package/scripts/josh/josh-commands-development.ts +10 -0
  123. package/scripts/josh/josh-commands-issue.ts +2 -2
  124. package/scripts/lines/bytes-command.ts +29 -6
  125. package/scripts/observations/observation-ledger-line.ts +1 -1
  126. package/scripts/release/release-progress.ts +167 -0
  127. package/scripts/release/release-publish.ts +19 -8
  128. package/scripts/release/release-tag.ts +22 -8
  129. package/scripts/rules/decision-oracle-stage.ts +1 -1
  130. package/scripts/rules/decision-oracle.ts +6 -6
  131. package/scripts/rules/delivered-rules.ts +11 -11
  132. package/scripts/rules/direct-pr-create.ts +110 -0
  133. package/scripts/rules/file-body.ts +98 -42
  134. package/scripts/rules/filing-cap.ts +2 -2
  135. package/scripts/rules/filing-offer.ts +1 -1
  136. package/scripts/rules/gh-api.ts +18 -1
  137. package/scripts/rules/implementation-cut.ts +3 -1
  138. package/scripts/rules/lane-background.ts +67 -10
  139. package/scripts/rules/permission-guards.ts +10 -2
  140. package/scripts/rules/stop-rules.ts +4 -4
  141. package/scripts/rules/test-declared-commit.ts +1 -1
  142. package/scripts/rules/third-party-write.ts +56 -12
  143. package/scripts/run/run-cut-handoff.ts +21 -1
  144. package/scripts/run/run-entry-cli.ts +11 -3
  145. package/scripts/run/run-hold-cli.ts +16 -2
  146. package/scripts/run/run-label.ts +50 -0
  147. package/scripts/run/run-merge-steps.ts +8 -3
  148. package/scripts/run/run-merge.ts +1 -1
  149. package/scripts/run/run-prep-cli.ts +6 -2
  150. package/scripts/run/run-prep.ts +17 -0
  151. package/scripts/run/run-ship-preflight.ts +34 -3
  152. package/scripts/run/run-ship-review-steps.ts +1 -1
  153. package/scripts/run/run-ship-review.ts +26 -5
  154. package/scripts/run/run-step-cli.ts +20 -7
  155. package/scripts/run/run-wake-driver.ts +24 -1
  156. package/scripts/run/run-wake-session.ts +2 -1
  157. package/scripts/test/test-declared-logic.ts +1 -1
  158. package/scripts/time-runtime/time-batch-guard.ts +52 -16
  159. package/scripts/time-runtime/time-density-hook.ts +20 -2
  160. package/scripts/time-runtime/time-density.ts +4 -3
  161. package/scripts/time-runtime/time-markers.ts +15 -4
  162. package/scripts/version/npm-registry.ts +11 -1
  163. package/templates/workflows/ci.yml +9 -1
  164. package/.claude/skills/workflow-commands/followup-reference.md +0 -118
  165. package/dist/hooks/chunk-HANSKHES.js +0 -464
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  investigation_reads
3
- } from "./chunk-LJBLGHEH.js";
3
+ } from "./chunk-A6P7PN7P.js";
4
4
  import {
5
5
  lane_guard_policy
6
- } from "./chunk-HANSKHES.js";
6
+ } from "./chunk-GYNGP7HI.js";
7
7
  import {
8
8
  hook_decision
9
- } from "./chunk-NFZGFGOR.js";
9
+ } from "./chunk-5KTCMCOT.js";
10
10
  import {
11
11
  json_value,
12
12
  time_spans
13
- } from "./chunk-GDU26K3J.js";
13
+ } from "./chunk-DYAVAM6S.js";
14
14
 
15
15
  // scripts/delegation/duplicate-read-guard.ts
16
16
  import { statSync } from "node:fs";
@@ -1,10 +1,12 @@
1
1
  import {
2
- lane_guard_policy,
3
- time_batch_guard
4
- } from "./chunk-HANSKHES.js";
2
+ lane_guard_policy
3
+ } from "./chunk-GYNGP7HI.js";
5
4
  import {
6
5
  hook_decision
7
- } from "./chunk-NFZGFGOR.js";
6
+ } from "./chunk-5KTCMCOT.js";
7
+ import {
8
+ time_batch_guard
9
+ } from "./chunk-DYAVAM6S.js";
8
10
 
9
11
  // scripts/hooks/batch-guard.ts
10
12
  import { text } from "node:stream/consumers";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  lane_child_marker,
3
3
  run_issue_number
4
- } from "./chunk-NFZGFGOR.js";
4
+ } from "./chunk-5KTCMCOT.js";
5
5
  import {
6
6
  PLATFORM_TEMP_ROOT,
7
7
  cost_blocks,
@@ -14,7 +14,7 @@ import {
14
14
  time_density_hook,
15
15
  time_shell,
16
16
  time_transcript_line
17
- } from "./chunk-GDU26K3J.js";
17
+ } from "./chunk-DYAVAM6S.js";
18
18
  import {
19
19
  ENV_FILE_NAME,
20
20
  LANE_SEAT_KEY,
@@ -147,7 +147,7 @@ function turn_filing_count(tail) {
147
147
  function decide(_call, run3) {
148
148
  return prior_filing_count(time_density_hook.read_tail(run3.transcript)) >= CAP_REACHED;
149
149
  }
150
- var FILING_CAP_REASON = `\u26D4 filing cap: this run has already filed ${String(FILING_CAP)} Issues, the per-run ceiling \u2014 on reaching it, stop and report rather than filing more. Automatic filing is capped so a run cannot manufacture Issues faster than they can be closed (\`.claude/skills/workflow-commands/SKILL.md\` \u2192 \xA72d, \`observation-filing.md\`). A further Issue that genuinely must exist is a person's call, not this run's. **This rule fires on every filing past the cap, not once per run**, so reissuing the same filing will be refused again.`;
150
+ var FILING_CAP_REASON = `\u26D4 filing cap: this run has already filed ${String(FILING_CAP)} Issues, the per-run ceiling \u2014 on reaching it, stop and report rather than filing more. Automatic filing is capped so a run cannot manufacture Issues faster than they can be closed (\`.claude/skills/workflow-commands/SKILL.md\` \u2192 \`prerequisite.md\`, \`observation-filing.md\`). A further Issue that genuinely must exist is a person's call, not this run's. **This rule fires on every filing past the cap, not once per run**, so reissuing the same filing will be refused again.`;
151
151
  var ROW = {
152
152
  id: "filing-cap",
153
153
  is_trigger: bash_triggers.on_bash_command(bash_triggers.is_issue_filing),
@@ -1594,6 +1594,11 @@ var REMAINING_LABEL = "Remaining";
1594
1594
  var UNTOUCHED_LABEL = "Deliberately untouched";
1595
1595
  var INSTRUCTION_LABEL = "Instruction (verbatim)";
1596
1596
  var EMPTY_LIST_NOTE = "(none)";
1597
+ function describe_key(key2) {
1598
+ const value = handoff_schema.shape[key2] instanceof z4.ZodArray ? '["\u2026"]' : '"\u2026"';
1599
+ return `"${key2}": ${value}`;
1600
+ }
1601
+ var HANDOFF_FORMAT = `a JSON object {${handoff_schema.keyof().options.map((key2) => describe_key(key2)).join(", ")}}`;
1597
1602
  function parse_handoff(raw) {
1598
1603
  try {
1599
1604
  const parsed = handoff_schema.safeParse(JSON.parse(raw));
@@ -1619,7 +1624,10 @@ function load_handoff(handoff_path, max_bytes) {
1619
1624
  if (handoff_path === void 0) return { kind: "ok", handoff: void 0 };
1620
1625
  const handoff = read_handoff_file(handoff_path);
1621
1626
  if (handoff === void 0) {
1622
- return { kind: "bad", note: `--handoff ${handoff_path} is not a readable handoff file` };
1627
+ return {
1628
+ kind: "bad",
1629
+ note: `--handoff ${handoff_path} is not a readable handoff file \u2014 write ${HANDOFF_FORMAT}`
1630
+ };
1623
1631
  }
1624
1632
  if (!is_within_bound(handoff, max_bytes)) {
1625
1633
  return { kind: "bad", note: `--handoff ${handoff_path} is too large to carry across the cut` };
@@ -1642,6 +1650,7 @@ ${handoff.instruction}`,
1642
1650
  ].join("\n\n");
1643
1651
  }
1644
1652
  var run_cut_handoff = {
1653
+ HANDOFF_FORMAT,
1645
1654
  describe_handoff,
1646
1655
  handoff_schema,
1647
1656
  is_complete_handoff,
@@ -1899,24 +1908,47 @@ var run_tail = {
1899
1908
  };
1900
1909
 
1901
1910
  // scripts/rules/lane-background.ts
1902
- var LONG_RUNNING_COMMANDS = new Set(
1903
- ["gate", "git", "followup", "ship"].map((name) => `${time_shell.JOSH_PREFIX}${name}`)
1904
- );
1911
+ var SHIP_COMMAND = `${time_shell.JOSH_PREFIX}ship`;
1912
+ var LONG_RUNNING_COMMANDS = /* @__PURE__ */ new Set([
1913
+ ...["gate", "git", "followup"].map((name) => `${time_shell.JOSH_PREFIX}${name}`),
1914
+ SHIP_COMMAND
1915
+ ]);
1905
1916
  var BACKGROUND_KEY2 = "run_in_background";
1917
+ var TIMEOUT_KEY = "timeout";
1918
+ var FOREGROUND_TIMEOUT_MS = 6e5;
1906
1919
  function is_backgrounded2(input) {
1907
1920
  return json_value.is_record(input) && input[BACKGROUND_KEY2] === true;
1908
1921
  }
1909
- function runs_long_command(command) {
1910
- return time_shell.josh_commands_of(command).some((name) => LONG_RUNNING_COMMANDS.has(name));
1922
+ function long_commands_of(command) {
1923
+ return time_shell.josh_commands_of(command).filter((name) => LONG_RUNNING_COMMANDS.has(name));
1924
+ }
1925
+ function ships_alone(command) {
1926
+ const names = long_commands_of(command);
1927
+ return names.length > 0 && names.every((name) => name === SHIP_COMMAND);
1928
+ }
1929
+ function backgrounded_bash_command(call) {
1930
+ if (call.name !== cost_blocks.BASH_TOOL || !is_backgrounded2(call.input)) return void 0;
1931
+ return time_shell.bash_command(call.input);
1932
+ }
1933
+ function is_backgrounded_ship(call) {
1934
+ const command = backgrounded_bash_command(call);
1935
+ return command !== void 0 && ships_alone(command);
1911
1936
  }
1912
1937
  function is_candidate(call) {
1913
1938
  if (run_tail.is_push_step_call(call)) return true;
1914
- if (call.name !== cost_blocks.BASH_TOOL || !is_backgrounded2(call.input)) return false;
1915
- return runs_long_command(time_shell.bash_command(call.input));
1939
+ const command = backgrounded_bash_command(call);
1940
+ if (command === void 0 || is_backgrounded_ship(call)) return false;
1941
+ return long_commands_of(command).length > 0;
1916
1942
  }
1917
1943
  function is_background_long_run(call, is_lane_child = () => lane_child_marker.is_child_of(process.cwd())) {
1918
1944
  return is_candidate(call) && is_lane_child();
1919
1945
  }
1946
+ function foreground_input(call, is_lane_child = () => lane_child_marker.is_child_of(process.cwd())) {
1947
+ if (!is_backgrounded_ship(call) || !json_value.is_record(call.input)) return void 0;
1948
+ if (!is_lane_child()) return void 0;
1949
+ return { ...call.input, [BACKGROUND_KEY2]: false, [TIMEOUT_KEY]: FOREGROUND_TIMEOUT_MS };
1950
+ }
1951
+ var FOREGROUND_NOTE = "lane background: this lane child backgrounded `josh ship`, which would die with the headless turn before its supervisor exists \u2014 so it was run in the foreground instead, where it detaches itself after the preflight. End the turn on `launched` / `busy` (joshuafolkken/kit#3154).";
1920
1952
  function unfinished_ids(tail, launched_ids) {
1921
1953
  const lines = tail.split("\n").map((line) => time_transcript_line.parse_line(line));
1922
1954
  const finished = new Set(lines.map((line) => line?.finished_background ?? ""));
@@ -1930,7 +1962,7 @@ function pending_background_ids(tail) {
1930
1962
  function pending_agent_ids(tail) {
1931
1963
  return unfinished_ids(tail, (block) => [block.agent_id]);
1932
1964
  }
1933
- var LANE_BACKGROUND_REASON = '\u26D4 lane background: this session is a dispatched lane child (`JOSH_LANE_CHILD`), a headless `claude -p` process whose background Bash tasks are killed when the turn ends \u2014 so a backgrounded `josh gate` / `josh git` / `josh followup` / `josh ship` never re-invokes you; it dies at `exit code 143` (joshuafolkken/kit#2704, measured on the #2606 child: implementation, review and live verification done, the run parked instead of merged). Hand the gate-to-merge region to the detached supervisor instead: `pnpm josh ship --detach --review "<title> #<N>"` (add `--cite <N>`) issued in the foreground \u2014 its preflight runs in this process before the supervisor exists, so a backgrounded `ship` dies with the turn (joshuafolkken/kit#3027) \u2014 then end the turn on `launched` / `busy`. `.claude/skills/workflow-commands/chain-rule.md` step 0 is the single source. A single check you must read before continuing runs in the foreground within the tool timeout; the commit-push step does not \u2014 in a child it too belongs to the detached ship, in either spelling. This rule fires on every occurrence, not once per run.';
1965
+ var LANE_BACKGROUND_REASON = '\u26D4 lane background: this session is a dispatched lane child (`JOSH_LANE_CHILD`), a headless `claude -p` process whose background Bash tasks are killed when the turn ends \u2014 so a backgrounded `josh gate` / `josh git` / `josh followup` / `josh ship` never re-invokes you; it dies at `exit code 143` (joshuafolkken/kit#2704, measured on the #2606 child: implementation, review and live verification done, the run parked instead of merged). Hand the gate-to-merge region to the detached supervisor instead: `pnpm josh ship --detach --review "<title> #<N>"` (add `--cite <N>`) issued in the foreground \u2014 its preflight runs in this process before the supervisor exists, so a backgrounded `ship` dies with the turn (joshuafolkken/kit#3027; a backgrounded `ship` issued alone is moved to the foreground for you, joshuafolkken/kit#3154) \u2014 then end the turn on `launched` / `busy`. `.claude/skills/workflow-commands/chain-rule.md` step 0 is the single source. A single check you must read before continuing runs in the foreground within the tool timeout; the commit-push step does not \u2014 in a child it too belongs to the detached ship, in either spelling. This rule fires on every occurrence, not once per run.';
1934
1966
  var LANE_BACKGROUND_STOP_REASON = "\u26D4 lane background stop: this is a dispatched lane child (`JOSH_LANE_CHILD`) and a background task it launched has not finished \u2014 ending this headless turn kills it, and nothing re-invokes you afterwards (joshuafolkken/kit#2704). Do not send a notification and do not stop: wait for the task in the foreground and act on its result, or re-issue the work through `pnpm josh ship --detach`, whose supervisor outlives the turn (`.claude/skills/workflow-commands/chain-rule.md` step 0). Do not repeat your previous reply.";
1935
1967
  var ROW2 = {
1936
1968
  id: "lane-background",
@@ -1939,9 +1971,11 @@ var ROW2 = {
1939
1971
  decide: () => true
1940
1972
  };
1941
1973
  var lane_background = {
1974
+ FOREGROUND_NOTE,
1942
1975
  LANE_BACKGROUND_REASON,
1943
1976
  LANE_BACKGROUND_STOP_REASON,
1944
1977
  ROW: ROW2,
1978
+ foreground_input,
1945
1979
  is_background_long_run,
1946
1980
  pending_agent_ids,
1947
1981
  pending_background_ids
@@ -3559,17 +3593,17 @@ var DEPTH_LABELS = [
3559
3593
  {
3560
3594
  name: DEPTH_0_LABEL,
3561
3595
  color: "0e8a16",
3562
- description: "Depth 0 \u2014 what a consumer of this package touches (SKILL.md \xA72i)"
3596
+ description: "Depth 0 \u2014 what a consumer of this package touches (observation-filing.md)"
3563
3597
  },
3564
3598
  {
3565
3599
  name: DEPTH_1_LABEL,
3566
3600
  color: "fbc02d",
3567
- description: "Depth 1 \u2014 the run orchestration that executes an Issue (SKILL.md \xA72i)"
3601
+ description: "Depth 1 \u2014 the run orchestration that executes an Issue (observation-filing.md)"
3568
3602
  },
3569
3603
  {
3570
3604
  name: DEPTH_2_LABEL,
3571
3605
  color: "c5def5",
3572
- description: "Depth 2 \u2014 what measures a run (SKILL.md \xA72i)"
3606
+ description: "Depth 2 \u2014 what measures a run (observation-filing.md)"
3573
3607
  }
3574
3608
  ];
3575
3609
  var WORKFLOW_LABELS = [
@@ -3687,6 +3721,7 @@ var REPO_PATH_SEGMENTS = 2;
3687
3721
  var NOT_FOUND3 = -1;
3688
3722
  var SECTION_PREFIX = "[";
3689
3723
  var ORIGIN_SECTION = /^\[remote\s+"origin"\]$/u;
3724
+ var REMOTE_SECTION = /^\[remote\s+"[^"]+"\]$/u;
3690
3725
  var URL_KEY = "url";
3691
3726
  function is_github_hostname(host) {
3692
3727
  return host.toLowerCase() === GITHUB_HOST;
@@ -3746,6 +3781,18 @@ function parse_origin_from_config(content) {
3746
3781
  const lines = content.split("\n").map((line) => line.trim());
3747
3782
  return origin_section_lines(lines).map((line) => entry_value(line, URL_KEY)).find((url) => url !== void 0);
3748
3783
  }
3784
+ function section_groups(lines) {
3785
+ const groups = [];
3786
+ for (const line of lines) {
3787
+ if (is_section_header(line)) groups.push([line]);
3788
+ else groups.at(-1)?.push(line);
3789
+ }
3790
+ return groups;
3791
+ }
3792
+ function parse_remote_urls_from_config(content) {
3793
+ const lines = content.split("\n").map((line) => line.trim());
3794
+ return section_groups(lines).filter((group) => REMOTE_SECTION.test(group[0] ?? "")).flatMap((group) => group.map((line) => entry_value(line, URL_KEY))).filter((url) => url !== void 0);
3795
+ }
3749
3796
  function format_identity(identity) {
3750
3797
  return `${identity.owner}${PATH_SEPARATOR2}${identity.repo}`.toLowerCase();
3751
3798
  }
@@ -3755,6 +3802,7 @@ var repo_origin = {
3755
3802
  is_github_ssh_host,
3756
3803
  parse_origin_from_config,
3757
3804
  parse_origin_url,
3805
+ parse_remote_urls_from_config,
3758
3806
  format_identity
3759
3807
  };
3760
3808
 
@@ -3829,17 +3877,23 @@ function resolve_git_directory(repository_path) {
3829
3877
  return void 0;
3830
3878
  }
3831
3879
  }
3832
- function read_origin_url(repository_path) {
3880
+ function read_config(repository_path) {
3833
3881
  const git_directory = resolve_git_directory(repository_path);
3834
3882
  if (git_directory === void 0) return void 0;
3835
3883
  try {
3836
- return repo_origin.parse_origin_from_config(
3837
- readFileSync3(path5.join(git_directory, GIT_CONFIG), "utf8")
3838
- );
3884
+ return readFileSync3(path5.join(git_directory, GIT_CONFIG), "utf8");
3839
3885
  } catch {
3840
3886
  return void 0;
3841
3887
  }
3842
3888
  }
3889
+ function read_origin_url(repository_path) {
3890
+ const config = read_config(repository_path);
3891
+ return config === void 0 ? void 0 : repo_origin.parse_origin_from_config(config);
3892
+ }
3893
+ function read_remote_urls(repository_path) {
3894
+ const config = read_config(repository_path);
3895
+ return config === void 0 ? [] : repo_origin.parse_remote_urls_from_config(config);
3896
+ }
3843
3897
  function sibling_directories(parent) {
3844
3898
  try {
3845
3899
  return readdirSync(parent, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => path5.join(parent, entry.name)).toSorted((left, right) => left.localeCompare(right));
@@ -3878,6 +3932,7 @@ var repo_discovery = {
3878
3932
  OVERRIDE_ENV_KEY,
3879
3933
  main_worktree,
3880
3934
  read_origin_url,
3935
+ read_remote_urls,
3881
3936
  resolve_current_owner,
3882
3937
  scan_siblings,
3883
3938
  discover_repositories
@@ -3887,6 +3942,8 @@ var repo_discovery = {
3887
3942
  var FIRST_PARTY = "first-party";
3888
3943
  var THIRD_PARTY = "third-party";
3889
3944
  var UNKNOWN = "unknown";
3945
+ var GH_REPO_ENV_KEY = "GH_REPO";
3946
+ var GH_REPO_PATH_SEGMENTS = 2;
3890
3947
  function classify4(session_owner, target) {
3891
3948
  if (session_owner === void 0 || target === void 0) return UNKNOWN;
3892
3949
  return session_owner.toLowerCase() === target.toLowerCase() ? FIRST_PARTY : THIRD_PARTY;
@@ -3897,7 +3954,25 @@ function target_owner(owner_repo) {
3897
3954
  function current_owner(repository_path = process.cwd()) {
3898
3955
  return repo_discovery.resolve_current_owner(repository_path);
3899
3956
  }
3900
- var repo_party = { FIRST_PARTY, THIRD_PARTY, UNKNOWN, classify: classify4, current_owner, target_owner };
3957
+ function gh_repo_owners(gh_repo) {
3958
+ return [target_owner(gh_repo.split("/").slice(-GH_REPO_PATH_SEGMENTS).join("/"))];
3959
+ }
3960
+ function remote_owners(repository_path) {
3961
+ return repo_discovery.read_remote_urls(repository_path).map((url) => repo_origin.parse_origin_url(url)?.owner);
3962
+ }
3963
+ function placeholder_owners(repository_path = process.cwd(), environment2 = process.env) {
3964
+ const gh_repo = environment2[GH_REPO_ENV_KEY];
3965
+ return gh_repo === void 0 || gh_repo === "" ? remote_owners(repository_path) : gh_repo_owners(gh_repo);
3966
+ }
3967
+ var repo_party = {
3968
+ FIRST_PARTY,
3969
+ THIRD_PARTY,
3970
+ UNKNOWN,
3971
+ classify: classify4,
3972
+ current_owner,
3973
+ placeholder_owners,
3974
+ target_owner
3975
+ };
3901
3976
 
3902
3977
  // scripts/lane/lane-reap.ts
3903
3978
  import { execFileSync as execFileSync3 } from "node:child_process";
@@ -4494,10 +4569,14 @@ function commit_status_api_path(commit_sha, repo) {
4494
4569
  function tag_reference_api_path(tag, repo) {
4495
4570
  return `${repo_api_path(repo)}/git/ref/tags/${tag}`;
4496
4571
  }
4572
+ function release_by_tag_api_path(tag, repo) {
4573
+ return `${repo_api_path(repo)}/releases/tags/${tag}`;
4574
+ }
4497
4575
  var git_gh_api_path = {
4498
4576
  FULL_PAGE_QUERY,
4499
4577
  repo_api_path,
4500
4578
  tag_ref_api_path: tag_reference_api_path,
4579
+ release_by_tag_api_path,
4501
4580
  issues_api_path,
4502
4581
  issue_api_path,
4503
4582
  blocked_by_api_path,
@@ -6435,6 +6514,7 @@ export {
6435
6514
  cli_flags,
6436
6515
  own_session,
6437
6516
  backlog_budget,
6517
+ run_cut_handoff,
6438
6518
  run_hold,
6439
6519
  run_cut,
6440
6520
  run_tail,
@@ -1,27 +1,27 @@
1
1
  #!/usr/bin/env tsx
2
2
  import {
3
3
  pretool_guard
4
- } from "./chunk-KBXZLMRH.js";
4
+ } from "./chunk-GU5MATVE.js";
5
5
  import {
6
6
  bounded_pool
7
- } from "./chunk-JKKTVDAG.js";
7
+ } from "./chunk-ZDZ555YH.js";
8
8
  import {
9
9
  build_envelope,
10
10
  compose_context,
11
11
  format_edited_payload
12
- } from "./chunk-FO2I7UT7.js";
12
+ } from "./chunk-ANJ2WGFD.js";
13
13
  import "./chunk-3V37IID6.js";
14
- import "./chunk-KOKOAV6D.js";
15
- import "./chunk-RFWWUI5F.js";
16
- import "./chunk-HBKZLITF.js";
17
- import "./chunk-LJBLGHEH.js";
18
- import "./chunk-HANSKHES.js";
14
+ import "./chunk-V2BTOZHT.js";
15
+ import "./chunk-ENA7P5FB.js";
16
+ import "./chunk-URJA6XY4.js";
17
+ import "./chunk-A6P7PN7P.js";
18
+ import "./chunk-GYNGP7HI.js";
19
19
  import {
20
20
  hook_decision
21
- } from "./chunk-NFZGFGOR.js";
21
+ } from "./chunk-5KTCMCOT.js";
22
22
  import {
23
23
  time_density_hook
24
- } from "./chunk-GDU26K3J.js";
24
+ } from "./chunk-DYAVAM6S.js";
25
25
  import "./chunk-WPALEIRX.js";
26
26
  import "./chunk-RKUAD3I6.js";
27
27
 
@@ -9,11 +9,11 @@ import {
9
9
  is_enabled,
10
10
  notice_refusal_path,
11
11
  refusal_path
12
- } from "./chunk-HBKZLITF.js";
13
- import "./chunk-LJBLGHEH.js";
14
- import "./chunk-HANSKHES.js";
15
- import "./chunk-NFZGFGOR.js";
16
- import "./chunk-GDU26K3J.js";
12
+ } from "./chunk-URJA6XY4.js";
13
+ import "./chunk-A6P7PN7P.js";
14
+ import "./chunk-GYNGP7HI.js";
15
+ import "./chunk-5KTCMCOT.js";
16
+ import "./chunk-DYAVAM6S.js";
17
17
  import "./chunk-WPALEIRX.js";
18
18
  import "./chunk-RKUAD3I6.js";
19
19
  export {
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  report_no_payload,
4
4
  run_hook
5
- } from "./chunk-FO2I7UT7.js";
5
+ } from "./chunk-ANJ2WGFD.js";
6
6
  import "./chunk-3V37IID6.js";
7
- import "./chunk-GDU26K3J.js";
7
+ import "./chunk-DYAVAM6S.js";
8
8
  import "./chunk-RKUAD3I6.js";
9
9
 
10
10
  // scripts/hooks/format-edited-cli.ts