@bridge_gpt/mcp-server 0.2.66 → 0.2.67

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 (100) hide show
  1. package/README.md +252 -77
  2. package/build/agent-capabilities/probes.js +15 -5
  3. package/build/agent-launchers/claude-executor-adapter.js +43 -16
  4. package/build/agent-launchers/executor-adapter.js +7 -4
  5. package/build/agents.generated.js +1 -1
  6. package/build/bounded-wait.js +67 -10
  7. package/build/commands.generated.js +11 -11
  8. package/build/conductor/bridge-api-client.js +143 -1
  9. package/build/conductor/bring-up-facts.js +1 -1
  10. package/build/conductor/doctor.js +3 -3
  11. package/build/conductor/epic-implementer-cli.js +22 -6
  12. package/build/conductor/errors.js +4 -3
  13. package/build/conductor/guided-repair.js +6 -2
  14. package/build/conductor/hook-runtime-qualification.js +1 -1
  15. package/build/conductor/merge-execution-contract.js +27 -8
  16. package/build/conductor/merge-execution-eligibility.js +3 -2
  17. package/build/conductor/pr-ci-producer.js +1 -1
  18. package/build/conductor/readiness-cli.js +18 -2
  19. package/build/conductor/readiness-sections.js +41 -6
  20. package/build/conductor/readiness.js +181 -29
  21. package/build/conductor/recovery-cli.js +200 -8
  22. package/build/conductor/recovery-operations.js +69 -3
  23. package/build/conductor/repair-contract.js +54 -3
  24. package/build/conductor/repository-workflow-remedy.js +125 -0
  25. package/build/conductor/tools.js +2 -2
  26. package/build/conductor-bundle-artifacts.js +8 -0
  27. package/build/docs.generated.js +8 -3
  28. package/build/drive-epic-key.js +6 -5
  29. package/build/drive-epic.js +85 -54
  30. package/build/epic-coherence-input.js +2 -1
  31. package/build/epic-implementer-bin.js +22 -20
  32. package/build/epic-implementer-bundle-cli.js +2 -2
  33. package/build/executor/cli.js +3 -2
  34. package/build/executor/completion-contract.js +48 -5
  35. package/build/executor/completion-supervision.js +4 -0
  36. package/build/executor/env.js +19 -0
  37. package/build/executor/heartbeat.js +1 -1
  38. package/build/executor/http-client.js +20 -0
  39. package/build/executor/job-errors.js +25 -0
  40. package/build/executor/job-runner.js +225 -41
  41. package/build/executor/observation.js +6 -1
  42. package/build/executor/preflight.js +51 -14
  43. package/build/executor/required-work-ledger.js +6 -1
  44. package/build/executor/resume-pre-spawn.js +2 -0
  45. package/build/executor/runner.js +8 -2
  46. package/build/executor/service-unit.js +7 -1
  47. package/build/executor/worker-finalization.js +82 -29
  48. package/build/executor/worker-guard-hook.js +137 -33
  49. package/build/executor/worktree.js +82 -1
  50. package/build/index.js +403 -429
  51. package/build/install-bridge-conductor.js +8 -6
  52. package/build/install-bridge.js +3 -3
  53. package/build/phase-context-git-probe.js +68 -0
  54. package/build/phase-result-artifacts.js +173 -5
  55. package/build/pipelines.generated.js +18 -24
  56. package/build/plane/alembic-head.js +12 -3
  57. package/build/plane/base-worktree-guard.js +147 -0
  58. package/build/plane/cli.js +217 -17
  59. package/build/plane/code-snapshot.js +468 -0
  60. package/build/plane/defaults.js +48 -3
  61. package/build/plane/endpoint.js +41 -0
  62. package/build/plane/manifest.js +120 -1
  63. package/build/plane/member-roster.js +94 -19
  64. package/build/plane/preflight.js +30 -2
  65. package/build/plane/process-cwd.js +67 -0
  66. package/build/plane/restart.js +542 -0
  67. package/build/plane/shutdown.js +31 -0
  68. package/build/plane/status.js +143 -8
  69. package/build/plane/supervisor.js +586 -179
  70. package/build/plane/types.js +54 -2
  71. package/build/printed-remedy-commands.js +37 -0
  72. package/build/readiness-check.js +1 -1
  73. package/build/readme.generated.js +1 -1
  74. package/build/review-generation.js +22 -0
  75. package/build/setup-epic.js +44 -19
  76. package/build/sfcc/config.js +9 -0
  77. package/build/sfcc/credentials.js +100 -38
  78. package/build/sfcc/hostname.js +67 -0
  79. package/build/sfcc/permissions.js +17 -13
  80. package/build/sfcc/register.js +1 -1
  81. package/build/sfcc/tool-wrapper.js +39 -43
  82. package/build/sfcc/write-grants.js +17 -11
  83. package/build/sfcc/write-result.js +4 -3
  84. package/build/sfcc/writes-site-preference.js +20 -8
  85. package/build/start-tickets.js +179 -31
  86. package/build/tool-error-envelope.js +61 -0
  87. package/build/version.generated.js +3 -3
  88. package/build/visual-diff.js +22 -1
  89. package/build/worker-guard-hook-bin.js +3 -6
  90. package/build/worker-guard-hook-main.js +47 -0
  91. package/build/worktree-core.js +130 -4
  92. package/docs/EPIC-IMPLEMENTER-INSTALL.md +849 -0
  93. package/docs/EPIC-IMPLEMENTER.md +662 -0
  94. package/docs/install/mcp-tool-integrations.md +24 -15
  95. package/docs/install/sfcc-integration.md +12 -4
  96. package/package.json +1 -1
  97. package/pipelines/plan-epic.json +0 -5
  98. package/pipelines/review-ticket.json +1 -1
  99. package/docs/CONDUCTOR.md +0 -605
  100. package/pipelines/idea-to-pr.json +0 -49
