github-router 0.3.331 → 0.3.333

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 (132) hide show
  1. package/README.md +4 -2
  2. package/dist/{aic-ledger-CsBx1crE.js → aic-ledger-D4fmThbS.js} +2 -2
  3. package/dist/{aic-ledger-CsBx1crE.js.map → aic-ledger-D4fmThbS.js.map} +1 -1
  4. package/dist/{attribution-settings-7dFpObGh.js → attribution-settings-Cu9cYRHf.js} +149 -98
  5. package/dist/attribution-settings-Cu9cYRHf.js.map +1 -0
  6. package/dist/{auth-xgFZGZbf.js → auth-DjKEIiqG.js} +4 -4
  7. package/dist/{auth-xgFZGZbf.js.map → auth-DjKEIiqG.js.map} +1 -1
  8. package/dist/balanced-profile-contract-CqFRoCUe.js +133 -0
  9. package/dist/balanced-profile-contract-CqFRoCUe.js.map +1 -0
  10. package/dist/bluebird-client-DpYl1YmJ.js +1163 -0
  11. package/dist/bluebird-client-DpYl1YmJ.js.map +1 -0
  12. package/dist/bluebird-client-bn9Yv6Cb.js +2 -0
  13. package/dist/browser-ext/manifest.json +1 -1
  14. package/dist/{check-usage-vUDk6oV7.js → check-usage-B7UrDwD8.js} +4 -4
  15. package/dist/{check-usage-vUDk6oV7.js.map → check-usage-B7UrDwD8.js.map} +1 -1
  16. package/dist/{claude-C3-yBGzw.js → claude-BObYdG2J.js} +43 -34
  17. package/dist/claude-BObYdG2J.js.map +1 -0
  18. package/dist/{codex-C3hcVSOm.js → codex-JnNE58nu.js} +12 -8
  19. package/dist/codex-JnNE58nu.js.map +1 -0
  20. package/dist/{copilot-discount-0lG67i9O.js → copilot-discount-BcUa3f-k.js} +2 -2
  21. package/dist/{copilot-discount-0lG67i9O.js.map → copilot-discount-BcUa3f-k.js.map} +1 -1
  22. package/dist/{debug-a737qcCC.js → debug-CigFsS-h.js} +2 -2
  23. package/dist/{debug-a737qcCC.js.map → debug-CigFsS-h.js.map} +1 -1
  24. package/dist/engine-DApePSq4.js +2 -0
  25. package/dist/{exec-COUT4QsS.js → exec-MCU1H-KZ.js} +63 -13
  26. package/dist/exec-MCU1H-KZ.js.map +1 -0
  27. package/dist/{gate-discovery-BUhtwkyE.js → gate-discovery-CljRUZjm.js} +6 -6
  28. package/dist/{gate-discovery-BUhtwkyE.js.map → gate-discovery-CljRUZjm.js.map} +1 -1
  29. package/dist/{get-copilot-usage-VKU2IvuE.js → get-copilot-usage-CGaV01dC.js} +4 -3
  30. package/dist/{get-copilot-usage-VKU2IvuE.js.map → get-copilot-usage-CGaV01dC.js.map} +1 -1
  31. package/dist/hooks.mjs +142 -30
  32. package/dist/hooks.sha256 +1 -1
  33. package/dist/{index-cmd-k3oWl0n4.js → index-cmd-DXYWgKS6.js} +5 -5
  34. package/dist/{index-cmd-k3oWl0n4.js.map → index-cmd-DXYWgKS6.js.map} +1 -1
  35. package/dist/{internal-aic-status-Cfl5HiAN.js → internal-aic-status-Bma0r0ZS.js} +6 -5
  36. package/dist/internal-aic-status-Bma0r0ZS.js.map +1 -0
  37. package/dist/{internal-artifact-open-CX2fRP_D.js → internal-artifact-open-lta2UPnE.js} +2 -2
  38. package/dist/{internal-artifact-open-CX2fRP_D.js.map → internal-artifact-open-lta2UPnE.js.map} +1 -1
  39. package/dist/{internal-fast-dispatch-guard-Cxattkm4.js → internal-fast-dispatch-guard-BYRYbsFh.js} +1 -1
  40. package/dist/{internal-fast-dispatch-guard-BoTxjO6b.js → internal-fast-dispatch-guard-BuRlhFek.js} +27 -5
  41. package/dist/internal-fast-dispatch-guard-BuRlhFek.js.map +1 -0
  42. package/dist/{internal-first-mate-guard-D_JFcrl_.js → internal-first-mate-guard-BEwDjHfX.js} +3 -3
  43. package/dist/{internal-first-mate-guard-D_JFcrl_.js.map → internal-first-mate-guard-BEwDjHfX.js.map} +1 -1
  44. package/dist/{internal-first-mate-guard-97qsseTP.js → internal-first-mate-guard-CAefr6Ce.js} +1 -1
  45. package/dist/{internal-max-dispatch-guard-DQMyOds8.js → internal-max-dispatch-guard-6ZCEanI6.js} +1 -1
  46. package/dist/{internal-max-dispatch-guard-Cxe8h12x.js → internal-max-dispatch-guard-CtIO7pm1.js} +3 -3
  47. package/dist/{internal-max-dispatch-guard-Cxe8h12x.js.map → internal-max-dispatch-guard-CtIO7pm1.js.map} +1 -1
  48. package/dist/{internal-plan-review-O2dwnQv3.js → internal-plan-review-jIts3KYd.js} +3 -3
  49. package/dist/{internal-plan-review-O2dwnQv3.js.map → internal-plan-review-jIts3KYd.js.map} +1 -1
  50. package/dist/{internal-prompt-submit-CD0UFkT-.js → internal-prompt-submit-BfoWVyzs.js} +10 -7
  51. package/dist/internal-prompt-submit-BfoWVyzs.js.map +1 -0
  52. package/dist/{internal-session-bind-CHIOd5ys.js → internal-session-bind-IpZ5hJzR.js} +2 -2
  53. package/dist/{internal-session-bind-CHIOd5ys.js.map → internal-session-bind-IpZ5hJzR.js.map} +1 -1
  54. package/dist/{internal-stop-hook-DBrlosd0.js → internal-stop-hook-Cz88dW5S.js} +6 -6
  55. package/dist/{internal-stop-hook-DBrlosd0.js.map → internal-stop-hook-Cz88dW5S.js.map} +1 -1
  56. package/dist/{internal-stop-review-a3rpzzhd.js → internal-stop-review-BtGDVrv-.js} +2 -2
  57. package/dist/{internal-stop-review-a3rpzzhd.js.map → internal-stop-review-BtGDVrv-.js.map} +1 -1
  58. package/dist/{internal-worker-guard-BY5seBqp.js → internal-worker-guard-C0FJ4b29.js} +2 -2
  59. package/dist/{internal-worker-guard-BY5seBqp.js.map → internal-worker-guard-C0FJ4b29.js.map} +1 -1
  60. package/dist/{internal-workspace-header-CPZNphnk.js → internal-workspace-header-tvJVAXpv.js} +2 -2
  61. package/dist/{internal-workspace-header-CPZNphnk.js.map → internal-workspace-header-tvJVAXpv.js.map} +1 -1
  62. package/dist/{lifecycle-D8vQXfeC.js → lifecycle-BqWTXaeC.js} +3 -3
  63. package/dist/{lifecycle-D8vQXfeC.js.map → lifecycle-BqWTXaeC.js.map} +1 -1
  64. package/dist/lifecycle-DMRZswwc.js +2 -0
  65. package/dist/lifecycle-FT75ohVw.js +2 -0
  66. package/dist/{lifecycle-MmpJWRcl.js → lifecycle-kpLzHUgD.js} +2 -2
  67. package/dist/{lifecycle-MmpJWRcl.js.map → lifecycle-kpLzHUgD.js.map} +1 -1
  68. package/dist/main.js +21 -21
  69. package/dist/{max-profile-contract-Bl7I_EOC.js → max-profile-contract-MJJt0zm-.js} +2 -2
  70. package/dist/{max-profile-contract-Bl7I_EOC.js.map → max-profile-contract-MJJt0zm-.js.map} +1 -1
  71. package/dist/{mcp-workspace-header-DX_mD0JT.js → mcp-workspace-header-B77WqVFw.js} +2 -2
  72. package/dist/{mcp-workspace-header-DX_mD0JT.js.map → mcp-workspace-header-B77WqVFw.js.map} +1 -1
  73. package/dist/{models-BjCRO0AC.js → models-68HDOEPK.js} +3 -3
  74. package/dist/{models-BjCRO0AC.js.map → models-68HDOEPK.js.map} +1 -1
  75. package/dist/{orchestration-Dn5v8c0a.js → orchestration-Ccmfslh4.js} +3 -3
  76. package/dist/{orchestration-Dn5v8c0a.js.map → orchestration-Ccmfslh4.js.map} +1 -1
  77. package/dist/{paths-P5ajjpzU.js → paths-CpbTHKeP.js} +3 -3
  78. package/dist/{paths-P5ajjpzU.js.map → paths-CpbTHKeP.js.map} +1 -1
  79. package/dist/paths-Dfivvq21.js +2 -0
  80. package/dist/{peer-mcp-personas-Dztywua2.js → peer-mcp-personas-CorhWEhi.js} +211 -154
  81. package/dist/peer-mcp-personas-CorhWEhi.js.map +1 -0
  82. package/dist/{plan-review-hook-CfZBvsHd.js → plan-review-hook-ciat1jgZ.js} +4 -4
  83. package/dist/{plan-review-hook-CfZBvsHd.js.map → plan-review-hook-ciat1jgZ.js.map} +1 -1
  84. package/dist/{prompt-submit-hook-CRH6m7Vz.js → prompt-submit-hook-C8q_hDOv.js} +21 -17
  85. package/dist/prompt-submit-hook-C8q_hDOv.js.map +1 -0
  86. package/dist/{provision-CjBt5wEK.js → provision-DwNx-PZA.js} +7 -6
  87. package/dist/provision-DwNx-PZA.js.map +1 -0
  88. package/dist/{self-invocation-DBWyjvGm.js → self-invocation-DIUyoRgL.js} +2 -2
  89. package/dist/{self-invocation-DBWyjvGm.js.map → self-invocation-DIUyoRgL.js.map} +1 -1
  90. package/dist/{serve-C3LCkM-o.js → serve-Cu19zfEL.js} +33 -21
  91. package/dist/serve-Cu19zfEL.js.map +1 -0
  92. package/dist/{server-setup-DrSUlFZ_.js → server-setup-Dz7chd0b.js} +76 -37
  93. package/dist/server-setup-Dz7chd0b.js.map +1 -0
  94. package/dist/{service-backend-ByT0gUc8.js → service-backend-7SPDLUB9.js} +7 -7
  95. package/dist/service-backend-7SPDLUB9.js.map +1 -0
  96. package/dist/{start-CY1nnbB4.js → start-BvN5FA6O.js} +4 -4
  97. package/dist/{start-CY1nnbB4.js.map → start-BvN5FA6O.js.map} +1 -1
  98. package/dist/{state-BlMpEFAt.js → state-CVp30CBF.js} +7 -1
  99. package/dist/state-CVp30CBF.js.map +1 -0
  100. package/dist/{stop-gate-hook-BACb8dlj.js → stop-gate-hook-DZVfKoSh.js} +4 -4
  101. package/dist/{stop-gate-hook-BACb8dlj.js.map → stop-gate-hook-DZVfKoSh.js.map} +1 -1
  102. package/dist/{stop-gate-policy-D6jIeOXB.js → stop-gate-policy-Gd_cNT9-.js} +3 -3
  103. package/dist/{stop-gate-policy-D6jIeOXB.js.map → stop-gate-policy-Gd_cNT9-.js.map} +1 -1
  104. package/dist/{token-Dlb_84hW.js → token-DATA_OQK.js} +5 -383
  105. package/dist/token-DATA_OQK.js.map +1 -0
  106. package/dist/upstream-retry-i1k1Xai2.js +383 -0
  107. package/dist/upstream-retry-i1k1Xai2.js.map +1 -0
  108. package/dist/{worker-dispatch-DtjQchvM.js → worker-dispatch-lRhno09M.js} +2 -2
  109. package/dist/{worker-dispatch-DtjQchvM.js.map → worker-dispatch-lRhno09M.js.map} +1 -1
  110. package/docs/bluebird-search.md +338 -0
  111. package/package.json +3 -2
  112. package/dist/attribution-settings-7dFpObGh.js.map +0 -1
  113. package/dist/claude-C3-yBGzw.js.map +0 -1
  114. package/dist/codex-C3hcVSOm.js.map +0 -1
  115. package/dist/engine-CPdWX70n.js +0 -2
  116. package/dist/exec-COUT4QsS.js.map +0 -1
  117. package/dist/fast-profile-contract-DmsyQQrw.js +0 -61
  118. package/dist/fast-profile-contract-DmsyQQrw.js.map +0 -1
  119. package/dist/internal-aic-status-Cfl5HiAN.js.map +0 -1
  120. package/dist/internal-fast-dispatch-guard-BoTxjO6b.js.map +0 -1
  121. package/dist/internal-prompt-submit-CD0UFkT-.js.map +0 -1
  122. package/dist/lifecycle-B2eB8nRg.js +0 -2
  123. package/dist/lifecycle-Dz-Rq8pD.js +0 -2
  124. package/dist/paths-DVXBtLyo.js +0 -2
  125. package/dist/peer-mcp-personas-Dztywua2.js.map +0 -1
  126. package/dist/prompt-submit-hook-CRH6m7Vz.js.map +0 -1
  127. package/dist/provision-CjBt5wEK.js.map +0 -1
  128. package/dist/serve-C3LCkM-o.js.map +0 -1
  129. package/dist/server-setup-DrSUlFZ_.js.map +0 -1
  130. package/dist/service-backend-ByT0gUc8.js.map +0 -1
  131. package/dist/state-BlMpEFAt.js.map +0 -1
  132. package/dist/token-Dlb_84hW.js.map +0 -1
