github-router 0.3.276 → 0.3.282
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-VOPvSn6v.js → attribution-settings-srL3gBR9.js} +31 -44
- package/dist/attribution-settings-srL3gBR9.js.map +1 -0
- package/dist/{auth-CYoRwhC9.js → auth-VUL2Zxvw.js} +3 -3
- package/dist/{auth-CYoRwhC9.js.map → auth-VUL2Zxvw.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-DDUyg8ZB.js → check-usage-CcLdFPGr.js} +4 -4
- package/dist/{check-usage-DDUyg8ZB.js.map → check-usage-CcLdFPGr.js.map} +1 -1
- package/dist/{claude-OTHh7iKz.js → claude-DJQjA5oQ.js} +52 -35
- package/dist/claude-DJQjA5oQ.js.map +1 -0
- package/dist/{codex-tCxK30Su.js → codex-BAXemWpJ.js} +5 -5
- package/dist/{codex-tCxK30Su.js.map → codex-BAXemWpJ.js.map} +1 -1
- package/dist/{debug-CJgsxoVw.js → debug-CtzYWxpJ.js} +2 -2
- package/dist/{debug-CJgsxoVw.js.map → debug-CtzYWxpJ.js.map} +1 -1
- package/dist/engine-BvLgh1QI.js +2 -0
- package/dist/{gate-discovery-nf7PGgnS.js → gate-discovery-BwtiYKvW.js} +5 -5
- package/dist/{gate-discovery-nf7PGgnS.js.map → gate-discovery-BwtiYKvW.js.map} +1 -1
- package/dist/{get-copilot-usage-D1OAH0EU.js → get-copilot-usage-B-EDAqQb.js} +2 -2
- package/dist/{get-copilot-usage-D1OAH0EU.js.map → get-copilot-usage-B-EDAqQb.js.map} +1 -1
- package/dist/hooks.mjs +37870 -0
- package/dist/hooks.sha256 +1 -0
- package/dist/{internal-artifact-open-BCz9lnq0.js → internal-artifact-open-Dj5Nlq0L.js} +2 -2
- package/dist/{internal-artifact-open-BCz9lnq0.js.map → internal-artifact-open-Dj5Nlq0L.js.map} +1 -1
- package/dist/{internal-first-mate-guard-7v2CtMA6.js → internal-first-mate-guard-CQdXWjNz.js} +1 -1
- package/dist/{internal-first-mate-guard-La0tIjTU.js → internal-first-mate-guard-DMgHg2s6.js} +5 -4
- package/dist/{internal-first-mate-guard-La0tIjTU.js.map → internal-first-mate-guard-DMgHg2s6.js.map} +1 -1
- package/dist/{internal-plan-review-jRMpHu68.js → internal-plan-review-DRFHET_B.js} +11 -4
- package/dist/internal-plan-review-DRFHET_B.js.map +1 -0
- package/dist/{internal-prompt-submit-CqWRFCuv.js → internal-prompt-submit-f1LR2P2G.js} +4 -4
- package/dist/{internal-prompt-submit-CqWRFCuv.js.map → internal-prompt-submit-f1LR2P2G.js.map} +1 -1
- package/dist/{internal-session-bind-BiHWDxuC.js → internal-session-bind-DhZhxJ3T.js} +2 -2
- package/dist/{internal-session-bind-BiHWDxuC.js.map → internal-session-bind-DhZhxJ3T.js.map} +1 -1
- package/dist/{internal-stop-hook-Ds9LwmZA.js → internal-stop-hook-514RJeHO.js} +68 -20
- package/dist/internal-stop-hook-514RJeHO.js.map +1 -0
- package/dist/{internal-stop-review-BOFj7R3q.js → internal-stop-review-BBsLcbPG.js} +2 -2
- package/dist/{internal-stop-review-BOFj7R3q.js.map → internal-stop-review-BBsLcbPG.js.map} +1 -1
- package/dist/{internal-worker-guard-Lu8VHj5k.js → internal-worker-guard-VucpClSi.js} +2 -2
- package/dist/{internal-worker-guard-Lu8VHj5k.js.map → internal-worker-guard-VucpClSi.js.map} +1 -1
- package/dist/{internal-workspace-header-BRMz0Yql.js → internal-workspace-header-OYgHEnFt.js} +2 -2
- package/dist/{internal-workspace-header-BRMz0Yql.js.map → internal-workspace-header-OYgHEnFt.js.map} +1 -1
- package/dist/lib/tree-sitter-pool/lifecycle-C7W8D2lx.js +165 -0
- package/dist/lib/tree-sitter-pool/lifecycle-Dx0SnP7Z.js +157 -0
- package/dist/lib/tree-sitter-pool/worker.js +287 -14
- package/dist/{lifecycle-LA4rAuAL.js → lifecycle-B7CHqKlF.js} +2 -2
- package/dist/{lifecycle-LA4rAuAL.js.map → lifecycle-B7CHqKlF.js.map} +1 -1
- package/dist/lifecycle-CbmHMMSD.js +2 -0
- package/dist/{lifecycle-AGXnd-ZY.js → lifecycle-D-rL81tT.js} +2 -2
- package/dist/{lifecycle-AGXnd-ZY.js.map → lifecycle-D-rL81tT.js.map} +1 -1
- package/dist/lifecycle-DTcZwa7U.js +2 -0
- package/dist/lifecycle-K9oVtGde.mjs +16 -0
- package/dist/main.js +18 -18
- package/dist/{mcp-workspace-header-CGJbNeHb.js → mcp-workspace-header-ucs2SDST.js} +5 -6
- package/dist/mcp-workspace-header-ucs2SDST.js.map +1 -0
- package/dist/{models-4Q45Q2Dw.js → models-C16mBK2M.js} +3 -3
- package/dist/{models-4Q45Q2Dw.js.map → models-C16mBK2M.js.map} +1 -1
- package/dist/{orchestration-CpkG8ScN.js → orchestration-CtM6FYNx.js} +2 -2
- package/dist/{orchestration-CpkG8ScN.js.map → orchestration-CtM6FYNx.js.map} +1 -1
- package/dist/package-root-B-osctCk.js +29 -0
- package/dist/package-root-B-osctCk.js.map +1 -0
- package/dist/paths-CV9K7Xqm.js +2 -0
- package/dist/{paths-j2B7b0DZ.js → paths-wLC0InjX.js} +28 -4
- package/dist/paths-wLC0InjX.js.map +1 -0
- package/dist/{peer-mcp-personas-DRL_xT4h.js → peer-mcp-personas-l4P4s1fK.js} +471 -186
- package/dist/peer-mcp-personas-l4P4s1fK.js.map +1 -0
- package/dist/{plan-review-hook-Dk5zTNke.js → plan-review-hook-Lf9ISdF6.js} +5 -6
- package/dist/plan-review-hook-Lf9ISdF6.js.map +1 -0
- package/dist/{prompt-submit-hook-lvTWwaTV.js → prompt-submit-hook-BlijaOn7.js} +6 -11
- package/dist/prompt-submit-hook-BlijaOn7.js.map +1 -0
- package/dist/{provision-HzZ547dW.js → provision-DlT34zcf.js} +4 -4
- package/dist/{provision-HzZ547dW.js.map → provision-DlT34zcf.js.map} +1 -1
- package/dist/self-invocation-CKMjcA5F.js +380 -0
- package/dist/self-invocation-CKMjcA5F.js.map +1 -0
- package/dist/{serve-CM3OmF4I.js → serve-orGUartp.js} +29 -22
- package/dist/serve-orGUartp.js.map +1 -0
- package/dist/{server-setup-C9r7jYnz.js → server-setup-BRBe8gW4.js} +63 -7
- package/dist/{server-setup-C9r7jYnz.js.map → server-setup-BRBe8gW4.js.map} +1 -1
- package/dist/{start-KAUCsDao.js → start-sutbbkwc.js} +3 -3
- package/dist/{start-KAUCsDao.js.map → start-sutbbkwc.js.map} +1 -1
- package/dist/{stop-gate-hook-CaUrldLh.js → stop-gate-hook-DgJ6sW8N.js} +100 -52
- package/dist/stop-gate-hook-DgJ6sW8N.js.map +1 -0
- package/dist/{stop-gate-policy-lAabj_pP.js → stop-gate-policy-DG5yYWGn.js} +2 -2
- package/dist/{stop-gate-policy-lAabj_pP.js.map → stop-gate-policy-DG5yYWGn.js.map} +1 -1
- package/dist/{token-CxPaBEUS.js → token-CnlB0884.js} +2 -2
- package/dist/token-CnlB0884.js.map +1 -0
- package/dist/{version-_Q1WpsQp.js → version-C8x2hQrZ.js} +14 -2
- package/dist/version-C8x2hQrZ.js.map +1 -0
- package/dist/{worker-dispatch-Bj1uYyG9.js → worker-dispatch-4O3IWtP0.js} +4 -4
- package/dist/worker-dispatch-4O3IWtP0.js.map +1 -0
- package/package.json +2 -2
- package/dist/attribution-settings-VOPvSn6v.js.map +0 -1
- package/dist/claude-OTHh7iKz.js.map +0 -1
- package/dist/engine-BKJKMAzh.js +0 -2
- package/dist/internal-plan-review-jRMpHu68.js.map +0 -1
- package/dist/internal-stop-hook-Ds9LwmZA.js.map +0 -1
- package/dist/lifecycle-DCrKbaIU.js +0 -2
- package/dist/lifecycle-KKSTKwd6.js +0 -2
- package/dist/mcp-workspace-header-CGJbNeHb.js.map +0 -1
- package/dist/paths-DN3Nio42.js +0 -2
- package/dist/paths-j2B7b0DZ.js.map +0 -1
- package/dist/peer-mcp-personas-DRL_xT4h.js.map +0 -1
- package/dist/plan-review-hook-Dk5zTNke.js.map +0 -1
- package/dist/prompt-submit-hook-lvTWwaTV.js.map +0 -1
- package/dist/serve-CM3OmF4I.js.map +0 -1
- package/dist/stop-gate-hook-CaUrldLh.js.map +0 -1
- package/dist/token-CxPaBEUS.js.map +0 -1
- package/dist/version-_Q1WpsQp.js.map +0 -1
- package/dist/worker-dispatch-Bj1uYyG9.js.map +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-
|
|
3
|
-
import
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
1
|
+
import { Mt as CONDENSED_OPERATING_SEQUENCE, Nt as DEFINITION_OF_GREATNESS, c as personasFor, i as buildAgentPrompt, n as MCP_GROUPS, qt as withOneMSuffix, t as GROUP_META } from "./peer-mcp-personas-l4P4s1fK.js";
|
|
2
|
+
import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-wLC0InjX.js";
|
|
3
|
+
import "./self-invocation-CKMjcA5F.js";
|
|
4
|
+
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-DlT34zcf.js";
|
|
5
|
+
import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-ucs2SDST.js";
|
|
6
|
+
import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-4O3IWtP0.js";
|
|
6
7
|
import consola from "consola";
|
|
7
8
|
import path from "node:path";
|
|
8
9
|
import { randomBytes } from "node:crypto";
|
|
@@ -130,11 +131,11 @@ function buildCoordinatorAgent(opts) {
|
|
|
130
131
|
"The lead's brief will include an artifact (plan, design, diff, or code) and a goal (e.g. 'review before exit-plan', 'review the commit I just made', 'cross-check codex-critic's verdict'). Pick the right peers for the artifact type:",
|
|
131
132
|
"",
|
|
132
133
|
"- **Plan / design / architecture choice** → fan out to `codex-critic` (gpt-5.6-sol, strongest reasoning, cross-lab)" + (opts.geminiAvailable ? " AND `gemini-critic` (third-lab triangulation, strong on formal reasoning) in parallel" : "") + ". codex-reviewer is the wrong tool for plans (it's a code-specialist, not an architecture critic).",
|
|
133
|
-
"- **Concrete diff or single file** → fan out to `codex-reviewer` (gpt-5.3-codex, line-level code specialist
|
|
134
|
+
"- **Concrete diff or single file** → fan out to `codex-reviewer` (gpt-5.3-codex, line-level code specialist)" + (opts.geminiAvailable ? " AND `gemini-reviewer` (gemini-3.1-pro, second-lab line-level review)" : "") + (opts.geminiAvailable ? " AND `gemini-critic` for cross-lab triangulation" : "") + ". For very small changes (<20 lines), one `codex-reviewer` call is enough.",
|
|
134
135
|
"- **Large artifact** → the only peers that take a large artifact WHOLE are `codex-critic` (gpt-5.6-sol, ≈1M-token input window) and `opus-critic` (Opus-4.7-1M, ≈936K-token input on enterprise catalogs; ≈168K otherwise). Route the full artifact to those for cross-lab coverage. `codex-reviewer` (≈272K) and `gemini-critic` (≈136K) have small windows — see Decomposition below: never summarize or downsize the request to squeeze a large artifact into a small-window peer.",
|
|
135
136
|
"- **Formal reasoning, proofs, or invariants** → prefer `gemini-critic`" + (opts.geminiAvailable ? " (gemini-3.1-pro, strong on math and formally-stated properties)" : " (NOT REGISTERED in this session — gemini-3.x not in catalog)") + ".",
|
|
136
137
|
"- **Tie-breaker after codex-critic has weighed in** → call `gemini-critic`" + (opts.geminiAvailable ? "" : " (NOT REGISTERED in this session)") + " or `opus-critic` with the artifact AND codex-critic's verdict for cross-check.",
|
|
137
|
-
"- **Fast sanity check** → `opus-critic` (
|
|
138
|
+
"- **Fast sanity check** → `opus-critic` (same lab as lead but fresh context — catches confabulation and motivated reasoning).",
|
|
138
139
|
"",
|
|
139
140
|
"## Decomposition for large artifacts",
|
|
140
141
|
"",
|
|
@@ -303,14 +304,13 @@ function buildPeerAgentDefinitions(opts) {
|
|
|
303
304
|
const brainstormModel = nonEmptyModel(opts.brainstormModel);
|
|
304
305
|
const scoutModel = nonEmptyModel(opts.scoutModel);
|
|
305
306
|
const scribeModel = nonEmptyModel(opts.scribeModel);
|
|
306
|
-
const
|
|
307
|
-
const
|
|
308
|
-
const genericCheapModel = nonEmptyModel(opts.genericCheapModel);
|
|
307
|
+
const implementerFastModel = nonEmptyModel(opts.implementerFastModel);
|
|
308
|
+
const generalPurposeFastModel = nonEmptyModel(opts.generalPurposeFastModel);
|
|
309
309
|
const modelField = nativeModel ? { model: withOneMSuffix(nativeModel) } : {};
|
|
310
310
|
const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
|
|
311
311
|
const searchMcp = opts.serverUrl ? { mcpServers: { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } } : {};
|
|
312
312
|
out.implementer = {
|
|
313
|
-
description: nativeModel ? `Bounded implementation subagent running ${nativeModel} (strong non-Claude coder, maximum reasoning). Use proactively for
|
|
313
|
+
description: nativeModel ? `Bounded implementation subagent running ${nativeModel} (strong non-Claude coder, maximum reasoning). Use proactively for coding changes that need judgment or have ambiguous scope — edits, features, fixes — to keep the lead's context focused; use implementer-fast instead for well-specified, mechanical changes. Runs in its own context. Model is overridable at spawn.` : `Bounded implementation subagent (native tools, runs on the lead's model in its own context). Use proactively for coding changes that need judgment or have ambiguous scope — edits, features, fixes — to keep the lead's context focused; use implementer-fast instead for well-specified, mechanical changes. Model is overridable at spawn.`,
|
|
314
314
|
prompt: "You are a bounded implementation subagent for well-scoped coding tasks. Implement the requested change surgically, matching the surrounding code style and minimizing unrelated churn. " + fileToolSteer("builds") + " Verify with the project's build or tests where applicable. Do the work yourself — do not spawn further subagents. Report exactly what changed and any risks.",
|
|
315
315
|
...modelField
|
|
316
316
|
};
|
|
@@ -339,20 +339,15 @@ function buildPeerAgentDefinitions(opts) {
|
|
|
339
339
|
...scribeModel ? { model: withOneMSuffix(scribeModel) } : {}
|
|
340
340
|
};
|
|
341
341
|
const genericPromptFor = (role) => `You are a general-purpose subagent handling ${role} the lead has delegated to keep its own context free. Work out what the task actually requires, then do it end to end. Verify against the real repository and the real runtime rather than assuming — read the code, run the command, check the exit code. ` + fileToolSteer("builds") + " Do the work yourself — do not spawn further subagents. Report what you did, what you verified, and anything you could not settle.";
|
|
342
|
-
if (
|
|
343
|
-
description: `
|
|
344
|
-
prompt: genericPromptFor("
|
|
345
|
-
model: withOneMSuffix(
|
|
342
|
+
if (implementerFastModel) out["implementer-fast"] = {
|
|
343
|
+
description: `Implementation subagent running ${implementerFastModel} (1M context, ${implementerFastModel === "gpt-5.6-terra" ? "the cheaper, faster implementation tier" : "a non-lead implementation model"}). Use proactively for well-specified, mechanical coding changes; use implementer instead when the change needs judgment or its scope is ambiguous. Full toolset, so it can implement and verify the change end to end in its own context. Model is overridable at spawn.`,
|
|
344
|
+
prompt: genericPromptFor("a well-specified, mechanical coding change"),
|
|
345
|
+
model: withOneMSuffix(implementerFastModel)
|
|
346
346
|
};
|
|
347
|
-
if (
|
|
348
|
-
description: `Catch-all subagent running ${
|
|
349
|
-
prompt: genericPromptFor("
|
|
350
|
-
model: withOneMSuffix(
|
|
351
|
-
};
|
|
352
|
-
if (genericCheapModel) out["generic-cheap"] = {
|
|
353
|
-
description: `Catch-all subagent running ${genericCheapModel} (1M context, the lowest-cost model in the catalog, and unlike the flash tier it carries the full reasoning-effort ladder so an effort selection above high still applies). Use for high-volume or long-running work where cost dominates. Full toolset, so it can finish the work rather than only research it. Runs in its own context on a non-lead model. Model is overridable at spawn.`,
|
|
354
|
-
prompt: genericPromptFor("cost-sensitive work"),
|
|
355
|
-
model: withOneMSuffix(genericCheapModel)
|
|
347
|
+
if (generalPurposeFastModel) out["general-purpose-fast"] = {
|
|
348
|
+
description: `Catch-all subagent running ${generalPurposeFastModel} (1.05M context, the lowest-cost model in the catalog and the fastest measured catch-all candidate, with the full reasoning-effort ladder). Use proactively for work no specialist fits when a fast, economical non-lead model can finish it. Full toolset, so it can complete the work rather than only research it. Runs in its own context. Model is overridable at spawn.`,
|
|
349
|
+
prompt: genericPromptFor("work no specialist fits"),
|
|
350
|
+
model: withOneMSuffix(generalPurposeFastModel)
|
|
356
351
|
};
|
|
357
352
|
if (opts.workerToolsAvailable) {
|
|
358
353
|
const workersKey = workersKeyOf(opts.groupKeys);
|
|
@@ -622,7 +617,7 @@ async function injectPeerMcpIntoMirror(serverUrl, opts) {
|
|
|
622
617
|
groupKeys: opts.groupKeys,
|
|
623
618
|
nonce: opts.nonce,
|
|
624
619
|
codexHome: opts.codexHome ?? PATHS.CODEX_HOME,
|
|
625
|
-
workspaceHeaderCmd: buildWorkspaceHeaderHelperCommand(
|
|
620
|
+
workspaceHeaderCmd: buildWorkspaceHeaderHelperCommand(opts.selfInvocation)
|
|
626
621
|
});
|
|
627
622
|
const conflicts = [];
|
|
628
623
|
for (const name of Object.keys(peerConfig.mcpServers)) if (mcpServers[name] !== void 0) conflicts.push(name);
|
|
@@ -681,7 +676,7 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
|
|
|
681
676
|
groupKeys: opts.groupKeys,
|
|
682
677
|
nonce,
|
|
683
678
|
codexHome,
|
|
684
|
-
workspaceHeaderCmd: buildWorkspaceHeaderHelperCommand(
|
|
679
|
+
workspaceHeaderCmd: buildWorkspaceHeaderHelperCommand(opts.selfInvocation)
|
|
685
680
|
});
|
|
686
681
|
const agents = buildPeerAgentDefinitions({
|
|
687
682
|
codexCli: opts.codexCli,
|
|
@@ -694,13 +689,12 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
|
|
|
694
689
|
brainstormModel: opts.brainstormModel,
|
|
695
690
|
scoutModel: opts.scoutModel,
|
|
696
691
|
scribeModel: opts.scribeModel,
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
genericCheapModel: opts.genericCheapModel,
|
|
692
|
+
implementerFastModel: opts.implementerFastModel,
|
|
693
|
+
generalPurposeFastModel: opts.generalPurposeFastModel,
|
|
700
694
|
nonce,
|
|
701
695
|
codexHome,
|
|
702
696
|
serverUrl,
|
|
703
|
-
workspaceHeaderCmd: buildWorkspaceHeaderHelperCommand(
|
|
697
|
+
workspaceHeaderCmd: buildWorkspaceHeaderHelperCommand(opts.selfInvocation)
|
|
704
698
|
});
|
|
705
699
|
await fs.unlink(mcpConfigPath).catch(() => {});
|
|
706
700
|
await fs.unlink(agentsPath).catch(() => {});
|
|
@@ -1769,19 +1763,12 @@ function joinClauses(parts) {
|
|
|
1769
1763
|
}
|
|
1770
1764
|
/** The "Reach for X when Y" list, omitting any agent this launch did not emit. */
|
|
1771
1765
|
function buildNativeReachClauses(opts) {
|
|
1772
|
-
const clauses = [
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
"`brainstorm` when you do not yet know which approach to take"
|
|
1776
|
-
];
|
|
1766
|
+
const clauses = ["`implementer` for coding changes that need judgment or have ambiguous scope"];
|
|
1767
|
+
if (opts.implementerFastAvailable !== false) clauses.push("`implementer-fast` for well-specified, mechanical coding changes");
|
|
1768
|
+
clauses.push("`reviewer` when something exists and you want it assessed (including reproducing and root-causing a failure)", "`brainstorm` when you do not yet know which approach to take");
|
|
1777
1769
|
if (opts.scoutAvailable !== false) clauses.push("`scout` to find or understand something in the repo");
|
|
1778
1770
|
clauses.push("`scribe` for docs and ADRs that trail the code");
|
|
1779
|
-
|
|
1780
|
-
opts.genericAvailable === false ? void 0 : "`generic`",
|
|
1781
|
-
opts.genericFastAvailable === false ? void 0 : "`generic-fast`",
|
|
1782
|
-
opts.genericCheapAvailable === false ? void 0 : "`generic-cheap`"
|
|
1783
|
-
].filter((c) => c != null);
|
|
1784
|
-
if (catchAlls.length > 0) clauses.push(`${joinClauses(catchAlls)} for work no specialist fits, picking the tier that matches the work's weight`);
|
|
1771
|
+
if (opts.generalPurposeFastAvailable !== false) clauses.push("`general-purpose-fast` for work no specialist fits");
|
|
1785
1772
|
return joinClauses(clauses);
|
|
1786
1773
|
}
|
|
1787
1774
|
/**
|
|
@@ -1793,7 +1780,7 @@ function buildNativeReachClauses(opts) {
|
|
|
1793
1780
|
* disagree about which agents exist.
|
|
1794
1781
|
*/
|
|
1795
1782
|
function buildOperatingDefaultsDirective(opts = {}) {
|
|
1796
|
-
return "## Operating defaults (apply when the user has not specified otherwise; the user's explicit direction and the domain's own standards always override)\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.
|
|
1783
|
+
return "## Operating defaults (apply when the user has not specified otherwise; the user's explicit direction and the domain's own standards always override)\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.";
|
|
1797
1784
|
}
|
|
1798
1785
|
/** The all-available form of the directive. Prefer
|
|
1799
1786
|
* `buildOperatingDefaultsDirective` on any path that knows which natives
|
|
@@ -1816,7 +1803,7 @@ const OPERATING_DEFAULTS_DIRECTIVE = buildOperatingDefaultsDirective();
|
|
|
1816
1803
|
* the reasoning stay in the directive; the always-resident copy carries only
|
|
1817
1804
|
* the trigger and the ritual exclusion.
|
|
1818
1805
|
*/
|
|
1819
|
-
const OPERATING_DEFAULTS_DIGEST = "## Operating defaults (the user's explicit direction and the domain's standards always override)\n\nDelegate when the work is WIDE (many files or sources to sweep) or SLOW and you need only the conclusion, to protect the main thread's finite context and keep it free for reasoning and interacting with the user; prefer parallel delegation for independent work. Do NOT delegate merely because a sub-question is separable: a narrow, deep question whose value is file:line fidelity loses exactly that through a summarization layer, and one answerable in a single command is cheaper done directly. Do trivial, surgical, and last-mile work yourself.\n\nVerify, do not assert. Run the code, read the file, check the exit code. A claim in prose is worth nothing against state you did not check, and a check that cannot fail proves nothing. Reproduce a bug end to end, the way a real user hits it, before fixing it. Fix a lint error, failing test, or flake the moment you see it, whoever introduced it, without letting it derail the task at hand. Prefer quality and long-term maintainability over development cost.\n\nVerification has a blind spot: a consequential recommendation, a design or trade-off call, or a hard-to-reverse decision that still turns on judgment among plausible alternatives once the direct evidence is in. That is where confabulation hides, so put it past a peer critic before you ship it and budget the wait even under delivery pressure. When a test, a run, a reproduction, or a search would settle the claim, settle it that way instead; a critic asked to re-derive what you can already prove is ritual, not review.\n\nThe agent roster, the tool surface, and the reasoning behind these defaults are in your CLAUDE.md project instructions. Read them when choosing HOW to work; the rules above apply without a lookup.";
|
|
1806
|
+
const OPERATING_DEFAULTS_DIGEST = "## Operating defaults (the user's explicit direction and the domain's standards always override)\n\nDelegate when the work is WIDE (many files or sources to sweep) or SLOW and you need only the conclusion, to protect the main thread's finite context and keep it free for reasoning and interacting with the user; prefer parallel delegation for independent work. Do NOT delegate merely because a sub-question is separable: a narrow, deep question whose value is file:line fidelity loses exactly that through a summarization layer, and one answerable in a single command is cheaper done directly. Do trivial, surgical, and last-mile work yourself. Stop a named teammate once you are done with it: it persists for follow-ups, its idle notice means available rather than finished, and nothing reaps it for you.\n\nVerify, do not assert. Run the code, read the file, check the exit code. A claim in prose is worth nothing against state you did not check, and a check that cannot fail proves nothing. Reproduce a bug end to end, the way a real user hits it, before fixing it. Fix a lint error, failing test, or flake the moment you see it, whoever introduced it, without letting it derail the task at hand. Prefer quality and long-term maintainability over development cost.\n\nVerification has a blind spot: a consequential recommendation, a design or trade-off call, or a hard-to-reverse decision that still turns on judgment among plausible alternatives once the direct evidence is in. That is where confabulation hides, so put it past a peer critic before you ship it and budget the wait even under delivery pressure. When a test, a run, a reproduction, or a search would settle the claim, settle it that way instead; a critic asked to re-derive what you can already prove is ritual, not review.\n\nThe agent roster, the tool surface, and the reasoning behind these defaults are in your CLAUDE.md project instructions. Read them when choosing HOW to work; the rules above apply without a lookup.";
|
|
1820
1807
|
/**
|
|
1821
1808
|
* Skip the helper if the user's `~/.claude/CLAUDE.md` (or, equivalently,
|
|
1822
1809
|
* the would-be post-write file) has grown past this size.
|
|
@@ -2360,4 +2347,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
|
|
|
2360
2347
|
//#endregion
|
|
2361
2348
|
export { injectPeerMcpIntoMirror as _, appendPeerAwarenessToMirroredClaudeMd as a, workersKeyOf as b, prependArtifactPanelDirectiveToMirroredClaudeMd as c, SEAMLESS_BUILTIN_TOOLS as d, configureServeDefaultPermissionMode as f, BUILTIN_SUBAGENT_DEFINITIONS as g, sanitizeServeSettingsEnv as h, OPERATING_DEFAULTS_DIGEST as i, prependOperatingDefaultsToMirroredClaudeMd as l, planModeAllowRules as m, INJECTED_SKILLS as n, appendToolbeltAwarenessToMirroredClaudeMd as o, injectAllowRules as p, writeInjectedSkill as r, buildOperatingDefaultsDirective as s, injectAttributionSuppressionIntoSettingsFile as t, prependStyleDirectiveToMirroredClaudeMd as u, resolveCodexCliBackend as v, writePeerMcpRuntimeFiles as x, resolveGroupKeysFromMirror as y };
|
|
2362
2349
|
|
|
2363
|
-
//# sourceMappingURL=attribution-settings-
|
|
2350
|
+
//# sourceMappingURL=attribution-settings-srL3gBR9.js.map
|