package/README.md CHANGED
@@ -60,6 +60,7 @@ account — it will ask.
60
60
  - [Operational commands](#operational-commands)
61
61
  - [Extra Capabilities](#extra-capabilities)
62
62
  - [Salesforce B2C Commerce (SFCC) Tools](#salesforce-b2c-commerce-sfcc-tools)
63
+ - [Epic Implementer](#epic-implementer)
63
64
  - [CLI Subcommands](#cli-subcommands)
64
65
  - [Custom Pipelines](#custom-pipelines)
65
66
  - [Environment Variables](#environment-variables)
@@ -67,7 +68,7 @@ account — it will ask.
67
68
  - [Personal model routing preferences](#personal-model-routing-preferences)
68
69
  - [Reference](#reference)
69
70
 
70
- For advanced epic/multi-agent orchestration, see [CONDUCTOR.md](./docs/CONDUCTOR.md).
71
+ To drive a whole epic of tickets automatically, start with [Epic Implementer](#epic-implementer) below. The command details are in [The Epic Implementer](#the-epic-implementer), and the full reference is [EPIC-IMPLEMENTER.md](./docs/EPIC-IMPLEMENTER.md).
71
72
 
72
73
  ## Installation details
73
74
 
@@ -373,7 +374,7 @@ later boot.
373
374
  "mcpServers": {
374
375
  "bridge": {
375
376
  "command": "npx",
376
- "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.66", "serve"],
377
+ "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.67", "serve"],
377
378
  "env": {
378
379
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
379
380
  "BAPI_REPO_NAME": "your-repo",
@@ -395,7 +396,7 @@ later boot.
395
396
  "bridge": {
396
397
  "type": "stdio",
397
398
  "command": "npx",
398
- "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.66", "serve"],
399
+ "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.67", "serve"],
399
400
  "env": {
400
401
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
401
402
  "BAPI_REPO_NAME": "your-repo",
@@ -417,7 +418,7 @@ later boot.
417
418
  "bridge": {
418
419
  "type": "stdio",
419
420
  "command": "npx",
420
- "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.66", "serve"],
421
+ "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.67", "serve"],
421
422
  "env": {
422
423
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
423
424
  "BAPI_REPO_NAME": "your-repo",
@@ -440,7 +441,7 @@ Windsurf only supports global MCP configuration.
440
441
  "mcpServers": {
441
442
  "bridge": {
442
443
  "command": "npx",
443
- "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.66", "serve"],
444
+ "args": ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.67", "serve"],
444
445
  "env": {
445
446
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
446
447
  "BAPI_REPO_NAME": "your-repo",
@@ -459,7 +460,7 @@ Windsurf only supports global MCP configuration.
459
460
  ```toml
460
461
  [mcp_servers.bridge]
461
462
  command = "npx"
462
- args = ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.66", "serve"]
463
+ args = ["-y", "--prefer-offline", "@bridge_gpt/mcp-server@0.2.67", "serve"]
463
464
 
464
465
  [mcp_servers.bridge.env]
465
466
  BAPI_BASE_URL = "https://bridgegpt-api.com"
@@ -584,7 +585,7 @@ The tools worth knowing for most tickets.
584
585
  - **What it does:** Analyzes a single task or feature specification to define, refine, and structure one or more actionable Jira tickets. It maps the code paths, dependencies, and project conventions the task would touch, settles acceptance criteria with you on a decision page, then compares the viable implementation approaches and their trade-offs so the ticket work is grounded in the real codebase. Along the way it surfaces the ambiguities that still need deciding and can pull in optional web or deep research where the answer is not in the code.
585
586
  - **When it's useful:** (Architecture | Refinement) Before writing a ticket or a plan, when you're unsure how a change would fit the existing code and want the open questions and the realistic options laid out first.
586
587
  - **How to use it:** `/define-tickets <task>` — *"Define the tickets we'd need to add a Mistral LLM provider."*
587
- - **Flags:** None.
588
+ - **Flags:** `--auto` runs unattended, `--allow-duplicate` proceeds past a known duplicate, and `--max-children=N` caps the ticket count (default 10). `--allow-duplicate` and `--max-children=N` take effect only with `--auto`.
588
589
 
589
590
  **5. AI Council**
590
591
  - **What it does:** Fans your problem out to two different models and returns their approaches, in technical, design, discovery, or general mode.
@@ -638,6 +639,12 @@ Good to know, but not needed every day.
638
639
  - **How to use it:** `/create-decision-page <topic or open questions>` — e.g. *"how we handle rate limiting"* — or leave it empty to frame the open choices already raised earlier in the conversation.
639
640
  - **Flags:** None.
640
641
 
642
+ **7. Drive Epic Run**
643
+ - **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.
644
+ - **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.
645
+ - **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.
646
+ - **Flags:** None — the epic key and an optional plan path are the only arguments.
647
+
641
648
  ### Now and then
642
649
 
643
650
  Useful once in a while.
@@ -738,10 +745,10 @@ Slash commands that drive several tools at once. Start Tickets, Review and Start
738
745
  - **Flags:** None — name a specific standards file in your request to have it applied when drafting.
739
746
 
740
747
  **3. Idea to Ticket**
741
- - **What it does:** Turns a one-line idea into a Jira Task/Spike (or an Epic plus child tickets), with research, duplicate detection, and a critique pass built in.
742
- - **When it's useful:** (Refinement | Automation) When you have a rough idea and want a fully-formed, uploaded ticket without the manual draft-and-refine loop.
748
+ - **What it does:** A deprecation alias for `/define-tickets`, kept for one release. It prints a one-line notice and forwards your idea and flags unchanged to `/define-tickets`.
749
+ - **When it's useful:** (Refinement | Automation) Only while you migrate; use `/define-tickets` for new work.
743
750
  - **How to use it:** `/idea-to-ticket <idea>`
744
- - **Flags:** None.
751
+ - **Flags:** `--auto`, `--allow-duplicate`, and `--max-children=N`, all forwarded to `/define-tickets`. Without `--auto` you get the attended `define-tickets` flow; `--allow-duplicate` and `--max-children=N` take effect only with `--auto`.
745
752
 
746
753
  **4. Plan Epic**
747
754
  - **What it does:** Decomposes a large epic into sub-tasks with a structured exploration doc for each.
@@ -751,7 +758,8 @@ Slash commands that drive several tools at once. Start Tickets, Review and Start
751
758
 
752
759
  #### Ticket-authoring posture
753
760
 
754
- `/define-tickets`, `/idea-to-ticket`, and `/plan-epic` all decide ticket shape
761
+ `/define-tickets` is the single ticket-creation entry point. It, the deprecated
762
+ `/idea-to-ticket` alias, and `/plan-epic` all decide ticket shape
755
763
  the same way, as does the `jira-ticket-writer` agent they draft through. A fresh install inherits this with no configuration
756
764
  step and no server call; the full rationale and the closed exception list ship as
757
765
  `docs/bridge-ticket-authoring.md`.
@@ -774,7 +782,7 @@ step and no server call; the full rationale and the closed exception list ship a
774
782
  then fans out one writer invocation per entry against that frozen manifest. A
775
783
  rendering invocation never re-splits, merges, reorders, or rescopes.
776
784
  - **Handed off once.** An epic handoff names exactly one entry point,
777
- [`drive-epic`](#drive-epic) — never a choice between conductors.
785
+ [`drive-epic`](#drive-epic) — never a choice between two ways to run it.
778
786
 
779
787
  **5. Run Tests**
780
788
  - **What it does:** Runs the unit and E2E suites and autonomously triages/fixes failures (via the test-correction agent).
@@ -883,13 +891,13 @@ Accepted key spellings: `hostname`/`host`, `client-id`/`clientId`/`client_id`, `
883
891
 
884
892
  Credentials resolve in **three tiers, highest first** — the environment wins over `dw.json`, not the other way round:
885
893
 
886
- 1. An explicit dotted `instance` argument on the call, **plus** `SFCC_CLIENT_ID` and `SFCC_CLIENT_SECRET` in the environment. Secrets are never read from `dw.json` on this tier, so an explicit instance without those two env values is an error.
894
+ 1. An explicit dotted `instance` argument on the call. An unapproved host is refused with `403` `TARGET_NOT_SANDBOX` **before** any credential lookup. An approved host is matched against the configs in `dw.json` (single or `configs[]`); a config for that exact host supplies the credentials. Otherwise `SFCC_CLIENT_ID` and `SFCC_CLIENT_SECRET` in the environment are the fallback, and with neither the call fails as `CREDENTIAL_RESOLUTION_FAILED` (`400`).
887
895
  2. `SFCC_HOSTNAME` **and** `SFCC_CLIENT_ID` **and** `SFCC_CLIENT_SECRET`, all three set.
888
896
  3. `dw.json`.
889
897
 
890
898
  Because tier 2 outranks tier 3, a stale `SFCC_HOSTNAME` left in the environment silently wins over the `dw.json` you are looking at. Check both when a tool reports an unexpected host.
891
899
 
892
- **Use a single-config `dw.json`, or set all three `SFCC_*` variables.** A multi-entry `configs[]` array is **rejected outright** — it is not a working setup that merely requires an explicit `instance` on every call. Two things make that workaround unavailable: an explicit `instance` takes tier 1, which needs the client id and secret in the environment anyway, and most tools cannot accept a hostname at all — the value must contain a dot, and the site-preference tools constrain `instance` to `staging | development | sandbox | production`, none of which is a hostname.
900
+ **With a multi-entry `configs[]` array, name the sandbox on each call.** Pass one of the listed hostnames as `instance` and that config's credentials are used. Without an `instance`, a multi-config `dw.json` fails as `multi-sandbox`, listing the full hostnames. Most tools cannot accept a hostname at all — the value must contain a dot, and the site-preference tools constrain `instance` to `staging | development | sandbox | production`, none of which is a hostname — so a single-config `dw.json` (or all three `SFCC_*` variables) remains the simplest setup.
893
901
 
894
902
  **3. Enable the tools you want.** Add the groups to `BRIDGE_MCP_PROFILE` in the MCP server `env` block (it is comma-separated), then **restart the MCP client**:
895
903
 
@@ -904,9 +912,9 @@ Because tier 2 outranks tier 3, a stale `SFCC_HOSTNAME` left in the environment
904
912
  Read what it prints before pasting it. The output is **two labelled blocks**, and they are not equivalent:
905
913
 
906
914
  - **READ/SEARCH TOOL GRANTS** — what the `sfcc` read tools need: `get` on `/system_object_definitions`, and `get` + `post` on `/system_object_definitions/**`, `/site_preferences/**`, and `/custom_object_definitions/**`. The `post` is OCAPI's convention for its `*_search` endpoints, not a mutation — but it is a grant you are pasting, so it is labelled for what it is rather than as "read-only".
907
- - **MUTATION GRANTS** — required by the nine `sfcc-write` tools and by nothing else: `put`/`patch` on `/system_object_definitions/**` and `/custom_object_definitions/**`, and `patch` on `/site_preferences/**`. Paste this block only if you intend to enable `sfcc-write`.
915
+ - **MUTATION GRANTS** — required by the nine `sfcc-write` tools and by nothing else: `put`/`patch` on `/system_object_definitions/**` and `/custom_object_definitions/**`, and `patch` on `/sites/*/site_preferences/**` (value writes are site-scoped; the read/search grant keeps the org-level `/site_preferences/**`). Paste this block only if you intend to enable `sfcc-write`. **If you pasted an earlier mutation grant, it lacks the site-scoped resource:** replace `<YOUR_CLIENT_ID>` with your client id in the newly printed grant and paste it again before running value writes.
908
916
 
909
- Neither block grants `delete`, and neither pastes the global `resource_id: "/**"` that would cover every Data API resource. Each entry names one resource family — `/system_object_definitions`, `/custom_object_definitions/**`, `/site_preferences/**` — so the wildcard is scoped to the family, not to the API. Within a family it is still broad, and `write_attributes` is `(**)`, so a throwaway sandbox is the right place for these.
917
+ Neither block grants `delete`, and neither pastes the global `resource_id: "/**"` that would cover every Data API resource. Each entry names one resource family — `/system_object_definitions`, `/custom_object_definitions/**`, `/site_preferences/**` (read/search), `/sites/*/site_preferences/**` (mutation) — so the wildcard is scoped to the family, not to the API. Within a family it is still broad, and `write_attributes` is `(**)`, so a throwaway sandbox is the right place for these.
910
918
 
911
919
  </details>
912
920
 
@@ -982,7 +990,7 @@ Attribute-definition reads and writes can return an attribute's `default_value`
982
990
 
983
991
  **Diagnostics** (registered by the `sfcc` profile)
984
992
  - `sfcc_setup_status` — report on every prerequisite: Bridge API key, repo name, `version` config, `dw.json` presence/uniqueness, AM (OCAPI) token acquisition, and the independent **SFCC Log Query (WebDAV)** capability that gates `sfcc_log_query`.
985
- - `check_permissions` — probe OCAPI access via `GET /system_object_definitions`; on 401/403, print the exact OCAPI Settings JSON to paste in Business Manager (read/search grants for the `sfcc` tools, mutation grants for the `sfcc-write` tools). An explicit `instance` hostname is still subject to the sandbox check below.
993
+ - `check_permissions` — probe OCAPI **read** access via `GET /system_object_definitions` (it does not probe write access); on 401/403, print the exact OCAPI Settings JSON to paste in Business Manager (read/search grants for the `sfcc` tools, mutation grants for the `sfcc-write` tools). An explicit `instance` hostname is still subject to the sandbox check below.
986
994
 
987
995
  **System object model — reads** (needs the `sfcc` profile)
988
996
  - `system_object_list` — list system object types (Product, Order, Customer, …).
@@ -1007,7 +1015,7 @@ Attribute-definition reads and writes can return an attribute's `default_value`
1007
1015
  - `site_preference_group_list` — list the preference groups on a site. This is the discovery tool the other two reads depend on: both take a group, and this is how you find one.
1008
1016
  - `site_preference_get` — list the preference **identifiers** in a group.
1009
1017
  - `site_preference_search` — search/filter preference identifiers within a group.
1010
- - `site_preference_values_set` — **write** (sandbox only): set custom preference values via `PATCH /site_preferences/preference_groups/{group}/sandbox` with a flat map of `c_`-prefixed ids to string/number/boolean/string[] values. A bad group returns 404 `CustomPreferenceGroupNotFoundException`; echoes grant JSON on 403.
1018
+ - `site_preference_values_set` — **write** (sandbox only): set custom preference values for one required `site_id` via `PATCH /sites/{site_id}/site_preferences/preference_groups/{group}/sandbox` with a flat map of `c_`-prefixed ids to string/number/boolean/string[] values. A bad group returns 404 `CustomPreferenceGroupNotFoundException`; echoes grant JSON on 403.
1011
1019
 
1012
1020
  > **Site preference values are write-only through this surface.** `site_preference_get` and `site_preference_search` return **ids only, never values** — an unset preference and one set to the empty string are indistinguishable. So you can *set* a value with `site_preference_values_set` and have no way to read it back through an MCP tool. Business Manager is the supported path to read a preference value.
1013
1021
 
@@ -1019,6 +1027,76 @@ Attribute-definition reads and writes can return an attribute's `default_value`
1019
1027
  - **Auth is separate from OCAPI.** Log retrieval uses **HTTP Basic auth** — a Business Manager username + a **40-character WebDAV access key** — *not* the OCAPI Account Manager OAuth token the other SFCC tools use. A valid AM bearer token 401s on `/Logs`. `sfcc_setup_status` step 5 (AM/OCAPI token) and step 6 (WebDAV log access) are independent: one can be green while the other is not.
1020
1028
  - **Local / air-gapped fallback.** The primary path above is the only path this tool takes. For air-gapped development, the documented fallback is Salesforce's own **`@salesforce/b2c-cli`**, shelled out to directly: `b2c logs get --since <window> --search <q> --json`. There is no MCP alternative to reach for — `@salesforce/b2c-dx-mcp` ships **no `logs_*` tool** as of 1.1.2, and every log workflow in the vendor toolkit goes through the CLI anyway (see the [vendor manual](../docs/mcp/b2c-commerce-developer.md)). It is **not** the primary path because its credentials live client-side and its output has **not** passed Bridge's redaction/filter. If you use it, its output must be treated as raw: route it back through the same server-side Python `LogSource` composition and `RedactionPort`/T3 filter workflow — never paste or relay unredacted CLI output to an LLM.
1021
1029
 
1030
+ ## Epic Implementer
1031
+
1032
+ The Epic Implementer drives a whole epic, several related tickets, from an
1033
+ approved plan to merged pull requests. It hands each child ticket to an agent on
1034
+ your machine, waits for CI and code review, and merges each child PR into an
1035
+ `epic/<KEY>` branch. A person merges the final pull request into your default
1036
+ branch.
1037
+
1038
+ By default a run with two or more tickets is **unattended**: it merges child
1039
+ PRs on its own. `--attended` opts out.
1040
+
1041
+ **What it requires**
1042
+
1043
+ - macOS or Linux, with `git`, the GitHub CLI (`gh`, logged in), the Claude Code
1044
+ CLI (`claude`, logged in), and Worktrunk (`wt`) on your `PATH`.
1045
+ - Bridge installed in the repository, and the Bridge GitHub App connected.
1046
+ - The repository's Epic Implementer defaults, including the CI check each
1047
+ ticket must pass (`install conductor`). For unattended runs, that check must
1048
+ be a job in one of the two workflow files below, for example
1049
+ `epic-implementer-ci / gate`.
1050
+ - `.github/workflows/claude-review.yml` and
1051
+ `.github/workflows/epic-implementer-ci.yml` on your default branch, then the
1052
+ repository indexed (or re-indexed) after they merge. The epic branch is cut
1053
+ from the indexed commit.
1054
+ - For unattended runs: an escalation channel (the account email, or a webhook)
1055
+ and a merge credential in `BAPI_LOCAL_MERGE_TOKEN`.
1056
+
1057
+ **How to set it up**
1058
+
1059
+ The easy way is to ask your agent:
1060
+
1061
+ > Set up the Epic Implementer by following `docs/install/epic-implementer-install.md`.
1062
+
1063
+ `install` copies that guide into your project. It is also in this package as
1064
+ [EPIC-IMPLEMENTER-INSTALL.md](./docs/EPIC-IMPLEMENTER-INSTALL.md). It checks
1065
+ each step, asks before anything that writes, and tells you which commands you
1066
+ must run yourself.
1067
+
1068
+ By hand, the outline is:
1069
+
1070
+ ```bash
1071
+ npx -y @bridge_gpt/mcp-server install # if Bridge is not installed yet
1072
+ npx -y @bridge_gpt/mcp-server connect-github --repo <repo_name> # connect the GitHub App
1073
+ npx -y @bridge_gpt/mcp-server install conductor --required-check "epic-implementer-ci / gate" \
1074
+ --allowed-bot "<bot>" --secret-name <SECRET_NAME> --branches "<default branch>,epic/**"
1075
+ export BAPI_LOCAL_MERGE_TOKEN="$(gh auth token)" # in the shell that runs drive-epic
1076
+ npx -y @bridge_gpt/mcp-server epic-implementer readiness --json # read-only check of every prerequisite
1077
+ ```
1078
+
1079
+ After `install conductor`, restart your MCP client so the Epic Implementer tools
1080
+ appear. Add `epic-implementer-ci.yml` (the guide has a template) and the
1081
+ `claude-review.yml` that `install conductor` wrote, through a pull request into
1082
+ your default branch. Once it merges, index the repository with
1083
+ `/parse-repository`.
1084
+
1085
+ **How to run an epic**
1086
+
1087
+ 1. `/plan-epic <EPIC>` splits an existing epic ticket into child tickets and
1088
+ writes a plan (`epic-plan.dag.json`). Its last step creates and approves an
1089
+ unattended run.
1090
+ 2. `/drive-epic-run <EPIC> [<plan path>]` previews, asks you once, starts the
1091
+ run, and watches it to the end. It takes no flags. For `--attended` or
1092
+ `--policy-file <path>`, use the shell instead:
1093
+ `npx -y @bridge_gpt/mcp-server drive-epic <EPIC> --plan-file <path> [--attended]`.
1094
+ 3. Monitor with the `get_epic_snapshot` and `explain_run` MCP tools, or
1095
+ `npx -y @bridge_gpt/mcp-server notifications --repo <repo_name> --run <EPIC> --follow`.
1096
+
1097
+ See [The Epic Implementer](#the-epic-implementer) for every command, and
1098
+ [EPIC-IMPLEMENTER.md](./docs/EPIC-IMPLEMENTER.md) for the full reference.
1099
+
1022
1100
  ## CLI Subcommands
1023
1101
 
1024
1102
  Beyond `--init` / `--upgrade`, the package ships operational subcommands of the **single `bridge-api-mcp-server` bin** (not separate binaries) — so they travel with the package to every consumer. See [Usage Documentation → Start Tickets](#regularly-useful) for *when* to use `start-tickets`; this section is the full CLI reference.
@@ -1044,7 +1122,7 @@ npx -y @bridge_gpt/mcp-server start-tickets [flags] KEY [KEY ...]
1044
1122
  | `--base-branch <BRANCH>` | `main` | Cut new worktrees from `<BRANCH>` and refresh `origin/<BRANCH>` instead of `main` |
1045
1123
  | `--no-refresh-main` | off (the configured base branch is refreshed) | Skip refresh of the configured base branch (default `main`). Historical flag name preserved for backward compatibility — despite the name, it now skips refresh of whatever `--base-branch` resolves to. |
1046
1124
  | `--max-parallel N` | `3` | Max worktrees created concurrently |
1047
- | `--conductor` | off | Opt into the Conductor system (per-worker `BAPI_EPIC_IMPLEMENTER_*` env + Claude hook injection, lifecycle ledger events, and a supervisor peer tab). **Default off** — a plain run spawns `cd <worktree> && <agent> '/implement-ticket <KEY>'`. |
1125
+ | `--conductor` | off | Opt into Epic Implementer observability (per-worker `BAPI_EPIC_IMPLEMENTER_*` env + Claude hook injection, lifecycle ledger events, and a supervisor peer tab). The flag keeps its name from before the Epic Implementer rename. **Default off** — a plain run spawns `cd <worktree> && <agent> '/implement-ticket <KEY>'`. |
1048
1126
  | `-h`, `--help` | — | Show usage |
1049
1127
 
1050
1128
  Each `KEY` must match `[A-Z]+-[0-9]+` (e.g., `BAPI-248`). The CLI creates/switches each worktree up front (throttled by `--max-parallel`), then opens one tab/session per successful worktree running the selected agent. Claude is the default. Cursor with `--auto` runs headlessly after a bounded authentication/readiness check; manual Cursor runs remain interactive for human review gates. To launch Cursor Agent instead of Claude Code:
@@ -1063,7 +1141,7 @@ For Codex, `GET /jira/codex-model-catalog?repo_name=...` is the sole tier-to-mod
1063
1141
 
1064
1142
  **Machine-carried `--auto-tier` handoff (BAPI-1236).** Passing `--auto-tier cheap|basic|premium` also bypasses the per-ticket difficulty lookup, but — unlike `--tier` — the carried tier IS routed through the launching session's own `maximize_subscription` downshift, exactly once. A malformed, empty, or repeated `--auto-tier` value is a hard parser error (no fail-open sentinel), and `--tier`/`--auto-tier` are mutually exclusive regardless of order. `/review-and-implement` uses this flag, never `--tier`, to hand its review-time raw tier snapshot to the fresh implementation session — so a `maximize_subscription` repo still gets the downshift on the chained handoff instead of silently skipping it.
1065
1143
 
1066
- **Conductor observability (opt-in via `--conductor`, BAPI-394).** Conductor is **off by default**. With `--conductor`, a run mints a conductor `run_id`, emits events into the local ledger (`~/.config/bridge/events.db`), opens a supervisor peer tab, and (for Claude Code) injects a secret-free lifecycle hook into each worktree; it also sets `BRIDGE_MCP_PROFILE=conductor` so workers get the conductor MCP tools. Observability is best-effort — a conductor failure never blocks a spawn, and `--dry-run` performs no conductor side effects. (Epic-tick dispatch always enables conductor internally.) See **[CONDUCTOR.md](./docs/CONDUCTOR.md)** for the full observability, git-hook, done-gate, and auto-merge reference.
1144
+ **Epic Implementer observability (opt-in via `--conductor`, BAPI-394).** The flag keeps its name from before the Epic Implementer rename. Observability is **off by default**. With `--conductor`, a run mints a `run_id`, emits events into the local ledger (`~/.config/bridge/events.db`), opens a supervisor peer tab, and (for Claude Code) injects a secret-free lifecycle hook into each worktree. It also **merges** `epic_implementer` into the workers' `BRIDGE_MCP_PROFILE`, so workers get the Epic Implementer MCP tools. Observability is best-effort — a failure here never blocks a spawn, and `--dry-run` performs no observability side effects. See **[EPIC-IMPLEMENTER.md](./docs/EPIC-IMPLEMENTER.md)** for the full observability, git-hook, done-gate, and auto-merge reference.
1067
1145
 
1068
1146
  **Cross-platform spawning.** The CLI routes spawning per platform; `--dry-run` previews the platform-correct command form on any OS. An unsupported `process.platform` (not `darwin`/`win32`/`linux`) fails fast with a clear "unsupported platform" message.
1069
1147
 
@@ -1087,7 +1165,7 @@ The report also includes a **Claude login** advisory: whether the host's own
1087
1165
  `~/.claude.json` carries a login marker. This is informational only — it never
1088
1166
  blocks the doctor run and cannot guarantee the next worker spawn will
1089
1167
  authenticate. See
1090
- [Claude login for conductor workers](#claude-login-for-conductor-workers).
1168
+ [Claude login for Epic Implementer workers](#claude-login-for-epic-implementer-workers).
1091
1169
 
1092
1170
  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.
1093
1171
 
@@ -1107,30 +1185,104 @@ worker against a stale base prints the same advisory and **still spawns the
1107
1185
  worker**. Remedy and full diagnosis:
1108
1186
  `docs/claude/runbooks/claude-review-base-branch-drift.md`.
1109
1187
 
1188
+ ### The Epic Implementer
1189
+
1190
+ The Epic Implementer drives a whole epic — several related tickets — from an
1191
+ approved plan to merged pull requests, with little help from you. It was called
1192
+ the "conductor" before BAPI-1077..1083 renamed it. A few command, flag, and path
1193
+ names still say `conductor`; each is noted where it appears.
1194
+
1195
+ It has two parts:
1196
+
1197
+ - **The v2 engine.** A reconciler on the Bridge API server decides every step. An
1198
+ executor on your machine runs the jobs it hands out, one agent session per child
1199
+ ticket. This is what drives an epic.
1200
+ - **Observability** (`start-tickets --conductor`). An opt-in local event ledger,
1201
+ supervisor tab, and git hooks. It is off by default, and driving an epic does not
1202
+ need it.
1203
+
1204
+ The path from an epic to a finished run:
1205
+
1206
+ 1. **Plan.** `/plan-epic` splits the epic into child tickets and a plan DAG
1207
+ (`epic-plan.dag.json`). `emit-epic-implementer-bundle finalize` writes the DAG
1208
+ and the meta file that `drive-epic` uses to find it.
1209
+ 2. **Set up the repository, once.**
1210
+ `npx -y @bridge_gpt/mcp-server install conductor --required-check <check>`
1211
+ (also spelled `install-bridge conductor`; the name predates the rename). It runs
1212
+ a read-only doctor and writes the done gate from your required CI check(s). It
1213
+ can also scaffold the `claude-review` workflow, write an executor service unit,
1214
+ and save a launch profile. With its own consent, it adds `epic_implementer` to
1215
+ `BRIDGE_MCP_PROFILE` in your host MCP configs. Run `install conductor --help`
1216
+ for every option.
1217
+ 3. **Launch and drive.** In Claude Code, `/drive-epic-run <EPIC> [<plan path>]`
1218
+ previews the launch, asks you once, creates the run through `drive-epic`, and
1219
+ then watches and recovers it. From a shell, [`drive-epic <EPIC>`](#drive-epic)
1220
+ creates the run and starts its executor.
1221
+ 4. **Monitor.** The MCP tools `get_epic_snapshot` and `explain_run` (they need the
1222
+ `epic_implementer` profile; see [Environment Variables](#environment-variables)),
1223
+ `notifications <EPIC|run-id> [--follow]`, `epic-implementer epic-status`, and
1224
+ `executor watch <job>`.
1225
+ 5. **Recover.** `epic-implementer unpark`, `adopt-current-head-and-unpark`,
1226
+ `continue-child`, `resume-run`, `stop-run`, and `abandon-run` (terminal and
1227
+ irreversible). Run `npx -y @bridge_gpt/mcp-server epic-implementer --help` for
1228
+ the full list.
1229
+
1230
+ `epic-implementer readiness` is a read-only report of every prerequisite, the
1231
+ unattended ones included, each with its state and one named fix. The full
1232
+ reference — architecture, the CI gate, supervisor config, observability, and git
1233
+ hooks — is in [EPIC-IMPLEMENTER.md](./docs/EPIC-IMPLEMENTER.md).
1234
+
1235
+ **Old variable names stop every command (BAPI-1190).** Every `BAPI_CONDUCTOR_*`
1236
+ variable was renamed to `BAPI_EPIC_IMPLEMENTER_*`, and the few old `CONDUCTOR_*`
1237
+ names without the `BAPI_` prefix (the node path, for one) now start with
1238
+ `EPIC_IMPLEMENTER_`. There are no aliases. If any old name is set, every
1239
+ entry point — the MCP server included — prints the old names and exits `1`.
1240
+ Rename or unset them.
1241
+
1110
1242
  ### `drive-epic`
1111
1243
 
1112
- The one conductor entry point every Bridge surface names. Give it an epic key and
1113
- it reads conductor readiness for your repository and routes to the single path
1114
- your project can actually run:
1244
+ The one Epic Implementer entry point every Bridge surface names. Give it an epic
1245
+ key and it reads Epic Implementer readiness for your repository and routes to the
1246
+ single path your project can actually run:
1115
1247
 
1116
1248
  ```
1117
1249
  npx -y @bridge_gpt/mcp-server drive-epic <EPIC>
1118
1250
  ```
1119
1251
 
1120
- You are never asked to choose. `drive-epic` routes to exactly one conductor, the
1252
+ You are never asked to choose. `drive-epic` routes to exactly one engine, the
1121
1253
  v2 engine — one transition authority per epic is what keeps an epic from wedging.
1122
1254
  Readiness green routes to the v2 bootstrap below (pass `--plan-file`
1123
1255
  and `drive-epic` runs it for you); readiness not green reports that the v2 engine
1124
- is not ready to drive this epic — there is no alternative conductor to fall back
1125
- to — and prints no conductor invocation. If readiness is **unknown** — unreachable,
1126
- unauthorized, or malformed — it escalates and prints no conductor invocation at
1256
+ is not ready to drive this epic — there is no alternative engine to fall back
1257
+ to — and prints no run command. If readiness is **unknown** — unreachable,
1258
+ unauthorized, or malformed — it escalates and prints no run command at
1127
1259
  all, because an unknown owner is not the same as a not-ready one. No branch,
1128
1260
  including every error path, ever offers you two paths.
1129
1261
 
1130
1262
  `drive-epic` owns no branch behavior of its own — it forwards `--feature-branch
1131
1263
  <name>`, `--into-base`, and `--attended` verbatim to `setup-epic`, which decides
1132
1264
  the strategy and the posture (see below). With none of them, a multi-ticket epic
1133
- runs on `epic/<KEY>`, unattended.
1265
+ runs on `epic/<KEY>`, unattended. It also forwards `--repo` and the policy flags:
1266
+ `--policy-file <path>` (the complete run policy), `--review-policy <src>` (a
1267
+ per-run review policy), and `--replace-policy` (allow replacing a live run's
1268
+ stored policy).
1269
+
1270
+ **Every run gets an executor (BAPI-1279).** Once `drive-epic` creates a run, it
1271
+ starts an executor scoped to that run in the background, from this checkout's Git
1272
+ top level. The executor claims only that run's jobs, logs to
1273
+ `.bridge/executors/<run>.log`, and exits on its own when the run is done or
1274
+ abandoned. You do not start one by hand. Run `drive-epic` from a Git work tree
1275
+ inside the target repository — it checks this before creating anything. If the
1276
+ executor fails to start, the run is left intact and `drive-epic` prints the log
1277
+ path and the exact command to start it by hand.
1278
+
1279
+ **Choosing the server.** With no flags, `drive-epic` targets production and uses
1280
+ the stored `bapi:<repo>` key when there is one. `--base-url <url>` (or
1281
+ `BAPI_BASE_URL`) names another server. `--launch-profile <name>` (or
1282
+ `BAPI_EPIC_LAUNCH_PROFILE`) selects a host-local profile saved by
1283
+ `install conductor --launch-profile <name>`; use one for a local server or a
1284
+ durable host. With a profile, `--base-url` must agree with it. A stored key
1285
+ approved for a different endpoint is never sent.
1134
1286
 
1135
1287
  **Finding the plan from the epic key (BAPI-1285).** `--plan-file` is optional.
1136
1288
  Without it, `drive-epic` searches `{docs_dir}/epic-plans/*/epic-plan.meta.json` for a
@@ -1166,9 +1318,10 @@ requests a lane, or starts or signals an executor. With `--json` (valid only wit
1166
1318
  `--dry-run`) stdout carries exactly one JSON document with `epic_key`, `target`,
1167
1319
  `readiness`, `live_run`, `plan`, `summary`, `decision`, and `refusal`. The
1168
1320
  readiness `reason_id` and `remedy` are the strings the real refusal prints. The
1169
- webhook URL, credentials, and policy contents are never included. The preview does
1170
- probes only a selected loopback plane after a network readiness failure and an
1171
- available plan. A refused port plus passing local preflight yields a conditional
1321
+ webhook URL, credentials, and policy contents are never included. The preview
1322
+ probes a local plane only when the target is a loopback plane, readiness failed on
1323
+ the network, and a plan is available. A refused port plus passing local preflight
1324
+ yields a conditional
1172
1325
  `create` with optional `cold_start` (`plane_endpoint`, `will_start_plane: true`,
1173
1326
  `live_run_checked: false`), `live_run: null`, and partial offline setup validation.
1174
1327
  The real launch attempts guarded startup, then rechecks run existence and server
@@ -1177,6 +1330,15 @@ port probes, and ordinary production previews keep their existing refusal or
1177
1330
  create behavior. `target.source` is optional and appears only for selected
1178
1331
  profiles (`profile` or `profile-env`).
1179
1332
 
1333
+ #### Running the server yourself (Bridge API source checkout only)
1334
+
1335
+ The rest of this section, and [`plane up`](#plane-up--claim-scope-is-required)
1336
+ below, apply only when you run the Bridge API server on your own machine. That
1337
+ needs a Bridge API **source checkout**: `plane up` must run from its repository
1338
+ root (the directory holding `main.py`, `worker.py`, and `alembic.ini`), and its
1339
+ executor lanes run from that checkout's `mcp_server/build/index.js`, never from
1340
+ npx. If you target production, skip this part.
1341
+
1180
1342
  **The composed bring-up is two-phase (BAPI-1102).** With `--plan-file` on a
1181
1343
  repository whose readiness is missing only the runtime facts, one invocation runs,
1182
1344
  in order: the **control plane** (Bridge API server + reconciler, each gated on its
@@ -1186,24 +1348,23 @@ observer** last, then the ready banner. The order is forced: an executor lane mu
1186
1348
  carry an explicit claim scope, and the run it is scoped to does not exist until the
1187
1349
  server is up and `setup-epic` has run.
1188
1350
 
1189
- A composed plane serves **exactly one** run; start a second plane for a second
1190
- epic. If `setup-epic` fails, the control plane is left running and **no executor
1191
- lane is spawned**. If the lanes fail to become ready, the control plane and the
1192
- committed run are both left intact and the observer is not started — nothing is
1193
- rolled back, because a local process that failed to start says nothing about
1194
- whether the run is valid.
1351
+ A plane's executor lanes serve **exactly one** run — the run it is bound to. A
1352
+ second epic does **not** start a second plane: it attaches to the running plane's
1353
+ reconciler and gets its own run-scoped executor. Two planes on one database are
1354
+ not supported. If `setup-epic` fails, the control plane is left running and **no
1355
+ executor lane is spawned**. If the lanes fail to become ready, the control plane
1356
+ and the committed run are both left intact and the observer is not started —
1357
+ nothing is rolled back, because a local process that failed to start says nothing
1358
+ about whether the run is valid.
1195
1359
 
1196
1360
  "Plane ready" reports **processes**, not dispatchability: if the run cuts an epic
1197
1361
  branch, the reconciler holds ticket dispatch until that branch's index scope
1198
1362
  finishes preparing.
1199
1363
 
1200
- Two conductors is a transitional state. When one is eliminated, `drive-epic` is
1201
- the only thing that changes.
1202
-
1203
1364
  ### `plane up` — claim scope is required
1204
1365
 
1205
- `plane up` starts the runtime on its own, and every executor lane it starts needs
1206
- an explicit claim scope:
1366
+ `plane up` starts the runtime on its own, from a Bridge API source checkout, and
1367
+ every executor lane it starts needs an explicit claim scope:
1207
1368
 
1208
1369
  ```
1209
1370
  npx -y @bridge_gpt/mcp-server plane up --epic-run-id <run-id> # repeatable
@@ -1223,13 +1384,13 @@ then signals the recorded process group.
1223
1384
 
1224
1385
  ### `setup-epic`
1225
1386
 
1226
- Bootstraps an Epic Conductor v2 run in one command — creates the epic run, stores the plan DAG, and approves it:
1387
+ Bootstraps an Epic Implementer v2 run in one command — creates the epic run, stores the plan DAG, and approves it. `drive-epic` runs it for you; call it directly only when you want the bootstrap on its own:
1227
1388
 
1228
1389
  ```
1229
1390
  npx -y @bridge_gpt/mcp-server setup-epic --epic-key <KEY> --plan-file <path-to-epic-plan.dag.json>
1230
1391
  ```
1231
1392
 
1232
- The plan sidecar is produced by the `decompose-epic` pipeline step. `setup-epic` validates it locally (unique ticket keys, resolvable dependency references, acyclicity) before sending anything, so a malformed plan fails legibly instead of as a bare HTTP 400. It is **idempotent**: re-running it on an epic that already has a live run reuses that run rather than minting a second one. `--dry-run` validates and previews the calls without mutating anything; `--json` emits a single machine-readable result object.
1393
+ The plan sidecar is produced by the `decompose-epic` pipeline step (the `/plan-epic` flow). `setup-epic` validates it locally (unique ticket keys, resolvable dependency references, acyclicity) before sending anything, so a malformed plan fails legibly instead of as a bare HTTP 400. It is **idempotent**: re-running it on an epic that already has a live run reuses that run rather than minting a second one. `--dry-run` validates and previews the calls without mutating anything; `--json` emits a single machine-readable result object. It takes the same policy flags as `drive-epic` (`--policy-file`, `--review-policy`, `--replace-policy`), plus `--plan-version` and `--local-only`; see `setup-epic --help`.
1233
1394
 
1234
1395
  **The command above uses an epic branch.** For a plan with **two or more** nodes and
1235
1396
  no branch flag, `setup-epic` derives `epic/<KEY>`: every child-ticket PR targets that
@@ -1261,49 +1422,61 @@ default, or, when it declares none, as an explicit recorded `no_ci_gate` mode.
1261
1422
  An unattended run has two **repository** prerequisites — consent
1262
1423
  (`unattended_epic_implementer_allowed`, ON by default; the repository owner can switch
1263
1424
  "Allow unattended Epic Implementer runs" off and on in the Bridge admin panel's Setup
1264
- page) and a verified notify webhook default — plus
1425
+ page) and an **escalation channel** (BAPI-1274): a verified notify webhook, or,
1426
+ when the policy declares no webhook, an email address on the account — plus
1265
1427
  confirmed default-branch review/CI workflows. Each is refused by name **before any
1266
1428
  run row is created** (`target_not_allowed`, `webhook_unverified`,
1267
- `repository_readiness_unconfirmed`), and `drive-epic` readiness and `doctor` both
1268
- list them with their current state. `notify.local_sink` does not satisfy the webhook
1269
- prerequisite.
1270
-
1271
- > **Rollout note.** The client-side default and the server-side admission,
1272
- > stamping, and readiness changes must be released as **one compatible unit**. The
1273
- > new default's shape (`v2_auto_merge_enabled: true` with no `required_checks`) is
1274
- > exactly what the create route refused before BAPI-1102, so shipping the client
1275
- > half alone would 422 every unattended run at `POST /jira/epic-runs/runs`.
1276
- > Deploying only the server half is safe and inert: it narrows two refusals and adds
1277
- > a first-approval stamp, and **rewrites no existing run**. No database migration and
1278
- > no new environment variable is introduced — `config_projects.unattended_epic_implementer_allowed`
1279
- > and `epic_supervisor_setup.done_gate_config` already exist and are read as-is.
1280
-
1281
- Once the plan is approved, the **server-side reconciler** picks the run up within ~30s. To execute claimed jobs on your machine, run `executor`:
1429
+ `repository_readiness_unconfirmed`). A missing channel is still refused as
1430
+ `webhook_unverified`. A declared webhook that fails verification never falls back
1431
+ to email, and `notify.local_sink` does not count as a channel.
1432
+ `epic-implementer readiness` and `drive-epic` both list these prerequisites with
1433
+ their current state.
1434
+
1435
+ Once the plan is approved, the **server-side reconciler** picks the run up within
1436
+ ~30s. If you ran `setup-epic` directly, start an executor for the run yourself
1437
+ (`drive-epic` does this for you). An executor needs exactly one claim scope, or it
1438
+ refuses to start:
1282
1439
 
1283
1440
  ```
1284
- npx -y @bridge_gpt/mcp-server executor --repo <name>
1441
+ npx -y @bridge_gpt/mcp-server executor --repo <name> --epic-run-id <run-id> --exit-when-run-terminal
1442
+ npx -y @bridge_gpt/mcp-server executor --repo <name> --repo-wide # every run in the repo
1285
1443
  ```
1286
1444
 
1287
- ### Conductor (epic & multi-agent orchestration)
1445
+ `executor install-service` generates a launchd/systemd user unit so a durable
1446
+ executor survives a reboot. `--base-url` or `BAPI_BASE_URL` is required: the
1447
+ executor has no production fallback.
1448
+
1449
+ ### Epic Implementer reference
1450
+
1451
+ The full reference — the v2 architecture (server-side reconciler + local
1452
+ executor), the CI gate, `epic-implementer install-git-hooks`, the supervisor
1453
+ `done_gate_config` / `auto_merge_enabled` settings, and the opt-in observability
1454
+ stream — lives in **[EPIC-IMPLEMENTER.md](./docs/EPIC-IMPLEMENTER.md)**.
1455
+ Auto-merge into the epic branch is **on by default** for unattended runs (see
1456
+ [`setup-epic`](#setup-epic)); only the `--conductor` observability layer is off by
1457
+ default.
1288
1458
 
1289
- Conductor is an **opt-in, off-by-default** layer for epic supervision, inter-agent messaging, done-gate evaluation, local git-hook event producers, and conditional auto-merge. Its full reference — the v2 architecture (server-side reconciler + local executor), `setup-epic`, `epic-implementer install-git-hooks`, the supervisor `done_gate_config` / `auto_merge_enabled` settings, and the observability stream — lives in **[CONDUCTOR.md](./docs/CONDUCTOR.md)**. (The event-ledger CLI was renamed from `conductor` to `epic-implementer`; the retained `conductor` bin name is now a fixed migration pointer.)
1459
+ Two retired names remain as failing pointers. The event-ledger CLI was renamed
1460
+ from `conductor` to `epic-implementer`, and `emit-conductor-bundle` to
1461
+ `emit-epic-implementer-bundle`; the old names now print the new name and exit.
1290
1462
 
1291
1463
  > 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.
1292
1464
 
1293
1465
  <!-- BEGIN GENERATED: merge-workflow-install (managed by mcp_server/scripts/sync-readme-merge-workflow.js — DO NOT EDIT BY HAND) -->
1294
- ### `install-bridge conductor --merge-workflow`
1466
+ ### `install conductor --merge-workflow`
1295
1467
 
1296
1468
  Generates the Epic Implementer **merge workflow** plus its CODEOWNERS fragment
1297
1469
  and repository-rule guidance, commits them on a managed branch, pushes with
1298
1470
  **your own git identity**, and opens a pull request with **your own `gh`**.
1299
1471
 
1300
1472
  ```
1301
- npx -y @bridge_gpt/mcp-server install-bridge conductor --merge-workflow --codeowner <@org/team|@user>
1473
+ npx -y @bridge_gpt/mcp-server install conductor --merge-workflow --codeowner <@org/team|@user>
1302
1474
  ```
1303
1475
 
1304
- `--codeowner` is **required** and takes exactly one `@user` or `@org/team`. It is
1305
- never inferred from repository metadata, and a documentation placeholder is
1306
- rejected. `--dry-run` prints the plan and performs **no** write: no branch, no
1476
+ `--codeowner` is **required** and takes exactly one `@user` or `@org/team`. Bridge
1477
+ cannot infer the code owner, so replace `<@org/team|@user>` with the one `@user` or
1478
+ `@org/team` who should review the workflow file before running; the placeholder
1479
+ itself is rejected. `--dry-run` prints the plan and performs **no** write: no branch, no
1307
1480
  file, no install-state write, no commit, no push, and no pull request.
1308
1481
 
1309
1482
  **Bridge performs no repository write, and the pull request is never merged for
@@ -1472,12 +1645,14 @@ If a custom pipeline has the same key as a built-in pipeline, the custom version
1472
1645
  | `SFCC_HOSTNAME` | No | _(none)_ | SFCC sandbox hostname. Part of the environment credential tier — `SFCC_HOSTNAME`, `SFCC_CLIENT_ID`, and `SFCC_CLIENT_SECRET` must **all three** be set for that tier to apply, and a complete tier takes precedence over `dw.json` |
1473
1646
  | `SFCC_CLIENT_ID` | No | _(none)_ | Account Manager API client id. See `SFCC_HOSTNAME` — all three are needed together. Also required on its own when a tool is called with an explicit dotted `instance` |
1474
1647
  | `SFCC_CLIENT_SECRET` | No | _(none)_ | Account Manager API client secret. See `SFCC_HOSTNAME` — all three are needed together. Never sent to Bridge; it goes only to the Account Manager token endpoint |
1475
- | `CLAUDE_CODE_OAUTH_TOKEN` | No | _(none)_ | The supported headless authentication input for conductor workers. Export it into the **executor process's own** environment; Bridge forwards it unchanged into the worker and stores it nowhere — no credential-store entry, no disk, never sent to Bridge. See [Claude login for conductor workers](#claude-login-for-conductor-workers) |
1648
+ | `CLAUDE_CODE_OAUTH_TOKEN` | No | _(none)_ | The supported headless authentication input for Epic Implementer workers. Export it into the **executor process's own** environment; Bridge forwards it unchanged into the worker and stores it nowhere — no credential-store entry, no disk, never sent to Bridge. See [Claude login for Epic Implementer workers](#claude-login-for-epic-implementer-workers) |
1476
1649
  | `BAPI_INSTALL_DEBUG` | No | _(unset)_ | Set to any non-empty value to unlock raw diagnostics in `install` and the `apply_install_manifest` path — the underlying error message and stack behind an `unexpected error` summary. The installer's own failure text tells you to set it |
1477
1650
  | `BAPI_SIGNUP_EMAIL` | No | _(none)_ | Selects the self-serve signup route without `--email`. Precedence: `--email` first, then this variable, then the visible interactive prompt |
1478
1651
  | `BAPI_INVITE` | No | _(none)_ | Invite code for `install`, for scripting. Like `--invite <code>`, it exposes the code to your shell history and the process list — prefer bare `--invite` and the hidden prompt |
1479
- | `BAPI_PLANE_PYTHON` | No | `python` | Executable used for the Python members of `plane up`. Point it at a venv interpreter when `python` on `PATH` is not the one you want |
1652
+ | `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 |
1480
1653
  | `BAPI_PLANE_UVICORN` | No | `uvicorn` | Executable used for the server member of `plane up` |
1654
+ | `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 |
1655
+ | `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) |
1481
1656
  | `BAPI_DOCS_DIR` | No | `docs/tmp` | Local directory for saving plans, critiques, and research reports |
1482
1657
  | `BAPI_PIPELINES_DIR` | No | `.bridge/pipelines` | Directory for user-defined custom pipeline JSON files |
1483
1658
  | `BAPI_WORKTRUNK_BIN` | No | `wt` (`git-wt` on Windows) | Override the Worktrunk executable name/path used by `start-tickets` for nonstandard installs |
@@ -1487,7 +1662,7 @@ If a custom pipeline has the same key as a built-in pipeline, the custom version
1487
1662
  | `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 |
1488
1663
  | `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 |
1489
1664
  | `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 |
1490
- | `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), `conductor` (+ 8 conductor/event/supervisor tools), `pipeline-authoring` (+ 5 pipeline run/admin tools — `get_pipeline_recipe` is NOT gated; it 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,conductor`; 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)). Conductor/epic sessions launched via `start-tickets --conductor` **merge** `conductor` 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,conductor`. A normal `start-tickets` run stays on `core`. |
1665
+ | `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`. |
1491
1666
 
1492
1667
  Environment values are **trimmed**, and only a non-empty result wins. A
1493
1668
  whitespace-only `BAPI_API_KEY` therefore does not override anything: it falls
@@ -1657,9 +1832,9 @@ work. Two supported paths write it for you:
1657
1832
 
1658
1833
  Run it without `--write-credentials` to preview; add the flag to write the store.
1659
1834
 
1660
- ### Claude login for conductor workers
1835
+ ### Claude login for Epic Implementer workers
1661
1836
 
1662
- Conductor workers are **not** isolated into a private Claude configuration
1837
+ Epic Implementer workers are **not** isolated into a private Claude configuration
1663
1838
  directory — they run with the executor host's own `HOME`, so a worker
1664
1839
  authenticates the same way any interactive `claude` invocation on that host
1665
1840
  does. The prerequisite is simple: run
@@ -1742,7 +1917,7 @@ The full surface, for when you need the complete enumeration. Day-to-day, use [U
1742
1917
 
1743
1918
  ### MCP tools
1744
1919
 
1745
- 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 conductor/pipeline-authoring/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).
1920
+ 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).
1746
1921
 
1747
1922
  - **Connectivity & identity** — `ping` (its JSON also carries `docs_dir`, `role`, and `customer_type`)
1748
1923
  - **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)
@@ -1754,6 +1929,7 @@ The authoritative tool catalog covers **78 tools** (enumerated below). What's ac
1754
1929
  - **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)
1755
1930
  - **Jira status** — `update_jira_status` (pass `status: "auto"` to resolve the configured post-PR status server-side)
1756
1931
  - **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)
1932
+ - **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"`)
1757
1933
  - **Pipelines & automation** — `get_pipeline_recipe` (returns a fully resolved recipe the agent executes step-by-step)
1758
1934
  - **Config** — `get_project_standards`, `config_field` (operations: `get`, `update`, `list`), `model_thresholds` (actions: `get`, `set`, `clear`; the only way to set personal thresholds)
1759
1935
 
@@ -1765,9 +1941,8 @@ Pipelines are declarative, multi-step workflows your AI agent executes step-by-s
1765
1941
  |---|---|---|
1766
1942
  | `implement-ticket` | Generate a plan, execute the implementation, commit, open a PR, and monitor CI | `/implement-ticket PROJ-123` |
1767
1943
  | `review-ticket` | Full ticket quality review: clarifying questions + critique plus an automatic second-opinion pass, then evaluation and decision capture. The backend owns round orchestration; pass `--rounds=1` for a single-pass review or `--rounds=2` to force the full second-opinion review, or omit `--rounds` to let the backend decide adaptively. Internal atomic pipeline invoked by `/review-tickets` (inline for one key, spawned per tab for several) and by `/review-and-implement`, `/review-and-start`, and `/start-tickets`. | `/review-tickets PROJ-123` |
1768
- | `idea-to-ticket` | Turn an idea into a Jira Task/Spike (or Epic + children) with research, dedup, and critique | `/idea-to-ticket "<idea>"` |
1944
+ | `idea-to-ticket` | Deprecated, superseded by `/define-tickets`; still resolvable through `get_pipeline_recipe` for one release, with no new consumers | `/define-tickets "<idea>"` |
1769
1945
  | `plan-epic` | Decompose an epic into sub-tasks with a structured exploration doc for each | `/plan-epic "<epic>"` |
1770
- | `full-automation` | Client-side wrapper: runs the `idea-to-ticket` recipe, then hands the created keys to `/review-and-start --auto` | `/idea-to-pr "<idea>"` |
1771
1946
  | `learn-repository` | Analyze codebase architecture, testing, review, and documentation standards, then upload to Bridge | `/learn-repository` |
1772
1947
 
1773
1948
  ### Pipeline response envelope