github-router 0.3.292 → 0.3.295

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 (93) hide show
  1. package/dist/{attribution-settings-CpLUCi8R.js → attribution-settings-pkIop1NU.js} +69 -30
  2. package/dist/attribution-settings-pkIop1NU.js.map +1 -0
  3. package/dist/{auth-BwUHopJz.js → auth-CluG5e-l.js} +3 -3
  4. package/dist/{auth-BwUHopJz.js.map → auth-CluG5e-l.js.map} +1 -1
  5. package/dist/browser-ext/manifest.json +1 -1
  6. package/dist/{check-usage-BTda5753.js → check-usage-iOzfnKJe.js} +4 -4
  7. package/dist/{check-usage-BTda5753.js.map → check-usage-iOzfnKJe.js.map} +1 -1
  8. package/dist/{claude-_DYGKCw8.js → claude-DNmxk-Rm.js} +162 -42
  9. package/dist/claude-DNmxk-Rm.js.map +1 -0
  10. package/dist/{codex-rTJ8jW5G.js → codex-Dl4gpHn-.js} +5 -5
  11. package/dist/{codex-rTJ8jW5G.js.map → codex-Dl4gpHn-.js.map} +1 -1
  12. package/dist/{debug-B3UrZTHQ.js → debug-DsEwleGg.js} +2 -2
  13. package/dist/{debug-B3UrZTHQ.js.map → debug-DsEwleGg.js.map} +1 -1
  14. package/dist/engine-XnluJUs6.js +2 -0
  15. package/dist/{gate-discovery-Bjar5dgv.js → gate-discovery-WcduofL4.js} +5 -5
  16. package/dist/{gate-discovery-Bjar5dgv.js.map → gate-discovery-WcduofL4.js.map} +1 -1
  17. package/dist/{get-copilot-usage-CRrf1ZSC.js → get-copilot-usage-B7Z4XVWj.js} +2 -2
  18. package/dist/{get-copilot-usage-CRrf1ZSC.js.map → get-copilot-usage-B7Z4XVWj.js.map} +1 -1
  19. package/dist/hooks.mjs +180 -3
  20. package/dist/hooks.sha256 +1 -1
  21. package/dist/{internal-artifact-open-BsEQRvDi.js → internal-artifact-open-D6tKMg8v.js} +2 -2
  22. package/dist/{internal-artifact-open-BsEQRvDi.js.map → internal-artifact-open-D6tKMg8v.js.map} +1 -1
  23. package/dist/internal-fast-dispatch-guard-CPlCrTlU.js +2 -0
  24. package/dist/internal-fast-dispatch-guard-Xyu17k9X.js +187 -0
  25. package/dist/internal-fast-dispatch-guard-Xyu17k9X.js.map +1 -0
  26. package/dist/{internal-first-mate-guard-CVFFJriA.js → internal-first-mate-guard-C9BV7J4U.js} +3 -3
  27. package/dist/{internal-first-mate-guard-CVFFJriA.js.map → internal-first-mate-guard-C9BV7J4U.js.map} +1 -1
  28. package/dist/{internal-first-mate-guard-DJdX6t48.js → internal-first-mate-guard-WJApyc8j.js} +1 -1
  29. package/dist/{internal-plan-review-8TKDLco6.js → internal-plan-review-t3PuNfuL.js} +3 -3
  30. package/dist/{internal-plan-review-8TKDLco6.js.map → internal-plan-review-t3PuNfuL.js.map} +1 -1
  31. package/dist/{internal-prompt-submit-Da7pxqua.js → internal-prompt-submit-C3KovHQG.js} +4 -4
  32. package/dist/{internal-prompt-submit-Da7pxqua.js.map → internal-prompt-submit-C3KovHQG.js.map} +1 -1
  33. package/dist/{internal-session-bind-BOFytA1f.js → internal-session-bind-d2uoja8I.js} +2 -2
  34. package/dist/{internal-session-bind-BOFytA1f.js.map → internal-session-bind-d2uoja8I.js.map} +1 -1
  35. package/dist/{internal-stop-hook-DrX2xlj0.js → internal-stop-hook-DJFtGCsE.js} +5 -5
  36. package/dist/{internal-stop-hook-DrX2xlj0.js.map → internal-stop-hook-DJFtGCsE.js.map} +1 -1
  37. package/dist/{internal-stop-review-CdouacHL.js → internal-stop-review-YtDUGXpX.js} +2 -2
  38. package/dist/{internal-stop-review-CdouacHL.js.map → internal-stop-review-YtDUGXpX.js.map} +1 -1
  39. package/dist/{internal-worker-guard-Bx-itoP8.js → internal-worker-guard-CdkeS9PN.js} +2 -2
  40. package/dist/{internal-worker-guard-Bx-itoP8.js.map → internal-worker-guard-CdkeS9PN.js.map} +1 -1
  41. package/dist/{internal-workspace-header-8WT0iB5K.js → internal-workspace-header-tuBXJV22.js} +2 -2
  42. package/dist/{internal-workspace-header-8WT0iB5K.js.map → internal-workspace-header-tuBXJV22.js.map} +1 -1
  43. package/dist/{lifecycle-nuOHfwgj.js → lifecycle-Bg6doY3-.js} +2 -2
  44. package/dist/{lifecycle-nuOHfwgj.js.map → lifecycle-Bg6doY3-.js.map} +1 -1
  45. package/dist/lifecycle-CGLt1cJQ.js +2 -0
  46. package/dist/{lifecycle-LeSfa7wH.js → lifecycle-CM9eTzvk.js} +2 -2
  47. package/dist/{lifecycle-LeSfa7wH.js.map → lifecycle-CM9eTzvk.js.map} +1 -1
  48. package/dist/lifecycle-DoUwpVDB.js +2 -0
  49. package/dist/main.js +19 -18
  50. package/dist/main.js.map +1 -1
  51. package/dist/{mcp-workspace-header-q34H_4wL.js → mcp-workspace-header-dERl2YTT.js} +2 -2
  52. package/dist/{mcp-workspace-header-q34H_4wL.js.map → mcp-workspace-header-dERl2YTT.js.map} +1 -1
  53. package/dist/{models-hhJcrZhr.js → models-DZ4hYsR7.js} +3 -3
  54. package/dist/{models-hhJcrZhr.js.map → models-DZ4hYsR7.js.map} +1 -1
  55. package/dist/{orchestration-pzbrKkgD.js → orchestration-BiGCEwbH.js} +2 -2
  56. package/dist/{orchestration-pzbrKkgD.js.map → orchestration-BiGCEwbH.js.map} +1 -1
  57. package/dist/{paths-BH4J7slC.js → paths-Ci485qSJ.js} +4 -4
  58. package/dist/{paths-BH4J7slC.js.map → paths-Ci485qSJ.js.map} +1 -1
  59. package/dist/paths-GD7bgGGy.js +2 -0
  60. package/dist/{peer-mcp-personas-CHbl6MwM.js → peer-mcp-personas-BwNtC8jt.js} +411 -84
  61. package/dist/peer-mcp-personas-BwNtC8jt.js.map +1 -0
  62. package/dist/{plan-review-hook-CfcanA7_.js → plan-review-hook-DuW0pSoM.js} +3 -3
  63. package/dist/{plan-review-hook-CfcanA7_.js.map → plan-review-hook-DuW0pSoM.js.map} +1 -1
  64. package/dist/{prompt-submit-hook-Bqf9ORgb.js → prompt-submit-hook-IMl7ssfr.js} +3 -3
  65. package/dist/{prompt-submit-hook-Bqf9ORgb.js.map → prompt-submit-hook-IMl7ssfr.js.map} +1 -1
  66. package/dist/{provision-BYFd9nPK.js → provision-DeNqzvSM.js} +4 -4
  67. package/dist/{provision-BYFd9nPK.js.map → provision-DeNqzvSM.js.map} +1 -1
  68. package/dist/{self-invocation-DhO1Z8iD.js → self-invocation-DAB_od0C.js} +2 -2
  69. package/dist/{self-invocation-DhO1Z8iD.js.map → self-invocation-DAB_od0C.js.map} +1 -1
  70. package/dist/{serve-BWMxDLnD.js → serve-BS5EmCpM.js} +12 -12
  71. package/dist/{serve-BWMxDLnD.js.map → serve-BS5EmCpM.js.map} +1 -1
  72. package/dist/{server-setup-CqlaZukJ.js → server-setup-DsGJnJ_O.js} +398 -283
  73. package/dist/server-setup-DsGJnJ_O.js.map +1 -0
  74. package/dist/{start-5MgGT4IF.js → start-vJdt2MiM.js} +3 -3
  75. package/dist/{start-5MgGT4IF.js.map → start-vJdt2MiM.js.map} +1 -1
  76. package/dist/{stop-gate-hook-BiBp5aGm.js → stop-gate-hook-DQnh_KfI.js} +3 -3
  77. package/dist/{stop-gate-hook-BiBp5aGm.js.map → stop-gate-hook-DQnh_KfI.js.map} +1 -1
  78. package/dist/{stop-gate-policy-BGd6b5hR.js → stop-gate-policy-DMr3KVmw.js} +2 -2
  79. package/dist/{stop-gate-policy-BGd6b5hR.js.map → stop-gate-policy-DMr3KVmw.js.map} +1 -1
  80. package/dist/{token-8drORhXg.js → token-BtJhjXXu.js} +54 -7
  81. package/dist/token-BtJhjXXu.js.map +1 -0
  82. package/dist/{worker-dispatch-D5fGroNr.js → worker-dispatch-BEHkTbnH.js} +2 -2
  83. package/dist/{worker-dispatch-D5fGroNr.js.map → worker-dispatch-BEHkTbnH.js.map} +1 -1
  84. package/package.json +1 -1
  85. package/dist/attribution-settings-CpLUCi8R.js.map +0 -1
  86. package/dist/claude-_DYGKCw8.js.map +0 -1
  87. package/dist/engine-C9axTIu7.js +0 -2
  88. package/dist/lifecycle-C8fOsQke.js +0 -2
  89. package/dist/lifecycle-D4Yc1aap.js +0 -2
  90. package/dist/paths-DJZoXfAS.js +0 -2
  91. package/dist/peer-mcp-personas-CHbl6MwM.js.map +0 -1
  92. package/dist/server-setup-CqlaZukJ.js.map +0 -1
  93. package/dist/token-8drORhXg.js.map +0 -1
