github-router 0.3.324 → 0.3.325

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.
@@ -1,6 +1,6 @@
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-CZ3tEsgq.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-BfZEQOXB.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";
@@ -2137,11 +2137,21 @@ Use these exact tags on every finding and claim:
2137
2137
  - Ask: have we checked primary sources for every load-bearing claim?
2138
2138
  - If no material unknowns remain and the root cause is at least verified-source, stop for saturation.
2139
2139
 
2140
- 7. Persist two outputs under .github-router/context/<slug>/.
2140
+ 7. Persist outputs under .github-router/context/<slug>/ and close the stage.
2141
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
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
+ - .complete: stage-completion marker written ONLY after every dispatched explore worker has returned or been recorded as stopped, and both briefs are on disk. No downstream stage (/gh-plan, /gh-implement, /gh-swe-pipeline stage 2+) may start until this marker exists.
2143
2144
  - Downstream phases read by pointer and check freshness instead of re-injecting the whole brief.
2144
2145
 
2146
+ ## Waterfall rule
2147
+
2148
+ This stage owns all explore workers until it completes. Do NOT return while
2149
+ any explore worker is still running unless you explicitly record it as
2150
+ stopped (saturation reached or its area superseded) with the reason. If the
2151
+ brief already saturates the ask, stop remaining workers first (no further
2152
+ follow-ups; treat partial output as superseded), then write the marker. A
2153
+ plan built on shifting evidence wastes more than a stopped worker costs.
2154
+
2145
2155
  ## Return format
2146
2156
 
2147
2157
  Return a compact brief, not the whole dump:
@@ -2160,6 +2170,7 @@ Return a compact brief, not the whole dump:
2160
2170
  - Do not hide open unknowns because the answer looks useful.
2161
2171
  - Do not keep searching after the cap.
2162
2172
  - Do not paste the entire persisted brief into later turns unless the user asks.
2173
+ - Do not finish without the .complete marker: a marker-less brief is not a completed stage.
2163
2174
  `
2164
2175
  };
2165
2176
  //#endregion
@@ -2186,6 +2197,21 @@ staged: a Luna max pass first, then a Sol medium pass only for major issues.
2186
2197
  - Maximum review-fix cycles: 2.
2187
2198
  - Worktrees are auto-removed on success and retained on failure for debugging.
2188
2199
 
2200
+ ## Stage gate 0 (do this BEFORE any implementation)
2201
+
2202
+ 1. Verify the plan stage is finished: .github-router/plans/<slug>/plan.md AND
2203
+ its .complete marker both exist, with an explicit user-approval record. If
2204
+ any is missing, STOP: do not implement an unapproved plan. Finish or
2205
+ re-invoke planning first.
2206
+ 2. Check freshness: if HEAD or the working-tree diff hash moved since the
2207
+ plan was approved, re-verify stale load-bearing assumptions before
2208
+ dispatching workers.
2209
+ 3. Stop the previous stage: send no further follow-ups to any lingering plan
2210
+ workers (worker-plan follow-ups) and record them as stopped with the
2211
+ reason. Implementing while planning still runs builds on a moving target
2212
+ and wastes both stages. Only advance once every plan worker has returned
2213
+ or is recorded as stopped.
2214
+
2189
2215
  ## Procedure
2190
2216
 
2191
2217
  1. Parse the approved plan.
@@ -2232,9 +2258,10 @@ Return:
2232
2258
 
2233
2259
  ## Non-goals
2234
2260
 
2235
- - Do not start without a user-approved plan.md.
2261
+ - Do not start without a user-approved plan.md plus its .complete approval record.
2262
+ - Do not start while plan workers still run; stop them first.
2236
2263
  - 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.
2264
+ - Do not nest workflow invocations: workers are internal sessions and must not re-invoke /gh-implement (or any /gh-* pipeline skill).
2238
2265
  - Do not claim completeness when retries or review cycles are exhausted with open failures.
2239
2266
  `
2240
2267
  };
@@ -2400,6 +2427,19 @@ implementation.
2400
2427
  - A freshness-stamped context brief from /gh-gather-context, or equivalent context.
2401
2428
  - Read context.compact.md first; read context.md sections on demand (residual unknowns, evidence table).
