github-router 0.3.348 → 0.3.350
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/{aic-statusline-settings-YoDG20pq.js → aic-statusline-settings-DCFywz3N.js} +2 -2
- package/dist/aic-statusline-settings-DCFywz3N.js.map +1 -0
- package/dist/{attribution-settings-P_vba-ri.js → attribution-settings-B9T-EsEs.js} +80 -12
- package/dist/attribution-settings-B9T-EsEs.js.map +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-D26fp1ih.js → claude-BY4e9ueE.js} +29 -14
- package/dist/{claude-D26fp1ih.js.map → claude-BY4e9ueE.js.map} +1 -1
- package/dist/{codex-DM97sCtu.js → codex-BOugL-uX.js} +4 -4
- package/dist/{codex-DM97sCtu.js.map → codex-BOugL-uX.js.map} +1 -1
- package/dist/engine-DZfLaVcf.js +2 -0
- package/dist/{gate-discovery-V-mslLHt.js → gate-discovery-BFqulsWz.js} +4 -4
- package/dist/{gate-discovery-V-mslLHt.js.map → gate-discovery-BFqulsWz.js.map} +1 -1
- package/dist/hooks.mjs +1101 -71
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-aic-status-CCvU7zhC.js → internal-aic-status-lM0YNDaH.js} +52 -11
- package/dist/internal-aic-status-lM0YNDaH.js.map +1 -0
- package/dist/{internal-artifact-open-CXJbMXpq.js → internal-artifact-open-DErO3WpR.js} +2 -2
- package/dist/{internal-artifact-open-CXJbMXpq.js.map → internal-artifact-open-DErO3WpR.js.map} +1 -1
- package/dist/{internal-plan-review-F-WbltsT.js → internal-plan-review-DbX-mr9i.js} +3 -3
- package/dist/{internal-plan-review-F-WbltsT.js.map → internal-plan-review-DbX-mr9i.js.map} +1 -1
- package/dist/internal-prompt-submit-CA5Y4DWM.js +2 -0
- package/dist/internal-prompt-submit-UhfnM_qG.js +573 -0
- package/dist/internal-prompt-submit-UhfnM_qG.js.map +1 -0
- package/dist/internal-rebrief-BH9PMJhF.js +548 -0
- package/dist/internal-rebrief-BH9PMJhF.js.map +1 -0
- package/dist/{internal-session-bind-LrYEo-kg.js → internal-session-bind-DxdVbJ7x.js} +2 -2
- package/dist/{internal-session-bind-LrYEo-kg.js.map → internal-session-bind-DxdVbJ7x.js.map} +1 -1
- package/dist/{internal-stop-hook-v5WF6Kc2.js → internal-stop-hook-DlGc9WwJ.js} +5 -5
- package/dist/{internal-stop-hook-v5WF6Kc2.js.map → internal-stop-hook-DlGc9WwJ.js.map} +1 -1
- package/dist/{internal-stop-review-nL003JIj.js → internal-stop-review-CORT3UGr.js} +2 -2
- package/dist/{internal-stop-review-nL003JIj.js.map → internal-stop-review-CORT3UGr.js.map} +1 -1
- package/dist/main.js +14 -13
- package/dist/main.js.map +1 -1
- package/dist/{orchestration-DjuJRhXn.js → orchestration-Dkqv-iv0.js} +2 -2
- package/dist/{orchestration-DjuJRhXn.js.map → orchestration-Dkqv-iv0.js.map} +1 -1
- package/dist/{peer-mcp-personas-C200IycG.js → peer-mcp-personas-BwwSNnBC.js} +235 -63
- package/dist/peer-mcp-personas-BwwSNnBC.js.map +1 -0
- package/dist/{pi-BWGfNpi7.js → pi-Dpw8Otxw.js} +5 -5
- package/dist/{pi-BWGfNpi7.js.map → pi-Dpw8Otxw.js.map} +1 -1
- package/dist/{plan-review-hook-DMqPHBBN.js → plan-review-hook-LfG01VMp.js} +2 -2
- package/dist/{plan-review-hook-DMqPHBBN.js.map → plan-review-hook-LfG01VMp.js.map} +1 -1
- package/dist/{prompt-submit-hook-wjuHUrpS.js → prompt-submit-hook-DzhmQRs_.js} +130 -45
- package/dist/prompt-submit-hook-DzhmQRs_.js.map +1 -0
- package/dist/{provision-BFTONLfA.js → provision-9TAIgyL7.js} +2 -2
- package/dist/{provision-BFTONLfA.js.map → provision-9TAIgyL7.js.map} +1 -1
- package/dist/{serve-D9xQeGqi.js → serve-BRKRWkd1.js} +8 -8
- package/dist/{serve-D9xQeGqi.js.map → serve-BRKRWkd1.js.map} +1 -1
- package/dist/{server-setup-R1HQtpR9.js → server-setup-DXVFE7bf.js} +25 -14
- package/dist/server-setup-DXVFE7bf.js.map +1 -0
- package/dist/{start-vg2n8UjI.js → start-CoR3jqUR.js} +3 -3
- package/dist/{start-vg2n8UjI.js.map → start-CoR3jqUR.js.map} +1 -1
- package/dist/{stop-gate-hook-DRcYQAtf.js → stop-gate-hook-C9VNxmt1.js} +2 -2
- package/dist/{stop-gate-hook-DRcYQAtf.js.map → stop-gate-hook-C9VNxmt1.js.map} +1 -1
- package/dist/{stop-gate-policy-CbLklfV2.js → stop-gate-policy-DQsfjnsx.js} +29 -2
- package/dist/{stop-gate-policy-CbLklfV2.js.map → stop-gate-policy-DQsfjnsx.js.map} +1 -1
- package/package.json +1 -1
- package/dist/aic-statusline-settings-YoDG20pq.js.map +0 -1
- package/dist/attribution-settings-P_vba-ri.js.map +0 -1
- package/dist/engine-VTQo0qUy.js +0 -2
- package/dist/internal-aic-status-CCvU7zhC.js.map +0 -1
- package/dist/internal-prompt-submit-B1nd4y4V.js +0 -213
- package/dist/internal-prompt-submit-B1nd4y4V.js.map +0 -1
- package/dist/peer-mcp-personas-C200IycG.js.map +0 -1
- package/dist/prompt-submit-hook-wjuHUrpS.js.map +0 -1
- package/dist/server-setup-R1HQtpR9.js.map +0 -1
|
@@ -7,7 +7,7 @@ import fs from "node:fs/promises";
|
|
|
7
7
|
*
|
|
8
8
|
* `github-router claude` writes `{ statusLine: { type: "command", command } }`
|
|
9
9
|
* into the mirrored settings.json so the status bar shows
|
|
10
|
-
* `[AIC 12.42] [####------] 42
|
|
10
|
+
* `[AIC 12.42] [####------] 42%·200K | model | dir (branch) | ...`,
|
|
11
11
|
* updating as the ledger file grows. The command itself
|
|
12
12
|
* (`internal-aic-status`) reads the ledger path from `GH_ROUTER_AIC_LEDGER`
|
|
13
13
|
* in the spawned child's env — never a path baked into settings — so the
|
|
@@ -136,4 +136,4 @@ async function writeBackupSidecar(settingsPath, previous) {
|
|
|
136
136
|
//#endregion
|
|
137
137
|
export { injectAicStatusLineIntoSettingsFile as a, buildAicStatusHookCommand as i, AIC_STATUSLINE_DISABLE_ENV as n, AIC_USER_STATUSLINE_ENV as r, AIC_LEDGER_ENV as t };
|
|
138
138
|
|
|
139
|
-
//# sourceMappingURL=aic-statusline-settings-
|
|
139
|
+
//# sourceMappingURL=aic-statusline-settings-DCFywz3N.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aic-statusline-settings-DCFywz3N.js","names":[],"sources":["../src/lib/aic-statusline-settings.ts"],"sourcesContent":["/**\n * Claude Code `statusLine` injection for the per-session AIC total + rich\n * default session line.\n *\n * `github-router claude` writes `{ statusLine: { type: \"command\", command } }`\n * into the mirrored settings.json so the status bar shows\n * `[AIC 12.42] [####------] 42%·200K | model | dir (branch) | ...`,\n * updating as the ledger file grows. The command itself\n * (`internal-aic-status`) reads the ledger path from `GH_ROUTER_AIC_LEDGER`\n * in the spawned child's env — never a path baked into settings — so the\n * same mirror mechanics work for concurrent launches. AIC is pinned: it\n * renders even when the terminal is too narrow for any other segment.\n *\n * Standard launches use wrap-don't-clobber: when the user's own config\n * already defines `statusLine` as a `{type:\"command\", command:string}`\n * shape, that command is preserved via `GH_ROUTER_AIC_USER_STATUSLINE`\n * (set by the caller from the returned `userCommand`) and the hook\n * composes one line: `[AIC x.xx] <user line>`. Any other pre-existing\n * `statusLine` shape is left untouched (`reason: \"unrecognized\"`) rather\n * than risk breaking an exotic config.\n *\n * Pinned launches (fast/cheap/cheap1m/cheapest, `routerWins: true`) run\n * router-provided surfaces only: ANY pre-existing `statusLine` is backed\n * up to a mirror sidecar and replaced with ours (`mode: \"forced\"`), so the\n * native rich line always renders and the user command never executes.\n *\n * Failure model matches the sibling settings writers: a transient read error\n * or a non-object settings.json throws (never clobber a file we don't\n * understand); the caller wraps this in warn-and-continue so a settings-write\n * hiccup never blocks launch. Writes use a same-directory temp file, mode\n * 0o600, then rename.\n */\n\nimport fs from \"node:fs/promises\"\n\nimport type { SelfInvocation } from \"./hook-launcher/self-invocation\"\nimport { buildSelfCommand } from \"./hook-launcher/self-invocation\"\n\n/** Env var carrying the ledger snapshot path into the spawned child. */\nexport const AIC_LEDGER_ENV = \"GH_ROUTER_AIC_LEDGER\"\n/** Env var carrying the user's own statusLine command (wrap mode only). */\nexport const AIC_USER_STATUSLINE_ENV = \"GH_ROUTER_AIC_USER_STATUSLINE\"\n/** Opt-out for the whole injection (mirrors GH_ROUTER_DISABLE_NO_ATTRIBUTION). */\nexport const AIC_STATUSLINE_DISABLE_ENV = \"GH_ROUTER_DISABLE_AIC_STATUSLINE\"\n\nexport function buildAicStatusHookCommand(invocation: SelfInvocation): string {\n return buildSelfCommand(invocation, \"internal-aic-status\")\n}\n\nexport type AicStatuslineInjectionResult =\n | { written: true; mode: \"injected\" | \"wrapped\" | \"forced\"; userCommand?: string; hadPrevious?: boolean }\n | { written: false; reason: \"already-set\" | \"unrecognized\" }\n\nfunction isCommandStatusLine(value: unknown): value is {\n type: string\n command: string\n} {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return false\n const record = value as Record<string, unknown>\n return (\n record.type === \"command\"\n && typeof record.command === \"string\"\n && record.command.length > 0\n )\n}\n\nexport async function injectAicStatusLineIntoSettingsFile(\n settingsPath: string,\n statusCommand: string,\n opts: { routerWins?: boolean } = {},\n): Promise<AicStatuslineInjectionResult> {\n let existing: Record<string, unknown> = {}\n let raw: string | undefined\n try {\n raw = await fs.readFile(settingsPath, \"utf8\")\n } catch (err) {\n // Never clobber on a transient read error; a missing file starts clean.\n if ((err as NodeJS.ErrnoException).code !== \"ENOENT\") throw err\n raw = undefined\n }\n if (raw !== undefined) {\n // A parse failure means a real file we don't understand: do NOT replace it.\n const parsed: unknown = JSON.parse(raw)\n if (parsed && typeof parsed === \"object\" && !Array.isArray(parsed)) {\n existing = parsed as Record<string, unknown>\n } else {\n throw new Error(\n `settings.json at ${settingsPath} is not a JSON object; refusing to overwrite`,\n )\n }\n }\n\n const current = existing.statusLine\n if (current !== undefined) {\n // Idempotency: a previous injection already points at our hook.\n if (\n isCommandStatusLine(current)\n && current.command.includes(\"internal-aic-status\")\n ) {\n return { written: false, reason: \"already-set\" }\n }\n // Pinned profiles run the router line only: back up whatever was\n // there (command or exotic shape) to a mirror sidecar for audit and\n // replace it. The user command is recorded but never executed.\n if (opts.routerWins) {\n const hadPrevious = true\n const merged = {\n ...existing,\n statusLine: { type: \"command\", command: statusCommand },\n }\n await writeSettingsAtomically(settingsPath, merged)\n await writeBackupSidecar(settingsPath, current)\n return { written: true, mode: \"forced\", hadPrevious }\n }\n // Wrap-don't-clobber: preserve the user's command via env.\n if (isCommandStatusLine(current)) {\n const userCommand = current.command\n const merged = {\n ...existing,\n statusLine: { type: \"command\", command: statusCommand },\n }\n await writeSettingsAtomically(settingsPath, merged)\n return { written: true, mode: \"wrapped\", userCommand }\n }\n return { written: false, reason: \"unrecognized\" }\n }\n\n const merged = {\n ...existing,\n statusLine: { type: \"command\", command: statusCommand },\n }\n await writeSettingsAtomically(settingsPath, merged)\n return { written: true, mode: \"injected\" }\n}\n\nasync function writeSettingsAtomically(\n settingsPath: string,\n merged: Record<string, unknown>,\n): Promise<void> {\n const tmp = `${settingsPath}.${process.pid}.aicstatus.tmp`\n await fs.writeFile(tmp, `${JSON.stringify(merged, null, 2)}\\n`, { mode: 0o600 })\n await fs.rename(tmp, settingsPath)\n}\n\n/**\n * Record a replaced `statusLine` value in a mirror sidecar for audit.\n * Mirror-only (same dir as the mirrored settings.json); the operator's\n * real settings are never touched. Best-effort: a backup failure must\n * not fail the injection that already succeeded.\n */\nasync function writeBackupSidecar(\n settingsPath: string,\n previous: unknown,\n): Promise<void> {\n const backupPath = `${settingsPath}.aic-statusline-backup.json`\n const payload = { replacedStatusLine: previous }\n try {\n await fs.writeFile(backupPath, `${JSON.stringify(payload, null, 2)}\\n`, { mode: 0o600 })\n } catch {\n // Audit-only; the injection itself already landed.\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,iBAAiB;;AAE9B,MAAa,0BAA0B;;AAEvC,MAAa,6BAA6B;AAE1C,SAAgB,0BAA0B,YAAoC;CAC5E,OAAO,iBAAiB,YAAY,qBAAqB;AAC3D;AAMA,SAAS,oBAAoB,OAG3B;CACA,IAAI,CAAC,SAAS,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GAAG,OAAO;CACxE,MAAM,SAAS;CACf,OACE,OAAO,SAAS,aACb,OAAO,OAAO,YAAY,YAC1B,OAAO,QAAQ,SAAS;AAE/B;AAEA,eAAsB,oCACpB,cACA,eACA,OAAiC,CAAC,GACK;CACvC,IAAI,WAAoC,CAAC;CACzC,IAAI;CACJ,IAAI;EACF,MAAM,MAAM,GAAG,SAAS,cAAc,MAAM;CAC9C,SAAS,KAAK;EAEZ,IAAK,IAA8B,SAAS,UAAU,MAAM;EAC5D,MAAM,KAAA;CACR;CACA,IAAI,QAAQ,KAAA,GAAW;EAErB,MAAM,SAAkB,KAAK,MAAM,GAAG;EACtC,IAAI,UAAU,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,MAAM,GAC/D,WAAW;OAEX,MAAM,IAAI,MACR,oBAAoB,aAAa,6CACnC;CAEJ;CAEA,MAAM,UAAU,SAAS;CACzB,IAAI,YAAY,KAAA,GAAW;EAEzB,IACE,oBAAoB,OAAO,KACxB,QAAQ,QAAQ,SAAS,qBAAqB,GAEjD,OAAO;GAAE,SAAS;GAAO,QAAQ;EAAc;EAKjD,IAAI,KAAK,YAAY;GACnB,MAAM,cAAc;GAKpB,MAAM,wBAAwB,cAAc;IAH1C,GAAG;IACH,YAAY;KAAE,MAAM;KAAW,SAAS;IAAc;GAEP,CAAC;GAClD,MAAM,mBAAmB,cAAc,OAAO;GAC9C,OAAO;IAAE,SAAS;IAAM,MAAM;IAAU;GAAY;EACtD;EAEA,IAAI,oBAAoB,OAAO,GAAG;GAChC,MAAM,cAAc,QAAQ;GAK5B,MAAM,wBAAwB,cAAc;IAH1C,GAAG;IACH,YAAY;KAAE,MAAM;KAAW,SAAS;IAAc;GAEP,CAAC;GAClD,OAAO;IAAE,SAAS;IAAM,MAAM;IAAW;GAAY;EACvD;EACA,OAAO;GAAE,SAAS;GAAO,QAAQ;EAAe;CAClD;CAMA,MAAM,wBAAwB,cAAc;EAH1C,GAAG;EACH,YAAY;GAAE,MAAM;GAAW,SAAS;EAAc;CAEP,CAAC;CAClD,OAAO;EAAE,SAAS;EAAM,MAAM;CAAW;AAC3C;AAEA,eAAe,wBACb,cACA,QACe;CACf,MAAM,MAAM,GAAG,aAAa,GAAG,QAAQ,IAAI;CAC3C,MAAM,GAAG,UAAU,KAAK,GAAG,KAAK,UAAU,QAAQ,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,IAAM,CAAC;CAC/E,MAAM,GAAG,OAAO,KAAK,YAAY;AACnC;;;;;;;AAQA,eAAe,mBACb,cACA,UACe;CACf,MAAM,aAAa,GAAG,aAAa;CACnC,MAAM,UAAU,EAAE,oBAAoB,SAAS;CAC/C,IAAI;EACF,MAAM,GAAG,UAAU,YAAY,GAAG,KAAK,UAAU,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,IAAM,CAAC;CACzF,QAAQ,CAER;AACF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
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, T as MAX_BROWSE_LOW_ALIAS_ID, _ as CHEAPEST_EXPLORE_ALIAS_ID, b as CHEAP_EXPLORE_ALIAS_ID, g as BROWSE_LOW_ALIAS_ID, h as BALANCED_REVIEWER_ALIAS_ID, m as BALANCED_GENERAL_PURPOSE_ALIAS_ID, p as BALANCED_EXPLORE_ALIAS_ID, v as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, w as LUNA_SCOUT_ALIAS_ID, x as CHEAP_GENERAL_PURPOSE_ALIAS_ID, y as CHEAPEST_REVIEWER_ALIAS_ID } from "./server-setup-
|
|
2
|
+
import { C as CHEAP_REVIEWER_ALIAS_ID, S as CHEAP_PLAN_ALIAS_ID, T as MAX_BROWSE_LOW_ALIAS_ID, _ as CHEAPEST_EXPLORE_ALIAS_ID, b as CHEAP_EXPLORE_ALIAS_ID, g as BROWSE_LOW_ALIAS_ID, h as BALANCED_REVIEWER_ALIAS_ID, m as BALANCED_GENERAL_PURPOSE_ALIAS_ID, p as BALANCED_EXPLORE_ALIAS_ID, v as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, w as LUNA_SCOUT_ALIAS_ID, x as CHEAP_GENERAL_PURPOSE_ALIAS_ID, y as CHEAPEST_REVIEWER_ALIAS_ID } from "./server-setup-DXVFE7bf.js";
|
|
3
3
|
import { _ as FAST_PROFILE_MODELS, a as BALANCED_PROFILE_NATIVE_EFFORTS, b as FAST_PROFILE_NATIVE_MODELS, i as BALANCED_PROFILE_NATIVE_AGENT_NAMES, v as FAST_PROFILE_NATIVE_AGENT_NAMES, y as FAST_PROFILE_NATIVE_EFFORTS } from "./balanced-profile-contract-XiIj4O1U.js";
|
|
4
|
-
import { An as oneMContextDisabled, Gn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, Kn as CHEAP_PROFILE_NATIVE_EFFORTS, Ln as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, Rn as CHEAPEST_PROFILE_NATIVE_EFFORTS, a as buildAgentPrompt, jn as withOneMSuffix, l as maxPersonasFor, ln as CONDENSED_OPERATING_SEQUENCE, n as MCP_GROUPS, t as GROUP_META, u as personasFor, un as DEFINITION_OF_GREATNESS } from "./peer-mcp-personas-
|
|
4
|
+
import { An as oneMContextDisabled, Gn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, Kn as CHEAP_PROFILE_NATIVE_EFFORTS, Ln as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, Rn as CHEAPEST_PROFILE_NATIVE_EFFORTS, a as buildAgentPrompt, jn as withOneMSuffix, l as maxPersonasFor, ln as CONDENSED_OPERATING_SEQUENCE, n as MCP_GROUPS, t as GROUP_META, u as personasFor, un as DEFINITION_OF_GREATNESS } from "./peer-mcp-personas-BwwSNnBC.js";
|
|
5
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--dAYkEG1.js";
|
|
6
6
|
import "./self-invocation-DIUyoRgL.js";
|
|
7
|
-
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-
|
|
7
|
+
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-9TAIgyL7.js";
|
|
8
8
|
import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-B77WqVFw.js";
|
|
9
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";
|
|
@@ -2724,6 +2724,70 @@ Return a compact brief, not the whole research dump:
|
|
|
2724
2724
|
};
|
|
2725
2725
|
}
|
|
2726
2726
|
//#endregion
|
|
2727
|
+
//#region src/lib/injected-skills/rebrief-skill.ts
|
|
2728
|
+
/**
|
|
2729
|
+
* User-only on-demand cheapest rebrief (`/gh-rebrief`).
|
|
2730
|
+
*
|
|
2731
|
+
* `disable-model-invocation: true` keeps the description OUT of the model
|
|
2732
|
+
* context (no auto-trigger, no listing tax on the 200K Luna window); the user
|
|
2733
|
+
* invokes it explicitly when Luna drifts, loops, or contradicts earlier
|
|
2734
|
+
* decisions. The body runs the deterministic `internal-rebrief` binary, which
|
|
2735
|
+
* reuses the Sol → Luna rewrite with a 4K extractive session excerpt.
|
|
2736
|
+
*/
|
|
2737
|
+
function buildRebriefSkill(searchEnabled, bluebirdEnabled = false) {
|
|
2738
|
+
return {
|
|
2739
|
+
name: "gh-rebrief",
|
|
2740
|
+
md: `---
|
|
2741
|
+
name: gh-rebrief
|
|
2742
|
+
description: Produces a course-corrected prompt for Luna on the user's current ask: Sol grounds the original ask, done-so-far digest, and transcript tail, then frames the next step for Luna to execute. Use when the session has drifted, Luna loops, or the user wants to restate what done means. Requires an explicit refined ask: /gh-rebrief "<ask>".
|
|
2743
|
+
user-invocable: true
|
|
2744
|
+
disable-model-invocation: true
|
|
2745
|
+
argument-hint: "[optional refined ask]"
|
|
2746
|
+
allowed-tools: Bash, Read
|
|
2747
|
+
---
|
|
2748
|
+
|
|
2749
|
+
# gh-rebrief: on-demand cheapest re-brief
|
|
2750
|
+
|
|
2751
|
+
Use this skill when the user types /gh-rebrief, optionally with a refined ask.
|
|
2752
|
+
It re-runs the cheapest Sol rewrite mid-session with compressed recent context.
|
|
2753
|
+
It is user-invoked only and never fires automatically.
|
|
2754
|
+
|
|
2755
|
+
${bluebirdEnabled ? "Grounding uses Bluebird semantic + lexical code search (failures stay visible, no local fallback)." : (searchEnabled ?? false) || bluebirdEnabled ? "Grounding uses local lexical + semantic code search in parallel." : "Grounding uses lexical code search only (no semantic backend this launch)."}
|
|
2756
|
+
|
|
2757
|
+
## Operating contract
|
|
2758
|
+
|
|
2759
|
+
- Objective: produce a short grounded EXECUTION BRIEF for the current ask with recent-transcript signal.
|
|
2760
|
+
- The user's request (or the refined $ARGUMENTS ask) is authoritative; the brief is advisory counsel.
|
|
2761
|
+
- Never replace or truncate the user prompt; the brief is additive context.
|
|
2762
|
+
- Never read a full transcript into context; the binary supplies a 4K extractive excerpt.
|
|
2763
|
+
|
|
2764
|
+
## Procedure
|
|
2765
|
+
|
|
2766
|
+
1. Require $ARGUMENTS as the refined ask. If it is empty, tell the user to pass /gh-rebrief "<ask>" — do not run the command.
|
|
2767
|
+
2. Run the deterministic command (bounded: up to 2 Sol medium calls + one Luna summary, ≤30s).
|
|
2768
|
+
Pass the ask verbatim — do not interpret shell metacharacters in it, and
|
|
2769
|
+
never add flags of your own (the command takes --ask only):
|
|
2770
|
+
GH_ROUTER_REBRIEF_USER_INVOKED=1 github-router internal-rebrief --ask "$ARGUMENTS"
|
|
2771
|
+
3. Treat stdout as the advisory brief: INTENT, GROUNDING, CONSTRAINTS, VERIFY, OPEN QUESTIONS.
|
|
2772
|
+
4. Verify load-bearing file:line cites with a direct Read before acting on them.
|
|
2773
|
+
5. If the binary refuses (non-cheapest profile), use /gh-research instead.
|
|
2774
|
+
|
|
2775
|
+
## Return format
|
|
2776
|
+
|
|
2777
|
+
- Brief pointer: paste the returned EXECUTION BRIEF block (it is already capped).
|
|
2778
|
+
- Staleness: note when the transcript was truncated ([TRUNCATED] marker present).
|
|
2779
|
+
- Residuals: carry forward OPEN QUESTIONS verbatim; never fabricate answers.
|
|
2780
|
+
|
|
2781
|
+
## Non-goals
|
|
2782
|
+
|
|
2783
|
+
- Do not invoke without the user typing /gh-rebrief.
|
|
2784
|
+
- Do not run in a forked subagent; the binary needs the session transcript path.
|
|
2785
|
+
- Do not paste full file contents or the whole transcript.
|
|
2786
|
+
- Do not prescribe step-by-step procedure; give facts, constraints, and the check.
|
|
2787
|
+
`
|
|
2788
|
+
};
|
|
2789
|
+
}
|
|
2790
|
+
//#endregion
|
|
2727
2791
|
//#region src/lib/injected-skills/swe-pipeline-skill.ts
|
|
2728
2792
|
function buildSwePipelineSkill(_searchEnabled, profile) {
|
|
2729
2793
|
const leadPlansDirectly = profile === "cheapest" || profile === "balanced";
|
|
@@ -3214,10 +3278,10 @@ function joinClauses(parts) {
|
|
|
3214
3278
|
function buildNativeReachClauses(opts) {
|
|
3215
3279
|
if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest" || opts.profile === "balanced") {
|
|
3216
3280
|
if (opts.profile === "cheapest") return joinClauses([
|
|
3217
|
-
"`Explore`
|
|
3218
|
-
"`General-Purpose` for mixed, iterative, or multi-step execution
|
|
3219
|
-
"`reviewer` for independent adversarial verification, reproduction, and root-causing"
|
|
3220
|
-
]) + ". All roles run at a 200K context window — prefer targeted reads (search, Grep, Read specific files) over full file reads";
|
|
3281
|
+
"`Explore` (Luna/high, cheap breadth) for discovery, dependency mapping, and convention tracking spanning more than a couple of files",
|
|
3282
|
+
"`General-Purpose` (Luna/max, the heavy execution tier) for mixed, iterative, or multi-step execution",
|
|
3283
|
+
"`reviewer` (Luna/max, the heavy verification tier) for independent adversarial verification, reproduction, and root-causing"
|
|
3284
|
+
]) + ". Delegate by value — cheap breadth to `Explore`, heavy execution to `General-Purpose`, verification to `reviewer`. All roles run at a 200K context window — prefer targeted reads (search, Grep, Read specific files) over full file reads";
|
|
3221
3285
|
if (opts.profile === "balanced") return joinClauses([
|
|
3222
3286
|
"`Explore` for broad repository discovery, dependency mapping, and convention tracking (launch in parallel)",
|
|
3223
3287
|
"`General-Purpose` for mixed, iterative, or multi-step execution tasks (delegate freely)",
|
|
@@ -3287,10 +3351,10 @@ ${profileLabel} profile runtime wiring is unavailable. Work directly, use only t
|
|
|
3287
3351
|
const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated autonomous browsing tasks through \`mcp__${workersKey}__browse\`.` : "";
|
|
3288
3352
|
const artifactClause = opts.artifactAvailable ? ` \`mcp__${peersKey}__artifact_*\` provides human review in the artifact panel with auto-open on plan completion.` : "";
|
|
3289
3353
|
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).` : "";
|
|
3290
|
-
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; `General-Purpose` for mixed multi-step execution; `reviewer` for behavior-changing or risk-sensitive changes. In plan mode, produce the plan and acceptance criteria directly and do not edit files; before presenting the final plan to the user, consult `advisor` once for a framing check
|
|
3354
|
+
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; `General-Purpose` for mixed multi-step execution; `reviewer` for behavior-changing or risk-sensitive changes. In plan mode, produce the plan and acceptance criteria directly and do not edit files; before presenting the final plan to the user, consult `advisor` once for a framing check. Work to your strengths as a fast, cost-efficient model: verify by execution rather than memory; before a non-trivial task, write a short plan (steps, files involved, the check settling each step) and execute it; persist through tool failures with a rephrased attempt before asking the user; stop searching when further results stop changing the answer; tag claims verified, inferred, or unverified — never state that something passes, compiles, or is covered without observed output. Delegation graph: the lead may invoke all three; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\nConsulting `advisor` and `oracle` (a small budget — choose wisely): you have roughly 8-10 advisor calls for this session, and each costs real time and money, so spend them only where direction changes the outcome. Advisor and Oracle give you COUNSEL on HOW — and sometimes WHAT — to do: the shortest path, what to consider or look at, planning, strategy, and direction. They never replace evidence you can gather yourself: anything a search, read, build, test, or run can settle, settle it yourself — never spend a consult on it. Spend a consult on: (1) a pre-commit framing check, after you have oriented but before you lock an approach on a non-trivial task; (2) an unresolvable judgment call — conflicting evidence, or a stale-knowledge / high-consequence risk or severity call; (3) a pre-presentation framing check on the final plan. Do NOT spend one on routine progress, reassurance, completion ritual, or a moment that belongs to `reviewer` (verify/reproduce a change) or `oracle` (a self-contained technical/algorithmic/spec/architectural trade-off). Discriminator: session-trajectory / framing / momentum questions and how-to-approach go to `advisor`; self-contained technical/architectural trade-offs go to `oracle`; verification and reproduction go to `reviewer`; facts go to direct evidence. How to call: Sol reads a curated view of this session — the user's original ask, your most recent message text, and a bounded transcript that keeps your reasoning but truncates raw tool output — so before you call, write a short self-contained brief as your own message: the objective, your current job, what you verified / suspect is missing / ruled irrelevant, your confidence and what being wrong would cost, and one neutral question phrased with any competing hypotheses. Never paste raw tool output or ask it to \"review the whole thing\". State your confidence after you have committed to a position, not before, and weigh the reply against verified repository evidence — counsel is direction, not dictation, and you own the decision.\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. Phase pipeline (budget gather, 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: lead owns planning: sequence interfaces, invariants, and acceptance criteria directly. 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 three; `General-Purpose` may invoke `reviewer`; `reviewer` may invoke `Explore` for targeted discovery; `Explore` 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";
|
|
3291
3355
|
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" : "";
|
|
3292
3356
|
const swePipelineClause = opts.sweEnabled === false ? "" : `${isCheapest || isBalanced ? PIPELINE_SKILLS_AWARENESS_NO_PLAN_AGENT : PIPELINE_SKILLS_AWARENESS}\n\n`;
|
|
3293
|
-
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. \`mcp__${peersKey}__oracle\` is ${oracleDescriptor}, a second opinion for precise, self-contained architectural/spec trade-offs that search and \`Explore\` cannot settle; available to the lead; \`reviewer\` and other subagents cannot call Oracle. 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 ${isCheapest || isBalanced ? "available to the lead" : "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.${isCheapest ? "" : " `Plan` may consult Oracle on unresolved trade-offs, and reports any remaining tie-breaking gap to the lead."}${astraClause} `;
|
|
3357
|
+
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. \`mcp__${peersKey}__oracle\` is ${oracleDescriptor}, a second opinion for precise, self-contained architectural/spec trade-offs that search and \`Explore\` cannot settle; available to the lead; \`reviewer\` and other subagents cannot call Oracle. 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 ${isCheapest || isBalanced ? "available to the lead" : "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. Discriminator: transcript-aware trajectory/framing/momentum → advisor; a self-contained technical/architectural trade-off → Oracle.${isCheapest ? "" : " `Plan` may consult Oracle on unresolved trade-offs, and reports any remaining tie-breaking gap to the lead."}${astraClause} `;
|
|
3294
3358
|
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.";
|
|
3295
3359
|
}
|
|
3296
3360
|
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.";
|
|
@@ -3312,8 +3376,10 @@ function buildOperatingDefaultsDigest(opts = {}) {
|
|
|
3312
3376
|
const oracleDescriptor = isCheapest ? "(GPT-6 Sol 200K/high, lead-only)" : isBalanced ? "(Grok 4.6 200K/medium, lead-only)" : isCheap ? "(Grok 4.6 200K/medium, lead and Plan)" : "(Opus 5 1M/high, lead and Plan)";
|
|
3313
3377
|
const advisorDescriptor = isCheapest ? "(Sol/medium, lead-only)" : "(Sol/high, lead-only)";
|
|
3314
3378
|
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).` : ".";
|
|
3315
|
-
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, \`General-Purpose\` for mixed multi-step execution, and \`reviewer\` for behavior-changing or risk-sensitive changes. In plan mode, produce the plan and acceptance criteria directly; before presenting the final plan to the user, consult \`advisor\` once for a framing check
|
|
3316
|
-
|
|
3379
|
+
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, \`General-Purpose\` for mixed multi-step execution, and \`reviewer\` for behavior-changing or risk-sensitive changes. In plan mode, produce the plan and acceptance criteria directly; before presenting the final plan to the user, consult \`advisor\` once for a framing check. Plan briefly before non-trivial acts, verify by execution, tag unverified claims, and stop searching when results stop changing the answer. Handle trivial and surgical edits directly. Stop named teammates when finished.\n\nConsulting \`advisor\`/\`oracle\` (small budget, ~8-10 calls — choose wisely): use them for how/what — shortest path, what to consider, planning, strategy, direction — never for anything a search, read, or run settles, nor for routine progress, reassurance, or completion ritual; do not spend one where \`reviewer\` (verification) or \`oracle\` (a self-contained technical trade-off) owns the moment. Full how-to (when to spend, the call brief, the discriminator) is in your CLAUDE.md project instructions.
|
|
3380
|
+
|
|
3381
|
+
` : 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 \`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`;
|
|
3382
|
+
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) `oracle` " + oracleDescriptor + " as a second opinion for precise, self-contained technical/architectural trade-offs that search and `Explore` 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 (session momentum/trajectory); (3) `oracle` " + oracleDescriptor + " for self-contained technical/architectural trade-offs" + astraStep;
|
|
3317
3383
|
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" : "";
|
|
3318
3384
|
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;
|
|
3319
3385
|
}
|
|
@@ -3829,6 +3895,7 @@ function injectedSkillsForLaunch(selection) {
|
|
|
3829
3895
|
if (isPipelineSkillProfile(selection.profileId)) {
|
|
3830
3896
|
if (!selection.sweEnabled) {
|
|
3831
3897
|
if (selection.profileId === "max" && selection.firstMateEnabled) return allSkills.filter((skill) => skill.name.startsWith("gh-first-mate"));
|
|
3898
|
+
if (selection.profileId === "cheapest") return [buildRebriefSkill(searchEnabled, bluebirdEnabled)];
|
|
3832
3899
|
return [];
|
|
3833
3900
|
}
|
|
3834
3901
|
if (selection.profileId === "max") {
|
|
@@ -3836,6 +3903,7 @@ function injectedSkillsForLaunch(selection) {
|
|
|
3836
3903
|
if (selection.firstMateEnabled) return [...pipeline, ...allSkills.filter((skill) => skill.name.startsWith("gh-first-mate"))];
|
|
3837
3904
|
return pipeline;
|
|
3838
3905
|
}
|
|
3906
|
+
if (selection.profileId === "cheapest") return [...pipelineSkills.slice(), buildRebriefSkill(searchEnabled, bluebirdEnabled)];
|
|
3839
3907
|
return pipelineSkills.slice();
|
|
3840
3908
|
}
|
|
3841
3909
|
if (!selection.workerSkillsActive) return [];
|
|
@@ -3908,4 +3976,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
|
|
|
3908
3976
|
//#endregion
|
|
3909
3977
|
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 };
|
|
3910
3978
|
|
|
3911
|
-
//# sourceMappingURL=attribution-settings-
|
|
3979
|
+
//# sourceMappingURL=attribution-settings-B9T-EsEs.js.map
|