Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Nov 11, 2025

Documents how Gemini CLI slash commands are generated and updated so specs cover the TOML markers. Deletes the stale .repo-updates-log snapshot. Adds a regression test proving UpdateCommand refreshes existing Gemini command files without creating new ones. Tests:
RUN v3.2.4 /Users/tabishbidiwale/fission/repos/openspec/.conductor/san-jose

stdout | test/core/update.test.ts > UpdateCommand > should refresh existing Gemini CLI TOML files without creating new ones
Updated OpenSpec instructions (openspec/AGENTS.md, AGENTS.md (created)) | Updated slash commands: .gemini/commands/openspec/proposal.toml

✓ test/core/update.test.ts (48 tests | 47 skipped) 7ms

Test Files 1 passed (1)
Tests 1 passed | 47 skipped (48)
Start at 21:33:59
Duration 280ms (transform 81ms, setup 0ms, collect 96ms, tests 7ms, environment 0ms, prepare 33ms).

Summary by CodeRabbit

  • Documentation

    • Added Gemini CLI slash command configuration specifications
    • Documented non-interactive tool selection via --tools flag (all/specific tools/none options)
    • Added Gemini CLI slash command update specifications with file refresh behavior
  • Tests

    • Added test for Gemini CLI TOML file updates

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

This pull request documents and tests Gemini CLI support for TOML-based slash commands. Changes include updating specification files to describe Gemini command initialization and refresh scenarios, adding test coverage for preserving TOML framing during updates, and removing a dated update log entry.

Changes

Cohort / File(s) Summary
Repository maintenance
\.repo-updates-log
Removed dated update log entry (2025-10-29) for Gemini CLI Support PR #256.
CLI initialization specification
openspec/specs/cli-init/spec\.md
Added Gemini slash command configuration scenario detailing .gemini/commands/openspec/{proposal,apply,archive}.toml creation with stage-specific descriptions and OpenSpec markers. Extended non-interactive mode with --tools all, --tools specific-ids, --tools none, and invalid tool handling scenarios with validation.
CLI update specification
openspec/specs/cli-update/spec\.md
Added Gemini CLI scenario for refreshing existing TOML files by updating content between <!-- OPENSPEC:START --> and <!-- OPENSPEC:END --> markers within prompt blocks while preserving TOML framing. Clarified that missing files are not created during updates.
Update command tests
test/core/update\.test\.ts
Added test case validating that existing Gemini CLI TOML files are refreshed with updated descriptions and markers, while preserving TOML structure and not creating missing apply/archive companion files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Specification files are primarily declarative scenarios with no complex logic
  • Test case follows standard patterns for validating file preservation behavior
  • Changes are consistent and homogeneous (specification additions + aligned test coverage)
  • Key focus areas: verify Gemini marker preservation logic in spec is accurately tested and that non-interactive mode scenarios cover all tool selection variations

Possibly related PRs

Poem

🐰 A rabbit hops through spec files bright,
Where Gemini commands take flight,
Markers preserved 'tween start and end,
TOML frames that never bend,
Tests ensure the magic's right! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Document Gemini CLI slash command coverage' accurately reflects the main objective: documenting how Gemini CLI slash commands are generated and updated in the specs, which is the primary purpose of the changes across spec.md files and the test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gemini-cli-update-docs

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9b6a763 and 4afafcb.

📒 Files selected for processing (4)
  • .repo-updates-log (0 hunks)
  • openspec/specs/cli-init/spec.md (1 hunks)
  • openspec/specs/cli-update/spec.md (1 hunks)
  • test/core/update.test.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • .repo-updates-log
🧰 Additional context used
📓 Path-based instructions (2)
openspec/{specs/**/spec.md,changes/*/specs/**/spec.md}

📄 CodeRabbit inference engine (openspec/AGENTS.md)

openspec/{specs/**/spec.md,changes/*/specs/**/spec.md}: Write requirements using SHALL/MUST for normative wording
Every requirement must include at least one scenario, formatted exactly with a '#### Scenario: ' header (no bullets or bold)
Under ADDED, introduce new capabilities as standalone requirements rather than altering existing ones

