@bridge_gpt/mcp-server 0.2.69 → 0.2.70

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 (151) hide show
  1. package/README.md +140 -292
  2. package/build/agent-launchers/claude-executor-adapter.js +17 -4
  3. package/build/agents.generated.js +4 -4
  4. package/build/artifact-diff.js +110 -0
  5. package/build/bin-entrypoint.js +36 -0
  6. package/build/bridge-permissions.js +23 -4
  7. package/build/claude-review-workflow-drift.js +3 -3
  8. package/build/codex-bridge-profile.js +1 -1
  9. package/build/commands.generated.js +6 -6
  10. package/build/conductor/bridge-api-client.js +598 -19
  11. package/build/conductor/bring-up-facts.js +9 -9
  12. package/build/conductor/doctor.js +466 -18
  13. package/build/conductor/epic-child-continuation.js +54 -3
  14. package/build/conductor/epic-implementer-cli.js +132 -34
  15. package/build/conductor/epic-runtime.js +2 -2
  16. package/build/conductor/epic-state.js +1 -1
  17. package/build/conductor/hook-runtime-qualification.js +1 -1
  18. package/build/conductor/install-doctor.js +4 -2
  19. package/build/conductor/launch-need-probes.js +337 -0
  20. package/build/conductor/local-merge.js +241 -56
  21. package/build/conductor/merge-credential.js +172 -0
  22. package/build/conductor/merge-execution-eligibility.js +1 -1
  23. package/build/conductor/merged-child-check.js +95 -0
  24. package/build/conductor/plan-trim.js +30 -0
  25. package/build/conductor/pr-ci-producer.js +1 -1
  26. package/build/conductor/readiness-cli.js +11 -6
  27. package/build/conductor/readiness-prerequisites.js +41 -0
  28. package/build/conductor/readiness-sections.js +345 -55
  29. package/build/conductor/readiness.js +99 -87
  30. package/build/conductor/recovery-cli.js +606 -21
  31. package/build/conductor/recovery-operations.js +306 -7
  32. package/build/conductor/repair-contract.js +47 -2
  33. package/build/conductor/repository-workflow-remedy.js +8 -6
  34. package/build/conductor/stored-merge-credential.js +76 -0
  35. package/build/conductor/stored-merge-token-probe.js +28 -0
  36. package/build/conductor/temporary-plan.js +50 -0
  37. package/build/conductor/wait-run-cli.js +759 -0
  38. package/build/conductor/worker-database-doctor-inspector.js +49 -0
  39. package/build/conductor-bin.js +2 -2
  40. package/build/conductor-claude-hook-bin.js +2 -2
  41. package/build/conductor-claude-hook-removed-stub-bin.js +2 -5
  42. package/build/conductor-removed-stub-bin.js +2 -5
  43. package/build/credential-store.js +356 -13
  44. package/build/docs.generated.js +26 -13
  45. package/build/doctor.js +94 -32
  46. package/build/drive-epic-help.js +212 -0
  47. package/build/drive-epic.js +1840 -373
  48. package/build/epic-ci-workflow-drift.js +77 -0
  49. package/build/epic-ci-workflow-install.js +183 -0
  50. package/build/epic-ci-workflow.js +157 -0
  51. package/build/epic-contract-context.js +326 -0
  52. package/build/epic-implementer-bin.js +57 -41
  53. package/build/epic-implementer-claude-hook-bin.js +2 -2
  54. package/build/escalation-reachability.js +134 -0
  55. package/build/executor/cleanup-report.js +99 -0
  56. package/build/executor/cli.js +12 -1
  57. package/build/executor/completion-contract.js +66 -11
  58. package/build/executor/completion-supervision.js +99 -0
  59. package/build/executor/delivery-outcome.js +179 -0
  60. package/build/executor/deps.js +3 -0
  61. package/build/executor/env.js +71 -0
  62. package/build/executor/failure-reason-codes.js +126 -0
  63. package/build/executor/heartbeat.js +38 -0
  64. package/build/executor/http-client.js +72 -0
  65. package/build/executor/integration-job.js +298 -5
  66. package/build/executor/job-errors.js +36 -6
  67. package/build/executor/job-runner.js +720 -36
  68. package/build/executor/likely-tests.js +36 -2
  69. package/build/executor/merge-job.js +145 -2
  70. package/build/executor/observation.js +73 -4
  71. package/build/executor/permissions.js +193 -97
  72. package/build/executor/preflight.js +14 -3
  73. package/build/executor/process-containment.js +28 -2
  74. package/build/executor/prompt-spec.js +50 -5
  75. package/build/executor/rebase-finalization.js +38 -3
  76. package/build/executor/reconcile-overlap-job.js +35 -7
  77. package/build/executor/required-work-ledger.js +236 -81
  78. package/build/executor/resume-pre-spawn.js +38 -1
  79. package/build/executor/runner.js +91 -3
  80. package/build/executor/test-clock.js +8 -0
  81. package/build/executor/types.js +37 -2
  82. package/build/executor/worker-cli-launcher.js +259 -0
  83. package/build/executor/worker-command.js +41 -4
  84. package/build/executor/worker-database-target.js +91 -0
  85. package/build/executor/worker-database.js +908 -0
  86. package/build/executor/worker-finalization.js +106 -0
  87. package/build/executor/worker-guard-hook.js +203 -0
  88. package/build/executor/worker-resources.js +47 -0
  89. package/build/executor/worker-verification-guidance.js +15 -2
  90. package/build/executor/worktree.js +303 -15
  91. package/build/executor-launch.js +11 -1
  92. package/build/generated-assets-doctor.js +9 -1
  93. package/build/generated-assets-health.js +13 -4
  94. package/build/generated-assets-legacy.js +39 -0
  95. package/build/generated-assets-paths.js +12 -1
  96. package/build/generated-assets-repair.js +4 -1
  97. package/build/generated-assets-test-support.js +12 -0
  98. package/build/github-remote.js +33 -0
  99. package/build/github-sign-in.js +62 -0
  100. package/build/index.js +1067 -536
  101. package/build/init.js +39 -1
  102. package/build/install-bridge-conductor-gate.js +78 -0
  103. package/build/install-bridge-conductor-setup.js +413 -0
  104. package/build/install-bridge-conductor.js +1226 -267
  105. package/build/install-bridge.js +376 -60
  106. package/build/mcp-install-state.js +8 -2
  107. package/build/merge-pull-request.js +6 -0
  108. package/build/merge-workflow-install.js +763 -345
  109. package/build/phase-result-artifacts.js +75 -20
  110. package/build/pipeline-orchestrator.js +247 -4
  111. package/build/pipelines.generated.js +35 -35
  112. package/build/plan-discovery.js +15 -2
  113. package/build/plan-execution-ledger.js +306 -17
  114. package/build/plan-phase-routing.js +48 -13
  115. package/build/plane/cli.js +105 -51
  116. package/build/plane/defaults.js +3 -0
  117. package/build/plane/plane-freshness.js +294 -0
  118. package/build/plane/schema-compatibility.js +137 -0
  119. package/build/plane/shutdown-deps.js +38 -0
  120. package/build/plane/shutdown.js +83 -8
  121. package/build/plane/terminal-run-cleanup.js +303 -0
  122. package/build/printed-remedy-commands.js +26 -4
  123. package/build/readiness-check.js +6 -2
  124. package/build/readiness-prerequisites.generated.js +532 -0
  125. package/build/readme.generated.js +1 -1
  126. package/build/setup-epic.js +400 -30
  127. package/build/shared-resources.generated.js +5 -0
  128. package/build/start-tickets.js +28 -15
  129. package/build/test-command-detection.js +247 -0
  130. package/build/test-command-validation.js +73 -0
  131. package/build/testing-config-client.js +150 -0
  132. package/build/ticket-delivery-artifacts.js +258 -0
  133. package/build/ticket-delivery-enrollment.js +306 -0
  134. package/build/ticket-delivery.js +205 -0
  135. package/build/ticket-review-summary.js +14 -0
  136. package/build/upgrade-cli.js +13 -0
  137. package/build/v2-readiness-requirements.js +552 -0
  138. package/build/version.generated.js +3 -3
  139. package/build/worker-guard-hook-bin.js +2 -2
  140. package/build/worktree-core.js +22 -7
  141. package/docs/BRIDGE-DIRECTORY-README.md +48 -0
  142. package/docs/EPIC-IMPLEMENTER-INSTALL.md +12 -867
  143. package/docs/EPIC-IMPLEMENTER.md +104 -63
  144. package/docs/epic-implementer/getting-started.md +131 -0
  145. package/docs/epic-implementer/self-hosting.md +133 -0
  146. package/package.json +3 -3
  147. package/pipelines/idea-to-ticket.json +1 -1
  148. package/pipelines/implement-ticket.json +8 -8
  149. package/pipelines/review-ticket.json +2 -2
  150. package/design-assets/favicon/favicon-32x32.png +0 -0
  151. package/design-assets/just-logo-rough-draft.png +0 -0
