github-router 0.3.328 → 0.3.330

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 (52) hide show
  1. package/dist/{attribution-settings-CF1ZV58z.js → attribution-settings-DepziZU8.js} +138 -93
  2. package/dist/attribution-settings-DepziZU8.js.map +1 -0
  3. package/dist/browser-ext/manifest.json +1 -1
  4. package/dist/{claude-BdJupNy4.js → claude-Dw4V8o8l.js} +14 -11
  5. package/dist/{claude-BdJupNy4.js.map → claude-Dw4V8o8l.js.map} +1 -1
  6. package/dist/{codex-DgEG2i_w.js → codex-CXOpv4WP.js} +5 -5
  7. package/dist/{codex-DgEG2i_w.js.map → codex-CXOpv4WP.js.map} +1 -1
  8. package/dist/engine-CYba_zi7.js +2 -0
  9. package/dist/{gate-discovery-ufkJQE8V.js → gate-discovery-BGqS7R2g.js} +2 -2
  10. package/dist/{gate-discovery-ufkJQE8V.js.map → gate-discovery-BGqS7R2g.js.map} +1 -1
  11. package/dist/{hook-mcp-client-DBvm9608.js → hook-mcp-client-DbFtxo6_.js} +6 -5
  12. package/dist/hook-mcp-client-DbFtxo6_.js.map +1 -0
  13. package/dist/hooks.mjs +46 -15
  14. package/dist/hooks.sha256 +1 -1
  15. package/dist/{index-cmd-mPy73hig.js → index-cmd-DUjQs9zw.js} +16 -6
  16. package/dist/index-cmd-DUjQs9zw.js.map +1 -0
  17. package/dist/{internal-plan-review-DM-Zycyn.js → internal-plan-review-O2dwnQv3.js} +3 -3
  18. package/dist/{internal-plan-review-DM-Zycyn.js.map → internal-plan-review-O2dwnQv3.js.map} +1 -1
  19. package/dist/{internal-prompt-submit-6AKy89nq.js → internal-prompt-submit-CD0UFkT-.js} +11 -8
  20. package/dist/internal-prompt-submit-CD0UFkT-.js.map +1 -0
  21. package/dist/{internal-stop-hook-CWwkeyf_.js → internal-stop-hook-CH9SKjZ9.js} +3 -3
  22. package/dist/{internal-stop-hook-CWwkeyf_.js.map → internal-stop-hook-CH9SKjZ9.js.map} +1 -1
  23. package/dist/{internal-stop-review-CPk66wwo.js → internal-stop-review-a3rpzzhd.js} +9 -9
  24. package/dist/internal-stop-review-a3rpzzhd.js.map +1 -0
  25. package/dist/main.js +9 -9
  26. package/dist/{peer-mcp-personas-Dg2LJ0GF.js → peer-mcp-personas-CnYMTizo.js} +148 -1021
  27. package/dist/peer-mcp-personas-CnYMTizo.js.map +1 -0
  28. package/dist/{plan-review-hook-ChuywYy_.js → plan-review-hook-CfZBvsHd.js} +2 -2
  29. package/dist/{plan-review-hook-ChuywYy_.js.map → plan-review-hook-CfZBvsHd.js.map} +1 -1
  30. package/dist/{prompt-submit-hook-C0ZospPT.js → prompt-submit-hook-CRH6m7Vz.js} +33 -12
  31. package/dist/prompt-submit-hook-CRH6m7Vz.js.map +1 -0
  32. package/dist/{provision-l0THw3kO.js → provision-D5KOOw6n.js} +3 -3
  33. package/dist/{provision-l0THw3kO.js.map → provision-D5KOOw6n.js.map} +1 -1
  34. package/dist/{serve-DZY93dBo.js → serve-fJWhiivo.js} +11 -9
  35. package/dist/serve-fJWhiivo.js.map +1 -0
  36. package/dist/{server-setup-Bv7TGDC7.js → server-setup-DHMPOXKT.js} +4 -4
  37. package/dist/{server-setup-Bv7TGDC7.js.map → server-setup-DHMPOXKT.js.map} +1 -1
  38. package/dist/{runner-BoJPRQsK.js → service-backend-DYEPoszR.js} +959 -47
  39. package/dist/service-backend-DYEPoszR.js.map +1 -0
  40. package/dist/{start-2SrUerLA.js → start-Gs4jAwUR.js} +4 -4
  41. package/dist/{start-2SrUerLA.js.map → start-Gs4jAwUR.js.map} +1 -1
  42. package/package.json +1 -1
  43. package/dist/attribution-settings-CF1ZV58z.js.map +0 -1
  44. package/dist/engine-C3SnOV1U.js +0 -2
  45. package/dist/hook-mcp-client-DBvm9608.js.map +0 -1
  46. package/dist/index-cmd-mPy73hig.js.map +0 -1
  47. package/dist/internal-prompt-submit-6AKy89nq.js.map +0 -1
  48. package/dist/internal-stop-review-CPk66wwo.js.map +0 -1
  49. package/dist/peer-mcp-personas-Dg2LJ0GF.js.map +0 -1
  50. package/dist/prompt-submit-hook-C0ZospPT.js.map +0 -1
  51. package/dist/runner-BoJPRQsK.js.map +0 -1
  52. package/dist/serve-DZY93dBo.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { a as isUnderClaudeConfigMirror, f as writeRuntimeFileSecure, t as PATHS } from "./paths-P5ajjpzU.js";
