github-router 0.3.323 → 0.3.324

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/{attribution-settings-CX-kIrT8.js → attribution-settings-sTUXqFzx.js} +366 -9
  2. package/dist/attribution-settings-sTUXqFzx.js.map +1 -0
  3. package/dist/browser-ext/manifest.json +1 -1
  4. package/dist/{claude-Cq1xGzbI.js → claude-Bni6m56W.js} +5 -5
  5. package/dist/{claude-Cq1xGzbI.js.map → claude-Bni6m56W.js.map} +1 -1
  6. package/dist/{codex-INt1hc_5.js → codex-DAnu246m.js} +2 -2
  7. package/dist/{codex-INt1hc_5.js.map → codex-DAnu246m.js.map} +1 -1
  8. package/dist/hooks.mjs +26 -0
  9. package/dist/hooks.sha256 +1 -1
  10. package/dist/{internal-first-mate-guard-mvfZal_M.js → internal-first-mate-guard-Cj_g7RFr.js} +2 -2
  11. package/dist/{internal-first-mate-guard-mvfZal_M.js.map → internal-first-mate-guard-Cj_g7RFr.js.map} +1 -1
  12. package/dist/{internal-first-mate-guard-Dvd1vZ4l.js → internal-first-mate-guard-ZqPHrYlh.js} +1 -1
  13. package/dist/{internal-worker-guard-BSoS4wzV.js → internal-worker-guard-Dd14aDXQ.js} +2 -2
  14. package/dist/{internal-worker-guard-BSoS4wzV.js.map → internal-worker-guard-Dd14aDXQ.js.map} +1 -1
  15. package/dist/main.js +6 -6
  16. package/dist/{serve-TiUhvpVp.js → serve-BGGcy8Nq.js} +6 -5
  17. package/dist/serve-BGGcy8Nq.js.map +1 -0
  18. package/dist/{server-setup-CgbHmupe.js → server-setup-CZ3tEsgq.js} +53 -2
  19. package/dist/server-setup-CZ3tEsgq.js.map +1 -0
  20. package/dist/{start-DNzOFabp.js → start-XFIxMRkE.js} +2 -2
  21. package/dist/{start-DNzOFabp.js.map → start-XFIxMRkE.js.map} +1 -1
  22. package/dist/{worker-dispatch-DwS99DXz.js → worker-dispatch-CcQygiAA.js} +27 -1
  23. package/dist/{worker-dispatch-DwS99DXz.js.map → worker-dispatch-CcQygiAA.js.map} +1 -1
  24. package/package.json +1 -1
  25. package/dist/attribution-settings-CX-kIrT8.js.map +0 -1
  26. package/dist/serve-TiUhvpVp.js.map +0 -1
  27. package/dist/server-setup-CgbHmupe.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { Ln as BALANCED_PROFILE_NATIVE_AGENT_NAMES, Nn as oneMContextDisabled, Pn as withOneMSuffix, Rn as BALANCED_PROFILE_NATIVE_EFFORTS, Un as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, Wn as CHEAPEST_PROFILE_NATIVE_EFFORTS, Xn as CHEAP_PROFILE_NATIVE_EFFORTS, Yn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, a as buildAgentPrompt, fn as CONDENSED_OPERATING_SEQUENCE, l as maxPersonasFor, n as MCP_GROUPS, pn as DEFINITION_OF_GREATNESS, t as GROUP_META, u as personasFor } from "./peer-mcp-personas-DcAErb_d.js";
2
2
  import { a as isUnderClaudeConfigMirror, f as writeRuntimeFileSecure, t as PATHS } from "./paths-BnZwolac.js";
