pi-goal-list-loop-audit 0.22.2 → 0.22.4
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/extensions/loops/goal.ts +17 -3
- package/package.json +1 -1
package/extensions/loops/goal.ts
CHANGED
|
@@ -435,9 +435,15 @@ async function startDrafting(ctx: ExtensionContext, target: "goal" | "list" | "l
|
|
|
435
435
|
loop: ["goal-loop-forever-draft.md", "Loop drafting", "propose_loop_draft"],
|
|
436
436
|
};
|
|
437
437
|
const [file, label, tool] = prompts[target]!;
|
|
438
|
+
const seededHint =
|
|
439
|
+
target === "list"
|
|
440
|
+
? `${label}: the objective has no "Done when:" clause — the agent will grill you about it first (nothing activates until you confirm). Add directly instead: include a "Done when:" clause.`
|
|
441
|
+
: target === "loop"
|
|
442
|
+
? `${label}: a loop target needs a metric and a direction — the agent will help you design them first (nothing activates until you confirm). Skip the interview entirely: /loop start "<target>" measure="<cmd>" direction=min|max [window=5] [max=50] [time=h] [tokens=n] [branch=1].`
|
|
443
|
+
: `${label}: the objective has no "Done when:" clause — the agent will grill you about it first (nothing activates until you confirm). Skip the interview entirely: /goal start <objective>.`;
|
|
438
444
|
ctx.ui.notify(
|
|
439
445
|
seed
|
|
440
|
-
?
|
|
446
|
+
? seededHint
|
|
441
447
|
: `${label} started. The agent will grill until the contract is concrete, then ${tool} opens a Confirm dialog. No work begins before confirmation.`,
|
|
442
448
|
"info",
|
|
443
449
|
);
|
|
@@ -1228,7 +1234,15 @@ async function cmdLoop(args: string, ctx: ExtensionContext): Promise<void> {
|
|
|
1228
1234
|
return;
|
|
1229
1235
|
}
|
|
1230
1236
|
|
|
1231
|
-
|
|
1237
|
+
// Anything else is a natural-language target (v0.22.4): draft it — the
|
|
1238
|
+
// metric is the whole game for a loop, and /loop start with full params
|
|
1239
|
+
// is the skip-drafting path. Previously this fell through to a usage
|
|
1240
|
+
// line, so "/loop make the tests faster" did nothing useful.
|
|
1241
|
+
if (isLoopActive()) {
|
|
1242
|
+
ctx.ui.notify("A loop is already active — /loop status to inspect, /loop stop to end it.", "info");
|
|
1243
|
+
return;
|
|
1244
|
+
}
|
|
1245
|
+
await startDrafting(ctx, "loop", args.trim());
|
|
1232
1246
|
}
|
|
1233
1247
|
|
|
1234
1248
|
// =================================================================
|
|
@@ -2225,7 +2239,7 @@ export default function (pi: ExtensionAPI): void {
|
|
|
2225
2239
|
handler: (args: string, ctx: ExtensionContext) => { rememberCtx(ctx); return cmdList(args, ctx); },
|
|
2226
2240
|
});
|
|
2227
2241
|
pi.registerCommand("loop", {
|
|
2228
|
-
description: "Loop 3: metric-driven process — it never completes. /loop start \"<target>\" measure=\"<cmd>\" direction=min|max [window=5] [max=50] [time=<hours>] [tokens=<budget>] [branch=1]
|
|
2242
|
+
description: "Loop 3: metric-driven process — it never completes. /loop <target> drafts the metric with you · /loop start \"<target>\" measure=\"<cmd>\" direction=min|max [window=5] [max=50] [time=<hours>] [tokens=<budget>] [branch=1] skips drafting · /loop status · /loop stop. 'Improve until X' is a /goal, not a loop.",
|
|
2229
2243
|
handler: (args: string, ctx: ExtensionContext) => { rememberCtx(ctx); return cmdLoop(args, ctx); },
|
|
2230
2244
|
});
|
|
2231
2245
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-goal-list-loop-audit",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.4",
|
|
4
4
|
"description": "Goal. Loop. Audit. Done. — a pi-coding-agent extension that supervises long-running work, with isolated auditor on each completion. Beat bamboozling by design: the auditor runs in a fresh session with no extensions, no skills, no editor — only the read tools needed to verify your goal.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dracon",
|