返回 CodeWhale
docs-subagents.ts
根目录 / web / lib / i18n / dictionaries / en / docs-subagents.ts
1 import type { DocsSubagentsDict } from "../types";
2
3 /**
4 * English reference dictionary for `app/[locale]/docs/subagents/page.tsx`
5 * ("Run agents in parallel"). Roles follow the current Fleet role table in
6 * docs/SUBAGENTS.md (general/explore/planner/reviewer/implement/test/
7 * advisor/custom); limits follow crates/tui/src/config/subagent_limits.rs
8 * and docs/CONFIGURATION.md (`max_subagents`, `[subagents]`).
9 */
10 export const docsSubagents: DocsSubagentsDict = {
11 metaTitle: "Run agents in parallel · Codewhale Docs",
12 metaDescription:
13 "Let Codewhale hand independent parts of a task to sub-agents, choose their roles, keep their edits in separate worktrees, and watch them work.",
14 bodyClassName: "text-ink-soft leading-relaxed",
15 title: "Run agents in parallel",
16 lede:
17 "Codewhale can hand a focused piece of work to a sub-agent and keep going while it runs. Use this when a task splits into independent parts — mapping a codebase, reviewing a change, running tests — so they happen at the same time.",
18 sections: [
19 {
20 id: "ask",
21 title: "Ask for it",
22 blocks: [
23 {
24 p: "You do not start sub-agents with a command; you ask in plain words. In Operate, Codewhale does this on its own for independent steps. In Work, say what you want split up:",
25 },
26 {
27 code: `Use three explore agents in parallel: one maps the auth code,
28 one maps the billing code, one lists the tests that cover both.
29 Then summarize what would break if we changed the session format.`,
30 lang: "Prompt",
31 },
32 {
33 p: "Each sub-agent starts in the background and reports back when it finishes. Your composer stays free, and the parent turn picks up the results.",
34 },
35 ],
36 },
37 {
38 id: "roles",
39 title: "Pick a role",
40 blocks: [
41 {
42 p: "A role is the stance a sub-agent takes. Name one in your request, or let Codewhale choose. A sub-agent never gets more permission than your session has.",
43 },
44 {
45 rows: [
46 ["general", "Does whatever the brief says; may edit and run commands. The default."],
47 ["explore", "Read-only. Maps the relevant code fast — “find every caller of this function.”"],
48 ["planner", "Designs an approach without changing anything."],
49 ["reviewer", "Reads and grades a change, with a severity for each finding."],
50 ["implement", "Lands one specific change with the smallest edit."],
51 ["test", "Runs tests and checks, then reports pass or fail. Does not edit code."],
52 ["advisor", "Short, careful second opinion on a judgment call. No commands."],
53 ["custom", "Only the tools you list, for tightly limited jobs."],
54 ],
55 codeTerms: true,
56 },
57 {
58 p: "To give a role a specific model every time, save it with `/fleet setup` — see [Run a workflow](/docs/fleet).",
59 },
60 ],
61 },
62 {
63 id: "worktrees",
64 title: "Keep parallel edits apart",
65 blocks: [
66 {
67 p: "When two sub-agents would edit the same repository, ask for each to work in its own worktree. Codewhale creates a fresh git worktree and branch for that agent beside your repository, under `.codewhale-worktrees/`, so your checkout stays clean until you merge.",
68 },
69 {
70 p: "A worktree is isolation, not permission: an agent that should write still needs a writing role and the paths it may change. Two agents that claim the same files are stopped before either one edits anything.",
71 },
72 ],
73 },
74 {
75 id: "watch",
76 title: "Watch and answer them",
77 blocks: [
78 { code: "/subagents", lang: "Codewhale" },
79 {
80 p: "`/subagents` (the same view as `/fleet workers`) lists the agents attached to this session and what each one is doing. Select one to read its transcript.",
81 },
82 {
83 p: "Sub-agents follow your [approval setting](/docs/modes). In Ask, a call that needs approval appears in your session as a normal prompt while the agent waits. In Auto-Review, each held call gets the same independent review, and nothing prompts you. Every decision you did not make yourself is written to the agent's transcript.",
84 },
85 ],
86 },
87 {
88 id: "limits",
89 title: "Know the limits",
90 blocks: [
91 {
92 rows: [
93 ["Running at once", "64 by default. Set `max_subagents` (up to 128) in `~/.codewhale/config.toml`."],
94 ["Queued plus running", "Up to 1,024; extra launches wait for a slot."],
95 ["Nesting", "A sub-agent may start its own, three levels deep by default, never more than eight."],
96 ],
97 },
98 {
99 p: "These are ceilings, not targets. A few well-scoped agents with one clear summary beat many overlapping ones. For work that must survive a restart or a sleeping laptop, use a [Fleet run](/docs/fleet) instead.",
100 },
101 ],
102 },
103 ],
104 next: [
105 {
106 href: "/docs/fleet",
107 label: "Run a workflow",
108 note: "Turn a plan you repeat into a Workflow with phases and a record of each run.",
109 },
110 {
111 href: "/docs/work",
112 label: "Track progress",
113 note: "How the To-do list shows what is done, in progress, and left.",
114 },
115 {
116 href: "/docs/review",
117 label: "Review what changed",
118 note: "Check what the agents changed before you keep it.",
119 },
120 ],
121 sourceNote: "Source documents: docs/SUBAGENTS.md, docs/FLEET.md, docs/MODES.md · Update docs-map.ts when changing.",
122 };
123
123 lines TYPESCRIPT