2402
2429
 
2430
+ ## Stage gate 0 (do this BEFORE any planning)
2431
+
2432
+ 1. Verify the context stage is finished: .github-router/context/<slug>/.complete
2433
+ exists. If the marker is missing, STOP: do not plan on a partial brief.
2434
+ Finish or re-invoke gathering first.
2435
+ 2. Check freshness: if HEAD or the working-tree diff hash moved since the
2436
+ brief's stamp, re-verify stale load-bearing claims before using them.
2437
+ 3. Stop the previous stage: send no further follow-ups to any lingering
2438
+ gather-context explore workers and record them as stopped with the reason.
2439
+ Planning while explore workers still run builds on shifting evidence and
2440
+ wastes both stages. Only advance once every gather worker has returned or
2441
+ is recorded as stopped.
2442
+
2403
2443
  ## Hard bounds
2404
2444
 
2405
2445
  - Maximum tasks: 20.
@@ -2446,6 +2486,7 @@ implementation.
2446
2486
  - Present the goal, acceptance criteria, task-to-group map, per-task blind spot killed, residual risks, and cost estimate.
2447
2487
  - If the user rejects scope or cost, downshift to the smallest plan that kills the important blind spots.
2448
2488
  - Do not proceed to implementation without approval.
2489
+ - 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.
2449
2490
 
2450
2491
  ## Return format
2451
2492
 
@@ -2462,6 +2503,8 @@ Return:
2462
2503
  - Do not edit implementation files while planning; in plan mode, produce the plan and acceptance criteria only.
2463
2504
  - Do not present judgment-only conclusions as executable guarantees.
2464
2505
  - Do not hide open unknowns because the plan looks complete.
2506
+ - Do not start planning while gather-context workers still run; stop them first.
2507
+ - Do not dispatch implement workers from planning: stages never overlap.
2465
2508
  `
2466
2509
  };
2467
2510
  //#endregion
@@ -2576,6 +2619,117 @@ Return a compact brief, not the whole research dump:
2576
2619
  `
2577
2620
  };
2578
2621
  //#endregion
