@bridge_gpt/mcp-server 0.2.69 → 0.2.71

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 (164) hide show
  1. package/README.md +140 -292
  2. package/build/agent-launchers/claude-executor-adapter.js +27 -5
  3. package/build/agent-registry.js +5 -5
  4. package/build/agents.generated.js +15 -5
  5. package/build/artifact-diff.js +110 -0
  6. package/build/bin-entrypoint.js +36 -0
  7. package/build/bounded-wait.js +9 -1
  8. package/build/bridge-permissions.js +36 -9
  9. package/build/claude-review-workflow-drift.js +3 -3
  10. package/build/codex-bridge-profile.js +1 -1
  11. package/build/commands.generated.js +6 -6
  12. package/build/conductor/bridge-api-client.js +858 -21
  13. package/build/conductor/bring-up-facts.js +9 -9
  14. package/build/conductor/command-drift-production.js +7 -2
  15. package/build/conductor/doctor.js +472 -18
  16. package/build/conductor/epic-child-continuation.js +54 -3
  17. package/build/conductor/epic-implementer-cli.js +136 -34
  18. package/build/conductor/epic-runtime.js +2 -2
  19. package/build/conductor/epic-state.js +1 -1
  20. package/build/conductor/gate-discovery.js +524 -10
  21. package/build/conductor/gate-settings-review.js +451 -0
  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 +342 -0
  25. package/build/conductor/launch-plan.js +145 -0
  26. package/build/conductor/local-merge.js +241 -56
  27. package/build/conductor/merge-credential.js +172 -0
  28. package/build/conductor/merge-execution-eligibility.js +1 -1
  29. package/build/conductor/merged-child-check.js +95 -0
  30. package/build/conductor/plan-trim.js +30 -0
  31. package/build/conductor/pr-ci-producer.js +1 -1
  32. package/build/conductor/precheck-timings.js +14 -0
  33. package/build/conductor/preview-observations.js +10 -0
  34. package/build/conductor/readiness-cli.js +11 -6
  35. package/build/conductor/readiness-prerequisites.js +41 -0
  36. package/build/conductor/readiness-sections.js +348 -55
  37. package/build/conductor/readiness.js +99 -87
  38. package/build/conductor/recovery-cli.js +665 -23
  39. package/build/conductor/recovery-operations.js +350 -8
  40. package/build/conductor/repair-contract.js +47 -2
  41. package/build/conductor/repository-workflow-remedy.js +8 -6
  42. package/build/conductor/stored-merge-credential.js +76 -0
  43. package/build/conductor/stored-merge-token-probe.js +28 -0
  44. package/build/conductor/temporary-plan.js +50 -0
  45. package/build/conductor/wait-run-cli.js +759 -0
  46. package/build/conductor/worker-database-doctor-inspector.js +49 -0
  47. package/build/conductor-bin.js +2 -2
  48. package/build/conductor-claude-hook-bin.js +2 -2
  49. package/build/conductor-claude-hook-removed-stub-bin.js +2 -5
  50. package/build/conductor-removed-stub-bin.js +2 -5
  51. package/build/credential-store.js +356 -13
  52. package/build/docs.generated.js +26 -13
  53. package/build/doctor.js +94 -32
  54. package/build/drive-epic-help.js +212 -0
  55. package/build/drive-epic.js +1989 -379
  56. package/build/epic-ci-workflow-drift.js +125 -0
  57. package/build/epic-ci-workflow-install.js +240 -0
  58. package/build/epic-ci-workflow-v1.js +132 -0
  59. package/build/epic-ci-workflow.js +318 -0
  60. package/build/epic-contract-context.js +326 -0
  61. package/build/epic-implementer-bin.js +58 -42
  62. package/build/epic-implementer-claude-hook-bin.js +2 -2
  63. package/build/escalation-reachability.js +134 -0
  64. package/build/executor/ci-rerun-job.js +220 -14
  65. package/build/executor/cleanup-report.js +99 -0
  66. package/build/executor/cli.js +12 -1
  67. package/build/executor/completion-contract.js +66 -11
  68. package/build/executor/completion-supervision.js +99 -0
  69. package/build/executor/delivery-outcome.js +179 -0
  70. package/build/executor/deps.js +3 -0
  71. package/build/executor/env.js +276 -1
  72. package/build/executor/failure-reason-codes.js +126 -0
  73. package/build/executor/gate-qualification-job.js +20 -5
  74. package/build/executor/heartbeat.js +38 -0
  75. package/build/executor/http-client.js +72 -0
  76. package/build/executor/integration-job.js +298 -5
  77. package/build/executor/job-errors.js +36 -6
  78. package/build/executor/job-runner.js +830 -45
  79. package/build/executor/likely-tests.js +42 -3
  80. package/build/executor/merge-job.js +145 -2
  81. package/build/executor/observation.js +73 -4
  82. package/build/executor/permissions.js +193 -97
  83. package/build/executor/preflight.js +19 -3
  84. package/build/executor/process-containment.js +46 -2
  85. package/build/executor/prompt-spec.js +113 -9
  86. package/build/executor/rebase-finalization.js +38 -3
  87. package/build/executor/reconcile-overlap-job.js +41 -8
  88. package/build/executor/required-work-ledger.js +236 -81
  89. package/build/executor/resume-pre-spawn.js +38 -1
  90. package/build/executor/runner.js +91 -3
  91. package/build/executor/test-clock.js +8 -0
  92. package/build/executor/types.js +37 -2
  93. package/build/executor/worker-cli-launcher.js +259 -0
  94. package/build/executor/worker-command.js +177 -5
  95. package/build/executor/worker-database-target.js +91 -0
  96. package/build/executor/worker-database.js +927 -0
  97. package/build/executor/worker-finalization.js +106 -0
  98. package/build/executor/worker-guard-hook.js +203 -0
  99. package/build/executor/worker-resources.js +58 -0
  100. package/build/executor/worker-verification-guidance.js +44 -2
  101. package/build/executor/worktree.js +303 -15
  102. package/build/executor-launch.js +11 -1
  103. package/build/generated-assets-doctor.js +9 -1
  104. package/build/generated-assets-health.js +13 -4
  105. package/build/generated-assets-legacy.js +39 -0
  106. package/build/generated-assets-paths.js +12 -1
  107. package/build/generated-assets-repair.js +4 -1
  108. package/build/generated-assets-test-support.js +12 -0
  109. package/build/github-remote.js +33 -0
  110. package/build/github-sign-in.js +62 -0
  111. package/build/index.js +1133 -546
  112. package/build/init.js +39 -1
  113. package/build/install-bridge-conductor-gate.js +270 -11
  114. package/build/install-bridge-conductor-setup.js +427 -0
  115. package/build/install-bridge-conductor.js +1545 -268
  116. package/build/install-bridge.js +376 -60
  117. package/build/mcp-install-state.js +8 -2
  118. package/build/merge-pull-request.js +6 -0
  119. package/build/merge-workflow-install.js +782 -344
  120. package/build/phase-result-artifacts.js +75 -20
  121. package/build/pipeline-orchestrator.js +247 -4
  122. package/build/pipelines.generated.js +35 -35
  123. package/build/plan-discovery.js +15 -2
  124. package/build/plan-execution-ledger.js +321 -17
  125. package/build/plan-phase-routing.js +48 -13
  126. package/build/plane/cli.js +105 -51
  127. package/build/plane/defaults.js +3 -0
  128. package/build/plane/plane-freshness.js +298 -0
  129. package/build/plane/preflight.js +19 -0
  130. package/build/plane/schema-compatibility.js +137 -0
  131. package/build/plane/shutdown-deps.js +38 -0
  132. package/build/plane/shutdown.js +83 -8
  133. package/build/plane/terminal-run-cleanup.js +303 -0
  134. package/build/printed-remedy-commands.js +33 -4
  135. package/build/readiness-check.js +6 -2
  136. package/build/readiness-prerequisites.generated.js +532 -0
  137. package/build/readme.generated.js +1 -1
  138. package/build/repository-toolchains.js +581 -0
  139. package/build/setup-epic.js +421 -34
  140. package/build/shared-resources.generated.js +5 -0
  141. package/build/start-tickets.js +28 -15
  142. package/build/test-command-detection.js +284 -0
  143. package/build/test-command-validation.js +73 -0
  144. package/build/testing-config-client.js +150 -0
  145. package/build/ticket-delivery-artifacts.js +265 -0
  146. package/build/ticket-delivery-enrollment.js +369 -0
  147. package/build/ticket-delivery.js +205 -0
  148. package/build/ticket-review-summary.js +14 -0
  149. package/build/upgrade-cli.js +13 -0
  150. package/build/v2-readiness-requirements.js +552 -0
  151. package/build/version.generated.js +3 -3
  152. package/build/worker-guard-hook-bin.js +2 -2
  153. package/build/worktree-core.js +22 -7
  154. package/docs/BRIDGE-DIRECTORY-README.md +48 -0
  155. package/docs/EPIC-IMPLEMENTER-INSTALL.md +12 -867
  156. package/docs/EPIC-IMPLEMENTER.md +142 -63
  157. package/docs/epic-implementer/getting-started.md +187 -0
  158. package/docs/epic-implementer/self-hosting.md +133 -0
  159. package/package.json +4 -4
  160. package/pipelines/idea-to-ticket.json +1 -1
  161. package/pipelines/implement-ticket.json +8 -8
  162. package/pipelines/review-ticket.json +2 -2
  163. package/design-assets/favicon/favicon-32x32.png +0 -0
  164. package/design-assets/just-logo-rough-draft.png +0 -0
