Skip to content

feat(rovodev): add commands adapter for Rovo Dev CLI saved prompts#2103

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-issue-1986-rovodev-commands
Jul 1, 2026
Merged

feat(rovodev): add commands adapter for Rovo Dev CLI saved prompts#2103
dyoshikawa merged 2 commits into
mainfrom
resolve-issue-1986-rovodev-commands

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Follow-up for Rovo Dev upstream updates (#1986). This issue has three parts; only the well-specified commands part is implemented here.

  • Skills compatibility round-trip: already fixed and merged via fix(rovodev): preserve skill compatibility frontmatter on round-trip #1996 — not touched.
  • Event hooks (eventHooks in ~/.rovodev/config.yml): still explicitly blocked — the schema is an undocumented preview feature only surfaced via the interactive /hooks command. Not implemented, remains deferred/open per the maintainer's prior comments.
  • Commands — saved prompts: implemented (this PR).

Implementation

Rovo Dev's saved prompts are a prompts.yml manifest (a list of { name, description, content_file }) plus per-prompt Markdown content files, confirmed via https://support.atlassian.com/rovo/docs/save-and-reuse-a-prompt-in-rovo-dev-cli/.

  • RovodevCommand (src/features/commands/rovodev-command.ts) writes pure-Markdown content (no frontmatter) to .rovodev/prompts/<name>.md (project) / ~/.rovodev/prompts/<name>.md (global).
  • A companion RovodevPromptsManifest rebuilds the sibling .rovodev/prompts.yml manifest via a new getAuxiliaryFiles({ toolCommands, outputRoot, global }) extension point — the prompts array is fully replaced each generation (mirroring how RovodevMcp fully replaces mcpServers), while any other top-level manifest key is preserved and the file is never deleted.
  • Since the commands feature was previously strictly one-file-per-command, added a small backward-compatible extension point: ToolCommand.getAuxiliaryFiles (default no-op, mirroring the existing ToolHooks.getAuxiliaryFiles pattern) plus the matching hook in CommandsProcessor.convertRulesyncFilesToToolFiles. No other commands adapter is affected (verified: default no-op, called only for rovodev).
  • Registered in tool-target-tuples.ts + commandsProcessorToolTargetTuple/toolCommandFactories, both scopes.
  • Hand-maintained gitignore entry for .rovodev/prompts.yml (produced via getAuxiliaryFiles, not getSettablePaths); .rovodev/prompts/ auto-derived.

Tests

23 unit tests (construction, round-trip, getAuxiliaryFiles incl. sort order/foreign-key preservation/corrupt-YAML recovery) + Tool × Feature happy-path e2e (project, global, orphan-deletion, import) + a dedicated manifest-content e2e test.

Verification

pnpm cicheck fully green: 302 test files, 6728 tests; sync-skill-docs, gitignore, supported-tools, cspell, secretlint all pass.

References

Closes #1986

cm-dyoshikawa and others added 2 commits June 30, 2026 21:31
Rovo Dev CLI's saved prompts are a file-based custom-command surface: a prompts.yml manifest (name/description/content_file entries) plus per-prompt Markdown content files, discovered in repo-root .rovodev/, cwd .rovodev/, and global ~/.rovodev/. Add a RovodevCommand adapter that writes the content file to .rovodev/prompts/<name>.md (project) / ~/.rovodev/prompts/<name>.md (global) and rebuilds the sibling prompts.yml manifest via a new generic ToolCommand.getAuxiliaryFiles hook (mirrors the hooks feature's aggregate-file pattern), since commands are otherwise one-file-per-command. The eventHooks preview feature (part 2 of the tracking issue) remains explicitly out of scope pending a confirmed schema.

Refs #1986

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…prompts.yml parsing

Address PR review (mid): rovodev-command.ts used isRecord when parsing the existing prompts.yml before spreading it into a new object, deviating from the project's established convention (rovodev-mcp.ts already uses isPlainObject for this exact 'parse external config then spread' scenario, since isRecord accepts non-plain objects like a YAML !!binary Uint8Array that isRecord would wrongly accept as mergeable).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dyoshikawa
dyoshikawa merged commit db677ad into main Jul 1, 2026
8 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-1986-rovodev-commands branch July 1, 2026 04:59
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.

Follow up Rovo Dev upstream updates: event hooks (eventHooks in ~/.rovodev/config.yml)

2 participants