@@ -0,0 +1,133 @@
1
+ # Epic Implementer: self-hosting
2
+
3
+ **Audience:** owners and operators who run their own Bridge API server, or who host epic launches on a durable machine. If you use Bridge's hosted service, you do not need this document. Follow [the getting-started guide](./getting-started.md) instead.
4
+
5
+ This document holds the material that the first-run path leaves out: the local plane, the composed bring-up, running the server from a source checkout, durable hosts, repository-wide executors, and launch profiles. `drive-epic --help-advanced` prints a short form of the same material.
6
+
7
+ In every command below, `npx -y @bridge_gpt/mcp-server` is the launcher.
8
+
9
+ ## Prerequisites
10
+
11
+ The readiness report lists these items only for a self-hosted deployment. Each bullet gives the item's name, its id, what it means, and the fix.
12
+
13
+ - **Active-run progress** (`server.reconciler-liveness`) — The server's reconciler reports a recent heartbeat for the active run. Fix: Check that the reconciler process is running, then retry.
14
+ - **Database migration** (`server.database-migration-current`) — The server database is at the current migration. Fix: Apply the pending database migrations on your Bridge server, then retry.
15
+ - **Server worker** (`server.worker-present`) — The server's background worker is running. Fix: Start the server's background worker next to the server process.
16
+ - **Single transition authority** (`server.single-transition-authority`) — Exactly one reconciler decides each epic's steps. Fix: Stop the extra reconciler so one remains.
17
+ - **Legacy environment** (`plane.legacy-environment`) — No retired `BAPI_CONDUCTOR_*` environment names are set. Fix: Rename or unset the old names; the check lists each with its new name.
18
+ - **Repository root** (`plane.repository-root`) — The command runs from the Bridge API checkout root (the top folder of your Bridge server source). Fix: Change to that folder and rerun.
19
+ - **Git work tree** (`plane.worktree-presence`) — The current folder is a Git work tree. Fix: Run from inside a Git work tree.
20
+ - **Claude login** (`plane.claude-login`) — Claude Code is signed in on the plane host. Fix: Run `claude` and sign in.
21
+ - **Bridge repository identity** (`plane.repo-identity`) — The plane knows which Bridge repository it serves. Fix: Pass `--repo <name>` or set `BAPI_REPO_NAME`.
22
+ - **Bridge API credential** (`plane.bridge-credentials`) — A Bridge API key is stored for the plane. Fix: Run `npx -y @bridge_gpt/mcp-server install` against the plane's server.
23
+ - **Bridge credential file permissions** (`plane.credential-permissions`) — The stored credential file is readable only by you. Fix: Run `chmod 600 ~/.config/bridge/credentials.json`.
24
+ - **Executor build freshness** (`plane.executor-build`) — The executor build is current with the source. Fix: Run `cd mcp_server && npm run build`.
25
+ - **Runtime re-exec entrypoint** (`plane.runtime-entrypoint`) — The runtime can re-launch itself from the built entrypoint. Fix: Build `mcp_server` and rerun.
26
+ - **Local server port** (`plane.server-port`) — The local plane's server port is free or already held by this repository's plane. Fix: Stop the other listener or choose another port with `BAPI_PLANE_PORT`.
27
+ - **Database migration head** (`plane.alembic-head`) — The local database is at the migration head. Fix: Apply the pending migrations, then rerun.
28
+ - **Existing plane** (`plane.existing-plane`) — No other plane for a different repository is running. Fix: Stop it with `plane down` from its checkout.
29
+ - **Executor provisioning** (`conductor.install-section-executor-provisioning`) — A durable executor service is provisioned (only for durable hosts). Fix: Run `npx -y @bridge_gpt/mcp-server install conductor --executor-id <id> --repo-wide`.
30
+ - **Executor service state** (`conductor.install-section-executor-service-state`) — The durable executor service is running. Fix: Start the service unit that `executor install-service` generated.
31
+ - **Launch evidence: actor handshake** (`server.admission-durable-actor`) — Launch check: the durable host's actor handshake completed. Fix: Start the host's repository-wide executor, then launch again.
32
+ - **Launch evidence: database migration** (`server.admission-migration-head`) — Launch check: the server database is at the migration head. Fix: Apply the pending migrations, then launch again.
33
+
34
+ ## The local plane
35
+
36
+ A plane is the whole local stack in one command: the Bridge API server, the reconciler worker, the dead-man observer, and executor lanes scoped to one run. `plane up`, `plane status`, and `plane down` manage it. It needs a Bridge API **source checkout**: `plane up` runs from the checkout's top folder, and its executor lanes run from that checkout's `mcp_server/build/index.js`, never from npx.
37
+
38
+ `drive-epic` starts or attaches to a plane by itself when `--plan-file` is given and `BAPI_BASE_URL` names the local plane endpoint (`127.0.0.1`, on the port in `BAPI_PLANE_PORT` or the default). It handles the port one of three ways and never asks you to choose:
39
+
40
+ - **Cold start.** Nothing listens on the port. `drive-epic` brings the plane up, then creates the run.
41
+ - **Attach.** This repository's own healthy plane is there. `drive-epic` creates the run against that plane and starts no second server or reconciler.
42
+ - **Refusal.** Anything else holds the port: another listener, a manifest for a different repository, an unreadable manifest, or a plane that cannot take a run. `drive-epic` prints one named reason and starts nothing.
43
+
44
+ **One epic per plane, for its lanes.** A plane's executor lanes serve the one run it is bound to. A second run attaches to the same plane's reconciler and gets its own run-scoped executor. A plane whose bound run cannot be read is refused as `plane-already-bound`. Two planes on one database are not supported.
45
+
46
+ `plane status` reports the lifecycle phase (control plane starting or ready, lanes starting or ready, observer active, plane ready) and the epic run the plane is bound to. `plane down` handles every intermediate phase: it stops the bound run first, then signals the recorded process group.
47
+
48
+ ### Claim scope is required
49
+
50
+ Every executor lane `plane up` starts needs an explicit claim scope:
51
+
52
+ ```bash
53
+ npx -y @bridge_gpt/mcp-server plane up --epic-run-id <run-id> # repeatable
54
+ npx -y @bridge_gpt/mcp-server plane up --repo-wide # or repository-wide
55
+ ```
56
+
57
+ The two are mutually exclusive. Asked to start lanes with neither, `plane up` refuses before it spawns anything, in the executor's own words.
58
+
59
+ After its migration-head check, `plane up` also checks that the launch-critical schema objects exist, because a migration stamp is not proof that a migration's DDL was applied. A **proven-missing** object is a refusal before anything is claimed or spawned ("Local schema incompatible", with the applied stamp and the missing objects). A check that **could not run** is only a warning ("Schema compatibility could not be verified"), and startup continues. Repair with a reviewed, forward-only migration, or rebuild the local database only with the owner's explicit consent. Never stamp the migration table by hand or downgrade.
60
+
61
+ ### Freshness checks
62
+
63
+ Before a launch creates a run on this machine's plane, `drive-epic` checks that the plane's pinned snapshot is not behind `origin/main` and that the database is at the migration head. A confirmed problem refuses before any setup or run creation. Evidence it cannot read is a warning. Attaching to a run that already exists only warns. `--allow-stale-plane` bypasses only those two refusals for one invocation. It repairs nothing and does not bypass readiness, authentication, ownership, or admission.
64
+
65
+ ## The composed two-phase bring-up
66
+
67
+ With `--plan-file` on a repository whose readiness is missing only the runtime facts, one `drive-epic` invocation runs, in order:
68
+
69
+ 1. the **control plane** (Bridge API server and reconciler, each gated on its own readiness);
70
+ 2. `setup-epic`, to create and approve the run;
71
+ 3. **executor lanes scoped to that run**, with `--epic-run-id <run>`;
72
+ 4. the **dead-man observer**, last;
73
+ 5. the ready banner.
74
+
75
+ The order is forced: an executor lane must carry an explicit claim scope, and the run it is scoped to does not exist until the server is up and `setup-epic` has run. If `setup-epic` fails, the control plane is left running and no executor lane is spawned. If the lanes fail to become ready, the control plane and the committed run are left intact and the observer is not started. Nothing is rolled back, because a local process that failed to start says nothing about whether the run is valid.
76
+
77
+ A report that is missing supervisor setup, supervisor configuration, GitHub App credentials, or an unattended prerequisite is **not** started. Those are owner-owned, and `drive-epic` exits with that one named reason.
78
+
79
+ "Plane ready" reports processes, not dispatchability: if the run cuts an epic branch, the reconciler holds ticket dispatch until that branch's index scope finishes preparing.
80
+
81
+ ## Running the server yourself
82
+
83
+ Skip this section if you use the hosted service.
84
+
85
+ Run the Bridge API server from a source checkout. The checkout's top folder holds the server entry point, the background worker, and the migration config. Build the executor from the same checkout, so the server and the executor come from one commit:
86
+
87
+ ```bash
88
+ cd mcp_server && npm run build
89
+ node mcp_server/build/index.js executor --repo <name> --epic-run-id <id>
90
+ ```
91
+
92
+ Do not use `npx` against a local server. The published package often lags the server's source, and a newer server can send a prompt the older executor rejects.
93
+
94
+ Upgrade the server before the package. An older server simply yields a "capability not verified" warning for newer readiness rows.
95
+
96
+ ## Executors and durable hosts
97
+
98
+ `drive-epic` starts a run-scoped executor for every run, from the launching checkout's Git top level. It claims only that run's jobs, logs to `.bridge/executors/<run>.log`, and exits when the run is done. A durable launch profile starts none: it requires a fresh repository-wide executor instead.
99
+
100
+ Start an executor by hand only for a durable host or a manual recovery:
101
+
102
+ ```bash
103
+ npx -y @bridge_gpt/mcp-server executor --repo <name> --epic-run-id <run-id> --exit-when-run-terminal
104
+ npx -y @bridge_gpt/mcp-server executor --repo <name> --repo-wide # every run in the repo
105
+ ```
106
+
107
+ An executor needs exactly one claim scope, or it refuses to start. It also needs `--base-url` or `BAPI_BASE_URL`: it has no production fallback.
108
+
109
+ ### Repository-wide executors
110
+
111
+ `--repo-wide` claims jobs for every run in the repository. A durable host uses it, so the host survives from one run to the next:
112
+
113
+ ```bash
114
+ npx -y @bridge_gpt/mcp-server install conductor --executor-id <id> --repo-wide
115
+ ```
116
+
117
+ Setup writes a launchd (macOS) or systemd (Linux) user unit that starts the executor with the claim scope you chose. Supplying `--executor-id` is what opts in to this phase, and exactly one of `--epic-run-id` or `--repo-wide` is set with it. `executor install-service` generates the same unit without the guided consent. Writing the unit and starting the service are separate consents, and the server's own observation, not the local process list, decides whether the executor is ready.
118
+
119
+ ## Launch profiles
120
+
121
+ A launch profile saves a reusable, host-local launch target, so a durable host launches the same way every time.
122
+
123
+ ```bash
124
+ npx -y @bridge_gpt/mcp-server install conductor --launch-profile <name> --base-url <url>
125
+ ```
126
+
127
+ Setup records an explicit target (there is no production default), a confirmed credential binding, and verified consent, notification, and actor prerequisites. Only when all of them hold does it save the profile and print the one launch command that selects it. `--execution-mode local|durable` chooses the runtime (durable when `--executor-id` is given, otherwise local), and `--policy-file <path>` names the run policy the profile references.
128
+
129
+ To launch with a profile, pass `--launch-profile <name>` to `drive-epic`, or set `BAPI_EPIC_LAUNCH_PROFILE`. The flag takes precedence. With a profile, `--base-url` must agree with it; an override never rebinds a profile. For an environment-selected profile, `BAPI_BASE_URL` remains the general CLI endpoint and does not conflict with the epic launch target. With none of the three, `drive-epic` targets production and uses the stored `bapi:<repo>` key when there is one. A stored key approved for a different endpoint is never sent.
130
+
131
+ ## A live run with no plan
132
+
133
+ If the epic already has a live run and no plan was supplied or found, `drive-epic` creates nothing. It makes sure that run has an executor: it reuses a verified live one and never starts a second, starts one when the old one is gone, starts none for a durable launch profile with a confirmed repo-wide executor, and starts none when this checkout's plane is bound to that run. An epic with several active runs (`live-run-ambiguous`) or a run that cannot be read (`live-run-unknown`) is refused by name.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bridge_gpt/mcp-server",
3
- "version": "0.2.69",
3
+ "version": "0.2.70",
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",
@@ -26,7 +26,7 @@
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
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
- "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",
29
+ "build": "node scripts/generate-readiness-prerequisites.mjs && 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
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",
@@ -36,7 +36,7 @@
36
36
  "test:normal": "node scripts/run-unit-tests.js normal",