@@ -4,18 +4,16 @@ The **Epic Implementer** drives a multi-ticket epic from an approved plan to
4
4
  `done`. It dispatches each child ticket to an agent, watches CI and review, merges
5
5
  each child PR, and re-indexes the repository after each merge.
6
6
 
7
- > **Naming.** The Epic Implementer used to be called the "Conductor". It was
8
- > renamed in BAPI-1077 to BAPI-1083, BAPI-1190, BAPI-1232, and BAPI-1233. A few
9
- > real identifiers still carry the old name and are spelled as-is below: the
10
- > `--conductor` flag on `start-tickets`, the `install conductor` subcommand, the
11
- > `mcp_server/src/conductor/` source directory, and two retired `conductor` bins.
7
+ > **Names.** A few real identifiers still carry an older product name and are
8
+ > spelled as-is below: the `start-tickets --conductor` flag, the
9
+ > `install conductor` subcommand, and `.conductor/` paths.
12
10
 
13
11
  It has two parts. Keep them apart when you read this guide:
14
12
 
15
13
  | Part | What it is | Opt-in? |
16
14
  | --- | --- | --- |
17
15
  | **The v2 engine** | A server-side **reconciler** plus a local **executor**. This is what drives an epic. | No. It runs for every epic run. |
18
- | **The observability layer** | A local event ledger, Claude Code lifecycle hooks, optional git hooks, and a supervisor tab for `start-tickets --conductor` runs. | Yes, per run, with `--conductor`. |
16
+ | **The observability layer** | A local event ledger, Claude Code lifecycle hooks, optional git hooks, and a supervisor tab for `start-tickets --conductor` runs. | Yes, per run, with `start-tickets --conductor`. |
19
17
 
20
18
  For the everyday `start-tickets` flags, see