@@ -1,12 +1,12 @@
1
- import { a as isUnderClaudeConfigMirror, f as writeRuntimeFileSecure, t as PATHS } from "./paths-P5ajjpzU.js";
2
- import { C as CHEAP_REVIEWER_ALIAS_ID, S as CHEAP_PLAN_ALIAS_ID, _ as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, b as CHEAP_EXPLORE_ALIAS_ID, f as BALANCED_EXPLORE_ALIAS_ID, g as CHEAPEST_EXPLORE_ALIAS_ID, h as BALANCED_REVIEWER_ALIAS_ID, m as BALANCED_PLAN_ALIAS_ID, p as BALANCED_GENERAL_PURPOSE_ALIAS_ID, v as CHEAPEST_PLAN_ALIAS_ID, w as LUNA_SCOUT_ALIAS_ID, x as CHEAP_GENERAL_PURPOSE_ALIAS_ID, y as CHEAPEST_REVIEWER_ALIAS_ID } from "./server-setup-DrSUlFZ_.js";
3
- import { c as FAST_PROFILE_MODELS, d as FAST_PROFILE_NATIVE_MODELS, l as FAST_PROFILE_NATIVE_AGENT_NAMES, u as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-DmsyQQrw.js";
4
- import { An as withOneMSuffix, Bn as CHEAPEST_PROFILE_NATIVE_EFFORTS, Gn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, Kn as CHEAP_PROFILE_NATIVE_EFFORTS, Nn as BALANCED_PROFILE_NATIVE_AGENT_NAMES, Pn as BALANCED_PROFILE_NATIVE_EFFORTS, a as buildAgentPrompt, cn as CONDENSED_OPERATING_SEQUENCE, kn as oneMContextDisabled, l as maxPersonasFor, ln as DEFINITION_OF_GREATNESS, n as MCP_GROUPS, t as GROUP_META, u as personasFor, zn as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES } from "./peer-mcp-personas-Dztywua2.js";
5
- import { C as MAX_PARALLELISM_RULE, S as MAX_COORDINATOR_PROMPT, T as maxNativePrompt, a as MAX_PROFILE_NATIVE_AGENT_NAMES, i as MAX_PROFILE_MODELS, o as MAX_PROFILE_NATIVE_EFFORTS, s as MAX_PROFILE_NATIVE_MODELS, w as maxNativeDescription, x as MAX_COORDINATOR_DESCRIPTION } from "./max-profile-contract-Bl7I_EOC.js";
6
- import "./self-invocation-DBWyjvGm.js";
7
- import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-CjBt5wEK.js";
8
- import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-DX_mD0JT.js";
9
- import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-DtjQchvM.js";
1
+ import { a as isUnderClaudeConfigMirror, f as writeRuntimeFileSecure, t as PATHS } from "./paths-CpbTHKeP.js";
2
+ import { C as CHEAP_REVIEWER_ALIAS_ID, S as CHEAP_PLAN_ALIAS_ID, _ as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, b as CHEAP_EXPLORE_ALIAS_ID, f as BALANCED_EXPLORE_ALIAS_ID, g as CHEAPEST_EXPLORE_ALIAS_ID, h as BALANCED_REVIEWER_ALIAS_ID, m as BALANCED_PLAN_ALIAS_ID, p as BALANCED_GENERAL_PURPOSE_ALIAS_ID, v as CHEAPEST_PLAN_ALIAS_ID, w as LUNA_SCOUT_ALIAS_ID, x as CHEAP_GENERAL_PURPOSE_ALIAS_ID, y as CHEAPEST_REVIEWER_ALIAS_ID } from "./server-setup-Dz7chd0b.js";
3
+ import { S as FAST_PROFILE_NATIVE_MODELS, b as FAST_PROFILE_NATIVE_AGENT_NAMES, o as BALANCED_PROFILE_NATIVE_AGENT_NAMES, s as BALANCED_PROFILE_NATIVE_EFFORTS, x as FAST_PROFILE_NATIVE_EFFORTS, y as FAST_PROFILE_MODELS } from "./balanced-profile-contract-CqFRoCUe.js";
4
+ import { An as withOneMSuffix, Bn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, Fn as CHEAPEST_PROFILE_NATIVE_EFFORTS, Pn as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, Vn as CHEAP_PROFILE_NATIVE_EFFORTS, a as buildAgentPrompt, cn as CONDENSED_OPERATING_SEQUENCE, kn as oneMContextDisabled, l as maxPersonasFor, ln as DEFINITION_OF_GREATNESS, n as MCP_GROUPS, t as GROUP_META, u as personasFor } from "./peer-mcp-personas-CorhWEhi.js";
5
+ import { C as MAX_PARALLELISM_RULE, S as MAX_COORDINATOR_PROMPT, T as maxNativePrompt, a as MAX_PROFILE_NATIVE_AGENT_NAMES, i as MAX_PROFILE_MODELS, o as MAX_PROFILE_NATIVE_EFFORTS, s as MAX_PROFILE_NATIVE_MODELS, w as maxNativeDescription, x as MAX_COORDINATOR_DESCRIPTION } from "./max-profile-contract-MJJt0zm-.js";
6
+ import "./self-invocation-DIUyoRgL.js";
7
+ import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-DwNx-PZA.js";
8
+ import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-B77WqVFw.js";
9
+ import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-lRhno09M.js";
10
10
  import consola from "consola";
11
11
  import path from "node:path";
12
12
  import { randomBytes } from "node:crypto";
@@ -385,10 +385,11 @@ function buildMaxProfileAgentDefinitions(opts) {
385
385
  * Cost doctrine, cheapest to most expensive:
386
386
  * 1. LEXICAL code search (`mode:"lexical"`/`"exact"`) — zero model cost,
387
387
  * exact symbols, filenames, errors, routes, config keys. Always first.
388
- * 2. SEMANTIC code search (`mode:"semantic"`) — meaning-ranked via ColBERT,
389
- * for concepts and intent questions. Mentioned ONLY when the launch
390
- * enabled it (`semanticSearchAvailable`); otherwise the `code` tool is
391
- * lexical-only and agents must not be told to reach for semantic.
388
+ * 2. SEMANTIC code search (`mode:"semantic"`) — meaning-ranked via local
389
+ * ColBERT or Bluebird, for concepts and intent questions. Mentioned ONLY
390
+ * when this launch enabled one of those backends (`semanticSearchAvailable`);
391
+ * otherwise the `code` tool is lexical-only and agents must not be told
392
+ * to reach for semantic.
392
393
  * 3. `Explore` (budget model) — reads the narrowed files and synthesizes a
393
394
  * file:line evidence report. Only the conclusion flows upward.
394
395
  * 4. `Plan` (Sol) / `reviewer` (Sonnet/Luna/Gemini) / `oracle` — expensive
@@ -404,10 +405,12 @@ function buildMaxProfileAgentDefinitions(opts) {
404
405
  * `Plan`-first architecture, `General-Purpose` mixed execution, and
405
406
  * post-integration `reviewer` verification.
406
407
  */
407
- function pinnedSearchGuidance(semanticAvailable, capitalize = true) {
408
- const lexical = `${capitalize ? "Start with" : "start with"} exact lexical and symbol search (\`code\` with mode:"lexical" or "exact", plus Grep/Glob) for symbols, filenames, errors, routes, flags, and config keys — it costs no model call`;
408
+ function pinnedSearchGuidance(semanticAvailable, capitalize = true, bluebirdEnabled = false) {
409
+ const start = capitalize ? "Start with" : "start with";
410
+ if (bluebirdEnabled) return `${start} Bluebird indexed keyword search (\`code\` with mode:"lexical") for symbols, filenames, errors, routes, flags, and config keys; pair it with Bluebird semantic search for intent/concept questions where literal keywords may not appear. Bluebird failures remain visible and never fall back locally; mode:"exact", regex, AST, Grep, and Glob stay on the local live tree. Include surrounding context lines in your results so callers, guards, and types are visible without a second round trip, and inspect the file whenever the surrounding logic determines the answer.`;
411
+ const lexical = `${start} local exact lexical and symbol search (\`code\` with mode:"lexical" or "exact", plus Grep/Glob) for symbols, filenames, errors, routes, flags, and config keys — it costs no model call`;
409
412
  if (!semanticAvailable) return `${lexical}. Pair it with surrounding context lines so callers, guards, and types are visible without a second round trip, and inspect the file whenever the surrounding logic determines the answer.`;
410
- return `${lexical}; pair semantic search (meaning-ranked, best for intent/concept questions where literal keywords may not appear) with exact lexical and symbol search so that neither naming drift nor synonym mismatch hides a result. Include surrounding context lines in your search results so that callers, guards, and types are visible without a second round trip, and inspect the file whenever the surrounding logic determines the answer.`;
413
+ return `${lexical}; pair local ColBERT semantic search (meaning-ranked, with lexical fallback while its index is unavailable) with exact lexical and symbol search so that neither naming drift nor synonym mismatch hides a result. Include surrounding context lines in your search results so that callers, guards, and types are visible without a second round trip, and inspect the file whenever the surrounding logic determines the answer.`;
411
414
  }
412
415
  /**
413
416
  * Implicit (cheapest) tuning is composed from the SAME shared remainder as
@@ -417,11 +420,16 @@ function pinnedSearchGuidance(semanticAvailable, capitalize = true) {
417
420
  * stays exactly the few sentences that carry the tuning.
418
421
  */
419
422
  const EXPLORE_DESC_TAIL = "Use when the question spans more than a couple of files. Do not use for planning, edits, or single-file reads. Returns a structured evidence report with file:line citations. Never edits files.";
420
- function pinnedExploreDescription(explicit) {
421
- return (explicit ? "Read-only codebase exploration specialist. Use proactively, and launch several in parallel via `Task(subagent_type:\"Explore\")`, to map architecture, trace call chains, or locate the files and symbols a task will touch. " : "Read-only codebase exploration specialist for mapping architecture, tracing call chains, or locating the files and symbols a task touches. ") + EXPLORE_DESC_TAIL;
423
+ /** Appended to agent descriptions whose roles run at the 200K default window
424
+ * (cheap family + balanced): one line so every role prefers targeted reads. */
425
+ const DESC_200K_NOTE = " Operates at a 200K context window — prefer targeted reads (search, Grep, Read specific files) over full file scans.";
426
+ /** Prompt-side counterpart of `DESC_200K_NOTE`, placed before the tool steer. */
427
+ const PROMPT_200K_NOTE = "You operate at a 200K context window: use search, Grep, and targeted Read calls instead of reading entire files. ";
428
+ function pinnedExploreDescription(explicit, is200K = false) {
429
+ return (explicit ? "Read-only codebase exploration specialist. Use proactively, and launch several in parallel via `Task(subagent_type:\"Explore\")`, to map architecture, trace call chains, or locate the files and symbols a task will touch. " : "Read-only codebase exploration specialist for mapping architecture, tracing call chains, or locating the files and symbols a task touches. ") + EXPLORE_DESC_TAIL + (is200K ? DESC_200K_NOTE : "");
422
430
  }
423
431
  function pinnedExplorePrompt(opts) {
424
- const searchGuidance = pinnedSearchGuidance(opts.semanticAvailable, !opts.explicit);
432
+ const searchGuidance = pinnedSearchGuidance(opts.semanticAvailable, !opts.explicit, opts.bluebirdEnabled === true);
425
433
  return `You are a codebase exploration specialist. Your mission is to map repository structure, discover implementation patterns, trace call chains, and locate the exact files, symbols, and declarations that are relevant to the request. This is read-only work. Do not modify files, do not propose diffs, and do not delegate to other agents. You cannot ask clarifying questions mid-run: ground every answer in repository evidence. If the request is ambiguous, explore the most probable interpretations and record the ambiguity in your report. Start broad, then converge. ${opts.explicit ? "Issue independent searches in parallel in one turn rather than one at a time, and " : ""}${searchGuidance} Confirm every claim at the source before you report it. Stop when further searching stops changing your answer. When you can name the exact files and lines a change would touch, you are done. Report what the repository contains, not what it ought to contain. Do not design a solution or recommend an approach. Return a self-contained result the lead can act on immediately without needing to re-run your discovery.
426
434
 
427
435
  Return format:
@@ -431,15 +439,16 @@ Entry points: where control enters this area, as file:line.
431
439
  Conventions in use: the patterns, idioms, error handling, and test style that any change here would be expected to follow, each with a file:line example.
432
440
  Gaps and unknowns: what you could not confirm, and where you would look next.
433
441
 
434
- ` + readOnlyToolSteer(opts.semanticAvailable);
442
+ ` + (opts.is200K ? PROMPT_200K_NOTE : "") + readOnlyToolSteer(opts.semanticAvailable);
435
443
  }
436
444
  const PLAN_DESC_HEAD = "Architecture and implementation planning specialist";
437
445
  const PLAN_DESC_TAIL = " Returns a decision-complete, ordered implementation plan with runnable acceptance criteria. Never edits files.";
438
- function pinnedPlanDescription(explicit) {
439
- return PLAN_DESC_HEAD + (explicit ? ". Use proactively in plan mode, and whenever sequencing, cross-boundary interfaces, invariants, migration risk, or acceptance criteria deserve a dedicated pass before any code is written. Delegates repository discovery to `Explore` rather than reading broadly itself." : " for sequencing, cross-boundary interfaces, invariants, migration risk, and acceptance criteria before any code is written.") + PLAN_DESC_TAIL;
446
+ function pinnedPlanDescription(explicit, isBalanced = false, is200K = false) {
447
+ return PLAN_DESC_HEAD + (explicit ? isBalanced ? ". Use proactively ONLY when sequencing, cross-boundary interfaces, invariants, migration risk, or acceptance criteria are genuinely complex and deserve a dedicated pass before any code is written. The lead owns planning by default. Delegates repository discovery to `Explore` rather than reading broadly itself." : ". Use proactively in plan mode, and whenever sequencing, cross-boundary interfaces, invariants, migration risk, or acceptance criteria deserve a dedicated pass before any code is written. Delegates repository discovery to `Explore` rather than reading broadly itself." : " for sequencing, cross-boundary interfaces, invariants, migration risk, and acceptance criteria before any code is written.") + PLAN_DESC_TAIL + (is200K ? DESC_200K_NOTE : "");
440
448
  }
441
449
  function pinnedPlanPrompt(opts) {
442
- return `You are a software architect and planning specialist. Your mission is to turn a request into a decision-complete implementation plan: an ordered sequence of changes, the invariants that must hold throughout, and acceptance criteria a reviewer can actually run. This is read-only work. Do not modify repository files. Produce the architecture, sequencing, and acceptance criteria for the lead to synthesize and execute. Plan is an advisory planning capability, not an approval gate. Separate discoverable facts from genuine choices. ${opts.explicit ? "Do not sweep the repository yourself: delegate discovery to `Explore`, launching one or more `Explore` subagents in parallel with scoped evidence questions, then read directly only the files needed to resolve trade-offs and write executable steps. " : "Do not sweep the repository broadly yourself: keep discovery narrow, read directly only the files needed to resolve trade-offs and write executable steps, and record any repository fact you could not confirm as an explicit gap. "}Escalate only genuine product or architectural trade-offs, and escalate them as explicit options with consequences and a recommendation, never as an open question. For low-risk details, choose the reading most consistent with the codebase, proceed, and record it as an assumption. When a design trade-off has more than one viable answer and repository evidence cannot settle it, consult Oracle tool with one self-contained brief that states the constraints, the candidate designs, and the evidence you already gathered plus one precise question. If Oracle does not settle it, carry the options and the remaining gap into the plan rather than silently picking one. Delegation: you may invoke Explore and \`reviewer\` for discovery and verification; do not invoke any other subagent. Behavior and code verification belongs to post-implementation review. Write the plan for a General-Purpose execution agent who cannot see your reasoning. Every step must be executable without rediscovering what you already found: name the files, name the interfaces, and state the condition that means the step is done. Prefer the smallest design that satisfies the requirement and fits the conventions already in the codebase. Mark steps that are independent of each other and can run concurrently.
450
+ const oracleRef = opts.oracleTool ? `\`${opts.oracleTool}\`` : "Oracle";
451
+ return `You are a software architect and planning specialist. Your mission is to turn a request into a decision-complete implementation plan: an ordered sequence of changes, the invariants that must hold throughout, and acceptance criteria a reviewer can actually run. This is read-only work. Do not modify repository files. Produce the architecture, sequencing, and acceptance criteria for the lead to synthesize and execute. Plan is an advisory planning capability, not an approval gate. Separate discoverable facts from genuine choices. ${opts.explicit ? "Do not sweep the repository yourself: delegate discovery to `Explore`, launching one or more `Explore` subagents in parallel with scoped evidence questions, then read directly only the files needed to resolve trade-offs and write executable steps. " : "Do not sweep the repository broadly yourself: keep discovery narrow, read directly only the files needed to resolve trade-offs and write executable steps, and record any repository fact you could not confirm as an explicit gap. "}Escalate only genuine product or architectural trade-offs, and escalate them as explicit options with consequences and a recommendation, never as an open question. For low-risk details, choose the reading most consistent with the codebase, proceed, and record it as an assumption. When a design trade-off has more than one viable answer and repository evidence cannot settle it, consult ${oracleRef} with one self-contained brief that states the constraints, the candidate designs, and the evidence you already gathered plus one precise question. If Oracle does not settle it, carry the options and the remaining gap into the plan rather than silently picking one. Delegation: you may invoke Explore and \`reviewer\` for discovery and verification; do not invoke any other subagent. Behavior and code verification belongs to post-implementation review. Write the plan for its consumer — a General-Purpose execution agent or the lead implementing directly — who cannot see your reasoning. Every step must be executable without rediscovering what you already found: name the files, name the interfaces, and state the condition that means the step is done. Prefer the smallest design that satisfies the requirement and fits the conventions already in the codebase. Mark steps that are independent of each other and can run concurrently.
443
452
 
444
453
  Return format:
445
454
  Objective: what will be true when this is complete.
@@ -450,21 +459,21 @@ Acceptance criteria: the exact commands to run and the observable result that co
450
459
  Critical files: the files an executor must read before starting, as file:line, with why each matters.
451
460
  Open questions: any unresolved trade-off, as options with a recommendation. Omit this section if there are none.
452
461
 
453
- ` + readOnlyToolSteer(opts.semanticAvailable);
462
+ ` + (opts.is200K ? PROMPT_200K_NOTE : "") + readOnlyToolSteer(opts.semanticAvailable);
454
463
  }
455
464
  const GENERAL_PURPOSE_DESC_TAIL = "Drives to a verified end state with changed files and evidence. Do not use for pure discovery (use Explore) or verification-only (use reviewer).";
456
- function pinnedGeneralPurposeDescription(explicit) {
457
- return (explicit ? "Autonomous multi-step execution agent. Use proactively for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. Follows a Plan handoff when one exists and otherwise investigates before acting. " : "Autonomous multi-step execution agent for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. ") + GENERAL_PURPOSE_DESC_TAIL;
465
+ function pinnedGeneralPurposeDescription(explicit, isBalanced = false, is200K = false) {
466
+ return (explicit ? isBalanced ? "Autonomous multi-step execution agent. Use proactively and FREELY for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. Follows a Plan handoff when one exists and otherwise investigates before acting. " : "Autonomous multi-step execution agent. Use proactively for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. Follows a Plan handoff when one exists and otherwise investigates before acting. " : "Autonomous multi-step execution agent for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. ") + GENERAL_PURPOSE_DESC_TAIL + (is200K ? DESC_200K_NOTE : "");
458
467
  }
459
- function pinnedGeneralPurposePrompt() {
460
- return "You are an autonomous execution specialist for mixed, multi-step work. Your mission is to take an open-ended task from investigation through implementation to a verified end state within this turn. Keep going until the task is genuinely done. Do not stop at a diagnosis, a partial fix, or a plan when the request asked for a change. Ground discovery in repository truth. For low-risk ambiguities, choose the interpretation most consistent with the repository, proceed, and record it as an assumption in your report. For material intent gaps that would alter product behavior or security, surface concrete options and a recommendation to the lead. When a Plan handoff exists, follow its ordered steps and acceptance criteria; do not rediscover what the plan already settled — read the critical files it names, execute each step's done condition, and report any step whose premise proves wrong instead of silently replanning. Investigate before you act. Confirm your assumptions against the actual code rather than against the request's description of it. After every command, read the real output and let it decide the next step. When something fails, diagnose the specific cause before trying again. If repeated attempts fail for the same reason and no new information has emerged, stop retrying: re-examine the underlying assumption and take a different path. Escalate rather than expand. If the task turns out to require a change the lead did not sanction, complete the sanctioned part and report the rest as a recommendation. If the task collapses to pure discovery or a single settled edit, do that slice and report the remainder as a recommendation. Do not expand scope. Match the conventions, structure, and test style already present in the files you touch. The lead owns final integration. Verify before you report. Run the builds, linters, or test commands relevant to what you changed. Quote the command run, exit status, and concise decisive output verbatim; if output is long, summarize the middle and quote the pass/fail lines. Report your changes and test output directly to the caller. Post-integration review is owned by the lead. Return a self-contained result the lead can act on immediately.\n\nReturn format:\nOutcome: what is now true, and whether the task is complete.\nActions taken: what you did, in order.\nChanged files: each as file:line, with a one-line description of the change.\nVerification: the commands you ran, exit status, and decisive output.\nAssumptions: every interpretation you had to choose.\nRemaining items: anything deliberately not done, and why.\n\n" + fileToolSteer("builds");
468
+ function pinnedGeneralPurposePrompt(opts) {
469
+ return "You are an autonomous execution specialist for mixed, multi-step work. Your mission is to take an open-ended task from investigation through implementation to a verified end state within this turn. Keep going until the task is genuinely done. Do not stop at a diagnosis, a partial fix, or a plan when the request asked for a change. Ground discovery in repository truth. For low-risk ambiguities, choose the interpretation most consistent with the repository, proceed, and record it as an assumption in your report. For material intent gaps that would alter product behavior or security, surface concrete options and a recommendation to the lead. When a Plan handoff exists, follow its ordered steps and acceptance criteria; do not rediscover what the plan already settled — read the critical files it names, execute each step's done condition, and report any step whose premise proves wrong instead of silently replanning. Investigate before you act. Confirm your assumptions against the actual code rather than against the request's description of it. After every command, read the real output and let it decide the next step. When something fails, diagnose the specific cause before trying again. If repeated attempts fail for the same reason and no new information has emerged, stop retrying: re-examine the underlying assumption and take a different path. Escalate rather than expand. If the task turns out to require a change the lead did not sanction, complete the sanctioned part and report the rest as a recommendation. If the task collapses to pure discovery or a single settled edit, do that slice and report the remainder as a recommendation. Do not expand scope. Match the conventions, structure, and test style already present in the files you touch. The lead owns final integration. Verify before you report. Run the builds, linters, or test commands relevant to what you changed. Quote the command run, exit status, and concise decisive output verbatim; if output is long, summarize the middle and quote the pass/fail lines. Report your changes and test output directly to the caller. Post-integration review is owned by the lead. Return a self-contained result the lead can act on immediately.\n\nReturn format:\nOutcome: what is now true, and whether the task is complete.\nActions taken: what you did, in order.\nChanged files: each as file:line, with a one-line description of the change.\nVerification: the commands you ran, exit status, and decisive output.\nAssumptions: every interpretation you had to choose.\nRemaining items: anything deliberately not done, and why.\n\n" + (opts?.is200K ? PROMPT_200K_NOTE : "") + fileToolSteer("builds");
461
470
  }
462
471
  const REVIEWER_DESC_TAIL = "Runs builds/tests itself rather than assuming them. Returns SHIP / FIX / BLOCK with reproducible evidence. Never edits source.";
463
- function pinnedReviewerDescription(explicit) {
464
- return (explicit ? "Adversarial evidence-based reviewer. Use proactively post-integration after behavior-changing, cross-boundary, or risk-sensitive changes, before done. " : "Adversarial evidence-based reviewer for behavior-changing, cross-boundary, or risk-sensitive changes. ") + REVIEWER_DESC_TAIL;
472
+ function pinnedReviewerDescription(explicit, isBalanced = false, is200K = false) {
473
+ return (explicit ? isBalanced ? "Adversarial evidence-based reviewer. Use proactively ONLY when the change is genuinely behavior-changing, cross-boundary, or risk-sensitive, before done. The lead owns verification by default. " : "Adversarial evidence-based reviewer. Use proactively post-integration after behavior-changing, cross-boundary, or risk-sensitive changes, before done. " : "Adversarial evidence-based reviewer for behavior-changing, cross-boundary, or risk-sensitive changes. ") + REVIEWER_DESC_TAIL + (is200K ? DESC_200K_NOTE : "");
465
474
  }
466
- function pinnedReviewerPrompt(semanticAvailable = true) {
467
- return "You are an adversarial code reviewer. Your job is not to confirm that the change works. Your job is to find the conditions under which it does not. Think carefully about the plausible failure modes of this change before you start running commands, so that what you run is chosen to expose them. Read before you judge. Inspect the changed files and relevant surrounding context, callers of affected call sites, and tests that claim to cover the change, sized to the identified risks of the change. Then verify by execution. Run the builds, linters, or test suites relevant to what changed, and any command that would surface the specific failure you suspect. Verification means output you observed. Never state that something passes, compiles, or is covered unless you ran it and read the result; where you could not run something, say so explicitly rather than inferring the outcome. Probe deliberately: boundary and empty inputs, error and early-return paths, concurrency and ordering, resource acquisition and cleanup on the failure path, partial failure and retry, backward compatibility of any changed interface, handling of untrusted input, and whether the new tests would actually fail if the change were reverted. Judge against the bar the repository already holds itself to, not an abstract ideal. Do not soften a real finding, and do not manufacture findings to appear thorough. If the change is correct and verified, say so. Do not modify source code and do not delegate to other agents. You may run build, test, and read-only inspection commands; do not run commands that alter tracked source files or touch remote infrastructure (transient build cache or test runner side effects are expected). Return a self-contained result the lead can act on immediately.\n\nReturn format. Line one must be exactly one of:\nVERDICT: SHIP\nVERDICT: FIX\nVERDICT: BLOCK\n\nSHIP means you found no blocking defect and your verification ran clean. FIX means the approach is sound but specific defects must be corrected. BLOCK means the approach itself is wrong, or verification could not be run at all.\n\nThen, using the repository's severity taxonomy:\nCritical: blocking defects (correctness, security, data loss). Each with file:line, the concrete scenario in which it fails, and how you confirmed it.\nImportant: non-blocking issues that should be fixed before shipping. Each with file:line and impact.\nSuggestion: non-blocking improvements or stylistic suggestions.\nEvidence: the commands you ran, exit status, and decisive output.\nUnverified surface: what you could not exercise, and why.\n\n" + reviewerToolSteer(semanticAvailable);
475
+ function pinnedReviewerPrompt(semanticAvailable = true, opts) {
476
+ return "You are an adversarial code reviewer. Your job is not to confirm that the change works. Your job is to find the conditions under which it does not. Think carefully about the plausible failure modes of this change before you start running commands, so that what you run is chosen to expose them. Read before you judge. Inspect the changed files and relevant surrounding context, callers of affected call sites, and tests that claim to cover the change, sized to the identified risks of the change. Then verify by execution. Run the builds, linters, or test suites relevant to what changed, and any command that would surface the specific failure you suspect. Verification means output you observed. Never state that something passes, compiles, or is covered unless you ran it and read the result; where you could not run something, say so explicitly rather than inferring the outcome. Probe deliberately: boundary and empty inputs, error and early-return paths, concurrency and ordering, resource acquisition and cleanup on the failure path, partial failure and retry, backward compatibility of any changed interface, handling of untrusted input, and whether the new tests would actually fail if the change were reverted. Judge against the bar the repository already holds itself to, not an abstract ideal. Do not soften a real finding, and do not manufacture findings to appear thorough. If the change is correct and verified, say so. " + (opts?.allowExploreDelegation === true ? "Do not modify source code. Scope first with search, then delegate: use code search (lexical, then semantic when available) and web search to narrow scope and rule out hypotheses before delegating — cheapest, always first. When search is insufficient, delegate targeted discovery to `Explore`: launch one or more `Explore` subagents in parallel with scoped evidence questions (call chains, config patterns, test conventions, boundary conditions) and let them return file:line conclusions; do not sweep the repository yourself. You may invoke only `Explore`; do not invoke any other subagent. You may run build, test, and read-only inspection commands; do not run commands that alter tracked source files or touch remote infrastructure (transient build cache or test runner side effects are expected). " : "Do not modify source code and do not delegate to other agents. You may run build, test, and read-only inspection commands; do not run commands that alter tracked source files or touch remote infrastructure (transient build cache or test runner side effects are expected). ") + "Return a self-contained result the lead can act on immediately.\n\nReturn format. Line one must be exactly one of:\nVERDICT: SHIP\nVERDICT: FIX\nVERDICT: BLOCK\n\nSHIP means you found no blocking defect and your verification ran clean. FIX means the approach is sound but specific defects must be corrected. BLOCK means the approach itself is wrong, or verification could not be run at all.\n\nThen, using the repository's severity taxonomy:\nCritical: blocking defects (correctness, security, data loss). Each with file:line, the concrete scenario in which it fails, and how you confirmed it.\nImportant: non-blocking issues that should be fixed before shipping. Each with file:line and impact.\nSuggestion: non-blocking improvements or stylistic suggestions.\nEvidence: the commands you ran, exit status, and decisive output.\nUnverified surface: what you could not exercise, and why.\n\n" + (opts?.is200K ? PROMPT_200K_NOTE : "") + reviewerToolSteer(semanticAvailable);
468
477
  }
469
478
  /** Build the literal `-m fast` native roster. This is intentionally separate
470
479
  * from the standard definitions: the names overlap, but their role bodies,
@@ -501,7 +510,8 @@ function buildFastProfileAgentDefinitions(opts) {
501
510
  description: pinnedExploreDescription(true),
502
511
  prompt: pinnedExplorePrompt({
503
512
  explicit: true,
504
- semanticAvailable
513
+ semanticAvailable,
514
+ bluebirdEnabled: opts.bluebirdEnabled
505
515
  }),
506
516
  tools: readSearchTools,
507
517
  model: decorateGuaranteedOneM(LUNA_SCOUT_ALIAS_ID),
@@ -512,7 +522,8 @@ function buildFastProfileAgentDefinitions(opts) {
512
522
  description: pinnedPlanDescription(true),
513
523
  prompt: pinnedPlanPrompt({
514
524
  explicit: true,
515
- semanticAvailable
525
+ semanticAvailable,
526
+ oracleTool
516
527
  }),
517
528
  tools: planTools,
518
529
  model: oneM(planModel),
@@ -591,10 +602,12 @@ function buildCheapProfileAgentDefinitions(opts) {
591
602
  const effort = (name) => CHEAP_PROFILE_NATIVE_EFFORTS[name];
592
603
  const out = {
593
604
  Explore: {
594
- description: pinnedExploreDescription(true),
605
+ description: pinnedExploreDescription(true, true),
595
606
  prompt: pinnedExplorePrompt({
596
607
  explicit: true,
597
- semanticAvailable
608
+ semanticAvailable,
609
+ is200K: true,
610
+ bluebirdEnabled: opts.bluebirdEnabled
598
611
  }),
599
612
  tools: readSearchTools,
600
613
  model: exploreModel,
@@ -602,10 +615,12 @@ function buildCheapProfileAgentDefinitions(opts) {
602
615
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
603
616
  },
604
617
  Plan: {
605
- description: pinnedPlanDescription(true),
618
+ description: pinnedPlanDescription(true, false, true),
606
619
  prompt: pinnedPlanPrompt({
607
620
  explicit: true,
608
- semanticAvailable
621
+ semanticAvailable,
622
+ oracleTool,
623
+ is200K: true
609
624
  }),
610
625
  tools: planTools,
611
626
  model: planModel,
@@ -616,15 +631,15 @@ function buildCheapProfileAgentDefinitions(opts) {
616
631
  }
617
632
  },
618
633
  "General-Purpose": {
619
- description: pinnedGeneralPurposeDescription(true),
620
- prompt: pinnedGeneralPurposePrompt(),
634
+ description: pinnedGeneralPurposeDescription(true, false, true),
635
+ prompt: pinnedGeneralPurposePrompt({ is200K: true }),
621
636
  model: generalModel,
622
637
  effort: effort("General-Purpose"),
623
638
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
624
639
  },
625
640
  reviewer: {
626
- description: pinnedReviewerDescription(true),
627
- prompt: pinnedReviewerPrompt(semanticAvailable),
641
+ description: pinnedReviewerDescription(true, false, true),
642
+ prompt: pinnedReviewerPrompt(semanticAvailable, { is200K: true }),
628
643
  model: reviewerModel,
629
644
  effort: effort("reviewer"),
630
645
  tools: readSearchTools,
@@ -684,10 +699,12 @@ function buildCheapestProfileAgentDefinitions(opts) {
684
699
  const effort = (name) => CHEAPEST_PROFILE_NATIVE_EFFORTS[name];
685
700
  const out = {
686
701
  Explore: {
687
- description: pinnedExploreDescription(false),
702
+ description: pinnedExploreDescription(false, true),
688
703
  prompt: pinnedExplorePrompt({
689
704
  explicit: false,
690
- semanticAvailable
705
+ semanticAvailable,
706
+ is200K: true,
707
+ bluebirdEnabled: opts.bluebirdEnabled
691
708
  }),
692
709
  tools: readSearchTools,
693
710
  model: exploreModel,
@@ -695,10 +712,12 @@ function buildCheapestProfileAgentDefinitions(opts) {
695
712
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
696
713
  },
697
714
  Plan: {
698
- description: pinnedPlanDescription(false),
715
+ description: pinnedPlanDescription(false, false, true),
699
716
  prompt: pinnedPlanPrompt({
700
717
  explicit: false,
701
- semanticAvailable
718
+ semanticAvailable,
719
+ oracleTool,
720
+ is200K: true
702
721
  }),
703
722
  tools: planTools,
704
723
  model: planModel,
@@ -709,15 +728,15 @@ function buildCheapestProfileAgentDefinitions(opts) {
709
728
  }
710
729
  },
711
730
  "General-Purpose": {
712
- description: pinnedGeneralPurposeDescription(false),
713
- prompt: pinnedGeneralPurposePrompt(),
731
+ description: pinnedGeneralPurposeDescription(false, false, true),
732
+ prompt: pinnedGeneralPurposePrompt({ is200K: true }),
714
733
  model: generalModel,
715
734
  effort: effort("General-Purpose"),
716
735
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
717
736
  },
718
737
  reviewer: {
719
- description: pinnedReviewerDescription(false),
720
- prompt: pinnedReviewerPrompt(semanticAvailable),
738
+ description: pinnedReviewerDescription(false, false, true),
739
+ prompt: pinnedReviewerPrompt(semanticAvailable, { is200K: true }),
721
740
  model: reviewerModel,
722
741
  effort: effort("reviewer"),
723
742
  tools: readSearchTools,
@@ -745,9 +764,14 @@ function buildCheapestProfileAgentDefinitions(opts) {
745
764
  * alias (`gh-router-balanced-*`, no `[1m]`) rather than a real catalog id,
746
765
  * for the same client catalog-resolution reason as the cheap builder above.
747
766
  * Caller-supplied `opts.balanced*Model` values are deliberately ignored.
748
- * Explicit delegation tuning matches cheap: proactive parallel `Explore`
749
- * fan-out, `Plan`-first architecture, `General-Purpose` mixed execution, and
750
- * post-integration `reviewer` verification. */
767
+ * Explicit delegation tuning is search-first and lead-owns-by-default
768
+ * (unlike cheap): `code_search` + `web` search narrow scope before any
769
+ * `Explore` fan-out; `Plan` ONLY when genuinely complex (lead owns planning)
770
+ * with an explicitly named Oracle tool; `General-Purpose` mixed execution
771
+ * delegates FREELY; `reviewer` ONLY when genuinely behavior-changing (lead
772
+ * owns verification) where the reviewer
773
+ * narrows scope with search and may invoke `Explore` for targeted
774
+ * discovery. */
751
775
  function buildBalancedProfileAgentDefinitions(opts) {
752
776
  const exploreModel = BALANCED_EXPLORE_ALIAS_ID;
753
777
  const planModel = BALANCED_PLAN_ALIAS_ID;
@@ -776,10 +800,12 @@ function buildBalancedProfileAgentDefinitions(opts) {
776
800
  const effort = (name) => BALANCED_PROFILE_NATIVE_EFFORTS[name];
777
801
  const out = {
778
802
  Explore: {
779
- description: pinnedExploreDescription(true),
803
+ description: pinnedExploreDescription(true, true),
780
804
  prompt: pinnedExplorePrompt({
781
805
  explicit: true,
782
- semanticAvailable
806
+ semanticAvailable,
807
+ is200K: true,
808
+ bluebirdEnabled: opts.bluebirdEnabled
783
809
  }),
784
810
  tools: readSearchTools,
785
811
  model: exploreModel,
@@ -787,10 +813,12 @@ function buildBalancedProfileAgentDefinitions(opts) {
787
813
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
788
814
  },
789
815
  Plan: {
790
- description: pinnedPlanDescription(true),
816
+ description: pinnedPlanDescription(true, true, true),
791
817
  prompt: pinnedPlanPrompt({
792
818
  explicit: true,
793
- semanticAvailable
819
+ semanticAvailable,
820
+ oracleTool,
821
+ is200K: true
794
822
  }),
795
823
  tools: planTools,
796
824
  model: planModel,
@@ -801,18 +829,21 @@ function buildBalancedProfileAgentDefinitions(opts) {
801
829
  }
802
830
  },
803
831
  "General-Purpose": {
804
- description: pinnedGeneralPurposeDescription(true),
805
- prompt: pinnedGeneralPurposePrompt(),
832
+ description: pinnedGeneralPurposeDescription(true, true, true),
833
+ prompt: pinnedGeneralPurposePrompt({ is200K: true }),
806
834
  model: generalModel,
807
835
  effort: effort("General-Purpose"),
808
836
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
809
837
  },
810
838
  reviewer: {
811
- description: pinnedReviewerDescription(true),
812
- prompt: pinnedReviewerPrompt(semanticAvailable),
839
+ description: pinnedReviewerDescription(true, true, true),
840
+ prompt: pinnedReviewerPrompt(semanticAvailable, {
841
+ allowExploreDelegation: true,
842
+ is200K: true
843
+ }),
813
844
  model: reviewerModel,
814
845
  effort: effort("reviewer"),
815
- tools: readSearchTools,
846
+ tools: [...readSearchTools, "Agent"],
816
847
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
817
848
  }
818
849
  };
@@ -1305,6 +1336,7 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
1305
1336
  balancedGeneralPurposeModel: opts.balancedGeneralPurposeModel,
1306
1337
  balancedReviewerModel: opts.balancedReviewerModel,
1307
1338
  semanticSearchAvailable: opts.semanticSearchAvailable,
1339
+ bluebirdEnabled: opts.bluebirdEnabled,
1308
1340
  nativeRoster: opts.nativeRoster,
1309
1341
  personaAllowlist: opts.personaAllowlist,
1310
1342
  includeCoordinator: opts.includeCoordinator,
@@ -2082,7 +2114,8 @@ Return a compact final checkpoint:
2082
2114
  }
2083
2115
  //#endregion
2084
2116
  //#region src/lib/injected-skills/gather-context-skill.ts
2085
- function buildGatherContextSkill(searchEnabled) {
2117
+ function buildGatherContextSkill(searchEnabled, bluebirdEnabled = false) {
2118
+ const semanticAvailable = searchEnabled || bluebirdEnabled;
2086
2119
  return {
2087
2120
  name: "gh-gather-context",
2088
2121
  md: `---
@@ -2109,7 +2142,7 @@ stage: Explore evidence plus targeted follow-up reads is the verification path.
2109
2142
 
2110
2143
  - Maximum rounds: 3.
2111
2144
  - Maximum parallel Explore subagents per round: 6.
2112
- - ${searchEnabled ? "Maximum searches per round: 10." : "Maximum lexical searches per round: 10."}
2145
+ - ${semanticAvailable ? "Maximum searches per round: 10." : "Maximum lexical searches per round: 10."}
2113
2146
  - Maximum follow-up reads per round: 5.
2114
2147
  - Advisory budget: keep each Explore dispatch under ~3 minutes of wall-clock;
2115
2148
  the Task tool has no maxWallClockMs parameter, so count your own dispatches
@@ -2135,8 +2168,8 @@ Use these exact tags on every finding and claim:
2135
2168
  - Extract symbols, filenames, error strings, routes, flags, config keys, and types.
2136
2169
  - Define what must be true for a correct implementation.
2137
2170
 
2138
- ${searchEnabled ? `3. Run semantic search first for concepts, then lexical for symbols, in parallel, in a single turn.
2139
- - Use mcp__search__code semantically first to find concepts and likely files.
2171
+ ${semanticAvailable ? `3. Run semantic search first for concepts, then lexical for symbols, in parallel, in a single turn.
2172
+ - Use mcp__search__code semantically first to find concepts and likely files via ${bluebirdEnabled ? "Bluebird's Azure DevOps index; failures stay visible with no local fallback" : "the local ColBERT index, with transparent lexical fallback while unavailable"}.
2140
2173
  - Then use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
2141
2174
  - Use git log and git blame when authorship, regression timing, or intent matters.
2142
2175
  - Use mcp__search__web for upstream APIs, package behavior, protocol docs, or public issues.` : `3. Run lexical search first, in parallel, in a single turn.
@@ -2321,7 +2354,7 @@ Return:
2321
2354
  }
2322
2355
  //#endregion
2323
2356
  //#region src/lib/injected-skills/orchestrate-skill.ts
2324
- function buildOrchestrateSkill(searchEnabled) {
2357
+ function buildOrchestrateSkill(searchEnabled, bluebirdEnabled = false) {
2325
2358
  return {
2326
2359
  name: "gh-orchestrate",
2327
2360
  md: `---
@@ -2407,7 +2440,7 @@ Parallelism (the Workflow tool's core optimization rule):
2407
2440
 
2408
2441
  Role to tool mapping:
2409
2442
 
2410
- ${searchEnabled ? "- research: worker-explore (Agent subagent) and mcp__search__code for focused follow-ups (semantic for concepts, lexical for exact symbols)." : "- research: worker-explore (Agent subagent) and mcp__search__code for focused follow-ups (lexical for exact symbols, filenames, errors, routes, flags, and config keys)."}
2443
+ ${searchEnabled || bluebirdEnabled ? `- research: worker-explore (Agent subagent) and mcp__search__code for focused follow-ups (${bluebirdEnabled ? "Bluebird-backed" : "local ColBERT-backed"} semantic for concepts, lexical for exact symbols).` : "- research: worker-explore (Agent subagent) and mcp__search__code for focused follow-ups (lexical for exact symbols, filenames, errors, routes, flags, and config keys)."}
2411
2444
  - plan: worker-plan (Agent subagent).
2412
2445
  - implement: worker-implement (Agent subagent), with worktree:true for parallel writers.
2413
2446
  - test: worker-test (Agent subagent), authored by a DIFFERENT LAB than the implementer when possible. This is an advisory practice, not enforced provenance.
@@ -2605,7 +2638,7 @@ Return:
2605
2638
  }
2606
2639
  //#endregion
2607
2640
  //#region src/lib/injected-skills/research-skill.ts
2608
- function buildResearchSkill(searchEnabled) {
2641
+ function buildResearchSkill(searchEnabled, bluebirdEnabled = false) {
2609
2642
  return {
2610
2643
  name: "gh-research",
2611
2644
  md: `---
@@ -2659,9 +2692,9 @@ Default caps unless the user explicitly gives a smaller or larger budget:
2659
2692
  - Mark each unknown as code, behavior, dependency, history, external, or acceptance-criteria related.
2660
2693
  - Add newly discovered unknowns as they appear.
2661
2694
 
2662
- ${searchEnabled ? `3. Fan out in parallel.
2695
+ ${searchEnabled || bluebirdEnabled ? `3. Fan out in parallel.
2663
2696
  - Run independent code, web, history, and explore calls concurrently where possible; only the semantic-to-lexical code-search refinement is ordered. Issue the independent calls in a SINGLE turn (one message, multiple tool calls) so the harness actually runs them in parallel rather than serializing.
2664
- - Use mcp__search__code semantically first to find concepts and likely files.
2697
+ - Use mcp__search__code semantically first to find concepts and likely files. This launch uses ${bluebirdEnabled ? "Bluebird (semantic and lexical requests use its Azure DevOps index; failures stay visible with no local fallback)" : "local ColBERT (with transparent lexical fallback while its index is unavailable)"}.
2665
2698
  - Then use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
2666
2699
  - Use git blame or history when authorship, regression timing, or intent matters.
2667
2700
  - Use mcp__search__web for upstream APIs, package behavior, protocol docs, or public issues.
@@ -3209,13 +3242,22 @@ function buildNativeReachClauses(opts) {
3209
3242
  "`Plan` for architectural sequencing, interface contracts, migration risk, and runnable acceptance criteria",
3210
3243
  "`General-Purpose` for mixed, iterative, or multi-step execution tasks",
3211
3244
  "`reviewer` for independent adversarial verification, reproduction, and root-causing"
3212
- ]);
3213
- return joinClauses([
3245
+ ]) + ". All roles run at a 200K context window — prefer targeted reads (search, Grep, Read specific files) over full file reads";
3246
+ if (opts.profile === "balanced") return joinClauses([
3247
+ "`Explore` for broad repository discovery, dependency mapping, and convention tracking (launch in parallel)",
3248
+ "`Plan` for architectural sequencing, interface contracts, migration risk, and runnable acceptance criteria ONLY when genuinely complex (lead owns planning by default)",
3249
+ "`General-Purpose` for mixed, iterative, or multi-step execution tasks (delegate freely)",
3250
+ "`reviewer` for independent adversarial verification, reproduction, and root-causing ONLY when genuinely behavior-changing (lead owns verification by default)"
3251
+ ]) + ". All roles run at a 200K context window — prefer targeted reads (search, Grep, Read specific files) over full file reads";
3252
+ const shared = joinClauses([
3214
3253
  "`Explore` for broad repository discovery, dependency mapping, and convention tracking (launch in parallel)",
3215
3254
  "`Plan` for architectural sequencing, interface contracts, migration risk, and runnable acceptance criteria (delegates discovery to `Explore`)",
3216
3255
  "`General-Purpose` for mixed, iterative, or multi-step execution tasks (follows a Plan handoff when one exists)",
3217
3256
  "`reviewer` for independent adversarial verification, reproduction, and root-causing after non-trivial changes"
3218
3257
  ]);
3258
+ if (opts.profile === "cheap") return `${shared}. All roles run at a 200K context window — prefer targeted reads (search, Grep, Read specific files) over full file reads`;
3259
+ if (opts.profile === "cheap1m") return `${shared}. Subagents run at a 200K context window — brief them with targeted evidence and prefer targeted reads over full file reads`;
3260
+ return shared;
3219
3261
  }
3220
3262
  const clauses = [];
3221
3263
  const implementerFast = opts.implementerFastAvailable !== false;
@@ -3258,7 +3300,7 @@ function buildOperatingDefaultsDirective(opts = {}) {
3258
3300
  const profileLabel = isCheapest ? "Cheapest" : isCheap ? "Cheap" : isBalanced ? "Balanced" : "Fast";
3259
3301
  const oracleDescriptor = isCheapest ? "GPT-5.6 Sol (200K/high)" : isCheap || isBalanced ? "Grok 4.6 (200K/medium)" : "exact Opus 5 (1M/high)";
3260
3302
  const astraDescriptor = isCheap && !isCheapest ? "200K/medium" : "200K/high";
3261
- const searchGuidance = opts.semanticSearchAvailable === true ? "Search strategy (cheapest first): (1) LEXICAL `code` search (mode:\"lexical\"/\"exact\", plus Grep/Glob) for symbols, filenames, errors, routes, flags, and config keys — zero model cost; (2) SEMANTIC `code` search for intent/concept questions where literal keywords may not appear; (3) `Explore` subagents read the narrowed files and return file:line conclusions — expensive models (Plan, reviewer, Oracle) see only the synthesized subset, never raw search output. " : "Search strategy (cheapest first): LEXICAL `code` search (mode:\"lexical\"/\"exact\", plus Grep/Glob) for symbols, filenames, errors, routes, flags, and config keys — zero model cost. `Explore` subagents read the narrowed files and return file:line conclusions — expensive models (Plan, reviewer, Oracle) see only the synthesized subset, never raw search output. ";
3303
+ const searchGuidance = opts.bluebirdEnabled === true ? "Search strategy: use Bluebird `code` search in `lexical` mode for indexed keyword queries and `semantic` mode for intent/concept questions. Bluebird failures remain visible and never fall back locally; `exact`, `regex`, and `ast` stay on the local live tree. `Explore` subagents read the narrowed files and return file:line conclusions; expensive models (Plan, reviewer, Oracle) see only the synthesized subset, never raw search output. " : opts.semanticSearchAvailable === true ? "Search strategy (cheapest first): (1) LOCAL LEXICAL `code` search (mode:\"lexical\"/\"exact\", plus Grep/Glob) for symbols, filenames, errors, routes, flags, and config keys; (2) local ColBERT SEMANTIC `code` search for intent/concept questions where literal keywords may not appear, with lexical fallback while its index is unavailable; (3) `Explore` subagents read the narrowed files and return file:line conclusions — expensive models (Plan, reviewer, Oracle) see only the synthesized subset, never raw search output. " : "Search strategy (cheapest first): LOCAL LEXICAL `code` search (mode:\"lexical\"/\"exact\", plus Grep/Glob) for symbols, filenames, errors, routes, flags, and config keys. `Explore` subagents read the narrowed files and return file:line conclusions — expensive models (Plan, reviewer, Oracle) see only the synthesized subset, never raw search output. ";
3262
3304
  if (opts.fastRuntimeAvailable === false) return `## Operating defaults (these layer with the user's explicit direction and the domain's own standards as addons, not replacements: follow all three together; on a direct conflict the user's direction wins, then the domain standard, then the default below)
3263
3305
 
3264
3306
  ${profileLabel} 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.`;
@@ -3270,9 +3312,13 @@ ${profileLabel} profile runtime wiring is unavailable. Work directly, use only t
3270
3312
  const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated autonomous browsing tasks through \`mcp__${workersKey}__browse\`.` : "";
3271
3313
  const artifactClause = opts.artifactAvailable ? ` \`mcp__${peersKey}__artifact_*\` provides human review in the artifact panel with auto-open on plan completion.` : "";
3272
3314
  const astraClause = opts.astraAvailable && (opts.profile === "fast" || opts.profile === "cheap1m") ? ` \`mcp__${peersKey}__astra\` (GPT-6 Astra ${astraDescriptor}) is the terminal escalation consultant for the lead only, reserved strictly for the hardest dead ends when direct evidence, Advisor, and Oracle have all failed to produce a defensible path (consulted at most 1-2 times per decision with concise context and specific questions).` : "";
3273
- const pipeline = isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly. ` + buildNativeReachClauses(opts) + ". Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` may be used for discovery spanning more than a couple of files; `Plan` for sequencing with complex interfaces or acceptance criteria; `General-Purpose` for mixed multi-step execution; `reviewer` for behavior-changing or risk-sensitive changes. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n" : `${profileLabel} launch profile. The lead coordinates execution across specialized native roles: ` + buildNativeReachClauses(opts) + ". In plan mode or when designing changes with complex sequencing, interface contracts, or acceptance criteria, delegate architectural planning to `Plan` (in plan mode, produce the plan and acceptance criteria; do not edit files). Phase pipeline (budget gather, expensive plan, budget execution, expensive verification). GATHER: delegate to `Explore` instead of exploring yourself. For any question spanning more than a couple of files, launch one or more `Explore` subagents in parallel with scoped evidence questions and let them return file:line citations; read directly only the small subset you must touch to decide or edit. `Plan` follows the same rule when it needs repository facts. PLAN: `Plan` produces handoff-ready steps (ordered, file:line, done conditions, acceptance criteria) for a `General-Purpose` executor that cannot see its reasoning; `Plan` may consult Oracle on unresolved trade-offs and reports any remaining gap to the lead. EXECUTE: delegate mixed multi-step work and Plan handoffs to `General-Purpose` in a fresh context to preserve lead context; brief with outcome, constraints, files in scope, and verification. VERIFY: after behavior-changing, cross-boundary, or risk-sensitive implementation, run relevant build/tests then invoke `reviewer` before declaring done. Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` is cheap and may be launched in parallel across independent discovery questions. Send independent subagent calls in parallel within a single turn. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n";
3315
+ const pipeline = isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly. ` + buildNativeReachClauses(opts) + ". Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` may be used for discovery spanning more than a couple of files; `Plan` for sequencing with complex interfaces or acceptance criteria; `General-Purpose` for mixed multi-step execution; `reviewer` for behavior-changing or risk-sensitive changes. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n" : isBalanced ? `${profileLabel} launch profile. The lead coordinates execution across specialized native roles: ` + buildNativeReachClauses(opts) + `. Lead owns planning, implementation, and verification by default: in plan mode, produce the plan and acceptance criteria directly and do not edit files; delegate architectural planning to \`Plan\` ONLY when sequencing or cross-boundary interfaces are genuinely complex. Phase pipeline (budget gather, expensive plan, budget execution, expensive verification). GATHER: narrow scope first with \`code_search\` (lexical, then semantic when available) and \`web\` search to rule out hypotheses — cheapest, always first. Delegate to \`Explore\` only when search is insufficient: launch one or more \`Explore\` subagents in parallel with scoped evidence questions and let them return file:line citations; read directly only the small subset you must touch to decide or edit. \`Plan\` follows the same rule when it needs repository facts. PLAN: lead owns planning: sequence interfaces, invariants, and acceptance criteria directly. Delegate to \`Plan\` ONLY when sequencing or cross-boundary interfaces are genuinely complex and deserve a dedicated pass; \`Plan\` produces handoff-ready steps (ordered, file:line, done conditions, acceptance criteria) and may consult \`mcp__${peersKey}__oracle\` on unresolved trade-offs and reports any remaining gap to the lead. EXECUTE: lead implements directly by default. Delegate to \`General-Purpose\` FREELY for multi-step work combining investigation, tool workflows, and code changes; brief with outcome, constraints, files in scope, and verification. VERIFY: lead owns verification: run relevant build/tests, read the code, and reproduce before declaring done. Invoke \`reviewer\` ONLY when the change is genuinely behavior-changing, cross-boundary, or risk-sensitive; \`reviewer\` narrows scope with search first and may invoke \`Explore\` for targeted discovery. Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. \`Explore\` is cheap and may be launched in parallel across independent discovery questions. Send independent subagent calls in parallel within a single turn. Delegation graph: the lead may invoke all four; \`Plan\` may invoke \`Explore\` and \`reviewer\`; \`General-Purpose\` may invoke \`reviewer\`; \`reviewer\` may invoke \`Explore\` for targeted discovery; \`Explore\` and \`worker-browse\` cannot invoke native subagents.
3316
+
3317
+ ` : `${profileLabel} launch profile. The lead coordinates execution across specialized native roles: ` + buildNativeReachClauses(opts) + ". In plan mode or when designing changes with complex sequencing, interface contracts, or acceptance criteria, delegate architectural planning to `Plan` (in plan mode, produce the plan and acceptance criteria; do not edit files). Phase pipeline (budget gather, expensive plan, budget execution, expensive verification). GATHER: delegate to `Explore` instead of exploring yourself. For any question spanning more than a couple of files, launch one or more `Explore` subagents in parallel with scoped evidence questions and let them return file:line citations; read directly only the small subset you must touch to decide or edit. `Plan` follows the same rule when it needs repository facts. PLAN: `Plan` produces handoff-ready steps (ordered, file:line, done conditions, acceptance criteria) for a `General-Purpose` executor that cannot see its reasoning; `Plan` may consult Oracle on unresolved trade-offs and reports any remaining gap to the lead. EXECUTE: delegate mixed multi-step work and Plan handoffs to `General-Purpose` in a fresh context to preserve lead context; brief with outcome, constraints, files in scope, and verification. VERIFY: after behavior-changing, cross-boundary, or risk-sensitive implementation, run relevant build/tests then invoke `reviewer` before declaring done. Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` is cheap and may be launched in parallel across independent discovery questions. Send independent subagent calls in parallel within a single turn. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n";
3318
+ const windowNote = isCheapest || isBalanced ? "All roles run at a 200K context window — use targeted reads (search, Grep, Read specific files) over full file reads.\n\n" : isCheap ? "The lead runs at a 200K context window on `-m cheap` (1M on `-m cheap1m`) and every subagent runs at 200K — use targeted reads (search, Grep, Read specific files) over full file reads.\n\n" : "";
3274
3319
  const swePipelineClause = opts.sweEnabled === false ? "" : `${PIPELINE_SKILLS_AWARENESS}\n\n`;
3275
- return "## Operating defaults (these layer with the user's explicit direction and the domain's own standards as addons, not replacements: follow all three together; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\n" + pipeline + `Consultation guidance: Follow an evidence-first escalation ladder. Direct empirical evidence (search, code, tests, builds) settles factual questions first. Advisor is an optional, non-binding, lead-only transcript-aware sounding board for trajectory guidance or framing checks (direction, not dictation), and never use it for routine progress, waiting, directly verifiable facts, or completion ritual. \`mcp__${peersKey}__oracle\` is ${oracleDescriptor}, an expert consultant available to the lead and \`Plan\`, preferred over advisor for difficult conceptual, algorithmic, spec/protocol, or architectural tradeoffs evaluated in a self-contained brief; \`reviewer\` and other subagents cannot call Oracle. \`Plan\` may consult Oracle on unresolved trade-offs, and reports any remaining tie-breaking gap to the lead.${astraClause} ` + searchGuidance + `\`mcp__${searchKey}__web\` provides citable sources.${browserClause}${workerBrowseClause}${artifactClause}\n\n` + swePipelineClause + "Verify claims with concrete repository evidence and tests before declaring work done. User instructions outrank delegation triggers. Stop named teammates when finished.";
3320
+ const consultation = isBalanced ? `Consultation guidance: funnel unknowns cheapest-first. (1) \`code_search\` and \`web\` search narrow scope and rule out hypotheses — always first. (2) \`Explore\` subagents for targeted breadth only when search is insufficient. (3) \`Plan\` ONLY when sequencing or cross-boundary interfaces are genuinely complex. \`mcp__${peersKey}__oracle\` is ${oracleDescriptor}, a second opinion for precise, self-contained architectural/spec trade-offs that search and \`Explore\` (and \`Plan\`, where consulted) cannot settle; available to the lead and \`Plan\`; \`reviewer\` and other subagents cannot call Oracle. \`Plan\` may consult Oracle on unresolved trade-offs, and reports any remaining tie-breaking gap to the lead. Optimize for accuracy, intelligence, and correctness at the lowest cost — prefer direct evidence over delegation when the question is narrow. ` : `Consultation guidance: Follow an evidence-first escalation ladder. Direct empirical evidence (search, code, tests, builds) settles factual questions first. Advisor is an optional, non-binding, lead-only transcript-aware sounding board for trajectory guidance or framing checks (direction, not dictation), and never use it for routine progress, waiting, directly verifiable facts, or completion ritual. \`mcp__${peersKey}__oracle\` is ${oracleDescriptor}, an expert consultant available to the lead and \`Plan\`, preferred over advisor for difficult conceptual, algorithmic, spec/protocol, or architectural tradeoffs evaluated in a self-contained brief; \`reviewer\` and other subagents cannot call Oracle. \`Plan\` may consult Oracle on unresolved trade-offs, and reports any remaining tie-breaking gap to the lead.${astraClause} `;
3321
+ return "## Operating defaults (these layer with the user's explicit direction and the domain's own standards as addons, not replacements: follow all three together; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\n" + pipeline + windowNote + consultation + searchGuidance + `\`mcp__${searchKey}__web\` provides citable sources.${browserClause}${workerBrowseClause}${artifactClause}\n\n` + swePipelineClause + "Verify claims with concrete repository evidence and tests before declaring work done. User instructions outrank delegation triggers. Stop named teammates when finished.";
3276
3322
  }
3277
3323
  return "## Operating defaults (these layer with the user's explicit direction and the domain's own standards as addons, not replacements: follow all three together; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\nOrchestrate. Delegate research, implementation, review, and large reads to the right subagent, worker, or model. Reach for " + buildNativeReachClauses(opts) + "; worker-* agents for background non-blocking runs; Task subagents for parallel work; peer critics for review. That keeps your own context free to reason and collaborate with the user. Launch independent agents concurrently in a single message rather than serially. Delegation pays when the work is WIDE (many files or sources to sweep) or SLOW, and you need only the conclusion: the main thread is where you think with and respond to the user, and its context window is a finite shared resource. It does NOT pay merely because a sub-question is separable. A narrow, deep question whose whole value is file:line fidelity loses exactly that through a summarization layer, and a sub-question you could answer in one command is cheaper done directly than paying a subagent's startup. Do trivial, surgical, and last-mile work yourself. A named teammate persists after it reports so you can send it follow-ups, and nothing reaps it for you: its idle notice means available, not finished. Stop it once you are done with it.\n\nAdversarial review. The peer critics (`codex_critic` and `codex_reviewer`, `gemini_critic` and `gemini_reviewer`, `opus_critic`, and the `peer-review-coordinator` that fans out to several of them) are fresh-context models, so what they add is a blind spot that whoever produced the work cannot reach by thinking harder about it; prefer a critic from a different lab than the producer, since blind spots correlate within a lab. The `advisor` is a complement and not a substitute: it sees your transcript, so it catches your own drift and momentum, but it inherits your framing, which is exactly what a fresh-context critic does not. They earn their keep on consequential design choices, recommendations, and hard-to-reverse decisions: the cases where plausible alternatives remain and the conclusion rests on judgment rather than on something you can verify directly. That is where confabulation hides, so budget the wait even under delivery pressure. Always consult one when the change touches auth, user input, database queries, crypto, or serialization. They do NOT pay for read-only tracing, ordinary repository lookup, or a conclusion that a focused test, a direct reproduction, or unambiguous code evidence already settles. Asking a critic to re-derive a proven fact returns a confident answer either way, which is ritual skepticism rather than review, and skipping them there is the right call and not a shortcut. Match the lens to the artifact: a strategic critic for plans and trade-offs, a code reviewer for a concrete diff, the coordinator only when the risk warrants several independent lenses. Give whichever you pick the artifact and the constraints and not your rationale, since justification anchors the review and dulls it.\n\nAim high. Default to radical simplicity and a relentless focus on the user's real experience: design for the person and the job to be done, not the demo. Reason about the whole system from first principles, anticipating scale and the long arc rather than patching the surface. Work backwards from the outcome the user actually needs. Question every assumption and prefer what you can derive, reproduce, or test.\n\nEngineering excellence. When making technical decisions, give little weight to development cost; prefer quality, simplicity, robustness, scalability, and long-term maintainability. Fix a bug by first reproducing it end to end, as close to how a real user hits it as you can, so you solve the real problem and not a symptom. When testing a product end to end, be picky about the UI and obsessed with pixel perfection: if something clearly looks off, even when it is unrelated to your task, get it fixed along the way. Hold that same bar for the codebase itself: a lint error, a failing test, or a flaky test is worth fixing the moment you see it, whoever introduced it. Fold it into your current work rather than letting it derail the task the user actually asked for.";
3278
3324
  }
@@ -3293,7 +3339,10 @@ function buildOperatingDefaultsDigest(opts = {}) {
3293
3339
  const oracleDescriptor = isCheapest ? "(GPT-5.6 Sol 200K/high, lead and Plan)" : isCheap || isBalanced ? "(Grok 4.6 200K/medium, lead and Plan)" : "(Opus 5 1M/high, lead and Plan)";
3294
3340
  const advisorDescriptor = isCheapest ? "(Gemini/high, lead-only)" : "(Sol/high, lead-only)";
3295
3341
  const astraStep = opts.astraAvailable && (opts.profile === "fast" || opts.profile === "cheap1m") ? `; (4) \`astra\` (GPT-6 Astra 200K/${isCheap ? "medium" : "high"}, lead-only) only as a last resort when direct evidence, Advisor, and Oracle cannot produce a defensible path (at most 1-2 calls per decision).` : ".";
3296
- return "## Operating defaults (these layer with the user's direction and the domain's standards as addons: follow all three; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\n" + (isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly: use \`Explore\` for discovery spanning more than a couple of files, \`Plan\` in plan mode or for complex sequencing, \`General-Purpose\` for mixed multi-step execution, and \`reviewer\` for behavior-changing or risk-sensitive changes. Handle trivial and surgical edits directly. Stop named teammates when finished.\n\n` : `${profileLabel} launch profile. The lead coordinates execution across specialized roles: delegate broad discovery to \`Explore\` in parallel and do not sweep the repo yourself (read directly only files you will act on); delegate to \`Plan\` in plan mode or when structuring complex multi-step sequencing (\`Plan\` is an advisory planning capability, not an approval gate, and writes handoff-ready steps for \`General-Purpose\`); delegate mixed multi-step execution and Plan handoffs to \`General-Purpose\` in a fresh context; delegate to \`reviewer\` after behavior-changing or risk-sensitive implementation to verify correctness before declaring done; handle trivial and surgical edits directly. Send independent subagent calls in parallel within a single turn. Stop named teammates when finished.\n\n`) + digestPipelineSentence + "Verify claims against real evidence: run relevant commands and tests. Follow a disciplined consultation ladder for unresolved decisions: (1) direct code inspection, search, builds, and tests settle factual questions; (2) `advisor` " + advisorDescriptor + " for transcript-aware framing checks or trajectory guidance; (3) `oracle` " + oracleDescriptor + " for self-contained technical/architectural trade-offs" + astraStep;
3342
+ const delegation = isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly: use \`Explore\` for discovery spanning more than a couple of files, \`Plan\` in plan mode or for complex sequencing, \`General-Purpose\` for mixed multi-step execution, and \`reviewer\` for behavior-changing or risk-sensitive changes. Handle trivial and surgical edits directly. Stop named teammates when finished.\n\n` : isBalanced ? `${profileLabel} launch profile. The lead owns planning, implementation, and verification by default: narrow scope first with \`code_search\` and \`web\` search to rule out hypotheses (cheapest, always first); delegate to \`Explore\` in parallel only when search is insufficient (read directly only files you will act on); delegate to \`Plan\` ONLY when sequencing or cross-boundary interfaces are genuinely complex; delegate to \`General-Purpose\` FREELY for multi-step work combining investigation, tool workflows, and code changes; invoke \`reviewer\` ONLY when the change is genuinely behavior-changing, cross-boundary, or risk-sensitive (\`reviewer\` narrows scope with search first and may invoke \`Explore\` for targeted discovery); handle trivial and surgical edits directly. Send independent subagent calls in parallel within a single turn. Stop named teammates when finished.\n\n` : `${profileLabel} launch profile. The lead coordinates execution across specialized roles: delegate broad discovery to \`Explore\` in parallel and do not sweep the repo yourself (read directly only files you will act on); delegate to \`Plan\` in plan mode or when structuring complex multi-step sequencing (\`Plan\` is an advisory planning capability, not an approval gate, and writes handoff-ready steps for \`General-Purpose\`); delegate mixed multi-step execution and Plan handoffs to \`General-Purpose\` in a fresh context; delegate to \`reviewer\` after behavior-changing or risk-sensitive implementation to verify correctness before declaring done; handle trivial and surgical edits directly. Send independent subagent calls in parallel within a single turn. Stop named teammates when finished.\n\n`;
3343
+ const consultationLadder = isBalanced ? "Verify claims against real evidence: run relevant commands and tests. Funnel unknowns cheapest-first: (1) `code_search` + `web` search narrow scope and rule out hypotheses first; (2) `Explore` for targeted breadth when search is insufficient; (3) `Plan` only when sequencing or cross-boundary interfaces are genuinely complex; (4) `oracle` " + oracleDescriptor + " as a second opinion for precise, self-contained technical/architectural trade-offs that search, `Explore`, and (where consulted) `Plan` cannot settle. Optimize for accuracy, intelligence, and correctness at the lowest cost." : "Verify claims against real evidence: run relevant commands and tests. Follow a disciplined consultation ladder for unresolved decisions: (1) direct code inspection, search, builds, and tests settle factual questions; (2) `advisor` " + advisorDescriptor + " for transcript-aware framing checks or trajectory guidance; (3) `oracle` " + oracleDescriptor + " for self-contained technical/architectural trade-offs" + astraStep;
3344
+ const digestWindowNote = isCheapest || isBalanced ? "All roles run at a 200K context window — use targeted reads over full file reads.\n\n" : isCheap ? "The lead runs at 200K on `-m cheap` (1M on `-m cheap1m`) and every subagent runs at 200K — use targeted reads over full file reads.\n\n" : "";
3345
+ return "## Operating defaults (these layer with the user's direction and the domain's standards as addons: follow all three; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\n" + delegation + digestPipelineSentence + digestWindowNote + consultationLadder;
3297
3346
  }
3298
3347
  return STANDARD_OPERATING_DEFAULTS_DIGEST;
3299
3348
  }
@@ -3769,37 +3818,39 @@ async function writeInjectedSkill(name, md) {
3769
3818
  * other three in strict sequence; the three stages stay individually
3770
3819
  * invokable for users who only want one stage.
3771
3820
  */
3772
- function getPipelineSkills(searchEnabled) {
3821
+ function getPipelineSkills(searchEnabled, bluebirdEnabled = false) {
3773
3822
  return [
3774
- buildGatherContextSkill(searchEnabled),
3775
- buildPlanSkill(searchEnabled),
3776
- buildImplementSkill(searchEnabled),
3777
- buildSwePipelineSkill(searchEnabled)
3823
+ buildGatherContextSkill(searchEnabled, bluebirdEnabled),
3824
+ buildPlanSkill(searchEnabled || bluebirdEnabled),
3825
+ buildImplementSkill(searchEnabled || bluebirdEnabled),
3826
+ buildSwePipelineSkill(searchEnabled || bluebirdEnabled)
3778
3827
  ];
3779
3828
  }
3780
3829
  /**
3781
3830
  * Build all injected skills in dependency order (research underpins the
3782
- * others), with search guidance matched to the launch's search capability.
3831
+ * others), with search guidance matched to the launch's search backend.
3783
3832
  */
3784
- function getInjectedSkills(searchEnabled) {
3833
+ function getInjectedSkills(searchEnabled, bluebirdEnabled = false) {
3834
+ const semanticAvailable = searchEnabled || bluebirdEnabled;
3785
3835
  return [
3786
- buildResearchSkill(searchEnabled),
3787
- buildGatherContextSkill(searchEnabled),
3788
- buildPlanSkill(searchEnabled),
3789
- buildImplementSkill(searchEnabled),
3790
- buildOrchestrateSkill(searchEnabled),
3791
- buildFloorKeeperSkill(searchEnabled),
3792
- buildWorkerSkill(searchEnabled),
3793
- buildFirstMateSkill(searchEnabled),
3794
- buildFirstMateSetupSkill(searchEnabled),
3795
- buildFirstMateOperateSkill(searchEnabled),
3796
- buildFirstMateConductSkill(searchEnabled)
3836
+ buildResearchSkill(searchEnabled, bluebirdEnabled),
3837
+ buildGatherContextSkill(searchEnabled, bluebirdEnabled),
3838
+ buildPlanSkill(semanticAvailable),
3839
+ buildImplementSkill(semanticAvailable),
3840
+ buildOrchestrateSkill(searchEnabled, bluebirdEnabled),
3841
+ buildFloorKeeperSkill(semanticAvailable),
3842
+ buildWorkerSkill(semanticAvailable),
3843
+ buildFirstMateSkill(semanticAvailable),
3844
+ buildFirstMateSetupSkill(semanticAvailable),
3845
+ buildFirstMateOperateSkill(semanticAvailable),
3846
+ buildFirstMateConductSkill(semanticAvailable)
3797
3847
  ];
3798
3848
  }
3799
3849
  function injectedSkillsForLaunch(selection) {
3800
3850
  const searchEnabled = selection.searchEnabled === true;
3801
- const allSkills = getInjectedSkills(searchEnabled);
3802
- const pipelineSkills = getPipelineSkills(searchEnabled);
3851
+ const bluebirdEnabled = selection.bluebirdEnabled === true;
3852
+ const allSkills = getInjectedSkills(searchEnabled, bluebirdEnabled);
3853
+ const pipelineSkills = getPipelineSkills(searchEnabled, bluebirdEnabled);
3803
3854
  if (isPipelineSkillProfile(selection.profileId)) {
3804
3855
  if (!selection.sweEnabled) {
3805
3856
  if (selection.profileId === "max" && selection.firstMateEnabled) return allSkills.filter((skill) => skill.name.startsWith("gh-first-mate"));
@@ -3882,4 +3933,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
3882
3933
  //#endregion
3883
3934
  export { writePeerMcpRuntimeFiles as C, workersKeyOf as S, sanitizeServeSettingsEnv as _, appendPeerAwarenessToMirroredClaudeMd as a, resolveCodexCliBackend as b, buildOperatingDefaultsDirective as c, prependStyleDirectiveToMirroredClaudeMd as d, buildArtifactReviewSkill as f, planModeAllowRules as g, injectAllowRules as h, writeInjectedSkill as i, prependArtifactPanelDirectiveToMirroredClaudeMd as l, configureServeDefaultPermissionMode as m, getInjectedSkills as n, appendToolbeltAwarenessToMirroredClaudeMd as o, SEAMLESS_BUILTIN_TOOLS as p, injectedSkillsForLaunch as r, buildOperatingDefaultsDigest as s, injectAttributionSuppressionIntoSettingsFile as t, prependOperatingDefaultsToMirroredClaudeMd as u, BUILTIN_SUBAGENT_DEFINITIONS as v, resolveGroupKeysFromMirror as x, injectPeerMcpIntoMirror as y };
3884
3935
 
3885
- //# sourceMappingURL=attribution-settings-7dFpObGh.js.map
3936
+ //# sourceMappingURL=attribution-settings-Cu9cYRHf.js.map