@@ -1,10 +1,9 @@
1
- import { $t as CONDENSED_OPERATING_SEQUENCE, Sn as withOneMSuffix, a as buildAgentPrompt, en as DEFINITION_OF_GREATNESS, l as personasFor, n as MCP_GROUPS, t as GROUP_META, xn as oneMContextDisabled } from "./peer-mcp-personas-CHbl6MwM.js";
2
- import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-BH4J7slC.js";
3
- import { f as LUNA_IMPLEMENTER_ALIAS_ID, p as LUNA_SCOUT_ALIAS_ID } from "./server-setup-CqlaZukJ.js";
4
- import "./self-invocation-DhO1Z8iD.js";
5
- import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-BYFd9nPK.js";
6
- import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-q34H_4wL.js";
7
- import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-D5fGroNr.js";
1
+ import { It as LUNA_SCOUT_ALIAS_ID, Ln as oneMContextDisabled, Pt as LUNA_IMPLEMENTER_ALIAS_ID, Rn as withOneMSuffix, _n as DEFINITION_OF_GREATNESS, a as buildAgentPrompt, gn as CONDENSED_OPERATING_SEQUENCE, jt as FAST_CRITIC_ALIAS_ID, l as personasFor, n as MCP_GROUPS, t as GROUP_META } from "./peer-mcp-personas-BwNtC8jt.js";
2
+ import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-Ci485qSJ.js";
3
+ import "./self-invocation-DAB_od0C.js";
4
+ import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-DeNqzvSM.js";
5
+ import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-dERl2YTT.js";
6
+ import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-BEHkTbnH.js";
8
7
  import consola from "consola";
