@bridge_gpt/mcp-server 0.2.68 → 0.2.70

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 (166) hide show
  1. package/README.md +226 -320
  2. package/build/agent-launchers/claude-executor-adapter.js +17 -4
  3. package/build/agents.generated.js +4 -4
  4. package/build/artifact-diff.js +110 -0
  5. package/build/bin-entrypoint.js +36 -0
  6. package/build/bridge-permissions.js +650 -98
  7. package/build/check-update-cli.js +74 -0
  8. package/build/claude-review-workflow-drift.js +3 -3
  9. package/build/claude-settings.js +84 -2
  10. package/build/cli-help.js +7 -1
  11. package/build/codex-bridge-profile.js +1 -1
  12. package/build/codex-home.js +9 -1
  13. package/build/codex-launcher-pin.js +598 -0
  14. package/build/commands.generated.js +8 -8
  15. package/build/conductor/bridge-api-client.js +598 -19
  16. package/build/conductor/bring-up-facts.js +9 -9
  17. package/build/conductor/doctor.js +466 -18
  18. package/build/conductor/epic-child-continuation.js +54 -3
  19. package/build/conductor/epic-implementer-cli.js +132 -34
  20. package/build/conductor/epic-runtime.js +2 -2
  21. package/build/conductor/epic-state.js +1 -1
  22. package/build/conductor/hook-runtime-qualification.js +1 -1
  23. package/build/conductor/install-doctor.js +4 -2
  24. package/build/conductor/launch-need-probes.js +337 -0
  25. package/build/conductor/local-merge.js +241 -56
  26. package/build/conductor/merge-credential.js +172 -0
  27. package/build/conductor/merge-execution-eligibility.js +1 -1
  28. package/build/conductor/merged-child-check.js +95 -0
  29. package/build/conductor/plan-trim.js +30 -0
  30. package/build/conductor/pr-ci-producer.js +1 -1
  31. package/build/conductor/readiness-cli.js +11 -6
  32. package/build/conductor/readiness-prerequisites.js +41 -0
  33. package/build/conductor/readiness-sections.js +345 -55
  34. package/build/conductor/readiness.js +99 -87
  35. package/build/conductor/recovery-cli.js +606 -21
  36. package/build/conductor/recovery-operations.js +306 -7
  37. package/build/conductor/repair-contract.js +47 -2
  38. package/build/conductor/repository-workflow-remedy.js +8 -6
  39. package/build/conductor/stored-merge-credential.js +76 -0
  40. package/build/conductor/stored-merge-token-probe.js +28 -0
  41. package/build/conductor/temporary-plan.js +50 -0
  42. package/build/conductor/wait-run-cli.js +759 -0
  43. package/build/conductor/worker-database-doctor-inspector.js +49 -0
  44. package/build/conductor-bin.js +2 -2
  45. package/build/conductor-claude-hook-bin.js +2 -2
  46. package/build/conductor-claude-hook-removed-stub-bin.js +2 -5
  47. package/build/conductor-removed-stub-bin.js +2 -5
  48. package/build/connect-github-api.js +33 -14
  49. package/build/credential-store.js +356 -13
  50. package/build/docs.generated.js +27 -14
  51. package/build/doctor.js +203 -38
  52. package/build/drive-epic-help.js +212 -0
  53. package/build/drive-epic.js +1840 -373
  54. package/build/epic-ci-workflow-drift.js +77 -0
  55. package/build/epic-ci-workflow-install.js +183 -0
  56. package/build/epic-ci-workflow.js +157 -0
  57. package/build/epic-contract-context.js +326 -0
  58. package/build/epic-implementer-bin.js +131 -120
  59. package/build/epic-implementer-claude-hook-bin.js +2 -2
  60. package/build/escalation-reachability.js +134 -0
  61. package/build/executor/cleanup-report.js +99 -0
  62. package/build/executor/cli.js +12 -1
  63. package/build/executor/completion-contract.js +68 -11
  64. package/build/executor/completion-supervision.js +99 -0
  65. package/build/executor/delivery-outcome.js +179 -0
  66. package/build/executor/deps.js +3 -0
  67. package/build/executor/env.js +71 -0
  68. package/build/executor/failure-reason-codes.js +126 -0
  69. package/build/executor/heartbeat.js +38 -0
  70. package/build/executor/http-client.js +115 -4
  71. package/build/executor/integration-job.js +298 -5
  72. package/build/executor/job-errors.js +36 -6
  73. package/build/executor/job-runner.js +720 -36
  74. package/build/executor/likely-tests.js +36 -2
  75. package/build/executor/merge-job.js +145 -2
  76. package/build/executor/observation.js +73 -4
  77. package/build/executor/permissions.js +193 -97
  78. package/build/executor/preflight.js +14 -3
  79. package/build/executor/process-containment.js +28 -2
  80. package/build/executor/prompt-spec.js +50 -5
  81. package/build/executor/rebase-finalization.js +38 -3
  82. package/build/executor/reconcile-overlap-job.js +35 -7
  83. package/build/executor/required-work-ledger.js +236 -81
  84. package/build/executor/resume-pre-spawn.js +38 -1
  85. package/build/executor/runner.js +91 -3
  86. package/build/executor/test-clock.js +8 -0
  87. package/build/executor/types.js +37 -2
  88. package/build/executor/worker-cli-launcher.js +259 -0
  89. package/build/executor/worker-command.js +41 -4
  90. package/build/executor/worker-database-target.js +91 -0
  91. package/build/executor/worker-database.js +908 -0
  92. package/build/executor/worker-finalization.js +106 -0
  93. package/build/executor/worker-guard-hook.js +203 -0
  94. package/build/executor/worker-resources.js +47 -0
  95. package/build/executor/worker-verification-guidance.js +15 -2
  96. package/build/executor/worktree.js +303 -15
  97. package/build/executor-launch.js +11 -1
  98. package/build/generated-assets-doctor.js +9 -1
  99. package/build/generated-assets-health.js +13 -4
  100. package/build/generated-assets-legacy.js +39 -0
  101. package/build/generated-assets-paths.js +12 -1
  102. package/build/generated-assets-repair.js +4 -1
  103. package/build/generated-assets-test-support.js +12 -0
  104. package/build/github-remote.js +33 -0
  105. package/build/github-sign-in.js +62 -0
  106. package/build/index.js +1214 -465
  107. package/build/init.js +39 -1
  108. package/build/install-bridge-conductor-gate.js +78 -0
  109. package/build/install-bridge-conductor-setup.js +413 -0
  110. package/build/install-bridge-conductor.js +1226 -267
  111. package/build/install-bridge.js +629 -350
  112. package/build/launcher-config-inspection.js +184 -19
  113. package/build/mcp-host-targets.js +4 -0
  114. package/build/mcp-identity.js +7 -0
  115. package/build/mcp-install-state.js +8 -2
  116. package/build/merge-pull-request.js +6 -0
  117. package/build/merge-workflow-install.js +763 -345
  118. package/build/phase-result-artifacts.js +75 -20
  119. package/build/pipeline-orchestrator.js +247 -4
  120. package/build/pipelines.generated.js +35 -35
  121. package/build/plan-discovery.js +15 -2
  122. package/build/plan-execution-ledger.js +306 -17
  123. package/build/plan-phase-routing.js +48 -13
  124. package/build/plane/cli.js +105 -51
  125. package/build/plane/defaults.js +3 -0
  126. package/build/plane/plane-freshness.js +294 -0
  127. package/build/plane/schema-compatibility.js +137 -0
  128. package/build/plane/shutdown-deps.js +38 -0
  129. package/build/plane/shutdown.js +83 -8
  130. package/build/plane/terminal-run-cleanup.js +303 -0
  131. package/build/printed-remedy-commands.js +26 -4
  132. package/build/readiness-check.js +6 -2
  133. package/build/readiness-prerequisites.generated.js +532 -0
  134. package/build/readme.generated.js +1 -1
  135. package/build/session-upgrade-notice.js +86 -0
  136. package/build/setup-epic.js +400 -30
  137. package/build/shared-resources.generated.js +5 -0
  138. package/build/start-tickets.js +43 -15
  139. package/build/test-command-detection.js +247 -0
  140. package/build/test-command-validation.js +73 -0
  141. package/build/testing-config-client.js +150 -0
  142. package/build/ticket-delivery-artifacts.js +258 -0
  143. package/build/ticket-delivery-enrollment.js +306 -0
  144. package/build/ticket-delivery.js +205 -0
  145. package/build/ticket-review-summary.js +14 -0
  146. package/build/tool-call-advisory.js +162 -0
  147. package/build/tool-surface-gating.js +28 -89
  148. package/build/update-check.js +97 -16
  149. package/build/update-status.js +61 -71
  150. package/build/upgrade-advice.js +15 -11
  151. package/build/upgrade-cli.js +360 -20
  152. package/build/v2-readiness-requirements.js +552 -0
  153. package/build/version.generated.js +3 -3
  154. package/build/worker-guard-hook-bin.js +2 -2
  155. package/build/worktree-core.js +22 -7
  156. package/docs/BRIDGE-DIRECTORY-README.md +48 -0
  157. package/docs/EPIC-IMPLEMENTER-INSTALL.md +12 -867
  158. package/docs/EPIC-IMPLEMENTER.md +104 -63
  159. package/docs/epic-implementer/getting-started.md +131 -0
  160. package/docs/epic-implementer/self-hosting.md +133 -0
  161. package/package.json +3 -3
  162. package/pipelines/idea-to-ticket.json +1 -1
  163. package/pipelines/implement-ticket.json +8 -8
  164. package/pipelines/review-ticket.json +2 -2
  165. package/design-assets/favicon/favicon-32x32.png +0 -0
  166. package/design-assets/just-logo-rough-draft.png +0 -0
package/README.md CHANGED
@@ -103,27 +103,41 @@ you run it in your home directory, your editor will not find any of it.
103
103
  npx -y @bridge_gpt/mcp-server install
104
104
  ```
105
105
 
106
- **3. Answer the sign-in question.** On a first run it asks whether you already have
107
- a token:
106
+ **3. Answer the sign-in question.** On a first run it asks one question:
108
107
 
109
108
  ```
