roast-ai 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +2 -0
- data/examples/README.md +9 -0
- data/examples/available_tools_demo/workflow.yml +1 -1
- data/examples/basic_prompt_workflow/workflow.md +1 -0
- data/examples/basic_prompt_workflow/workflow.yml +14 -0
- data/lib/roast/version.rb +1 -1
- data/lib/roast/workflow/base_step.rb +2 -3
- data/lib/roast/workflow/step_loader.rb +2 -7
- data/lib/roast.rb +6 -1
- metadata +4 -239
- data/CHANGELOG.md +0 -369
- data/examples/agent_continue/add_documentation/prompt.md +0 -5
- data/examples/agent_continue/add_error_handling/prompt.md +0 -5
- data/examples/agent_continue/analyze_codebase/prompt.md +0 -7
- data/examples/agent_continue/combined_workflow.yml +0 -24
- data/examples/agent_continue/continue_adding_features/prompt.md +0 -4
- data/examples/agent_continue/create_integration_tests/prompt.md +0 -3
- data/examples/agent_continue/document_with_context/prompt.md +0 -5
- data/examples/agent_continue/explore_api/prompt.md +0 -6
- data/examples/agent_continue/implement_client/prompt.md +0 -6
- data/examples/agent_continue/inline_workflow.yml +0 -20
- data/examples/agent_continue/refactor_code/prompt.md +0 -2
- data/examples/agent_continue/verify_changes/prompt.md +0 -6
- data/examples/agent_continue/workflow.yml +0 -27
- data/examples/agent_workflow/README.md +0 -75
- data/examples/agent_workflow/apply_refactorings/prompt.md +0 -22
- data/examples/agent_workflow/identify_code_smells/prompt.md +0 -15
- data/examples/agent_workflow/summarize_improvements/prompt.md +0 -18
- data/examples/agent_workflow/workflow.png +0 -0
- data/examples/agent_workflow/workflow.yml +0 -16
- data/examples/api_workflow/README.md +0 -85
- data/examples/api_workflow/fetch_api_data/prompt.md +0 -10
- data/examples/api_workflow/generate_report/prompt.md +0 -10
- data/examples/api_workflow/prompt.md +0 -10
- data/examples/api_workflow/transform_data/prompt.md +0 -10
- data/examples/api_workflow/workflow.png +0 -0
- data/examples/api_workflow/workflow.yml +0 -30
- data/examples/apply_diff_demo/README.md +0 -58
- data/examples/apply_diff_demo/apply_simple_change/prompt.md +0 -13
- data/examples/apply_diff_demo/create_sample_file/prompt.md +0 -11
- data/examples/apply_diff_demo/workflow.yml +0 -24
- data/examples/available_tools_demo/workflow.png +0 -0
- data/examples/bash_prototyping/README.md +0 -53
- data/examples/bash_prototyping/analyze_network/prompt.md +0 -13
- data/examples/bash_prototyping/analyze_system/prompt.md +0 -11
- data/examples/bash_prototyping/api_testing.png +0 -0
- data/examples/bash_prototyping/api_testing.yml +0 -14
- data/examples/bash_prototyping/check_processes/prompt.md +0 -11
- data/examples/bash_prototyping/generate_report/prompt.md +0 -16
- data/examples/bash_prototyping/process_json_response/prompt.md +0 -24
- data/examples/bash_prototyping/system_analysis.png +0 -0
- data/examples/bash_prototyping/system_analysis.yml +0 -14
- data/examples/bash_prototyping/test_public_api/prompt.md +0 -22
- data/examples/case_when/README.md +0 -58
- data/examples/case_when/detect_language/prompt.md +0 -16
- data/examples/case_when/workflow.png +0 -0
- data/examples/case_when/workflow.yml +0 -58
- data/examples/cmd/README.md +0 -99
- data/examples/cmd/analyze_project/prompt.md +0 -57
- data/examples/cmd/basic_demo/prompt.md +0 -48
- data/examples/cmd/basic_workflow.png +0 -0
- data/examples/cmd/basic_workflow.yml +0 -16
- data/examples/cmd/check_repository/prompt.md +0 -57
- data/examples/cmd/create_and_verify/prompt.md +0 -56
- data/examples/cmd/dev_workflow.png +0 -0
- data/examples/cmd/dev_workflow.yml +0 -26
- data/examples/cmd/explore_project/prompt.md +0 -67
- data/examples/cmd/explorer_workflow.png +0 -0
- data/examples/cmd/explorer_workflow.yml +0 -21
- data/examples/cmd/smart_tool_selection/prompt.md +0 -99
- data/examples/coding_agent_with_model.yml +0 -20
- data/examples/coding_agent_with_retries.yml +0 -30
- data/examples/conditional/README.md +0 -161
- data/examples/conditional/check_condition/prompt.md +0 -1
- data/examples/conditional/simple_workflow.png +0 -0
- data/examples/conditional/simple_workflow.yml +0 -15
- data/examples/conditional/workflow.png +0 -0
- data/examples/conditional/workflow.yml +0 -23
- data/examples/context_management_demo/README.md +0 -43
- data/examples/context_management_demo/workflow.yml +0 -42
- data/examples/direct_coerce_syntax/README.md +0 -32
- data/examples/direct_coerce_syntax/workflow.png +0 -0
- data/examples/direct_coerce_syntax/workflow.yml +0 -36
- data/examples/dot_notation/README.md +0 -37
- data/examples/dot_notation/workflow.png +0 -0
- data/examples/dot_notation/workflow.yml +0 -44
- data/examples/exit_on_error/README.md +0 -50
- data/examples/exit_on_error/analyze_lint_output/prompt.md +0 -9
- data/examples/exit_on_error/apply_fixes/prompt.md +0 -2
- data/examples/exit_on_error/workflow.png +0 -0
- data/examples/exit_on_error/workflow.yml +0 -19
- data/examples/grading/README.md +0 -71
- data/examples/grading/analyze_coverage/prompt.md +0 -52
- data/examples/grading/calculate_final_grade.rb +0 -67
- data/examples/grading/format_result.rb +0 -64
- data/examples/grading/generate_grades/prompt.md +0 -105
- data/examples/grading/generate_recommendations/output.txt +0 -17
- data/examples/grading/generate_recommendations/prompt.md +0 -60
- data/examples/grading/js_test_runner +0 -31
- data/examples/grading/rb_test_runner +0 -19
- data/examples/grading/read_dependencies/prompt.md +0 -16
- data/examples/grading/run_coverage.rb +0 -54
- data/examples/grading/verify_mocks_and_stubs/prompt.md +0 -12
- data/examples/grading/verify_test_helpers/prompt.md +0 -53
- data/examples/grading/workflow.md +0 -8
- data/examples/grading/workflow.png +0 -0
- data/examples/grading/workflow.rb.md +0 -6
- data/examples/grading/workflow.ts+tsx.md +0 -6
- data/examples/grading/workflow.yml +0 -41
- data/examples/instrumentation.rb +0 -76
- data/examples/interpolation/README.md +0 -50
- data/examples/interpolation/analyze_file/prompt.md +0 -1
- data/examples/interpolation/analyze_patterns/prompt.md +0 -27
- data/examples/interpolation/generate_report_for_js/prompt.md +0 -3
- data/examples/interpolation/generate_report_for_rb/prompt.md +0 -3
- data/examples/interpolation/sample.js +0 -48
- data/examples/interpolation/sample.rb +0 -42
- data/examples/interpolation/workflow.md +0 -1
- data/examples/interpolation/workflow.png +0 -0
- data/examples/interpolation/workflow.yml +0 -21
- data/examples/iteration/IMPLEMENTATION.md +0 -88
- data/examples/iteration/README.md +0 -68
- data/examples/iteration/analyze_complexity/prompt.md +0 -22
- data/examples/iteration/generate_recommendations/prompt.md +0 -21
- data/examples/iteration/generate_report/prompt.md +0 -129
- data/examples/iteration/implement_fix/prompt.md +0 -25
- data/examples/iteration/prioritize_issues/prompt.md +0 -24
- data/examples/iteration/prompts/analyze_file.md +0 -28
- data/examples/iteration/prompts/generate_summary.md +0 -24
- data/examples/iteration/prompts/update_report.md +0 -29
- data/examples/iteration/prompts/write_report.md +0 -22
- data/examples/iteration/read_file/prompt.md +0 -9
- data/examples/iteration/select_next_issue/prompt.md +0 -25
- data/examples/iteration/simple_workflow.md +0 -39
- data/examples/iteration/simple_workflow.yml +0 -58
- data/examples/iteration/update_fix_count/prompt.md +0 -26
- data/examples/iteration/verify_fix/prompt.md +0 -29
- data/examples/iteration/workflow.png +0 -0
- data/examples/iteration/workflow.yml +0 -42
- data/examples/json_handling/README.md +0 -32
- data/examples/json_handling/workflow.png +0 -0
- data/examples/json_handling/workflow.yml +0 -52
- data/examples/mcp/README.md +0 -223
- data/examples/mcp/analyze_changes/prompt.md +0 -8
- data/examples/mcp/analyze_issues/prompt.md +0 -4
- data/examples/mcp/analyze_schema/prompt.md +0 -4
- data/examples/mcp/check_data_quality/prompt.md +0 -5
- data/examples/mcp/check_documentation/prompt.md +0 -4
- data/examples/mcp/create_recommendations/prompt.md +0 -5
- data/examples/mcp/database_workflow.png +0 -0
- data/examples/mcp/database_workflow.yml +0 -29
- data/examples/mcp/env_demo/workflow.png +0 -0
- data/examples/mcp/env_demo/workflow.yml +0 -34
- data/examples/mcp/fetch_pr_context/prompt.md +0 -4
- data/examples/mcp/filesystem_demo/create_test_file/prompt.md +0 -2
- data/examples/mcp/filesystem_demo/list_files/prompt.md +0 -6
- data/examples/mcp/filesystem_demo/read_with_mcp/prompt.md +0 -7
- data/examples/mcp/filesystem_demo/workflow.png +0 -0
- data/examples/mcp/filesystem_demo/workflow.yml +0 -38
- data/examples/mcp/generate_insights/prompt.md +0 -4
- data/examples/mcp/generate_report/prompt.md +0 -6
- data/examples/mcp/generate_review/prompt.md +0 -16
- data/examples/mcp/github_workflow.png +0 -0
- data/examples/mcp/github_workflow.yml +0 -32
- data/examples/mcp/multi_mcp_workflow.png +0 -0
- data/examples/mcp/multi_mcp_workflow.yml +0 -58
- data/examples/mcp/post_review/prompt.md +0 -3
- data/examples/mcp/save_report/prompt.md +0 -6
- data/examples/mcp/search_issues/prompt.md +0 -2
- data/examples/mcp/summarize/prompt.md +0 -1
- data/examples/mcp/test_filesystem/prompt.md +0 -6
- data/examples/mcp/test_github/prompt.md +0 -8
- data/examples/mcp/test_read/prompt.md +0 -1
- data/examples/mcp/workflow.png +0 -0
- data/examples/mcp/workflow.yml +0 -35
- data/examples/no_model_fallback/README.md +0 -17
- data/examples/no_model_fallback/analyze_file/prompt.md +0 -1
- data/examples/no_model_fallback/analyze_patterns/prompt.md +0 -27
- data/examples/no_model_fallback/generate_report_for_md/prompt.md +0 -10
- data/examples/no_model_fallback/generate_report_for_rb/prompt.md +0 -3
- data/examples/no_model_fallback/sample.rb +0 -42
- data/examples/no_model_fallback/workflow.yml +0 -19
- data/examples/openrouter_example/README.md +0 -48
- data/examples/openrouter_example/analyze_input/prompt.md +0 -16
- data/examples/openrouter_example/generate_response/prompt.md +0 -9
- data/examples/openrouter_example/workflow.png +0 -0
- data/examples/openrouter_example/workflow.yml +0 -12
- data/examples/pre_post_processing/README.md +0 -111
- data/examples/pre_post_processing/analyze_test_file/prompt.md +0 -23
- data/examples/pre_post_processing/improve_test_coverage/prompt.md +0 -17
- data/examples/pre_post_processing/optimize_test_performance/prompt.md +0 -25
- data/examples/pre_post_processing/post_processing/aggregate_metrics/prompt.md +0 -31
- data/examples/pre_post_processing/post_processing/cleanup_environment/prompt.md +0 -28
- data/examples/pre_post_processing/post_processing/generate_summary_report/prompt.md +0 -32
- data/examples/pre_post_processing/post_processing/output.txt +0 -24
- data/examples/pre_post_processing/pre_processing/gather_baseline_metrics/prompt.md +0 -26
- data/examples/pre_post_processing/pre_processing/setup_test_environment/prompt.md +0 -11
- data/examples/pre_post_processing/validate_changes/prompt.md +0 -24
- data/examples/pre_post_processing/workflow.png +0 -0
- data/examples/pre_post_processing/workflow.yml +0 -21
- data/examples/retry/workflow.yml +0 -23
- data/examples/rspec_to_minitest/README.md +0 -68
- data/examples/rspec_to_minitest/analyze_spec/prompt.md +0 -30
- data/examples/rspec_to_minitest/create_minitest/prompt.md +0 -33
- data/examples/rspec_to_minitest/run_and_improve/prompt.md +0 -35
- data/examples/rspec_to_minitest/workflow.md +0 -10
- data/examples/rspec_to_minitest/workflow.png +0 -0
- data/examples/rspec_to_minitest/workflow.yml +0 -40
- data/examples/shared_config/README.md +0 -52
- data/examples/shared_config/example_with_shared_config/workflow.png +0 -0
- data/examples/shared_config/example_with_shared_config/workflow.yml +0 -6
- data/examples/shared_config/shared.png +0 -0
- data/examples/shared_config/shared.yml +0 -7
- data/examples/single_target_prepost/README.md +0 -36
- data/examples/single_target_prepost/post_processing/output.txt +0 -27
- data/examples/single_target_prepost/pre_processing/gather_dependencies/prompt.md +0 -11
- data/examples/single_target_prepost/workflow.png +0 -0
- data/examples/single_target_prepost/workflow.yml +0 -20
- data/examples/smart_coercion_defaults/README.md +0 -65
- data/examples/smart_coercion_defaults/workflow.png +0 -0
- data/examples/smart_coercion_defaults/workflow.yml +0 -44
- data/examples/step_configuration/README.md +0 -84
- data/examples/step_configuration/workflow.png +0 -0
- data/examples/step_configuration/workflow.yml +0 -57
- data/examples/swarm_example.yml +0 -25
- data/examples/tool_config_example/README.md +0 -109
- data/examples/tool_config_example/example_step/prompt.md +0 -42
- data/examples/tool_config_example/workflow.png +0 -0
- data/examples/tool_config_example/workflow.yml +0 -17
- data/examples/user_input/README.md +0 -90
- data/examples/user_input/funny_name/create_backstory/prompt.md +0 -10
- data/examples/user_input/funny_name/workflow.png +0 -0
- data/examples/user_input/funny_name/workflow.yml +0 -25
- data/examples/user_input/generate_summary/prompt.md +0 -11
- data/examples/user_input/simple_input_demo/workflow.png +0 -0
- data/examples/user_input/simple_input_demo/workflow.yml +0 -35
- data/examples/user_input/survey_workflow.png +0 -0
- data/examples/user_input/survey_workflow.yml +0 -71
- data/examples/user_input/welcome_message/prompt.md +0 -3
- data/examples/user_input/workflow.png +0 -0
- data/examples/user_input/workflow.yml +0 -73
- data/examples/workflow_generator/README.md +0 -27
- data/examples/workflow_generator/analyze_user_request/prompt.md +0 -34
- data/examples/workflow_generator/create_workflow_files/prompt.md +0 -32
- data/examples/workflow_generator/get_user_input/prompt.md +0 -14
- data/examples/workflow_generator/info_from_roast.rb +0 -22
- data/examples/workflow_generator/workflow.png +0 -0
- data/examples/workflow_generator/workflow.yml +0 -34
@@ -1,7 +0,0 @@
|
|
1
|
-
If you found any .txt, .md, or .log files in /tmp from the previous step, pick one and read it using the
|
2
|
-
FileSystem MCP tool's read_file function.
|
3
|
-
|
4
|
-
The function expects these parameters:
|
5
|
-
- path: (the full path to the file you want to read)
|
6
|
-
|
7
|
-
If no suitable text files were found, just say "No text files found in /tmp to read".
|
Binary file
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# Filesystem MCP Example
|
2
|
-
# This uses the filesystem MCP server which provides safe file operations
|
3
|
-
|
4
|
-
name: Filesystem MCP Example
|
5
|
-
model: gpt-4o-mini
|
6
|
-
|
7
|
-
tools:
|
8
|
-
# Traditional Roast tools
|
9
|
-
- Roast::Tools::ReadFile
|
10
|
-
|
11
|
-
# Filesystem MCP server
|
12
|
-
- FileSystem:
|
13
|
-
command: npx
|
14
|
-
args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
|
15
|
-
only:
|
16
|
-
- read_file
|
17
|
-
- list_directory
|
18
|
-
- get_file_info
|
19
|
-
|
20
|
-
steps:
|
21
|
-
- create_test_file
|
22
|
-
- list_files
|
23
|
-
- read_with_mcp
|
24
|
-
|
25
|
-
create_test_file:
|
26
|
-
prompt: |
|
27
|
-
First, use the read_file Roast tool to read this workflow file itself (examples/mcp/filesystem_demo/workflow.yml).
|
28
|
-
This is just to verify traditional tools work.
|
29
|
-
|
30
|
-
list_files:
|
31
|
-
prompt: |
|
32
|
-
Use the FileSystem MCP tool's list_directory function to list the contents of the /tmp directory.
|
33
|
-
The function expects a "path" parameter with value "/tmp".
|
34
|
-
|
35
|
-
read_with_mcp:
|
36
|
-
prompt: |
|
37
|
-
If you see any .txt or .md files in /tmp from the previous step, try reading one with the
|
38
|
-
FileSystem MCP tool's read_file function. Otherwise, just say "No text files found in /tmp".
|
@@ -1,16 +0,0 @@
|
|
1
|
-
Generate a structured code review with:
|
2
|
-
{
|
3
|
-
"summary": "Overall assessment",
|
4
|
-
"approval_status": "approve|request_changes|comment",
|
5
|
-
"issues": [
|
6
|
-
{
|
7
|
-
"severity": "critical|major|minor",
|
8
|
-
"file": "filename",
|
9
|
-
"line": 123,
|
10
|
-
"description": "Issue description",
|
11
|
-
"suggestion": "How to fix"
|
12
|
-
}
|
13
|
-
],
|
14
|
-
"positive_feedback": ["What was done well"],
|
15
|
-
"documentation_updates": ["Required doc changes"]
|
16
|
-
}
|
Binary file
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# MCP GitHub Integration Example
|
2
|
-
# This workflow demonstrates using the GitHub MCP server to interact with repositories
|
3
|
-
|
4
|
-
name: GitHub Issue Analyzer
|
5
|
-
model: gpt-4o-mini
|
6
|
-
|
7
|
-
tools:
|
8
|
-
# Traditional Roast tool for writing output
|
9
|
-
- Roast::Tools::WriteFile
|
10
|
-
|
11
|
-
# GitHub MCP tool - using npx to run the server
|
12
|
-
- GitHub:
|
13
|
-
command: npx
|
14
|
-
args:
|
15
|
-
- "-y"
|
16
|
-
- "@modelcontextprotocol/server-github"
|
17
|
-
env:
|
18
|
-
GITHUB_PERSONAL_ACCESS_TOKEN: "{{ENV['GITHUB_TOKEN']}}"
|
19
|
-
only:
|
20
|
-
- search_repositories
|
21
|
-
- get_repository
|
22
|
-
- get_issue
|
23
|
-
- list_issues
|
24
|
-
- create_issue
|
25
|
-
- create_pull_request
|
26
|
-
- search_code
|
27
|
-
|
28
|
-
steps:
|
29
|
-
- search_issues
|
30
|
-
- analyze_issues
|
31
|
-
- generate_report
|
32
|
-
- save_report
|
Binary file
|
@@ -1,58 +0,0 @@
|
|
1
|
-
# Multi-MCP Integration Example
|
2
|
-
# This workflow combines multiple MCP tools with traditional Roast tools
|
3
|
-
|
4
|
-
name: Code Review Assistant
|
5
|
-
model: gpt-4o-mini
|
6
|
-
target: "README.md" # Use a static file for testing
|
7
|
-
|
8
|
-
tools:
|
9
|
-
# Traditional Roast tools
|
10
|
-
- Roast::Tools::ReadFile
|
11
|
-
- Roast::Tools::Grep
|
12
|
-
- Roast::Tools::WriteFile
|
13
|
-
|
14
|
-
# Multiple MCP tools
|
15
|
-
# - GitDocs:
|
16
|
-
# url: https://gitmcp.io/{{ENV['REPO_OWNER']}}/{{ENV['REPO_NAME']}}/docs
|
17
|
-
# env:
|
18
|
-
# Accept: application/json
|
19
|
-
|
20
|
-
# GitHub MCP (requires GITHUB_TOKEN environment variable)
|
21
|
-
# Uncomment to use:
|
22
|
-
# - GitHub:
|
23
|
-
# command: npx
|
24
|
-
# args: ["-y", "@modelcontextprotocol/server-github"]
|
25
|
-
# env:
|
26
|
-
# GITHUB_PERSONAL_ACCESS_TOKEN: "{{ENV['GITHUB_TOKEN']}}"
|
27
|
-
# only:
|
28
|
-
# - get_pull_request
|
29
|
-
# - create_pull_request_comment
|
30
|
-
# - get_file_content
|
31
|
-
|
32
|
-
# Filesystem MCP (no auth required)
|
33
|
-
- FileSystem:
|
34
|
-
command: npx
|
35
|
-
args: ["-y", "@modelcontextprotocol/server-filesystem", "."]
|
36
|
-
only:
|
37
|
-
- read_file
|
38
|
-
- list_directory
|
39
|
-
|
40
|
-
# - Linter:
|
41
|
-
# command: ./custom-linter-mcp
|
42
|
-
# env:
|
43
|
-
# CONFIG_PATH: "{{ENV['LINTER_CONFIG']}}"
|
44
|
-
# only:
|
45
|
-
# - analyze_code
|
46
|
-
# - suggest_fixes
|
47
|
-
|
48
|
-
steps:
|
49
|
-
- test_read
|
50
|
-
- test_filesystem
|
51
|
-
|
52
|
-
test_read:
|
53
|
-
prompt: Use the ReadFile tool to read the README.md file
|
54
|
-
|
55
|
-
test_filesystem:
|
56
|
-
prompt: |
|
57
|
-
Use the FileSystem MCP tool's list_directory function to list the current directory.
|
58
|
-
Then pick an interesting file and read it with the read_file function.
|
@@ -1 +0,0 @@
|
|
1
|
-
Generate a brief summary, with one code example, in Markdown format.
|
@@ -1,6 +0,0 @@
|
|
1
|
-
Use the FileSystem MCP tool to explore the current directory:
|
2
|
-
|
3
|
-
1. First, use the list_directory function with path "." to see what files are here
|
4
|
-
2. Then pick one interesting file (like a .yml or .md file) and read it using the read_file function
|
5
|
-
|
6
|
-
This demonstrates using MCP tools for filesystem access.
|
@@ -1,8 +0,0 @@
|
|
1
|
-
Use the GitHub MCP tool's get_file_content function to fetch the README.md from the Shopify/roast repository.
|
2
|
-
|
3
|
-
The function should be called with these parameters:
|
4
|
-
- owner: "Shopify"
|
5
|
-
- repo: "roast"
|
6
|
-
- path: "README.md"
|
7
|
-
|
8
|
-
Then summarize what the README contains.
|
@@ -1 +0,0 @@
|
|
1
|
-
Use the read_file function to read the README.md file in the current directory and summarize what it contains.
|
data/examples/mcp/workflow.png
DELETED
Binary file
|
data/examples/mcp/workflow.yml
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# usage: roast execute examples/mcp/workflow.yml -o output.md
|
2
|
-
|
3
|
-
name: MCP Tools Example
|
4
|
-
model: gpt-4o-mini
|
5
|
-
tools:
|
6
|
-
# SSE MCP:
|
7
|
-
- Roast Docs:
|
8
|
-
url: https://gitmcp.io/Shopify/roast/docs
|
9
|
-
# Can pass headers for authentication
|
10
|
-
# env:
|
11
|
-
# - "Authorization: Bearer {{resource.api_token}}"
|
12
|
-
# stdio MCPs are also supported
|
13
|
-
# - GitHub:
|
14
|
-
# command: "docker",
|
15
|
-
# args:
|
16
|
-
# - "run"
|
17
|
-
# - "-i"
|
18
|
-
# - "--rm"
|
19
|
-
# - "-e"
|
20
|
-
# - "GITHUB_PERSONAL_ACCESS_TOKEN"
|
21
|
-
# - "ghcr.io/github/github-mcp-server"
|
22
|
-
# env:
|
23
|
-
# GITHUB_PERSONAL_ACCESS_TOKEN: "<YOUR_TOKEN>"
|
24
|
-
# only:
|
25
|
-
# - get_issue
|
26
|
-
# - get_issue_comments
|
27
|
-
# except:
|
28
|
-
# - create_issue
|
29
|
-
|
30
|
-
steps:
|
31
|
-
- get_doc: Read the Roast docs, and tell me how to use MCP tools.
|
32
|
-
- summarize
|
33
|
-
|
34
|
-
summarize:
|
35
|
-
print_response: true
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# No Model Fallback Example
|
2
|
-
|
3
|
-
This example demonstrates the issue where workflows without explicit model specification do not properly fall back to a default model.
|
4
|
-
|
5
|
-
## Purpose
|
6
|
-
|
7
|
-
This workflow is based on the interpolation example but intentionally omits the `model` field to test the fallback behavior.
|
8
|
-
|
9
|
-
## Expected Behavior
|
10
|
-
|
11
|
-
The workflow should fall back to a default model when no model is specified at the workflow level.
|
12
|
-
|
13
|
-
## Usage
|
14
|
-
|
15
|
-
```bash
|
16
|
-
bin/roast examples/no_model_fallback/workflow.yml --file examples/no_model_fallback/sample.rb
|
17
|
-
```
|
@@ -1 +0,0 @@
|
|
1
|
-
Analyze the file at: <%= workflow.file %>
|
@@ -1,27 +0,0 @@
|
|
1
|
-
Extract some patterns about this file and return in json format like this:
|
2
|
-
|
3
|
-
<json>
|
4
|
-
{
|
5
|
-
"code_patterns": {
|
6
|
-
"class_structure": {
|
7
|
-
"name": "Calculator",
|
8
|
-
"instance_variables": ["@memory"],
|
9
|
-
"method_count": 7,
|
10
|
-
"method_types": {
|
11
|
-
"constructor": ["initialize"],
|
12
|
-
"operations": ["add", "subtract", "multiply", "divide"],
|
13
|
-
"accessors": ["memory"],
|
14
|
-
"utility": ["clear"]
|
15
|
-
}
|
16
|
-
},
|
17
|
-
"error_handling": {
|
18
|
-
"techniques": ["conditional raise", "zero check"],
|
19
|
-
"examples": ["raise \"Division by zero!\" if number.zero?"]
|
20
|
-
},
|
21
|
-
"design_patterns": {
|
22
|
-
"state": "Uses instance variable to maintain calculator state",
|
23
|
-
"command": "Each operation method modifies the internal state"
|
24
|
-
}
|
25
|
-
}
|
26
|
-
}
|
27
|
-
</json>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
Generate a comprehensive report for the markdown file.
|
2
|
-
|
3
|
-
File content: {{steps.analyze_file}}
|
4
|
-
|
5
|
-
Patterns found: {{steps.analyze_patterns}}
|
6
|
-
|
7
|
-
Please create a detailed report that includes:
|
8
|
-
1. Summary of the file content
|
9
|
-
2. Key patterns identified
|
10
|
-
3. Any recommendations or observations
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Sample Ruby file for testing interpolation in workflows
|
4
|
-
|
5
|
-
class Calculator
|
6
|
-
def initialize
|
7
|
-
@memory = 0
|
8
|
-
end
|
9
|
-
|
10
|
-
def add(number)
|
11
|
-
@memory += number
|
12
|
-
end
|
13
|
-
|
14
|
-
def subtract(number)
|
15
|
-
@memory -= number
|
16
|
-
end
|
17
|
-
|
18
|
-
def multiply(number)
|
19
|
-
@memory *= number
|
20
|
-
end
|
21
|
-
|
22
|
-
def divide(number)
|
23
|
-
raise "Division by zero!" if number.zero?
|
24
|
-
|
25
|
-
@memory /= number
|
26
|
-
end
|
27
|
-
|
28
|
-
attr_reader :memory
|
29
|
-
|
30
|
-
def clear
|
31
|
-
@memory = 0
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# Example usage
|
36
|
-
if __FILE__ == $PROGRAM_NAME
|
37
|
-
calc = Calculator.new
|
38
|
-
calc.add(10)
|
39
|
-
calc.multiply(2)
|
40
|
-
calc.subtract(5)
|
41
|
-
puts "Result: #{calc.memory}"
|
42
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
name: no_model_fallback_example
|
2
|
-
|
3
|
-
tools:
|
4
|
-
- Roast::Tools::ReadFile
|
5
|
-
|
6
|
-
steps:
|
7
|
-
- analyze_file
|
8
|
-
- analyze_patterns
|
9
|
-
- generate_report_for_{{File.extname(workflow.file).sub('.', '')}}
|
10
|
-
- '$(echo "Processing completed for file: {{File.basename(workflow.file)}}")'
|
11
|
-
|
12
|
-
analyze_patterns:
|
13
|
-
json: true
|
14
|
-
|
15
|
-
generate_report_for_rb:
|
16
|
-
print_response: true
|
17
|
-
|
18
|
-
generate_report_for_md:
|
19
|
-
print_response: true
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# OpenRouter Example
|
2
|
-
|
3
|
-
This example demonstrates how to use OpenRouter with Roast to access models from different providers through a single API.
|
4
|
-
|
5
|
-
## Setup
|
6
|
-
|
7
|
-
1. Sign up for an account at [OpenRouter](https://openrouter.ai/)
|
8
|
-
2. Get your API key from the OpenRouter dashboard
|
9
|
-
3. Set the API key as an environment variable:
|
10
|
-
```bash
|
11
|
-
export OPENROUTER_API_KEY=your_api_key_here
|
12
|
-
```
|
13
|
-
|
14
|
-
## Running the Example
|
15
|
-
|
16
|
-
```bash
|
17
|
-
# Run without a specific target (general analysis)
|
18
|
-
roast execute workflow.yml
|
19
|
-
|
20
|
-
# Run with a specific file to analyze
|
21
|
-
roast execute workflow.yml path/to/your/file.txt
|
22
|
-
```
|
23
|
-
|
24
|
-
## How it Works
|
25
|
-
|
26
|
-
This example configures Roast to use OpenRouter as the API provider:
|
27
|
-
|
28
|
-
```yaml
|
29
|
-
api_provider: openrouter
|
30
|
-
api_token: $(echo $OPENROUTER_API_KEY)
|
31
|
-
model: anthropic/claude-3-haiku-20240307
|
32
|
-
```
|
33
|
-
|
34
|
-
The workflow consists of two steps:
|
35
|
-
1. `analyze_input`: Analyzes the provided content (or generates general insights if no target is provided)
|
36
|
-
2. `generate_response`: Creates a structured response based on the analysis
|
37
|
-
|
38
|
-
## Available Models
|
39
|
-
|
40
|
-
When using OpenRouter, you can access models from multiple providers by specifying the fully qualified model name, including the provider prefix. Some examples:
|
41
|
-
|
42
|
-
- `anthropic/claude-3-opus-20240229`
|
43
|
-
- `anthropic/claude-3-sonnet-20240229`
|
44
|
-
- `meta/llama-3-70b-instruct`
|
45
|
-
- `google/gemini-1.5-pro-latest`
|
46
|
-
- `mistral/mistral-large-latest`
|
47
|
-
|
48
|
-
Check the [OpenRouter documentation](https://openrouter.ai/docs) for the complete list of supported models.
|
@@ -1,16 +0,0 @@
|
|
1
|
-
I'd like you to analyze the following input and provide your insights.
|
2
|
-
|
3
|
-
<% if workflow.file && workflow.resource.content %>
|
4
|
-
Here is the content to analyze:
|
5
|
-
|
6
|
-
```
|
7
|
-
<%= workflow.resource.content %>
|
8
|
-
```
|
9
|
-
<% else %>
|
10
|
-
The workflow is running without a specific file target. Please provide general insights based on the context.
|
11
|
-
<% end %>
|
12
|
-
|
13
|
-
Please provide:
|
14
|
-
1. A summary of the key points
|
15
|
-
2. Any notable patterns or issues
|
16
|
-
3. Recommendations based on your analysis
|
@@ -1,9 +0,0 @@
|
|
1
|
-
Based on the analysis from the previous step, please generate a response that addresses the findings.
|
2
|
-
|
3
|
-
Your response should be well-structured and include:
|
4
|
-
1. An introduction summarizing the analysis
|
5
|
-
2. Detailed discussion of key points
|
6
|
-
3. Clear recommendations for improvements
|
7
|
-
4. A conclusion
|
8
|
-
|
9
|
-
Format the response in markdown for better readability.
|
Binary file
|
@@ -1,111 +0,0 @@
|
|
1
|
-
# Pre/Post Processing Example: Test Suite Optimization
|
2
|
-
|
3
|
-
This example demonstrates how to use Roast's pre/post processing framework to optimize an entire test suite across multiple files.
|
4
|
-
|
5
|
-
## Overview
|
6
|
-
|
7
|
-
The workflow processes multiple test files, but performs setup and aggregation tasks only once:
|
8
|
-
|
9
|
-
- **Pre-processing**: Runs once before any test files are processed
|
10
|
-
- Gathers baseline metrics for comparison
|
11
|
-
- Sets up the test environment
|
12
|
-
|
13
|
-
- **Main workflow**: Runs for each test file matching the target pattern
|
14
|
-
- Analyzes test quality and coverage
|
15
|
-
- Improves test coverage
|
16
|
-
- Optimizes test performance
|
17
|
-
- Validates changes
|
18
|
-
|
19
|
-
- **Post-processing**: Runs once after all test files have been processed
|
20
|
-
- Aggregates metrics from all files
|
21
|
-
- Generates a comprehensive report
|
22
|
-
- Cleans up the environment
|
23
|
-
|
24
|
-
## Workflow Structure
|
25
|
-
|
26
|
-
```yaml
|
27
|
-
name: test_optimization
|
28
|
-
model: gpt-4o
|
29
|
-
target: "test/**/*_test.rb"
|
30
|
-
|
31
|
-
pre_processing:
|
32
|
-
- gather_baseline_metrics
|
33
|
-
- setup_test_environment
|
34
|
-
|
35
|
-
steps:
|
36
|
-
- analyze_test_file
|
37
|
-
- improve_test_coverage
|
38
|
-
- optimize_test_performance
|
39
|
-
- validate_changes
|
40
|
-
|
41
|
-
post_processing:
|
42
|
-
- aggregate_metrics
|
43
|
-
- generate_summary_report
|
44
|
-
- cleanup_environment
|
45
|
-
```
|
46
|
-
|
47
|
-
## Directory Structure
|
48
|
-
|
49
|
-
```
|
50
|
-
pre_post_processing/
|
51
|
-
├── workflow.yml
|
52
|
-
├── pre_processing/
|
53
|
-
│ ├── gather_baseline_metrics/
|
54
|
-
│ │ └── prompt.md
|
55
|
-
│ └── setup_test_environment/
|
56
|
-
│ └── prompt.md
|
57
|
-
├── analyze_test_file/
|
58
|
-
│ └── prompt.md
|
59
|
-
├── improve_test_coverage/
|
60
|
-
│ └── prompt.md
|
61
|
-
├── optimize_test_performance/
|
62
|
-
│ └── prompt.md
|
63
|
-
├── validate_changes/
|
64
|
-
│ └── prompt.md
|
65
|
-
└── post_processing/
|
66
|
-
├── aggregate_metrics/
|
67
|
-
│ └── prompt.md
|
68
|
-
├── generate_summary_report/
|
69
|
-
│ └── prompt.md
|
70
|
-
└── cleanup_environment/
|
71
|
-
└── prompt.md
|
72
|
-
```
|
73
|
-
|
74
|
-
## Key Features Demonstrated
|
75
|
-
|
76
|
-
1. **Shared State**: Pre-processing results are available to all subsequent steps
|
77
|
-
2. **Result Aggregation**: Post-processing has access to results from all workflow executions
|
78
|
-
3. **One-time Operations**: Setup and cleanup happen only once, regardless of target count
|
79
|
-
4. **Metrics Collection**: Each file's results are stored and aggregated for reporting
|
80
|
-
|
81
|
-
## Running the Example
|
82
|
-
|
83
|
-
```bash
|
84
|
-
cd examples/pre_post_processing
|
85
|
-
roast workflow.yml
|
86
|
-
```
|
87
|
-
|
88
|
-
This will:
|
89
|
-
1. Run pre-processing steps once
|
90
|
-
2. Process each test file matching `test/**/*_test.rb`
|
91
|
-
3. Run post-processing steps once with access to all results
|
92
|
-
4. Generate a comprehensive optimization report
|
93
|
-
|
94
|
-
## Use Cases
|
95
|
-
|
96
|
-
This pattern is ideal for:
|
97
|
-
- **Code migrations**: Setup migration tools, process files, generate migration report
|
98
|
-
- **Performance audits**: Baseline metrics, analyze files, aggregate improvements
|
99
|
-
- **Documentation generation**: Analyze codebase, generate docs per file, create index
|
100
|
-
- **Dependency updates**: Check current versions, update files, verify compatibility
|
101
|
-
- **Security scanning**: Setup scanners, check each file, generate security report
|
102
|
-
|
103
|
-
## Customization
|
104
|
-
|
105
|
-
To adapt this example for your use case:
|
106
|
-
|
107
|
-
1. Update the `target` pattern to match your files
|
108
|
-
2. Modify pre-processing steps for your setup needs
|
109
|
-
3. Adjust main workflow steps for your processing logic
|
110
|
-
4. Customize post-processing for your reporting requirements
|
111
|
-
5. Use appropriate AI models for each step type
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Analyze Test File
|
2
|
-
|
3
|
-
Current test file: <%= file %>
|
4
|
-
|
5
|
-
Please analyze this test file and identify:
|
6
|
-
|
7
|
-
1. **Test Structure**: Number of test cases, test suites, and overall organization
|
8
|
-
2. **Coverage Gaps**: Areas of the code that aren't adequately tested
|
9
|
-
3. **Test Quality Issues**:
|
10
|
-
- Tests that are too brittle or implementation-dependent
|
11
|
-
- Missing edge cases
|
12
|
-
- Unclear test descriptions
|
13
|
-
- Excessive mocking that reduces test value
|
14
|
-
4. **Performance Issues**:
|
15
|
-
- Slow setup/teardown methods
|
16
|
-
- Inefficient test data generation
|
17
|
-
- Unnecessary database operations
|
18
|
-
5. **Opportunities for Improvement**:
|
19
|
-
- Tests that could be parameterized
|
20
|
-
- Common patterns that could be extracted to helpers
|
21
|
-
- Better use of test fixtures or factories
|
22
|
-
|
23
|
-
Provide specific, actionable recommendations for each issue found.
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# Improve Test Coverage
|
2
|
-
|
3
|
-
Based on the analysis of <%= file %>, implement the following improvements:
|
4
|
-
|
5
|
-
1. **Add Missing Test Cases**: Write tests for uncovered code paths, edge cases, and error conditions
|
6
|
-
2. **Improve Test Descriptions**: Make test names more descriptive and follow consistent naming conventions
|
7
|
-
3. **Enhance Assertions**: Add more specific assertions to catch regressions
|
8
|
-
4. **Test Data**: Use more realistic test data that better represents production scenarios
|
9
|
-
5. **Remove Redundancy**: Eliminate duplicate tests or merge similar ones
|
10
|
-
|
11
|
-
Generate the improved test code and explain the rationale for each change.
|
12
|
-
|
13
|
-
Remember to:
|
14
|
-
- Maintain backward compatibility with existing test interfaces
|
15
|
-
- Follow the project's testing conventions and style guide
|
16
|
-
- Ensure new tests are fast and deterministic
|
17
|
-
- Add appropriate comments for complex test scenarios
|