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
# analyze_code/prompt.md | |
Analyze <%= file %> for code quality issues: | |
Focus on: readability, maintainability, and potential bugs. |
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
steps: | |
- run_tests: $(bundle exec rspec {{file}}) | |
- lint_code: $(rubocop {{file}}) |
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
# analyze_code/prompt.md | |
Analyze <%= file %> for code quality issues: | |
Focus on: readability, maintainability, and potential bugs. |
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
steps: | |
- run_tests: $(bundle exec rspec {{file}}) | |
- lint_code: $(rubocop {{file}}) |
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
steps: | |
- Read the file and identify all public methods | |
- ^Generate unit tests for each public method found | |
- Verify that the generated tests follow best practices |
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
# calculate_metrics.rb | |
class CalculateMetrics < Roast::Workflow::BaseStep | |
def call | |
metrics = analyze_test_file(workflow.file) | |
# Return data that becomes available to subsequent steps | |
{ | |
line_count: metrics[:lines], | |
complexity: metrics[:complexity], | |
test_coverage: metrics[:coverage] |
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
steps: | |
- # These run in parallel | |
- check_syntax | |
- verify_dependencies | |
- analyze_security | |
- generate_combined_report # Runs after all parallel steps complete |
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
steps: | |
- run_tests: $(rake test_with_coverage {{file}}) | |
- analyze_coverage | |
- Use your code_agent tool function to raise the branch coverage level of the following test above 90%. After each modification, run `rake test_with_coverage {{file}}` to check your work. Give me a summary of what you accomplished once finished. |
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
steps: | |
- analyze_file # Finds issues | |
- prioritize_issues # References found issues | |
- implement_fixes # Acts on prioritized list | |
- verify_changes # Validates the fixes |
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
- each: "{{Dir.glob('**/*.test.js')}}" | |
as: test_file | |
steps: | |
- analyze_test_coverage | |
- improve_test_quality |