@pmelab/gtd 36.0.0 → 38.0.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 (62) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +30 -9
  3. package/claude/hooks/context.ts +66 -0
  4. package/claude/hooks/drive.ts +3 -0
  5. package/claude/hooks/register.tsx +69 -6
  6. package/dist/chunks/{reserved-BAv71I4i.mjs → reserved-sfMdy7v7.mjs} +83 -22
  7. package/dist/chunks/{tail-kar1zhOb.mjs → tail-Cgca5Gp-.mjs} +1 -1
  8. package/dist/chunks/{wire-D3Rc5r22.mjs → wire-CSsa3Wxd.mjs} +117 -2
  9. package/dist/gtd.bundle.mjs +498 -56
  10. package/dist/testkit.mjs +115 -3
  11. package/dist/wire.mjs +2 -2
  12. package/dist/workflows/cleanup.mjs +2 -2
  13. package/dist/workflows/feature.mjs +277 -58
  14. package/dist/workflows/fix.mjs +2 -2
  15. package/dist/workflows/review.mjs +2 -2
  16. package/dist/workflows/rollout.mjs +1 -1
  17. package/dist/workflows.mjs +355 -75
  18. package/package.json +1 -1
  19. package/src/cli/Cli.test.ts +10 -3
  20. package/src/cli/Cli.ts +76 -1
  21. package/src/cli/Program.test.ts +1 -0
  22. package/src/cli/Program.ts +28 -0
  23. package/src/cli/ToolCommands.ts +3 -0
  24. package/src/edge/Edge.ts +11 -0
  25. package/src/flows/runtime.ts +11 -0
  26. package/src/replay/Replay.ts +51 -2
  27. package/src/testkit/Layers.ts +1 -0
  28. package/src/testkit/steps.ts +35 -0
  29. package/src/wire/BeatDocument.ts +12 -2
  30. package/src/wire/BeatStatus.ts +3 -0
  31. package/src/wire/ContextLimit.fixture.ts +30 -0
  32. package/src/wire/ContextLimit.test.ts +96 -0
  33. package/src/wire/ContextLimit.ts +169 -0
  34. package/src/wire/index.ts +1 -0
  35. package/src/wire/types.ts +7 -0
  36. package/src/workflow/Workflow.ts +9 -1
  37. package/src/workflows/feature/context-limit.feature +37 -0
  38. package/src/workflows/feature/coverage.ts +22 -8
  39. package/src/workflows/feature/criteria.test.ts +17 -1
  40. package/src/workflows/feature/criteria.ts +26 -3
  41. package/src/workflows/feature/feature.ts +69 -16
  42. package/src/workflows/feature/index.ts +1 -0
  43. package/src/workflows/feature/refactor-absorbs.feature +12 -5
  44. package/src/workflows/feature/refactor-first.feature +11 -2
  45. package/src/workflows/feature/refactor-lens-models.feature +4 -0
  46. package/src/workflows/feature/refactor-rebuild.feature +269 -0
  47. package/src/workflows/feature/refactor-review.feature +45 -1
  48. package/src/workflows/feature/refactor.ts +9 -3
  49. package/src/workflows/feature/seam.test.ts +108 -3
  50. package/src/workflows/feature/seam.ts +169 -31
  51. package/src/workflows/feature/slicing-cap.feature +14 -0
  52. package/src/workflows/feature/slicing.feature +225 -0
  53. package/src/workflows/feature/slicing.test.ts +49 -0
  54. package/src/workflows/feature/slicing.ts +105 -0
  55. package/src/workflows/index.ts +1 -0
  56. package/src/workflows/shared/fences.ts +5 -0
  57. package/src/workflows/shared/options.test.ts +11 -2
  58. package/src/workflows/shared/options.ts +19 -4
  59. package/src/workflows/shared/steps.ts +2 -0
  60. package/src/workflows/shared/text.ts +129 -28
  61. package/src/workflows/shared/vars.ts +1 -0
  62. package/src/workflows/shared/workflows.steps.ts +13 -0
