@bridge_gpt/mcp-server 0.2.66 → 0.2.68

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 (171) hide show
  1. package/README.md +421 -83
  2. package/build/agent-capabilities/probes.js +15 -5
  3. package/build/agent-launchers/claude-executor-adapter.js +70 -16
  4. package/build/agent-launchers/executor-adapter.js +7 -4
  5. package/build/agents.generated.js +22 -2
  6. package/build/bitbucket-workspace-remote.js +136 -0
  7. package/build/bootstrap-project-identity.js +24 -0
  8. package/build/bounded-wait.js +67 -10
  9. package/build/bridge-permissions.js +829 -0
  10. package/build/claude-settings.js +18 -0
  11. package/build/cli-help.js +21 -0
  12. package/build/command-assets-doctor.js +24 -70
  13. package/build/command-provisioning.js +29 -5
  14. package/build/commands.generated.js +12 -12
  15. package/build/conductor/bridge-api-client.js +857 -1
  16. package/build/conductor/bring-up-facts.js +1 -1
  17. package/build/conductor/command-drift-production.js +92 -0
  18. package/build/conductor/command-drift.js +89 -0
  19. package/build/conductor/doctor.js +72 -29
  20. package/build/conductor/epic-branch-ci-inspection.js +1375 -0
  21. package/build/conductor/epic-implementer-cli.js +98 -28
  22. package/build/conductor/errors.js +4 -3
  23. package/build/conductor/gate-discovery.js +890 -0
  24. package/build/conductor/guided-repair.js +6 -2
  25. package/build/conductor/hook-runtime-qualification.js +1 -1
  26. package/build/conductor/install-doctor.js +15 -3
  27. package/build/conductor/json-output.js +63 -0
  28. package/build/conductor/merge-execution-contract.js +27 -8
  29. package/build/conductor/merge-execution-eligibility.js +3 -2
  30. package/build/conductor/pr-ci-producer.js +1 -1
  31. package/build/conductor/readiness-cli.js +113 -12
  32. package/build/conductor/readiness-sections.js +410 -9
  33. package/build/conductor/readiness.js +388 -33
  34. package/build/conductor/recovery-cli.js +310 -12
  35. package/build/conductor/recovery-operations.js +167 -3
  36. package/build/conductor/repair-contract.js +54 -3
  37. package/build/conductor/repository-workflow-remedy.js +125 -0
  38. package/build/conductor/tools.js +2 -2
  39. package/build/conductor-bundle-artifacts.js +8 -0
  40. package/build/connect-bitbucket-api.js +41 -6
  41. package/build/connect-bitbucket.js +106 -33
  42. package/build/credential-store.js +207 -47
  43. package/build/docs.generated.js +62 -3
  44. package/build/doctor.js +92 -1
  45. package/build/drive-epic-key.js +6 -5
  46. package/build/drive-epic.js +129 -61
  47. package/build/epic-coherence-input.js +2 -1
  48. package/build/epic-coherence-input.test-fixtures.js +4 -3
  49. package/build/epic-implementer-bin.js +1379 -28
  50. package/build/epic-implementer-bundle-cli.js +2 -2
  51. package/build/epic-workarounds-path.js +39 -0
  52. package/build/executor/cli.js +33 -2
  53. package/build/executor/completion-contract.js +66 -10
  54. package/build/executor/completion-supervision.js +4 -0
  55. package/build/executor/deps.js +4 -1
  56. package/build/executor/env.js +19 -0
  57. package/build/executor/gate-qualification-job.js +499 -0
  58. package/build/executor/guarded-fast-forward-push.js +129 -0
  59. package/build/executor/heartbeat.js +1 -1
  60. package/build/executor/http-client.js +20 -0
  61. package/build/executor/integration-job.js +122 -8
  62. package/build/executor/job-errors.js +33 -1
  63. package/build/executor/job-runner.js +813 -87
  64. package/build/executor/likely-tests.js +290 -0
  65. package/build/executor/live-worker-registry.js +1 -1
  66. package/build/executor/observation.js +37 -3
  67. package/build/executor/packaged-recipe.js +106 -0
  68. package/build/executor/permissions.js +115 -28
  69. package/build/executor/platform.js +1 -1
  70. package/build/executor/preflight.js +112 -26
  71. package/build/executor/process-containment.js +36 -12
  72. package/build/executor/process.js +15 -7
  73. package/build/executor/prompt-spec.js +33 -1
  74. package/build/executor/recently-failed-tests-file.js +71 -0
  75. package/build/executor/reconcile-overlap-job.js +41 -23
  76. package/build/executor/required-verification.js +1 -1
  77. package/build/executor/required-work-ledger.js +111 -18
  78. package/build/executor/resume-pre-spawn.js +2 -0
  79. package/build/executor/retirement.js +69 -0
  80. package/build/executor/runner.js +122 -13
  81. package/build/executor/service-unit.js +7 -1
  82. package/build/executor/test-clock.js +15 -0
  83. package/build/executor/types.js +32 -0
  84. package/build/executor/viewer-tabs.js +58 -8
  85. package/build/executor/worker-command.js +23 -7
  86. package/build/executor/worker-diagnostics.js +37 -0
  87. package/build/executor/worker-finalization.js +113 -34
  88. package/build/executor/worker-guard-hook.js +316 -58
  89. package/build/executor/worker-log.js +4 -3
  90. package/build/executor/worker-verification-guidance.js +37 -0
  91. package/build/executor/worktree.js +166 -8
  92. package/build/first-build-advisory.js +97 -0
  93. package/build/generated-assets-advisory.js +14 -0
  94. package/build/generated-assets-catalog.js +66 -0
  95. package/build/generated-assets-context.js +46 -0
  96. package/build/generated-assets-dependencies.js +26 -0
  97. package/build/generated-assets-doctor.js +50 -0
  98. package/build/generated-assets-health.js +65 -0
  99. package/build/generated-assets-host.js +17 -0
  100. package/build/generated-assets-inventory.js +17 -0
  101. package/build/generated-assets-paths.js +60 -0
  102. package/build/generated-assets-publisher.js +133 -0
  103. package/build/generated-assets-remedy.js +25 -0
  104. package/build/generated-assets-repair.js +72 -0
  105. package/build/generated-assets-session.js +71 -0
  106. package/build/generated-assets-test-support.js +35 -0
  107. package/build/index.js +1224 -1054
  108. package/build/init.js +54 -177
  109. package/build/install-bridge-conductor-gate.js +1372 -0
  110. package/build/install-bridge-conductor.js +296 -41
  111. package/build/install-bridge.js +547 -40
  112. package/build/mcp-install-state.js +50 -4
  113. package/build/merge-workflow-install.js +3 -4
  114. package/build/phase-context-git-probe.js +68 -0
  115. package/build/phase-result-artifacts.js +173 -5
  116. package/build/pipeline-utils.js +6 -2
  117. package/build/pipelines.generated.js +34 -160
  118. package/build/plan-execution-ledger.js +2 -32
  119. package/build/plane/alembic-head.js +12 -3
  120. package/build/plane/base-worktree-guard.js +147 -0
  121. package/build/plane/cli.js +217 -17
  122. package/build/plane/code-snapshot.js +468 -0
  123. package/build/plane/defaults.js +48 -3
  124. package/build/plane/endpoint.js +41 -0
  125. package/build/plane/manifest.js +136 -2
  126. package/build/plane/member-roster.js +94 -19
  127. package/build/plane/preflight.js +83 -2
  128. package/build/plane/process-cwd.js +67 -0
  129. package/build/plane/restart.js +542 -0
  130. package/build/plane/shutdown.js +31 -0
  131. package/build/plane/status.js +143 -8
  132. package/build/plane/supervisor.js +586 -179
  133. package/build/plane/types.js +54 -2
  134. package/build/printed-remedy-commands.js +52 -0
  135. package/build/readiness-check.js +1 -1
  136. package/build/readme.generated.js +1 -1
  137. package/build/repair-assets.js +93 -0
  138. package/build/review-generation.js +22 -0
  139. package/build/run-unit-tests-launcher.js +130 -49
  140. package/build/secret-redaction.js +33 -0
  141. package/build/setup-epic.js +152 -22
  142. package/build/sfcc/config.js +9 -0
  143. package/build/sfcc/credentials.js +100 -38
  144. package/build/sfcc/hostname.js +67 -0
  145. package/build/sfcc/permissions.js +17 -13
  146. package/build/sfcc/register.js +1 -1
  147. package/build/sfcc/tool-wrapper.js +39 -43
  148. package/build/sfcc/write-grants.js +17 -11
  149. package/build/sfcc/write-result.js +4 -3
  150. package/build/sfcc/writes-site-preference.js +20 -8
  151. package/build/start-tickets-prereqs.js +70 -16
  152. package/build/start-tickets.js +208 -36
  153. package/build/tool-error-envelope.js +61 -0
  154. package/build/tool-surface-gating.js +36 -0
  155. package/build/upgrade-cli.js +55 -1
  156. package/build/version.generated.js +3 -3
  157. package/build/visual-diff.js +22 -1
  158. package/build/worker-guard-hook-bin.js +4 -6
  159. package/build/worker-guard-hook-main.js +47 -0
  160. package/build/worktree-core.js +145 -6
  161. package/docs/EPIC-IMPLEMENTER-INSTALL.md +867 -0
  162. package/docs/EPIC-IMPLEMENTER.md +728 -0
  163. package/docs/install/mcp-tool-integrations.md +24 -15
  164. package/docs/install/sfcc-integration.md +12 -4
  165. package/package.json +3 -3
  166. package/pipelines/greenfield-setup.json +4 -128
  167. package/pipelines/implement-ticket.json +3 -2
  168. package/pipelines/plan-epic.json +0 -5
  169. package/pipelines/review-ticket.json +1 -1
  170. package/docs/CONDUCTOR.md +0 -605
  171. package/pipelines/idea-to-pr.json +0 -49
@@ -44,7 +44,6 @@ marked **— none**.
44
44
  | **SFCC WebDAV logs** | WebDAV log credentials (separate from OCAPI) plus the `sfcc_log_monitor_enabled` flag. | `sfcc_webdav_hostname/username/access_key`, `sfcc_log_monitor_enabled` |
45
45
  | **Deep-research flag** | The `deep_research_enabled` config flag on the project (403 otherwise). Web research runs via Gemini/OpenAI. | `config_projects.deep_research_enabled` |
46
46
  | **Image provider** | An image model provider (OpenAI DALL·E / Google Imagen). | platform provider config |
47
- | **Conductor ledger** | The local conductor event ledger (`~/.config/bridge/events.db`) — a local file, not a remote service. | local file |
48
47
 
49
48
  ## Profiles (a form of BLOCK)
50
49
 
@@ -56,13 +55,13 @@ activated. `core` is always implicitly included.
56
55
  | Profile | Registered when |
57
56
  |---|---|
58
57
  | `core` | always |
59
- | `pipeline-authoring` | `BRIDGE_MCP_PROFILE` includes `pipeline-authoring` or `full` |
60
- | `conductor` | includes `conductor` or `full` |
61
- | `sfcc` | includes `sfcc` or `full` — the OCAPI **read** tools and `sfcc_log_query` (2 diagnostics ship in `core`) |
58
+ | `epic_implementer` | includes `epic_implementer` or `full` — the Epic Implementer run tools. The old token `conductor` is not valid and is dropped |
59
+ | `estimation` | includes `estimation` or `full` — `estimate_epic` |
60
+ | `pipeline-authoring` | includes `pipeline-authoring` or `full` — registers **no** tools since BAPI-909; still accepted so old configs keep working |
61
+ | `sfcc` | includes `sfcc` or `full` — the OCAPI **read** tools, `sfcc_log_query`, and the two SFCC diagnostics |
62
62
  | `sfcc-write` | includes `sfcc-write` or `full` — the destructive SFCC **write** tools. Independent of `sfcc`: neither group implies the other (BAPI-817) |
