Skip to content

Conversation

@xierenyuan
Copy link

@xierenyuan xierenyuan commented Dec 4, 2025

add Neovate Code support to OpenSpec

Summary by CodeRabbit

  • New Features

    • Added "Neovate Code" as a selectable AI tool option in the UI.
    • Introduced three OpenSpec slash commands for Neovate Code: proposal, apply, and archive.
  • Documentation

    • Updated docs to list Neovate Code configuration and supported slash commands.
  • Tests

    • Added tests covering initialization and update behaviors for Neovate slash command templates.

✏️ Tip: You can customize this high-level summary in your review settings.

@xierenyuan xierenyuan requested a review from TabishB as a code owner December 4, 2025 13:57
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

Walkthrough

Adds Neovate Code as a new AI tool: updates README, appends a new AI_TOOLS entry, introduces a NeovateSlashCommandConfigurator for three OpenSpec slash commands, and registers the configurator in the slash registry. Tests for init and update were added.

Changes

Cohort / File(s) Summary
Documentation
README.md
Added "Neovate Code" row to Supported Native Slash Commands table pointing to OpenSpec commands and local path (../neovate/commands/openspec/) with docs link.
Configuration
src/core/config.ts
Inserted new AIToolOption { name: 'Neovate Code', value: 'neovate', available: true, successLabel: 'Neovate Code' } into exported AI_TOOLS.
New Configurator
src/core/configurators/slash/neovate.ts
Added NeovateSlashCommandConfigurator (extends SlashCommandConfigurator) with toolId='neovate', isAvailable=true, getRelativePath and getFrontmatter implementations, plus internal FILE_PATHS and FRONTMATTER mappings for proposal, apply, archive.
Registry Integration
src/core/configurators/slash/registry.ts
Imported, instantiated, and registered NeovateSlashCommandConfigurator in the configurators map.
Tests
test/core/init.test.ts, test/core/update.test.ts
Added tests verifying creation and update/refresh behavior for .neovate/commands/openspec/{proposal.md,apply.md,archive.md} and extend-mode/configuration behavior during init/update flows.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review src/core/configurators/slash/neovate.ts for correct path generation, YAML frontmatter, and consistency with existing configurator patterns.
  • Confirm AI_TOOLS insertion in src/core/config.ts maintains ordering/format and no id conflicts.
  • Validate registry registration and new tests in test/core/* align with existing test conventions.

Possibly related PRs

Suggested reviewers

  • TabishB
  • Israel-Laguan

"I hopped a branch to drop a new command set,
proposal, apply, archive—neatly met.
Config and README, tests in view,
Neovate's small seeds now sprout anew. 🐇✨"

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 PR title accurately and specifically summarizes the main objective: adding Neovate Code support with slash command integration, which aligns with the changeset containing new Neovate configuration, commands, and tests.
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

📜 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 f030ff8 and 9cb9e1a.

📒 Files selected for processing (2)
  • test/core/init.test.ts (1 hunks)
  • test/core/update.test.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
test/core/init.test.ts (1)
src/utils/file-system.ts (1)
  • fileExists (76-86)
test/core/update.test.ts (1)
src/utils/file-system.ts (1)
  • FileSystemUtils (44-187)
🔇 Additional comments (4)
test/core/init.test.ts (2)

1403-1443: LGTM! Well-structured test for Neovate slash command creation.

The test comprehensively validates:

  • Creation of all three OpenSpec command files (proposal, apply, archive)
  • Proper file path structure under .neovate/commands/openspec/
  • YAML front-matter with appropriate names and descriptions
  • OpenSpec markers and content (guardrails, task guidance, archive commands)

The simpler naming convention (name: Proposal vs name: OpenSpec: Proposal) appears intentional and aligns with Neovate's command structure.


1445-1455: LGTM! Proper validation of extend-mode configuration state.

The test correctly verifies that Neovate is marked as already configured when running init a second time, following the established pattern for other tools' extend-mode tests.

test/core/update.test.ts (2)

1363-1400: LGTM! Comprehensive test for refreshing Neovate slash commands.

The test properly validates the update behavior:

  • Preserves existing front-matter structure (name: Proposal)
  • Updates content within OpenSpec markers (adds guardrails, validation commands)
  • Removes old content while maintaining file structure
  • Verifies console logs for update confirmation

Follows the established pattern for update tests across other tools.


1402-1435: LGTM! Important negative test case for update behavior.

The test correctly validates that the update command only refreshes existing files and does not create missing slash command files (proposal.md and archive.md). This ensures update stays within its intended scope of refreshing existing configurations rather than initializing new ones.


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 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 6d3cfe0 and 2f7d2b5.

📒 Files selected for processing (4)
  • README.md (1 hunks)
  • src/core/config.ts (1 hunks)
  • src/core/configurators/slash/neovate.ts (1 hunks)
  • src/core/configurators/slash/registry.ts (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/*.md : Scaffold proposal using `proposal.md`, `tasks.md`, optional `design.md`, and delta specs under `openspec/changes/<id>/`

Applied to files:

  • README.md
📚 Learning: 2025-11-25T01:08:02.839Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:02.839Z
Learning: Use `@/openspec/AGENTS.md` to learn how to create and apply change proposals, spec format and conventions, and project structure and guidelines

Applied to files:

  • README.md
🧬 Code graph analysis (1)
src/core/configurators/slash/registry.ts (1)
src/core/configurators/slash/neovate.ts (1)
  • NeovateSlashCommandConfigurator (49-78)
🔇 Additional comments (4)
src/core/config.ts (1)

40-40: LGTM!

The Neovate Code entry follows the established pattern and is correctly positioned in the AI_TOOLS array.

src/core/configurators/slash/registry.ts (1)

5-5: LGTM!

The NeovateSlashCommandConfigurator is correctly imported, instantiated, and registered following the same pattern as all other configurators.

Also applies to: 31-31, 53-53

src/core/configurators/slash/neovate.ts (2)

9-38: LGTM!

The FILE_PATHS and FRONTMATTER constants are well-organized and properly documented. The path structure (.neovate/commands/openspec/) is consistent and the YAML frontmatter follows the established pattern.


49-78: LGTM!

The NeovateSlashCommandConfigurator class correctly extends SlashCommandConfigurator and implements the required methods following the established pattern used by other configurators.

xierenyuan and others added 2 commits December 4, 2025 22:00
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

1 participant