github-router 0.3.356 → 0.3.367
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ado-tools-rysFZDws.js +1 -0
- package/dist/{aic-ledger-BuFrsGur.js → aic-ledger-_mvGW2Ev.js} +42 -7
- package/dist/aic-ledger-_mvGW2Ev.js.map +1 -0
- package/dist/{aic-statusline-settings-DBS9sEGC.js → aic-statusline-settings-B5EMMSFC.js} +2 -2
- package/dist/{aic-statusline-settings-DBS9sEGC.js.map → aic-statusline-settings-B5EMMSFC.js.map} +1 -1
- package/dist/{attribution-settings-CnmV9MSv.js → attribution-settings-wVzQvIdL.js} +188 -64
- package/dist/attribution-settings-wVzQvIdL.js.map +1 -0
- package/dist/{auth-DFawaLJU.js → auth-B3UvYB2r.js} +3 -3
- package/dist/{auth-DFawaLJU.js.map → auth-B3UvYB2r.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-BkVEl-Su.js → check-usage-45vyaLfl.js} +4 -4
- package/dist/{check-usage-BkVEl-Su.js.map → check-usage-45vyaLfl.js.map} +1 -1
- package/dist/{claude-DvR3Y7fu.js → claude-B3pIageM.js} +89 -41
- package/dist/claude-B3pIageM.js.map +1 -0
- package/dist/{claude-md-injection-Cpzolxin.js → claude-md-injection-BV4tPUWo.js} +126 -35
- package/dist/claude-md-injection-BV4tPUWo.js.map +1 -0
- package/dist/{codex-DQpSPjpQ.js → codex-B_AMB6JM.js} +7 -7
- package/dist/{codex-DQpSPjpQ.js.map → codex-B_AMB6JM.js.map} +1 -1
- package/dist/{copilot-discount-Bsmv_3OX.js → copilot-discount-BuDbQOHq.js} +2 -2
- package/dist/{copilot-discount-Bsmv_3OX.js.map → copilot-discount-BuDbQOHq.js.map} +1 -1
- package/dist/{debug-DkNTuErv.js → debug-DL2JsRqY.js} +2 -2
- package/dist/{debug-DkNTuErv.js.map → debug-DL2JsRqY.js.map} +1 -1
- package/dist/engine-D3oNrF6Z.js +1 -0
- package/dist/{gate-discovery-B2x_8hNL.js → gate-discovery-CXE-7VcM.js} +5 -5
- package/dist/{gate-discovery-B2x_8hNL.js.map → gate-discovery-CXE-7VcM.js.map} +1 -1
- package/dist/{get-copilot-usage-P9chc-X2.js → get-copilot-usage-BbGmK03C.js} +2 -2
- package/dist/{get-copilot-usage-P9chc-X2.js.map → get-copilot-usage-BbGmK03C.js.map} +1 -1
- package/dist/hooks.mjs +200 -117
- package/dist/hooks.sha256 +1 -1
- package/dist/{index-cmd-BkfYr9FH.js → index-cmd-CjRcmYk3.js} +4 -4
- package/dist/{index-cmd-BkfYr9FH.js.map → index-cmd-CjRcmYk3.js.map} +1 -1
- package/dist/{internal-aic-status-C6L4-ncP.js → internal-aic-status-BAVomi5A.js} +4 -4
- package/dist/{internal-aic-status-C6L4-ncP.js.map → internal-aic-status-BAVomi5A.js.map} +1 -1
- package/dist/{internal-artifact-open-DgJ3PCtt.js → internal-artifact-open-NAGn9Mgt.js} +2 -2
- package/dist/{internal-artifact-open-DgJ3PCtt.js.map → internal-artifact-open-NAGn9Mgt.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-CicGz6oM.js → internal-fast-dispatch-guard-DP25L_Bx.js} +1 -1
- package/dist/{internal-fast-dispatch-guard-CgBtUsQI.js → internal-fast-dispatch-guard-DbrgO9Ab.js} +2 -2
- package/dist/{internal-fast-dispatch-guard-CgBtUsQI.js.map → internal-fast-dispatch-guard-DbrgO9Ab.js.map} +1 -1
- package/dist/{internal-first-mate-guard-DTXPT7JW.js → internal-first-mate-guard-C8GwLbaX.js} +1 -1
- package/dist/{internal-first-mate-guard-BfWYN6Jb.js → internal-first-mate-guard-GufCUMl3.js} +3 -3
- package/dist/{internal-first-mate-guard-BfWYN6Jb.js.map → internal-first-mate-guard-GufCUMl3.js.map} +1 -1
- package/dist/{internal-max-dispatch-guard-mNl9CCir.js → internal-max-dispatch-guard-BB0vwiPx.js} +1 -1
- package/dist/{internal-max-dispatch-guard-CY8l9SDw.js → internal-max-dispatch-guard-BodVFHRC.js} +2 -2
- package/dist/{internal-max-dispatch-guard-CY8l9SDw.js.map → internal-max-dispatch-guard-BodVFHRC.js.map} +1 -1
- package/dist/{internal-plan-review-2OHTs8Nk.js → internal-plan-review-ChFx8wTX.js} +3 -3
- package/dist/{internal-plan-review-2OHTs8Nk.js.map → internal-plan-review-ChFx8wTX.js.map} +1 -1
- package/dist/{internal-prompt-submit-CkfUcu34.js → internal-prompt-submit-BaccW_CC.js} +4 -4
- package/dist/{internal-prompt-submit-CkfUcu34.js.map → internal-prompt-submit-BaccW_CC.js.map} +1 -1
- package/dist/{internal-prompt-submit-DZ_-2A6a.js → internal-prompt-submit-DPUBQZtG.js} +2 -2
- package/dist/{internal-rebrief-EhBHAHsz.js → internal-rebrief-NjSlx5QY.js} +4 -4
- package/dist/{internal-rebrief-EhBHAHsz.js.map → internal-rebrief-NjSlx5QY.js.map} +1 -1
- package/dist/{internal-session-bind-Bv50ju2n.js → internal-session-bind-dsUOcKxU.js} +2 -2
- package/dist/{internal-session-bind-Bv50ju2n.js.map → internal-session-bind-dsUOcKxU.js.map} +1 -1
- package/dist/{internal-stop-hook-Dm-m8RoA.js → internal-stop-hook-B2TTl6Zp.js} +5 -5
- package/dist/{internal-stop-hook-Dm-m8RoA.js.map → internal-stop-hook-B2TTl6Zp.js.map} +1 -1
- package/dist/{internal-stop-review-K6f8xsCh.js → internal-stop-review-D_KEV_04.js} +2 -2
- package/dist/{internal-stop-review-K6f8xsCh.js.map → internal-stop-review-D_KEV_04.js.map} +1 -1
- package/dist/{internal-worker-guard-GVhTjVlR.js → internal-worker-guard-DB6shBIn.js} +2 -2
- package/dist/{internal-worker-guard-GVhTjVlR.js.map → internal-worker-guard-DB6shBIn.js.map} +1 -1
- package/dist/{internal-workspace-header-d2hFf9Jy.js → internal-workspace-header-DBg5Y7oN.js} +2 -2
- package/dist/{internal-workspace-header-d2hFf9Jy.js.map → internal-workspace-header-DBg5Y7oN.js.map} +1 -1
- package/dist/{lifecycle-C6cxM_Nk.js → lifecycle-9nX09dBl.js} +2 -2
- package/dist/{lifecycle-C6cxM_Nk.js.map → lifecycle-9nX09dBl.js.map} +1 -1
- package/dist/lifecycle-C_CT13c9.js +1 -0
- package/dist/lifecycle-DibiH857.js +1 -0
- package/dist/{lifecycle-pl9QpvqD.js → lifecycle-Gge2Dadd.js} +2 -2
- package/dist/{lifecycle-pl9QpvqD.js.map → lifecycle-Gge2Dadd.js.map} +1 -1
- package/dist/main.js +23 -23
- package/dist/{mcp-workspace-header-Su8uUxJg.js → mcp-workspace-header-Xw9B1W6T.js} +2 -2
- package/dist/{mcp-workspace-header-Su8uUxJg.js.map → mcp-workspace-header-Xw9B1W6T.js.map} +1 -1
- package/dist/{models-D8v8OTbN.js → models-BR6i348u.js} +3 -3
- package/dist/{models-D8v8OTbN.js.map → models-BR6i348u.js.map} +1 -1
- package/dist/{orchestration-Bov4rZEi.js → orchestration-D3-2ulhX.js} +2 -2
- package/dist/{orchestration-Bov4rZEi.js.map → orchestration-D3-2ulhX.js.map} +1 -1
- package/dist/{paths-BSI_EtDT.js → paths-C5477RGC.js} +48 -4
- package/dist/paths-C5477RGC.js.map +1 -0
- package/dist/paths-CEswtFj5.js +1 -0
- package/dist/{peer-mcp-personas-CVxXq1Q-.js → peer-mcp-personas-BOgR46nM.js} +641 -270
- package/dist/peer-mcp-personas-BOgR46nM.js.map +1 -0
- package/dist/{pi-D-BgxVhx.js → pi-DcWp83mx.js} +377 -602
- package/dist/pi-DcWp83mx.js.map +1 -0
- package/dist/{plan-review-hook-CHK1wL3-.js → plan-review-hook-C9K-em4D.js} +3 -3
- package/dist/{plan-review-hook-CHK1wL3-.js.map → plan-review-hook-C9K-em4D.js.map} +1 -1
- package/dist/{provision-DYmZgZDr.js → provision-DkWR9B6I.js} +5 -5
- package/dist/{provision-DYmZgZDr.js.map → provision-DkWR9B6I.js.map} +1 -1
- package/dist/{self-invocation-Dk_UHD_v.js → self-invocation-BtcGj-lY.js} +2 -2
- package/dist/{self-invocation-Dk_UHD_v.js.map → self-invocation-BtcGj-lY.js.map} +1 -1
- package/dist/{serve-DfxxKLFl.js → serve-BGwEVDdc.js} +14 -14
- package/dist/{serve-DfxxKLFl.js.map → serve-BGwEVDdc.js.map} +1 -1
- package/dist/{server-setup-VYf8ptCH.js → server-setup-DVPL9iph.js} +911 -100
- package/dist/server-setup-DVPL9iph.js.map +1 -0
- package/dist/{service-backend-DHyd9vjW.js → service-backend-B6D_DY1Z.js} +3 -3
- package/dist/{service-backend-DHyd9vjW.js.map → service-backend-B6D_DY1Z.js.map} +1 -1
- package/dist/{start-BsY1d26G.js → start-BUWx3nSr.js} +4 -4
- package/dist/{start-BsY1d26G.js.map → start-BUWx3nSr.js.map} +1 -1
- package/dist/{static-context-pack-dKrzbfIN.js → static-context-pack-ChHuxBpk.js} +232 -61
- package/dist/static-context-pack-ChHuxBpk.js.map +1 -0
- package/dist/{stop-gate-hook-CC7VWkZM.js → stop-gate-hook-DnLC09Lg.js} +3 -3
- package/dist/{stop-gate-hook-CC7VWkZM.js.map → stop-gate-hook-DnLC09Lg.js.map} +1 -1
- package/dist/{stop-gate-policy-CoR8xKNQ.js → stop-gate-policy-Dx9c98_d.js} +2 -2
- package/dist/{stop-gate-policy-CoR8xKNQ.js.map → stop-gate-policy-Dx9c98_d.js.map} +1 -1
- package/dist/{token-CA2s70qj.js → token-OTb61rOC.js} +2 -2
- package/dist/{token-CA2s70qj.js.map → token-OTb61rOC.js.map} +1 -1
- package/dist/{worker-dispatch-B_rriT7z.js → worker-dispatch-B1w2qfjX.js} +2 -2
- package/dist/{worker-dispatch-B_rriT7z.js.map → worker-dispatch-B1w2qfjX.js.map} +1 -1
- package/docs/azure-mcp.md +29 -31
- package/package.json +1 -1
- package/dist/ado-tools-DokE2DbX.js +0 -1
- package/dist/aic-ledger-BuFrsGur.js.map +0 -1
- package/dist/attribution-settings-CnmV9MSv.js.map +0 -1
- package/dist/claude-DvR3Y7fu.js.map +0 -1
- package/dist/claude-md-injection-Cpzolxin.js.map +0 -1
- package/dist/engine-DgmsdkCe.js +0 -1
- package/dist/lifecycle-BU_d2QMs.js +0 -1
- package/dist/lifecycle-ByFyew_w.js +0 -1
- package/dist/paths-BSI_EtDT.js.map +0 -1
- package/dist/paths-BYxX9DfA.js +0 -1
- package/dist/peer-mcp-personas-CVxXq1Q-.js.map +0 -1
- package/dist/pi-D-BgxVhx.js.map +0 -1
- package/dist/server-setup-VYf8ptCH.js.map +0 -1
- package/dist/static-context-pack-dKrzbfIN.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { p as writeRuntimeFileSecure, t as PATHS } from "./paths-C5477RGC.js";
|
|
2
|
+
import { A as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, D as BALANCED_REVIEWER_ALIAS_ID, E as BALANCED_GENERAL_PURPOSE_ALIAS_ID, F as CHEAP_REVIEWER_ALIAS_ID, I as LUNA_SCOUT_ALIAS_ID, L as MAX_BROWSE_LOW_ALIAS_ID, M as CHEAP_EXPLORE_ALIAS_ID, N as CHEAP_GENERAL_PURPOSE_ALIAS_ID, O as BROWSE_LOW_ALIAS_ID, P as CHEAP_PLAN_ALIAS_ID, T as BALANCED_EXPLORE_ALIAS_ID, j as CHEAPEST_REVIEWER_ALIAS_ID, k as CHEAPEST_EXPLORE_ALIAS_ID } from "./server-setup-DVPL9iph.js";
|
|
3
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-JOnZBgFB.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { $n as CHEAP_PROFILE_NATIVE_EFFORTS, Cn as CONDENSED_OPERATING_SEQUENCE, Jn as withOneMSuffix, Qn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, a as buildAgentPrompt, l as maxPersonasFor, n as MCP_GROUPS, qn as oneMContextDisabled, t as GROUP_META, u as personasFor, wn as DEFINITION_OF_GREATNESS } from "./peer-mcp-personas-BOgR46nM.js";
|
|
5
|
+
import { F as CHEAPEST_PROFILE_NATIVE_EFFORTS, P as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, T as LOCAL_PROFILE_NATIVE_MODELS, _ as isCheapestFamily, g as isBalancedFamily, v as isLocalFamily, w as LOCAL_PROFILE_NATIVE_AGENT_NAMES } from "./static-context-pack-ChHuxBpk.js";
|
|
6
6
|
import { a as BALANCED_PROFILE_NATIVE_EFFORTS, i as BALANCED_PROFILE_NATIVE_AGENT_NAMES } from "./balanced-profile-contract-DtnTIBjL.js";
|
|
7
7
|
import { 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-Cx5_Z1Y7.js";
|
|
8
|
-
import "./self-invocation-
|
|
9
|
-
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-
|
|
10
|
-
import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-
|
|
11
|
-
import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-
|
|
12
|
-
import { o as isUnderClaudeConfigMirrorRealpath, u as renameWithRetry } from "./claude-md-injection-
|
|
8
|
+
import "./self-invocation-BtcGj-lY.js";
|
|
9
|
+
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-DkWR9B6I.js";
|
|
10
|
+
import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-Xw9B1W6T.js";
|
|
11
|
+
import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-B1w2qfjX.js";
|
|
12
|
+
import { o as isUnderClaudeConfigMirrorRealpath, u as renameWithRetry } from "./claude-md-injection-BV4tPUWo.js";
|
|
13
13
|
import consola from "consola";
|
|
14
14
|
import path from "node:path";
|
|
15
15
|
import { randomBytes } from "node:crypto";
|
|
@@ -464,23 +464,39 @@ Open questions: any unresolved trade-off, as options with a recommendation. Omit
|
|
|
464
464
|
` + (opts.is200K ? PROMPT_200K_NOTE : "") + readOnlyToolSteer(opts.semanticAvailable);
|
|
465
465
|
}
|
|
466
466
|
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).";
|
|
467
|
-
function pinnedGeneralPurposeDescription(explicit, isBalanced = false, is200K = false) {
|
|
468
|
-
|
|
467
|
+
function pinnedGeneralPurposeDescription(explicit, isBalanced = false, is200K = false, planAgent = true) {
|
|
468
|
+
const planClause = planAgent ? " Follows a Plan handoff when one exists and otherwise investigates before acting." : " Investigates before acting when the lead has not already supplied a plan.";
|
|
469
|
+
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." + planClause + " " : "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." + planClause + " " : "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 : "");
|
|
469
470
|
}
|
|
470
471
|
function pinnedGeneralPurposePrompt(opts) {
|
|
471
|
-
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");
|
|
472
|
+
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. " + (opts?.planAgent === false ? "When the lead hands you a plan, 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. " : "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");
|
|
472
473
|
}
|
|
473
474
|
const REVIEWER_DESC_TAIL = "Runs builds/tests itself rather than assuming them. Returns SHIP / FIX / BLOCK with reproducible evidence. Never edits source.";
|
|
474
475
|
function pinnedReviewerDescription(explicit, isBalanced = false, is200K = false, protegeAdvisor = false) {
|
|
475
476
|
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 : "") + (protegeAdvisor ? " May consult its Sol advisor (at most 5 advisor rounds per review) on consequential uncertainty it cannot settle by evidence." : "");
|
|
476
477
|
}
|
|
477
|
-
/** Protege appendix for the cheapest
|
|
478
|
+
/** Protege appendix for the cheapest reviewer: the capped Sol-advisor
|
|
478
479
|
* protocol. Appended after the delegation paragraph so the adversarial core
|
|
479
|
-
* above stays byte-identical across profiles.
|
|
480
|
-
|
|
480
|
+
* above stays byte-identical across profiles.
|
|
481
|
+
*
|
|
482
|
+
* `framing` is the one clause that varies: a Copilot-served lead can be told
|
|
483
|
+
* the consultant is the stronger cross-lab model, but a `local` launch bills
|
|
484
|
+
* an endpoint whose model the proxy knows nothing about, so the only claim it
|
|
485
|
+
* can make is who serves the consultant. Same builder, so the behavioural
|
|
486
|
+
* contract cannot drift between the two.
|
|
487
|
+
*
|
|
488
|
+
* Both framings describe the curated transport, not a full transcript: the
|
|
489
|
+
* reviewer's consult is rendered by the curated path (24K transcript budget,
|
|
490
|
+
* tool-aware, layered under `<operator_focus>` / `<caller_context>`), so
|
|
491
|
+
* promising the whole transcript would overstate what the advisor sees. */
|
|
492
|
+
function buildProtegeAdvisorAppendix(framing) {
|
|
493
|
+
return "You have an `advisor` tool backed by Sol, " + framing + ". You own the verdict; the advisor is counsel, never authority — it never approves, vetoes, or decides for you. Budget: at most 5 advisor rounds per review (code-enforced; one round is one back-and-forth exchange). Spend them only on consequential uncertainty that repository evidence, builds, or tests cannot settle: a changed assumption, conflicting evidence, an approach that will not converge, or a severity call with merge-blocking consequences. Every consult must state the precise question, your evidence so far with file:line citations, the credible alternatives, and what evidence would change your verdict. Never consult for routine verification, progress narration, reassurance, or completion ritual — run the check yourself. If the advisor disagrees with you, evaluate on the merits: adopt what is right with a one-line reason, defend what is verified with evidence, and record the disagreement in your result. ";
|
|
494
|
+
}
|
|
495
|
+
const PROTEGE_ADVISOR_APPENDIX = buildProtegeAdvisorAppendix("a stronger cross-lab model that sees the ask, the brief you write, and a bounded transcript");
|
|
496
|
+
const LOCAL_PROTEGE_ADVISOR_APPENDIX = buildProtegeAdvisorAppendix("a Copilot-served model that sees the ask, the brief you write, and a bounded transcript");
|
|
481
497
|
function pinnedReviewerPrompt(semanticAvailable = true, opts) {
|
|
482
498
|
const delegation = 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). ";
|
|
483
|
-
const protege = opts?.protegeAdvisor === true ? PROTEGE_ADVISOR_APPENDIX : "";
|
|
499
|
+
const protege = opts?.protegeAdvisor === true ? opts?.localAdvisor === true ? LOCAL_PROTEGE_ADVISOR_APPENDIX : PROTEGE_ADVISOR_APPENDIX : "";
|
|
484
500
|
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. " + delegation + protege + "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);
|
|
485
501
|
}
|
|
486
502
|
/** Build the literal `-m fast` native roster. This is intentionally separate
|
|
@@ -713,8 +729,11 @@ function buildCheapestProfileAgentDefinitions(opts) {
|
|
|
713
729
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
714
730
|
},
|
|
715
731
|
"General-Purpose": {
|
|
716
|
-
description: pinnedGeneralPurposeDescription(false, false, true),
|
|
717
|
-
prompt: pinnedGeneralPurposePrompt({
|
|
732
|
+
description: pinnedGeneralPurposeDescription(false, false, true, false),
|
|
733
|
+
prompt: pinnedGeneralPurposePrompt({
|
|
734
|
+
is200K: true,
|
|
735
|
+
planAgent: false
|
|
736
|
+
}),
|
|
718
737
|
model: generalModel,
|
|
719
738
|
effort: effort("General-Purpose"),
|
|
720
739
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
@@ -746,6 +765,91 @@ function buildCheapestProfileAgentDefinitions(opts) {
|
|
|
746
765
|
for (const name of Object.keys(out)) if (name !== "worker-browse" && !roster.has(name)) delete out[name];
|
|
747
766
|
return out;
|
|
748
767
|
}
|
|
768
|
+
/**
|
|
769
|
+
* Build the literal `-m local` / `-m local2` native roster.
|
|
770
|
+
*
|
|
771
|
+
* The cheapest surface with the cheapest prompts, differing in exactly one
|
|
772
|
+
* dimension: every role's `model:` is the LOCAL endpoint's own tier id
|
|
773
|
+
* (`haiku` / `sonnet` / `opus`) instead of a router-owned alias. Those ids
|
|
774
|
+
* resolve back to themselves through the `ANTHROPIC_DEFAULT_*_MODEL` tier rows
|
|
775
|
+
* the launcher seeds, so Claude Code neither catalog-resolves them nor
|
|
776
|
+
* upgrades their accounting, and the local server receives the id it
|
|
777
|
+
* advertises.
|
|
778
|
+
*
|
|
779
|
+
* Deliberately NOT run through `MODEL_ALIAS_TABLE`: that table exists so
|
|
780
|
+
* Claude Code will not `[1m]`-upgrade a REAL catalog id, and a local tier id is
|
|
781
|
+
* not a catalog id at all.
|
|
782
|
+
*
|
|
783
|
+
* The one prompt deviation from cheapest is the reviewer's optional protege
|
|
784
|
+
* appendix, which names an `advisor` tool. It is emitted only when the launch
|
|
785
|
+
* actually has an Advisor (`local2`): naming a tool that does not exist is the
|
|
786
|
+
* failure mode the droppable-agent rule exists to prevent.
|
|
787
|
+
*
|
|
788
|
+
* Unlike cheapest, this roster never includes `worker-browse`, even when browse
|
|
789
|
+
* is enabled. `worker-browse` is a Pi worker and a worker answers on a Copilot
|
|
790
|
+
* model, which is the one thing these profiles forbid a subagent to do. The
|
|
791
|
+
* browser CAPABILITY does not depend on it: the `browser` group's own
|
|
792
|
+
* `browser_*` tools are model-free and are published on both profiles.
|
|
793
|
+
*/
|
|
794
|
+
function buildLocalProfileAgentDefinitions(opts) {
|
|
795
|
+
const exploreModel = opts.localExploreModel ?? LOCAL_PROFILE_NATIVE_MODELS.Explore;
|
|
796
|
+
const generalModel = opts.localGeneralPurposeModel ?? LOCAL_PROFILE_NATIVE_MODELS["General-Purpose"];
|
|
797
|
+
const reviewerModel = opts.localReviewerModel ?? LOCAL_PROFILE_NATIVE_MODELS.reviewer;
|
|
798
|
+
const semanticAvailable = opts.semanticSearchAvailable === true;
|
|
799
|
+
const protegeAdvisor = opts.advisorAvailable === true;
|
|
800
|
+
const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
|
|
801
|
+
const searchMcpServers = opts.serverUrl ? { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } : void 0;
|
|
802
|
+
const readSearchTools = [
|
|
803
|
+
"Read",
|
|
804
|
+
"Grep",
|
|
805
|
+
"Glob",
|
|
806
|
+
"Bash",
|
|
807
|
+
"WebFetch",
|
|
808
|
+
"WebSearch",
|
|
809
|
+
`mcp__${searchKey}__*`
|
|
810
|
+
];
|
|
811
|
+
const effort = (name) => CHEAPEST_PROFILE_NATIVE_EFFORTS[name];
|
|
812
|
+
const out = {
|
|
813
|
+
Explore: {
|
|
814
|
+
description: pinnedExploreDescription(false, true),
|
|
815
|
+
prompt: pinnedExplorePrompt({
|
|
816
|
+
explicit: false,
|
|
817
|
+
semanticAvailable,
|
|
818
|
+
is200K: true,
|
|
819
|
+
bluebirdEnabled: opts.bluebirdEnabled
|
|
820
|
+
}),
|
|
821
|
+
tools: readSearchTools,
|
|
822
|
+
model: exploreModel,
|
|
823
|
+
effort: effort("Explore"),
|
|
824
|
+
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
825
|
+
},
|
|
826
|
+
"General-Purpose": {
|
|
827
|
+
description: pinnedGeneralPurposeDescription(false, false, true, false),
|
|
828
|
+
prompt: pinnedGeneralPurposePrompt({
|
|
829
|
+
is200K: true,
|
|
830
|
+
planAgent: false
|
|
831
|
+
}),
|
|
832
|
+
model: generalModel,
|
|
833
|
+
effort: effort("General-Purpose"),
|
|
834
|
+
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
835
|
+
},
|
|
836
|
+
reviewer: {
|
|
837
|
+
description: pinnedReviewerDescription(false, false, true, protegeAdvisor),
|
|
838
|
+
prompt: pinnedReviewerPrompt(semanticAvailable, {
|
|
839
|
+
is200K: true,
|
|
840
|
+
protegeAdvisor,
|
|
841
|
+
localAdvisor: protegeAdvisor
|
|
842
|
+
}),
|
|
843
|
+
model: reviewerModel,
|
|
844
|
+
effort: effort("reviewer"),
|
|
845
|
+
tools: readSearchTools,
|
|
846
|
+
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
const roster = opts.nativeRoster == null ? new Set(LOCAL_PROFILE_NATIVE_AGENT_NAMES) : opts.nativeRoster instanceof Set ? opts.nativeRoster : new Set(opts.nativeRoster);
|
|
850
|
+
for (const name of Object.keys(out)) if (!roster.has(name)) delete out[name];
|
|
851
|
+
return out;
|
|
852
|
+
}
|
|
749
853
|
/** Build the literal `-m balanced` native roster. Three-agent surface
|
|
750
854
|
* (`Explore`, `General-Purpose`, `reviewer` — no `Plan`: the lead owns
|
|
751
855
|
* planning directly), Sol-led at the 200K default window for the most
|
|
@@ -792,8 +896,11 @@ function buildBalancedProfileAgentDefinitions(opts) {
|
|
|
792
896
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
793
897
|
},
|
|
794
898
|
"General-Purpose": {
|
|
795
|
-
description: pinnedGeneralPurposeDescription(true, true, true),
|
|
796
|
-
prompt: pinnedGeneralPurposePrompt({
|
|
899
|
+
description: pinnedGeneralPurposeDescription(true, true, true, false),
|
|
900
|
+
prompt: pinnedGeneralPurposePrompt({
|
|
901
|
+
is200K: true,
|
|
902
|
+
planAgent: false
|
|
903
|
+
}),
|
|
797
904
|
model: generalModel,
|
|
798
905
|
effort: effort("General-Purpose"),
|
|
799
906
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
@@ -840,6 +947,7 @@ function buildPeerAgentDefinitions(opts) {
|
|
|
840
947
|
if (opts.cheapProfile) return buildCheapProfileAgentDefinitions(opts);
|
|
841
948
|
if (opts.cheapestProfile) return buildCheapestProfileAgentDefinitions(opts);
|
|
842
949
|
if (opts.balancedProfile) return buildBalancedProfileAgentDefinitions(opts);
|
|
950
|
+
if (opts.localProfile) return buildLocalProfileAgentDefinitions(opts);
|
|
843
951
|
const out = {};
|
|
844
952
|
const personas = personasFor({
|
|
845
953
|
codexCli: opts.codexCli,
|
|
@@ -1296,6 +1404,11 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
|
|
|
1296
1404
|
balancedExploreModel: opts.balancedExploreModel,
|
|
1297
1405
|
balancedGeneralPurposeModel: opts.balancedGeneralPurposeModel,
|
|
1298
1406
|
balancedReviewerModel: opts.balancedReviewerModel,
|
|
1407
|
+
localExploreModel: opts.localExploreModel,
|
|
1408
|
+
localGeneralPurposeModel: opts.localGeneralPurposeModel,
|
|
1409
|
+
localReviewerModel: opts.localReviewerModel,
|
|
1410
|
+
localProfile: opts.localProfile,
|
|
1411
|
+
advisorAvailable: opts.advisorAvailable,
|
|
1299
1412
|
semanticSearchAvailable: opts.semanticSearchAvailable,
|
|
1300
1413
|
bluebirdEnabled: opts.bluebirdEnabled,
|
|
1301
1414
|
nativeRoster: opts.nativeRoster,
|
|
@@ -2075,8 +2188,20 @@ Return a compact final checkpoint:
|
|
|
2075
2188
|
}
|
|
2076
2189
|
//#endregion
|
|
2077
2190
|
//#region src/lib/injected-skills/gather-context-skill.ts
|
|
2078
|
-
function buildGatherContextSkill(searchEnabled, bluebirdEnabled = false) {
|
|
2191
|
+
function buildGatherContextSkill(searchEnabled, bluebirdEnabled = false, profile) {
|
|
2079
2192
|
const semanticAvailable = searchEnabled || bluebirdEnabled;
|
|
2193
|
+
const modelNote = isLocalFamily(profile) ? "All reasoning runs at the 200K default window: the lead and every Explore\nsubagent run with bare slugs (no 1M accounting)." : "All reasoning runs at the 200K default window: the lead and every Explore\nsubagent use the Luna model at high effort with bare slugs (no 1M accounting).";
|
|
2194
|
+
const downstreamConsumer = isLocalFamily(profile) ? "planner, General-Purpose, or user" : "planner, implementer, or user";
|
|
2195
|
+
const outputNote = isLocalFamily(profile) ? "Return a compact brief, not the whole dump. Output volume dominates: return\nonly file:line citations with one-line summaries, never full file contents or\npasted source blocks." : "Return a compact brief, not the whole dump. Output cost dominates: Luna output\ntokens cost 6x input, so return only file:line citations with one-line\nsummaries, never full file contents or pasted source blocks.";
|
|
2196
|
+
const searchStep = semanticAvailable ? `3. Run semantic search first for concepts, then lexical for symbols, in parallel, in a single turn.
|
|
2197
|
+
- 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"}.
|
|
2198
|
+
- Then use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
|
|
2199
|
+
- Use git log and git blame when authorship, regression timing, or intent matters.
|
|
2200
|
+
- 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.
|
|
2201
|
+
- Use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
|
|
2202
|
+
- Use git log and git blame when authorship, regression timing, or intent matters.
|
|
2203
|
+
- Use mcp__search__web for upstream APIs, package behavior, protocol docs, or public issues.`;
|
|
2204
|
+
const searchCap = semanticAvailable ? "Maximum searches per round: 10." : "Maximum lexical searches per round: 10.";
|
|
2080
2205
|
return {
|
|
2081
2206
|
name: "gh-gather-context",
|
|
2082
2207
|
md: `---
|
|
@@ -2092,18 +2217,17 @@ excludes: [trivial tasks, already-known code, implementation]
|
|
|
2092
2217
|
# gh-gather-context: bounded context gathering
|
|
2093
2218
|
|
|
2094
2219
|
Use this skill when a non-trivial ask needs grounded context before planning.
|
|
2095
|
-
|
|
2096
|
-
subagent use the Luna model at high effort with bare slugs (no 1M accounting).
|
|
2220
|
+
${modelNote}
|
|
2097
2221
|
Output is a durable full brief plus a compact downstream version. This skill
|
|
2098
2222
|
dispatches ONLY native subagents present on the profile roster (Explore) via
|
|
2099
|
-
the Agent tool, never worker-* MCP dispatchers. No reviewer dispatch in this
|
|
2223
|
+
the Agent tool${isLocalFamily(profile) ? "" : ", never worker-* MCP dispatchers"}. No reviewer dispatch in this
|
|
2100
2224
|
stage: Explore evidence plus targeted follow-up reads is the verification path.
|
|
2101
2225
|
|
|
2102
2226
|
## Hard bounds
|
|
2103
2227
|
|
|
2104
2228
|
- Maximum rounds: 3.
|
|
2105
2229
|
- Maximum parallel Explore subagents per round: 6.
|
|
2106
|
-
- ${
|
|
2230
|
+
- ${searchCap}
|
|
2107
2231
|
- Maximum follow-up reads per round: 5.
|
|
2108
2232
|
- Advisory budget: keep each Explore dispatch under ~3 minutes of wall-clock;
|
|
2109
2233
|
the Task tool has no maxWallClockMs parameter, so count your own dispatches
|
|
@@ -2123,20 +2247,13 @@ Use these exact tags on every finding and claim:
|
|
|
2123
2247
|
|
|
2124
2248
|
1. Restate the ask and define the research target.
|
|
2125
2249
|
- Identify whether this is a bug, feature, refactor, incident, or design question.
|
|
2126
|
-
- Name the expected downstream consumer:
|
|
2250
|
+
- Name the expected downstream consumer: ${downstreamConsumer}.
|
|
2127
2251
|
|
|
2128
2252
|
2. Decompose the ask into searchable entities.
|
|
2129
2253
|
- Extract symbols, filenames, error strings, routes, flags, config keys, and types.
|
|
2130
2254
|
- Define what must be true for a correct implementation.
|
|
2131
2255
|
|
|
2132
|
-
${
|
|
2133
|
-
- 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"}.
|
|
2134
|
-
- Then use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
|
|
2135
|
-
- Use git log and git blame when authorship, regression timing, or intent matters.
|
|
2136
|
-
- 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.
|
|
2137
|
-
- Use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
|
|
2138
|
-
- Use git log and git blame when authorship, regression timing, or intent matters.
|
|
2139
|
-
- Use mcp__search__web for upstream APIs, package behavior, protocol docs, or public issues.`}
|
|
2256
|
+
${searchStep}
|
|
2140
2257
|
|
|
2141
2258
|
4. Decompose into bounded Explore subagents.
|
|
2142
2259
|
- Cluster search results into at most 6 coherent investigation areas.
|
|
@@ -2175,9 +2292,7 @@ more than an idle subagent costs.
|
|
|
2175
2292
|
|
|
2176
2293
|
## Return format
|
|
2177
2294
|
|
|
2178
|
-
|
|
2179
|
-
tokens cost 6x input, so return only file:line citations with one-line
|
|
2180
|
-
summaries, never full file contents or pasted source blocks.
|
|
2295
|
+
${outputNote}
|
|
2181
2296
|
|
|
2182
2297
|
- Context files: paths to context.md and context.compact.md.
|
|
2183
2298
|
- Freshness: HEAD commit, diff hash, timestamp.
|
|
@@ -2199,10 +2314,15 @@ summaries, never full file contents or pasted source blocks.
|
|
|
2199
2314
|
`
|
|
2200
2315
|
};
|
|
2201
2316
|
}
|
|
2317
|
+
buildGatherContextSkill(true);
|
|
2202
2318
|
//#endregion
|
|
2203
2319
|
//#region src/lib/injected-skills/implement-skill.ts
|
|
2204
2320
|
function buildImplementSkill(_searchEnabled, profile) {
|
|
2205
|
-
const planDispatches = isCheapestFamily(profile) || isBalancedFamily(profile) ? "planning work" : "Plan dispatches";
|
|
2321
|
+
const planDispatches = isCheapestFamily(profile) || isBalancedFamily(profile) || isLocalFamily(profile) ? "planning work" : "Plan dispatches";
|
|
2322
|
+
const implementerFirst = isLocalFamily(profile) ? "Use General-Purpose for every implementation task and handoff" : "If an implementer subagent exists (max profile), use it first for implementation tasks, then General-Purpose for handoffs; otherwise use General-Purpose for all tasks";
|
|
2323
|
+
const implementerDispatch = isLocalFamily(profile) ? "Use subagent_type General-Purpose for every task" : "Use subagent_type implementer first where the profile provides one (max), otherwise subagent_type General-Purpose for every task";
|
|
2324
|
+
const geminiNote = isLocalFamily(profile) ? "" : ": Gemini-run subagents may suppress tool calls when the prompt contains reflective text";
|
|
2325
|
+
const compactionNote = isLocalFamily(profile) ? "Output volume dominates." : "Output tokens cost several times input on every profile.";
|
|
2206
2326
|
return {
|
|
2207
2327
|
name: "gh-implement",
|
|
2208
2328
|
md: `---
|
|
@@ -2220,14 +2340,12 @@ excludes: [unapproved plans, exploration, trivial changes]
|
|
|
2220
2340
|
Use this skill only after /gh-plan produced a user-approved plan.md. All
|
|
2221
2341
|
implementation runs at the 200K default window with bare slugs (no 1M
|
|
2222
2342
|
accounting): the lead dispatches native subagents present on the profile
|
|
2223
|
-
roster.
|
|
2224
|
-
implementation tasks, then General-Purpose for handoffs; otherwise use
|
|
2225
|
-
General-Purpose for all tasks. Review is conditional, never staged by default:
|
|
2343
|
+
roster. ${implementerFirst}. Review is conditional, never staged by default:
|
|
2226
2344
|
each task subagent self-tests, self-reviews, and reports an explicit confidence
|
|
2227
2345
|
verdict; the lead dispatches a reviewer only on low-confidence validation or
|
|
2228
2346
|
complex and risky changes, then a General-Purpose fix pass only for major
|
|
2229
2347
|
reviewer findings. This skill dispatches ONLY native subagents via the Agent
|
|
2230
|
-
tool, never worker-* MCP dispatchers.
|
|
2348
|
+
tool${isLocalFamily(profile) ? "" : ", never worker-* MCP dispatchers"}.
|
|
2231
2349
|
|
|
2232
2350
|
## Hard bounds
|
|
2233
2351
|
|
|
@@ -2263,16 +2381,16 @@ tool, never worker-* MCP dispatchers.
|
|
|
2263
2381
|
1. Parse the approved plan.
|
|
2264
2382
|
- Read plan.md fully.
|
|
2265
2383
|
- Group tasks by parallelGroup; order groups by dependency.
|
|
2266
|
-
- For each group, prepare a narrow task brief (task spec, relevant context excerpt, acceptance criteria, verification commands). Write every brief as plain directives, never reflective first-person prose
|
|
2384
|
+
- For each group, prepare a narrow task brief (task spec, relevant context excerpt, acceptance criteria, verification commands). Write every brief as plain directives, never reflective first-person prose${geminiNote}. If parallel tasks in the group require isolation, prepare one git worktree per task and pass worktree:true; otherwise tasks run in-place and must be sequentialized within shared files.
|
|
2267
2385
|
|
|
2268
2386
|
2. Dispatch bounded implementation subagents, one parallel batch per group.
|
|
2269
|
-
- Dispatch ALL tasks in the group in a single turn via the Agent tool.
|
|
2387
|
+
- Dispatch ALL tasks in the group in a single turn via the Agent tool. ${implementerDispatch}. Advisory: keep each task under ~10 minutes; the Task tool enforces no wall-clock.
|
|
2270
2388
|
- Each subagent runs at the 200K default window and must self-contain its work:
|
|
2271
2389
|
a. Implement the change.
|
|
2272
2390
|
b. Run the task verification commands (tests, typecheck, lint).
|
|
2273
2391
|
c. Self-review against the acceptance criteria.
|
|
2274
2392
|
d. Fix any self-found issues (at most 2 internal fix cycles).
|
|
2275
|
-
e. Return the patch plus test results, self-review notes, and an explicit confidence verdict (high or low) with reasons. Low confidence means the subagent itself doubts the result: flaky or incomplete verification, untested edge cases, or behavior it could not directly observe. Keep the return compact: patch plus results, no full-file echoes
|
|
2393
|
+
e. Return the patch plus test results, self-review notes, and an explicit confidence verdict (high or low) with reasons. Low confidence means the subagent itself doubts the result: flaky or incomplete verification, untested edge cases, or behavior it could not directly observe. Keep the return compact: patch plus results, no full-file echoes. ${compactionNote}
|
|
2276
2394
|
- Do NOT dispatch the same task twice (no dedup exists); a retry is a new dispatch only after a recorded failure.
|
|
2277
2395
|
- For a big artifact, have the subagent write it to a file and return the path.
|
|
2278
2396
|
|
|
@@ -2458,8 +2576,13 @@ Return:
|
|
|
2458
2576
|
//#endregion
|
|
2459
2577
|
//#region src/lib/injected-skills/plan-skill.ts
|
|
2460
2578
|
function buildPlanSkill(_searchEnabled, profile) {
|
|
2461
|
-
const leadPlansDirectly = isCheapestFamily(profile) || isBalancedFamily(profile);
|
|
2462
|
-
const planningMeans = leadPlansDirectly ? "the lead plans directly (no
|
|
2579
|
+
const leadPlansDirectly = isCheapestFamily(profile) || isBalancedFamily(profile) || isLocalFamily(profile);
|
|
2580
|
+
const planningMeans = leadPlansDirectly ? "the lead plans directly (no separate planning subagent exists on this roster)" : "dispatch the native Plan subagent (subagent_type Plan) present on the profile roster where provided; profile frontmatter pins its model and effort (Sol at the 200K default window)";
|
|
2581
|
+
const downstreamAgent = isLocalFamily(profile) ? "a native General-Purpose subagent" : "a native General-Purpose (or implementer, where the profile provides one) subagent";
|
|
2582
|
+
const briefProseNote = isLocalFamily(profile) ? "Write the brief as plain directives, never reflective first-person prose." : "Write the brief as plain directives, never reflective first-person prose: Gemini-run subagents may suppress tool calls when the prompt contains reflective text.";
|
|
2583
|
+
const compactionNote = isLocalFamily(profile) ? "Output volume dominates." : "Output tokens cost several times input on every profile.";
|
|
2584
|
+
const dispatchBoundary = isLocalFamily(profile) ? "" : ", never via worker-* MCP dispatchers";
|
|
2585
|
+
const planDispatchBoundary = isLocalFamily(profile) ? "" : ", never worker-* MCP dispatchers";
|
|
2463
2586
|
const dispatchStep = leadPlansDirectly ? `3. Compose the plan directly with that brief, then validate it against
|
|
2464
2587
|
the same bar: every task names files, states the change and its done
|
|
2465
2588
|
condition, and carries runnable acceptance commands; trade-offs appear as
|
|
@@ -2477,7 +2600,7 @@ function buildPlanSkill(_searchEnabled, profile) {
|
|
|
2477
2600
|
send ONE bounded follow-up to the same Plan dispatch naming the exact gaps
|
|
2478
2601
|
(at most 2 follow-up rounds total). If still underspecified, checkpoint
|
|
2479
2602
|
with the gaps as residual risk instead of pretending the plan is complete.`;
|
|
2480
|
-
const advisorStep = isCheapestFamily(profile) ? `
|
|
2603
|
+
const advisorStep = isCheapestFamily(profile) || profile === "local2" ? `
|
|
2481
2604
|
6. Review the final plan with the Advisor before presenting it to the user:
|
|
2482
2605
|
consult \`advisor\` once for a framing check. It is non-binding counsel;
|
|
2483
2606
|
you retain decision ownership.
|
|
@@ -2502,9 +2625,8 @@ excludes: [trivial changes, implementation, missing context]
|
|
|
2502
2625
|
Use this skill after /gh-gather-context (or when equivalent context is already
|
|
2503
2626
|
available) and before any implementation. For non-trivial work, ${planningMeans}.
|
|
2504
2627
|
The plan must be scoped, modular, non-overlapping, and ordered, with
|
|
2505
|
-
enough detail for
|
|
2506
|
-
|
|
2507
|
-
mandatory before implementation. ${leadPlansDirectly ? "This skill plans directly (plus scoped Explore discovery where the delegation graph permits), never via worker-* MCP dispatchers." : "This skill dispatches ONLY the native Plan subagent via the Agent tool, never worker-* MCP dispatchers."} ${leadPlansDirectly ? "The lead self-serves Explore follow-ups per its delegation graph; the skill does not dispatch Explore directly." : "Plan self-serves Explore follow-ups per its delegation graph; the skill does not dispatch Explore directly."}
|
|
2628
|
+
enough detail for ${downstreamAgent} to execute each task in isolation. User approval is
|
|
2629
|
+
mandatory before implementation. ${leadPlansDirectly ? `This skill plans directly (plus scoped Explore discovery where the delegation graph permits)${dispatchBoundary}.` : `This skill dispatches ONLY the native Plan subagent via the Agent tool${planDispatchBoundary}.`} ${leadPlansDirectly ? "The lead self-serves Explore follow-ups per its delegation graph; the skill does not dispatch Explore directly." : "Plan self-serves Explore follow-ups per its delegation graph; the skill does not dispatch Explore directly."}
|
|
2508
2630
|
|
|
2509
2631
|
## Prerequisites
|
|
2510
2632
|
|
|
@@ -2567,11 +2689,9 @@ mandatory before implementation. ${leadPlansDirectly ? "This skill plans directl
|
|
|
2567
2689
|
- Plan-mode rule: plan and acceptance criteria only, no implementation
|
|
2568
2690
|
file edits.
|
|
2569
2691
|
- Permission to use Explore ${leadPlansDirectly ? "per the lead delegation graph" : "and reviewer per the delegation graph"}.
|
|
2570
|
-
-
|
|
2571
|
-
Gemini-run subagents may suppress tool calls when the prompt contains
|
|
2572
|
-
reflective text.
|
|
2692
|
+
- ${briefProseNote}
|
|
2573
2693
|
- Demand compact output: file:line plus one-line purposes, never pasted
|
|
2574
|
-
source blocks.
|
|
2694
|
+
source blocks. ${compactionNote}
|
|
2575
2695
|
- Advisory ~5 minute budget.
|
|
2576
2696
|
|
|
2577
2697
|
${dispatchStep}
|
|
@@ -2800,7 +2920,9 @@ ${bluebirdEnabled ? "Grounding uses Bluebird semantic + lexical code search (fai
|
|
|
2800
2920
|
//#endregion
|
|
2801
2921
|
//#region src/lib/injected-skills/swe-pipeline-skill.ts
|
|
2802
2922
|
function buildSwePipelineSkill(_searchEnabled, profile) {
|
|
2803
|
-
const leadPlansDirectly = isCheapestFamily(profile) || isBalancedFamily(profile);
|
|
2923
|
+
const leadPlansDirectly = isCheapestFamily(profile) || isBalancedFamily(profile) || isLocalFamily(profile);
|
|
2924
|
+
const roster = leadPlansDirectly ? "Explore, General-Purpose, reviewer" : "Explore, Plan, General-Purpose, reviewer, implementer where provided";
|
|
2925
|
+
const planDispatches = leadPlansDirectly ? "lead planning" : "Plan subagents";
|
|
2804
2926
|
return {
|
|
2805
2927
|
name: "gh-swe-pipeline",
|
|
2806
2928
|
md: `---
|
|
@@ -2816,7 +2938,7 @@ change. It coordinates the three pipeline stages in STRICT SEQUENCE. No two
|
|
|
2816
2938
|
stages ever overlap: each stage runs to completion, its subagents are all
|
|
2817
2939
|
finished or explicitly superseded, and its completion artifact exists before
|
|
2818
2940
|
the next stage starts. Every stage dispatches ONLY native subagents present on
|
|
2819
|
-
the profile roster (${
|
|
2941
|
+
the profile roster (${roster}) via the Agent tool${isLocalFamily(profile) ? "" : ", never worker-* MCP dispatchers"}.
|
|
2820
2942
|
|
|
2821
2943
|
All work runs at the 200K default window with bare slugs (no 1M accounting).
|
|
2822
2944
|
Advisory budgets (the Task tool enforces no wall-clock): gather ~3 minutes
|
|
@@ -2846,7 +2968,7 @@ exists to prevent.
|
|
|
2846
2968
|
## Stage 1: gather context (to completion)
|
|
2847
2969
|
|
|
2848
2970
|
1. Invoke the gh-gather-context skill and WAIT for its full return. Do not
|
|
2849
|
-
plan, sketch tasks, or dispatch ${
|
|
2971
|
+
plan, sketch tasks, or dispatch ${planDispatches} while it runs.
|
|
2850
2972
|
2. Its completion artifact is
|
|
2851
2973
|
.github-router/context/<slug>/context.md plus context.compact.md and a
|
|
2852
2974
|
.complete marker. If the marker is missing, the stage is NOT complete:
|
|
@@ -3063,7 +3185,9 @@ const PIPELINE_SKILL_PROFILES = [
|
|
|
3063
3185
|
"cheapest",
|
|
3064
3186
|
"cheapest2",
|
|
3065
3187
|
"balanced",
|
|
3066
|
-
"balanced2"
|
|
3188
|
+
"balanced2",
|
|
3189
|
+
"local",
|
|
3190
|
+
"local2"
|
|
3067
3191
|
];
|
|
3068
3192
|
function isPipelineSkillProfile(profileId) {
|
|
3069
3193
|
return PIPELINE_SKILL_PROFILES.includes(profileId);
|
|
@@ -3229,12 +3353,12 @@ async function writeInjectedSkill(name, md) {
|
|
|
3229
3353
|
* 200K default context). The orchestrator (`/gh-swe-pipeline`) runs the
|
|
3230
3354
|
* other three in strict sequence; the three stages stay individually
|
|
3231
3355
|
* invokable for users who only want one stage. Profiles without a `Plan`
|
|
3232
|
-
* role (`cheapest`, `balanced`) get the lead-plans-directly
|
|
3233
|
-
* variant.
|
|
3356
|
+
* role (`cheapest`, `balanced`, `local`) get the lead-plans-directly
|
|
3357
|
+
* `/gh-plan` variant.
|
|
3234
3358
|
*/
|
|
3235
3359
|
function getPipelineSkills(searchEnabled, bluebirdEnabled = false, profile) {
|
|
3236
3360
|
return [
|
|
3237
|
-
buildGatherContextSkill(searchEnabled, bluebirdEnabled),
|
|
3361
|
+
buildGatherContextSkill(searchEnabled, bluebirdEnabled, profile),
|
|
3238
3362
|
buildPlanSkill(searchEnabled || bluebirdEnabled, profile),
|
|
3239
3363
|
buildImplementSkill(searchEnabled || bluebirdEnabled, profile),
|
|
3240
3364
|
buildSwePipelineSkill(searchEnabled || bluebirdEnabled, profile)
|
|
@@ -3264,7 +3388,7 @@ function injectedSkillsForLaunch(selection) {
|
|
|
3264
3388
|
const searchEnabled = selection.searchEnabled === true;
|
|
3265
3389
|
const bluebirdEnabled = selection.bluebirdEnabled === true;
|
|
3266
3390
|
const allSkills = getInjectedSkills(searchEnabled, bluebirdEnabled);
|
|
3267
|
-
const pipelineSkills = getPipelineSkills(searchEnabled, bluebirdEnabled, isCheapestFamily(selection.profileId) || isBalancedFamily(selection.profileId) ? selection.profileId : void 0);
|
|
3391
|
+
const pipelineSkills = getPipelineSkills(searchEnabled, bluebirdEnabled, isCheapestFamily(selection.profileId) || isBalancedFamily(selection.profileId) || isLocalFamily(selection.profileId) ? selection.profileId : void 0);
|
|
3268
3392
|
if (isPipelineSkillProfile(selection.profileId)) {
|
|
3269
3393
|
if (!selection.sweEnabled) {
|
|
3270
3394
|
if (selection.profileId === "max" && selection.firstMateEnabled) return allSkills.filter((skill) => skill.name.startsWith("gh-first-mate"));
|
|
@@ -3349,4 +3473,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
|
|
|
3349
3473
|
//#endregion
|
|
3350
3474
|
export { buildArtifactReviewSkill as a, injectAllowRules as c, BUILTIN_SUBAGENT_DEFINITIONS as d, injectPeerMcpIntoMirror as f, writePeerMcpRuntimeFiles as g, workersKeyOf as h, writeInjectedSkill as i, planModeAllowRules as l, resolveGroupKeysFromMirror as m, getInjectedSkills as n, SEAMLESS_BUILTIN_TOOLS as o, resolveCodexCliBackend as p, injectedSkillsForLaunch as r, configureServeDefaultPermissionMode as s, injectAttributionSuppressionIntoSettingsFile as t, sanitizeServeSettingsEnv as u };
|
|
3351
3475
|
|
|
3352
|
-
//# sourceMappingURL=attribution-settings-
|
|
3476
|
+
//# sourceMappingURL=attribution-settings-wVzQvIdL.js.map
|