63
63
 
64
- The `pipeline-authoring` tools live in `index.ts` alongside core, gated by
65
- `ACTIVE_GROUPS.has("pipeline-authoring")`.
64
+ `get_pipeline_recipe` was never gated by `pipeline-authoring`; it is a `core` tool.
66
65
 
67
66
  > **This document deliberately states no tool counts.** Counts drift on every
68
67
  > ticket that adds or moves a tool, and nothing here is generated, so a number
@@ -147,7 +146,14 @@ by tier.
147
146
 
148
147
  | Tool | Dependencies (class) |
149
148
  |---|---|
150
- | `estimate_epic` | Jira **[BLOCK]** (resolves the repo from `jira_ticket_key`); no code-index dep |
149
+ | `estimate_epic` | Jira **[BLOCK]** (resolves the repo from `jira_ticket_key`); no code-index dep; registered only under the `estimation` profile |
150
+
151
+ **Epic Implementer eligibility:**
152
+
153
+ | Tool | Dependencies (class) |
154
+ |---|---|
155
+ | `assess_epic_implementer_eligibility` | — none (read-only; predicts which epic children change workflow files from their text; needs no VCS or code index; fails open to `status: "unavailable"`) |
156
+ | `assess_epic_conductor_eligibility` | — none (retired name; always returns `tool_removed` / 410 naming `assess_epic_implementer_eligibility`) |
151
157
 