2
- 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-Bv7TGDC7.js";
2
+ 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-DHMPOXKT.js";
3
3
  import { c as FAST_PROFILE_MODELS, d as FAST_PROFILE_NATIVE_MODELS, l as FAST_PROFILE_NATIVE_AGENT_NAMES, u as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-DmsyQQrw.js";
4
- import { An as withOneMSuffix, Bn as CHEAPEST_PROFILE_NATIVE_EFFORTS, Gn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, Kn as CHEAP_PROFILE_NATIVE_EFFORTS, Nn as BALANCED_PROFILE_NATIVE_AGENT_NAMES, Pn as BALANCED_PROFILE_NATIVE_EFFORTS, a as buildAgentPrompt, cn as CONDENSED_OPERATING_SEQUENCE, kn as oneMContextDisabled, l as maxPersonasFor, ln as DEFINITION_OF_GREATNESS, n as MCP_GROUPS, t as GROUP_META, u as personasFor, zn as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES } from "./peer-mcp-personas-Dg2LJ0GF.js";
4
+ import { An as withOneMSuffix, Bn as CHEAPEST_PROFILE_NATIVE_EFFORTS, Gn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, Kn as CHEAP_PROFILE_NATIVE_EFFORTS, Nn as BALANCED_PROFILE_NATIVE_AGENT_NAMES, Pn as BALANCED_PROFILE_NATIVE_EFFORTS, a as buildAgentPrompt, cn as CONDENSED_OPERATING_SEQUENCE, kn as oneMContextDisabled, l as maxPersonasFor, ln as DEFINITION_OF_GREATNESS, n as MCP_GROUPS, t as GROUP_META, u as personasFor, zn as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES } from "./peer-mcp-personas-CnYMTizo.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-DBWyjvGm.js";
7
- import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-l0THw3kO.js";
7
+ import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-D5KOOw6n.js";
8
8
  import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-DX_mD0JT.js";
9
9
  import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-DtjQchvM.js";
10
10
  import consola from "consola";
@@ -1600,9 +1600,10 @@ async function configureServeDefaultPermissionMode(settingsPath) {
1600
1600
  }
1601
1601
  //#endregion
1602
1602
  //#region src/lib/injected-skills/first-mate-conduct-skill.ts
1603
- const FIRST_MATE_CONDUCT_SKILL = {
1604
- name: "gh-first-mate-conduct",
1605
- md: `---
1603
+ function buildFirstMateConductSkill(_searchEnabled) {
1604
+ return {
1605
+ name: "gh-first-mate-conduct",
1606
+ md: `---
1606
1607
  name: gh-first-mate-conduct
1607
1608
  description: Fleet conductor for first-mate — one durable heartbeat loop drives a FLEET of per-repo CEO meta-subagents to greatness. Arms the deterministic loop, sweeps the whole portfolio once, fans out a fresh CEO subagent per repo that needs judgment, batches their verdicts, couriers human decisions, and re-arms. Use when first-mate should be the default durable driver for one or many repos.
1608
1609
  user-invocable: true
@@ -1649,12 +1650,15 @@ The ledger is durable memory for unit state; the strategy store is durable memor
1649
1650
 
1650
1651
  ${DEFINITION_OF_GREATNESS}
1651
1652
  `
1652
- };
1653
+ };
1654
+ }
1655
+ buildFirstMateConductSkill(true);
1653
1656
  //#endregion
1654
1657
  //#region src/lib/injected-skills/first-mate-operate-skill.ts
1655
- const FIRST_MATE_OPERATE_SKILL = {
1656
- name: "gh-first-mate-operate",
1657
- md: `---
1658
+ function buildFirstMateOperateSkill(_searchEnabled) {
1659
+ return {
1660
+ name: "gh-first-mate-operate",
1661
+ md: `---
1658
1662
  name: gh-first-mate-operate
1659
1663
  description: Operator-facing CEO/CTO/CPO operating protocol for autonomously driving a product with first-mate — shape each mission from a real struggling moment, make acceptance criteria externally verifiable, sequence discovery through growth, and escalate launch, spend, and pricing to the human. Use when deciding WHAT product work first-mate should drive, not only how to execute it.
1660
1664
  user-invocable: true
@@ -1750,18 +1754,23 @@ Hard authority limits: launching to real external channels, any spend or paid ac
1750
1754
 
1751
1755
  Report the current phase, its checkpoint and whether it is met with reproducible evidence, the active mission(s) and their phase-appropriate acceptance criteria, and the next decision or escalation.
1752
1756
  `
1753
- };
1757
+ };
1758
+ }
1759
+ buildFirstMateOperateSkill(true);
1754
1760
  //#endregion
1755
1761
  //#region src/lib/injected-skills/first-mate-setup-skill.ts
1756
- const FIRST_MATE_SETUP_SKILL = {
1757
- name: "gh-first-mate-scaffold",
1758
- md: "---\nname: gh-first-mate-scaffold\ndescription: Scaffolds a repo-geared agentic-dev foundation through first-mate: seeds guidance files, role agents, ADRs, changelog, learnings, PR template, test instructions, Copilot setup, and CI through a scaffold branch and PR. Use before the first build wave on an owned repository.\nuser-invocable: true\n---\n\n# gh-first-mate-scaffold\n\nInvoke the `scaffold_repo` MCP tool (`mcp__first-mate__scaffold_repo`) before the first build wave on an owned repository. The goal is not generic TODO stubs; it is a repo-geared foundation that GitHub agents, local agents, reviewers, and CI can read.\n\n## What it seeds\n\n- `AGENTS.md` / `CLAUDE.md` / `GEMINI.md` / `.github/copilot-instructions.md` — identical guidance with overview, detected stack, commands, hard DoD gate, primary OS, conventions, structure, decisions/memory, handoff, testing, and gotchas.\n- `.github/agents/{ceo,cto,cpo,planner,implementer,reviewer,researcher,tester}.md` mirrored into `.claude/agents/` — C-suite operator hats plus execution roles, each with frontmatter, cold-start contract, method, quality bar, output contract, and self-reminder.\n- `docs/playbook/README.md` — the autonomous DISCOVER → NICHE → POSITION → SCOPE → BUILD → LAUNCH → MEASURE → ITERATE → GROW protocol, externally verifiable phase gates, OODA / Build-Measure-Learn governance, and authority limits.\n- `docs/adrs/0000-template.md` plus `docs/adr/0001-record-architecture-decisions.md` — Nygard-style decision record foundation.\n- `LEARNINGS.md`, `CHANGELOG.md`, `docs/history/0000-template.md`, `docs/plans/README.md`, and `docs/research/README.md` — durable memory, history, plans, and research conventions.\n- `.github/pull_request_template.md` — summary, type, failure-modes-considered-and-tested, and DoD checklist.\n- `.github/instructions/tests.instructions.md` — path-scoped test guidance filled from detected framework/dir/glob where possible.\n- `.github/workflows/copilot-setup-steps.yml` and starter `.github/workflows/ci.yml` — detected toolchain setup with stable quality-gate job names.\n\nIt does not seed factory-protocol or `docs/factory/` files. Orchestration remains outside the product repo in first-mate.\n\n## Usage\n\n```\nmcp__first-mate__scaffold_repo({ repo: \"owner/repo\" })\nmcp__first-mate__scaffold_repo({ repo: \"owner/repo\", mode: \"enhance\" })\nmcp__first-mate__scaffold_repo({\n repo: \"owner/repo\",\n mode: \"add-missing-only\",\n detection_overrides: { primary_os: \"windows-latest\", test_command: \"npm test\" }\n})\n```\n\nModes:\n\n- `add-missing-only` (default): seed absent files and skip present files.\n- `enhance`: for guidance files, product playbook, ADR index, changelog, and learnings, append only missing `##` sections; never rewrite existing prose. Other present files are skipped.\n- `overwrite-approved`: replace existing files only when explicitly approved.\n\nAlways inspect the returned per-file report and PR. A no-op result means the repo already has the foundation or has no missing enhanceable sections.\n"
1759
- };
1762
+ function buildFirstMateSetupSkill(_searchEnabled) {
1763
+ return {
1764
+ name: "gh-first-mate-scaffold",
1765
+ md: "---\nname: gh-first-mate-scaffold\ndescription: Scaffolds a repo-geared agentic-dev foundation through first-mate: seeds guidance files, role agents, ADRs, changelog, learnings, PR template, test instructions, Copilot setup, and CI through a scaffold branch and PR. Use before the first build wave on an owned repository.\nuser-invocable: true\n---\n\n# gh-first-mate-scaffold\n\nInvoke the `scaffold_repo` MCP tool (`mcp__first-mate__scaffold_repo`) before the first build wave on an owned repository. The goal is not generic TODO stubs; it is a repo-geared foundation that GitHub agents, local agents, reviewers, and CI can read.\n\n## What it seeds\n\n- `AGENTS.md` / `CLAUDE.md` / `GEMINI.md` / `.github/copilot-instructions.md` — identical guidance with overview, detected stack, commands, hard DoD gate, primary OS, conventions, structure, decisions/memory, handoff, testing, and gotchas.\n- `.github/agents/{ceo,cto,cpo,planner,implementer,reviewer,researcher,tester}.md` mirrored into `.claude/agents/` — C-suite operator hats plus execution roles, each with frontmatter, cold-start contract, method, quality bar, output contract, and self-reminder.\n- `docs/playbook/README.md` — the autonomous DISCOVER → NICHE → POSITION → SCOPE → BUILD → LAUNCH → MEASURE → ITERATE → GROW protocol, externally verifiable phase gates, OODA / Build-Measure-Learn governance, and authority limits.\n- `docs/adrs/0000-template.md` plus `docs/adr/0001-record-architecture-decisions.md` — Nygard-style decision record foundation.\n- `LEARNINGS.md`, `CHANGELOG.md`, `docs/history/0000-template.md`, `docs/plans/README.md`, and `docs/research/README.md` — durable memory, history, plans, and research conventions.\n- `.github/pull_request_template.md` — summary, type, failure-modes-considered-and-tested, and DoD checklist.\n- `.github/instructions/tests.instructions.md` — path-scoped test guidance filled from detected framework/dir/glob where possible.\n- `.github/workflows/copilot-setup-steps.yml` and starter `.github/workflows/ci.yml` — detected toolchain setup with stable quality-gate job names.\n\nIt does not seed factory-protocol or `docs/factory/` files. Orchestration remains outside the product repo in first-mate.\n\n## Usage\n\n```\nmcp__first-mate__scaffold_repo({ repo: \"owner/repo\" })\nmcp__first-mate__scaffold_repo({ repo: \"owner/repo\", mode: \"enhance\" })\nmcp__first-mate__scaffold_repo({\n repo: \"owner/repo\",\n mode: \"add-missing-only\",\n detection_overrides: { primary_os: \"windows-latest\", test_command: \"npm test\" }\n})\n```\n\nModes:\n\n- `add-missing-only` (default): seed absent files and skip present files.\n- `enhance`: for guidance files, product playbook, ADR index, changelog, and learnings, append only missing `##` sections; never rewrite existing prose. Other present files are skipped.\n- `overwrite-approved`: replace existing files only when explicitly approved.\n\nAlways inspect the returned per-file report and PR. A no-op result means the repo already has the foundation or has no missing enhanceable sections.\n"
1766
+ };
1767
+ }
1760
1768
  //#endregion
1761
1769
  //#region src/lib/injected-skills/first-mate-skill.ts
1762
- const FIRST_MATE_SKILL = {
1763
- name: "gh-first-mate",
1764
- md: `---
1770
+ function buildFirstMateSkill(_searchEnabled) {
1771
+ return {
1772
+ name: "gh-first-mate",
1773
+ md: `---
1765
1774
  name: gh-first-mate
1766
1775
  description: Thin operating protocol for the first-mate GitHub cloud-agent controller: starts missions, wakes the durable loop, answers model and human requests, keeps context compact, and reports from the board/ledger. Use when the user wants first-mate to drive GitHub cloud coding agents across one or more repositories with foundation-first scaffolding and scoped, testable work.
1767
1776
  user-invocable: true
@@ -1917,12 +1926,14 @@ When reporting progress, return:
1917
1926
  - Needs human: decision ids/packet paths and the user's required choice.
1918
1927
  - Next wake: the heartbeat state — armed and next check in nextWakeSeconds seconds, or idle (disarmed).
1919
1928
  `
1920
- };
1929
+ };
1930
+ }
1921
1931
  //#endregion
1922
1932
  //#region src/lib/injected-skills/floor-keeper-skill.ts
1923
- const FLOOR_KEEPER_SKILL = {
1924
- name: "gh-floor-keeper",
1925
- md: `---
1933
+ function buildFloorKeeperSkill(_searchEnabled) {
1934
+ return {
1935
+ name: "gh-floor-keeper",
1936
+ md: `---
1926
1937
  name: gh-floor-keeper
1927
1938
  description: Done-checkpoint verification for non-trivial changes: runs the executable gate, sends the diff to OpenAI and Google reviewers, consults the advisor, reconciles findings by severity, authors missing tests through a different lab when bounded and appropriate, and returns an honest go/no-go. Use before declaring non-trivial work complete.
1928
1939
  user-invocable: true
@@ -2067,12 +2078,14 @@ Return a compact final checkpoint:
2067
2078
  - Do not spend unbounded attempts creating tests.
2068
2079
  - Do not bury cap-hit or unknown states in a green-sounding summary.
2069
2080
  `
2070
- };
2081
+ };
2082
+ }
2071
2083
  //#endregion
2072
2084
  //#region src/lib/injected-skills/gather-context-skill.ts
2073
- const GATHER_CONTEXT_SKILL = {
2074
- name: "gh-gather-context",
2075
- md: `---
2085
+ function buildGatherContextSkill(searchEnabled) {
2086
+ return {
2087
+ name: "gh-gather-context",
2088
+ md: `---
2076
2089
  name: gh-gather-context
2077
2090
  description: Gather grounded codebase context before planning. Use when unfamiliar code must be understood, files located, or claims verified against source. Returns a freshness-stamped brief with file:line citations. Not for trivial reads or already-known code.
2078
2091
  user-invocable: true
@@ -2096,7 +2109,7 @@ stage: Explore evidence plus targeted follow-up reads is the verification path.
2096
2109
 
2097
2110
  - Maximum rounds: 3.
2098
2111
  - Maximum parallel Explore subagents per round: 6.
2099
- - Maximum lexical searches per round: 10.
2112
+ - ${searchEnabled ? "Maximum searches per round: 10." : "Maximum lexical searches per round: 10."}
2100
2113
  - Maximum follow-up reads per round: 5.
2101
2114
  - Advisory budget: keep each Explore dispatch under ~3 minutes of wall-clock;
2102
2115
  the Task tool has no maxWallClockMs parameter, so count your own dispatches
@@ -2118,17 +2131,20 @@ Use these exact tags on every finding and claim:
2118
2131
  - Identify whether this is a bug, feature, refactor, incident, or design question.
2119
2132
  - Name the expected downstream consumer: planner, implementer, or user.
2120
2133
 
2121
- 2. Decompose the ask into searchable entities.
2134
+ 2. Decompose the ask into searchable entities.
2122
2135
  - Extract symbols, filenames, error strings, routes, flags, config keys, and types.
2123
2136
  - Define what must be true for a correct implementation.
2124
2137
 
2125
- 3. Run lexical search first, in parallel, in a single turn.
2138
+ ${searchEnabled ? `3. Run semantic search first for concepts, then lexical for symbols, in parallel, in a single turn.
2139
+ - Use mcp__search__code semantically first to find concepts and likely files.
2140
+ - Then use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
2141
+ - Use git log and git blame when authorship, regression timing, or intent matters.
2142
+ - Use mcp__search__web for upstream APIs, package behavior, protocol docs, or public issues.` : `3. Run lexical search first, in parallel, in a single turn.
2126
2143
  - Use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
2127
- - Use mcp__search__code semantically only to find concepts, then refine to lexical.
2128
2144
  - Use git log and git blame when authorship, regression timing, or intent matters.
2129
- - Use mcp__search__web for upstream APIs, package behavior, protocol docs, or public issues.
2145
+ - Use mcp__search__web for upstream APIs, package behavior, protocol docs, or public issues.`}
2130
2146
 
2131
- 4. Decompose into bounded Explore subagents.
2147
+ 4. Decompose into bounded Explore subagents.
2132
2148
  - Cluster search results into at most 6 coherent investigation areas.
2133
2149
  - For each area, write a narrow brief: the specific question, the expected artifact, and the files to focus on.
2134
2150
  - Dispatch ALL Explore subagents in a single turn via the Agent tool (subagent_type Explore). Each runs read-only at the 200K default window and returns a summary with an evidence table and file:line citations. Advisory: keep each dispatch under ~3 minutes; the Task tool enforces no wall-clock, so terminate at saturation.
@@ -2187,12 +2203,14 @@ summaries, never full file contents or pasted source blocks.
2187
2203
  - Do not return full file contents in briefs, summaries, or evidence tables; cite file:line plus one line of purpose.
2188
2204
  - Do not finish without the .complete marker: a marker-less brief is not a completed stage.
2189
2205
  `
2190
- };
2206
+ };
2207
+ }
2191
2208
  //#endregion
2192
2209
  //#region src/lib/injected-skills/implement-skill.ts
2193
- const IMPLEMENT_SKILL = {
2194
- name: "gh-implement",
2195
- md: `---
2210
+ function buildImplementSkill(_searchEnabled) {
2211
+ return {
2212
+ name: "gh-implement",
2213
+ md: `---
2196
2214
  name: gh-implement
2197
2215
  description: Execute an approved plan with parallel subagents and self-validation. Use when a user-approved plan.md is ready for execution. Reviewer only on low-confidence or risky changes. Not for unapproved plans or exploration.
2198
2216
  user-invocable: true
@@ -2299,12 +2317,14 @@ Return:
2299
2317
  - Do not nest workflow invocations: subagents must not re-invoke /gh-implement (or any /gh-* pipeline skill).
2300
2318
  - Do not claim completeness when retries or review cycles are exhausted with open failures.
2301
2319
  `
2302
- };
2320
+ };
2321
+ }
2303
2322
  //#endregion
2304
2323
  //#region src/lib/injected-skills/orchestrate-skill.ts
2305
- const ORCHESTRATE_SKILL = {
2306
- name: "gh-orchestrate",
2307
- md: `---
2324
+ function buildOrchestrateSkill(searchEnabled) {
2325
+ return {
2326
+ name: "gh-orchestrate",
2327
+ md: `---
2308
2328
  name: gh-orchestrate
2309
2329
  description: Right-sized blind-spot-elimination for non-trivial implementation asks: captures user-blessed acceptance criteria, delegates bounded research, decomposes and plans, composes a native Workflow with explicit deterministic/advisory annotations, verifies the workflow, checkpoints residual risks and cost, then runs only when the pipeline actually raises the floor. Use when a non-trivial implementation ask benefits from workflow-level blind-spot reduction.
2310
2330
  user-invocable: true
@@ -2387,7 +2407,7 @@ Parallelism (the Workflow tool's core optimization rule):
2387
2407
 
2388
2408
  Role to tool mapping:
2389
2409
 
2390
- - research: worker-explore (Agent subagent) and mcp__search__code for focused follow-ups.
2410
+ ${searchEnabled ? "- research: worker-explore (Agent subagent) and mcp__search__code for focused follow-ups (semantic for concepts, lexical for exact symbols)." : "- research: worker-explore (Agent subagent) and mcp__search__code for focused follow-ups (lexical for exact symbols, filenames, errors, routes, flags, and config keys)."}
2391
2411
  - plan: worker-plan (Agent subagent).
2392
2412
  - implement: worker-implement (Agent subagent), with worktree:true for parallel writers.
2393
2413
  - test: worker-test (Agent subagent), authored by a DIFFERENT LAB than the implementer when possible. This is an advisory practice, not enforced provenance.
@@ -2437,12 +2457,14 @@ Return:
2437
2457
  - Advisory review results, if any.
2438
2458
  - Final residual risks and next action.
2439
2459
  `
2440
- };
2460
+ };
2461
+ }
2441
2462
  //#endregion
2442
2463
  //#region src/lib/injected-skills/plan-skill.ts
2443
- const PLAN_SKILL = {
2444
- name: "gh-plan",
2445
- md: `---
2464
+ function buildPlanSkill(_searchEnabled) {
2465
+ return {
2466
+ name: "gh-plan",
2467
+ md: `---
2446
2468
  name: gh-plan
2447
2469
  description: Create an implementation plan from gathered context. Use when a non-trivial change needs a reviewed, ordered task list with acceptance criteria before implementing. Requires user approval. Not for trivial changes or missing context.
2448
2470
  user-invocable: true
@@ -2579,12 +2601,14 @@ Return:
2579
2601
  - Do not start planning while gather-context Explore subagents still run; record them superseded first.
2580
2602
  - Do not dispatch implementation subagents from planning: stages never overlap.
2581
2603
  `
2582
- };
2604
+ };
2605
+ }
2583
2606
  //#endregion
2584
2607
  //#region src/lib/injected-skills/research-skill.ts
2585
- const RESEARCH_SKILL = {
2586
- name: "gh-research",
2587
- md: `---
2608
+ function buildResearchSkill(searchEnabled) {
2609
+ return {
2610
+ name: "gh-research",
2611
+ md: `---
2588
2612
  name: gh-research
2589
2613
  description: Bounded saturation research for non-trivial GitHub Router asks: enumerates unknowns, gathers in parallel through code search, web search, and explore workers, adversarially verifies load-bearing claims, persists a freshness-stamped brief, and returns a compact confidence-tagged root-cause summary. Use when grounded context is needed before planning or changing code.
2590
2614
  user-invocable: true
@@ -2630,21 +2654,27 @@ Default caps unless the user explicitly gives a smaller or larger budget:
2630
2654
  - Identify whether this is a bug, feature, refactor, incident, or design question.
2631
2655
  - Name the expected downstream consumer: implementer, orchestrator, floor-keeper, or user.
2632
2656
 
2633
- 2. Enumerate unknowns as an explicit worklist.
2657
+ 2. Enumerate unknowns as an explicit worklist.
2634
2658
  - Include facts needed to decide the root cause or safe implementation path.
2635
2659
  - Mark each unknown as code, behavior, dependency, history, external, or acceptance-criteria related.
2636
2660
  - Add newly discovered unknowns as they appear.
2637
2661
 
2638
- 3. Fan out in parallel.
2662
+ ${searchEnabled ? `3. Fan out in parallel.
2639
2663
  - Run independent code, web, history, and explore calls concurrently where possible; only the semantic-to-lexical code-search refinement is ordered. Issue the independent calls in a SINGLE turn (one message, multiple tool calls) so the harness actually runs them in parallel rather than serializing.
2640
2664
  - Use mcp__search__code semantically first to find concepts and likely files.
2641
2665
  - Then use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
2642
2666
  - Use git blame or history when authorship, regression timing, or intent matters.
2643
2667
  - Use mcp__search__web for upstream APIs, package behavior, protocol docs, or public issues.
2644
2668
  - Launch parallel worker-explore background subagents (via the Agent tool, subagent_type worker-explore) for heavy gathering, each with a narrow question and expected artifact. They run non-blocking and report back on completion.
2645
- - Keep worker results summarized; do not paste every detail into the main context.
2669
+ - Keep worker results summarized; do not paste every detail into the main context.` : `3. Fan out in parallel.
2670
+ - Run independent code, web, history, and explore calls concurrently where possible. Issue the independent calls in a SINGLE turn (one message, multiple tool calls) so the harness actually runs them in parallel rather than serializing.
2671
+ - Use mcp__search__code lexically for exact symbols, filenames, errors, routes, flags, and config keys.
2672
+ - Use git blame or history when authorship, regression timing, or intent matters.
2673
+ - Use mcp__search__web for upstream APIs, package behavior, protocol docs, or public issues.
2674
+ - Launch parallel worker-explore background subagents (via the Agent tool, subagent_type worker-explore) for heavy gathering, each with a narrow question and expected artifact. They run non-blocking and report back on completion.
2675
+ - Keep worker results summarized; do not paste every detail into the main context.`}
2646
2676
 
2647
- 4. Form a root-cause hypothesis.
2677
+ 4. Form a root-cause hypothesis.
2648
2678
  - For bugs: describe the causal chain from trigger to observed symptom.
2649
2679
  - For features: identify integration points, constraints, and likely implementation seams.
2650
2680
  - For design questions: identify the decision, alternatives, and primary constraints.
@@ -2690,12 +2720,14 @@ Return a compact brief, not the whole research dump:
2690
2720
  - Do not keep searching after the cap.
2691
2721
  - Do not paste the entire persisted brief into later turns unless the user asks.
2692
2722
  `
2693
- };
2723
+ };
2724
+ }
2694
2725
  //#endregion
2695
2726
  //#region src/lib/injected-skills/swe-pipeline-skill.ts
2696
- const SWE_PIPELINE_SKILL = {
2697
- name: "gh-swe-pipeline",
2698
- md: `---
2727
+ function buildSwePipelineSkill(_searchEnabled) {
2728
+ return {
2729
+ name: "gh-swe-pipeline",
2730
+ md: `---
2699
2731
  name: gh-swe-pipeline
2700
2732
  description: Strict sequential SWE pipeline for non-trivial code changes: runs gather-context to completion, then plan with user approval, then implement with conditional review. Each stage waits for the previous to finish fully, superseding leftover subagents before advancing. Use when the user wants the full structured engineering workflow in one command.
2701
2733
  user-invocable: true
@@ -2813,7 +2845,8 @@ Return:
2813
2845
  /gh-swe-pipeline or any /gh-* pipeline skill.
2814
2846
  - Do not present judgment-only conclusions as executable guarantees.
2815
2847
  `
2816
- };
2848
+ };
2849
+ }
2817
2850
  //#endregion
2818
2851
  //#region src/lib/injected-skills/worker-skill.ts
2819
2852
  /**
@@ -2823,9 +2856,10 @@ Return:
2823
2856
  * load-bearing enforcement is the PreToolUse guard + the `worker-*` dispatcher
2824
2857
  * subagents (see src/lib/worker-dispatch.ts).
2825
2858
  */
2826
- const WORKER_SKILL = {
2827
- name: "gh-worker",
2828
- md: `---
2859
+ function buildWorkerSkill(_searchEnabled) {
2860
+ return {
2861
+ name: "gh-worker",
2862
+ md: `---
2829
2863
  name: gh-worker
2830
2864
  description: Runs github-router workers without blocking the turn: dispatches the matching worker-* background subagent (explore/implement/review/plan/test, up to 6 hours each) for a completion notification instead of a blocking wait. Use when a task would benefit from a background worker for investigation, planning, review, implementation, or test authoring.
2831
2865
  user-invocable: true
@@ -2873,7 +2907,8 @@ The dispatcher calls the worker once and relays its result verbatim.
2873
2907
  headless (claude -p) runs the task surface behaves differently; prefer interactive
2874
2908
  for long worker fan-out.
2875
2909
  `
2876
- };
2910
+ };
2911
+ }
2877
2912
  //#endregion
2878
2913
  //#region src/lib/skill-model-contract.ts
2879
2914
  /**
@@ -3729,46 +3764,56 @@ async function writeInjectedSkill(name, md) {
3729
3764
  * `/gh-swe-pipeline`). See `docs/floor-raising-agent-surface.md`.
3730
3765
  */
3731
3766
  /**
3732
- * Pipeline skills for `--swe` launches on pinned profiles (all 200K default
3733
- * context). The orchestrator (`/gh-swe-pipeline`) runs the other three in
3734
- * strict sequence; the three stages stay individually invokable for users who
3735
- * only want one stage.
3767
+ * Build the pipeline skills for `--swe` launches on pinned profiles (all
3768
+ * 200K default context). The orchestrator (`/gh-swe-pipeline`) runs the
3769
+ * other three in strict sequence; the three stages stay individually
3770
+ * invokable for users who only want one stage.
3736
3771
  */
3737
- const PIPELINE_SKILLS = [
3738
- GATHER_CONTEXT_SKILL,
3739
- PLAN_SKILL,
3740
- IMPLEMENT_SKILL,
3741
- SWE_PIPELINE_SKILL
3742
- ];
3743
- /** All injected skills, in dependency order (research underpins the others). */
3744
- const INJECTED_SKILLS = [
3745
- RESEARCH_SKILL,
3746
- GATHER_CONTEXT_SKILL,
3747
- PLAN_SKILL,
3748
- IMPLEMENT_SKILL,
3749
- ORCHESTRATE_SKILL,
3750
- FLOOR_KEEPER_SKILL,
3751
- WORKER_SKILL,
3752
- FIRST_MATE_SKILL,
3753
- FIRST_MATE_SETUP_SKILL,
3754
- FIRST_MATE_OPERATE_SKILL,
3755
- FIRST_MATE_CONDUCT_SKILL
3756
- ];
3772
+ function getPipelineSkills(searchEnabled) {
3773
+ return [
3774
+ buildGatherContextSkill(searchEnabled),
3775
+ buildPlanSkill(searchEnabled),
3776
+ buildImplementSkill(searchEnabled),
3777
+ buildSwePipelineSkill(searchEnabled)
3778
+ ];
3779
+ }
3780
+ /**
3781
+ * Build all injected skills in dependency order (research underpins the
3782
+ * others), with search guidance matched to the launch's search capability.
3783
+ */
3784
+ function getInjectedSkills(searchEnabled) {
3785
+ return [
3786
+ buildResearchSkill(searchEnabled),
3787
+ buildGatherContextSkill(searchEnabled),
3788
+ buildPlanSkill(searchEnabled),
3789
+ buildImplementSkill(searchEnabled),
3790
+ buildOrchestrateSkill(searchEnabled),
3791
+ buildFloorKeeperSkill(searchEnabled),
3792
+ buildWorkerSkill(searchEnabled),
3793
+ buildFirstMateSkill(searchEnabled),
3794
+ buildFirstMateSetupSkill(searchEnabled),
3795
+ buildFirstMateOperateSkill(searchEnabled),
3796
+ buildFirstMateConductSkill(searchEnabled)
3797
+ ];
3798
+ }
3757
3799
  function injectedSkillsForLaunch(selection) {
3800
+ const searchEnabled = selection.searchEnabled === true;
3801
+ const allSkills = getInjectedSkills(searchEnabled);
3802
+ const pipelineSkills = getPipelineSkills(searchEnabled);
3758
3803
  if (isPipelineSkillProfile(selection.profileId)) {
3759
3804
  if (!selection.sweEnabled) {
3760
- if (selection.profileId === "max" && selection.firstMateEnabled) return INJECTED_SKILLS.filter((skill) => skill.name.startsWith("gh-first-mate"));
3805
+ if (selection.profileId === "max" && selection.firstMateEnabled) return allSkills.filter((skill) => skill.name.startsWith("gh-first-mate"));
3761
3806
  return [];
3762
3807
  }
3763
3808
  if (selection.profileId === "max") {
3764
- const pipeline = PIPELINE_SKILLS.slice();
3765
- if (selection.firstMateEnabled) return [...pipeline, ...INJECTED_SKILLS.filter((skill) => skill.name.startsWith("gh-first-mate"))];
3809
+ const pipeline = pipelineSkills.slice();
3810
+ if (selection.firstMateEnabled) return [...pipeline, ...allSkills.filter((skill) => skill.name.startsWith("gh-first-mate"))];
3766
3811
  return pipeline;
3767
3812
  }
3768
- return PIPELINE_SKILLS.slice();
3813
+ return pipelineSkills.slice();
3769
3814
  }
3770
3815
  if (!selection.workerSkillsActive) return [];
3771
- return INJECTED_SKILLS.filter((skill) => selection.firstMateEnabled || !skill.name.startsWith("gh-first-mate"));
3816
+ return allSkills.filter((skill) => selection.firstMateEnabled || !skill.name.startsWith("gh-first-mate"));
3772
3817
  }
3773
3818
  //#endregion
3774
3819
  //#region src/lib/attribution-settings.ts
@@ -3835,6 +3880,6 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
3835
3880
  return { written: true };
3836
3881
  }
3837
3882
  //#endregion
3838
- 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 };
3883
+ export { writePeerMcpRuntimeFiles as C, workersKeyOf as S, sanitizeServeSettingsEnv as _, appendPeerAwarenessToMirroredClaudeMd as a, resolveCodexCliBackend as b, buildOperatingDefaultsDirective as c, prependStyleDirectiveToMirroredClaudeMd as d, buildArtifactReviewSkill as f, planModeAllowRules as g, injectAllowRules as h, writeInjectedSkill as i, prependArtifactPanelDirectiveToMirroredClaudeMd as l, configureServeDefaultPermissionMode as m, getInjectedSkills as n, appendToolbeltAwarenessToMirroredClaudeMd as o, SEAMLESS_BUILTIN_TOOLS as p, injectedSkillsForLaunch as r, buildOperatingDefaultsDigest as s, injectAttributionSuppressionIntoSettingsFile as t, prependOperatingDefaultsToMirroredClaudeMd as u, BUILTIN_SUBAGENT_DEFINITIONS as v, resolveGroupKeysFromMirror as x, injectPeerMcpIntoMirror as y };
3839
3884
 
3840
- //# sourceMappingURL=attribution-settings-CF1ZV58z.js.map
3885
+ //# sourceMappingURL=attribution-settings-DepziZU8.js.map