3
- import { C as CHEAP_REVIEWER_ALIAS_ID, S as CHEAP_PLAN_ALIAS_ID, _ as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, b as CHEAP_EXPLORE_ALIAS_ID, f as BALANCED_EXPLORE_ALIAS_ID, g as CHEAPEST_EXPLORE_ALIAS_ID, h as BALANCED_REVIEWER_ALIAS_ID, m as BALANCED_PLAN_ALIAS_ID, p as BALANCED_GENERAL_PURPOSE_ALIAS_ID, v as CHEAPEST_PLAN_ALIAS_ID, w as LUNA_SCOUT_ALIAS_ID, x as CHEAP_GENERAL_PURPOSE_ALIAS_ID, y as CHEAPEST_REVIEWER_ALIAS_ID } from "./server-setup-CgbHmupe.js";
3
+ import { C as CHEAP_REVIEWER_ALIAS_ID, S as CHEAP_PLAN_ALIAS_ID, _ as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, b as CHEAP_EXPLORE_ALIAS_ID, f as BALANCED_EXPLORE_ALIAS_ID, g as CHEAPEST_EXPLORE_ALIAS_ID, h as BALANCED_REVIEWER_ALIAS_ID, m as BALANCED_PLAN_ALIAS_ID, p as BALANCED_GENERAL_PURPOSE_ALIAS_ID, v as CHEAPEST_PLAN_ALIAS_ID, w as LUNA_SCOUT_ALIAS_ID, x as CHEAP_GENERAL_PURPOSE_ALIAS_ID, y as CHEAPEST_REVIEWER_ALIAS_ID } from "./server-setup-CZ3tEsgq.js";
4
4
  import { c as FAST_PROFILE_MODELS, d as FAST_PROFILE_NATIVE_MODELS, l as FAST_PROFILE_NATIVE_AGENT_NAMES, u as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-DmsyQQrw.js";
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-Bl7I_EOC.js";
6
6
  import "./self-invocation-opSXHEs0.js";
7
7
  import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-B-a5KUCL.js";
8
8
  import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-BIW0SRgs.js";
9
- import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-DwS99DXz.js";
9
+ import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-CcQygiAA.js";
10
10
  import consola from "consola";
11
11
  import path from "node:path";
12
12
  import { randomBytes } from "node:crypto";
@@ -2069,6 +2069,176 @@ Return a compact final checkpoint:
2069
2069
  `
2070
2070
  };
2071
2071
  //#endregion
2072
+ //#region src/lib/injected-skills/gather-context-skill.ts
2073
+ const GATHER_CONTEXT_SKILL = {
2074
+ name: "gh-gather-context",
2075
+ md: `---
2076
+ name: gh-gather-context
2077
+ description: Bounded context gathering for non-trivial asks: decomposes the ask, runs lexical code searches to identify relevant files, dispatches bounded parallel explore workers to gather evidence, stitches results into a freshness-stamped context brief plus a compact version. Use when grounded context is needed before planning or changing code.
2078
+ user-invocable: true
2079
+ ---
2080
+
2081
+ # gh-gather-context: bounded context gathering
2082
+
2083
+ Use this skill when a non-trivial ask needs grounded context before planning.
2084
+ All reasoning runs at the 200K default window: the lead and every explore
2085
+ worker use the Luna model at high effort with bare slugs (no 1M accounting).
2086
+ Output is a durable full brief plus a compact downstream version.
2087
+
2088
+ ## Hard bounds
2089
+
2090
+ - Maximum rounds: 3.
2091
+ - Maximum parallel explore workers per round: 6.
2092
+ - Maximum lexical searches per round: 10.
2093
+ - Maximum follow-up reads per round: 5.
2094
+ - Terminate at the first of saturation or a cap.
2095
+ - On cap-hit, return with open unknowns flagged as residual. Do not loop forever.
2096
+
2097
+ ## Evidence tags
2098
+
2099
+ Use these exact tags on every finding and claim:
2100
+
2101
+ - verified-executable: reproduced the symptom, ran the failing test, or ran a check that directly proves the claim. This is the only deterministic confidence tag.
2102
+ - verified-source: read the actual source, config, logs, docs, or primary artifact and cited the relevant locations. This is model-mediated and can still be wrong.
2103
+ - cross-lab-agreed: a different-lab reviewer independently agreed with the claim. This reduces correlated blind spots but is advisory.
2104
+ - unverified: plausible but not confirmed; treat as residual risk.
2105
+
2106
+ ## Procedure
2107
+
2108
+ 1. Restate the ask and define the research target.
2109
+ - Identify whether this is a bug, feature, refactor, incident, or design question.
2110
+ - Name the expected downstream consumer: planner, implementer, or user.
2111
+
2112
+ 2. Decompose the ask into searchable entities.
2113
+ - Extract symbols, filenames, error strings, routes, flags, config keys, and types.
2114
+ - Define what must be true for a correct implementation.
2115
+
2116
+ 3. Run lexical search first, in parallel, in a single turn.
2117
+ - Use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
2118
+ - Use mcp__search__code semantically only to find concepts, then refine to lexical.
2119
+ - Use git log and git blame when authorship, regression timing, or intent matters.
2120
+ - Use mcp__search__web for upstream APIs, package behavior, protocol docs, or public issues.
2121
+
2122
+ 4. Decompose into bounded explore workers.
2123
+ - Cluster search results into at most 6 coherent investigation areas.
2124
+ - For each area, write a narrow brief: the specific question, the expected artifact, and the files to focus on.
2125
+ - Dispatch ALL explore workers in a single turn via the Agent tool (subagent_type worker-explore). Each runs read-only at the 200K default window and returns a summary with an evidence table and file:line citations. Pass maxWallClockMs 180000 on every worker call so a hung worker is reaped after 3 minutes instead of blocking its slot.
2126
+ - Keep worker results summarized; do not paste every detail into the main context.
2127
+
2128
+ 5. Stitch and verify.
2129
+ - Collect all explore results and deduplicate file references.
2130
+ - Run at most 5 targeted follow-up reads for gaps, in parallel.
2131
+ - Dispatch the worker-review subagent (via the Agent tool, maxWallClockMs 300000) to confirm source-reading for load-bearing claims.
2132
+ - Form a root-cause hypothesis or integration map, and state what would falsify it.
2133
+
2134
+ 6. Run a completeness pass.
2135
+ - Ask: what do we still not know?
2136
+ - Ask: what claim, if false, would break the conclusion?
2137
+ - Ask: have we checked primary sources for every load-bearing claim?
2138
+ - If no material unknowns remain and the root cause is at least verified-source, stop for saturation.
2139
+
2140
+ 7. Persist two outputs under .github-router/context/<slug>/.
2141
+ - context.md: full brief with the ask decomposition, searches run, worker reports, evidence table, hypothesis, freshness metadata (HEAD commit, working-tree diff hash, timestamp, repo path), residuals, and full citations.
2142
+ - context.compact.md: downstream consumable with a one-paragraph ask summary, key files with one-line purposes, critical constraints (APIs, types, patterns, forbidden changes), integration seams, and residual risks.
2143
+ - Downstream phases read by pointer and check freshness instead of re-injecting the whole brief.
2144
+
2145
+ ## Return format
2146
+
2147
+ Return a compact brief, not the whole dump:
2148
+
2149
+ - Context files: paths to context.md and context.compact.md.
2150
+ - Freshness: HEAD commit, diff hash, timestamp.
2151
+ - Termination: saturated or cap-hit; if cap-hit, name the cap.
2152
+ - Summary: 3-8 bullets with confidence tags.
2153
+ - Evidence table: claim, tag, primary source or command, reviewer status.
2154
+ - Residual unknowns: explicit list, or none.
2155
+ - Downstream guidance: recommended next action and what must be rechecked if the tree changes.
2156
+
2157
+ ## Non-goals
2158
+
2159
+ - Do not present verified-source or cross-lab-agreed as deterministic.
2160
+ - Do not hide open unknowns because the answer looks useful.
2161
+ - Do not keep searching after the cap.
2162
+ - Do not paste the entire persisted brief into later turns unless the user asks.
2163
+ `
2164
+ };
2165
+ //#endregion
2166
+ //#region src/lib/injected-skills/implement-skill.ts
2167
+ const IMPLEMENT_SKILL = {
2168
+ name: "gh-implement",
2169
+ md: `---
2170
+ name: gh-implement
2171
+ description: Parallel implementation of an approved plan using bounded Luna workers with isolated worktrees: each worker implements its task, self-tests, self-reviews, and returns a patch; the lead aggregates into a unified diff, runs staged review, and returns the final diff with a report. Use when a user-approved plan is ready for execution.
2172
+ user-invocable: true
2173
+ ---
2174
+
2175
+ # gh-implement: bounded parallel implementation with staged review
2176
+
2177
+ Use this skill only after /gh-plan produced a user-approved plan.md. All
2178
+ implementation runs at the 200K default window: the lead and every task worker
2179
+ use the Luna model at max effort with bare slugs (no 1M accounting). Review is
2180
+ staged: a Luna max pass first, then a Sol medium pass only for major issues.
2181
+
2182
+ ## Hard bounds
2183
+
2184
+ - Maximum concurrent implement workers: 8.
2185
+ - Maximum retries per task: 2.
2186
+ - Maximum review-fix cycles: 2.
2187
+ - Worktrees are auto-removed on success and retained on failure for debugging.
2188
+
2189
+ ## Procedure
2190
+
2191
+ 1. Parse the approved plan.
2192
+ - Read plan.md fully.
2193
+ - Group tasks by parallelGroup; order groups by dependency.
2194
+ - For each group, prepare an isolated git worktree per task plus a narrow task brief (task spec, relevant context excerpt, acceptance criteria, verification commands).
2195
+
2196
+ 2. Dispatch bounded implement workers, one parallel batch per group.
2197
+ - Dispatch ALL tasks in the group in a single turn via the Agent tool (subagent_type worker-implement, with worktree isolation, maxWallClockMs 600000 per task so a hung worker is reaped after 10 minutes instead of blocking its slot).
2198
+ - Each worker runs at the 200K default window and must self-contain its work:
2199
+ a. Implement the change.
2200
+ b. Run the task verification commands (tests, typecheck, lint).
2201
+ c. Self-review against the acceptance criteria.
2202
+ d. Fix any self-found issues (at most 2 internal fix cycles).
2203
+ e. Return the patch plus test results and self-review notes.
2204
+ - Do NOT dispatch the same task twice (no dedup exists); a retry is a new dispatch only after a recorded failure.
2205
+ - For a big artifact, have the worker write it to a file and return the path.
2206
+
2207
+ 3. Aggregate and validate.
2208
+ - Collect all patches and apply them sequentially to the main worktree (or merge the worktrees).
2209
+ - Run the full relevant validation: test suite, typecheck, and lint.
2210
+ - If any task fails validation, route it back to an implement worker (at most 2 retries per task). If it still fails, checkpoint with the failure as residual risk instead of pretending it is solved.
2211
+
2212
+ 4. Run staged review.
2213
+ - Pass 1 (always): dispatch the worker-review subagent (via the Agent tool, maxWallClockMs 300000) over the unified diff for correctness against acceptance criteria, code quality and consistency, security and performance regressions, and test coverage. Categorize findings as minor (style, nits) or major (logic, architecture).
2214
+ - If pass 1 finds no major issues, finish here.
2215
+ - Pass 2 (major issues only): dispatch a fix worker (via the Agent tool, maxWallClockMs 300000) at the 200K default window using the Sol model at medium effort with the flagged areas, the failing checks, and the pass-1 findings. It returns fixed patches or an explicit escalate-to-user with reasons.
2216
+
2217
+ 5. Finalize.
2218
+ - Apply any review fixes and re-run full validation.
2219
+ - Produce the unified diff for the whole plan.
2220
+ - Write .github-router/plans/<slug>/implementation-report.md with task completion status, test results summary, review findings and resolutions, the final diff path, and residual risks.
2221
+
2222
+ ## Return format
2223
+
2224
+ Return:
2225
+
2226
+ - Unified diff path.
2227
+ - Implementation report path.
2228
+ - Task completion status per task id.
2229
+ - Test, typecheck, and lint results.
2230
+ - Review summary (pass 1 findings; pass 2 findings and fixes if used).
2231
+ - Final residual risks and next action.
2232
+
2233
+ ## Non-goals
2234
+
2235
+ - Do not start without a user-approved plan.md.
2236
+ - Do not serialize work that has no data dependency; independent tasks in a group run concurrently.
2237
+ - Do not nest workflow invocations: workers are internal sessions and must not re-invoke /gh-implement.
2238
+ - Do not claim completeness when retries or review cycles are exhausted with open failures.
2239
+ `
2240
+ };
2241
+ //#endregion
2072
2242
  //#region src/lib/injected-skills/orchestrate-skill.ts
2073
2243
  const ORCHESTRATE_SKILL = {
2074
2244
  name: "gh-orchestrate",
@@ -2207,6 +2377,94 @@ Return:
2207
2377
  `
2208
2378
  };
