github-router 0.3.367 → 0.3.369
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-C0sY_rX1.js +1 -0
- package/dist/{attribution-settings-wVzQvIdL.js → attribution-settings-zoBxw08y.js} +223 -191
- package/dist/attribution-settings-zoBxw08y.js.map +1 -0
- package/dist/{balanced-profile-contract-DtnTIBjL.js → balanced-profile-contract-Dm_usmw7.js} +7 -1
- package/dist/{balanced-profile-contract-DtnTIBjL.js.map → balanced-profile-contract-Dm_usmw7.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-B3pIageM.js → claude-BbIfnWbm.js} +15 -13
- package/dist/claude-BbIfnWbm.js.map +1 -0
- package/dist/{claude-md-injection-BV4tPUWo.js → claude-md-injection-BtBG1RBZ.js} +36 -11
- package/dist/claude-md-injection-BtBG1RBZ.js.map +1 -0
- package/dist/{codex-B_AMB6JM.js → codex-CZVlP2tB.js} +5 -5
- package/dist/{codex-B_AMB6JM.js.map → codex-CZVlP2tB.js.map} +1 -1
- package/dist/engine-DeIo-VIR.js +1 -0
- package/dist/{gate-discovery-CXE-7VcM.js → gate-discovery-BYyYeUnn.js} +2 -2
- package/dist/{gate-discovery-CXE-7VcM.js.map → gate-discovery-BYyYeUnn.js.map} +1 -1
- package/dist/hooks.mjs +72 -10
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-fast-dispatch-guard-DP25L_Bx.js → internal-fast-dispatch-guard-De_DJOyZ.js} +1 -1
- package/dist/{internal-fast-dispatch-guard-DbrgO9Ab.js → internal-fast-dispatch-guard-_n-A8hgo.js} +2 -2
- package/dist/{internal-fast-dispatch-guard-DbrgO9Ab.js.map → internal-fast-dispatch-guard-_n-A8hgo.js.map} +1 -1
- package/dist/{internal-prompt-submit-DPUBQZtG.js → internal-prompt-submit-B-kKTl-8.js} +2 -2
- package/dist/{internal-prompt-submit-BaccW_CC.js → internal-prompt-submit-bi7F7pKk.js} +2 -2
- package/dist/{internal-prompt-submit-BaccW_CC.js.map → internal-prompt-submit-bi7F7pKk.js.map} +1 -1
- package/dist/{internal-rebrief-NjSlx5QY.js → internal-rebrief-B6ZJS6Mp.js} +3 -3
- package/dist/{internal-rebrief-NjSlx5QY.js.map → internal-rebrief-B6ZJS6Mp.js.map} +1 -1
- package/dist/{internal-stop-hook-B2TTl6Zp.js → internal-stop-hook-BbyobGUU.js} +2 -2
- package/dist/{internal-stop-hook-B2TTl6Zp.js.map → internal-stop-hook-BbyobGUU.js.map} +1 -1
- package/dist/main.js +9 -9
- package/dist/{peer-mcp-personas-BOgR46nM.js → peer-mcp-personas-DNtWI2C1.js} +721 -330
- package/dist/peer-mcp-personas-DNtWI2C1.js.map +1 -0
- package/dist/{pi-DcWp83mx.js → pi-Bc-MVgAo.js} +31 -12
- package/dist/{pi-DcWp83mx.js.map → pi-Bc-MVgAo.js.map} +1 -1
- package/dist/{provision-DkWR9B6I.js → provision-DUWdcY_a.js} +2 -2
- package/dist/{provision-DkWR9B6I.js.map → provision-DUWdcY_a.js.map} +1 -1
- package/dist/{serve-BGwEVDdc.js → serve-CmWOTR7m.js} +7 -7
- package/dist/{serve-BGwEVDdc.js.map → serve-CmWOTR7m.js.map} +1 -1
- package/dist/{server-setup-DVPL9iph.js → server-setup-CIzmDJzT.js} +55 -121
- package/dist/server-setup-CIzmDJzT.js.map +1 -0
- package/dist/{start-BUWx3nSr.js → start-rlpaeAtx.js} +3 -3
- package/dist/{start-BUWx3nSr.js.map → start-rlpaeAtx.js.map} +1 -1
- package/dist/state-CiwCLVDZ.js.map +1 -1
- package/dist/{static-context-pack-ChHuxBpk.js → static-context-pack-DvwLWlbe.js} +153 -17
- package/dist/static-context-pack-DvwLWlbe.js.map +1 -0
- package/package.json +1 -1
- package/dist/ado-tools-rysFZDws.js +0 -1
- package/dist/attribution-settings-wVzQvIdL.js.map +0 -1
- package/dist/claude-B3pIageM.js.map +0 -1
- package/dist/claude-md-injection-BV4tPUWo.js.map +0 -1
- package/dist/engine-D3oNrF6Z.js +0 -1
- package/dist/peer-mcp-personas-BOgR46nM.js.map +0 -1
- package/dist/server-setup-DVPL9iph.js.map +0 -1
- package/dist/static-context-pack-ChHuxBpk.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { pt as disposeAdoClients } from "./peer-mcp-personas-DNtWI2C1.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { p as writeRuntimeFileSecure, t as PATHS } from "./paths-C5477RGC.js";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as CHEAP_EXPLORE_ALIAS_ID, C as BALANCED_EXPLORE_ALIAS_ID, D as CHEAPEST_EXPLORE_ALIAS_ID, E as BROWSE_LOW_ALIAS_ID, F as MAX_BROWSE_LOW_ALIAS_ID, M as CHEAP_PLAN_ALIAS_ID, N as CHEAP_REVIEWER_ALIAS_ID, O as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, P as LUNA_SCOUT_ALIAS_ID, T as BALANCED_REVIEWER_ALIAS_ID, j as CHEAP_GENERAL_PURPOSE_ALIAS_ID, k as CHEAPEST_REVIEWER_ALIAS_ID, w as BALANCED_GENERAL_PURPOSE_ALIAS_ID } from "./server-setup-CIzmDJzT.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 {
|
|
6
|
-
import { a as BALANCED_PROFILE_NATIVE_EFFORTS, i as BALANCED_PROFILE_NATIVE_AGENT_NAMES } from "./balanced-profile-contract-
|
|
4
|
+
import { An as DEFINITION_OF_GREATNESS, Fn as LOCAL_CONSULT_REDACTION_LINE, a as buildAgentPrompt, ar as CHEAP_PROFILE_NATIVE_AGENT_NAMES, er as oneMContextDisabled, kn as CONDENSED_OPERATING_SEQUENCE, l as maxPersonasFor, n as MCP_GROUPS, or as CHEAP_PROFILE_NATIVE_EFFORTS, t as GROUP_META, tr as withOneMSuffix, u as personasFor } from "./peer-mcp-personas-DNtWI2C1.js";
|
|
5
|
+
import { E as LOCAL_PROFILE_NATIVE_MODELS, F as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, I as CHEAPEST_PROFILE_NATIVE_EFFORTS, T as LOCAL_PROFILE_NATIVE_AGENT_NAMES, _ as isCheapestFamily, g as isBalancedFamily, y as isLocalFamily } from "./static-context-pack-DvwLWlbe.js";
|
|
6
|
+
import { a as BALANCED_PROFILE_NATIVE_EFFORTS, i as BALANCED_PROFILE_NATIVE_AGENT_NAMES } from "./balanced-profile-contract-Dm_usmw7.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
8
|
import "./self-invocation-BtcGj-lY.js";
|
|
9
|
-
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-
|
|
9
|
+
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-DUWdcY_a.js";
|
|
10
10
|
import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-Xw9B1W6T.js";
|
|
11
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-
|
|
12
|
+
import { o as isUnderClaudeConfigMirrorRealpath, u as renameWithRetry } from "./claude-md-injection-BtBG1RBZ.js";
|
|
13
13
|
import consola from "consola";
|
|
14
14
|
import path from "node:path";
|
|
15
15
|
import { randomBytes } from "node:crypto";
|
|
@@ -472,31 +472,48 @@ function pinnedGeneralPurposePrompt(opts) {
|
|
|
472
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");
|
|
473
473
|
}
|
|
474
474
|
const REVIEWER_DESC_TAIL = "Runs builds/tests itself rather than assuming them. Returns SHIP / FIX / BLOCK with reproducible evidence. Never edits source.";
|
|
475
|
-
function pinnedReviewerDescription(explicit, isBalanced = false, is200K = false,
|
|
476
|
-
|
|
475
|
+
function pinnedReviewerDescription(explicit, isBalanced = false, is200K = false, advisorKind) {
|
|
476
|
+
const head = 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. ";
|
|
477
|
+
const consultant = advisorKind === "local-endpoint" ? "advisor" : "Sol advisor";
|
|
478
|
+
return head + REVIEWER_DESC_TAIL + (is200K ? DESC_200K_NOTE : "") + (advisorKind ? ` May consult its ${consultant} (at most 5 advisor rounds per review) on consequential uncertainty it cannot settle by evidence.` : "");
|
|
477
479
|
}
|
|
478
480
|
/** Protege appendix for the cheapest reviewer: the capped Sol-advisor
|
|
479
481
|
* protocol. Appended after the delegation paragraph so the adversarial core
|
|
480
482
|
* above stays byte-identical across profiles.
|
|
481
483
|
*
|
|
482
|
-
* `framing` is the
|
|
483
|
-
* the
|
|
484
|
-
*
|
|
485
|
-
*
|
|
486
|
-
*
|
|
484
|
+
* `framing` is the complete noun phrase describing the consultant, from its
|
|
485
|
+
* identity (or the absence of one) through what it sees. One parameter rather
|
|
486
|
+
* than a model name plus a predicate, because the variants differ in both: a
|
|
487
|
+
* Copilot-served lead can be told the consultant is Sol and stronger
|
|
488
|
+
* cross-lab, a `local` launch bills an endpoint whose model the proxy knows
|
|
489
|
+
* nothing about so the only claim it can make is who serves it, and
|
|
490
|
+
* `cheaplocal` names no model at all. Same builder, so the behavioural
|
|
491
|
+
* contract cannot drift between them.
|
|
487
492
|
*
|
|
488
|
-
*
|
|
493
|
+
* All framings describe the curated transport, not a full transcript: the
|
|
489
494
|
* reviewer's consult is rendered by the curated path (24K transcript budget,
|
|
490
495
|
* tool-aware, layered under `<operator_focus>` / `<caller_context>`), so
|
|
491
|
-
* promising the whole transcript would overstate what the advisor sees.
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
496
|
+
* promising the whole transcript would overstate what the advisor sees.
|
|
497
|
+
*
|
|
498
|
+
* `redact` carries the caller half of the redaction contract to the one
|
|
499
|
+
* framing whose brief leaves Copilot for an endpoint the operator runs. It is
|
|
500
|
+
* a boolean rather than part of `framing` because it describes the transport,
|
|
501
|
+
* not the consultant: the same endpoint-backed reviewer would need it whether
|
|
502
|
+
* or not the profile names a model. */
|
|
503
|
+
function buildProtegeAdvisorAppendix(framing, redact = false) {
|
|
504
|
+
return "You have an `advisor` tool backed by " + 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. " + (redact ? LOCAL_CONSULT_REDACTION_LINE + " " : "") + "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. ";
|
|
505
|
+
}
|
|
506
|
+
/** The appendix per consultant kind. Indexed rather than branched at the two
|
|
507
|
+
* call sites so a new kind cannot be reachable from `pinnedReviewerPrompt`
|
|
508
|
+
* without its prose existing. */
|
|
509
|
+
const PROTEGE_APPENDICES = {
|
|
510
|
+
sol: buildProtegeAdvisorAppendix("Sol, a stronger cross-lab model that sees the ask, the brief you write, and a bounded transcript"),
|
|
511
|
+
"copilot-served": buildProtegeAdvisorAppendix("a Copilot-served model that sees the ask, the brief you write, and a bounded transcript"),
|
|
512
|
+
"local-endpoint": buildProtegeAdvisorAppendix("a model on your local endpoint that sees the ask, the brief you write, and a bounded transcript", true)
|
|
513
|
+
};
|
|
497
514
|
function pinnedReviewerPrompt(semanticAvailable = true, opts) {
|
|
498
515
|
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). ";
|
|
499
|
-
const protege = opts?.
|
|
516
|
+
const protege = opts?.advisorKind ? PROTEGE_APPENDICES[opts.advisorKind] : "";
|
|
500
517
|
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);
|
|
501
518
|
}
|
|
502
519
|
/** Build the literal `-m fast` native roster. This is intentionally separate
|
|
@@ -702,6 +719,7 @@ function buildCheapestProfileAgentDefinitions(opts) {
|
|
|
702
719
|
const generalModel = CHEAPEST_GENERAL_PURPOSE_ALIAS_ID;
|
|
703
720
|
const reviewerModel = CHEAPEST_REVIEWER_ALIAS_ID;
|
|
704
721
|
const semanticAvailable = opts.semanticSearchAvailable === true;
|
|
722
|
+
const advisorKind = opts.cheaplocalProfile ? "local-endpoint" : "sol";
|
|
705
723
|
const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
|
|
706
724
|
const searchMcpServers = opts.serverUrl ? { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } : void 0;
|
|
707
725
|
const readSearchTools = [
|
|
@@ -739,10 +757,10 @@ function buildCheapestProfileAgentDefinitions(opts) {
|
|
|
739
757
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
740
758
|
},
|
|
741
759
|
reviewer: {
|
|
742
|
-
description: pinnedReviewerDescription(false, false, true,
|
|
760
|
+
description: pinnedReviewerDescription(false, false, true, advisorKind),
|
|
743
761
|
prompt: pinnedReviewerPrompt(semanticAvailable, {
|
|
744
762
|
is200K: true,
|
|
745
|
-
|
|
763
|
+
advisorKind
|
|
746
764
|
}),
|
|
747
765
|
model: reviewerModel,
|
|
748
766
|
effort: effort("reviewer"),
|
|
@@ -834,11 +852,10 @@ function buildLocalProfileAgentDefinitions(opts) {
|
|
|
834
852
|
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
835
853
|
},
|
|
836
854
|
reviewer: {
|
|
837
|
-
description: pinnedReviewerDescription(false, false, true, protegeAdvisor),
|
|
855
|
+
description: pinnedReviewerDescription(false, false, true, protegeAdvisor ? "copilot-served" : void 0),
|
|
838
856
|
prompt: pinnedReviewerPrompt(semanticAvailable, {
|
|
839
857
|
is200K: true,
|
|
840
|
-
protegeAdvisor
|
|
841
|
-
localAdvisor: protegeAdvisor
|
|
858
|
+
advisorKind: protegeAdvisor ? "copilot-served" : void 0
|
|
842
859
|
}),
|
|
843
860
|
model: reviewerModel,
|
|
844
861
|
effort: effort("reviewer"),
|
|
@@ -1420,6 +1437,7 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
|
|
|
1420
1437
|
fastProfile: opts.fastProfile,
|
|
1421
1438
|
cheapProfile: opts.cheapProfile,
|
|
1422
1439
|
cheapestProfile: opts.cheapestProfile,
|
|
1440
|
+
cheaplocalProfile: opts.cheaplocalProfile,
|
|
1423
1441
|
balancedProfile: opts.balancedProfile,
|
|
1424
1442
|
implementerEffort: opts.implementerEffort,
|
|
1425
1443
|
reviewerEffort: opts.reviewerEffort,
|
|
@@ -2187,11 +2205,185 @@ Return a compact final checkpoint:
|
|
|
2187
2205
|
};
|
|
2188
2206
|
}
|
|
2189
2207
|
//#endregion
|
|
2208
|
+
//#region src/lib/injected-skills/plan-skill.ts
|
|
2209
|
+
/**
|
|
2210
|
+
* Whether the profile roster includes an `implementer` native.
|
|
2211
|
+
*
|
|
2212
|
+
* Only the standard, fast and max rosters emit one, and none of those profiles
|
|
2213
|
+
* receives the pipeline skills. Every member of `PlanSkillProfile` is a
|
|
2214
|
+
* cheap/balanced/local family launch whose roster is Explore,
|
|
2215
|
+
* General-Purpose and reviewer, so naming `implementer` there would point the
|
|
2216
|
+
* model at an agent the launch does not have. A profile-less call is the
|
|
2217
|
+
* legacy standalone builder, where the max-conditional wording still applies.
|
|
2218
|
+
*/
|
|
2219
|
+
function rosterEmitsImplementer(profile) {
|
|
2220
|
+
return profile === void 0;
|
|
2221
|
+
}
|
|
2222
|
+
function buildPlanSkill(_searchEnabled, profile) {
|
|
2223
|
+
const leadPlansDirectly = isCheapestFamily(profile) || isBalancedFamily(profile) || isLocalFamily(profile);
|
|
2224
|
+
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)";
|
|
2225
|
+
const downstreamAgent = rosterEmitsImplementer(profile) ? "a native General-Purpose (or implementer, where the profile provides one) subagent" : "a native General-Purpose subagent";
|
|
2226
|
+
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.";
|
|
2227
|
+
const compactionNote = isLocalFamily(profile) ? "Output volume dominates." : "Output tokens cost several times input on every profile.";
|
|
2228
|
+
const dispatchBoundary = isLocalFamily(profile) ? "" : ", never via worker-* MCP dispatchers";
|
|
2229
|
+
const planDispatchBoundary = isLocalFamily(profile) ? "" : ", never worker-* MCP dispatchers";
|
|
2230
|
+
const dispatchStep = leadPlansDirectly ? `3. Compose the plan directly with that brief, then validate it against
|
|
2231
|
+
the same bar: every task names files, states the change and its done
|
|
2232
|
+
condition, and carries runnable acceptance commands; trade-offs appear as
|
|
2233
|
+
options with a recommendation. If gaps remain, run ONE bounded self-review
|
|
2234
|
+
pass naming the exact gaps (at most 2 review passes total). If still
|
|
2235
|
+
underspecified, checkpoint with the gaps as residual risk instead of
|
|
2236
|
+
pretending the plan is complete.` : `3. Dispatch ONE Plan subagent via the Agent tool (subagent_type Plan) with
|
|
2237
|
+
that brief, then WAIT for its full return. Do not plan inline in parallel
|
|
2238
|
+
and do not dispatch implementation subagents while it runs.`;
|
|
2239
|
+
const validateStep = leadPlansDirectly ? `4. Validate the composed plan. Every task must name files, state the
|
|
2240
|
+
change and its done condition, and carry runnable acceptance commands;
|
|
2241
|
+
trade-offs must appear as options with a recommendation.` : `4. Validate the returned plan. Every task must name files, state the
|
|
2242
|
+
change and its done condition, and carry runnable acceptance commands;
|
|
2243
|
+
trade-offs must appear as options with a recommendation. If gaps remain,
|
|
2244
|
+
send ONE bounded follow-up to the same Plan dispatch naming the exact gaps
|
|
2245
|
+
(at most 2 follow-up rounds total). If still underspecified, checkpoint
|
|
2246
|
+
with the gaps as residual risk instead of pretending the plan is complete.`;
|
|
2247
|
+
const advisorStep = isCheapestFamily(profile) || profile === "local2" ? `
|
|
2248
|
+
6. Review the final plan with the Advisor before presenting it to the user:
|
|
2249
|
+
consult \`advisor\` once for a framing check. It is non-binding counsel;
|
|
2250
|
+
you retain decision ownership.
|
|
2251
|
+
|
|
2252
|
+
` : "";
|
|
2253
|
+
const persistStepNumber = 5 + (leadPlansDirectly ? 1 : 0) + (advisorStep ? 1 : 0);
|
|
2254
|
+
const checkpointStepNumber = persistStepNumber + 1;
|
|
2255
|
+
return {
|
|
2256
|
+
name: "gh-plan",
|
|
2257
|
+
md: `---
|
|
2258
|
+
name: gh-plan
|
|
2259
|
+
description: Create an implementation plan from gathered context. Use when a non-trivial change needs a reviewed, ordered task list with acceptance criteria before implementing. Requires user approval. Not for trivial changes or missing context.
|
|
2260
|
+
user-invocable: true
|
|
2261
|
+
requires: [fresh context.md with .complete marker]
|
|
2262
|
+
produces: [plan.md, .complete]
|
|
2263
|
+
consumes: [context.md, context.compact.md]
|
|
2264
|
+
excludes: [trivial changes, implementation, missing context]
|
|
2265
|
+
---
|
|
2266
|
+
|
|
2267
|
+
# gh-plan: ${leadPlansDirectly ? "lead-direct planning" : "native Plan-subagent planning"}
|
|
2268
|
+
|
|
2269
|
+
Use this skill after /gh-gather-context (or when equivalent context is already
|
|
2270
|
+
available) and before any implementation. For non-trivial work, ${planningMeans}.
|
|
2271
|
+
The plan must be scoped, modular, non-overlapping, and ordered, with
|
|
2272
|
+
enough detail for ${downstreamAgent} to execute each task in isolation. User approval is
|
|
2273
|
+
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."}
|
|
2274
|
+
|
|
2275
|
+
## Prerequisites
|
|
2276
|
+
|
|
2277
|
+
- A freshness-stamped context brief from /gh-gather-context, or equivalent context.
|
|
2278
|
+
- Read context.compact.md first; read context.md sections on demand (residual unknowns, evidence table).
|
|
2279
|
+
|
|
2280
|
+
## Stage gate 0 (do this BEFORE any planning)
|
|
2281
|
+
|
|
2282
|
+
1. Verify the context stage is finished: .github-router/context/<slug>/.complete
|
|
2283
|
+
exists. If the marker is missing, STOP: do not plan on a partial brief.
|
|
2284
|
+
Finish or re-invoke gathering first.
|
|
2285
|
+
2. Check freshness: if HEAD or the working-tree diff hash moved since the
|
|
2286
|
+
brief's stamp, re-verify stale load-bearing claims before using them.
|
|
2287
|
+
3. Close the previous stage: send no further follow-ups to any lingering
|
|
2288
|
+
gather-context Explore dispatches and record them as superseded with the
|
|
2289
|
+
reason. Native subagents cannot be killed mid-run: let them finish but do
|
|
2290
|
+
not wait on or use their output. Planning while Explore subagents still run
|
|
2291
|
+
builds on shifting evidence and wastes both stages. Only advance once every
|
|
2292
|
+
Explore dispatch has returned or is recorded as superseded.
|
|
2293
|
+
|
|
2294
|
+
## Triviality reassessment (do this AFTER gate 0, BEFORE ${leadPlansDirectly ? "planning" : "dispatching Plan"})
|
|
2295
|
+
|
|
2296
|
+
1. Reassess with fresh context: if the ask is trivial (typo, one-line config
|
|
2297
|
+
read, obvious change of at most a few lines, pure explanation) or the
|
|
2298
|
+
context shows no multi-file, risky, uncertain, or high-impact work, STOP.
|
|
2299
|
+
Do NOT ${leadPlansDirectly ? "plan" : "dispatch Plan"}. Do NOT write plan.md or .complete.
|
|
2300
|
+
2. Return a trivial verdict: one-sentence reason, the recommended direct
|
|
2301
|
+
action, and an explicit statement that no downstream stage (/gh-implement,
|
|
2302
|
+
/gh-swe-pipeline stage 3) may run. A trivial ask must never pay planning
|
|
2303
|
+
cost as ritual.
|
|
2304
|
+
|
|
2305
|
+
## Hard bounds
|
|
2306
|
+
|
|
2307
|
+
- Maximum tasks: 20.
|
|
2308
|
+
- Maximum parallel groups: 5.
|
|
2309
|
+
- Keep planner input well under the 200K window (target at most around 150K tokens of context) so there is headroom for reasoning and output. This is self-discipline, not an enforced cap: prefer the compact brief and read full sections only on demand.
|
|
2310
|
+
- Advisory budget: keep ${leadPlansDirectly ? "planning" : "the Plan dispatch"} under ~5 minutes; the Task tool enforces no wall-clock. At most 2 bounded ${leadPlansDirectly ? "self-review passes" : "follow-up rounds to the same Plan dispatch"} for gaps.
|
|
2311
|
+
|
|
2312
|
+
## Procedure (non-trivial work only)
|
|
2313
|
+
|
|
2314
|
+
1. Ingest context.
|
|
2315
|
+
- Read context.compact.md fully.
|
|
2316
|
+
- Read the evidence table and residual unknowns from context.md.
|
|
2317
|
+
- Identify acceptance criteria, constraints, integration seams, and forbidden changes.
|
|
2318
|
+
|
|
2319
|
+
2. Compose the ${leadPlansDirectly ? "plan" : "Plan dispatch brief"}. Include every item below; a vague brief
|
|
2320
|
+
produces a vague plan, and a vague plan fails downstream:
|
|
2321
|
+
- Ask summary and acceptance criteria (or candidates where ambiguous).
|
|
2322
|
+
- Constraints, integration seams, and forbidden changes.
|
|
2323
|
+
- Context pointers: context.compact.md path, the evidence table and
|
|
2324
|
+
residual sections of context.md, plus the freshness stamp.
|
|
2325
|
+
- Required output shape: objective; architectural invariants; interface
|
|
2326
|
+
contracts; execution steps with files touched plus a done condition per
|
|
2327
|
+
step; acceptance commands with the observable pass result; critical files
|
|
2328
|
+
as file:line; a blind-spot table tagging each risk executable-checkable
|
|
2329
|
+
or judgment-only (wrong-spec, root-cause, integration, regression,
|
|
2330
|
+
review, concurrency or merge, missing-test); open questions as options
|
|
2331
|
+
with a recommendation; cost estimate (task count, parallel groups,
|
|
2332
|
+
context tokens).
|
|
2333
|
+
- Plan-mode rule: plan and acceptance criteria only, no implementation
|
|
2334
|
+
file edits.
|
|
2335
|
+
- Permission to use Explore ${leadPlansDirectly ? "per the lead delegation graph" : "and reviewer per the delegation graph"}.
|
|
2336
|
+
- ${briefProseNote}
|
|
2337
|
+
- Demand compact output: file:line plus one-line purposes, never pasted
|
|
2338
|
+
source blocks. ${compactionNote}
|
|
2339
|
+
- Advisory ~5 minute budget.
|
|
2340
|
+
|
|
2341
|
+
${dispatchStep}
|
|
2342
|
+
|
|
2343
|
+
${validateStep}
|
|
2344
|
+
|
|
2345
|
+
${persistStepNumber}. Persist the validated plan to .github-router/plans/<slug>/plan.md.
|
|
2346
|
+
- Ask summary and user-blessed acceptance criteria.
|
|
2347
|
+
- Blind-spot table with executable-checkable or judgment-only tags.
|
|
2348
|
+
- Ordered task list with ids, files, dependencies, parallel groups, acceptance criteria, verification commands, rollback concerns, and estimated context tokens.
|
|
2349
|
+
- Open questions and user answers.
|
|
2350
|
+
- Cost estimate: task count, parallel groups, and context tokens.
|
|
2351
|
+
- Residual risks.
|
|
2352
|
+
${advisorStep}${checkpointStepNumber}. Checkpoint with the user and wait for explicit approval.
|
|
2353
|
+
- Present the goal, acceptance criteria, task-to-group map, per-task blind spot killed, residual risks, and cost estimate.
|
|
2354
|
+
- If the user rejects scope or cost, downshift to the smallest plan that kills the important blind spots.
|
|
2355
|
+
- Do not proceed to implementation without approval.
|
|
2356
|
+
- Write .github-router/plans/<slug>/.complete ONLY after explicit user approval, recording the approval in the marker. A plan without an approval record is NOT complete, and no downstream stage (/gh-implement, /gh-swe-pipeline stage 3) may start without it.
|
|
2357
|
+
|
|
2358
|
+
## Return format
|
|
2359
|
+
|
|
2360
|
+
Return:
|
|
2361
|
+
|
|
2362
|
+
- Trivial exit: yes with the recommended direct action and no plan file, or no with the plan below.
|
|
2363
|
+
- Plan file: path to the durable plan.md.
|
|
2364
|
+
- Task count and parallel groups.
|
|
2365
|
+
- Open questions and user answers.
|
|
2366
|
+
- Cost estimate.
|
|
2367
|
+
- Residual risks and next action (implementation only after approval).
|
|
2368
|
+
|
|
2369
|
+
## Non-goals
|
|
2370
|
+
|
|
2371
|
+
- Do not ${leadPlansDirectly ? "plan a trivial ask" : "dispatch Plan for a trivial ask"}; exit with a trivial verdict instead.
|
|
2372
|
+
- Do not edit implementation files while planning; in plan mode, produce the plan and acceptance criteria only.
|
|
2373
|
+
- Do not present judgment-only conclusions as executable guarantees.
|
|
2374
|
+
- Do not hide open unknowns because the plan looks complete.
|
|
2375
|
+
- Do not start planning while gather-context Explore subagents still run; record them superseded first.
|
|
2376
|
+
- Do not dispatch implementation subagents from planning: stages never overlap.
|
|
2377
|
+
`
|
|
2378
|
+
};
|
|
2379
|
+
}
|
|
2380
|
+
buildPlanSkill(true);
|
|
2381
|
+
//#endregion
|
|
2190
2382
|
//#region src/lib/injected-skills/gather-context-skill.ts
|
|
2191
2383
|
function buildGatherContextSkill(searchEnabled, bluebirdEnabled = false, profile) {
|
|
2192
2384
|
const semanticAvailable = searchEnabled || bluebirdEnabled;
|
|
2193
2385
|
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 =
|
|
2386
|
+
const downstreamConsumer = rosterEmitsImplementer(profile) ? "planner, implementer, or user" : "planner, General-Purpose, or user";
|
|
2195
2387
|
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
2388
|
const searchStep = semanticAvailable ? `3. Run semantic search first for concepts, then lexical for symbols, in parallel, in a single turn.
|
|
2197
2389
|
- 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"}.
|
|
@@ -2319,8 +2511,8 @@ buildGatherContextSkill(true);
|
|
|
2319
2511
|
//#region src/lib/injected-skills/implement-skill.ts
|
|
2320
2512
|
function buildImplementSkill(_searchEnabled, profile) {
|
|
2321
2513
|
const planDispatches = isCheapestFamily(profile) || isBalancedFamily(profile) || isLocalFamily(profile) ? "planning work" : "Plan dispatches";
|
|
2322
|
-
const implementerFirst =
|
|
2323
|
-
const implementerDispatch =
|
|
2514
|
+
const implementerFirst = rosterEmitsImplementer(profile) ? "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" : "Use General-Purpose for every implementation task and handoff";
|
|
2515
|
+
const implementerDispatch = rosterEmitsImplementer(profile) ? "Use subagent_type implementer first where the profile provides one (max), otherwise subagent_type General-Purpose for every task" : "Use subagent_type General-Purpose for every task";
|
|
2324
2516
|
const geminiNote = isLocalFamily(profile) ? "" : ": Gemini-run subagents may suppress tool calls when the prompt contains reflective text";
|
|
2325
2517
|
const compactionNote = isLocalFamily(profile) ? "Output volume dominates." : "Output tokens cost several times input on every profile.";
|
|
2326
2518
|
return {
|
|
@@ -2574,167 +2766,6 @@ Return:
|
|
|
2574
2766
|
};
|
|
2575
2767
|
}
|
|
2576
2768
|
//#endregion
|
|
2577
|
-
//#region src/lib/injected-skills/plan-skill.ts
|
|
2578
|
-
function buildPlanSkill(_searchEnabled, profile) {
|
|
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";
|
|
2586
|
-
const dispatchStep = leadPlansDirectly ? `3. Compose the plan directly with that brief, then validate it against
|
|
2587
|
-
the same bar: every task names files, states the change and its done
|
|
2588
|
-
condition, and carries runnable acceptance commands; trade-offs appear as
|
|
2589
|
-
options with a recommendation. If gaps remain, run ONE bounded self-review
|
|
2590
|
-
pass naming the exact gaps (at most 2 review passes total). If still
|
|
2591
|
-
underspecified, checkpoint with the gaps as residual risk instead of
|
|
2592
|
-
pretending the plan is complete.` : `3. Dispatch ONE Plan subagent via the Agent tool (subagent_type Plan) with
|
|
2593
|
-
that brief, then WAIT for its full return. Do not plan inline in parallel
|
|
2594
|
-
and do not dispatch implementation subagents while it runs.`;
|
|
2595
|
-
const validateStep = leadPlansDirectly ? `4. Validate the composed plan. Every task must name files, state the
|
|
2596
|
-
change and its done condition, and carry runnable acceptance commands;
|
|
2597
|
-
trade-offs must appear as options with a recommendation.` : `4. Validate the returned plan. Every task must name files, state the
|
|
2598
|
-
change and its done condition, and carry runnable acceptance commands;
|
|
2599
|
-
trade-offs must appear as options with a recommendation. If gaps remain,
|
|
2600
|
-
send ONE bounded follow-up to the same Plan dispatch naming the exact gaps
|
|
2601
|
-
(at most 2 follow-up rounds total). If still underspecified, checkpoint
|
|
2602
|
-
with the gaps as residual risk instead of pretending the plan is complete.`;
|
|
2603
|
-
const advisorStep = isCheapestFamily(profile) || profile === "local2" ? `
|
|
2604
|
-
6. Review the final plan with the Advisor before presenting it to the user:
|
|
2605
|
-
consult \`advisor\` once for a framing check. It is non-binding counsel;
|
|
2606
|
-
you retain decision ownership.
|
|
2607
|
-
|
|
2608
|
-
` : "";
|
|
2609
|
-
const persistStepNumber = 5 + (leadPlansDirectly ? 1 : 0) + (advisorStep ? 1 : 0);
|
|
2610
|
-
const checkpointStepNumber = persistStepNumber + 1;
|
|
2611
|
-
return {
|
|
2612
|
-
name: "gh-plan",
|
|
2613
|
-
md: `---
|
|
2614
|
-
name: gh-plan
|
|
2615
|
-
description: Create an implementation plan from gathered context. Use when a non-trivial change needs a reviewed, ordered task list with acceptance criteria before implementing. Requires user approval. Not for trivial changes or missing context.
|
|
2616
|
-
user-invocable: true
|
|
2617
|
-
requires: [fresh context.md with .complete marker]
|
|
2618
|
-
produces: [plan.md, .complete]
|
|
2619
|
-
consumes: [context.md, context.compact.md]
|
|
2620
|
-
excludes: [trivial changes, implementation, missing context]
|
|
2621
|
-
---
|
|
2622
|
-
|
|
2623
|
-
# gh-plan: ${leadPlansDirectly ? "lead-direct planning" : "native Plan-subagent planning"}
|
|
2624
|
-
|
|
2625
|
-
Use this skill after /gh-gather-context (or when equivalent context is already
|
|
2626
|
-
available) and before any implementation. For non-trivial work, ${planningMeans}.
|
|
2627
|
-
The plan must be scoped, modular, non-overlapping, and ordered, with
|
|
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."}
|
|
2630
|
-
|
|
2631
|
-
## Prerequisites
|
|
2632
|
-
|
|
2633
|
-
- A freshness-stamped context brief from /gh-gather-context, or equivalent context.
|
|
2634
|
-
- Read context.compact.md first; read context.md sections on demand (residual unknowns, evidence table).
|
|
2635
|
-
|
|
2636
|
-
## Stage gate 0 (do this BEFORE any planning)
|
|
2637
|
-
|
|
2638
|
-
1. Verify the context stage is finished: .github-router/context/<slug>/.complete
|
|
2639
|
-
exists. If the marker is missing, STOP: do not plan on a partial brief.
|
|
2640
|
-
Finish or re-invoke gathering first.
|
|
2641
|
-
2. Check freshness: if HEAD or the working-tree diff hash moved since the
|
|
2642
|
-
brief's stamp, re-verify stale load-bearing claims before using them.
|
|
2643
|
-
3. Close the previous stage: send no further follow-ups to any lingering
|
|
2644
|
-
gather-context Explore dispatches and record them as superseded with the
|
|
2645
|
-
reason. Native subagents cannot be killed mid-run: let them finish but do
|
|
2646
|
-
not wait on or use their output. Planning while Explore subagents still run
|
|
2647
|
-
builds on shifting evidence and wastes both stages. Only advance once every
|
|
2648
|
-
Explore dispatch has returned or is recorded as superseded.
|
|
2649
|
-
|
|
2650
|
-
## Triviality reassessment (do this AFTER gate 0, BEFORE ${leadPlansDirectly ? "planning" : "dispatching Plan"})
|
|
2651
|
-
|
|
2652
|
-
1. Reassess with fresh context: if the ask is trivial (typo, one-line config
|
|
2653
|
-
read, obvious change of at most a few lines, pure explanation) or the
|
|
2654
|
-
context shows no multi-file, risky, uncertain, or high-impact work, STOP.
|
|
2655
|
-
Do NOT ${leadPlansDirectly ? "plan" : "dispatch Plan"}. Do NOT write plan.md or .complete.
|
|
2656
|
-
2. Return a trivial verdict: one-sentence reason, the recommended direct
|
|
2657
|
-
action, and an explicit statement that no downstream stage (/gh-implement,
|
|
2658
|
-
/gh-swe-pipeline stage 3) may run. A trivial ask must never pay planning
|
|
2659
|
-
cost as ritual.
|
|
2660
|
-
|
|
2661
|
-
## Hard bounds
|
|
2662
|
-
|
|
2663
|
-
- Maximum tasks: 20.
|
|
2664
|
-
- Maximum parallel groups: 5.
|
|
2665
|
-
- Keep planner input well under the 200K window (target at most around 150K tokens of context) so there is headroom for reasoning and output. This is self-discipline, not an enforced cap: prefer the compact brief and read full sections only on demand.
|
|
2666
|
-
- Advisory budget: keep ${leadPlansDirectly ? "planning" : "the Plan dispatch"} under ~5 minutes; the Task tool enforces no wall-clock. At most 2 bounded ${leadPlansDirectly ? "self-review passes" : "follow-up rounds to the same Plan dispatch"} for gaps.
|
|
2667
|
-
|
|
2668
|
-
## Procedure (non-trivial work only)
|
|
2669
|
-
|
|
2670
|
-
1. Ingest context.
|
|
2671
|
-
- Read context.compact.md fully.
|
|
2672
|
-
- Read the evidence table and residual unknowns from context.md.
|
|
2673
|
-
- Identify acceptance criteria, constraints, integration seams, and forbidden changes.
|
|
2674
|
-
|
|
2675
|
-
2. Compose the ${leadPlansDirectly ? "plan" : "Plan dispatch brief"}. Include every item below; a vague brief
|
|
2676
|
-
produces a vague plan, and a vague plan fails downstream:
|
|
2677
|
-
- Ask summary and acceptance criteria (or candidates where ambiguous).
|
|
2678
|
-
- Constraints, integration seams, and forbidden changes.
|
|
2679
|
-
- Context pointers: context.compact.md path, the evidence table and
|
|
2680
|
-
residual sections of context.md, plus the freshness stamp.
|
|
2681
|
-
- Required output shape: objective; architectural invariants; interface
|
|
2682
|
-
contracts; execution steps with files touched plus a done condition per
|
|
2683
|
-
step; acceptance commands with the observable pass result; critical files
|
|
2684
|
-
as file:line; a blind-spot table tagging each risk executable-checkable
|
|
2685
|
-
or judgment-only (wrong-spec, root-cause, integration, regression,
|
|
2686
|
-
review, concurrency or merge, missing-test); open questions as options
|
|
2687
|
-
with a recommendation; cost estimate (task count, parallel groups,
|
|
2688
|
-
context tokens).
|
|
2689
|
-
- Plan-mode rule: plan and acceptance criteria only, no implementation
|
|
2690
|
-
file edits.
|
|
2691
|
-
- Permission to use Explore ${leadPlansDirectly ? "per the lead delegation graph" : "and reviewer per the delegation graph"}.
|
|
2692
|
-
- ${briefProseNote}
|
|
2693
|
-
- Demand compact output: file:line plus one-line purposes, never pasted
|
|
2694
|
-
source blocks. ${compactionNote}
|
|
2695
|
-
- Advisory ~5 minute budget.
|
|
2696
|
-
|
|
2697
|
-
${dispatchStep}
|
|
2698
|
-
|
|
2699
|
-
${validateStep}
|
|
2700
|
-
|
|
2701
|
-
${persistStepNumber}. Persist the validated plan to .github-router/plans/<slug>/plan.md.
|
|
2702
|
-
- Ask summary and user-blessed acceptance criteria.
|
|
2703
|
-
- Blind-spot table with executable-checkable or judgment-only tags.
|
|
2704
|
-
- Ordered task list with ids, files, dependencies, parallel groups, acceptance criteria, verification commands, rollback concerns, and estimated context tokens.
|
|
2705
|
-
- Open questions and user answers.
|
|
2706
|
-
- Cost estimate: task count, parallel groups, and context tokens.
|
|
2707
|
-
- Residual risks.
|
|
2708
|
-
${advisorStep}${checkpointStepNumber}. Checkpoint with the user and wait for explicit approval.
|
|
2709
|
-
- Present the goal, acceptance criteria, task-to-group map, per-task blind spot killed, residual risks, and cost estimate.
|
|
2710
|
-
- If the user rejects scope or cost, downshift to the smallest plan that kills the important blind spots.
|
|
2711
|
-
- Do not proceed to implementation without approval.
|
|
2712
|
-
- Write .github-router/plans/<slug>/.complete ONLY after explicit user approval, recording the approval in the marker. A plan without an approval record is NOT complete, and no downstream stage (/gh-implement, /gh-swe-pipeline stage 3) may start without it.
|
|
2713
|
-
|
|
2714
|
-
## Return format
|
|
2715
|
-
|
|
2716
|
-
Return:
|
|
2717
|
-
|
|
2718
|
-
- Trivial exit: yes with the recommended direct action and no plan file, or no with the plan below.
|
|
2719
|
-
- Plan file: path to the durable plan.md.
|
|
2720
|
-
- Task count and parallel groups.
|
|
2721
|
-
- Open questions and user answers.
|
|
2722
|
-
- Cost estimate.
|
|
2723
|
-
- Residual risks and next action (implementation only after approval).
|
|
2724
|
-
|
|
2725
|
-
## Non-goals
|
|
2726
|
-
|
|
2727
|
-
- Do not ${leadPlansDirectly ? "plan a trivial ask" : "dispatch Plan for a trivial ask"}; exit with a trivial verdict instead.
|
|
2728
|
-
- Do not edit implementation files while planning; in plan mode, produce the plan and acceptance criteria only.
|
|
2729
|
-
- Do not present judgment-only conclusions as executable guarantees.
|
|
2730
|
-
- Do not hide open unknowns because the plan looks complete.
|
|
2731
|
-
- Do not start planning while gather-context Explore subagents still run; record them superseded first.
|
|
2732
|
-
- Do not dispatch implementation subagents from planning: stages never overlap.
|
|
2733
|
-
`
|
|
2734
|
-
};
|
|
2735
|
-
}
|
|
2736
|
-
buildPlanSkill(true);
|
|
2737
|
-
//#endregion
|
|
2738
2769
|
//#region src/lib/injected-skills/research-skill.ts
|
|
2739
2770
|
function buildResearchSkill(searchEnabled, bluebirdEnabled = false) {
|
|
2740
2771
|
return {
|
|
@@ -3184,6 +3215,7 @@ const PIPELINE_SKILL_PROFILES = [
|
|
|
3184
3215
|
"cheap1m",
|
|
3185
3216
|
"cheapest",
|
|
3186
3217
|
"cheapest2",
|
|
3218
|
+
"cheaplocal",
|
|
3187
3219
|
"balanced",
|
|
3188
3220
|
"balanced2",
|
|
3189
3221
|
"local",
|
|
@@ -3473,4 +3505,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
|
|
|
3473
3505
|
//#endregion
|
|
3474
3506
|
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 };
|
|
3475
3507
|
|
|
3476
|
-
//# sourceMappingURL=attribution-settings-
|
|
3508
|
+
//# sourceMappingURL=attribution-settings-zoBxw08y.js.map
|