@bridge_gpt/mcp-server 0.2.33 → 0.2.36

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 (49) hide show
  1. package/README.md +456 -340
  2. package/build/agent-capabilities/probe-context.js +8 -1
  3. package/build/agent-capabilities/probes.js +7 -1
  4. package/build/agents.generated.js +1 -1
  5. package/build/claude-review-workflow.js +264 -0
  6. package/build/cli-release.js +53 -0
  7. package/build/commands.generated.js +4 -4
  8. package/build/conductor/bridge-api-client.js +252 -3
  9. package/build/conductor/deny-enforcement-preflight.js +1 -0
  10. package/build/conductor/done-gate.js +44 -5
  11. package/build/conductor/epic-reconcile.js +6 -0
  12. package/build/conductor/install-doctor.js +462 -0
  13. package/build/conductor-bin.js +3 -3
  14. package/build/conductor-bundle-artifacts.js +30 -9
  15. package/build/doctor.js +234 -1
  16. package/build/executor/cli.js +32 -5
  17. package/build/executor/credentials.js +45 -11
  18. package/build/executor/deps.js +14 -0
  19. package/build/executor/env.js +23 -6
  20. package/build/executor/index.js +4 -0
  21. package/build/executor/job-runner.js +119 -9
  22. package/build/executor/permissions.js +12 -2
  23. package/build/executor/preflight.js +95 -8
  24. package/build/executor/prompt-spec.js +51 -0
  25. package/build/executor/runner.js +15 -2
  26. package/build/executor/service-unit.js +876 -0
  27. package/build/executor/test-clock.js +8 -0
  28. package/build/executor/types.js +0 -17
  29. package/build/executor/worker-command.js +62 -9
  30. package/build/index.js +575 -143
  31. package/build/init.js +153 -51
  32. package/build/install-bridge-conductor.js +491 -0
  33. package/build/install-bridge.js +884 -176
  34. package/build/install-reexec.js +233 -0
  35. package/build/mcp-host-config.js +11 -1
  36. package/build/mcp-install-state.js +32 -0
  37. package/build/mcp-provisioning.js +22 -6
  38. package/build/pipelines.generated.js +14 -8
  39. package/build/readme.generated.js +1 -1
  40. package/build/run-unit-tests-launcher.js +257 -0
  41. package/build/setup-epic.js +117 -8
  42. package/build/upgrade-cli.js +1 -15
  43. package/build/version.generated.js +1 -1
  44. package/docs/CONDUCTOR.md +115 -4
  45. package/docs/install/mcp-tool-integrations.md +29 -21
  46. package/package.json +9 -6
  47. package/pipelines/implement-ticket.json +6 -1
  48. package/build/conductor/supervisor-judgment-python.js +0 -141
  49. package/build/conductor/supervisor-judgment.js +0 -215
package/README.md CHANGED
@@ -2,13 +2,55 @@
2
2
 
