Skip to content

feat: add shell completion for analyze command types#321

Merged
wesm merged 1 commit intoroborev-dev:mainfrom
mariusvniekerk:tab-complete-analyze
Feb 24, 2026
Merged

feat: add shell completion for analyze command types#321
wesm merged 1 commit intoroborev-dev:mainfrom
mariusvniekerk:tab-complete-analyze

Conversation

@mariusvniekerk
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a ValidArgsFunction to the analyze cobra command so that tab-completing the first positional argument suggests the 7 available analyzer types (test-fixtures, duplication, refactor, complexity, api-design, dead-code, architecture) with their descriptions
  • After the analyzer type is selected, completion falls back to default file path completion

Test plan

  • Run roborev analyze <TAB> and verify all 7 analyzer types appear with descriptions
  • Run roborev analyze refactor <TAB> and verify file path completion works
  • Verify go build ./... passes

🤖 Generated with Claude Code

Tab-completing `roborev analyze` now suggests the available analyzer
types (test-fixtures, duplication, refactor, etc.) with descriptions.
After the type is selected, completion falls back to file paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented Feb 23, 2026

roborev: Combined Review (f60e2e8)

Verdict: No Medium, High, or Critical issues found in this PR.

All reviewed findings were either clean or below the reporting threshold for this summary.


Synthesized from 4 reviews (agents: codex, gemini | types: default, security)

@mariusvniekerk
Copy link
Copy Markdown
Collaborator Author

Asked the agent to look for some other opportunities for this.

Flag completions (repeated across many commands):

  • --agent — completable from agent.Available() (codex, claude-code, gemini, copilot, opencode, cursor, droid, test)
  • --reasoning — just 3 values: fast, standard, thorough
  • These flags appear on analyze, fix, run, refine, and review

Positional arg completions:

  • fix [job_id...] — could complete with unaddressed job IDs from the daemon (there's already a queryUnaddressedJobIDs() helper)
  • repo show/rename/delete/merge — could complete with repo names from the database
  • review — could complete git refs/branches

Highest impact, lowest effort would be RegisterFlagCompletionFunc for --agent and --reasoning since they're used on nearly every command and the values are static/easily enumerable.

@wesm wesm merged commit 01c5dba into roborev-dev:main Feb 24, 2026
8 checks passed
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