9
8
  import path from "node:path";
10
9
  import { randomBytes } from "node:crypto";
@@ -280,27 +279,43 @@ function buildFastProfileAgentDefinitions(opts) {
280
279
  const implementerModel = nonEmptyModel(opts.nativeSubagentModel);
281
280
  const reviewerModel = nonEmptyModel(opts.reviewerModel);
282
281
  const plannerModel = nonEmptyModel(opts.plannerModel);
283
- if (!scoutModel || !implementerModel || !reviewerModel || !plannerModel) throw new Error("fast profile requires resolved scout, implementer, reviewer, and planner models");
282
+ const criticModel = nonEmptyModel(opts.criticModel);
283
+ if (!scoutModel || !implementerModel || !reviewerModel || !plannerModel || !criticModel) throw new Error("fast profile requires resolved scout, implementer, reviewer, planner, and critic models");
284
284
  const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
285
285
  const peersKey = peersKeyOf(opts.groupKeys);
286
286
  const searchMcp = opts.serverUrl ? { mcpServers: { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } } : {};
287
287
  const peersMcp = opts.serverUrl && opts.groupKeys.peers ? { mcpServers: { [peersKey]: httpEntryFor(opts.serverUrl, "peers", opts.nonce, opts.workspaceHeaderCmd) } } : {};
288
288
  const oracleTool = opts.groupKeys.peers ? `mcp__${peersKey}__oracle` : void 0;
289
- const readOnlyTools = readOnlyToolAllowlist(searchKey);
290
- const consultTools = oracleTool ? [...readOnlyTools, oracleTool] : readOnlyTools;
291
- 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. Use Oracle only as a last resort after your own investigation and Advisor have not resolved one precise question. " + fileToolSteer("builds and reproductions") + " Do not spawn further agents.";
289
+ const readSearchTools = [
290
+ "Read",
291
+ "Grep",
292
+ "Glob",
293
+ "Bash"
294
+ ];
295
+ const scoutTools = [...readSearchTools, `mcp__${searchKey}__*`];
296
+ const reviewerTools = [...scoutTools, ...oracleTool ? [oracleTool] : []];
297
+ const plannerTools = [
298
+ ...readSearchTools,
299
+ "WebFetch",
300
+ "WebSearch",
301
+ `mcp__${searchKey}__*`,
302
+ ...oracleTool ? [oracleTool] : [],
303
+ "Agent"
304
+ ];
305
+ 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.";
306
+ 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();
292
307
  const out = {
293
308
  scout: {
294
309
  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.`,
295
310
  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(),
296
- tools: readOnlyTools,
311
+ tools: scoutTools,
297
312
  model: decorateGuaranteedOneM(LUNA_SCOUT_ALIAS_ID),
298
313
  effort: opts.scoutEffort ?? "high",
299
314
  ...searchMcp
300
315
  },
301
316
  implementer: {
302
317
  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.`,
303
- prompt: "Implement the approved, well-specified change surgically. Match surrounding style, minimize unrelated churn, use dedicated file tools, and run the relevant build/tests. Do not redesign the plan or spawn more agents. Report changes, verification, and unresolved risk. " + fileToolSteer("builds"),
318
+ 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"),
304
319
  model: decorateGuaranteedOneM(LUNA_IMPLEMENTER_ALIAS_ID),
305
320
  effort: opts.implementerEffort ?? "max"
306
321
  },
@@ -309,12 +324,24 @@ function buildFastProfileAgentDefinitions(opts) {
309
324
  prompt: reviewerPrompt,
310
325
  model: reviewerModel,
311
326
  effort: opts.reviewerEffort ?? "medium",
312
- ...peersMcp
327
+ tools: reviewerTools,
328
+ mcpServers: {
329
+ ...searchMcp.mcpServers ?? {},
330
+ ...peersMcp.mcpServers ?? {}
331
+ }
332
+ },
333
+ critic: {
334
+ 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.`,
335
+ prompt: criticPrompt,
336
+ model: decorateGuaranteedOneM(FAST_CRITIC_ALIAS_ID),
337
+ effort: opts.criticEffort ?? "medium",
338
+ tools: scoutTools,
339
+ ...searchMcp
313
340
  },
314
341
  planner: {
315
342
  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.`,
316
- 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. Use Oracle only as a last resort for one precise unresolved question after your own review and Advisor are insufficient. Do not spawn further agents. " + readOnlyToolSteer(),
317
- tools: consultTools,
343
+ 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`, `scout`, or `critic`; do not invoke any other role. Bash is for evidence commands only; this is not a shell sandbox. " + readOnlyToolSteer(),
344
+ tools: plannerTools,
318
345
  model: decorateGuaranteedOneM(plannerModel),
319
346
  effort: opts.plannerEffort ?? "high",
320
347
  mcpServers: {
@@ -789,6 +816,8 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
789
816
  implementerEffort: opts.implementerEffort,
790
817
  reviewerEffort: opts.reviewerEffort,
791
818
  plannerEffort: opts.plannerEffort,
819
+ criticModel: opts.criticModel,
820
+ criticEffort: opts.criticEffort,
792
821
  nonce,
793
822
  codexHome,
794
823
  serverUrl,
@@ -796,15 +825,24 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
796
825
  });
797
826
  await fs.unlink(mcpConfigPath).catch(() => {});
798
827
  await fs.unlink(agentsPath).catch(() => {});
799
- await writeRuntimeFileSecure(mcpConfigPath, JSON.stringify(mcpConfig, null, 2));
800
- await writeRuntimeFileSecure(agentsPath, JSON.stringify(agents, null, 2));
801
- const mdResult = await writePeerAgentMdFiles(opts.builtinSubagents ? {
802
- ...agents,
803
- ...opts.builtinSubagents
804
- } : agents, {
805
- agentsDir: opts.agentsDir,
806
- fileSuffix
807
- });
828
+ let mdResult;
829
+ try {
830
+ await writeRuntimeFileSecure(mcpConfigPath, JSON.stringify(mcpConfig, null, 2));
831
+ await writeRuntimeFileSecure(agentsPath, JSON.stringify(agents, null, 2));
832
+ mdResult = await writePeerAgentMdFiles(opts.builtinSubagents ? {
833
+ ...agents,
834
+ ...opts.builtinSubagents
835
+ } : agents, {
836
+ agentsDir: opts.agentsDir,
837
+ fileSuffix
838
+ });
839
+ } catch (err) {
840
+ if (mdResult) await mdResult.cleanup().catch(() => {});
841
+ await Promise.allSettled([fs.unlink(mcpConfigPath), fs.unlink(agentsPath)]);
842
+ throw err;
843
+ }
844
+ const completeMdResult = mdResult;
845
+ if (!completeMdResult) throw new Error("peer MCP agent files were not generated");
808
846
  const personas = opts.fastProfile ? [] : personasFor({
809
847
  codexCli: opts.codexCli,
810
848
  geminiAvailable: opts.geminiAvailable,
@@ -815,13 +853,13 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
815
853
  await Promise.allSettled([
816
854
  fs.unlink(mcpConfigPath),
817
855
  fs.unlink(agentsPath),
818
- mdResult.cleanup()
856
+ completeMdResult.cleanup()
819
857
  ]);
820
858
  };
821
859
  return {
822
860
  mcpConfigPath,
823
861
  agentsPath,
824
- agentMdPaths: mdResult.paths,
862
+ agentMdPaths: completeMdResult.paths,
825
863
  nonce,
826
864
  personas,
827
865
  cleanup
@@ -1883,7 +1921,8 @@ function buildNativeReachClauses(opts) {
1883
1921
  "`scout` to find or understand something in the repo",
1884
1922
  "`implementer` for approved mechanical coding changes",
1885
1923
  "`reviewer` for repository-aware verification, reproduction, and root-causing",
1886
- "`planner` as the Sol plan consultant and approver after Luna has drafted with evidence"
1924
+ "`planner` as the Sol plan consultant and approver after Luna has drafted with evidence",
1925
+ "`critic` for a fresh-context cross-lab challenge to a plan, design, diff, or decision"
1887
1926
  ]);
1888
1927
  const clauses = [];
1889
1928
  const implementerFast = opts.implementerFastAvailable !== false;
@@ -1907,7 +1946,7 @@ function buildNativeReachClauses(opts) {
1907
1946
  function buildOperatingDefaultsDirective(opts = {}) {
1908
1947
  if (opts.profile === "fast") {
1909
1948
  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.";
1910
- 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 the transcript-aware brainstorming, sounding-board, fresh-look, uncertainty, and stuck path. `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.";
1949
+ 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.";
1911
1950
  }
1912
1951
  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.";
1913
1952
  }
@@ -2476,4 +2515,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
2476
2515
  //#endregion
2477
2516
  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 };
2478
2517
 
2479
- //# sourceMappingURL=attribution-settings-CpLUCi8R.js.map
2518
+ //# sourceMappingURL=attribution-settings-pkIop1NU.js.map