37
37
  "test:module-mocks": "node scripts/run-unit-tests.js module-mocks",
38
38
  "test:integration": "node scripts/run-integration-tests.js",
39
- "test:smoke": "node --test build/integration/packaged-cli-smoke.test.js",
39
+ "test:smoke": "node --test build/integration/packaged-cli-smoke.test.js && node scripts/check-package-contents.js",
40
40
  "test:hooks-lifetime": "node --test build/integration/packaged-git-hooks-lifetime.test.js",
41
41
  "canary:agent-capabilities": "npm run build && node scripts/agent-capabilities-canary.mjs",
42
42
  "prepublishOnly": "node scripts/bundle-assets.js && npm run build && node scripts/verify-shebang.cjs && npm run assert:release-identity"
@@ -77,7 +77,7 @@
77
77
  {
78
78
  "type": "agent_task",
79
79
  "instruction_file": "upload-and-track.md",
80
- "description": "Upload to Jira and track the new ticket(s) idempotently"
80
+ "description": "Create label-free tickets from unchanged slim_description, persist confirmed keys immediately, reuse upload state on resume, and track the tickets"
81
81
  }
82
82
  ]
83
83
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "implement-ticket",
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.",
3
+ "description": "Initial feature workflow: generate a plan, register the delivery binding and produce artifacts, checkpoint to origin, verify, commit, ask the server to publish (an ordinary or draft PR, or a held blocked checkpoint), close accepted post-PR gaps, and monitor CI. Finishing every recipe step is not delivery completion: the server readiness outcome decides that, and the final report states it. 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
4
  "variables": ["ticket_key", "docs_dir", "provider", "verification_scope"],
