@pmelab/gtd 46.0.0 → 48.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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +21 -19
- package/dist/chunks/{reserved-BENPy6IJ.mjs → reserved-DF1HD6jL.mjs} +41 -22
- package/dist/chunks/{review-DcbgUwr7.mjs → review-Bv40kZu9.mjs} +5 -8
- package/dist/chunks/{tail-CDNMZ-2E.mjs → tail-D89fU_wf.mjs} +68 -39
- package/dist/gtd.bundle.mjs +203 -867
- package/dist/testkit.mjs +89 -53
- package/dist/workflows/cleanup.mjs +2 -2
- package/dist/workflows/feature.mjs +26 -22
- package/dist/workflows/fix.mjs +2 -2
- package/dist/workflows/review.mjs +3 -3
- package/dist/workflows/rollout.mjs +1 -1
- package/dist/workflows.mjs +257 -205
- package/package.json +1 -1
- package/src/cli/Cli.test.ts +0 -2
- package/src/cli/Cli.ts +0 -15
- package/src/cli/Program.test.ts +0 -1
- package/src/cli/Program.ts +0 -8
- package/src/cli/ToolCommands.ts +1 -2
- package/src/install/Install.ts +89 -35
- package/src/testkit/Layers.ts +0 -1
- package/src/wire/ContextLimit.ts +1 -1
- package/src/workflows/cleanup/cleanup.test.ts +11 -9
- package/src/workflows/feature/feature.ts +38 -28
- package/src/workflows/feature/lens-review.feature +3 -1
- package/src/workflows/feature/slice-findings.feature +198 -0
- package/src/workflows/fix/fix-lens-origin.feature +101 -0
- package/src/workflows/fix/fix-quality.feature +131 -0
- package/src/workflows/index.ts +0 -1
- package/src/workflows/shared/lenses.ts +30 -5
- package/src/workflows/shared/review.ts +3 -8
- package/src/workflows/shared/tail.ts +74 -57
- package/src/workflows/shared/text.ts +85 -29
- package/src/workflows/feature/quality-unresolved.feature +0 -121
package/dist/testkit.mjs
CHANGED
|
@@ -6154,8 +6154,15 @@ export CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1
|
|
|
6154
6154
|
export BASH_DEFAULT_TIMEOUT_MS=1800000
|
|
6155
6155
|
export BASH_MAX_TIMEOUT_MS=7200000
|
|
6156
6156
|
|
|
6157
|
+
# gtd's paths, scripts and checks are relative to the repository root.
|
|
6158
|
+
cd "$(git rev-parse --show-toplevel)"
|
|
6159
|
+
|
|
6157
6160
|
beat=1
|
|
6158
6161
|
while :; do
|
|
6162
|
+
cost=
|
|
6163
|
+
model=
|
|
6164
|
+
judged_before="\${judged:-}"
|
|
6165
|
+
judged=
|
|
6159
6166
|
# One value per invocation: \`gtd next --json=<path>\` is a pure read (peek
|
|
6160
6167
|
# or dispatch, indistinguishable, always safe to call again), so nothing is
|
|
6161
6168
|
# lost by reading \`kind\`/\`idle\` as two separate calls rather than one
|
|
@@ -6183,14 +6190,22 @@ while :; do
|
|
|
6183
6190
|
# \`gtd judge run\` and land the verdict via \`gtd judge answer\`. POSIX sh has
|
|
6184
6191
|
# no pipefail, so each step is captured first and only piped on when it
|
|
6185
6192
|
# succeeded; if \`gtd judge run\` fails or \`gtd judge answer\` rejects the
|
|
6186
|
-
# verdict, its stderr reaches you and
|
|
6193
|
+
# verdict, its stderr reaches you and the gate is handed to you — on the
|
|
6194
|
+
# opening beat too, so it never lands unanswered — as it is when the gate
|
|
6195
|
+
# we just answered comes straight back.
|
|
6187
6196
|
message)
|
|
6188
|
-
if [ -n "$(gtd next --json=judge)" ]
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6197
|
+
if [ -n "$(gtd next --json=judge)" ]; then
|
|
6198
|
+
state="$(gtd next --json=state)"
|
|
6199
|
+
if [ "$state" != "$judged_before" ] &&
|
|
6200
|
+
verdict="$(gtd judge --json | gtd judge run)" &&
|
|
6201
|
+
script="$(printf '%s\\n' "$verdict" | gtd judge answer --json=script)"; then
|
|
6202
|
+
printf '%s\\n' "$script" | sh
|
|
6203
|
+
judged="$state"
|
|
6204
|
+
beat=$((beat + 1))
|
|
6205
|
+
continue
|
|
6206
|
+
fi
|
|
6207
|
+
gtd next
|
|
6208
|
+
exit 0
|
|
6194
6209
|
fi
|
|
6195
6210
|
[ "$beat" = 1 ] || {
|
|
6196
6211
|
gtd next
|
|
@@ -6209,45 +6224,83 @@ while :; do
|
|
|
6209
6224
|
model="$(gtd next --json=model)"
|
|
6210
6225
|
system="$(gtd next --json=system)"
|
|
6211
6226
|
validate="$(gtd next --json=validate)"
|
|
6227
|
+
context="$(gtd next --json=context)"
|
|
6212
6228
|
log="$(gtd next --json=log)"
|
|
6229
|
+
# Absolute, since the hook runs wherever the agent last cd'ed to.
|
|
6230
|
+
case "$log" in /*) ;; *) log="$(git rev-parse --show-toplevel)/$log" ;; esac
|
|
6213
6231
|
# \`model\` is a hint, not a model name — the bundled workflow ships
|
|
6214
6232
|
# \`smart\` and \`base\`, which \`claude --model\` rejects. Resolve them
|
|
6215
|
-
#
|
|
6216
|
-
#
|
|
6233
|
+
# from your environment; unset, the hint is dropped and the agent runs
|
|
6234
|
+
# its own default. Any other value is a real model name.
|
|
6217
6235
|
case "$model" in
|
|
6218
6236
|
smart) model="\${GTD_LOOP_MODEL_SMART:-}" ;;
|
|
6219
6237
|
base) model="\${GTD_LOOP_MODEL_BASE:-}" ;;
|
|
6220
6238
|
esac
|
|
6221
|
-
# The
|
|
6222
|
-
#
|
|
6223
|
-
#
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6239
|
+
# The step's context limit, as a Claude Code hook after every tool
|
|
6240
|
+
# call and before compacting. Past \`hard\` it stops the turn and
|
|
6241
|
+
# appends why to the stop file, so we land nothing and stop too.
|
|
6242
|
+
soft="$(printf '%s' "$context" | sed -n 's/.*"soft":\\([0-9.]*\\).*/\\1/p')"
|
|
6243
|
+
hard="$(printf '%s' "$context" | sed -n 's/.*"hard":\\([0-9.]*\\).*/\\1/p')"
|
|
6244
|
+
window="\${GTD_LOOP_CONTEXT_WINDOW:-}"
|
|
6245
|
+
case "$model" in *'[1m]'* | *'[1M]'*) window="\${window:-1000000}" ;; esac
|
|
6246
|
+
hook="gtd context-hook\${soft:+ --soft $soft}\${hard:+ --hard $hard}\${window:+ --window $window}"
|
|
6247
|
+
hooks="[{\\"hooks\\":[{\\"type\\":\\"command\\",\\"command\\":\\"$hook\\"}]}]"
|
|
6248
|
+
settings="{\\"hooks\\":{\\"PostToolUse\\":$hooks,\\"PreCompact\\":$hooks}}"
|
|
6249
|
+
stop="$log.context-stop"
|
|
6250
|
+
rm -f "$stop"
|
|
6251
|
+
# One turn, its prompt on stdin. The prompt embeds a full diff, so it
|
|
6252
|
+
# never goes on argv — argv is capped (~1 MB on macOS, and POSIX
|
|
6253
|
+
# guarantees only 4 KB, ARG_MAX), and a diff crosses that far sooner
|
|
6254
|
+
# than you'd expect. Every turn passes the same $model/$system:
|
|
6255
|
+
# whether \`claude --resume\` re-applies the original session's is a
|
|
6256
|
+
# harness detail gtd cannot verify from outside. Its JSON envelope
|
|
6257
|
+
# goes to the log, and its \`total_cost_usd\` adds up into $cost. An
|
|
6258
|
+
# \`is_error\` envelope (max turns, an error mid-turn) or one another
|
|
6259
|
+
# hook stopped fails the turn even at exit 0: landing it would land
|
|
6260
|
+
# the failure as work. Only a turn that never ran (no envelope: the
|
|
6261
|
+
# session flag was refused) is worth retrying under the other flag.
|
|
6262
|
+
turn() {
|
|
6263
|
+
out="$(GTD_LOOP_CONTEXT_STOP_FILE="$stop" claude -p "$@" \\
|
|
6264
|
+
\${model:+--model "$model"} \\
|
|
6265
|
+
\${system:+--system-prompt "$system"} \\
|
|
6266
|
+
--settings "$settings" --output-format json \\
|
|
6267
|
+
--dangerously-skip-permissions 2>>"$log")" && ok=0 || ok=$?
|
|
6268
|
+
printf '%s\\n' "$out" >>"$log"
|
|
6269
|
+
case "$out" in *'"type":"result"'*) ran=true ;; *) ran=false ;; esac
|
|
6270
|
+
case "$out" in
|
|
6271
|
+
*'"is_error":true'* | *'"terminal_reason":"hook_stopped"'*) ok=1 ;;
|
|
6272
|
+
esac
|
|
6273
|
+
usd="$(printf '%s\\n' "$out" | sed -n 's/.*"total_cost_usd":\\([0-9.eE+-]*\\).*/\\1/p' | tail -n 1)"
|
|
6274
|
+
[ -z "$usd" ] || cost="$(awk -v a="\${cost:-0}" -v b="$usd" 'BEGIN { printf "%.6f", a + b }')"
|
|
6275
|
+
[ "\${cost:-}" != 0.000000 ] || cost=
|
|
6276
|
+
if [ -s "$stop" ]; then
|
|
6277
|
+
cat "$stop" >&2
|
|
6278
|
+
exit 1
|
|
6279
|
+
fi
|
|
6280
|
+
return "$ok"
|
|
6281
|
+
}
|
|
6282
|
+
# Plain \`gtd next\` (not --json=content) renders the diff once.
|
|
6283
|
+
gtd next >"$log.prompt"
|
|
6231
6284
|
if [ "\${resume:-}" = true ]
|
|
6232
|
-
then
|
|
6233
|
-
else
|
|
6285
|
+
then first=--resume second=--session-id
|
|
6286
|
+
else first=--session-id second=--resume
|
|
6234
6287
|
fi
|
|
6288
|
+
turn "$first" "$session_id" <"$log.prompt" ||
|
|
6289
|
+
{ [ "$ran" = false ] && turn "$second" "$session_id" <"$log.prompt"; } || {
|
|
6290
|
+
echo "agent turn failed — see $log" >&2
|
|
6291
|
+
exit 1
|
|
6292
|
+
}
|
|
6235
6293
|
n=0
|
|
6236
6294
|
while [ -n "\${validate:-}" ] && ! fix="$(sh -c "$validate" 2>&1)"; do
|
|
6237
6295
|
n=$((n + 1)) && [ "$n" -gt 3 ] && { printf '%s\\n' "$fix" >&2; exit 1; }
|
|
6238
|
-
# $fix IS the fix prompt, verbatim
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
printf '%s' "$fix" | claude -p --resume "$session_id" \\
|
|
6247
|
-
\${model:+--model "$model"} \\
|
|
6248
|
-
\${system:+--system-prompt "$system"} \\
|
|
6249
|
-
--dangerously-skip-permissions >>"$log" 2>&1
|
|
6250
|
-
done ;;
|
|
6296
|
+
# $fix IS the fix prompt, verbatim.
|
|
6297
|
+
printf '%s' "$fix" >"$log.prompt"
|
|
6298
|
+
turn --resume "$session_id" <"$log.prompt" || {
|
|
6299
|
+
echo "fix turn failed — see $log" >&2
|
|
6300
|
+
exit 1
|
|
6301
|
+
}
|
|
6302
|
+
done
|
|
6303
|
+
rm -f "$log.prompt" ;;
|
|
6251
6304
|
esac
|
|
6252
6305
|
|
|
6253
6306
|
# Read every value the landing needs BEFORE piping the script to \`sh\`:
|
|
@@ -6257,7 +6310,8 @@ while :; do
|
|
|
6257
6310
|
# before the script runs and changes the tree out from under them.
|
|
6258
6311
|
settled="$(gtd land --json=settled)"
|
|
6259
6312
|
idle="$(gtd land --json=idle)"
|
|
6260
|
-
|
|
6313
|
+
# A prompt beat's turns record their cost, tagged with the model that ran.
|
|
6314
|
+
gtd land --json=script \${cost:+--cost="$cost"} \${cost:+\${model:+--model="$model"}} | sh
|
|
6261
6315
|
if [ "\${settled:-}" = true ]; then
|
|
6262
6316
|
[ "\${idle:-}" = true ] && gtd next
|
|
6263
6317
|
exit 0
|
|
@@ -10893,7 +10947,6 @@ const runInstallCommand = (out) => gen(function* () {
|
|
|
10893
10947
|
yield* (yield* Workspace).write(WORKFLOW_MODULE, CONFIG_SCAFFOLD);
|
|
10894
10948
|
yield* (yield* Narrator).warn(`gtd install: wrote ${WORKFLOW_MODULE}, importing gtd's shipped workflows — commit it before your first \`gtd land\``);
|
|
10895
10949
|
});
|
|
10896
|
-
const runLoopCommand = () => flatMap$4(ToolCommands, (tools) => tools.loop(selfGtd()));
|
|
10897
10950
|
/**
|
|
10898
10951
|
* Exactly one trailing newline — duplicated from `Cli.ts`'s own
|
|
10899
10952
|
* `normalizeTrailingNewline` rather than imported, to avoid a circular value
|
|
@@ -11471,7 +11524,6 @@ const needsOf = (kind) => {
|
|
|
11471
11524
|
switch (kind) {
|
|
11472
11525
|
case "lsp":
|
|
11473
11526
|
case "install":
|
|
11474
|
-
case "loop":
|
|
11475
11527
|
case "contextHook":
|
|
11476
11528
|
case "judgeRun":
|
|
11477
11529
|
case "strays": return "none";
|
|
@@ -11511,7 +11563,6 @@ const dispatchVoidCommand = (command, json, out) => {
|
|
|
11511
11563
|
return runCheckCommand(command.mode, command.file, command.openQuestions ?? false, command.openThreads ?? false);
|
|
11512
11564
|
case "uncheck": return runUncheckCommand(command.file);
|
|
11513
11565
|
case "install": return runInstallCommand(out);
|
|
11514
|
-
case "loop": return runLoopCommand();
|
|
11515
11566
|
case "contextHook": return runContextHookCommand(command, out);
|
|
11516
11567
|
case "summary": return runSummaryCommand(out, command.slice);
|
|
11517
11568
|
case "base": return runBaseCommand(out);
|
|
@@ -12038,20 +12089,6 @@ const COMMAND_ROWS = [
|
|
|
12038
12089
|
"else it writes nothing."
|
|
12039
12090
|
]
|
|
12040
12091
|
},
|
|
12041
|
-
{
|
|
12042
|
-
token: "loop",
|
|
12043
|
-
kind: "loop",
|
|
12044
|
-
arity: "none",
|
|
12045
|
-
details: [
|
|
12046
|
-
"Drive this worktree's process until it rests on you: read",
|
|
12047
|
-
"each beat, run the agent turn or script it demands, and",
|
|
12048
|
-
"land the result. Exits 0 at a human gate, at idle and when",
|
|
12049
|
-
"a landing settles; exits 1 on a stall or a failed turn or",
|
|
12050
|
-
"landing. The agent CLI and the model each workflow hint",
|
|
12051
|
-
"maps to are per-machine settings (GTD_LOOP_* variables, or",
|
|
12052
|
-
"~/.config/gtd/loop.json); see docs/driver.md"
|
|
12053
|
-
]
|
|
12054
|
-
},
|
|
12055
12092
|
{
|
|
12056
12093
|
token: "context-hook",
|
|
12057
12094
|
kind: "contextHook",
|
|
@@ -13403,7 +13440,6 @@ const missingTool = (name) => () => fail$5(/* @__PURE__ */ new Error(`gtd ${name
|
|
|
13403
13440
|
const missingToolCommands = {
|
|
13404
13441
|
ui: missingTool("ui"),
|
|
13405
13442
|
lsp: missingTool("lsp"),
|
|
13406
|
-
loop: missingTool("loop"),
|
|
13407
13443
|
contextHook: missingTool("context-hook"),
|
|
13408
13444
|
judge: () => Promise.reject(/* @__PURE__ */ new Error("gtd judge run: ToolCommands has no test double wired into testLayers()"))
|
|
13409
13445
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { agent, changes, glob, read, refuse, scope, start, vars } from "../flows.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { a as refusePendingHandOff, r as handOffTail } from "../chunks/tail-
|
|
2
|
+
import { Ct as defaults, It as flagReferences, Rt as registryEntry, S as coder, i as skills, n as summary, o as flagShipped, r as access, t as steering, wt as envDefaults, zt as requireFlag } from "../chunks/reserved-DF1HD6jL.mjs";
|
|
3
|
+
import { a as refusePendingHandOff, r as handOffTail } from "../chunks/tail-D89fU_wf.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 () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { agent, answered, applyScript, changes, changesSince, check, codeChanges, env, hasThreadFor, head, human, judge, judgeDiffShape, kept, mark, matches, quote, read, refuse, removeScript, requireAnswers, requireProgress, requireReplies, requireThreadsClosed, revertScript, run, scope, slice, start, vars, wrote } from "../flows.mjs";
|
|
2
2
|
import { lensEntriesOf } from "../workflow-kit.mjs";
|
|
3
|
-
import { $ as
|
|
4
|
-
import { a as refusePendingHandOff, o as tail } from "../chunks/tail-
|
|
5
|
-
import { i as reUnwind, n as humanReview, r as isCode$1, t as buildTail } from "../chunks/review-
|
|
3
|
+
import { $ as naivePassPrompt, B as coverageQuestion, C as collecting, Ct as defaults, F as builderSystem, G as designTriagePrompt, H as criterionLine, I as clearCriteriaMessage, L as clearCriteriaQuestion, M as agentWithSkills, N as buildReviewCollectingPrompt, O as planner, Q as naiveApplyFailure, S as coder, T as fixNits, Tt as testFileGlobs, U as designGateAnswerMessage, V as coveringPrompt, W as designSystem, X as implementBuildingPrompt, Y as idleMessage, Z as implementFixPrompt, _ as REQUIREMENTS, _t as slicingPrompt, a as flagModeOn, at as refactorDroppedRefusal, b as answerReviewQuestions, bt as unwindFailedMessage, ct as refactorRules, d as healthy, et as normaliseCriteriaScript, f as FEEDBACK, g as REFACTOR_NOTE, gt as seamSteerMessage, h as REFACTOR, ht as seamByHandMessage, i as skills, it as refactorBuildingPrompt, l as gate, mt as reviewerSystem, n as summary, ot as refactorFixPrompt, p as HANDOFF, r as access, s as shipped, st as refactorNotePrompt, t as steering, tt as oversizedMessage, vt as startGateBlockedMessage, wt as envDefaults, xt as unwindFailure, y as SLICES, yt as uncoveredMessage, z as coverageMessage } from "../chunks/reserved-DF1HD6jL.mjs";
|
|
4
|
+
import { a as refusePendingHandOff, c as joinReports, o as tail } from "../chunks/tail-D89fU_wf.mjs";
|
|
5
|
+
import { i as reUnwind, n as humanReview, r as isCode$1, t as buildTail } from "../chunks/review-Bv40kZu9.mjs";
|
|
6
6
|
import { posix } from "node:path";
|
|
7
7
|
//#region src/workflows/shared/fences.ts
|
|
8
8
|
const markFenced = (text) => {
|
|
@@ -1103,17 +1103,20 @@ const buildFeature = async (firstBase) => {
|
|
|
1103
1103
|
const handedOut = new Set(listedIds());
|
|
1104
1104
|
const one = slices.length === 1;
|
|
1105
1105
|
const built = (i) => sliceIds(sliceCriteria(slices, i))?.length !== 0;
|
|
1106
|
+
const reports = [];
|
|
1106
1107
|
for (const i of slices.keys()) {
|
|
1107
1108
|
if (!built(i)) continue;
|
|
1108
1109
|
const n = one ? "" : `-${i + 1}`;
|
|
1109
1110
|
await buildSlice(i === 0 ? firstBase : head(), {
|
|
1111
|
+
number: `${i + 1}`,
|
|
1110
1112
|
tier,
|
|
1111
1113
|
criteria: sliceCriteria(slices, i),
|
|
1112
1114
|
refactor: `refactor${n}`,
|
|
1113
1115
|
feature: `feature${n}`,
|
|
1114
1116
|
more: () => slices.some((_, j) => j > i && built(j)),
|
|
1115
1117
|
reviewBase: one ? void 0 : firstBase,
|
|
1116
|
-
handedOut
|
|
1118
|
+
handedOut,
|
|
1119
|
+
laps: reports
|
|
1117
1120
|
});
|
|
1118
1121
|
}
|
|
1119
1122
|
};
|
|
@@ -1145,38 +1148,39 @@ const buildSlice = async (sliceBase, build) => {
|
|
|
1145
1148
|
const base = seam.refactored === true && !changesSince(seam.base).some((c) => isCode$1(c.path) && !carried.includes(c.path)) ? sliceBase : seam.base;
|
|
1146
1149
|
if (more) {
|
|
1147
1150
|
const guard = () => requireCriteriaFrozen(REQUIREMENTS);
|
|
1148
|
-
await tail(
|
|
1151
|
+
const report = await tail(async (_, report) => report, {
|
|
1149
1152
|
green: true,
|
|
1150
1153
|
lensBase: base,
|
|
1151
1154
|
guard,
|
|
1152
1155
|
guardRests: false
|
|
1153
1156
|
});
|
|
1157
|
+
build.laps.push({
|
|
1158
|
+
slice: build.number,
|
|
1159
|
+
report
|
|
1160
|
+
});
|
|
1154
1161
|
return;
|
|
1155
1162
|
}
|
|
1156
1163
|
const reviewBase = build.reviewBase ?? base;
|
|
1157
|
-
|
|
1164
|
+
const outcome = await reviewedTail(reviewBase, base, {
|
|
1165
|
+
slice: build.number,
|
|
1166
|
+
laps: build.laps
|
|
1167
|
+
});
|
|
1168
|
+
await featureFeedback(outcome, base, {
|
|
1158
1169
|
closed,
|
|
1159
1170
|
used
|
|
1160
1171
|
});
|
|
1161
1172
|
});
|
|
1162
1173
|
};
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
});
|
|
1172
|
-
}
|
|
1173
|
-
if (rested) await healthy(() => fixCheck());
|
|
1174
|
-
};
|
|
1175
|
-
/** The triaged quality lap, then the human review since `base`. */
|
|
1176
|
-
const reviewedTail = (base, lensBase) => tail((escalations, report) => humanReview(base, escalations, { report }), {
|
|
1174
|
+
/** The quality lap of slice `last.slice`, then the human review since `base`, listing what earlier slices' `laps` left too. */
|
|
1175
|
+
const reviewedTail = (base, lensBase, last = {
|
|
1176
|
+
slice: "",
|
|
1177
|
+
laps: []
|
|
1178
|
+
}) => tail((escalations, report) => humanReview(base, escalations, { report: last.laps.length === 0 ? report : joinReports([...last.laps, {
|
|
1179
|
+
slice: last.slice,
|
|
1180
|
+
report
|
|
1181
|
+
}]) }), {
|
|
1177
1182
|
green: true,
|
|
1178
|
-
lensBase
|
|
1179
|
-
triage: true
|
|
1183
|
+
lensBase
|
|
1180
1184
|
});
|
|
1181
1185
|
const featureFeedback = async (first, lensBase, ids) => {
|
|
1182
1186
|
let outcome = first;
|
package/dist/workflows/fix.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { read, refuse, removeScript, run, scope, start } from "../flows.mjs";
|
|
2
2
|
import { g as reviewRisks, h as reviewNotes } from "../chunks/steering-D7hWeMgE.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { r as handOffTail, t as REVIEW_ORIG } from "../chunks/tail-
|
|
3
|
+
import { Ct as defaults, K as finisherSystem, M as agentWithSkills, S as coder, c as baseline, i as skills, n as summary, q as fixReviewNotesPrompt, r as access, s as shipped, t as steering, v as REVIEW, wt as envDefaults } from "../chunks/reserved-DF1HD6jL.mjs";
|
|
4
|
+
import { r as handOffTail, t as REVIEW_ORIG } from "../chunks/tail-D89fU_wf.mjs";
|
|
5
5
|
//#region src/workflows/fix/fix.ts
|
|
6
6
|
/**
|
|
7
7
|
* Fix every note a human left in a handed-off `.gtd/REVIEW.md` and every
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { read, refuse, removeScript, run, start } from "../flows.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { a as refusePendingHandOff } from "../chunks/tail-
|
|
4
|
-
import { i as reUnwind, t as buildTail } from "../chunks/review-
|
|
2
|
+
import { Ct as defaults, K as finisherSystem, M as agentWithSkills, S as coder, _ as REQUIREMENTS, dt as reviewFeedbackFixPrompt, ft as reviewGateBlockedMessage, i as skills, l as gate, n as summary, r as access, s as shipped, t as steering, wt as envDefaults } from "../chunks/reserved-DF1HD6jL.mjs";
|
|
3
|
+
import { a as refusePendingHandOff } from "../chunks/tail-D89fU_wf.mjs";
|
|
4
|
+
import { i as reUnwind, t as buildTail } from "../chunks/review-Bv40kZu9.mjs";
|
|
5
5
|
//#region src/workflows/review/review.ts
|
|
6
6
|
const fixFeedback = async () => {
|
|
7
7
|
await agentWithSkills("feedback.fixing", reviewFeedbackFixPrompt(), {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { agent, changesSince, glob, head, mark, read, refuse, removeScript, run, scope, vars } from "../flows.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Ct as defaults, Ft as flagMentions, Lt as flipProblems, S as coder, f as FEEDBACK, i as skills, l as gate, n as summary, o as flagShipped, r as access, t as steering, wt as envDefaults, zt as requireFlag } from "../chunks/reserved-DF1HD6jL.mjs";
|
|
3
3
|
//#region src/workflows/rollout/rollout.ts
|
|
4
4
|
const flippingPrompt = (name, registry) => `Roll out the release flag "${name}": in ${registry}, set \`defaultOn: true\` on its entry. Change nothing else — no other entry, no other field, no other file, no comments.`;
|
|
5
5
|
const suiteBlockedMessage = () => "The suite is red after the rollout. Fix it by hand — a rollout may only touch the flag's registry entry — then land.";
|