-
Notifications
You must be signed in to change notification settings - Fork 0
feat(agents): add Amazon Q support and improve test maintainability #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Used the 🗡️ (dagger) emoji for a context marker because it is relatively unique, still connected to the repo (slash in the name), and shouldn't conflict with other context markers.
… validation Remove EXPECTED_AGENTS dictionary that required manual updates when adding new agents. Replace with tests that validate structural invariants: - Command directories must end with /commands, /prompts, /global_workflows, or /command - File extensions must start with a dot - Detection dirs must be tuples of hidden directories - Command formats must be MARKDOWN or TOML This makes tests more maintainable and automatically validates new agents.
Add _get_cli_output() helper to consolidate repeated stderr/stdout extraction logic across test cases. This reduces code duplication and makes tests more consistent in how they handle CLI output.
Add Amazon Q agent configuration: - Command directory: ~/.aws/amazonq/prompts - Detection directory: .aws/amazonq (specific to avoid false positives) - Markdown format with .md extension Update documentation to include Amazon Q in the supported agents list. Update test_detection to dynamically test all supported agents instead of a hardcoded subset.
WalkthroughThis PR adds Amazon Q as a supported AI agent, updates documentation to include Amazon Q and OpenCode CLI, refactors test output handling for robustness, and improves test coverage by making agent detection dynamic rather than hardcoded. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used🧬 Code graph analysis (1)tests/test_config.py (2)
🔇 Additional comments (10)
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. Comment |
Why?
This PR adds support for Amazon Q as a new AI coding assistant and improves test maintainability by removing hardcoded agent expectations that required manual updates when adding new agents.
Evidence: The branch name
feat/support-amazon-q-in-vs-codeindicates the primary goal. Commitsd0c457dand30c70b9implement the feature and test refactoring respectively.What Changed?
Added Amazon Q agent configuration and refactored tests to use structural validation instead of hardcoded expectations, making it easier to add new agents in the future.
Key Changes:
~/.aws/amazonq/promptsand detection via.aws/amazonqEXPECTED_AGENTSdictionary with structural invariant tests that automatically validate new agents_get_cli_output()function to reduce code duplication in test assertionsFiles Modified:
slash_commands/config.py,tests/test_config.py,tests/test_cli.py,tests/test_detection.py,README.md,AGENTS.mdAdditional Notes
Review Checklist
Summary by CodeRabbit
New Features
Documentation
Tests
✏️ Tip: You can customize this high-level summary in your review settings.