2622
+ //#region src/lib/injected-skills/swe-pipeline-skill.ts
2623
+ const SWE_PIPELINE_SKILL = {
2624
+ name: "gh-swe-pipeline",
2625
+ md: `---
2626
+ name: gh-swe-pipeline
2627
+ description: Strict sequential SWE pipeline for non-trivial code changes: runs gather-context to completion, then plan with user approval, then implement with staged review. Each stage waits for the previous to finish fully, stopping leftover workers before advancing. Use when the user wants the full structured engineering workflow in one command.
2628
+ user-invocable: true
2629
+ ---
2630
+
2631
+ # gh-swe-pipeline: strict sequential SWE workflow
2632
+
2633
+ Use this skill when the user invokes /gh-swe-pipeline for a non-trivial code
2634
+ change. It coordinates the three pipeline stages in STRICT SEQUENCE. No two
2635
+ stages ever overlap: each stage runs to completion, its workers are all
2636
+ finished or explicitly stopped, and its completion artifact exists before the
2637
+ next stage starts.
2638
+
2639
+ All work runs at the 200K default window with bare slugs (no 1M accounting):
2640
+ gather-context uses Luna high, plan uses Sol medium, implement and review
2641
+ pass 1 use Luna max, review pass 2 uses Sol medium.
2642
+
2643
+ ## The one rule
2644
+
2645
+ WATERFALL ONLY. Never start a stage while the previous stage still has running
2646
+ workers or an unwritten completion artifact. If a stage already has enough
2647
+ evidence to proceed, FIRST stop every still-running worker from the previous
2648
+ stage (let their maxWallClockMs reap them or send no further follow-ups and
2649
+ treat their partial output as superseded), record what was stopped and why,
2650
+ THEN advance. Overlapping stages waste money and produce plans built on
2651
+ shifting evidence. This is the failure the pipeline exists to prevent.
2652
+
2653
+ ## Stage 0: triage (no workers)
2654
+
2655
+ 1. Restate the ask in one sentence.
2656
+ 2. Decide trivial versus non-trivial. Trivial (typo, one-line config read,
2657
+ obvious three-line fix, pure explanation) SKIPS the pipeline: say why and
2658
+ do the work directly. Do not pay orchestration cost as ritual.
2659
+ 3. For non-trivial work, derive a run slug and create
2660
+ .github-router/swe/<slug>/run.md with the ask, the triage verdict, and
2661
+ per-stage status (pending, running, complete, skipped).
2662
+
2663
+ ## Stage 1: gather context (to completion)
2664
+
2665
+ 1. Invoke the gh-gather-context skill and WAIT for its full return. Do not
2666
+ plan, sketch tasks, or dispatch plan workers while it runs.
2667
+ 2. Its completion artifact is
2668
+ .github-router/context/<slug>/context.md plus context.compact.md and a
2669
+ .complete marker. If the marker is missing, the stage is NOT complete:
2670
+ keep waiting or re-invoke; never advance on a partial brief.
2671
+ 3. Early-stop rule: if the returned brief already saturates the ask (root
2672
+ cause at least verified-source, no material unknowns), stop any
2673
+ still-running explore workers (no follow-ups; record them as stopped),
2674
+ accept the brief, and advance. Do not keep searching after saturation.
2675
+ 4. Cap-hit rule: if the brief reports cap-hit with residuals, surface the
2676
+ residuals in run.md and ask the user whether to proceed to planning with
2677
+ the gap or to spend one more bounded round. Do not silently treat a
2678
+ cap-hit brief as complete.
2679
+
2680
+ ## Stage 2: plan (to user approval)
2681
+
2682
+ 1. Precondition check BEFORE invoking gh-plan: the context .complete marker
2683
+ exists AND every gather-context explore worker has returned or been
2684
+ recorded as stopped. If either is false, do not invoke planning. Fix
2685
+ stage 1 first.
2686
+ 2. Invoke the gh-plan skill and WAIT for its full return. Do not dispatch
2687
+ implement workers, sketch diffs, or edit implementation files while it
2688
+ runs. Plan mode means plan and acceptance criteria only.
2689
+ 3. Its completion artifact is .github-router/plans/<slug>/plan.md with a
2690
+ user-approval record (.complete marker written only after explicit
2691
+ approval). A plan without explicit user approval is NOT complete.
2692
+ 4. Present the goal, acceptance criteria, task-to-group map, residual risks,
2693
+ and cost estimate. Wait for explicit approval. If the user rejects scope
2694
+ or cost, downshift to the smallest plan that kills the important blind
2695
+ spots and re-seek approval. NEVER advance to implementation without
2696
+ approval recorded in run.md.
2697
+
2698
+ ## Stage 3: implement (to reviewed diff)
2699
+
2700
+ 1. Precondition check BEFORE invoking gh-implement: plan.md exists, its
2701
+ .complete marker exists, and run.md records explicit user approval. If
2702
+ any is missing, do not invoke implementation. Fix stage 2 first.
2703
+ 2. Stop any lingering plan workers (worker-plan follow-ups) before the
2704
+ first implement dispatch; record them as stopped.
2705
+ 3. Invoke the gh-implement skill and WAIT for its full return: unified diff,
2706
+ implementation report, test/typecheck/lint results, and review summary.
2707
+ 4. If retries or review cycles exhaust with open failures, checkpoint with
2708
+ the failure as residual risk instead of pretending it is solved.
2709
+
2710
+ ## Return format
2711
+
2712
+ Return:
2713
+
2714
+ - Run file: path to .github-router/swe/<slug>/run.md with per-stage status.
2715
+ - Context files: paths to context.md and context.compact.md, freshness
2716
+ (HEAD commit, diff hash, timestamp), termination (saturated or cap-hit).
2717
+ - Plan file: path to plan.md, task count, parallel groups, open questions
2718
+ and user answers, cost estimate, approval record.
2719
+ - Implement output: unified diff path, report path, per-task status, test
2720
+ results, review summary.
2721
+ - Residual risks and next action.
2722
+
2723
+ ## Non-goals
2724
+
2725
+ - Do not run stages in parallel or overlap workers across stages.
2726
+ - Do not advance past a missing completion artifact or a missing approval.
2727
+ - Do not nest pipeline invocations: workers are internal sessions and must
2728
+ not re-invoke /gh-swe-pipeline or any /gh-* pipeline skill.
2729
+ - Do not present judgment-only conclusions as executable guarantees.
2730
+ `
2731
+ };
2732
+ //#endregion
2579
2733
  //#region src/lib/injected-skills/worker-skill.ts
