feat(coding-agent): removed plan subagent

- Removed the `plan` agent definition and associated prompt file from bundled agents.
- Updated documentation to reflect the removal of `plan` from available subagents.
- Cleaned up related tests to remove references to the deprecated agent.
This commit is contained in:
can1357
2026-07-11 05:36:37 +02:00
parent 1c6f5dc18f
commit 2f97b7fe4b
7 changed files with 21 additions and 76 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ Parsing comes from frontmatter via `parseAgentFields()` (`src/discovery/helpers.
- `spawns` accepts `*`, CSV, or array
- backward-compat behavior: if `spawns` missing but `tools` includes `task`, `spawns` becomes `*`
- `output` is passed through as opaque schema data
- `read-summarize: false` (parsed as `readSummarize`) forces the subagent's `read` tool to return verbatim file content instead of structural summaries — `runSubprocess` applies it as a `read.summarize.enabled: false` override on the subagent's isolated settings (`src/task/executor.ts`). `explore` and `librarian` ship with it disabled. Defaults to enabled when the field is absent.
- `read-summarize: false` (parsed as `readSummarize`) forces the subagent's `read` tool to return verbatim file content instead of structural summaries — `runSubprocess` applies it as a `read.summarize.enabled: false` override on the subagent's isolated settings (`src/task/executor.ts`). `scout` and `librarian` ship with it disabled. Defaults to enabled when the field is absent.
## Bundled agents
@@ -43,7 +43,7 @@ Bundled agents are embedded at build time (`src/task/agents.ts`) using text impo
`EMBEDDED_AGENT_DEFS` defines:
- `explore`, `plan`, `designer`, `reviewer`, `librarian`, `oracle` from prompt files
- `scout`, `designer`, `reviewer`, `librarian` from prompt files
- `task` and `sonic` from shared `task.md` body plus injected frontmatter
Loading path:
+1 -1
View File
@@ -106,7 +106,7 @@ Artifacts and side channels:
- off — single spawn per call; `tasks`/`context` are rejected and removed from the schema.
- Isolation mode (`task.isolation.mode`): `none`, `auto`, `apfs`, `btrfs`, `zfs`, `reflink`, `overlayfs`, `projfs`, `block-clone`, `rcopy` (legacy `worktree`, `fuse-overlay`, `fuse-projfs` accepted for back-compat); the PAL resolves the actual backend with fallback.
- Isolation merge strategy: patch mode (capture/apply root patches) or branch mode (commit to `omp/task/<id>`, cherry-pick into parent).
- Agent source precedence: project custom agents, then user custom agents, then bundled agents (`explore`, `plan`, `designer`, `reviewer`, `task`, `sonic`, `librarian`, `oracle`).
- Agent source precedence: project custom agents, then user custom agents, then bundled agents (`scout`, `designer`, `reviewer`, `task`, `sonic`, `librarian`).
## Side Effects
- Filesystem
+5
View File
@@ -8,6 +8,11 @@
- Optimized subagent usage to discourage single-agent delegation and improve parallel execution flows
- Clarified that prerequisite work for subagent tasks should be handled inline by the main agent
### Removed
- Removed the bundled `plan` subagent from available task agents
- Removed the bundled `plan` subagent from available task agents.
## [16.4.2] - 2026-07-10
### Fixed
@@ -1,47 +0,0 @@
---
name: plan
description: Software architect for complex multi-file architectural decisions. NOT for simple tasks, single-file changes, or tasks completable in <5 tool calls.
tools: read, grep, glob, bash, lsp, web_search, ast_grep
spawns: scout
model: pi/plan, pi/slow
---
Analyze the codebase and the user's request. Produce a detailed implementation plan.
## Phase 1: Understand
1. Parse requirements precisely
2. Identify ambiguities; list assumptions
## Phase 2: Explore
1. Find existing patterns via `grep`/`glob`
2. Read key files; understand architecture
3. Trace data flow through relevant paths
4. Identify types, interfaces, contracts
5. Note dependencies between components
You MUST spawn `scout` agents for independent areas and synthesize findings.
## Phase 3: Design
1. List concrete changes (files, functions, types)
2. Define sequence and dependencies
3. Identify edge cases and error conditions
4. Consider alternatives; justify your choice
5. Note pitfalls/tricky parts
## Phase 4: Produce Plan
You MUST write a plan executable without re-exploration.
<structure>
- **Summary**: What to build and why (one paragraph).
- **Changes**: Concrete changes (files, functions, types). Exact file paths/line ranges where relevant.
- **Sequence**: Ordering and dependencies between sub-tasks.
- **Edge Cases**: Edge cases and error conditions to watch.
- **Verification**: Steps to verify correctness.
- **Critical Files**: Files the implementer must read to understand the codebase.
</structure>
<critical>
You MUST operate as read-only. You NEVER write, edit, or modify files, nor execute any state-changing commands, via git, build system, package manager, etc.
You MUST keep going until complete.
</critical>
-2
View File
@@ -10,7 +10,6 @@ import designerMd from "../prompts/agents/designer.md" with { type: "text" };
// Embed agent markdown files at build time
import agentFrontmatterTemplate from "../prompts/agents/frontmatter.md" with { type: "text" };
import librarianMd from "../prompts/agents/librarian.md" with { type: "text" };
import planMd from "../prompts/agents/plan.md" with { type: "text" };
import reviewerMd from "../prompts/agents/reviewer.md" with { type: "text" };
import scoutMd from "../prompts/agents/scout.md" with { type: "text" };
import taskMd from "../prompts/agents/task.md" with { type: "text" };
@@ -41,7 +40,6 @@ function buildAgentContent(def: EmbeddedAgentDef): string {
const EMBEDDED_AGENT_DEFS: EmbeddedAgentDef[] = [
{ fileName: "scout.md", template: scoutMd },
{ fileName: "plan.md", template: planMd },
{ fileName: "designer.md", template: designerMd },
{ fileName: "reviewer.md", template: reviewerMd },
{ fileName: "librarian.md", template: librarianMd },
@@ -15,22 +15,13 @@ describe("bundled agent parsing", () => {
expect(reviewer?.thinkingLevel).toBeUndefined();
});
it("lets plan inherit thinking effort from its model role", () => {
const plan = getBundledAgent("plan");
expect(plan).toBeDefined();
expect(plan?.source).toBe("bundled");
expect(plan?.model).toEqual(["pi/plan", "pi/slow"]);
expect(plan?.thinkingLevel).toBeUndefined();
});
// Issue #4761: with `modelRoles.slow: ...:xhigh`, the role's explicit effort
// suffix must survive agent-pattern expansion and model resolution for the
// bundled agents routed at that role. The executor picks
// `agent.thinkingLevel ?? resolvedThinkingLevel` (task/executor.ts), so a
// bundled frontmatter pin would mask the suffix — reviewer/plan declare none
// bundled frontmatter pin would mask the suffix — reviewer declares none
// (asserted above) and the resolved level below is what the subagent runs at.
it("resolves the configured slow-role effort suffix for reviewer and plan", () => {
it("resolves the configured slow-role effort suffix for reviewer", () => {
const gpt55 = buildModel({
id: "gpt-5.5",
name: "GPT-5.5 Codex",
@@ -45,19 +36,17 @@ describe("bundled agent parsing", () => {
maxTokens: 128000,
});
const settings = Settings.isolated({
modelRoles: { slow: "openai-codex/gpt-5.5:xhigh", plan: "openai-codex/gpt-5.5:xhigh" },
modelRoles: { slow: "openai-codex/gpt-5.5:xhigh" },
});
const registry = { getAvailable: () => [gpt55] } as Parameters<typeof resolveModelOverride>[1];
for (const name of ["reviewer", "plan"]) {
const agent = getBundledAgent(name);
expect(agent?.thinkingLevel).toBeUndefined();
const patterns = resolveAgentModelPatterns({ agentModel: agent?.model, settings });
const resolved = resolveModelOverride(patterns, registry, settings);
expect(resolved.model?.provider).toBe("openai-codex");
expect(resolved.model?.id).toBe("gpt-5.5");
expect(resolved.thinkingLevel).toBe(Effort.XHigh);
expect(resolved.explicitThinkingLevel).toBe(true);
}
const agent = getBundledAgent("reviewer");
expect(agent?.thinkingLevel).toBeUndefined();
const patterns = resolveAgentModelPatterns({ agentModel: agent?.model, settings });
const resolved = resolveModelOverride(patterns, registry, settings);
expect(resolved.model?.provider).toBe("openai-codex");
expect(resolved.model?.id).toBe("gpt-5.5");
expect(resolved.thinkingLevel).toBe(Effort.XHigh);
expect(resolved.explicitThinkingLevel).toBe(true);
});
});
@@ -14,7 +14,7 @@ describe("task agent capability descriptions", () => {
const agents = loadBundledAgents();
expect(isReadOnlyAgent(agentByName(agents, "scout"))).toBe(true);
for (const name of ["task", "sonic", "plan", "reviewer", "designer"]) {
for (const name of ["task", "sonic", "reviewer", "designer"]) {
expect(isReadOnlyAgent(agentByName(agents, name))).toBe(false);
}
});
@@ -24,7 +24,7 @@ describe("task agent capability descriptions", () => {
expect(agentByName(agents, "scout").readSummarize).toBe(false);
expect(agentByName(agents, "librarian").readSummarize).toBe(false);
for (const name of ["task", "sonic", "plan", "reviewer", "designer"]) {
for (const name of ["task", "sonic", "reviewer", "designer"]) {
expect(agentByName(agents, name).readSummarize).toBeUndefined();
}
});