2209
2379
  //#endregion
2380
+ //#region src/lib/injected-skills/plan-skill.ts
2381
+ const PLAN_SKILL = {
2382
+ name: "gh-plan",
2383
+ md: `---
2384
+ name: gh-plan
2385
+ description: Holistic planning from gathered context: ingests the context brief, creates a scoped modular ordered implementation plan with explicit tasks for cheap implementation workers, surfaces open questions for user approval, and persists plan.md. Use when a non-trivial change needs a reviewed plan before implementation.
2386
+ user-invocable: true
2387
+ ---
2388
+
2389
+ # gh-plan: holistic planning for cheap implementation
2390
+
2391
+ Use this skill after /gh-gather-context (or when equivalent context is already
2392
+ available) and before any implementation. The planner runs at the 200K default
2393
+ window using the Sol model at medium effort. The plan must be scoped, modular,
2394
+ non-overlapping, and ordered, with enough detail for Luna implementation
2395
+ workers to execute each task in isolation. User approval is mandatory before
2396
+ implementation.
2397
+
2398
+ ## Prerequisites
2399
+
2400
+ - A freshness-stamped context brief from /gh-gather-context, or equivalent context.
2401
+ - Read context.compact.md first; read context.md sections on demand (residual unknowns, evidence table).
2402
+
2403
+ ## Hard bounds
2404
+
2405
+ - Maximum tasks: 20.
2406
+ - Maximum parallel groups: 5.
2407
+ - 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.
2408
+
2409
+ ## Procedure
2410
+
2411
+ 1. Ingest context.
2412
+ - Read context.compact.md fully.
2413
+ - Read the evidence table and residual unknowns from context.md.
2414
+ - Identify acceptance criteria, constraints, integration seams, and forbidden changes.
2415
+
2416
+ 2. Build a blind-spot table before decomposing.
2417
+ - Wrong-spec risk: judgment-only, mitigated only by user-blessed acceptance criteria.
2418
+ - Root-cause risk: executable-checkable if reproduced or covered by a failing test; otherwise advisory.
2419
+ - Integration risk: usually source-verified plus tests where possible.
2420
+ - Regression risk: executable-checkable when tests, typecheck, or lint cover it.
2421
+ - Review risk: advisory cross-lab review reduces correlated blind spots.
2422
+ - Concurrency or merge risk: source-verified and sometimes executable-checkable.
2423
+ - Missing-test risk: executable-checkable only after a test exists and runs.
2424
+ - Tag every blind spot as executable-checkable or judgment-only.
2425
+
2426
+ 3. Decompose into minimal safe increments.
2427
+ - Each task touches a single file or a tightly coupled file group.
2428
+ - Each task states input artifacts, output artifact, acceptance criteria, verification commands, and rollback concern.
2429
+ - Order tasks by dependency (topological sort); tasks with no data dependency share a parallel group.
2430
+ - Keep each task small enough for one Luna worker at the 200K window (target at most 50K context tokens of relevant files per task).
2431
+ - If the ask needs discovery follow-ups, delegate them to worker-explore background subagents (via the Agent tool, maxWallClockMs 180000) rather than bloating the plan.
2432
+
2433
+ 4. Surface open questions before finalizing.
2434
+ - Ask about ambiguous acceptance criteria, design decisions with multiple valid approaches, risk tolerance, and test strategy.
2435
+ - Present a short candidate list for confirmation where possible.
2436
+
2437
+ 5. Persist the plan to .github-router/plans/<slug>/plan.md.
2438
+ - Ask summary and user-blessed acceptance criteria.
2439
+ - Blind-spot table with executable-checkable or judgment-only tags.
2440
+ - Ordered task list with ids, files, dependencies, parallel groups, acceptance criteria, verification commands, rollback concerns, and estimated context tokens.
2441
+ - Open questions and user answers.
2442
+ - Cost estimate: task count, parallel groups, and context tokens.
2443
+ - Residual risks.
2444
+
2445
+ 6. Checkpoint with the user and wait for explicit approval.
2446
+ - Present the goal, acceptance criteria, task-to-group map, per-task blind spot killed, residual risks, and cost estimate.
2447
+ - If the user rejects scope or cost, downshift to the smallest plan that kills the important blind spots.
2448
+ - Do not proceed to implementation without approval.
2449
+
2450
+ ## Return format
2451
+
2452
+ Return:
2453
+
2454
+ - Plan file: path to the durable plan.md.
2455
+ - Task count and parallel groups.
2456
+ - Open questions and user answers.
2457
+ - Cost estimate.
2458
+ - Residual risks and next action (implementation only after approval).
2459
+
2460
+ ## Non-goals
2461
+
2462
+ - Do not edit implementation files while planning; in plan mode, produce the plan and acceptance criteria only.
2463
+ - Do not present judgment-only conclusions as executable guarantees.
2464
+ - Do not hide open unknowns because the plan looks complete.
2465
+ `
2466
+ };
2467
+ //#endregion
2210
2468
  //#region src/lib/injected-skills/research-skill.ts
