Skip to content

Instantly share code, notes, and snippets.

View iregina's full-sized avatar
🏊‍♀️

Regina Wong iregina

🏊‍♀️
View GitHub Profile
# analyze_code/prompt.md
Analyze <%= file %> for code quality issues:
Focus on: readability, maintainability, and potential bugs.
steps:
- run_tests: $(bundle exec rspec {{file}})
- lint_code: $(rubocop {{file}})
# analyze_code/prompt.md
Analyze <%= file %> for code quality issues:
Focus on: readability, maintainability, and potential bugs.
@iregina
iregina / shell_commands
Last active June 10, 2025 14:41
shell_commands
steps:
- run_tests: $(bundle exec rspec {{file}})
- lint_code: $(rubocop {{file}})
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
# 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]
steps:
- # These run in parallel
- check_syntax
- verify_dependencies
- analyze_security
- generate_combined_report # Runs after all parallel steps complete
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.
steps:
- analyze_file # Finds issues
- prioritize_issues # References found issues
- implement_fixes # Acts on prioritized list
- verify_changes # Validates the fixes
- each: "{{Dir.glob('**/*.test.js')}}"
as: test_file
steps:
- analyze_test_coverage
- improve_test_quality