@bridge_gpt/mcp-server 0.2.67 → 0.2.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +272 -51
  2. package/build/agent-launchers/claude-executor-adapter.js +27 -0
  3. package/build/agents.generated.js +22 -2
  4. package/build/bitbucket-workspace-remote.js +136 -0
  5. package/build/bootstrap-project-identity.js +24 -0
  6. package/build/bridge-permissions.js +1362 -0
  7. package/build/check-update-cli.js +74 -0
  8. package/build/claude-settings.js +102 -2
  9. package/build/cli-help.js +27 -0
  10. package/build/codex-home.js +9 -1
  11. package/build/codex-launcher-pin.js +598 -0
  12. package/build/command-assets-doctor.js +24 -70
  13. package/build/command-provisioning.js +29 -5
  14. package/build/commands.generated.js +9 -9
  15. package/build/conductor/bridge-api-client.js +714 -0
  16. package/build/conductor/command-drift-production.js +92 -0
  17. package/build/conductor/command-drift.js +89 -0
  18. package/build/conductor/doctor.js +69 -26
  19. package/build/conductor/epic-branch-ci-inspection.js +1375 -0
  20. package/build/conductor/epic-implementer-cli.js +76 -22
  21. package/build/conductor/gate-discovery.js +890 -0
  22. package/build/conductor/install-doctor.js +15 -3
  23. package/build/conductor/json-output.js +63 -0
  24. package/build/conductor/readiness-cli.js +95 -10
  25. package/build/conductor/readiness-sections.js +369 -3
  26. package/build/conductor/readiness.js +211 -8
  27. package/build/conductor/recovery-cli.js +110 -4
  28. package/build/conductor/recovery-operations.js +99 -1
  29. package/build/connect-bitbucket-api.js +41 -6
  30. package/build/connect-bitbucket.js +106 -33
  31. package/build/connect-github-api.js +33 -14
  32. package/build/credential-store.js +207 -47
  33. package/build/docs.generated.js +57 -3
  34. package/build/doctor.js +198 -4
  35. package/build/drive-epic.js +45 -8
  36. package/build/epic-coherence-input.test-fixtures.js +4 -3
  37. package/build/epic-implementer-bin.js +1369 -25
  38. package/build/epic-workarounds-path.js +39 -0
  39. package/build/executor/cli.js +30 -0
  40. package/build/executor/completion-contract.js +20 -5
  41. package/build/executor/deps.js +4 -1
  42. package/build/executor/gate-qualification-job.js +499 -0
  43. package/build/executor/guarded-fast-forward-push.js +129 -0
  44. package/build/executor/http-client.js +43 -4
  45. package/build/executor/integration-job.js +122 -8
  46. package/build/executor/job-errors.js +8 -1
  47. package/build/executor/job-runner.js +589 -47
  48. package/build/executor/likely-tests.js +290 -0
  49. package/build/executor/live-worker-registry.js +1 -1
  50. package/build/executor/observation.js +31 -2
  51. package/build/executor/packaged-recipe.js +106 -0
  52. package/build/executor/permissions.js +115 -28
  53. package/build/executor/platform.js +1 -1
  54. package/build/executor/preflight.js +61 -12
  55. package/build/executor/process-containment.js +36 -12
  56. package/build/executor/process.js +15 -7
  57. package/build/executor/prompt-spec.js +33 -1
  58. package/build/executor/recently-failed-tests-file.js +71 -0
  59. package/build/executor/reconcile-overlap-job.js +41 -23
  60. package/build/executor/required-verification.js +1 -1
  61. package/build/executor/required-work-ledger.js +105 -17
  62. package/build/executor/retirement.js +69 -0
  63. package/build/executor/runner.js +114 -11
  64. package/build/executor/test-clock.js +15 -0
  65. package/build/executor/types.js +32 -0
  66. package/build/executor/viewer-tabs.js +58 -8
  67. package/build/executor/worker-command.js +23 -7
  68. package/build/executor/worker-diagnostics.js +37 -0
  69. package/build/executor/worker-finalization.js +31 -5
  70. package/build/executor/worker-guard-hook.js +179 -25
  71. package/build/executor/worker-log.js +4 -3
  72. package/build/executor/worker-verification-guidance.js +37 -0
  73. package/build/executor/worktree.js +88 -11
  74. package/build/first-build-advisory.js +97 -0
  75. package/build/generated-assets-advisory.js +14 -0
  76. package/build/generated-assets-catalog.js +66 -0
  77. package/build/generated-assets-context.js +46 -0
  78. package/build/generated-assets-dependencies.js +26 -0
  79. package/build/generated-assets-doctor.js +50 -0
  80. package/build/generated-assets-health.js +65 -0
  81. package/build/generated-assets-host.js +17 -0
  82. package/build/generated-assets-inventory.js +17 -0
  83. package/build/generated-assets-paths.js +60 -0
  84. package/build/generated-assets-publisher.js +133 -0
  85. package/build/generated-assets-remedy.js +25 -0
  86. package/build/generated-assets-repair.js +72 -0
  87. package/build/generated-assets-session.js +71 -0
  88. package/build/generated-assets-test-support.js +35 -0
  89. package/build/index.js +1109 -695
  90. package/build/init.js +54 -177
  91. package/build/install-bridge-conductor-gate.js +1372 -0
  92. package/build/install-bridge-conductor.js +289 -36
  93. package/build/install-bridge.js +722 -252
  94. package/build/launcher-config-inspection.js +184 -19
  95. package/build/mcp-host-targets.js +4 -0
  96. package/build/mcp-identity.js +7 -0
  97. package/build/mcp-install-state.js +50 -4
  98. package/build/merge-workflow-install.js +3 -4
  99. package/build/pipeline-utils.js +6 -2
  100. package/build/pipelines.generated.js +22 -142
  101. package/build/plan-execution-ledger.js +2 -32
  102. package/build/plane/manifest.js +16 -1
  103. package/build/plane/preflight.js +54 -1
  104. package/build/printed-remedy-commands.js +16 -1
  105. package/build/readme.generated.js +1 -1
  106. package/build/repair-assets.js +93 -0
  107. package/build/run-unit-tests-launcher.js +130 -49
  108. package/build/secret-redaction.js +33 -0
  109. package/build/session-upgrade-notice.js +86 -0
  110. package/build/setup-epic.js +108 -3
  111. package/build/start-tickets-prereqs.js +70 -16
  112. package/build/start-tickets.js +44 -5
  113. package/build/tool-call-advisory.js +162 -0
  114. package/build/tool-surface-gating.js +32 -57
  115. package/build/update-check.js +97 -16
  116. package/build/update-status.js +61 -71
  117. package/build/upgrade-advice.js +15 -11
  118. package/build/upgrade-cli.js +398 -17
  119. package/build/version.generated.js +3 -3
  120. package/build/worker-guard-hook-bin.js +3 -2
  121. package/build/worker-guard-hook-main.js +1 -1
  122. package/build/worktree-core.js +15 -2
  123. package/docs/EPIC-IMPLEMENTER-INSTALL.md +30 -12
  124. package/docs/EPIC-IMPLEMENTER.md +68 -2
  125. package/package.json +3 -3
  126. package/pipelines/greenfield-setup.json +4 -128
  127. package/pipelines/implement-ticket.json +3 -2