5
5
  "steps": [
6
6
  {
@@ -23,33 +23,33 @@
23
23
  {
24
24
  "type": "agent_task",
25
25
  "instruction_file": "execute-plan.md",
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."
26
+ "description": "Produce the plan's implementation artifacts. Before any production edit, get_phase_context registers or recovers the execution's delivery binding. Unresolved obligations stay escalated, never dropped. Before dependent work, a targeted prerequisite preflight checks only the capabilities and platform facts the plan explicitly requires, records each as available, verified_absent, or uninvestigated, and escalates the affected steps while preparation and independent owned work still proceed. 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. An unattended workaround never counts an unmet mandatory prerequisite as satisfied: the dependent step stays escalated."
27
27
  },
28
28
  {
29
29
  "type": "agent_task",
30
30
  "instruction_file": "checkpoint-work.md",
31
- "description": "Checkpoint produced work to origin before verification begins"
31
+ "description": "Checkpoint produced work to origin before verification begins. Any blocked exit later in the run first pushes and proves its head on origin the same way."
32
32
  },
33
33
  {
34
34
  "type": "agent_task",
35
35
  "instruction_file": "execute-plan-verification.md",
36
- "description": "Execute the plan's remaining review, test, and rendered-UI steps before the PR opens"
36
+ "description": "Execute the plan's remaining review, test, and rendered-UI steps before the PR opens, record them with the server, and report its readiness outcome. Only a check that genuinely needs an open PR carries prDependency; a missing local capability stays a pre-PR blocker."
37
37
  },
38
38
  {
39
39
  "type": "agent_task",
40
40
  "instruction_file": "commit-and-push.md",
41
- "description": "Stage, commit, and push changes",
41
+ "description": "Stage, commit, and push changes. A new commit after verification moves the head, so verification is re-run and re-recorded before the PR step.",
42
42
  "requires_approval": true
43
43
  },
44
44
  {
45
45
  "type": "agent_task",
46
46
  "instruction_file": "create-pr.md",
47
- "description": "Create a pull request with a title derived from the commit subject"
47
+ "description": "Check server delivery readiness, then create a pull request with a title derived from the commit subject. A delivery hold is a supported blocked-checkpoint exit: the branch and head are preserved and the run ends there."
48
48
  },
49
49
  {
50
50
  "type": "agent_task",
51
51
  "instruction_file": "verify-plan.md",
52
- "description": "Close post-PR plan gaps and push any correction"
52
+ "description": "Close post-PR plan gaps, including the accepted PR-dependent steps this phase owns, and push any correction"
53
53
  },
54
54
  {
55
55
  "type": "mcp_call",
@@ -72,7 +72,7 @@
72
72
  "id": "monitor-ci-checks",
73
73
  "type": "agent_task",
74
74
  "instruction_file": "monitor-ci-checks.md",
75
- "description": "Monitor CI checks and report results"
75
+ "description": "Monitor CI checks, record post-PR resolutions, and report results with the server readiness outcome. CI green is not delivery readiness, and neither is a merge."
76
76
  }
77
77
  ]
78
78
  }
