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
data/examples/cmd/README.md
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
# Command Tool Examples
|
2
|
-
|
3
|
-
Learn how to execute system commands in your Roast workflows using the Cmd tool. This example demonstrates how to define allowed commands and use them as functions within your workflows.
|
4
|
-
|
5
|
-
## Overview
|
6
|
-
|
7
|
-
The `Cmd` tool allows you to define a list of approved system commands that can be executed by the AI. Each allowed command is treated as a distinct function, providing several benefits:
|
8
|
-
|
9
|
-
- **Security**: Only explicitly allowed commands can be run, preventing unauthorized system access.
|
10
|
-
- **Clarity**: Each command has a clear, defined purpose within the workflow.
|
11
|
-
- **Intelligent Usage**: Custom descriptions can be provided to help the AI choose the correct command for a given task.
|
12
|
-
|
13
|
-
## Configuration
|
14
|
-
|
15
|
-
You can configure the `Cmd` tool in your workflow YAML file.
|
16
|
-
|
17
|
-
### Basic Configuration
|
18
|
-
|
19
|
-
List the commands that the AI is allowed to execute:
|
20
|
-
|
21
|
-
```yaml
|
22
|
-
tools:
|
23
|
-
- Roast::Tools::Cmd:
|
24
|
-
allowed_commands:
|
25
|
-
- pwd
|
26
|
-
- ls
|
27
|
-
- echo
|
28
|
-
```
|
29
|
-
|
30
|
-
Each command listed here (`pwd`, `ls`, `echo`) becomes a function the AI can call. For example, the AI can call `pwd()` to get the current directory, or `ls(args: "-la")` to list files.
|
31
|
-
|
32
|
-
### Enhanced Configuration with Descriptions
|
33
|
-
|
34
|
-
For more complex commands or to provide better guidance to the AI, you can include a description:
|
35
|
-
|
36
|
-
```yaml
|
37
|
-
tools:
|
38
|
-
- Roast::Tools::Cmd:
|
39
|
-
allowed_commands:
|
40
|
-
- pwd
|
41
|
-
- ls
|
42
|
-
- name: git
|
43
|
-
description: "git CLI - version control system (e.g., git status, git log)"
|
44
|
-
- name: npm
|
45
|
-
description: "npm CLI - Node.js package manager (e.g., npm install, npm run)"
|
46
|
-
- name: docker
|
47
|
-
description: "Docker CLI - container platform (e.g., docker ps, docker run)"
|
48
|
-
```
|
49
|
-
These descriptions help the AI understand the purpose of each command and its common subcommands or arguments.
|
50
|
-
|
51
|
-
## How It Works
|
52
|
-
|
53
|
-
When the `Cmd` tool is configured, each entry in `allowed_commands` is registered as a function available to the AI.
|
54
|
-
|
55
|
-
- `pwd` becomes `pwd()`
|
56
|
-
- `ls` becomes `ls(args: <string>)`
|
57
|
-
- `git` (with a description) becomes `git(args: <string>)`
|
58
|
-
|
59
|
-
The AI can then choose to call these functions with appropriate arguments (passed via the `args` parameter) to accomplish its tasks.
|
60
|
-
|
61
|
-
## Example Workflows
|
62
|
-
|
63
|
-
This directory contains several example workflows demonstrating different uses of the `Cmd` tool:
|
64
|
-
|
65
|
-
- **`basic_workflow.yml`**: Introduces simple command execution.
|
66
|
-
- **`explorer_workflow.yml`**: Uses commands to navigate and understand a project structure.
|
67
|
-
- **`dev_workflow.yml`**: Showcases how descriptions guide the AI in selecting tools for development-related tasks.
|
68
|
-
|
69
|
-
## Running the Examples
|
70
|
-
|
71
|
-
To run an example workflow:
|
72
|
-
```bash
|
73
|
-
bin/roast execute examples/cmd/NAME_OF_WORKFLOW.yml
|
74
|
-
```
|
75
|
-
For instance:
|
76
|
-
```bash
|
77
|
-
bin/roast execute examples/cmd/basic_workflow.yml
|
78
|
-
```
|
79
|
-
|
80
|
-
## Security
|
81
|
-
|
82
|
-
Explicitly defining `allowed_commands` is crucial for security:
|
83
|
-
- You maintain full control over which system commands the AI can execute.
|
84
|
-
- It creates self-documenting configurations, making workflows safer and more predictable.
|
85
|
-
|
86
|
-
## Best Practices
|
87
|
-
|
88
|
-
- **Start Simple**: Begin with basic commands like `pwd` and `ls`.
|
89
|
-
- **Use Descriptions for Clarity**: Provide descriptions for commands that are not universally understood or have complex arguments/subcommands. This helps both the AI and human readers.
|
90
|
-
- **Scope Appropriately**: Only allow commands that are necessary for the workflow's intended purpose.
|
91
|
-
|
92
|
-
## Why Use Custom Descriptions?
|
93
|
-
|
94
|
-
Custom descriptions are particularly useful when:
|
95
|
-
- Dealing with domain-specific or less common commands.
|
96
|
-
- Disambiguating between commands with similar names or overlapping functionality.
|
97
|
-
- Guiding the AI to make more informed decisions about tool selection.
|
98
|
-
|
99
|
-
Good descriptions enhance the AI's ability to use commands effectively and make your workflows more robust.
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# Project Analysis
|
2
|
-
|
3
|
-
You need to analyze the current project to identify its type, available tools, and development setup. Gather comprehensive information to understand the project's nature and configuration.
|
4
|
-
|
5
|
-
Investigate the project to determine:
|
6
|
-
|
7
|
-
1. Your current working location
|
8
|
-
2. The project structure and contents
|
9
|
-
3. Whether this is a Node.js project (look for package.json)
|
10
|
-
4. Whether Docker is configured (look for Dockerfile or docker-compose.yml)
|
11
|
-
5. Whether there's a Makefile for build automation
|
12
|
-
6. The version control state
|
13
|
-
|
14
|
-
Based on your findings, determine:
|
15
|
-
- Project type (Node.js application, containerized service, make-based project, etc.)
|
16
|
-
- Available development tools and configurations
|
17
|
-
- How dependencies are managed
|
18
|
-
- Version control status
|
19
|
-
- Recommended next steps for development
|
20
|
-
|
21
|
-
RESPONSE FORMAT
|
22
|
-
Provide your analysis in JSON format:
|
23
|
-
|
24
|
-
<json>
|
25
|
-
{
|
26
|
-
"project_analysis": {
|
27
|
-
"working_directory": "/path/to/project",
|
28
|
-
"project_type": "Identified based on available files",
|
29
|
-
"detected_tools": {
|
30
|
-
"node_project": {
|
31
|
-
"has_package_json": false,
|
32
|
-
"has_lock_file": false,
|
33
|
-
"package_manager": "none"
|
34
|
-
},
|
35
|
-
"containerization": {
|
36
|
-
"has_dockerfile": false,
|
37
|
-
"has_compose": false,
|
38
|
-
"docker_ready": false
|
39
|
-
},
|
40
|
-
"build_system": {
|
41
|
-
"has_makefile": false,
|
42
|
-
"make_targets": []
|
43
|
-
},
|
44
|
-
"version_control": {
|
45
|
-
"has_git": true,
|
46
|
-
"working_tree_clean": false,
|
47
|
-
"uncommitted_changes": 3
|
48
|
-
}
|
49
|
-
},
|
50
|
-
"recommendations": [
|
51
|
-
"Relevant recommendations based on what was found"
|
52
|
-
],
|
53
|
-
"confidence": "high"
|
54
|
-
},
|
55
|
-
"analysis_complete": true
|
56
|
-
}
|
57
|
-
</json>
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# Basic Command Demonstration
|
2
|
-
|
3
|
-
You are demonstrating basic command functions. Execute several simple commands to show how the command tool system works.
|
4
|
-
|
5
|
-
**SPECIFIC TASKS:**
|
6
|
-
1. Show the current working directory: use `pwd`
|
7
|
-
2. List all files with details: use `ls -la`
|
8
|
-
3. Display celebratory message: use `echo "🎉 Command functions are working!"`
|
9
|
-
4. List examples directory: use `ls examples/`
|
10
|
-
|
11
|
-
**EFFICIENCY RULES:**
|
12
|
-
- Execute each command ONLY ONCE
|
13
|
-
- DO NOT repeat any command
|
14
|
-
- Follow the exact order above
|
15
|
-
|
16
|
-
Each command execution demonstrates how commands are called as functions in the workflow, with security enforced through the workflow's configuration.
|
17
|
-
|
18
|
-
RESPONSE FORMAT
|
19
|
-
Provide a summary of your command executions in JSON format:
|
20
|
-
|
21
|
-
<json>
|
22
|
-
{
|
23
|
-
"demonstration_complete": true,
|
24
|
-
"commands_executed": [
|
25
|
-
{
|
26
|
-
"command": "pwd",
|
27
|
-
"purpose": "Show current working directory",
|
28
|
-
"output_summary": "Current directory path"
|
29
|
-
},
|
30
|
-
{
|
31
|
-
"command": "ls -la",
|
32
|
-
"purpose": "List all files with details",
|
33
|
-
"output_summary": "Directory listing with permissions and sizes"
|
34
|
-
},
|
35
|
-
{
|
36
|
-
"command": "echo \"🎉 Command functions are working!\"",
|
37
|
-
"purpose": "Display test message",
|
38
|
-
"output_summary": "Success message displayed"
|
39
|
-
},
|
40
|
-
{
|
41
|
-
"command": "ls examples/",
|
42
|
-
"purpose": "List examples directory",
|
43
|
-
"output_summary": "Contents of examples directory"
|
44
|
-
}
|
45
|
-
],
|
46
|
-
"conclusion": "Successfully demonstrated basic command functions with security constraints"
|
47
|
-
}
|
48
|
-
</json>
|
Binary file
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# Repository Status Check
|
2
|
-
|
3
|
-
You need to analyze the Git repository status and provide a comprehensive overview of the repository state, history, and configuration.
|
4
|
-
|
5
|
-
**SPECIFIC COMMANDS TO USE:**
|
6
|
-
1. Check repository status: `git status`
|
7
|
-
2. Show current branch: `git branch --show-current`
|
8
|
-
3. List recent commits: `git log --oneline -10`
|
9
|
-
4. Show remote repositories: `git remote -v`
|
10
|
-
|
11
|
-
**EFFICIENCY RULES:**
|
12
|
-
- Run each command ONLY ONCE - do not repeat any git command
|
13
|
-
- DO NOT try different variations of the same command (e.g., different log formats)
|
14
|
-
- Gather all needed information with these 4 commands only
|
15
|
-
|
16
|
-
From these commands, analyze:
|
17
|
-
- Current branch and its state
|
18
|
-
- Working directory status (clean/dirty)
|
19
|
-
- Recent commit activity
|
20
|
-
- Remote repository configuration
|
21
|
-
- Overall repository health
|
22
|
-
|
23
|
-
RESPONSE FORMAT
|
24
|
-
Provide your analysis in JSON format:
|
25
|
-
|
26
|
-
<json>
|
27
|
-
{
|
28
|
-
"repository_status": {
|
29
|
-
"current_branch": "main",
|
30
|
-
"working_directory": {
|
31
|
-
"is_clean": false,
|
32
|
-
"modified_files": 3,
|
33
|
-
"untracked_files": 2,
|
34
|
-
"staged_changes": 1
|
35
|
-
},
|
36
|
-
"recent_activity": {
|
37
|
-
"total_recent_commits": 10,
|
38
|
-
"latest_commit": {
|
39
|
-
"hash": "abc1234",
|
40
|
-
"message": "Latest commit message"
|
41
|
-
},
|
42
|
-
"activity_summary": "Regular commits indicate active development"
|
43
|
-
},
|
44
|
-
"remotes": {
|
45
|
-
"origin": {
|
46
|
-
"fetch_url": "https://github.com/user/repo.git",
|
47
|
-
"push_url": "https://github.com/user/repo.git"
|
48
|
-
}
|
49
|
-
},
|
50
|
-
"repository_health": {
|
51
|
-
"status": "healthy",
|
52
|
-
"notes": "Repository has uncommitted changes but is otherwise in good state"
|
53
|
-
}
|
54
|
-
},
|
55
|
-
"analysis_complete": true
|
56
|
-
}
|
57
|
-
</json>
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# Creating and Verifying Files
|
2
|
-
|
3
|
-
You need to demonstrate file creation and verification capabilities. Create a test directory and file, then verify the operations were successful.
|
4
|
-
|
5
|
-
**EXECUTE THESE COMMANDS IN ORDER:**
|
6
|
-
1. Create directory: `mkdir -p test_cmd_demo`
|
7
|
-
2. Create file: `echo "This file was created by command functions!" > test_cmd_demo/demo.txt`
|
8
|
-
3. Verify directory: `ls -la test_cmd_demo/`
|
9
|
-
4. Verify content: `cat test_cmd_demo/demo.txt`
|
10
|
-
5. Show completion: `echo "Demo complete! You can remove test_cmd_demo when ready."`
|
11
|
-
|
12
|
-
**EFFICIENCY RULE:** Execute each command exactly once in the order shown above.
|
13
|
-
|
14
|
-
This exercise demonstrates how command functions can be combined for practical file operations while maintaining security through the workflow's command restrictions.
|
15
|
-
|
16
|
-
RESPONSE FORMAT
|
17
|
-
Report the results in JSON format:
|
18
|
-
|
19
|
-
<json>
|
20
|
-
{
|
21
|
-
"task_completed": true,
|
22
|
-
"operations": [
|
23
|
-
{
|
24
|
-
"step": "create_directory",
|
25
|
-
"command": "mkdir -p test_cmd_demo",
|
26
|
-
"success": true,
|
27
|
-
"result": "Directory created successfully"
|
28
|
-
},
|
29
|
-
{
|
30
|
-
"step": "create_file",
|
31
|
-
"command": "echo \"This file was created by command functions!\" > test_cmd_demo/demo.txt",
|
32
|
-
"success": true,
|
33
|
-
"result": "File created with content"
|
34
|
-
},
|
35
|
-
{
|
36
|
-
"step": "verify_creation",
|
37
|
-
"command": "ls -la test_cmd_demo/",
|
38
|
-
"success": true,
|
39
|
-
"result": "Directory listing shows demo.txt file"
|
40
|
-
},
|
41
|
-
{
|
42
|
-
"step": "verify_content",
|
43
|
-
"command": "cat test_cmd_demo/demo.txt",
|
44
|
-
"success": true,
|
45
|
-
"result": "File contents match expected text"
|
46
|
-
},
|
47
|
-
{
|
48
|
-
"step": "completion_message",
|
49
|
-
"command": "echo \"Demo complete! You can remove test_cmd_demo when ready.\"",
|
50
|
-
"success": true,
|
51
|
-
"result": "Completion message displayed"
|
52
|
-
}
|
53
|
-
],
|
54
|
-
"summary": "Successfully demonstrated file creation and verification using command functions"
|
55
|
-
}
|
56
|
-
</json>
|
Binary file
|
@@ -1,26 +0,0 @@
|
|
1
|
-
name: Development Tools Workflow
|
2
|
-
model: default
|
3
|
-
|
4
|
-
# Demonstrates how custom descriptions guide intelligent tool selection
|
5
|
-
|
6
|
-
tools:
|
7
|
-
- Roast::Tools::Cmd:
|
8
|
-
allowed_commands:
|
9
|
-
- pwd
|
10
|
-
- ls
|
11
|
-
- name: git
|
12
|
-
description: "git CLI - version control system with subcommands like status, commit, branch"
|
13
|
-
- name: npm
|
14
|
-
description: "npm CLI - Node.js package manager with subcommands like install, run, test"
|
15
|
-
- name: docker
|
16
|
-
description: "Docker CLI - container platform with subcommands like ps, run, build"
|
17
|
-
- name: curl
|
18
|
-
description: "curl command - make HTTP requests with options like -X, -H, -d"
|
19
|
-
- name: jq
|
20
|
-
description: "jq command - process JSON data with filters like '.key', '.[].name'"
|
21
|
-
- name: make
|
22
|
-
description: "make command - run build targets defined in Makefile"
|
23
|
-
|
24
|
-
steps:
|
25
|
-
- analyze_project
|
26
|
-
- smart_tool_selection
|
@@ -1,67 +0,0 @@
|
|
1
|
-
# Exploring Your Project Structure
|
2
|
-
|
3
|
-
You need to analyze the project structure and provide a comprehensive overview. Gather information about the project layout, documentation, and configuration.
|
4
|
-
|
5
|
-
**IMPORTANT COMMAND SYNTAX:**
|
6
|
-
- The `find` command requires a path: `find . -name "*.md"` (not `find -name "*.md"`)
|
7
|
-
- Use `head` to limit output: `find . -name "*.md" | head -10`
|
8
|
-
- Check files efficiently - don't repeat commands
|
9
|
-
|
10
|
-
Explore the project by:
|
11
|
-
|
12
|
-
1. Identifying your current location: use `pwd`
|
13
|
-
2. Listing all files and directories: use `ls -la`
|
14
|
-
3. Finding documentation files: use `find . -name "*.md" -type f | head -10`
|
15
|
-
4. Examining the README: use `cat README.md | head -20` (if it exists)
|
16
|
-
5. Locating configuration files: use `find . -name "*.yml" -o -name "*.yaml" | grep -E "(config|workflow)" | head -10`
|
17
|
-
|
18
|
-
**EFFICIENCY RULES:**
|
19
|
-
- Run each command ONLY ONCE
|
20
|
-
- If a file doesn't exist, note it and move on
|
21
|
-
- DO NOT retry failed commands
|
22
|
-
|
23
|
-
Based on your exploration, analyze:
|
24
|
-
- Project root location and overall structure
|
25
|
-
- Key directories and their likely purposes
|
26
|
-
- Available documentation
|
27
|
-
- Configuration files present
|
28
|
-
- General project organization
|
29
|
-
|
30
|
-
RESPONSE FORMAT
|
31
|
-
Provide your analysis in JSON format:
|
32
|
-
|
33
|
-
<json>
|
34
|
-
{
|
35
|
-
"project_analysis": {
|
36
|
-
"current_directory": "/path/to/project",
|
37
|
-
"total_items": {
|
38
|
-
"files": 0,
|
39
|
-
"directories": 0,
|
40
|
-
"hidden_items": 0
|
41
|
-
},
|
42
|
-
"documentation": {
|
43
|
-
"readme_found": true,
|
44
|
-
"readme_summary": "Brief summary of README contents",
|
45
|
-
"other_docs": ["list of other .md files found"]
|
46
|
-
},
|
47
|
-
"configuration": {
|
48
|
-
"config_files": ["list of .yml/.yaml configuration files"],
|
49
|
-
"workflow_files": ["list of workflow-related files"]
|
50
|
-
},
|
51
|
-
"project_structure": {
|
52
|
-
"key_directories": [
|
53
|
-
{
|
54
|
-
"name": "src",
|
55
|
-
"purpose": "Source code directory"
|
56
|
-
},
|
57
|
-
{
|
58
|
-
"name": "test",
|
59
|
-
"purpose": "Test files directory"
|
60
|
-
}
|
61
|
-
],
|
62
|
-
"project_type": "Identified project type based on files present"
|
63
|
-
}
|
64
|
-
},
|
65
|
-
"exploration_complete": true
|
66
|
-
}
|
67
|
-
</json>
|
Binary file
|
@@ -1,21 +0,0 @@
|
|
1
|
-
name: Project Explorer
|
2
|
-
model: default
|
3
|
-
|
4
|
-
# Navigate and explore your project using command functions
|
5
|
-
|
6
|
-
tools:
|
7
|
-
- Roast::Tools::Cmd:
|
8
|
-
allowed_commands:
|
9
|
-
- pwd
|
10
|
-
- ls
|
11
|
-
- find
|
12
|
-
- name: cat
|
13
|
-
description: "cat command - display file contents, concatenate files, works with pipes"
|
14
|
-
- name: git
|
15
|
-
description: "git CLI - version control system with subcommands like status, log, branch"
|
16
|
-
- name: grep
|
17
|
-
description: "grep command - search text patterns with options like -E, -r, -i"
|
18
|
-
|
19
|
-
steps:
|
20
|
-
- explore_project
|
21
|
-
- check_repository
|
@@ -1,99 +0,0 @@
|
|
1
|
-
# Intelligent Tool Selection Examples
|
2
|
-
|
3
|
-
You are demonstrating intelligent tool selection by completing various development tasks. Select and use the most appropriate tools based on what each task requires.
|
4
|
-
|
5
|
-
**CRITICAL GUIDELINES:**
|
6
|
-
- When working with JSON data, you MUST use jq to parse it - never return raw JSON
|
7
|
-
- Be efficient - if a command fails, do NOT repeat it
|
8
|
-
- Combine tools with pipes when needed (e.g., `curl -s ... | jq ...`)
|
9
|
-
- Check for files ONLY ONCE - if they don't exist, note it and move on
|
10
|
-
|
11
|
-
Complete the following development tasks:
|
12
|
-
|
13
|
-
## Task 1: API Health Check
|
14
|
-
Check if the GitHub API is accessible and responding properly.
|
15
|
-
- Target: https://api.github.com
|
16
|
-
- Goal: Verify the API returns a successful response (check HTTP status)
|
17
|
-
|
18
|
-
## Task 2: Parse JSON Response
|
19
|
-
Fetch GitHub's public information and extract specific data fields.
|
20
|
-
- Target: https://api.github.com/users/github
|
21
|
-
- Extract: The name and company fields from the JSON response
|
22
|
-
- **REQUIRED**: Use curl to fetch and jq to parse in a single command: `curl -s <url> | jq '<filter>'`
|
23
|
-
|
24
|
-
## Task 3: Check Container Environment
|
25
|
-
Determine if Docker is available and check for running containers.
|
26
|
-
- Try `docker ps` ONCE
|
27
|
-
- If Docker daemon is not running, note this and move on - do NOT retry
|
28
|
-
|
29
|
-
## Task 4: Check for Node.js Project
|
30
|
-
Investigate if this is a Node.js project and examine its dependencies.
|
31
|
-
- Check for package.json ONCE with `ls package.json`
|
32
|
-
- If not found, note this and move on - do NOT retry
|
33
|
-
|
34
|
-
## Task 5: Check Build System
|
35
|
-
Determine if a build system is configured and what targets are available.
|
36
|
-
- Check for Makefile ONCE with `ls Makefile`
|
37
|
-
- If not found, note this and move on - do NOT retry
|
38
|
-
|
39
|
-
**EFFICIENCY REMINDER**: Each file check or failed command should be attempted ONLY ONCE.
|
40
|
-
|
41
|
-
RESPONSE FORMAT
|
42
|
-
Report your findings in JSON format:
|
43
|
-
|
44
|
-
<json>
|
45
|
-
{
|
46
|
-
"tool_selection_demo": {
|
47
|
-
"task_1_api_check": {
|
48
|
-
"tool_selected": "curl",
|
49
|
-
"command_used": "curl -I https://api.github.com",
|
50
|
-
"rationale": "Selected HTTP request tool for API check",
|
51
|
-
"result": {
|
52
|
-
"api_accessible": true,
|
53
|
-
"status_code": 200
|
54
|
-
}
|
55
|
-
},
|
56
|
-
"task_2_json_parsing": {
|
57
|
-
"tools_selected": ["curl", "jq"],
|
58
|
-
"command_used": "curl -s https://api.github.com/users/github | jq '.name, .company'",
|
59
|
-
"rationale": "Combined tools for fetching and parsing JSON",
|
60
|
-
"result": {
|
61
|
-
"data_extracted": true,
|
62
|
-
"fields": {
|
63
|
-
"name": "GitHub",
|
64
|
-
"company": "@github"
|
65
|
-
}
|
66
|
-
}
|
67
|
-
},
|
68
|
-
"task_3_containers": {
|
69
|
-
"tool_selected": "docker",
|
70
|
-
"command_used": "docker ps",
|
71
|
-
"rationale": "Selected container platform tool",
|
72
|
-
"result": {
|
73
|
-
"docker_available": false,
|
74
|
-
"error": "Docker daemon not running",
|
75
|
-
"containers_running": 0
|
76
|
-
}
|
77
|
-
},
|
78
|
-
"task_4_nodejs": {
|
79
|
-
"tool_selected": "ls",
|
80
|
-
"command_used": "ls package.json",
|
81
|
-
"rationale": "Checked for package.json existence",
|
82
|
-
"result": {
|
83
|
-
"is_node_project": false,
|
84
|
-
"package_json_found": false
|
85
|
-
}
|
86
|
-
},
|
87
|
-
"task_5_build": {
|
88
|
-
"tool_selected": "ls",
|
89
|
-
"command_used": "ls Makefile",
|
90
|
-
"rationale": "Checked for Makefile existence",
|
91
|
-
"result": {
|
92
|
-
"makefile_found": false,
|
93
|
-
"targets": []
|
94
|
-
}
|
95
|
-
}
|
96
|
-
},
|
97
|
-
"summary": "Successfully demonstrated intelligent tool selection based on task requirements"
|
98
|
-
}
|
99
|
-
</json>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
name: CodingAgent with Model Configuration
|
2
|
-
description: |
|
3
|
-
Example workflow demonstrating how to configure the CodingAgent tool
|
4
|
-
with specific model options like opus
|
5
|
-
|
6
|
-
tools:
|
7
|
-
- Roast::Tools::CodingAgent:
|
8
|
-
model: opus
|
9
|
-
# You can also add other claude options here:
|
10
|
-
# temperature: 0.7
|
11
|
-
# max_tokens: 1000
|
12
|
-
|
13
|
-
steps:
|
14
|
-
- analyze_code: |
|
15
|
-
Analyze the Ruby code in lib/roast/tools/coding_agent.rb
|
16
|
-
and explain how the CodingAgent tool works.
|
17
|
-
|
18
|
-
- implement_feature: |
|
19
|
-
Create a simple Ruby script that demonstrates using command-line
|
20
|
-
options similar to how CodingAgent builds its commands.
|
@@ -1,30 +0,0 @@
|
|
1
|
-
name: CodingAgent with Retries Configuration
|
2
|
-
description: |
|
3
|
-
Example workflow demonstrating how to configure the CodingAgent tool
|
4
|
-
with automatic retries on failure. The retries option will automatically
|
5
|
-
retry the coding agent if it encounters an error during execution.
|
6
|
-
Note: this is not the same as running the step
|
7
|
-
|
8
|
-
tools:
|
9
|
-
- Roast::Tools::CodingAgent:
|
10
|
-
retries: 2 # Automatically retry up to 2 times on failure
|
11
|
-
|
12
|
-
steps:
|
13
|
-
# This step invokes the coding agent directly using the specified number of retries
|
14
|
-
- ^implement_a_feature: |
|
15
|
-
Create a Ruby script that demonstrates robust error handling.
|
16
|
-
The script should:
|
17
|
-
1. Attempt to read a file that might not exist
|
18
|
-
2. Handle any errors gracefully
|
19
|
-
3. Log the results
|
20
|
-
|
21
|
-
|
22
|
-
# This step invokes the general workflow LLM which can in turn invoke the coding agent.
|
23
|
-
# When the general LLM invokes the coding agent, it will execute with the specified number of retries.
|
24
|
-
- add_tests: |
|
25
|
-
Add test for the feature you just implemented.
|
26
|
-
Run the tests and iterate until they all pass.
|
27
|
-
Use the CodingAgent tool to write the tests.
|
28
|
-
|
29
|
-
add_tests:
|
30
|
-
retries: 4
|