import assert from "node:assert/strict"; import { describe, it } from "node:test"; import { readSubagentGuide, SUBAGENT_GUIDE_TOPICS } from "../../src/extension/subagent-guide.ts"; import { SUBAGENT_ACTIONS } from "../../src/shared/types.ts"; describe("subagent guide", () => { it("reads the packaged overview by default", () => { const guide = readSubagentGuide(); assert.match(guide, /# pi-subagents/); }); it("lists valid topics for an unknown topic without changing files", () => { const guide = readSubagentGuide("unknown"); assert.match(guide, /Unknown subagents guide topic 'unknown'/); assert.match(guide, /No files were changed\./); assert.match(guide, new RegExp(SUBAGENT_GUIDE_TOPICS.join(", "))); }); it("registers the guide action for action recovery", () => { assert.ok(SUBAGENT_ACTIONS.includes("guide")); }); });