2580
2734
  /**
2581
2735
  * The `/gh-worker` skill: the operating model for the NON-BLOCKING workers
@@ -2832,6 +2986,75 @@ You are running inside an ai-or-die tab, so the \`${toolPrefix}*\` tools drive a
2832
2986
  * dashes and does not mention any Claude / Anthropic attribution.
2833
2987
  */
2834
2988
  const STYLE_DIRECTIVE = "Write concisely without losing detail. Use a natural human voice. Avoid em dashes. Do not attribute work to Claude, AI, LLM, or Anthropic anywhere (commits, PRs, issues, code, comments, docs).";
2989
+ /**
2990
+ * Operating-defaults directive injected at the TOP of the mirrored CLAUDE.md.
2991
+ * The main agent's system prompt (`--append-system-prompt`) gets
2992
+ * OPERATING_DEFAULTS_DIGEST instead, with this full statement available through
2993
+ * CLAUDE.md. Three defaults, layered under the user's own
2994
+ * direction and the domain's standards as addons (on a direct conflict the
2995
+ * user's direction wins, then the domain standard, then the default below):
2996
+ *
2997
+ * 1. Orchestrate (strong default): delegate the heavy / parallel /
2998
+ * context-heavy work to the right subagent / worker / model, keeping the
2999
+ * main context free to reason and collaborate with the user, while still
3000
+ * doing trivial / surgical / last-mile work directly (delegating that
3001
+ * would only add relay-fidelity loss + latency).
3002
+ * 2. Adversarial review: WHEN a peer critic earns its keep and, equally
3003
+ * important, when reaching for one is ritual rather than review. Same
3004
+ * failure shape the delegation default had: "consult a critic for
3005
+ * non-trivial changes" is unfalsifiable in advance, so it collapses into
3006
+ * either never (four of four unprimed agents) or always (worse than
3007
+ * never). The discriminator is whether the conclusion still turns on
3008
+ * judgment once the direct evidence is in: a consequential recommendation
3009
+ * cannot be run, which is exactly where confabulation hides, while a
3010
+ * tracing question a search already proved gains nothing from a second
3011
+ * model re-deriving it. The roster, the lens-to-artifact match, the
3012
+ * advisor-complements-rather-than-substitutes distinction, and the
3013
+ * do-not-anchor-the-critic rule live here; the digest carries only the
3014
+ * trigger and the ritual exclusion.
3015
+ * 3. Excellence lens: the principles stated plainly and concretely (radical
3016
+ * simplicity + real-user focus; whole-system first-principles thinking that
3017
+ * anticipates scale; work back from the customer outcome). Named exemplars
3018
+ * were dropped per the injected-surface review: a named entity is a dense,
3019
+ * high-variance vector that pulls in persona mannerisms at top salience, and
3020
+ * the guidance favors specific functional framing over comparison, so
3021
+ * specificity carries the vividness instead.
3022
+ * 4. Engineering excellence: quality / robustness / maintainability over
3023
+ * development cost; reproduce a bug end-to-end (as a real user hits it)
3024
+ * before fixing so the fix targets the real cause; a pixel-perfect UI bar;
3025
+ * and fix any lint error / test failure / flake on sight, whoever caused it,
3026
+ * folded into the current work rather than derailing the user's task (the
3027
+ * scope guardrail keeps proactive quality from becoming yak-shaving). The
3028
+ * digest carries a one-line form; the full statement lives here so it does
3029
+ * not cost the context window every turn.
3030
+ *
3031
+ * Self-referentially compliant with the style directive: no em dashes, no
3032
+ * Claude / Anthropic attribution.
3033
+ *
3034
+ * Availability-aware: four of the natives (`scout`, `implementer-fast`,
3035
+ * `reviewer-fast`, and `general-purpose-fast`) are DROPPED rather than
3036
+ * downgraded when no model in
3037
+ * their chain resolves, so naming them unconditionally here would tell the lead to delegate
3038
+ * to an agent that has no `.md` file and is absent from the Task
3039
+ * `subagent_type` enum. Build the directive with
3040
+ * `buildOperatingDefaultsDirective` and the same availability booleans used for
3041
+ * the `.md` generation and the awareness snippet; the exported const below is
3042
+ * the all-available form, kept for callers and tests that do not model a thin
3043
+ * catalog.
3044
+ */
3045
+ /**
3046
+ * Pipeline skills (`/gh-gather-context`, `/gh-plan`, `/gh-implement`,
3047
+ * `/gh-swe-pipeline`) injected ONLY for `--swe` launches on pinned profiles
3048
+ * (fast, max, cheap, cheap1m, cheapest, balanced). Standard is intentionally
3049
+ * excluded. Without `--swe` the skill files are not written and this text is
3050
+ * not referenced. All skill models run at the 200K default window (bare
3051
+ * slugs, no 1M accounting): gatherContext uses Luna high for the lead and
3052
+ * every explore worker (bounded: 3 rounds, 6 workers per round); plan uses
3053
+ * Sol medium; implement uses Luna max for the lead and every task worker
3054
+ * (bounded: 8 concurrent, 2 retries per task, isolated worktrees); review is
3055
+ * staged Luna max then Sol medium for major issues only.
3056
+ */
3057
+ const PIPELINE_SKILLS_AWARENESS = "Pipeline skills (all 200K default context). Prefer `/gh-swe-pipeline`: it runs the stages below in strict sequence, each completing before the next starts, with user approval before implementation. Stages in order: (1) `/gh-gather-context` BEFORE planning when grounded context is needed: decomposes the ask, runs lexical search, fans out to bounded Luna-high explore workers, writes context.md plus context.compact.md; (2) `/gh-plan` AFTER context and BEFORE implementation: ingests the brief with Sol-medium, produces a scoped modular ordered plan.md, surfaces open questions, waits for user approval; (3) `/gh-implement` AFTER plan approval: bounded parallel Luna-max task workers in isolated worktrees (each self-tests and self-reviews), aggregates a unified diff, runs staged review (Luna max, then Sol medium for major issues only). Skip for trivial work. Never implement without an approved plan. Never overlap stages.";
2835
3058
  /** Oxford-comma join: "a", "a and b", "a, b, and c". */