Files:

  • openspec/specs/cli-update/spec.md
  • openspec/specs/cli-init/spec.md
openspec/specs/**/spec.md

📄 CodeRabbit inference engine (openspec/AGENTS.md)

Keep current, deployed specs in openspec/specs//spec.md (one focused capability per directory)

Files:

  • openspec/specs/cli-update/spec.md
  • openspec/specs/cli-init/spec.md
🧠 Learnings (7)
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/changes/*/{proposal.md,tasks.md,design.md,specs/**/spec.md} : Scaffold each change with proposal.md, tasks.md, optional design.md, and delta spec files under openspec/changes/<change-id>/specs/<capability>/spec.md

Applied to files:

  • openspec/specs/cli-update/spec.md
  • openspec/specs/cli-init/spec.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/changes/*/specs/**/spec.md : Use ADDED, MODIFIED, REMOVED, or RENAMED sections when authoring deltas; place changed requirements under the correct operation header

Applied to files:

  • openspec/specs/cli-update/spec.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/{specs/**/spec.md,changes/*/specs/**/spec.md} : Under ADDED, introduce new capabilities as standalone requirements rather than altering existing ones

Applied to files:

  • openspec/specs/cli-update/spec.md
  • openspec/specs/cli-init/spec.md
📚 Learning: 2025-10-21T03:05:07.856Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.856Z
Learning: Use @/openspec/AGENTS.md to learn how to create and apply change proposals

Applied to files:

  • openspec/specs/cli-update/spec.md
📚 Learning: 2025-10-21T03:05:07.856Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.856Z
Learning: Always open @/openspec/AGENTS.md when the request introduces new capabilities, breaking changes, architecture shifts, or major performance/security work

Applied to files:

  • openspec/specs/cli-update/spec.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Prefer modifying existing specs over creating duplicates; if multiple capabilities are affected, create one delta spec.md per capability

Applied to files:

  • openspec/specs/cli-update/spec.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/{specs/**/spec.md,changes/*/specs/**/spec.md} : Every requirement must include at least one scenario, formatted exactly with a '#### Scenario: <name>' header (no bullets or bold)

Applied to files:

  • openspec/specs/cli-update/spec.md
🧬 Code graph analysis (3)
test/core/update.test.ts (1)
src/utils/file-system.ts (1)
  • FileSystemUtils (44-187)
openspec/specs/cli-update/spec.md (1)
src/core/configurators/slash/gemini.ts (2)
  • updateBody (68-82)
  • generateAll (32-50)
openspec/specs/cli-init/spec.md (2)
src/core/configurators/slash/gemini.ts (3)
  • generateTOML (52-65)
  • GeminiSlashCommandConfigurator (18-83)
  • generateAll (32-50)
test/core/init.test.ts (3)
  • queueSelections (346-373)
  • it (1317-1407)
  • it (785-1315)
🔇 Additional comments (3)
test/core/update.test.ts (1)

591-637: LGTM! Well-structured test for Gemini CLI TOML refresh.

The test comprehensively validates the update behavior for Gemini CLI:

  • Creates a TOML file with markers inside the prompt block
  • Verifies content between markers is refreshed while preserving TOML framing (description)
  • Confirms missing TOML files are not created during update
  • Validates appropriate console logging

The test follows established patterns in the file and aligns with the specification requirements.

openspec/specs/cli-update/spec.md (1)

120-125: LGTM! Clear and well-specified Gemini CLI update scenario.

The scenario correctly documents the Gemini CLI update behavior with proper normative structure and clear requirements for marker placement, TOML framing preservation, and file creation constraints. The specification aligns with the test implementation and follows coding guidelines.

openspec/specs/cli-init/spec.md (1)

234-240: LGTM! Well-documented Gemini CLI initialization scenario.

The scenario clearly specifies the TOML file structure, marker placement within the prompt block, and consistency requirements with other tools' templates. It follows the required scenario format and uses appropriate normative language at the requirement level.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@TabishB TabishB merged commit 5439ab0 into main Nov 11, 2025
7 checks passed
fenghaitao pushed a commit to fenghaitao/OpenSpec that referenced this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants