/** * System-prompt composition helpers for the Director ecosystem. * * Two callers need composed prompts: * * 1. The **leader** (the director's own Agent) — needs a preamble that * explains the fleet protocol: when to spawn, when to await, how to * roll up, and the eight orchestration tools it owns. * * 2. Each **subagent** — needs a baseline that explains it has a parent * it can call via the bridge, a role-specific block, the task brief, * and finally any per-spawn `systemPromptOverride` from `SubagentConfig`. * * Both composers are pure functions: feed them parts, they return a string. * No I/O, no side effects, no implicit defaults beyond the ones exported * here. Callers (CLI multi-agent factory, Director itself) decide which * parts to fill in — that keeps the composition seam visible and testable. */ /** * Default fleet-protocol preamble injected at the **front** of the * director-agent's system prompt. */ export declare const DEFAULT_DIRECTOR_PREAMBLE: string; /** * Default baseline prepended to every subagent's system prompt. */ export declare const DEFAULT_SUBAGENT_BASELINE: string; /** Parts the leader-prompt composer accepts. All optional. */ export interface DirectorPromptParts { /** The user's existing leader system prompt — typically what was passed * via `MultiAgentConfig.leaderSystemPrompt`. */ basePrompt?: string | undefined; /** Override the built-in fleet preamble. Pass empty string to suppress. */ directorPreamble?: string | undefined; /** Optional roster summary block — a short list of pre-configured roles * the director can spawn (e.g. "researcher, coder, reviewer"). Helps * small models discover the available shapes without scanning tools. */ rosterSummary?: string | undefined; } /** * Compose the leader/director's system prompt. Order: * 1. Director preamble (fleet protocol) * 2. Roster summary (optional, when provided) * 3. User base prompt (the per-project leader prompt) * * Sections are separated by a blank line. Empty parts are skipped so the * output never contains stray blank-line runs. */ export declare function composeDirectorPrompt(parts?: DirectorPromptParts): string; /** Parts the subagent-prompt composer accepts. Layered from generic to * specific; later layers override earlier ones when they conflict. */ export interface SubagentPromptParts { /** Base persona/identity for *every* subagent. Defaults to the bridge * contract baseline. Pass empty string to suppress. */ baseline?: string | undefined; /** Role-specific block, e.g. "You are a code reviewer. Focus on…". */ role?: string | undefined; /** Task brief — usually the same string the runner passes as user input, * but exposed here in case the factory wants it duplicated in the * system prompt for reinforcement. */ task?: string | undefined; /** * Absolute path to a shared scratchpad directory the whole fleet can * read/write. When set, the composer adds a "Shared notes" block that * tells the subagent where to drop findings and where to look for * sibling output. This is the cheap fleet-coordination channel — * agents don't need each other's transcripts, just each other's * conclusions. Falls between `task` and `override` so the override * can still narrow or replace it. */ sharedScratchpad?: string | undefined; /** * Optional skill body content injected into the subagent's system prompt. * Use this to provide domain-specific knowledge (SKILL.md bodies) to * subagents that need it. Placed after `sharedScratchpad` and before * `override` so the override can still narrow or replace it. */ skills?: string | undefined; /** Final per-spawn override from `SubagentConfig.systemPromptOverride`. * Added last so it wins on conflict — that's by design: the spawn site * knows the most about what this specific subagent should do. */ override?: string | undefined; } /** * Compose a subagent's system prompt. Order: * 1. Baseline (bridge contract) * 2. Role * 3. Task brief * 4. Shared scratchpad * 5. Skills (domain knowledge from SKILL.md) * 6. Per-spawn override * * Same blank-line-separated joining as the director composer. * * Layering rationale: the baseline never needs to change between * subagents; the role is the "what kind of worker is this"; the task is * the "what should you do *now*"; skills provide reusable domain knowledge * (e.g. bug-hunting patterns, security scanning rules); the override is * the spawn-site escape hatch ("…and respond only in JSON"). Putting * override last means it never gets squashed by something earlier in the chain. */ export declare function composeSubagentPrompt(parts?: SubagentPromptParts): string; /** * Render a short bullet list summarising a roster — useful for stuffing * into `composeDirectorPrompt({ rosterSummary })` so the director model * can see available roles without scanning tool descriptions. * * Each entry: `- : [ (provider/model)] — ` * The prompt headline is the first non-empty line of `config.prompt`, * truncated to 80 chars. Skipped entirely when the role has no prompt. */ export declare function rosterSummaryFromConfigs(roster: Record): string; //# sourceMappingURL=director-prompts.d.ts.map