github-router 0.3.332 → 0.3.334
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{attribution-settings-BeO1w_DL.js → attribution-settings-BwJ_HbhG.js} +91 -51
- package/dist/attribution-settings-BwJ_HbhG.js.map +1 -0
- package/dist/balanced-profile-contract-DkmALvc7.js +130 -0
- package/dist/balanced-profile-contract-DkmALvc7.js.map +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-BQQPdXLb.js → claude-C1fHEK9k.js} +15 -14
- package/dist/claude-C1fHEK9k.js.map +1 -0
- package/dist/{codex-fW-hbxtT.js → codex-DPgcI7n4.js} +4 -4
- package/dist/{codex-fW-hbxtT.js.map → codex-DPgcI7n4.js.map} +1 -1
- package/dist/engine-Dt_WWJcW.js +2 -0
- package/dist/{gate-discovery-DbwVeERm.js → gate-discovery-BTgLdzhP.js} +2 -2
- package/dist/{gate-discovery-DbwVeERm.js.map → gate-discovery-BTgLdzhP.js.map} +1 -1
- package/dist/hooks.mjs +49 -3
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-fast-dispatch-guard-DoXO3X7P.js → internal-fast-dispatch-guard-BykpMYog.js} +26 -4
- package/dist/internal-fast-dispatch-guard-BykpMYog.js.map +1 -0
- package/dist/{internal-fast-dispatch-guard-DPR16qUE.js → internal-fast-dispatch-guard-VvR1xQnL.js} +1 -1
- package/dist/{internal-stop-hook-DO8RKfKB.js → internal-stop-hook-t_pg41SR.js} +2 -2
- package/dist/{internal-stop-hook-DO8RKfKB.js.map → internal-stop-hook-t_pg41SR.js.map} +1 -1
- package/dist/main.js +6 -6
- package/dist/{peer-mcp-personas-CeB2Kcn2.js → peer-mcp-personas-7esbf4L6.js} +29 -91
- package/dist/peer-mcp-personas-7esbf4L6.js.map +1 -0
- package/dist/{provision-DZLsyRYh.js → provision-DFscSS0y.js} +2 -2
- package/dist/{provision-DZLsyRYh.js.map → provision-DFscSS0y.js.map} +1 -1
- package/dist/{serve-ik_96Q2Z.js → serve-DHCliFCz.js} +5 -5
- package/dist/{serve-ik_96Q2Z.js.map → serve-DHCliFCz.js.map} +1 -1
- package/dist/{server-setup-CK3O_Hwf.js → server-setup-aZtjyebO.js} +51 -38
- package/dist/server-setup-aZtjyebO.js.map +1 -0
- package/dist/{start-DPOJJSvp.js → start-CWQ5jAwp.js} +3 -3
- package/dist/{start-DPOJJSvp.js.map → start-CWQ5jAwp.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-BeO1w_DL.js.map +0 -1
- package/dist/claude-BQQPdXLb.js.map +0 -1
- package/dist/engine-E4WJGSeg.js +0 -2
- package/dist/fast-profile-contract-DmsyQQrw.js +0 -61
- package/dist/fast-profile-contract-DmsyQQrw.js.map +0 -1
- package/dist/internal-fast-dispatch-guard-DoXO3X7P.js.map +0 -1
- package/dist/peer-mcp-personas-CeB2Kcn2.js.map +0 -1
- package/dist/server-setup-CK3O_Hwf.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as isUnderClaudeConfigMirror, f as writeRuntimeFileSecure, t as PATHS } from "./paths-CpbTHKeP.js";
|
|
2
|
-
import { C as CHEAP_REVIEWER_ALIAS_ID, S as CHEAP_PLAN_ALIAS_ID, _ as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, b as CHEAP_EXPLORE_ALIAS_ID, f as BALANCED_EXPLORE_ALIAS_ID, g as CHEAPEST_EXPLORE_ALIAS_ID, h as BALANCED_REVIEWER_ALIAS_ID, m as BALANCED_PLAN_ALIAS_ID, p as BALANCED_GENERAL_PURPOSE_ALIAS_ID, v as CHEAPEST_PLAN_ALIAS_ID, w as LUNA_SCOUT_ALIAS_ID, x as CHEAP_GENERAL_PURPOSE_ALIAS_ID, y as CHEAPEST_REVIEWER_ALIAS_ID } from "./server-setup-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { C as CHEAP_REVIEWER_ALIAS_ID, S as CHEAP_PLAN_ALIAS_ID, _ as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, b as CHEAP_EXPLORE_ALIAS_ID, f as BALANCED_EXPLORE_ALIAS_ID, g as CHEAPEST_EXPLORE_ALIAS_ID, h as BALANCED_REVIEWER_ALIAS_ID, m as BALANCED_PLAN_ALIAS_ID, p as BALANCED_GENERAL_PURPOSE_ALIAS_ID, v as CHEAPEST_PLAN_ALIAS_ID, w as LUNA_SCOUT_ALIAS_ID, x as CHEAP_GENERAL_PURPOSE_ALIAS_ID, y as CHEAPEST_REVIEWER_ALIAS_ID } from "./server-setup-aZtjyebO.js";
|
|
3
|
+
import { _ as FAST_PROFILE_MODELS, a as BALANCED_PROFILE_NATIVE_EFFORTS, b as FAST_PROFILE_NATIVE_MODELS, i as BALANCED_PROFILE_NATIVE_AGENT_NAMES, v as FAST_PROFILE_NATIVE_AGENT_NAMES, y as FAST_PROFILE_NATIVE_EFFORTS } from "./balanced-profile-contract-DkmALvc7.js";
|
|
4
|
+
import { Bn as CHEAP_PROFILE_NATIVE_EFFORTS, Nn as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, On as oneMContextDisabled, Pn as CHEAPEST_PROFILE_NATIVE_EFFORTS, a as buildAgentPrompt, cn as DEFINITION_OF_GREATNESS, kn as withOneMSuffix, l as maxPersonasFor, n as MCP_GROUPS, sn as CONDENSED_OPERATING_SEQUENCE, t as GROUP_META, u as personasFor, zn as CHEAP_PROFILE_NATIVE_AGENT_NAMES } from "./peer-mcp-personas-7esbf4L6.js";
|
|
5
5
|
import { C as MAX_PARALLELISM_RULE, S as MAX_COORDINATOR_PROMPT, T as maxNativePrompt, a as MAX_PROFILE_NATIVE_AGENT_NAMES, i as MAX_PROFILE_MODELS, o as MAX_PROFILE_NATIVE_EFFORTS, s as MAX_PROFILE_NATIVE_MODELS, w as maxNativeDescription, x as MAX_COORDINATOR_DESCRIPTION } from "./max-profile-contract-MJJt0zm-.js";
|
|
6
6
|
import "./self-invocation-DIUyoRgL.js";
|
|
7
|
-
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-
|
|
7
|
+
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-DFscSS0y.js";
|
|
8
8
|
import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-B77WqVFw.js";
|
|
9
9
|
import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-lRhno09M.js";
|
|
10
10
|
import consola from "consola";
|
|
@@ -420,8 +420,13 @@ function pinnedSearchGuidance(semanticAvailable, capitalize = true, bluebirdEnab
|
|
|
420
420
|
* stays exactly the few sentences that carry the tuning.
|
|
421
421
|
*/
|
|
422
422
|
const EXPLORE_DESC_TAIL = "Use when the question spans more than a couple of files. Do not use for planning, edits, or single-file reads. Returns a structured evidence report with file:line citations. Never edits files.";
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
/** Appended to agent descriptions whose roles run at the 200K default window
|
|
424
|
+
* (cheap family + balanced): one line so every role prefers targeted reads. */
|
|
425
|
+
const DESC_200K_NOTE = " Operates at a 200K context window — prefer targeted reads (search, Grep, Read specific files) over full file scans.";
|
|
426
|
+
/** Prompt-side counterpart of `DESC_200K_NOTE`, placed before the tool steer. */
|
|
427
|
+
const PROMPT_200K_NOTE = "You operate at a 200K context window: use search, Grep, and targeted Read calls instead of reading entire files. ";
|
|
428
|
+
function pinnedExploreDescription(explicit, is200K = false) {
|
|
429
|
+
return (explicit ? "Read-only codebase exploration specialist. Use proactively, and launch several in parallel via `Task(subagent_type:\"Explore\")`, to map architecture, trace call chains, or locate the files and symbols a task will touch. " : "Read-only codebase exploration specialist for mapping architecture, tracing call chains, or locating the files and symbols a task touches. ") + EXPLORE_DESC_TAIL + (is200K ? DESC_200K_NOTE : "");
|
|
425
430
|
}
|
|
426
431
|
function pinnedExplorePrompt(opts) {
|
|
427
432
|
const searchGuidance = pinnedSearchGuidance(opts.semanticAvailable, !opts.explicit, opts.bluebirdEnabled === true);
|
|
@@ -434,15 +439,16 @@ Entry points: where control enters this area, as file:line.
|
|
|
434
439
|
Conventions in use: the patterns, idioms, error handling, and test style that any change here would be expected to follow, each with a file:line example.
|
|
435
440
|
Gaps and unknowns: what you could not confirm, and where you would look next.
|
|
436
441
|
|
|
437
|
-
` + readOnlyToolSteer(opts.semanticAvailable);
|
|
442
|
+
` + (opts.is200K ? PROMPT_200K_NOTE : "") + readOnlyToolSteer(opts.semanticAvailable);
|
|
438
443
|
}
|
|
439
444
|
const PLAN_DESC_HEAD = "Architecture and implementation planning specialist";
|
|
440
445
|
const PLAN_DESC_TAIL = " Returns a decision-complete, ordered implementation plan with runnable acceptance criteria. Never edits files.";
|
|
441
|
-
function pinnedPlanDescription(explicit) {
|
|
442
|
-
return PLAN_DESC_HEAD + (explicit ? ". Use proactively in plan mode, and whenever sequencing, cross-boundary interfaces, invariants, migration risk, or acceptance criteria deserve a dedicated pass before any code is written. Delegates repository discovery to `Explore` rather than reading broadly itself." : " for sequencing, cross-boundary interfaces, invariants, migration risk, and acceptance criteria before any code is written.") + PLAN_DESC_TAIL;
|
|
446
|
+
function pinnedPlanDescription(explicit, isBalanced = false, is200K = false) {
|
|
447
|
+
return PLAN_DESC_HEAD + (explicit ? isBalanced ? ". Use proactively ONLY when sequencing, cross-boundary interfaces, invariants, migration risk, or acceptance criteria are genuinely complex and deserve a dedicated pass before any code is written. The lead owns planning by default. Delegates repository discovery to `Explore` rather than reading broadly itself." : ". Use proactively in plan mode, and whenever sequencing, cross-boundary interfaces, invariants, migration risk, or acceptance criteria deserve a dedicated pass before any code is written. Delegates repository discovery to `Explore` rather than reading broadly itself." : " for sequencing, cross-boundary interfaces, invariants, migration risk, and acceptance criteria before any code is written.") + PLAN_DESC_TAIL + (is200K ? DESC_200K_NOTE : "");
|
|
443
448
|
}
|
|
444
449
|
function pinnedPlanPrompt(opts) {
|
|
445
|
-
|
|
450
|
+
const oracleRef = opts.oracleTool ? `\`${opts.oracleTool}\`` : "Oracle";
|
|
451
|
+
return `You are a software architect and planning specialist. Your mission is to turn a request into a decision-complete implementation plan: an ordered sequence of changes, the invariants that must hold throughout, and acceptance criteria a reviewer can actually run. This is read-only work. Do not modify repository files. Produce the architecture, sequencing, and acceptance criteria for the lead to synthesize and execute. Plan is an advisory planning capability, not an approval gate. Separate discoverable facts from genuine choices. ${opts.explicit ? "Do not sweep the repository yourself: delegate discovery to `Explore`, launching one or more `Explore` subagents in parallel with scoped evidence questions, then read directly only the files needed to resolve trade-offs and write executable steps. " : "Do not sweep the repository broadly yourself: keep discovery narrow, read directly only the files needed to resolve trade-offs and write executable steps, and record any repository fact you could not confirm as an explicit gap. "}Escalate only genuine product or architectural trade-offs, and escalate them as explicit options with consequences and a recommendation, never as an open question. For low-risk details, choose the reading most consistent with the codebase, proceed, and record it as an assumption. When a design trade-off has more than one viable answer and repository evidence cannot settle it, consult ${oracleRef} with one self-contained brief that states the constraints, the candidate designs, and the evidence you already gathered plus one precise question. If Oracle does not settle it, carry the options and the remaining gap into the plan rather than silently picking one. Delegation: you may invoke Explore and \`reviewer\` for discovery and verification; do not invoke any other subagent. Behavior and code verification belongs to post-implementation review. Write the plan for its consumer — a General-Purpose execution agent or the lead implementing directly — who cannot see your reasoning. Every step must be executable without rediscovering what you already found: name the files, name the interfaces, and state the condition that means the step is done. Prefer the smallest design that satisfies the requirement and fits the conventions already in the codebase. Mark steps that are independent of each other and can run concurrently.
|
|
446
452
|
|
|
447
453
|
Return format:
|
|
448
454
|
Objective: what will be true when this is complete.
|
|
@@ -453,21 +459,21 @@ Acceptance criteria: the exact commands to run and the observable result that co
|
|
|
453
459
|
Critical files: the files an executor must read before starting, as file:line, with why each matters.
|
|
454
460
|
Open questions: any unresolved trade-off, as options with a recommendation. Omit this section if there are none.
|
|
455
461
|
|
|
456
|
-
` + readOnlyToolSteer(opts.semanticAvailable);
|
|
462
|
+
` + (opts.is200K ? PROMPT_200K_NOTE : "") + readOnlyToolSteer(opts.semanticAvailable);
|
|
457
463
|
}
|
|
458
464
|
const GENERAL_PURPOSE_DESC_TAIL = "Drives to a verified end state with changed files and evidence. Do not use for pure discovery (use Explore) or verification-only (use reviewer).";
|
|
459
|
-
function pinnedGeneralPurposeDescription(explicit) {
|
|
460
|
-
return (explicit ? "Autonomous multi-step execution agent. Use proactively for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. Follows a Plan handoff when one exists and otherwise investigates before acting. " : "Autonomous multi-step execution agent for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. ") + GENERAL_PURPOSE_DESC_TAIL;
|
|
465
|
+
function pinnedGeneralPurposeDescription(explicit, isBalanced = false, is200K = false) {
|
|
466
|
+
return (explicit ? isBalanced ? "Autonomous multi-step execution agent. Use proactively and FREELY for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. Follows a Plan handoff when one exists and otherwise investigates before acting. " : "Autonomous multi-step execution agent. Use proactively for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. Follows a Plan handoff when one exists and otherwise investigates before acting. " : "Autonomous multi-step execution agent for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. ") + GENERAL_PURPOSE_DESC_TAIL + (is200K ? DESC_200K_NOTE : "");
|
|
461
467
|
}
|
|
462
|
-
function pinnedGeneralPurposePrompt() {
|
|
463
|
-
return "You are an autonomous execution specialist for mixed, multi-step work. Your mission is to take an open-ended task from investigation through implementation to a verified end state within this turn. Keep going until the task is genuinely done. Do not stop at a diagnosis, a partial fix, or a plan when the request asked for a change. Ground discovery in repository truth. For low-risk ambiguities, choose the interpretation most consistent with the repository, proceed, and record it as an assumption in your report. For material intent gaps that would alter product behavior or security, surface concrete options and a recommendation to the lead. When a Plan handoff exists, follow its ordered steps and acceptance criteria; do not rediscover what the plan already settled — read the critical files it names, execute each step's done condition, and report any step whose premise proves wrong instead of silently replanning. Investigate before you act. Confirm your assumptions against the actual code rather than against the request's description of it. After every command, read the real output and let it decide the next step. When something fails, diagnose the specific cause before trying again. If repeated attempts fail for the same reason and no new information has emerged, stop retrying: re-examine the underlying assumption and take a different path. Escalate rather than expand. If the task turns out to require a change the lead did not sanction, complete the sanctioned part and report the rest as a recommendation. If the task collapses to pure discovery or a single settled edit, do that slice and report the remainder as a recommendation. Do not expand scope. Match the conventions, structure, and test style already present in the files you touch. The lead owns final integration. Verify before you report. Run the builds, linters, or test commands relevant to what you changed. Quote the command run, exit status, and concise decisive output verbatim; if output is long, summarize the middle and quote the pass/fail lines. Report your changes and test output directly to the caller. Post-integration review is owned by the lead. Return a self-contained result the lead can act on immediately.\n\nReturn format:\nOutcome: what is now true, and whether the task is complete.\nActions taken: what you did, in order.\nChanged files: each as file:line, with a one-line description of the change.\nVerification: the commands you ran, exit status, and decisive output.\nAssumptions: every interpretation you had to choose.\nRemaining items: anything deliberately not done, and why.\n\n" + fileToolSteer("builds");
|
|
468
|
+
function pinnedGeneralPurposePrompt(opts) {
|
|
469
|
+
return "You are an autonomous execution specialist for mixed, multi-step work. Your mission is to take an open-ended task from investigation through implementation to a verified end state within this turn. Keep going until the task is genuinely done. Do not stop at a diagnosis, a partial fix, or a plan when the request asked for a change. Ground discovery in repository truth. For low-risk ambiguities, choose the interpretation most consistent with the repository, proceed, and record it as an assumption in your report. For material intent gaps that would alter product behavior or security, surface concrete options and a recommendation to the lead. When a Plan handoff exists, follow its ordered steps and acceptance criteria; do not rediscover what the plan already settled — read the critical files it names, execute each step's done condition, and report any step whose premise proves wrong instead of silently replanning. Investigate before you act. Confirm your assumptions against the actual code rather than against the request's description of it. After every command, read the real output and let it decide the next step. When something fails, diagnose the specific cause before trying again. If repeated attempts fail for the same reason and no new information has emerged, stop retrying: re-examine the underlying assumption and take a different path. Escalate rather than expand. If the task turns out to require a change the lead did not sanction, complete the sanctioned part and report the rest as a recommendation. If the task collapses to pure discovery or a single settled edit, do that slice and report the remainder as a recommendation. Do not expand scope. Match the conventions, structure, and test style already present in the files you touch. The lead owns final integration. Verify before you report. Run the builds, linters, or test commands relevant to what you changed. Quote the command run, exit status, and concise decisive output verbatim; if output is long, summarize the middle and quote the pass/fail lines. Report your changes and test output directly to the caller. Post-integration review is owned by the lead. Return a self-contained result the lead can act on immediately.\n\nReturn format:\nOutcome: what is now true, and whether the task is complete.\nActions taken: what you did, in order.\nChanged files: each as file:line, with a one-line description of the change.\nVerification: the commands you ran, exit status, and decisive output.\nAssumptions: every interpretation you had to choose.\nRemaining items: anything deliberately not done, and why.\n\n" + (opts?.is200K ? PROMPT_200K_NOTE : "") + fileToolSteer("builds");
|
|
464
470
|
}
|
|
465
471
|
const REVIEWER_DESC_TAIL = "Runs builds/tests itself rather than assuming them. Returns SHIP / FIX / BLOCK with reproducible evidence. Never edits source.";
|
|
466
|
-
function pinnedReviewerDescription(explicit) {
|
|
467
|
-
return (explicit ? "Adversarial evidence-based reviewer. Use proactively post-integration after behavior-changing, cross-boundary, or risk-sensitive changes, before done. " : "Adversarial evidence-based reviewer for behavior-changing, cross-boundary, or risk-sensitive changes. ") + REVIEWER_DESC_TAIL;
|
|
472
|
+
function pinnedReviewerDescription(explicit, isBalanced = false, is200K = false) {
|
|
473
|
+
return (explicit ? isBalanced ? "Adversarial evidence-based reviewer. Use proactively ONLY when the change is genuinely behavior-changing, cross-boundary, or risk-sensitive, before done. The lead owns verification by default. " : "Adversarial evidence-based reviewer. Use proactively post-integration after behavior-changing, cross-boundary, or risk-sensitive changes, before done. " : "Adversarial evidence-based reviewer for behavior-changing, cross-boundary, or risk-sensitive changes. ") + REVIEWER_DESC_TAIL + (is200K ? DESC_200K_NOTE : "");
|
|
468
474
|
}
|
|
469
|
-
function pinnedReviewerPrompt(semanticAvailable = true) {
|
|
470
|
-
return "You are an adversarial code reviewer. Your job is not to confirm that the change works. Your job is to find the conditions under which it does not. Think carefully about the plausible failure modes of this change before you start running commands, so that what you run is chosen to expose them. Read before you judge. Inspect the changed files and relevant surrounding context, callers of affected call sites, and tests that claim to cover the change, sized to the identified risks of the change. Then verify by execution. Run the builds, linters, or test suites relevant to what changed, and any command that would surface the specific failure you suspect. Verification means output you observed. Never state that something passes, compiles, or is covered unless you ran it and read the result; where you could not run something, say so explicitly rather than inferring the outcome. Probe deliberately: boundary and empty inputs, error and early-return paths, concurrency and ordering, resource acquisition and cleanup on the failure path, partial failure and retry, backward compatibility of any changed interface, handling of untrusted input, and whether the new tests would actually fail if the change were reverted. Judge against the bar the repository already holds itself to, not an abstract ideal. Do not soften a real finding, and do not manufacture findings to appear thorough. If the change is correct and verified, say so. Do not modify source code and do not delegate to other agents. You may run build, test, and read-only inspection commands; do not run commands that alter tracked source files or touch remote infrastructure (transient build cache or test runner side effects are expected). Return a self-contained result the lead can act on immediately.\n\nReturn format. Line one must be exactly one of:\nVERDICT: SHIP\nVERDICT: FIX\nVERDICT: BLOCK\n\nSHIP means you found no blocking defect and your verification ran clean. FIX means the approach is sound but specific defects must be corrected. BLOCK means the approach itself is wrong, or verification could not be run at all.\n\nThen, using the repository's severity taxonomy:\nCritical: blocking defects (correctness, security, data loss). Each with file:line, the concrete scenario in which it fails, and how you confirmed it.\nImportant: non-blocking issues that should be fixed before shipping. Each with file:line and impact.\nSuggestion: non-blocking improvements or stylistic suggestions.\nEvidence: the commands you ran, exit status, and decisive output.\nUnverified surface: what you could not exercise, and why.\n\n" + reviewerToolSteer(semanticAvailable);
|
|
475
|
+
function pinnedReviewerPrompt(semanticAvailable = true, opts) {
|
|
476
|
+
return "You are an adversarial code reviewer. Your job is not to confirm that the change works. Your job is to find the conditions under which it does not. Think carefully about the plausible failure modes of this change before you start running commands, so that what you run is chosen to expose them. Read before you judge. Inspect the changed files and relevant surrounding context, callers of affected call sites, and tests that claim to cover the change, sized to the identified risks of the change. Then verify by execution. Run the builds, linters, or test suites relevant to what changed, and any command that would surface the specific failure you suspect. Verification means output you observed. Never state that something passes, compiles, or is covered unless you ran it and read the result; where you could not run something, say so explicitly rather than inferring the outcome. Probe deliberately: boundary and empty inputs, error and early-return paths, concurrency and ordering, resource acquisition and cleanup on the failure path, partial failure and retry, backward compatibility of any changed interface, handling of untrusted input, and whether the new tests would actually fail if the change were reverted. Judge against the bar the repository already holds itself to, not an abstract ideal. Do not soften a real finding, and do not manufacture findings to appear thorough. If the change is correct and verified, say so. " + (opts?.allowExploreDelegation === true ? "Do not modify source code. Scope first with search, then delegate: use code search (lexical, then semantic when available) and web search to narrow scope and rule out hypotheses before delegating — cheapest, always first. When search is insufficient, delegate targeted discovery to `Explore`: launch one or more `Explore` subagents in parallel with scoped evidence questions (call chains, config patterns, test conventions, boundary conditions) and let them return file:line conclusions; do not sweep the repository yourself. You may invoke only `Explore`; do not invoke any other subagent. You may run build, test, and read-only inspection commands; do not run commands that alter tracked source files or touch remote infrastructure (transient build cache or test runner side effects are expected). " : "Do not modify source code and do not delegate to other agents. You may run build, test, and read-only inspection commands; do not run commands that alter tracked source files or touch remote infrastructure (transient build cache or test runner side effects are expected). ") + "Return a self-contained result the lead can act on immediately.\n\nReturn format. Line one must be exactly one of:\nVERDICT: SHIP\nVERDICT: FIX\nVERDICT: BLOCK\n\nSHIP means you found no blocking defect and your verification ran clean. FIX means the approach is sound but specific defects must be corrected. BLOCK means the approach itself is wrong, or verification could not be run at all.\n\nThen, using the repository's severity taxonomy:\nCritical: blocking defects (correctness, security, data loss). Each with file:line, the concrete scenario in which it fails, and how you confirmed it.\nImportant: non-blocking issues that should be fixed before shipping. Each with file:line and impact.\nSuggestion: non-blocking improvements or stylistic suggestions.\nEvidence: the commands you ran, exit status, and decisive output.\nUnverified surface: what you could not exercise, and why.\n\n" + (opts?.is200K ? PROMPT_200K_NOTE : "") + reviewerToolSteer(semanticAvailable);
|
|
471
477
|
}
|
|
472
478
|
/** Build the literal `-m fast` native roster. This is intentionally separate
|
|
473
479
|
* from the standard definitions: the names overlap, but their role bodies,
|
|
@@ -516,7 +522,8 @@ function buildFastProfileAgentDefinitions(opts) {
|
|
|
516
522
|
description: pinnedPlanDescription(true),
|
|
517
523
|
prompt: pinnedPlanPrompt({
|
|
518
524
|
explicit: true,
|
|
519
|
-
semanticAvailable
|
|
525
|
+
semanticAvailable,
|
|
526
|
+
oracleTool
|
|
520
527
|
}),
|
|
521
528
|
tools: planTools,
|
|
522
529
|
model: oneM(planModel),
|
|
@@ -595,10 +602,11 @@ function buildCheapProfileAgentDefinitions(opts) {
|
|
|
595
602
|
const effort = (name) => CHEAP_PROFILE_NATIVE_EFFORTS[name];
|
|
596
603
|
const out = {
|
|
597
604
|
Explore: {
|
|
598
|
-
description: pinnedExploreDescription(true),
|
|
605
|
+
description: pinnedExploreDescription(true, true),
|
|
599
606
|
prompt: pinnedExplorePrompt({
|
|
600
607
|
explicit: true,
|
|
601
608
|
semanticAvailable,
|
|
609
|
+
is200K: true,
|
|
602
610
|
bluebirdEnabled: opts.bluebirdEnabled
|
|
603
611
|
}),
|
|
604
612
|
tools: readSearchTools,
|
|
@@ -607,10 +615,12 @@ function buildCheapProfileAgentDefinitions(opts) {
|
|
|
607
615
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
608
616
|
},
|
|
609
617
|
Plan: {
|
|
610
|
-
description: pinnedPlanDescription(true),
|
|
618
|
+
description: pinnedPlanDescription(true, false, true),
|
|
611
619
|
prompt: pinnedPlanPrompt({
|
|
612
620
|
explicit: true,
|
|
613
|
-
semanticAvailable
|
|
621
|
+
semanticAvailable,
|
|
622
|
+
oracleTool,
|
|
623
|
+
is200K: true
|
|
614
624
|
}),
|
|
615
625
|
tools: planTools,
|
|
616
626
|
model: planModel,
|
|
@@ -621,15 +631,15 @@ function buildCheapProfileAgentDefinitions(opts) {
|
|
|
621
631
|
}
|
|
622
632
|
},
|
|
623
633
|
"General-Purpose": {
|
|
624
|
-
description: pinnedGeneralPurposeDescription(true),
|
|
625
|
-
prompt: pinnedGeneralPurposePrompt(),
|
|
634
|
+
description: pinnedGeneralPurposeDescription(true, false, true),
|
|
635
|
+
prompt: pinnedGeneralPurposePrompt({ is200K: true }),
|
|
626
636
|
model: generalModel,
|
|
627
637
|
effort: effort("General-Purpose"),
|
|
628
638
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
629
639
|
},
|
|
630
640
|
reviewer: {
|
|
631
|
-
description: pinnedReviewerDescription(true),
|
|
632
|
-
prompt: pinnedReviewerPrompt(semanticAvailable),
|
|
641
|
+
description: pinnedReviewerDescription(true, false, true),
|
|
642
|
+
prompt: pinnedReviewerPrompt(semanticAvailable, { is200K: true }),
|
|
633
643
|
model: reviewerModel,
|
|
634
644
|
effort: effort("reviewer"),
|
|
635
645
|
tools: readSearchTools,
|
|
@@ -689,10 +699,11 @@ function buildCheapestProfileAgentDefinitions(opts) {
|
|
|
689
699
|
const effort = (name) => CHEAPEST_PROFILE_NATIVE_EFFORTS[name];
|
|
690
700
|
const out = {
|
|
691
701
|
Explore: {
|
|
692
|
-
description: pinnedExploreDescription(false),
|
|
702
|
+
description: pinnedExploreDescription(false, true),
|
|
693
703
|
prompt: pinnedExplorePrompt({
|
|
694
704
|
explicit: false,
|
|
695
705
|
semanticAvailable,
|
|
706
|
+
is200K: true,
|
|
696
707
|
bluebirdEnabled: opts.bluebirdEnabled
|
|
697
708
|
}),
|
|
698
709
|
tools: readSearchTools,
|
|
@@ -701,10 +712,12 @@ function buildCheapestProfileAgentDefinitions(opts) {
|
|
|
701
712
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
702
713
|
},
|
|
703
714
|
Plan: {
|
|
704
|
-
description: pinnedPlanDescription(false),
|
|
715
|
+
description: pinnedPlanDescription(false, false, true),
|
|
705
716
|
prompt: pinnedPlanPrompt({
|
|
706
717
|
explicit: false,
|
|
707
|
-
semanticAvailable
|
|
718
|
+
semanticAvailable,
|
|
719
|
+
oracleTool,
|
|
720
|
+
is200K: true
|
|
708
721
|
}),
|
|
709
722
|
tools: planTools,
|
|
710
723
|
model: planModel,
|
|
@@ -715,15 +728,15 @@ function buildCheapestProfileAgentDefinitions(opts) {
|
|
|
715
728
|
}
|
|
716
729
|
},
|
|
717
730
|
"General-Purpose": {
|
|
718
|
-
description: pinnedGeneralPurposeDescription(false),
|
|
719
|
-
prompt: pinnedGeneralPurposePrompt(),
|
|
731
|
+
description: pinnedGeneralPurposeDescription(false, false, true),
|
|
732
|
+
prompt: pinnedGeneralPurposePrompt({ is200K: true }),
|
|
720
733
|
model: generalModel,
|
|
721
734
|
effort: effort("General-Purpose"),
|
|
722
735
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
723
736
|
},
|
|
724
737
|
reviewer: {
|
|
725
|
-
description: pinnedReviewerDescription(false),
|
|
726
|
-
prompt: pinnedReviewerPrompt(semanticAvailable),
|
|
738
|
+
description: pinnedReviewerDescription(false, false, true),
|
|
739
|
+
prompt: pinnedReviewerPrompt(semanticAvailable, { is200K: true }),
|
|
727
740
|
model: reviewerModel,
|
|
728
741
|
effort: effort("reviewer"),
|
|
729
742
|
tools: readSearchTools,
|
|
@@ -751,9 +764,14 @@ function buildCheapestProfileAgentDefinitions(opts) {
|
|
|
751
764
|
* alias (`gh-router-balanced-*`, no `[1m]`) rather than a real catalog id,
|
|
752
765
|
* for the same client catalog-resolution reason as the cheap builder above.
|
|
753
766
|
* Caller-supplied `opts.balanced*Model` values are deliberately ignored.
|
|
754
|
-
* Explicit delegation tuning
|
|
755
|
-
*
|
|
756
|
-
*
|
|
767
|
+
* Explicit delegation tuning is search-first and lead-owns-by-default
|
|
768
|
+
* (unlike cheap): `code_search` + `web` search narrow scope before any
|
|
769
|
+
* `Explore` fan-out; `Plan` ONLY when genuinely complex (lead owns planning)
|
|
770
|
+
* with an explicitly named Oracle tool; `General-Purpose` mixed execution
|
|
771
|
+
* delegates FREELY; `reviewer` ONLY when genuinely behavior-changing (lead
|
|
772
|
+
* owns verification) where the reviewer
|
|
773
|
+
* narrows scope with search and may invoke `Explore` for targeted
|
|
774
|
+
* discovery. */
|
|
757
775
|
function buildBalancedProfileAgentDefinitions(opts) {
|
|
758
776
|
const exploreModel = BALANCED_EXPLORE_ALIAS_ID;
|
|
759
777
|
const planModel = BALANCED_PLAN_ALIAS_ID;
|
|
@@ -782,10 +800,11 @@ function buildBalancedProfileAgentDefinitions(opts) {
|
|
|
782
800
|
const effort = (name) => BALANCED_PROFILE_NATIVE_EFFORTS[name];
|
|
783
801
|
const out = {
|
|
784
802
|
Explore: {
|
|
785
|
-
description: pinnedExploreDescription(true),
|
|
803
|
+
description: pinnedExploreDescription(true, true),
|
|
786
804
|
prompt: pinnedExplorePrompt({
|
|
787
805
|
explicit: true,
|
|
788
806
|
semanticAvailable,
|
|
807
|
+
is200K: true,
|
|
789
808
|
bluebirdEnabled: opts.bluebirdEnabled
|
|
790
809
|
}),
|
|
791
810
|
tools: readSearchTools,
|
|
@@ -794,10 +813,12 @@ function buildBalancedProfileAgentDefinitions(opts) {
|
|
|
794
813
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
795
814
|
},
|
|
796
815
|
Plan: {
|
|
797
|
-
description: pinnedPlanDescription(true),
|
|
816
|
+
description: pinnedPlanDescription(true, true, true),
|
|
798
817
|
prompt: pinnedPlanPrompt({
|
|
799
818
|
explicit: true,
|
|
800
|
-
semanticAvailable
|
|
819
|
+
semanticAvailable,
|
|
820
|
+
oracleTool,
|
|
821
|
+
is200K: true
|
|
801
822
|
}),
|
|
802
823
|
tools: planTools,
|
|
803
824
|
model: planModel,
|
|
@@ -808,18 +829,21 @@ function buildBalancedProfileAgentDefinitions(opts) {
|
|
|
808
829
|
}
|
|
809
830
|
},
|
|
810
831
|
"General-Purpose": {
|
|
811
|
-
description: pinnedGeneralPurposeDescription(true),
|
|
812
|
-
prompt: pinnedGeneralPurposePrompt(),
|
|
832
|
+
description: pinnedGeneralPurposeDescription(true, true, true),
|
|
833
|
+
prompt: pinnedGeneralPurposePrompt({ is200K: true }),
|
|
813
834
|
model: generalModel,
|
|
814
835
|
effort: effort("General-Purpose"),
|
|
815
836
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
816
837
|
},
|
|
817
838
|
reviewer: {
|
|
818
|
-
description: pinnedReviewerDescription(true),
|
|
819
|
-
prompt: pinnedReviewerPrompt(semanticAvailable
|
|
839
|
+
description: pinnedReviewerDescription(true, true, true),
|
|
840
|
+
prompt: pinnedReviewerPrompt(semanticAvailable, {
|
|
841
|
+
allowExploreDelegation: true,
|
|
842
|
+
is200K: true
|
|
843
|
+
}),
|
|
820
844
|
model: reviewerModel,
|
|
821
845
|
effort: effort("reviewer"),
|
|
822
|
-
tools: readSearchTools,
|
|
846
|
+
tools: [...readSearchTools, "Agent"],
|
|
823
847
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
824
848
|
}
|
|
825
849
|
};
|
|
@@ -3218,13 +3242,22 @@ function buildNativeReachClauses(opts) {
|
|
|
3218
3242
|
"`Plan` for architectural sequencing, interface contracts, migration risk, and runnable acceptance criteria",
|
|
3219
3243
|
"`General-Purpose` for mixed, iterative, or multi-step execution tasks",
|
|
3220
3244
|
"`reviewer` for independent adversarial verification, reproduction, and root-causing"
|
|
3221
|
-
]);
|
|
3222
|
-
return joinClauses([
|
|
3245
|
+
]) + ". All roles run at a 200K context window — prefer targeted reads (search, Grep, Read specific files) over full file reads";
|
|
3246
|
+
if (opts.profile === "balanced") return joinClauses([
|
|
3247
|
+
"`Explore` for broad repository discovery, dependency mapping, and convention tracking (launch in parallel)",
|
|
3248
|
+
"`Plan` for architectural sequencing, interface contracts, migration risk, and runnable acceptance criteria ONLY when genuinely complex (lead owns planning by default)",
|
|
3249
|
+
"`General-Purpose` for mixed, iterative, or multi-step execution tasks (delegate freely)",
|
|
3250
|
+
"`reviewer` for independent adversarial verification, reproduction, and root-causing ONLY when genuinely behavior-changing (lead owns verification by default)"
|
|
3251
|
+
]) + ". All roles run at a 200K context window — prefer targeted reads (search, Grep, Read specific files) over full file reads";
|
|
3252
|
+
const shared = joinClauses([
|
|
3223
3253
|
"`Explore` for broad repository discovery, dependency mapping, and convention tracking (launch in parallel)",
|
|
3224
3254
|
"`Plan` for architectural sequencing, interface contracts, migration risk, and runnable acceptance criteria (delegates discovery to `Explore`)",
|
|
3225
3255
|
"`General-Purpose` for mixed, iterative, or multi-step execution tasks (follows a Plan handoff when one exists)",
|
|
3226
3256
|
"`reviewer` for independent adversarial verification, reproduction, and root-causing after non-trivial changes"
|
|
3227
3257
|
]);
|
|
3258
|
+
if (opts.profile === "cheap") return `${shared}. All roles run at a 200K context window — prefer targeted reads (search, Grep, Read specific files) over full file reads`;
|
|
3259
|
+
if (opts.profile === "cheap1m") return `${shared}. Subagents run at a 200K context window — brief them with targeted evidence and prefer targeted reads over full file reads`;
|
|
3260
|
+
return shared;
|
|
3228
3261
|
}
|
|
3229
3262
|
const clauses = [];
|
|
3230
3263
|
const implementerFast = opts.implementerFastAvailable !== false;
|
|
@@ -3279,9 +3312,13 @@ ${profileLabel} profile runtime wiring is unavailable. Work directly, use only t
|
|
|
3279
3312
|
const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated autonomous browsing tasks through \`mcp__${workersKey}__browse\`.` : "";
|
|
3280
3313
|
const artifactClause = opts.artifactAvailable ? ` \`mcp__${peersKey}__artifact_*\` provides human review in the artifact panel with auto-open on plan completion.` : "";
|
|
3281
3314
|
const astraClause = opts.astraAvailable && (opts.profile === "fast" || opts.profile === "cheap1m") ? ` \`mcp__${peersKey}__astra\` (GPT-6 Astra ${astraDescriptor}) is the terminal escalation consultant for the lead only, reserved strictly for the hardest dead ends when direct evidence, Advisor, and Oracle have all failed to produce a defensible path (consulted at most 1-2 times per decision with concise context and specific questions).` : "";
|
|
3282
|
-
const pipeline = isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly. ` + buildNativeReachClauses(opts) + ". Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` may be used for discovery spanning more than a couple of files; `Plan` for sequencing with complex interfaces or acceptance criteria; `General-Purpose` for mixed multi-step execution; `reviewer` for behavior-changing or risk-sensitive changes. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n" : `${profileLabel} launch profile. The lead coordinates execution across specialized native roles: ` + buildNativeReachClauses(opts) +
|
|
3315
|
+
const pipeline = isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly. ` + buildNativeReachClauses(opts) + ". Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` may be used for discovery spanning more than a couple of files; `Plan` for sequencing with complex interfaces or acceptance criteria; `General-Purpose` for mixed multi-step execution; `reviewer` for behavior-changing or risk-sensitive changes. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n" : isBalanced ? `${profileLabel} launch profile. The lead coordinates execution across specialized native roles: ` + buildNativeReachClauses(opts) + `. Lead owns planning, implementation, and verification by default: in plan mode, produce the plan and acceptance criteria directly and do not edit files; delegate architectural planning to \`Plan\` ONLY when sequencing or cross-boundary interfaces are genuinely complex. Phase pipeline (budget gather, expensive plan, budget execution, expensive verification). GATHER: narrow scope first with \`code_search\` (lexical, then semantic when available) and \`web\` search to rule out hypotheses — cheapest, always first. Delegate to \`Explore\` only when search is insufficient: launch one or more \`Explore\` subagents in parallel with scoped evidence questions and let them return file:line citations; read directly only the small subset you must touch to decide or edit. \`Plan\` follows the same rule when it needs repository facts. PLAN: lead owns planning: sequence interfaces, invariants, and acceptance criteria directly. Delegate to \`Plan\` ONLY when sequencing or cross-boundary interfaces are genuinely complex and deserve a dedicated pass; \`Plan\` produces handoff-ready steps (ordered, file:line, done conditions, acceptance criteria) and may consult \`mcp__${peersKey}__oracle\` on unresolved trade-offs and reports any remaining gap to the lead. EXECUTE: lead implements directly by default. Delegate to \`General-Purpose\` FREELY for multi-step work combining investigation, tool workflows, and code changes; brief with outcome, constraints, files in scope, and verification. VERIFY: lead owns verification: run relevant build/tests, read the code, and reproduce before declaring done. Invoke \`reviewer\` ONLY when the change is genuinely behavior-changing, cross-boundary, or risk-sensitive; \`reviewer\` narrows scope with search first and may invoke \`Explore\` for targeted discovery. Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. \`Explore\` is cheap and may be launched in parallel across independent discovery questions. Send independent subagent calls in parallel within a single turn. Delegation graph: the lead may invoke all four; \`Plan\` may invoke \`Explore\` and \`reviewer\`; \`General-Purpose\` may invoke \`reviewer\`; \`reviewer\` may invoke \`Explore\` for targeted discovery; \`Explore\` and \`worker-browse\` cannot invoke native subagents.
|
|
3316
|
+
|
|
3317
|
+
` : `${profileLabel} launch profile. The lead coordinates execution across specialized native roles: ` + buildNativeReachClauses(opts) + ". In plan mode or when designing changes with complex sequencing, interface contracts, or acceptance criteria, delegate architectural planning to `Plan` (in plan mode, produce the plan and acceptance criteria; do not edit files). Phase pipeline (budget gather, expensive plan, budget execution, expensive verification). GATHER: delegate to `Explore` instead of exploring yourself. For any question spanning more than a couple of files, launch one or more `Explore` subagents in parallel with scoped evidence questions and let them return file:line citations; read directly only the small subset you must touch to decide or edit. `Plan` follows the same rule when it needs repository facts. PLAN: `Plan` produces handoff-ready steps (ordered, file:line, done conditions, acceptance criteria) for a `General-Purpose` executor that cannot see its reasoning; `Plan` may consult Oracle on unresolved trade-offs and reports any remaining gap to the lead. EXECUTE: delegate mixed multi-step work and Plan handoffs to `General-Purpose` in a fresh context to preserve lead context; brief with outcome, constraints, files in scope, and verification. VERIFY: after behavior-changing, cross-boundary, or risk-sensitive implementation, run relevant build/tests then invoke `reviewer` before declaring done. Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` is cheap and may be launched in parallel across independent discovery questions. Send independent subagent calls in parallel within a single turn. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n";
|
|
3318
|
+
const windowNote = isCheapest || isBalanced ? "All roles run at a 200K context window — use targeted reads (search, Grep, Read specific files) over full file reads.\n\n" : isCheap ? "The lead runs at a 200K context window on `-m cheap` (1M on `-m cheap1m`) and every subagent runs at 200K — use targeted reads (search, Grep, Read specific files) over full file reads.\n\n" : "";
|
|
3283
3319
|
const swePipelineClause = opts.sweEnabled === false ? "" : `${PIPELINE_SKILLS_AWARENESS}\n\n`;
|
|
3284
|
-
|
|
3320
|
+
const consultation = isBalanced ? `Consultation guidance: funnel unknowns cheapest-first. (1) \`code_search\` and \`web\` search narrow scope and rule out hypotheses — always first. (2) \`Explore\` subagents for targeted breadth only when search is insufficient. (3) \`Plan\` ONLY when sequencing or cross-boundary interfaces are genuinely complex. \`mcp__${peersKey}__oracle\` is ${oracleDescriptor}, a second opinion for precise, self-contained architectural/spec trade-offs that search and \`Explore\` (and \`Plan\`, where consulted) cannot settle; available to the lead and \`Plan\`; \`reviewer\` and other subagents cannot call Oracle. \`Plan\` may consult Oracle on unresolved trade-offs, and reports any remaining tie-breaking gap to the lead. Optimize for accuracy, intelligence, and correctness at the lowest cost — prefer direct evidence over delegation when the question is narrow. ` : `Consultation guidance: Follow an evidence-first escalation ladder. Direct empirical evidence (search, code, tests, builds) settles factual questions first. Advisor is an optional, non-binding, lead-only transcript-aware sounding board for trajectory guidance or framing checks (direction, not dictation), and never use it for routine progress, waiting, directly verifiable facts, or completion ritual. \`mcp__${peersKey}__oracle\` is ${oracleDescriptor}, an expert consultant available to the lead and \`Plan\`, preferred over advisor for difficult conceptual, algorithmic, spec/protocol, or architectural tradeoffs evaluated in a self-contained brief; \`reviewer\` and other subagents cannot call Oracle. \`Plan\` may consult Oracle on unresolved trade-offs, and reports any remaining tie-breaking gap to the lead.${astraClause} `;
|
|
3321
|
+
return "## Operating defaults (these layer with the user's explicit direction and the domain's own standards as addons, not replacements: follow all three together; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\n" + pipeline + windowNote + consultation + searchGuidance + `\`mcp__${searchKey}__web\` provides citable sources.${browserClause}${workerBrowseClause}${artifactClause}\n\n` + swePipelineClause + "Verify claims with concrete repository evidence and tests before declaring work done. User instructions outrank delegation triggers. Stop named teammates when finished.";
|
|
3285
3322
|
}
|
|
3286
3323
|
return "## Operating defaults (these layer with the user's explicit direction and the domain's own standards as addons, not replacements: follow all three together; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\nOrchestrate. Delegate research, implementation, review, and large reads to the right subagent, worker, or model. Reach for " + buildNativeReachClauses(opts) + "; worker-* agents for background non-blocking runs; Task subagents for parallel work; peer critics for review. That keeps your own context free to reason and collaborate with the user. Launch independent agents concurrently in a single message rather than serially. Delegation pays when the work is WIDE (many files or sources to sweep) or SLOW, and you need only the conclusion: the main thread is where you think with and respond to the user, and its context window is a finite shared resource. It does NOT pay merely because a sub-question is separable. A narrow, deep question whose whole value is file:line fidelity loses exactly that through a summarization layer, and a sub-question you could answer in one command is cheaper done directly than paying a subagent's startup. Do trivial, surgical, and last-mile work yourself. A named teammate persists after it reports so you can send it follow-ups, and nothing reaps it for you: its idle notice means available, not finished. Stop it once you are done with it.\n\nAdversarial review. The peer critics (`codex_critic` and `codex_reviewer`, `gemini_critic` and `gemini_reviewer`, `opus_critic`, and the `peer-review-coordinator` that fans out to several of them) are fresh-context models, so what they add is a blind spot that whoever produced the work cannot reach by thinking harder about it; prefer a critic from a different lab than the producer, since blind spots correlate within a lab. The `advisor` is a complement and not a substitute: it sees your transcript, so it catches your own drift and momentum, but it inherits your framing, which is exactly what a fresh-context critic does not. They earn their keep on consequential design choices, recommendations, and hard-to-reverse decisions: the cases where plausible alternatives remain and the conclusion rests on judgment rather than on something you can verify directly. That is where confabulation hides, so budget the wait even under delivery pressure. Always consult one when the change touches auth, user input, database queries, crypto, or serialization. They do NOT pay for read-only tracing, ordinary repository lookup, or a conclusion that a focused test, a direct reproduction, or unambiguous code evidence already settles. Asking a critic to re-derive a proven fact returns a confident answer either way, which is ritual skepticism rather than review, and skipping them there is the right call and not a shortcut. Match the lens to the artifact: a strategic critic for plans and trade-offs, a code reviewer for a concrete diff, the coordinator only when the risk warrants several independent lenses. Give whichever you pick the artifact and the constraints and not your rationale, since justification anchors the review and dulls it.\n\nAim high. Default to radical simplicity and a relentless focus on the user's real experience: design for the person and the job to be done, not the demo. Reason about the whole system from first principles, anticipating scale and the long arc rather than patching the surface. Work backwards from the outcome the user actually needs. Question every assumption and prefer what you can derive, reproduce, or test.\n\nEngineering excellence. When making technical decisions, give little weight to development cost; prefer quality, simplicity, robustness, scalability, and long-term maintainability. Fix a bug by first reproducing it end to end, as close to how a real user hits it as you can, so you solve the real problem and not a symptom. When testing a product end to end, be picky about the UI and obsessed with pixel perfection: if something clearly looks off, even when it is unrelated to your task, get it fixed along the way. Hold that same bar for the codebase itself: a lint error, a failing test, or a flaky test is worth fixing the moment you see it, whoever introduced it. Fold it into your current work rather than letting it derail the task the user actually asked for.";
|
|
3287
3324
|
}
|
|
@@ -3302,7 +3339,10 @@ function buildOperatingDefaultsDigest(opts = {}) {
|
|
|
3302
3339
|
const oracleDescriptor = isCheapest ? "(GPT-5.6 Sol 200K/high, lead and Plan)" : isCheap || isBalanced ? "(Grok 4.6 200K/medium, lead and Plan)" : "(Opus 5 1M/high, lead and Plan)";
|
|
3303
3340
|
const advisorDescriptor = isCheapest ? "(Gemini/high, lead-only)" : "(Sol/high, lead-only)";
|
|
3304
3341
|
const astraStep = opts.astraAvailable && (opts.profile === "fast" || opts.profile === "cheap1m") ? `; (4) \`astra\` (GPT-6 Astra 200K/${isCheap ? "medium" : "high"}, lead-only) only as a last resort when direct evidence, Advisor, and Oracle cannot produce a defensible path (at most 1-2 calls per decision).` : ".";
|
|
3305
|
-
|
|
3342
|
+
const delegation = isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly: use \`Explore\` for discovery spanning more than a couple of files, \`Plan\` in plan mode or for complex sequencing, \`General-Purpose\` for mixed multi-step execution, and \`reviewer\` for behavior-changing or risk-sensitive changes. Handle trivial and surgical edits directly. Stop named teammates when finished.\n\n` : isBalanced ? `${profileLabel} launch profile. The lead owns planning, implementation, and verification by default: narrow scope first with \`code_search\` and \`web\` search to rule out hypotheses (cheapest, always first); delegate to \`Explore\` in parallel only when search is insufficient (read directly only files you will act on); delegate to \`Plan\` ONLY when sequencing or cross-boundary interfaces are genuinely complex; delegate to \`General-Purpose\` FREELY for multi-step work combining investigation, tool workflows, and code changes; invoke \`reviewer\` ONLY when the change is genuinely behavior-changing, cross-boundary, or risk-sensitive (\`reviewer\` narrows scope with search first and may invoke \`Explore\` for targeted discovery); handle trivial and surgical edits directly. Send independent subagent calls in parallel within a single turn. Stop named teammates when finished.\n\n` : `${profileLabel} launch profile. The lead coordinates execution across specialized roles: delegate broad discovery to \`Explore\` in parallel and do not sweep the repo yourself (read directly only files you will act on); delegate to \`Plan\` in plan mode or when structuring complex multi-step sequencing (\`Plan\` is an advisory planning capability, not an approval gate, and writes handoff-ready steps for \`General-Purpose\`); delegate mixed multi-step execution and Plan handoffs to \`General-Purpose\` in a fresh context; delegate to \`reviewer\` after behavior-changing or risk-sensitive implementation to verify correctness before declaring done; handle trivial and surgical edits directly. Send independent subagent calls in parallel within a single turn. Stop named teammates when finished.\n\n`;
|
|
3343
|
+
const consultationLadder = isBalanced ? "Verify claims against real evidence: run relevant commands and tests. Funnel unknowns cheapest-first: (1) `code_search` + `web` search narrow scope and rule out hypotheses first; (2) `Explore` for targeted breadth when search is insufficient; (3) `Plan` only when sequencing or cross-boundary interfaces are genuinely complex; (4) `oracle` " + oracleDescriptor + " as a second opinion for precise, self-contained technical/architectural trade-offs that search, `Explore`, and (where consulted) `Plan` cannot settle. Optimize for accuracy, intelligence, and correctness at the lowest cost." : "Verify claims against real evidence: run relevant commands and tests. Follow a disciplined consultation ladder for unresolved decisions: (1) direct code inspection, search, builds, and tests settle factual questions; (2) `advisor` " + advisorDescriptor + " for transcript-aware framing checks or trajectory guidance; (3) `oracle` " + oracleDescriptor + " for self-contained technical/architectural trade-offs" + astraStep;
|
|
3344
|
+
const digestWindowNote = isCheapest || isBalanced ? "All roles run at a 200K context window — use targeted reads over full file reads.\n\n" : isCheap ? "The lead runs at 200K on `-m cheap` (1M on `-m cheap1m`) and every subagent runs at 200K — use targeted reads over full file reads.\n\n" : "";
|
|
3345
|
+
return "## Operating defaults (these layer with the user's direction and the domain's standards as addons: follow all three; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\n" + delegation + digestPipelineSentence + digestWindowNote + consultationLadder;
|
|
3306
3346
|
}
|
|
3307
3347
|
return STANDARD_OPERATING_DEFAULTS_DIGEST;
|
|
3308
3348
|
}
|
|
@@ -3893,4 +3933,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
|
|
|
3893
3933
|
//#endregion
|
|
3894
3934
|
export { writePeerMcpRuntimeFiles as C, workersKeyOf as S, sanitizeServeSettingsEnv as _, appendPeerAwarenessToMirroredClaudeMd as a, resolveCodexCliBackend as b, buildOperatingDefaultsDirective as c, prependStyleDirectiveToMirroredClaudeMd as d, buildArtifactReviewSkill as f, planModeAllowRules as g, injectAllowRules as h, writeInjectedSkill as i, prependArtifactPanelDirectiveToMirroredClaudeMd as l, configureServeDefaultPermissionMode as m, getInjectedSkills as n, appendToolbeltAwarenessToMirroredClaudeMd as o, SEAMLESS_BUILTIN_TOOLS as p, injectedSkillsForLaunch as r, buildOperatingDefaultsDigest as s, injectAttributionSuppressionIntoSettingsFile as t, prependOperatingDefaultsToMirroredClaudeMd as u, BUILTIN_SUBAGENT_DEFINITIONS as v, resolveGroupKeysFromMirror as x, injectPeerMcpIntoMirror as y };
|
|
3895
3935
|
|
|
3896
|
-
//# sourceMappingURL=attribution-settings-
|
|
3936
|
+
//# sourceMappingURL=attribution-settings-BwJ_HbhG.js.map
|