@gobing-ai/spur 0.4.10 → 0.4.11

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.
@@ -1,22 +1,27 @@
1
1
  ---
2
2
  name: spur-cli-builder
3
- description: "spur-cli noun reference: operate `spur builder` as the release plumbing surface - bump a workspace package (or the `workspace:`-pinned release set) with `bump-ver`, delete release tags with `drop-tags`, with commit + annotated tag + optional push; publish a package to npm with `publish` (and guard version drift with `bump-ver --check`); run the `/sp:dev-pr-review` spine ops with `pr`. Promoted from spur-dev (task 0617, ADR-051); frozen at exactly these four verbs."
3
+ description: "spur-cli noun reference: operate `spur builder` as the release plumbing surface - bump a workspace package (or the `workspace:`-pinned release set) with `bump-ver`, delete release tags with `drop-tags`, with commit + annotated tag + optional push; publish a package to npm with `publish` (and guard version drift with `bump-ver --check`); run the `/sp:dev-pr-review` PR loop with the four flat verbs `pr-status` (read-only status), `pr-check` (submission gate), `pr-open` (push + ensure PR) and `pr-review` (Codex request + wait + collect); report base-relative branch topology with `show-branches`. Promoted from spur-dev (task 0617, ADR-051); frozen at exactly these eight verbs."
4
4
  see_also:
5
5
  - spur-cli
6
6
  ---
7
7
 
8
8
  # spur builder - release plumbing
9
9
 
10
- `spur builder` is the CLI for **version bumps and release tags**. It wraps the internal
11
- `release-ops` implementation behind a public four-verb surface. The repo-local forwarder
10
+ `spur builder` is the CLI for **version bumps and release tags**, plus the PR-review loop and the
11
+ read-only branch report. It wraps the internal
12
+ `release-ops` implementation behind a public eight-verb surface. The repo-local forwarder
12
13
  (`scripts/commands/release.ts`) and its `spur-dev` dispatcher cases were retired in task 1173; the
13
14
  root `bun run bump-ver` / `bun run drop-tags` names route to `spur builder` directly. Package ids are
14
15
  the unscoped short names (`@gobing-ai/spur` → `spur`); the released set and the aggregate tag are
15
16
  discovered from the repo's own workspace manifests, so the same code serves any git+semver
16
17
  monorepo.
17
18
 
18
- This noun is **frozen at exactly four verbs** (`bump-ver`, `drop-tags`, plus `pr` and `publish` from the 2026-10-15 script-absorption entries) by operator consent (`docs/design/harness-surface-governance.md`
19
- §3) — do not invent additional `builder` subcommands.
19
+ This noun is **frozen at exactly eight verbs** (`bump-ver`, `drop-tags`, `publish` from the 2026-10-15
20
+ script-absorption entries; `show-branches` and the four flat PR verbs `pr-status`, `pr-check`,
21
+ `pr-open`, `pr-review` from the 2026-10-16 feature-L1 entries) by operator consent
22
+ (`docs/design/harness-surface-governance.md` §3) — do not invent additional `builder` subcommands.
23
+ The former `pr <op>` pass-through stays registered as a **hidden, deprecated alias** for one release
24
+ (it prints one stderr deprecation line naming the replacement verb), so it is not listed here.
20
25
 
21
26
  ## Verb map
22
27
 