2836
3059
  function joinClauses(parts) {
2837
3060
  if (parts.length <= 1) return parts[0] ?? "";
@@ -2901,7 +3124,8 @@ function buildOperatingDefaultsDirective(opts = {}) {
2901
3124
  if (opts.profile === "max") {
2902
3125
  const peersKey = opts.peersKey ?? opts.groupKeys?.peers ?? "peers";
2903
3126
  const artifactClause = opts.artifactAvailable ? ` Live human review is available in the artifact panel via \`mcp__${peersKey}__artifact_*\`.` : "";
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.";
3127
+ const pipelineClause = opts.sweEnabled === false ? "" : `\n\n${PIPELINE_SKILLS_AWARENESS}`;
3128
+ 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 + pipelineClause;
2905
3129
  }
2906
3130
  if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest" || opts.profile === "balanced") {
2907
3131
  const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
@@ -2922,9 +3146,9 @@ ${profileLabel} profile runtime wiring is unavailable. Work directly, use only t
2922
3146
  const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated autonomous browsing tasks through \`mcp__${workersKey}__browse\`.` : "";
2923
3147
  const artifactClause = opts.artifactAvailable ? ` \`mcp__${peersKey}__artifact_*\` provides human review in the artifact panel with auto-open on plan completion.` : "";
2924
3148
  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).` : "";
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.`;
3149
+ const pipeline = isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly. ` + buildNativeReachClauses(opts) + ". Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` may be used for discovery spanning more than a couple of files; `Plan` for sequencing with complex interfaces or acceptance criteria; `General-Purpose` for mixed multi-step execution; `reviewer` for behavior-changing or risk-sensitive changes. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n" : `${profileLabel} launch profile. The lead coordinates execution across specialized native roles: ` + buildNativeReachClauses(opts) + ". In plan mode or when designing changes with complex sequencing, interface contracts, or acceptance criteria, delegate architectural planning to `Plan` (in plan mode, produce the plan and acceptance criteria; do not edit files). Phase pipeline (budget gather, expensive plan, budget execution, expensive verification). GATHER: delegate to `Explore` instead of exploring yourself. For any question spanning more than a couple of files, launch one or more `Explore` subagents in parallel with scoped evidence questions and let them return file:line citations; read directly only the small subset you must touch to decide or edit. `Plan` follows the same rule when it needs repository facts. PLAN: `Plan` produces handoff-ready steps (ordered, file:line, done conditions, acceptance criteria) for a `General-Purpose` executor that cannot see its reasoning; `Plan` may consult Oracle on unresolved trade-offs and reports any remaining gap to the lead. EXECUTE: delegate mixed multi-step work and Plan handoffs to `General-Purpose` in a fresh context to preserve lead context; brief with outcome, constraints, files in scope, and verification. VERIFY: after behavior-changing, cross-boundary, or risk-sensitive implementation, run relevant build/tests then invoke `reviewer` before declaring done. Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. `Explore` is cheap and may be launched in parallel across independent discovery questions. Send independent subagent calls in parallel within a single turn. Delegation graph: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.\n\n";
3150
+ const swePipelineClause = opts.sweEnabled === false ? "" : `${PIPELINE_SKILLS_AWARENESS}\n\n`;
3151
+ return "## Operating defaults (these layer with the user's explicit direction and the domain's own standards as addons, not replacements: follow all three together; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\n" + pipeline + `Consultation guidance: Follow an evidence-first escalation ladder. Direct empirical evidence (search, code, tests, builds) settles factual questions first. Advisor is an optional, non-binding, lead-only transcript-aware sounding board for trajectory guidance or framing checks (direction, not dictation), and never use it for routine progress, waiting, directly verifiable facts, or completion ritual. \`mcp__${peersKey}__oracle\` is ${oracleDescriptor}, an expert consultant available to the lead and \`Plan\`, preferred over advisor for difficult conceptual, algorithmic, spec/protocol, or architectural tradeoffs evaluated in a self-contained brief; \`reviewer\` and other subagents cannot call Oracle. \`Plan\` may consult Oracle on unresolved trade-offs, and reports any remaining tie-breaking gap to the lead.${astraClause} ` + searchGuidance + `\`mcp__${searchKey}__web\` provides citable sources.${browserClause}${workerBrowseClause}${artifactClause}\n\n` + swePipelineClause + "Verify claims with concrete repository evidence and tests before declaring work done. User instructions outrank delegation triggers. Stop named teammates when finished.";
2928
3152
  }
