github-router 0.3.302 → 0.3.304

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.
Files changed (46) hide show
  1. package/README.md +4 -4
  2. package/dist/{attribution-settings-B1xutIts.js → attribution-settings-C8iSwEAZ.js} +184 -93
  3. package/dist/attribution-settings-C8iSwEAZ.js.map +1 -0
  4. package/dist/browser-ext/manifest.json +1 -1
  5. package/dist/{claude-uRuzEH0W.js → claude-Drv0roq1.js} +63 -116
  6. package/dist/claude-Drv0roq1.js.map +1 -0
  7. package/dist/{codex-D5ag-liR.js → codex-kgVL5OyN.js} +4 -4
  8. package/dist/{codex-D5ag-liR.js.map → codex-kgVL5OyN.js.map} +1 -1
  9. package/dist/engine-xuIzQNV1.js +2 -0
  10. package/dist/{fast-profile-contract-K3P58nj3.js → fast-profile-contract-OuZQaGif.js} +26 -23
  11. package/dist/fast-profile-contract-OuZQaGif.js.map +1 -0
  12. package/dist/{gate-discovery-BTRVyKWu.js → gate-discovery-D4-F99e_.js} +2 -2
  13. package/dist/{gate-discovery-BTRVyKWu.js.map → gate-discovery-D4-F99e_.js.map} +1 -1
  14. package/dist/hooks.mjs +121 -50
  15. package/dist/hooks.sha256 +1 -1
  16. package/dist/{internal-fast-dispatch-guard-D2HcfXZv.js → internal-fast-dispatch-guard-BaUB-F8o.js} +71 -15
  17. package/dist/internal-fast-dispatch-guard-BaUB-F8o.js.map +1 -0
  18. package/dist/{internal-fast-dispatch-guard-CYOWbxjX.js → internal-fast-dispatch-guard-ByzwIsxA.js} +1 -1
  19. package/dist/{internal-max-dispatch-guard-BjSVXMvC.js → internal-max-dispatch-guard-CXRB-4a3.js} +31 -14
  20. package/dist/internal-max-dispatch-guard-CXRB-4a3.js.map +1 -0
  21. package/dist/{internal-max-dispatch-guard-Bcjavapx.js → internal-max-dispatch-guard-Sb6ACr_0.js} +1 -1
  22. package/dist/{internal-stop-hook-BZg__ab6.js → internal-stop-hook-D8LIWryj.js} +2 -2
  23. package/dist/{internal-stop-hook-BZg__ab6.js.map → internal-stop-hook-D8LIWryj.js.map} +1 -1
  24. package/dist/main.js +7 -7
  25. package/dist/{max-profile-contract-BTXowh6k.js → max-profile-contract-CiD5wyET.js} +19 -7
  26. package/dist/max-profile-contract-CiD5wyET.js.map +1 -0
  27. package/dist/{peer-mcp-personas-DwEiYeJS.js → peer-mcp-personas-D4bHdjOx.js} +420 -384
  28. package/dist/peer-mcp-personas-D4bHdjOx.js.map +1 -0
  29. package/dist/{provision-BLT1pCFy.js → provision-D3_GtXze.js} +2 -2
  30. package/dist/{provision-BLT1pCFy.js.map → provision-D3_GtXze.js.map} +1 -1
  31. package/dist/{serve-wEZoOijw.js → serve-DPRZX-2j.js} +5 -5
  32. package/dist/{serve-wEZoOijw.js.map → serve-DPRZX-2j.js.map} +1 -1
  33. package/dist/{server-setup-Zn5wkosb.js → server-setup-CSkdFAPP.js} +25 -19
  34. package/dist/server-setup-CSkdFAPP.js.map +1 -0
  35. package/dist/{start-DSqU8d8h.js → start-C6G5tu81.js} +3 -3
  36. package/dist/{start-DSqU8d8h.js.map → start-C6G5tu81.js.map} +1 -1
  37. package/package.json +1 -1
  38. package/dist/attribution-settings-B1xutIts.js.map +0 -1
  39. package/dist/claude-uRuzEH0W.js.map +0 -1
  40. package/dist/engine-2uMJ4Isk.js +0 -2
  41. package/dist/fast-profile-contract-K3P58nj3.js.map +0 -1
  42. package/dist/internal-fast-dispatch-guard-D2HcfXZv.js.map +0 -1
  43. package/dist/internal-max-dispatch-guard-BjSVXMvC.js.map +0 -1
  44. package/dist/max-profile-contract-BTXowh6k.js.map +0 -1
  45. package/dist/peer-mcp-personas-DwEiYeJS.js.map +0 -1
  46. package/dist/server-setup-Zn5wkosb.js.map +0 -1
package/README.md CHANGED
@@ -104,10 +104,10 @@ The launcher also registers focused native subagents that run in their own conte
104
104
  |---|---|---|---|
105
105
  | `implementer` | Coding changes needing judgment or with ambiguous scope | gpt-5.6-sol → gpt-5.5 | Full inherited toolset |
106
106
  | `implementer-fast` | Well-specified, mechanical coding changes | gpt-5.6-terra → gemini-3.1-pro-preview | Full inherited toolset |
107
- | `reviewer` | Assessing an existing diff, plan, document, or failure | gemini-3.1-pro-preview → gemini-3.7-flash → OpenAI frontier | Full inherited toolset |
108
- | `reviewer-fast` | Lower-stakes assessment on a cheaper cross-lab model | gemini-3.7-flash | Full inherited toolset |
109
- | `brainstorm` | Divergent approaches before selecting one | gemini-3.1-pro-preview → gemini-3.7-flash → OpenAI frontier | Read-only allowlist |
110
- | `scout` | Low-cost repository exploration | gpt-5.6-luna → gemini-3.7-flash | Read-only allowlist |
107
+ | `reviewer` | Assessing an existing diff, plan, document, or failure | gemini-3.1-pro-preview → gemini-3.8-flash → OpenAI frontier | Full inherited toolset |
108
+ | `reviewer-fast` | Lower-stakes assessment on a cheaper cross-lab model | gemini-3.8-flash | Full inherited toolset |
109
+ | `brainstorm` | Divergent approaches before selecting one | gemini-3.1-pro-preview → gemini-3.8-flash → OpenAI frontier | Read-only allowlist |
110
+ | `scout` | Low-cost repository exploration | gpt-5.6-luna → gemini-3.8-flash | Read-only allowlist |
111
111
  | `scribe` | Documentation that trails the code | gpt-5.6-terra → OpenAI frontier | Full inherited toolset |