110
- 1. I need a token
111
- 2. I already have a token
109
+ Email (or press Enter if you already have a token):
112
110
  ```
113
111
 
114
- - Choose **1** if you have nothing yet. It asks for your email address and a name
115
- for your new Bridge project, then creates both for you.
116
- - Choose **2** if someone gave you a token — either a Bridge API key or an invite
112
+ - Type your **email address** if you have nothing yet. The installer first shows
113
+ how your email is used, then sends you a verification code. Your new Bridge
114
+ project is named after your folder, with no question asked unless the folder
115
+ name cannot be used. Rename it later on the Setup page.
116
+ - Press **Enter** if someone gave you a token — either a Bridge API key or an invite
117
117
  code. Paste it at the hidden prompt; you do not have to say which kind it is,
118
118
  because the installer recognizes it. Nothing is echoed as you type.
119
119
 
120
- There is no default answer, so pressing Enter alone selects nothing. If you would
121
- rather not be asked, pass the answer up front instead — see
120
+ One mistyped answer gets a hint and a second try. If you would rather not be
121
+ asked, pass the answer up front instead — see
122
122
  [Choosing how you sign in](#choosing-how-you-sign-in).
123
123
 
124
- **4. Pick which editors to configure.** The installer detects the MCP hosts on your
125
- machine and asks which ones to set up. Pick every editor you actually use for this
126
- project; you can re-run the command later to add another.
124
+ **4. Confirm which editors to configure.** The installer detects the MCP hosts on
125
+ your machine and ticks them for you (`[x]`). Press Enter to accept the ticked tools,
126
+ or type the numbers you use (for example `1,3`) to replace them. You can re-run the
127
+ command later to add another.
128
+
129
+ **Optimization.** The installer then asks how Bridge should balance quality and
130
+ cost: **Quality** (full-depth planning and review), **Speed** (one planning pass,
131
+ one review), or **Token Efficiency** (Speed settings, with simpler tickets handed to
132
+ smaller models, to stretch your Claude Code, Cursor, or Codex subscription). Press
133
+ Enter to keep Quality (or your saved choice). Change it later by running
134
+ `/teach-bridge` in your agent.
135
+
136
+ When you are done answering, the installer writes Bridge's guidance for your agent
137
+ between `<!-- BEGIN BRIDGE MCP GUIDANCE -->` and `<!-- END BRIDGE MCP GUIDANCE -->`
138
+ without asking. It prints how to remove that region. Then it prints the defaults it
139
+ chose — project name, ticket keys when your project uses local tickets,
140
+ optimization, and guidance — just before offering to open the setup session.
127
141
 
128
142
  **5. Reload your MCP host.** Editors read their MCP configuration at startup, so a
129
143
  freshly written config is not live until you reload. Restart the editor, or use its
@@ -133,7 +147,9 @@ project's `.mcp.json` the first time.
133
147
  **6. Finish in the agent session the installer opens — when it opens one.** The
134
148
  last thing the installer does is offer to open a fresh agent session running
135
149
  `/install-bridge`, which reads your codebase, fills in the remaining project
136
- settings, and prints a short report of what Bridge can help with. Let it finish.
150
+ settings, and prints a short report of what Bridge can help with. Let it finish. To
151
+ invite teammates later, open the project's Security page from the Setup page and
152
+ create a key.
137
153
 
138
154
  Three things all have to hold for that session to open: your selection has to
139
155
  include a host the installer can launch, the run has to be on an interactive
@@ -174,14 +190,15 @@ committing anything that can hold a credential.
174
190
 
175
191
  **Prompts you will see.** More than the sign-in question, in three groups:
176
192
 
177
- - *Always on a first bare interactive run:* the sign-in question, a hidden prompt
178
- for a token (or a visible one for an email), a project name for a brand-new
179
- project, a picker for which editors to configure, and an offer to connect GitHub
180
- (`Connect GitHub? [y/N]:`).
193
+ - *Always on a first bare interactive run:* the email-or-token question (a blank
194
+ answer opens a hidden prompt for a token), the verification code, a picker for
195
+ which editors to configure (detected ones are pre-ticked), the optimization
196
+ choice, and an offer to connect GitHub (`Connect GitHub? [y/N]:`).
181
197
  - *Conditional on your situation:* a confirmation when the directory has no `.git`
182
- (default **No**, and declining aborts); a *"Which tool should open? [1-N]"*
183
- chooser when your selection contains more than one launchable tool; and the
184
- consent prompt before the final agent session.
198
+ (default **No**, and declining aborts); a project name when your folder name
199
+ cannot be used as one; and the consent prompt before the final agent session. With
200
+ more than one launchable tool selected, the first one is used and the installer
201
+ says so; pass `--agent` to choose another.
185
202
  - *Overwrite confirmations, each default **No** and each skippable with `--force`:*
186
203
  a saved key for this project already exists; a host config already contains a
187
204
  `BAPI_API_KEY`; a **git-tracked** config would receive your real key; a saved but
@@ -302,7 +319,7 @@ Creates a brand-new Bridge project for that address and your first admin key in
302
319
  command. No account, no key, and no invite needed beforehand. The address labels
303
320
  your new workspace and may receive a setup message; delivery is best-effort, so
304
321
  nothing waits on it. The email is visible as you type (it is not a secret) and is
305
- never written to a log. This is the same route as answering **1** at the prompt.
322
+ never written to a log. This is the same route as typing an email at the prompt.
306
323
 
307
324
  **You were sent an invite code.**
308
325
 
@@ -393,7 +410,7 @@ later boot.
393
410
  "mcpServers": {
394
411
  "bridge": {
395
412
  "command": "npx",
396
- "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.68", "serve"],
413
+ "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.70", "serve"],
397
414
  "env": {
398
415
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
399
416
  "BAPI_REPO_NAME": "your-repo",
@@ -415,7 +432,7 @@ later boot.
415
432
  "bridge": {
416
433
  "type": "stdio",
417
434
  "command": "npx",
418
- "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.68", "serve"],
435
+ "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.70", "serve"],
419
436
  "env": {
420
437
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
421
438
  "BAPI_REPO_NAME": "your-repo",
@@ -437,7 +454,7 @@ later boot.
437
454
  "bridge": {
438
455
  "type": "stdio",
439
456
  "command": "npx",
440
- "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.68", "serve"],
457
+ "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.70", "serve"],
441
458
  "env": {
442
459
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
443
460
  "BAPI_REPO_NAME": "your-repo",
@@ -460,7 +477,7 @@ Windsurf only supports global MCP configuration.
460
477
  "mcpServers": {
461
478
  "bridge": {
462
479
  "command": "npx",
463
- "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.68", "serve"],
480
+ "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.70", "serve"],
464
481
  "env": {
465
482
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
466
483
  "BAPI_REPO_NAME": "your-repo",
@@ -479,7 +496,7 @@ Windsurf only supports global MCP configuration.
479
496
  ```toml
480
497
  [mcp_servers.bridge]
481
498
  command = "npx"
482
- args = ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.68", "serve"]
499
+ args = ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.70", "serve"]
483
500
 
484
501
  [mcp_servers.bridge.env]
485
502
  BAPI_BASE_URL = "https://bridgegpt-api.com"
@@ -544,12 +561,46 @@ converge, and nothing is reported as complete in that case. The causes:
544
561
  - the upgrade finished but left an **unconfigured** MCP entry — one that would
545
562
  authenticate as nobody.
546
563
 
564
+ #### Upgrade notices
565
+
547
566
  The server checks for updates on startup. The check is cached for a day and never
548
- blocks startup. When a newer version is known, it surfaces in two places you do
549
- not have to go looking for: a one-line warning on the server's **stderr**, and a
550
- short advisory attached to the ordinary `tools/list` response so the agent in the
551
- session can see that some tools may be missing or renamed in the older build.
552
- Neither requires calling `ping` or `doctor`.
567
+ blocks startup or a tool call. When a newer version is known, you hear about it
568
+ once, in a place you do not have to go looking for:
569
+
570
+ - **The first completed tool result.** In an eligible session, the first tool call
571
+ that finishes carries one extra line naming both versions and `/upgrade-bridge`.
572
+ It tells the agent to mention the upgrade and to run it only if you say yes.
573
+ Failed tool calls count too.
574
+ - **Startup instructions.** If the local cache already shows a newer version, the
575
+ server's instructions to the agent say so from the first message.
576
+ - **A Claude Code `SessionStart` hook.** `install` and `upgrade` add one hook to
577
+ `.claude/settings.local.json`, pinned to the same version as your project's
578
+ launcher. It runs `check-update` and shows the notice at the start of a fresh
579
+ session. The hook is for Claude Code only and is per developer (that file is
580
+ gitignored). Bridge records the exact command in `.bridge/bridge-permissions.json`,
581
+ so a changed pin replaces it and removal deletes only that command. Cursor and
582
+ Codex have no hook; they get the startup instructions and the tool-result line.
583
+ - **`doctor` and `start-tickets`.** `doctor` shows `Bridge MCP version` beside the
584
+ package version, from a fresh lookup that does not touch the cache. `start-tickets`
585
+ prints one reminder to stderr when the cache shows a newer version.
586
+
587
+ The notice is decided without waiting for any lookup. While the latest version is
588
+ unknown, or a result cannot safely carry the extra line, the session keeps its
589
+ chance and tries again on a later call.
590
+
591
+ It stays **silent** when you are current, when the latest version is unknown, in
592
+ unattended worker sessions (`BAPI_WORKER_BRANCH` or `BAPI_EPIC_IMPLEMENTER_WORKER_ID`
593
+ set), and when `BAPI_MCP_UPDATE_CHECK_ENABLED` is off.
594
+
595
+ `BAPI_MCP_UPDATE_CHECK_FAKE_LATEST` is a manual-only override for trying the notice.
596
+ It must be a plain `MAJOR.MINOR.PATCH` release; anything else is ignored. It never
597
+ changes what `install` or `upgrade` pin to.
598
+
599
+ Two limits to know. The startup instructions and the hook read the cache the server
600
+ fills, so a machine that has never run the server may show no notice at session
601
+ start. And a cold, pinned `npx` launch of the hook can take longer than its
602
+ five-second timeout, in which case it stays silent; run `doctor`, or launch the
603
+ pinned CLI once, to warm it.
553
604
 