package/dist/testkit.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { applyScript, checkScript, configProblems, configure, installContext, isFactoryWorkflow, moveScript, protocolMismatch, removeScript, restoreScript, revertScript, showScript, t as flows_exports } from "./flows.mjs";
2
- import { O as ACCESS_REFUSAL, a as selectPath, d as renderLandPlain, g as statusOf, h as renderBeatJson, i as resolveSession, j as renderFormat, l as noopText, m as beatDocument, n as slicesDocument, o as judgeJson, p as renderBeatPlain, r as globMatches, s as landFields, t as renderSlicesJson, u as renderLandJson, v as beatKindOf, y as demandOf } from "./chunks/wire-D3Rc5r22.mjs";
2
+ import { A as beatKindOf, B as ACCESS_REFUSAL, C as renderLandPlain, D as renderBeatJson, E as beatDocument, O as statusOf, S as renderLandJson, T as renderBeatPlain, U as renderFormat, _ as selectPath, a as contextLimitFault, g as resolveSession, h as globMatches, j as demandOf, l as parseContextWindow, m as slicesDocument, o as contextShapeFault, p as renderSlicesJson, v as judgeJson, x as noopText, y as landFields } from "./chunks/wire-CSsa3Wxd.mjs";
3
3
  import { C as headingSections, S as headingSectionBodies, a as unansweredQuestions, b as parseThreadsWithFindings, n as openThreads, r as steeringFormatFor, s as parseCodeThreads, t as BUILT_IN_MODE_NAMES, w as formatFinding } from "./chunks/steering-DVILanVf.mjs";
