aia 0.9.11 → 0.9.12
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/.version +1 -1
- data/CHANGELOG.md +66 -2
- data/README.md +133 -4
- data/docs/advanced-prompting.md +721 -0
- data/docs/cli-reference.md +582 -0
- data/docs/configuration.md +347 -0
- data/docs/contributing.md +332 -0
- data/docs/directives-reference.md +490 -0
- data/docs/examples/index.md +277 -0
- data/docs/examples/mcp/index.md +479 -0
- data/docs/examples/prompts/analysis/index.md +78 -0
- data/docs/examples/prompts/automation/index.md +108 -0
- data/docs/examples/prompts/development/index.md +125 -0
- data/docs/examples/prompts/index.md +333 -0
- data/docs/examples/prompts/learning/index.md +127 -0
- data/docs/examples/prompts/writing/index.md +62 -0
- data/docs/examples/tools/index.md +292 -0
- data/docs/faq.md +414 -0
- data/docs/guides/available-models.md +366 -0
- data/docs/guides/basic-usage.md +477 -0
- data/docs/guides/chat.md +474 -0
- data/docs/guides/executable-prompts.md +417 -0
- data/docs/guides/first-prompt.md +454 -0
- data/docs/guides/getting-started.md +455 -0
- data/docs/guides/image-generation.md +507 -0
- data/docs/guides/index.md +46 -0
- data/docs/guides/models.md +507 -0
- data/docs/guides/tools.md +856 -0
- data/docs/index.md +173 -0
- data/docs/installation.md +238 -0
- data/docs/mcp-integration.md +612 -0
- data/docs/prompt_management.md +579 -0
- data/docs/security.md +629 -0
- data/docs/tools-and-mcp-examples.md +1186 -0
- data/docs/workflows-and-pipelines.md +563 -0
- data/examples/tools/mcp/github_mcp_server.json +11 -0
- data/examples/tools/mcp/imcp.json +7 -0
- data/lib/aia/chat_processor_service.rb +19 -3
- data/lib/aia/config/base.rb +224 -0
- data/lib/aia/config/cli_parser.rb +409 -0
- data/lib/aia/config/defaults.rb +88 -0
- data/lib/aia/config/file_loader.rb +131 -0
- data/lib/aia/config/validator.rb +184 -0
- data/lib/aia/config.rb +10 -860
- data/lib/aia/directive_processor.rb +27 -372
- data/lib/aia/directives/configuration.rb +114 -0
- data/lib/aia/directives/execution.rb +37 -0
- data/lib/aia/directives/models.rb +178 -0
- data/lib/aia/directives/registry.rb +120 -0
- data/lib/aia/directives/utility.rb +70 -0
- data/lib/aia/directives/web_and_file.rb +71 -0
- data/lib/aia/prompt_handler.rb +23 -3
- data/lib/aia/ruby_llm_adapter.rb +307 -128
- data/lib/aia/session.rb +27 -14
- data/lib/aia/utility.rb +12 -8
- data/lib/aia.rb +11 -2
- data/lib/extensions/ruby_llm/.irbrc +56 -0
- data/mkdocs.yml +165 -0
- metadata +77 -20
- /data/{images → docs/assets/images}/aia.png +0 -0
@@ -0,0 +1,347 @@
|
|
1
|
+
# Configuration
|
2
|
+
|
3
|
+
AIA provides a flexible configuration system with multiple layers of precedence, allowing you to customize behavior at different levels.
|
4
|
+
|
5
|
+
## Configuration Precedence
|
6
|
+
|
7
|
+
AIA follows a hierarchical configuration system (highest to lowest precedence):
|
8
|
+
|
9
|
+
1. **Embedded Directives** - `//config` directives in prompt files
|
10
|
+
2. **Command Line Arguments** - CLI flags and options
|
11
|
+
3. **Environment Variables** - Shell environment variables
|
12
|
+
4. **Configuration Files** - YAML configuration files
|
13
|
+
5. **Defaults** - Built-in default values
|
14
|
+
|
15
|
+
## Configuration Files
|
16
|
+
|
17
|
+
### Primary Configuration File
|
18
|
+
|
19
|
+
The main configuration file is located at `~/.aia/config.yml`:
|
20
|
+
|
21
|
+
```yaml
|
22
|
+
# ~/.aia/config.yml - Main AIA configuration
|
23
|
+
|
24
|
+
# Core Settings
|
25
|
+
adapter: ruby_llm # AI adapter to use (currently only ruby_llm)
|
26
|
+
model: gpt-3.5-turbo # Default AI model
|
27
|
+
prompts_dir: ~/.prompts # Directory containing prompt files
|
28
|
+
roles_prefix: roles # Subdirectory name for role files
|
29
|
+
|
30
|
+
# AI Parameters
|
31
|
+
temperature: 0.7 # Creativity/randomness (0.0-2.0)
|
32
|
+
max_tokens: 2000 # Maximum response length
|
33
|
+
top_p: 1.0 # Nucleus sampling
|
34
|
+
frequency_penalty: 0.0 # Repetition penalty (-2.0 to 2.0)
|
35
|
+
presence_penalty: 0.0 # Topic penalty (-2.0 to 2.0)
|
36
|
+
|
37
|
+
# Output Settings
|
38
|
+
out_file: null # Output file (null = no file output)
|
39
|
+
append: false # Append to output file instead of overwriting
|
40
|
+
markdown: true # Format output with Markdown
|
41
|
+
verbose: false # Show detailed output
|
42
|
+
debug: false # Enable debug logging
|
43
|
+
|
44
|
+
# Chat Settings
|
45
|
+
chat: false # Start in chat mode
|
46
|
+
terse: false # Request shorter AI responses
|
47
|
+
system_prompt: null # Default system prompt for chat
|
48
|
+
|
49
|
+
# Audio/Speech Settings
|
50
|
+
speak: false # Convert text to speech
|
51
|
+
voice: alloy # Voice for speech synthesis
|
52
|
+
speech_model: tts-1 # Model for text-to-speech
|
53
|
+
transcription_model: whisper-1 # Model for speech-to-text
|
54
|
+
|
55
|
+
# Image Generation Settings
|
56
|
+
image_size: 1024x1024 # Default image size
|
57
|
+
image_quality: standard # Image quality (standard/hd)
|
58
|
+
image_style: vivid # Image style (vivid/natural)
|
59
|
+
|
60
|
+
# Search Settings
|
61
|
+
fuzzy: false # Enable fuzzy prompt searching
|
62
|
+
parameter_regex: null # Regex for parameter extraction
|
63
|
+
|
64
|
+
# Tool Settings
|
65
|
+
tool_paths: [] # Paths to tool files/directories
|
66
|
+
allowed_tools: [] # Whitelist of allowed tools
|
67
|
+
rejected_tools: [] # Blacklist of rejected tools
|
68
|
+
require_libs: [] # Ruby libraries to require
|
69
|
+
|
70
|
+
# Workflow Settings
|
71
|
+
pipeline: [] # Default prompt pipeline
|
72
|
+
executable_prompt: false # Run prompts as executables
|
73
|
+
|
74
|
+
# Logging
|
75
|
+
log_file: null # Log file path
|
76
|
+
refresh: 7 # Model database refresh interval (days)
|
77
|
+
```
|
78
|
+
|
79
|
+
### Model-Specific Configuration
|
80
|
+
|
81
|
+
You can create model-specific configuration files:
|
82
|
+
|
83
|
+
```yaml
|
84
|
+
# ~/.aia/models/gpt-4.yml
|
85
|
+
temperature: 0.3
|
86
|
+
max_tokens: 4000
|
87
|
+
top_p: 0.95
|
88
|
+
```
|
89
|
+
|
90
|
+
```yaml
|
91
|
+
# ~/.aia/models/claude-3.yml
|
92
|
+
temperature: 0.5
|
93
|
+
max_tokens: 8000
|
94
|
+
```
|
95
|
+
|
96
|
+
## Environment Variables
|
97
|
+
|
98
|
+
All configuration options can be set via environment variables with the `AIA_` prefix:
|
99
|
+
|
100
|
+
```bash
|
101
|
+
# Core settings
|
102
|
+
export AIA_MODEL="gpt-4"
|
103
|
+
export AIA_TEMPERATURE="0.8"
|
104
|
+
export AIA_PROMPTS_DIR="/path/to/my/prompts"
|
105
|
+
|
106
|
+
# API Keys (handled by RubyLLM)
|
107
|
+
export OPENAI_API_KEY="your_key_here"
|
108
|
+
export ANTHROPIC_API_KEY="your_key_here"
|
109
|
+
export GOOGLE_API_KEY="your_key_here"
|
110
|
+
|
111
|
+
# Chat settings
|
112
|
+
export AIA_CHAT="true"
|
113
|
+
export AIA_VERBOSE="true"
|
114
|
+
export AIA_DEBUG="false"
|
115
|
+
|
116
|
+
# Output settings
|
117
|
+
export AIA_OUT_FILE="/tmp/aia_output.md"
|
118
|
+
export AIA_MARKDOWN="true"
|
119
|
+
```
|
120
|
+
|
121
|
+
## Command Line Arguments
|
122
|
+
|
123
|
+
All options can be overridden via command line arguments. See [CLI Reference](cli-reference.md) for complete details.
|
124
|
+
|
125
|
+
## Embedded Directives
|
126
|
+
|
127
|
+
Prompts can contain configuration directives that override all other settings:
|
128
|
+
|
129
|
+
```markdown
|
130
|
+
//config model claude-3-sonnet
|
131
|
+
//config temperature 0.9
|
132
|
+
//config max_tokens 1500
|
133
|
+
|
134
|
+
Write a creative story about...
|
135
|
+
```
|
136
|
+
|
137
|
+
## Advanced Configuration
|
138
|
+
|
139
|
+
### Multi-Model Configuration
|
140
|
+
|
141
|
+
Configure multiple models with different settings:
|
142
|
+
|
143
|
+
```yaml
|
144
|
+
models:
|
145
|
+
creative_writer:
|
146
|
+
model: gpt-4
|
147
|
+
temperature: 1.2
|
148
|
+
max_tokens: 3000
|
149
|
+
|
150
|
+
code_analyzer:
|
151
|
+
model: claude-3-sonnet
|
152
|
+
temperature: 0.1
|
153
|
+
max_tokens: 4000
|
154
|
+
|
155
|
+
quick_helper:
|
156
|
+
model: gpt-3.5-turbo
|
157
|
+
temperature: 0.7
|
158
|
+
max_tokens: 1000
|
159
|
+
```
|
160
|
+
|
161
|
+
Use with: `aia --model creative_writer my_prompt`
|
162
|
+
|
163
|
+
### Tool Configuration
|
164
|
+
|
165
|
+
Configure tool paths and permissions:
|
166
|
+
|
167
|
+
```yaml
|
168
|
+
# Global tool settings
|
169
|
+
tool_paths:
|
170
|
+
- ~/.aia/tools
|
171
|
+
- /usr/local/share/aia-tools
|
172
|
+
- ./project-tools
|
173
|
+
|
174
|
+
# Tool access control
|
175
|
+
allowed_tools:
|
176
|
+
- file_reader
|
177
|
+
- web_scraper
|
178
|
+
- calculator
|
179
|
+
|
180
|
+
rejected_tools:
|
181
|
+
- system_admin
|
182
|
+
- file_writer
|
183
|
+
```
|
184
|
+
|
185
|
+
### MCP Client Configuration
|
186
|
+
|
187
|
+
Configure Model Context Protocol clients:
|
188
|
+
|
189
|
+
```yaml
|
190
|
+
mcp_clients:
|
191
|
+
- name: github
|
192
|
+
command: ["node", "/path/to/github-mcp-server"]
|
193
|
+
env:
|
194
|
+
GITHUB_TOKEN: "${GITHUB_TOKEN}"
|
195
|
+
|
196
|
+
- name: filesystem
|
197
|
+
command: ["mcp-server-filesystem"]
|
198
|
+
args: ["/allowed/path1", "/allowed/path2"]
|
199
|
+
```
|
200
|
+
|
201
|
+
### Prompt Directory Structure
|
202
|
+
|
203
|
+
Configure how AIA organizes prompts:
|
204
|
+
|
205
|
+
```yaml
|
206
|
+
# Prompt organization
|
207
|
+
prompts_dir: ~/.prompts
|
208
|
+
roles_prefix: roles # ~/.prompts/roles/
|
209
|
+
examples_prefix: examples # ~/.prompts/examples/
|
210
|
+
templates_prefix: templates # ~/.prompts/templates/
|
211
|
+
|
212
|
+
# Search paths (in order)
|
213
|
+
prompt_search_paths:
|
214
|
+
- ~/.prompts
|
215
|
+
- ~/.aia/system_prompts
|
216
|
+
- /usr/local/share/aia-prompts
|
217
|
+
```
|
218
|
+
|
219
|
+
## Configuration Examples
|
220
|
+
|
221
|
+
### Development Setup
|
222
|
+
|
223
|
+
```yaml
|
224
|
+
# ~/.aia/config.yml - Development setup
|
225
|
+
adapter: ruby_llm
|
226
|
+
model: gpt-4
|
227
|
+
temperature: 0.3
|
228
|
+
verbose: true
|
229
|
+
debug: true
|
230
|
+
out_file: ./dev_output.md
|
231
|
+
prompts_dir: ./prompts
|
232
|
+
tool_paths: [./tools]
|
233
|
+
```
|
234
|
+
|
235
|
+
### Production Setup
|
236
|
+
|
237
|
+
```yaml
|
238
|
+
# ~/.aia/config.yml - Production setup
|
239
|
+
adapter: ruby_llm
|
240
|
+
model: gpt-3.5-turbo
|
241
|
+
temperature: 0.7
|
242
|
+
verbose: false
|
243
|
+
debug: false
|
244
|
+
log_file: /var/log/aia.log
|
245
|
+
prompts_dir: /etc/aia/prompts
|
246
|
+
tool_paths: [/usr/share/aia-tools]
|
247
|
+
allowed_tools: [safe_calculator, file_reader]
|
248
|
+
```
|
249
|
+
|
250
|
+
### Creative Writing Setup
|
251
|
+
|
252
|
+
```yaml
|
253
|
+
# ~/.aia/config.yml - Creative writing
|
254
|
+
adapter: ruby_llm
|
255
|
+
model: gpt-4
|
256
|
+
temperature: 1.1
|
257
|
+
max_tokens: 4000
|
258
|
+
speak: true
|
259
|
+
voice: nova
|
260
|
+
markdown: true
|
261
|
+
out_file: ~/writing/aia_output.md
|
262
|
+
append: true
|
263
|
+
```
|
264
|
+
|
265
|
+
## Validation and Troubleshooting
|
266
|
+
|
267
|
+
### Check Configuration
|
268
|
+
|
269
|
+
Dump current configuration:
|
270
|
+
|
271
|
+
```bash
|
272
|
+
aia --dump config.yaml
|
273
|
+
```
|
274
|
+
|
275
|
+
### Validate Settings
|
276
|
+
|
277
|
+
```bash
|
278
|
+
# Test model access
|
279
|
+
aia --available_models
|
280
|
+
|
281
|
+
# Test configuration
|
282
|
+
aia --debug --verbose hello_world
|
283
|
+
|
284
|
+
# Test tools
|
285
|
+
aia --tools ./my_tools --debug test_prompt
|
286
|
+
```
|
287
|
+
|
288
|
+
### Common Issues
|
289
|
+
|
290
|
+
#### Model Not Found
|
291
|
+
- Check your API keys are set
|
292
|
+
- Verify the model name: `aia --available_models`
|
293
|
+
- Check network connectivity
|
294
|
+
|
295
|
+
#### Permission Errors
|
296
|
+
- Verify file permissions on config directory
|
297
|
+
- Check tool file permissions
|
298
|
+
- Ensure API keys are correctly set
|
299
|
+
|
300
|
+
#### Tool Loading Errors
|
301
|
+
- Verify tool paths exist and are readable
|
302
|
+
- Check Ruby syntax in tool files
|
303
|
+
- Use `--debug` to see detailed error messages
|
304
|
+
|
305
|
+
## Configuration Migration
|
306
|
+
|
307
|
+
### Updating from Older Versions
|
308
|
+
|
309
|
+
AIA automatically migrates older configuration formats. To manually update:
|
310
|
+
|
311
|
+
```bash
|
312
|
+
# Backup current config
|
313
|
+
cp ~/.aia/config.yml ~/.aia/config.yml.backup
|
314
|
+
|
315
|
+
# Update configuration format
|
316
|
+
aia --migrate-config
|
317
|
+
```
|
318
|
+
|
319
|
+
### Configuration Templates
|
320
|
+
|
321
|
+
Generate configuration templates:
|
322
|
+
|
323
|
+
```bash
|
324
|
+
# Generate basic config
|
325
|
+
aia --generate-config basic > ~/.aia/config.yml
|
326
|
+
|
327
|
+
# Generate advanced config with all options
|
328
|
+
aia --generate-config full > ~/.aia/config.advanced.yml
|
329
|
+
```
|
330
|
+
|
331
|
+
## Best Practices
|
332
|
+
|
333
|
+
1. **Use Environment Variables** for sensitive data like API keys
|
334
|
+
2. **Use Configuration Files** for stable settings
|
335
|
+
3. **Use Command Line Arguments** for temporary overrides
|
336
|
+
4. **Use Embedded Directives** for prompt-specific settings
|
337
|
+
5. **Version Control** your configuration (excluding secrets)
|
338
|
+
6. **Test Changes** with `--debug` and `--verbose` flags
|
339
|
+
7. **Document Custom Configurations** for team sharing
|
340
|
+
|
341
|
+
## Security Considerations
|
342
|
+
|
343
|
+
- Never commit API keys to version control
|
344
|
+
- Use restrictive file permissions on config files: `chmod 600 ~/.aia/config.yml`
|
345
|
+
- Limit tool access with `allowed_tools` in production
|
346
|
+
- Use separate configurations for different environments
|
347
|
+
- Regularly rotate API keys
|
@@ -0,0 +1,332 @@
|
|
1
|
+
# Contributing to AIA
|
2
|
+
|
3
|
+
We welcome contributions to AIA! This guide will help you get started with contributing to the project.
|
4
|
+
|
5
|
+
## Ways to Contribute
|
6
|
+
|
7
|
+
### 1. Report Issues
|
8
|
+
- **Bug Reports**: Found a bug? Please report it with detailed steps to reproduce
|
9
|
+
- **Feature Requests**: Have an idea for a new feature? We'd love to hear about it
|
10
|
+
- **Documentation Issues**: Spot errors or areas for improvement in documentation
|
11
|
+
|
12
|
+
### 2. Submit Code Changes
|
13
|
+
- **Bug Fixes**: Help fix reported issues
|
14
|
+
- **New Features**: Implement requested features or propose new ones
|
15
|
+
- **Performance Improvements**: Optimize existing code
|
16
|
+
- **Tests**: Improve test coverage and quality
|
17
|
+
|
18
|
+
### 3. Improve Documentation
|
19
|
+
- **User Guides**: Help improve user-facing documentation
|
20
|
+
- **Code Comments**: Add or improve inline documentation
|
21
|
+
- **Examples**: Contribute new examples or improve existing ones
|
22
|
+
- **Tutorials**: Create learning materials for new users
|
23
|
+
|
24
|
+
### 4. Contribute Examples
|
25
|
+
- **Prompts**: Share useful prompt templates
|
26
|
+
- **Tools**: Create Ruby tools that extend AIA's capabilities
|
27
|
+
- **MCP Clients**: Develop Model Context Protocol integrations
|
28
|
+
|
29
|
+
## Getting Started
|
30
|
+
|
31
|
+
### Prerequisites
|
32
|
+
- Ruby 3.0+ installed
|
33
|
+
- Git for version control
|
34
|
+
- Familiarity with AI/LLM concepts
|
35
|
+
- Understanding of command-line tools
|
36
|
+
|
37
|
+
### Setting Up Development Environment
|
38
|
+
|
39
|
+
1. **Fork and Clone**
|
40
|
+
```bash
|
41
|
+
git clone https://github.com/your-username/aia.git
|
42
|
+
cd aia
|
43
|
+
```
|
44
|
+
|
45
|
+
2. **Install Dependencies**
|
46
|
+
```bash
|
47
|
+
bundle install
|
48
|
+
```
|
49
|
+
|
50
|
+
3. **Run Tests**
|
51
|
+
```bash
|
52
|
+
rake test
|
53
|
+
```
|
54
|
+
|
55
|
+
4. **Create Feature Branch**
|
56
|
+
```bash
|
57
|
+
git checkout -b feature/your-feature-name
|
58
|
+
```
|
59
|
+
|
60
|
+
## Development Guidelines
|
61
|
+
|
62
|
+
### Code Standards
|
63
|
+
|
64
|
+
#### Ruby Style Guide
|
65
|
+
- Follow Ruby community conventions
|
66
|
+
- Use descriptive variable and method names
|
67
|
+
- Write clear, concise comments
|
68
|
+
- Maintain consistent indentation (2 spaces)
|
69
|
+
- Keep line length under 120 characters
|
70
|
+
|
71
|
+
#### Testing Requirements
|
72
|
+
- Write tests for all new functionality
|
73
|
+
- Maintain or improve test coverage
|
74
|
+
- Use descriptive test names
|
75
|
+
- Include both unit and integration tests
|
76
|
+
|
77
|
+
#### Documentation Standards
|
78
|
+
- Update README if needed
|
79
|
+
- Add inline documentation for public methods
|
80
|
+
- Include usage examples
|
81
|
+
- Update CHANGELOG.md for user-facing changes
|
82
|
+
|
83
|
+
### Commit Message Format
|
84
|
+
|
85
|
+
Use clear, descriptive commit messages following this format:
|
86
|
+
|
87
|
+
```
|
88
|
+
type(scope): brief description
|
89
|
+
|
90
|
+
Longer description if needed
|
91
|
+
|
92
|
+
- List key changes
|
93
|
+
- Include breaking changes
|
94
|
+
- Reference issues: Fixes #123
|
95
|
+
```
|
96
|
+
|
97
|
+
**Types:**
|
98
|
+
- `feat`: New feature
|
99
|
+
- `fix`: Bug fix
|
100
|
+
- `docs`: Documentation changes
|
101
|
+
- `test`: Test-related changes
|
102
|
+
- `refactor`: Code refactoring
|
103
|
+
- `perf`: Performance improvements
|
104
|
+
|
105
|
+
**Examples:**
|
106
|
+
```
|
107
|
+
feat(cli): add --fuzzy flag for prompt selection
|
108
|
+
|
109
|
+
fix(config): resolve issue with nested YAML parsing
|
110
|
+
|
111
|
+
docs(examples): add MCP client integration examples
|
112
|
+
```
|
113
|
+
|
114
|
+
## Contributing Examples
|
115
|
+
|
116
|
+
### Prompt Examples
|
117
|
+
|
118
|
+
#### File Structure
|
119
|
+
```
|
120
|
+
docs/examples/prompts/category/
|
121
|
+
├── index.md # Category overview
|
122
|
+
├── example_name.txt # Prompt file
|
123
|
+
└── example_name_usage.md # Usage documentation
|
124
|
+
```
|
125
|
+
|
126
|
+
#### Prompt Template Format
|
127
|
+
```markdown
|
128
|
+
# Prompt Title
|
129
|
+
|
130
|
+
Brief description of what this prompt does.
|
131
|
+
|
132
|
+
## Prerequisites
|
133
|
+
- List any required setup
|
134
|
+
- Dependencies or tools needed
|
135
|
+
- API keys or configurations
|
136
|
+
|
137
|
+
## Usage
|
138
|
+
```bash
|
139
|
+
aia prompt_name input_file.txt
|
140
|
+
```
|
141
|
+
|
142
|
+
## Customization
|
143
|
+
Explain how users can modify the prompt for their needs.
|
144
|
+
|
145
|
+
## Related Examples
|
146
|
+
- Link to similar or complementary examples
|
147
|
+
```
|
148
|
+
|
149
|
+
### Tool Examples
|
150
|
+
|
151
|
+
#### File Structure
|
152
|
+
```
|
153
|
+
docs/examples/tools/
|
154
|
+
├── index.md # Tools overview
|
155
|
+
├── tool_name.rb # Ruby tool implementation
|
156
|
+
└── tool_name_usage.md # Documentation
|
157
|
+
```
|
158
|
+
|
159
|
+
#### Tool Template
|
160
|
+
```ruby
|
161
|
+
# Tool implementation following RubyLLM::Tool pattern
|
162
|
+
class ToolName < RubyLLM::Tool
|
163
|
+
description "Brief description of tool functionality"
|
164
|
+
|
165
|
+
def method_name(parameter1, parameter2 = nil)
|
166
|
+
# Implementation with error handling
|
167
|
+
# Return structured results
|
168
|
+
end
|
169
|
+
|
170
|
+
private
|
171
|
+
|
172
|
+
def helper_method
|
173
|
+
# Internal helper methods
|
174
|
+
end
|
175
|
+
end
|
176
|
+
```
|
177
|
+
|
178
|
+
### MCP Client Examples
|
179
|
+
|
180
|
+
#### File Structure
|
181
|
+
```
|
182
|
+
docs/examples/mcp/
|
183
|
+
├── index.md # MCP overview
|
184
|
+
├── client_name.py # Python MCP client
|
185
|
+
├── client_name.js # Node.js MCP client
|
186
|
+
└── client_name_usage.md # Documentation
|
187
|
+
```
|
188
|
+
|
189
|
+
## Pull Request Process
|
190
|
+
|
191
|
+
### Before Submitting
|
192
|
+
1. **Test Your Changes**
|
193
|
+
```bash
|
194
|
+
rake test
|
195
|
+
rake integration_test
|
196
|
+
```
|
197
|
+
|
198
|
+
2. **Check Code Quality**
|
199
|
+
```bash
|
200
|
+
rubocop
|
201
|
+
reek
|
202
|
+
```
|
203
|
+
|
204
|
+
3. **Update Documentation**
|
205
|
+
- Add/update relevant documentation
|
206
|
+
- Include examples if applicable
|
207
|
+
- Update CHANGELOG.md
|
208
|
+
|
209
|
+
### Submitting the Pull Request
|
210
|
+
|
211
|
+
1. **Create Descriptive Title**
|
212
|
+
- Use the same format as commit messages
|
213
|
+
- Be specific about what changed
|
214
|
+
|
215
|
+
2. **Write Comprehensive Description**
|
216
|
+
```markdown
|
217
|
+
## Summary
|
218
|
+
Brief description of changes
|
219
|
+
|
220
|
+
## Changes Made
|
221
|
+
- List key changes
|
222
|
+
- Explain design decisions
|
223
|
+
- Note any breaking changes
|
224
|
+
|
225
|
+
## Testing
|
226
|
+
- Describe testing performed
|
227
|
+
- Include test results if relevant
|
228
|
+
|
229
|
+
## Documentation
|
230
|
+
- List documentation updates
|
231
|
+
- Include screenshots if applicable
|
232
|
+
```
|
233
|
+
|
234
|
+
3. **Checklist**
|
235
|
+
- [ ] Tests pass locally
|
236
|
+
- [ ] Code follows style guidelines
|
237
|
+
- [ ] Documentation updated
|
238
|
+
- [ ] CHANGELOG.md updated (if user-facing)
|
239
|
+
- [ ] No breaking changes (or documented)
|
240
|
+
|
241
|
+
### Review Process
|
242
|
+
- Maintainers will review your pull request
|
243
|
+
- Address feedback promptly and professionally
|
244
|
+
- Be open to suggestions and improvements
|
245
|
+
- Update your PR based on review comments
|
246
|
+
|
247
|
+
## Community Guidelines
|
248
|
+
|
249
|
+
### Communication
|
250
|
+
- **Be Respectful**: Treat all community members with respect
|
251
|
+
- **Be Constructive**: Provide helpful, actionable feedback
|
252
|
+
- **Be Patient**: Maintainers and contributors are volunteers
|
253
|
+
- **Be Collaborative**: Work together to improve the project
|
254
|
+
|
255
|
+
### Issue Reporting
|
256
|
+
- **Search First**: Check if the issue already exists
|
257
|
+
- **Be Specific**: Provide detailed reproduction steps
|
258
|
+
- **Include Context**: OS, Ruby version, AIA version
|
259
|
+
- **Provide Examples**: Include relevant code or configuration
|
260
|
+
|
261
|
+
### Feature Requests
|
262
|
+
- **Describe Use Case**: Explain why the feature is needed
|
263
|
+
- **Consider Alternatives**: Discuss other approaches
|
264
|
+
- **Be Open to Discussion**: Feature scope may evolve
|
265
|
+
|
266
|
+
## Security
|
267
|
+
|
268
|
+
### Reporting Security Issues
|
269
|
+
- **Do NOT** create public GitHub issues for security vulnerabilities
|
270
|
+
- Email security issues to: [maintainer-email]
|
271
|
+
- Include detailed description and reproduction steps
|
272
|
+
- Allow reasonable time for response before public disclosure
|
273
|
+
|
274
|
+
### Security Best Practices
|
275
|
+
- Never commit API keys or secrets
|
276
|
+
- Validate all user inputs
|
277
|
+
- Use secure defaults in configurations
|
278
|
+
- Follow principle of least privilege
|
279
|
+
|
280
|
+
## Recognition
|
281
|
+
|
282
|
+
### Contributors
|
283
|
+
All contributors are recognized in:
|
284
|
+
- CONTRIBUTORS.md file
|
285
|
+
- Release notes for significant contributions
|
286
|
+
- GitHub contributor statistics
|
287
|
+
|
288
|
+
### Types of Recognition
|
289
|
+
- **Code Contributors**: Code, tests, bug fixes
|
290
|
+
- **Documentation Contributors**: Guides, examples, documentation
|
291
|
+
- **Community Contributors**: Issue triage, user support
|
292
|
+
- **Maintainers**: Ongoing project stewardship
|
293
|
+
|
294
|
+
## Getting Help
|
295
|
+
|
296
|
+
### Development Questions
|
297
|
+
- **GitHub Discussions**: For general questions and ideas
|
298
|
+
- **Issues**: For specific bugs or feature requests
|
299
|
+
- **Documentation**: Check existing guides and examples
|
300
|
+
|
301
|
+
### Code Review
|
302
|
+
- Ask for reviews in PR comments
|
303
|
+
- Mention specific maintainers if needed
|
304
|
+
- Be patient - reviews take time
|
305
|
+
|
306
|
+
### Community Support
|
307
|
+
- Help other contributors
|
308
|
+
- Share knowledge and experience
|
309
|
+
- Mentor new contributors
|
310
|
+
|
311
|
+
## Release Process
|
312
|
+
|
313
|
+
### Version Management
|
314
|
+
AIA follows semantic versioning (SemVer):
|
315
|
+
- **MAJOR**: Breaking changes
|
316
|
+
- **MINOR**: New features, backward compatible
|
317
|
+
- **PATCH**: Bug fixes, backward compatible
|
318
|
+
|
319
|
+
### Release Schedule
|
320
|
+
- No fixed schedule - releases when ready
|
321
|
+
- Security fixes released promptly
|
322
|
+
- Feature releases coordinated with maintainers
|
323
|
+
|
324
|
+
## Thank You!
|
325
|
+
|
326
|
+
Thank you for considering contributing to AIA! Your contributions help make this tool better for everyone in the AI community.
|
327
|
+
|
328
|
+
Questions? Feel free to open an issue or start a discussion on GitHub.
|
329
|
+
|
330
|
+
---
|
331
|
+
|
332
|
+
*Last updated: December 2024*
|