2211
2469
  const RESEARCH_SKILL = {
2212
2470
  name: "gh-research",
@@ -2378,6 +2636,88 @@ The dispatcher calls the worker once and relays its result verbatim.
2378
2636
  `
2379
2637
  };
2380
2638
  //#endregion
2639
+ //#region src/lib/skill-model-contract.ts
2640
+ /**
2641
+ * Universal skill model contract for the `/gh-gather-context`, `/gh-plan`,
2642
+ * and `/gh-implement` pipeline skills.
2643
+ *
2644
+ * ALL roles run at the 200K DEFAULT context window (bare slugs, no `[1m]`
2645
+ * accounting bracket) on every profile. This module is deliberately
2646
+ * dependency-free so profile contracts, launch validation, worker dispatch,
2647
+ * and the injected skill bodies can all import the same literals without
2648
+ * cycles.
2649
+ *
2650
+ * Model choices (per pipeline design):
2651
+ * - gatherContext lead + explore agents: Luna, high effort
2652
+ * - plan lead: Sol, medium effort
2653
+ * - implement lead + task agents: Luna, max effort
2654
+ * - review pass 1: Luna, max effort
2655
+ * - review pass 2 (major issues only): Sol, medium effort
2656
+ */
2657
+ const SKILL_LUNA_MODEL_ID = "gpt-5.6-luna";
2658
+ const SKILL_SOL_MODEL_ID = "gpt-5.6-sol";
2659
+ Object.freeze({
2660
+ gatherContext: Object.freeze({
2661
+ lead: SKILL_LUNA_MODEL_ID,
2662
+ exploreAgent: SKILL_LUNA_MODEL_ID,
2663
+ leadEffort: "high",
2664
+ agentEffort: "high"
2665
+ }),
2666
+ plan: Object.freeze({
2667
+ lead: SKILL_SOL_MODEL_ID,
2668
+ leadEffort: "medium"
2669
+ }),
2670
+ implement: Object.freeze({
2671
+ lead: SKILL_LUNA_MODEL_ID,
2672
+ taskAgent: SKILL_LUNA_MODEL_ID,
2673
+ leadEffort: "max",
2674
+ agentEffort: "max"
2675
+ }),
2676
+ review: Object.freeze({
2677
+ pass1: Object.freeze({
2678
+ model: SKILL_LUNA_MODEL_ID,
2679
+ effort: "max"
2680
+ }),
2681
+ pass2: Object.freeze({
2682
+ model: SKILL_SOL_MODEL_ID,
2683
+ effort: "medium"
2684
+ })
2685
+ })
2686
+ });
2687
+ Object.freeze({
2688
+ gatherContext: Object.freeze({
2689
+ maxRounds: 3,
2690
+ maxExploreAgentsPerRound: 6,
2691
+ maxLexicalSearchesPerRound: 10,
2692
+ maxFollowUpReadsPerRound: 5
2693
+ }),
2694
+ plan: Object.freeze({
2695
+ maxTasks: 20,
2696
+ maxParallelGroups: 5
2697
+ }),
2698
+ implement: Object.freeze({
2699
+ maxConcurrentAgents: 8,
2700
+ maxRetriesPerTask: 2,
2701
+ maxReviewFixCycles: 2
2702
+ })
2703
+ });
2704
+ /**
2705
+ * Profiles that receive the pipeline skills. Every pinned profile gets
2706
+ * them; `standard` is intentionally excluded (it keeps the existing
2707
+ * research/orchestrate/worker surface).
2708
+ */
2709
+ const PIPELINE_SKILL_PROFILES = [
2710
+ "fast",
2711
+ "max",
2712
+ "cheap",
2713
+ "cheap1m",
2714
+ "cheapest",
2715
+ "balanced"
2716
+ ];
2717
+ function isPipelineSkillProfile(profileId) {
2718
+ return PIPELINE_SKILL_PROFILES.includes(profileId);
2719
+ }
2720
+ //#endregion
2381
2721
  //#region src/lib/injected-skills/artifact-review-skill.ts
2382
2722
  function buildArtifactReviewSkill(peersKey = "peers") {
2383
2723
  const toolPrefix = `mcp__${peersKey}__artifact_`;
@@ -2561,7 +2901,7 @@ function buildOperatingDefaultsDirective(opts = {}) {
2561
2901
  if (opts.profile === "max") {
2562
2902
  const peersKey = opts.peersKey ?? opts.groupKeys?.peers ?? "peers";
2563
2903
  const artifactClause = opts.artifactAvailable ? ` Live human review is available in the artifact panel via \`mcp__${peersKey}__artifact_*\`.` : "";
2564
- 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\nMax launch profile. The lead owns the outcome. Start with direct repository or runtime evidence. Handle narrow, obvious, surgical, and single-command work directly; delegate a bounded workstream when it is broad, slow, context-heavy, or benefits from a genuinely independent perspective. " + MAX_PARALLELISM_RULE + " Brief each role with the desired outcome, relevant context, constraints, expected evidence, and verification. Use the roster as complementary capabilities, never as a required Explore → Plan → implement → review sequence. Avoid overlapping assignments and do not ask several models the same generic question. Synthesize results against the repository and executable checks: model agreement is not verification. Use one fresh-context peer only when a consequential judgment remains after direct checks; use the coordinator only when several distinct lenses could change the decision. Advisor is optional, non-binding counsel for one focused consequential uncertainty that evidence and the appropriate roles cannot settle; it has no approval or workflow authority, and a further consultation requires materially new or conflicting evidence." + artifactClause;
2904
+ 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\nMax launch profile. The lead owns the outcome. Start with direct repository or runtime evidence. Handle narrow, obvious, surgical, and single-command work directly; delegate a bounded workstream when it is broad, slow, context-heavy, or benefits from a genuinely independent perspective. " + MAX_PARALLELISM_RULE + " Brief each role with the desired outcome, relevant context, constraints, expected evidence, and verification. Use the roster as complementary capabilities, never as a required Explore → Plan → implement → review sequence. Avoid overlapping assignments and do not ask several models the same generic question. Synthesize results against the repository and executable checks: model agreement is not verification. Use one fresh-context peer only when a consequential judgment remains after direct checks; use the coordinator only when several distinct lenses could change the decision. Advisor is optional, non-binding counsel for one focused consequential uncertainty that evidence and the appropriate roles cannot settle; it has no approval or workflow authority, and a further consultation requires materially new or conflicting evidence." + artifactClause + "\n\nPipeline skills (all 200K default context). For non-trivial changes, run in order: (1) `/gh-gather-context` BEFORE planning when grounded context is needed: it decomposes the ask, runs lexical search, fans out to bounded Luna-high explore workers, and writes context.md plus context.compact.md; (2) `/gh-plan` AFTER context and BEFORE implementation: it ingests the context brief with Sol-medium, produces a scoped modular ordered plan.md with explicit tasks for Luna workers, surfaces open questions, and waits for user approval; (3) `/gh-implement` AFTER plan approval: it runs bounded parallel Luna-max task workers in isolated worktrees (each self-tests and self-reviews), aggregates a unified diff, and runs staged review (Luna max, then Sol medium for major issues only). Skip the pipeline for trivial surgical work. Never implement without an approved plan.";
2565
2905
  }