112
112
  | `general-purpose-fast` | Work no specialist fits | gpt-5.6-luna | Full inherited toolset |
113
113
 
@@ -1,9 +1,9 @@
1
- import { Gn as oneMContextDisabled, It as LUNA_IMPLEMENTER_ALIAS_ID, Kn as withOneMSuffix, Nt as FAST_CRITIC_ALIAS_ID, Rt as LUNA_SCOUT_ALIAS_ID, Tn as DEFINITION_OF_GREATNESS, a as buildAgentPrompt, l as maxPersonasFor, n as MCP_GROUPS, t as GROUP_META, u as personasFor, wn as CONDENSED_OPERATING_SEQUENCE } from "./peer-mcp-personas-DwEiYeJS.js";
1
+ import { Cn as withOneMSuffix, On as LUNA_SCOUT_ALIAS_ID, Sn as oneMContextDisabled, a as buildAgentPrompt, l as maxPersonasFor, n as MCP_GROUPS, nn as DEFINITION_OF_GREATNESS, t as GROUP_META, tn as CONDENSED_OPERATING_SEQUENCE, u as personasFor } from "./peer-mcp-personas-D4bHdjOx.js";
2
2
  import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-IcZW8gZx.js";
3
- import { o as FAST_PROFILE_NATIVE_AGENT_NAMES } from "./fast-profile-contract-K3P58nj3.js";
3
+ import { a as FAST_PROFILE_MODELS, c as FAST_PROFILE_NATIVE_MODELS, o as FAST_PROFILE_NATIVE_AGENT_NAMES, s as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-OuZQaGif.js";
4
+ import { a as MAX_PROFILE_NATIVE_AGENT_NAMES, i as MAX_PROFILE_MODELS, o as MAX_PROFILE_NATIVE_EFFORTS, s as MAX_PROFILE_NATIVE_MODELS } from "./max-profile-contract-CiD5wyET.js";
4
5
  import "./self-invocation-BJWbA8ka.js";
5
- import { a as MAX_PROFILE_NATIVE_AGENT_NAMES, i as MAX_PROFILE_MODELS, o as MAX_PROFILE_NATIVE_EFFORTS, s as MAX_PROFILE_NATIVE_MODELS } from "./max-profile-contract-BTXowh6k.js";
6
- import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-BLT1pCFy.js";
6
+ import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-D3_GtXze.js";
7
7
  import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-NzFD0Wgd.js";
8
8
  import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-DgP5yT26.js";
9
9
  import consola from "consola";
@@ -281,7 +281,7 @@ function buildMaxProfileAgentDefinitions(opts) {
281
281
  const planModel = modelFor(opts.maxPlanModel, MAX_PROFILE_NATIVE_MODELS.Plan);
282
282
  const generalModel = modelFor(opts.maxGeneralPurposeModel, MAX_PROFILE_NATIVE_MODELS["general-purpose"]);
283
283
  const implementerModel = modelFor(opts.maxImplementerModel, MAX_PROFILE_NATIVE_MODELS.implementer);
284
- const reviewerModel = modelFor(opts.maxReviewerModel, modelFor(opts.maxGeminiModel, modelFor(opts.maxGrokModel, MAX_PROFILE_NATIVE_MODELS.reviewer)));
284
+ const reviewerModel = modelFor(opts.maxReviewerModel, MAX_PROFILE_NATIVE_MODELS.reviewer);
285
285
  const brainstormModel = modelFor(opts.maxBrainstormModel, modelFor(opts.maxGrokModel, modelFor(opts.maxGeminiModel, MAX_PROFILE_NATIVE_MODELS.brainstorm)));
286
286
  const peersKey = peersKeyOf(opts.groupKeys);
287
287
  const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
@@ -290,7 +290,7 @@ function buildMaxProfileAgentDefinitions(opts) {
290
290
  const oneM = (model) => model === MAX_PROFILE_MODELS.grok ? model : decorateGuaranteedOneM(model);
291
291
  const effort = (name) => MAX_PROFILE_NATIVE_EFFORTS[name];
292
292
  const base = (name, model, roleEffort) => ({
293
- description: `Max-profile ${name} subagent running ${model}. This model is the deliberate default for the role; use it first and override only after a concrete failure or task-model mismatch. Max dispatch strips Claude Code's required built-in model placeholder so the roster model remains authoritative; clients that can send catalog ids may override only to Luna, Gemini 3.7 Flash, or Grok 4.6.`,
293
+ description: `Max-profile ${name} subagent running ${model}. This model is the deliberate default for the role; use it first and override only after a concrete failure or task-model mismatch. Max dispatch strips Claude Code's required built-in model placeholder so the roster model remains authoritative; clients that can send catalog ids may override only to Luna, Gemini 3.8 Flash, or Grok 4.6.`,
294
294
  prompt: `You are the max-profile ${name} subagent. Work from the supplied brief, verify against the actual repository, and return concrete evidence with file:line references. You do not have Advisor. Do not spawn further agents.`,
295
295
  model: oneM(model),
296
296
  effort: roleEffort
@@ -380,85 +380,89 @@ function buildMaxProfileAgentDefinitions(opts) {
380
380
  * from the standard definitions: the names overlap, but their role bodies,
381
381
  * fixed model assignments, and efforts are profile contracts. */
382
382
  function buildFastProfileAgentDefinitions(opts) {
383
- const scoutModel = nonEmptyModel(opts.scoutModel);
384
- const implementerModel = nonEmptyModel(opts.nativeSubagentModel);
385
- const reviewerModel = nonEmptyModel(opts.reviewerModel);
386
- const plannerModel = nonEmptyModel(opts.plannerModel);
387
- const criticModel = nonEmptyModel(opts.criticModel);
388
- if (!scoutModel || !implementerModel || !reviewerModel || !plannerModel || !criticModel) throw new Error("fast profile requires resolved Explore, implementer, reviewer, planner, and critic models");
383
+ const modelFor = (value, fallback) => nonEmptyModel(value) ?? fallback;
384
+ const exploreModel = modelFor(opts.fastExploreModel, FAST_PROFILE_NATIVE_MODELS.Explore);
385
+ const planModel = modelFor(opts.fastPlanModel, FAST_PROFILE_NATIVE_MODELS.Plan);
386
+ const generalModel = modelFor(opts.fastGeneralPurposeModel, FAST_PROFILE_NATIVE_MODELS["general-purpose"]);
387
+ const implementerModel = modelFor(opts.fastImplementerModel, FAST_PROFILE_NATIVE_MODELS.implementer);
388
+ const reviewerModel = modelFor(opts.fastReviewerModel, FAST_PROFILE_NATIVE_MODELS.reviewer);
389
389
  const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
390
390
  const peersKey = peersKeyOf(opts.groupKeys);
391
- const searchMcp = opts.serverUrl ? { mcpServers: { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } } : {};
392
- const peersMcp = opts.serverUrl && opts.groupKeys.peers ? { mcpServers: { [peersKey]: httpEntryFor(opts.serverUrl, "peers", opts.nonce, opts.workspaceHeaderCmd) } } : {};
391
+ const searchMcpServers = opts.serverUrl ? { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } : void 0;
392
+ const peersMcpServers = opts.serverUrl && opts.groupKeys.peers ? { [peersKey]: httpEntryFor(opts.serverUrl, "peers", opts.nonce, opts.workspaceHeaderCmd) } : void 0;
393
393
  const oracleTool = opts.groupKeys.peers ? `mcp__${peersKey}__oracle` : void 0;
394
394
  const readSearchTools = [
395
395
  "Read",
396
396
  "Grep",
397
397
  "Glob",
398
- "Bash"
399
- ];
400
- const scoutTools = [...readSearchTools, `mcp__${searchKey}__*`];
401
- const reviewerTools = [...scoutTools, ...oracleTool ? [oracleTool] : []];
402
- const plannerTools = [
403
- ...readSearchTools,
398
+ "Bash",
404
399
  "WebFetch",
405
400
  "WebSearch",
406
- `mcp__${searchKey}__*`,
401
+ `mcp__${searchKey}__*`
402
+ ];
403
+ const planTools = [
404
+ ...readSearchTools,
407
405
  ...oracleTool ? [oracleTool] : [],
408
406
  "Agent"
409
407
  ];
410
- const reviewerPrompt = "You are the fast profile's repository-aware reviewer. Verify what is actually true by reading the code and running the relevant build, tests, or end-to-end reproduction. Find root causes rather than symptoms. Do not modify production code. Report severity-ranked findings with `file:line` evidence and a clear go/no-go. You do not have Advisor; independently reach your verdict from repository evidence. Use Oracle only as a last resort for one precise unresolved question after your own investigation. " + fileToolSteer("builds and reproductions") + " Do not spawn further agents.";
411
- const criticPrompt = "You are the fast profile's fresh-context cross-lab critic. Assess the supplied plan, design, diff, or decision against its stated constraints. Look for overlooked failure modes, unsupported assumptions, and simpler safer alternatives. Do not modify files, run mutating commands, or spawn agents. Return concise severity-ranked findings with `file:line` evidence where applicable. " + readOnlyToolSteer();
408
+ const oneM = (model) => model === FAST_PROFILE_MODELS.grok ? model : decorateGuaranteedOneM(model);
409
+ const effort = (name) => FAST_PROFILE_NATIVE_EFFORTS[name];
412
410
  const out = {
413
411
  Explore: {
414
- description: `Read-only exploration subagent running ${scoutModel}. Use for broad repository discovery before the lead drafts a plan; return conclusions with file:line evidence, not file dumps.`,
415
- prompt: "Investigate the repository read-only. Cast a wide net, then return a concise evidence packet for the lead: conclusions, load-bearing `file:line` citations, commands checked, and explicit gaps. Do not plan, edit, or spawn agents. " + readOnlyToolSteer(),
416
- tools: scoutTools,
412
+ description: `Fast-profile read-only exploration subagent running ${exploreModel}. Use for broad repository discovery; return conclusions with file:line evidence, not file dumps.`,
413
+ prompt: "You are the fast-profile read-only exploration subagent. Investigate the repository to answer the question: cast a wide net, then return a concise evidence packet with file:line citations and checked commands. Do not plan, edit, or spawn agents. " + readOnlyToolSteer(),
414
+ tools: readSearchTools,
417
415
  model: decorateGuaranteedOneM(LUNA_SCOUT_ALIAS_ID),
418
- effort: opts.scoutEffort ?? "high",
419
- ...searchMcp
420
- },
421
- implementer: {
422
- description: `Implementation subagent running ${implementerModel}. Use for well-specified mechanical changes after the plan is approved; implement and verify end to end in its own context.`,
423
- prompt: "Implement the approved, well-specified change surgically. Match surrounding style, minimize unrelated churn, use dedicated file tools, and run the relevant build/tests. For verification, you may invoke only the fast-profile `reviewer` or `critic` native subagent; do not invoke any other role or redesign the plan. Report changes, verification, and unresolved risk. " + fileToolSteer("builds"),
424
- model: decorateGuaranteedOneM(LUNA_IMPLEMENTER_ALIAS_ID),
425
- effort: opts.implementerEffort ?? "max"
416
+ effort: effort("Explore"),
417
+ ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
426
418
  },
427
- reviewer: {
428
- description: `Repository-aware reviewer running ${reviewerModel} at medium effort. Use after implementation or for failures that need reproduction, runtime checks, or repository context.`,
429
- prompt: reviewerPrompt,
430
- model: reviewerModel,
431
- effort: opts.reviewerEffort ?? "medium",
432
- tools: reviewerTools,
419
+ Plan: {
420
+ description: `Fast-profile plan architect running ${planModel} at high effort. Best suited to non-trivial changes where sequencing, interfaces, or verification benefit from a separate planning view.`,
421
+ prompt: "You are the fast-profile planning subagent. Given the goal, constraints, and available evidence, return an ordered implementation plan with affected files, invariants, risks, acceptance criteria, and verification. You do not have Advisor. Use Oracle only when one precise consequential uncertainty remains after your own investigation and available repository evidence cannot settle it. The Task/Agent capability is restricted by the fast in-session ACL: you may invoke only `Explore` or `reviewer`; do not invoke any other role. " + readOnlyToolSteer(),
422
+ tools: planTools,
423
+ model: oneM(planModel),
424
+ effort: effort("Plan"),
433
425
  mcpServers: {
434
- ...searchMcp.mcpServers ?? {},
435
- ...peersMcp.mcpServers ?? {}
426
+ ...searchMcpServers ?? {},
427
+ ...peersMcpServers ?? {}
436
428
  }
437
429
  },
438
- critic: {
439
- description: `Fresh-context cross-lab critic running ${criticModel} at medium effort. Use to challenge a plan, design, diff, or decision against its stated constraints and expose overlooked failure modes.`,
440
- prompt: criticPrompt,
441
- model: decorateGuaranteedOneM(FAST_CRITIC_ALIAS_ID),
442
- effort: opts.criticEffort ?? "medium",
443
- tools: scoutTools,
444
- ...searchMcp
430
+ "general-purpose": {
431
+ description: `Fast-profile general-purpose execution subagent running ${generalModel} at maximum effort. Best suited to mixed or multi-step execution tasks that do not fit narrower roles.`,
432
+ prompt: "You are the fast-profile general-purpose execution subagent. Work out what the task requires and deliver the outcome end to end using dedicated file tools, builds, tests, and git. For verification, you may invoke only `reviewer`. The lead owns final integration. " + fileToolSteer("builds, tests, and git"),
433
+ model: oneM(generalModel),
434
+ effort: effort("general-purpose"),
435
+ ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
445
436
  },
446
- planner: {
447
- description: `Plan consultant and approver running ${plannerModel}. Invoke only after Luna has done the repository legwork and drafted a plan; pass a handcrafted evidence packet and the complete draft. The lead must not implement until this agent returns APPROVE.`,
448
- prompt: "You are the fast profile's final plan consultant and approver, not a first-pass planner. The caller must provide the user goal, acceptance criteria, repository/domain constraints, Luna's `file:line` and command/test evidence, the complete draft plan, settled decisions, and one focused review question. Selectively verify disputed citations or narrow evidence gaps with read/search tools, but do not repeat broad discovery, edit files, or execute the plan. Return exactly one leading verdict: `APPROVE`, `REVISE`, or `NEED_MORE_CONTEXT`. APPROVE only when the plan is safe, ordered, complete, and verifiable. REVISE must give concrete corrections. NEED_MORE_CONTEXT must name the exact evidence Luna should collect. You do not have Advisor; independently reach your verdict from the evidence packet and selective verification. Use Oracle only as a last resort for one precise unresolved question after your own review. The Task/Agent capability is restricted by the fast in-session ACL: you may invoke only `reviewer`, `Explore`, or `critic`; do not invoke any other role. Bash is for evidence commands only; this is not a shell sandbox. " + readOnlyToolSteer(),
449
- tools: plannerTools,
450
- model: decorateGuaranteedOneM(plannerModel),
451
- effort: opts.plannerEffort ?? "high",
452
- mcpServers: {
453
- ...searchMcp.mcpServers ?? {},
454
- ...peersMcp.mcpServers ?? {}
455
- }
437
+ implementer: {
438
+ description: `Fast-profile implementation subagent running ${implementerModel} at high effort. Best suited to bounded coding changes consistent with repository conventions.`,
439
+ prompt: "You are the fast-profile implementation subagent. Implement the change surgically, matching surrounding code style, minimizing unrelated churn, and running builds/tests. For verification, you may invoke only `reviewer`; do not invoke any other role. Report exact changes and risks. " + fileToolSteer("builds, tests, and git"),
440
+ model: oneM(implementerModel),
441
+ effort: effort("implementer"),
442
+ ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
443
+ },
444
+ reviewer: {
445
+ description: `Fast-profile repository-aware reviewer running ${reviewerModel} at medium effort. Use for independent verification, test authoring, failure reproduction, or runtime checks.`,
446
+ prompt: "You are the fast-profile repository-aware reviewer. Verify what is actually true by reading code and running builds, tests, or reproductions. Report severity-ranked findings with `file:line` evidence and a clear go/no-go. You do not have Advisor. " + fileToolSteer("builds, tests, and reproductions") + " Do not spawn further agents.",
447
+ model: oneM(reviewerModel),
448
+ effort: effort("reviewer"),
449
+ tools: readSearchTools,
450
+ ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
456
451
  }
457
452
  };
458
- const roster = opts.nativeRoster == null ? new Set(FAST_PROFILE_NATIVE_AGENT_NAMES) : opts.nativeRoster instanceof Set ? opts.nativeRoster : new Set(opts.nativeRoster);
459
- if (roster) {
460
- for (const name of Object.keys(out)) if (!roster.has(name)) delete out[name];
453
+ if (opts.browseAvailable && opts.groupKeys.workers) {
454
+ const workersKey = workersKeyOf(opts.groupKeys);
455
+ out["worker-browse"] = {
456
+ description: dispatcherDescription("browse"),
457
+ prompt: dispatcherPrompt("browse", workersKey),
458
+ model: oneM(FAST_PROFILE_MODELS.luna),
459
+ effort: "high",
460
+ tools: dispatcherTools("browse", workersKey),
461
+ ...opts.serverUrl ? { mcpServers: { [workersKey]: httpEntryFor(opts.serverUrl, "workers", opts.nonce, opts.workspaceHeaderCmd) } } : {}
462
+ };
461
463
  }
464
+ const roster = opts.nativeRoster == null ? new Set(FAST_PROFILE_NATIVE_AGENT_NAMES) : opts.nativeRoster instanceof Set ? opts.nativeRoster : new Set(opts.nativeRoster);
465
+ for (const name of Object.keys(out)) if (name !== "worker-browse" && !roster.has(name)) delete out[name];
462
466
  return out;
463
467
  }
464
468
  /**
@@ -911,6 +915,11 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
911
915
  scribeModel: opts.scribeModel,
912
916
  implementerFastModel: opts.implementerFastModel,
913
917
  generalPurposeFastModel: opts.generalPurposeFastModel,
918
+ fastExploreModel: opts.fastExploreModel,
919
+ fastPlanModel: opts.fastPlanModel,
920
+ fastGeneralPurposeModel: opts.fastGeneralPurposeModel,
921
+ fastImplementerModel: opts.fastImplementerModel,
922
+ fastReviewerModel: opts.fastReviewerModel,
914
923
  nativeRoster: opts.nativeRoster,
915
924
  personaAllowlist: opts.personaAllowlist,
916
925
  includeCoordinator: opts.includeCoordinator,
@@ -918,12 +927,8 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
918
927
  implementerFastEffort: opts.implementerFastEffort,
919
928
  reviewerFastEffort: opts.reviewerFastEffort,
920
929
  fastProfile: opts.fastProfile,
921
- plannerModel: opts.plannerModel,
922
930
  implementerEffort: opts.implementerEffort,
923
931
  reviewerEffort: opts.reviewerEffort,
924
- plannerEffort: opts.plannerEffort,
925
- criticModel: opts.criticModel,
926
- criticEffort: opts.criticEffort,
927
932
  maxProfile: opts.maxProfile,
928
933
  maxExploreModel: opts.maxExploreModel,
929
934
  maxPlanModel: opts.maxPlanModel,
@@ -1986,6 +1991,83 @@ The dispatcher calls the worker once and relays its result verbatim.
1986
1991
  `
1987
1992
  };
1988
1993
  //#endregion
1994
+ //#region src/lib/injected-skills/artifact-review-skill.ts
1995
+ function buildArtifactReviewSkill(peersKey = "peers") {
1996
+ const toolPrefix = `mcp__${peersKey}__artifact_`;
1997
+ return {
1998
+ name: "gh-artifact-review",
1999
+ md: `---
2000
+ name: gh-artifact-review
2001
+ description: Reviews plans and artifacts in the ai-or-die panel. Defaults to authoring a self-contained HTML artifact (rich, annotatable, optionally interactive) and opening THAT for the human, then drains feedback with artifact_await, revises, and ends the loop. Use when running inside an ai-or-die tab and there is a plan, comparison, diagram, table, diff, or report the user should see before proceeding.
2002
+ user-invocable: true
2003
+ ---
2004
+
2005
+ # gh-artifact-review: human review in the ai-or-die panel
2006
+
2007
+ Use this when you finish a plan or produce something a user should review and you are inside an ai-or-die tab (the \`${toolPrefix}*\` tools drive a live panel). The human can click any block or select text to attach a comment, and can click declarative action controls you emit — both come back to you as typed events.
2008
+
2009
+ ## Default: present HTML, not raw markdown
2010
+
2011
+ HTML is the canonical review artifact — it renders richly and is annotatable element-by-element. When the content is anything visual or structured (a comparison, table, diagram, diff, dashboard, or a plan you want to look polished), **author a self-contained \`.html\` file** (inline CSS, no external deps, readable typography) and open THAT.
2012
+
2013
+ - Plan-mode plans: the panel auto-opens them already rendered to HTML — you do not need to convert them by hand.
2014
+ - Do not paste raw markdown into an \`.html\`; write real HTML (headings, lists, tables, \`<pre>\` for code). Opening a raw \`.md\` still renders, but a purpose-built HTML artifact reads better and annotates cleanly.
2015
+
2016
+ ## When to reach for an artifact
2017
+
2018
+ Default to one for anything easier to grasp visually than as terminal prose: plans, design proposals, comparisons / trade-offs, decisions that need the user's input, diagrams / architecture, tables, code diffs, reports. Skip it only for trivial one-line answers.
2019
+
2020
+ ## Playbooks (what a good artifact of each type contains)
2021
+
2022
+ - **plan**: goal, current state, the proposed approach (high-level decisions, not every line), then risks and open questions at the end.
2023
+ - **comparison**: options as columns, trade-offs as rows, current-vs-target where relevant, and an explicit recommendation. Do not make the reader infer the winner.
2024
+ - **table**: scannable rows, a sticky header, aligned numeric columns; group/section dense records rather than one flat wall.
2025
+ - **diagram**: boxes + arrows. Mermaid when automatic layout matters; positioned SVG/CSS when each node needs prose, code, or controls.
2026
+ - **code / diff**: \`<pre>\` with before/after or unified-diff styling; keep line context tight; call out the changed lines.
2027
+ - **report / dashboard**: lead with the headline number / verdict, then supporting detail; keep one idea per section.
2028
+
2029
+ ## Design system
2030
+
2031
+ Artifacts stay portable (they must render identically opened standalone), so do not depend on a server-injected theme. Pick the look in priority order: (1) a look the user named; (2) the **subject project's** own design system, its Tailwind / theme config, CSS variables / tokens, component library, or existing styled pages, especially when the artifact previews that app's UI; (3) only when both come up empty, clean readable defaults (system font stack, generous spacing, a single accent).
2032
+
2033
+ ## Loop
2034
+
2035
+ 1. Open: \`${toolPrefix}open\` with the absolute path of the \`.html\` (or the file). Pass \`mode:"interactive"\` when the HTML carries \`data-aod-*\` action controls (below). Relay the returned \`viewUrl\` and tell the user to review in the panel.
2036
+ 2. Drain: \`${toolPrefix}await\`. It long-holds for the human's next events and returns \`{events, status, cursor}\`. **Pass the returned \`cursor\` on your next call** so you only receive newer events; if \`events\` is empty, call again with that cursor.
2037
+ 3. Act on each event by \`kind\`:
2038
+ - \`comment\` — a free-text note anchored to the artifact (\`selector\`, quoted \`text\`, \`sourceLine\`); apply the requested change at that exact spot.
2039
+ - \`action\` — the human clicked a control you emitted (\`action\` verb, \`elementId\`, optional \`value\`; a multi-select submit arrives as one action carrying the selected set). Do what the verb means (approve a step, choose an option, apply a toggle set).
2040
+ 4. Reply: \`${toolPrefix}reply\` with a concise summary of what you changed. Optionally \`${toolPrefix}update({file})\` or \`({html})\` to replace the artifact content in place, or \`${toolPrefix}refresh\` to reload it from disk.
2041
+ 5. Repeat 2-4 until the user is satisfied; then \`${toolPrefix}end\`. Use \`${toolPrefix}dismiss\` to hide the panel while keeping the review alive (queued feedback preserved) if the user wants it out of the way without ending.
2042
+
2043
+ ### Push arrival (you do not have to be polling)
2044
+
2045
+ When you are idle at the prompt, panel feedback can arrive on its own as a new turn (the tab injects it). Structured actions that answer a pending decision are routed to you directly. Either way, the durable record is the \`${toolPrefix}await\` drain, so when in doubt call \`${toolPrefix}await\` (with your last cursor) to reconcile — it replays anything you missed.
2046
+
2047
+ ### \`artifact_poll\` (frozen legacy)
2048
+
2049
+ \`${toolPrefix}poll\` still resolves for back-compat but returns the OLD payload (human comments only, no structured actions). Prefer \`${toolPrefix}await\`.
2050
+
2051
+ ## Interactive controls (data-aod-* authoring)
2052
+
2053
+ To let the human act on the artifact (not just comment), emit declarative controls; the panel wires them and delivers a typed \`action\` event. No JS in the artifact.
2054
+
2055
+ - **choose-one (fires immediately):** each option is a button that posts the moment it is clicked.
2056
+ \`<button data-aod-action="choose" data-aod-group="decision-1" data-aod-id="opt-jwt" data-aod-value="jwt">JWT</button>\`
2057
+ - **multi-select (toggle then submit):** checkboxes sharing a \`data-aod-group\`, plus one submit button with the same group. The submit delivers ONE action carrying \`{group, selected:[{elementId, value?}]}\`.
2058
+ \`<input type="checkbox" data-aod-action="check" data-aod-group="opts" data-aod-id="a" data-aod-value="a">\` … \`<button data-aod-action="submit" data-aod-group="opts" data-aod-id="opts-submit">Apply</button>\`
2059
+ - **plan steps:** \`<li class="aod-step" data-aod-id="plan-step-3" data-source-line="14">\` with per-step \`data-aod-action="approve"/"skip"\` buttons.
2060
+ - **Required attrs:** \`data-aod-action\` (verb), \`data-aod-id\` (stable, echoed back as \`elementId\`; a control missing it is ignored), optional \`data-aod-value\`. Keep \`data-source-line\` for comment mapping.
2061
+
2062
+ ## Honest limits
2063
+
2064
+ - If a tool errors (e.g. \`NOT_IN_AIORDIE_TAB\`, \`UNREACHABLE\`, \`INVALID_REQUEST\`), report the code/message verbatim; do not claim the panel opened.
2065
+ - The panel is a review surface, not an approver: outward/irreversible actions still need explicit user confirmation.
2066
+ `
2067
+ };
2068
+ }
2069
+ buildArtifactReviewSkill();
2070
+ //#endregion
1989
2071
  //#region src/lib/claude-md-injection.ts
1990
2072
  /**
1991
2073
  * Marker fences for each injection block. The literal text of each
@@ -2048,11 +2130,11 @@ function joinClauses(parts) {
2048
2130
  * tier; reserve `reviewer` for the higher-stakes assessment it is there for. */
2049
2131
  function buildNativeReachClauses(opts) {
2050
2132
  if (opts.profile === "fast") return joinClauses([
2051
- "`Explore` to find or understand something in the repo",
2052
- "`implementer` for approved mechanical coding changes",
2053
- "`reviewer` for repository-aware verification, reproduction, and root-causing",
2054
- "`planner` as the Sol plan consultant and approver after Luna has drafted with evidence",
2055
- "`critic` for a fresh-context cross-lab challenge to a plan, design, diff, or decision"
2133
+ "`Explore` for broad discovery and repo investigation",
2134
+ "`Plan` for non-trivial sequencing, interfaces, migration risk, or acceptance criteria",
2135
+ "`general-purpose` for mixed execution tasks",
2136
+ "`implementer` for bounded coding changes",
2137
+ "`reviewer` for repository-aware verification, reproduction, and root-causing"
2056
2138
  ]);
2057
2139
  const clauses = [];
2058
2140
  const implementerFast = opts.implementerFastAvailable !== false;
@@ -2073,11 +2155,31 @@ function buildNativeReachClauses(opts) {
2073
2155
  if (opts.generalPurposeFastAvailable !== false) clauses.push(opts.budgetLead === true ? "`general-purpose-fast` for work no specialist fits, in preference to carrying it inline yourself" : "`general-purpose-fast` for work no specialist fits");
2074
2156
  return joinClauses(clauses);
2075
2157
  }
2158
+ /**
2159
+ * Build the operating-defaults directive for one launch, naming only the
2160
+ * natives that launch actually emitted.
2161
+ *
2162
+ * Callers must pass the SAME availability booleans they used for the `.md`
2163
+ * generation and `buildPeerAwarenessSnippet`, so the three surfaces cannot
2164
+ * disagree about which agents exist.
2165
+ */
2076
2166
  function buildOperatingDefaultsDirective(opts = {}) {
2077
- if (opts.profile === "max") 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\nMax launch profile. The lead owns the outcome and may use the roster as a set of complementary capabilities, not a required sequence: direct tools suit narrow facts; `Explore` broad discovery; `brainstorm` open design choices; `Plan` changes where sequencing, interfaces, or acceptance criteria benefit from a separate view; `implementer` bounded coding; `general-purpose` mixed work; and `reviewer` repository-aware verification. Independent work can run in parallel when that improves context isolation or latency. A fresh-context peer from another model family can be useful where correlated blind spots matter and deterministic evidence does not settle the issue; `peer-review-coordinator` is available when the risk justifies several lenses. Small or obvious tasks are often better handled directly, and model output remains evidence to synthesize rather than a vote. Each role's configured model is the deliberate default for role fit and diversity; overrides are most useful after a concrete mismatch. On every retained max surface, Gemini 3.1 Pro is replaced by Grok 4.6/high when available, otherwise Gemini 3.7 Flash 1M/high. Advisor is optional, non-binding counsel for one focused consequential uncertainty that the normal evidence and roles cannot settle; it has no approval or workflow authority, and a further consultation is useful only when materially new evidence changes the question.";
2167
+ if (opts.profile === "max") {
2168
+ const peersKey = opts.peersKey ?? opts.groupKeys?.peers ?? "peers";
2169
+ 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\nMax launch profile. The lead owns the outcome and may use the roster as a set of complementary capabilities, not a required sequence: direct tools suit narrow facts; `Explore` broad discovery; `brainstorm` open design choices; `Plan` changes where sequencing, interfaces, or acceptance criteria benefit from a separate view; `implementer` bounded coding; `general-purpose` mixed work; and `reviewer` (Grok 4.6/high with Luna 1M/max fallback) repository-aware verification. Independent work can run in parallel when that improves context isolation or latency. A fresh-context peer from another model family can be useful where correlated blind spots matter and deterministic evidence does not settle the issue; `peer-review-coordinator` is available when the risk justifies several lenses. Small or obvious tasks are often better handled directly, and model output remains evidence to synthesize rather than a vote. Each role's configured model is the deliberate default for role fit and diversity; overrides are most useful after a concrete mismatch. On every retained max surface, Gemini 3.1 Pro is replaced by Grok 4.6/high when available, otherwise Gemini 3.8 Flash 1M/high. Advisor is optional, non-binding counsel for one focused consequential uncertainty that the normal evidence and roles cannot settle; it has no approval or workflow authority, and a further consultation is useful only when materially new evidence changes the question." + (opts.artifactAvailable ? ` Live human review is available in the artifact panel via \`mcp__${peersKey}__artifact_*\`.` : "");
2170
+ }
2078
2171
  if (opts.profile === "fast") {
2079
- if (opts.fastRuntimeAvailable === false) 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\nFast profile runtime wiring is unavailable, so no injected Task roster, search, or Oracle is available. Work directly, use only tools actually listed in this session, verify with the repository's relevant build/tests before declaring done, report uncertainty, and do not invent unavailable capabilities.";
2080
- 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, and review to the right subagent. Reach for " + buildNativeReachClauses(opts) + "; Task subagents run in parallel. That keeps your own context free to reason and collaborate with the user. Delegate only when work is wide or slow; do trivial and surgical work directly. Luna investigates and drafts. The lead must give `planner` a handcrafted evidence packet and must not implement until `planner` returns `APPROVE`. Advisor is an optional, non-binding, lead-only transcript-aware sounding board for consequential unresolved uncertainty, conflicting evidence, or a genuinely stuck path; never use it for routine progress, waiting, directly verifiable facts, planner approval, reviewer verification, or completion ritual. `oracle` is exact Opus 5 (1M/high), stateless and last resort after the normal paths remain stuck. Before declaring work done, run the relevant build/tests and ask `reviewer` for repository-aware verification. Verify claims, report uncertainty, and stop named teammates when finished.";
2172
+ if (opts.fastRuntimeAvailable === false) 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\nFast profile runtime wiring is unavailable. Work directly, use only tools actually listed in this session, verify with the repository's relevant build/tests before declaring done, report uncertainty, and do not invent unavailable capabilities.";
2173
+ const peersKey = opts.peersKey ?? opts.groupKeys?.peers ?? "peers";
2174
+ const searchKey = opts.groupKeys?.search ?? "search";
2175
+ const browserKey = opts.groupKeys?.browser ?? "browser";
2176
+ const workersKey = opts.groupKeys?.workers ?? "workers";
2177
+ const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${browserKey}__*\` provides direct browser control.` : "";
2178
+ const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated autonomous browsing tasks through \`mcp__${workersKey}__browse\`.` : "";
2179
+ const artifactClause = opts.artifactAvailable ? ` \`mcp__${peersKey}__artifact_*\` provides human review in the artifact panel with auto-open on plan completion.` : "";
2180
+ 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\nFast launch profile. The lead coordinates execution across specialized native roles: " + buildNativeReachClauses(opts) + `. \`Plan\` is an advisory planning capability for nontrivial sequencing, interfaces, migration risk, or acceptance criteria, not an approval gate. Delegate only when work is wide, slow, or benefits from context isolation; do trivial, surgical, and narrow work directly. Independent Task subagents may run in parallel. Delegation graph: the lead may invoke all five; \`Plan\` may invoke \`Explore\` and \`reviewer\`; \`implementer\` and \`general-purpose\` may invoke \`reviewer\`; \`Explore\`, \`reviewer\`, and \`worker-browse\` cannot invoke native subagents.
2181
+
2182
+ Advisor is an optional, non-binding, lead-only transcript-aware sounding board for consequential unresolved uncertainty, conflicting evidence, or a genuinely stuck path; never use it for routine progress, waiting, directly verifiable facts, or completion ritual. \`mcp__${peersKey}__oracle\` is exact Opus 5 (1M/high), a stateless last-resort consultant available to the lead and \`Plan\` when required; \`reviewer\` and other subagents cannot call Oracle. \`mcp__${searchKey}__code\` provides semantic-first code search and \`mcp__${searchKey}__web\` provides citable sources.${browserClause}${workerBrowseClause}${artifactClause}\n\nVerify claims with concrete repository evidence and tests before declaring work done. Stop named teammates when finished.`;
2081
2183
  }
2082
2184
  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.";
2083
2185
  }
@@ -2086,23 +2188,12 @@ function buildOperatingDefaultsDirective(opts = {}) {
2086
2188
  * resolved; this const is the default for callers and tests that do not model
2087
2189
  * a thin catalog. */
2088
2190
  const OPERATING_DEFAULTS_DIRECTIVE = buildOperatingDefaultsDirective();
2089
- /**
2090
- * Condensed digest of OPERATING_DEFAULTS_DIRECTIVE for the spawned session's
2091
- * system prompt (--append-system-prompt). The FULL directive is prepended to
2092
- * the mirrored CLAUDE.md (read by the main agent and descendants); this digest
2093
- * keeps both behavioral directives at top salience without duplicating the full
2094
- * ~310-token block in the context window every turn. Points to the full copy.
2095
- *
2096
- * The unverifiable-claim rule is here rather than in CLAUDE.md alone because it
2097
- * fires at a moment that suppresses lookups: an agent racing to deliver a
2098
- * recommendation is precisely the one that will not stop to consult its project
2099
- * instructions, which is how the check got crowded out in the first place. It
2100
- * also closes a hole in the rule above it, which only covers claims that direct
2101
- * evidence CAN settle. The roster of critics, the lens-to-artifact match, and
2102
- * the reasoning stay in the directive; the always-resident copy carries only
2103
- * the trigger and the ritual exclusion.
2104
- */
2105
- 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.";
2191
+ const STANDARD_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.";
2192
+ function buildOperatingDefaultsDigest(opts = {}) {
2193
+ if (opts.profile === "max") return "## Operating defaults (the user's explicit direction and the domain's standards always override)\n\nMax launch profile. The lead owns the outcome and may use the roster as complementary capabilities: direct tools for narrow facts, `Explore` for broad discovery, `brainstorm` for open choices, `Plan` for a separate planning view, `implementer` and `general-purpose` for execution, and `reviewer` (Grok 4.6/high with Luna 1M/max fallback) for repository-aware verification. Delegate when work is wide or slow to protect the main thread's finite context; do trivial and surgical work directly. Prefer parallel delegation for independent work. Stop named teammates when finished.\n\nVerify claims against real evidence: run the code, check outputs and test results. Model output is evidence to synthesize rather than a vote. A fresh-context peer or `peer-review-coordinator` can reduce correlated blind spots on consequential decisions where judgment remains after direct evidence is in.\n\nAdvisor is optional, non-binding, primary-lead-only counsel for focused consequential uncertainty that direct evidence, Plan, reviewer, or peers cannot settle. It has no approval or workflow authority.";
2194
+ if (opts.profile === "fast") return "## Operating defaults (the user's explicit direction and the domain's standards always override)\n\nFast launch profile. The lead coordinates execution across `Explore` (broad discovery), `Plan` (sequencing, interfaces, migration risk, acceptance criteria), `general-purpose` (mixed execution), `implementer` (bounded coding), and `reviewer` (repository-aware verification). `Plan` is an advisory planning capability, not an approval gate. Delegate when work is wide or slow to protect main-thread context; do trivial and surgical work directly. Independent subagents may run in parallel. Stop named teammates when finished.\n\nVerify claims against real evidence: run relevant commands and tests. Advisor is optional, non-binding, transcript-aware, and lead-only for consequential unresolved uncertainty, not routine progress or workflow gates. `oracle` (Opus 5 1M/high) is a stateless last resort for the lead and `Plan` when normal paths remain stuck.";
2195
+ return STANDARD_OPERATING_DEFAULTS_DIGEST;
2196
+ }
2106
2197
  /**
2107
2198
  * Skip the helper if the user's `~/.claude/CLAUDE.md` (or, equivalently,
2108
2199
  * the would-be post-write file) has grown past this size.
@@ -2650,6 +2741,6 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
2650
2741
  return { written: true };
2651
2742
  }
2652
2743
  //#endregion
2653
- export { writePeerMcpRuntimeFiles as S, BUILTIN_SUBAGENT_DEFINITIONS as _, OPERATING_DEFAULTS_DIGEST as a, resolveGroupKeysFromMirror as b, buildOperatingDefaultsDirective as c, prependStyleDirectiveToMirroredClaudeMd as d, SEAMLESS_BUILTIN_TOOLS as f, sanitizeServeSettingsEnv as g, planModeAllowRules as h, writeInjectedSkill as i, prependArtifactPanelDirectiveToMirroredClaudeMd as l, injectAllowRules as m, INJECTED_SKILLS as n, appendPeerAwarenessToMirroredClaudeMd as o, configureServeDefaultPermissionMode as p, injectedSkillsForLaunch as r, appendToolbeltAwarenessToMirroredClaudeMd as s, injectAttributionSuppressionIntoSettingsFile as t, prependOperatingDefaultsToMirroredClaudeMd as u, injectPeerMcpIntoMirror as v, workersKeyOf as x, resolveCodexCliBackend as y };
2744
+ 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, INJECTED_SKILLS 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 };
2654
2745
 
2655
- //# sourceMappingURL=attribution-settings-B1xutIts.js.map
2746
+ //# sourceMappingURL=attribution-settings-C8iSwEAZ.js.map