4
4
  import { $ as logWarning, $i as NodeInspectSymbol, $n as map$5, $r as make$19, $t as provide$1, A as catchIf, Ai as add, An as scopeMake, Ar as flatMap$3, At as suspend$5, B as flatMap$4, Bi as getOrElse, Bn as get$3, Br as sync$1, Bt as unsafeMakeLatch, C as all$1, Ci as toArray, Cn as isInterrupted, Cr as exitFail, Ct as sandbox, D as async, Di as GenericTag, Dn as squash, Dr as exitZipRight, Dt as scopedWith$1, E as asVoid$1, Ei as unsafeHead, En as reduceWithContext, Er as exitVoid, Et as scoped$4, F as ensuring$2, Fi as fromIterable, Fn as join$3, Fr as map$3, Ft as tryMap, G as forkIn, Gi as none, Gn as TypeId$10, Gr as whenEffect, Gt as zipLeft, H as fnUntraced, Hi as isSome, Hn as modify$1, Hr as uninterruptible, Ht as when, I as exit, Ii as splitAt, In as sequential, Ir as onInterrupt, It as tryPromise, J as ignore, Ji as left, Jn as all, Jr as DeferredTypeId$1, Jt as spaced$1, K as forkScoped, Ki as some, Kn as Class, Kr as withFiberRuntime, Kt as zipRight$3, L as fail$5, Li as filter$1, Ln as bind, Lr as scopeClose, Lt as try_, M as die$2, Mi as getOption, Mn as _await$2, Mr as interruptAsFiber, Mt as tap, N as dieMessage, Ni as omit, Nn as inheritAll$1, Nr as interruptFiber, Nt as tapErrorCause, O as catchAll$1, Oi as Reference, On as ensuring$3, Or as fiberId, Ot as serviceOption, P as either, Pi as empty$5, Pn as interruptAllAs$1, Pr as interruptible$1, Pt as timeout, Q as isEffect, Qi as BaseProto, Qn as isFailure, Qr as ids, Qt as mergeAll$2, R as failCause$4, Ri as flatMap$5, Rn as bindTo, Rr as succeed$4, Rt as uninterruptible$1, S as addFinalizer$1, Si as takeRight, Sn as isDieType, Sr as exitAs, St as runtime, T as as, Ti as unsafeGet, Tn as map$6, Tr as exitSucceed, Tt as scopeWith, U as forEach$2, Ui as map$8, Un as set$1, Ur as uninterruptibleMask$1, Ut as withFiberRuntime$1, V as flatten$4, Vi as isNone, Vn as make$16, Vr as tap$1, Vt as unsafeMakeSemaphore$1, W as forkDaemon, Wi as match$4, Wn as update$1, Wr as void_$2, Wt as zip$1, X as interruptible, Xi as right, Xn as fail$4, Xr as combine, Xt as tagged, Y as interrupt$4, Yi as match$2, Yn as die, Yr as empty$6, Yt as TaggedError$1, Z as intoDeferred, Zi as pipeArguments, Zn as failCause$3, Zr as combineAll, Zt as fromEffect$5, _ as decodeSync, _i as of, _n as fail$3, _r as deferredIsDone, _t as raceWith, a as Literal, aa as constTrue, ai as size$2, an as updateContext$1, ar as zipRight$2, at as matchCause, b as acquireRelease, bi as reverse, bn as interrupt$3, br as deferredUnsafeDone, bt as runPromise, c as String$, ca as dual, ci as append$1, cn as Scope, cr as asyncInterrupt, ct as negate, d as Union, di as empty$4, dn as close, dr as deferredAwait, dt as orElse, ea as format, ei as none$1, en as provideMerge$1, er as mapBoth, et as makeSemaphore, f as between, fi as filter, fn as extend, fr as deferredComplete, ft as orElseSucceed, gi as map$7, gn as die$1, gr as deferredInterruptWith, gt as race, hi as isEmpty$2, hn as NoSuchElementException, hr as deferredInterrupt, ht as provideService, i as Defect, ia as constFalse, ii as has, in as unsafeRunPromiseExit, ir as zip$2, it as match$5, j as catchTag, ji as get$5, jn as scopeTag, jr as interrupt$2, jt as sync$2, k as catchAllCause, ki as Tag, kn as forEachConcurrentDiscard, kr as fiberRefLocally, kt as succeed$6, l as Struct, la as identity, li as appendAll, ln as addFinalizer, lr as catchAll, lt as onError, m as optional$1, mi as isChunk, mn as make$18, mr as deferredFailCause, mt as provide$2, n as Boolean$, na as equals, ni as make$17, nn as succeed$3, nr as succeed$5, nt as mapBoth$1, o as Never, oa as constUndefined, oi as decode, on as forkIn$1, or as as$1, ot as matchCauseEffect, p as decodeUnknown, pi as fromIterable$1, pn as fork, pr as deferredFail, pt as promise, q as gen, qi as isLeft, qn as spanTag, qr as zipRight$1, qt as zipWith, r as Cause, ra as hasProperty, ri as set$2, rn as unsafeFork, rr as void_$3, rt as mapError, s as Number$, sa as constVoid, si as isFinite, sn as unsafeMakeSemaphore, sr as asVoid, st as matchEffect, t as Array$, ta as toJSON, ti as get$4, tn as scoped$3, tr as match$3, tt as map$4, u as TaggedError, ua as pipe, ui as drop, un as addFinalizerExit, ur as currentContext$1, ut as orDie, v as encodeSync, vi as prepend, vn as failureOrCause, vr as deferredMake, vt as repeat, w as annotateLogs, wi as unsafeFromArray, wn as isInterruptedOnly, wr as exitFailCause, wt as scope, x as acquireUseRelease$2, xi as take$2, xn as interruptors, xr as deferredUnsafeMake, xt as runPromiseExit$1, y as _void, yi as reduce, yn as flipCauseOption, yr as deferredSucceed, yt as retry, z as fiberIdWith, zi as fromNullable, zn as sleep, zr as suspend$4, zt as uninterruptibleMask } from "./chunks/Schema-DO5ttJaI.mjs";
5
5
  import { createRequire } from "node:module";
@@ -7128,6 +7128,15 @@ const budgeted = (evidence, budgetBytes) => {
7128
7128
  truncated
7129
7129
  };
7130
7130
  };
7131
+ const scopeLabel = (chain) => {
7132
+ const path = chain.flatMap((o) => o.name === void 0 ? [] : [o.name]).join(".");
7133
+ if (chain.at(-1)?.name !== void 0) return `scope "${path}"`;
7134
+ return path === "" ? "an unnamed scope" : `an unnamed scope inside "${path}"`;
7135
+ };
7136
+ const inheritedContext = (layers) => layers.reduce((merged, layer) => layer === void 0 ? merged : {
7137
+ ...merged,
7138
+ ...Object.fromEntries(Object.entries(layer).filter(([, value]) => value !== void 0))
7139
+ }, void 0);
7131
7140
  const sameSkills = (a, b) => (a?.length ?? 0) === (b?.length ?? 0) && (a ?? []).every((skill, i) => skill === b?.[i]);