152
158
  ### Repository parse / index — VCS
153
159
 
@@ -247,21 +253,24 @@ Constraints worth knowing before calling it:
247
253
  authoritative, so a tool-side pass followed by a server refusal is expected for a
248
254
  legacy approved comment that carries no head proof.
249
255
 
250
- ## `conductor` profile
256
+ ## `epic_implementer` profile
251
257
 
252
- Profile-gated **[BLOCK]** to register. The local conductor ledger
253
- (`~/.config/bridge/events.db`) is now driven by the `conductor` CLI and the git hooks
254
- rather than by MCP tools, so only the epic snapshot remains registered here.
258
+ Profile-gated **[BLOCK]** to register. Both tools are read-only and need an Epic
259
+ Implementer run to exist; for an unknown epic or run they return
260
+ `status: "unknown"` rather than an error. The local event ledger
261
+ (`~/.config/bridge/events.db`) is driven by the `epic-implementer` CLI and the git
262
+ hooks, not by MCP tools.
255
263
 
256
264
  | Tool | Dependencies (class) |
257
265
  |---|---|
258
- | `get_epic_snapshot` | Profile-gated **[BLOCK]** · Bridge API epic snapshot (Jira epic keys) |
266
+ | `get_epic_snapshot` | Profile-gated **[BLOCK]** · Bridge API epic run state (by epic key) |
267
+ | `explain_run` | Profile-gated **[BLOCK]** · Bridge API epic run state (by run id or epic key; `ticket_key` narrows it) |
259
268
 
260
269
  ---
261
270
 
262
271
  ## `sfcc` group
263
272
 
264
- ### Always-on diagnostics (ship in `core`)
273
+ ### Diagnostics (gated behind the `sfcc` group since BAPI-912)
265
274
 
266
275
  | Tool | Dependencies (class) |
267
276
  |---|---|
@@ -273,7 +282,7 @@ rather than by MCP tools, so only the epic snapshot remains registered here.
273
282
  All are profile-gated **[BLOCK]** to register, and all require SFCC OCAPI creds +
274
283
  `version` config + a reachable sandbox → SFCC OCAPI **[BLOCK]**.
275
284
 
276
- Every SFCC tool — including the two always-on diagnostics above — additionally
285
+ Every SFCC tool — including the two diagnostics above — additionally
277
286
  crosses the resolved-hostname sandbox boundary at invocation time: if the host
278
287
  the credentials resolve to is not a recognized developer sandbox, the call is
279
288
  refused with `403 TARGET_NOT_SANDBOX` before any request leaves the machine
@@ -331,7 +340,7 @@ wanting both selects `sfcc,sfcc-write` (or `full`).
331
340
  | **SFCC OCAPI** | `check_permissions` + every gated SFCC read and write tool | — |
332
341
  | **SFCC WebDAV logs** | `sfcc_log_query` | — |
333
342
  | **Deep-research flag** | `request_deep_research`, `get_deep_research` | — |