@@ -420,6 +420,13 @@ export async function createWorktreeForTicket(deps, key, branchOverrides, worktr
420
420
  };
421
421
  }
422
422
  const worktreePath = extractWorktreePath(result.stdout, deps.cwd, deps.platform);
423
+ if (behavior.postSwitch) {
424
+ const error = await behavior.postSwitch(worktreePath, branch);
425
+ if (error)
426
+ return { key, branch, status: "create-failed", error };
427
+ }
428
+ const resetTarget = async (target) => behavior.preReset
429
+ ? behavior.preReset(worktreePath, branch, target) : { ok: true, target };
423
430
  // BAPI-1367: a lineage-approved resume stops here. Retained commits and
424
431
  // uncommitted files ARE the work, so none of the destructive steps below
425
432
  // (reset, clean, base verification) may run.
@@ -431,7 +438,10 @@ export async function createWorktreeForTicket(deps, key, branchOverrides, worktr
431
438
  // `origin/<branch>`), so this only applies when the local branch pre-existed.
432
439
  // Run inside the switched worktree (the branch is checked out there).
433
440
  if (exists && behavior.freshenFromOrigin) {
434
- const resetError = await hardResetWorktree(deps, worktreePath, behavior.freshenFromOrigin);
441
+ const selected = await resetTarget(behavior.freshenFromOrigin);
442
+ if (!selected.ok)
443
+ return { key, branch, status: "create-failed", error: selected.error };
444
+ const resetError = await hardResetWorktree(deps, worktreePath, selected.target);
435
445
  if (resetError) {
436
446
  return { key, branch, status: "create-failed", error: resetError };
437
447
  }
@@ -447,7 +457,10 @@ export async function createWorktreeForTicket(deps, key, branchOverrides, worktr
447
457
  // branches) before this destructive reset. Absent branches were created
448
458
  // straight from `baseStartPoint`, so no alignment is needed there.
449
459
  if (exists && behavior.alignExistingBranchTo) {
450
- const resetError = await hardResetWorktree(deps, worktreePath, behavior.alignExistingBranchTo);
460
+ const selected = await resetTarget(behavior.alignExistingBranchTo);
461
+ if (!selected.ok)
462
+ return { key, branch, status: "create-failed", error: selected.error };
463
+ const resetError = await hardResetWorktree(deps, worktreePath, selected.target);
451
464
  if (resetError) {
452
465
  return { key, branch, status: "create-failed", error: resetError };
453
466
  }
@@ -211,7 +211,7 @@ checked, re-run readiness after credentials resolve.
211
211
  server: the required CI check each ticket must pass, merge approval, and the
212
212
  review policy. `drive-epic` refuses a repository without them
213
213
  (`supervisor_setup`, `supervisor_config`). With extra flags it also writes the
214
- `claude-review` workflow that step 6 needs, and it adds the Epic Implementer MCP
214
+ `claude-review` workflow when you opt in to AI review, and it adds the Epic Implementer MCP
215
215
  tools to your editor config.
216
216
 
217
217
  The subcommand is still named `install conductor` (the Epic Implementer's old
@@ -222,9 +222,17 @@ and to local files. It needs a real terminal.
222
222
 
223
223
  ### 5a. Choose the required check
224
224
 
225
- `--required-check` is **required**. It must be the exact name of a CI check run
226
- that GitHub reports on child PRs into `epic/<EPIC-KEY>`. A name that never
227
- reports leaves every ticket waiting forever.
225
+ The installer needs a **confirmed repository gate**: provider checks, local
226
+ commands the executor runs, both, or none. Without gate flags it uses a gate
227
+ already stored (an older `--required-check` setup counts), or it proposes one
228
+ from the working tree and the provider's real check history and asks the human
229
+ to confirm it. You may explain the proposal; you never confirm, clear, or write
230
+ a gate. Read `docs/install/install-bridge-conductor-gate.md` first.
231
+
232
+ `--required-check` is the common scripted form: it stores a confirmed provider
233
+ gate. It must be the exact name of a CI check run that GitHub reports on child
234
+ PRs into `epic/<EPIC-KEY>`. A name that never reports leaves every ticket
235
+ waiting forever.
228
236
 
229
237
  - **Unattended runs (the default):** the name must be a job `name:` written
230
238
  literally in `.github/workflows/epic-implementer-ci.yml` or
@@ -247,10 +255,11 @@ a test run. The review gate reads it separately.
247
255
  ### 5b. Choose the review workflow values
248
256
 
249
257
  `.github/workflows/claude-review.yml` produces the review verdict the review
250
- gate waits for. For unattended runs it must also emit two markers (`run-id:`
251
- and `Reviewed-SHA:`). This command writes a correct file when you pass **all
252
- three** of these flags. If one is missing, phase 3 prints a `skipped — …` line
253
- and writes nothing.
258
+ gate waits for **when you choose AI review** (`verdict_protocol`). For unattended
259
+ runs it must also emit two markers (`run-id:` and `Reviewed-SHA:`). This command
260
+ writes a correct file when you choose AI review and pass **all three** of these
261
+ flags. If one is missing, phase 3 prints a `skipped — …` line and writes nothing.
262
+ Without AI review you can skip this section.
254
263
 
255
264
  | Flag | Value |
256
265
  |---|---|
@@ -258,9 +267,17 @@ and writes nothing.
258
267
  | `--secret-name` | The **name** (not the value) of a GitHub Actions secret that holds a Claude Code OAuth token, for example `CLAUDE_CODE_OAUTH_TOKEN`. Upper-case letters, digits, and underscores only. |
259
268
  | `--branches` | The pull-request base branches to review: the default branch plus `epic/**`, for example `main,epic/**`. Child PRs target `epic/<EPIC-KEY>`, so without `epic/**` they are never reviewed. |
260
269
 
261
- The review policy defaults to `verdict_protocol`, which is the one that uses
262
- this workflow. You do not need to pass `--review-policy`. Passing it explicitly
263
- also stores it as the repository default.
270
+ Installation no longer defaults to `verdict_protocol`. If you omit
271
+ `--review-policy`, the command assumes `repository_policy`: it scaffolds **no**
272
+ Claude-review workflow and stores **no** repository review default. A new
273
+ feature-branch run then gets `repository_policy` from the server at its first
274
+ approval, when neither the run nor the repository sets a policy.
275
+
276
+ AI review is an explicit opt-in. Pass `--review-policy verdict_protocol` to
277
+ scaffold the workflow and store `verdict_protocol` as the repository choice.
278
+ Passing any value explicitly stores it as the repository default. A run that was
279
+ already approved without a stored policy is not changed: it still resolves to
280
+ `verdict_protocol` and still needs the workflow.
264
281
 
265
282
  If the repository already has a `claude-review.yml`, the command asks before
266
283
  overwriting it. An older or hand-written file may lack the markers. Readiness
@@ -295,7 +312,8 @@ terminal, from the repository root. It runs eight phases:
295
312
  2. A preview of the server settings, then "Write the safe project-default
296
313
  supervisor posture now?". If the change would remove an existing
297
314
  requirement, it asks a second, separate question.
298
- 3. The `claude-review` workflow (only with the three flags from 5b).
315
+ 3. The `claude-review` workflow (only with `--review-policy verdict_protocol` and the
316
+ three flags from 5b).
299
317
  4. **Tool visibility:** adds `epic_implementer` to `BRIDGE_MCP_PROFILE` in the
300
318
  Bridge entry of `.mcp.json`, `.vscode/mcp.json`, and `.cursor/mcp.json`. It
301
319
  only edits files that already have a Bridge entry. It never creates a file
@@ -88,7 +88,7 @@ attach, and `1` for refuse or stop.
88
88
  | `--into-base` | Opt out of the epic branch; child PRs target the base branch. |
89
89
  | `--attended` | Opt out of the unattended default (see below). |
90
90
  | `--policy-file <path>` | The **complete** run policy, applied when the run is created. |
91
- | `--review-policy <src>` | The review policy for this run only. |
91
+ | `--review-policy <src>` | The review policy for this run only: `repository_policy`, `verdict_protocol`, `native_review_decision`, or `none`. Omit it and the server stamps `repository_policy` at first approval for a new feature-branch run. `verdict_protocol` (AI review) is an explicit opt-in. An already-approved run with no stored policy is unchanged and still resolves to `verdict_protocol`. |
92
92
  | `--replace-policy` | Allow replacing a live run's stored policy with `--policy-file`. |
93
93
  | `--launch-profile <name>` | Use a host-local launch profile approved by `install conductor --launch-profile <name>`. `BAPI_EPIC_LAUNCH_PROFILE` selects one too; the flag wins. |
94
94
  | `--base-url <url>` | Explicit Bridge API target. It must agree with a profile. |
@@ -111,7 +111,7 @@ is created, and `drive-epic --dry-run` lists them:
111
111
  | --- | --- |
112
112
  | Repository consent | On by default. The repository owner can switch "Allow unattended Epic Implementer runs" off and on in the Bridge admin panel's Setup page. |
113
113
  | An escalation channel | A `--policy-file` that declares `notify.webhook_url`, **or** an email address on the account. `notify.local_sink` does not count. |
114
- | Repository readiness | `.github/workflows/claude-review.yml` and `.github/workflows/epic-implementer-ci.yml` confirmed on the default branch. The refusal names what is missing. |
114
+ | Repository readiness | `.github/workflows/epic-implementer-ci.yml` confirmed on the default branch, plus `.github/workflows/claude-review.yml` when the run uses AI review (`verdict_protocol`). A first-approval feature-branch run with no policy set needs no review workflow. The refusal names what is missing. |
115
115
 
116
116
  **Merge-execution eligibility.** If the repository cannot perform a merge without
117
117
  a standing write credential, `setup-epic` refuses with
@@ -218,6 +218,45 @@ neither `required_checks` nor `no_ci_gate`:
218
218
  passes without CI.
219
219
  3. Otherwise nothing is stamped.
220
220
 
221
+ **With a confirmed gate profile (BAPI-1390)** the stamp follows the profile
222
+ instead, and always records `gate_profile_revision` and a `gate_profile_snapshot`
223
+ that later profile edits never change:
224
+
225
+ | Profile kind | Stamped when no CI key and no node checks | Auto-merge |
226
+ |---|---|---|
227
+ | `provider` / `mixed` | `required_checks` = the confirmed provider checks | kept (`mixed` needs both executor rollout switches on) |
228
+ | `local` | `no_ci_gate: true`; each merge gated by executor verification of the profile's commands | kept on an epic-branch run with both switches on, else `false` (`local_gate_verification_disabled`) |
229
+ | `none` | `no_ci_gate: true` | always `false` — every child merge waits for `merge-child` |
230
+
231
+ A plan with node-level checks never gets `no_ci_gate` from the profile. An
232
+ operator `no_ci_gate` under `provider`/`mixed` is kept; under `none` with
233
+ auto-merge it is refused (`operator_ci_key_conflicts_with_gate`). A run-level or
234
+ plan-level `required_checks` that drops a confirmed provider check is refused.
235
+
236
+ **Gate-profile evidence bounds.** Before an unattended auto-merging run is
237
+ admitted, every confirmed provider check must have **reported** (passing or not)
238
+ on one of the last **12 default-branch commits** or **8 previously merged PR
239
+ heads** from the last **90 days**, read under a fixed request budget. PRs of the
240
+ run being admitted never count.
241
+
242
+ | Admission reason | Meaning | Remedy |
243
+ |---|---|---|
244
+ | `provider_check_unseen` | The named check never reported in that window | Make the check report on the default branch once, or edit the gate profile |
245
+ | `provider_evidence_unavailable` | The walk could not finish (rate limit, permission, truncation, moving head) | Retry readiness; escalate to Bridge operations if it persists |
246
+ | `local_command_unqualified` | No current passing executor qualification for the profile's revision and command digests | Qualify the local commands, then retry |
247
+ | `migration_guard_unset` | Root `alembic.ini` present and no confirmed member marked as the migration guard | Mark a confirmed check or command as `migration_guard` |
248
+
249
+ Readiness also shows two **warn-only** rows: a confirmed check not seen on PRs
250
+ into epic branches, and an epic-branch search that was unavailable. Neither
251
+ changes the admission verdict.
252
+
253
+ A history report proves a check **name** reported; it does **not** authenticate
254
+ which CI produced it. The current-head green check and the executor
255
+ verification still gate every merge, and a never-reported grandfathered check
256
+ cannot enable auto-merge. A repository configured before profiles (legacy
257
+ `--required-check`) keeps the two-file workflow path with no reinstall.
258
+ Rollback: pause new auto-merge admissions and roll forward.
259
+
221
260
  A run left with **no** effective check and **no** `no_ci_gate` declaration does
222
261
  not pass trivially. Its tickets **park** (`required_checks_empty_no_mode`). An
223
262
  auto-merge run on the base branch with no check parks as `required_checks_empty`.
@@ -660,3 +699,30 @@ or a missing `BAPI_EPIC_IMPLEMENTER_CLI_FILE`, returns the
660
699
  API server's event loop, so the server stays responsive during a parse. A
661
700
  merged ticket enters `parsing` and moves on only after the parse succeeds. A failed parse is retried within a budget and then parks the ticket
662
701
  as `needs_human`; it never silently wedges the epic.
702
+
703
+ ### Local likely-test discovery
704
+
705
+ Run `epic-implementer likely-tests --base <sha>` with the executor's immutable,
706
+ full 40-character comparison commit, after committing and before the first push.
707
+ Fallback: `npx -y -p @bridge_gpt/mcp-server epic-implementer likely-tests --base <sha>`.
708
+ Refresh after additional commits. Map references through the repository's declared
709
+ targeted runner; references are data, never commands.
710
+
711
+ This local read-only command returns zero even on invalid input or discovery failure.
712
+ Stdout contains only one reference per line; stderr contains fixed advisory notes.
713
+ Recent failures come first, then explicit `.bridge/verification-hints.json` pins,
714
+ then sorted tracked tests containing literal changed-path/import references.
715
+ Exact duplicates are removed before the 100-reference output limit.
716
+
717
+ The optional worker-worktree `.conductor/recently-failed-tests.json` is
718
+ `{"version":1,"tests":["most-recent-first reference"],"truncated":false}`. Child 3
719
+ owns writing it before each spawn. The shared parser keeps at most 20 references,
720
+ each at most 512 characters, without controls or line separators. Verification hints
721
+ use `{"version":1,"pins":[{"paths":["src/file.ts","src/package/"],"tests":["reference"]}]}`;
722
+ file paths match exactly and directory prefixes match directory boundaries.
723
+
724
+ Reads reject symlinks and traversal. Limits: 256 KiB per scanned or optional JSON
725
+ file, 16 MiB scanned text, 10,000 sorted candidates, 10 seconds per Git subprocess,
726
+ and 4 MiB Git output. Missing recent failures are silent. Disclose unavailable,
727
+ malformed, unreadable, truncated, or unmappable coverage in the existing handoff.
728
+ Retain available targeted verification; do not run a whole suite as fallback.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bridge_gpt/mcp-server",
3
- "version": "0.2.67",
3
+ "version": "0.2.69",
4
4
  "description": "Bridge API MCP server — exposes Jira endpoints as MCP tools for Claude Code agents",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,10 +24,10 @@
24
24
  "LICENSE"
25
25
  ],
26
26
  "//test": "The `test` script delegates to the bounded launcher (scripts/run-unit-tests.js → src/run-unit-tests-launcher.ts, BAPI-683), which discovers build/*.test.js at runtime and spawns them in size-bounded batches so the argv never exceeds Windows' ~8191-char command-line limit. Two determinism rules from the pre-launcher script are preserved INSIDE the launcher: (1) multi-file batches run WITHOUT --test-force-exit, because that flag makes node:test exit before aggregating per-subprocess summaries and the tally becomes nondeterministic (failures still surface and still set exit 1, but the count cannot be trusted as a completeness signal); (2) build/secret-safety.test.js leaks a handle that holds the event loop ~60s after its tests finish (they run in ~147ms), so the launcher quarantines it into its own single-file --test-force-exit invocation (FORCE_EXIT_QUARANTINE in src/run-unit-tests-launcher.ts) where the tally stays exact. Do NOT add --test-force-exit to batched invocations, and do NOT remove the quarantine, until the underlying handle leak is fixed.",
27
- "//version": "BAPI-930: fired by `npm version <level>` AFTER npm rewrites package.json's version field, so the bumped version and the repinned README land in the SAME commit. A bump performed by hand-editing package.json instead of running `npm version` bypasses this hook entirely and must repin manually via `node scripts/sync-readme-host-examples.js` — the `--check` wired into `build` below is the backstop that catches that case.",
27
+ "//version": "BAPI-930: fired by `npm version <level>` AFTER npm rewrites package.json's version field, so the bumped version, repinned README and version-rendered command mirrors land in the SAME commit. A bump performed by hand-editing package.json instead of running `npm version` bypasses this hook entirely and must repin manually via `node scripts/sync-readme-host-examples.js` and `node ../commands/build.js` — the `--check` wired into `build` below is the backstop that catches that case.",
28
28
  "scripts": {
29
29
  "build": "node scripts/bundle-version.js && node scripts/sync-readme-host-examples.js --check && node scripts/validate-packaged-command-references.js && node scripts/bundle-readme.js && node scripts/bundle-pipelines.js && node scripts/bundle-commands.js && node scripts/bundle-agents.js && node scripts/bundle-docs.js && node scripts/bundle-agent-guidance.js && tsc && node scripts/sync-readme-merge-workflow.js --check && node scripts/sync-agent-mirrors.js && node scripts/bundle-esbuild.js",
30
- "version": "node scripts/sync-readme-host-examples.js --write && git add -- README.md package.json package-lock.json && git commit -m \"chore(mcp-server): release $npm_package_version\" && git tag \"mcp-server/v$npm_package_version\"",
30
+ "version": "node scripts/sync-readme-host-examples.js --write && node ../commands/build.js && git add -- ../.claude/commands ../.cursor/commands .claude/commands && git add -- README.md package.json package-lock.json && git commit -m \"chore(mcp-server): release $npm_package_version\" && git tag \"mcp-server/v$npm_package_version\"",
31
31
  "check:version-generated": "node scripts/bundle-version.js && node scripts/check-version-generated.js",
32
32
  "assert:release-identity": "node scripts/assert-release-identity.js",
33
33
  "postbuild": "node scripts/prepend-shebang.cjs",
@@ -147,134 +147,10 @@
147
147
  "description": "Draft the project standards from the committed framing and take one approval"
148
148
  },
149
149
  {
150
- "type": "mcp_call",
151
- "id": "upload_architecture_instructions",
152
- "tool": "config_field",
153
- "params": {
154
- "field_name": "architecture_instructions",
155
- "file_path": "{docs_dir}/greenfield/{repo_name}/standards/architecture_instructions.md",
156
- "operation": "update",
157
- "only_if_null": true
158
- },
159
- "description": "Save the architecture standard",
160
- "on_error": "warn_and_continue"
161
- },
162
- {
163
- "type": "mcp_call",
164
- "id": "upload_review_instructions",
165
- "tool": "config_field",
166
- "params": {
167
- "field_name": "review_instructions",
168
- "file_path": "{docs_dir}/greenfield/{repo_name}/standards/review_instructions.md",
169
- "operation": "update",
170
- "only_if_null": true
171
- },
172
- "description": "Save the code-review standard",
173
- "on_error": "warn_and_continue"
174
- },
175
- {
176
- "type": "mcp_call",
177
- "id": "upload_documentation_instructions",
178
- "tool": "config_field",
179
- "params": {
180
- "field_name": "documentation_instructions",
181
- "file_path": "{docs_dir}/greenfield/{repo_name}/standards/documentation_instructions.md",
182
- "operation": "update",
183
- "only_if_null": true
184
- },
185
- "description": "Save the documentation standard",
186
- "on_error": "warn_and_continue"
187
- },
188
- {
189
- "type": "mcp_call",
190
- "id": "upload_unit_testing_instructions",
191
- "tool": "config_field",
192
- "params": {
193
- "field_name": "unit_testing_instructions",
194
- "file_path": "{docs_dir}/greenfield/{repo_name}/standards/unit_testing_instructions.md",
195
- "operation": "update",
196
- "only_if_null": true
197
- },
198
- "description": "Save the unit-testing standard",
199
- "on_error": "warn_and_continue"
200
- },
201
- {
202
- "type": "mcp_call",
203
- "id": "upload_e2e_testing_instructions",
204
- "tool": "config_field",
205
- "params": {
206
- "field_name": "e2e_testing_instructions",
207
- "file_path": "{docs_dir}/greenfield/{repo_name}/standards/e2e_testing_instructions.md",
208
- "operation": "update",
209
- "only_if_null": true
210
- },
211
- "description": "Save the end-to-end testing standard",
212
- "on_error": "warn_and_continue"
213
- },
214
- {
215
- "type": "mcp_call",
216
- "id": "upload_frontend_correctness_standards",
217
- "tool": "config_field",
218
- "params": {
219
- "field_name": "frontend_correctness_standards",
220
- "file_path": "{docs_dir}/greenfield/{repo_name}/standards/frontend_correctness_standards.md",
221
- "operation": "update",
222
- "only_if_null": true
223
- },
224
- "description": "Save the frontend correctness standard",
225
- "on_error": "warn_and_continue"
226
- },
227
- {
228
- "type": "mcp_call",
229
- "id": "upload_backend_correctness_standards",
230
- "tool": "config_field",
231
- "params": {
232
- "field_name": "backend_correctness_standards",
233
- "file_path": "{docs_dir}/greenfield/{repo_name}/standards/backend_correctness_standards.md",
234
- "operation": "update",
235
- "only_if_null": true
236
- },
237
- "description": "Save the backend correctness standard",
238
- "on_error": "warn_and_continue"
239
- },
240
- {
241
- "type": "mcp_call",
242
- "id": "upload_template_correctness_standards",
243
- "tool": "config_field",
244
- "params": {
245
- "field_name": "template_correctness_standards",
246
- "file_path": "{docs_dir}/greenfield/{repo_name}/standards/template_correctness_standards.md",
247
- "operation": "update",
248
- "only_if_null": true
249
- },
250
- "description": "Save the template correctness standard",
251
- "on_error": "warn_and_continue"
252
- },
253
- {
254
- "type": "mcp_call",
255
- "id": "upload_style_correctness_standards",
256
- "tool": "config_field",
257
- "params": {
258
- "field_name": "style_correctness_standards",
259
- "file_path": "{docs_dir}/greenfield/{repo_name}/standards/style_correctness_standards.md",
260
- "operation": "update",
261
- "only_if_null": true
262
- },
263
- "description": "Save the style correctness standard",
264
- "on_error": "warn_and_continue"
265
- },
266
- {
267
- "type": "mcp_call",
268
- "id": "upload_design_principles",
269
- "tool": "config_field",
270
- "params": {
271
- "field_name": "design_principles",
272
- "file_path": "{docs_dir}/greenfield/{repo_name}/standards/design_principles.md",
273
- "operation": "update",
274
- "only_if_null": true
275
- },
276
- "description": "Save the design principles",
277
- "on_error": "warn_and_continue"
150
+ "type": "agent_task",
151
+ "id": "upload_approved_standards",
152
+ "instruction_file": "greenfield-upload-approved-standards.md",
153
+ "description": "Upload only standards explicitly approved in the current synthesis result and report partial failures"
278
154
  },
279
155
  {
280
156
  "type": "agent_task",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "implement-ticket",
3
3
  "description": "Initial feature workflow: generate a plan, produce artifacts, checkpoint to origin, verify, commit, open a PR, close post-PR gaps, and monitor CI. Re-entry of this initial workflow may reuse a fresh plan, but remaining-work corrections and continuations use versioned focused intent on the retained branch and never re-enter this recipe.",
4
- "variables": ["ticket_key", "docs_dir", "provider"],
4
+ "variables": ["ticket_key", "docs_dir", "provider", "verification_scope"],
5
5
  "steps": [
6
6
  {
7
7
  "type": "mcp_call",
@@ -23,7 +23,7 @@
23
23
  {
24
24
  "type": "agent_task",
25
25
  "instruction_file": "execute-plan.md",
26
- "description": "Produce the plan's implementation artifacts"
26
+ "description": "Produce the plan's implementation artifacts. Under the Epic Implementer, a minor requirement that cannot be met unattended gets a guarded workaround plus a record at .bridge/epic-workarounds/<TICKET>.md, committed on the ticket branch with git add -f; a core requirement is never worked around and is left unfinished so the run parks the ticket."
27
27
  },
28
28
  {
29
29
  "type": "agent_task",
@@ -69,6 +69,7 @@
69
69
  "on_error": "warn_and_continue"
70
70
  },
71
71
  {
72
+ "id": "monitor-ci-checks",
72
73
  "type": "agent_task",
73
74
  "instruction_file": "monitor-ci-checks.md",
74
75
  "description": "Monitor CI checks and report results"