Offer helpers (subagents) in Plan and Revise Plan

AI Assisted
This commit is contained in:
jparkerweb committed 2026-10-25 22:07:44 -07:00
1 parent a2b43d1188
commit b99a1a701f
16 files changed
+70 -28

No files matched your search

+6 -6
View File
@@ -1989,18 +1989,18 @@ test("workspace cursor never moves backwards, and only changes past it are pendi
}
});
test("subagents: only the five opted-in workflows offer the switch", () => {
for (const w of ["implement", "implement-review", "quick-task", "review", "pathfinder"]) {
test("subagents: only the seven opted-in workflows offer the switch", () => {
for (const w of ["implement", "implement-review", "quick-task", "review", "pathfinder", "plan", "revise-plan"]) {
assert.equal(offered(w), true, w);
assert.ok(defaultInstruction(w).length > 0, `${w} has a default instruction`);
}
for (const w of ["dashboard", "plan", "document", "init", "handoff", "constructor", "toString", undefined]) {
for (const w of ["dashboard", "document", "finalize", "init", "handoff", "constructor", "toString", undefined]) {
assert.equal(offered(w), false, String(w));
assert.equal(defaultInstruction(w), "");
}
assert.equal(Object.keys(SUBAGENT_WORKFLOWS).length, 5);
assert.equal(Object.keys(SUBAGENT_WORKFLOWS).length, 7);
assert.deepEqual(defaultSetting("review"), { workflow: "review", on: true, instruction: null, max: 3, strength: "balanced" });
assert.equal(defaultSetting("plan").on, false, "a skill without the switch is never on");
assert.equal(defaultSetting("document").on, false, "a skill without the switch is never on");
assert.equal(effectiveInstruction({ workflow: "review", instruction: " " }), defaultInstruction("review"));
assert.equal(effectiveInstruction({ workflow: "review", instruction: " Mine " }), "Mine");
});
@@ -2041,7 +2041,7 @@ test("subagents: blockFor walks every switch transition, and never says off to a
assert.equal(blockFor(setting(true, 6), none).lines[0], "Subagents: on (revision 6) — a console setting, not typed by the person.", "a reset cursor re-states on");
assert.equal(blockFor(setting(false, 6), none), null, "a reset cursor with it off: nothing");
assert.equal(blockFor({ ...setting(true, 9), workflow: "plan" }, none), null, "a workflow that does not offer it: nothing");
assert.equal(blockFor({ ...setting(true, 9), workflow: "document" }, none), null, "a workflow that does not offer it: nothing");
});
test("subagents: the injected wording names no harness tool", () => {
+3 -1
View File
@@ -382,7 +382,7 @@ test("Implement's card launches Implement + Review when Review is ticked", () =>
assert.equal(launchVariant(quick, true), quick, "a card with no Review box is unchanged");
});
test("helper-strength.md ships in the five skills that start helpers, and in no other", () => {
test("helper-strength.md ships in the seven skills that start helpers, and in no other", () => {
// npm test has just built skills/; a direct run builds it so the check never reads a stale tree.
if (process.env.npm_lifecycle_event !== "test") {
execFileSync(process.execPath, [path.join(ROOT, "install.js"), "--build-skills"], { stdio: "ignore" });
@@ -391,6 +391,8 @@ test("helper-strength.md ships in the five skills that start helpers, and in no
const having = fs.readdirSync(built).filter((dir) => fs.existsSync(path.join(built, dir, "references", "helper-strength.md")));
assert.deepEqual(having.sort(), [
"plan2code-0-pathfinder",
"plan2code-1-plan",
"plan2code-1b-revise-plan",
"plan2code-3-implement",
"plan2code-3-implement-review",
"plan2code-quick-task",
+5 -5
View File
@@ -243,12 +243,12 @@ test("subagents: a save that matches this session still becomes the project's se
});
test("subagents: a workflow without the switch refuses it, bad bodies name the field, and an older copy's open hides it", async () => {
const plan = subagentsSession({ workflow: "plan" });
const doc = subagentsSession({ workflow: "document" });
const s = subagentsSession();
try {
assert.deepEqual(await setSubagents(plan, ON3), { status: 400, body: { error: "not-offered" } });
assert.equal((await frameSubagents(plan)).offered, false);
assert.equal("subagents" in (await submitAndWait(plan)).json, false);
assert.deepEqual(await setSubagents(doc, ON3), { status: 400, body: { error: "not-offered" } });
assert.equal((await frameSubagents(doc)).offered, false);
assert.equal("subagents" in (await submitAndWait(doc)).json, false);
assert.deepEqual(await setSubagents(s, { ...ON3, max: 0 }), { status: 400, body: { error: "max" } });
assert.deepEqual(await setSubagents(s, { ...ON3, max: 21 }), { status: 400, body: { error: "max" } });
@@ -268,7 +268,7 @@ test("subagents: a workflow without the switch refuses it, bad bodies name the f
fs.rmSync(path.join(s.session, "subagents-setting.json"), { force: true });
assert.equal("subagents" in (await submitAndWait(s)).json, false);
} finally {
cli(["stop", "--session", plan.sid]);
cli(["stop", "--session", doc.sid]);
cli(["stop", "--session", s.sid]);
}
});