Skip to content

Commit 2606000

Browse files
SpecBridge v0.6.1: Gemini CLI, OpenAI-compatible, and Antigravity adapters (#7)
Adapter expansion against the frozen v0.6.0 runner contract (additive-only contract changes: optional AgentRunner.declaredSupportLevel and new AgentRunnerKind values; all v0.6.0 snapshot tests pass unchanged). - Gemini CLI adapter: token-probe detection (no inference, no login), plan-mode/read-only-allowlist authoring, capability-gated auto_edit task execution (no arbitrary shell; YOLO rejected at three layers), explicit-UUID resume with session-identity verification, thought-event redaction. - OpenAI-compatible authoring adapter: chat-completions and responses API styles, explicit structured-output modes (json-schema / json-object / strict-json-prompt) with complete-response validation and opt-in-only fallback, env-var-NAME credentials with full value redaction, bounded redirects that never forward Authorization across origins and reject HTTPS downgrades. Authoring only; task execution rejected before any request. - Experimental Antigravity CLI adapter: executable/version/documented- capability detection and diagnostics only; no PTY/TUI automation exists (enforced by tests); never production, never selected automatically. - Read-only MCP runner diagnostic tools (runner_list, runner_show, runner_doctor, runner_matrix) over the shared runner services; the capability matrix moved to one shared implementation for CLI, MCP, and docs. - Ninth plugin skill /specbridge:runners (MCP-diagnostics-driven, read-only, no provider invocation). - Config schema v2 profile variants (all new profiles default disabled; migration never enables a provider), fake Gemini/Antigravity executables and a fake OpenAI-compatible server for offline CI, provider docs, and version bump to 0.6.1. 910 tests pass; plugin validation and isolated bundle verification pass; CLI smoke suites pass end-to-end against fake providers.
1 parent fff59e8 commit 2606000

88 files changed

Lines changed: 17822 additions & 1115 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "specbridge",
1010
"source": "./integrations/claude-code-plugin/specbridge",
1111
"description": "Kiro-compatible spec workflows, verified interactive task execution, and deterministic drift checks.",
12-
"version": "0.6.0",
12+
"version": "0.6.1",
1313
"license": "MIT",
1414
"keywords": [
1515
"spec-driven-development",

CHANGELOG.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,92 @@
11
# Changelog
22

3+
## 0.6.1
4+
5+
Added:
6+
7+
- Gemini CLI adapter (`gemini-cli`, built-in profile `gemini-default`):
8+
headless invocation through the frozen v0.6.0 runner contract with
9+
bounded read-only capability detection (`--version`/`--help` token
10+
probes; never a model request, login, or trusted-folder change).
11+
- Capability-gated Gemini authoring, task execution, and resume: authoring
12+
through the plan approval mode or a read-only tool allowlist; task
13+
execution only when the installed CLI proves a bounded edit policy
14+
(auto_edit plus tool allowlist or sandbox) without arbitrary shell
15+
access; resume only by explicit session UUID with session-identity
16+
verification.
17+
- OpenAI-compatible authoring adapter (`openai-compatible`, built-in
18+
profile `openai-compatible-local`): production stage generation and
19+
refinement against chat-completions and responses API styles.
20+
- Configurable structured-output modes (`json-schema`, `json-object`,
21+
`strict-json-prompt`) with complete-response Zod validation in every
22+
mode and an explicit, warned, opt-in-only downgrade
23+
(`allowStructuredOutputFallback`).
24+
- Experimental Antigravity CLI capability adapter (`antigravity-cli`,
25+
built-in profile `antigravity`): executable/version/documented-capability
26+
detection and transparent diagnostics only — no automation of any kind.
27+
- Read-only MCP runner diagnostic tools: `runner_list` (paginated),
28+
`runner_show`, `runner_doctor`, `runner_matrix` — thin adapters over the
29+
same shared runner services the CLI uses.
30+
- Claude Code `/specbridge:runners` Skill: list profiles, explain
31+
categories and boundaries, diagnose one profile, and recommend
32+
compatible profiles — driven exclusively by the MCP diagnostic tools.
33+
- Additional provider conformance fixtures: process-level fake Gemini and
34+
Antigravity executables and a fake OpenAI-compatible loopback server
35+
covering authentication, quota, rate-limit, timeout, cancellation,
36+
oversized output, malformed/prose/fenced output, protected-path writes,
37+
resume identity, and redirect scenarios — CI needs no real provider and
38+
no network.
39+
- Explicit remote endpoint and redirect protections in the shared HTTP
40+
client: opt-in bounded redirect following with cross-origin
41+
authorization stripping, HTTPS-downgrade rejection, scheme validation,
42+
and recorded safe redirect metadata (default behavior unchanged:
43+
redirects rejected).
44+
45+
Changed:
46+
47+
- The runner capability matrix (CLI `runner matrix`, MCP `runner_matrix`,
48+
README, docs) includes Gemini, OpenAI-compatible, and Antigravity and is
49+
generated from one shared implementation in @specbridge/runners.
50+
- Provider diagnostics are available through both the CLI and MCP.
51+
- The plugin bundle includes the runner inspection workflow (nine skills).
52+
- Network-backed authoring reports exact data boundaries (endpoint, API
53+
style, model, structured-output mode, documents, input size, whether a
54+
network request will occur) before execution; dry-run performs no
55+
request.
56+
- Additive contract extensions (no existing field, value, or code
57+
changed): optional `AgentRunner.declaredSupportLevel` (absent =
58+
production, the v0.6.0 behavior) and new `AgentRunnerKind` values
59+
(`gemini-cli`, `openai-compatible`, `antigravity-cli`). All v0.6.0
60+
contract snapshot tests pass unchanged.
61+
62+
Security:
63+
64+
- Gemini YOLO mode is forbidden at three layers (config schema enum plus
65+
config-wide fragment rejection, argv assembly, pre-spawn assertion).
66+
- Gemini task execution requires a bounded safe edit policy; shell tools
67+
are excluded from every allowlist and the policy is never relaxed.
68+
- Antigravity TUI and PTY automation are forbidden (no PTY library, no
69+
keystroke injection, no ANSI parsing — enforced by tests).
70+
- API-key values are never stored: profiles hold an environment-variable
71+
NAME only; the value is read at request time, redacted from every
72+
retained byte, and never logged or passed to verification commands.
73+
- Authorization is never forwarded across origins on redirects, and
74+
HTTPS-to-HTTP downgrades are rejected.
75+
- Generic API runners cannot modify source (authoring-only by capability;
76+
task execution is rejected before any request).
77+
- No new provider is selected implicitly: all new profiles default
78+
disabled, network profiles require explicit selection, experimental
79+
profiles require explicit opt-in.
80+
- Provider claims remain non-authoritative: Git evidence and trusted
81+
verification decide task completion, whatever runner executed.
82+
83+
Deferred to v0.7:
84+
85+
- templates and the template registry
86+
- plugin SDK and runner extension SDK distribution
87+
- analyzer SDK and verifier SDK
88+
- extension registry and community ecosystem
89+
390
## 0.6.0
491

592
Added:

README.md

Lines changed: 56 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,44 +14,54 @@ Codex, local models, or any supported coding agent.
1414
1515
> Your `.kiro` specs remain the source of truth.
1616
17-
New in v0.6 — keep your existing `.kiro` specs and **choose a compatible
17+
New in v0.6.1 — keep your existing `.kiro` specs and **choose a compatible
1818
coding agent or authoring model per operation**:
1919

2020
```text
21-
Spec authoring Task execution
22-
Claude Code ✓ ✓
23-
Codex CLI ✓ ✓
24-
Ollama ✓ —
21+
Spec authoring Task execution
22+
Claude Code yes yes
23+
Codex CLI yes yes
24+
Gemini CLI yes capability-gated
25+
Ollama yes no
26+
OpenAI-compatible yes no
27+
Antigravity CLI experimental
2528
```
2629

2730
```bash
2831
specbridge runner matrix
2932

33+
specbridge runner doctor gemini-default
34+
3035
specbridge spec generate notification-preferences \
3136
--stage requirements \
32-
--runner ollama-local
37+
--runner gemini-default
3338

34-
specbridge spec generate notification-preferences \
39+
specbridge spec refine notification-preferences \
3540
--stage design \
36-
--runner codex-default
41+
--runner openai-compatible-local
3742

3843
specbridge spec run notification-preferences \
3944
--task 2.3 \
4045
--runner codex-default
4146
```
4247

43-
Runner behavior is capability-driven: authoring-only model APIs (Ollama)
44-
can never execute tasks, task execution needs a safe sandbox or tool
45-
restriction, network-backed endpoints are never selected implicitly, and
48+
Runner behavior is capability-driven: authoring-only model APIs (Ollama,
49+
OpenAI-compatible endpoints) can never execute tasks, task execution needs
50+
a proven safe boundary (Gemini task execution is enabled only when the
51+
installed CLI proves a bounded edit policy without arbitrary shell access —
52+
YOLO is never used), network-backed endpoints are never selected
53+
implicitly, the Antigravity adapter is experimental detection only, and
4654
whatever runs, task completion still requires actual Git evidence plus
4755
trusted verification — never a provider claim. The live matrix above is
4856
generated from registered runner metadata (`specbridge runner matrix`); not
49-
every installed Codex version is compatible (`specbridge runner doctor
50-
codex-default` reports the exact capabilities).
57+
every installed provider version is compatible (`specbridge runner doctor
58+
<profile>` reports the exact capabilities).
5159

52-
SpecBridge does not include provider subscriptions, hosted models, API
53-
usage, or authentication — you install and authenticate Claude Code, the
54-
Codex CLI, or Ollama yourself. See [docs/runners.md](docs/runners.md).
60+
SpecBridge does not include provider subscriptions, hosted model usage,
61+
credentials, or authentication — you install and authenticate Claude Code,
62+
the Codex CLI, the Gemini CLI, Ollama, or your API endpoint yourself. API
63+
keys are referenced by environment-variable NAME only and never stored.
64+
See [docs/runners.md](docs/runners.md).
5565

5666
From v0.5 — a self-contained **Claude Code plugin** with a local MCP
5767
server and verified interactive task execution:
@@ -251,11 +261,12 @@ Working today (fully offline, no model, no API key):
251261
| `specbridge spec affected` | **v0.4** — which specs does this change set touch (read-only) |
252262
| `specbridge spec policy init / show / validate` | **v0.4** — per-spec verification policies (impact areas, required commands, rule overrides) |
253263
| `specbridge verify rules / explain <id>` | **v0.4** — inspect the stable rule registry SBV001–SBV025 |
254-
| `specbridge mcp serve / doctor / manifest / tools` | **v0.5** — local stdio MCP server (21 tools, 7 resources, 4 prompts) |
264+
| `specbridge mcp serve / doctor / manifest / tools` | **v0.5** — local stdio MCP server (25 tools since v0.6.1, 7 resources, 4 prompts) |
255265
| `specbridge run recover-lock` | **v0.5** — diagnose and explicitly recover the interactive execution lock |
256266
| `specbridge runner list / matrix / show / doctor` | **v0.6** — profile-based runner diagnostics and the generated capability matrix (read-only) |
257267
| `specbridge runner test / conformance / models <profile>` | **v0.6** — bounded structured-output probe (`--network`), conformance suite, provider-supported model listing |
258268
| `specbridge config doctor / migrate` | **v0.6** — configuration validation and the explicit v1 → v2 migration (dry-run by default, atomic apply with backup) |
269+
| `specbridge runner doctor gemini-default / openai-compatible-local / antigravity` | **v0.6.1** — diagnostics for the new adapters; MCP `runner_list` / `runner_show` / `runner_doctor` / `runner_matrix` expose the same read-only services |
259270

260271
Planned commands (`spec sync/export`) are registered, marked "(planned)" in
261272
`--help`, and exit with an honest error — see the [roadmap](docs/roadmap.md).
@@ -502,13 +513,21 @@ PROFILES; the live matrix comes from `specbridge runner matrix`:
502513
|---------|---------|--------|--------|---------|--------|-------|
503514
| claude-code | production | yes | yes | yes | yes | no |
504515
| codex-default | production | yes | yes | yes | yes | no |
516+
| gemini-default | production | yes | yes | yes | yes | no |
505517
| ollama-local | production | yes | yes | no | no | yes |
518+
| openai-compatible-local | production | yes | yes | no | no | yes |
519+
| antigravity | experimental | no | no | no | no | no |
506520
| mock | production | yes | yes | yes | yes | yes |
507521

508-
`codex-default` and `ollama-local` ship DISABLED until you enable them
509-
explicitly. Ollama is authoring-only by capability — it can never execute
510-
tasks or modify files. Gemini CLI, an OpenAI-compatible authoring runner,
511-
and Antigravity are planned for v0.6.1 (no placeholders are registered).
522+
Every non-Claude profile ships DISABLED until you enable it explicitly.
523+
Ollama and OpenAI-compatible endpoints are authoring-only by capability —
524+
they can never execute tasks or modify files. Gemini task execution and
525+
resume are capability-gated: they work only when the installed Gemini CLI
526+
proves a bounded edit policy (auto_edit plus tool allowlist or sandbox)
527+
without arbitrary shell access — YOLO is never used, and an unsafe
528+
installation keeps safe authoring while task execution is refused with the
529+
exact gap. The Antigravity adapter is experimental capability detection
530+
only; it is not a production runner and executes nothing.
512531

513532
Configuration lives in `.specbridge/config.json` (schema 2.0.0; v1 files
514533
stay readable, migration is explicit — see
@@ -530,7 +549,7 @@ stores no credentials of any kind.
530549
secrets or environment variables.
531550
- Full model: [docs/security.md](docs/security.md).
532551

533-
## Limitations (v0.6)
552+
## Limitations (v0.6.1)
534553

535554
- The MCP server is stdio-only and local-only: no HTTP/SSE/WebSocket
536555
transport, no OAuth, no cloud hosting. One server process serves one
@@ -551,15 +570,21 @@ stores no credentials of any kind.
551570
references, chore-task exclusion) are labelled and never default to error.
552571
- `spec sync` and `spec export` are not implemented yet (they fail
553572
honestly). SARIF output is deferred.
554-
- Production runners are claude-code, codex-cli, ollama (authoring-only),
555-
and mock. Gemini CLI, OpenAI-compatible, and Antigravity are deferred to
556-
v0.6.1 and are not registered as placeholders. Provider usage happens
557-
under your own accounts and plans; not every installed Codex version is
558-
compatible (the doctor reports the exact missing capabilities).
559-
- Ollama cannot execute tasks or modify files — by capability, not by
560-
configuration. Models are never pulled or selected automatically.
561-
- Codex resume needs an installed version with explicit session resume;
562-
without it, resume is reported unsupported instead of guessed.
573+
- Production runners are claude-code, codex-cli, gemini-cli, ollama
574+
(authoring-only), openai-compatible (authoring-only), and mock; the
575+
antigravity-cli adapter is experimental detection only. Provider usage
576+
happens under your own accounts and plans; not every installed provider
577+
version is compatible (the doctor reports the exact missing
578+
capabilities). Not every Gemini CLI version supports safe task
579+
execution, and not every OpenAI-compatible endpoint implements JSON
580+
Schema or the Responses API — the profile declares what its endpoint
581+
supports.
582+
- Ollama and OpenAI-compatible endpoints cannot execute tasks or modify
583+
files — by capability, not by configuration. Models are never pulled or
584+
selected automatically, and model output never proves implementation
585+
correctness.
586+
- Codex and Gemini resume need an installed version with explicit session
587+
resume; without it, resume is reported unsupported instead of guessed.
563588
- Authoring fallback exists only for explicitly configured chains, only for
564589
stage generation/refinement, with bounded retries; there is no automatic
565590
provider switching anywhere else.

docs/agent-runners.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ orchestration lives in `@specbridge/execution` and evidence evaluation in
3030
### Runner kinds and statuses
3131

3232
Kinds: `mock` (offline, deterministic), `claude-code` (local Claude Code
33-
CLI), `codex-cli` (local Codex CLI, v0.6), and `ollama` (local model API,
34-
authoring-only, v0.6). The v0.3-era `unsupported` stubs are gone — deferred
35-
providers (Gemini CLI, OpenAI-compatible, Antigravity) exist only on the
36-
[roadmap](roadmap.md) and are not registered as placeholders.
33+
CLI), `codex-cli` (local Codex CLI, v0.6), `gemini-cli` (local Gemini CLI,
34+
v0.6.1), `ollama` (local model API, authoring-only, v0.6),
35+
`openai-compatible` (model API, authoring-only, v0.6.1), and
36+
`antigravity-cli` (experimental detection only, v0.6.1). The v0.3-era
37+
`unsupported` stubs are gone; the value remains in the vocabulary so
38+
stored data stays readable.
3739

3840
Detection statuses: `available`, `unavailable`, `unauthenticated`,
3941
`incompatible`, `misconfigured`, `error`. Only `available` permits

docs/antigravity-cli-runner.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Antigravity CLI adapter (experimental)
2+
3+
The `antigravity-cli` adapter (v0.6.1) is EXPERIMENTAL: it detects the
4+
executable (default `agy`, configurable), its version, and any DOCUMENTED
5+
headless or machine-readable capabilities, and reports them transparently.
6+
It is not a production automation adapter, and it cannot be marked
7+
production in v0.6.1.
8+
9+
## What it never does
10+
11+
- start the interactive TUI (during doctor or ever)
12+
- allocate a pseudo-terminal, inject keystrokes, or parse ANSI screen
13+
output (no PTY/TUI library exists anywhere in the implementation —
14+
enforced by tests)
15+
- automate login or workspace trust
16+
- inspect private session files
17+
- assume Gemini CLI flags, output formats, or session storage —
18+
Antigravity is a different product
19+
- claim task execution, resume, or structured output without detection
20+
- get selected automatically (experimental profiles require explicit
21+
opt-in, and the profile is disabled by default)
22+
23+
## Profile
24+
25+
```json
26+
{
27+
"runnerProfiles": {
28+
"antigravity": {
29+
"runner": "antigravity-cli",
30+
"enabled": false,
31+
"command": { "executable": "agy", "args": [] },
32+
"experimental": true
33+
}
34+
}
35+
}
36+
```
37+
38+
`experimental` is locked to `true` by the schema.
39+
40+
## Detection
41+
42+
`specbridge runner doctor antigravity` runs bounded `--version` and
43+
`--help` probes with no stdin connected. A build that hijacks these into an
44+
interactive session simply hits the bounded timeout and is classified as
45+
interactive-only. Where the help output documents them, these observations
46+
are reported (never acted on): headless invocation, machine-readable
47+
output, structured final output, sandbox/permission controls,
48+
workspace-write controls, session identity, resume.
49+
50+
Typical output:
51+
52+
```
53+
Runner: antigravity
54+
Support: experimental
55+
56+
Detected:
57+
executable
58+
version
59+
interactive workspace support
60+
61+
Not proven:
62+
stable headless mode
63+
structured final output
64+
bounded edit permissions
65+
session resume contract
66+
67+
Automation is disabled.
68+
```
69+
70+
## Support rules
71+
72+
- category: `experimental`; support level: `experimental`
73+
- every capability is declared false: stage generation, refinement, task
74+
execution, and resume are all refused by selection before any process
75+
could start (and again defensively by the adapter)
76+
- even when headless/structured tokens are positively detected, support
77+
stays experimental in v0.6.1: a documented, headless, structured-output
78+
contract must pass the applicable conformance suite before any operation
79+
can be considered, and conformance can never confirm production for an
80+
experimental-declared adapter

docs/claude-code-plugin.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ and controlled lifecycle operations and never duplicate core logic:
7979
- `continue` finishes an interrupted interactive run honestly (never
8080
presenting a fresh run as a resumption).
8181
- `verify` runs `spec_check_drift` and asks before `spec_run_verification`.
82+
- `runners` (v0.6.1) is read-only runner inspection: it calls
83+
`runner_list` and `runner_matrix` (and `runner_show`/`runner_doctor`
84+
for a named profile), explains categories and local-versus-network
85+
boundaries, and recommends compatible profiles for an operation. It
86+
never edits configuration, never invokes any provider or nested agent,
87+
never sends a network request itself, and never starts a login. The
88+
existing implementation workflow is unchanged: `task_begin` → the
89+
current Claude Code session edits → `task_complete`.
8290

8391
No skill uses `bypassPermissions`, `dangerously-skip-permissions`,
8492
unrestricted `Bash(*)`, or unrestricted `Write`, and no skill instructs

docs/configuration-migration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ Guarantees (tested):
3434
- Codex and Ollama are NOT enabled;
3535
- no credential value is created;
3636
- automatic fallback stays disabled;
37-
- unmappable v1 runner entries (e.g. `openai-compatible`) are reported and
38-
remain in the backup (that provider is planned for v0.6.1).
37+
- new-provider profiles (Codex, Ollama, Gemini, OpenAI-compatible,
38+
Antigravity) are added DISABLED; unmappable custom v1 runner entries are
39+
reported and remain in the backup.
3940

4041
## Safety mechanics
4142

0 commit comments

Comments
 (0)