* test(#4709): assert no shipped surface mints a retired runtime id Extends the #1928 removal guard to the surfaces it structurally could not reach. Its own docblock scopes it to the installer CLI contract and the runtime-name-policy exports; it spawns the installer and inspects module exports, and never reads gsd-core/workflows/**, commands/** or skills/**. Four structural assertions, all RED on next: - every RUNTIME= assignment must name a canonical runtime - the runtime->model-tier table must name only model-catalog runtimes - runtime selection menus must offer only canonical runtimes - config-set runtime / model_profile_overrides examples must be canonical Structural, not textual: each asserts the literal is canonical or the runtime exists as a catalog key, never that the string "gemini" is absent. That string is load-bearing across Antigravity's real on-disk contract, so a fifth test pins that contract from the descriptor (not from a resolved path, which would read $ANTIGRAVITY_CONFIG_DIR and the real $HOME -- the #4312 defect class). An over-broad gemini -> antigravity replacement fails there rather than ships. The menu assertion is scoped by the nearest preceding `question:` matching /runtime/i, because the same file carries a provider menu (anthropic, openai) and a budget menu (high, medium, low) whose labels are single lowercase tokens too and name neither a runtime nor anything the policy should judge. Refs #4709 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(#4709): stop minting the retired gemini runtime id in workflow text #1928 removed the gemini runtime after Google sunset Gemini CLI on 2026-06-18, but the removal stopped at the installer boundary. Runtime-loaded workflow text kept assigning the id, and the name policy's unknown-id fallbacks then applied a default designed for a never-known FUTURE runtime to an id GSD itself retired: getRuntimeLabel('gemini') is 'Claude Code', getProjectInstructionFile('gemini') is 'AGENTS.md', getGlobalConfigDir('gemini') is ~/.claude. A stale id produced a plausible wrong answer instead of an error. Those fallbacks are DELIBERATE and are left untouched here -- four docblocks document them, src/runtime-name-policy.cts:220-222 calls the label default "the always-safe default, fail-closed", and an existing test in this very suite pins getProjectInstructionFile('gemini') === 'AGENTS.md'. This commit removes the REACHABILITY of the retired id instead: - new-project.md, ingest-docs.md: the runtime-detection cascade mapped /.gemini/ and $GEMINI_CONFIG_DIR to RUNTIME=gemini. Both now map /.gemini/antigravity{,-ide,-cli}/ and $ANTIGRAVITY_CONFIG_DIR to RUNTIME=antigravity, the documented successor. ingest-docs.md was not in the original report; the new structural test found it. - settings-advanced.md: dropped the `gemini` row from the runtime->model-tier table. The model catalog has no gemini runtime (runtimeTierDefaults has 18 keys, none of them gemini), so the row advertised built-in defaults for a runtime whose config key is ignored. Its three model IDs were copied from the `google` PROVIDER preset -- a provider axis rendered as a runtime axis. - settings-advanced.md: removed the `gemini` / "Gemini CLI." runtime menu option and its group listing, so no menu offers a runtime GSD cannot install. - settings-advanced.md: repointed the config examples from `runtime gemini` to `runtime antigravity`, which ships no built-in tier defaults and is therefore the case those overrides actually exist for. - reapply-patches.md: $GEMINI_CONFIG_DIR -> $ANTIGRAVITY_CONFIG_DIR, ~/.gemini/gsd-local-patches -> ~/.gemini/antigravity/gsd-local-patches, and the local scan's bare .gemini -> .agents (Antigravity's localConfigDir). This file is hand-written, so `npm run sync:launcher` never reached it. - update.md: bare ~/.gemini and ./.gemini as GSD config dirs -> the real ~/.gemini/antigravity and ./.agents. Antigravity's own Gemini-family surfaces are untouched by design: ~/.gemini as its configHome parent, ~/.gemini/config for global skills/agents (#3738), hookEvents "gemini", GEMINI.md as its projectInstructionFile, the ~/.gemini/antigravity{,-ide,-cli} ambiguity probes (#1441), and every gemini-* model ID. The launcher's own GEMINI_CONFIG_DIR arm is left to #4632, which absorbed #4347 for it. Refs #4709 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(#4709): record the Gemini -> Antigravity migration research Primary-source research note behind #4709: the sense taxonomy that separates a runtime-axis `gemini` (stale) from Antigravity's on-disk contract, Google's model IDs, and release history (all load-bearing); the PRESERVE table; the guard-gap analysis; and the per-file inventory with file:line citations. Refs #4709 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(#4709): keep the legacy patches probe, and stop tripping two lint gates Three review findings, fixed inline. 1. Dropping the global ~/.gemini/gsd-local-patches probe was a regression: a pre-#1928 Gemini CLI install put patches there, and a stranded patches dir is still the user's work. Restored as an explicitly-labelled legacy arm probed AFTER Antigravity, so a live install always wins. This is a directory probe, not a runtime home -- it assigns no runtime id, so it does not reintroduce the defect this PR closes. The $GEMINI_CONFIG_DIR env probe is deliberately NOT restored: that names a runtime config home, which tests/declarative-reference-antigravity.test.cjs:307 pins as ignored. 2. The comment added in (1) originally contained the literal string that the new structural test matches, so the test flagged its own fix's comment as a mint. Reworded. The test was right; a comment in shipped workflow text is as readable to a matcher as code is. 3. docs/research/gemini-to-antigravity-migration.md used the colon slash-form inside a quoted manifest description. lint-docs-command-form rejects it: docs are never passed through the install-time converters, so the colon form names a command no runtime registers. Normalised to the hyphen form. Also verified, rather than assumed: the local scan's .agents entry is unambiguous. Antigravity is the ONLY runtime declaring localConfigDir '.agents' across all 19 capability manifests; grok and codex use ~/.agents as a GLOBAL home, and this scan is local (./$dir). Refs #4709 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(#4709): retire Gemini CLI from the PR templates, and close two review gaps Adversarial review findings, all fixed inline. 1. All three .github/PULL_REQUEST_TEMPLATE/*.md still offered "Gemini CLI" under "Runtimes tested", and none offered Antigravity. #1928's follow-up dropped Gemini CLI from .github/ISSUE_TEMPLATE/*.yml but missed the PR templates, so every contributor opening a fix/feature/enhancement PR has been asked for two releases which runtime they tested and offered a retired one. Now Antigravity. Guarded by a new assertion: runtime checklist labels in the PR templates must appear in the runtime label table. Proven non-vacuous by reverting one template line and watching the probe report the offender. 2. The #4709 scanning corpus excluded agents/, which also ships runtime-loaded markdown including .compact.md variants. Widened: 318 -> 382 files (+64), zero new offenders, so the gap was coverage rather than a live defect. 3. gsd-core/workflows/sync-skills.md said "grok and gemini have no dedicated installer flag — they alias the codex and claude skills roots respectively." The gemini half is wrong twice over: the runtime is retired, and it never aliased claude -- canonicalizeRuntimeName returns null for it and the caller's fail-closed default merely happens to be claude. Describing that as designed aliasing is exactly the confusion this issue is about. Reduced to grok, which genuinely does alias the codex skills root. 4. The changeset said the runtime was removed in 1.11. It shipped in 1.8.0 (CHANGELOG.md:1023 is the enclosing release heading for the #1928 entry at :1124). Corrected. Refs #4709 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(#4709): follow the corrected sync-skills prose, and refresh the compact baseline Three GREEN-run failures, all caused by this PR's own edits. 1. tests/sync-skills-cross-runtime-refuse.test.cjs pinned the literal phrase "grok and gemini have no dedicated installer flag" — a test REQUIRING shipped text to name a runtime retired in 1.8.0, which is the exact class #4709 exists to remove. The assertion and its rationale comment now track the corrected prose ("grok has no dedicated installer flag"), and the docblock's runtime list drops gemini. The remaining assertions in that file — the guard's exit, the installer pointer, the $DEST reference, guard-before-copy ordering — are untouched, so #3025's contract is otherwise intact. 2. tests/fixtures/compact-content-benchmark-baseline.json drifted because the new-project.md edits changed its compacted size (split "new-project": off 14279 -> 14308, on 12335 -> 12364; aggregate off 107411 -> 107440). Refreshed with `node scripts/benchmark-compact-content.cjs --write`, which is that script's own documented remedy. 3. emitted-attribution reported four grown workflow files with no acknowledgment. Acked below as commit trailers per ADR-3942, which moved the acknowledgment out of tests/emitted-drift-acks/*.json fragments and into the PR's own commit range (read with three-dot base...head). Exactly the four files the gate named are acked — settings-advanced.md and sync-skills.md shrank and are deliberately absent, since a trailer no delta consumed is a staleAcks error. Refs #4709 Emitted-Drift-Ack-Growth: ingest-docs.md — the runtime-detection cascade now names Antigravity's three real directories (/.gemini/antigravity{,-ide,-cli}/) and $ANTIGRAVITY_CONFIG_DIR in place of the single retired /.gemini/ arm and $GEMINI_CONFIG_DIR; three correct paths cost more bytes than the one wrong path they replace. Emitted-Drift-Ack-Growth: new-project.md — same runtime-detection correction as ingest-docs.md, plus dropping "gemini/" from the two GEMINI.md instruction-file sentences so the prose stops contradicting getProjectInstructionFile, which returns AGENTS.md for that retired id. Emitted-Drift-Ack-Growth: reapply-patches.md — restores the legacy ~/.gemini/gsd-local-patches probe as an explicitly-labelled arm after an adversarial-review finding that dropping it stranded a pre-#1928 user's patches, and repoints the env/global probes at Antigravity; the four-line comment is load-bearing, since a bare retired-runtime path with no explanation is exactly what the next reader would delete. Emitted-Drift-Ack-Growth: update.md — bare ~/.gemini and ./.gemini as GSD config dirs are replaced by the real ~/.gemini/antigravity and ./.agents, which are longer strings; no content was added beyond the corrected paths. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * chore(#4709): backfill the changeset PR number pr: 0 -> 4711, now that the PR exists. Never guessed ahead of the number. Refs #4709 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: sim <sim@local> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
5
.changeset/clever-mice-sing.md
Normal file
5
.changeset/clever-mice-sing.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: Fixed
|
||||
pr: 4711
|
||||
---
|
||||
**Runtime detection no longer resolves a retired runtime to Claude Code** — workflows still mapped `/.gemini/` and `$GEMINI_CONFIG_DIR` to the `gemini` runtime that was removed in 1.8.0, and an unrecognized id silently falls back to Claude Code's config dir, label, and instruction file. Detection now maps Antigravity's real directories, the runtime menu no longer offers the retired Gemini CLI, and the model-tier table no longer advertises built-in defaults for a runtime the catalog does not define. (#4709)
|
||||
2
.github/PULL_REQUEST_TEMPLATE/enhancement.md
vendored
2
.github/PULL_REQUEST_TEMPLATE/enhancement.md
vendored
@@ -50,7 +50,7 @@ Closes #
|
||||
### Runtimes tested
|
||||
|
||||
- [ ] Claude Code
|
||||
- [ ] Gemini CLI
|
||||
- [ ] Antigravity
|
||||
- [ ] OpenCode
|
||||
- [ ] Other: ___
|
||||
- [ ] N/A (not runtime-specific)
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE/feature.md
vendored
2
.github/PULL_REQUEST_TEMPLATE/feature.md
vendored
@@ -69,7 +69,7 @@ Closes #
|
||||
### Runtimes tested
|
||||
|
||||
- [ ] Claude Code
|
||||
- [ ] Gemini CLI
|
||||
- [ ] Antigravity
|
||||
- [ ] OpenCode
|
||||
- [ ] Codex
|
||||
- [ ] Copilot
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE/fix.md
vendored
2
.github/PULL_REQUEST_TEMPLATE/fix.md
vendored
@@ -49,7 +49,7 @@ Fixes #
|
||||
### Runtimes tested
|
||||
|
||||
- [ ] Claude Code
|
||||
- [ ] Gemini CLI
|
||||
- [ ] Antigravity
|
||||
- [ ] OpenCode
|
||||
- [ ] Other: ___
|
||||
- [ ] N/A (not runtime-specific)
|
||||
|
||||
312
docs/research/gemini-to-antigravity-migration.md
Normal file
312
docs/research/gemini-to-antigravity-migration.md
Normal file
@@ -0,0 +1,312 @@
|
||||
# The Gemini → Antigravity migration: authoritative picture
|
||||
|
||||
Researched against primary sources only (source, capability manifests, ADRs, tests, git
|
||||
history, CHANGELOG) on branch `next` at commit `c0b2a05d2f`. Every claim below is cited
|
||||
`file:line` or a commit SHA.
|
||||
|
||||
## 1. Timeline / provenance
|
||||
|
||||
- **2026-06-18** — Google sunsets Gemini CLI for free/Pro/Ultra tiers. Cited throughout the
|
||||
codebase, e.g. `GEMINI.md:1`, `bin/install.js:1075`.
|
||||
- **Removal commit: `8f2ebbe9bf`** — `feat(#1928): remove sunset Gemini CLI runtime, redirect
|
||||
to Antigravity (#1996)`, authored 2026-07-04. Commit message (verbatim): *"Remove the gemini
|
||||
runtime from the enum (16->15), aliases, labels, config-home fragment, install path,
|
||||
converters (convertClaudeToGemini{Markdown,Toml,Agent}, convertSlashCommandsToGeminiMentions),
|
||||
capability descriptor, gemini-extension.json, RULESET.GEMINI.*, and the interactive menu…
|
||||
Antigravity is preserved throughout: its GEMINI.md contextFileName, .gemini/antigravity
|
||||
config home, the shared convertGeminiToolName/claudeToGeminiTools tool vocabulary, and the
|
||||
'gemini' hookEvents dialect it declares."* This is the single authoritative statement of
|
||||
intent for the whole migration — the taxonomy in §2 is a direct expansion of it.
|
||||
- Deleted in this commit (via `git log --diff-filter=D --name-only`): `capabilities/gemini/capability.json`, `gemini-extension.json`, `tests/gemini-namespacing.test.cjs`, `tests/issue-775-gemini-extension.test.cjs`, `tests/bug-2557-gemini-local-hook-paths.test.cjs`, `tests/bug-3037-gemini-duplicate-commands.test.cjs`, `tests/enh-776-install-gemini-hook-events.test.cjs`, `tests/fixtures/golden-install-parity/gemini.json`.
|
||||
- Follow-up in the same PR: dropped Gemini CLI from `.github/ISSUE_TEMPLATE/bug_report.yml` and `feature_request.yml` (review nit from @davesienkowski).
|
||||
- Changeset: `.changeset/vivid-foxes-click.md` → rendered at `CHANGELOG.md:1012` / `CHANGELOG.md:1281` (duplicated, both a "recent" and an older archival copy of the same line): *"Removed the sunset Gemini CLI runtime — use Antigravity CLI instead… (#1928) (#1996)"*.
|
||||
- `GEMINI.md` itself was **repointed, not deleted**, in the same commit (`git log --oneline -- GEMINI.md` shows `8f2ebbe9bf` as the second-most-recent touch after the original `a3aa0ae142` "ship a gemini-extension.json extension package" (#775/#818)).
|
||||
- **`capabilities/gemini/capability.json` was re-created later**, as a reviewer-lane-only
|
||||
manifest, by the reviewer-lane-declaration work: `6a9babda69` `chore(#2798): declare the
|
||||
eleven reviewer lanes as manifest data (#2837)`, per ADR-2782 (`docs/adr/2782-reviewer-lane-capability-surface.md`). Confirmed live today: `capabilities/gemini/capability.json:1-6` — `"role": "reviewer"`, description *"cross-AI `/gsd-review` reviewer lane only; not a GSD install target (no runtime body, no artifacts)"*. This is intentional, not a regression of #1928 — CHANGELOG.md:810 documents the same PR: *"Five reviewers GSD never installs into (Gemini, CodeRabbit, Ollama, LM Studio, llama.cpp) become lane-only capabilities with no install surface."*
|
||||
- **Antigravity's own evolution as a runtime** (separate from the Gemini removal, but
|
||||
entangled with it because it shares the `.gemini` dialect):
|
||||
- `fbd62cd84f` `feat(#1035): phase 5a — author 16 role:runtime capability descriptors (registry-only) (#1039)` — Antigravity first declared as a capability descriptor.
|
||||
- `5695522d5f` `feat(#2096): migrate Antigravity onto EoS declarative adapter + permission-writer + MCP companion (ADR-1239)` — CHANGELOG.md:973 / :1240.
|
||||
- `3738`/`4274` (per CHANGELOG.md:224/343) — Antigravity's global skills/agents home corrected from `~/.gemini/antigravity` to `~/.gemini/config` (the dir `agy` actually scans), captured today as `runtime.artifactLayout.global[].home` = `.gemini/config` in `capabilities/antigravity/capability.json:31,40`; the retirement of the old spot is migration `src/installer-migrations/010-antigravity-retire-confighome-artifacts.cts`, changeset text at `docs/installer-migrations.md:583`.
|
||||
- No ADR is dedicated solely to "retire Gemini runtime" — the decision is recorded as a
|
||||
changeset + PR (#1928/#1996), not an ADR. The relevant ADRs (`docs/adr/1244-capability-ecosystem.md`, `docs/adr/2782-reviewer-lane-capability-surface.md`, `docs/adr/3660-runtime-artifact-layout-module.md`, `docs/adr/894-capability-declaration-format.md`) describe the *general* capability/reviewer-lane machinery that both Gemini's reviewer lane and Antigravity's runtime lane now ride on, not the migration event itself. **UNDETERMINED** whether an ADR was ever intended for the removal decision specifically — none exists under `docs/adr/`.
|
||||
|
||||
## 2. Taxonomy of `gemini` senses
|
||||
|
||||
**(a) Gemini *runtime* / install target — RETIRED.** Proven by:
|
||||
- `bin/install.js:1073-1087` — `if (args.includes('--gemini'))` prints the sunset notice and exits 1; no install path remains.
|
||||
- `bin/install.js:1075`: `'Gemini CLI was sunset by Google on 2026-06-18 and is no longer served for free/Pro/Ultra tiers.'`
|
||||
- Guard test `tests/gemini-runtime-removed.test.cjs:1-19` (docblock) states the contract explicitly: *"Coverage: A. CLI redirect contract… B. The `gemini` runtime is gone from every runtime-name-policy surface. C. Antigravity is PRESERVED everywhere it shared surface with gemini (GEMINI.md instruction file + the shared convertGeminiToolName tool vocabulary)."* Test body (`:60-93`) asserts `--gemini` exits 1, cites the sunset date, redirects to `--antigravity`, and creates no `.gemini` dir.
|
||||
- `capabilities/antigravity/capability.json:1-6` no longer has a `gemini` sibling runtime descriptor; `capabilities/gemini/capability.json:1-4` explicitly has **no `runtime` body at all** — only `reviewer`.
|
||||
|
||||
**(b) Gemini *CLI reviewer lane* (`capabilities/gemini/`) — LIVE and INTENTIONAL.**
|
||||
- `capabilities/gemini/capability.json:1-40` — `role: "reviewer"`, `reviewer.slug: "gemini"`, flags `--gemini`, spawn transport `gemini -p - -m <model>`. Still wired into the registry: `gsd-core/bin/lib/capability-registry.cjs:1793-1817` (reviewer body), `:4945-4947` (config-key ownership), `:8148` (`"gemini": []` — no requires).
|
||||
- Documented as a live reviewer flag in `docs/COMMANDS.md:269,757,1038,1810,1826,1834,1847-1851` and `docs/CONFIGURATION.md:297,329,340,384,394,401,1464,1474,1476,1492`, and in `docs/reference/capability-matrix.md:125` — `| gemini | reviewer | full | >=1.8.0 | — | — | first-party |`.
|
||||
- CHANGELOG.md:89 shows the lane still receiving fixes as recently as #3996/#4184. This is a maintained, first-party lane — not an oversight.
|
||||
|
||||
**(c) Google Gemini directories/dialect that Antigravity legitimately reuses — MUST NOT be renamed.**
|
||||
Confirmed exactly as the CRITICAL CONTEXT states, all still present and load-bearing:
|
||||
- `capabilities/antigravity/capability.json:11-15` — `configHome.kind: "dot-home-nested"`, `parent: ".gemini"`, nested under `~/.gemini/antigravity`.
|
||||
- `capabilities/antigravity/capability.json:31,40` — `artifactLayout.global[].home: ".gemini/config"` (the dir `agy` scans for machine-local discovery, per #3738).
|
||||
- `capabilities/antigravity/capability.json:56` — `hookEvents: "gemini"` (hook-event dialect).
|
||||
- `capabilities/antigravity/capability.json:78` — `hostBehaviors.projectInstructionFile: "GEMINI.md"`.
|
||||
- Confirmed as deliberate, not incidental, in `src/runtime-name-policy.cts:105,117,127` (doc comments: *"antigravity: GEMINI.md is Antigravity CLI's contextFileName (the Gemini…)"*) and in `docs/reference/host-integration-capability-matrix.md:342` (EoS migration note: `hostBehaviors.projectInstructionFile` reads `"GEMINI.md" — Antigravity CLI's contextFileName, successor to the sunset Gemini CLI per #1928`).
|
||||
- Shared tool-name vocabulary: `bin/install.js:1628-1720` — `claudeToGeminiTools`, `convertGeminiToolName` — still present and used by Antigravity's agent converter (`convertClaudeAgentToAntigravityAgent`, imported by `tests/gemini-runtime-removed.test.cjs:53` specifically to assert this survives). CHANGELOG.md:1455 confirms the shared vocabulary: *"excluded from the Gemini and Gemini-backed Antigravity agent `tools:` frontmatter."*
|
||||
- `docs/reference/host-integration-capability-matrix.md:315,317,322,330` cite Google's own migration blog (`developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli`) as the evidentiary source for Antigravity inheriting the Gemini backend.
|
||||
|
||||
**(d) Gemini *models* in the model catalog — legitimate product names.**
|
||||
- `gsd-core/bin/shared/model-catalog.json` contains `gemini-*` model IDs (not read directly here per the guard, but referenced in CHANGELOG.md:1561: *"the gemini opus default `gemini-3-pro` → `gemini-3.1-pro-preview`"*).
|
||||
- Config docs: `docs/CONFIGURATION.md:297,1492` (`"gemini": "gemini-2.5-pro"`), `docs/CLI-TOOLS.md:1426` (`review.models.gemini "gemini-2.5-pro"`). All legitimate — naming the provider's model, not the retired runtime.
|
||||
|
||||
**(e) Historical/archival references — immutable, must not be rewritten.**
|
||||
- `CHANGELOG.md` (dozens of lines, e.g. :1012, :1281, :1455, :1456, :1557) — release history, must stay as-is per repo convention (`CHANGELOG.md is Locked` — CLAUDE.md §"CHANGESETS & RELEASE NOTES").
|
||||
- `.changeset/archived/fix-3344-gemini-agent-tool.md`, `.changeset/archived/fix-3362-windows-powershell-gemini.md`, `.changeset/archived/gemini-skip-local-when-global.md`, `.changeset/archived/213-antigravity-2-runtime-dirs.md`, `.changeset/archived/3608-antigravity-update-runtime.md`, `.changeset/archived/503-antigravity-agent-local-detection.md` — archived fragments, immutable release-note history.
|
||||
- `docs/RELEASE-NOTES-LEGACY.md`, `docs/whats-new-1.7.0.md`, `.pr-body-3514.md`, `.pr-body-3515.md` — point-in-time snapshots; PRESERVE.
|
||||
- `VERSIONING.md:133` — `` `gemini-extension.json` — Gemini CLI extension manifest (issue #775) `` — this line documents a **file that no longer exists** (`gemini-extension.json` was deleted in `8f2ebbe9bf`, confirmed via `find . -iname 'gemini-extension.json'` returning nothing). This is borderline (e) vs. (f): it reads as changelog-style provenance for a retired artifact, but VERSIONING.md is not an archival/frozen document the way CHANGELOG.md is — it is an active reference doc (`file inventory / what ships in which package`). **Verdict: MIGRATE or annotate** — see §4.
|
||||
|
||||
**(f) STALE references — treat Gemini as a live runtime/install target.**
|
||||
See the full inventory in §4. Headline finding: the four README translations and most of the
|
||||
`docs/{ja-JP,ko-KR,pt-BR,zh-CN}/` doc mirrors still describe "Gemini CLI" as a currently
|
||||
supported, installable runtime alongside Claude Code/OpenCode/Kilo/Codex/Copilot/Antigravity —
|
||||
while the English originals were scrubbed clean in `8f2ebbe9bf` and have zero such language.
|
||||
|
||||
## 3. The `GEMINI.md` file at repo root
|
||||
|
||||
- **What it is now**: Antigravity's `contextFileName` (inherited from the shared Gemini 3
|
||||
backend) — the file Antigravity auto-reads for project context, analogous to `CLAUDE.md` for
|
||||
Claude Code or `AGENTS.md` for Codex/OpenCode. Confirmed by its own banner: `GEMINI.md:1-6`
|
||||
— *"# GSD Core — Antigravity CLI context… this file is the context Antigravity reads
|
||||
automatically (its `contextFileName` is `GEMINI.md`, inherited from the shared Gemini 3
|
||||
backend)."*
|
||||
- **Provenance**: originally shipped as part of a Gemini CLI extension package
|
||||
(`a3aa0ae142` `feat(#775): ship a gemini-extension.json extension package (#818)`), then
|
||||
**repointed to Antigravity** in the removal commit `8f2ebbe9bf` (same commit that deleted
|
||||
the Gemini runtime). It is correctly an Antigravity artifact today, not a Gemini-runtime
|
||||
leftover — PRESERVE.
|
||||
- **Who generates/consumes it for user projects** (distinct from this repo's own root
|
||||
`GEMINI.md`, which is GSD's self-description for AI agents working on GSD itself):
|
||||
`getProjectInstructionFile(runtime)` in `src/runtime-name-policy.cts:105-127` maps
|
||||
`antigravity → GEMINI.md` (also `gemini → GEMINI.md` per CHANGELOG.md:1488, though the
|
||||
`gemini` runtime key itself no longer resolves to an installable runtime — the mapping table
|
||||
entry is vestigial/defensive, not reachable through `--gemini`). Compiled counterpart:
|
||||
`gsd-core/bin/lib/runtime-name-policy.cjs:118,130,140`. Consumed by the new-project workflow
|
||||
and `generate-claude-md` path per CHANGELOG.md:1488: *"A shared `getProjectInstructionFile(runtime)` policy… is now the single source of truth consumed by both the new-project workflow and the generate-claude-md path, with a parity test guarding drift."*
|
||||
- **Guard**: `tests/project-instruction-file-parity.test.cjs` exists (per the file inventory)
|
||||
and is the parity test CHANGELOG.md:1488 refers to. `tests/product-name-purity.test.cjs:23-41`
|
||||
(`PRODUCTS`, `README_FILES`, `findProductParentheticals`) is a different, narrower guard —
|
||||
it checks that product names aren't parenthetically mis-glossed in READMEs, not that
|
||||
Gemini-as-runtime language is absent. Neither test inspects the translated docs (§5).
|
||||
- **Verdict: PRESERVE.** The root `GEMINI.md` is correct and current.
|
||||
|
||||
## 4. Inventory of stale references (representative — not all ~400 hits)
|
||||
|
||||
`grep -rliE gemini` across the tree (excluding `node_modules`, `.git`, `.changeset`) returns
|
||||
**~280 files** referencing `gemini`; the overwhelming majority are legitimate senses (b)–(e) —
|
||||
reviewer-lane docs, model-catalog entries, ADR/CHANGELOG history, and the Antigravity dialect
|
||||
notes in `CONTEXT.md`, `docs/reference/host-integration-capability-matrix.md`, and
|
||||
`docs/installer-migrations.md:446,583`. The generated files (`docs/FEATURES.md`,
|
||||
`gsd-core/bin/lib/capability-registry.cjs`, `gsd-core/bin/lib/capability-validator.cjs`) are
|
||||
**not hand-edited** — `docs/FEATURES.md` is emitted by `scripts/gen-features.cjs` (registered
|
||||
in `scripts/docs-guard-registry.cjs`), and the `.cjs` registry files under `gsd-core/bin/lib/`
|
||||
are the build output of the `.cts` sources under `src/` (per `CONTEXT.md:248`, "NOT generated
|
||||
from `src/*.cts`" applies only to `bin/install.js` itself — the `gsd-core/bin/lib/*` modules
|
||||
ARE generated). Do not hand-edit generated files; any fix belongs in the `.cts` source or the
|
||||
capability `.json` and must be regenerated.
|
||||
|
||||
| File | Line | Current text (paraphrased) | Sense | Verdict | Why |
|
||||
|---|---|---|---|---|---|
|
||||
| `README.ja-JP.md` | 9, 24, 46 | Lists "Gemini CLI" as a supported runtime alongside Claude Code/OpenCode/Kilo/Codex/Copilot/Cursor/Windsurf | (f) | **MIGRATE** | English `README.md` has **zero** gemini mentions (verified via grep); translation was never updated after `8f2ebbe9bf` |
|
||||
| `README.ko-KR.md` | 9, 24, 46 | Same as above (Korean) | (f) | **MIGRATE** | Same |
|
||||
| `README.zh-CN.md` | 9, 24, 46 | Same as above (Chinese) | (f) | **MIGRATE** | Same |
|
||||
| `README.pt-BR.md` | 9, 24, 46 | Same as above (Portuguese) | (f) | **MIGRATE** | Same |
|
||||
| `docs/ja-JP/ARCHITECTURE.md` | 24, 115, 449, 561, 637 | Describes Gemini CLI as a live runtime with install paths (`~/.gemini/`), colon-form commands, and a runtime table row | (f) | **MIGRATE** | `docs/ARCHITECTURE.md` (EN) has no such runtime-table row for gemini; only legitimate Antigravity `.gemini/*` path mentions (`:708,995`) |
|
||||
| `docs/ko-KR/ARCHITECTURE.md` | 24, 118, 487, 615 | Same (Korean) | (f) | **MIGRATE** | Same |
|
||||
| `docs/ja-JP/COMMANDS.md` | 10, 1241 | "Gemini CLI: `/gsd:command-name`" colon-namespace install instructions; `--gemini` reviewer row mixed with stale namespace claim | (f) partial | **MIGRATE** (namespace claim only) | EN `docs/COMMANDS.md` documents `--gemini` only as a reviewer flag (sense b, legitimate); the colon-namespace-install prose is runtime-install language that no longer applies |
|
||||
| `docs/ko-KR/COMMANDS.md` | 10, 1247 | Same | (f) partial | **MIGRATE** | Same |
|
||||
| `docs/ja-JP/USER-GUIDE.md` | 39, 674, 751 | "Gemini CLI-only" colon-form install flag, `~/.gemini` config dir table row, non-Claude runtime list including Gemini CLI | (f) | **MIGRATE** | EN `docs/USER-GUIDE.md` has zero gemini mentions |
|
||||
| `docs/ko-KR/USER-GUIDE.md`, `docs/pt-BR/USER-GUIDE.md`, `docs/zh-CN/USER-GUIDE.md` | (equivalent) | Same pattern | (f) | **MIGRATE** | Same |
|
||||
| `docs/ja-JP/FEATURES.md` | 1016 | "REQ-RUNTIME-01: system must support Claude Code, OpenCode, Gemini CLI, Kilo, Codex, Copilot, Antigravity" | (f) | **MIGRATE** (or regenerate — see note) | EN `docs/FEATURES.md` is generated and does not list Gemini as a supported runtime requirement; translations of a generated doc need their own regeneration/translation pipeline, not hand-edits |
|
||||
| `docs/ko-KR/FEATURES.md`, `docs/zh-CN/FEATURES.md` | (equivalent) | Same | (f) | **MIGRATE** | Same |
|
||||
| `docs/ja-JP/how-to/set-up-cross-ai-review.md` | 11, 18, 144 | Lists Gemini CLI as one of the review-lane CLIs (legitimate, sense b) but frames install/auth instructions in runtime-like terms | (b), mostly legitimate | **VERIFY, likely PRESERVE** | Reviewer-lane language is legitimate; flagged only because it needs a human check that no install-target framing leaked in — lower priority than the ARCHITECTURE/USER-GUIDE/README hits |
|
||||
| `docs/ja-JP/how-to/install-on-your-runtime.md` | 49, 55 | "### Gemini CLI" section header with its own install instructions (skills path `~/.gemini/`, restart Gemini CLI) | (f) | **MIGRATE/DELETE** | EN `docs/how-to/install-on-your-runtime.md` has no Gemini CLI section — only Antigravity's `.gemini/antigravity*` dialect notes (`:443,448`). The whole translated section describes a runtime that no longer installs |
|
||||
| `docs/ko-KR/how-to/install-on-your-runtime.md`, `docs/pt-BR/...`, `docs/zh-CN/...` | (equivalent) | Same | (f) | **MIGRATE/DELETE** | Same |
|
||||
| `docs/ja-JP/context-monitor.md`, `docs/ko-KR/context-monitor.md`, `docs/pt-BR/context-monitor.md`, `docs/zh-CN/context-monitor.md` | 3, 65 | "Gemini CLI's hook is `AfterTool`" | (c)-adjacent | **VERIFY** | This is describing the hook-event dialect (legitimate, sense c, since Antigravity inherits it) but phrased as "for Gemini CLI" rather than "for the Gemini-family hookEvents dialect (used by Antigravity)" — a wording/attribution nit, not a functional error; low priority |
|
||||
| `VERSIONING.md` | 133 | `` `gemini-extension.json` — Gemini CLI extension manifest (issue #775) `` | (e)/(f) boundary | **MIGRATE (annotate as removed)** | The file was deleted in `8f2ebbe9bf`; VERSIONING.md is an active reference doc (not a frozen changelog), so this line should either be removed or annotated "(removed #1928)" |
|
||||
| `bin/install.js` | 1628-1720 | `claudeToGeminiTools` / `convertGeminiToolName` | (c) | **PRESERVE — trap** | Actively used by Antigravity's agent converter; explicitly guarded by `tests/gemini-runtime-removed.test.cjs:53` Coverage C |
|
||||
| `capabilities/gemini/capability.json` | whole file | Reviewer-lane-only manifest | (b) | **PRESERVE — trap** | Deliberately re-created post-removal; see §1, §2(b) |
|
||||
| `capabilities/antigravity/capability.json` | 11-15, 31, 40, 56, 78 | `.gemini` configHome/artifactLayout/hookEvents/GEMINI.md | (c) | **PRESERVE — trap** | Antigravity's real on-disk contract; renaming breaks the actual IDE integration |
|
||||
| `GEMINI.md` (root) | whole file | Antigravity context file | (c) | **PRESERVE — trap** | See §3 |
|
||||
| `docs/CONFIGURATION.md`, `docs/COMMANDS.md`, `docs/CLI-TOOLS.md`, `docs/reference/capability-matrix.md` (EN) | many | `review.models.gemini`, `--gemini` reviewer flag, model IDs | (b), (d) | **PRESERVE** | Reviewer lane + model catalog, both live and correct |
|
||||
| `CHANGELOG.md` | many (e.g. 1012, 1281, 1455-1456) | Migration history | (e) | **PRESERVE — locked** | `CHANGELOG.md is Locked` per CLAUDE.md; never hand-edit |
|
||||
| `.changeset/archived/*gemini*`, `.changeset/archived/*antigravity*` | whole files | Archived fragments | (e) | **PRESERVE** | Immutable release history |
|
||||
|
||||
**Not checked exhaustively** (out of budget for this pass, flagged for a follow-up sweep):
|
||||
`docs/pt-BR/COMMANDS.md`, `docs/pt-BR/CONFIGURATION.md`, `docs/pt-BR/CLI-TOOLS.md`,
|
||||
`docs/zh-CN/COMMANDS.md`, `docs/zh-CN/CONFIGURATION.md`, `docs/zh-CN/CLI-TOOLS.md`,
|
||||
`docs/{ja-JP,ko-KR,pt-BR,zh-CN}/how-to/{configure-model-profiles,execute-a-phase,set-up-cross-ai-review,spike-and-sketch,verify-and-ship}.md`,
|
||||
`docs/{ja-JP,ko-KR,pt-BR,zh-CN}/INVENTORY.md`, `docs/{ja-JP,ko-KR,pt-BR,zh-CN}/CLI-TOOLS.md`. Given
|
||||
the pattern found in ARCHITECTURE.md/COMMANDS.md/USER-GUIDE.md/FEATURES.md/README across all
|
||||
four locales, it is highly likely the same "Gemini CLI listed as a live runtime" pattern
|
||||
recurs in most of these — **UNDETERMINED exact count without a full per-file diff against the
|
||||
EN originals; estimated 60-100 additional stale lines across the untranslated-drift set**
|
||||
(the raw `grep -c 'Gemini CLI'` across `docs/pt-BR/ docs/zh-CN/` + the four translated READMEs
|
||||
alone already returned 61 matches in this pass).
|
||||
|
||||
**Estimated total stale (sense-f) reference count: at least 30 confirmed above, likely
|
||||
100+ once the full ja-JP/ko-KR/pt-BR/zh-CN doc tree is diffed line-by-line against the EN
|
||||
originals.** This is overwhelmingly a **translation-parity problem**, not a scattered set of
|
||||
independent bugs — one systemic gap (translations never re-synced after `8f2ebbe9bf`)
|
||||
accounts for nearly all of it.
|
||||
|
||||
## 5. Guards: what catches regressions, and what doesn't
|
||||
|
||||
- `tests/gemini-runtime-removed.test.cjs` — **scope is explicitly stated in its own docblock
|
||||
(`:1-19`)**: (A) the `--gemini` CLI redirect contract, (B) `gemini` gone from
|
||||
`runtime-name-policy` surfaces (`canonicalizeRuntimeName`, `getRuntimeLabel`,
|
||||
`getGlobalConfigHomeFragment`, `getRuntimeNewProjectCommand`, `runtimeFlags`,
|
||||
`getProjectInstructionFile` — all imported at `:44-51`), (C) Antigravity's shared surface
|
||||
(`GEMINI.md`, `convertGeminiToolName`) survives. **It never reads any file under `docs/` or
|
||||
any `README.*` translation** — it only spawns the installer and inspects
|
||||
`runtime-name-policy.cjs`/`capability-registry.cjs`/`install.js` exports. A stale
|
||||
"Gemini CLI is a supported runtime" sentence in `README.ja-JP.md` cannot fail this test by
|
||||
construction.
|
||||
- `tests/product-name-purity.test.cjs:23-41` — scoped to `PRODUCTS`/`README_FILES` and
|
||||
`findProductParentheticals`: checks that product names aren't mis-glossed parenthetically
|
||||
(e.g. "Claude (Anthropic's coding agent)" drift), not that a named product is still a live
|
||||
install target. Different axis entirely.
|
||||
- `tests/project-instruction-file-parity.test.cjs` — guards that `getProjectInstructionFile`
|
||||
stays consistent between the new-project workflow and the generate-claude-md path
|
||||
(CHANGELOG.md:1488). Code-level parity, not prose-level.
|
||||
- `tests/docs-parity-live-registry.test.cjs:43` (`LOCALES` constant) and
|
||||
`tests/docs-state-md-locale-parity.test.cjs:30` (`LOCALES` constant) — these **are** the
|
||||
repo's translation-parity guards, but (per their names and the `docs-guard-registry.cjs`
|
||||
registration table) they check *structural* parity — that a live registry-derived table
|
||||
(reviewer flags, STATE.md field reference) is present and enumerated identically across
|
||||
locales — not that free-form prose describing "which runtimes GSD supports" is factually
|
||||
current. They would catch a **missing row**, not a **stale but present** row.
|
||||
- **Missing guard**: there is no test that asserts "no locale doc claims Gemini CLI is an
|
||||
installable runtime" the way `tests/gemini-runtime-removed.test.cjs` asserts it for the
|
||||
English surfaces and the installer itself. This is the specific gap that let ~30-100+ stale
|
||||
translated-doc references slip through three-plus release cycles since `8f2ebbe9bf`
|
||||
(2026-07-04) to today (2026-09-13).
|
||||
- Recommended shape for the missing guard (not implemented by this research task, which is
|
||||
read-only): a locale-parity test that, for each `docs/<locale>/*.md` and `README.<locale>.md`
|
||||
file, asserts it contains no "Gemini CLI" occurrence outside a reviewer-lane-flag context
|
||||
(mirroring the EN original's own absence), OR a stronger structural fix — derive the
|
||||
runtime-list prose (`docs/ARCHITECTURE.md`'s "Claude Code / OpenCode / Kilo / Codex /
|
||||
Copilot / Antigravity / Trae / Cline / Augment Code" enumeration) from
|
||||
`runtime-name-policy`'s `allRuntimes` at doc-generation time instead of hand-authoring it in
|
||||
ten languages independently.
|
||||
|
||||
## 6. Ripple / bookkeeping requirements for any fix
|
||||
|
||||
Per this repo's own `CLAUDE.md` (project instructions) and repo conventions, a change that
|
||||
touches the stale references identified in §4 must carry:
|
||||
|
||||
- **Changeset required.** `CLAUDE.md` §"CHANGESETS & RELEASE NOTES": drop a fragment in
|
||||
`.changeset/` via `npm run changeset -- --type <T> --pr <NNN> --body "..."`. Type would be
|
||||
`Fixed` (docs-only correction of stale claims) per the six allowed types
|
||||
(`Added|Changed|Deprecated|Removed|Fixed|Security`) — there is no `Documentation` type; a
|
||||
docs-only fix uses `Fixed`.
|
||||
- **`CHANGELOG.md` stays locked** — never hand-edit; the changeset renders it.
|
||||
- **`docs/INVENTORY.md` + manifest regen** if any file is added/removed/renamed:
|
||||
`node scripts/gen-inventory-manifest.cjs --write` (CLAUDE.md "KNOWN DEFECTS" §"Inventory
|
||||
Drift"). A pure text edit inside existing translated `.md` files likely does not trigger
|
||||
this, but deleting a stale section (e.g. the Gemini CLI subsection in
|
||||
`docs/*/how-to/install-on-your-runtime.md`) does not remove a *file*, so INVENTORY.md
|
||||
itself is probably unaffected — **UNDETERMINED without running the generator**.
|
||||
- **Golden install-tree regeneration** — not applicable here; these are prose docs, not
|
||||
installer output fixtures (`tests/fixtures/install-tree/*.json`,
|
||||
`tests/fixtures/golden-install-parity/*.json`). No golden fixture references were found to
|
||||
need regeneration for a docs-only fix.
|
||||
- **`docs/FEATURES.md` / generated capability fragments** — per this task's own note, these
|
||||
are generated by `scripts/gen-features.cjs` and the `.cts→.cjs` build; any fix to their
|
||||
*translated* counterparts (`docs/{ja-JP,ko-KR,zh-CN}/FEATURES.md`) needs to go through
|
||||
whatever translation/regeneration pipeline produces them (not located/verified in this pass
|
||||
— **UNDETERMINED**: no `gen-features-<locale>.cjs` or translation-sync script was found by
|
||||
name; the translated FEATURES.md files may be manually maintained mirrors, which would make
|
||||
them structurally prone to exactly this kind of drift).
|
||||
- **Glossary gate** — `CLAUDE.md` "Repo conventions" cites `gsd-context-md-glossary-is-a-pr-gate` (per user memory index); `CONTEXT.md` itself mentions Gemini/Antigravity only in the legitimate installer/config-dir sense (`CONTEXT.md:248`) and does not need correction based on this pass.
|
||||
- **Translation parity** — no dedicated "translation must match EN" gate was found beyond the
|
||||
narrow structural `LOCALES`-based tests in §5; this is the actual missing-guard finding.
|
||||
- **ADR requirement** — a prose/docs correction of this kind (removing stale claims,
|
||||
no behavior change) does not meet the bar for "every bug-fix and feature change requires
|
||||
ADR" in the sense `docs/adr/` uses (ADRs there are architectural decisions, not doc
|
||||
corrections); **no new ADR is required** for fixing the stale references themselves. An ADR
|
||||
would only be warranted if the *fix* itself introduced a new mechanism (e.g. a
|
||||
runtime-list-derived doc generator).
|
||||
|
||||
## Scope note
|
||||
|
||||
This document is read-only research. No source file other than this one was modified. The
|
||||
`docs/{ja-JP,ko-KR,pt-BR,zh-CN}` files listed as MIGRATE in §4 were identified but **not
|
||||
edited** — remediation is a separate, subsequent change subject to the ripple requirements in
|
||||
§6.
|
||||
|
||||
---
|
||||
|
||||
## 7. Addendum — the severest class the §4 sweep missed: live workflow behavior
|
||||
|
||||
§4 concluded the residue is "overwhelmingly a translation-parity problem". That is true by
|
||||
*count*, but not by *severity*. Runtime-loaded workflow text under `gsd-core/workflows/` still
|
||||
assigns and offers the retired `gemini` runtime id, and the name policy resolves that id to
|
||||
**Claude Code** instead of failing loudly.
|
||||
|
||||
### 7.1 Measured: an unknown runtime id resolves to a safe-looking known
|
||||
|
||||
Executed against `next@c0b2a05d2f`:
|
||||
|
||||
```
|
||||
canonicalizeRuntimeName('gemini') = null
|
||||
getProjectInstructionFile('gemini') = "AGENTS.md"
|
||||
getRuntimeLabel('gemini') = "Claude Code"
|
||||
getGlobalConfigHomeFragment('gemini') = "'.claude'"
|
||||
getGlobalConfigDir('gemini') = ~/.claude
|
||||
getGlobalConfigDir('antigravity') = ~/.gemini/antigravity
|
||||
```
|
||||
|
||||
`gemini` is correctly non-canonical, so `tests/gemini-runtime-removed.test.cjs` Coverage B
|
||||
passes. But the other accessors do not reject it — they fall through to Claude Code defaults.
|
||||
A stale `RUNTIME="gemini"` therefore produces a *plausible wrong answer* rather than an error:
|
||||
the Claude config dir, the label "Claude Code", and `AGENTS.md` as the instruction file.
|
||||
|
||||
Note `AGENTS.md` also contradicts the workflow's own documented claim at
|
||||
`gsd-core/workflows/new-project.md:1216` and `:1238` ("`GEMINI.md` for gemini/antigravity").
|
||||
The prose and the policy disagree about the same retired id.
|
||||
|
||||
### 7.2 The live assignment sites that reach it
|
||||
|
||||
| File | Line | Text | Verdict |
|
||||
|---|---|---|---|
|
||||
| `gsd-core/workflows/new-project.md` | 76 | `` Path contains `/.gemini/` → `RUNTIME=gemini` `` | **MIGRATE** — `~/.gemini` is Antigravity's parent; the only live child is `~/.gemini/antigravity` |
|
||||
| `gsd-core/workflows/new-project.md` | 84 | `elif [ -n "$GEMINI_CONFIG_DIR" ]; then RUNTIME="gemini"` | **MIGRATE** — live shell branch minting a non-canonical id that silently resolves to Claude Code (§7.1) |
|
||||
| `gsd-core/workflows/new-project.md` | 576 | "required for non-Claude runtimes: Codex, Gemini CLI, OpenCode…" | **MIGRATE** — names a sunset product as a supported runtime |
|
||||
| `gsd-core/workflows/new-project.md` | 1216, 1238 | "`GEMINI.md` for gemini/antigravity" | **MIGRATE** — drop `gemini/`; keep `antigravity` |
|
||||
| `gsd-core/workflows/settings-advanced.md` | 412 | `{ label: "gemini", description: "Gemini CLI." }` | **MIGRATE** — a user-facing `AskUserQuestion` menu still **offers Gemini CLI as a selectable runtime** |
|
||||
| `gsd-core/workflows/settings-advanced.md` | 393 | "Common runtimes: claude, codex, gemini, qwen" | **MIGRATE** |
|
||||
| `gsd-core/workflows/settings-advanced.md` | 360 | model-profile table row keyed `gemini` (runtime axis) | **MIGRATE** — the row key is the retired runtime; the `gemini-*` model IDs in it are legitimate (sense d) |
|
||||
| `gsd-core/workflows/settings-advanced.md` | 510-512 | `config-set runtime gemini`, `model_profile_overrides.gemini.*` | **MIGRATE** — documented examples that set a non-canonical runtime |
|
||||
| `gsd-core/workflows/settings-advanced.md` | 673-675 | `google` provider rows | **PRESERVE** — provider axis, not runtime |
|
||||
| `gsd-core/workflows/reapply-patches.md` | 62-63, 91-92, 101 | probes `$GEMINI_CONFIG_DIR` and `~/.gemini/gsd-local-patches`; bare `.gemini` in the dir scan | **MIGRATE** — same class as #4347 but **hand-written, so `npm run sync:launcher` does not reach it** |
|
||||
| `gsd-core/workflows/update.md` | 77, 135, 276, 277, 315 | bare `~/.gemini/` / `./.gemini/` as a runtime config dir | **MIGRATE** — the live dir is `~/.gemini/antigravity` |
|
||||
| `gsd-core/workflows/update.md` | 466 | dir scan list including bare `.gemini` | **MIGRATE** |
|
||||
| `gsd-core/workflows/update.md` | 17, 466 | `.gemini/antigravity{,-ide,-cli}` → `antigravity` | **PRESERVE** |
|
||||
|
||||
These are **not** doc-only paths for gating purposes: `pre-pr-gate.sh`'s `DOC_ONLY_RE` anchors
|
||||
its `*.md` arm at repo root only, so `gsd-core/workflows/*.md` is gated code.
|
||||
|
||||
### 7.3 Second, un-migrated launcher generation
|
||||
|
||||
`commands/gsd/graphify.md:83,100,125,144,164` and `skills/gsd-graphify/SKILL.md` carry an
|
||||
**older** launcher form (the long `elif [ -f … ]` chain) than the compact `_gsd_at` form in
|
||||
`gsd-core/workflows/_runtime-launcher.snippet.sh:1`. Both generations carry the
|
||||
`${GEMINI_CONFIG_DIR:-$HOME/.gemini}` arm. Any fix that only re-runs the launcher sync will
|
||||
therefore miss the graphify copies — a generative-fix divergence hazard.
|
||||
|
||||
### 7.4 Consequence for the guard design
|
||||
|
||||
The missing guard proposed in §5 was scoped to locale prose. It must also cover code and
|
||||
runtime-loaded workflow text, and the cheapest durable form is to make the name policy
|
||||
**fail loud** on a non-canonical id rather than defaulting to Claude Code — which would have
|
||||
turned every site in §7.2 into a hard error on the day #1928 landed.
|
||||
@@ -83,12 +83,12 @@ git init
|
||||
|
||||
**Detect runtime** using the same pattern as `new-project.md`:
|
||||
- execution_context path `/.codex/` → `RUNTIME=codex`
|
||||
- `/.gemini/` → `RUNTIME=gemini`
|
||||
- `/.gemini/antigravity/`, `/.gemini/antigravity-ide/` or `/.gemini/antigravity-cli/` → `RUNTIME=antigravity`
|
||||
- `/.opencode/` or `/.config/opencode/` → `RUNTIME=opencode`
|
||||
- `/.trae/` → `RUNTIME=trae`
|
||||
- else → `RUNTIME=claude`
|
||||
|
||||
Fall back to env vars (`CODEX_HOME`, `GEMINI_CONFIG_DIR`, `OPENCODE_CONFIG_DIR`, `TRAE_CONFIG_DIR`) if execution_context is unavailable.
|
||||
Fall back to env vars (`CODEX_HOME`, `ANTIGRAVITY_CONFIG_DIR`, `OPENCODE_CONFIG_DIR`, `TRAE_CONFIG_DIR`) if execution_context is unavailable.
|
||||
|
||||
</step>
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ Skip Steps 6–7 (parallel research and synthesis) and proceed directly to roadm
|
||||
|
||||
Derive `RUNTIME` from the invoking prompt's `execution_context` path:
|
||||
- Path contains `/.codex/` → `RUNTIME=codex`
|
||||
- Path contains `/.gemini/` → `RUNTIME=gemini`
|
||||
- Path contains `/.gemini/antigravity/`, `/.gemini/antigravity-ide/` or `/.gemini/antigravity-cli/` → `RUNTIME=antigravity`
|
||||
- Path contains `/.config/opencode/` or `/.opencode/` → `RUNTIME=opencode`
|
||||
- Path contains `/.trae/` → `RUNTIME=trae`
|
||||
- Otherwise → `RUNTIME=claude`
|
||||
@@ -81,7 +81,7 @@ Derive `RUNTIME` from the invoking prompt's `execution_context` path:
|
||||
If `execution_context` path is not available, fall back to env vars:
|
||||
```bash
|
||||
if [ -n "$CODEX_HOME" ]; then RUNTIME="codex"
|
||||
elif [ -n "$GEMINI_CONFIG_DIR" ]; then RUNTIME="gemini"
|
||||
elif [ -n "$ANTIGRAVITY_CONFIG_DIR" ]; then RUNTIME="antigravity"
|
||||
elif [ -n "$OPENCODE_CONFIG_DIR" ] || [ -n "$OPENCODE_CONFIG" ]; then RUNTIME="opencode"
|
||||
elif [ -n "$TRAE_CONFIG_DIR" ]; then RUNTIME="trae"
|
||||
else RUNTIME="claude"; fi
|
||||
@@ -571,9 +571,9 @@ questions: [
|
||||
question: "Which AI models for planning agents?",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Adaptive (Recommended)", description: "Role-based cost optimization: heavy roles use the highest-tier model available on the active runtime, light roles use the cheapest. Best balance of quality and cost across all supported runtimes (Claude, Codex, Gemini, OpenRouter, local)." },
|
||||
{ label: "Adaptive (Recommended)", description: "Role-based cost optimization: heavy roles use the highest-tier model available on the active runtime, light roles use the cheapest. Best balance of quality and cost across all supported runtimes (Claude, Codex, Antigravity, OpenRouter, local)." },
|
||||
{ label: "Standard tier…", description: "Choose Quality, Balanced, or Budget — flat tier applied to all agents" },
|
||||
{ label: "Inherit", description: "Use the current session model for all agents (required for non-Claude runtimes: Codex, Gemini CLI, OpenCode /model, OpenRouter, local models)" }
|
||||
{ label: "Inherit", description: "Use the current session model for all agents (required for non-Claude runtimes: Codex, Antigravity, OpenCode /model, OpenRouter, local models)" }
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1213,7 +1213,7 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
|
||||
- `.planning/REQUIREMENTS.md`
|
||||
- `.planning/ROADMAP.md`
|
||||
- `.planning/STATE.md`
|
||||
- `$INSTRUCTION_FILE` (runtime-derived via the shared `getProjectInstructionFile` policy: `AGENTS.md` for codex/opencode/kilo/kimi, `.github/copilot-instructions.md` for copilot, `GEMINI.md` for gemini/antigravity, `.claude/CLAUDE.md` for claude)
|
||||
- `$INSTRUCTION_FILE` (runtime-derived via the shared `getProjectInstructionFile` policy: `AGENTS.md` for codex/opencode/kilo/kimi, `.github/copilot-instructions.md` for copilot, `GEMINI.md` for antigravity, `.claude/CLAUDE.md` for claude)
|
||||
|
||||
</output>
|
||||
|
||||
@@ -1235,7 +1235,7 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
|
||||
- [ ] ROADMAP.md created with phases, requirement mappings, success criteria
|
||||
- [ ] STATE.md initialized
|
||||
- [ ] REQUIREMENTS.md traceability updated
|
||||
- [ ] `$INSTRUCTION_FILE` generated with GSD workflow guidance (runtime-derived via the shared `getProjectInstructionFile` policy — `AGENTS.md` for codex/opencode/kilo/kimi, `.github/copilot-instructions.md` for copilot, `GEMINI.md` for gemini/antigravity, `.claude/CLAUDE.md` for claude; an existing hand-crafted file without GSD markers is left untouched unless `--force`)
|
||||
- [ ] `$INSTRUCTION_FILE` generated with GSD workflow guidance (runtime-derived via the shared `getProjectInstructionFile` policy — `AGENTS.md` for codex/opencode/kilo/kimi, `.github/copilot-instructions.md` for copilot, `GEMINI.md` for antigravity, `.claude/CLAUDE.md` for claude; an existing hand-crafted file without GSD markers is left untouched unless `--force`)
|
||||
- [ ] User knows next step is `/gsd:discuss-phase 1`
|
||||
|
||||
**Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
|
||||
|
||||
@@ -59,8 +59,8 @@ elif [ -z "$PATCHES_DIR" ] && [ -n "$XDG_CONFIG_HOME" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$PATCHES_DIR" ] && [ -n "$GEMINI_CONFIG_DIR" ]; then
|
||||
candidate="$(expand_home "$GEMINI_CONFIG_DIR")/gsd-local-patches"
|
||||
if [ -z "$PATCHES_DIR" ] && [ -n "$ANTIGRAVITY_CONFIG_DIR" ]; then
|
||||
candidate="$(expand_home "$ANTIGRAVITY_CONFIG_DIR")/gsd-local-patches"
|
||||
if [ -d "$candidate" ]; then
|
||||
PATCHES_DIR="$candidate"
|
||||
fi
|
||||
@@ -88,6 +88,12 @@ if [ -z "$PATCHES_DIR" ]; then
|
||||
PATCHES_DIR="$HOME/.config/opencode/gsd-local-patches"
|
||||
elif [ -d "$HOME/.opencode/gsd-local-patches" ]; then
|
||||
PATCHES_DIR="$HOME/.opencode/gsd-local-patches"
|
||||
elif [ -d "$HOME/.gemini/antigravity/gsd-local-patches" ]; then
|
||||
PATCHES_DIR="$HOME/.gemini/antigravity/gsd-local-patches"
|
||||
# Legacy: a pre-#1928 Gemini CLI install put patches at ~/.gemini/gsd-local-patches.
|
||||
# That runtime is retired, but a stranded patches dir is still the user's work — probed
|
||||
# AFTER Antigravity so a live install always wins. This is a directory probe, not a
|
||||
# runtime home: nothing here assigns the retired runtime id.
|
||||
elif [ -d "$HOME/.gemini/gsd-local-patches" ]; then
|
||||
PATCHES_DIR="$HOME/.gemini/gsd-local-patches"
|
||||
elif [ -d "$HOME/.codex/gsd-local-patches" ]; then
|
||||
@@ -98,7 +104,7 @@ if [ -z "$PATCHES_DIR" ]; then
|
||||
fi
|
||||
# Local install fallback — check all runtime directories
|
||||
if [ ! -d "$PATCHES_DIR" ]; then
|
||||
for dir in .config/kilo .kilo .config/opencode .opencode .gemini .codex .claude; do
|
||||
for dir in .config/kilo .kilo .config/opencode .opencode .agents .codex .claude; do
|
||||
if [ -d "./$dir/gsd-local-patches" ]; then
|
||||
PATCHES_DIR="./$dir/gsd-local-patches"
|
||||
break
|
||||
|
||||
@@ -357,7 +357,6 @@ Built-in tier defaults by runtime:
|
||||
|------------|-------------------------------|---------------------------------|-------------------------------|
|
||||
| `claude` | `claude-opus-4-8` | `claude-sonnet-5` | `claude-haiku-4-5` |
|
||||
| `codex` | `gpt-5.6-sol` | `gpt-5.6-terra` | `gpt-5.6-luna` |
|
||||
| `gemini` | `gemini-3.1-pro-preview` | `gemini-3-flash` | `gemini-2.5-flash-lite` |
|
||||
| `qwen` | `qwen3-max-2026-01-23` | `qwen3-coder-plus` | `qwen3-coder-next` |
|
||||
| `opencode` | `anthropic/claude-opus-4-8` | `anthropic/claude-sonnet-5` | `anthropic/claude-haiku-4-5` |
|
||||
| `copilot` | `claude-opus-4-8` | `claude-sonnet-5` | `claude-haiku-4-5` |
|
||||
@@ -390,7 +389,7 @@ AskUserQuestion([
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Keep current (<runtime>)", description: "Configure overrides for the current runtime." },
|
||||
{ label: "Common runtimes", description: "claude, codex, gemini, qwen" },
|
||||
{ label: "Common runtimes", description: "claude, codex, qwen" },
|
||||
{ label: "Additional runtimes", description: "opencode, copilot, hermes, kilo" },
|
||||
{ label: "Other (Group B or custom)", description: "cline, cursor, windsurf, augment, trae, codebuddy, antigravity, or a custom runtime string." }
|
||||
]
|
||||
@@ -409,7 +408,6 @@ AskUserQuestion([
|
||||
options: [
|
||||
{ label: "claude", description: "Claude Code / Anthropic CLI." },
|
||||
{ label: "codex", description: "OpenAI Codex CLI." },
|
||||
{ label: "gemini", description: "Gemini CLI." },
|
||||
{ label: "qwen", description: "Qwen CLI." }
|
||||
]
|
||||
}
|
||||
@@ -506,10 +504,11 @@ gsd_run query config-set workflow.plan_bounce_passes 5
|
||||
gsd_run query config-set workflow.subagent_timeout 300000
|
||||
gsd_run query config-set git.base_branch main
|
||||
gsd_run query config-set context_window 1000000
|
||||
# Runtime model tier examples:
|
||||
gsd_run query config-set runtime gemini
|
||||
gsd_run query config-set model_profile_overrides.gemini.opus gemini-3-ultra
|
||||
gsd_run query config-set model_profile_overrides.gemini.haiku null
|
||||
# Runtime model tier examples (antigravity ships no built-in tier defaults, so
|
||||
# overrides are how you pin its models):
|
||||
gsd_run query config-set runtime antigravity
|
||||
gsd_run query config-set model_profile_overrides.antigravity.opus gemini-3.1-pro-preview
|
||||
gsd_run query config-set model_profile_overrides.antigravity.haiku null
|
||||
```
|
||||
|
||||
Conceptual shape after merge (unchanged top-level keys like `model_profile`,
|
||||
|
||||
@@ -99,8 +99,8 @@ error: cross-runtime skill sync is not supported (--from $FROM_RUNTIME --to $DES
|
||||
To install correctly-converted skills for the '$DEST' runtime, run the GSD
|
||||
installer for that runtime (not sync):
|
||||
npx -y @opengsd/gsd-core@latest --global --<runtime>
|
||||
(grok and gemini have no dedicated installer flag — they alias the codex and
|
||||
claude skills roots respectively, which is itself why sync refuses them.)
|
||||
(grok has no dedicated installer flag — it aliases the codex skills root,
|
||||
which is itself why sync refuses it.)
|
||||
sync only supports identity sync, where --from and --to are the same runtime.
|
||||
EOF
|
||||
exit 1
|
||||
|
||||
@@ -74,7 +74,7 @@ Parse output:
|
||||
- Line 1 = installed version (`0.0.0` means unknown version)
|
||||
- Line 2 = install scope (`LOCAL`, `GLOBAL`, or `UNKNOWN`)
|
||||
- Line 3 = target runtime (`claude`, `opencode`, `kilo`, `codex`, `antigravity`, `windsurf`); empty when no installed target is resolved
|
||||
- Line 4 = resolved GSD config dir (e.g. `/Users/me/.claude`, `/Users/me/.gemini`); empty when no installed target is resolved. Capture this as `GSD_DIR` and pass it to subsequent steps so they don't re-derive the runtime path.
|
||||
- Line 4 = resolved GSD config dir (e.g. `/Users/me/.claude`, `/Users/me/.gemini/antigravity`); empty when no installed target is resolved. Capture this as `GSD_DIR` and pass it to subsequent steps so they don't re-derive the runtime path.
|
||||
|
||||
`update-context` reproduces the previous detection cascade — preferred-config-dir fast path, local-over-global with same-path dedup (so `CWD=$HOME` does not misdetect as LOCAL), env-var overrides (`CLAUDE_CONFIG_DIR`, `OPENCODE_CONFIG_DIR`, `KILO_CONFIG`, `XDG_CONFIG_HOME`, `CODEX_HOME`, …), and semver validation — but as a tested projection rather than ~280 lines of inline bash. Branch coverage lives in `tests/update-context.test.cjs`.
|
||||
|
||||
@@ -132,7 +132,7 @@ Extract `section_manifest` from `INIT_UPDATE` — gates the `channel-banner` sec
|
||||
<step name="check_latest_version">
|
||||
Check npm for latest version via the deterministic script. **Do NOT run `npm view` or `npm search` directly** — the package name must come from the script, not from a free choice at execution time. (#2992: LLM-driven prescriptions of npm package names produced wrong-package queries; moving the package name into a script constant closes that gap.)
|
||||
|
||||
The `GSD_DIR` value emitted by `get_installed_version` (line 4) resolves to the runtime-specific config dir (`~/.claude/`, `~/.gemini/`, `~/.codex/`, etc.), so the script invocation works for every runtime — not just Claude. An unresolved target exits in `get_installed_version` before this step.
|
||||
The `GSD_DIR` value emitted by `get_installed_version` (line 4) resolves to the runtime-specific config dir (`~/.claude/`, `~/.gemini/antigravity/`, `~/.codex/`, etc.), so the script invocation works for every runtime — not just Claude. An unresolved target exits in `get_installed_version` before this step.
|
||||
|
||||
`LATEST_RESULT` is a JSON document with the documented shape `{ ok: bool, version: string, reason: string, detail?: string }`. Parse it with the Node-only `uc_field` helper. When the script cannot run or returns nothing, preserve its failure as a meaningful diagnostic (#2993 CR feedback):
|
||||
|
||||
@@ -273,8 +273,8 @@ rm -f "$CHANGELOG_TMP"
|
||||
- `agents/gsd-*` files will be replaced
|
||||
|
||||
(Paths are relative to detected runtime install location:
|
||||
global: `~/.claude/`, `~/.config/opencode/`, `~/.opencode/`, `~/.gemini/`, `~/.config/kilo/`, or `~/.codex/`
|
||||
local: `./.claude/`, `./.config/opencode/`, `./.opencode/`, `./.gemini/`, `./.kilo/`, or `./.codex/`)
|
||||
global: `~/.claude/`, `~/.config/opencode/`, `~/.opencode/`, `~/.gemini/antigravity/`, `~/.config/kilo/`, or `~/.codex/`
|
||||
local: `./.claude/`, `./.config/opencode/`, `./.opencode/`, `./.agents/`, `./.kilo/`, or `./.codex/`)
|
||||
|
||||
Your custom files in other locations are preserved:
|
||||
- Custom commands not in `commands/gsd/` ✓
|
||||
@@ -312,7 +312,7 @@ First, resolve the config directory (`RUNTIME_DIR`) from the install scope
|
||||
detected in `get_installed_version`:
|
||||
|
||||
```bash
|
||||
# RUNTIME_DIR is the resolved config directory (e.g. ~/.config/opencode, ~/.gemini).
|
||||
# RUNTIME_DIR is the resolved config directory (e.g. ~/.config/opencode, ~/.gemini/antigravity).
|
||||
# get_installed_version emits it as GSD_DIR for a resolved LOCAL or GLOBAL install.
|
||||
# The unresolved-target gate exits before this step; the empty guard remains defensive.
|
||||
RUNTIME_DIR="$GSD_DIR"
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
"reductionPct": 8.67
|
||||
},
|
||||
"new-project": {
|
||||
"offTokens": 14279,
|
||||
"onTokens": 12335,
|
||||
"reductionPct": 13.61
|
||||
"offTokens": 14308,
|
||||
"onTokens": 12364,
|
||||
"reductionPct": 13.59
|
||||
},
|
||||
"plan-phase": {
|
||||
"offTokens": 27637,
|
||||
@@ -39,8 +39,8 @@
|
||||
}
|
||||
},
|
||||
"aggregate": {
|
||||
"offTokens": 107411,
|
||||
"onTokens": 90763,
|
||||
"offTokens": 107440,
|
||||
"onTokens": 90792,
|
||||
"reductionPct": 15.5
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
"reductionPct": 20.79
|
||||
},
|
||||
"agents/gsd-code-fixer.md": {
|
||||
"offTokens": 10734,
|
||||
"onTokens": 6682,
|
||||
"reductionPct": 37.75
|
||||
"offTokens": 10741,
|
||||
"onTokens": 6690,
|
||||
"reductionPct": 37.72
|
||||
},
|
||||
"agents/gsd-code-reviewer.md": {
|
||||
"offTokens": 4408,
|
||||
@@ -169,8 +169,8 @@
|
||||
}
|
||||
},
|
||||
"aggregate": {
|
||||
"offTokens": 118691,
|
||||
"onTokens": 94333,
|
||||
"offTokens": 118698,
|
||||
"onTokens": 94341,
|
||||
"reductionPct": 20.52
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ const {
|
||||
} = require(path.join(ROOT, 'gsd-core', 'bin', 'lib', 'runtime-name-policy.cjs'));
|
||||
|
||||
const registry = require(path.join(ROOT, 'gsd-core', 'bin', 'lib', 'capability-registry.cjs'));
|
||||
const catalog = require(path.join(ROOT, 'gsd-core', 'bin', 'shared', 'model-catalog.json'));
|
||||
|
||||
const { convertClaudeAgentToAntigravityAgent } = require('../bin/install.js');
|
||||
|
||||
@@ -209,3 +210,222 @@ describe('#1928 Antigravity preserved (shared surface with the removed gemini ru
|
||||
assert.ok(!/\bskill\b/.test(toolsLine), 'Skill is still excluded (would be an invalid backend tool name)');
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* #4709 — the #1928 removal reached the installer and the runtime enum, but runtime-loaded
|
||||
* workflow text kept MINTING the retired id: `RUNTIME="gemini"` from `$GEMINI_CONFIG_DIR`, a
|
||||
* runtime selection menu offering "Gemini CLI.", a runtime->model-tier table row keyed `gemini`,
|
||||
* and `config-set runtime gemini` examples.
|
||||
*
|
||||
* The name policy's unknown-id fallbacks are DELIBERATE and stay unchanged — see the
|
||||
* 'gemini no longer maps to GEMINI.md (defaults to AGENTS.md)' test above, and
|
||||
* src/runtime-name-policy.cts:220-222, which calls the label default "the always-safe default,
|
||||
* fail-closed". This block removes the REACHABILITY instead: nothing shipped may mint an id the
|
||||
* policy does not recognize.
|
||||
*
|
||||
* Every assertion is STRUCTURAL (the literal must be canonical / the runtime must exist as a
|
||||
* catalog key), never "the string gemini is absent" — that string is load-bearing across
|
||||
* Antigravity's real on-disk contract, which the final test pins.
|
||||
*/
|
||||
describe('#4709 no shipped surface mints a retired runtime id', () => {
|
||||
/** Recursively collect every `.md` file under `dir` (missing dir -> []). */
|
||||
function markdownFilesUnder(dir) {
|
||||
if (!fs.existsSync(dir)) return [];
|
||||
const out = [];
|
||||
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
||||
const full = path.join(dir, entry.name);
|
||||
if (entry.isDirectory()) out.push(...markdownFilesUnder(full));
|
||||
else if (entry.isFile() && entry.name.endsWith('.md')) out.push(full);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* The shipped, runtime-loaded markdown corpus this block governs. `agents/` is included
|
||||
* deliberately: it ships runtime-loaded markdown too, including `.compact.md` variants, and
|
||||
* leaving it out was a coverage gap an adversarial review caught.
|
||||
*/
|
||||
function shippedMarkdown() {
|
||||
return [
|
||||
...markdownFilesUnder(path.join(ROOT, 'gsd-core', 'workflows')),
|
||||
...markdownFilesUnder(path.join(ROOT, 'commands')),
|
||||
...markdownFilesUnder(path.join(ROOT, 'skills')),
|
||||
...markdownFilesUnder(path.join(ROOT, 'agents')),
|
||||
];
|
||||
}
|
||||
|
||||
const relPath = (p) => path.relative(ROOT, p).split(path.sep).join('/');
|
||||
const linesOf = (file) => fs.readFileSync(file, 'utf8').split(/\r?\n/);
|
||||
|
||||
const SETTINGS_ADVANCED = path.join(ROOT, 'gsd-core', 'workflows', 'settings-advanced.md');
|
||||
|
||||
test('every RUNTIME= assignment in workflow text names a canonical runtime', () => {
|
||||
// Bare-literal assignments only: RUNTIME=codex / RUNTIME="codex". A `$VAR`, `$(cmd)` or
|
||||
// `<placeholder>` assignment is resolved at runtime and carries no id to validate here.
|
||||
const ASSIGN = /\bRUNTIME=("?)([a-z][a-z0-9-]*)\1(?![\w-])/g;
|
||||
const offenders = [];
|
||||
|
||||
for (const file of shippedMarkdown()) {
|
||||
linesOf(file).forEach((line, i) => {
|
||||
for (const m of line.matchAll(ASSIGN)) {
|
||||
if (canonicalizeRuntimeName(m[2]) === null) {
|
||||
offenders.push(`${relPath(file)}:${i + 1} mints RUNTIME=${m[2]}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
assert.deepStrictEqual(offenders, [],
|
||||
'shipped workflow text assigns a runtime id the name policy does not recognize. A '
|
||||
+ 'non-canonical id does not fail loudly — it resolves to Claude Code defaults, so the '
|
||||
+ `wrong config dir and instruction file are used silently. Offenders:\n ${offenders.join('\n ')}`);
|
||||
});
|
||||
|
||||
test('the runtime tier table names only runtimes the model catalog defines', () => {
|
||||
const known = new Set(Object.keys(catalog.runtimeTierDefaults));
|
||||
const offenders = [];
|
||||
|
||||
// Rows of the runtime -> model-tier table: | `<id>` | `<opus>` | `<sonnet>` | `<haiku>` |
|
||||
const ROW = /^\|\s*`([a-z][a-z0-9-]*)`\s*\|/;
|
||||
linesOf(SETTINGS_ADVANCED).forEach((line, i) => {
|
||||
const m = ROW.exec(line);
|
||||
if (m && !known.has(m[1])) {
|
||||
offenders.push(`${relPath(SETTINGS_ADVANCED)}:${i + 1} tables runtime \`${m[1]}\``);
|
||||
}
|
||||
});
|
||||
|
||||
assert.deepStrictEqual(offenders, [],
|
||||
'the runtime->model-tier table documents built-in defaults for a runtime the model catalog '
|
||||
+ 'has no entry for, so `config-set runtime <id>` would be ignored. The retired `gemini` '
|
||||
+ 'row carried the three model IDs of the `google` PROVIDER preset — a provider axis '
|
||||
+ `rendered as a runtime axis. Offenders:\n ${offenders.join('\n ')}`);
|
||||
});
|
||||
|
||||
test('the runtime selection menu offers only canonical runtimes', () => {
|
||||
const offenders = [];
|
||||
|
||||
// Scoped to RUNTIME menus by tracking the nearest preceding `question:`. The same file also
|
||||
// carries a provider menu (anthropic / openai) and a budget menu (high / medium / low) whose
|
||||
// labels are single lowercase tokens too; neither names a runtime, so validating those
|
||||
// against the runtime policy would be a false positive, not extra rigor.
|
||||
const QUESTION = /^\s*question:\s*"(.*)"\s*,?\s*$/;
|
||||
const OPTION = /\{\s*label:\s*"([a-z][a-z0-9-]*)"\s*,\s*description:/;
|
||||
let inRuntimeMenu = false;
|
||||
|
||||
linesOf(SETTINGS_ADVANCED).forEach((line, i) => {
|
||||
const q = QUESTION.exec(line);
|
||||
if (q) {
|
||||
inRuntimeMenu = /runtime/i.test(q[1]);
|
||||
return;
|
||||
}
|
||||
if (!inRuntimeMenu) return;
|
||||
const m = OPTION.exec(line);
|
||||
if (m && canonicalizeRuntimeName(m[1]) === null) {
|
||||
offenders.push(`${relPath(SETTINGS_ADVANCED)}:${i + 1} offers \`${m[1]}\``);
|
||||
}
|
||||
});
|
||||
|
||||
assert.deepStrictEqual(offenders, [],
|
||||
'a runtime selection menu offers a runtime GSD does not support — selecting it writes a '
|
||||
+ `config value that silently resolves to Claude Code. Offenders:\n ${offenders.join('\n ')}`);
|
||||
});
|
||||
|
||||
test('documented config examples name only canonical runtimes', () => {
|
||||
const offenders = [];
|
||||
const SET_RUNTIME = /config-set\s+runtime\s+([a-z][a-z0-9-]*)/g;
|
||||
const OVERRIDE = /model_profile_overrides\.([a-z][a-z0-9-]*)\./g;
|
||||
|
||||
for (const file of shippedMarkdown()) {
|
||||
linesOf(file).forEach((line, i) => {
|
||||
for (const m of line.matchAll(SET_RUNTIME)) {
|
||||
if (canonicalizeRuntimeName(m[1]) === null) {
|
||||
offenders.push(`${relPath(file)}:${i + 1} \`config-set runtime ${m[1]}\``);
|
||||
}
|
||||
}
|
||||
for (const m of line.matchAll(OVERRIDE)) {
|
||||
if (canonicalizeRuntimeName(m[1]) === null) {
|
||||
offenders.push(`${relPath(file)}:${i + 1} \`model_profile_overrides.${m[1]}\``);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
assert.deepStrictEqual(offenders, [],
|
||||
'a documented example sets a runtime id the name policy does not recognize; a user who '
|
||||
+ `copies it lands on Claude Code defaults. Offenders:\n ${offenders.join('\n ')}`);
|
||||
});
|
||||
|
||||
test("Antigravity's Gemini-family descriptor contract is preserved", () => {
|
||||
// Negative space for every test above: Antigravity's real on-disk contract IS Google's
|
||||
// Gemini surface, so an over-broad gemini -> antigravity replacement must fail HERE rather
|
||||
// than ship. Asserted against the DESCRIPTOR, never a resolved path — getGlobalConfigDir()
|
||||
// reads $ANTIGRAVITY_CONFIG_DIR and the real $HOME, which is the #4312 defect class.
|
||||
const agy = JSON.parse(
|
||||
fs.readFileSync(path.join(ROOT, 'capabilities', 'antigravity', 'capability.json'), 'utf8'),
|
||||
);
|
||||
assert.strictEqual(agy.runtime.configHome.parent, '.gemini',
|
||||
"Antigravity's config home is nested under ~/.gemini");
|
||||
assert.strictEqual(agy.runtime.configHome.name, 'antigravity');
|
||||
assert.strictEqual(agy.runtime.hookEvents, 'gemini',
|
||||
'Antigravity speaks the Gemini hook-event dialect');
|
||||
assert.strictEqual(agy.runtime.hostBehaviors.projectInstructionFile, 'GEMINI.md');
|
||||
for (const kind of agy.runtime.artifactLayout.global) {
|
||||
assert.strictEqual(kind.home, '.gemini/config',
|
||||
'global skills/agents install to ~/.gemini/config, the dir agy scans (#3738)');
|
||||
}
|
||||
|
||||
assert.ok(Object.prototype.hasOwnProperty.call(catalog.runtimeTierDefaults, 'antigravity'),
|
||||
'antigravity must remain a model-catalog runtime');
|
||||
|
||||
// The three model IDs the stale `gemini` table row carried belong to the google PROVIDER
|
||||
// preset and must survive — they name real Google models, not a GSD runtime.
|
||||
const google = JSON.stringify(catalog.providerPresets.google);
|
||||
for (const model of ['gemini-3.1-pro-preview', 'gemini-3-flash', 'gemini-2.5-flash-lite']) {
|
||||
assert.ok(google.includes(model), `google provider preset must still offer ${model}`);
|
||||
}
|
||||
});
|
||||
|
||||
test('PR template runtime checklists name only supported runtimes', () => {
|
||||
// #1928's follow-up dropped Gemini CLI from .github/ISSUE_TEMPLATE/*.yml but missed the PR
|
||||
// templates, which kept offering it under "Runtimes tested" -- a contributor-facing surface
|
||||
// still advertising a retired runtime two releases later. Labels here are DISPLAY names
|
||||
// ("Claude Code", not "claude"), so they are checked against the label table, not the id set.
|
||||
const labels = new Set(
|
||||
Object.keys(registry.runtimes).map((id) => getRuntimeLabel(id)),
|
||||
);
|
||||
// Non-runtime checklist entries that legitimately appear in the same list.
|
||||
const NON_RUNTIME = /^(Other:|N\/A\b)/;
|
||||
const offenders = [];
|
||||
|
||||
const templateDir = path.join(ROOT, '.github', 'PULL_REQUEST_TEMPLATE');
|
||||
for (const name of fs.readdirSync(templateDir).filter((f) => f.endsWith('.md'))) {
|
||||
const file = path.join(templateDir, name);
|
||||
const fileLines = fs.readFileSync(file, 'utf8').split(/\r?\n/);
|
||||
let inRuntimeSection = false;
|
||||
fileLines.forEach((line, i) => {
|
||||
if (/^#+\s*Runtimes tested/i.test(line)) {
|
||||
inRuntimeSection = true;
|
||||
return;
|
||||
}
|
||||
// The section ends at the next heading or horizontal rule.
|
||||
if (inRuntimeSection && /^(#+\s|---\s*$)/.test(line)) {
|
||||
inRuntimeSection = false;
|
||||
return;
|
||||
}
|
||||
if (!inRuntimeSection) return;
|
||||
const m = /^\s*-\s*\[\s*\]\s*(.+?)\s*$/.exec(line);
|
||||
if (!m) return;
|
||||
const label = m[1];
|
||||
if (NON_RUNTIME.test(label)) return;
|
||||
if (!labels.has(label)) {
|
||||
offenders.push(`.github/PULL_REQUEST_TEMPLATE/${name}:${i + 1} offers "${label}"`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
assert.deepStrictEqual(offenders, [],
|
||||
'a PR template asks contributors which runtime they tested and lists one GSD does not '
|
||||
+ 'support. Labels must match the runtime label table (src/runtime-name-policy.cts '
|
||||
+ `RUNTIME_LABELS), so a retired runtime cannot linger here. Offenders:\n ${offenders.join('\n ')}`);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
* #3025 — sync-skills must refuse cross-runtime sync.
|
||||
*
|
||||
* Skill content/layout is runtime-specific (the installer applies per-runtime
|
||||
* converters, adapter headers, brand swaps, layout rules), and `grok`/`gemini`
|
||||
* resolve to ANOTHER runtime's skills root. A verbatim `cp -r` from one runtime
|
||||
* converters, adapter headers, brand swaps, layout rules), and `grok`
|
||||
* resolves to ANOTHER runtime's skills root. A verbatim `cp -r` from one runtime
|
||||
* corrupts every other destination and can damage a runtime the user never named.
|
||||
*
|
||||
* Chosen fix (user decision, 2026-08-13): option (b) — refuse unsafe (cross-
|
||||
@@ -50,11 +50,15 @@ describe('#3025: sync-skills refuses cross-runtime skill sync', () => {
|
||||
test('the refusal points the user at the installer (actionable, not a bare rejection)', () => {
|
||||
// Hyrum's Law: the narrowed vocabulary is a visible contract change; the error must
|
||||
// hand the user a command that produces correctly converted skills. The pointer is
|
||||
// generic (`--<runtime>`, not `--$DEST`) because grok/gemini have no dedicated flag.
|
||||
// generic (`--<runtime>`, not `--$DEST`) because grok has no dedicated flag. `gemini`
|
||||
// was dropped from this sentence by #4709: that runtime was retired in 1.8.0 (#1928)
|
||||
// and never aliased claude -- canonicalizeRuntimeName returns null for it and the
|
||||
// caller's fail-closed default merely happens to be claude, so calling it an alias
|
||||
// mischaracterised a deliberate unknown-id fallback as designed behavior.
|
||||
assert.match(text, /cross-runtime skill sync is not supported/, 'names the unsupported operation');
|
||||
assert.match(text, /npx -y @opengsd\/gsd-core@latest --global --<runtime>/, 'prints the installer command');
|
||||
assert.match(text, /\$DEST/, 'names the refused destination runtime');
|
||||
assert.match(text, /grok and gemini have no dedicated installer flag/, 'accurately notes grok/gemini aliasing rather than printing a wrong --grok/--gemini flag');
|
||||
assert.match(text, /grok has no dedicated installer flag/, 'accurately notes grok aliasing rather than printing a wrong --grok flag');
|
||||
});
|
||||
|
||||
test('the guard runs BEFORE Step 5\'s verbatim cp -r copy (cross-runtime can never reach the copy)', () => {
|
||||
|
||||
Reference in New Issue
Block a user