554
605
  Re-running `install` on an already-configured project is safe: it refreshes the
555
606
  scaffolded files without overwriting your stored credential unless you pass
@@ -589,15 +640,15 @@ The tools worth knowing for most tickets.
589
640
  - **Flags:** `--auto` auto-accept findings and skip the approval gates · `--rounds=1` a cheaper single-pass review that still evaluates findings and captures decisions · `--rounds=2` force the full second-opinion review · omit `--rounds` to let the difficulty-adaptive review policy decide.
590
641
 
591
642
  **2. Start Tickets**
592
- - **What it does:** Creates one git worktree per ticket and spawns an agent session in each to implement them in parallel.
643
+ - **What it does:** Builds several tickets at once, each in its own copy of the repo (a git worktree) with its own agent.
593
644
  - **When it's useful:** (Implementation | Automation) When you're ready to start building one or more refined tickets concurrently.
594
- - **How to use it:** `/start-tickets BAPI-248 BAPI-250` (see [CLI Subcommands](#cli-subcommands) for the full flag table and cross-platform behavior).
645
+ - **How to use it:** `/start-tickets BAPI-248 BAPI-250`
595
646
  - **Flags:** `--auto` skip the approval gates · `--base-branch <branch>` branch off something other than the default · `--workflow implement|review-and-implement` selects which slash command each spawned worktree runs · `--rounds=1|2` forwarded to the review phase, valid only with `--workflow review-and-implement` · `--tier cheap|basic|premium` strict manual model-routing override · `--auto-tier cheap|basic|premium` machine-carried raw tier for chained automation (posture-adjusted; used internally by the `/review-and-implement` handoff), mutually exclusive with `--tier`.
596
647
 
597
648
  **3. Review and Start**
598
- - **What it does:** Spawns one worktree per ticket; each session reviews the ticket inline and, after a per-ticket proceed/halt gate, hands off to a **fresh implementation session** that reuses the same worktree — review and implementation run in two separate agent contexts, not one shared session.
649
+ - **What it does:** Like Start Tickets, but each ticket is reviewed first and only built if it passes.
599
650
  - **When it's useful:** (Refinement | Implementation | Automation) The **recommended front door** for "review these tickets, then implement the ones that pass," starting from existing ticket keys (unlike `/idea-to-pr`, which only accepts an idea).
600
- - **How to use it:** `/review-and-start BAPI-248 BAPI-250` (single or multiple keys flow through the identical code path).
651
+ - **How to use it:** `/review-and-start BAPI-248 BAPI-250`
601
652
  - **Flags:** `--auto` auto-approves both the review and the implementation phase of every spawned session · `--rounds=1|2` forwarded to the review phase · `--agent`, `--base-branch`, `--max-parallel`, `--dry-run` mirror `/start-tickets`.
602
653
 
603
654
  **4. Define Tickets**
@@ -629,7 +680,7 @@ Good to know, but not needed every day.
629
680
  - **Flags:** Name the issue type (Bug / Story / Task / Epic) and, for a child ticket under an epic, the parent key.
630
681
 
631
682
  **2. Plan Ticket**
632
- - **What it does:** Generates a step-by-step implementation plan for a ticket that references real files in your codebase.
683
+ - **What it does:** Writes a step-by-step plan for a ticket that points at the real files to change.
633
684
  - **When it's useful:** (Refinement | Implementation) Once a ticket is solid and you want a concrete build plan before — or instead of — auto-implementing it.
634
685
  - **How to use it:** `/plan-ticket BAPI-123`
635
686
  - **Flags:** `--provider <name>` choose the model provider · `--second-opinion <provider>` cross-check the plan with a second provider.
@@ -659,9 +710,9 @@ Good to know, but not needed every day.
659
710
  - **Flags:** None.
660
711
 
661
712
  **7. Drive Epic Run**
662
- - **What it does:** Launches an Epic Implementer run through `drive-epic` after a preview and an explicit yes — or attaches to the epic's live run — then drives it to a terminal state, applying one sanctioned recovery verb at a time and keeping a written tally.
713
+ - **What it does:** Builds a whole epic for you. Bridge works through the child tickets in order, merges each one into the epic branch, and fixes routine problems along the way, so you only step in when it truly needs you. It shows you a preview and waits for your yes before it starts.
663
714
  - **When it's useful:** (Implementation | Automation) When an epic has an approved plan and you want its child tickets built and merged into the epic branch with one session watching the run.
664
- - **How to use it:** `/drive-epic-run <EPIC> [<plan path>]` — e.g. `/drive-epic-run BAPI-1145`; the plan is found automatically when the path is omitted.
715
+ - **How to use it:** `/drive-epic-run BAPI-1145`
665
716
  - **Flags:** None — the epic key and an optional plan path are the only arguments.
666
717
 
667
718
  ### Now and then
@@ -752,7 +803,7 @@ Useful once in a while.
752
803
  Slash commands that drive several tools at once. Start Tickets, Review and Start, and Define Tickets are documented above under [Regularly useful](#regularly-useful); Create Decision Page is documented above under [Occasionally useful](#occasionally-useful); Regression Check and Scan Test Coverage are documented above under [Now and then](#now-and-then) — the rest live here.
753
804
 
754
805
  **1. Implement Ticket**
755
- - **What it does:** Full build for one ticket: generate a plan, write the code, commit, open a PR, and monitor CI.
806
+ - **What it does:** Builds one ticket end to end: plans it, writes the code, opens a pull request, and watches CI.
756
807
  - **When it's useful:** (Implementation) When a ticket is ready and you want it taken from plan to open PR in one go.
757
808
  - **How to use it:** `/implement-ticket BAPI-123` (command only — "implement X" as free text almost always triggers a freehand build instead of the Bridge plan→code→PR→CI pipeline).
758
809
  - **Flags:** `--auto` skip the approval gates (e.g. auto-commit/push).
@@ -1048,74 +1099,26 @@ Attribute-definition reads and writes can return an attribute's `default_value`
1048
1099
 
1049
1100
  ## Epic Implementer
1050
1101
 
1051
- The Epic Implementer drives a whole epic, several related tickets, from an
1052
- approved plan to merged pull requests. It hands each child ticket to an agent on
1053
- your machine, waits for CI and code review, and merges each child PR into an
1054
- `epic/<KEY>` branch. A person merges the final pull request into your default
1055
- branch.
1056
-
1057
- By default a run with two or more tickets is **unattended**: it merges child
1058
- PRs on its own. `--attended` opts out.
1102
+ The Epic Implementer drives a whole epic, several related tickets, from an approved plan to merged pull requests. It hands each child ticket to an agent on your machine, waits for CI and code review, and merges each child PR into an `epic/<KEY>` branch. A person merges the final pull request into your default branch.
1059
1103
 
1060
- **What it requires**
1104
+ This is the one starting point. The same four steps work with Bridge's own ticket storage and with Jira:
1061
1105
 
1062
- - macOS or Linux, with `git`, the GitHub CLI (`gh`, logged in), the Claude Code
1063
- CLI (`claude`, logged in), and Worktrunk (`wt`) on your `PATH`.
1064
- - Bridge installed in the repository, and the Bridge GitHub App connected.
1065
- - The repository's Epic Implementer defaults, including the CI check each
1066
- ticket must pass (`install conductor`). For unattended runs, that check must
1067
- be a job in one of the two workflow files below, for example
1068
- `epic-implementer-ci / gate`.
1069
- - `.github/workflows/claude-review.yml` and
1070
- `.github/workflows/epic-implementer-ci.yml` on your default branch, then the
1071
- repository indexed (or re-indexed) after they merge. The epic branch is cut
1072
- from the indexed commit.
1073
- - For unattended runs: an escalation channel (the account email, or a webhook)
1074
- and a merge credential in `BAPI_LOCAL_MERGE_TOKEN`.
1106
+ 1. **Install.** `npx -y @bridge_gpt/mcp-server install` (skip it when Bridge is already installed).
1107
+ 2. **Set up.** `npx -y @bridge_gpt/mcp-server install conductor` checks everything, fixes what is missing, checks again, and ends with one verdict: "Ready for your first epic" or "Not ready: N steps left".
1108
+ 3. **Define the epic.** `/define-tickets` writes real child ticket keys, `epic-plan.dag.json`, and `epic-plan.meta.json`.
1109
+ 4. **Launch.** `/drive-epic-run <EPIC> [<plan path>]` previews, asks you once, creates the run through `drive-epic`, and drives it. From a shell, run `npx -y @bridge_gpt/mcp-server drive-epic <EPIC>`.
1075
1110
 
1076
- **How to set it up**
1111
+ **Read the guide: [Run your first epic](./docs/epic-implementer/getting-started.md).** It lists every prerequisite with its fix. `install` also copies it into your project at `docs/install/epic-implementer-install.md`, so you can ask your agent:
1077
1112
 
1078
- The easy way is to ask your agent:
1113
+ > Set up the Epic Implementer by following `docs/install/epic-implementer-install.md`. Run `npx -y @bridge_gpt/mcp-server install` to write or refresh that file.
1079
1114
 
1080
- > Set up the Epic Implementer by following `docs/install/epic-implementer-install.md`.
1115
+ Setup needs macOS or Linux, with `git`, the GitHub CLI (`gh`, signed in), the Claude Code CLI (`claude`, signed in), and Worktrunk (`wt`) on your `PATH`. By default a run with two or more tickets is **unattended**: it merges child PRs into the epic branch on its own. `--attended` opts out.
1081
1116
 
1082
- `install` copies that guide into your project. It is also in this package as
1083
- [EPIC-IMPLEMENTER-INSTALL.md](./docs/EPIC-IMPLEMENTER-INSTALL.md). It checks
1084
- each step, asks before anything that writes, and tells you which commands you
1085
- must run yourself.
1086
-
1087
- By hand, the outline is:
1088
-
1089
- ```bash
1090
- npx -y @bridge_gpt/mcp-server install # if Bridge is not installed yet
1091
- npx -y @bridge_gpt/mcp-server connect-github --repo <repo_name> # connect the GitHub App
1092
- npx -y @bridge_gpt/mcp-server install conductor --required-check "epic-implementer-ci / gate" \
1093
- --review-policy verdict_protocol \
1094
- --allowed-bot "<bot>" --secret-name <SECRET_NAME> --branches "<default branch>,epic/**" # AI review is opt-in; omit all four to skip the claude-review workflow
1095
- export BAPI_LOCAL_MERGE_TOKEN="$(gh auth token)" # in the shell that runs drive-epic
1096
- npx -y @bridge_gpt/mcp-server epic-implementer readiness --json # read-only check of every prerequisite
1097
- ```
1117
+ Merging child PRs needs a GitHub token. Setup can store one for this repository on your computer, under `github-merge:<host>/<owner>/<repo>` in your user credential store. `GITHUB_MERGE_TOKEN` still takes precedence when it is set.
1098
1118
 
1099
- After `install conductor`, restart your MCP client so the Epic Implementer tools
1100
- appear. Add `epic-implementer-ci.yml` (the guide has a template) and the
1101
- `claude-review.yml` that `install conductor` wrote (only when you opted in to AI review with `--review-policy verdict_protocol`), through a pull request into
1102
- your default branch. Once it merges, index the repository with
1103
- `/parse-repository`.
1119
+ `/plan-epic` is the advanced planner. It writes placeholder `TBD-N` keys, so you create the child tickets and run `emit-epic-implementer-bundle finalize` before `/drive-epic-run`. It never creates or approves a run.
1104
1120
 
1105
- **How to run an epic**
1106
-
1107
- 1. `/plan-epic <EPIC>` splits an existing epic ticket into child tickets and
1108
- writes a plan (`epic-plan.dag.json`). Its last step creates and approves an
1109
- unattended run.
1110
- 2. `/drive-epic-run <EPIC> [<plan path>]` previews, asks you once, starts the
1111
- run, and watches it to the end. It takes no flags. For `--attended` or
1112
- `--policy-file <path>`, use the shell instead:
1113
- `npx -y @bridge_gpt/mcp-server drive-epic <EPIC> --plan-file <path> [--attended]`.
1114
- 3. Monitor with the `get_epic_snapshot` and `explain_run` MCP tools, or
1115
- `npx -y @bridge_gpt/mcp-server notifications --repo <repo_name> --run <EPIC> --follow`.
1116
-
1117
- See [The Epic Implementer](#the-epic-implementer) for every command, and
1118
- [EPIC-IMPLEMENTER.md](./docs/EPIC-IMPLEMENTER.md) for the full reference.
1121
+ See [The Epic Implementer](#the-epic-implementer) for what each command is for, and [EPIC-IMPLEMENTER.md](./docs/EPIC-IMPLEMENTER.md) for the full reference.
1119
1122
 
1120
1123
  ## CLI Subcommands
1121
1124
 
@@ -1225,9 +1228,19 @@ onboarding/API setup, and Windsurf are outside packaged repair.
1225
1228
  The package also ships a strictly **read-only** `doctor` subcommand — titled **`bridge doctor — read-only diagnostics`** — that diagnoses your whole Bridge install without changing anything:
1226
1229
 
1227
1230
  ```
1228
- npx -y @bridge_gpt/mcp-server doctor [--agent <name>]
1231
+ npx -y @bridge_gpt/mcp-server doctor [--agent <name>] [--advanced]
1229
1232
  ```
1230
1233
 
1234
+ By default `doctor` works on a repository in any language: it makes **no `uv`,
1235
+ Alembic, or Python call**. `--advanced` adds the Python and self-host
1236
+ diagnostics — the `uv` check and the local plane credential section — for
1237
+ bridge-api and self-hosting owners.
1238
+
1239
+ Right after `Install status`, a **Getting started** section shows the two
1240
+ sign-ins a first epic needs: your Claude sign-in (it reads only `~/.claude.json`)
1241
+ and your GitHub CLI sign-in (one `gh auth status`, ten seconds at most). Each one
1242
+ that is not ready names its one fix. It never changes the exit code.
1243
+
1231
1244
  The report always leads with the advisory **`Install status`** section (repo identity, credential resolution, server connectivity, bootstrap-field completeness, integration credentials, indexing state) **before** the `start-tickets` prerequisite diagnostics; the launcher-cache and MCP tool-surface sections follow. `Install status` is read-only GETs only and never affects the exit code.
1232
1245
 
1233
1246
  The report also includes a **Claude login** advisory: whether the host's own
@@ -1236,7 +1249,7 @@ blocks the doctor run and cannot guarantee the next worker spawn will
1236
1249
  authenticate. See
1237
1250
  [Claude login for Epic Implementer workers](#claude-login-for-epic-implementer-workers).
1238
1251
 
1239
- It is **read-only**: it never installs anything, modifies your system, adds an npm `postinstall`, spawns a terminal, or starts the MCP server, and there is no `--fix`. For each prerequisite it prints found/missing and, when missing, the exact per-OS install command **as a manual instruction you run yourself**. The checked set is the `start-tickets` preflight prerequisites **plus `uv`** **plus the selected agent's command** (`claude` by default, or `cursor-agent` with `--agent cursor-agent`). The Worktrunk binary is probed via the resolved name (honoring `BAPI_WORKTRUNK_BIN`), not a hard-coded one. **Exit code:** `0` when all required prerequisites are present, non-zero when any is missing or the platform is unsupported. A failing `start-tickets` preflight now hints you to run `doctor` for an actionable diagnostics report.
1252
+ It is **read-only**: it never installs anything, modifies your system, adds an npm `postinstall`, spawns a terminal, or starts the MCP server, and there is no `--fix`. For each prerequisite it prints found/missing and, when missing, the exact per-OS install command **as a manual instruction you run yourself**. The checked set is the `start-tickets` preflight prerequisites **plus the selected agent's command** (and **`uv`** with `--advanced`) (`claude` by default, or `cursor-agent` with `--agent cursor-agent`). The Worktrunk binary is probed via the resolved name (honoring `BAPI_WORKTRUNK_BIN`), not a hard-coded one. **Exit code:** `0` when all required prerequisites are present, non-zero when any is missing or the platform is unsupported. A failing `start-tickets` preflight now hints you to run `doctor` for an actionable diagnostics report.
1240
1253
 
1241
1254
  **`claude-review` workflow lineage (advisory, read-only).** `doctor` also reports
1242
1255
  whether the current branch's `.github/workflows/claude-review.yml` matches the
@@ -1256,203 +1269,50 @@ worker**. Remedy and full diagnosis:
1256
1269
 
1257
1270
  ### The Epic Implementer
1258
1271
 
1259
- The Epic Implementer drives a whole epic — several related tickets — from an
1260
- approved plan to merged pull requests, with little help from you. It was called
1261
- the "conductor" before BAPI-1077..1083 renamed it. A few command, flag, and path
1262
- names still say `conductor`; each is noted where it appears.
1272
+ The Epic Implementer drives a whole epic — several related tickets — from an approved plan to merged pull requests, with little help from you. The getting-started guide in [the section above](#epic-implementer) is the one path; this section says what each command is for.
1263
1273
 
1264
1274
  It has two parts:
1265
1275
 
1266
- - **The v2 engine.** A reconciler on the Bridge API server decides every step. An
1267
- executor on your machine runs the jobs it hands out, one agent session per child
1268
- ticket. This is what drives an epic.
1269
- - **Observability** (`start-tickets --conductor`). An opt-in local event ledger,
1270
- supervisor tab, and git hooks. It is off by default, and driving an epic does not
1271
- need it.
1272
-
1273
- The path from an epic to a finished run:
1274
-
1275
- 1. **Plan.** `/plan-epic` splits the epic into child tickets and a plan DAG
1276
- (`epic-plan.dag.json`). `emit-epic-implementer-bundle finalize` writes the DAG
1277
- and the meta file that `drive-epic` uses to find it.
1278
- 2. **Set up the repository, once.**
1279
- `npx -y @bridge_gpt/mcp-server install conductor --required-check <check>`
1280
- (also spelled `install-bridge conductor`; the name predates the rename). It runs
1281
- a read-only doctor and writes the done gate from your required CI check(s). It
1282
- can also scaffold the `claude-review` workflow (only with the explicit AI-review opt-in, `--review-policy verdict_protocol`; omitting the flag persists no repository review choice and scaffolds none), write an executor service unit,
1283
- and save a launch profile. With its own consent, it adds `epic_implementer` to
1284
- `BRIDGE_MCP_PROFILE` in your host MCP configs. Run `install conductor --help`
1285
- for every option.
1286
- 3. **Launch and drive.** In Claude Code, `/drive-epic-run <EPIC> [<plan path>]`
1287
- previews the launch, asks you once, creates the run through `drive-epic`, and
1288
- then watches and recovers it. From a shell, [`drive-epic <EPIC>`](#drive-epic)
1289
- creates the run and starts its executor.
1290
- 4. **Monitor.** The MCP tools `get_epic_snapshot` and `explain_run` (they need the
1291
- `epic_implementer` profile; see [Environment Variables](#environment-variables)),
1292
- `notifications <EPIC|run-id> [--follow]`, `epic-implementer epic-status`, and
1293
- `executor watch <job>`.
1294
- 5. **Recover.** `epic-implementer unpark`, `adopt-current-head-and-unpark`,
1295
- `continue-child`, `resume-run`, `stop-run`, and `abandon-run` (terminal and
1296
- irreversible). Run `npx -y @bridge_gpt/mcp-server epic-implementer --help` for
1297
- the full list.
1298
-
1299
- `epic-implementer readiness` is a read-only report of every prerequisite, the
1300
- unattended ones included, each with its state and one named fix. The full
1301
- reference — architecture, the CI gate, supervisor config, observability, and git
1302
- hooks — is in [EPIC-IMPLEMENTER.md](./docs/EPIC-IMPLEMENTER.md).
1303
-
1304
- **Old variable names stop every command (BAPI-1190).** Every `BAPI_CONDUCTOR_*`
1305
- variable was renamed to `BAPI_EPIC_IMPLEMENTER_*`, and the few old `CONDUCTOR_*`
1306
- names without the `BAPI_` prefix (the node path, for one) now start with
1307
- `EPIC_IMPLEMENTER_`. There are no aliases. If any old name is set, every
1308
- entry point — the MCP server included — prints the old names and exits `1`.
1309
- Rename or unset them.
1276
+ - **The engine.** A reconciler on the Bridge API server decides every step. An executor on your machine runs the jobs it hands out, one agent session per child ticket. This is what drives an epic.
1277
+ - **Observability** (`start-tickets --conductor`). An opt-in local event ledger, supervisor tab, and git hooks. It is off by default, and driving an epic does not need it.
1278
+
1279
+ What each command is for:
1280
+
1281
+ - **`install conductor`** sets up the repository, once. It checks, fixes what is missing, checks again, and ends with one verdict. It is also spelled `install-bridge conductor`, and `install conductor --help` lists every option.
1282
+ - **`/define-tickets`** writes the child tickets and the plan files. **`/plan-epic`** is the advanced planner; it needs `emit-epic-implementer-bundle finalize` and never creates a run.
1283
+ - **`/drive-epic-run <EPIC> [<plan path>]`** previews the launch, asks you once, creates the run through [`drive-epic`](#drive-epic), then watches and recovers it. In Claude Code it first checks whether Bridge's auto-mode sandbox description is in `~/.claude/settings.json`. Only when it is missing, it asks you once, in the session, and writes it only after an explicit yes. You can add it yourself with `npx -y @bridge_gpt/mcp-server bridge-permissions` (run from the project root; it asks first), inspect it with `bridge-permissions --check --json`, and remove it with `install --remove-bridge-permissions`. `install` itself never touches that file.
1284
+ - **Monitor** with the MCP tools `get_epic_snapshot` and `explain_run` (they need the `epic_implementer` profile; see [Environment Variables](#environment-variables)), `notifications <EPIC|run-id> [--follow]`, `epic-implementer epic-status`, and `executor watch <job>`.
1285
+ - **Recover** with `epic-implementer unpark`, `adopt-current-head-and-unpark`, `continue-child`, `resume-run`, `stop-run`, and `abandon-run` (terminal and irreversible). Run `npx -y @bridge_gpt/mcp-server epic-implementer --help` for the full list.
1286
+
1287
+ `epic-implementer readiness` is a read-only report of every prerequisite, the unattended ones included, each with its state and one named fix.
1288
+
1289
+ **Old variable names stop every command.** Every `BAPI_CONDUCTOR_*` variable was renamed to `BAPI_EPIC_IMPLEMENTER_*`, and the few old `CONDUCTOR_*` names without the `BAPI_` prefix (the node path, for one) now start with `EPIC_IMPLEMENTER_`. There are no aliases. If any old name is set, every entry point — the MCP server included — prints the old names and exits `1`. Rename or unset them.
1310
1290
 
1311
1291
  ### `drive-epic`
1312
1292
 
1313
- The one Epic Implementer entry point every Bridge surface names. Give it an epic
1314
- key and it reads Epic Implementer readiness for your repository and routes to the
1315
- single path your project can actually run:
1293
+ The one launch command. Give it an epic key and it reads your repository's readiness and routes to the single path your project can run:
1316
1294
 
1317
1295
  ```
1318
1296
  npx -y @bridge_gpt/mcp-server drive-epic <EPIC>
1319
1297
  ```
1320
1298
 
1321
- You are never asked to choose. `drive-epic` routes to exactly one engine, the
1322
- v2 engine — one transition authority per epic is what keeps an epic from wedging.
1323
- Readiness green routes to the v2 bootstrap below (pass `--plan-file`
1324
- and `drive-epic` runs it for you); readiness not green reports that the v2 engine
1325
- is not ready to drive this epic — there is no alternative engine to fall back
1326
- to — and prints no run command. If readiness is **unknown** — unreachable,
1327
- unauthorized, or malformed — it escalates and prints no run command at
1328
- all, because an unknown owner is not the same as a not-ready one. No branch,
1329
- including every error path, ever offers you two paths.
1330
-
1331
- `drive-epic` owns no branch behavior of its own — it forwards `--feature-branch
1332
- <name>`, `--into-base`, and `--attended` verbatim to `setup-epic`, which decides
1333
- the strategy and the posture (see below). With none of them, a multi-ticket epic
1334
- runs on `epic/<KEY>`, unattended. It also forwards `--repo` and the policy flags:
1335
- `--policy-file <path>` (the complete run policy), `--review-policy <src>` (a
1336
- per-run review policy: `repository_policy`, `verdict_protocol`,
1337
- `native_review_decision`, or `none`; omitted, the server stamps `repository_policy`
1338
- at first approval for a new feature-branch run, and `verdict_protocol` is the
1339
- explicit AI-review opt-in), and `--replace-policy` (allow replacing a live run's
1340
- stored policy).
1341
-
1342
- **Every run gets an executor (BAPI-1279).** Once `drive-epic` creates a run, it
1343
- starts an executor scoped to that run in the background, from this checkout's Git
1344
- top level. The executor claims only that run's jobs, logs to
1345
- `.bridge/executors/<run>.log`, and exits on its own when the run is done or
1346
- abandoned. You do not start one by hand. Run `drive-epic` from a Git work tree
1347
- inside the target repository — it checks this before creating anything. If the
1348
- executor fails to start, the run is left intact and `drive-epic` prints the log
1349
- path and the exact command to start it by hand.
1350
-
1351
- **Choosing the server.** With no flags, `drive-epic` targets production and uses
1352
- the stored `bapi:<repo>` key when there is one. `--base-url <url>` (or
1353
- `BAPI_BASE_URL`) names another server. `--launch-profile <name>` (or
1354
- `BAPI_EPIC_LAUNCH_PROFILE`) selects a host-local profile saved by
1355
- `install conductor --launch-profile <name>`; use one for a local server or a
1356
- durable host. With a profile, `--base-url` must agree with it. A stored key
1357
- approved for a different endpoint is never sent.
1358
-
1359
- **Finding the plan from the epic key (BAPI-1285).** `--plan-file` is optional.
1360
- Without it, `drive-epic` searches `{docs_dir}/epic-plans/*/epic-plan.meta.json` for a
1361
- file whose `epic_key` is exactly this epic (`docs_dir` is `BAPI_DOCS_DIR`, else
1362
- `docs/tmp`, resolved against the Git top level; an absolute `BAPI_DOCS_DIR` is used
1363
- as given). Exactly one match with a sibling `epic-plan.dag.json` is used as if you
1364
- had passed `--plan-file`, and its path is printed before anything is created. Zero
1365
- matches, two or more, or an unusable meta file **stop** with the paths found and
1366
- create nothing, and a folder name, a child ticket key, or
1367
- `sibling-ticket-manifest.json` is never used to guess. A supplied `--plan-file`
1368
- always wins and discovery does not run.
1369
-
1370
- The meta file is `{"epic_key": "<KEY>"}`, written by `emit-epic-implementer-bundle
1371
- finalize` beside the DAG (its own atomic write, reported as `meta_path` in
1372
- `--json`). It is separate from `epic-plan.dag.json` on purpose: the DAG is sent to
1373
- the server, which rejects unknown fields. A plan finalized before this change has no
1374
- meta file, so it is reported as not found — pass its DAG with `--plan-file`.
1375
-
1376
- **A live run with no plan.** If the epic already has a live run and no plan was
1377
- supplied or found, `drive-epic` creates nothing. It makes sure that run has an
1378
- executor: it reuses a verified live one (never starting a second), starts one when
1379
- the old one is gone, starts none for a durable launch profile with a confirmed
1380
- repo-wide executor, and starts none when this checkout's plane is bound to that
1381
- run. An epic with several active runs (`live-run-ambiguous`), or a run that cannot
1382
- be read (`live-run-unknown`), is refused by name.
1383
-
1384
- **Preview with `--dry-run`.** `drive-epic <EPIC> --dry-run` is read-only. It reads
1385
- the target, readiness, the live run, and the plan, runs the bootstrap's own dry-run
1386
- validation when a plan is available, and reports the decision a real invocation
1387
- would make — `create`, `attach`, `refuse`, or `stop` (exit `0` for the first two,
1388
- `1` for the others). It never creates a run, cuts a branch, starts a plane,
1389
- requests a lane, or starts or signals an executor. With `--json` (valid only with
1390
- `--dry-run`) stdout carries exactly one JSON document with `epic_key`, `target`,
1391
- `readiness`, `live_run`, `plan`, `summary`, `decision`, and `refusal`. The
1392
- readiness `reason_id` and `remedy` are the strings the real refusal prints. The
1393
- webhook URL, credentials, and policy contents are never included. The preview
1394
- probes a local plane only when the target is a loopback plane, readiness failed on
1395
- the network, and a plan is available. A refused port plus passing local preflight
1396
- yields a conditional
1397
- `create` with optional `cold_start` (`plane_endpoint`, `will_start_plane: true`,
1398
- `live_run_checked: false`), `live_run: null`, and partial offline setup validation.
1399
- The real launch attempts guarded startup, then rechecks run existence and server
1400
- validation; the preview does not guarantee creation. Remote targets, non-refused
1401
- port probes, and ordinary production previews keep their existing refusal or
1402
- create behavior. `target.source` is optional and appears only for selected
1403
- profiles (`profile` or `profile-env`).
1404
-
1405
- #### Running the server yourself (Bridge API source checkout only)
1406
-
1407
- The rest of this section, and [`plane up`](#plane-up--claim-scope-is-required)
1408
- below, apply only when you run the Bridge API server on your own machine. That
1409
- needs a Bridge API **source checkout**: `plane up` must run from its repository
1410
- root (the directory holding `main.py`, `worker.py`, and `alembic.ini`), and its
1411
- executor lanes run from that checkout's `mcp_server/build/index.js`, never from
1412
- npx. If you target production, skip this part.
1413
-
1414
- **The composed bring-up is two-phase (BAPI-1102).** With `--plan-file` on a
1415
- repository whose readiness is missing only the runtime facts, one invocation runs,
1416
- in order: the **control plane** (Bridge API server + reconciler, each gated on its
1417
- own readiness), then `setup-epic` to create and approve the run, then **executor
1418
- lanes scoped to that run** with `--epic-run-id <run>`, then the **dead-man
1419
- observer** last, then the ready banner. The order is forced: an executor lane must
1420
- carry an explicit claim scope, and the run it is scoped to does not exist until the
1421
- server is up and `setup-epic` has run.
1422
-
1423
- A plane's executor lanes serve **exactly one** run — the run it is bound to. A
1424
- second epic does **not** start a second plane: it attaches to the running plane's
1425
- reconciler and gets its own run-scoped executor. Two planes on one database are
1426
- not supported. If `setup-epic` fails, the control plane is left running and **no
1427
- executor lane is spawned**. If the lanes fail to become ready, the control plane
1428
- and the committed run are both left intact and the observer is not started —
1429
- nothing is rolled back, because a local process that failed to start says nothing
1430
- about whether the run is valid.
1431
-
1432
- "Plane ready" reports **processes**, not dispatchability: if the run cuts an epic
1433
- branch, the reconciler holds ticket dispatch until that branch's index scope
1434
- finishes preparing.
1435
-
1436
- ### `plane up` — claim scope is required
1437
-
1438
- `plane up` starts the runtime on its own, from a Bridge API source checkout, and
1439
- every executor lane it starts needs an explicit claim scope:
1299
+ You are never asked to choose. If readiness is not green, it names each missing item with its fix and creates nothing. If readiness cannot be read (unreachable, unauthorized, or malformed), it stops and prints no run command, because an unknown state is not the same as a not-ready one.
1440
1300
 
1441
- ```
1442
- npx -y @bridge_gpt/mcp-server plane up --epic-run-id <run-id> # repeatable
1443
- npx -y @bridge_gpt/mcp-server plane up --repo-wide # or repository-wide
1444
- ```
1301
+ `drive-epic` owns no branch behavior of its own. It forwards `--feature-branch <name>`, `--into-base`, and `--attended` to `setup-epic`, which decides the strategy and the posture (see [`setup-epic`](#setup-epic)). With none of them, a multi-ticket epic runs on `epic/<KEY>`, unattended. It also forwards `--repo` and the policy flags: `--policy-file <path>` (the complete run policy), `--review-policy <src>` (a per-run review policy: `repository_policy`, `verdict_protocol`, `native_review_decision`, or `none`; omitted, the server stamps `repository_policy` at first approval for a new feature-branch run, and `verdict_protocol` is the explicit AI-review opt-in), and `--replace-policy` (allow replacing a live run's stored policy).
1302
+
1303
+ **Every run gets an executor.** Once `drive-epic` creates a run, it starts an executor scoped to that run in the background, from this checkout's Git top level. The executor claims only that run's jobs, logs to `.bridge/executors/<run>.log`, and exits on its own when the run is done or abandoned. You do not start one by hand. Run `drive-epic` from a Git work tree inside the target repository; it checks this before creating anything. If the executor fails to start, the run is left intact and `drive-epic` prints the log path and the exact command to start it by hand.
1304
+
1305
+ **Choosing the server.** With no flags, `drive-epic` targets production and uses the stored `bapi:<repo>` key when there is one. `--base-url <url>` (or `BAPI_BASE_URL`) names another server. A stored key approved for a different endpoint is never sent.
1306
+
1307
+ **Finding the plan from the epic key.** `--plan-file` is optional. Without it, `drive-epic` searches `{docs_dir}/epic-plans/*/epic-plan.meta.json` for a file whose `epic_key` is exactly this epic (`docs_dir` is `BAPI_DOCS_DIR`, else `docs/tmp`, resolved against the Git top level; an absolute `BAPI_DOCS_DIR` is used as given). Exactly one match with a sibling `epic-plan.dag.json` is used as if you had passed `--plan-file`, and its path is printed before anything is created. Zero matches, two or more, or an unusable meta file **stop** with the paths found and create nothing. A folder name, a child ticket key, or `sibling-ticket-manifest.json` is never used to guess. A supplied `--plan-file` always wins and discovery does not run.
1308
+
1309
+ The meta file is `{"epic_key": "<KEY>"}`, written beside the DAG by `/define-tickets` and by `emit-epic-implementer-bundle finalize` (reported as `meta_path` in `--json`). It is separate from `epic-plan.dag.json` on purpose: the DAG is sent to the server, which rejects unknown fields. A plan finalized before the meta file existed has none, so pass its DAG with `--plan-file`.
1310
+
1311
+ **A live run with no plan.** If the epic already has a live run and no plan was supplied or found, `drive-epic` creates nothing. It makes sure that run has an executor: it reuses a verified live one (never starting a second) and starts one when the old one is gone. An epic with several active runs (`live-run-ambiguous`), or a run that cannot be read (`live-run-unknown`), is refused by name.
1445
1312
 
1446
- The two are mutually exclusive. Asked to start lanes with neither, `plane up`
1447
- **refuses before spawning anything**, in the executor's own words. That is not a
1448
- new restriction — an executor started with no claim scope has refused to start
1449
- since BAPI-1026 — it is that refusal moved to where it is actionable, instead of
1450
- surfacing as a member crash and a full plane rollback.
1313
+ **Preview with `--dry-run`.** `drive-epic <EPIC> --dry-run` is read-only. It reads the target, readiness, the live run, and the plan, runs the bootstrap's own dry-run validation when a plan is available, and shows the decision a real invocation would make: `create`, `attach`, `refuse`, or `stop` (exit `0` for the first two, `1` for the others). It never creates a run, cuts a branch, requests a lane, or starts or signals an executor. With `--json` (valid only with `--dry-run`) stdout carries exactly one JSON document with `epic_key`, `target`, `readiness`, `live_run`, `plan`, `summary`, `decision`, and `refusal`. The readiness `reason_id` and `remedy` are the strings the real refusal prints. The webhook URL, credentials, and policy contents are never included.
1451
1314
 
1452
- `plane status` reports the lifecycle phase (control plane starting/ready, lanes
1453
- starting/ready, observer active, plane ready) and the epic run the plane is bound
1454
- to. `plane down` handles every intermediate phase: it stops the bound run first,
1455
- then signals the recorded process group.
1315
+ `drive-epic --help` lists every option. Owners who run their own Bridge server have extra steps: see `drive-epic --help-advanced`.
1456
1316
 
1457
1317
  ### `setup-epic`
1458
1318
 
@@ -1470,20 +1330,20 @@ branch, and one draft integration PR targets the repository base branch. This ho
1470
1330
  every path, CI and `--json` included. A single-node plan keeps the repository base
1471
1331
  branch, matching plain `start-tickets`.
1472
1332
 
1473
- > **Behavior change (BAPI-1009).** The same no-flag command previously ran children
1333
+ > **Behavior change.** The same no-flag command previously ran children
1474
1334
  > directly into the repository base branch. **Pass `--into-base` to restore that**, if
1475
1335
  > your automation depends on it. Pass `--feature-branch <name>` to override the derived
1476
1336
  > name, or to force a branch for a single-node plan. Passing both is a parse error,
1477
1337
  > refused before any file read, credential resolution, or network call.
1478
1338
 
1479
- **A run that selects an epic branch is created UNATTENDED (BAPI-1102).** Its
1339
+ **A run that selects an epic branch is created UNATTENDED.** Its
1480
1340
  `policy_json` carries `posture: "unattended"` and `v2_auto_merge_enabled: true`, so
1481
1341
  child PRs merge into the epic branch without parking for a human at every gate. The
1482
1342
  **integration PR into the repository base branch stays human-gated.** The run's CI
1483
1343
  gate is stamped **server-side at first approval** — from your repository's declared
1484
1344
  default, or, when it declares none, as an explicit recorded `no_ci_gate` mode.
1485
1345
 
1486
- > **Behavior change (BAPI-1102).** Pass `--attended` to restore the previous
1346
+ > **Behavior change.** Pass `--attended` to restore the previous
1487
1347
  > composition: `base_branch` plus an explicitly requested `--review-policy`, with no
1488
1348
  > posture and no auto-merge authorization. `--into-base`, single-node plans, and
1489
1349
  > branch-silent invocations are **unchanged** — they send no `policy_json` at all,
@@ -1494,7 +1354,7 @@ default, or, when it declares none, as an explicit recorded `no_ci_gate` mode.
1494
1354
  An unattended run has two **repository** prerequisites — consent
1495
1355
  (`unattended_epic_implementer_allowed`, ON by default; the repository owner can switch
1496
1356
  "Allow unattended Epic Implementer runs" off and on in the Bridge admin panel's Setup
1497
- page) and an **escalation channel** (BAPI-1274): a verified notify webhook, or,
1357
+ page) and an **escalation channel**: a verified notify webhook, or,
1498
1358
  when the policy declares no webhook, an email address on the account — plus
1499
1359
  confirmed default-branch review/CI workflows. Each is refused by name **before any
1500
1360
  run row is created** (`target_not_allowed`, `webhook_unverified`,
@@ -1504,33 +1364,52 @@ to email, and `notify.local_sink` does not count as a channel.
1504
1364
  `epic-implementer readiness` and `drive-epic` both list these prerequisites with
1505
1365
  their current state.
1506
1366
 
1507
- Once the plan is approved, the **server-side reconciler** picks the run up within
1508
- ~30s. If you ran `setup-epic` directly, start an executor for the run yourself
1509
- (`drive-epic` does this for you). An executor needs exactly one claim scope, or it
1510
- refuses to start:
1367
+ **One switch decides a run's own merges.** A run's child merges into its
1368
+ epic branch follow the Setup-page switch "Allow unattended Epic Implementer runs".
1369
+ They do not read the legacy repository flags (`auto_merge_enabled`,
1370
+ `merge_approval_required`), which still govern merges made outside a run (the plain
1371
+ merge route, the approval route, and the `merge_pull_request` tool). The integration
1372
+ PR into the base branch is never eligible. If the switch is turned off mid-run, the
1373
+ reconciler **holds** each child that reaches merging: `explain_run` shows a pending
1374
+ `unattended_posture_off` observation, no job is created, and no attempt is spent.
1375
+ Turning the switch back on resumes merging on the next tick with no `unpark`. A hold
1376
+ longer than the merging gate's deadline parks through the normal watchdog. A local or
1377
+ machine-token merge already handed to the executor before the switch-off may still
1378
+ finish.
1379
+
1380
+ **Launch capability summary.** An unattended `drive-epic` launch, and its
1381
+ `--dry-run`, check three rows before creating a run: the **unattended posture** (the
1382
+ Setup switch), **merge credential capability**, and **worktree preparation**. The
1383
+ server reports the resolved merge mode and the GitHub `owner/name`. In `local` mode the
1384
+ CLI probes `GITHUB_MERGE_TOKEN`, and in `machine_token` mode `BAPI_MACHINE_MERGE_TOKEN`,
1385
+ with `gh api --include repos/{owner}/{name}` and one pull-request read. Pass means the
1386
+ token has push permission and can read pull requests. `github_actions` mode shows one
1387
+ informational row and runs no local probe. The worktree row checks, without writing,
1388
+ that the executor clone's git `info/exclude` is present or writable.
1389
+
1390
+ Each row carries a `blocking` flag. Only a **proven** problem blocks: the switch is off,
1391
+ the token is missing or invalid, a `404` or a `200` without push permission, or an
1392
+ exclude that is neither present nor writable. A `401`, `403`, `429`, `5xx`, a network
1393
+ error, a timeout, an unresolved repository, a non-local executor clone (a plane lane
1394
+ or a durable launch profile), or an older server that does not report the new fields
1395
+ is a **"capability not verified"** warning, not a refusal. `--attended` and
1396
+ `--into-base` make all three rows informational. The probe does not prove branch
1397
+ protection or rulesets; those are still checked at merge time. Upgrade the server
1398
+ before the MCP package: an older server simply yields the warning.
1399
+
1400
+ Once the plan is approved, the **server-side reconciler** picks the run up within ~30s. If you ran `setup-epic` directly, start an executor for the run yourself (`drive-epic` does this for you). An executor needs exactly one claim scope, or it refuses to start, and it needs `--base-url` or `BAPI_BASE_URL`:
1511
1401
 
1512
1402
  ```
1513
1403
  npx -y @bridge_gpt/mcp-server executor --repo <name> --epic-run-id <run-id> --exit-when-run-terminal
1514
- npx -y @bridge_gpt/mcp-server executor --repo <name> --repo-wide # every run in the repo
1515
1404
  ```
1516
1405
 
1517
- `executor install-service` generates a launchd/systemd user unit so a durable
1518
- executor survives a reboot. `--base-url` or `BAPI_BASE_URL` is required: the
1519
- executor has no production fallback.
1406
+ For durable hosts, see `drive-epic --help-advanced`.
1520
1407
 
1521
1408
  ### Epic Implementer reference
1522
1409
 
1523
- The full reference — the v2 architecture (server-side reconciler + local
1524
- executor), the CI gate, `epic-implementer install-git-hooks`, the supervisor
1525
- `done_gate_config` / `auto_merge_enabled` settings, and the opt-in observability
1526
- stream — lives in **[EPIC-IMPLEMENTER.md](./docs/EPIC-IMPLEMENTER.md)**.
1527
- Auto-merge into the epic branch is **on by default** for unattended runs (see
1528
- [`setup-epic`](#setup-epic)); only the `--conductor` observability layer is off by
1529
- default.
1410
+ The full reference — how the engine works, the CI gate, `epic-implementer install-git-hooks`, the supervisor `done_gate_config` / `auto_merge_enabled` settings (which govern merges outside a run; a run's own merges follow the Setup-page switch), and the opt-in observability stream — is in **[EPIC-IMPLEMENTER.md](./docs/EPIC-IMPLEMENTER.md)**. It is a reference, not a second walkthrough: start with the [Epic Implementer](#epic-implementer) section above.
1530
1411
 
1531
- Two retired names remain as failing pointers. The event-ledger CLI was renamed
1532
- from `conductor` to `epic-implementer`, and `emit-conductor-bundle` to
1533
- `emit-epic-implementer-bundle`; the old names now print the new name and exit.
1412
+ Two retired names remain as failing pointers: the old event-ledger CLI name and `emit-conductor-bundle`. Both print the new name (`epic-implementer`, `emit-epic-implementer-bundle`) and exit.
1534
1413
 
1535
1414
  > The v1 `epic-implementer epic-tick` command is **frozen** — it throws on every invocation. There is nothing to schedule locally, and `epic-implementer doctor` flags any epic-tick schedule left over from an earlier release so you can cancel it.
1536
1415
 
@@ -1588,23 +1467,26 @@ Optionally set a repository Actions **variable** named `BAPI_BASE_URL` to point
1588
1467
 
1589
1468
  #### Merge credentials (`local` and `machine_token` modes)
1590
1469
 
1591
- No merge path reads an ambient `gh` login. Each mode reads exactly one
1592
- process-launch configuration key, with **no fallback** between them and none to
1593
- an inherited `GH_TOKEN`, `GITHUB_TOKEN`, a `gh auth` session, or the Bridge
1594
- credential store. Bridge never stores either value.
1470
+ No merge path reads an ambient `gh` login. The two modes are separate, with **no
1471
+ fallback** between them and none to an inherited `GH_TOKEN`, `GITHUB_TOKEN`, or a
1472
+ `gh auth` session.
1595
1473
 
1596
1474
  | Mode | Key | Provenance |
1597
1475
  |---|---|---|
1598
- | `local` | `BAPI_LOCAL_MERGE_TOKEN` | A configured local scoped credential. |
1599
- | `machine_token` | `BAPI_MACHINE_MERGE_TOKEN` | Your machine user's credential. |
1476
+ | `local` | `GITHUB_MERGE_TOKEN`, then `BAPI_LOCAL_MERGE_TOKEN`, then a stored entry | A scoped GitHub token for this repository. Setup can store one on your computer as `github-merge:<host>/<owner>/<repo>` in `~/.config/bridge/credentials.json`; either environment variable takes precedence over it. |
1477
+ | `machine_token` | `BAPI_MACHINE_MERGE_TOKEN` | Your machine user's credential, read from the environment only. A stored `github-merge:` entry does not configure this mode. |
1600
1478
 
1601
- Supply them at process launch, or from an approved external secret manager.
1479
+ Supply environment keys at process launch, or from an approved external secret manager.
1480
+
1481
+ A probe that passes shows the key has push permission and can read pull requests.
1482
+ It does not prove branch protection or repository rules; those are checked at merge time.
1602
1483
 
1603
1484
  | Preflight outcome | Remediation |
1604
1485
  |---|---|
1605
- | `*_credential_missing` | Set the mode's key in the environment this MCP server is launched with. |
1486
+ | `*_credential_missing` | Set the mode's key in the environment this MCP server is launched with. For `local` mode, setup can instead store a token for this repository. |
1606
1487
  | `*_credential_invalid` | GitHub rejected the configured credential. Rotate it and relaunch. |
1607
- | `*_credential_unpermitted` | It authenticates but cannot write to this repository. Grant it merge permission. |
1488
+ | `*_credential_unpermitted` | GitHub answered `404`, or `200` without push permission, for this repository. Grant it push access. |
1489
+ | capability probe unavailable | GitHub answered `401`, `403`, `429`, or `5xx`, or the probe timed out. At launch this is a "capability not verified" warning; at merge time the merge is refused. Retry, then check the token by hand. |
1608
1490
  | `local_gh_unavailable` | Install the GitHub CLI (`gh`) on the machine running this MCP server. |
1609
1491
 
1610
1492
  #### What the workflow does and does not do
@@ -1724,7 +1606,7 @@ If a custom pipeline has the same key as a built-in pipeline, the custom version
1724
1606
  | `BAPI_PLANE_PYTHON` | No | `python` | Executable used for the Python members of `plane up` (Bridge API source checkout only). Point it at a venv interpreter when `python` on `PATH` is not the one you want |
1725
1607
  | `BAPI_PLANE_UVICORN` | No | `uvicorn` | Executable used for the server member of `plane up` |
1726
1608
  | `BAPI_PLANE_PORT` | No | `8000` | Port for the local plane server (`127.0.0.1`). Only for `plane up` and a local `drive-epic` target, from a Bridge API source checkout |
1727
- | `BAPI_EPIC_LAUNCH_PROFILE` | No | _(none)_ | Selects a host-local launch profile (saved by `install conductor --launch-profile`) for `drive-epic`. `--launch-profile` takes precedence. See [`drive-epic`](#drive-epic) |
1609
+ | `BAPI_EPIC_LAUNCH_PROFILE` | No | _(none)_ | Selects a host-local launch profile (saved by `install conductor --launch-profile`) for `drive-epic`. `--launch-profile` takes precedence. See `drive-epic --help-advanced` |
1728
1610
  | `BAPI_DOCS_DIR` | No | `docs/tmp` | Local directory for saving plans, critiques, and research reports |
1729
1611
  | `BAPI_PIPELINES_DIR` | No | `.bridge/pipelines` | Directory for user-defined custom pipeline JSON files |
1730
1612
  | `BAPI_WORKTRUNK_BIN` | No | `wt` (`git-wt` on Windows) | Override the Worktrunk executable name/path used by `start-tickets` for nonstandard installs |
@@ -1732,7 +1614,7 @@ If a custom pipeline has the same key as a built-in pipeline, the custom version
1732
1614
  | `BAPI_MCP_UPGRADE_ADVICE_ENABLED` | No | _(enabled)_ | MCP-local opt-out for proactively surfacing upgrade advice in pipeline recipe preambles. Set to `false`/`0`/`no`/`off`/`disabled` to suppress. Disabling it does **not** change the `/jira/ping` response or server-side upgrade computation — it only gates the recipe-preamble convention |
1733
1615
  | `BAPI_MCP_TOOL_SURFACE_GATING_ENABLED` | No | _(enabled)_ | MCP-local kill switch for **dynamic tool-surface capability gating** (see [Dynamic tool-surface gating](#dynamic-tool-surface-gating-capability-availability)). Default-on; set to `false`/`0`/`no`/`off`/`disabled` to skip the startup probe, the recurring poll, and the custom `tools/list` handler entirely, restoring the SDK's previous full profile-derived surface. Fail-open: any probe timeout, unreachable backend, non-2xx, malformed payload, incomplete evaluation, or unsupported schema advertises the full profile |
1734
1616
  | `BAPI_MCP_TOOL_SURFACE_POLL_ENABLED` | No | _(disabled)_ | Opt IN to the recurring tool-surface **poll**. Default-**off**: a session gates once via the startup probe and never re-probes. Set to `true`/`1`/`yes`/`on`/`enabled` to restore the jittered 12–18 s heartbeat that pushes `notifications/tools/list_changed` on mid-session capability changes. No effect when gating itself is disabled |
1735
- | `BAPI_MCP_UPDATE_CHECK_ENABLED` | No | _(enabled)_ | MCP-local kill switch for the cached update check run at startup. Default-on; set to `false`/`0`/`no`/`off`/`disabled` to skip it entirely — no npm registry request, no update-cache read/write, no stderr advice, and no `tools/list` advisory decoration. Any other value is treated as enabled. Useful behind a firewall/registry-restricted network, and used by the payload-measurement harness so a stale local cache can never perturb a capture |
1617
+ | `BAPI_MCP_UPDATE_CHECK_ENABLED` | No | _(enabled)_ | MCP-local kill switch for the cached update check run at startup. Default-on; set to `false`/`0`/`no`/`off`/`disabled` to skip it entirely — no npm registry request, no update-cache read/write, and no upgrade notice on any surface (see [Upgrade notices](#upgrade-notices)). Any other value is treated as enabled. Useful behind a firewall/registry-restricted network, and used by the payload-measurement harness so a stale local cache can never perturb a capture |
1736
1618
  | `CURSOR_API_KEY` | No | _(none)_ | API key used to authenticate `cursor-agent` when launching `start-tickets`/scheduled runs with `--agent cursor-agent`. Not needed for the default Claude Code agent |
1737
1619
  | `BRIDGE_MCP_PROFILE` | No | `core` | Startup-time tool registration profile — a **comma-separated** list of groups controlling which tool groups are registered when the server starts. `core` is always implicitly included. Valid groups: `core` (default — normal coding tools only), `epic_implementer` (+ the 2 Epic Implementer tools, `get_epic_snapshot` and `explain_run`), `pipeline-authoring` (adds **no** tools since BAPI-909; still accepted so old configs keep working — `get_pipeline_recipe` stays in `core` because the recipe-driven slash commands depend on it), `estimation` (+ `estimate_epic`, which is **hidden by default** — `/estimate-epic` needs this group), `sfcc` (+ the 8 heavy SFCC read tools, `sfcc_log_query`, and the `sfcc_setup_status`/`check_permissions` diagnostics — read-only, see [Salesforce B2C Commerce (SFCC) Tools](#salesforce-b2c-commerce-sfcc-tools)), `sfcc-write` (+ the 9 destructive SFCC write tools — independent of `sfcc`, which does not enable them; see [Read and write profiles](#read-and-write-profiles)), and `full` (shortcut that expands to every group, **including `estimation` and `sfcc-write`**). Example: `sfcc,epic_implementer`; use `sfcc,sfcc-write` for reads plus writes. Unknown, blank, or malformed tokens are dropped (falling back to `core`). Dynamic mid-session switching via `tools/list_changed` is unsupported — groups are resolved once at process startup, so **changing this variable requires restarting the MCP server**. That is separate from the learn/onboarding tools, which are gated per session and can appear mid-session without a restart (see [Learn/onboarding tool availability](#learnonboarding-tool-availability)). Epic Implementer sessions launched via `start-tickets --conductor` **merge** `epic_implementer` into the parent process's already-resolved groups at the spawn boundary rather than replacing them — a project running on `sfcc` spawns workers on `core,sfcc,epic_implementer`. The retired token `conductor` is no longer valid and is dropped like any unknown token. A normal `start-tickets` run stays on `core`. |
1738
1620
 
@@ -1989,7 +1871,7 @@ The full surface, for when you need the complete enumeration. Day-to-day, use [U
1989
1871
 
1990
1872
  ### MCP tools
1991
1873
 
1992
- The authoritative tool catalog covers **78 tools** (enumerated below). What's actually registered in a session depends on `BRIDGE_MCP_PROFILE`: the default `core` profile loads a trimmed subset, and the Epic Implementer (`epic_implementer`), estimation, and SFCC tools are added only under their respective profiles (see [Environment Variables](#environment-variables)). Async AI tools follow a request/get pattern: call the `request_*` tool to kick off generation, then the matching `get_*` tool to retrieve the result (or pass `wait_for_result: true` to poll automatically).
1874
+ The authoritative tool catalog covers **80 tools** (enumerated below). What's actually registered in a session depends on `BRIDGE_MCP_PROFILE`: the default `core` profile loads a trimmed subset, and the Epic Implementer (`epic_implementer`), estimation, and SFCC tools are added only under their respective profiles (see [Environment Variables](#environment-variables)). Async AI tools follow a request/get pattern: call the `request_*` tool to kick off generation, then the matching `get_*` tool to retrieve the result (or pass `wait_for_result: true` to poll automatically).
1993
1875
 
1994
1876
  - **Connectivity & identity** — `ping` (its JSON also carries `docs_dir`, `role`, and `customer_type`)
1995
1877
  - **Team & access** — `invite_member` (admin-only; mints a scoped access key for a teammate on an already-configured project — the plaintext key is shown exactly once)
@@ -1998,7 +1880,7 @@ The authoritative tool catalog covers **78 tools** (enumerated below). What's ac
1998
1880
  - **AI generation (request/get)** — `request_plan_generation`/`get_plan`, `create_doc`/`get_doc` (design docs by `doc_type`: tdd/architecture/fsd/prd, where `architecture` is an alias of `tdd`), `request_ticket_review` (writes both `get_clarifying_questions` and `get_ticket_critique`), `request_reimplement_context`/`get_reimplement_context`, `request_council`/`get_council`, `request_deep_research`/`get_deep_research`
1999
1881
  - **Bounded waits** — `wait_for_ticket_review`, `wait_for_ci_checks`. Each returns `state: "ready" | "pending" | "error"`; review waits default to 20 s and CI waits default to 240 s (both accept up to 240 s explicitly). `pending` is a normal, resumable result you call again on, never a failure. They exist so an agent can wait without a foreground `sleep` and without binding a long server-side operation to the 900 s MCP client deadline. `wait_for_ci_checks` reports only that checks are **terminal** — deciding pass or fail stays with the caller.
2000
1882
  - **Other AI** — `second_opinion`, `generate_image`, `generate_decision_page`, `visual_diff` (deterministic pixel diff of a rendered URL vs a design comp)
2001
- - **Ticket lifecycle** — `track_ticket`, `update_ticket_state`, `get_ticket_state`, `get_ticket_state_tree` (live repo-wide lifecycle + dependency tree; read-only, no mutation parameter)
1883
+ - **Ticket lifecycle** — `track_ticket`, `update_ticket_state`, `get_ticket_state`, `get_ticket_state_tree` (live repo-wide lifecycle + dependency tree; read-only, no mutation parameter), `get_epic_contract_context` (an epic child's parent requirements and sibling contracts, with explicit coverage; read-only)
2002
1884
  - **Jira status** — `update_jira_status` (pass `status: "auto"` to resolve the configured post-PR status server-side)
2003
1885
  - **Repository & CI** — `parse_repository` (`action`: `start`, `status`), `regenerate_directory_map`, `create_pull_request`, `merge_pull_request`, `resolve_ci_checks`, `poll_ci_checks`, `wait_for_ci_checks` (the last two are hidden until `ci_check_config` resolves, and share one visibility gate)
2004
1886
  - **Epics** — `assess_epic_implementer_eligibility` (core; read-only prediction, before a run, of which epic children change workflow files and so need hand review; the old `assess_epic_conductor_eligibility` name returns `tool_removed`), `estimate_epic` (`estimation` profile), and `get_epic_snapshot` / `explain_run` (`epic_implementer` profile; read-only run state and "why is it stuck"; an unknown run returns `status: "unknown"`)
@@ -2110,9 +1992,33 @@ outcome is unknown, a challenge cannot be recovered, or installation asks for su
2110
1992
  Never delete possibly redeemed proof to restart. Ordinary invite tokens and
2111
1993
  verification codes are not stored.
2112
1994
 
1995
+ ### Didn't get the code?
1996
+
1997
+ The code comes from noreply@bridgegpt-api.com and usually arrives within
1998
+ two minutes. Delivery is retried for about two hours, so it can come late.
1999
+
2000
+ - Check your spam, junk, and quarantine folders. Search for
2001
+ noreply@bridgegpt-api.com.
2002
+ - At the code prompt, type r to send a new code. Earlier codes keep
2003
+ working. You can ask for up to two new codes, a minute apart.
2004
+ - Typed the wrong address? Press Ctrl-C and re-run install with the right
2005
+ one. Install offers to start a new signup.
2006
+ - A code lasts four hours. If it expires, re-run install from the same
2007
+ folder. Install offers to start a new signup.
2008
+ - A teammate on Bridge can send you an invite. Choose "I already have a
2009
+ token", or pass --invite.
2010
+ - Still stuck? Email info@bridgegpt.ai.
2011
+
2012
+ ### Credential storage
2013
+
2113
2014
  Credential storage uses bounded exclusive locking without timeout-based stealing.
2114
- An abandoned lock needs installation support. POSIX systems sync the containing
2015
+ An abandoned lock needs help: contact Bridge support at info@bridgegpt.ai and keep
2016
+ the recovery proof. POSIX systems sync the containing
2115
2017
  directory; Windows uses file sync plus atomic replacement because portable Node
2116
2018
  directory handles are unavailable. A failure after rename is an uncertain durability
2117
2019
  outcome: the new bytes may already exist. Rerun reloads the actual store under lock;
2118
2020
  there is no guarantee that old pending bytes survive every failure.
2021
+
2022
+ ### Out of scope
2023
+
2024
+ The CLI cannot diagnose non-delivery, a sender mismatch, or incompatible server behavior. It preserves saved attempts, uses the existing neutral guidance and server-enforced resend limits, and still permits the existing teammate-invite route; unresolved cases go to info@bridgegpt.ai, which does not promise a support-issued invite or a verification bypass.