7132
7141
  const samePersona = (a, b) => a.model === b.model && a.system === b.system && sameSkills(a.skills, b.skills) && sameAccess(a.access, b.access);
7133
7142
  /**
@@ -7147,6 +7156,7 @@ const KNOWN_OPTIONS = {
7147
7156
  ...STEERING_OPTIONS,
7148
7157
  "model",
7149
7158
  "system",
7159
+ "context",
7150
7160
  "allowEmpty",
7151
7161
  "keep"
7152
7162
  ]),
@@ -7261,11 +7271,13 @@ const replay = async (input) => {
7261
7271
  if (s.model !== void 0) persona.model = s.model;
7262
7272
  if (s.system !== void 0) persona.system = s.system;
7263
7273
  }
7274
+ const context = inheritedContext([...scopes.map((s) => s.context), request.options.context]);
7264
7275
  return {
7265
7276
  ...request,
7266
7277
  options: {
7267
7278
  ...persona,
7268
- ...request.options
7279
+ ...request.options,
7280
+ ...context === void 0 ? {} : { context }
7269
7281
  }
7270
7282
  };
7271
7283
  }
@@ -7403,10 +7415,26 @@ const replay = async (input) => {
7403
7415
  });
7404
7416
  return landPending(step, input.pending);
7405
7417
  };
7418
+ const scopeContextFault = () => {
7419
+ for (const [i, s] of scopes.entries()) {
7420
+ const fault = s.context === void 0 ? void 0 : contextShapeFault(s.context);
7421
+ if (fault !== void 0) return `the context of ${scopeLabel(scopes.slice(0, i + 1))}: ${fault}`;
7422
+ }
7423
+ };
7424
+ const resolvedContextFault = (request) => {
7425
+ const own = request.options.context;
7426
+ const layered = scopeContextFault() ?? (own === void 0 ? void 0 : contextShapeFault(own));
7427
+ if (layered !== void 0) return layered;
7428
+ const resolved = resolve(request);
7429
+ const context = resolved.kind === "agent" ? resolved.options.context : void 0;
7430
+ return context === void 0 ? void 0 : contextLimitFault(context);
7431
+ };
7406
7432
  const requestFault = (request) => {
7407
7433
  if (request.kind === "run" && typeof request.body !== "string") return `gtd: step "${scoped(request.name)}": a run() body is a shell script string — decide in flow code, then render the script (see checkScript and friends)`;
7408
7434
  if (request.kind !== "agent") return void 0;
7409
7435
  const name = scoped(request.name);
7436
+ const contextFault = resolvedContextFault(request);
7437
+ if (contextFault !== void 0) return `gtd: step "${name}": ${contextFault}`;
7410
7438
  if (request.options.keep === true) {
7411
7439
  if (request.options.allowEmpty === true) return `gtd: step "${name}": keep: true cannot be combined with allowEmpty — a turn that changes nothing has nothing to keep`;
7412
7440
  const refFault = name.includes("/") ? "it contains \"/\"" : refNameFault(name);
@@ -9016,6 +9044,10 @@ const commonOf = (step) => {
9016
9044
  ...optional("mode", options.mode)
9017
9045
  };
9018
9046
  };
9047
+ const stepContext = (context) => context === void 0 ? void 0 : {
9048
+ ...optional("soft", context.soft),
9049
+ ...optional("hard", context.hard)
9050
+ };
9019
9051
  const promptDef = (common, request, skills, access) => ({
9020
9052
  ...common,
9021
9053
  kind: "prompt",
@@ -9024,6 +9056,7 @@ const promptDef = (common, request, skills, access) => ({
9024
9056
  ...optional("system", request.options.system),
9025
9057
  ...optional("allowEmpty", request.options.allowEmpty),
9026
9058
  ...optional("keep", request.options.keep),
9059
+ ...optional("context", stepContext(request.options.context)),
9027
9060
  ...optional("skills", skills),
9028
9061
  ...optional("access", access)
9029
9062
  });
@@ -9109,7 +9142,8 @@ const hintsOf = (def) => ({
9109
9142
  ...optional("system", def.system),
9110
9143
  ...optional("mode", def.mode),
9111
9144
  ...optional("skills", def.skills),
9112
- ...optional("access", def.access)
9145
+ ...optional("access", def.access),
9146
+ ...optional("context", def.context)
9113
9147
  });
9114
9148
  const normalizeStatus = (raw) => raw === "A" ? "A" : raw === "D" ? "D" : "M";
9115
9149
  /** Per-model token totals, highest-cost first (ties broken by model name). */