3
3
  The Bridge MCP is an end-to-end accelerator for shipping code within SFCC, powered by [Bridge API](https://bridgegpt-api.com). Works with Claude Code, Github Copilot, Cursor, Windsurf, and OpenAI Codex.
4
4
 
5
+ ## Install
6
+
7
+ From your **project root**, run:
8
+
9
+ ```bash
10
+ npx -y @bridge_gpt/mcp-server install
11
+ ```
12
+
13
+ That is the whole setup command. It works whether or not you already have a Bridge
14
+ account — it will ask.
15
+
16
+ > **npm shows a different command in its sidebar. Ignore it.** The
17
+ > `npm i @bridge_gpt/mcp-server` box on this page is generated by npm from the
18
+ > package name; it is not the setup command, and no packaging option lets the
19
+ > publisher change or remove it. Installing the package that way does not connect
20
+ > anything. Use the command above.
21
+
22
+ **What it changes in your project**
23
+
24
+ - Adds slash commands and agent definitions for your editor (`.claude/commands/`,
25
+ `.cursor/commands/`, and the equivalents your editor uses).
26
+ - Registers a `bridge-api` MCP server in your editor's MCP config, leaving any
27
+ other servers you have configured untouched.
28
+ - Creates `.bridge/` for your project manifest and pipeline definitions.
29
+ - Writes nothing outside your project root except your Bridge credential, which is
30
+ stored for you so you never have to paste it again.
31
+
32
+ **Prerequisites**
33
+
34
+ - **Node.js 18 or newer** (`node --version`), which is what provides `npx`.
35
+ - **A project directory** — run the command from the folder your editor opens, the
36
+ one containing `package.json` or your repository root.
37
+ - **An MCP-capable editor**: Claude Code, GitHub Copilot, Cursor, Windsurf, or
38
+ OpenAI Codex.
39
+ - **No Bridge account needed.** The installer can create one for you from just an
40
+ email address.
41
+
5
42
  ## Contents
6
43
 
7
- - [Getting Started](#getting-started)
44
+ - [Install](#install)
45
+ - [Installing, step by step](#installing-step-by-step)
46
+ - [What to expect](#what-to-expect)
47
+ - [Troubleshooting](#troubleshooting)
48
+ - [Quick start details](#quick-start-details)
8
49
  - [Usage Documentation](#usage-documentation)
9
- - [Tier 1 — Regularly useful](#tier-1--regularly-useful)
10
- - [Tier 2 — Occasionally useful](#tier-2--occasionally-useful)
11
- - [Tier 3 — Now and then](#tier-3--now-and-then)
50
+ - [Regularly useful](#regularly-useful)
51
+ - [Occasionally useful](#occasionally-useful)
52
+ - [Now and then](#now-and-then)
53
+ - [Workflow commands](#workflow-commands)
12
54
  - [Operational commands](#operational-commands)
13
55
  - [Extra Capabilities](#extra-capabilities)
14
56
  - [Salesforce B2C Commerce (SFCC) Tools](#salesforce-b2c-commerce-sfcc-tools)
@@ -20,270 +62,232 @@ The Bridge MCP is an end-to-end accelerator for shipping code within SFCC, power
20
62
 
21
63
  For advanced epic/multi-agent orchestration, see [CONDUCTOR.md](./docs/CONDUCTOR.md).
22
64
 
23
- ## Getting Started
65
+ ## Installing, step by step
24
66
 
25
- ### Quick start
67
+ **1. Open a terminal in your project root.** This matters: the installer writes
68
+ your slash commands and MCP config relative to the directory you run it from. If
69
+ you run it in your home directory, your editor will not find any of it.
26
70
 
27
- From your **project root**, install and connect in one command:
71
+ **2. Run the command.**
28
72
 
29
73
  ```bash
30
- npx -y @bridge_gpt/mcp-server@latest install-bridge
74
+ npx -y @bridge_gpt/mcp-server install
31
75
  ```
32
76
 
33
- Run bare like that in a terminal and it starts by asking
34
- **`How would you like to connect to Bridge API?`** with three numbered choices:
77
+ **3. Answer the sign-in question.** On a first run it asks whether you already have
78
+ a token:
35
79
 
36
80
  ```
37
- 1. I have a Bridge API key
38
- 2. I have an invite token
39
- 3. I'm new — set me up with just my email
81
+ 1. Yes, I have received a token
82
+ 2. No, I need one
40
83
  ```
41
84
 
42
- - **1** the existing-key flow. It asks for your **API key** (generate one on the
43
- Bridge API web UI **Security** page) and a **repo name** matching your server-side
44
- registration; everything else is derived. A `bapi_inv_…` credential entered here
45
- instead of a full API key is automatically detected and redeemed as a **bootstrap
46
- invite** it creates a brand-new project and mints your admin API key rather than
47
- looking up an existing repository.
48
- - **2** the **bootstrap-invite** flow. It asks for the invite token you were given,
49
- with echo suppressed. Same as passing `--invite` (see below).
50
- - **3** the **self-serve** flow, and the right answer if you have nothing yet. It
51
- asks for an **email**, then a name for your new Bridge project, and creates the
52
- workspace and your own admin API key for you. No account, no key, and no invite
53
- needed beforehand. Same as passing `--email you@example.com` (see below).
54
-
55
- There is **no default**: pressing Enter selects nothing. A blank or invalid answer
56
- re-prompts once with a hint, then exits with guidance naming all three routes.
57
-
58
- That question is asked only for a *bare interactive* run. Passing any flag, setting
59
- `BAPI_API_KEY`, or running without an interactive terminal skips it and keeps the
60
- existing deterministic behavior.
61
-
62
- From there `install-bridge` scaffolds the project, writes your editor's MCP config
63
- with real values, verifies connectivity, persists your API key to the user-scoped
64
- credential store, and opens a fresh agent session that runs `/install-bridge` to
65
- derive and apply the remaining config, presents a concise **capability report**
66
- ("What Bridge can help with"), and recommends `/learn-repository` as your next step.
67
- It does **not** run `/learn-repository` itself that stays your next explicit
68
- invocation. There is **no indexing question**: indexing starts automatically
69
- server-side once the repository reaches full parse readiness. Add `--dry-run` to
70
- preview every step without writing, pinging, or spawning anything.
71
-
72
- **Were you sent a bootstrap invite?** Then you don't need an API key or the web UI
73
- at all run the command your operator gave you:
85
+ - Choose **2** if you have nothing yet. It asks for your email address and a name
86
+ for your new Bridge project, then creates both for you.
87
+ - Choose **1** if someone gave you a token — either a Bridge API key or an invite
88
+ code. Paste it at the hidden prompt; you do not have to say which kind it is,
89
+ because the installer recognizes it. Nothing is echoed as you type.
90
+
91
+ There is no default answer, so pressing Enter alone selects nothing. If you would
92
+ rather not be asked, pass the answer up front instead — see
93
+ [Choosing how you sign in](#quick-start-details).
94
+
95
+ **4. Pick which editors to configure.** The installer detects the MCP hosts on your
96
+ machine and asks which ones to set up. Pick every editor you actually use for this
97
+ project; you can re-run the command later to add another.
98
+
99
+ **5. Reload your MCP host.** Editors read their MCP configuration at startup, so a
100
+ freshly written config is not live until you reload. Restart the editor, or use its
101
+ "reload MCP servers" action. In Claude Code you will also be asked to trust the
102
+ project's `.mcp.json` the first time.
103
+
104
+ **6. Finish in the agent session the installer opens.** The last thing the
105
+ installer does is open a fresh agent session running `/install-bridge`, which reads
106
+ your codebase, fills in the remaining project settings, and prints a short report
107
+ of what Bridge can help with. Let it finish.
108
+
109
+ **7. Follow the next step the session shows you, if it shows one.** The installer
110
+ asks the server what should happen next and shows that command only when there is
111
+ one to show most often `/learn-repository`, which it recommends when the project
112
+ still needs its architecture, testing, review, and correctness standards documented
113
+ and your key can run it. The installer deliberately does not run it for you. Those
114
+ standards are what make every later plan, critique, and review match how your
115
+ project actually works, and they only need to be gathered once per project the
116
+ result is shared with everyone on the team. If the session shows no next step,
117
+ there is nothing for you to run.
118
+
119
+ Want to see what would happen without changing anything? Add `--dry-run`.
120
+
121
+ ## What to expect
122
+
123
+ **Files that appear in your project**
124
+
125
+ | Path | What it is | Commit it? |
126
+ |---|---|---|
127
+ | `.claude/commands/`, `.cursor/commands/` | The slash commands your editor runs | Yes |
128
+ | `.claude/agents/` and editor equivalents | Agent definitions used by those commands | Yes |
129
+ | `.bridge/config` | Your project manifest — the repository name and which MCP targets to provision. Deliberately secret-free | Yes |
130
+ | `.bridge/pipelines/`, `.bridge/instructions/` | Editable pipeline definitions | Yes |
131
+ | `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json` | MCP registrations for your editor. These can carry your key, so the installer git-ignores them | No |
132
+
133
+ The installer tells you which of these are safe to commit and never recommends
134
+ committing anything that can hold a credential.
135
+
136
+ **Prompts you will see.** A sign-in question on a first bare run, a hidden prompt
137
+ for a token (or a visible one for an email), a project name for a brand-new
138
+ project, and a picker for which editors to configure. Nothing else prompts.
139
+
140
+ **A fresh agent session opens at the end.** This is expected — it is how the
141
+ installer finishes configuring the project. Use `--agent cursor-agent` if you want
142
+ Cursor's agent instead of Claude Code.
143
+
144
+ **Your key is remembered.** You paste a credential at most once. Later runs, and
145
+ the tooling that spawns its own shells, find it on their own.
146
+
147
+ **A next step, when the project needs one.** The session closes with whatever
148
+ command the server says comes next, and stays quiet when there is nothing to
149
+ recommend. `/learn-repository` is the usual one: it is recommended when the project
150
+ still needs its conventions documented and your key can run it. It is never
151
+ automatic — until someone runs it, Bridge's agents work from your code alone rather
152
+ than from your project's documented conventions.
153
+
154
+ **Indexing happens on its own.** There is no "index my repository?" question. Once
155
+ your project has the settings it needs, indexing starts server-side. You never have
156
+ to ask for it.
157
+
158
+ ## Troubleshooting
159
+
160
+ **"My editor doesn't see any Bridge tools."** Two usual causes. First, the config
161
+ was written somewhere your editor is not looking — re-run the installer from the
162
+ directory your editor actually opens, and check that a `bridge-api` entry exists in
163
+ that project's MCP config. Second, the editor has not been reloaded since the file
164
+ was written; restart it. In Claude Code, also confirm you accepted the trust prompt
165
+ for the project's `.mcp.json`.
166
+
167
+ **"I ran it in the wrong folder."** Nothing is broken. Delete the `.bridge/`,
168
+ `.claude/`, and `.mcp.json` entries that were created there and re-run the command
169
+ from the right directory.
170
+
171
+ **"It seems to hang with no output."** If you ran the bare command
172
+ (`npx -y @bridge_gpt/mcp-server`) with no subcommand, you started the MCP *server*,
173
+ not the installer. It is waiting for an editor to connect over stdio, which is
174
+ exactly what it should do when your editor launches it — but from a terminal it
175
+ looks like a hang. It prints a line saying so. Press Ctrl-C and run
176
+ `npx -y @bridge_gpt/mcp-server install` instead. The explicit spelling
177
+ `npx -y @bridge_gpt/mcp-server serve` starts the server on purpose.
178
+
179
+ **"It can't reach Bridge" or "my key was rejected."** The installer checks
180
+ connectivity before it saves anything, so a failure here has changed nothing. A
181
+ rejected key means the credential is not valid for that project — check the project
182
+ name you gave, and generate a fresh key on the Bridge web UI's **Security** page if
183
+ needed. A network failure usually means a proxy or VPN is in the way.
184
+
185
+ **"Which repository name should I use?"** The one registered with Bridge. If you
186
+ have an existing key, the installer usually resolves it for you; when it cannot, it
187
+ asks, and `--repo <name>` answers it up front.
188
+
189
+ **Still stuck? Ask the installer to diagnose itself.**
74
190
 
75
191
  ```bash
76
- npx -y @bridge_gpt/mcp-server@latest install-bridge --invite
192
+ npx -y @bridge_gpt/mcp-server doctor
77
193
  ```
78
194
 
79
- That one-liner is deliberately **secret-free**: the CLI prompts for the bootstrap
80
- invite token with **echo suppressed**, and sends it only in the request body. It
81
- creates your project and mints your own admin API key in a single command.
195
+ `doctor` is strictly read-only. It reports what it found — configs, registrations,
196
+ credential availability, prerequisites and changes nothing.
197
+
198
+ ## Quick start details
82
199
 
83
- To upgrade later, run:
200
+ <details>
201
+ <summary><strong>Choosing how you sign in</strong></summary>
202
+
203
+ Three routes lead to the same place. The interactive question above picks one for
204
+ you; these flags pick it up front and skip the question entirely.
205
+
206
+ **No account yet — sign up with an email.**
84
207
 
85
208
  ```bash
86
- npx -y @bridge_gpt/mcp-server upgrade
209
+ npx -y @bridge_gpt/mcp-server install --email you@example.com
87
210
  ```
88
211
 
89
- `upgrade` re-execs from `@latest`, refreshes all scaffolded artifacts (slash
90
- commands, agents, pipelines), rewrites the version pin, and reconnects also
91
- available as the `/upgrade-bridge` slash command. (The legacy `--upgrade` flag still
92
- works as a fallback.)
212
+ Creates a brand-new Bridge project for that address and your first admin key in one
213
+ command. No account, no key, and no invite needed beforehand. The address labels
214
+ your new workspace and may receive a setup message; delivery is best-effort, so
215
+ nothing waits on it. The email is visible as you type (it is not a secret) and is
216
+ never written to a log. This is the same route as answering **2** at the prompt.
93
217
 
94
- <details>
95
- <summary><strong>Installation Instructions</strong></summary>
96
-
97
- #### What `install-bridge` does
98
-
99
- `install-bridge` collapses the whole setup into a single command. It:
100
-
101
- 1. **Scaffolds** the project (the same artifacts `--init` writes: slash commands,
102
- agents, `.bridge/pipelines/`, and secret-free MCP config placeholders).
103
- 2. **Writes the per-host MCP config** (`.mcp.json` / `.cursor/mcp.json` /
104
- `.vscode/mcp.json`) with your real `BAPI_REPO_NAME` / `BAPI_API_KEY` /
105
- `BAPI_BASE_URL` / `BAPI_DOCS_DIR`, preserving any unrelated servers. The
106
- launcher it writes is pinned to the exact installed version so `npx` never
107
- silently reuses a stale local copy. (Windsurf and Codex are global configs it
108
- can't safely write — it prints copy-paste instructions for those.)
109
- 3. **Verifies connectivity** against the Bridge API before persisting anything.
110
- 4. **Persists your key** to the user-scoped credential store
111
- (`~/.config/bridge/credentials.json`, target `bapi:<repo>`) so shell-spawned
112
- tooling (e.g. `start-tickets`) can resolve it.
113
- 5. **Opens a fresh agent session** that runs `/install-bridge` to derive and apply
114
- the remaining config fields from your codebase, presents a concise capability
115
- report ("What Bridge can help with"), and recommends `/learn-repository` as the
116
- next step. It does not chain into running `/learn-repository` itself — that's
117
- your next explicit invocation. There is no indexing question anywhere: indexing
118
- starts automatically once the repository reaches full parse readiness (VCS
119
- credentials, the code index prerequisites, and project description), so you
120
- never need to ask for it or run `/parse-repository` yourself as part of
121
- onboarding.
122
-
123
- In this **existing-key** flow the only inputs are an **API key** and a **repo name**
124
- (everything else is derived). Resolution order:
125
-
126
- - **API key:** `--api-key <key>` → `BAPI_API_KEY` env → an interactive (no-echo)
127
- prompt. Generate one first on the Bridge API web UI **Security** page (see
128
- [Generate an API Key](#2-generate-an-api-key)); in this flow the command consumes
129
- a key, it never mints one — **`--email` and `--invite` are the two exceptions**
130
- (below), and each mints your first key. All three of `--api-key`, `BAPI_API_KEY`,
131
- and the hidden prompt also accept a bootstrap-invite value (`bapi_inv_…`) —
132
- detected automatically and redeemed the same way `--invite` is, skipping
133
- repository lookup entirely. `--invite` and `--email` remain the preferred,
134
- explicit entry points for a new project. The key is **never printed or logged**.
135
- - **Repo name:** `--repo <name>` and `BAPI_REPO_NAME` remain the deterministic
136
- short-circuits and compatibility fallbacks — when either is set it is used
137
- directly, with no network round-trip. When **neither** is set, a compatible
138
- server resolves the unique repository from your existing API key automatically
139
- (a read-only lookup), so you don't have to supply it. If the server is older,
140
- the key can't be uniquely resolved, or the lookup fails, `install-bridge` falls
141
- back to an inferred default you confirm interactively (and requires `--repo`
142
- when stdin is non-interactive). Whatever name is used MUST match the
143
- server-side repository registration.
144
-
145
- #### Self-serve email onboarding (`--email`) — no account, no key, no invite
146
-
147
- The primary path for a **first-time user with nothing yet** — no Bridge account,
148
- no API key, and no pre-issued invite. Run:
218
+ **You were sent an invite code.**
149
219
 
150
220
  ```bash
151
- npx -y @bridge_gpt/mcp-server@latest install-bridge --email you@example.com
221
+ npx -y @bridge_gpt/mcp-server install --invite
152
222
  ```
153
223
 
154
- `install-bridge` requests a brand-new Bridge workspace for that email, receives an
155
- invite token, and then feeds it into the **exact same** persist-before-exchange
156
- bootstrap protocol as `--invite` below so the project is created and your first
157
- admin key is minted in one command. The minted token is used internally and **never
158
- shown**.
159
-
160
- The email may instead come from the `BAPI_SIGNUP_EMAIL` environment variable or a
161
- **visible** interactive prompt (email is not a secret, so it is echoed as you type —
162
- unlike the API key and the invite token, which use a hidden prompt). That prompt is
163
- what **option 3** of the bare-run chooser reaches, so
164
- `install-bridge --email you@example.com` and a bare `install-bridge` + `3` land in
165
- the same place. The email is still **never written to a log line**. No email
166
- verification is performed and no message is sent to the address — it only labels your
167
- new workspace. `--email` is mutually exclusive with `--api-key` and `--invite`.
168
-
169
- ##### Self-serve retries resume automatically
170
-
171
- A self-serve run that fails part-way through — a network blip on the exchange, a
172
- failed connectivity check, an interrupted credential write — saves its signup state
173
- under `bootstrap-pending:<repo>` in the credential store (mode `0600`, fsync'd, the
174
- same record that already holds your `key_secret`).
175
-
176
- **Just re-run the self-serve flow.** It detects that saved attempt, prints
177
- `resuming your previous signup attempt for <repo>`, and re-drives the *same*
178
- exchange — it does **not** sign up again, so a retry never creates a second
179
- workspace. This is why the self-serve record stores the minted invite token: you
180
- were never shown that token, so nothing else could re-present it.
181
-
182
- Do **not** copy, display, or hand-remove that record. If the saved invite has
183
- genuinely expired, the CLI says so and **asks for confirmation** before discarding
184
- it and starting fresh — it never discards it silently, because a record whose
185
- exchange already succeeded is the only trace of a live admin key.
186
-
187
- Because this flow *creates* the project, it asks you to **name a new project**
188
- (`Name your new Bridge project [<inferred>]: `) rather than to match an existing
189
- server-side registration. The name must be globally unique; if it's taken, you're
190
- asked for another one and the invite is not consumed. The same applies to `--invite`.
191
-
192
- #### Bootstrap-invite onboarding (`--invite`)
193
-
194
- With a **bootstrap invite** you were already given, there is no pre-existing key and
195
- no web UI: like `--email` above, this mode **creates** the project and its first
196
- admin key instead of consuming one. Run `install-bridge --invite` and it:
197
-
198
- 1. **Prompts for the bootstrap invite token** with echo suppressed (the default —
199
- see below).
200
- 2. **Generates your `key_secret`** (32 CSPRNG bytes) and **fsyncs it locally**
201
- *before* contacting the server. If that write fails the run aborts and the
202
- invite is **not** spent.
203
- 3. **Redeems the invite** — `POST /setup/bootstrap` with the token, repo name, and
204
- `key_secret` in the **body** — which creates the project and mints your admin
205
- key. (This replaces the connectivity ping: there is no key to ping with yet.)
206
- 4. **Verifies the newly-minted key**, then writes the per-host MCP config.
207
- 5. **Promotes the credential** to `bapi:<repo>` and **opens the agent session** —
208
- the same Steps 3–5 as the normal flow.
209
-
210
- Because the locally-saved `key_secret` is the only proof that can replay a
211
- redemption, a re-run after a network failure is safe: it re-sends the *same* secret
212
- and gets back the *same* project and key. If the repo name you chose is already
213
- taken (names are globally unique) the server rolls back — your invite is untouched —
214
- and the CLI asks for a different name and retries with the same token.
215
-
216
- **The delivered one-liner is secret-free, by design.** "A copy/paste one-liner" and
217
- "the token never touches shell history" are contradictory, so the token is *not* in
218
- the command: the CLI asks for it, and it travels only in the request body.
219
- `--invite <token>`, `--invite=<token>`, and `BAPI_INVITE` still work for
220
- **scripting only** — and both forms **expose the token to your shell history and to
221
- the process list**. Prefer the prompt.
222
-
223
- Useful flags:
224
-
225
- - `--dry-run` — preview every step (scaffold targets, config files and keys with
226
- the key value **redacted**, the ping target, the credential store target, and
227
- the exact agent spawn command) without writing, pinging, or spawning anything.
228
- With `--invite` it also never calls the exchange endpoint and never generates or
229
- stores a secret.
230
- - `--force` — overwrite an existing real `BAPI_API_KEY` in a host config, or in the
231
- credential store, without prompting (re-running is otherwise non-destructive).
232
- - `--agent claude|cursor-agent` — which agent to launch for the agentic remainder
233
- (default `claude`).
234
- - `--email <addr>` — self-serve signup: create a new workspace from just an email
235
- (mutually exclusive with `--api-key` and `--invite`). Falls back to
236
- `BAPI_SIGNUP_EMAIL`, then a visible prompt. Visible input, not a secret; still
237
- never logged.
238
- - `--invite [token]` — redeem a bootstrap invite (mutually exclusive with
239
- `--api-key` and `--email`). Omit the value to get the hidden prompt.
240
-
241
- That's it — once `install-bridge` finishes you're connected. If you prefer to do
242
- it by hand (or just want to understand each step), the manual flow below does the
243
- same thing.
244
-
245
- #### Manual Setup (Alternative)
246
-
247
- ##### 1. Install the Package
248
-
249
- From your **project root**, install the MCP server and scaffold slash commands:
224
+ Redeems the invite, creates your project, and mints your first admin key. Run it
225
+ *without* a value, as shown: the installer then asks for the code at a hidden
226
+ prompt, so the code never lands in your shell history. `--invite <code>` and the
227
+ `BAPI_INVITE` environment variable exist for scripting, but both expose the code to
228
+ your shell history and to the process list.
229
+
230
+ **Your team already has a project and gave you an API key.**
250
231
 
251
232
  ```bash
252
- npm i @bridge_gpt/mcp-server
253
- npx -y @bridge_gpt/mcp-server --init
233
+ npx -y @bridge_gpt/mcp-server install --api-key <key>
254
234
  ```
255
235
 
256
- `--init` must be run from the directory containing your `package.json`. It:
236
+ Or omit the flag and paste the key at the hidden prompt. Generate a key on the
237
+ Bridge web UI's **Security** page (**Create New Key**, role **Admin**) and copy it
238
+ immediately — it is shown once. `BAPI_API_KEY` works too.
257
239
 
258
- - Creates slash commands in `.claude/commands/` and `.cursor/commands/`
259
- - Detects existing MCP config files and sets `BAPI_PROJECT_ROOT` so local file output resolves correctly
260
- - Scaffolds `.bridge/pipelines/` for custom pipeline authoring
240
+ If you paste an invite code where a key was expected, or a key where an invite was
241
+ expected, the installer recognizes the mismatch and tells you before anything is
242
+ created or spent.
261
243
 
262
- Re-run `--init` after upgrading the package to get updated commands.
244
+ </details>
245
+
246
+ <details>
247
+ <summary><strong>Installer flags</strong></summary>
248
+
249
+ | Flag | What it does |
250
+ |---|---|
251
+ | `--email <addr>` | Sign up for a new Bridge project with just an email address |
252
+ | `--invite [code]` | Redeem an invite code. Omit the value for the hidden prompt (recommended) |
253
+ | `--api-key <key>` | Use an existing Bridge API key |
254
+ | `--repo <name>` | Name the registered repository instead of resolving or asking for it |
255
+ | `--tools <list>` | Configure specific MCP hosts without the picker (e.g. `claude-code,cursor`) |
256
+ | `--agent claude\|cursor-agent` | Which agent to open for the final configuration step (default `claude`) |
257
+ | `--dry-run` | Preview every step without writing, contacting Bridge, or opening anything |
258
+ | `--force` | Overwrite an existing stored key without asking |
259
+ | `-h`, `--help` | Full usage |
260
+
261
+ `--email`, `--invite`, and `--api-key` are mutually exclusive — each names a
262
+ different way to arrive, and the installer will not guess between them.
263
263
 
264
- ##### 2. Generate an API Key
264
+ </details>
265
265
 
266
- 1. Log in to [Bridge API](https://bridgegpt-api.com) and navigate to your project's **Security** page
267
- 2. Click **Create New Key**
268
- 3. Enter your email, an optional label (e.g., "MCP Server"), and select the **Admin** role
269
- 4. Click **Create Key**
270
- 5. **Copy the key immediately** — it will not be shown again
266
+ <details>
267
+ <summary><strong>Setting up an MCP host by hand</strong></summary>
271
268
 
272
- ##### 3. Configure the MCP Server
269
+ The installer configures your editors for you. Do this only if you would rather
270
+ write the config yourself, or if you use a host it cannot write automatically.
273
271
 
274
- Add the following to your editor's MCP configuration file, pasting in the API key from step 2:
272
+ Scaffold the project files without configuring anything:
273
+
274
+ ```bash
275
+ npx -y @bridge_gpt/mcp-server --init
276
+ ```
277
+
278
+ Then add a `bridge-api` entry to your host's MCP config, filling in your repository
279
+ name and API key. Add `"serve"` as the last launcher argument, as shown — it is the
280
+ explicit way to say "start the MCP server."
275
281
 
276
282
  <details>
277
283
  <summary><strong>Claude Code (.mcp.json)</strong></summary>
278
284
 
279
- The `--init` command (step 1) detects Claude Code and creates a `.mcp.json` at your project root with placeholder values. Open it and replace `your-repo` and `your-api-key` with your actual values from step 2:
280
-
281
285
  ```json
282
286
  {
283
287
  "mcpServers": {
284
288
  "bridge-api": {
285
289
  "command": "npx",
286
- "args": ["-y", "@bridge_gpt/mcp-server"],
290
+ "args": ["-y", "@bridge_gpt/mcp-server", "serve"],
287
291
  "env": {
288
292
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
289
293
  "BAPI_REPO_NAME": "your-repo",
@@ -304,7 +308,7 @@ The `--init` command (step 1) detects Claude Code and creates a `.mcp.json` at y
304
308
  "servers": {
305
309
  "bridge-api": {
306
310
  "command": "npx",
307
- "args": ["-y", "@bridge_gpt/mcp-server"],
311
+ "args": ["-y", "@bridge_gpt/mcp-server", "serve"],
308
312
  "env": {
309
313
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
310
314
  "BAPI_REPO_NAME": "your-repo",
@@ -325,7 +329,7 @@ The `--init` command (step 1) detects Claude Code and creates a `.mcp.json` at y
325
329
  "mcpServers": {
326
330
  "bridge-api": {
327
331
  "command": "npx",
328
- "args": ["-y", "@bridge_gpt/mcp-server"],
332
+ "args": ["-y", "@bridge_gpt/mcp-server", "serve"],
329
333
  "env": {
330
334
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
331
335
  "BAPI_REPO_NAME": "your-repo",
@@ -350,7 +354,7 @@ Windsurf only supports global MCP configuration.
350
354
  "mcpServers": {
351
355
  "bridge-api": {
352
356
  "command": "npx",
353
- "args": ["-y", "@bridge_gpt/mcp-server"],
357
+ "args": ["-y", "@bridge_gpt/mcp-server", "serve"],
354
358
  "env": {
355
359
  "BAPI_BASE_URL": "https://bridgegpt-api.com",
356
360
  "BAPI_REPO_NAME": "your-repo",
@@ -369,7 +373,7 @@ Windsurf only supports global MCP configuration.
369
373
  ```toml
370
374
  [mcp_servers.bridge-api]
371
375
  command = "npx"
372
- args = ["-y", "@bridge_gpt/mcp-server"]
376
+ args = ["-y", "@bridge_gpt/mcp-server", "serve"]
373
377
 
374
378
  [mcp_servers.bridge-api.env]
375
379
  BAPI_BASE_URL = "https://bridgegpt-api.com"
@@ -378,193 +382,305 @@ BAPI_API_KEY = "your-api-key"
378
382
  BAPI_DOCS_DIR = "docs/tmp"
379
383
  ```
380
384
 
381
- > Codex users: set `BAPI_PROJECT_ROOT` manually in your config (see Environment Variables below).
385
+ > Codex users: set `BAPI_PROJECT_ROOT` manually in your config (see [Environment Variables](#environment-variables)).
382
386
  </details>
383
387
 
384
- After saving the config, restart your editor or reload the MCP server connection. Verify connectivity by asking your AI assistant to call the `ping` tool.
388
+ After saving, reload your editor and ask your assistant to call the `ping` tool to
389
+ confirm the connection.
385
390
 
386
- ##### 4. First-Time Setup: Teach Bridge Your Codebase
391
+ An entry with no trailing `serve` still starts the server — bare invocation means
392
+ "server" permanently, and nothing rewrites an existing config to add the token.
387
393
 
388
- If you're the first person to install Bridge API on your project, run the `/learn-repository` slash command after completing setup. This analyzes your codebase's architecture, testing patterns, code review standards, and documentation conventions, then uploads the findings to Bridge API. This gives Bridge the context it needs to generate implementation plans, ticket critiques, and code reviews that are consistent with your project's actual architecture and conventions.
394
+ </details>
389
395
 
390
- You only need to do this once per project — the learned standards persist for all team members.
396
+ <details>
397
+ <summary><strong>Upgrading Bridge</strong></summary>
391
398
 
392
- ##### Upgrading (details)
399
+ ```bash
400
+ npx -y @bridge_gpt/mcp-server upgrade
401
+ ```
402
+
403
+ `upgrade` fetches the latest published version, refreshes your scaffolded slash
404
+ commands, agents, and pipelines, updates the version pin in your MCP config, and
405
+ opens a session so you can reconnect. It is also available as the
406
+ `/upgrade-bridge` slash command.
393
407
 
394
- The one-command `npx -y @bridge_gpt/mcp-server upgrade` (shown above) is the
395
- recommended path. The legacy flag `npx -y @bridge_gpt/mcp-server --upgrade` still
396
- works: it runs `npm i @bridge_gpt/mcp-server@latest`, prints a before/after version
397
- summary, then re-runs the full `--init` scaffolding flow to update your slash
398
- commands, agents, and pipeline definitions.
408
+ The server checks for updates on startup and notes a newer version in your editor's
409
+ MCP output log. That check is cached for a day and never blocks startup.
399
410
 
400
- The MCP server also checks for updates automatically on startup. If a newer version is available, you'll see a notice in your editor's MCP output logs with the upgrade command to run. This check is cached for 24 hours and never blocks server startup.
411
+ Re-running `install` on an already-configured project is safe: it refreshes the
412
+ scaffolded files without overwriting your stored credential unless you pass
413
+ `--force`.
401
414
 
402
415
  </details>
403
416
 
404
417
  ## Usage Documentation
405
418
 
406
- This is the Bridge API tooling worth knowing about as a software engineer — the things you'd ask an agent to do — grouped by how often you would use them. Each entry covers **what it does**, **when it's useful** and **how to use it**. The behind-the-scenes plumbing is summarized at the end under [Extra Capabilities](#extra-capabilities), and a full enumeration lives in [Reference](#reference).
419
+ This is the Bridge API tooling worth knowing about as a software engineer — the things you'd ask an agent to do — grouped by how often you would use them. Each entry covers **what it does**, **when it's useful**, **how to use it**, and its **flags**. The behind-the-scenes plumbing is summarized at the end under [Extra Capabilities](#extra-capabilities), and a full enumeration lives in [Reference](#reference).
407
420
 
408
421
  Working in a Salesforce B2C Commerce codebase? Bridge also ships read-only SFCC platform-introspection tools — see [Salesforce B2C Commerce (SFCC) Tools](#salesforce-b2c-commerce-sfcc-tools).
409
422
 
410
423
  For invocation, prefer the slash command — it's deterministic. A free-text example is shown only where natural-language phrasing reliably maps to the right automation; high-consequence or easily-misread automations show only the slash command on purpose.
411
424
 
412
- ### Tier 1 Regularly useful
425
+ <!-- The three tier sections below are GENERATED from api/library/config/mcp_tool_catalog.json,
426
+ the authoritative tool catalog, by scripts/sync_mcp_server_readme.py. Edit the curated
427
+ metadata in scripts/sync_mcp_tool_catalog.py — never the JSON artifact and never the
428
+ text between the markers. Generation order is: sync_mcp_tool_catalog.py, then
429
+ sync_mcp_server_readme.py, then `cd mcp_server && npm run build` (which bundles this
430
+ file into readme.generated.ts, served as the MCP resource bridge-api://readme).
431
+ Everything outside the marker pair — including the sections below it — is hand-written. -->
413
432
 
414
- These features are useful for most tickets.
433
+ <!-- BEGIN GENERATED: mcp-tool-documentation (managed by scripts/sync_mcp_server_readme.py — DO NOT EDIT BY HAND) -->
434
+ ### Regularly useful
435
+
436
+ The tools worth knowing for most tickets.
415
437
 
416
438
  **1. Review Ticket**
417
- - **What it does:** Runs a full quality review of a ticket: clarifying questions + critique plus an automatic alternate-model second opinion, then evaluates findings and produces a decision page to accept/reject them. The backend executor now owns all review round orchestration (including the second-opinion round) server-side; pass `--rounds=1` for a cheaper single-pass review, `--rounds=2` to force the full second-opinion review, or omit `--rounds` to let the backend's difficulty-adaptive review policy decide.
439
+ - **What it does:** Runs a full quality review of a ticket: clarifying questions and a critique plus an alternate-model second opinion, then evaluates the findings and produces a decision page for accepting or rejecting them.
418
440
  - **When it's useful:** (Refinement) Right after a ticket is drafted, before anyone starts building — to surface gaps and tighten it.
419
- - **How to use it:** `/review-ticket BAPI-123` (command only — "review" as free text is easily mistaken for a freehand agent review).
420
- - **Flags:** `--auto` auto-accept findings / skip the approval gates · `--rounds=1` request a cheaper single-pass review (no second-opinion round) while preserving downstream evaluation and decision-capture work · `--rounds=2` force the full second-opinion review · omit `--rounds` to let the backend's difficulty-adaptive review policy decide (it falls back to a full second-opinion review when adaptive routing is disabled or the ticket's difficulty cannot be resolved).
421
- - **Multi-ticket fan-out:** `/review-tickets BAPI-123 BAPI-456` opens one terminal tab per ticket for parallel review with no worktrees (terminal launcher only — no `wt`/`git`). All `/review-ticket` flags apply; `--review KEY=auto,rounds=N` sets per-ticket overrides. Packaged CLI: `npx -y @bridge_gpt/mcp-server review-tickets KEY [KEY ...]`.
441
+ - **How to use it:** `/review-ticket BAPI-123` (command only — "review" as free text is easily mistaken for a freehand agent review). For several tickets at once, `/review-tickets BAPI-123 BAPI-456` opens one terminal tab per ticket and reviews them in parallel with no worktrees; every `/review-ticket` flag applies, and `--review KEY=auto,rounds=N` sets per-ticket overrides.
442
+ - **Flags:** `--auto` auto-accept findings and skip the approval gates · `--rounds=1` a cheaper single-pass review that still evaluates findings and captures decisions · `--rounds=2` force the full second-opinion review · omit `--rounds` to let the difficulty-adaptive review policy decide.
422
443
 
423
- **2. Start Tickets**
424
- - **What it does:** Creates one git worktree per ticket and spawns an agent session in each to implement them in parallel.
425
- - **When it's useful:** (Implementation | Automation) When you're ready to start building one or more refined tickets concurrently.
426
- - **How to use it:** `/start-tickets BAPI-248 BAPI-250` (see [CLI Subcommands](#cli-subcommands) for the full flag table and cross-platform behavior).
427
- - **Flags:** `--auto` skip the approval gates · `--base-branch <branch>` branch off something other than the default · `--workflow implement|review-and-implement` selects which slash command each spawned worktree runs (default `implement`, byte-identical to today; `review-and-implement` runs `/review-ticket` inline then, after a per-ticket halt gate, hands off to a **fresh** `/implement-ticket` session reusing the same worktree) · `--rounds=1|2` review-only, forwarded to the review phase, valid only with `--workflow review-and-implement` · `--tier cheap|basic|premium` coarse model-routing override (see [CLI Subcommands](#cli-subcommands)).
444
+ **2. Council**
445
+ - **What it does:** Fans your problem out to two different models and returns their approaches, in technical, design, discovery, or general mode.
446
+ - **When it's useful:** (Architecture | Refinement) Early, when you want a spread of approaches — technical for how to build it, design for how it should look, discovery for what still needs figuring out before a real ticket exists, general for a quick brief-driven pass before the repository is indexed.
447
+ - **How to use it:** Ask your agent to convene a council — "Convene a council on approaches for adding rate limiting to the LLM client." For a design pass: "Run a design council for the evidence-freshness dashboard UI." For early discovery: "Run a discovery council — `request_council` with `mode: "discovery"` — so we can collect the questions stakeholders need to answer first."
448
+ - **Flags:** `mode` selects one of four modes: `technical` (the default implementation/architecture approaches), `design` (UI/UX and visual direction), `discovery` (stakeholder discovery questions, grouped into `Technical Discovery Questions` and `Business / Stakeholder Discovery Questions` and tagged `[HUMAN]`/`[CODE]`/`[TICKET]`), and `general` (brief-driven ideation from your task description alone). `technical` and `discovery` are codebase-grounded and need an indexed repository; `general` needs no code index at all, so it works immediately after install. The legacy boolean `design=true` still works and maps to `mode: "design"`.
428
449
 
429
- **3. Council**
430
- - **What it does:** Fans your problem out to two different LLMs and returns their approaches directly. Runs in one of four modes, selected via `mode`: **`technical`** (default — implementation/architecture approaches), **`design`** (UI/UX and visual direction), **`discovery`** (stakeholder discovery questions for early/vague tasks, grouped into `Technical Discovery Questions` and `Business / Stakeholder Discovery Questions` and tagged `[HUMAN]`/`[CODE]`/`[TICKET]`), or **`general`** (brief-driven ideation from your task description and concerns alone). `technical` and `discovery` are codebase-grounded — they retrieve from the repository index and need a successfully indexed repo. `general` needs no code index at all, so it works immediately after install, before `/parse-repository` has ever run. The legacy boolean `design=true` still works and maps to `mode: "design"`.
431
- - **When it's useful:** (Architecture | Refinement) Early, when you want a spread of approaches `technical` for *how to build it*, `design` for *how it should look*, `discovery` for *what we still need to figure out* before a real ticket exists, `general` for a quick brief-driven council before the repository is indexed.
432
- - **How to use it:** ask your agent to convene a council — *"Convene a council on approaches for adding rate limiting to the LLM client; fan it out to multiple models."* For a design pass: *"Run a design council for the evidence-freshness dashboard UI."* For early discovery: *"Run a discovery council — `request_council` with `mode: "discovery"` — for this vague request so we can collect the questions stakeholders need to answer first."* For a fresh, unindexed repo: *"Run a general council — `request_council` with `mode: "general"` — on launch options for this idea."*
450
+ **3. Get Council**
451
+ - **What it does:** Retrieves a council that was already generated for a ticket.
452
+ - **When it's useful:** (Architecture | Refinement) When a council was already run and you want to reread it without paying to regenerate it.
453
+ - **How to use it:** Ask your agent to pull up the council already generated for the ticket.
454
+ - **Flags:** None.
433
455
 
434
456
  **4. Deep Research**
435
457
  - **What it does:** Runs multi-source, fact-checked web research on a technical topic and returns a cited report.
436
- - **When it's useful:** (Architecture | Refinement) When a decision hinges on outside knowledge (libraries, best practices, standards) you don't already have.
458
+ - **When it's useful:** (Architecture | Refinement) When a decision hinges on outside knowledge libraries, best practices, standards — that you do not already have.
437
459
  - **How to use it:** `/bridge-research <question>`
460
+ - **Flags:** None.
438
461
 
439
- **5. Jira Ticket Writer**
440
- - **What it does:** An agent that drafts a well-structured Jira ticket from a plain description, applying your project's standards.
441
- - **When it's useful:** (Refinement) When you have an idea in your head and want a properly-formatted ticket draft without writing it by hand.
442
- - **How to use it:** `/write-ticket <description>` (or ask your agent) *"Use the jira ticket writer to turn our conversation into a ticket."*
443
- - **Flags:** `--standards <path>` apply a specific standards file when drafting.
462
+ **5. Get Deep Research**
463
+ - **What it does:** Retrieves a research report that was already generated.
464
+ - **When it's useful:** (Architecture | Refinement) When the report already exists and you want to reread it without re-running the research.
465
+ - **How to use it:** Ask your agent to retrieve the research report already generated.
466
+ - **Flags:** None.
444
467
 
445
468
  **6. Upload Ticket**
446
- - **What it does:** Pushes a drafted ticket up to Jira as a real issue (the `create_ticket` capability); handles markdown and child tickets under an Epic.
447
- - **When it's useful:** (Refinement) The final step after drafting — to get the ticket into Jira so it can be tracked and worked.
448
- - **How to use it:** Ask your agent to create the ticket, and it should confirm before creating the live Jira issue.
449
- - **Options:** Describe the issue type (Bug / Story / Task / Epic) and, for a child under an Epic, the parent key.
469
+ - **What it does:** Creates a real Jira issue from a drafted ticket, including child tickets under an epic; your agent should confirm with you before creating it.
470
+ - **When it's useful:** (Refinement) The final step after drafting — to get the ticket into your tracker so it can be tracked and worked.
471
+ - **How to use it:** Ask your agent to create the ticket; it should confirm with you before creating the live issue.
472
+ - **Flags:** Name the issue type (Bug / Story / Task / Epic) and, for a child ticket under an epic, the parent key.
450
473
 
451
- ### Tier 2 — Occasionally useful
474
+ ### Occasionally useful
452
475
 
453
- These features are good to know, but you probably won't use them every day.
476
+ Good to know, but not needed every day.
454
477
 
455
478
  **1. Plan Ticket**
456
- - **What it does:** Generates a step-by-step implementation plan for a ticket, with references to real code files, and saves it locally.
457
- - **When it's useful:** (Refinement | Implementation) Once a ticket is solid and you want a concrete build plan before (or instead of) auto-implementing.
479
+ - **What it does:** Generates a step-by-step implementation plan for a ticket that references real files in your codebase.
480
+ - **When it's useful:** (Refinement | Implementation) Once a ticket is solid and you want a concrete build plan before or instead of auto-implementing it.
458
481
  - **How to use it:** `/plan-ticket BAPI-123`
459
482
  - **Flags:** `--provider <name>` choose the model provider · `--second-opinion <provider>` cross-check the plan with a second provider.
460
483
 
461
- **2. Clarify Ticket**
462
- - **What it does:** Generates clarifying questions for a ticket (or debugging guidance for bugs) and saves them locally.
484
+ **2. Get Plan**
485
+ - **What it does:** Retrieves an implementation plan that was already generated for a ticket.
486
+ - **When it's useful:** (Implementation) When the plan already exists and you want to read it without regenerating it.
487
+ - **How to use it:** Ask your agent to fetch the implementation plan already generated for the ticket.
488
+ - **Flags:** None.
489
+
490
+ **3. Clarify Ticket**
491
+ - **What it does:** Generates clarifying questions for a ticket, or debugging guidance when the ticket is a bug.
463
492
  - **When it's useful:** (Refinement) When a ticket feels under-specified and you want the open questions made explicit.
464
- - **How to use it:** `/clarify-ticket BAPI-123` — *"Generate clarifying questions for BAPI-123"*
493
+ - **How to use it:** `/clarify-ticket BAPI-123`
465
494
  - **Flags:** `--provider <name>` choose the model provider · `--second-opinion <provider>` cross-check with a second provider.
466
495
 
467
- **3. Critique Ticket**
468
- - **What it does:** Critiques a ticket's quality against your project standards and lists deviations + improvements.
469
- - **When it's useful:** (Refinement) When you want a quality gate on a ticket before it's worked.
470
- - **How to use it:** `/critique-ticket BAPI-123` *"Critique BAPI-123 against our project standards and list what's missing or deviating."*
496
+ **4. Get Clarifying Questions**
497
+ - **What it does:** Retrieves clarifying questions that were already generated for a ticket.
498
+ - **When it's useful:** (Refinement) When the questions were already generated and you want to reread them rather than pay to regenerate them.
499
+ - **How to use it:** Ask your agent for the clarifying questions already generated for the ticket.
500
+ - **Flags:** None.
501
+
502
+ **5. Critique Ticket**
503
+ - **What it does:** Critiques a ticket against your project's standards and lists the deviations and improvements it found.
504
+ - **When it's useful:** (Refinement) When you want a quality gate on a ticket before anyone works it.
505
+ - **How to use it:** `/critique-ticket BAPI-123`
471
506
  - **Flags:** `--provider <name>` choose the model provider · `--second-opinion <provider>` cross-check with a second provider.
472
507
 
473
- **4. Create Doc**
474
- - **What it does:** Generates a design document for a ticket a TDD (technical design, engineer audience), an FSD (functional spec, for product/design/QA), or a PRD (product requirements: problem, goals, success metrics) — and saves it locally.
508
+ **6. Get Ticket Critique**
509
+ - **What it does:** Retrieves a ticket critique that was already generated.
510
+ - **When it's useful:** (Refinement) When the critique already exists and you want to reread its findings without regenerating it.
511
+ - **How to use it:** Ask your agent for the critique already generated for the ticket.
512
+ - **Flags:** None.
513
+
514
+ **7. Create Doc**
515
+ - **What it does:** Generates a design document for a ticket — a technical design document, a functional spec, or a product requirements document.
475
516
  - **When it's useful:** (Architecture | Refinement) When a ticket needs a fuller design write-up before planning or implementation, in the shape that fits your audience.
476
517
  - **How to use it:** `/create-doc BAPI-123 --doc-type tdd` (or `fsd` / `prd`)
477
518
  - **Flags:** `--doc-type tdd|fsd|prd` which document to generate (required) · `--provider <name>` choose the model provider · `--second-opinion <provider>` cross-check with a second provider.
478
519
 
479
- **5. Explore Ticket**
480
- - **What it does:** Explores the codebase for a task and recommends implementation options or surfaces clarifying questions, with optional research.
481
- - **When it's useful:** (Architecture | Refinement) Before writing a ticket or plan, when you're unsure how a change would fit the existing code.
482
- - **How to use it:** `/explore-ticket <task>` *"Explore the codebase for how we'd add a Mistral LLM provider and recommend 2–3 implementation options."*
520
+ **8. Get Doc**
521
+ - **What it does:** Retrieves a design document that was already generated for a ticket.
522
+ - **When it's useful:** (Architecture | Refinement) When the document already exists and you want to reread it without regenerating it.
523
+ - **How to use it:** Ask your agent for the ticket's design document, naming which type you want.
524
+ - **Flags:** None.
483
525
 
484
- **6. Second Opinion**
485
- - **What it does:** Gets an immediate critique of any text from a different model family no artifact saved, just the reply.
526
+ **9. Second Opinion**
527
+ - **What it does:** Gets an immediate critique of any text from a different model family, without saving an artifact.
486
528
  - **When it's useful:** (Architecture | Refinement | Implementation) Any time you want a quick sanity check on a plan, draft, or decision from a fresh perspective.
487
- - **How to use it:** ask your agent — *"Get a second opinion from Gemini on whether the BAPI-123 plan's migration step is safe to run against prod."*
488
- - **Options:** pick the provider (anthropic / openai / gemini) and the tier (cheap / basic / premium).
529
+ - **How to use it:** Ask your agent — "Get a second opinion from Gemini on whether the BAPI-123 plan's migration step is safe to run against production."
530
+ - **Flags:** Pick the provider (anthropic / openai / gemini) and the tier (cheap / basic / premium).
489
531
 
490
- **7. Generate Image**
491
- - **What it does:** Generates an image from a text prompt using a provider image model (OpenAI `gpt-image-2` by default, or Google Imagen) and returns the image directly. Spends provider credits on every call.
532
+ **10. Generate Image**
533
+ - **What it does:** Generates an image from a text prompt using a provider image model, spending provider credits on every call.
492
534
  - **When it's useful:** (Architecture | Refinement) When you want a quick visual — a UI mockup, diagram, or illustration — to anchor a design discussion or attach to a ticket.
493
- - **How to use it:** ask your agent — *"Generate an image of a dashboard showing SOC2 evidence freshness as a traffic-light grid."*
494
- - **Options:** `provider` openai (`gpt-image-2`) / gemini (Imagen adds an invisible SynthID watermark) · `quality` low (default, cheapest) / medium / high · `size` 1024x1024 / 1024x1536 / 1536x1024. The image is always saved to `BAPI_DOCS_DIR/images/` and also returned inline.
535
+ - **How to use it:** Ask your agent — "Generate an image of a dashboard showing SOC2 evidence freshness as a traffic-light grid."
536
+ - **Flags:** `provider` openai (`gpt-image-2`) / gemini (Imagen, which adds an invisible SynthID watermark) · `quality` low (default, cheapest) / medium / high · `size` 1024x1024 / 1024x1536 / 1536x1024. The image is saved to `BAPI_DOCS_DIR/images/` and also returned inline.
495
537
 
496
- **8. Implement Ticket**
497
- - **What it does:** Full build for one ticket: generate a plan, write the code, commit, open a PR, and monitor CI.
498
- - **When it's useful:** (Implementation) When a ticket is ready and you want it taken from plan to open PR in one go.
499
- - **How to use it:** `/implement-ticket BAPI-123` (command only — "implement X" as free text almost always triggers a freehand build instead of the Bridge plan→code→PR→CI pipeline).
500
- - **Flags:** `--auto` skip the approval gates (e.g. auto-commit/push).
538
+ **11. Request PRD**
539
+ - **What it does:** Generates a product requirements document for a ticket covering the problem, the goals, and the success metrics.
540
+ - **When it's useful:** (Architecture | Refinement) When a piece of work needs its problem, goals, and success metrics written down before anyone designs a solution.
541
+ - **How to use it:** `/create-doc BAPI-123 --doc-type prd`
542
+ - **Flags:** `--provider <name>` choose the model provider · `--second-opinion <provider>` cross-check with a second provider.
501
543
 
502
- **9. Full Automation**
503
- - **What it does:** Drives the whole chain end-to-end: idea ticket(s) review each → spawn worktrees to implement.
544
+ **12. Get PRD**
545
+ - **What it does:** Retrieves a product requirements document that was already generated for a ticket.
546
+ - **When it's useful:** (Architecture | Refinement) When the requirements document already exists and you want to reread it without regenerating it.
547
+ - **How to use it:** Ask your agent to retrieve the ticket's product requirements document.
548
+ - **Flags:** None.
549
+
550
+ **13. Full Automation**
551
+ - **What it does:** Drives the whole chain from a raw idea through tickets and reviews to implementation sessions.
504
552
  - **When it's useful:** (Automation) When you want to go from a raw idea to in-progress implementation with minimal hands-on steps.
505
- - **How to use it:** `/full-automation <idea>` (command only — creates tickets, spawns worktrees, and carries scheduling/`--max-children` flags that free text can't).
506
- - **Flags:** `--require-approval` toggle the approval gates, full automation runs end to end by default.
553
+ - **How to use it:** `/full-automation <idea>` (command only — it creates tickets, spawns worktrees, and carries scheduling flags free text cannot).
554
+ - **Flags:** `--require-approval` re-enable the approval gates; the chain runs end to end by default · `--max-children <n>` cap how many child tickets an epic decomposes into.
507
555
 
508
- **10. Idea to Ticket**
509
- - **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.
510
- - **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.
511
- - **How to use it:** `/idea-to-ticket <idea>`
556
+ **14. Resume Full Automation**
557
+ - **What it does:** Resumes a full-automation chain that was started earlier.
558
+ - **When it's useful:** (Automation) When an earlier chain stopped at an approval gate or was interrupted, and you want it continued rather than restarted.
559
+ - **How to use it:** Ask your agent to resume the full-automation chain, naming the run to continue.
560
+ - **Flags:** None.
512
561
 
513
- ### Tier 3 — Now and then
562
+ ### Now and then
514
563
 
515
- These features are useful once in a while, but you probably won't need them everyday.
564
+ Useful once in a while.
516
565
 
517
566
  **1. Reimplement Ticket**
518
- - **What it does:** Pulls in new context/attachments since the last pass and implements small follow-up changes on an already-built ticket.
567
+ - **What it does:** Gathers the context and attachments added since the last pass so a targeted follow-up change can be made.
519
568
  - **When it's useful:** (Implementation) After review feedback or new screenshots, when you need a targeted second pass rather than a fresh build.
520
569
  - **How to use it:** `/reimplement-ticket BAPI-123`
570
+ - **Flags:** None.
521
571
 
522
- **2. Run Tests**
523
- - **What it does:** Runs the unit and E2E suites and autonomously triages/fixes failures (via the test-correction agent).
524
- - **When it's useful:** (Implementation) After making changes, to confirm everything passes and auto-fix straightforward breakages.
525
- - **How to use it:** `/run-tests` (`--unit-only`, `--skip-e2e`)
572
+ **2. Get Reimplement Context**
573
+ - **What it does:** Retrieves the follow-up context that was already gathered for a ticket.
574
+ - **When it's useful:** (Implementation) When the follow-up context was already gathered and you want to read it without gathering it again.
575
+ - **How to use it:** Ask your agent for the follow-up context already gathered for the ticket.
576
+ - **Flags:** None.
526
577
 
527
- **3. Plan Epic**
528
- - **What it does:** Decomposes a large epic into sub-tasks with a structured exploration doc for each.
529
- - **When it's useful:** (Architecture | Refinement) When a feature is too big for one ticket and you need it broken down and scoped.
530
- - **How to use it:** `/plan-epic <epic>` — *"Decompose the epic 'migrate PayPal token storage off Custom Objects' into sub-tasks with an exploration doc for each."*
531
-
532
- **4. Update Ticket**
533
- - **What it does:** Synthesizes a ticket's clarifying answers and critique into a rewritten description and pushes it to Jira.
578
+ **3. Update Ticket**
579
+ - **What it does:** Rewrites a ticket's description, fully replacing what is there today.
534
580
  - **When it's useful:** (Refinement) After review, to fold the resolved questions and fixes back into the ticket itself.
535
- - **How to use it:** `/update-ticket BAPI-123` (command only — does a full overwrite of the live Jira description; "update" as free text is both vague and hard to reverse).
581
+ - **How to use it:** `/update-ticket BAPI-123` (command only — it fully overwrites the live description, which is hard to reverse).
582
+ - **Flags:** None.
536
583
 
537
- **5. Get Ticket**
538
- - **What it does:** Retrieves the full details of a Jira ticket (summary, status, description, etc.).
584
+ **4. Get Ticket**
585
+ - **What it does:** Retrieves the full details of a ticket, including its summary, status, and description.
539
586
  - **When it's useful:** (Refinement | Implementation) Any time you want the agent to read a ticket before acting on it.
540
- - **How to use it:** ask your agent — *"Pull up BAPI-123 and show me its description, status, and acceptance criteria."*
587
+ - **How to use it:** Ask your agent — "Pull up BAPI-123 and show me its description, status, and acceptance criteria."
588
+ - **Flags:** None.
589
+
590
+ **5. Search Tickets**
591
+ - **What it does:** Searches across the tickets in your project.
592
+ - **When it's useful:** (Refinement) When you need to find tickets by project, status, or wording rather than by key.
593
+ - **How to use it:** Ask your agent — "Search our project for open tickets mentioning rate limiting."
594
+ - **Flags:** Narrow the search by project, status, issue type, or free text.
541
595
 
542
596
  **6. Write Comment**
543
- - **What it does:** Posts a comment on a Jira ticket (markdown; long ones can attach as a file).
597
+ - **What it does:** Posts a comment on a ticket.
544
598
  - **When it's useful:** (Refinement | Implementation) To leave context, status, or a decision trail on the ticket.
545
- - **How to use it:** ask your agent — *"Post a comment on BAPI-123: blocked on the expired Atlassian token — will retry after it's rotated."*
599
+ - **How to use it:** Ask your agent — "Post a comment on BAPI-123: blocked on the expired Atlassian token — will retry after it is rotated."
600
+ - **Flags:** A long comment can be attached as a file instead of inlined.
601
+
602
+ **7. Read Comments**
603
+ - **What it does:** Reads the comment thread on a ticket.
604
+ - **When it's useful:** (Refinement | Implementation) When the discussion on a ticket matters and you want the agent to read it before acting.
605
+ - **How to use it:** Ask your agent — "Read the comments on BAPI-123 and summarize what was decided."
606
+ - **Flags:** None.
607
+
608
+ **8. Ticket Attachments**
609
+ - **What it does:** Downloads files from a ticket to your disk, or attaches a local file to a ticket.
610
+ - **When it's useful:** (Refinement | Implementation) When a ticket has design files or logs you need locally, or you want to attach output back to it.
611
+ - **How to use it:** Ask your agent — "Download the design mockups attached to BAPI-123 into my docs folder," or "Attach build-log.txt to BAPI-123."
612
+ - **Flags:** Choose the direction (download from the ticket, or upload to it) and, for a download, where the files should land.
613
+
614
+ **9. Estimate Epic**
615
+ - **What it does:** Estimates an epic, or an explicit group of tickets you name.
616
+ - **When it's useful:** (Architecture | Refinement) When you need a sizing pass across an epic, or across a set of tickets you name explicitly.
617
+ - **How to use it:** `/estimate-epic BAPI-123`
618
+ - **Flags:** Pass an epic key, or an explicit list of ticket keys to estimate as one group.
619
+ <!-- END GENERATED: mcp-tool-documentation -->
546
620
 
547
- **7. Download / Upload Attachment**
548
- - **What it does:** Pulls files off a Jira ticket to disk, or attaches a local file to a ticket.
549
- - **When it's useful:** (Refinement | Implementation) When a ticket has design files/logs you need locally, or you want to attach output back to it.
550
- - **How to use it:** ask your agent — *"Download the design mockups attached to BAPI-123 into my docs folder."* / *"Attach build-log.txt to BAPI-123."*
621
+ ### Workflow commands
551
622
 
552
- **8. Learn Repository**
623
+ Slash commands that drive several tools at once. They are agent workflows rather than single MCP tools, so they are documented here by hand.
624
+
625
+ **1. Start Tickets**
626
+ - **What it does:** Creates one git worktree per ticket and spawns an agent session in each to implement them in parallel.
627
+ - **When it's useful:** (Implementation | Automation) When you're ready to start building one or more refined tickets concurrently.
628
+ - **How to use it:** `/start-tickets BAPI-248 BAPI-250` (see [CLI Subcommands](#cli-subcommands) for the full flag table and cross-platform behavior).
629
+ - **Flags:** `--auto` skip the approval gates · `--base-branch <branch>` branch off something other than the default · `--workflow implement|review-and-implement` selects which slash command each spawned worktree runs · `--rounds=1|2` forwarded to the review phase, valid only with `--workflow review-and-implement` · `--tier cheap|basic|premium` coarse model-routing override.
630
+
631
+ **2. Implement Ticket**
632
+ - **What it does:** Full build for one ticket: generate a plan, write the code, commit, open a PR, and monitor CI.
633
+ - **When it's useful:** (Implementation) When a ticket is ready and you want it taken from plan to open PR in one go.
634
+ - **How to use it:** `/implement-ticket BAPI-123` (command only — "implement X" as free text almost always triggers a freehand build instead of the Bridge plan→code→PR→CI pipeline).
635
+ - **Flags:** `--auto` skip the approval gates (e.g. auto-commit/push).
636
+
637
+ **3. Review and Start**
638
+ - **What it does:** Spawns one worktree per ticket; each session reviews the ticket inline and, after a per-ticket proceed/halt gate, hands off to a **fresh implementation session** that reuses the same worktree — review and implementation run in two separate agent contexts, not one shared session.
639
+ - **When it's useful:** (Refinement | Implementation | Automation) The **recommended front door** for "review these tickets, then implement the ones that pass," starting from existing ticket keys (unlike `/full-automation`, which only accepts an idea).
640
+ - **How to use it:** `/review-and-start BAPI-248 BAPI-250` (single or multiple keys flow through the identical code path).
641
+ - **Flags:** `--auto` auto-approves both the review and the implementation phase of every spawned session · `--rounds=1|2` forwarded to the review phase · `--agent`, `--base-branch`, `--max-parallel`, `--dry-run` mirror `/start-tickets`.
642
+
643
+ **4. Jira Ticket Writer**
644
+ - **What it does:** An agent that drafts a well-structured Jira ticket from a plain description, applying your project's standards.
645
+ - **When it's useful:** (Refinement) When you have an idea in your head and want a properly-formatted ticket draft without writing it by hand.
646
+ - **How to use it:** `/write-ticket <description>` — or ask your agent, *"Use the jira ticket writer to turn our conversation into a ticket."*
647
+ - **Flags:** `--standards <path>` apply a specific standards file when drafting.
648
+
649
+ **5. Idea to Ticket**
650
+ - **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.
651
+ - **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.
652
+ - **How to use it:** `/idea-to-ticket <idea>`
653
+ - **Flags:** None.
654
+
655
+ **6. Explore Ticket**
656
+ - **What it does:** Explores the codebase for a task and recommends implementation options or surfaces clarifying questions, with optional research.
657
+ - **When it's useful:** (Architecture | Refinement) Before writing a ticket or plan, when you're unsure how a change would fit the existing code.
658
+ - **How to use it:** `/explore-ticket <task>` — *"Explore the codebase for how we'd add a Mistral LLM provider and recommend 2–3 implementation options."*
659
+ - **Flags:** None.
660
+
661
+ **7. Plan Epic**
662
+ - **What it does:** Decomposes a large epic into sub-tasks with a structured exploration doc for each.
663
+ - **When it's useful:** (Architecture | Refinement) When a feature is too big for one ticket and you need it broken down and scoped.
664
+ - **How to use it:** `/plan-epic <epic>` — *"Decompose the epic 'migrate PayPal token storage off Custom Objects' into sub-tasks with an exploration doc for each."*
665
+ - **Flags:** None.
666
+
667
+ **8. Run Tests**
668
+ - **What it does:** Runs the unit and E2E suites and autonomously triages/fixes failures (via the test-correction agent).
669
+ - **When it's useful:** (Implementation) After making changes, to confirm everything passes and auto-fix straightforward breakages.
670
+ - **How to use it:** `/run-tests`
671
+ - **Flags:** `--unit-only` skip the E2E suite · `--skip-e2e` same, phrased the other way.
672
+
673
+ **9. Learn Repository**
553
674
  - **What it does:** Researches and documents the repo's architecture, testing, review, and correctness standards, then saves them to Bridge for future agents.
554
675
  - **When it's useful:** (Setup/Learning) When onboarding a new repo, or after big changes, so Bridge's agents follow your conventions.
555
676
  - **How to use it:** `/learn-repository`
677
+ - **Flags:** None.
556
678
 
557
- **9. Teach Bridge**
679
+ **10. Teach Bridge**
558
680
  - **What it does:** Takes a plain-English instruction, figures out which standards field it belongs to, and merges it in (admin only).
559
681
  - **When it's useful:** (Setup/Learning) When you notice the agents missing a convention and want to correct it in one sentence.
560
682
  - **How to use it:** `/teach-bridge <teaching>` — *"Teach Bridge: always use data-testid selectors in E2E tests."*
561
-
562
- **10. Review and Start**
563
- - **What it does:** Spawns one worktree per ticket; each session reviews the ticket inline and, after a per-ticket human proceed/halt gate, hands off to a **fresh implementation session** that reuses the same worktree — review and implementation run in two separate agent contexts, not one shared session.
564
- - **When it's useful:** (Refinement | Implementation | Automation) The **recommended front door** for "review these tickets, then implement the ones that pass," starting from existing ticket keys (unlike `/full-automation`, which only accepts an idea).
565
- - **How to use it:** `/review-and-start BAPI-248 BAPI-250` (single or multiple keys flow through the identical code path).
566
- - **Flags:** `--auto` a single chain-level flag that auto-approves both the review and the implementation phase of every spawned session · `--rounds=1|2` forwarded to the review phase · `--agent`, `--base-branch`, `--max-parallel`, `--dry-run` mirror `/start-tickets`.
567
- - Under the hood, this is a thin shim over `start-tickets --workflow review-and-implement <KEYS>` — the lower-level launcher seam documented above; the review→gate→fresh-implementation-handoff logic lives in the spawned `/review-and-implement` session, never in this command or the CLI. On approval, that session reuses its review-time model tier by passing it to the fresh implementation launcher via `--tier`.
683
+ - **Flags:** None.
568
684
 
569
685
  ### Operational commands
570
686
 
@@ -934,7 +1050,7 @@ The full surface, for when you need the complete enumeration. Day-to-day, use [U
934
1050
 
935
1051
  ### MCP tools
936
1052
 
937
- The server exposes **60 documented 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).
1053
+ The authoritative tool catalog covers **92 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).
938
1054
 
939
1055
  - **Connectivity & identity** — `ping`, `get_my_role`, `get_docs_dir`
940
1056
  - **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)
@@ -942,7 +1058,7 @@ The server exposes **60 documented tools** (enumerated below). What's actually r
942
1058
  - **Attachments** — `attachment` (operations: `upload`, `download`, `list`)
943
1059
  - **AI generation (request/get)** — `request_plan_generation`/`get_plan`, `request_architecture`/`get_architecture`, `create_doc`/`get_doc` (design docs by `doc_type`: tdd/fsd/prd), `request_prd`/`get_prd`, `request_clarifying_questions`/`get_clarifying_questions`, `request_ticket_critique`/`get_ticket_critique`, `request_ticket_review`, `request_reimplement_context`/`get_reimplement_context`, `request_council`/`get_council`, `request_deep_research`/`get_deep_research`
944
1060
  - **Other AI** — `second_opinion`, `generate_image`, `generate_decision_page`, `visual_diff` (deterministic pixel diff of a rendered URL vs a design comp)
945
- - **Ticket lifecycle** — `track_ticket`, `update_ticket_state`, `get_ticket_state`
1061
+ - **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)
946
1062
  - **Jira status** — `get_jira_transitions`, `update_jira_status`, `resolve_target_status`
947
1063
  - **Repository & CI** — `parse_repository`, `get_parse_status`, `regenerate_directory_map`, `create_pull_request`, `resolve_ci_checks`, `poll_ci_checks`
948
1064
  - **Pipelines & automation** — `list_pipelines`, `get_pipeline_recipe`, `run_pipeline`, `resume_pipeline`, `list_pipeline_runs`, `delete_pipeline_run`, `run_full_automation`, `resume_full_automation`