2566
2906
  if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest" || opts.profile === "balanced") {
2567
2907
  const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
@@ -2582,7 +2922,9 @@ ${profileLabel} profile runtime wiring is unavailable. Work directly, use only t
2582
2922
  const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated autonomous browsing tasks through \`mcp__${workersKey}__browse\`.` : "";
2583
2923
  const artifactClause = opts.artifactAvailable ? ` \`mcp__${peersKey}__artifact_*\` provides human review in the artifact panel with auto-open on plan completion.` : "";
2584
2924
  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).` : "";
2585
- 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" + (isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly. ` + buildNativeReachClauses(opts) + ". Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` may be used for discovery spanning more than a couple of files; `Plan` for sequencing with complex interfaces or acceptance criteria; `General-Purpose` for mixed multi-step execution; `reviewer` for behavior-changing or risk-sensitive changes. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n" : `${profileLabel} launch profile. The lead coordinates execution across specialized native roles: ` + buildNativeReachClauses(opts) + ". In plan mode or when designing changes with complex sequencing, interface contracts, or acceptance criteria, delegate architectural planning to `Plan` (in plan mode, produce the plan and acceptance criteria; do not edit files). Phase pipeline (budget gather, expensive plan, budget execution, expensive verification). GATHER: delegate to `Explore` instead of exploring yourself. For any question spanning more than a couple of files, launch one or more `Explore` subagents in parallel with scoped evidence questions and let them return file:line citations; read directly only the small subset you must touch to decide or edit. `Plan` follows the same rule when it needs repository facts. PLAN: `Plan` produces handoff-ready steps (ordered, file:line, done conditions, acceptance criteria) for a `General-Purpose` executor that cannot see its reasoning; `Plan` may consult Oracle on unresolved trade-offs and reports any remaining gap to the lead. EXECUTE: delegate mixed multi-step work and Plan handoffs to `General-Purpose` in a fresh context to preserve lead context; brief with outcome, constraints, files in scope, and verification. VERIFY: after behavior-changing, cross-boundary, or risk-sensitive implementation, run relevant build/tests then invoke `reviewer` before declaring done. Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` is cheap and may be launched in parallel across independent discovery questions. Send independent subagent calls in parallel within a single turn. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n") + `Consultation guidance: Follow an evidence-first escalation ladder. Direct empirical evidence (search, code, tests, builds) settles factual questions first. Advisor is an optional, non-binding, lead-only transcript-aware sounding board for trajectory guidance or framing checks (direction, not dictation), and never use it for routine progress, waiting, directly verifiable facts, or completion ritual. \`mcp__${peersKey}__oracle\` is ${oracleDescriptor}, an expert consultant available to the lead and \`Plan\`, preferred over advisor for difficult conceptual, algorithmic, spec/protocol, or architectural tradeoffs evaluated in a self-contained brief; \`reviewer\` and other subagents cannot call Oracle. \`Plan\` may consult Oracle on unresolved trade-offs, and reports any remaining tie-breaking gap to the lead.${astraClause} ` + searchGuidance + `\`mcp__${searchKey}__web\` provides citable sources.${browserClause}${workerBrowseClause}${artifactClause}\n\nVerify claims with concrete repository evidence and tests before declaring work done. User instructions outrank delegation triggers. Stop named teammates when finished.`;
2925
+ 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" + (isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly. ` + buildNativeReachClauses(opts) + ". Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` may be used for discovery spanning more than a couple of files; `Plan` for sequencing with complex interfaces or acceptance criteria; `General-Purpose` for mixed multi-step execution; `reviewer` for behavior-changing or risk-sensitive changes. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n" : `${profileLabel} launch profile. The lead coordinates execution across specialized native roles: ` + buildNativeReachClauses(opts) + ". In plan mode or when designing changes with complex sequencing, interface contracts, or acceptance criteria, delegate architectural planning to `Plan` (in plan mode, produce the plan and acceptance criteria; do not edit files). Phase pipeline (budget gather, expensive plan, budget execution, expensive verification). GATHER: delegate to `Explore` instead of exploring yourself. For any question spanning more than a couple of files, launch one or more `Explore` subagents in parallel with scoped evidence questions and let them return file:line citations; read directly only the small subset you must touch to decide or edit. `Plan` follows the same rule when it needs repository facts. PLAN: `Plan` produces handoff-ready steps (ordered, file:line, done conditions, acceptance criteria) for a `General-Purpose` executor that cannot see its reasoning; `Plan` may consult Oracle on unresolved trade-offs and reports any remaining gap to the lead. EXECUTE: delegate mixed multi-step work and Plan handoffs to `General-Purpose` in a fresh context to preserve lead context; brief with outcome, constraints, files in scope, and verification. VERIFY: after behavior-changing, cross-boundary, or risk-sensitive implementation, run relevant build/tests then invoke `reviewer` before declaring done. Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` is cheap and may be launched in parallel across independent discovery questions. Send independent subagent calls in parallel within a single turn. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n") + `Consultation guidance: Follow an evidence-first escalation ladder. Direct empirical evidence (search, code, tests, builds) settles factual questions first. Advisor is an optional, non-binding, lead-only transcript-aware sounding board for trajectory guidance or framing checks (direction, not dictation), and never use it for routine progress, waiting, directly verifiable facts, or completion ritual. \`mcp__${peersKey}__oracle\` is ${oracleDescriptor}, an expert consultant available to the lead and \`Plan\`, preferred over advisor for difficult conceptual, algorithmic, spec/protocol, or architectural tradeoffs evaluated in a self-contained brief; \`reviewer\` and other subagents cannot call Oracle. \`Plan\` may consult Oracle on unresolved trade-offs, and reports any remaining tie-breaking gap to the lead.${astraClause} ` + searchGuidance + `\`mcp__${searchKey}__web\` provides citable sources.${browserClause}${workerBrowseClause}${artifactClause}\n\nPipeline skills (all 200K default context). For non-trivial changes, run in order: (1) \`/gh-gather-context\` BEFORE planning when grounded context is needed: it decomposes the ask, runs lexical search, fans out to bounded Luna-high explore workers, and writes context.md plus context.compact.md; (2) \`/gh-plan\` AFTER context and BEFORE implementation: it ingests the context brief with Sol-medium, produces a scoped modular ordered plan.md with explicit tasks for Luna workers, surfaces open questions, and waits for user approval; (3) \`/gh-implement\` AFTER plan approval: it runs bounded parallel Luna-max task workers in isolated worktrees (each self-tests and self-reviews), aggregates a unified diff, and runs staged review (Luna max, then Sol medium for major issues only). Skip the pipeline for trivial surgical work. Never implement without an approved plan.
2926
+
2927
+ Verify claims with concrete repository evidence and tests before declaring work done. User instructions outrank delegation triggers. Stop named teammates when finished.`;
2586
2928
  }
2587
2929
  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.";
2588
2930
  }
@@ -2593,7 +2935,7 @@ ${profileLabel} profile runtime wiring is unavailable. Work directly, use only t
2593
2935
  const OPERATING_DEFAULTS_DIRECTIVE = buildOperatingDefaultsDirective();
2594
2936
  const STANDARD_OPERATING_DEFAULTS_DIGEST = "## 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\nDelegate when the work is WIDE (many files or sources to sweep) or SLOW and you need only the conclusion, to protect the main thread's finite context and keep it free for reasoning and interacting with the user; prefer parallel delegation for independent work. Do NOT delegate merely because a sub-question is separable: a narrow, deep question whose value is file:line fidelity loses exactly that through a summarization layer, and one answerable in a single command is cheaper done directly. Do trivial, surgical, and last-mile work yourself. Stop a named teammate once you are done with it: it persists for follow-ups, its idle notice means available rather than finished, and nothing reaps it for you.\n\nVerify, do not assert. Run the code, read the file, check the exit code. A claim in prose is worth nothing against state you did not check, and a check that cannot fail proves nothing. Reproduce a bug end to end, the way a real user hits it, before fixing it. Fix a lint error, failing test, or flake the moment you see it, whoever introduced it, without letting it derail the task at hand. Prefer quality and long-term maintainability over development cost.\n\nVerification has a blind spot: a consequential recommendation, a design or trade-off call, or a hard-to-reverse decision that still turns on judgment among plausible alternatives once the direct evidence is in. That is where confabulation hides, so put it past a peer critic before you ship it and budget the wait even under delivery pressure. When a test, a run, a reproduction, or a search would settle the claim, settle it that way instead; a critic asked to re-derive what you can already prove is ritual, not review.\n\nThe agent roster, the tool surface, and the reasoning behind these defaults are in your CLAUDE.md project instructions. Read them when choosing HOW to work; the rules above apply without a lookup.";
2595
2937
  function buildOperatingDefaultsDigest(opts = {}) {
2596
- if (opts.profile === "max") 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\nMax launch profile. The lead owns the outcome. Start with direct repository or runtime evidence. Do narrow, obvious, surgical, and single-command work directly; delegate bounded work that is broad, slow, context-heavy, or independently valuable. " + MAX_PARALLELISM_RULE + " Give delegated workstreams non-overlapping scopes and state the outcome, constraints, evidence, and verification expected.\n\nSynthesize and verify: run the code, inspect outputs, and check tests. Agent count and agreement are not evidence. Use a fresh-context peer only for consequential judgment that remains after direct checks, and use the coordinator only when several distinct lenses could change the decision. Advisor is optional, non-binding, primary-lead-only counsel for one focused consequential uncertainty; it is not an approval or completion gate.";
2938
+ if (opts.profile === "max") 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\nMax launch profile. The lead owns the outcome. Start with direct repository or runtime evidence. Do narrow, obvious, surgical, and single-command work directly; delegate bounded work that is broad, slow, context-heavy, or independently valuable. " + MAX_PARALLELISM_RULE + " Give delegated workstreams non-overlapping scopes and state the outcome, constraints, evidence, and verification expected.\n\nPipeline skills (all 200K default): `/gh-gather-context` before planning when context is needed, `/gh-plan` before implementation (waits for user approval), `/gh-implement` after approval with bounded parallel workers and staged review. Skip for trivial work.\n\nSynthesize and verify: run the code, inspect outputs, and check tests. Agent count and agreement are not evidence. Use a fresh-context peer only for consequential judgment that remains after direct checks, and use the coordinator only when several distinct lenses could change the decision. Advisor is optional, non-binding, primary-lead-only counsel for one focused consequential uncertainty; it is not an approval or completion gate.";
2597
2939
  if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest" || opts.profile === "balanced") {
2598
2940
  const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
2599
2941
  const isCheapest = opts.profile === "cheapest";
@@ -2602,7 +2944,7 @@ function buildOperatingDefaultsDigest(opts = {}) {
2602
2944
  const oracleDescriptor = isCheapest ? "(GPT-5.6 Sol 200K/high, lead and Plan)" : isCheap || isBalanced ? "(Grok 4.6 200K/medium, lead and Plan)" : "(Opus 5 1M/high, lead and Plan)";
2603
2945
  const advisorDescriptor = isCheapest ? "(Gemini/high, lead-only)" : "(Sol/high, lead-only)";
2604
2946
  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).` : ".";