2929
3153
  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.";
2930
3154
  }
@@ -2935,7 +3159,8 @@ Verify claims with concrete repository evidence and tests before declaring work
2935
3159
  const OPERATING_DEFAULTS_DIRECTIVE = buildOperatingDefaultsDirective();
2936
3160
  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.";
2937
3161
  function buildOperatingDefaultsDigest(opts = {}) {
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.";
3162
+ const digestPipelineSentence = opts.sweEnabled === false ? "" : "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\n";
3163
+ 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\n" + digestPipelineSentence + "Synthesize 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.";
2939
3164
  if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest" || opts.profile === "balanced") {
2940
3165
  const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
2941
3166
  const isCheapest = opts.profile === "cheapest";
@@ -2944,7 +3169,7 @@ function buildOperatingDefaultsDigest(opts = {}) {
2944
3169
  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)";
2945
3170
  const advisorDescriptor = isCheapest ? "(Gemini/high, lead-only)" : "(Sol/high, lead-only)";
2946
3171
  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).` : ".";
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;
3172
+ return "## Operating defaults (these layer with the user's direction and the domain's standards as addons: follow all three; on a direct conflict the user's direction wins, then the domain standard, then the default below)\n\n" + (isCheapest ? `${profileLabel} launch profile. The lead owns the outcome and handles straightforward work directly: use \`Explore\` for discovery spanning more than a couple of files, \`Plan\` in plan mode or for complex sequencing, \`General-Purpose\` for mixed multi-step execution, and \`reviewer\` for behavior-changing or risk-sensitive changes. Handle trivial and surgical edits directly. Stop named teammates when finished.\n\n` : `${profileLabel} launch profile. The lead coordinates execution across specialized roles: delegate broad discovery to \`Explore\` in parallel and do not sweep the repo yourself (read directly only files you will act on); delegate to \`Plan\` in plan mode or when structuring complex multi-step sequencing (\`Plan\` is an advisory planning capability, not an approval gate, and writes handoff-ready steps for \`General-Purpose\`); delegate mixed multi-step execution and Plan handoffs to \`General-Purpose\` in a fresh context; delegate to \`reviewer\` after behavior-changing or risk-sensitive implementation to verify correctness before declaring done; handle trivial and surgical edits directly. Send independent subagent calls in parallel within a single turn. Stop named teammates when finished.\n\n`) + digestPipelineSentence + "Verify claims against real evidence: run relevant commands and tests. Follow a disciplined consultation ladder for unresolved decisions: (1) direct code inspection, search, builds, and tests settle factual questions; (2) `advisor` " + advisorDescriptor + " for transcript-aware framing checks or trajectory guidance; (3) `oracle` " + oracleDescriptor + " for self-contained technical/architectural trade-offs" + astraStep;
2948
3173
  }
