@bridge_gpt/mcp-server 0.1.17 → 0.2.0
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.
- package/README.md +333 -197
- package/build/agent-capabilities/cli.js +152 -0
- package/build/agent-capabilities/default-deps.js +45 -0
- package/build/agent-capabilities/probe-context.js +111 -0
- package/build/agent-capabilities/probes.js +278 -0
- package/build/agent-capabilities/reporter.js +50 -0
- package/build/agent-capabilities/runner.js +56 -0
- package/build/agent-capabilities/types.js +10 -0
- package/build/agent-launchers/claude.js +4 -4
- package/build/agents.generated.js +1 -1
- package/build/brainstorm-files.js +89 -0
- package/build/bridge-config.js +404 -0
- package/build/chain-orchestrator.js +247 -33
- package/build/commands.generated.js +5 -5
- package/build/credential-materialization.js +128 -0
- package/build/credential-store.js +232 -0
- package/build/decision-page-schema.js +39 -6
- package/build/decision-page-template.js +54 -18
- package/build/doctor.js +18 -2
- package/build/git-ignore-utils.js +63 -0
- package/build/index.js +1510 -560
- package/build/mcp-invoke.js +417 -0
- package/build/mcp-provisioning.js +249 -0
- package/build/mcp-registration-doctor.js +96 -0
- package/build/pipeline-orchestrator.js +9 -1
- package/build/pipeline-utils.js +33 -0
- package/build/pipelines.generated.js +36 -5
- package/build/schedule-run.js +6 -6
- package/build/start-tickets-prereqs.js +90 -1
- package/build/start-tickets.js +106 -14
- package/build/third-party-mcp-targets.js +75 -0
- package/build/version.generated.js +1 -1
- package/package.json +3 -3
- package/pipelines/full-automation.json +3 -1
- package/pipelines/implement-ticket.json +28 -2
- package/smoke-test/SMOKE-TEST.md +4 -2
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
MCP server for [Bridge API](https://bridgegpt-api.com) — exposes Jira integration endpoints as MCP tools for AI coding agents. Works with Claude Code, VS Code/Copilot, Cursor, Windsurf, and OpenAI Codex.
|
|
4
4
|
|
|
5
|
+
> **New here?** Jump to [Usage Documentation](#usage-documentation) for what you can actually do with Bridge, grouped by how often you'll reach for it.
|
|
6
|
+
|
|
5
7
|
## Getting Started
|
|
6
8
|
|
|
7
9
|
### 1. Install the Package
|
|
@@ -21,61 +23,6 @@ npx -y @bridge_gpt/mcp-server --init
|
|
|
21
23
|
|
|
22
24
|
Re-run `--init` after upgrading the package to get updated commands.
|
|
23
25
|
|
|
24
|
-
### Upgrading
|
|
25
|
-
|
|
26
|
-
To upgrade to the latest version and refresh all scaffolded artifacts in one step:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
npx -y @bridge_gpt/mcp-server --upgrade
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
This runs `npm i @bridge_gpt/mcp-server@latest`, prints a before/after version summary, then re-runs the full `--init` scaffolding flow to update your slash commands, agents, and pipeline definitions.
|
|
33
|
-
|
|
34
|
-
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.
|
|
35
|
-
|
|
36
|
-
### CLI subcommand: `start-tickets`
|
|
37
|
-
|
|
38
|
-
Beyond `--init` / `--upgrade`, the package ships a `start-tickets` subcommand that spawns one Worktrunk worktree + selected-agent session per Jira ticket. The agent defaults to **Claude Code** (`claude`) and is configurable via `--agent`. It is part of the **existing `bridge-api-mcp-server` bin** — not a separate binary — so it travels with the package to every consumer. It also backs the `/start-tickets` slash command.
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
npx -y @bridge_gpt/mcp-server start-tickets [flags] KEY [KEY ...]
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
| Flag | Default | Meaning |
|
|
45
|
-
|---|---|---|
|
|
46
|
-
| `--agent claude\|cursor-agent` | `claude` | Agent command to launch in each worktree |
|
|
47
|
-
| `--terminal terminal\|iterm` | auto-detect via `$TERM_PROGRAM` | Override the macOS terminal app (honored on macOS only) |
|
|
48
|
-
| `--dry-run` | off | Print intended actions; create no worktrees, open no tabs (any OS) |
|
|
49
|
-
| `--branch KEY=BRANCH` | `feature/<KEY>` | Use a custom branch for that ticket (repeatable) |
|
|
50
|
-
| `--base-branch <BRANCH>` | `main` | Cut new worktrees from `<BRANCH>` and refresh `origin/<BRANCH>` instead of `main` |
|
|
51
|
-
| `--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. |
|
|
52
|
-
| `--max-parallel N` | `3` | Max worktrees created concurrently |
|
|
53
|
-
| `-h`, `--help` | — | Show usage |
|
|
54
|
-
|
|
55
|
-
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's `'/implement-ticket <KEY>'` — `claude '/implement-ticket <KEY>'` by default, or `cursor-agent '/implement-ticket <KEY>'` with `--agent cursor-agent`. The `/implement-ticket <KEY>` prompt is unchanged for both agents. To launch Cursor Agent instead of Claude Code:
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
npx -y @bridge_gpt/mcp-server start-tickets --agent cursor-agent BAPI-248
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**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.
|
|
62
|
-
|
|
63
|
-
- **macOS** — opens a Terminal.app or iTerm tab via `osascript`.
|
|
64
|
-
- **Windows** — creates worktrees with **`git-wt`** (Worktrunk's winget alias) and opens a tab via **Windows Terminal (`wt.exe new-tab`)**, falling back to **`Start-Process powershell.exe`** when Windows Terminal is absent. Requires **Git for Windows / Git Bash** (Worktrunk runs its `pre-start` / `post-start` hooks via Git Bash). The Worktrunk binary (`git-wt`) and the tab launcher (`wt.exe`) are resolved independently and never conflated.
|
|
65
|
-
- **Linux** — creates one detached **tmux** session per ticket (pane kept open after the agent exits); attach with `tmux attach -t <session>`. A missing `tmux` produces a clear, actionable error.
|
|
66
|
-
|
|
67
|
-
Per-OS prerequisites: macOS `wt`, `git`, `osascript`; Windows `git-wt`, Git for Windows / Git Bash, Windows Terminal or PowerShell; Linux `wt`, `git`, `tmux`. Set `BAPI_WORKTRUNK_BIN` to override the Worktrunk executable name/path for nonstandard installs (`doctor` honors it too). The read-only `doctor` subcommand (below) additionally surfaces a missing `uv` — Worktrunk's `pre-start` hook runs `uv`, but live preflight does not check it — and the selected agent's command; run `doctor --agent cursor-agent` to also check `cursor-agent` (it prints `cursor-agent login` as an informational auth reminder).
|
|
68
|
-
|
|
69
|
-
### CLI subcommand: `doctor`
|
|
70
|
-
|
|
71
|
-
The package also ships a strictly **read-only** `doctor` subcommand that diagnoses the `start-tickets` prerequisites for the current OS without changing anything:
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
npx -y @bridge_gpt/mcp-server doctor [--agent <name>]
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
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.
|
|
78
|
-
|
|
79
26
|
### 2. Generate an API Key
|
|
80
27
|
|
|
81
28
|
1. Log in to [Bridge API](https://bridgegpt-api.com) and navigate to your project's **Security** page
|
|
@@ -198,184 +145,250 @@ BAPI_DOCS_DIR = "docs/tmp"
|
|
|
198
145
|
|
|
199
146
|
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.
|
|
200
147
|
|
|
201
|
-
### First-Time Setup: Teach Bridge Your Codebase
|
|
148
|
+
### 4. First-Time Setup: Teach Bridge Your Codebase
|
|
202
149
|
|
|
203
150
|
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.
|
|
204
151
|
|
|
205
152
|
You only need to do this once per project — the learned standards persist for all team members.
|
|
206
153
|
|
|
207
|
-
|
|
154
|
+
### Upgrading
|
|
208
155
|
|
|
209
|
-
|
|
156
|
+
To upgrade to the latest version and refresh all scaffolded artifacts in one step:
|
|
210
157
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
| `review-ticket` | Two-round ticket quality review: clarifying questions and critique from multiple providers | `/review-ticket PROJ-123` |
|
|
215
|
-
| `learn-repository` | Analyze codebase architecture, testing patterns, review standards, and documentation conventions, then upload to Bridge | `/learn-repository` |
|
|
216
|
-
| `pr-ticket` | Commit changes and open a pull request | `/create-pr PROJ-123` |
|
|
217
|
-
| `check-ci-ticket` | Commit, open a PR, then monitor CI checks until they pass or fail | `/check-ci PROJ-123` |
|
|
158
|
+
```bash
|
|
159
|
+
npx -y @bridge_gpt/mcp-server --upgrade
|
|
160
|
+
```
|
|
218
161
|
|
|
219
|
-
|
|
162
|
+
This runs `npm i @bridge_gpt/mcp-server@latest`, prints a before/after version summary, then re-runs the full `--init` scaffolding flow to update your slash commands, agents, and pipeline definitions.
|
|
220
163
|
|
|
221
|
-
|
|
164
|
+
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.
|
|
222
165
|
|
|
223
|
-
|
|
166
|
+
## Usage Documentation
|
|
167
|
+
|
|
168
|
+
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).
|
|
169
|
+
|
|
170
|
+
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.
|
|
171
|
+
|
|
172
|
+
### Tier 1 — Regularly useful
|
|
173
|
+
|
|
174
|
+
These features are useful for most tickets.
|
|
175
|
+
|
|
176
|
+
**1. Review Ticket**
|
|
177
|
+
- **What it does:** Runs a two-round quality review of a ticket (clarifying questions + critique, plus an alternate-model second opinion) and produces a decision page to accept/reject findings.
|
|
178
|
+
- **When it's useful:** (Refinement) Right after a ticket is drafted, before anyone starts building — to surface gaps and tighten it.
|
|
179
|
+
- **How to use it:** `/review-ticket BAPI-123` (command only — "review" as free text is easily mistaken for a freehand agent review).
|
|
180
|
+
- **Flags:** `--auto` auto-accept findings / skip the approval gates.
|
|
181
|
+
|
|
182
|
+
**2. Start Tickets**
|
|
183
|
+
- **What it does:** Creates one git worktree per ticket and spawns an agent session in each to implement them in parallel.
|
|
184
|
+
- **When it's useful:** (Implementation | Automation) When you're ready to start building one or more refined tickets concurrently.
|
|
185
|
+
- **How to use it:** `/start-tickets BAPI-248 BAPI-250` (see [CLI Subcommands](#cli-subcommands) for the full flag table and cross-platform behavior).
|
|
186
|
+
- **Flags:** `--auto` skip the approval gates · `--base-branch <branch>` branch off something other than the default.
|
|
187
|
+
|
|
188
|
+
**3. Brainstorm**
|
|
189
|
+
- **What it does:** Fans your problem out to two different LLMs and synthesizes their approaches into one set of options. Runs in one of two modes: a **standard** brainstorm (implementation/architecture approaches) or a **design** brainstorm (UI/UX and visual direction).
|
|
190
|
+
- **When it's useful:** (Architecture | Refinement) Early, when you want a spread of approaches — standard for *how to build it*, design for *how it should look*.
|
|
191
|
+
- **How to use it:** ask your agent to brainstorm — *"Brainstorm approaches for adding rate limiting to the LLM client; fan it out to multiple models and synthesize."* For a design pass: *"Run a design brainstorm for the evidence-freshness dashboard UI."*
|
|
192
|
+
|
|
193
|
+
**4. Deep Research**
|
|
194
|
+
- **What it does:** Runs multi-source, fact-checked web research on a technical topic and returns a cited report.
|
|
195
|
+
- **When it's useful:** (Architecture | Refinement) When a decision hinges on outside knowledge (libraries, best practices, standards) you don't already have.
|
|
196
|
+
- **How to use it:** `/deep-research <question>`
|
|
197
|
+
|
|
198
|
+
**5. Jira Ticket Writer**
|
|
199
|
+
- **What it does:** An agent that drafts a well-structured Jira ticket from a plain description, applying your project's standards.
|
|
200
|
+
- **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.
|
|
201
|
+
- **How to use it:** `/write-ticket <description>` (or ask your agent) — *"Use the jira ticket writer to turn our conversation into a ticket."*
|
|
202
|
+
- **Flags:** `--standards <path>` apply a specific standards file when drafting.
|
|
203
|
+
|
|
204
|
+
**6. Upload Ticket**
|
|
205
|
+
- **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.
|
|
206
|
+
- **When it's useful:** (Refinement) The final step after drafting — to get the ticket into Jira so it can be tracked and worked.
|
|
207
|
+
- **How to use it:** Ask your agent to create the ticket, and it should confirm before creating the live Jira issue.
|
|
208
|
+
- **Options:** Describe the issue type (Bug / Story / Task / Epic) and, for a child under an Epic, the parent key.
|
|
209
|
+
|
|
210
|
+
### Tier 2 — Occasionally useful
|
|
211
|
+
|
|
212
|
+
These features are good to know, but you probably won't use them every day.
|
|
213
|
+
|
|
214
|
+
**1. Second Opinion**
|
|
215
|
+
- **What it does:** Gets an immediate critique of any text from a different model family — no artifact saved, just the reply.
|
|
216
|
+
- **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.
|
|
217
|
+
- **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."*
|
|
218
|
+
- **Options:** pick the provider (anthropic / openai / gemini) and the tier (cheap / basic / premium).
|
|
219
|
+
|
|
220
|
+
**2. Idea to Ticket**
|
|
221
|
+
- **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.
|
|
222
|
+
- **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.
|
|
223
|
+
- **How to use it:** `/idea-to-ticket <idea>`
|
|
224
|
+
|
|
225
|
+
**3. Explore Ticket**
|
|
226
|
+
- **What it does:** Explores the codebase for a task and recommends implementation options or surfaces clarifying questions, with optional research.
|
|
227
|
+
- **When it's useful:** (Architecture | Refinement) Before writing a ticket or plan, when you're unsure how a change would fit the existing code.
|
|
228
|
+
- **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."*
|
|
229
|
+
|
|
230
|
+
**4. Plan Ticket**
|
|
231
|
+
- **What it does:** Generates a step-by-step implementation plan for a ticket, with references to real code files, and saves it locally.
|
|
232
|
+
- **When it's useful:** (Refinement | Implementation) Once a ticket is solid and you want a concrete build plan before (or instead of) auto-implementing.
|
|
233
|
+
- **How to use it:** `/plan-ticket BAPI-123`
|
|
234
|
+
- **Flags:** `--provider <name>` choose the model provider · `--second-opinion <provider>` cross-check the plan with a second provider.
|
|
235
|
+
|
|
236
|
+
**5. Clarify Ticket**
|
|
237
|
+
- **What it does:** Generates clarifying questions for a ticket (or debugging guidance for bugs) and saves them locally.
|
|
238
|
+
- **When it's useful:** (Refinement) When a ticket feels under-specified and you want the open questions made explicit.
|
|
239
|
+
- **How to use it:** `/clarify-ticket BAPI-123` — *"Generate clarifying questions for BAPI-123"*
|
|
240
|
+
- **Flags:** `--provider <name>` choose the model provider · `--second-opinion <provider>` cross-check with a second provider.
|
|
241
|
+
|
|
242
|
+
**6. Critique Ticket**
|
|
243
|
+
- **What it does:** Critiques a ticket's quality against your project standards and lists deviations + improvements.
|
|
244
|
+
- **When it's useful:** (Refinement) When you want a quality gate on a ticket before it's worked.
|
|
245
|
+
- **How to use it:** `/critique-ticket BAPI-123` — *"Critique BAPI-123 against our project standards and list what's missing or deviating."*
|
|
246
|
+
- **Flags:** `--provider <name>` choose the model provider · `--second-opinion <provider>` cross-check with a second provider.
|
|
247
|
+
|
|
248
|
+
**7. Full Automation**
|
|
249
|
+
- **What it does:** Drives the whole chain end-to-end: idea → ticket(s) → review each → spawn worktrees to implement.
|
|
250
|
+
- **When it's useful:** (Automation) When you want to go from a raw idea to in-progress implementation with minimal hands-on steps.
|
|
251
|
+
- **How to use it:** `/full-automation <idea>` (command only — creates tickets, spawns worktrees, and carries scheduling/`--max-children` flags that free text can't).
|
|
252
|
+
- **Flags:** `--require-approval` toggle the approval gates, full automation runs end to end by default.
|
|
253
|
+
|
|
254
|
+
**8. Implement Ticket**
|
|
255
|
+
- **What it does:** Full build for one ticket: generate a plan, write the code, commit, open a PR, and monitor CI.
|
|
256
|
+
- **When it's useful:** (Implementation) When a ticket is ready and you want it taken from plan to open PR in one go.
|
|
257
|
+
- **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).
|
|
258
|
+
- **Flags:** `--auto` skip the approval gates (e.g. auto-commit/push).
|
|
259
|
+
|
|
260
|
+
**9. Generate Image**
|
|
261
|
+
- **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.
|
|
262
|
+
- **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.
|
|
263
|
+
- **How to use it:** ask your agent — *"Generate an image of a dashboard showing SOC2 evidence freshness as a traffic-light grid."*
|
|
264
|
+
- **Options:** `provider` openai (`gpt-image-2`) / gemini (Imagen — adds an invisible SynthID watermark) · `quality` low (default, cheapest) / medium / high · `size` 1024x1024 / 1024x1536 / 1536x1024 · `save_locally` write the image to `docs/images`.
|
|
265
|
+
|
|
266
|
+
### Tier 3 — Now and then
|
|
267
|
+
|
|
268
|
+
These features are useful once in a while, but you probably won't need them everyday.
|
|
269
|
+
|
|
270
|
+
**1. Reimplement Ticket**
|
|
271
|
+
- **What it does:** Pulls in new context/attachments since the last pass and implements small follow-up changes on an already-built ticket.
|
|
272
|
+
- **When it's useful:** (Implementation) After review feedback or new screenshots, when you need a targeted second pass rather than a fresh build.
|
|
273
|
+
- **How to use it:** `/reimplement-ticket BAPI-123`
|
|
274
|
+
|
|
275
|
+
**2. Run Tests**
|
|
276
|
+
- **What it does:** Runs the unit and E2E suites and autonomously triages/fixes failures (via the test-correction agent).
|
|
277
|
+
- **When it's useful:** (Implementation) After making changes, to confirm everything passes and auto-fix straightforward breakages.
|
|
278
|
+
- **How to use it:** `/run-tests` (`--unit-only`, `--skip-e2e`)
|
|
279
|
+
|
|
280
|
+
**3. Learn Repository**
|
|
281
|
+
- **What it does:** Researches and documents the repo's architecture, testing, review, and correctness standards, then saves them to Bridge for future agents.
|
|
282
|
+
- **When it's useful:** (Setup/Learning) When onboarding a new repo, or after big changes, so Bridge's agents follow your conventions.
|
|
283
|
+
- **How to use it:** `/learn-repository`
|
|
284
|
+
|
|
285
|
+
**4. Teach Bridge**
|
|
286
|
+
- **What it does:** Takes a plain-English instruction, figures out which standards field it belongs to, and merges it in (admin only).
|
|
287
|
+
- **When it's useful:** (Setup/Learning) When you notice the agents missing a convention and want to correct it in one sentence.
|
|
288
|
+
- **How to use it:** `/teach-bridge <teaching>` — *"Teach Bridge: always use data-testid selectors in E2E tests."*
|
|
289
|
+
|
|
290
|
+
**5. Update Ticket**
|
|
291
|
+
- **What it does:** Synthesizes a ticket's clarifying answers and critique into a rewritten description and pushes it to Jira.
|
|
292
|
+
- **When it's useful:** (Refinement) After review, to fold the resolved questions and fixes back into the ticket itself.
|
|
293
|
+
- **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).
|
|
294
|
+
|
|
295
|
+
**6. Plan Epic**
|
|
296
|
+
- **What it does:** Decomposes a large epic into sub-tasks with a structured exploration doc for each.
|
|
297
|
+
- **When it's useful:** (Architecture | Refinement) When a feature is too big for one ticket and you need it broken down and scoped.
|
|
298
|
+
- **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."*
|
|
299
|
+
|
|
300
|
+
**7. Download / Upload Attachment**
|
|
301
|
+
- **What it does:** Pulls files off a Jira ticket to disk, or attaches a local file to a ticket.
|
|
302
|
+
- **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.
|
|
303
|
+
- **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."*
|
|
304
|
+
|
|
305
|
+
**8. Write Comment**
|
|
306
|
+
- **What it does:** Posts a comment on a Jira ticket (markdown; long ones can attach as a file).
|
|
307
|
+
- **When it's useful:** (Refinement | Implementation) To leave context, status, or a decision trail on the ticket.
|
|
308
|
+
- **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."*
|
|
309
|
+
|
|
310
|
+
**9. Get Ticket**
|
|
311
|
+
- **What it does:** Retrieves the full details of a Jira ticket (summary, status, description, etc.).
|
|
312
|
+
- **When it's useful:** (Refinement | Implementation) Any time you want the agent to read a ticket before acting on it.
|
|
313
|
+
- **How to use it:** ask your agent — *"Pull up BAPI-123 and show me its description, status, and acceptance criteria."*
|
|
314
|
+
|
|
315
|
+
### Operational commands
|
|
316
|
+
|
|
317
|
+
Workflow commands you'll reach for during implementation and CI, beyond the tiers above:
|
|
318
|
+
|
|
319
|
+
| Command | What it does |
|
|
224
320
|
|---|---|
|
|
225
|
-
| `/check-ci [PROJ-123]` | Monitor CI checks for the current branch, triage failures, apply fixes, and report results |
|
|
226
|
-
| `/check-parse-status` | Check whether a background repository parse job is still running |
|
|
227
|
-
| `/clarify-ticket PROJ-123` | Generate clarifying questions for a ticket and save them locally |
|
|
228
321
|
| `/code-ticket PROJ-123` | Download the implementation plan and questions, then execute the plan inline |
|
|
229
322
|
| `/commit-ticket PROJ-123` | Stage, commit, and push changes; transition Jira status; post a smoke-test comment |
|
|
230
323
|
| `/create-pr PROJ-123` | Commit staged changes and open a pull request |
|
|
231
|
-
| `/
|
|
232
|
-
| `/explore-ticket [PROJ-123]` | Free-form codebase exploration — searches code, surfaces implementation options and questions |
|
|
233
|
-
| `/implement-ticket PROJ-123` | Full end-to-end implementation: plan → code → commit → PR → CI |
|
|
234
|
-
| `/learn-repository` | Teach Bridge API about your codebase (architecture, testing, review patterns) |
|
|
324
|
+
| `/check-ci [PROJ-123]` | Monitor CI checks for the current branch, triage failures, apply fixes, and report results |
|
|
235
325
|
| `/parse-repository` | Queue a background job to index the repository for Bridge AI agents |
|
|
236
|
-
| `/
|
|
237
|
-
| `/reimplement-ticket PROJ-123` | Follow-up implementation pass using previous implementation context |
|
|
238
|
-
| `/review-ticket PROJ-123` | Two-round ticket quality review with critiques from multiple LLM providers |
|
|
239
|
-
| `/run-tests` | Run the full test suite, triage failures, and classify issues as test bugs vs. implementation bugs |
|
|
326
|
+
| `/check-parse-status` | Check whether a background repository parse job is still running |
|
|
240
327
|
| `/scan-tickets` | Sync recently-updated Jira tickets and backfill workflow timestamps |
|
|
241
|
-
| `/start-tickets KEY [KEY ...]` | Spawn one Worktrunk worktree + selected-agent session per ticket via the packaged `start-tickets` CLI (Claude Code by default, `--agent cursor-agent` for Cursor; macOS Terminal/iTerm, Windows Terminal/PowerShell, or Linux tmux) |
|
|
242
|
-
| `/teach-bridge` | Update a Bridge API configuration field via natural-language instructions |
|
|
243
|
-
| `/update-ticket PROJ-123` | Fetch clarifying questions and critique, then rewrite the ticket description and push to Jira |
|
|
244
|
-
| `/write-ticket` | Draft a new Jira ticket from a prompt and upload it |
|
|
245
328
|
|
|
246
329
|
> Commands are designed for Claude Code. Other editors may support slash commands differently — check your editor's documentation for how to invoke prompt files.
|
|
247
330
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
The package ships a canonical, **opt-in** in-host smoke-test runbook at
|
|
251
|
-
`smoke-test/SMOKE-TEST.md`. An AI agent running inside your host (Claude Code,
|
|
252
|
-
Cursor, Codex, Windsurf, or VS Code/Copilot) executes it to verify that the MCP
|
|
253
|
-
server actually works end-to-end *inside that host* — it calls the real tools and
|
|
254
|
-
records a PASS/FAIL verdict for each one in a markdown report.
|
|
255
|
-
|
|
256
|
-
- `smoke-test/SMOKE-TEST.md` **ships with the npm package** and is the
|
|
257
|
-
**canonical** source of truth for the smoke test.
|
|
258
|
-
- The smoke test **adds no MCP tool** and **does not change the registered
|
|
259
|
-
tool surface** (the server still registers its existing 51 tools).
|
|
260
|
-
- It is **opt-in**: default `--init` **does not scaffold `/smoke-test-mcp`**, so
|
|
261
|
-
consumer command palettes are not polluted.
|
|
262
|
-
|
|
263
|
-
### Running it
|
|
264
|
-
|
|
265
|
-
You have two options:
|
|
266
|
-
|
|
267
|
-
1. **Copy the opt-in command manually.** Copy the packaged command stub into your
|
|
268
|
-
host's command directory, then invoke `/smoke-test-mcp`:
|
|
269
|
-
|
|
270
|
-
```bash
|
|
271
|
-
# Claude Code
|
|
272
|
-
cp node_modules/@bridge_gpt/mcp-server/smoke-test/smoke-test-mcp.md .claude/commands/smoke-test-mcp.md
|
|
273
|
-
# Cursor
|
|
274
|
-
cp node_modules/@bridge_gpt/mcp-server/smoke-test/smoke-test-mcp.md .cursor/commands/smoke-test-mcp.md
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
2. **Open the runbook directly.** Alternatively, open
|
|
278
|
-
`smoke-test/SMOKE-TEST.md` and ask the host agent to execute it.
|
|
279
|
-
|
|
280
|
-
Reports are written to `<BAPI_DOCS_DIR>/smoke-test/REPORT-<host>-<timestamp>.md`.
|
|
281
|
-
|
|
282
|
-
## Available Tools
|
|
283
|
-
|
|
284
|
-
MCP tools are the low-level primitives Bridge exposes to your AI assistant. You don't call them directly — ask your AI assistant to perform the task you need, or compose them into a custom pipeline.
|
|
285
|
-
|
|
286
|
-
### Connectivity
|
|
331
|
+
### Extra Capabilities
|
|
287
332
|
|
|
288
|
-
|
|
289
|
-
|---|---|
|
|
290
|
-
| `ping` | Verify connectivity and confirm your API key is valid |
|
|
333
|
+
Behind-the-scenes capabilities an agent gains from the MCP tools — mostly invoked automatically by the commands above, rarely requested by name:
|
|
291
334
|
|
|
292
|
-
|
|
335
|
+
- **Ship a PR end-to-end:** commit & push, open a pull request, transition the Jira status, and discover/poll CI checks (powers `commit-ticket`, `create-pr`, `check-ci`, `implement-ticket`).
|
|
336
|
+
- **Architecture plan** for a ticket (design-level guidance, separate from the implementation plan).
|
|
337
|
+
- **Index the codebase** so Bridge's agents can reason about it: queue/parse the repo, check parse status, regenerate the directory map.
|
|
338
|
+
- **Read & tune project config/standards:** list/read/update config fields, fetch project standards, and the per-topic `learn-*` commands that populate them.
|
|
339
|
+
- **Ticket lifecycle bookkeeping:** track tickets and backfill workflow-state timestamps (`scan-tickets`), search across tickets, read comments, list attachments.
|
|
340
|
+
- **Pipeline machinery:** list/inspect pipeline recipes and run/resume/list/delete pipeline runs (the engine under the orchestration commands).
|
|
341
|
+
- **Decision page** generation for capturing human review decisions as structured data.
|
|
342
|
+
- **Connectivity & identity checks:** ping Bridge, check your role, resolve the local docs directory.
|
|
343
|
+
- **Retrieve any generated artifact** (`get_*` for plans, critiques, questions, brainstorms, research, architecture) without regenerating it.
|
|
344
|
+
- **Tiered-section execution telemetry** recording (internal measurement).
|
|
293
345
|
|
|
294
|
-
|
|
295
|
-
|---|---|
|
|
296
|
-
| `get_tickets` | Search and list Jira tickets by query, status, or date |
|
|
297
|
-
| `get_ticket` | Get full details for a single ticket |
|
|
298
|
-
| `create_ticket` | Create a new Jira ticket |
|
|
299
|
-
| `add_comment` | Post a comment on a ticket |
|
|
300
|
-
| `update_ticket_description` | Replace a ticket's description |
|
|
301
|
-
| `upload_attachment` | Upload a file as a ticket attachment |
|
|
346
|
+
## CLI Subcommands
|
|
302
347
|
|
|
303
|
-
|
|
348
|
+
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](#tier-1--regularly-useful) for *when* to use `start-tickets`; this section is the full CLI reference.
|
|
304
349
|
|
|
305
|
-
|
|
350
|
+
### `start-tickets`
|
|
306
351
|
|
|
307
|
-
|
|
308
|
-
|---|---|
|
|
309
|
-
| `request_plan_generation` | Request an AI-generated implementation plan |
|
|
310
|
-
| `get_plan` | Retrieve a generated implementation plan |
|
|
311
|
-
| `request_architecture` | Request an AI-generated architecture plan |
|
|
312
|
-
| `get_architecture` | Retrieve a generated architecture plan |
|
|
313
|
-
| `request_clarifying_questions` | Request clarifying questions for a ticket |
|
|
314
|
-
| `get_clarifying_questions` | Retrieve generated clarifying questions |
|
|
315
|
-
| `request_ticket_critique` | Request a ticket quality critique |
|
|
316
|
-
| `get_ticket_critique` | Retrieve a generated ticket critique |
|
|
317
|
-
| `request_reimplement_context` | Request context assembly for a follow-up implementation |
|
|
318
|
-
| `get_reimplement_context` | Retrieve assembled reimplementation context |
|
|
319
|
-
| `request_deep_research` | Submit a deep research query |
|
|
320
|
-
| `get_deep_research` | Retrieve deep research results |
|
|
321
|
-
|
|
322
|
-
### Ticket Lifecycle
|
|
323
|
-
|
|
324
|
-
| Tool | Description |
|
|
325
|
-
|---|---|
|
|
326
|
-
| `track_ticket` | Register a ticket for lifecycle tracking |
|
|
327
|
-
| `update_ticket_state` | Update workflow timestamps for a tracked ticket |
|
|
328
|
-
| `get_ticket_state` | Get workflow state and timestamps for a tracked ticket |
|
|
352
|
+
Spawns one Worktrunk worktree + selected-agent session per Jira ticket and backs the `/start-tickets` slash command. The agent defaults to **Claude Code** (`claude`) and is configurable via `--agent`.
|
|
329
353
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|---|---|
|
|
334
|
-
| `get_jira_transitions` | List available status transitions for a ticket |
|
|
335
|
-
| `update_jira_status` | Transition a ticket to a new Jira status |
|
|
336
|
-
| `resolve_target_status` | Resolve the post-PR target status for a project |
|
|
354
|
+
```
|
|
355
|
+
npx -y @bridge_gpt/mcp-server start-tickets [flags] KEY [KEY ...]
|
|
356
|
+
```
|
|
337
357
|
|
|
338
|
-
|
|
358
|
+
| Flag | Default | Meaning |
|
|
359
|
+
|---|---|---|
|
|
360
|
+
| `--agent claude\|cursor-agent` | `claude` | Agent command to launch in each worktree |
|
|
361
|
+
| `--terminal terminal\|iterm` | auto-detect via `$TERM_PROGRAM` | Override the macOS terminal app (honored on macOS only) |
|
|
362
|
+
| `--dry-run` | off | Print intended actions; create no worktrees, open no tabs (any OS) |
|
|
363
|
+
| `--branch KEY=BRANCH` | `feature/<KEY>` | Use a custom branch for that ticket (repeatable) |
|
|
364
|
+
| `--base-branch <BRANCH>` | `main` | Cut new worktrees from `<BRANCH>` and refresh `origin/<BRANCH>` instead of `main` |
|
|
365
|
+
| `--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. |
|
|
366
|
+
| `--max-parallel N` | `3` | Max worktrees created concurrently |
|
|
367
|
+
| `-h`, `--help` | — | Show usage |
|
|
339
368
|
|
|
340
|
-
|
|
341
|
-
|---|---|
|
|
342
|
-
| `get_project_standards` | Retrieve configured coding standards and architecture guidelines |
|
|
343
|
-
| `list_config_fields` | List all available configuration fields |
|
|
344
|
-
| `get_config_field` | Read the current value of a configuration field |
|
|
345
|
-
| `update_config_field` | Update a configuration field |
|
|
346
|
-
| `get_my_role` | Check the role and permissions for the current API key |
|
|
369
|
+
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's `'/implement-ticket <KEY>'` — `claude '/implement-ticket <KEY>'` by default, or `cursor-agent '/implement-ticket <KEY>'` with `--agent cursor-agent`. The `/implement-ticket <KEY>` prompt is unchanged for both agents. To launch Cursor Agent instead of Claude Code:
|
|
347
370
|
|
|
348
|
-
|
|
371
|
+
```
|
|
372
|
+
npx -y @bridge_gpt/mcp-server start-tickets --agent cursor-agent BAPI-248
|
|
373
|
+
```
|
|
349
374
|
|
|
350
|
-
|
|
351
|
-
|---|---|
|
|
352
|
-
| `parse_repository` | Queue a background job to parse and index the repository |
|
|
353
|
-
| `get_parse_status` | Check whether a repository parse is in progress |
|
|
354
|
-
| `regenerate_directory_map` | Regenerate the repository directory map |
|
|
355
|
-
| `create_pull_request` | Create a pull request on GitHub or Bitbucket |
|
|
356
|
-
| `resolve_ci_checks` | Discover and classify CI checks for a commit |
|
|
357
|
-
| `poll_ci_checks` | Poll the current status of CI checks |
|
|
375
|
+
**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.
|
|
358
376
|
|
|
359
|
-
|
|
377
|
+
- **macOS** — opens a Terminal.app or iTerm tab via `osascript`.
|
|
378
|
+
- **Windows** — creates worktrees with **`git-wt`** (Worktrunk's winget alias) and opens a tab via **Windows Terminal (`wt.exe new-tab`)**, falling back to **`Start-Process powershell.exe`** when Windows Terminal is absent. Requires **Git for Windows / Git Bash** (Worktrunk runs its `pre-start` / `post-start` hooks via Git Bash). The Worktrunk binary (`git-wt`) and the tab launcher (`wt.exe`) are resolved independently and never conflated.
|
|
379
|
+
- **Linux** — creates one detached **tmux** session per ticket (pane kept open after the agent exits); attach with `tmux attach -t <session>`. A missing `tmux` produces a clear, actionable error.
|
|
360
380
|
|
|
361
|
-
|
|
362
|
-
|---|---|
|
|
363
|
-
| `get_docs_dir` | Return the configured local docs directory path |
|
|
364
|
-
| `list_pipelines` | List available pipeline recipes with names and descriptions |
|
|
365
|
-
| `get_pipeline_recipe` | Retrieve a fully resolved pipeline recipe with variables substituted |
|
|
366
|
-
| `run_pipeline` | Execute a pipeline end-to-end; pauses on `agent_task` steps with a `needs_agent_task` envelope |
|
|
367
|
-
| `resume_pipeline` | Resume a paused run with the agent's result string |
|
|
368
|
-
| `list_pipeline_runs` | List recent pipeline runs (metadata only) — useful for recovering a `pipeline_run_id` after compaction |
|
|
381
|
+
Per-OS prerequisites: macOS `wt`, `git`, `osascript`; Windows `git-wt`, Git for Windows / Git Bash, Windows Terminal or PowerShell; Linux `wt`, `git`, `tmux`. Set `BAPI_WORKTRUNK_BIN` to override the Worktrunk executable name/path for nonstandard installs (`doctor` honors it too). The read-only `doctor` subcommand (below) additionally surfaces a missing `uv` — Worktrunk's `pre-start` hook runs `uv`, but live preflight does not check it — and the selected agent's command; run `doctor --agent cursor-agent` to also check `cursor-agent` (it prints `cursor-agent login` as an informational auth reminder).
|
|
369
382
|
|
|
370
|
-
###
|
|
383
|
+
### `doctor`
|
|
371
384
|
|
|
372
|
-
|
|
385
|
+
The package also ships a strictly **read-only** `doctor` subcommand that diagnoses the `start-tickets` prerequisites for the current OS without changing anything:
|
|
373
386
|
|
|
374
|
-
|
|
375
|
-
-
|
|
376
|
-
|
|
387
|
+
```
|
|
388
|
+
npx -y @bridge_gpt/mcp-server doctor [--agent <name>]
|
|
389
|
+
```
|
|
377
390
|
|
|
378
|
-
|
|
391
|
+
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.
|
|
379
392
|
|
|
380
393
|
## Custom Pipelines
|
|
381
394
|
|
|
@@ -418,6 +431,40 @@ See `.bridge/pipelines/README.md` for the full schema reference.
|
|
|
418
431
|
|
|
419
432
|
If a custom pipeline has the same key as a built-in pipeline, the custom version takes precedence (a warning is logged at startup).
|
|
420
433
|
|
|
434
|
+
## Smoke testing
|
|
435
|
+
|
|
436
|
+
The package ships a canonical, **opt-in** in-host smoke-test runbook at
|
|
437
|
+
`smoke-test/SMOKE-TEST.md`. An AI agent running inside your host (Claude Code,
|
|
438
|
+
Cursor, Codex, Windsurf, or VS Code/Copilot) executes it to verify that the MCP
|
|
439
|
+
server actually works end-to-end *inside that host* — it calls the real tools and
|
|
440
|
+
records a PASS/FAIL verdict for each one in a markdown report.
|
|
441
|
+
|
|
442
|
+
- `smoke-test/SMOKE-TEST.md` **ships with the npm package** and is the
|
|
443
|
+
**canonical** source of truth for the smoke test.
|
|
444
|
+
- The smoke test **adds no MCP tool** and **does not change the registered
|
|
445
|
+
tool surface** (the server still registers its existing 55 tools).
|
|
446
|
+
- It is **opt-in**: default `--init` **does not scaffold `/smoke-test-mcp`**, so
|
|
447
|
+
consumer command palettes are not polluted.
|
|
448
|
+
|
|
449
|
+
### Running it
|
|
450
|
+
|
|
451
|
+
You have two options:
|
|
452
|
+
|
|
453
|
+
1. **Copy the opt-in command manually.** Copy the packaged command stub into your
|
|
454
|
+
host's command directory, then invoke `/smoke-test-mcp`:
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
# Claude Code
|
|
458
|
+
cp node_modules/@bridge_gpt/mcp-server/smoke-test/smoke-test-mcp.md .claude/commands/smoke-test-mcp.md
|
|
459
|
+
# Cursor
|
|
460
|
+
cp node_modules/@bridge_gpt/mcp-server/smoke-test/smoke-test-mcp.md .cursor/commands/smoke-test-mcp.md
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
2. **Open the runbook directly.** Alternatively, open
|
|
464
|
+
`smoke-test/SMOKE-TEST.md` and ask the host agent to execute it.
|
|
465
|
+
|
|
466
|
+
Reports are written to `<BAPI_DOCS_DIR>/smoke-test/REPORT-<host>-<timestamp>.md`.
|
|
467
|
+
|
|
421
468
|
## Environment Variables
|
|
422
469
|
|
|
423
470
|
| Variable | Required | Default | Description |
|
|
@@ -430,3 +477,92 @@ If a custom pipeline has the same key as a built-in pipeline, the custom version
|
|
|
430
477
|
| `BAPI_PIPELINES_DIR` | No | `.bridge/pipelines` | Directory for user-defined custom pipeline JSON files |
|
|
431
478
|
| `BAPI_WORKTRUNK_BIN` | No | `wt` (`git-wt` on Windows) | Override the Worktrunk executable name/path used by `start-tickets` for nonstandard installs |
|
|
432
479
|
| `BAPI_TMUX_SESSION` | No | `bridge-start-tickets` | Override the tmux session-name prefix used by `start-tickets` on Linux |
|
|
480
|
+
|
|
481
|
+
## Worktree credentials and the `mcp-invoke` shim
|
|
482
|
+
|
|
483
|
+
When `start-tickets` creates a git worktree, it provisions a Bridge API MCP
|
|
484
|
+
registration into that worktree so Claude Code (`.mcp.json`) and Cursor
|
|
485
|
+
(`.cursor/mcp.json`) can reach the server immediately. These registrations are
|
|
486
|
+
**secret-free**: they contain no `env` block and no API key. Instead they point
|
|
487
|
+
at an internal subcommand of the published single CLI bin, `mcp-invoke`:
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
npx -y @bridge_gpt/mcp-server@<VERSION> mcp-invoke --target bapi --project-root <ABS_WORKTREE_PATH>
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
`mcp-invoke` is not a separate binary — it is a positional subcommand of
|
|
494
|
+
`bridge-api-mcp-server`. It resolves the repo identity from the absolute
|
|
495
|
+
`--project-root` (the committed `.bridge/config` manifest, falling back to the
|
|
496
|
+
git common dir), resolves credentials from the home-directory credential store,
|
|
497
|
+
and then spawns the real MCP server with that environment.
|
|
498
|
+
|
|
499
|
+
### Credential store
|
|
500
|
+
|
|
501
|
+
Credentials live outside the repository, keyed by `bapi:<repo_name>`:
|
|
502
|
+
|
|
503
|
+
```json
|
|
504
|
+
{
|
|
505
|
+
"bapi:<repo_name>": {
|
|
506
|
+
"BAPI_API_KEY": "..."
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
Resolution order:
|
|
512
|
+
|
|
513
|
+
1. `BAPI_API_KEY` in the parent environment (overrides the file entirely).
|
|
514
|
+
2. `$XDG_CONFIG_HOME/bridge/credentials.json`, else `~/.config/bridge/credentials.json`.
|
|
515
|
+
3. `~/.bridge/credentials.json` (only when the primary path is absent).
|
|
516
|
+
|
|
517
|
+
On POSIX systems, lock the file down so only you can read it:
|
|
518
|
+
|
|
519
|
+
```bash
|
|
520
|
+
chmod 600 ~/.config/bridge/credentials.json
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
`mcp-invoke` warns (but continues) if the file is group/world-readable, and it
|
|
524
|
+
never creates or initializes the credential file for you.
|
|
525
|
+
|
|
526
|
+
## Reference
|
|
527
|
+
|
|
528
|
+
The full surface, for when you need the complete enumeration. Day-to-day, use [Usage Documentation](#usage-documentation) instead — you don't call MCP tools directly; you ask your AI assistant to perform a task, or compose tools into a pipeline.
|
|
529
|
+
|
|
530
|
+
### MCP tools
|
|
531
|
+
|
|
532
|
+
The server registers **55 tools**. 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).
|
|
533
|
+
|
|
534
|
+
- **Connectivity & identity** — `ping`, `get_my_role`, `get_docs_dir`
|
|
535
|
+
- **Jira tickets** — `get_tickets`, `get_ticket`, `create_ticket`, `update_ticket_description`, `add_comment`, `get_comments`
|
|
536
|
+
- **Attachments** — `list_attachments`, `upload_attachment`, `download_attachment`
|
|
537
|
+
- **AI generation (request/get)** — `request_plan_generation`/`get_plan`, `request_architecture`/`get_architecture`, `request_clarifying_questions`/`get_clarifying_questions`, `request_ticket_critique`/`get_ticket_critique`, `request_ticket_review`, `request_reimplement_context`/`get_reimplement_context`, `request_brainstorm`/`get_brainstorm`, `request_deep_research`/`get_deep_research`
|
|
538
|
+
- **Other AI** — `second_opinion`, `generate_image`, `generate_decision_page`
|
|
539
|
+
- **Ticket lifecycle** — `track_ticket`, `update_ticket_state`, `get_ticket_state`
|
|
540
|
+
- **Jira status** — `get_jira_transitions`, `update_jira_status`, `resolve_target_status`
|
|
541
|
+
- **Repository & CI** — `parse_repository`, `get_parse_status`, `regenerate_directory_map`, `create_pull_request`, `resolve_ci_checks`, `poll_ci_checks`
|
|
542
|
+
- **Pipelines & automation** — `list_pipelines`, `get_pipeline_recipe`, `run_pipeline`, `resume_pipeline`, `list_pipeline_runs`, `delete_pipeline_run`, `run_full_automation`, `resume_full_automation`
|
|
543
|
+
- **Config & telemetry** — `get_project_standards`, `list_config_fields`, `get_config_field`, `update_config_field`, `record_tiered_section_metric`
|
|
544
|
+
|
|
545
|
+
### Bundled pipelines
|
|
546
|
+
|
|
547
|
+
Pipelines are declarative, multi-step workflows your AI agent executes step-by-step — each a JSON recipe chaining MCP tool calls and free-form agent tasks, with variable substitution, per-step error handling, and optional approval gates. You can also write your own (see [Custom Pipelines](#custom-pipelines)).
|
|
548
|
+
|
|
549
|
+
| Pipeline | Description | Invoke with |
|
|
550
|
+
|---|---|---|
|
|
551
|
+
| `implement-ticket` | Generate a plan, execute the implementation, commit, open a PR, and monitor CI | `/implement-ticket PROJ-123` |
|
|
552
|
+
| `review-ticket` | Two-round ticket quality review: clarifying questions and critique from multiple providers | `/review-ticket PROJ-123` |
|
|
553
|
+
| `idea-to-ticket` | Turn an idea into a Jira Task/Spike (or Epic + children) with research, dedup, and critique | `/idea-to-ticket "<idea>"` |
|
|
554
|
+
| `plan-epic` | Decompose an epic into sub-tasks with a structured exploration doc for each | `/plan-epic "<epic>"` |
|
|
555
|
+
| `full-automation` | Chain: idea → ticket(s) → review each → spawn worktrees to implement | `/full-automation "<idea>"` |
|
|
556
|
+
| `pr-ticket` | Commit changes and open a pull request | `/create-pr PROJ-123` |
|
|
557
|
+
| `check-ci-ticket` | Commit, open a PR, then monitor CI checks until they pass or fail | `/check-ci PROJ-123` |
|
|
558
|
+
| `learn-repository` | Analyze codebase architecture, testing, review, and documentation standards, then upload to Bridge | `/learn-repository` |
|
|
559
|
+
|
|
560
|
+
### Pipeline response envelope
|
|
561
|
+
|
|
562
|
+
`run_pipeline`, `resume_pipeline`, and `list_pipeline_runs` share a unified envelope keyed on `status`:
|
|
563
|
+
|
|
564
|
+
- `completed` — terminal success; `results` holds per-step output.
|
|
565
|
+
- `needs_agent_task` — the orchestrator paused. Read `instruction`, perform the task, then call `resume_pipeline` with `pipeline_run_id` and a string `agent_result`.
|
|
566
|
+
- `failed` — terminal failure. `error_code` is one of `VALIDATION`, `NOT_FOUND`, `EXPIRED`, `REPO_MISMATCH`, `TOOL_ERROR`.
|
|
567
|
+
|
|
568
|
+
Paused runs auto-expire after an idle TTL (default 24 hours; override with `ttl_seconds`). The TTL is reset on every state transition. List output is metadata-only — it never includes resolved recipes, params, instructions, results, or agent outputs.
|