Skip to content

Instantly share code, notes, and snippets.

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

Regina Wong iregina

🏊‍♀️
View GitHub Profile
bin/roast execute examples/grading/workflow.yml
test/roast/workflow/workflow_initializer_test.rb
# .roast/initializers/raix.rb
require "raix"
require "faraday"
require "faraday/retry"
Raix.configure do |config|
# Configure the OpenAI client with custom settings
config.openai_client = OpenAI::Client.new(
access_token: ENV.fetch("OPENAI_API_KEY"),
uri_base: ENV.fetch("OPENAI_API_BASE", "https://api.openai.com/v1"),
# Install the gem
gem install roast-ai
# Set up your OpenAI API key
export OPENAI_API_KEY="your-key-here"
# Will prompt you to create a new workflow or choose an example
roast init
========== TEST GRADE REPORT ==========
Test file: test/roast/workflow/workflow_initializer_test.rb
FINAL GRADE:
Score: 83/100
Letter Grade: B
RUBRIC SCORES:
Line Coverage (10% of grade):
Value: 8.0
# list sessions
roast sessions
# Resume last session from the step where you left off
roast execute workflow.yml -r analyze_complexity
# Resume a specific session and specific step
roast execute workflow.yml -r 20250507_123456_789:generate_report
name: Test Grading
model: gpt-4.1-mini
tools:
- Roast::Tools::Grep
- Roast::Tools::ReadFile
- Roast::Tools::SearchFile
# Uncomment this to run the workflow on modified tests automatically
# each: '% cd $(git rev-parse --show-toplevel) && git status --porcelain | grep "_test\.rb" | cut -c4- | xargs realpath'
- detect_framework
- case: "{{output['framework']}}"
when:
rails: run_rspec_tests
django: run_pytest
express: run_jest
else: run_generic_tests
- if: "{{coverage_percentage < 80}}"
then:
- add_missing_tests
- verify_coverage_improvement
else:
- generate_coverage_badge
- each: "{{Dir.glob('**/*.test.js')}}"
as: test_file
steps:
- analyze_test_coverage
- improve_test_quality
steps:
- analyze_file # Finds issues
- prioritize_issues # References found issues
- implement_fixes # Acts on prioritized list
- verify_changes # Validates the fixes