@bridge_gpt/mcp-server 0.2.70 → 0.2.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/build/agent-launchers/claude-executor-adapter.js +10 -1
- package/build/agent-registry.js +5 -5
- package/build/agents.generated.js +11 -1
- package/build/bounded-wait.js +9 -1
- package/build/bridge-permissions.js +13 -5
- package/build/commands.generated.js +3 -3
- package/build/conductor/bridge-api-client.js +260 -2
- package/build/conductor/command-drift-production.js +7 -2
- package/build/conductor/doctor.js +9 -3
- package/build/conductor/epic-implementer-cli.js +4 -0
- package/build/conductor/gate-discovery.js +524 -10
- package/build/conductor/gate-settings-review.js +451 -0
- package/build/conductor/launch-need-probes.js +16 -11
- package/build/conductor/launch-plan.js +145 -0
- package/build/conductor/precheck-timings.js +14 -0
- package/build/conductor/preview-observations.js +10 -0
- package/build/conductor/readiness-sections.js +4 -1
- package/build/conductor/recovery-cli.js +59 -2
- package/build/conductor/recovery-operations.js +45 -2
- package/build/docs.generated.js +1 -1
- package/build/drive-epic.js +188 -45
- package/build/epic-ci-workflow-drift.js +71 -23
- package/build/epic-ci-workflow-install.js +83 -26
- package/build/epic-ci-workflow-v1.js +132 -0
- package/build/epic-ci-workflow.js +174 -13
- package/build/epic-implementer-bin.js +18 -18
- package/build/executor/ci-rerun-job.js +220 -14
- package/build/executor/env.js +207 -3
- package/build/executor/gate-qualification-job.js +20 -5
- package/build/executor/job-runner.js +112 -11
- package/build/executor/likely-tests.js +6 -1
- package/build/executor/preflight.js +5 -0
- package/build/executor/process-containment.js +18 -0
- package/build/executor/prompt-spec.js +72 -13
- package/build/executor/reconcile-overlap-job.js +6 -1
- package/build/executor/worker-command.js +136 -1
- package/build/executor/worker-database.js +30 -11
- package/build/executor/worker-resources.js +12 -1
- package/build/executor/worker-verification-guidance.js +29 -0
- package/build/index.js +221 -165
- package/build/install-bridge-conductor-gate.js +195 -14
- package/build/install-bridge-conductor-setup.js +20 -6
- package/build/install-bridge-conductor.js +355 -37
- package/build/install-bridge.js +1 -1
- package/build/merge-workflow-install.js +20 -0
- package/build/pipelines.generated.js +2 -2
- package/build/plan-execution-ledger.js +23 -8
- package/build/plane/plane-freshness.js +6 -2
- package/build/plane/preflight.js +19 -0
- package/build/printed-remedy-commands.js +8 -1
- package/build/readme.generated.js +1 -1
- package/build/repository-toolchains.js +581 -0
- package/build/setup-epic.js +24 -7
- package/build/test-command-detection.js +58 -21
- package/build/ticket-delivery-artifacts.js +7 -0
- package/build/ticket-delivery-enrollment.js +67 -4
- package/build/version.generated.js +3 -3
- package/docs/EPIC-IMPLEMENTER.md +38 -0
- package/docs/epic-implementer/getting-started.md +58 -2
- package/package.json +2 -2
|
@@ -1379,6 +1379,7 @@ export function workerDatabaseReadinessChecks(section) {
|
|
|
1379
1379
|
.filter((row) => row.state !== "healthy")
|
|
1380
1380
|
.map((row) => ({
|
|
1381
1381
|
id: row.id,
|
|
1382
|
+
duration_ms: row.duration_ms,
|
|
1382
1383
|
source: "conductor",
|
|
1383
1384
|
label: row.label,
|
|
1384
1385
|
status: "warn",
|
|
@@ -1510,7 +1511,9 @@ export function buildSelfHostedRunnerLaunchRow(fact) {
|
|
|
1510
1511
|
case "absent":
|
|
1511
1512
|
return buildLaunchNeedRow("self_hosted_runner", "absent", `absent — every self-hosted label set behind the required checks (${fact.label_sets}) has an online runner`);
|
|
1512
1513
|
case "not_applicable":
|
|
1513
|
-
return buildLaunchNeedRow("self_hosted_runner", "not_applicable",
|
|
1514
|
+
return { ...buildLaunchNeedRow("self_hosted_runner", "not_applicable", fact.reason === "no_github_actions_workflows"
|
|
1515
|
+
? "not applicable — no_github_actions_workflows"
|
|
1516
|
+
: "not applicable — no required check runs on a self-hosted runner"), ...(fact.reason ? { reason: fact.reason } : {}) };
|
|
1514
1517
|
default:
|
|
1515
1518
|
return buildLaunchNeedRow("self_hosted_runner", "unverifiable", `unverifiable — ${RUNNER_UNVERIFIABLE_DETAIL[fact.reason] ?? RUNNER_UNVERIFIABLE_DETAIL.probe_failed}`);
|
|
1516
1519
|
}
|
|
@@ -125,8 +125,28 @@ function parseRunRecoveryArgs(argv) {
|
|
|
125
125
|
}
|
|
126
126
|
return { epicRunId: epicRunId.trim(), json: bools.has("--json"), help: false };
|
|
127
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* BAPI-1537 — the operation-id shape the server accepts (`api/models/epic_run.py`
|
|
130
|
+
* `EXTERNAL_REPAIR_OPERATION_ID_PATTERN`): 1-128 characters of `[A-Za-z0-9._:-]`,
|
|
131
|
+
* case-sensitive. Checked here so a malformed id never reaches the network.
|
|
132
|
+
*/
|
|
133
|
+
const EXTERNAL_REPAIR_OPERATION_ID_RE = /^[A-Za-z0-9._:-]{1,128}$/;
|
|
134
|
+
function parseExternalRepairOperationId(values) {
|
|
135
|
+
if (!values.has("--external-repair"))
|
|
136
|
+
return undefined;
|
|
137
|
+
const raw = values.get("--external-repair") ?? "";
|
|
138
|
+
// A following flag is not a value: `--external-repair --json` names no id.
|
|
139
|
+
if (raw.startsWith("--")) {
|
|
140
|
+
throw new ConductorValidationError('Flag "--external-repair" requires a value.');
|
|
141
|
+
}
|
|
142
|
+
const id = raw.trim();
|
|
143
|
+
if (!EXTERNAL_REPAIR_OPERATION_ID_RE.test(id)) {
|
|
144
|
+
throw new ConductorValidationError('"--external-repair" must be 1-128 characters of letters, digits, ".", "_", ":" or "-".');
|
|
145
|
+
}
|
|
146
|
+
return id;
|
|
147
|
+
}
|
|
128
148
|
function parseTicketRecoveryArgs(argv) {
|
|
129
|
-
const { values, bools } = tokenizeRecoveryFlags(argv, new Set([...TICKET_VALUE_FLAGS, "--reason", "--cleanup-resolution"]), RECOVERY_BOOL_FLAGS);
|
|
149
|
+
const { values, bools } = tokenizeRecoveryFlags(argv, new Set([...TICKET_VALUE_FLAGS, "--reason", "--cleanup-resolution", "--external-repair"]), RECOVERY_BOOL_FLAGS);
|
|
130
150
|
if (bools.has("--help")) {
|
|
131
151
|
return { epicRunId: "", ticketKey: "", json: bools.has("--json"), help: true };
|
|
132
152
|
}
|
|
@@ -138,6 +158,7 @@ function parseTicketRecoveryArgs(argv) {
|
|
|
138
158
|
if (ticketKey === undefined || ticketKey.trim().length === 0) {
|
|
139
159
|
throw new ConductorValidationError('Flag "--ticket-key" is required and must be non-empty.');
|
|
140
160
|
}
|
|
161
|
+
const externalRepairOperationId = parseExternalRepairOperationId(values);
|
|
141
162
|
return {
|
|
142
163
|
epicRunId: epicRunId.trim(),
|
|
143
164
|
ticketKey: ticketKey.trim(),
|
|
@@ -145,6 +166,7 @@ function parseTicketRecoveryArgs(argv) {
|
|
|
145
166
|
...(values.get("--cleanup-resolution") ? {
|
|
146
167
|
cleanupResolution: values.get("--cleanup-resolution"),
|
|
147
168
|
} : {}),
|
|
169
|
+
...(externalRepairOperationId !== undefined ? { externalRepairOperationId } : {}),
|
|
148
170
|
json: bools.has("--json"),
|
|
149
171
|
help: false,
|
|
150
172
|
};
|
|
@@ -278,7 +300,7 @@ const UNPARK_USAGE = [
|
|
|
278
300
|
"its own if the ticket changes concurrently — never accepts a version counter.",
|
|
279
301
|
].join("\n");
|
|
280
302
|
const ADOPT_CURRENT_HEAD_USAGE = [
|
|
281
|
-
"Usage: epic-implementer adopt-current-head-and-unpark --epic-run-id <id> --ticket-key <key> [--json]",
|
|
303
|
+
"Usage: epic-implementer adopt-current-head-and-unpark --epic-run-id <id> --ticket-key <key> [--external-repair <operation-id>] [--json]",
|
|
282
304
|
"",
|
|
283
305
|
"Recover a ticket parked because a human/external push drifted the PR head",
|
|
284
306
|
"off its anchored commit: adopt the CURRENT PR head and unpark in one step.",
|
|
@@ -291,6 +313,15 @@ const ADOPT_CURRENT_HEAD_USAGE = [
|
|
|
291
313
|
"resumes the ticket at CI. No worker is started and nothing is marked passed —",
|
|
292
314
|
"CI and review must pass again on the accepted head. A repeat of the same",
|
|
293
315
|
"request reports the recorded result instead of adopting twice.",
|
|
316
|
+
"",
|
|
317
|
+
"--external-repair <operation-id> adopts fast-forward repair commits pushed to",
|
|
318
|
+
"the ticket's own branch while no engine job ran (for example a checkpoint-only",
|
|
319
|
+
"park with no PR). The server proves the repair is safe — no live job, fast-",
|
|
320
|
+
"forward ancestry, the right PR base and head, and a head no other ticket owns —",
|
|
321
|
+
"then rebinds the head and unparks. The ticket still passes CI, review, and the",
|
|
322
|
+
"engine merge at that head. The id is a correlation label (1-128 characters of",
|
|
323
|
+
"letters, digits, '.', '_', ':' or '-'); the same id replays its recorded result.",
|
|
324
|
+
"Only the run's supervisor/driver uses it. Not accepted by unpark.",
|
|
294
325
|
].join("\n");
|
|
295
326
|
/** BAPI-1310 (E1): the fixed allowance sentence the adoption result carries. */
|
|
296
327
|
const REVIEW_HEAD_ALLOWANCE_LINE = "Allowance effect: repair allowances preserved; acceptance does not grant another repair.";
|
|
@@ -312,12 +343,32 @@ function renderReviewHeadRecovery(ticketKey, epicRunId, recovery) {
|
|
|
312
343
|
console.log(` WARNING: ${REVIEW_HEAD_HELD_WARNING}.`);
|
|
313
344
|
}
|
|
314
345
|
}
|
|
346
|
+
/** BAPI-1537: render an external-repair receipt (committed or replayed) to stdout. */
|
|
347
|
+
function renderExternalRepair(ticketKey, epicRunId, receipt) {
|
|
348
|
+
const outcome = receipt.result === "replayed"
|
|
349
|
+
? "replayed — this operation already committed; nothing changed now"
|
|
350
|
+
: "committed";
|
|
351
|
+
console.log(`Ticket ${ticketKey} (run ${epicRunId}): external repair ${receipt.operation_id} adopted — ${outcome}.`);
|
|
352
|
+
console.log(` Previous expected head: ${receipt.previous_expected_head_sha ?? "unbound"}`);
|
|
353
|
+
console.log(` Comparison base: ${receipt.comparison_base_sha}`);
|
|
354
|
+
console.log(` Adopted head: ${receipt.adopted_head_sha}`);
|
|
355
|
+
console.log(` Restored to: ${receipt.restored_status}`);
|
|
356
|
+
console.log(` Current gate: ${receipt.current_gate ?? "unavailable"}`);
|
|
357
|
+
console.log(" The ticket must still pass attach, CI, review, and the engine merge at the adopted head; nothing was marked passed.");
|
|
358
|
+
if (receipt.held_by_run_control) {
|
|
359
|
+
console.log(" WARNING: Head adopted; run remains held by run control.");
|
|
360
|
+
}
|
|
361
|
+
}
|
|
315
362
|
export function renderTicketRecoveryResult(result, json) {
|
|
316
363
|
if (json) {
|
|
317
364
|
console.log(JSON.stringify(result));
|
|
318
365
|
return result.ok ? 0 : 1;
|
|
319
366
|
}
|
|
320
367
|
if (result.ok) {
|
|
368
|
+
if (result.externalRepair) {
|
|
369
|
+
renderExternalRepair(result.ticketKey, result.epicRunId, result.externalRepair);
|
|
370
|
+
return 0;
|
|
371
|
+
}
|
|
321
372
|
if (result.reviewHeadRecovery) {
|
|
322
373
|
renderReviewHeadRecovery(result.ticketKey, result.epicRunId, result.reviewHeadRecovery);
|
|
323
374
|
return 0;
|
|
@@ -345,6 +396,9 @@ export function renderTicketRecoveryResult(result, json) {
|
|
|
345
396
|
export async function runUnparkCommand(argv) {
|
|
346
397
|
try {
|
|
347
398
|
const parsed = parseTicketRecoveryArgs(argv);
|
|
399
|
+
if (parsed.externalRepairOperationId !== undefined) {
|
|
400
|
+
throw new ConductorValidationError("--external-repair applies only to adopt-current-head-and-unpark.");
|
|
401
|
+
}
|
|
348
402
|
if (parsed.cleanupResolution !== undefined &&
|
|
349
403
|
!["confirmed", "risk_accepted"].includes(parsed.cleanupResolution)) {
|
|
350
404
|
throw new ConductorValidationError("--cleanup-resolution must be confirmed or risk_accepted.");
|
|
@@ -390,6 +444,9 @@ export async function runAdoptCurrentHeadAndUnparkCommand(argv) {
|
|
|
390
444
|
const result = await adoptCurrentHeadAndUnparkWithRetry(access, {
|
|
391
445
|
epicRunId: parsed.epicRunId,
|
|
392
446
|
ticketKey: parsed.ticketKey,
|
|
447
|
+
...(parsed.externalRepairOperationId !== undefined
|
|
448
|
+
? { externalRepairOperationId: parsed.externalRepairOperationId }
|
|
449
|
+
: {}),
|
|
393
450
|
});
|
|
394
451
|
return renderTicketRecoveryResult(result, parsed.json);
|
|
395
452
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* callers: `recovery-cli.ts` and `plane/shutdown.ts`.
|
|
19
19
|
*/
|
|
20
20
|
import { randomUUID } from "crypto";
|
|
21
|
-
import { adoptCurrentHeadAndUnparkTicket, completeMergeChild, ConductorBridgeApiError, dispatchRemediation, fetchEpicRunState, mergeChild, patchPolicy, RERUN_CI_ROUTE_UNAVAILABLE_CODE, RERUN_CI_ROUTE_UNAVAILABLE_MESSAGE, rerunCi, resolveHandoff, resumeRun, safeDiagnosticMessage, scopeCatchUp, scopeReparse, stopEpicRun, unparkEpicTicket, updateEpicRunStatus, fetchChildContinuationStatus, postContinueParkedChild, postGrantContinuation, resumeCiTicket, regeneratePlanTicket, REVIEW_HEAD_REFUSAL_CODES, } from "./bridge-api-client.js";
|
|
21
|
+
import { adoptCurrentHeadAndUnparkTicket, completeMergeChild, ConductorBridgeApiError, dispatchRemediation, fetchEpicRunState, mergeChild, patchPolicy, RERUN_CI_ROUTE_UNAVAILABLE_CODE, RERUN_CI_ROUTE_UNAVAILABLE_MESSAGE, rerunCi, resolveHandoff, resumeRun, safeDiagnosticMessage, scopeCatchUp, scopeReparse, stopEpicRun, unparkEpicTicket, updateEpicRunStatus, fetchChildContinuationStatus, postContinueParkedChild, postGrantContinuation, resumeCiTicket, regeneratePlanTicket, REVIEW_HEAD_REFUSAL_CODES, EXTERNAL_REPAIR_REFUSAL_CODES, EXTERNAL_REPAIR_RETRYABLE_CODES, } from "./bridge-api-client.js";
|
|
22
22
|
import { clearGuidedReference, guardForBinding, GUIDED_PAYLOAD_CONFLICT_MESSAGE, GUIDED_REFERENCE_STORE_FAILED_MESSAGE, guidedPayloadDigest, prepareGuidedRequest, } from "./guided-repair.js";
|
|
23
23
|
import { DEFAULT_GATE_NAME } from "./git-ci-types.js";
|
|
24
24
|
import { bindingsDriverContextSha256, CONTINUATION_CI_WAITING_REASONS, canonicalSha256, clearContinuationReference, clearRecoveryReferenceFile, computeContinuationFingerprint, driverContextSha256, readRecoveryReferenceFile, writeRecoveryReferenceFile, isFullSha, newContinuationRequestId, readContinuationReference, writeContinuationReference, } from "./epic-child-continuation.js";
|
|
@@ -181,10 +181,13 @@ async function ticketRecoveryWithRetry(access, options, mutate) {
|
|
|
181
181
|
idempotencyKey,
|
|
182
182
|
reason: options.reason,
|
|
183
183
|
cleanupResolution: options.cleanupResolution,
|
|
184
|
+
...(options.externalRepairOperationId !== undefined
|
|
185
|
+
? { externalRepairOperationId: options.externalRepairOperationId }
|
|
186
|
+
: {}),
|
|
184
187
|
});
|
|
185
188
|
}
|
|
186
189
|
catch (err) {
|
|
187
|
-
const refusal = reviewHeadRefusal(err);
|
|
190
|
+
const refusal = reviewHeadRefusal(err) ?? externalRepairRefusal(err);
|
|
188
191
|
if (refusal !== null) {
|
|
189
192
|
return {
|
|
190
193
|
ok: false,
|
|
@@ -193,6 +196,7 @@ async function ticketRecoveryWithRetry(access, options, mutate) {
|
|
|
193
196
|
ticketKey: options.ticketKey,
|
|
194
197
|
errorCode: refusal.errorCode,
|
|
195
198
|
message: refusal.message,
|
|
199
|
+
...(refusal.retryable !== undefined ? { retryable: refusal.retryable } : {}),
|
|
196
200
|
};
|
|
197
201
|
}
|
|
198
202
|
return {
|
|
@@ -205,6 +209,7 @@ async function ticketRecoveryWithRetry(access, options, mutate) {
|
|
|
205
209
|
}
|
|
206
210
|
if (result.ok) {
|
|
207
211
|
const recovery = result.ticket_status.review_head_recovery;
|
|
212
|
+
const external = result.ticket_status.external_repair;
|
|
208
213
|
return {
|
|
209
214
|
ok: true,
|
|
210
215
|
kind: "unparked",
|
|
@@ -212,6 +217,7 @@ async function ticketRecoveryWithRetry(access, options, mutate) {
|
|
|
212
217
|
ticketKey: options.ticketKey,
|
|
213
218
|
status: result.ticket_status.status,
|
|
214
219
|
...(recovery ? { reviewHeadRecovery: recovery } : {}),
|
|
220
|
+
...(external ? { externalRepair: external } : {}),
|
|
215
221
|
};
|
|
216
222
|
}
|
|
217
223
|
// `result.kind === "cas-conflict"`: a concurrent write moved the ticket's
|
|
@@ -250,6 +256,43 @@ function reviewHeadRefusal(err) {
|
|
|
250
256
|
return null;
|
|
251
257
|
return { errorCode: code, message: REVIEW_HEAD_REFUSAL_MESSAGES[code] ?? "refused" };
|
|
252
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* BAPI-1537: fixed operator sentences for the external-repair refusal codes,
|
|
261
|
+
* each naming the exit from the ticket's refusal table. Chosen by code so no
|
|
262
|
+
* server or provider text reaches the terminal.
|
|
263
|
+
*/
|
|
264
|
+
const EXTERNAL_REPAIR_REFUSAL_MESSAGES = {
|
|
265
|
+
EXTERNAL_REPAIR_RUN_NOT_RECOVERABLE: "the run is paused, stopped, quarantined, or not active; resolve the run control " +
|
|
266
|
+
"(for example resume-run), then retry with the same operation id",
|
|
267
|
+
EXTERNAL_REPAIR_NOT_PARKED: "the ticket is not parked at exactly one gate, so the engine owns it; re-read explain-run",
|
|
268
|
+
EXTERNAL_REPAIR_LIVE_WORK: "an executor job for this ticket is queued or running; wait for it to end, re-read, " +
|
|
269
|
+
"and re-diagnose",
|
|
270
|
+
EXTERNAL_REPAIR_BRANCH_MISMATCH: "the repair is not on the ticket's own feature branch; push it to that branch",
|
|
271
|
+
EXTERNAL_REPAIR_ANCESTRY: "the branch head equals or does not descend from the ticket's recorded head; replay " +
|
|
272
|
+
"the commits fast-forward onto that head (never force), or end the intervention",
|
|
273
|
+
EXTERNAL_REPAIR_PR_MISMATCH: "the open pull request is cross-repository or has the wrong base or head; fix its " +
|
|
274
|
+
"base or head, or close the stray pull request, then retry",
|
|
275
|
+
EXTERNAL_REPAIR_PR_AMBIGUOUS: "more than one pull request is open from the ticket's branch; close the extras, then retry",
|
|
276
|
+
EXTERNAL_REPAIR_HEAD_CLAIMED: "another ticket or run already has this head bound; this is outside the sandbox, so " +
|
|
277
|
+
"apply the stop list",
|
|
278
|
+
EXTERNAL_REPAIR_OPERATION_CONFLICT: "this operation id already adopted a different head; use a new operation id",
|
|
279
|
+
EXTERNAL_REPAIR_UNAVAILABLE: "a provider or ancestry read was unreadable; retry with the same operation id",
|
|
280
|
+
EXTERNAL_REPAIR_ALREADY_INTEGRATED: "the repair head is already in the epic branch, so the parked-external-merge fold owns " +
|
|
281
|
+
"recovery; re-read explain-run",
|
|
282
|
+
};
|
|
283
|
+
/** Map a thrown client error to an external-repair refusal, or `null` for anything else. */
|
|
284
|
+
function externalRepairRefusal(err) {
|
|
285
|
+
if (!(err instanceof ConductorBridgeApiError) || err.status !== 409)
|
|
286
|
+
return null;
|
|
287
|
+
const code = err.errorCode;
|
|
288
|
+
if (typeof code !== "string" || !EXTERNAL_REPAIR_REFUSAL_CODES.includes(code))
|
|
289
|
+
return null;
|
|
290
|
+
return {
|
|
291
|
+
errorCode: code,
|
|
292
|
+
message: EXTERNAL_REPAIR_REFUSAL_MESSAGES[code] ?? "refused",
|
|
293
|
+
retryable: EXTERNAL_REPAIR_RETRYABLE_CODES.includes(code),
|
|
294
|
+
};
|
|
295
|
+
}
|
|
253
296
|
/**
|
|
254
297
|
* Unpark a parked `needs_human` ticket, with a bounded authoritative-reread
|
|
255
298
|
* retry on a concurrent `row_version` bump.
|
package/build/docs.generated.js
CHANGED
|
@@ -10,7 +10,7 @@ export const DOCS = {
|
|
|
10
10
|
".bridge/procedures/comp-analysis-procedure.md": "Perceive any attached/referenced design comp with your OWN vision and map it to the existing codebase BEFORE the `jira-ticket-writer` drafts. This is the pre-writer perception step: the orchestrating recipe agent (already a frontier vision model) opens the comp, classifies it against the shared fidelity taxonomy, researches the code, and writes a structured comp→codebase map the writer consumes. The writer stays text-only and never opens images — it only reads the map you produce here.\n\nThis step is gated and backend-safe. It runs the perception with the ORCHESTRATING agent's own vision — a local image via the Read tool, or an already-attached Jira comp fetched as raw bytes via the BAPI-562 binary-safe `attachment` download (operation `download`) into a worktree `file_path`. It does NOT call `describe_image()`, does NOT depend on `src/python/llms/vision.py`, and does NOT require the `CHEAP_MODEL` vision path or any vision-model upgrade or procurement. The heavy visual reasoning is done for free by the agent that already runs the recipe.\n\n## Inputs\n\n- Run manifest: `{docs_dir}/idea-to-ticket/{slug}-{run_id}/run-manifest.json` (source of truth for `idea`, `scope`, `readiness`). Read whichever prior artifacts exist under `{docs_dir}/idea-to-ticket/{slug}-{run_id}/` (research pack, resolved uncertainties, goals-and-nfrs, standards checklist) and proceed without the ones that do not.\n- Output artifact (this step writes it): `{docs_dir}/idea-to-ticket/{slug}-{run_id}/comp-analysis.json` — the structured comp→codebase map the drafting step reads.\n\n## Callers\n\nThe steps below are the **recipe path** and are unchanged for the `idea-to-ticket` recipe.\n\n**Define-tickets path.** When `/define-tickets --auto` runs this procedure, the command names an exploration-adjacent artifact directory. Read the exploration document and any materials the task references instead of run-manifest artifacts, and write `comp-analysis.json` in that named directory. Assume no run manifest and no label. Apply the same gate, classification, and mapping rules. If the analysis is degraded for any reason, write `applicable: false`, a degradation `reason`, and `warnings` that identify the material needing manual review. When no qualifying comp exists, write the clean not-applicable artifact with no degradation warning. Degraded analysis never blocks the command.\n\n## Instructions\n\n1. **Gate first — evaluate only text/material metadata, never open an image yet.** Proceed to any image work ONLY when BOTH conditions hold:\n - a design comp is **referenced or attached** (a local image path in the idea/materials, or an already-attached Jira comp with an `attachment_id`), AND\n - the requested work is **design/UI work** (a frontend/fullstack change with a visual surface).\n\n This gate is deliberately conservative. A **backend-only** request, a **no-comp** request, or a **non-design** request fails the gate.\n\n2. **Not-applicable branch (gate fails) — short-circuit immediately.** When either gate condition is not met, write `comp-analysis.json` with `applicable: false`, a short `reason`, and the `gate` evidence fields, then **return immediately** — do NOT open any image, do NOT download any attachment, do NOT inject any fidelity/comp/visual language, and add no measurable latency. A backend-only or no-comp authoring input must be byte-for-byte unaffected downstream. Concretely, the not-applicable artifact is:\n\n ```json\n { \"applicable\": false, \"reason\": \"backend-only work; no design comp referenced\", \"gate\": { \"comp_referenced\": false, \"design_ui_work\": false }, \"warnings\": [] }\n ```\n\n3. **Applicable branch — obtain and OPEN the comp with your own vision.** When the gate passes:\n - **Local image path** → open it directly with the Read tool.\n - **Already-attached Jira comp** → fetch it as raw bytes using the BAPI-562 binary-safe `attachment` capability with operation `download`, passing the comp's `attachment_id` and a worktree `file_path`; the download saves the PNG/JPEG bytes to that `file_path` inside the project root, then open the saved file with the Read tool.\n - You are the orchestrating vision model — reason over the actual pixels yourself. Do NOT call `describe_image()`, do NOT use `src/python/llms/vision.py` / `CHEAP_MODEL`, and do NOT delegate perception to the text-only `jira-ticket-writer` subagent.\n\n4. **Degraded paths are skip-clean and warn-not-halt.** If the comp is missing, unreadable, an unsupported format, external-only (an `http(s)` URL you cannot fetch into a worktree `file_path`), or turns out not to be a usable design comp, write a valid `comp-analysis.json` with `applicable: false`, a `reason`, and a populated `warnings` array describing what failed, then return. A missing, unreadable, or non-comp image NEVER blocks downstream drafting and NEVER requires further image work after the failure.\n\n5. **Classify the opened comp using the shared fidelity taxonomy (do not fork it).** Using your own vision, classify the comp as exactly one of these four classes — the same labels the downstream final plan reviewer uses (`src/python/llms/agents/planner_agent/final_plan_review_agent.py`, `_get_runtime_verification_instructions`), so authoring, planning, and implementation all agree:\n - `full comp`\n - `wireframe`\n - `annotated-screenshot-of-existing-UI`\n - `unknown`\n\n Record `fidelity_classification` with a `class` (one of the four), a `confidence` value, and a short `reasoning` string.\n\n6. **Apply class-appropriate mapping depth — no over-specification.** Match the per-class rules exactly:\n - **full comp** (confident) → map exact existing components, Jinja2 templates, SCSS/CSS tokens, and routes; strict/exact component + token depth is used ONLY here.\n - **wireframe** → map layout and structure only (regions, order, rough proportions, responsive behavior); defer color, type, spacing, and component polish to the repo design system, NOT to the wireframe.\n - **annotated-screenshot-of-existing-UI** → map ONLY the delta against the current UI; preserve everything outside the annotated region and do not reproduce the screenshot wholesale.\n - **unknown / low confidence** → fall back to the design-system floor rather than mapping pixels.\n\n **Hard rule:** strict/exact mapping depth is enabled ONLY for a confidently-classified full comp. Fail toward the design system, never toward reproducing an ambiguous image.\n\n7. **Research the codebase and map each region/element to concrete existing code.** Inspect the working tree (search, grep, file reads) for the existing UI implementation surfaces: reusable components, Jinja2 templates, plain CSS/SCSS tokens and design-system styles, routes, and reusable frontend patterns. Only cite files you actually inspected — do not invent file paths, component names, tokens, or routes. For each region/element of the comp, produce a `mappings[]` entry containing:\n - `region` — the comp region or element name.\n - `visual_description` — a short description of what it looks like.\n - `components` — mapped existing component file(s).\n - `templates` — mapped existing Jinja2 template(s).\n - `tokens` — style/token references (SCSS/CSS tokens or design-system styles).\n - `routes` — route reference(s) where the element lives or should wire.\n - `confidence` — confidence for this mapping.\n - `implementation_guidance` — concrete guidance (e.g. \"reuse component X\", \"extend template Y\", \"use token Z\", \"wire route R\").\n\n8. **Write the structured map to a stable schema.** Write `comp-analysis.json` at `{docs_dir}/idea-to-ticket/{slug}-{run_id}/comp-analysis.json` with these fields:\n - `applicable` — boolean; `true` only after a comp was both detected AND successfully opened.\n - `reason` — short string explaining the applicability decision.\n - `gate` — the two-condition gate evidence (`comp_referenced`, `design_ui_work`).\n - `comp` — provenance of the opened comp (source kind, path or `attachment_id`, filename, MIME type when known).\n - `fidelity_classification` — `{ class, confidence, reasoning }`, present only when `applicable` is true.\n - `mappings` — array of the per-region entries defined in step 7 (present only when `applicable` is true).\n - `design_system_floor` — the design-system fallback guidance to use for wireframe/unknown/low-confidence regions.\n - `warnings` — array of degraded-path notes (may be empty).\n - `writer_guidance` — instructions for the downstream drafting step: when `applicable` is `true`, Requirements must cite the mapped components/templates/tokens/routes as concrete implementation guidance; when `applicable` is `false` or the map is missing, the writer must ignore this artifact and mention no comp analysis, design comp, or visual-fidelity language unless the original request independently requires it.\n\n9. **Never over-write.** Write the artifact exactly once at the path above. Downstream steps (`draft-and-critique.md`) read it; do not move it.\n\n## Return\n\nConfirm the path written (`{docs_dir}/idea-to-ticket/{slug}-{run_id}/comp-analysis.json`), whether the analysis was `applicable`, the fidelity `class` when applicable, and any `warnings`.\n",
|
|
11
11
|
".bridge/procedures/gather-and-attach-materials-procedure.md": "Post-create materials-completeness step. Gather the phase-eligible local materials a freshly-created ticket references and attach them via `attachment` (operations: `\"list\"`, `\"upload\"`, `\"delete\"`), while recording everything that is record-only. This is the POST-CREATE half of the upload-time materials-completeness pass (BAPI-423, phase-tagged since BAPI-643); the PRE-CREATE half — inventorying and writing the `## Materials & Access` section into the draft — already ran in the `jira-ticket-writer` agent.\n\n## Inputs\n\n- `{ticket_number}` — the real Jira key of the already-created ticket (e.g. `BAPI-423`). Attachment is a POST-CREATE step; never attempt to attach before the key exists.\n- `{draft_file_path}` — path to the draft markdown that carries the trailing `## Materials & Access` section.\n- `{auto_approve_external}` — the unattended-vs-interactive signal (named for consistency with `upload-and-track.md`). **Polarity is counter-intuitive: `\"true\"` means UNATTENDED, which is the MORE restrictive mode here** — skip all prompts AND keep external/auth-gated materials record-only (never auto-attach them). It does NOT grant permission to attach external materials. Any other value (including `\"false\"`, missing, or empty) means an interactive invocation that MAY prompt for external/auth-gated materials. Invocations from `write-ticket`, `idea-to-pr`, and `/define-tickets` (attended or `--auto`) are always unattended (`\"true\"`) for this step, so it never prompts there.\n\n## Instructions\n\n> **Orchestrator-directed step.** This agent task is authorized to call `attachment` (operations: `list`, `upload`, `delete`) and `update_ticket_description` and `config_field` as directed below.\n\nBefore selecting tool behavior, call `config_field` once with `operation: \"get\"` and `field_name: \"ticket_backend_mode\"`. Only a positively recognized `local` selects the local branch; absent, null, unreadable, and unrecognized results retain Jira behavior.\n\n**Local branch:** read the draft's `## Materials & Access` record and retain every phase-tagged material, its sanitized path/reference, and its access limitation in the ticket description. Use `update_ticket_description` only if a record needs preserving or updating. Skip every attachment `list`, `upload`, and `delete` operation, including deduplication and supersession. Report the retained materials under **Local-only records**. Distinguish intentional local records from missing-access warnings; warn the plan owner about each access limitation that affects implementation. Redact secrets using step 9. Return after recording this outcome.\n\n**Unsupported-mode backstop:** only a terminal HTTP `409` with error `UNSUPPORTED_IN_LOCAL_MODE` from an attachment operation selects the same local-only reporting outcome. Stop subsequent attachment operations and preserve the record as above. All other errors retain step 10's existing handling.\n\n1. **Read the record.** Read `{draft_file_path}` and parse its trailing `## Materials & Access` section. Collect the inventoried items grouped under *Planning Assets*, *Downloadable Assets*, *Planning & Downloadable Assets* (each phase-eligible; present only when a material of that phase exists), *External/Auth-Gated Links*, and *Binary/Image Materials (Record-Only)*. If there is no `## Materials & Access` section, there is nothing to gather — return a no-op success.\n\n2. **Canonical phase-token mapping.** Every phase-eligible bullet maps to exactly one filename token:\n - *Planning Assets* → `planasset`\n - *Downloadable Assets* → `implasset`\n - *Planning & Downloadable Assets* → `bothasset`\n\n *External/Auth-Gated Links* and *Binary/Image Materials (Record-Only)* are **never** phase-tagged and are behaviorally unchanged by this step — they stay record-only, exactly as before.\n\n3. **Source classification (scheme-based, no network probe).** Honor the classification already recorded in the draft:\n - **Planning Assets / Downloadable Assets / Planning & Downloadable Assets** — a local filesystem path that is **NOT tracked in version control** is a **low-risk** material eligible for auto-attach — proceed to step 5. The pre-create inventory already excluded version-controlled files (source code and in-repo docs are already available in the repository and are never attached — they are cited inline as *Relevant code*). As a safety net, this step must **never attach a file that is available in version control**: if any phase-tagged item is a code file or otherwise clearly version-controlled, skip it and treat it as record-only. A bullet under *Planning & Downloadable Assets* recorded via an existing `attachment_id` (not a local file — e.g. a design comp already attached on this or another ticket) is **not** re-uploaded by this step; leave it recorded with its `attachment_id`/path so a later implementation agent can download it into its worktree via the Jira attachment download capability.\n - **External/Auth-Gated Links** (every `http(s)` URI, even if explicitly linked) are **record-only** on unattended paths. If `{auto_approve_external}` is `\"true\"` (or the invocation is from `write-ticket` / `idea-to-pr`), leave them record-only and never auto-attach. (Mind the polarity: `auto_approve_external = \"true\"` means we are in unattended mode, so external materials must stay record-only — `\"true\"` is NOT permission to attach them.) Only an explicitly interactive invocation (`auto_approve_external` is any non-`\"true\"` value) may prompt the user to confirm before attaching.\n - **Binary/Image Materials (Record-Only)** — ordinary/unrelated binaries (arbitrary screenshots, PDFs, ZIPs, and other binaries not design-relevant) stay **record-only** in this step; never attempt to upload them.\n\n4. **Deduplicate and detect stale phase reclassification.** Call the `attachment` MCP tool with `operation` set to `\"list\"` and `ticket_number` set to `{ticket_number}` BEFORE uploading anything, so a resumed or re-run invocation does not re-attach a material that is already present.\n - Compute each candidate's deterministic filename first (step 6), then compare the listed attachments by **`{ticket_number}/{hash}`** (the ticket prefix plus the 8-hex-char hash segment) against the phase-tagged filenames already on the ticket, using the exact grammar `{ticket}-{planasset|implasset|bothasset}-{hash}{ext}` — this comparison spans all three phase tokens for the same source.\n - If a listed attachment shares the same `{ticket_number}/{hash}` as a candidate but carries a **different phase token**, treat it as a **stale classification for the same source** — the material was reclassified to a different phase since it was last gathered.\n - If a listed attachment's filename **exactly matches** the candidate's newly computed filename (same ticket, same phase token, same hash, same extension), it is already attached — skip re-uploading it.\n - Legacy `{ticket_number}-material-{hash}{ext}` attachments (pre-BAPI-643) are a distinct, valid, untouched naming form — never treat them as stale phase-tagged attachments, and never delete or supersede them here.\n\n5. **Supersede a stale phase-tagged attachment before uploading the reclassified filename.** When step 4 identifies a stale same-source attachment under a different phase token:\n - Call the `attachment` MCP tool with `operation` set to `\"delete\"`, `ticket_number` set to `{ticket_number}`, and `file_name` set to the stale attachment's exact filename. This is a genuine removal (not `replace_existing`, which only matches an upload's *own* filename) — the stale filename differs from the new filename whenever the phase token changed, so `replace_existing` alone cannot supersede it.\n - **If the delete call fails** (or reports `deleted: false` for a reason other than \"already absent\" — e.g. a transient Jira error), **skip the replacement upload for that material entirely** this run, preserving the one-active-attachment invariant rather than leaving two phase-tagged copies of the same source live at once. Record the failure (see step 9) and continue with the next material; never halt the run.\n - **If the delete succeeds** (or the stale attachment was already absent), proceed to upload the newly classified filename in step 7.\n\n6. **Gather and size-tier each phase-eligible local material; compute deterministic filenames.**\n - For each phase-eligible local **text** material:\n - Read the local file from disk.\n - If the content exceeds **200,000 characters**, SKIP the upload and RECORD it (note the path and that it was skipped for size) — do not attach it.\n - If the content is **<= 200,000 characters**, upload it RAW via `attachment` (operation: `\"upload\"`). Do NOT summarize locally: the backend already summarizes attached text at plan time, so the size tiers are backend behavior this step defers to. The agent performs NO local summarization.\n - **Extension rule by phase**: a **planning-only** (`planasset`) text material normalizes to `.md` regardless of its original extension — the planner only needs prose content, not the original format. A **downloadable or both-phase** (`implasset`/`bothasset`) text material instead **preserves its lowercased original source extension** (e.g. `.json`, `.csv`, `.py`, `.yml`/`.yaml`) — the implementing agent needs the file back in its original, directly usable format. There is no blanket \"all text becomes `.md`\" rule; the extension is phase-dependent.\n - Use a deterministic, sanitized filename of the form `{ticket_number}-{phase-token}-{hash}{ext}` (using the `{ticket_number}` input from the Inputs section and the phase token from step 2), where `{hash}` is the first 8 lowercase hex characters of the SHA-256 digest of the sanitized absolute source path, and `{ext}` follows the extension rule above.\n - For each eligible local design/UI comp image (or other phase-tagged image, extension mapping to an allowlisted MIME type — `image/png`, `image/jpeg`, `image/webp`, `image/gif`), eligible for the allowlist-guarded binary upload path (distinct from the text upload path above):\n - Use a deterministic filename of the form `{ticket_number}-{phase-token}-{hash}{ext}`, where `{hash}` is computed the same way (first 8 lowercase hex characters of the SHA-256 digest of the sanitized absolute source path) and `{ext}` is the lowercased allowlisted source extension (`.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`) — the existing image-extension behavior is unchanged by phase.\n - Pin the hash algorithm exactly (SHA-256, first 8 lowercase hex chars, of the sanitized absolute path) — do NOT substitute another hash — so the same source always maps to the same `{ticket}/{hash}` identity and the dedup/stale-detection in step 4 works across separate sessions, re-runs, and phase reclassification. Compute filenames before the step 4 dedup/stale comparison is applied. Keep the sanitized source provenance inside the text attachment body (not applicable to binary comp uploads), not only in the filename.\n\n7. **`attachment` upload parameter discipline (Zod).**\n - For text materials, call `attachment` with `operation: \"upload\"`, `ticket_number`, the deterministic phase-tagged attachment filename, and the text `content`.\n - For design comp image uploads, call `attachment` with `operation: \"upload\"`, `ticket_number`, `file_path` (the local source path), and `file_name` set to the deterministic phase-tagged comp filename from step 6 — pass `file_path` rather than reading and UTF-8-encoding the bytes yourself, so `resolveUploadAttachment()` performs binary detection, the MIME allowlist check, and base64 encoding. Never UTF-8-encode image bytes locally.\n - In both cases, OMIT the optional parameters `link_type` and `replace_existing` entirely when they are unused — do NOT pass `null` or empty strings for them. The Zod schemas reject `null`/empty values, so an unused optional parameter must be omitted rather than nulled.\n\n8. **Persist destination provenance after successful uploads (one batched update).** For every material successfully uploaded in this run, record a stable, sanitized mapping from its generated Jira filename to the bullet's original repository-relative destination path (as recorded in the draft's `## Materials & Access` section). Write these mappings as bulleted lines under a dedicated trailing `### Asset Destinations` subsection of `## Materials & Access`, one line per mapping, in the exact form:\n ```markdown\n ### Asset Destinations\n\n - `{jira-filename}` → `{original/repo/relative/destination.ext}`\n ```\n This is the canonical, machine-parsed contract consumed by `extract_asset_destination_paths()` (`api/agent_flows/code_writer/library/ticket_asset_lib.py`) — do not vary the arrow character (`→`), the backtick wrapping, or the bullet form. Append new mappings to this subsection (creating it if absent) rather than replacing prior mappings from earlier gather runs. Apply **all** of this run's successful-upload provenance updates in **one single batched call** to `update_ticket_description` — never one Jira description update per asset. If the provenance update call fails, **retain the original bullet unchanged** in the ticket description and record a non-blocking warning that the destination mapping could not be persisted; this does not fail the run, and the filename token itself is still enough for plan generation to classify the asset even without a fully actionable destination.\n\n9. **Redact secrets everywhere.** Before writing any URL or access note ANYWHERE — the Jira `## Materials & Access` record, any warning or final-report output, and any local intermediate file — sanitize and redact embedded credentials, SAS tokens, API keys, and basic-auth secrets using a high-visibility placeholder such as `[REDACTED_TOKEN]`. Mirror the backend `_redact_forge_fields()` / `_sanitize_jira_error_message()` patterns. A location/access note must never expose a plaintext secret.\n\n10. **Warn, never halt (error handling).** This step must NEVER halt, prompt-to-fail, or fail the overarching command because a material could not be gathered, attached, or superseded. Follow the warn-not-halt convention:\n - If an `attachment` upload call fails (or a file disappeared between inventory and upload), warn gracefully and continue with the next material.\n - If a stale-attachment `delete` call fails, skip only that material's replacement upload (step 5) and continue with the rest — never halt the run.\n - This includes design comp image uploads: an unsupported/disallowed MIME type, an oversize image (`> 10 MB`), a missing local file, a malformed upload payload, or a Jira upload failure must all be warned and skipped, never halting the run.\n - On such a post-create attach/delete failure, call `update_ticket_description` to record the failure in the issue's `## Materials & Access` record (the material became unavailable, or its stale copy could not be superseded, only after the issue existed). `update_ticket_description` is an existing MCP tool, not a backend change.\n - Everything knowable PRE-CREATE was already written into the description at create time, so `update_ticket_description` is reserved for these rarer post-create attach/delete/provenance failures. This complements the existing `partial_success` recording convention in `upload-and-track.md`.\n - Apply the step 9 redaction to every warning and recorded note.\n\n## Return\n\nConfirm the outcome, reporting each category **by its user-facing phase name and original path** (not by the internal filename token, which is implementation metadata): which Planning Assets, Downloadable Assets, and Planning & Downloadable Assets were attached (noting their deterministic Jira filenames for cross-reference only), which stale phase-tagged attachments were superseded (and which supersession attempts failed and were skipped), which materials were skipped/recorded as record-only (over-size text, external/auth-gated links, ordinary/unrelated binaries, or non-local design references), whether the destination-provenance batched update succeeded, any attach/delete/provenance failures recorded via `update_ticket_description`, and that no failure halted the run.\n",
|
|
12
12
|
".bridge/README.md": "# The `.bridge/` directory\n\nThis directory holds Bridge's files for this project. Bridge owns this README\nand refreshes it every time you run install or upgrade, so do not edit it.\n\n## What is in here\n\n| Path | What it is | Commit it? |\n|---|---|---|\n| `config` | Records the project identity. It has no secrets. | Yes |\n| `pipelines/` | Your own pipeline JSON files. | Yes |\n| `instructions/` | Your own instruction files used by pipelines. Bridge creates the directory empty and never writes files into it. | Yes |\n| `procedures/` | Bridge-owned procedures that commands read directly. | Yes |\n| `README.md` | This file. | Yes |\n| `install-state.json` | Machine-local install state. Git-ignored. | No |\n| `bridge-permissions.json` | Machine-local permission state. Git-ignored. | No |\n\n## Customizing pipelines\n\nA pipeline step can load an instruction file. If you put a file with the same\nname in `instructions/`, your file replaces the bundled instruction for the\npipelines that load that instruction.\n\nThis does not change the procedures in `procedures/`. Commands read those files\ndirectly, not through a pipeline, so an instruction override never reaches them.\n\n## Procedures\n\n`procedures/` holds command procedures that Bridge owns. Bridge refreshes them on\ninstall and upgrade. Do not edit them. There is no supported way to customize\nthese procedures today.\n\nOlder Bridge versions put these files under `docs/install/`. If you still have\ncopies there, they are old fallback copies. Bridge now reads `procedures/`\nfirst. You can delete the old copies once the new `procedures/` files are\ncommitted.\n\n## Moving the pipelines directory\n\n`BAPI_PIPELINES_DIR` moves the pipelines directory and its sibling instructions\ndirectory. It does not move `procedures/`, which always stays at\n`.bridge/procedures/`.\n\n## Committing and repair\n\nCommit this README and the files in `procedures/` so every teammate and every\nworktree has them. If a package-managed file goes missing, `repair-assets`\nrestores it without overwriting files that already exist.\n",
|
|
13
|
-
"docs/install/epic-implementer-install.md": "# Run your first epic with the Epic Implementer\n\nThe Epic Implementer takes a planned epic, hands each child ticket to an agent on your computer, waits for CI and review, and merges each child pull request into an `epic/<EPIC>` branch. A person merges the final pull request into your default branch.\n\nYou do four things, in this order: install, set up, define the epic, launch it. The same steps work with Bridge's own ticket storage and with Jira.\n\nIn every command below, `npx -y @bridge_gpt/mcp-server` is the launcher. Keep the `-y`; without it, `npx` stops to ask before it installs the package.\n\n## Prerequisites\n\nSetup checks every item below for you, fixes what it can, and prints the one step it cannot fix. Read this list only when setup reports an item. Each bullet gives the item's name, its id, what it means, and the fix.\n\n- **Unattended posture (Setup page)** (`server.unattended-posture`) — Bridge allows unattended runs for this repository. Fix: Turn on **Allow unattended Epic Implementer runs** on the repository Setup page, or launch with `--attended`.\n- **Resolved merge mode** (`server.resolved-merge-mode`) — Bridge knows how child pull requests will be merged (your computer, a machine token, or GitHub Actions). Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Provider repository** (`server.provider-repository`) — Bridge knows the GitHub `owner/name` of this repository. Fix: Run `npx -y @bridge_gpt/mcp-server connect-github`, then run setup again.\n- **Supervisor setup** (`server.supervisor-setup`) — The repository has a stored supervisor record. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Supervisor configuration** (`server.supervisor-config`) — The supervisor record is complete: the test gate and the safe defaults are stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Supervisor required CI checks** (`server.supervisor-required-checks`) — The CI checks a child pull request must pass before it merges are stored. Fix: Run setup and confirm the gate it proposes, or name a check with `--required-check <name>`.\n- **Review policy** (`server.review-policy`) — The review policy for child pull requests is known. AI review is an opt-in choice by the repository admin. Fix: Nothing is needed unless you want AI review. Choose a policy at launch with `--review-policy`.\n- **GitHub App credentials** (`server.github-credentials`) — Bridge's GitHub App is connected and can read this repository. Fix: Run `npx -y @bridge_gpt/mcp-server connect-github`, then run setup again.\n- **GitHub App actions permission** (`server.github-actions-permission`) — The GitHub App may start workflow runs. Only needed when merges go through GitHub Actions. Fix: Accept the updated permission on the GitHub App's installation page, then run setup again.\n- **Merge workflow eligibility** (`server.merge-execution-workflow`) — The merge workflow file is on the default branch and current. Only needed when merges go through GitHub Actions. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor --merge-workflow --codeowner <@org/team|@user>`, merge the pull request it opens, then run setup again.\n- **Merge branch policy** (`server.merge-execution-branch-policy`) — The default branch rules let the merge workflow do its job. Only needed when merges go through GitHub Actions. Fix: Adjust the branch rule or ruleset as setup describes, then run setup again.\n- **Executor server observation** (`server.executor-readiness`) — Bridge has seen a heartbeat from an executor for this repository. Before your first run this can be missing: `drive-epic` starts the executor for each run. Fix: Launch the epic with `npx -y @bridge_gpt/mcp-server drive-epic <EPIC>`.\n- **Review workflow protocol** (`server.review-workflow`) — The review workflow on the default branch matches the review policy. Only needed with AI review. Fix: Run setup; it names the workflow change to make.\n- **Conductor CI migration guard** (`server.conductor-ci-workflow`) — The CI workflow file `epic-implementer-ci.yml` is on the default branch and runs the migration guard where needed. Fix: Run setup, merge the setup pull request it opens, then run setup again.\n- **Escalation channel (webhook or email)** (`server.unattended-notify-default`) — Bridge has somewhere to send an escalation: a verified notify webhook, or your account email. Fix: Declare a notify webhook, or verify your account email.\n- **Repository workflow readiness** (`server.repository-workflow-readiness`) — The CI and review workflows are confirmed on the default branch. Fix: Run setup, merge the setup pull request, then run setup again.\n- **Workflows at indexed commit** (`server.indexed-workflows`) — The repository index includes the workflow files on the default branch. Fix: Merge the setup pull request, then run setup again. It starts the re-index and reports this item as pending until the index reaches that commit.\n- **Known test command** (`server.test-command`) — Bridge knows the command that runs this repository's tests. Fix: Run setup and give the test command when it asks, or run the learn step.\n- **Service availability** (`server.service-availability`) — Bridge could read this repository's readiness from the server. Fix: Retry in a few minutes. If it keeps failing, email info@bridgegpt.ai.\n- **Claude login** (`install.claude-login`) — Claude Code is signed in on this computer. Fix: Run `claude` and sign in, then run setup again.\n- **Repository identity** (`install.identity`) — Bridge knows which repository this folder is. Fix: Run setup from the repository root, or pass `--repo <name>`.\n- **Bridge API credential** (`install.credential`) — A Bridge API key is stored for this repository. Fix: Run `npx -y @bridge_gpt/mcp-server install`.\n- **Server connectivity** (`install.connectivity`) — This computer can reach the Bridge server. Fix: Check your network and any `BAPI_BASE_URL` setting, then run setup again.\n- **Bootstrap config fields** (`install.bootstrap`) — The repository's Bridge configuration fields are filled in. Fix: Run `npx -y @bridge_gpt/mcp-server install`.\n- **Integration credentials** (`install.integrations`) — The integration credentials this repository uses, such as Jira or GitHub, are stored. Fix: Run `npx -y @bridge_gpt/mcp-server install`.\n- **GitHub connection** (`install.github`) — Bridge's GitHub App is connected to this repository. Fix: Run `npx -y @bridge_gpt/mcp-server connect-github`.\n- **Repository indexing** (`install.indexing`) — The repository has been indexed by Bridge. Fix: Run `/parse-repository`, or let setup queue the index.\n- **Conductor event ledger** (`conductor.ledger`) — The local Epic Implementer event ledger can be read. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.\n- **Conductor git hooks** (`conductor.git-hooks`) — Optional: the git hooks that feed the local event ledger are installed. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer install-git-hooks`.\n- **Epic Implementer MCP profile** (`conductor.mcp-profile`) — The `epic_implementer` tool profile is on in your MCP host. Fix: Let setup add it (it asks first), then restart your MCP client.\n- **GitHub CLI availability** (`conductor.gh-cli`) — The GitHub CLI (`gh`) is installed and signed in. Fix: Install `gh` and run `gh auth login`.\n- **Configured merge credential** (`conductor.merge-credential`) — A GitHub token for merging child pull requests is available on this computer. Fix: Let setup store one (it asks first), or set `GITHUB_MERGE_TOKEN`.\n- **Native ledger binding** (`conductor.native-ledger`) — The ledger's native component loads on this computer. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.\n- **Worker MCP registration form** (`conductor.mcp-registration-form`) — Workers register the Bridge tools in the form the executor expects. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.\n- **Expected Node engine** (`conductor.node-engine`) — The Node.js version meets the package's engine range. Fix: Install a supported Node.js (18 or newer; 20 or newer for the git hooks).\n- **Deny-layer enforcement** (`conductor.deny-enforcement`) — Claude Code enforces the permission denials that keep workers inside the repository. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` to see why the check could not confirm it.\n- **Claude login** (`conductor.claude-login`) — Claude Code is signed in for the workers. Fix: Run `claude` and sign in, then run setup again.\n- **Merge credential capability** (`conductor.merge-credential-capability`) — The merge token can push to the repository and read pull requests. Fix: Replace the token (setup offers to), then run setup again.\n- **Worktree preparation** (`conductor.worktree-preparation`) — The executor's clone can keep its working files out of git (`.git/info/exclude` exists or can be written). Fix: Make `.git/info/exclude` writable in this clone.\n- **Supervisor gate profile** (`conductor.install-section-supervisor-gate-profile`) — The repository's test gate profile is stored and valid. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Supervisor required CI checks** (`conductor.install-section-supervisor-required-checks`) — The required CI checks in the gate match checks the provider reports. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Supervisor review-policy alignment** (`conductor.install-section-supervisor-review-alignment`) — The review policy and the review workflow agree. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **GitHub App actions permission** (`conductor.install-section-github-actions-permission`) — The GitHub App may start workflow runs. Only needed when merges go through GitHub Actions. Fix: Accept the updated permission on the GitHub App's installation page.\n- **Merge execution eligibility** (`conductor.install-section-merge-execution-eligibility`) — This repository can use GitHub Actions merges. Only needed for that merge mode. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor --merge-workflow --codeowner <@org/team|@user>` and merge its pull request.\n- **Epic Implementer MCP profile token** (`conductor.install-section-epic-implementer-profile-token`) — The Bridge key used by the Epic Implementer tool profile is stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Conductor hook targets** (`conductor.install-section-conductor-hook-targets`) — The git hook targets are in place for this clone. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer install-git-hooks`.\n- **GitHub Actions merge: local observation prerequisites** (`conductor.install-section-gh-actions-merge-auth`) — This computer can observe GitHub Actions merges. Only needed for that merge mode. Fix: Sign in with `gh auth login` and rerun setup.\n- **GitHub Actions merge: capability observability** (`conductor.install-section-gh-actions-merge-observable`) — Bridge can observe the outcome of GitHub Actions merges. Only needed for that merge mode. Fix: Rerun setup and follow the step it prints.\n- **Epic Implementer ledger loadability** (`conductor.install-section-epic-implementer-ledger-loadability`) — The local ledger can be loaded by the tools that read it. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.\n- **Launch evidence** (`server.admission-evidence`) — Bridge has the evidence it needs to admit a launch. Fix: Run setup, then launch again.\n- **Launch evidence: unattended consent** (`server.admission-unattended-consent`) — Launch check: unattended runs are allowed. Fix: Turn on **Allow unattended Epic Implementer runs** on the Setup page, or launch with `--attended`.\n- **Launch evidence: notification destination** (`server.admission-notify-webhook`) — Launch check: an escalation destination is verified. Fix: Declare a notify webhook, or verify your account email.\n- **Launch evidence: repository workflows** (`server.admission-repository-readiness`) — Launch check: the CI and review workflows are confirmed. Fix: Run setup, merge the setup pull request, then run setup again.\n- **Launch evidence: required CI checks** (`server.admission-required-checks`) — Launch check: the required CI checks are stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Launch evidence: indexed repository** (`server.admission-index-provenance`) — Launch check: the index reaches the commit that holds the workflows. Fix: Merge the setup pull request, then run setup again.\n- **Repository test gate** (`server.gate-profile`) — The repository's test gate is stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Repository test gate warnings** (`server.gate-profile-warnings`) — The stored test gate has no unresolved warnings. Fix: Read the warnings setup prints and confirm or edit the gate.\n- **Effective review mode** (`server.effective-review-mode`) — Bridge shows which review mode child pull requests will use. Fix: Choose a review policy at launch with `--review-policy` if you want a different one.\n- **Epic branch CI** (`server.epic-branch-ci-decision`) — Someone has decided whether CI runs on pull requests into the epic branch. Fix: Run setup and answer the epic-branch CI question, or pass `--epic-branch-ci-decision include|decline`.\n- **Epic branch CI coverage** (`server.epic-branch-ci-coverage-warning`) — Your CI covers pull requests into the epic branch. Fix: Add `epic/**` to the branches your CI workflow runs on.\n- **Additional readiness diagnostics** (`server.diagnostics`) — Extra readiness diagnostics from the server are clear. Fix: Read the diagnostic text; each names its own fix.\n- **Command versions** (`conductor.command-drift`) — The installed Epic Implementer commands match this package's version. Fix: Run `npx -y @bridge_gpt/mcp-server install` to refresh them.\n- **Escalation delivery** (`escalation-reachability`) — An escalation can actually be delivered. Fix: Verify your account email or fix the webhook, then run setup again.\n\n## 1. Install\n\nRun this once per project. Skip it when Bridge is already installed.\n\n```bash\nnpx -y @bridge_gpt/mcp-server install\n```\n\nIt writes this guide to `docs/install/epic-implementer-install.md` in your project. Run it again any time to refresh that file.\n\n## 2. Set up\n\nRun this once per repository, from the repository root, in your own terminal:\n\n```bash\nnpx -y @bridge_gpt/mcp-server install conductor\n```\n\n`install-bridge conductor` is the same command with another spelling. Setup checks everything first (read-only), fixes only what is missing, checks again, and ends with one verdict: \"Ready for your first epic\" or \"Not ready: N steps left\", with the fix for each step. It asks before anything that writes, and without a terminal every question is a \"no\".\n\nWhen setup reports that its setup pull request is waiting, it prints `merge the setup PR` with the pull request's address. Merge that pull request, then run setup again. Setup starts the re-index, and reports the item as pending (\"indexing is running; re-run setup when it finishes\", or \"indexing was queued; re-run setup when it finishes\") until the index reaches the merged commit. Run setup again until it says \"Ready for your first epic\".\n\n## 3. Define the epic\n\nIn Claude Code, run:\n\n```text\n/define-tickets\n```\n\nIt writes real child ticket keys, `epic-plan.dag.json`, and `epic-plan.meta.json`, then hands off to `/drive-epic-run`. The meta file is how the launch finds the plan from the epic key.\n\n## 4. Launch\n\nIn Claude Code, run:\n\n```text\n/drive-epic-run <EPIC> [<plan path>]\n```\n\nIt previews the launch, asks you once, creates the run through `drive-epic`, and drives the run to the end. From a shell, run the same launch yourself:\n\n```bash\nnpx -y @bridge_gpt/mcp-server drive-epic <EPIC>\n```\n\nAdd `--dry-run` for a read-only preview, or `--attended` to opt out of unattended merging. `drive-epic --help` lists the common options, and `drive-epic --help-advanced` lists the rest.\n\n## Advanced: the planner\n\n`/plan-epic` is the advanced planner. It writes placeholder `TBD-N` keys instead of real ones. You create the child tickets yourself, run `emit-epic-implementer-bundle finalize` to replace the placeholders and write the plan files, then run `/drive-epic-run`. Planning never creates or approves a run.\n\n## If something goes wrong\n\nEvery refusal names the missing item and its fix, and creates nothing. Run setup again after you fix an item. For a read-only report of every item, run `npx -y @bridge_gpt/mcp-server epic-implementer readiness --json`. If you are stuck, email info@bridgegpt.ai.\n",
|
|
13
|
+
"docs/install/epic-implementer-install.md": "# Run your first epic with the Epic Implementer\n\nThe Epic Implementer takes a planned epic, hands each child ticket to an agent on your computer, waits for CI and review, and merges each child pull request into an `epic/<EPIC>` branch. A person merges the final pull request into your default branch.\n\nYou do four things, in this order: install, set up, define the epic, launch it. The same steps work with Bridge's own ticket storage and with Jira.\n\nIn every command below, `npx -y @bridge_gpt/mcp-server` is the launcher. Keep the `-y`; without it, `npx` stops to ask before it installs the package.\n\n## Prerequisites\n\nSetup checks every item below for you, fixes what it can, and prints the one step it cannot fix. Read this list only when setup reports an item. Each bullet gives the item's name, its id, what it means, and the fix.\n\n- **Unattended posture (Setup page)** (`server.unattended-posture`) — Bridge allows unattended runs for this repository. Fix: Turn on **Allow unattended Epic Implementer runs** on the repository Setup page, or launch with `--attended`.\n- **Resolved merge mode** (`server.resolved-merge-mode`) — Bridge knows how child pull requests will be merged (your computer, a machine token, or GitHub Actions). Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Provider repository** (`server.provider-repository`) — Bridge knows the GitHub `owner/name` of this repository. Fix: Run `npx -y @bridge_gpt/mcp-server connect-github`, then run setup again.\n- **Supervisor setup** (`server.supervisor-setup`) — The repository has a stored supervisor record. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Supervisor configuration** (`server.supervisor-config`) — The supervisor record is complete: the test gate and the safe defaults are stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Supervisor required CI checks** (`server.supervisor-required-checks`) — The CI checks a child pull request must pass before it merges are stored. Fix: Run setup and confirm the gate it proposes, or name a check with `--required-check <name>`.\n- **Review policy** (`server.review-policy`) — The review policy for child pull requests is known. AI review is an opt-in choice by the repository admin. Fix: Nothing is needed unless you want AI review. Choose a policy at launch with `--review-policy`.\n- **GitHub App credentials** (`server.github-credentials`) — Bridge's GitHub App is connected and can read this repository. Fix: Run `npx -y @bridge_gpt/mcp-server connect-github`, then run setup again.\n- **GitHub App actions permission** (`server.github-actions-permission`) — The GitHub App may start workflow runs. Only needed when merges go through GitHub Actions. Fix: Accept the updated permission on the GitHub App's installation page, then run setup again.\n- **Merge workflow eligibility** (`server.merge-execution-workflow`) — The merge workflow file is on the default branch and current. Only needed when merges go through GitHub Actions. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor --merge-workflow --codeowner <@org/team|@user>`, merge the pull request it opens, then run setup again.\n- **Merge branch policy** (`server.merge-execution-branch-policy`) — The default branch rules let the merge workflow do its job. Only needed when merges go through GitHub Actions. Fix: Adjust the branch rule or ruleset as setup describes, then run setup again.\n- **Executor server observation** (`server.executor-readiness`) — Bridge has seen a heartbeat from an executor for this repository. Before your first run this can be missing: `drive-epic` starts the executor for each run. Fix: Launch the epic with `npx -y @bridge_gpt/mcp-server drive-epic <EPIC>`.\n- **Review workflow protocol** (`server.review-workflow`) — The review workflow on the default branch matches the review policy. Only needed with AI review. Fix: Run setup; it names the workflow change to make.\n- **Conductor CI migration guard** (`server.conductor-ci-workflow`) — The CI workflow file `epic-implementer-ci.yml` is on the default branch and runs the migration guard where needed. Fix: Run setup, merge the setup pull request it opens, then run setup again.\n- **Escalation channel (webhook or email)** (`server.unattended-notify-default`) — Bridge has somewhere to send an escalation: a verified notify webhook, or your account email. Fix: Declare a notify webhook, or verify your account email.\n- **Repository workflow readiness** (`server.repository-workflow-readiness`) — The CI and review workflows are confirmed on the default branch. Fix: Run setup, merge the setup pull request, then run setup again.\n- **Workflows at indexed commit** (`server.indexed-workflows`) — The repository index includes the workflow files on the default branch. Fix: Merge the setup pull request, then run setup again. It starts the re-index and reports this item as pending until the index reaches that commit.\n- **Known test command** (`server.test-command`) — Bridge knows the command that runs this repository's tests. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor --test-command \"<command>\"`, replacing `<command>` with the one command that runs your tests, or run setup and answer its test command question.\n- **Service availability** (`server.service-availability`) — Bridge could read this repository's readiness from the server. Fix: Retry in a few minutes. If it keeps failing, email info@bridgegpt.ai.\n- **Claude login** (`install.claude-login`) — Claude Code is signed in on this computer. Fix: Run `claude` and sign in, then run setup again.\n- **Repository identity** (`install.identity`) — Bridge knows which repository this folder is. Fix: Run setup from the repository root, or pass `--repo <name>`.\n- **Bridge API credential** (`install.credential`) — A Bridge API key is stored for this repository. Fix: Run `npx -y @bridge_gpt/mcp-server install`.\n- **Server connectivity** (`install.connectivity`) — This computer can reach the Bridge server. Fix: Check your network and any `BAPI_BASE_URL` setting, then run setup again.\n- **Bootstrap config fields** (`install.bootstrap`) — The repository's Bridge configuration fields are filled in. Fix: Run `npx -y @bridge_gpt/mcp-server install`.\n- **Integration credentials** (`install.integrations`) — The integration credentials this repository uses, such as Jira or GitHub, are stored. Fix: Run `npx -y @bridge_gpt/mcp-server install`.\n- **GitHub connection** (`install.github`) — Bridge's GitHub App is connected to this repository. Fix: Run `npx -y @bridge_gpt/mcp-server connect-github`.\n- **Repository indexing** (`install.indexing`) — The repository has been indexed by Bridge. Fix: Run `/parse-repository`, or let setup queue the index.\n- **Conductor event ledger** (`conductor.ledger`) — The local Epic Implementer event ledger can be read. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.\n- **Conductor git hooks** (`conductor.git-hooks`) — Optional: the git hooks that feed the local event ledger are installed. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer install-git-hooks`.\n- **Epic Implementer MCP profile** (`conductor.mcp-profile`) — The `epic_implementer` tool profile is on in your MCP host. Fix: Let setup add it (it asks first), then restart your MCP client.\n- **GitHub CLI availability** (`conductor.gh-cli`) — The GitHub CLI (`gh`) is installed and signed in. Fix: Install `gh` and run `gh auth login`.\n- **Configured merge credential** (`conductor.merge-credential`) — A GitHub token for merging child pull requests is available on this computer. Fix: Let setup store one (it asks first), or set `GITHUB_MERGE_TOKEN`.\n- **Native ledger binding** (`conductor.native-ledger`) — The ledger's native component loads on this computer. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.\n- **Worker MCP registration form** (`conductor.mcp-registration-form`) — Workers register the Bridge tools in the form the executor expects. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.\n- **Expected Node engine** (`conductor.node-engine`) — The Node.js version meets the package's engine range. Fix: Install a supported Node.js (18 or newer; 20 or newer for the git hooks).\n- **Deny-layer enforcement** (`conductor.deny-enforcement`) — Claude Code enforces the permission denials that keep workers inside the repository. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` to see why the check could not confirm it.\n- **Claude login** (`conductor.claude-login`) — Claude Code is signed in for the workers. Fix: Run `claude` and sign in, then run setup again.\n- **Merge credential capability** (`conductor.merge-credential-capability`) — The merge token can push to the repository and read pull requests. Fix: Replace the token (setup offers to), then run setup again.\n- **Worktree preparation** (`conductor.worktree-preparation`) — The executor's clone can keep its working files out of git (`.git/info/exclude` exists or can be written). Fix: Make `.git/info/exclude` writable in this clone.\n- **Supervisor gate profile** (`conductor.install-section-supervisor-gate-profile`) — The repository's test gate profile is stored and valid. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Supervisor required CI checks** (`conductor.install-section-supervisor-required-checks`) — The required CI checks in the gate match checks the provider reports. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Supervisor review-policy alignment** (`conductor.install-section-supervisor-review-alignment`) — The review policy and the review workflow agree. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **GitHub App actions permission** (`conductor.install-section-github-actions-permission`) — The GitHub App may start workflow runs. Only needed when merges go through GitHub Actions. Fix: Accept the updated permission on the GitHub App's installation page.\n- **Merge execution eligibility** (`conductor.install-section-merge-execution-eligibility`) — This repository can use GitHub Actions merges. Only needed for that merge mode. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor --merge-workflow --codeowner <@org/team|@user>` and merge its pull request.\n- **Epic Implementer MCP profile token** (`conductor.install-section-epic-implementer-profile-token`) — The Bridge key used by the Epic Implementer tool profile is stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Conductor hook targets** (`conductor.install-section-conductor-hook-targets`) — The git hook targets are in place for this clone. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer install-git-hooks`.\n- **GitHub Actions merge: local observation prerequisites** (`conductor.install-section-gh-actions-merge-auth`) — This computer can observe GitHub Actions merges. Only needed for that merge mode. Fix: Sign in with `gh auth login` and rerun setup.\n- **GitHub Actions merge: capability observability** (`conductor.install-section-gh-actions-merge-observable`) — Bridge can observe the outcome of GitHub Actions merges. Only needed for that merge mode. Fix: Rerun setup and follow the step it prints.\n- **Epic Implementer ledger loadability** (`conductor.install-section-epic-implementer-ledger-loadability`) — The local ledger can be loaded by the tools that read it. Fix: Run `npx -y @bridge_gpt/mcp-server epic-implementer doctor` and follow what it prints.\n- **Launch evidence** (`server.admission-evidence`) — Bridge has the evidence it needs to admit a launch. Fix: Run setup, then launch again.\n- **Launch evidence: unattended consent** (`server.admission-unattended-consent`) — Launch check: unattended runs are allowed. Fix: Turn on **Allow unattended Epic Implementer runs** on the Setup page, or launch with `--attended`.\n- **Launch evidence: notification destination** (`server.admission-notify-webhook`) — Launch check: an escalation destination is verified. Fix: Declare a notify webhook, or verify your account email.\n- **Launch evidence: repository workflows** (`server.admission-repository-readiness`) — Launch check: the CI and review workflows are confirmed. Fix: Run setup, merge the setup pull request, then run setup again.\n- **Launch evidence: required CI checks** (`server.admission-required-checks`) — Launch check: the required CI checks are stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Launch evidence: indexed repository** (`server.admission-index-provenance`) — Launch check: the index reaches the commit that holds the workflows. Fix: Merge the setup pull request, then run setup again.\n- **Repository test gate** (`server.gate-profile`) — The repository's test gate is stored. Fix: Run `npx -y @bridge_gpt/mcp-server install conductor`; it fixes what it can and prints the one step it cannot.\n- **Repository test gate warnings** (`server.gate-profile-warnings`) — The stored test gate has no unresolved warnings. Fix: Read the warnings setup prints and confirm or edit the gate.\n- **Effective review mode** (`server.effective-review-mode`) — Bridge shows which review mode child pull requests will use. Fix: Choose a review policy at launch with `--review-policy` if you want a different one.\n- **Epic branch CI** (`server.epic-branch-ci-decision`) — Someone has decided whether CI runs on pull requests into the epic branch. Fix: Run setup and answer the epic-branch CI question, or pass `--epic-branch-ci-decision include|decline`.\n- **Epic branch CI coverage** (`server.epic-branch-ci-coverage-warning`) — Your CI covers pull requests into the epic branch. Fix: Add `epic/**` to the branches your CI workflow runs on.\n- **Additional readiness diagnostics** (`server.diagnostics`) — Extra readiness diagnostics from the server are clear. Fix: Read the diagnostic text; each names its own fix.\n- **Command versions** (`conductor.command-drift`) — The installed Epic Implementer commands match this package's version. Fix: Run `npx -y @bridge_gpt/mcp-server install` to refresh them.\n- **Escalation delivery** (`escalation-reachability`) — An escalation can actually be delivered. Fix: Verify your account email or fix the webhook, then run setup again.\n\n## 1. Install\n\nRun this once per project. Skip it when Bridge is already installed.\n\n```bash\nnpx -y @bridge_gpt/mcp-server install\n```\n\nIt writes this guide to `docs/install/epic-implementer-install.md` in your project. Run it again any time to refresh that file.\n\n## 2. Set up\n\nRun this once per repository, from the repository root, in your own terminal:\n\n```bash\nnpx -y @bridge_gpt/mcp-server install conductor\n```\n\n`install-bridge conductor` is the same command with another spelling. Setup checks everything first (read-only), fixes only what is missing, checks again, and ends with one verdict: \"Ready for your first epic\" or \"Not ready: N steps left\", with the fix for each step. It asks before anything that writes, and without a terminal every question is a \"no\".\n\nWhen setup reports that its setup pull request is waiting, it prints `merge the setup PR` with the pull request's address. Merge that pull request, then run setup again. Setup starts the re-index, and reports the item as pending (\"indexing is running; re-run setup when it finishes\", or \"indexing was queued; re-run setup when it finishes\") until the index reaches the merged commit. Run setup again until it says \"Ready for your first epic\".\n\n### View or change the test command\n\nSetup prints the stored test command on every run:\n\n```text\nTest command: `npm test` (stored). Change it with --test-command \"...\".\n```\n\nTo save or replace it, pass the command yourself:\n\n```bash\nnpx -y @bridge_gpt/mcp-server install conductor --test-command \"npm run lint && npm run build\"\n```\n\nThe flag is your consent for that one write, so setup asks no command question. It checks the command first (one line, no `${{`, at most 500 characters), saves it once, and reads it back. It reports success only when the stored value matches. Passing the same command again says \"Test command unchanged\" and writes nothing. With `--dry-run`, nothing is saved.\n\nTwo things stay separate from the flag. Setup still asks you to confirm the Bridge URL, so the command needs a terminal. And opening the setup pull request asks for its own consent: after you replace the command, setup offers the update pull request in the same run, and a command you declined to ship stays saved.\n\nDo not put a credential in the test command. Setup prints it, and the workflow file contains it.\n\n### What CI installs automatically\n\nThe setup pull request adds `.github/workflows/epic-implementer-ci.yml`. Before it runs your test command, the workflow installs your dependencies from the files in your repository root. Bridge reads those files on your computer when it generates the workflow, and it never runs a package manager to decide.\n\n| Language | Dependency file, first match wins | What CI runs |\n| --- | --- | --- |\n| JavaScript | `pnpm-lock.yaml`, `yarn.lock`, `npm-shrinkwrap.json`, `package-lock.json`, `bun.lock`, `bun.lockb` | `pnpm install`, `yarn install` (Yarn classic or Berry), `npm ci`, or `bun install`, each in its frozen form so the lockfile is used exactly as committed |\n| Python | `uv.lock`, `poetry.lock`, `requirements.txt` | `uv sync` (frozen), `poetry install`, or `pip install` from `requirements.txt` |\n| Go | `go.mod` | Go is set up from `go.mod`. |\n\n- **Mixed repositories** get every language they have, in the order JavaScript, Python, Go.\n- **Versions.** Node comes from `.nvmrc`, then `.node-version`, otherwise Node 24. Python comes from `.python-version`, otherwise Python 3.12. pnpm uses the version in `package.json` `packageManager` when it is valid, otherwise pnpm 10. Yarn is classic or Berry according to `.yarnrc.yml`, `packageManager`, and the lockfile; Berry runs through Corepack, which uses the Yarn version your `package.json` declares, otherwise Yarn 4. Poetry is installed at a fixed version, and Bun at the latest 1.x release. Every action is pinned to a fixed major version.\n- **uv and Poetry** projects must declare development dependencies such as `pytest` in the project. Their environments are put on `PATH`, so your stored command runs unchanged inside the project environment.\n- **If Bridge cannot read a file it needs**, or `package.json` contradicts the lockfile (for example a `packageManager` for a different tool), setup reports the dependency setup as unknown and blocks the workflow. It does not guess.\n- **Upgrades are reviewed.** An older Bridge-written workflow is replaced through a pull request you merge, never silently. If a setup pull request from an earlier release is still open, merge or close it first; setup names it and leaves it alone.\n\n### When your command must be self-contained\n\nSome repositories get no automatic installation, and setup says so in plain words:\n\n- **Python with no `uv.lock`, `poetry.lock`, or `requirements.txt`** (for example only `pyproject.toml` or `Pipfile`) gets no Python installation. Add a supported file, or make the command install what it needs.\n- **Rust** uses the toolchain the CI runner already has. If that is not enough, install what you need inside the command.\n- **No lockfile, or a Make-only project**, shows as `none`: Bridge installs no dependencies, so the command must install them itself.\n\nA command that installs its own dependencies is always allowed. Nothing in the workflow adds to your command, wraps it, or sets a prefix in front of it.\n\n### Recover from a stale CLI\n\nAn old copy of the command line tool can print old wording or miss a flag such as `--test-command`. Bridge checks the npm registry for a newer release about once a day and says so at the start of a session. That notice only reports that a newer version exists; it cannot tell you which copy `npx` actually ran. Likely causes are a cached `npx` download or a project-local install that `npx` picked first. Neither is proven for any one machine.\n\n1. See which version ran: `npx -y @bridge_gpt/mcp-server doctor`. Its `Bridge MCP version:` line gives the installed version and the latest one, and says when an upgrade is available.\n2. Fetch the newest release by running through `@latest`: `npx -y @bridge_gpt/mcp-server@latest doctor`. The `Bridge MCP version:` line should now show the latest version.\n3. Refresh the installed command files: `npx -y @bridge_gpt/mcp-server@latest install`.\n4. Run setup again: `npx -y @bridge_gpt/mcp-server@latest install conductor`.\n5. If the output is still wrong, email info@bridgegpt.ai with the `Bridge MCP version:` line from step 1 and the setup output, with any secret removed.\n\n## 3. Define the epic\n\nIn Claude Code, run:\n\n```text\n/define-tickets\n```\n\nIt writes real child ticket keys, `epic-plan.dag.json`, and `epic-plan.meta.json`, then hands off to `/drive-epic-run`. The meta file is how the launch finds the plan from the epic key.\n\n## 4. Launch\n\nIn Claude Code, run:\n\n```text\n/drive-epic-run <EPIC> [<plan path>]\n```\n\nIt previews the launch, asks you once, creates the run through `drive-epic`, and drives the run to the end. From a shell, run the same launch yourself:\n\n```bash\nnpx -y @bridge_gpt/mcp-server drive-epic <EPIC>\n```\n\nAdd `--dry-run` for a read-only preview, or `--attended` to opt out of unattended merging. `drive-epic --help` lists the common options, and `drive-epic --help-advanced` lists the rest.\n\n## Advanced: the planner\n\n`/plan-epic` is the advanced planner. It writes placeholder `TBD-N` keys instead of real ones. You create the child tickets yourself, run `emit-epic-implementer-bundle finalize` to replace the placeholders and write the plan files, then run `/drive-epic-run`. Planning never creates or approves a run.\n\n## If something goes wrong\n\nEvery refusal names the missing item and its fix, and creates nothing. Run setup again after you fix an item. To stop a run that is already active, run `npx -y @bridge_gpt/mcp-server epic-implementer abandon-run --epic-run-id <id>`, replacing `<id>` with the run ID that `drive-epic` printed when it started the run. Abandoning a run is final. For a read-only report of every item, run `npx -y @bridge_gpt/mcp-server epic-implementer readiness --json`. If you are stuck, email info@bridgegpt.ai.\n",
|
|
14
14
|
".bridge/procedures/install-bridge-conductor-gate.md": "# Repository gate: what the agent may and may not do\n\nThis note is for a coding agent helping a human run `install-bridge conductor`\n(also spelled `install conductor`). It covers the **repository gate**: what must\npass before the Epic Implementer merges a child pull request.\n\nBridge copies this file into every installed project at\n`.bridge/procedures/install-bridge-conductor-gate.md`.\n\n## The one rule\n\n**You may explain gate candidates. You never confirm, clear, or write a gate.**\n\nThe gate decides what an unattended run may merge on its own. Only the\nrepository owner decides it. Concretely, you must not:\n\n- run `install-bridge conductor` with `--confirm-gate`, `--clear-gate`,\n `--provider-check`, `--required-check`, `--local-command`, `--gate-none`,\n `--migration-guard`, or `--customized-command` on the human's behalf;\n- answer the installer's gate prompts (\"Gate members\", \"Store this repository\n gate?\", \"Confirm this gate, including the removals above?\", \"Clear the\n confirmed repository gate?\");\n- call the gate-profile API (`PUT .../supervisor-setup/gate-profile/`) yourself.\n\nThese commands ask questions on a terminal. A shell you run has no terminal, so\nthe installer treats every question as \"no\" and stores nothing. Ask the human to\nrun them in their own terminal, then read what they paste back.\n\n## What a gate can be\n\n| Kind | What gates each child merge |\n|---|---|\n| `provider` | Named checks a CI provider reports (GitHub Actions, or any external CI that reports a check run or commit status). |\n| `local` | Commands the executor runs itself on the merge head. |\n| `mixed` | Both: every provider check AND every local command. |\n| `none` | Nothing. An unattended run is still admitted, but every child merge waits for approval. |\n\n## How the installer proposes a gate\n\nWith no gate flags and no confirmed gate stored, the installer prints a\n**Proposed repository gate** section. It comes from a deterministic scan of the\nworking tree plus the provider's real check history. It never guesses:\n\n- A provider check is proposed only when that exact name has actually reported\n on a recent default-branch commit or merged pull request.\n- A matrix job's reported name includes its matrix values, so it is listed as\n \"name may vary\" and never proposed. The human can type the exact reported\n name at the prompt.\n- CircleCI, Jenkins, and Buildkite configuration and Git hooks are evidence\n only. Hooks are never run as gate commands.\n- Local candidates come from `package.json` scripts, `Makefile` targets, and the\n Python test configuration. They run as plain argument lists, never through a\n shell.\n- \"Provider history unavailable\" means unknown, not absent. Say so plainly.\n- An empty repository gets an explicit `none` proposal.\n\nDiscovery saves nothing. A gate is stored only after the human confirms it.\n\n## How to help\n\n1. Read the proposal with the human. Explain each candidate's evidence and what\n the gate kind means for unattended merges.\n2. If they want a check that has not reported yet, tell them admission refuses\n it until it really reports, so they should run CI once.\n3. If the stored gate is shown beside a proposal that removes members, point out\n the removals. Fewer members means unattended runs merge with fewer checks.\n4. For a `local` or `mixed` gate, the commands must pass once under the\n executor before an unattended run is admitted. The installer offers this\n (\"Qualify gate now?\"). Later, the human runs\n `npx -y @bridge_gpt/mcp-server install-bridge conductor --qualify-gate`.\n A failed qualification does not fail the install. The gate simply stays\n unqualified, and readiness shows `local_command_unqualified` until a run\n passes.\n5. If the installer prints \"Bridge API update required\", the Bridge API server\n is too old to store a gate. Nothing was written. Tell the human; do not look\n for a workaround.\n\n## Return\n\nReport back to the human in plain words: the gate the installer proposed or\nstored, its kind, any removals it showed, and the qualification state it\nreported. Never report a gate as confirmed or qualified unless the installer's\nown output said so.\n"
|
|
15
15
|
};
|
|
16
16
|
export const DOC_METADATA = {
|