@@ -25,7 +30,11 @@ This noun is **frozen at exactly four verbs** (`bump-ver`, `drop-tags`, plus `pr
25
30
  | `bump-ver [package-id] [version]` | Bump one package (manifest + in-source `binaryVersion` + consumer `workspace:` pins), commit, tag, optionally push; `--check [package-id]` only verifies marketplace/plugin versions (exit 1 on drift) | `--all` `--push` `--check` `--json` |
26
31
  | `drop-tags [package-id] <version>` | Delete a package's release tag (local only by default) | `--all` `--remote` `--json` |
27
32
  | `publish <dir>` | CI npm publish: resolve `workspace:`/`catalog:` ranges, `build:bundle`, `npm publish --access public`, restore the manifest | `--otp` |
28
- | `pr <op>` | PR-review spine ops for `/sp:dev-pr-review`: `preflight` `push` `ensure` `hygiene` `request` `wait` `collect` `status` | `--base` `--since` `--head` `--json` `--status-file` |
33
+ | `pr-check [--base <branch>] [--scan-only]` | Submission gate for `/sp:dev-pr-review`: preflight then the `base...HEAD` hygiene scan; a preflight failure stops before hygiene (`PASS`/`WARN`/`BLOCK`/`FAIL`) | `--base` `--scan-only` `--json` `--status-file` |
34
+ | `pr-open [--base <branch>]` | Publish the branch (never force) and reuse or create its PR (`FOUND`/`CREATED`/`FAIL`) | `--base` `--json` `--status-file` |
35
+ | `pr-review [--force] [--focus <text>] [--no-wait]` | Post the `@codex review` request, wait, then collect (`CLEAN`/`FINDINGS`/`PENDING`/`FAIL`; exit 3 = pending) | `--force` `--focus` `--no-wait` `--timeout` `--interval` `--json` `--status-file` |
36
+ | `pr-status [--since <iso>] [--head <sha>]` | Read-only PR/CI/Codex status with the current-HEAD review as `review` (no verdict) | `--since` `--head` `--json` `--status-file` |
37
+ | `show-branches` | Read-only branch topology report against a base (default `markdown` with a condensed mermaid `gitGraph`) | `--format` `--json` `--base` `--local` `--remote` `--pr` `--limit` `--max-commits` `--hide-contained` `--theme` |
29
38
 
30
39
  A bare `bump-ver <version>` (single positional that parses as semver) or explicit `--all` bumps
31
40
  every package pinned via `workspace:` by another workspace package, then adds per-package trace
@@ -58,14 +67,78 @@ spur builder drop-tags spur 0.1.4 # delete the local tag @gobing-ai/sp
58
67
  spur builder drop-tags --all 0.1.4 --remote # delete per-package + aggregate tags, locally and on origin
59
68
  ```
60
69
 
61
- ## `pr` - PR-review spine ops
70
+ ## `pr-status`, `pr-check`, `pr-open`, `pr-review` - the PR-review loop
62
71
 
63
72
  ```bash
64
- spur builder pr preflight --json # repo/gh checks
65
- spur builder pr ensure --base main --json # reuse or create the branch PR
66
- spur builder pr wait --since "$t" --head "$sha" --json # exit 3 = still pending
67
- spur builder pr status --json # read-only composite status
73
+ spur builder pr-status --json # read-only composite status + .review
74
+ spur builder pr-check --base main --json # preflight + hygiene submission gate
75
+ spur builder pr-check --scan-only --json # hygiene alone (local review on a dirty tree)
76
+ spur builder pr-open --base main --json # push, then reuse or create the PR
77
+ spur builder pr-review --focus "migration safety" --json # request → wait → collect
78
+ spur builder pr-review --no-wait --json # post the request, return PENDING
79
+ spur builder pr-review --force --json # force a fresh review of the current HEAD
68
80
  ```
69
81
 
70
- Absorbed from `plugins/sp/scripts/pr-reviewing.ts` (script-absorption PR-7); driven by
71
- the `pr-review` workflow. Exit codes: `0` ok, `1` usage, `2` hard failure, `3` wait timeout.
82
+ Four flat verbs over the ops absorbed from `plugins/sp/scripts/pr-reviewing.ts` (script-absorption
83
+ PR-7); driven by the `pr-review` workflow. Each composes existing ops and embeds their records in
84
+ one JSON object per verb: `pr-status` → the status object plus `review` (collect, or `null` with no
85
+ PR); `pr-check` → `{ ok, verdict, preflight, hygiene }`; `pr-open` → `{ ok, verdict, push, pr }`;
86
+ `pr-review` → `{ ok, verdict, request, findings }`.
87
+
88
+ - **`--status-file`** holds the verb's one-word verdict: `PASS`/`WARN`/`BLOCK`/`FAIL` (`pr-check`),
89
+ `FOUND`/`CREATED`/`FAIL` (`pr-open`), `CLEAN`/`FINDINGS`/`PENDING`/`FAIL` (`pr-review`).
90
+ `pr-status` is read-only and writes none.
91
+ - **Exit codes:** `0` ok, `1` usage, `2` hard failure, `3` wait timeout — exit 3 is `PENDING`
92
+ (pending, never failure; collect later with `pr-status`).
93
+ - **`--head`:** `pr-status` pins the reviewed commit; it defaults to the current local HEAD, and an
94
+ explicit pin that no longer matches the PR head fails loud instead of reporting a moved commit.
95
+ - **Deduping:** `pr-review` collects without a new request when the exact HEAD is already reviewed,
96
+ and returns `PENDING` when a marked request is still in flight; `--force` requests a fresh review
97
+ (`mode=rerun`). Never force-pushes.
98
+
99
+ ```bash
100
+ # deprecated alias, one release: maps the old op names to the verbs above
101
+ spur builder pr preflight --json # -> spur builder pr-check
102
+ spur builder pr status --json # -> spur builder pr-status
103
+ ```
104
+
105
+ ## `show-branches` - read-only branch topology report
106
+
107
+ ```bash
108
+ spur builder show-branches # markdown: summary table + condensed mermaid gitGraph
109
+ spur builder show-branches --base origin/main # measure every branch against another base
110
+ spur builder show-branches --format json # raw { base, generatedAt, branches[], omitted, warnings[] }
111
+ spur builder show-branches --pr --limit 50 # add open pull-request state, keep up to 50 rows
112
+ ```
113
+
114
+ One row per branch — local, remote-only, or the detached HEAD by short sha — with the fork point,
115
+ commits ahead/behind the base, the contained flag (`ahead == 0`, i.e. everything in it is already in
116
+ the base), the last commit, and the worktree path that has it checked out. Base resolution is
117
+ `--base <ref>`, else the `origin/HEAD` target, else `main`. `--local` / `--remote` filter the ref
118
+ namespace (mutually exclusive), `--limit <n>` (default 30) caps rows by most recent commit and
119
+ reports the omitted count, and `--pr` adds the open pull-request number/state/review decision from a
120
+ single `gh pr list` call (a missing or unauthenticated `gh` degrades to null PR fields plus one
121
+ warning, never a failure).
122
+
123
+ | Flag | Description |
124
+ | ---- | ----------- |
125
+ | `--format <markdown\|json\|text>` | Output format; `markdown` is the default |
126
+ | `--json` | Alias of `--format json` |
127
+ | `--base <ref>` | Base ref (default: the `origin/HEAD` target, else `main`) |
128
+ | `--local` / `--remote` | Restrict to local or remote branches |
129
+ | `--pr` | Enrich rows with open pull-request state (one `gh pr list` call) |
130
+ | `--limit <n>` | Maximum branch rows (default 30) |
131
+ | `--max-commits <n>` | Maximum commit nodes per branch line in the graph (default 3) |
132
+ | `--hide-contained` | Drop contained branches from the graph instead of drawing their join |
133
+ | `--theme <name>` | Mermaid theme for the graph init directive |
134
+
135
+ The graph draws the base line, one `branch` per open branch, a `+N earlier` summary node for the
136
+ commits a cap hides, `HIGHLIGHT` tips, `REVERSE` reverts and the tag names of the commits it shows.
137
+ Read-only: it never creates, moves or deletes a ref, config entry, index entry or worktree.
138
+
139
+ The graph rules are `mermaid@11.15.0` HIGH, pinned at `apps/web/package.json:28` and asserted by
140
+ `apps/web/tests/branch-topology-graph.heavy.test.ts:155`. The `--pr` vocabulary is `gh@2.102.0` HIGH at
141
+ `https://cli.github.com/manual/gh_pr_list` (read 2026-10-16), measured against this repo's own PRs.
142
+
143
+ **Exit codes:** `0` ok, `1` usage (unknown `--format`, non-positive `--limit`/`--max-commits`,
144
+ unknown base ref, `--local` with `--remote`), `2` git failure (not a repository, `git` missing).
@@ -209,8 +209,9 @@ wraps the one resolved ticket inside the worktree before the merge, and is skipp
209
209
  **Anchor:** `#flag-force`.
210
210
 
211
211
  Bypass a specific named guard that would otherwise stop the command (e.g. a shippable check on
212
- `dev-verify`/`dev-verifyall`). Named, not global: the command documentation states which guard is
213
- forced. Never bypasses lifecycle status transitions or irreversible HITL gates.
212
+ `dev-verify`/`dev-verifyall`, or the per-HEAD review dedupe on `dev-pr-review`). Named, not global:
213
+ the command documentation states which guard is forced. Never bypasses lifecycle status transitions
214
+ or irreversible HITL gates.
214
215
 
215
216
  ### `--feature <id>` — scope the operation to a feature
216
217