334
- | **Profile gating** | all `pipeline-authoring`, `conductor`, `sfcc`, and `sfcc-write` tools | — |
343
+ | **Profile gating** | all `epic_implementer`, `estimation`, `sfcc`, and `sfcc-write` tools | — |
335
344
 
336
345
  ## Notes & caveats
337
346
 
@@ -80,13 +80,20 @@ future work. No `delete` is granted, because no shipped write tool performs one;
80
80
  { "resource_id": "/system_object_definitions", "methods": ["get"], "read_attributes": "(**)", "write_attributes": "(**)" },
81
81
  { "resource_id": "/system_object_definitions/**", "methods": ["get", "put", "patch"], "read_attributes": "(**)", "write_attributes": "(**)" },
82
82
  { "resource_id": "/custom_object_definitions/**", "methods": ["get", "put", "patch"], "read_attributes": "(**)", "write_attributes": "(**)" },
83
- { "resource_id": "/site_preferences/**", "methods": ["get", "patch"], "read_attributes": "(**)", "write_attributes": "(**)" }
83
+ { "resource_id": "/sites/*/site_preferences/**", "methods": ["get", "patch"], "read_attributes": "(**)", "write_attributes": "(**)" }
84
84
  ]
85
85
  }
86
86
  ```
87
87
 
88
88
  Notes:
89
89
 
90
+ - Value writes (`site_preference_values_set`) are site-scoped: they need the mutation
91
+ resource `/sites/*/site_preferences/**`. The read/search grant keeps the org-level
92
+ `/site_preferences/**`. **If you pasted an earlier mutation grant, it lacks the
93
+ site-scoped resource.** Replace `<YOUR_CLIENT_ID>` with your client id in the newly
94
+ printed grant (`check_permissions` prints it) and paste it again before running
95
+ value writes.
96
+ - `check_permissions` probes a GET only. It shows read access, not write access.
90
97
  - The `client_id` **must match** the Account Manager API client whose credentials you
91
98
  put in `dw.json` / `SFCC_*` below. Replace the value above with your own client id if
92
99
  it differs.
@@ -127,9 +134,10 @@ Create a `dw.json` in your project root (auto-added to git exclude — never com
127
134
  ```
128
135
 
129
136
  Accepted key spellings: `hostname`/`host`, `client-id`/`clientId`/`client_id`,
130
- `client-secret`/`clientSecret`/`client_secret`. Use a single config — a multi-entry
131
- `configs[]` array is rejected outright, not worked around with an explicit `instance`
132
- (see the README's SFCC section for why). Alternatively, export
137
+ `client-secret`/`clientSecret`/`client_secret`. A single config is simplest. With a
138
+ multi-entry `configs[]` array, pass one of the listed sandbox hostnames as `instance`
139
+ and that config's credentials are used (an unapproved host is refused before any
140
+ credential lookup); without an `instance` the call fails as `multi-sandbox`. Alternatively, export
133
141
  `SFCC_HOSTNAME` / `SFCC_CLIENT_ID` / `SFCC_CLIENT_SECRET` in the MCP server environment.
134
142
 
135
143
  ## 3. Set the repo `version` config field
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bridge_gpt/mcp-server",
3
- "version": "0.2.66",
3
+ "version": "0.2.68",
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"
@@ -54,11 +54,6 @@
54
54
  "type": "agent_task",
55
55
  "instruction_file": "write-epic-summary.md",
56
56
  "description": "Write epic overview and summary document"
57
- },
58
- {
59
- "type": "agent_task",
60
- "instruction_file": "store-and-approve-epic-plan.md",
61
- "description": "Create epic run, store the plan DAG, and approve it in the backend"
62
57
  }
63
58
  ]
64
59
  }
@@ -30,7 +30,7 @@
30
30
  {
31
31
  "type": "agent_task",
32
32
  "id": "wait-for-ticket-review",
33
- "instruction": "FIRST, check whether a review was actually submitted. The previous step runs with `on_error: warn_and_continue`, so a rejected submission (a 402, 403 or 500 from the generate endpoint, or a dropped connection) lets the pipeline continue into this step. If that step returned an error message rather than its submission confirmation or a `recovery_get` envelope, do NOT wait: nothing is running, and `wait_for_ticket_review` cannot tell \"never submitted\" from \"still running\" \u2014 it would read `pending` in every window until the caller's own timeout. Treat a failed submission as a terminal failure, report the error the previous step gave, and take the verdict contract's `revise` path.\n\nOtherwise, wait for the review submitted by the previous step to finish, using repeated BOUNDED windows.\n\nCall `wait_for_ticket_review` with `ticket_number` set to the ticket key. Each call uses the default 20-second window (set `budget_ms: 20000` explicitly if needed); do not use a longer window, because some MCP clients time out before a pending result arrives. The tool returns a JSON body with a `state` field:\n\n- `state: \"pending\"` \u2014 NORMAL and expected. The review is still running. Call the tool again immediately. Do NOT sleep, do NOT poll in a shell loop, and do NOT re-run `request_ticket_review`: re-submitting starts a second billable multi-model review and abandons the one already in flight.\n- `state: \"ready\"` \u2014 the review is over. BAPI-1121: a ready result has ALREADY persisted exactly the accepted documents and reconciled the canonical source files \u2014 it writes every leg in `saved_legs` to its canonical path and removes the stale canonical file for every leg in `withheld_legs`. Do NOT call `get_clarifying_questions` or `get_ticket_critique` after a ready result; those retrieval calls were removed from this recipe because reading them again could reintroduce exactly the stale content the wait just withheld. Treat `saved_legs` as the authoritative source set for the next steps, not file presence.\n - `freshness_basis: \"generation\"` is the normal case: `advanced_legs`/`saved_legs` are current-review evidence, proven newer than the submission. Any leg in `withheld_legs` was delivered but NOT proven current \u2014 surface its `reason` (`generation_not_advanced` or `identity_unreadable`) as a visible warning; do not describe the result as an ordinary cost-saved one-leg review when a withholding occurred. A leg in `absent_legs` with `reason: \"not_delivered\"` is an ordinary policy omission (e.g. an Easy-ticket clarify-only review) unless its status also flags it as policy-expected, in which case call that out too.\n - `freshness_basis: \"terminality_only\"` means no submission baseline was available (e.g. a resumed session) \u2014 `advanced_legs` is empty by construction and `saved_legs` was accepted on terminal delivery alone. Surface this prominently as a DEGRADED-freshness warning: the saved artifact(s) may be indistinguishable from a prior attachment, and the downstream identity-footer agreement check is the remaining backstop. Retain this warning when reporting to the next steps rather than treating a `terminality_only` ready result as equivalent to a `generation`-backed one.\n - If the result instead carries `state: \"error\"` alongside a persistence failure (an `ARTIFACT_PERSISTENCE_FAILED` `error`/`status`/`message` envelope), HALT rather than proceeding with whatever files happen to exist on disk \u2014 report the failure; the accepted legs already on disk before the failure are named in the envelope and are not lost, but nothing new was persisted for this window.\n- `state: \"error\"` \u2014 terminal. Report the `reason` and stop; the review will not complete on its own. `UPSTREAM_TERMINAL` means the review failed or expired server-side \u2014 take the verdict contract's `revise` path; do NOT open another wait window and do NOT re-run `request_ticket_review`. `INVALID_RESPONSE` means the delivered document could not be read.\n\nKeep looping on `pending` for as long as this session's own budget allows. There is no iteration cap here: the bound is the caller's \u2014 for the conductor's spec-review worker that is the existing 120-minute job timeout, which produces the ordinary liveness outcome if the review never lands. Never fabricate a verdict or a review result from a pending state.",
33
+ "instruction": "FIRST, check whether a review was actually submitted. The previous step runs with `on_error: warn_and_continue`, so a rejected submission (a 402, 403 or 500 from the generate endpoint, or a dropped connection) lets the pipeline continue into this step. If that step returned an error envelope \u2014 a JSON object with a string `error`, a numeric `status`, and an `operation` field (for example `status: 403` with `error: \"ENTITLEMENT_REQUIRED\"`, or `status: 422` for too little ticket detail) \u2014 rather than its submission confirmation or a `recovery_get` envelope, do NOT wait: nothing is running, and `wait_for_ticket_review` cannot tell \"never submitted\" from \"still running\" \u2014 it would read `pending` in every window until the caller's own timeout. Treat a failed submission as a terminal failure, report the `status`, `error`, and `message` the previous step gave, and take the verdict contract's `revise` path.\n\nOtherwise, wait for the review submitted by the previous step to finish, using repeated BOUNDED windows.\n\nCall `wait_for_ticket_review` with `ticket_number` set to the ticket key. Each call uses the default 20-second window (set `budget_ms: 20000` explicitly if needed); do not use a longer window, because some MCP clients time out before a pending result arrives. The tool returns a JSON body with a `state` field:\n\n- `state: \"pending\"` \u2014 NORMAL and expected. The review is still running. Call the tool again immediately. Do NOT sleep, do NOT poll in a shell loop, and do NOT re-run `request_ticket_review`: re-submitting starts a second billable multi-model review and abandons the one already in flight.\n- `state: \"ready\"` \u2014 the review is over. BAPI-1121: a ready result has ALREADY persisted exactly the accepted documents and reconciled the canonical source files \u2014 it writes every leg in `saved_legs` to its canonical path and removes the stale canonical file for every leg in `withheld_legs`. Do NOT call `get_clarifying_questions` or `get_ticket_critique` after a ready result; those retrieval calls were removed from this recipe because reading them again could reintroduce exactly the stale content the wait just withheld. Treat `saved_legs` as the authoritative source set for the next steps, not file presence.\n - `freshness_basis: \"generation\"` is the normal case: `advanced_legs`/`saved_legs` are current-review evidence, proven newer than the submission. Any leg in `withheld_legs` was delivered but NOT proven current \u2014 surface its `reason` (`generation_not_advanced` or `identity_unreadable`) as a visible warning; do not describe the result as an ordinary cost-saved one-leg review when a withholding occurred. A leg in `absent_legs` with `reason: \"not_delivered\"` is an ordinary policy omission (e.g. an Easy-ticket clarify-only review) unless its status also flags it as policy-expected, in which case call that out too.\n - `freshness_basis: \"terminality_only\"` means no submission baseline was available (e.g. a resumed session) \u2014 `advanced_legs` is empty by construction and `saved_legs` was accepted on terminal delivery alone. Surface this prominently as a DEGRADED-freshness warning: the saved artifact(s) may be indistinguishable from a prior attachment, and the downstream identity-footer agreement check is the remaining backstop. Retain this warning when reporting to the next steps rather than treating a `terminality_only` ready result as equivalent to a `generation`-backed one.\n - If the result instead carries `state: \"error\"` alongside a persistence failure (an `ARTIFACT_PERSISTENCE_FAILED` `error`/`status`/`message` envelope), HALT rather than proceeding with whatever files happen to exist on disk \u2014 report the failure; the accepted legs already on disk before the failure are named in the envelope and are not lost, but nothing new was persisted for this window.\n- `state: \"error\"` \u2014 terminal. Report the `reason` and stop; the review will not complete on its own. `UPSTREAM_TERMINAL` means the review failed or expired server-side \u2014 take the verdict contract's `revise` path; do NOT open another wait window and do NOT re-run `request_ticket_review`. `NO_REVIEW_REQUESTED` means no review was submitted from this session and none is running; `NO_REVIEW_RUNNING` means the submitted review is no longer running on the server \u2014 treat both like `UPSTREAM_TERMINAL`. `INVALID_RESPONSE` means the delivered document could not be read.\n\nKeep looping on `pending` for as long as this session's own budget allows. There is no iteration cap here: the bound is the caller's \u2014 for the conductor's spec-review worker that is the existing 120-minute job timeout, which produces the ordinary liveness outcome if the review never lands. Never fabricate a verdict or a review result from a pending state.",
34
34
  "description": "Wait for the submitted review in repeated bounded windows; a ready result has already persisted the accepted documents and reconciled the canonical files (BAPI-1121). Resumable: a pending result is a normal observation, not a failure.",
35
35
  "on_error": "halt"
36
36
  },