@@ -55,7 +55,7 @@
55
55
  {
56
56
  "type": "agent_task",
57
57
  "instruction_file": "capture-review-decisions.md",
58
- "description": "Generate HTML decision page, capture user decisions, and interpretively rewrite clarifying questions and critique docs"
58
+ "description": "Generate HTML decision page, capture user decisions, and interpretively rewrite clarifying questions and critique docs. BAPI-1428: for an epic-aware review this step consumes the evaluated epic-contract resolution block; a recorded mandatory incompatibility ends this step with a not-finalized report instead of a terminal capture, which is an ordinary outcome, not a failure, so the cleanup step below still runs"
59
59
  },
60
60
  {
61
61
  "type": "mcp_call",
@@ -65,7 +65,7 @@
65
65
  "action": "cleanup",
66
66
  "fresh_base_root": "<the fresh_base_root path returned by the earlier fresh_base materialize step's result>"
67
67
  },
68
- "description": "Remove the temp workspace created by the earlier fresh_base materialize step. fresh_base_root is a RUNTIME value, not a static recipe variable: call this tool with the actual path string returned by that step's result, not the placeholder text shown in params above.",
68
+ "description": "Remove the temp workspace created by the earlier fresh_base materialize step. Runs after normal completion and after a not-finalized epic-contract incompatibility alike; resumed analysis that needs code again rematerializes through the ordinary fresh_base materialize step. fresh_base_root is a RUNTIME value, not a static recipe variable: call this tool with the actual path string returned by that step's result, not the placeholder text shown in params above.",
69
69
  "on_error": "warn_and_continue"
70
70
  }
71
71
  ]