2949
3174
  return STANDARD_OPERATING_DEFAULTS_DIGEST;
2950
3175
  }
@@ -3410,14 +3635,21 @@ async function writeInjectedSkill(name, md) {
3410
3635
  * Injected-skill registry: the floor-raising / controller skills the `claude`
3411
3636
  * launcher materializes into the per-launch `CLAUDE_CONFIG_DIR` mirror so the
3412
3637
  * spawned Claude Code session discovers them (`/gh-research`,
3413
- * `/gh-orchestrate`, `/gh-floor-keeper`, `/gh-first-mate`). See
3414
- * `docs/floor-raising-agent-surface.md`.
3638
+ * `/gh-orchestrate`, `/gh-floor-keeper`, `/gh-first-mate`, plus the `--swe`
3639
+ * pipeline skills `/gh-gather-context`, `/gh-plan`, `/gh-implement`,
3640
+ * `/gh-swe-pipeline`). See `docs/floor-raising-agent-surface.md`.
3641
+ */
3642
+ /**
3643
+ * Pipeline skills for `--swe` launches on pinned profiles (all 200K default
3644
+ * context). The orchestrator (`/gh-swe-pipeline`) runs the other three in
3645
+ * strict sequence; the three stages stay individually invokable for users who
3646
+ * only want one stage.
3415
3647
  */
3416
- /** Pipeline skills for pinned profiles (all 200K default context). */
3417
3648
  const PIPELINE_SKILLS = [
3418
3649
  GATHER_CONTEXT_SKILL,
3419
3650
  PLAN_SKILL,
3420
- IMPLEMENT_SKILL
3651
+ IMPLEMENT_SKILL,
3652
+ SWE_PIPELINE_SKILL
3421
3653
  ];
3422
3654
  /** All injected skills, in dependency order (research underpins the others). */
3423
3655
  const INJECTED_SKILLS = [
@@ -3435,6 +3667,10 @@ const INJECTED_SKILLS = [
3435
3667
  ];
3436
3668
  function injectedSkillsForLaunch(selection) {
3437
3669
  if (isPipelineSkillProfile(selection.profileId)) {
3670
+ if (!selection.sweEnabled) {
3671
+ if (selection.profileId === "max" && selection.firstMateEnabled) return INJECTED_SKILLS.filter((skill) => skill.name.startsWith("gh-first-mate"));
3672
+ return [];
3673
+ }
3438
3674
  if (selection.profileId === "max") {
3439
3675
  const pipeline = PIPELINE_SKILLS.slice();
3440
3676
  if (selection.firstMateEnabled) return [...pipeline, ...INJECTED_SKILLS.filter((skill) => skill.name.startsWith("gh-first-mate"))];
@@ -3512,4 +3748,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
3512
3748
  //#endregion
3513
3749
  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 };
3514
3750
 
3515
- //# sourceMappingURL=attribution-settings-sTUXqFzx.js.map
3751
+ //# sourceMappingURL=attribution-settings-IbcZgAEf.js.map