feat(rovodev): add commands adapter for Rovo Dev CLI saved prompts#2103
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up for Rovo Dev upstream updates (#1986). This issue has three parts; only the well-specified commands part is implemented here.
compatibilityround-trip: already fixed and merged via fix(rovodev): preserve skill compatibility frontmatter on round-trip #1996 — not touched.eventHooksin~/.rovodev/config.yml): still explicitly blocked — the schema is an undocumented preview feature only surfaced via the interactive/hookscommand. Not implemented, remains deferred/open per the maintainer's prior comments.Implementation
Rovo Dev's saved prompts are a
prompts.ymlmanifest (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).RovodevPromptsManifestrebuilds the sibling.rovodev/prompts.ymlmanifest via a newgetAuxiliaryFiles({ toolCommands, outputRoot, global })extension point — thepromptsarray is fully replaced each generation (mirroring howRovodevMcpfully replacesmcpServers), while any other top-level manifest key is preserved and the file is never deleted.ToolCommand.getAuxiliaryFiles(default no-op, mirroring the existingToolHooks.getAuxiliaryFilespattern) plus the matching hook inCommandsProcessor.convertRulesyncFilesToToolFiles. No other commands adapter is affected (verified: default no-op, called only for rovodev).tool-target-tuples.ts+commandsProcessorToolTargetTuple/toolCommandFactories, both scopes..rovodev/prompts.yml(produced via getAuxiliaryFiles, not getSettablePaths);.rovodev/prompts/auto-derived.Tests
23 unit tests (construction, round-trip,
getAuxiliaryFilesincl. 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 cicheckfully green: 302 test files, 6728 tests; sync-skill-docs, gitignore, supported-tools, cspell, secretlint all pass.References
Closes #1986