21
19
  [README → CLI Subcommands](../README.md#cli-subcommands).
@@ -48,7 +46,7 @@ server's readiness report and routes to exactly one path. You never choose
48
46
  between engines.
49
47
 
50
48
  ```
51
- npx -y @bridge_gpt/mcp-server drive-epic BAPI-405 \
49
+ npx -y @bridge_gpt/mcp-server drive-epic PROJ-123 \
52
50
  --plan-file docs/tmp/epic-plans/<slug>/epic-plan.dag.json
53
51
  ```
54
52
 
@@ -58,7 +56,7 @@ Run it from a Git checkout of the target repository. In one command it:
58
56
  A check that fails here creates nothing.
59
57
  2. Validates the plan with the server's real validator, then creates and approves
60
58
  the run (it delegates this to `setup-epic`).
61
- 3. Starts a **run-scoped executor** for the run in the background (BAPI-1279). It
59
+ 3. Starts a **run-scoped executor** for the run in the background. It
62
60
  claims only that run's jobs, logs to `.bridge/executors/<run>.log`, and exits by
63
61
  itself when the run is `done` or `abandoned`. Re-running `drive-epic` for the
64
62
  same live run never starts a second one.
@@ -90,7 +88,6 @@ attach, and `1` for refuse or stop.
90
88
  | `--policy-file <path>` | The **complete** run policy, applied when the run is created. |
91
89
  | `--review-policy <src>` | The review policy for this run only: `repository_policy`, `verdict_protocol`, `native_review_decision`, or `none`. Omit it and the server stamps `repository_policy` at first approval for a new feature-branch run. `verdict_protocol` (AI review) is an explicit opt-in. An already-approved run with no stored policy is unchanged and still resolves to `verdict_protocol`. |
92
90
  | `--replace-policy` | Allow replacing a live run's stored policy with `--policy-file`. |
93
- | `--launch-profile <name>` | Use a host-local launch profile approved by `install conductor --launch-profile <name>`. `BAPI_EPIC_LAUNCH_PROFILE` selects one too; the flag wins. |
94
91
  | `--base-url <url>` | Explicit Bridge API target. It must agree with a profile. |
95
92
  | `--dry-run`, `--json` | Read-only preview (see above). |
96
93
 
@@ -131,7 +128,7 @@ branch.
131
128
  |---|---|
132
129
  | The epic branch on a plan with 2 or more nodes | *nothing* — it is the default |
133
130
  | Your own branch name, or a branch for a single-node plan | `--feature-branch <name>` |
134
- | Direct-to-base (the pre-BAPI-1009 behavior) | `--into-base` |
131
+ | Direct-to-base (children target the base branch) | `--into-base` |
135
132
 
136
133
  A single-node plan keeps the base branch by default. `--feature-branch` and
137
134
  `--into-base` together are a parse error.
@@ -173,7 +170,7 @@ host or a manual recovery:
173
170
  npx -y @bridge_gpt/mcp-server executor --repo <name> --epic-run-id <id>
174
171
  ```
175
172
 
176
- - **A claim scope is required** (BAPI-1026). Pass exactly one of
173
+ - **A claim scope is required.** Pass exactly one of
177
174
  `--epic-run-id <id>` (repeatable) or `--repo-wide`. With neither, the executor
178
175
  refuses to start.
179
176
  - **A base URL is required.** Pass `--base-url` or set `BAPI_BASE_URL`. The
@@ -185,22 +182,7 @@ npx -y @bridge_gpt/mcp-server executor --repo <name> --epic-run-id <id>
185
182
  systemd (Linux) user unit so an executor survives a reboot. For the guided,
186
183
  consented setup, use `install conductor` instead.
187
184
 
188
- > **Running against a local Bridge API server? Do not use `npx`.** The published
189
- > package often lags the server's source. A newer server can send a `prompt_spec`
190
- > the older executor rejects (`ContractError.Prompt ... unsupported placeholder`).
191
- > Build and run the local tree so both come from the same commit:
192
- >
193
- > ```
194
- > cd mcp_server && npm run build
195
- > node mcp_server/build/index.js executor --repo <name> --epic-run-id <id>
196
- > ```
197
-
198
- **The plane.** `plane up|status|down` brings up a whole local stack in one
199
- command: the Bridge API server, the dead-man observer, the reconciler worker, and
200
- scoped executor lanes. It is for operators who run the Bridge API server
201
- themselves, and it runs executors from that checkout's `mcp_server/build/`.
202
- `drive-epic` starts or attaches to a plane on its own when `BAPI_BASE_URL` names
203
- the local plane endpoint.
185
+ Owners who run their own Bridge server have extra steps. Run `npx -y @bridge_gpt/mcp-server drive-epic --help-advanced` to read them.
204
186
 
205
187
  ## The CI gate
206
188
 
@@ -218,7 +200,7 @@ neither `required_checks` nor `no_ci_gate`:
218
200
  passes without CI.
219
201
  3. Otherwise nothing is stamped.
220
202
 
221
- **With a confirmed gate profile (BAPI-1390)** the stamp follows the profile
203
+ **With a confirmed gate profile** the stamp follows the profile
222
204
  instead, and always records `gate_profile_revision` and a `gate_profile_snapshot`
223
205
  that later profile edits never change:
224
206
 
@@ -242,7 +224,7 @@ run being admitted never count.
242
224
  | Admission reason | Meaning | Remedy |
243
225
  |---|---|---|
244
226
  | `provider_check_unseen` | The named check never reported in that window | Make the check report on the default branch once, or edit the gate profile |
245
- | `provider_evidence_unavailable` | The walk could not finish (rate limit, permission, truncation, moving head) | Retry readiness; escalate to Bridge operations if it persists |
227
+ | `provider_evidence_unavailable` | The walk could not finish (rate limit, permission, truncation, moving head) | Retry readiness; email info@bridgegpt.ai if it persists |
246
228
  | `local_command_unqualified` | No current passing executor qualification for the profile's revision and command digests | Qualify the local commands, then retry |
247
229
  | `migration_guard_unset` | Root `alembic.ini` present and no confirmed member marked as the migration guard | Mark a confirmed check or command as `migration_guard` |
248
230
 
@@ -303,8 +285,8 @@ Paths are relative to the repository root.
303
285
  {
304
286
  "plan_version": 1,
305
287
  "nodes": [
306
- { "ticket_key": "BAPI-405", "status": "planned", "depends_on": [],
307
- "touched_files": ["api/routes/jira_api.py"] }
288
+ { "ticket_key": "PROJ-123", "status": "planned", "depends_on": [],
289
+ "touched_files": ["src/example/service.py"] }
308
290
  ],
309
291
  "edges": []
310
292
  }
@@ -328,6 +310,8 @@ or not the node declared `touched_files`.
328
310
  - `notifications --repo <repo> --run <epic-key|run-id> [--follow]` prints the
329
311
  run's notification feed.
330
312
  - `epic-implementer epic-status --epic-key <KEY>` prints a read-only health summary.
313
+ - `epic-implementer wait-run --epic-run-id <id> [--since <token>]` waits, read-only,
314
+ until the run's observable state changes (see [Waiting between passes](#waiting-between-passes-wait-run)).
331
315
 
332
316
  Both MCP tools need the `epic_implementer` profile group (see
333
317
  [MCP profile](#mcp-profile)).
@@ -345,6 +329,7 @@ Both MCP tools need the `epic_implementer` profile group (see
345
329
  | `adopt-current-head-and-unpark --ticket-key <key>` | Recover a ticket parked by a PR-head change: adopt the current head and unpark. |
346
330
  | `continue-child --ticket-key <key> [--reason <text>]` | Continue a parked child's current attempt without a reset. |
347
331
  | `continuation-receipt --ticket-key <key> [--request-id <id>]` | Read-only: whether a continuation request committed. |
332
+ | `wait-run [--ticket-key <key>] [--since <token>] [--timeout <seconds>]` | Read-only: wait until the run's observable state changes. Not a verb; changes nothing. |
348
333
  | `resume-ci --ticket-key <key>` | Resume a child parked on a CI stop once CI is green. |
349
334
  | `dispatch-remediation --ticket-key <key> --context-file <path>` | Queue a repair job carrying your notes (at most 16384 bytes). |
350
335
  | `merge-child --pr <number>` | Merge the run's child PR through the shared merge service. |
@@ -356,8 +341,31 @@ Most verbs accept `--json`. A replay that changes nothing prints
356
341
  `committed: false` and exits `0`. A refusal carries the server's closed code, such
357
342
  as `TICKET_NOT_IN_RUN`.
358
343
 
344
+ ### Waiting between passes: `wait-run`
345
+
346
+ `epic-implementer wait-run --epic-run-id <id> [--ticket-key <key>] [--since <token>] [--timeout <seconds>] [--json]`
347
+ is a CLI-only, read-only wait. It reads only `GET /jira/epic-runs/runs/{id}/state`,
348
+ using the same shared credential resolver as the verbs, and writes nothing. The
349
+ window defaults to 110 seconds; a larger value is clamped to 240.
350
+
351
+ | Outcome | Meaning | Exit |
352
+ | --- | --- | --- |
353
+ | `changed` | The run's stable state moved. Within one window it lists up to 20 `{ticket_key, field, from, to}` changes (`truncated: true` when more were dropped). | `0` |
354
+ | `changed` + `baseline: "since"` | The first read already differed from `--since`. It carries no field history: the token says *that* something changed, not what. | `0` |
355
+ | `terminal` | The run is `done` or `abandoned`. This outranks a token mismatch. | `0` |
356
+ | `pending` | `WAIT_WINDOW_ELAPSED` (nothing moved) or `UPSTREAM_TRANSIENT` (three reads in a row failed). Run it again. | `0` |
357
+ | failure | Bad arguments, a credential gap, a `401`/`403`/`404`/other `4xx`, a malformed response, or a `--ticket-key` that names no ticket in the run. One line on stderr, nothing on stdout. | `1` |
358
+
359
+ Every successful result carries a `v1:` `token`. Pass it back as `--since`, with
360
+ the same run and the same `--ticket-key`. A well-formed token from another run or
361
+ selector simply reports `changed`. Before any read succeeds, `token` is the
362
+ supplied `--since` (or `null`) and `run_status` is `null`. The token ignores
363
+ reconciler clocks, heartbeats, and row versions, so a tick alone never reports a
364
+ change. wait-run reports the latest observable state, not event history: always
365
+ run a fresh full pass before choosing an action.
366
+
359
367
  **Check prerequisites.** `epic-implementer readiness` is a read-only advisory
360
- report of every prerequisite (install, doctor, plane preflight, and server), each
368
+ report of every prerequisite (install, doctor, and server), each
361
369
  with one named fix. It never runs a fix and always exits `0`.
362
370
  `epic-implementer doctor` reports local health read-only.
363
371
 
@@ -374,6 +382,44 @@ opens a PR with your own `gh`. It never merges that PR. Replace
374
382
  `<@org/team|@user>` with the one reviewer of the workflow file before running;
375
383
  Bridge cannot infer it.
376
384
 
385
+ ### The test command: `--test-command`
386
+
387
+ Setup stores one test command for the repository, and the CI workflow it installs
388
+ runs that command. Setup prints the stored command on every run, so you can see
389
+ what CI will run. To save or replace it, pass the command yourself:
390
+
391
+ ```
392
+ npx -y @bridge_gpt/mcp-server install conductor --test-command "npm run lint && npm run build"
393
+ ```
394
+
395
+ - **The flag is your consent for that one write.** There is no command question,
396
+ and the command is never run by setup.
397
+ - **The command is checked before anything else happens.** It must be one line,
398
+ contain no `${{` GitHub Actions expression, and be at most 500 characters. An
399
+ invalid command is refused at parse time, before any prompt, request, or write,
400
+ and the message names the reason, never the command. Passing the flag twice is
401
+ refused. It cannot be combined with `--clear-gate` or `--remove-merge-token`.
402
+ - **The save is read back.** Setup writes once, reads the stored value, and
403
+ reports success only when it matches. If the save may have succeeded but could
404
+ not be verified, it says so and exits `1`; it never retries the write.
405
+ - **The same value again is "Test command unchanged".** Nothing is written.
406
+ - **`--dry-run` saves nothing.** It describes the change and the workflow check
407
+ that would follow, and does not render a workflow from a command that is not
408
+ stored yet.
409
+ - **Two other consents stay separate.** The base URL confirmation is still asked
410
+ first, so the command needs a terminal; the flag never skips it, because your
411
+ API key is not sent to a URL you have not confirmed. Opening the workflow pull
412
+ request asks for itself. A command that is saved stays saved when you decline
413
+ the pull request.
414
+
415
+ After a replacement, setup checks the CI workflow against the new stored value in
416
+ the same run and offers the update pull request. A pull request from an older
417
+ setup that is still open must be merged or closed first; setup names it and does
418
+ not touch it.
419
+
420
+ **Do not put a credential in a test command.** Setup prints the stored command,
421
+ and the workflow file contains it.
422
+
377
423
  ## MCP profile
378
424
 
379
425
  The Epic Implementer MCP tools are `get_epic_snapshot` and `explain_run`. They
@@ -384,7 +430,7 @@ register only when `BRIDGE_MCP_PROFILE` includes the `epic_implementer` group (o
384
430
  BRIDGE_MCP_PROFILE=core,epic_implementer
385
431
  ```
386
432
 
387
- The old `conductor` profile token is retired and ignored. `epic-implementer
433
+ The old profile token is retired and ignored. `epic-implementer
388
434
  doctor` flags it.
389
435
 
390
436
  ## Binaries
@@ -392,18 +438,18 @@ doctor` flags it.
392
438
  | Bin | Purpose |
393
439
  | --- | --- |
394
440
  | `epic-implementer` | The CLI: the recovery verbs above, `readiness`, `doctor`, `epic-status`, `approve-plan`, `install-git-hooks`, and the observability-layer ledger commands (`emit-event`, `supervise`, `send-message`, `check-messages`, `purge`, `git-hook`, `file-scope-guard`). |
395
- | `epic-implementer-claude-hook` | The Claude Code lifecycle hook for `--conductor` runs. |
396
- | `conductor`, `conductor-claude-hook` | Retired names (renamed by BAPI-1080). They print a fixed migration message and exit `1`. |
441
+ | `epic-implementer-claude-hook` | The Claude Code lifecycle hook for `start-tickets --conductor` runs. |
442
+ | `conductor`, `conductor-claude-hook` | Retired names. They print a fixed migration message and exit `1`. |
397
443
 
398
444
  The same CLI is available as the `epic-implementer` subcommand:
399
445
  `npx -y @bridge_gpt/mcp-server epic-implementer <command>`.
400
446
 
401
- ## Environment-variable names and the legacy-name refusal (BAPI-1190)
447
+ ## Environment-variable names and the legacy-name refusal
402
448
 
403
449
  Every Epic Implementer environment variable uses the `BAPI_EPIC_IMPLEMENTER_`
404
450
  prefix. The worker Node path is `EPIC_IMPLEMENTER_NODE_PATH`. These replaced the
405
- old names by a plain token swap: `CONDUCTOR` became `EPIC_IMPLEMENTER` and the
406
- rest stayed the same. For example, the run-id variable is now
451
+ old `BAPI_CONDUCTOR_*` and `CONDUCTOR_*` names with the matching
452
+ `BAPI_EPIC_IMPLEMENTER_*` and `EPIC_IMPLEMENTER_*` names; the rest stayed the same. For example, the run-id variable is now
407
453
  `BAPI_EPIC_IMPLEMENTER_RUN_ID`. There are no aliases and no dual reads.
408
454
 
409
455
  The three dead-man variables that the Python worker reads were renamed the same
@@ -418,12 +464,10 @@ way: `EPIC_IMPLEMENTER_DEAD_MAN_ONLY`, `EPIC_IMPLEMENTER_DEADMAN_CHANNEL_TYPE`,
418
464
  |---|---|
419
465
  | MCP server (bare startup) and every `npx @bridge_gpt/mcp-server <subcommand>` | stderr diagnostic, exit `1`, before any spawn, network call, ledger open, or file write |
420
466
  | `epic-implementer` bin | stderr diagnostic, exit `1`, before argv reaches the CLI |
421
- | `plane up` preflight | refused as the first check, before anything starts |
422
467
  | `epic-implementer-claude-hook` bin | same stderr diagnostic, **exit `0`**, no ledger event |
423
- | Bridge API `worker.py` (dead-man names only) | refuses at boot |
424
468
 
425
469
  The hook exits `0` because a hook must never block the Claude tool loop. The two
426
- retired `conductor` bins are not guarded; they already fail with a fixed message.
470
+ retired bins are not guarded; they already fail with a fixed message.
427
471
 
428
472
  The diagnostic lists **every** offending key, sorted, in one message, with its
429
473
  successor, a "retired — remove it" note, or generic advice for an unknown name. It
@@ -440,10 +484,10 @@ versions and the offending **key names only**.
440
484
  The executor's worker-environment filter also strips both prefixes and both
441
485
  node-path spellings, so an old name never reaches a worker it spawns.
442
486
 
443
- ## Observability layer (`--conductor`, opt-in, BAPI-394)
487
+ ## Observability layer (`start-tickets --conductor`, opt-in)
444
488
 
445
489
  This layer is **off by default**. It is separate from the v2 engine and never
446
- decides a transition. Without `--conductor`, `start-tickets` produces no
490
+ decides a transition. Without `start-tickets --conductor`, `start-tickets` produces no
447
491
  `BAPI_EPIC_IMPLEMENTER_*` env, supervisor tab, or message-relay prompt.
448
492
 
449
493
  With `start-tickets --conductor`, a run mints one `run_id`, writes a `run.started`
@@ -467,7 +511,7 @@ with `BAPI_EPIC_IMPLEMENTER_ENABLE_PRE_TOOL_USE=1`.
467
511
  Inspect the stream with `epic-implementer doctor`. See also
468
512
  [README → Environment Variables](../README.md#environment-variables).
469
513
 
470
- ## `epic-implementer install-git-hooks` (BAPI-395)
514
+ ## `epic-implementer install-git-hooks`
471
515
 
472
516
  Installs local git hooks that emit git events into the local ledger:
473
517
 
@@ -488,7 +532,7 @@ committed ref updates).
488
532
  Missing hooks do **not** block anything. `epic-implementer doctor` reports hook
489
533
  state read-only, and the reconciler drives CI polling and gates either way.
490
534
 
491
- ### Durable hook installation (BAPI-1290)
535
+ ### Durable hook installation
492
536
 
493
537
  A managed hook embeds one absolute entry path and runs it on every commit for as
494
538
  long as the hook exists. So the installer embeds only a **qualified persistent
@@ -519,7 +563,7 @@ read-only:
519
563
  |---|---|
520
564
  | The entry is not inside the prunable `_npx` cache | `ephemeral-cache` |
521
565
  | The canonical entry is a regular `build/epic-implementer-bin.js` | `missing` |
522
- | It is not the retired `conductor-bin.js` name | `legacy-name` |
566
+ | It is not a retired entry name | `legacy-name` |
523
567
  | It sits at `…/node_modules/@bridge_gpt/mcp-server/build/`, and the adjacent `package.json` has that `name`, a compatible `version` (`>=0.2.0 <1.0.0`), and `bin.epic-implementer` → `./build/epic-implementer-bin.js` | `unqualified-runtime` |
524
568
  | The platform is macOS or Linux | `unqualified-runtime` |
525
569
  | `node` from PATH launches the entry's private probe within 15 seconds | `node-unavailable` / `unknown` |
@@ -553,8 +597,8 @@ atomically over the target. A hook edited in the meantime is left alone
553
597
  (`native-unavailable`) is **unavailable**. The raw embedded path appears only in
554
598
  `--json` output (`embedded_bin_path`).
555
599
 
556
- **Repairing old cache-backed hooks.** Hooks installed from `npx` before BAPI-1290
557
- point into the npx cache. Install persistently (`npm i -g @bridge_gpt/mcp-server`),
600
+ **Repairing old cache-backed hooks.** Hooks installed from `npx` before durable
601
+ hook installation point into the npx cache. Install persistently (`npm i -g @bridge_gpt/mcp-server`),
558
602
  then re-run `epic-implementer install-git-hooks` (or `install conductor` and
559
603
  accept the local-observability consent). The managed block is replaced in place.
560
604
 
@@ -568,9 +612,8 @@ never depends on hooks.
568
612
 
569
613
  ## Supervisor config
570
614
 
571
- > **These are not config fields.** They used to be `conductor_done_gate` and
572
- > `conductor_auto_merge_enabled` on the generic config-field route. BAPI-438 moved
573
- > them to dedicated supervisor endpoints. Setting them through
615
+ > **These are not config fields.** They used to be set through the generic
616
+ > config-field route. They now have dedicated supervisor endpoints. Setting them through
574
617
  > `PUT /jira/config-field/...` returns **HTTP 400 "Invalid config field"**, which
575
618
  > is correct.
576
619
 
@@ -585,11 +628,11 @@ Swap `…/defaults/` for `…/runs/{epic_key}/…` to scope a setting to one epi
585
628
  matching `GET` returns the effective value with a `source` of `epic`,
586
629
  `project_default`, or `none` (nothing configured; fails closed).
587
630
 
588
- Since BAPI-1288 every project-default write is protected. Removing a configured
631
+ Every project-default write is protected. Removing a configured
589
632
  requirement needs a preview (`POST …/defaults/preview/`) and the exact approval it
590
633
  returns. Turning `auto_merge_enabled` **on**, or dropping a required
591
634
  `merge_approval_required`, on the project default is refused
592
- (`409 NON_RELAXABLE`); ask Bridge support.
635
+ (`409 NON_RELAXABLE`); email info@bridgegpt.ai.
593
636
 
594
637
  ### `done_gate_config`
595
638
 
@@ -640,7 +683,7 @@ results are `merge.dry_run`, `merge.attempted`, `merge.succeeded`,
640
683
  `merge.failed` (retryable), and `merge.pending_approval` (waits for a human).
641
684
  **`merge.succeeded` is the only terminal merge event.**
642
685
 
643
- **Who performs the write (BAPI-832).** GitHub's merge endpoint needs
686
+ **Who performs the write.** GitHub's merge endpoint needs
644
687
  `contents: write`, and the Bridge GPT App is `contents: read`. So two paths merge
645
688
  with the operator's local `gh` session instead of the App token:
646
689
 
@@ -653,7 +696,7 @@ The mode is `merge_execution` on the supervisor config (`local` by default,
653
696
  `server` when the App holds `contents: write`). A caller that dies mid-merge is
654
697
  recovered by lease expiry; a retry reports `already_merged` if the merge landed.
655
698
 
656
- ## Worker ledger hardening (BAPI-527)
699
+ ## Worker ledger hardening
657
700
 
658
701
  This section applies to the observability layer. It keeps a worker's own ledger
659
702
  calls reliable. It is not a completion backstop.
@@ -705,14 +748,33 @@ or a missing `BAPI_EPIC_IMPLEMENTER_CLI_FILE`, returns the
705
748
  Run `epic-implementer likely-tests --base <sha>` with the executor's immutable,
706
749
  full 40-character comparison commit, after committing and before the first push.
707
750
  Fallback: `npx -y -p @bridge_gpt/mcp-server epic-implementer likely-tests --base <sha>`.
708
- Refresh after additional commits. Map references through the repository's declared
709
- targeted runner; references are data, never commands.
710
-
711
- This local read-only command returns zero even on invalid input or discovery failure.
712
- Stdout contains only one reference per line; stderr contains fixed advisory notes.
713
- Recent failures come first, then explicit `.bridge/verification-hints.json` pins,
714
- then sorted tracked tests containing literal changed-path/import references.
715
- Exact duplicates are removed before the 100-reference output limit.
751
+ Run either alone and keep stderr and the exit status visible. Refresh after
752
+ additional commits. Map references through the repository's declared targeted
753
+ runner; references are data, never commands.
754
+
755
+ This local read-only command returns `1` with a distinct bounded note on stderr
756
+ for invalid arguments (`invalid_arguments`), for git discovery that could not run
757
+ (`git_unavailable`), and for an internal discovery failure (including a failed
758
+ import). A failure never prints the `empty` note. A successful discovery returns
759
+ `0` and stays advisory: `empty`, `hints_missing`, `truncated`, and
760
+ `data_unavailable` are notes, not failures. A success that prints no reference
761
+ always prints the `empty` note once, so empty stdout with no `empty` note means
762
+ the command did not run. Stdout contains only one reference per line; stderr
763
+ contains fixed advisory notes.
764
+ Recent failures come first, then the sorted test files named in the worker's
765
+ declared touched files, then explicit `.bridge/verification-hints.json` pins, then
766
+ sorted tracked tests containing literal changed-path/import references. Exact
767
+ duplicates are removed before the 100-reference output limit; omitted candidates
768
+ raise the `truncated` note.
769
+
770
+ Declared files come from `BAPI_EPIC_IMPLEMENTER_DECLARED_TOUCHED_FILES_JSON`. An
771
+ entry is admitted only when it is a test file and exists in the worktree; a missing
772
+ accepted candidate raises `skipped_entries`, and malformed JSON raises
773
+ `data_unavailable`. When the variable is absent or blank the command is silent about
774
+ it. Ordinary `implement` and `ci_fix` workers do not currently receive this variable,
775
+ so for them declared files add nothing. Worker payloads are unchanged here; the
776
+ epic-owner server-payload follow-up is pending (no identifier exists in version-controlled
777
+ planning material yet).
716
778
 
717
779
  The optional worker-worktree `.conductor/recently-failed-tests.json` is
718
780
  `{"version":1,"tests":["most-recent-first reference"],"truncated":false}`. Child 3
@@ -726,3 +788,20 @@ file, 16 MiB scanned text, 10,000 sorted candidates, 10 seconds per Git subproce
726
788
  and 4 MiB Git output. Missing recent failures are silent. Disclose unavailable,
727
789
  malformed, unreadable, truncated, or unmappable coverage in the existing handoff.
728
790
  Retain available targeted verification; do not run a whole suite as fallback.
791
+
792
+ ### Worktree git-exclude provisioning
793
+
794
+ The executor writes `.claude/settings.local.json` and `.conductor/` into the shared
795
+ common `info/exclude` before any worktree lock, recently-failed file, or pre-spawn
796
+ verification (`provisionWorktreeSettingsExclude`, called at the start of the
797
+ reserved-spawn workflow against the executor clone). The writer keeps existing
798
+ content verbatim, appends only absent canonical lines, and publishes through a
799
+ uniquely named temporary file plus rename.
800
+
801
+ - **Detection:** a failure produces a bounded `excludeWarning` line in the executor's
802
+ error log (a category plus the worktree path, nothing else).
803
+ - **Containment:** the job continues. The deny layer's own exclude call is an
804
+ idempotent second attempt, and the existing dirty-worktree refusal in pre-spawn
805
+ verification is unchanged.
806
+ - **Remediation:** the warning tells the operator to inspect the worktree before
807
+ trusting its staged changes.
@@ -0,0 +1,187 @@
1
+ # Run your first epic with the Epic Implementer
2
+
3
+ The Epic Implementer takes a planned epic, hands each child ticket to an agent on your computer, waits for CI and review, and merges each child pull request into an `epic/<EPIC>` branch. A person merges the final pull request into your default branch.
4
+
5
+ You do four things, in this order: install, set up, define the epic, launch it. The same steps work with Bridge's own ticket storage and with Jira.
6
+
7
+ In every command below, `npx -y @bridge_gpt/mcp-server` is the launcher. Keep the `-y`; without it, `npx` stops to ask before it installs the package.
8
+
9
+ ## Prerequisites
10
+
11
+ Setup checks every item below for you, fixes what it can, and prints the one step it cannot fix. Read this list only when setup reports an item. Each bullet gives the item's name, its id, what it means, and the fix.
12
+
13
+ - **Unattended posture (Setup page)** (`server.unattended-posture`) — Bridge allows unattended runs for this repository. Fix: Turn on **Allow unattended Epic Implementer runs** on the repository Setup page, or launch with `--attended`.
14
+ - **Resolved merge mode** (`server.resolved-merge-mode`) — Bridge knows how child pull requests will be merged (your computer, a machine token, or GitHub Actions). Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.
15
+ - **Provider repository** (`server.provider-repository`) — Bridge knows the GitHub `owner/name` of this repository. Fix: Run `npx -y @bridge_gpt/mcp-server connect-github`, then run setup again.
16
+ - **Supervisor setup** (`server.supervisor-setup`) — The repository has a stored supervisor record. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.
17
+ - **Supervisor configuration** (`server.supervisor-config`) — The supervisor record is complete: the test gate and the safe defaults are stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.
18
+ - **Supervisor required CI checks** (`server.supervisor-required-checks`) — The CI checks a child pull request must pass before it merges are stored. Fix: Run setup and confirm the gate it proposes, or name a check with `--required-check <name>`.
19
+ - **Review policy** (`server.review-policy`) — The review policy for child pull requests is known. AI review is an opt-in choice by the repository admin. Fix: Nothing is needed unless you want AI review. Choose a policy at launch with `--review-policy`.
20
+ - **GitHub App credentials** (`server.github-credentials`) — Bridge's GitHub App is connected and can read this repository. Fix: Run `npx -y @bridge_gpt/mcp-server connect-github`, then run setup again.
21
+ - **GitHub App actions permission** (`server.github-actions-permission`) — The GitHub App may start workflow runs. Only needed when merges go through GitHub Actions. Fix: Accept the updated permission on the GitHub App's installation page, then run setup again.
22
+ - **Merge workflow eligibility** (`server.merge-execution-workflow`) — The merge workflow file is on the default branch and current. Only needed when merges go through GitHub Actions. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor --merge-workflow --codeowner <@org/team|@user>`, merge the pull request it opens, then run setup again.
23
+ - **Merge branch policy** (`server.merge-execution-branch-policy`) — The default branch rules let the merge workflow do its job. Only needed when merges go through GitHub Actions. Fix: Adjust the branch rule or ruleset as setup describes, then run setup again.
24
+ - **Executor server observation** (`server.executor-readiness`) — Bridge has seen a heartbeat from an executor for this repository. Before your first run this can be missing: `drive-epic` starts the executor for each run. Fix: Launch the epic with `npx -y @bridge_gpt/mcp-server drive-epic <EPIC>`.
25
+ - **Review workflow protocol** (`server.review-workflow`) — The review workflow on the default branch matches the review policy. Only needed with AI review. Fix: Run setup; it names the workflow change to make.
26
+ - **Conductor CI migration guard** (`server.conductor-ci-workflow`) — The CI workflow file `epic-implementer-ci.yml` is on the default branch and runs the migration guard where needed. Fix: Run setup, merge the setup pull request it opens, then run setup again.
27
+ - **Escalation channel (webhook or email)** (`server.unattended-notify-default`) — Bridge has somewhere to send an escalation: a verified notify webhook, or your account email. Fix: Declare a notify webhook, or verify your account email.
28
+ - **Repository workflow readiness** (`server.repository-workflow-readiness`) — The CI and review workflows are confirmed on the default branch. Fix: Run setup, merge the setup pull request, then run setup again.
29
+ - **Workflows at indexed commit** (`server.indexed-workflows`) — The repository index includes the workflow files on the default branch. Fix: Merge the setup pull request, then run setup again. It starts the re-index and reports this item as pending until the index reaches that commit.
30
+ - **Known test command** (`server.test-command`) — Bridge knows the command that runs this repository's tests. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor --test-command "<command>"`, replacing `<command>` with the one command that runs your tests, or run setup and answer its test command question.
31
+ - **Service availability** (`server.service-availability`) — Bridge could read this repository's readiness from the server. Fix: Retry in a few minutes. If it keeps failing, email info@bridgegpt.ai.
32
+ - **Claude login** (`install.claude-login`) — Claude Code is signed in on this computer. Fix: Run `claude` and sign in, then run setup again.
33
+ - **Repository identity** (`install.identity`) — Bridge knows which repository this folder is. Fix: Run setup from the repository root, or pass `--repo <name>`.
34
+ - **Bridge API credential** (`install.credential`) — A Bridge API key is stored for this repository. Fix: Run `npx -y @bridge_gpt/mcp-server install`.
35
+ - **Server connectivity** (`install.connectivity`) — This computer can reach the Bridge server. Fix: Check your network and any `BAPI_BASE_URL` setting, then run setup again.
36
+ - **Bootstrap config fields** (`install.bootstrap`) — The repository's Bridge configuration fields are filled in. Fix: Run `npx -y @bridge_gpt/mcp-server install`.
37
+ - **Integration credentials** (`install.integrations`) — The integration credentials this repository uses, such as Jira or GitHub, are stored. Fix: Run `npx -y @bridge_gpt/mcp-server install`.
38
+ - **GitHub connection** (`install.github`) — Bridge's GitHub App is connected to this repository. Fix: Run `npx -y @bridge_gpt/mcp-server connect-github`.
39
+ - **Repository indexing** (`install.indexing`) — The repository has been indexed by Bridge. Fix: Run `/parse-repository`, or let setup queue the index.
40
+ - **Conductor event ledger** (`conductor.ledger`) — The local Epic Implementer event ledger can be read. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.
41
+ - **Conductor git hooks** (`conductor.git-hooks`) — Optional: the git hooks that feed the local event ledger are installed. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer install-git-hooks`.
42
+ - **Epic Implementer MCP profile** (`conductor.mcp-profile`) — The `epic_implementer` tool profile is on in your MCP host. Fix: Let setup add it (it asks first), then restart your MCP client.
43
+ - **GitHub CLI availability** (`conductor.gh-cli`) — The GitHub CLI (`gh`) is installed and signed in. Fix: Install `gh` and run `gh auth login`.
44
+ - **Configured merge credential** (`conductor.merge-credential`) — A GitHub token for merging child pull requests is available on this computer. Fix: Let setup store one (it asks first), or set `GITHUB_MERGE_TOKEN`.
45
+ - **Native ledger binding** (`conductor.native-ledger`) — The ledger's native component loads on this computer. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.
46
+ - **Worker MCP registration form** (`conductor.mcp-registration-form`) — Workers register the Bridge tools in the form the executor expects. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.
47
+ - **Expected Node engine** (`conductor.node-engine`) — The Node.js version meets the package's engine range. Fix: Install a supported Node.js (18 or newer; 20 or newer for the git hooks).
48
+ - **Deny-layer enforcement** (`conductor.deny-enforcement`) — Claude Code enforces the permission denials that keep workers inside the repository. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` to see why the check could not confirm it.
49
+ - **Claude login** (`conductor.claude-login`) — Claude Code is signed in for the workers. Fix: Run `claude` and sign in, then run setup again.
50
+ - **Merge credential capability** (`conductor.merge-credential-capability`) — The merge token can push to the repository and read pull requests. Fix: Replace the token (setup offers to), then run setup again.
51
+ - **Worktree preparation** (`conductor.worktree-preparation`) — The executor's clone can keep its working files out of git (`.git/info/exclude` exists or can be written). Fix: Make `.git/info/exclude` writable in this clone.
52
+ - **Supervisor gate profile** (`conductor.install-section-supervisor-gate-profile`) — The repository's test gate profile is stored and valid. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.
53
+ - **Supervisor required CI checks** (`conductor.install-section-supervisor-required-checks`) — The required CI checks in the gate match checks the provider reports. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.
54
+ - **Supervisor review-policy alignment** (`conductor.install-section-supervisor-review-alignment`) — The review policy and the review workflow agree. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.
55
+ - **GitHub App actions permission** (`conductor.install-section-github-actions-permission`) — The GitHub App may start workflow runs. Only needed when merges go through GitHub Actions. Fix: Accept the updated permission on the GitHub App's installation page.
56
+ - **Merge execution eligibility** (`conductor.install-section-merge-execution-eligibility`) — This repository can use GitHub Actions merges. Only needed for that merge mode. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor --merge-workflow --codeowner <@org/team|@user>` and merge its pull request.
57
+ - **Epic Implementer MCP profile token** (`conductor.install-section-epic-implementer-profile-token`) — The Bridge key used by the Epic Implementer tool profile is stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.
58
+ - **Conductor hook targets** (`conductor.install-section-conductor-hook-targets`) — The git hook targets are in place for this clone. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer install-git-hooks`.
59
+ - **GitHub Actions merge: local observation prerequisites** (`conductor.install-section-gh-actions-merge-auth`) — This computer can observe GitHub Actions merges. Only needed for that merge mode. Fix: Sign in with `gh auth login` and rerun setup.
60
+ - **GitHub Actions merge: capability observability** (`conductor.install-section-gh-actions-merge-observable`) — Bridge can observe the outcome of GitHub Actions merges. Only needed for that merge mode. Fix: Rerun setup and follow the step it prints.
61
+ - **Epic Implementer ledger loadability** (`conductor.install-section-epic-implementer-ledger-loadability`) — The local ledger can be loaded by the tools that read it. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.
62
+ - **Launch evidence** (`server.admission-evidence`) — Bridge has the evidence it needs to admit a launch. Fix: Run setup, then launch again.
63
+ - **Launch evidence: unattended consent** (`server.admission-unattended-consent`) — Launch check: unattended runs are allowed. Fix: Turn on **Allow unattended Epic Implementer runs** on the Setup page, or launch with `--attended`.
64
+ - **Launch evidence: notification destination** (`server.admission-notify-webhook`) — Launch check: an escalation destination is verified. Fix: Declare a notify webhook, or verify your account email.
65
+ - **Launch evidence: repository workflows** (`server.admission-repository-readiness`) — Launch check: the CI and review workflows are confirmed. Fix: Run setup, merge the setup pull request, then run setup again.
66
+ - **Launch evidence: required CI checks** (`server.admission-required-checks`) — Launch check: the required CI checks are stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.
67
+ - **Launch evidence: indexed repository** (`server.admission-index-provenance`) — Launch check: the index reaches the commit that holds the workflows. Fix: Merge the setup pull request, then run setup again.
68
+ - **Repository test gate** (`server.gate-profile`) — The repository's test gate is stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.
69
+ - **Repository test gate warnings** (`server.gate-profile-warnings`) — The stored test gate has no unresolved warnings. Fix: Read the warnings setup prints and confirm or edit the gate.
70
+ - **Effective review mode** (`server.effective-review-mode`) — Bridge shows which review mode child pull requests will use. Fix: Choose a review policy at launch with `--review-policy` if you want a different one.
71
+ - **Epic branch CI** (`server.epic-branch-ci-decision`) — Someone has decided whether CI runs on pull requests into the epic branch. Fix: Run setup and answer the epic-branch CI question, or pass `--epic-branch-ci-decision include|decline`.
72
+ - **Epic branch CI coverage** (`server.epic-branch-ci-coverage-warning`) — Your CI covers pull requests into the epic branch. Fix: Add `epic/**` to the branches your CI workflow runs on.
73
+ - **Additional readiness diagnostics** (`server.diagnostics`) — Extra readiness diagnostics from the server are clear. Fix: Read the diagnostic text; each names its own fix.
74
+ - **Command versions** (`conductor.command-drift`) — The installed Epic Implementer commands match this package's version. Fix: Run `npx -y @bridge_gpt/mcp-server install` to refresh them.
75
+ - **Escalation delivery** (`escalation-reachability`) — An escalation can actually be delivered. Fix: Verify your account email or fix the webhook, then run setup again.
76
+
77
+ ## 1. Install
78
+
79
+ Run this once per project. Skip it when Bridge is already installed.
80
+
81
+ ```bash
82
+ npx -y @bridge_gpt/mcp-server install
83
+ ```
84
+
85
+ It writes this guide to `docs/install/epic-implementer-install.md` in your project. Run it again any time to refresh that file.
86
+
87
+ ## 2. Set up
88
+
89
+ Run this once per repository, from the repository root, in your own terminal:
90
+
91
+ ```bash
92
+ npx -y @bridge_gpt/mcp-server install conductor
93
+ ```
94
+
95
+ `install-bridge conductor` is the same command with another spelling. Setup checks everything first (read-only), fixes only what is missing, checks again, and ends with one verdict: "Ready for your first epic" or "Not ready: N steps left", with the fix for each step. It asks before anything that writes, and without a terminal every question is a "no".
96
+
97
+ When setup reports that its setup pull request is waiting, it prints `merge the setup PR` with the pull request's address. Merge that pull request, then run setup again. Setup starts the re-index, and reports the item as pending ("indexing is running; re-run setup when it finishes", or "indexing was queued; re-run setup when it finishes") until the index reaches the merged commit. Run setup again until it says "Ready for your first epic".
98
+
99
+ ### View or change the test command
100
+
101
+ Setup prints the stored test command on every run:
102
+
103
+ ```text
104
+ Test command: `npm test` (stored). Change it with --test-command "...".
105
+ ```
106
+
107
+ To save or replace it, pass the command yourself:
108
+
109
+ ```bash
110
+ npx -y @bridge_gpt/mcp-server install conductor --test-command "npm run lint && npm run build"
111
+ ```
112
+
113
+ The flag is your consent for that one write, so setup asks no command question. It checks the command first (one line, no `${{`, at most 500 characters), saves it once, and reads it back. It reports success only when the stored value matches. Passing the same command again says "Test command unchanged" and writes nothing. With `--dry-run`, nothing is saved.
114
+
115
+ Two things stay separate from the flag. Setup still asks you to confirm the Bridge URL, so the command needs a terminal. And opening the setup pull request asks for its own consent: after you replace the command, setup offers the update pull request in the same run, and a command you declined to ship stays saved.
116
+
117
+ Do not put a credential in the test command. Setup prints it, and the workflow file contains it.
118
+
119
+ ### What CI installs automatically
120
+
121
+ The setup pull request adds `.github/workflows/epic-implementer-ci.yml`. Before it runs your test command, the workflow installs your dependencies from the files in your repository root. Bridge reads those files on your computer when it generates the workflow, and it never runs a package manager to decide.
122
+
123
+ | Language | Dependency file, first match wins | What CI runs |
124
+ | --- | --- | --- |
125
+ | JavaScript | `pnpm-lock.yaml`, `yarn.lock`, `npm-shrinkwrap.json`, `package-lock.json`, `bun.lock`, `bun.lockb` | `pnpm install`, `yarn install` (Yarn classic or Berry), `npm ci`, or `bun install`, each in its frozen form so the lockfile is used exactly as committed |
126
+ | Python | `uv.lock`, `poetry.lock`, `requirements.txt` | `uv sync` (frozen), `poetry install`, or `pip install` from `requirements.txt` |
127
+ | Go | `go.mod` | Go is set up from `go.mod`. |
128
+
129
+ - **Mixed repositories** get every language they have, in the order JavaScript, Python, Go.
130
+ - **Versions.** Node comes from `.nvmrc`, then `.node-version`, otherwise Node 24. Python comes from `.python-version`, otherwise Python 3.12. pnpm uses the version in `package.json` `packageManager` when it is valid, otherwise pnpm 10. Yarn is classic or Berry according to `.yarnrc.yml`, `packageManager`, and the lockfile; Berry runs through Corepack, which uses the Yarn version your `package.json` declares, otherwise Yarn 4. Poetry is installed at a fixed version, and Bun at the latest 1.x release. Every action is pinned to a fixed major version.
131
+ - **uv and Poetry** projects must declare development dependencies such as `pytest` in the project. Their environments are put on `PATH`, so your stored command runs unchanged inside the project environment.
132
+ - **If Bridge cannot read a file it needs**, or `package.json` contradicts the lockfile (for example a `packageManager` for a different tool), setup reports the dependency setup as unknown and blocks the workflow. It does not guess.
133
+ - **Upgrades are reviewed.** An older Bridge-written workflow is replaced through a pull request you merge, never silently. If a setup pull request from an earlier release is still open, merge or close it first; setup names it and leaves it alone.
134
+
135
+ ### When your command must be self-contained
136
+
137
+ Some repositories get no automatic installation, and setup says so in plain words:
138
+
139
+ - **Python with no `uv.lock`, `poetry.lock`, or `requirements.txt`** (for example only `pyproject.toml` or `Pipfile`) gets no Python installation. Add a supported file, or make the command install what it needs.
140
+ - **Rust** uses the toolchain the CI runner already has. If that is not enough, install what you need inside the command.
141
+ - **No lockfile, or a Make-only project**, shows as `none`: Bridge installs no dependencies, so the command must install them itself.
142
+
143
+ A command that installs its own dependencies is always allowed. Nothing in the workflow adds to your command, wraps it, or sets a prefix in front of it.
144
+
145
+ ### Recover from a stale CLI
146
+
147
+ An old copy of the command line tool can print old wording or miss a flag such as `--test-command`. Bridge checks the npm registry for a newer release about once a day and says so at the start of a session. That notice only reports that a newer version exists; it cannot tell you which copy `npx` actually ran. Likely causes are a cached `npx` download or a project-local install that `npx` picked first. Neither is proven for any one machine.
148
+
149
+ 1. See which version ran: `npx -y @bridge_gpt/mcp-server doctor`. Its `Bridge MCP version:` line gives the installed version and the latest one, and says when an upgrade is available.
150
+ 2. Fetch the newest release by running through `@latest`: `npx -y @bridge_gpt/mcp-server@latest doctor`. The `Bridge MCP version:` line should now show the latest version.
151
+ 3. Refresh the installed command files: `npx -y @bridge_gpt/mcp-server@latest install`.
152
+ 4. Run setup again: `npx -y @bridge_gpt/mcp-server@latest install conductor`.
153
+ 5. If the output is still wrong, email info@bridgegpt.ai with the `Bridge MCP version:` line from step 1 and the setup output, with any secret removed.
154
+
155
+ ## 3. Define the epic
156
+
157
+ In Claude Code, run:
158
+
159
+ ```text
160
+ /define-tickets
161
+ ```
162
+
163
+ It writes real child ticket keys, `epic-plan.dag.json`, and `epic-plan.meta.json`, then hands off to `/drive-epic-run`. The meta file is how the launch finds the plan from the epic key.
164
+
165
+ ## 4. Launch
166
+
167
+ In Claude Code, run:
168
+
169
+ ```text
170
+ /drive-epic-run <EPIC> [<plan path>]
171
+ ```
172
+
173
+ It previews the launch, asks you once, creates the run through `drive-epic`, and drives the run to the end. From a shell, run the same launch yourself:
174
+
175
+ ```bash
176
+ npx -y @bridge_gpt/mcp-server drive-epic <EPIC>
177
+ ```
178
+
179
+ Add `--dry-run` for a read-only preview, or `--attended` to opt out of unattended merging. `drive-epic --help` lists the common options, and `drive-epic --help-advanced` lists the rest.
180
+
181
+ ## Advanced: the planner
182
+
183
+ `/plan-epic` is the advanced planner. It writes placeholder `TBD-N` keys instead of real ones. You create the child tickets yourself, run `emit-epic-implementer-bundle finalize` to replace the placeholders and write the plan files, then run `/drive-epic-run`. Planning never creates or approves a run.
184
+
185
+ ## If something goes wrong
186
+
187
+ Every refusal names the missing item and its fix, and creates nothing. Run setup again after you fix an item. To stop a run that is already active, run `npx -y @bridge_gpt/mcp-server epic-implementer abandon-run --epic-run-id <id>`, replacing `<id>` with the run ID that `drive-epic` printed when it started the run. Abandoning a run is final. For a read-only report of every item, run `npx -y @bridge_gpt/mcp-server epic-implementer readiness --json`. If you are stuck, email info@bridgegpt.ai.