diff --git a/src/agent/directors/coder/package.ts b/src/agent/directors/coder/package.ts index c6370ab42..3c7d8cc80 100644 --- a/src/agent/directors/coder/package.ts +++ b/src/agent/directors/coder/package.ts @@ -26,7 +26,7 @@ export const coderPackage: DirectorPackage = { systemPrompt: `You are CoderDirector (Coder), a specialist in Corbits Code. PRIMARY INTENT: implement the brief in product code. Edit, verify, report. -You are a disciplined implementer worker (maySpawn: false) — not Reviewer, not Explorer, not an orchestrator. Ship the product code and the tests that belong with this change; leave review, architecture judgment, and independent verification to the parent and peer specialists. +You are the implement lane only — not Reviewer, not Explorer, not an orchestrator. Do not spawn specialists. Ship the product code and the tests that belong with this change; leave review, architecture judgment, and independent verification to the parent and peer specialists. Discipline: 1. Minimal safe diff: prefer the shortest clear change. Reuse existing helpers, patterns, and utilities; avoid drive-by refactors or gratuitous rewrites. Prune scope actively to what the brief asks for. diff --git a/src/agent/directors/explorer/package.ts b/src/agent/directors/explorer/package.ts index 10d524c4e..0934df4c6 100644 --- a/src/agent/directors/explorer/package.ts +++ b/src/agent/directors/explorer/package.ts @@ -30,8 +30,6 @@ DONE GATE: Stop when every success_criteria item from the brief is answered OR e FINDINGS SHAPE: Findings must be a scannable map — key paths, symbols, call flow / ownership — not optional prose dump. Cite paths. No drive-by refactors, no feature work, no review severity theater. -FINISH BIAS: Prefer one thorough pass then report. Expand Findings, change approach, or write the final report — do not keep re-reading the same paths. - OUT OF LANE: product writes, drive-by fixes, shipping features, review severity theater, orchestration, spawning specialists, fleet discovery, becoming Coder/Reviewer/orchestrator as primary.`, tools: { allow: READ_TOOLS }, spawn: { maySpawn: false }, diff --git a/src/agent/directors/planner/package.ts b/src/agent/directors/planner/package.ts index 33be1ef95..274f649ee 100644 --- a/src/agent/directors/planner/package.ts +++ b/src/agent/directors/planner/package.ts @@ -2,8 +2,8 @@ import type { DirectorPackage } from "../types.js"; import { BUILD_TOOLS } from "../tool-sets.js"; /** - * Planner worker: sawyer-skills artifact planner. - * Authors requirements (PRD.md), solution scopes (SOLUTION_SCOPE.md), + * Planner worker: PRD / solution-scope / build-plan author. + * Produces requirements (PRD.md), solution scopes (SOLUTION_SCOPE.md), * and concrete ordered build plans (BUILD_PLAN.md). */ export const plannerPackage: DirectorPackage = { @@ -26,7 +26,7 @@ export const plannerPackage: DirectorPackage = { PRIMARY INTENT: author concrete, agent-proof engineering artifacts and plans. You are the planning lane only — not Coder, not Reviewer, not an orchestrator. Do not ship product implementation code yourself; author the plan and artifacts that Coder can execute without guessing. -Sawyer-skills discipline & core artifacts: +Core artifacts: 1. PRD.md (Requirements): - Problem statement & user/operator value. - User stories and detailed acceptance criteria. diff --git a/src/agent/directors/qa-lead/package.ts b/src/agent/directors/qa-lead/package.ts index 08597b21d..7c1762734 100644 --- a/src/agent/directors/qa-lead/package.ts +++ b/src/agent/directors/qa-lead/package.ts @@ -23,7 +23,7 @@ export const qaLeadPackage: DirectorPackage = { PRIMARY INTENT: hands-on product exercise. Actually run the product as an operator would and report behavior as proof — pass/fail with exact commands. Never author unit tests. Never measure family/model latency. Never fix product code. Never spawn. -You are the hands-on lane — not Coder (unit tests with product diffs), not Prober (family/model latency matrices), not Reviewer, not an orchestrator, not a product fixer. Do not spawn specialists. Do not edit product code to make a failing exercise pass; a test that moves the target is not an exercise. +You are the hands-on lane — not Coder (unit tests with product diffs), not Prober (family/model latency matrices), not Reviewer, not an orchestrator. Do not spawn specialists. Do not edit product code to make a failing exercise pass; a test that moves the target is not an exercise. BLINDERS ON: exercise what the brief's success_criteria ask for, on the product below. Do not wander into unit-test authorship, latency matrices, or product fixes. @@ -47,7 +47,7 @@ BLINDERS ON: exercise what the brief's success_criteria ask for, on the product # Report -When done, stop tooling and reply with ONLY the Corbits report envelope — the shared scaffold owns its shape (Summary / Findings / Blockers / Paths, in that order), so this package does not re-specify it. Findings for this lane: pass/fail/blocked per success_criteria item, exact commands and exit statuses, occupancy/e2e/CLI evidence. +When done, stop tooling and reply with ONLY the Corbits report envelope (Summary / Findings / Blockers / Paths, in that order). Findings for this lane: pass/fail/blocked per success_criteria item, exact commands and exit statuses, occupancy/e2e/CLI evidence. DONE GATE: stop when the brief's exercise ask is answered with evidence OR explicitly blocked under Blockers. Do not expand into unit tests, latency matrices, product fixes, or orchestration. diff --git a/src/agent/model-family-policy.ts b/src/agent/model-family-policy.ts index 5301e8bed..05b2b9b2e 100644 --- a/src/agent/model-family-policy.ts +++ b/src/agent/model-family-policy.ts @@ -13,8 +13,8 @@ import { /** * Per-model-family tuning for the shared directors (main chat director and - * SubAgentDirector). One policy object, resolved once per session/leaf from - * the provider/model — directors stay generic and branch on data, never on + * SubAgentDirector). One policy object, resolved once per session from the + * provider/model — directors stay generic and branch on data, never on * per-family subclasses. */ export interface ModelFamilyPolicy { @@ -29,7 +29,7 @@ export interface ModelFamilyPolicy { toolOnlyTurnNudgeAt: number; /** Ephemeral nudge text injected at toolOnlyTurnNudgeAt. */ wrapUpNudgeText: string; - /** Wall-clock inactivity, in ms, before a silent sub-agent leaf is nudged. */ + /** Wall-clock inactivity, in ms, before a silent sub-agent is nudged. */ subAgentStallTimeoutMs: number; /** Grok's finish-bias residual (withhold from orchestrators; see provider-family.ts). */ applyGrokFinishBias: boolean; @@ -47,10 +47,10 @@ export interface ModelFamilyPolicy { */ toolDisciplineRules?: string; /** - * Provider-family residual appended once to the assembled leaf system + * Provider-family residual appended once to the assembled sub-agent system * prompt (CL-8297). Tool-budget text for grok, the XML task_guidance block * for claude, the narrate-before-tools note for gpt (CL-8310, primary and - * leaf alike). + * sub-agent alike). * Withheld from orchestrators and appended at the tail so it cannot * disturb the cached prompt prefix. Undefined for families that need none. */ @@ -84,11 +84,11 @@ const DEFAULT_POLICY: Omit = { advertisedToolDeny: [], }; -// Generic 4-line tool-budget residual (CL-8297). Grok leaves get this via +// Generic 4-line tool-budget residual (CL-8297). Grok sub-agents get this via // promptResidual today; other families leave the seam unfilled until their // own lanes land. Deliberately free of ceremony lines and family-specific -// routing — pure tool-loop budget. Single-sourced from the versioned -// prompt-variance package (CL-8269); the name stays for existing importers. +// routing — pure tool-loop budget. Source is grokToolBudgetResidual +// (prompt-variance CL-8269); the old name stays for existing importers. export const GROK_TOOL_BUDGET_RESIDUAL = grokToolBudgetResidual; // A directly observed 14-turn pure-tool-call session for this family @@ -107,7 +107,7 @@ const GROK_POLICY: Omit = { subAgentStallTimeoutMs: DEFAULT_POLICY.subAgentStallTimeoutMs, applyGrokFinishBias: true, advertisedToolDeny: [], - // Leaf value; the resolver clears it for orchestrators below. + // Sub-agent value; the resolver clears it for orchestrators below. promptResidual: GROK_TOOL_BUDGET_RESIDUAL, }; @@ -123,8 +123,8 @@ const KIMI_POLICY: Omit = { ...DEFAULT_POLICY }; // and ran out the 8-turn ceiling without finishing. The same run with these // three rules appended finished in 3 turns on 4.3x fewer input tokens. At // minimal effort it terminates either way, so the rules earn their keep exactly -// at the rungs where each wasted turn is most expensive. See CL-7869. -// Single-sourced from the versioned prompt-variance package (CL-8269). +// at the rungs where each wasted turn is most expensive. See CL-7869. Source is +// museRow.residual (prompt-variance CL-8269). const MUSE_TOOL_DISCIPLINE_RULES = museRow.residual; const MUSE_POLICY: Omit = { @@ -137,21 +137,19 @@ const MUSE_POLICY: Omit = { // pre-plan, verify once), merged into one block with no line twice. The don't // re-read idea appears exactly once (the "re-open paths" bullet) — it is not // repeated. Grok-only: detectModelFamily has no glm family, so per the <30min -// rule no GLM row ships here. The text lives here once; exported for -// buildGrokLeafAntiThrashNote (prompts.ts), which returns it verbatim, so the -// prompt carries exactly one copy. This is a different block from the CL-8297 -// tool-budget hook (GROK_TOOL_BUDGET_RESIDUAL, surfaced via the -// ModelFamilyPolicy.promptResidual field): grok leaves carry both, each once. -// Single-sourced from the versioned prompt-variance package (CL-8269); the -// name stays for existing importers. +// rule no GLM row ships here. Source is grokRow.residual (prompt-variance +// CL-8269); the old name stays for existing importers. buildGrokLeafAntiThrashNote +// (prompts.ts) returns it verbatim so the prompt carries one copy. This is a +// different block from the CL-8297 tool-budget hook (GROK_TOOL_BUDGET_RESIDUAL, +// surfaced via the ModelFamilyPolicy.promptResidual field): grok sub-agents +// carry both, each once. export const GROK_PROMPT_RESIDUAL = grokRow.residual; // Claude (Anthropic) ships one XML residual, not prose: a prose residual did // nothing, but a single block cut Sonnet tokens. The block is // the whole residual — never a full-prompt XML renderer. The text lives here // (policy owns data); buildClaudeTaskGuidanceNote (prompts.ts) returns it -// verbatim so the prompt carries exactly one copy. Single-sourced from the -// versioned prompt-variance package (CL-8269); the name stays for existing -// importers. +// verbatim so the prompt carries exactly one copy. Source is claudeRow.residual +// (prompt-variance CL-8269); the old name stays for existing importers. export const CLAUDE_TASK_GUIDANCE_NOTE = claudeRow.residual; const CLAUDE_POLICY: Omit = { @@ -168,9 +166,8 @@ const CLAUDE_POLICY: Omit = { // Served cells (sol/terra/…) are never named here — CL-8265 characterizes // them later. Astra is the one exception: forensics (CL-9027) showed the // gpt-6-astra cell evading the shared threshold guard via trivial argument -// deltas, so it carries its own residual below. Single-sourced from the -// versioned prompt-variance package (CL-8269); the name stays for existing -// importers. +// deltas, so it carries its own residual below. Source is gptRow.residual +// (prompt-variance CL-8269); the old name stays for existing importers. export const GPT_NARRATE_BEFORE_TOOLS_NOTE = gptRow.residual; // GPT (Codex / gpt-*) thresholds are provisional: we have no eval @@ -180,7 +177,7 @@ export const GPT_NARRATE_BEFORE_TOOLS_NOTE = gptRow.residual; // GPT_NARRATE_BEFORE_TOOLS_NOTE above), not a threshold. const GPT_POLICY: Omit = { ...DEFAULT_POLICY, - // Primary and leaf alike, so unlike the grok finish-bias there is no + // Primary and sub-agent alike, so unlike the grok finish-bias there is no // orchestrator carve-out: the resolver below returns this as-is. promptResidual: GPT_NARRATE_BEFORE_TOOLS_NOTE, }; @@ -196,7 +193,7 @@ export const ASTRA_PROMPT_RESIDUAL = `${GPT_NARRATE_BEFORE_TOOLS_NOTE}\n${astraR const ASTRA_POLICY: Omit = { ...GPT_POLICY, - // Like gpt, primary and leaf alike: no orchestrator carve-out. + // Like gpt, primary and sub-agent alike: no orchestrator carve-out. promptResidual: ASTRA_PROMPT_RESIDUAL, }; @@ -210,7 +207,7 @@ export function resolveModelFamilyPolicy(input: { switch (family) { case "grok": { const policy = { family, ...GROK_POLICY }; - // The finish-bias residual only makes sense on leaf workers, mirroring + // The finish-bias residual only makes sense on sub-agents, mirroring // shouldApplyGrokAntiThrash: orchestrators dispatch other agents rather // than doing the work directly. return { @@ -228,17 +225,18 @@ export function resolveModelFamilyPolicy(input: { return { family, ...MUSE_POLICY }; case "claude": // Like the grok finish-bias residual, the task_guidance block only makes - // sense on leaf workers — orchestrators dispatch rather than doing the + // sense on sub-agents — orchestrators dispatch rather than doing the // work directly, so they resolve to the permissive default (no residual). return orchestrator ? { family, ...DEFAULT_POLICY } : { family, ...CLAUDE_POLICY }; case "gpt": - // Primary and leaf alike: no orchestrator carve-out. + // Primary and sub-agent alike: no orchestrator carve-out. return { family, ...GPT_POLICY }; case "astra": - // Primary and leaf alike, like gpt: no orchestrator carve-out. Generic - // gpt prompts are byte-identical — only astra carries the residual. + // Like gpt, primary and sub-agent alike: no orchestrator carve-out. + // Generic gpt prompts are byte-identical — only astra carries the + // residual. return { family, ...ASTRA_POLICY }; default: return { family: "default", ...DEFAULT_POLICY };