2605
- return "## Operating defaults (these layer with the user's direction and the domain's standards as addons: follow all three; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\n" + (isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly: use \`Explore\` for discovery spanning more than a couple of files, \`Plan\` in plan mode or for complex sequencing, \`General-Purpose\` for mixed multi-step execution, and \`reviewer\` for behavior-changing or risk-sensitive changes. Handle trivial and surgical edits directly. Stop named teammates when finished.\n\n` : `${profileLabel} launch profile. The lead coordinates execution across specialized roles: delegate broad discovery to \`Explore\` in parallel and do not sweep the repo yourself (read directly only files you will act on); delegate to \`Plan\` in plan mode or when structuring complex multi-step sequencing (\`Plan\` is an advisory planning capability, not an approval gate, and writes handoff-ready steps for \`General-Purpose\`); delegate mixed multi-step execution and Plan handoffs to \`General-Purpose\` in a fresh context; delegate to \`reviewer\` after behavior-changing or risk-sensitive implementation to verify correctness before declaring done; handle trivial and surgical edits directly. Send independent subagent calls in parallel within a single turn. Stop named teammates when finished.\n\n`) + "Verify claims against real evidence: run relevant commands and tests. Follow a disciplined consultation ladder for unresolved decisions: (1) direct code inspection, search, builds, and tests settle factual questions; (2) `advisor` " + advisorDescriptor + " for transcript-aware framing checks or trajectory guidance; (3) `oracle` " + oracleDescriptor + " for self-contained technical/architectural trade-offs" + astraStep;
2947
+ return "## Operating defaults (these layer with the user's direction and the domain's standards as addons: follow all three; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\n" + (isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly: use \`Explore\` for discovery spanning more than a couple of files, \`Plan\` in plan mode or for complex sequencing, \`General-Purpose\` for mixed multi-step execution, and \`reviewer\` for behavior-changing or risk-sensitive changes. Handle trivial and surgical edits directly. Stop named teammates when finished.\n\n` : `${profileLabel} launch profile. The lead coordinates execution across specialized roles: delegate broad discovery to \`Explore\` in parallel and do not sweep the repo yourself (read directly only files you will act on); delegate to \`Plan\` in plan mode or when structuring complex multi-step sequencing (\`Plan\` is an advisory planning capability, not an approval gate, and writes handoff-ready steps for \`General-Purpose\`); delegate mixed multi-step execution and Plan handoffs to \`General-Purpose\` in a fresh context; delegate to \`reviewer\` after behavior-changing or risk-sensitive implementation to verify correctness before declaring done; handle trivial and surgical edits directly. Send independent subagent calls in parallel within a single turn. Stop named teammates when finished.\n\n`) + "Pipeline skills (all 200K default): `/gh-gather-context` before planning when context is needed, `/gh-plan` before implementation (waits for user approval), `/gh-implement` after approval with bounded parallel workers and staged review. Skip for trivial work.\n\nVerify claims against real evidence: run relevant commands and tests. Follow a disciplined consultation ladder for unresolved decisions: (1) direct code inspection, search, builds, and tests settle factual questions; (2) `advisor` " + advisorDescriptor + " for transcript-aware framing checks or trajectory guidance; (3) `oracle` " + oracleDescriptor + " for self-contained technical/architectural trade-offs" + astraStep;
2606
2948
  }
