@cbartens/bkit 5.3.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bkit/README.md +20 -7
- package/.bkit/core/.agents/docs.md +1 -1
- package/.bkit/core/.agents/rules.md +14 -9
- package/.bkit/core/.bkit/README.md +19 -6
- package/.bkit/core/.bkit/cloud.md +77 -46
- package/.bkit/core/.bkit/comparison.md +3 -3
- package/.bkit/core/.bkit/install.md +21 -18
- package/.bkit/core/.bkit/lite.md +6 -6
- package/.bkit/core/.bkit/pipeline.md +6 -3
- package/.bkit/core/.bkit/prompts.md +14 -10
- package/.bkit/core/.bkit/providers.md +7 -7
- package/.bkit/core/.bkit/templates.md +46 -10
- package/.bkit/core/.bkit/trackers.md +92 -38
- package/.bkit/core/.bkit/workflows.md +140 -116
- package/.bkit/core/AGENTS.md +2 -2
- package/.bkit/core/docs/templates/bkit-audit-accessibility.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-agents.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-analytics.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-annotations.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-app-performance.md +2 -2
- package/.bkit/core/docs/templates/bkit-audit-app-store.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-architecture.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +4 -2
- package/.bkit/core/docs/templates/bkit-audit-config.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-cost.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-coverage.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-database.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-dead-code.md +5 -5
- package/.bkit/core/docs/templates/bkit-audit-deferrals.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-dependencies.md +14 -13
- package/.bkit/core/docs/templates/bkit-audit-documentation.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-duplication.md +2 -2
- package/.bkit/core/docs/templates/bkit-audit-failures.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-flakes.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-gates.md +5 -2
- package/.bkit/core/docs/templates/bkit-audit-issues.md +25 -8
- package/.bkit/core/docs/templates/bkit-audit-llm.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-logs.md +10 -6
- package/.bkit/core/docs/templates/bkit-audit-models.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-privacy.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-prompts.md +5 -5
- package/.bkit/core/docs/templates/bkit-audit-red-team.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-reliability.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-repo.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-security.md +11 -9
- package/.bkit/core/docs/templates/bkit-audit-slop.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-testing.md +6 -5
- package/.bkit/core/docs/templates/bkit-audit-usability.md +1 -1
- package/.bkit/core/engine/checks/after/auth.ts +88 -45
- package/.bkit/core/engine/checks/after/github.ts +18 -5
- package/.bkit/core/engine/checks/after/index.ts +1 -1
- package/.bkit/core/engine/checks/after/tools.ts +1 -1
- package/.bkit/core/engine/checks/before/env.ts +28 -18
- package/.bkit/core/engine/checks/before/mcp.ts +4 -2
- package/.bkit/core/engine/checks/status-holes.ts +0 -1
- package/.bkit/core/engine/checks/tips/catalogue.ts +31 -2
- package/.bkit/core/engine/checks/tips/index.ts +49 -27
- package/.bkit/core/engine/cli.ts +27 -18
- package/.bkit/core/engine/commands/ci/ci.ts +107 -0
- package/.bkit/core/engine/commands/comply.ts +25 -16
- package/.bkit/core/engine/commands/install/install.ts +11 -4
- package/.bkit/core/engine/commands/install/uninstall.ts +46 -0
- package/.bkit/core/engine/commands/land.ts +156 -0
- package/.bkit/core/engine/commands/lib.ts +10 -8
- package/.bkit/core/engine/commands/registry.ts +2 -0
- package/.bkit/core/engine/commands/tips.ts +7 -3
- package/.bkit/core/engine/commands/workflow/branches.ts +382 -282
- package/.bkit/core/engine/commands/workflow/disk.ts +556 -0
- package/.bkit/core/engine/commands/workflow/fids.ts +23 -15
- package/.bkit/core/engine/commands/workflow/issues.ts +106 -42
- package/.bkit/core/engine/commands/workflow/ledgers.ts +28 -11
- package/.bkit/core/engine/commands/workflow/locks.ts +38 -152
- package/.bkit/core/engine/commands/workflow/prs.ts +14 -3
- package/.bkit/core/engine/commands/workflow/repo.ts +6 -0
- package/.bkit/core/engine/commands/workflow/roadmap.ts +53 -54
- package/.bkit/core/engine/commands/workflow/runtime.ts +3 -2
- package/.bkit/core/engine/commands/workflow/status.ts +33 -11
- package/.bkit/core/engine/commands/workflow/steps.ts +26 -17
- package/.bkit/core/engine/commands/workflow/workflows.ts +442 -269
- package/.bkit/core/engine/commands/workflow/workstreams.ts +3 -2
- package/.bkit/core/engine/commands/workflow/worktrees.ts +11 -1
- package/.bkit/core/engine/install/manifest.ts +31 -10
- package/.bkit/core/engine/install/modules/cloud.ts +3 -1
- package/.bkit/core/engine/install/modules/core.ts +97 -4
- package/.bkit/core/engine/install/modules/opencode.ts +5 -0
- package/.bkit/core/engine/install/placeholders.ts +13 -17
- package/.bkit/core/engine/install/write.ts +37 -1
- package/.bkit/core/engine/render/trackers.ts +35 -23
- package/.bkit/core/engine/shared/egress.ts +6 -0
- package/.bkit/core/engine/shared/settings.ts +96 -1
- package/.bkit/core/engine/shared/timeouts.ts +8 -7
- package/.bkit/core/hooks/guardrails-tiers.js +1 -1
- package/.bkit/core/prompts/bkit-audit-generate.md +80 -7
- package/.bkit/core/prompts/bkit-build-challenge-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-tests.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-execute.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +1 -1
- package/.bkit/core/prompts/bkit-design-generate.md +2 -1
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +1 -1
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +4 -2
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +4 -2
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +12 -2
- package/.bkit/core/prompts/bkit-utility-update-failures.md +4 -2
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +4 -2
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +12 -5
- package/.bkit/core/prompts/bkit-utility-update-tracker.md +159 -0
- package/.bkit/core/workflows/bkit-auto.md +19 -6
- package/.bkit/core/workflows/bkit-build.md +64 -22
- package/.bkit/core/workflows/bkit-debug.md +72 -28
- package/.bkit/core/workflows/bkit-design.md +101 -37
- package/.bkit/core/workflows/bkit-plan.md +82 -31
- package/.bkit/core/workflows/bkit-ship.md +127 -108
- package/.bkit/shared/.bkit/.env.example +8 -0
- package/.bkit/shared/.claude/bkit-cloud.md +12 -12
- package/.bkit/shared/.claude/settings.json +4 -1
- package/.bkit/shared/.cursor/bkit-cloud.md +2 -2
- package/.bkit/shared/.cursor/mcp.json +11 -4
- package/.bkit/shared/.mcp.json +11 -4
- package/.bkit/shared/.opencode/opencode.json +2 -0
- package/.bkit/shared/docs/deployments.md +44 -29
- package/.bkit/shared/docs/security.md +1 -1
- package/.bkit/shared/docs/testing.md +3 -3
- package/.bkit/shared/gitignore +1 -2
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-change.yml +2 -2
- package/.bkit/templates/.github/renovate.json5 +1 -1
- package/.bkit/templates/.github/workflows/bkit-ci.yml +29 -56
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +40 -12
- package/.bkit/templates/.husky/pre-commit +10 -4
- package/.bkit/templates/.husky/pre-push +69 -12
- package/.bkit/templates/.lintstagedrc.json +5 -1
- package/.bkit/templates/scripts/ci/lanes/check-tree-cache.mjs +138 -0
- package/.bkit/templates/scripts/ci/lanes/check-tree-cache.test.mjs +181 -0
- package/.bkit/templates/scripts/cleanup/bkit-disk-prune.machine.mjs +197 -0
- package/.bkit/templates/scripts/cleanup/bkit-disk-prune.mjs +164 -0
- package/.bkit/templates/scripts/graphify/bkit-graphify.sh +1 -1
- package/CHANGELOG.md +85 -1
- package/README.md +102 -100
- package/dist/checks/after/auth.js +81 -45
- package/dist/checks/after/github.js +17 -5
- package/dist/checks/after/index.js +1 -1
- package/dist/checks/after/tools.js +1 -1
- package/dist/checks/before/env.js +24 -17
- package/dist/checks/before/mcp.js +4 -2
- package/dist/checks/status-holes.js +0 -1
- package/dist/checks/tips/catalogue.js +28 -2
- package/dist/checks/tips/index.js +44 -28
- package/dist/cli.js +27 -19
- package/dist/commands/ci/ci.js +100 -0
- package/dist/commands/comply.js +20 -13
- package/dist/commands/install/install.js +10 -4
- package/dist/commands/install/uninstall.js +42 -0
- package/dist/commands/land.js +129 -0
- package/dist/commands/lib.js +9 -6
- package/dist/commands/registry.js +2 -0
- package/dist/commands/tips.js +7 -3
- package/dist/commands/workflow/branches.js +300 -243
- package/dist/commands/workflow/disk.js +452 -0
- package/dist/commands/workflow/fids.js +22 -15
- package/dist/commands/workflow/issues.js +90 -41
- package/dist/commands/workflow/ledgers.js +26 -11
- package/dist/commands/workflow/locks.js +35 -130
- package/dist/commands/workflow/prs.js +8 -3
- package/dist/commands/workflow/repo.js +5 -0
- package/dist/commands/workflow/roadmap.js +52 -57
- package/dist/commands/workflow/runtime.js +3 -2
- package/dist/commands/workflow/status.js +32 -12
- package/dist/commands/workflow/steps.js +20 -13
- package/dist/commands/workflow/workflows.js +397 -251
- package/dist/commands/workflow/workstreams.js +3 -2
- package/dist/commands/workflow/worktrees.js +11 -1
- package/dist/install/manifest.js +30 -10
- package/dist/install/modules/cloud.js +3 -1
- package/dist/install/modules/core.js +95 -5
- package/dist/install/modules/opencode.js +6 -0
- package/dist/install/placeholders.js +13 -19
- package/dist/install/write.js +26 -2
- package/dist/render/trackers.js +34 -20
- package/dist/shared/egress.js +6 -0
- package/dist/shared/settings.js +44 -0
- package/dist/shared/timeouts.js +8 -7
- package/package.json +11 -2
|
@@ -17,29 +17,36 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
17
17
|
> - **`Failures`:** **If** any step, tool, command fails, or gate cannot pass → **Failure Path**.
|
|
18
18
|
> - **Friction:** Watch own context and subagent returns for human confirm prompts, manual installs, agent rework, repeated tool failures, destructive backouts → append rows to `.bkit/friction.jsonl` in `.bkit/jsonl.md` format → continue or escalate; logging does not replace **Failure Path**.
|
|
19
19
|
> - **Placeholders:** Assert `{PLACEHOLDERS}` such as `{FID}`, `{YYYYMM}`, etc non-empty if required before making tool calls. **Else** → **Failure Path**.
|
|
20
|
-
> - **Commands:** Blocks run `"{BKIT}" <noun> <verb> --flag=value`; `{BKIT}` = `bkit` printed by Step 1 `repo info`, until then `"$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")/node_modules/.bin/bkit"`. Stdout is one JSON object: hold named keys as `{VAR}`. Exit non-zero with no `Route:` for it → **Failure Path**; exit 80 → mapped MCP tool (**gh MCP fallback**); exit 81 → end turn, re-run block. A flag still holding a literal `{PLACEHOLDER}` exits 2.
|
|
20
|
+
> - **Commands:** Blocks run `"{BKIT}" <noun> <verb> --flag=value`; `{BKIT}` = `bkit` printed by Step 1 `repo info`, until then `"$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")/node_modules/.bin/bkit"`. Stdout is one JSON object: hold named keys as `{VAR}`. Exit non-zero with no `Route:` for it → **Failure Path**; exit 80 → mapped MCP tool (**gh MCP fallback**); exit 81 → end turn, re-run block. A flag still holding a literal `{PLACEHOLDER}` exits 2.
|
|
21
21
|
> - **Finish:** `bkit steps finish` reads each `--agent`'s header from the `--artifact` in the same position, derives the attempt (`--attempt-of`; `<attempt>` in a path becomes it), checks artifacts and row, writes the row (ship: `--commit=none`, bookkeeping to `$BOOK_ROOT`), prints `comment`. Exit 5 **or** 6 → invoke `reask.agent` again with `"Your prior output '<reask.artifact>' has an invalid header. Re-emit only its header fields + '<!-- verdict:end -->' at top of that file. Do not redo work."` → wait for subagent and re-run the block → **If** still non-zero → **Failure Path**. Hold `verdict` as the step's verdict, `fields` as its other header fields, `attempt` as its attempt.
|
|
22
22
|
> - **Resume:** On start, fold `$BOOK_ROOT/.../status.jsonl` — pick up after last `DONE` step in active `IN_PROGRESS` workflow.
|
|
23
23
|
> - **Status:** `$BOOK_ROOT/.../status.jsonl` = append-only NDJSON event log; fold to derive the run array. `step-done` carries `parentSha` captured at step START, optional `verdict` (`PASS|CONCERNS|FAIL`), `failures`, `attempt`, `strategy` (`STANDARD|PIVOT|FINAL`). **If** `failures` present → `PASS => failures=0`, `FAIL => failures>0`, `CONCERNS => failures>=0`.
|
|
24
|
-
> - **Locks:** Step 1 takes `$
|
|
25
|
-
> - **Status branch:**
|
|
26
|
-
> - **Worktrees:** **If** `runtimeWorktrees` = true (mint mode) → Step 2 `cd`s into `.worktrees/{FID}`. **Else** → adopt current branch in place, `WORKTREE_PATH=$REPO_ROOT`. cwd persists across subsequent Bash calls. **If** steps ever find `pwd` != `{WORKTREE_PATH}` → **Failure Path
|
|
24
|
+
> - **Locks:** Step 1 takes `$REPO_ROOT/docs/plans/{YYYYMM}/logs/{FID}/.lock` with `bkit locks acquire --kind=workflow` (hold `token`); Step 14 releases it via `bkit workflows close --flush --token=`, the **Failure Path** via `bkit workflows fail --token=`. **If** existing lock — its owning workflow's folded status.jsonl decides: `IN_PROGRESS` and last step <30min idle → **Failure Path**; any other holder (`DONE`, `FAILED`, `IN_PROGRESS` idle >=30min, no run) → reclaimed.
|
|
25
|
+
> - **Status branch:** From Step 2 all steps write `$BOOK_ROOT/docs/plans/{YYYYMM}/logs/{FID}/status.jsonl` (`{STATUS}`); `BOOK_ROOT` = `{WORKTREE_PATH}`. Stage path-scoped via `bkit ledgers commit`; NEVER stage all files (`-A`) or blanket `docs/`. one commit per flush block: Commit + Push Bookkeeping → `docs({FID}): ship bookkeeping bkit [skip ci]` → push `{SHIP_BRANCH}` (pre-merge: docs, logs, ledgers, skill removals); Close Workflow → `docs({FID}): ship DONE bkit [skip ci]`, **Failure Path** → `chore({FID}): ship FAILED bkit [skip ci]` → push `dev` from a throwaway `origin/dev` checkout; a refused close push → close PR.
|
|
26
|
+
> - **Worktrees:** **If** `runtimeWorktrees` = true (mint mode) → Step 2 `cd`s into `.worktrees/{FID}`. **Else** → adopt current branch in place, `WORKTREE_PATH=$REPO_ROOT`. cwd persists across subsequent Bash calls. **If** steps ever find `pwd` != `{WORKTREE_PATH}` → **Failure Path**; Step 14 ends in `{REPO_ROOT}`.
|
|
27
27
|
> - **gh MCP fallback:** `gh` primary for PR / CI / merge surface. **If** a command exits 80, **or** `runtimeGithubCli` = false in the `runtime-resolved` row of `{STATUS}` → use mapped MCP tool (needs `actions` toolset in `.mcp.json`): `bkit prs open` / `bkit branches land` stage `open` → `create_pull_request` with the printed `title` / `body` / `base` / `head`; `bkit prs probe --number` → `pull_request_read` (`get`, minimal fields); `bkit prs probe --head` / `bkit workflows handover --push` → `list_pull_requests`; `bkit prs merge` / `bkit branches land` stage `merge` → `merge_pull_request` (printed skip-token-free `subject` as `commit_message`, empty body; `--match-head` SHA as `sha`); `bkit prs verbose-ci` → `update_pull_request`; `bkit prs update-branch --number` → `update_pull_request_branch`; `bkit prs checks --number` → `pull_request_read` (`get_status`); `bkit runs wait` / `bkit runs dispatch` / `bkit runs revalidate` / `bkit runs gate` → `actions_list`; `gh run view {id} --json jobs` → `actions_get`; `gh run view --log-failed` → `get_job_logs` (`failed_only=true`). Record via `bkit prs transport-row --file={STATUS} --kind=fallback --from=<gh command> --to=<MCP tool> --reason=<why> --asserted-by=<re-read>` — **Skip if** `{STATUS}` not set. Tracker calls always stay on MCP; never invent `gh` read-paths for trackers.
|
|
28
28
|
|
|
29
29
|
<!-- bkit:tracker github start -->
|
|
30
30
|
|
|
31
|
-
> - **Tracker:** GitHub Issues via MCP server `github` (
|
|
32
|
-
> - **Labels:** Phase labels `bkit:design`, `bkit:plan`, `bkit:build`, `bkit:ship`, `bkit:merged` (mutually exclusive
|
|
33
|
-
> - **Comments:** Post the `comment` a step's `bkit` block prints as a new comment via `mcp__github__add_issue_comment({ owner: "{OWNER}", repo: "{REPO}", issue_number: {ISSUE_ID}, body: "{BODY}" })` before its gate; every gate includes `Issue comment attempted (Step N section)`. never edit, paraphrase, summarise, truncate, deduplicate, or reorder prior tracker content.
|
|
31
|
+
> - **Tracker:** GitHub Issues via MCP server `github` (`.mcp.json` `mcpServers.github`). Tools: `mcp__github__issue_read` (method `get` / `get_comments` / `get_labels`), `mcp__github__issue_write` (method `update`), `mcp__github__add_issue_comment`, `mcp__github__list_issues`, `mcp__github__projects_write` (method `add_project_item` / `update_project_item`), `mcp__github__projects_list` (method `list_project_items`); board status sync needs `projects` toolset in `.mcp.json` (`X-MCP-Toolsets`) and `package.json` `bkit.githubProject`, absent either → silently skipped. Assert `{ISSUE_ID}` / `{STATE}` / `{LABELS}` non-empty before tool calls; writes best-effort, never gate; **If** failure → retry once after 5s → continue.
|
|
32
|
+
> - **Labels:** Phase labels `bkit:design`, `bkit:plan`, `bkit:build`, `bkit:debug`, `bkit:ship`, `bkit:merged` (mutually exclusive; a phase start drops the old phase, every `next:*` and `bkit:failed`). Additive labels: `bkit:auto` (bkit-auto trigger gate), `bkit:failed` (Failure Path). `bkit issues labels` computes each transition; MCP writes it.
|
|
33
|
+
> - **Comments:** Post the `comment` a step's `bkit` block prints as a new comment via `mcp__github__add_issue_comment({ owner: "{OWNER}", repo: "{REPO}", issue_number: {ISSUE_ID}, body: "{BODY}" })` before its gate; every gate includes `Issue comment attempted (Step N section)`. never edit, paraphrase, summarise, truncate, deduplicate, or reorder prior tracker content.
|
|
34
34
|
|
|
35
35
|
<!-- bkit:tracker github end -->
|
|
36
36
|
<!-- bkit:tracker linear start -->
|
|
37
37
|
|
|
38
|
-
> - **Tracker:** Linear via MCP server `linear` (
|
|
39
|
-
> - **Labels:** Phase labels `bkit:design`, `bkit:plan`, `bkit:build`, `bkit:ship`, `bkit:merged` (mutually exclusive
|
|
40
|
-
> - **Comments:** Post the `comment` a step's `bkit` block prints as a new comment via `mcp__linear__save_comment({ issueId: "{ISSUE_ID}", body: "{BODY}" })` (no `id`
|
|
38
|
+
> - **Tracker:** Linear via MCP server `linear` (`.mcp.json` `mcpServers.linear`). Tools: `mcp__linear__get_issue`, `mcp__linear__save_issue`, `mcp__linear__save_issue_label`, `mcp__linear__save_comment`, `mcp__linear__list_comments`, `mcp__linear__list_issues`. Assert `{ISSUE_ID}` / `{STATE}` / `{LABELS}` non-empty before tool calls; `save_*` writes best-effort, never gate; **If** failure → retry once after 5s → continue. `save_issue` always includes `id` and is all-or-nothing (one state or label name the team lacks rejects the whole call) → labels and state in separate calls, labels first; create each printed `add` entry first via `save_issue_label({ name })` (`already exists` = done). `Could not find state` / `Could not find label` → log `Unapplied: <state|label> "<name>" not in team`, no retry, continue.
|
|
39
|
+
> - **Labels:** Phase labels `bkit:design`, `bkit:plan`, `bkit:build`, `bkit:debug`, `bkit:ship`, `bkit:merged` (mutually exclusive; a phase start drops the old phase, every `next:*` and `bkit:failed`). Additive labels: `bkit:auto` (bkit-auto trigger gate), `bkit:failed` (Failure Path). `bkit issues labels` computes each transition; MCP writes it.
|
|
40
|
+
> - **Comments:** Post the `comment` a step's `bkit` block prints as a new comment via `mcp__linear__save_comment({ issueId: "{ISSUE_ID}", body: "{BODY}" })` (no `id`) before its gate; every gate includes `Issue comment attempted (Step N section)`. never edit, paraphrase, summarise, truncate, deduplicate, or reorder prior tracker content.
|
|
41
41
|
|
|
42
42
|
<!-- bkit:tracker linear end -->
|
|
43
|
+
<!-- bkit:tracker jira start -->
|
|
44
|
+
|
|
45
|
+
> - **Tracker:** Jira via MCP server `jira` (`.mcp.json` `mcpServers.jira`). Tools: `mcp__jira__getJiraIssue`, `mcp__jira__editJiraIssue`, `mcp__jira__transitionJiraIssue`, `mcp__jira__addOrEditJiraIssueComment`, `mcp__jira__searchJiraIssuesUsingJql`, `mcp__jira__executeRead`; every call passes `cloudId: "{TRACKER_SITE}"`. Assert `{ISSUE_ID}` / `{TRACKER_SITE}` / `{STATE}` / `{LABELS}` non-empty before tool calls; writes best-effort, never gate; **If** failure → retry once after 5s → continue. `getJiraIssue` always passes `view: "evidence"` (other views omit labels). `editJiraIssue` `fields.labels` replaces the whole set → pass full printed `LABELS`; labels and status in separate calls, labels first; never pass `fields` / `update` to `transitionJiraIssue`. Status change: `executeRead({ name: "listJiraIssueTransitions", inputs: { issueIdOrKey } })` → transition whose `to.name` = target status → `transitionJiraIssue({ issueIdOrKey, transitionId })`; none → log `Unapplied: status "<name>" not reachable`, no retry, continue. Comment reads: `executeRead({ name: "listJiraIssueComments", inputs: { issueIdOrKey, maxResults: 100, startAt } })`, oldest first, raise `startAt` while `isLast` is false; page with `appliedContentFormat` = `html` → re-read it one comment per call (`maxResults: 1`).
|
|
46
|
+
> - **Labels:** Phase labels `bkit:design`, `bkit:plan`, `bkit:build`, `bkit:debug`, `bkit:ship`, `bkit:merged` (mutually exclusive; a phase start drops the old phase, every `next:*` and `bkit:failed`). Additive labels: `bkit:auto` (bkit-auto trigger gate), `bkit:failed` (Failure Path). `bkit issues labels` computes each transition; MCP writes it.
|
|
47
|
+
> - **Comments:** Post the `comment` a step's `bkit` block prints as a new comment via `mcp__jira__addOrEditJiraIssueComment({ cloudId: "{TRACKER_SITE}", issueIdOrKey: "{ISSUE_ID}", commentBody: "{BODY}" })` (no `commentId`) before its gate; every gate includes `Issue comment attempted (Step N section)`. never edit, paraphrase, summarise, truncate, deduplicate, or reorder prior tracker content. Body over 32,767 characters → post as consecutive comments split at line breaks, in order.
|
|
48
|
+
|
|
49
|
+
<!-- bkit:tracker jira end -->
|
|
43
50
|
|
|
44
51
|
> - **Timeouts:** **If** workflow or subagent run > 3600 seconds → **Failure Path**.
|
|
45
52
|
> - **Limits:** `MAX_MERGE_ATTEMPT` and `MAX_REVALIDATE_ATTEMPT` resolved by name via `bkit counters route --limit=` in fenced routing blocks below.
|
|
@@ -54,15 +61,18 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
54
61
|
|
|
55
62
|
1. Write the error message / tool response to `{OUTBOX_ROOT}/error.md` (`--error-file` dropped while `{OUTBOX_ROOT}` is not held). `{STDERR_FILE}` = `{OUTBOX}/stderr.log` holding the failed shell command's stderr — drop `--stderr-file` when the failure was not a shell command or `{OUTBOX}` is not set yet; drop `--token` when `{LOCK_TOKEN}` is empty, `--pr` when `{PR_NUMBER}` is empty; `--max-exceeded` only when a `counters route` exit 1 (a `MAX_*` limit) sent the run here; `{LABEL_FLAGS}` = one `--label=<name>` per current `LABELS` entry. Abort any in-progress rebase, record the failure, release the lock, clear sentinels — **state only, no `add` / `commit` / `push`**; a MERGED PR moves the issue to `bkit:merged` plus `bkit:failed`, else the prior phase label persists:
|
|
56
63
|
```bash
|
|
57
|
-
"{BKIT}" workflows fail --workflow=ship --fid={FID} --month={YYYYMM} --token={LOCK_TOKEN} --
|
|
64
|
+
"{BKIT}" workflows fail --workflow=ship --fid={FID} --month={YYYYMM} --token={LOCK_TOKEN} --max-exceeded --pr={PR_NUMBER} {LABEL_FLAGS} --step-number={N} --step-title="{Step Name}" --sub-step={M} --error-file="{OUTBOX_ROOT}/error.md" --stderr-file="{STDERR_FILE}"
|
|
58
65
|
```
|
|
59
|
-
→ hold `handoverNeeded` as `{HANDOVER_NEEDED}`, `labels` as `{LABELS}`. **If** exit non-zero → log `Lock removal failed` with the printed `lock` to stderr, continue.
|
|
66
|
+
→ hold `handoverNeeded` as `{HANDOVER_NEEDED}`, `labels` as `{LABELS}`, `trackerState` as `{TRACKER_STATE}`. **If** exit non-zero → log `Lock removal failed` with the printed `lock` to stderr, continue.
|
|
60
67
|
2. <!-- bkit:tracker github start -->
|
|
61
68
|
`mcp__github__issue_write({ method: "update", owner: "{OWNER}", repo: "{REPO}", issue_number: {ISSUE_ID}, labels: [{LABELS}] })`.
|
|
62
69
|
<!-- bkit:tracker github end -->
|
|
63
70
|
<!-- bkit:tracker linear start -->
|
|
64
|
-
`mcp__linear__save_issue({ id: "{ISSUE_ID}",
|
|
71
|
+
`mcp__linear__save_issue_label({ name })` per printed `add` entry → `mcp__linear__save_issue({ id: "{ISSUE_ID}", labels: [{LABELS}] })` → `mcp__linear__save_issue({ id: "{ISSUE_ID}", state: "{TRACKER_STATE}" })`.
|
|
65
72
|
<!-- bkit:tracker linear end -->
|
|
73
|
+
<!-- bkit:tracker jira start -->
|
|
74
|
+
`mcp__jira__editJiraIssue({ cloudId: "{TRACKER_SITE}", issueIdOrKey: "{ISSUE_ID}", fields: { labels: [{LABELS}] } })` → move status to `{TRACKER_STATE}` (**Tracker** status change).
|
|
75
|
+
<!-- bkit:tracker jira end -->
|
|
66
76
|
<!-- bkit:tracker true start -->
|
|
67
77
|
Post `comment` (when non-null).
|
|
68
78
|
<!-- bkit:tracker true end -->
|
|
@@ -71,9 +81,9 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
71
81
|
Context: You are a subagent in the Ship Debug phase. Switch into working directory `cd "{WORKTREE_PATH}"` → verify with `pwd` → use for all subsequent file operations.
|
|
72
82
|
Read: `{STATUS}`, `docs/plans/{YYYYMM}/logs/{FID}/ship-input-{RUN}.md` (if present), `docs/plans/{YYYYMM}/logs/{FID}/ship-deferred-sweep.md` (if present), glob `docs/plans/{YYYYMM}/logs/{FID}/ship-failure-diagnose-*.md`, glob `docs/plans/{YYYYMM}/logs/{FID}/ship-failure-remediate-*-log.md`, `git diff origin/dev..HEAD` (apply **Large Diff Guard**).
|
|
73
83
|
Create: `docs/plans/{YYYYMM}/logs/{FID}/ship-handover.md`.
|
|
74
|
-
5.
|
|
84
|
+
5. Flush the run's book to `dev` as one commit and one push — **Skip if** `{FID}` or `{YYYYMM}` empty; drop `--worktree` when `{WORKTREE_PATH}` is not set:
|
|
75
85
|
```bash
|
|
76
|
-
"{BKIT}" workflows handover --workflow=ship --fid={FID} --month={YYYYMM} --flush --
|
|
86
|
+
"{BKIT}" workflows handover --workflow=ship --fid={FID} --month={YYYYMM} --flush --worktree="{WORKTREE_PATH}"
|
|
77
87
|
```
|
|
78
88
|
**If** `HANDOVER_NEEDED` = true **and** `comment` non-null → post `comment` (handover linked only where the flush pushed it). **If** the push failed → do not claim success on tracker.
|
|
79
89
|
6. **STOP**, no further downstream steps.
|
|
@@ -87,15 +97,21 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
87
97
|
"$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")/node_modules/.bin/bkit" repo info --fetch
|
|
88
98
|
```
|
|
89
99
|
→ hold `bkit` as `{BKIT}`, `ownerRepo` as `{OWNER_REPO}`, `owner` as `{OWNER}`, `repo` as `{REPO}`, `branch` as initial `{BRANCH}`, `repoRoot` as `{REPO_ROOT}`, `outboxRoot` as `{OUTBOX_ROOT}`, `bkitAdvisory` as `{BKIT_ADVISORY}`. **If** `BKIT_ADVISORY` != null → emit advisory `[bkit-ship] {BKIT_ADVISORY}`.
|
|
100
|
+
<!-- bkit:tracker true start -->
|
|
101
|
+
Hold `trackerTeam` as `{TRACKER_TEAM}`, `trackerProject` as `{TRACKER_PROJECT}`, `trackerSite` as `{TRACKER_SITE}`.
|
|
102
|
+
<!-- bkit:tracker true end -->
|
|
90
103
|
2. **If** `ISSUE_ID` already set by AGENTS.md → skip. **Else**:
|
|
91
104
|
<!-- bkit:tracker github start -->
|
|
92
105
|
Extract from session prompt: `<id>{N}</id>`, `<github_issue>{N}</github_issue>`, `GitHub issue: #{N}`, `ISSUE-{N}`, or bare `#{N}` → numeric N → `ISSUE_ID`. **If** no `ID` found → log `No issue ID in the session prompt.` never create a tracker issue. → **STOP**, no further downstream steps.
|
|
93
106
|
<!-- bkit:tracker github end -->
|
|
94
107
|
<!-- bkit:tracker linear start -->
|
|
95
|
-
Extract from session prompt: `<id>{ID}</id>`, `<linear_issue>{ID}</linear_issue>`, `Linear issue: {ID}`, `ISSUE-{ID}`, or
|
|
108
|
+
Extract from session prompt: `<id>{ID}</id>`, `<linear_issue>{ID}</linear_issue>`, `Linear issue: {ID}`, `ISSUE-{ID}`, or `[A-Z]+-\d+` → first match → `ISSUE_ID`. **If** no `ID` found → log `No issue ID in the session prompt.` never create a tracker issue. → **STOP**, no further downstream steps.
|
|
96
109
|
<!-- bkit:tracker linear end -->
|
|
110
|
+
<!-- bkit:tracker jira start -->
|
|
111
|
+
Extract from session prompt: `<id>{ID}</id>`, `<jira_issue>{ID}</jira_issue>`, `Jira issue: {ID}`, `ISSUE-{ID}`, a `/browse/{ID}` link, or `[A-Z][A-Z0-9]+-\d+` → first match → `ISSUE_ID`. **If** no `ID` found → log `No issue ID in the session prompt.` never create a tracker issue. → **STOP**, no further downstream steps.
|
|
112
|
+
<!-- bkit:tracker jira end -->
|
|
97
113
|
<!-- bkit:tracker false start -->
|
|
98
|
-
Scan session prompt for `<id>{ID}</id>` or `ISSUE-{ID}` → first match → `ISSUE_ID`. **If** no `ID` found → set `ISSUE_ID=""
|
|
114
|
+
Scan session prompt for `<id>{ID}</id>` or `ISSUE-{ID}` → first match → `ISSUE_ID`. **If** no `ID` found → set `ISSUE_ID=""`, log `Tracker not wired — proceeding without issue ID.`, continue with FID derived from branch name.
|
|
99
115
|
<!-- bkit:tracker false end -->
|
|
100
116
|
3. **If** `LABELS`, `DESCRIPTION`, `COMMENTS` already set by AGENTS.md → sort `COMMENTS` oldest to newest → skip. **Else**:
|
|
101
117
|
<!-- bkit:tracker github start -->
|
|
@@ -104,8 +120,11 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
104
120
|
<!-- bkit:tracker linear start -->
|
|
105
121
|
`mcp__linear__get_issue({ id: "{ISSUE_ID}" })` → extract `state.name` → `STATE`; `labels[].name` → `LABELS`; `description` → `DESCRIPTION`; `title` → `TITLE`; `url` → `URL`. Then `mcp__linear__list_comments({ issueId: "{ISSUE_ID}", orderBy: "createdAt desc", limit: 250 })` → sort oldest to newest → `COMMENTS`.
|
|
106
122
|
<!-- bkit:tracker linear end -->
|
|
123
|
+
<!-- bkit:tracker jira start -->
|
|
124
|
+
`mcp__jira__getJiraIssue({ cloudId: "{TRACKER_SITE}", issueIdOrKey: "{ISSUE_ID}", view: "evidence" })` → extract `fields.status.name` → `STATE`; `fields.labels` → `LABELS`; `fields.description` → `DESCRIPTION`; `fields.summary` → `TITLE`; `{TRACKER_SITE}/browse/{ISSUE_ID}` → `URL`. Then read comments (**Tracker** comment reads) → `COMMENTS`.
|
|
125
|
+
<!-- bkit:tracker jira end -->
|
|
107
126
|
<!-- bkit:tracker false start -->
|
|
108
|
-
No tracker wired
|
|
127
|
+
No tracker wired → `STATE`, `LABELS`, `DESCRIPTION`, `COMMENTS` all empty; input artifact built from session prompt alone.
|
|
109
128
|
<!-- bkit:tracker false end -->
|
|
110
129
|
4. Resolve `FID` — first match wins; never borrow another feature's `FID` from a leftover lock or the newest bucket:
|
|
111
130
|
1. Session prompt names it — an `FID` slug, a `feat/{FID}` branch, or a path under `docs/plans/{YYYYMM}/` (`{FID}-design.md`, `{FID}-plan.md`, `logs/{FID}/`).
|
|
@@ -131,45 +150,61 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
131
150
|
```bash
|
|
132
151
|
"{BKIT}" runtime detect --fid="{FID}"
|
|
133
152
|
```
|
|
134
|
-
→ hold `
|
|
153
|
+
→ hold `runtimeWorktrees` as `{RUNTIME_WORKTREES}`.
|
|
135
154
|
6. Acquire concurrency lock:
|
|
136
155
|
```bash
|
|
137
|
-
"{BKIT}" locks acquire --kind=workflow --workflow=ship --fid="{FID}"
|
|
156
|
+
"{BKIT}" locks acquire --kind=workflow --workflow=ship --fid="{FID}"
|
|
138
157
|
```
|
|
139
158
|
→ hold `token` as `{LOCK_TOKEN}`, `month` as `{YYYYMM}`.
|
|
140
|
-
7.
|
|
141
|
-
Compute the label transition and board move — `{LABEL_FLAGS}` = one `--label=<name>` per current `LABELS` entry:
|
|
159
|
+
7. Resolve `SHIP_BRANCH`, then create / resume worktree, or adopt it in place (no rebase — Path A) — straight after the lock, so every later failure has a book to keep its record in; `--branch` = the branch the session prompt names, dropped when it names none:
|
|
142
160
|
```bash
|
|
143
|
-
"{BKIT}"
|
|
161
|
+
"{BKIT}" worktrees setup --workflow=ship --fid="{FID}" --month="{YYYYMM}" --detect --branch="{PROMPT_BRANCH}"
|
|
144
162
|
```
|
|
145
|
-
→ hold `
|
|
146
|
-
|
|
147
|
-
<!-- bkit:tracker github start -->
|
|
148
|
-
`mcp__github__issue_write({ method: "update", owner: "{OWNER}", repo: "{REPO}", issue_number: {ISSUE_ID}, labels: [{LABELS}] })`.
|
|
149
|
-
**If** `BOARD` = null → log `boardSkipped` → skip. **Else** → ensure on board `mcp__github__projects_write({BOARD}.addItem)` → resolve numeric item id `mcp__github__projects_list({BOARD}.listItems)` → entry whose content issue number == `{ISSUE_ID}` → numeric `id` → `{ITEM_ID}` → set status `mcp__github__projects_write({BOARD}.updateItem + item_id: {ITEM_ID})`.
|
|
150
|
-
<!-- bkit:tracker github end -->
|
|
151
|
-
<!-- bkit:tracker linear start -->
|
|
152
|
-
`mcp__linear__save_issue({ id: "{ISSUE_ID}", state: "In Progress", labels: [{LABELS}] })`.
|
|
153
|
-
<!-- bkit:tracker linear end -->
|
|
154
|
-
8. Find where the run books, then open it — clear stale sentinels, write `workflow-started` and `ship-start-workflow` rows:
|
|
163
|
+
→ hold `worktreePath` as `{WORKTREE_PATH}`, `branch` as `{SHIP_BRANCH}`.
|
|
164
|
+
8. Enter the worktree and find where the run books:
|
|
155
165
|
```bash
|
|
156
|
-
"{
|
|
166
|
+
cd "{WORKTREE_PATH}" || exit 1
|
|
167
|
+
[ "$(git branch --show-current)" = "{SHIP_BRANCH}" ] || { echo "[bkit-ship] not on {SHIP_BRANCH} in {WORKTREE_PATH}" >&2; exit 1; }
|
|
168
|
+
"{BKIT}" status path --workflow=ship --fid="{FID}" --month="{YYYYMM}"
|
|
157
169
|
```
|
|
158
|
-
→ hold `path` as `{STATUS}`, `bookRoot` as `{BOOK_ROOT}
|
|
170
|
+
→ hold `path` as `{STATUS}`, `bookRoot` as `{BOOK_ROOT}`. Open the run — clear stale sentinels, write `workflow-started` and `ship-start-workflow` rows — and record the runtime:
|
|
159
171
|
```bash
|
|
160
|
-
mkdir -p "{OUTBOX}" || exit 1
|
|
161
172
|
rm -f "{BOOK_ROOT}/docs/plans/{YYYYMM}/logs/{FID}/.deferred-blocked" "{BOOK_ROOT}/docs/plans/{YYYYMM}/logs/{FID}/.rebase-failed"
|
|
162
|
-
"{BKIT}" workflows start --workflow=ship --fid="{FID}" --month="{YYYYMM}" --file="{STATUS}" --lock-held --token="{LOCK_TOKEN}"
|
|
173
|
+
"{BKIT}" workflows start --workflow=ship --fid="{FID}" --month="{YYYYMM}" --file="{STATUS}" --lock-held --token="{LOCK_TOKEN}" || exit 1
|
|
163
174
|
"{BKIT}" steps done --workflow=ship --step=ship-start-workflow --file="{STATUS}" --commit=none >/dev/null || exit 1
|
|
164
|
-
"{BKIT}"
|
|
175
|
+
"{BKIT}" runtime row --workflow=ship --file="{STATUS}" >/dev/null || exit 1
|
|
176
|
+
"{BKIT}" runtime assert --workflow=ship --file="{STATUS}" >/dev/null
|
|
165
177
|
```
|
|
166
178
|
→ hold `run` as `{RUN}`.
|
|
167
|
-
|
|
179
|
+
Update `BRANCH` = `SHIP_BRANCH`; carry `SHIP_BRANCH` to every later step.
|
|
180
|
+
9. <!-- bkit:tracker true start -->
|
|
181
|
+
Compute the label transition and board move — `{LABEL_FLAGS}` = one `--label=<name>` per current `LABELS` entry:
|
|
168
182
|
```bash
|
|
169
|
-
"{BKIT}" issues
|
|
183
|
+
"{BKIT}" issues labels --phase=ship --board=progress --issue="{ISSUE_ID}" --owner-repo="{OWNER_REPO}" {LABEL_FLAGS}
|
|
170
184
|
```
|
|
171
|
-
→ hold `
|
|
172
|
-
|
|
185
|
+
→ hold `labels` as `{LABELS}`, `trackerState` as `{TRACKER_STATE}`, `board` as `{BOARD}`, `boardSkipped`.
|
|
186
|
+
<!-- bkit:tracker true end -->
|
|
187
|
+
<!-- bkit:tracker github start -->
|
|
188
|
+
`mcp__github__issue_write({ method: "update", owner: "{OWNER}", repo: "{REPO}", issue_number: {ISSUE_ID}, labels: [{LABELS}] })`.
|
|
189
|
+
**If** `BOARD` = null → log `boardSkipped` → skip. **Else** → ensure on board `mcp__github__projects_write({BOARD}.addItem)` → `mcp__github__projects_list({BOARD}.listItems)` → numeric `id` of entry whose content issue number == `{ISSUE_ID}` → `{ITEM_ID}` → set status `mcp__github__projects_write({BOARD}.updateItem + item_id: {ITEM_ID})`.
|
|
190
|
+
<!-- bkit:tracker github end -->
|
|
191
|
+
<!-- bkit:tracker linear start -->
|
|
192
|
+
`mcp__linear__save_issue_label({ name })` per printed `add` entry → `mcp__linear__save_issue({ id: "{ISSUE_ID}", labels: [{LABELS}] })` → `mcp__linear__save_issue({ id: "{ISSUE_ID}", state: "{TRACKER_STATE}" })`.
|
|
193
|
+
<!-- bkit:tracker linear end -->
|
|
194
|
+
<!-- bkit:tracker jira start -->
|
|
195
|
+
`mcp__jira__editJiraIssue({ cloudId: "{TRACKER_SITE}", issueIdOrKey: "{ISSUE_ID}", fields: { labels: [{LABELS}] } })` → move status to `{TRACKER_STATE}` (**Tracker** status change).
|
|
196
|
+
<!-- bkit:tracker jira end -->
|
|
197
|
+
10. Create the outbox (`{OUTBOX}` = `{OUTBOX_ROOT}/{FID}`) and run the repo preflight:
|
|
198
|
+
```bash
|
|
199
|
+
mkdir -p "{OUTBOX}" || exit 1
|
|
200
|
+
"{BKIT}" repo preflight --owner-repo="{OWNER_REPO}"
|
|
201
|
+
```
|
|
202
|
+
11. Write `DESCRIPTION` to `{OUTBOX}/issue-description.md` and `COMMENTS` as read to `{OUTBOX}/issue-comments.json` (empty / `[]` when no tracker), then build `ISSUE_TEXT`:
|
|
203
|
+
```bash
|
|
204
|
+
"{BKIT}" issues text --description-file="{OUTBOX}/issue-description.md" --comments-file="{OUTBOX}/issue-comments.json"
|
|
205
|
+
```
|
|
206
|
+
→ hold `text` as `{ISSUE_TEXT}`.
|
|
207
|
+
12. <!-- bkit:tracker true start -->
|
|
173
208
|
Comment:
|
|
174
209
|
```bash
|
|
175
210
|
"{BKIT}" issues comment --workflow=ship --workflow-heading --step-number=1 --step-title="Start Workflow" --owner-repo="{OWNER_REPO}" --tree="{BRANCH}"
|
|
@@ -179,12 +214,13 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
179
214
|
### 🔒 Gate 1 — Start Workflow
|
|
180
215
|
|
|
181
216
|
```bash
|
|
182
|
-
"{BKIT}" steps gate --
|
|
217
|
+
"{BKIT}" steps gate --workflow=ship --step=ship-start-workflow --fid={FID} --month={YYYYMM} --token={LOCK_TOKEN} --placeholder=OWNER_REPO={OWNER_REPO} --placeholder=BRANCH={BRANCH} --placeholder=RUNTIME_WORKTREES={RUNTIME_WORKTREES}
|
|
183
218
|
```
|
|
184
219
|
|
|
185
|
-
- [ ] Mechanical checks passed (`steps gate` exit 0: placeholders
|
|
220
|
+
- [ ] Mechanical checks passed (`steps gate` exit 0: placeholders held, FID shape, lock held)
|
|
186
221
|
- [ ] Issue ID resolved (`ISSUE_ID` non-empty when tracker wired; may be empty under `none`)
|
|
187
|
-
- [ ]
|
|
222
|
+
- [ ] On `SHIP_BRANCH` (not `dev|main`), worktree created / resumed or adopted (no rebase — Path A) before any tracker write; run opened in the worktree (`workflow-started`, `ship-start-workflow`, `runtime-resolved`)
|
|
223
|
+
- [ ] Outbox created (`{OUTBOX}`)
|
|
188
224
|
|
|
189
225
|
<!-- bkit:tracker true start -->
|
|
190
226
|
|
|
@@ -196,29 +232,16 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
196
232
|
|
|
197
233
|
## 🤖 Step 2 — Verify PR (Worktree Setup + Regression Guard)
|
|
198
234
|
|
|
199
|
-
1.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
```
|
|
203
|
-
→ hold `worktreePath` as `{WORKTREE_PATH}`, `branch` as `{SHIP_BRANCH}`.
|
|
204
|
-
2. Enter the worktree and record the runtime:
|
|
205
|
-
```bash
|
|
206
|
-
cd "{WORKTREE_PATH}" || exit 1
|
|
207
|
-
[ "$(git branch --show-current)" = "{SHIP_BRANCH}" ] || { echo "[bkit-ship] not on {SHIP_BRANCH} in {WORKTREE_PATH}" >&2; exit 1; }
|
|
208
|
-
"{BKIT}" runtime row --workflow=ship --file="{STATUS}" >/dev/null || exit 1
|
|
209
|
-
"{BKIT}" runtime assert --workflow=ship --file="{STATUS}" >/dev/null
|
|
210
|
-
```
|
|
211
|
-
Update `BRANCH` = `SHIP_BRANCH`; carry `SHIP_BRANCH` to every later step.
|
|
212
|
-
Create: `docs/plans/{YYYYMM}/logs/{FID}/ship-input-{RUN}.md` in `{WORKTREE_PATH}` = session prompt + `ISSUE_TEXT` + `docs/plans/{YYYYMM}/{FID}-plan.md` (if present).
|
|
213
|
-
3. **If** `BRANCH` does not contain `{FID}` **and** does not contain `{ISSUE_ID}` (case-insensitive) → emit `[bkit-ship] WARNING branch {BRANCH} not named for {FID} — shipping it as named` → continue.
|
|
214
|
-
4. Find the branch's PR — open first, then merged:
|
|
235
|
+
1. Create: `docs/plans/{YYYYMM}/logs/{FID}/ship-input-{RUN}.md` in `{WORKTREE_PATH}` = session prompt + `ISSUE_TEXT` + `docs/plans/{YYYYMM}/{FID}-plan.md` (if present).
|
|
236
|
+
2. **If** `BRANCH` does not contain `{FID}` **and** does not contain `{ISSUE_ID}` (case-insensitive) → emit `[bkit-ship] WARNING branch {BRANCH} not named for {FID} — shipping it as named` → continue.
|
|
237
|
+
3. Find the branch's PR — open first, then merged:
|
|
215
238
|
```bash
|
|
216
239
|
"{BKIT}" prs probe --head="{SHIP_BRANCH}" --state=all
|
|
217
240
|
```
|
|
218
241
|
→ hold `number` as `PR_NUMBER`, `baseRefName` as `PR_BASE`, `state`.
|
|
219
242
|
**Route:**
|
|
220
243
|
- **If** exit 0 **and** `PR_BASE` != dev → **Failure Path**.
|
|
221
|
-
- **If** exit 0 → sub-step
|
|
244
|
+
- **If** exit 0 → sub-step 4.
|
|
222
245
|
- **If** exit 1 → open PR, `SHIP_OPENED_PR` = true, `docs/plans/{YYYYMM}/{FID}-plan.md` (if present):
|
|
223
246
|
```bash
|
|
224
247
|
B=$(git branch --show-current)
|
|
@@ -234,24 +257,24 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
234
257
|
```
|
|
235
258
|
**If** exit 80 → `create_pull_request` with the printed `title`, `body`, `base`, `head`. **If** any other non-zero exit → **Failure Path**. Re-run the `bkit prs probe` above → hold `number` as `PR_NUMBER`, `baseRefName` as `PR_BASE`, `state`. Assert `PR_NUMBER` non-empty and `PR_BASE` = dev. **Else** → **Failure Path**.
|
|
236
259
|
- **Else** → **Failure Path**.
|
|
237
|
-
|
|
260
|
+
4. **Route:**
|
|
238
261
|
- **If** `state` = MERGED → record the resume marker → Step 13:
|
|
239
262
|
```bash
|
|
240
263
|
"{BKIT}" status row --file="{STATUS}" --workflow=ship --type=ship-merged-on-entry >/dev/null
|
|
241
264
|
```
|
|
242
265
|
- **Else** → next sub-step.
|
|
243
|
-
|
|
266
|
+
5. Read PR head SHA (`ENTRY_HEAD`) and mergeable state:
|
|
244
267
|
```bash
|
|
245
268
|
"{BKIT}" prs probe --number="{PR_NUMBER}"
|
|
246
269
|
```
|
|
247
270
|
→ hold `headRefOid` as `ENTRY_HEAD`, `mergeable` as `MERGEABLE`. Assert `ENTRY_HEAD` non-empty.
|
|
248
|
-
|
|
271
|
+
6. **If** `SHIP_OPENED_PR` = true → wait for CI on the new PR first:
|
|
249
272
|
```bash
|
|
250
273
|
"{BKIT}" runs wait --pr="{PR_NUMBER}" --until=present --budget-s=120 || exit 1
|
|
251
274
|
"{BKIT}" runs wait --pr="{PR_NUMBER}" --until=completed
|
|
252
275
|
```
|
|
253
276
|
`"{BKIT}" prs checks --number={PR_NUMBER}` → assert `green` = true. **If** exit 4 (rollup unreadable), `total` = 0, or `green` = false → **Failure Path**.
|
|
254
|
-
|
|
277
|
+
7. Finish (bookkeeping to `$BOOK_ROOT`, no branch commit):
|
|
255
278
|
```bash
|
|
256
279
|
"{BKIT}" steps done --workflow=ship --step=ship-worktree-setup --file="{STATUS}" --artifact="docs/plans/{YYYYMM}/logs/{FID}/ship-input-{RUN}.md" --commit=none >/dev/null || exit 1
|
|
257
280
|
"{BKIT}" steps finish --workflow=ship --step=ship-regression-guard --file="{STATUS}" --verdict=PASS --commit=none --number=2 --title="Verify PR (Worktree Setup + Regression Guard)" --tree="{BRANCH}"
|
|
@@ -264,7 +287,7 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
264
287
|
```
|
|
265
288
|
|
|
266
289
|
- [ ] Mechanical checks passed (`steps gate` exit 0: `ship-input-{RUN}.md`, step `ship-worktree-setup` recorded; `steps finish` exit 0: `ship-regression-guard`)
|
|
267
|
-
- [ ]
|
|
290
|
+
- [ ] Naming warning emitted when `SHIP_BRANCH` is not named for `FID` / `ISSUE_ID`
|
|
268
291
|
- [ ] PR number non-empty (`PR_NUMBER`); `PR_BASE` = dev (opened by ship, `openedPr` row recorded, CI awaited — when no PR existed)
|
|
269
292
|
- [ ] Entry head and mergeable read (`ENTRY_HEAD`, `MERGEABLE`); no PR CI failures confirmed
|
|
270
293
|
|
|
@@ -488,6 +511,9 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
488
511
|
<!-- bkit:tracker linear start -->
|
|
489
512
|
`mcp__linear__get_issue({ id: "{ISSUE_ID}" })` → extract `labels[].name` → `LABELS`.
|
|
490
513
|
<!-- bkit:tracker linear end -->
|
|
514
|
+
<!-- bkit:tracker jira start -->
|
|
515
|
+
`mcp__jira__getJiraIssue({ cloudId: "{TRACKER_SITE}", issueIdOrKey: "{ISSUE_ID}", view: "evidence" })` → extract `fields.labels` → `LABELS`.
|
|
516
|
+
<!-- bkit:tracker jira end -->
|
|
491
517
|
```bash
|
|
492
518
|
"{BKIT}" prs merge --number="{PR_NUMBER}" --match-head="{GATE_HEAD}" --delete-branch {LABEL_FLAGS} --expect-merged
|
|
493
519
|
```
|
|
@@ -564,95 +590,88 @@ description: "Ship Feature — Autonomous merge and archive"
|
|
|
564
590
|
|
|
565
591
|
---
|
|
566
592
|
|
|
567
|
-
## 🤖 Step 13 —
|
|
593
|
+
## 🤖 Step 13 — Update Local Dev
|
|
568
594
|
|
|
569
595
|
**Run only if** `state` = MERGED.
|
|
570
596
|
|
|
571
|
-
1.
|
|
597
|
+
1. Fast-forward local `dev` to `origin/dev`, then finish:
|
|
572
598
|
```bash
|
|
573
|
-
|
|
574
|
-
"{BKIT}"
|
|
575
|
-
"{BKIT}" steps finish --workflow=ship --step=ship-switch-to-dev --file="{STATUS}" --commit=none --number=13 --title="Switch to Dev" --tree=dev
|
|
599
|
+
"{BKIT}" branches sync-dev || exit 1
|
|
600
|
+
"{BKIT}" steps finish --workflow=ship --step=ship-switch-to-dev --file="{STATUS}" --commit=none --number=13 --title="Update Local Dev" --tree=dev
|
|
576
601
|
```
|
|
577
602
|
|
|
578
|
-
### 🔒 Gate 13 —
|
|
603
|
+
### 🔒 Gate 13 — Update Local Dev
|
|
579
604
|
|
|
580
|
-
- [ ]
|
|
605
|
+
- [ ] Local `dev` fast-forwarded to `origin/dev`, or its local-only commits logged (`branches sync-dev` exit 0)
|
|
581
606
|
- [ ] Mechanical checks passed (`steps finish` exit 0: step `ship-switch-to-dev` recorded)
|
|
582
607
|
|
|
583
608
|
---
|
|
584
609
|
|
|
585
|
-
## 🤖 Step 14 —
|
|
586
|
-
|
|
587
|
-
**Run only if** `state` = MERGED.
|
|
588
|
-
|
|
589
|
-
1. Remove the feature worktree (only one a workflow created), then delete the local and remote feature branch unless another worktree holds it; finish:
|
|
590
|
-
```bash
|
|
591
|
-
"{BKIT}" worktrees remove --fid="{FID}" --branch="{SHIP_BRANCH}" || exit 1
|
|
592
|
-
"{BKIT}" steps finish --workflow=ship --step=ship-worktree-cleanup --file="{STATUS}" --commit=none --number=14 --title="Worktree Cleanup"
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
### 🔒 Gate 14 — Worktree Cleanup
|
|
596
|
-
|
|
597
|
-
- [ ] Worktree removed (`.worktrees/{FID}`, or was already absent, or ownership marker absent → skipped) and pruned
|
|
598
|
-
- [ ] Local and remote `{SHIP_BRANCH}` branch deleted or already absent (`branchDeleted`), or both kept and the holding worktree named (`branchBlockedBy`)
|
|
599
|
-
- [ ] Mechanical checks passed (`steps finish` exit 0: step `ship-worktree-cleanup` recorded)
|
|
600
|
-
|
|
601
|
-
---
|
|
602
|
-
|
|
603
|
-
## 🤖 Step 15 — Close Workflow
|
|
610
|
+
## 🤖 Step 14 — Close Workflow
|
|
604
611
|
|
|
605
612
|
1. Assert the capstone passed at the squash commit, recording the squash-merge CI verdict (`ship-merge-ci`) before routing:
|
|
606
613
|
```bash
|
|
607
614
|
"{BKIT}" runs gate --squash-of="{PR_NUMBER}" --repo="{OWNER_REPO}" --capstone-only --record="{STATUS}"
|
|
608
615
|
```
|
|
609
616
|
→ hold `head` as `{SQUASH_SHA}`.
|
|
610
|
-
2. Close
|
|
617
|
+
2. Close — keep the summary in the outbox (the close removes the worktree it lives in), land `docs({FID}): ship DONE bkit [skip ci]` on `dev` (refused → `ship-close/{FID}` PR), release the lock, remove the worktree and `{SHIP_BRANCH}`, return to `{REPO_ROOT}`:
|
|
611
618
|
```bash
|
|
612
|
-
|
|
619
|
+
rm -f "{OUTBOX}/ship-summary.md"
|
|
620
|
+
[ ! -f "docs/plans/{YYYYMM}/logs/{FID}/ship-summary.md" ] || cp "docs/plans/{YYYYMM}/logs/{FID}/ship-summary.md" "{OUTBOX}/ship-summary.md" || exit 1
|
|
621
|
+
"{BKIT}" workflows close --workflow=ship --fid="{FID}" --month="{YYYYMM}" --file="{STATUS}" --pr-number="{PR_NUMBER}" --squash-sha="{SQUASH_SHA}" --owner-repo="{OWNER_REPO}" --outbox="{OUTBOX}" --flush --token="{LOCK_TOKEN}" --branch="{SHIP_BRANCH}" --number=14 --title="Close Workflow"; rc=$?
|
|
622
|
+
cd "{REPO_ROOT}"; exit $rc
|
|
613
623
|
```
|
|
624
|
+
→ hold `landed.via` as `{CLOSE_VIA}`.
|
|
614
625
|
3. <!-- bkit:tracker true start -->
|
|
615
626
|
Compute the label transition and board move:
|
|
616
627
|
```bash
|
|
617
628
|
"{BKIT}" issues labels --phase=merged --board=review --issue="{ISSUE_ID}" --owner-repo="{OWNER_REPO}" {LABEL_FLAGS}
|
|
618
629
|
```
|
|
619
|
-
→ hold `labels` as `{LABELS}`, `board` as `{BOARD}`, `boardSkipped`.
|
|
630
|
+
→ hold `labels` as `{LABELS}`, `trackerState` as `{TRACKER_STATE}`, `board` as `{BOARD}`, `boardSkipped`.
|
|
620
631
|
<!-- bkit:tracker true end -->
|
|
621
632
|
<!-- bkit:tracker github start -->
|
|
622
633
|
`mcp__github__issue_write({ method: "update", owner: "{OWNER}", repo: "{REPO}", issue_number: {ISSUE_ID}, labels: [{LABELS}] })`. Do not close the issue.
|
|
623
|
-
**If** `BOARD` = null → log `boardSkipped` → skip. **Else** → ensure on board `mcp__github__projects_write({BOARD}.addItem)` →
|
|
634
|
+
**If** `BOARD` = null → log `boardSkipped` → skip. **Else** → ensure on board `mcp__github__projects_write({BOARD}.addItem)` → `mcp__github__projects_list({BOARD}.listItems)` → numeric `id` of entry whose content issue number == `{ISSUE_ID}` → `{ITEM_ID}` → set status `mcp__github__projects_write({BOARD}.updateItem + item_id: {ITEM_ID})`.
|
|
624
635
|
<!-- bkit:tracker github end -->
|
|
625
636
|
<!-- bkit:tracker linear start -->
|
|
626
|
-
`mcp__linear__save_issue({ id: "{ISSUE_ID}",
|
|
637
|
+
`mcp__linear__save_issue_label({ name })` per printed `add` entry → `mcp__linear__save_issue({ id: "{ISSUE_ID}", labels: [{LABELS}] })` → `mcp__linear__save_issue({ id: "{ISSUE_ID}", state: "{TRACKER_STATE}" })`. Do not set Done.
|
|
627
638
|
<!-- bkit:tracker linear end -->
|
|
639
|
+
<!-- bkit:tracker jira start -->
|
|
640
|
+
`mcp__jira__editJiraIssue({ cloudId: "{TRACKER_SITE}", issueIdOrKey: "{ISSUE_ID}", fields: { labels: [{LABELS}] } })` → move status to `{TRACKER_STATE}` (**Tracker** status change). Do not set Done.
|
|
641
|
+
<!-- bkit:tracker jira end -->
|
|
628
642
|
4. Collect setup tips:
|
|
629
643
|
```bash
|
|
630
644
|
"{BKIT}" tips --workflow=ship
|
|
631
645
|
```
|
|
632
646
|
Plain text, not JSON. Hold stdout as `{BKIT_TIPS}`; prints nothing or exits non-zero → `{BKIT_TIPS}` empty.
|
|
633
|
-
5. Final return: Display `ship-summary.md` content verbatim as final message to user; do not summarise or trim; do not auto-invoke. **If** `ship-summary.md` absent → display `PR was already merged — no ship summary this run.` **HARD STOP**.
|
|
647
|
+
5. Final return: Display `{OUTBOX}/ship-summary.md` content verbatim as final message to user; do not summarise or trim; do not auto-invoke. **If** `{OUTBOX}/ship-summary.md` absent → display `PR was already merged — no ship summary this run.` **HARD STOP**.
|
|
634
648
|
<!-- bkit:tracker true start -->
|
|
635
649
|
Append issue link [{ISSUE_ID} {TITLE}]({URL})
|
|
636
650
|
<!-- bkit:tracker true end -->
|
|
637
|
-
Append
|
|
638
|
-
Append
|
|
651
|
+
Append a `## Suggested Replies` heading.
|
|
652
|
+
Append `Would you like me to explain any of this in plain English? Then write 'yes, explain in plain english'.`
|
|
653
|
+
Append a `## bkit Tips` heading, unless `{BKIT_TIPS}` is empty.
|
|
654
|
+
Append `{BKIT_TIPS}`, unless empty.
|
|
639
655
|
6. **If** user requests plain English explanation → restate the summary in plain English; name terms and say what they mean; identifiers stay verbatim; plainness lives in sentences, NOT nouns; do not re-run any step.
|
|
640
656
|
|
|
641
|
-
### 🔒 Gate
|
|
657
|
+
### 🔒 Gate 14 — Close Workflow
|
|
642
658
|
|
|
643
659
|
```bash
|
|
644
|
-
"{BKIT}" steps gate --file="{
|
|
660
|
+
"{BKIT}" steps gate --file="{REPO_ROOT}/docs/plans/{YYYYMM}/logs/{FID}/status.jsonl" --ref=origin/dev --workflow=ship --step=ship-close-workflow
|
|
645
661
|
```
|
|
646
662
|
|
|
663
|
+
**If** `CLOSE_VIA` = close-pr-open → drop `--ref`, gate `--file="{STATUS}"`.
|
|
664
|
+
|
|
647
665
|
- [ ] Squash-merge CI capstone green (`runs gate --squash-of --capstone-only` exit 0 at `SQUASH_SHA`; row `ship-merge-ci` with `verdict`, `reason`)
|
|
648
|
-
- [ ] Close landed (`workflows close --flush` exit 0: `ship` `DONE`, close telemetry committed, single path-scoped `[skip ci]` close commit pushed to `dev` or published through `ship-close/{FID}`, lock released, close
|
|
649
|
-
- [ ]
|
|
650
|
-
- [ ]
|
|
651
|
-
- [ ]
|
|
666
|
+
- [ ] Close landed (`workflows close --flush` exit 0: `ship` `DONE`, close telemetry committed, single path-scoped `[skip ci]` close commit pushed to `dev` or published through `ship-close/{FID}`, lock released, throwaway checkout removed; a close that did not land keeps the lock and goes to the **Failure Path**)
|
|
667
|
+
- [ ] Worktree and `{SHIP_BRANCH}` removed, or kept with a reason; cwd = `{REPO_ROOT}` (`worktree.removed`, `worktree.branchDeleted`, `reason`, `branchBlockedBy`)
|
|
668
|
+
- [ ] Mechanical checks passed (`steps gate` exit 0: step `ship-close-workflow` recorded on `origin/dev`)
|
|
669
|
+
- [ ] Logs retained at `docs/plans/{YYYYMM}/logs/{FID}/` on `dev` for manual cleanup
|
|
670
|
+
- [ ] Final return displayed (`{OUTBOX}/ship-summary.md` content verbatim, copied before the close)
|
|
652
671
|
|
|
653
672
|
<!-- bkit:tracker true start -->
|
|
654
673
|
|
|
655
674
|
- [ ] Issue update attempted (phase label `bkit:merged`, status / state `In Review`; issue left open for human close)
|
|
656
|
-
- [ ] Artifact link list and telemetry report embedded in `Step
|
|
675
|
+
- [ ] Artifact link list and telemetry report embedded in `Step 14` comment
|
|
657
676
|
|
|
658
677
|
<!-- bkit:tracker true end -->
|
|
@@ -71,6 +71,14 @@ BKIT_GH_TOKEN=
|
|
|
71
71
|
# Generate at: https://linear.app/settings/api
|
|
72
72
|
BKIT_LINEAR_API_KEY=
|
|
73
73
|
|
|
74
|
+
# BKIT_JIRA_API_TOKEN — Atlassian API token for the Jira MCP server
|
|
75
|
+
# (mcp.atlassian.com/v2/mcp), sent as `Authorization: Bearer`. Create it with
|
|
76
|
+
# "Create API token with scopes" and pick the app "Atlassian MCP V2"; a classic
|
|
77
|
+
# token or another app is refused. An org admin must first allow API-token sign-in
|
|
78
|
+
# for the Rovo MCP server. Steps: .bkit/trackers.md § jira.
|
|
79
|
+
# Generate at: https://id.atlassian.com/manage-profile/security/api-tokens
|
|
80
|
+
BKIT_JIRA_API_TOKEN=
|
|
81
|
+
|
|
74
82
|
# BKIT_ANTHROPIC_API_KEY — Anthropic API key. Only needed if you run Claude Code
|
|
75
83
|
# without a Claude subscription (pay-per-token mode). Subscription users leave
|
|
76
84
|
# blank.
|
|
@@ -22,18 +22,7 @@ per-repo) → fill the fields below → **Save**.
|
|
|
22
22
|
|
|
23
23
|
@@CLOUD_NETWORK_ALLOWLIST@@
|
|
24
24
|
|
|
25
|
-
## 3 ·
|
|
26
|
-
|
|
27
|
-
Paste into the **Environment variables** field (`.env` format, one `KEY=value`
|
|
28
|
-
per line):
|
|
29
|
-
|
|
30
|
-
```dotenv
|
|
31
|
-
@@CLOUD_ENV_VARS@@
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
@@CLOUD_ENV_NOTES@@
|
|
35
|
-
|
|
36
|
-
## 4 · Setup script
|
|
25
|
+
## 3 · Setup script
|
|
37
26
|
|
|
38
27
|
Paste into the **Setup script** field. Runs once as root before the first
|
|
39
28
|
session; the resulting filesystem is snapshotted and reused, so later sessions
|
|
@@ -118,6 +107,17 @@ Keep total runtime under ~5 minutes or the snapshot won't build. `pnpm install`
|
|
|
118
107
|
and `vale sync` are **not** here — they belong in `.claude/hooks/bkit-cloud-bootstrap.sh`
|
|
119
108
|
(installed by `bkit install --auto=claude`) so they re-run on resumed sessions.
|
|
120
109
|
|
|
110
|
+
## 4 · Environment variables
|
|
111
|
+
|
|
112
|
+
Paste into the **Environment variables** field (`.env` format, one `KEY=value`
|
|
113
|
+
per line):
|
|
114
|
+
|
|
115
|
+
```dotenv
|
|
116
|
+
@@CLOUD_ENV_VARS@@
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
@@CLOUD_ENV_NOTES@@
|
|
120
|
+
|
|
121
121
|
## 5 · Verify (first session)
|
|
122
122
|
|
|
123
123
|
```bash
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
"Skill(*)",
|
|
6
6
|
"Bash(*)",
|
|
7
7
|
"mcp__github__*",
|
|
8
|
-
"
|
|
8
|
+
"mcp__linear__*",
|
|
9
|
+
"mcp__jira__*",
|
|
9
10
|
"WebSearch",
|
|
10
11
|
"Bash(git push --force-with-lease:*)",
|
|
11
12
|
"Read(./.env.example)",
|
|
@@ -60,11 +61,13 @@
|
|
|
60
61
|
"Bash(git checkout -- .:*)",
|
|
61
62
|
"Bash(git restore .:*)",
|
|
62
63
|
"Bash(git stash drop:*)",
|
|
64
|
+
"Bash(git stash clear:*)",
|
|
63
65
|
"Bash(git rebase -i:*)",
|
|
64
66
|
"Bash(gh repo delete:*)",
|
|
65
67
|
"Bash(gh pr close:*)",
|
|
66
68
|
"Bash(gh release delete:*)",
|
|
67
69
|
"Bash(git reset *--hard*)",
|
|
70
|
+
"Bash(git -* reset *--hard*)",
|
|
68
71
|
"Bash(git clean -*f*)",
|
|
69
72
|
"Bash(git checkout *.)",
|
|
70
73
|
"Bash(git checkout * . *)",
|
|
@@ -41,7 +41,7 @@ Add **each** line below as a secret (Name = the key, Value = the value). Set the
|
|
|
41
41
|
|
|
42
42
|
@@CLOUD_ENV_NOTES@@
|
|
43
43
|
|
|
44
|
-
- `
|
|
44
|
+
- `GITHUB_ISSUE_ID` (GitHub tracker) / `LINEAR_ISSUE_ID` (Linear tracker) are injected
|
|
45
45
|
**per session** by the Cursor integration — do **not** add them here.
|
|
46
46
|
- `BKIT_GH_TOKEN` PAT permissions (fine-grained for one owner, classic across owners) are documented in `.bkit/cloud.md`
|
|
47
47
|
§ `BKIT_GH_TOKEN` — token permissions (identical scope to the Claude side).
|
|
@@ -79,6 +79,6 @@ Your `/bkit-*` commands and bkit subagents load automatically from the committed
|
|
|
79
79
|
|
|
80
80
|
---
|
|
81
81
|
|
|
82
|
-
Tracker dispatch (Linear `@cursor` mention
|
|
82
|
+
Tracker dispatch (GitHub PR-label automation / Linear `@cursor` mention), the
|
|
83
83
|
`BKIT_GH_TOKEN` PAT permission table, and the one-environment-per-repo rationale all
|
|
84
84
|
live in `.bkit/cloud.md` § Cursor Cloud Agents.
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mcpServers": {
|
|
3
|
-
"linear": {
|
|
4
|
-
"type": "http",
|
|
5
|
-
"url": "https://mcp.linear.app/mcp"
|
|
6
|
-
},
|
|
7
3
|
"github": {
|
|
8
4
|
"type": "http",
|
|
9
5
|
"url": "https://api.githubcopilot.com/mcp/",
|
|
@@ -11,6 +7,17 @@
|
|
|
11
7
|
"Authorization": "Bearer ${BKIT_GH_TOKEN}",
|
|
12
8
|
"X-MCP-Toolsets": "context,issues,pull_requests,repos,users,projects,actions"
|
|
13
9
|
}
|
|
10
|
+
},
|
|
11
|
+
"linear": {
|
|
12
|
+
"type": "http",
|
|
13
|
+
"url": "https://mcp.linear.app/mcp"
|
|
14
|
+
},
|
|
15
|
+
"jira": {
|
|
16
|
+
"type": "http",
|
|
17
|
+
"url": "https://mcp.atlassian.com/v2/mcp",
|
|
18
|
+
"headers": {
|
|
19
|
+
"Authorization": "Bearer ${BKIT_JIRA_API_TOKEN}"
|
|
20
|
+
}
|
|
14
21
|
}
|
|
15
22
|
}
|
|
16
23
|
}
|