@@ -10390,6 +10424,17 @@ const readStdin = () => tryPromise({
10390
10424
  },
10391
10425
  catch: (e) => e instanceof Error ? e : new Error(String(e))
10392
10426
  });
10427
+ /** Stdout is written once: a hook reads one JSON document, or none. */
10428
+ const runContextHookCommand = (command, out) => gen(function* () {
10429
+ const tools = yield* ToolCommands;
10430
+ const input = yield* readStdin();
10431
+ out.write(yield* tools.contextHook({
10432
+ input,
10433
+ ...command.soft !== void 0 ? { soft: command.soft } : {},
10434
+ ...command.hard !== void 0 ? { hard: command.hard } : {},
10435
+ ...command.window !== void 0 ? { window: command.window } : {}
10436
+ }));
10437
+ });
10393
10438
  /** Stdout is written once, after the answerer resolves — a rejection leaves it empty. */
10394
10439
  const runJudgeRunCommand = (command, out) => gen(function* () {
10395
10440
  const host = yield* Host;
@@ -10846,6 +10891,7 @@ const needsOf = (kind) => {
10846
10891
  case "lsp":
10847
10892
  case "install":
10848
10893
  case "loop":
10894
+ case "contextHook":
10849
10895
  case "judgeRun":
10850
10896
  case "strays": return "none";
10851
10897
  case "check":
@@ -10885,6 +10931,7 @@ const dispatchVoidCommand = (command, json, out) => {
10885
10931
  case "uncheck": return runUncheckCommand(command.file);
10886
10932
  case "install": return runInstallCommand(out);
10887
10933
  case "loop": return runLoopCommand();
10934
+ case "contextHook": return runContextHookCommand(command, out);
10888
10935
  case "summary": return runSummaryCommand(out, command.slice);
10889
10936
  case "base": return runBaseCommand(out);
10890
10937
  case "judge": return runJudgeCommand(json, out);
@@ -10926,6 +10973,10 @@ const nonNegativeNumber = (raw, flag) => {
10926
10973
  if (raw.trim() === "" || !Number.isFinite(n) || n < 0) return left(`gtd: ${flag} must be a non-negative number — got "${raw}"`);
10927
10974
  return right(n);
10928
10975
  };
10976
+ const share = (raw, flag) => {
10977
+ const n = Number(raw);
10978
+ return raw.trim() !== "" && n > 0 && n <= 1 ? right(n) : left(`gtd: ${flag} must be a share of the context window in (0, 1] — got "${raw}"`);
10979
+ };
10929
10980
  const FLAGS = [
10930
10981
  {
10931
10982
  name: "--json",
@@ -11053,6 +11104,39 @@ const FLAGS = [
11053
11104
  "GTD_JUDGE_MODEL, then judge.json, then sonnet"
11054
11105
  ]
11055
11106
  },
11107
+ {
11108
+ name: "--soft",
11109
+ arity: 1,
11110
+ repeatable: false,
11111
+ scope: (kind) => kind === "contextHook",
11112
+ decode: ([raw]) => share(raw ?? "", "--soft"),
11113
+ scopeError: "gtd: --soft is only valid for `gtd context-hook`",
11114
+ valueHint: "<share>",
11115
+ help: ["(gtd context-hook only) the soft limit; default 0.6"]
11116
+ },
11117
+ {
11118
+ name: "--hard",
11119
+ arity: 1,
11120
+ repeatable: false,
11121
+ scope: (kind) => kind === "contextHook",
11122
+ decode: ([raw]) => share(raw ?? "", "--hard"),
11123
+ scopeError: "gtd: --hard is only valid for `gtd context-hook`",
11124
+ valueHint: "<share>",
11125
+ help: ["(gtd context-hook only) the hard limit; default 0.7"]
11126
+ },
11127
+ {
11128
+ name: "--window",
11129
+ arity: 1,
11130
+ repeatable: false,
11131
+ scope: (kind) => kind === "contextHook",
11132
+ decode: ([raw]) => {
11133
+ const window = parseContextWindow(raw);
11134
+ return window !== void 0 ? right(window) : left(`gtd: --window must be a positive integer — got "${raw ?? ""}"`);
11135
+ },
11136
+ scopeError: "gtd: --window is only valid for `gtd context-hook`",
11137
+ valueHint: "<tokens>",
11138
+ help: ["(gtd context-hook only) the model's context window in", "tokens; default 200000"]
11139
+ },
11056
11140
  {
11057
11141
  name: "--slice",
11058
11142
  arity: 1,
@@ -11359,6 +11443,22 @@ const COMMAND_ROWS = [
11359
11443
  "~/.config/gtd/loop.json); see docs/driver.md"
11360
11444
  ]
11361
11445
  },
11446
+ {
11447
+ token: "context-hook",
11448
+ kind: "contextHook",
11449
+ arity: "none",
11450
+ details: [
11451
+ "A Claude Code PostToolUse and PreCompact hook that stops an",
11452
+ "agent turn at a share of its context window. Reads the",
11453
+ "hook's input on stdin and the context the transcript's",
11454
+ "latest assistant message used. Past --soft it blocks with a",
11455
+ "request to end the turn with a handoff note; past --hard,",
11456
+ "or at PreCompact, it stops the turn with a stopReason",
11457
+ "starting \"gtd: context limit\". Prints nothing otherwise,",
11458
+ "and for a subagent's tool call. Always exits 0 on valid",
11459
+ "input; see docs/driver.md"
11460
+ ]
11461
+ },
11362
11462
  {
11363
11463
  token: "summary",
11364
11464
  kind: "summary",
@@ -11837,6 +11937,17 @@ const parseArgv = (argv) => {
11837
11937
  verbose
11838
11938
  };
11839
11939
  }
11940
+ if (kind === "contextHook") return {
11941
+ kind: "command",
11942
+ command: {
11943
+ kind: "contextHook",
11944
+ ...bag["--soft"] !== void 0 ? { soft: bag["--soft"] } : {},
11945
+ ...bag["--hard"] !== void 0 ? { hard: bag["--hard"] } : {},
11946
+ ...bag["--window"] !== void 0 ? { window: bag["--window"] } : {}
11947
+ },
11948
+ json,
11949
+ verbose
11950
+ };
11840
11951
  if (kind === "summary") return {
11841
11952
  kind: "command",
11842
11953
  command: {
@@ -12615,6 +12726,7 @@ const missingToolCommands = {
12615
12726
  ui: missingTool("ui"),
12616
12727
  lsp: missingTool("lsp"),
12617
12728
  loop: missingTool("loop"),
12729
+ contextHook: missingTool("context-hook"),
12618
12730
  judge: () => Promise.reject(/* @__PURE__ */ new Error("gtd judge run: ToolCommands has no test double wired into testLayers()"))
12619
12731
  };
12620
12732
  /** The fine-grained `GitService` layer alone — for unit tests that need only git. */
package/dist/wire.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { A as WIRE_SCHEMA, C as EXIT_RUNTIME_ERROR, D as EXIT_USAGE_ERROR, E as EXIT_STRAYS_FOUND, O as ACCESS_REFUSAL, S as EXIT_OK, T as EXIT_SIGTERM, _ as BEAT_KINDS, a as selectPath, b as stallDiagnosis, c as landProseText, d as renderLandPlain, f as DEMAND_BRIEFING, g as statusOf, h as renderBeatJson, i as resolveSession, j as renderFormat, k as UNATTRIBUTED_MODEL, l as noopText, m as beatDocument, n as slicesDocument, o as judgeJson, p as renderBeatPlain, r as globMatches, s as landFields, t as renderSlicesJson, u as renderLandJson, v as beatKindOf, w as EXIT_SIGINT, x as EXIT_CODES, y as demandOf } from "./chunks/wire-D3Rc5r22.mjs";
2
- export { ACCESS_REFUSAL, BEAT_KINDS, DEMAND_BRIEFING, EXIT_CODES, EXIT_OK, EXIT_RUNTIME_ERROR, EXIT_SIGINT, EXIT_SIGTERM, EXIT_STRAYS_FOUND, EXIT_USAGE_ERROR, UNATTRIBUTED_MODEL, WIRE_SCHEMA, beatDocument, beatKindOf, demandOf, globMatches, judgeJson, landFields, landProseText, noopText, renderBeatJson, renderBeatPlain, renderFormat, renderLandJson, renderLandPlain, renderSlicesJson, resolveSession, selectPath, slicesDocument, stallDiagnosis, statusOf };
1
+ import { A as beatKindOf, B as ACCESS_REFUSAL, C as renderLandPlain, D as renderBeatJson, E as beatDocument, F as EXIT_RUNTIME_ERROR, H as WIRE_SCHEMA, I as EXIT_SIGINT, L as EXIT_SIGTERM, M as stallDiagnosis, N as EXIT_CODES, O as statusOf, P as EXIT_OK, R as EXIT_STRAYS_FOUND, S as renderLandJson, T as renderBeatPlain, U as renderFormat, V as UNATTRIBUTED_MODEL, _ as selectPath, a as contextLimitFault, b as landProseText, c as hookOutput, d as transcriptTokens, f as usageTokens, g as resolveSession, h as globMatches, i as contextHook, j as demandOf, k as BEAT_KINDS, l as parseContextWindow, m as slicesDocument, n as CONTEXT_STOP_FILE_ENV, o as contextShapeFault, p as renderSlicesJson, r as DEFAULT_CONTEXT_LIMIT, s as contextWindowFor, t as CONTEXT_LIMIT_MARKER, u as subagentTranscriptPath, v as judgeJson, w as DEMAND_BRIEFING, x as noopText, y as landFields, z as EXIT_USAGE_ERROR } from "./chunks/wire-CSsa3Wxd.mjs";
2
+ export { ACCESS_REFUSAL, BEAT_KINDS, CONTEXT_LIMIT_MARKER, CONTEXT_STOP_FILE_ENV, DEFAULT_CONTEXT_LIMIT, DEMAND_BRIEFING, EXIT_CODES, EXIT_OK, EXIT_RUNTIME_ERROR, EXIT_SIGINT, EXIT_SIGTERM, EXIT_STRAYS_FOUND, EXIT_USAGE_ERROR, UNATTRIBUTED_MODEL, WIRE_SCHEMA, beatDocument, beatKindOf, contextHook, contextLimitFault, contextShapeFault, contextWindowFor, demandOf, globMatches, hookOutput, judgeJson, landFields, landProseText, noopText, parseContextWindow, renderBeatJson, renderBeatPlain, renderFormat, renderLandJson, renderLandPlain, renderSlicesJson, resolveSession, selectPath, slicesDocument, stallDiagnosis, statusOf, subagentTranscriptPath, transcriptTokens, usageTokens };
@@ -1,6 +1,6 @@
1
1
  import { agent, changes, glob, read, refuse, scope, start, vars } from "../flows.mjs";
2
- import { St as requireFlag, gt as envDefaults, ht as defaults, i as skills, n as summary, o as flagShipped, r as access, t as steering, xt as registryEntry, y as coder, yt as flagReferences } from "../chunks/reserved-BAv71I4i.mjs";
3
- import { a as refusePendingHandOff, r as handOffTail } from "../chunks/tail-kar1zhOb.mjs";
2
+ import { Ct as flagReferences, Et as requireFlag, Tt as registryEntry, bt as envDefaults, i as skills, n as summary, o as flagShipped, r as access, t as steering, x as coder, yt as defaults } from "../chunks/reserved-sfMdy7v7.mjs";
3
+ import { a as refusePendingHandOff, r as handOffTail } from "../chunks/tail-Cgca5Gp-.mjs";
4
4
  //#region src/workflows/cleanup/cleanup.ts
5
5
  const removingPrompt = (name, registry) => `Clean up the release flag "${name}", which is default-on: delete its entry in ${registry}, and remove every \`GTD_FLAG_${name.toUpperCase()}\` check from the shipped sources. Keep the flag-on path; delete code only the off path reached, including tests that pin the off path.`;
6
6
  const cleanupFlow = async () => {