2607
2949
  return STANDARD_OPERATING_DEFAULTS_DIGEST;
2608
2950
  }
@@ -3071,9 +3413,18 @@ async function writeInjectedSkill(name, md) {
3071
3413
  * `/gh-orchestrate`, `/gh-floor-keeper`, `/gh-first-mate`). See
3072
3414
  * `docs/floor-raising-agent-surface.md`.
3073
3415
  */
3416
+ /** Pipeline skills for pinned profiles (all 200K default context). */
3417
+ const PIPELINE_SKILLS = [
3418
+ GATHER_CONTEXT_SKILL,
3419
+ PLAN_SKILL,
3420
+ IMPLEMENT_SKILL
3421
+ ];
3074
3422
  /** All injected skills, in dependency order (research underpins the others). */
3075
3423
  const INJECTED_SKILLS = [
3076
3424
  RESEARCH_SKILL,
3425
+ GATHER_CONTEXT_SKILL,
3426
+ PLAN_SKILL,
3427
+ IMPLEMENT_SKILL,
3077
3428
  ORCHESTRATE_SKILL,
3078
3429
  FLOOR_KEEPER_SKILL,
3079
3430
  WORKER_SKILL,
@@ -3083,8 +3434,14 @@ const INJECTED_SKILLS = [
3083
3434
  FIRST_MATE_CONDUCT_SKILL
3084
3435
  ];
3085
3436
  function injectedSkillsForLaunch(selection) {
3086
- if (selection.profileId === "fast" || selection.profileId === "cheap" || selection.profileId === "cheap1m" || selection.profileId === "cheapest" || selection.profileId === "balanced") return [];
3087
- if (selection.profileId === "max") return selection.firstMateEnabled ? INJECTED_SKILLS.filter((skill) => skill.name.startsWith("gh-first-mate")) : [];
3437
+ if (isPipelineSkillProfile(selection.profileId)) {
3438
+ if (selection.profileId === "max") {
3439
+ const pipeline = PIPELINE_SKILLS.slice();
3440
+ if (selection.firstMateEnabled) return [...pipeline, ...INJECTED_SKILLS.filter((skill) => skill.name.startsWith("gh-first-mate"))];
3441
+ return pipeline;
3442
+ }
3443
+ return PIPELINE_SKILLS.slice();
3444
+ }
3088
3445
  if (!selection.workerSkillsActive) return [];
3089
3446
  return INJECTED_SKILLS.filter((skill) => selection.firstMateEnabled || !skill.name.startsWith("gh-first-mate"));
3090
3447
  }
@@ -3155,4 +3512,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
3155
3512
  //#endregion
3156
3513
  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, INJECTED_SKILLS 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 };
3157
3514
 
3158
- //# sourceMappingURL=attribution-settings-CX-kIrT8.js.map
3515
+ //# sourceMappingURL=attribution-settings-sTUXqFzx.js.map