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,479 @@
|
|
1
|
+
# MCP Examples
|
2
|
+
|
3
|
+
Collection of Model Context Protocol (MCP) client examples and configurations for extending AIA with external services.
|
4
|
+
|
5
|
+
## Available MCP Clients
|
6
|
+
|
7
|
+
### GitHub Integration
|
8
|
+
- **github_analyzer.py** - Comprehensive GitHub repository analysis
|
9
|
+
- **github_issue_manager.js** - Issue tracking and management
|
10
|
+
- **github_pr_analyzer.py** - Pull request analysis and review
|
11
|
+
- **github_metrics.rb** - Repository metrics and statistics
|
12
|
+
|
13
|
+
### File System Access
|
14
|
+
- **filesystem_analyzer.py** - Safe file system analysis
|
15
|
+
- **directory_scanner.js** - Directory structure analysis
|
16
|
+
- **file_watcher.py** - File change monitoring
|
17
|
+
- **backup_manager.go** - File backup and versioning
|
18
|
+
|
19
|
+
### Database Integration
|
20
|
+
- **postgres_analyzer.py** - PostgreSQL database analysis
|
21
|
+
- **mysql_connector.js** - MySQL database operations
|
22
|
+
- **sqlite_manager.py** - SQLite database management
|
23
|
+
- **schema_validator.rb** - Database schema validation
|
24
|
+
|
25
|
+
### API Integration
|
26
|
+
- **rest_client.py** - RESTful API client and testing
|
27
|
+
- **graphql_client.js** - GraphQL query and analysis
|
28
|
+
- **webhook_server.py** - Webhook handling and processing
|
29
|
+
- **api_monitor.go** - API performance monitoring
|
30
|
+
|
31
|
+
### Development Tools
|
32
|
+
- **docker_manager.py** - Docker container management
|
33
|
+
- **kubernetes_analyzer.js** - Kubernetes cluster analysis
|
34
|
+
- **ci_cd_monitor.py** - CI/CD pipeline monitoring
|
35
|
+
- **log_aggregator.rb** - Distributed log collection
|
36
|
+
|
37
|
+
## MCP Client Structure
|
38
|
+
|
39
|
+
MCP clients follow the Model Context Protocol specification:
|
40
|
+
|
41
|
+
### Python MCP Server
|
42
|
+
```python
|
43
|
+
from mcp.server import Server
|
44
|
+
from mcp.types import Resource, Tool, TextContent
|
45
|
+
import asyncio
|
46
|
+
|
47
|
+
server = Server("client-name", "1.0.0")
|
48
|
+
|
49
|
+
@server.list_tools()
|
50
|
+
async def list_tools():
|
51
|
+
return [
|
52
|
+
Tool(
|
53
|
+
name="tool_name",
|
54
|
+
description="Tool description",
|
55
|
+
inputSchema={
|
56
|
+
"type": "object",
|
57
|
+
"properties": {
|
58
|
+
"param": {"type": "string"}
|
59
|
+
},
|
60
|
+
"required": ["param"]
|
61
|
+
}
|
62
|
+
)
|
63
|
+
]
|
64
|
+
|
65
|
+
@server.call_tool()
|
66
|
+
async def call_tool(name: str, arguments: dict):
|
67
|
+
if name == "tool_name":
|
68
|
+
result = process_request(arguments["param"])
|
69
|
+
return TextContent(type="text", text=result)
|
70
|
+
|
71
|
+
if __name__ == "__main__":
|
72
|
+
asyncio.run(server.run())
|
73
|
+
```
|
74
|
+
|
75
|
+
### Node.js MCP Server
|
76
|
+
```javascript
|
77
|
+
const { Server } = require('@anthropic-ai/mcp-sdk/server');
|
78
|
+
|
79
|
+
const server = new Server('client-name', '1.0.0');
|
80
|
+
|
81
|
+
server.setRequestHandler('tools/list', async () => {
|
82
|
+
return {
|
83
|
+
tools: [{
|
84
|
+
name: 'tool_name',
|
85
|
+
description: 'Tool description',
|
86
|
+
inputSchema: {
|
87
|
+
type: 'object',
|
88
|
+
properties: {
|
89
|
+
param: { type: 'string' }
|
90
|
+
},
|
91
|
+
required: ['param']
|
92
|
+
}
|
93
|
+
}]
|
94
|
+
};
|
95
|
+
});
|
96
|
+
|
97
|
+
server.setRequestHandler('tools/call', async (request) => {
|
98
|
+
const { name, arguments: args } = request.params;
|
99
|
+
|
100
|
+
if (name === 'tool_name') {
|
101
|
+
const result = processRequest(args.param);
|
102
|
+
return { content: [{ type: 'text', text: result }] };
|
103
|
+
}
|
104
|
+
});
|
105
|
+
|
106
|
+
server.connect();
|
107
|
+
```
|
108
|
+
|
109
|
+
## Configuration Examples
|
110
|
+
|
111
|
+
### Basic MCP Configuration
|
112
|
+
```yaml
|
113
|
+
# ~/.aia/config.yml
|
114
|
+
mcp:
|
115
|
+
enabled: true
|
116
|
+
clients:
|
117
|
+
- name: github
|
118
|
+
command: ["python", "github_analyzer.py"]
|
119
|
+
env:
|
120
|
+
GITHUB_TOKEN: "${GITHUB_TOKEN}"
|
121
|
+
|
122
|
+
- name: filesystem
|
123
|
+
command: ["node", "filesystem_analyzer.js"]
|
124
|
+
args: ["/allowed/path"]
|
125
|
+
|
126
|
+
- name: database
|
127
|
+
command: ["python", "postgres_analyzer.py"]
|
128
|
+
env:
|
129
|
+
DATABASE_URL: "${DATABASE_URL}"
|
130
|
+
```
|
131
|
+
|
132
|
+
### Advanced MCP Configuration
|
133
|
+
```yaml
|
134
|
+
mcp:
|
135
|
+
enabled: true
|
136
|
+
security:
|
137
|
+
sandbox_mode: true
|
138
|
+
timeout: 30000 # 30 seconds
|
139
|
+
max_memory: "512MB"
|
140
|
+
|
141
|
+
clients:
|
142
|
+
- name: github
|
143
|
+
command: ["python", "mcp_clients/github_analyzer.py"]
|
144
|
+
working_directory: "/opt/aia-mcp"
|
145
|
+
env:
|
146
|
+
GITHUB_TOKEN: "${GITHUB_TOKEN}"
|
147
|
+
LOG_LEVEL: "INFO"
|
148
|
+
security:
|
149
|
+
network_access: true
|
150
|
+
file_access: false
|
151
|
+
|
152
|
+
- name: filesystem
|
153
|
+
command: ["node", "mcp_clients/filesystem_analyzer.js"]
|
154
|
+
args: ["/home/user/projects", "/tmp/workspace"]
|
155
|
+
security:
|
156
|
+
network_access: false
|
157
|
+
file_access: true
|
158
|
+
allowed_paths: ["/home/user/projects", "/tmp"]
|
159
|
+
|
160
|
+
- name: database
|
161
|
+
command: ["python", "mcp_clients/postgres_analyzer.py"]
|
162
|
+
env:
|
163
|
+
DATABASE_URL: "${READ_ONLY_DB_URL}"
|
164
|
+
MAX_QUERY_TIME: "10000"
|
165
|
+
security:
|
166
|
+
network_access: true
|
167
|
+
file_access: false
|
168
|
+
read_only: true
|
169
|
+
```
|
170
|
+
|
171
|
+
## Usage Examples
|
172
|
+
|
173
|
+
### GitHub Repository Analysis
|
174
|
+
```bash
|
175
|
+
# Configure GitHub MCP client
|
176
|
+
export GITHUB_TOKEN="your_github_token"
|
177
|
+
|
178
|
+
# Use in AIA prompt
|
179
|
+
aia --mcp github repo_analysis --owner microsoft --repo vscode
|
180
|
+
```
|
181
|
+
|
182
|
+
```markdown
|
183
|
+
# github_analysis.txt
|
184
|
+
//mcp github
|
185
|
+
|
186
|
+
# GitHub Repository Analysis
|
187
|
+
|
188
|
+
Repository: <%= owner %>/<%= repo %>
|
189
|
+
|
190
|
+
Analyze the repository and provide:
|
191
|
+
1. Repository health and activity metrics
|
192
|
+
2. Code quality and organization assessment
|
193
|
+
3. Issue and PR management effectiveness
|
194
|
+
4. Contributor activity and patterns
|
195
|
+
5. Security and maintenance status
|
196
|
+
|
197
|
+
Generate comprehensive analysis with recommendations.
|
198
|
+
```
|
199
|
+
|
200
|
+
### Database Schema Analysis
|
201
|
+
```bash
|
202
|
+
# Configure database MCP client
|
203
|
+
export DATABASE_URL="postgresql://user:pass@localhost/db"
|
204
|
+
|
205
|
+
# Use in AIA prompt
|
206
|
+
aia --mcp database schema_analysis --schema public
|
207
|
+
```
|
208
|
+
|
209
|
+
```markdown
|
210
|
+
# database_analysis.txt
|
211
|
+
//mcp database
|
212
|
+
|
213
|
+
# Database Schema Analysis
|
214
|
+
|
215
|
+
Schema: <%= schema %>
|
216
|
+
|
217
|
+
Perform comprehensive database analysis:
|
218
|
+
1. Table structure and relationships
|
219
|
+
2. Index optimization opportunities
|
220
|
+
3. Data quality assessment
|
221
|
+
4. Performance bottlenecks
|
222
|
+
5. Security considerations
|
223
|
+
|
224
|
+
Provide actionable optimization recommendations.
|
225
|
+
```
|
226
|
+
|
227
|
+
### Multi-Client Integration
|
228
|
+
```markdown
|
229
|
+
# comprehensive_project_audit.txt
|
230
|
+
//mcp github,filesystem,database
|
231
|
+
|
232
|
+
# Comprehensive Project Audit
|
233
|
+
|
234
|
+
Project: <%= project_name %>
|
235
|
+
|
236
|
+
## Phase 1: Repository Analysis (GitHub MCP)
|
237
|
+
- Repository health and activity
|
238
|
+
- Code review processes
|
239
|
+
- Issue management effectiveness
|
240
|
+
- Release and deployment practices
|
241
|
+
|
242
|
+
## Phase 2: File System Analysis (Filesystem MCP)
|
243
|
+
- Project structure and organization
|
244
|
+
- Configuration management
|
245
|
+
- Documentation completeness
|
246
|
+
- Security file analysis
|
247
|
+
|
248
|
+
## Phase 3: Database Analysis (Database MCP)
|
249
|
+
- Schema design and integrity
|
250
|
+
- Performance optimization
|
251
|
+
- Data quality assessment
|
252
|
+
- Security configuration
|
253
|
+
|
254
|
+
## Integration Analysis
|
255
|
+
Cross-analyze findings from all systems to identify:
|
256
|
+
- Consistency across different layers
|
257
|
+
- Integration gaps and opportunities
|
258
|
+
- Security vulnerabilities
|
259
|
+
- Performance optimization priorities
|
260
|
+
|
261
|
+
Generate unified recommendations with implementation priority.
|
262
|
+
```
|
263
|
+
|
264
|
+
## Security Considerations
|
265
|
+
|
266
|
+
### MCP Security Best Practices
|
267
|
+
```yaml
|
268
|
+
# Secure MCP configuration
|
269
|
+
mcp:
|
270
|
+
security:
|
271
|
+
# Global security settings
|
272
|
+
default_timeout: 30000
|
273
|
+
max_memory_per_client: "256MB"
|
274
|
+
sandbox_mode: true
|
275
|
+
|
276
|
+
# Network restrictions
|
277
|
+
allowed_domains: ["api.github.com", "localhost"]
|
278
|
+
blocked_domains: ["*.suspicious-domain.com"]
|
279
|
+
|
280
|
+
# File system restrictions
|
281
|
+
allowed_paths: ["/home/user/projects", "/tmp/aia-workspace"]
|
282
|
+
blocked_paths: ["/etc", "/var", "/usr"]
|
283
|
+
|
284
|
+
clients:
|
285
|
+
- name: github
|
286
|
+
security_profile: "network_only"
|
287
|
+
allowed_operations: ["read", "list"]
|
288
|
+
blocked_operations: ["write", "delete"]
|
289
|
+
|
290
|
+
- name: filesystem
|
291
|
+
security_profile: "filesystem_readonly"
|
292
|
+
max_file_size: "10MB"
|
293
|
+
max_files_per_request: 100
|
294
|
+
|
295
|
+
- name: database
|
296
|
+
security_profile: "database_readonly"
|
297
|
+
query_timeout: 10000
|
298
|
+
max_rows_per_query: 1000
|
299
|
+
```
|
300
|
+
|
301
|
+
### Access Control
|
302
|
+
```python
|
303
|
+
# MCP client with access control
|
304
|
+
class SecureGitHubAnalyzer:
|
305
|
+
def __init__(self, allowed_operations=None):
|
306
|
+
self.allowed_operations = allowed_operations or ['read', 'list']
|
307
|
+
|
308
|
+
async def analyze_repository(self, owner, repo):
|
309
|
+
if 'read' not in self.allowed_operations:
|
310
|
+
raise PermissionError("Read access not allowed")
|
311
|
+
|
312
|
+
# Safe repository analysis
|
313
|
+
return await self._safe_analyze(owner, repo)
|
314
|
+
|
315
|
+
async def _safe_analyze(self, owner, repo):
|
316
|
+
# Implementation with safety checks
|
317
|
+
pass
|
318
|
+
```
|
319
|
+
|
320
|
+
## Performance Optimization
|
321
|
+
|
322
|
+
### Caching Strategies
|
323
|
+
```python
|
324
|
+
# MCP client with caching
|
325
|
+
import asyncio
|
326
|
+
from datetime import datetime, timedelta
|
327
|
+
import json
|
328
|
+
|
329
|
+
class CachedMCPClient:
|
330
|
+
def __init__(self):
|
331
|
+
self.cache = {}
|
332
|
+
self.cache_ttl = timedelta(hours=1)
|
333
|
+
|
334
|
+
async def cached_request(self, cache_key, request_func, *args):
|
335
|
+
now = datetime.now()
|
336
|
+
|
337
|
+
if cache_key in self.cache:
|
338
|
+
cached_result, timestamp = self.cache[cache_key]
|
339
|
+
if now - timestamp < self.cache_ttl:
|
340
|
+
return cached_result
|
341
|
+
|
342
|
+
# Fetch new data
|
343
|
+
result = await request_func(*args)
|
344
|
+
self.cache[cache_key] = (result, now)
|
345
|
+
return result
|
346
|
+
```
|
347
|
+
|
348
|
+
### Connection Pooling
|
349
|
+
```javascript
|
350
|
+
// Node.js MCP client with connection pooling
|
351
|
+
const { Pool } = require('pg');
|
352
|
+
|
353
|
+
class DatabaseMCPClient {
|
354
|
+
constructor() {
|
355
|
+
this.pool = new Pool({
|
356
|
+
max: 10,
|
357
|
+
idleTimeoutMillis: 30000,
|
358
|
+
connectionTimeoutMillis: 2000,
|
359
|
+
});
|
360
|
+
}
|
361
|
+
|
362
|
+
async query(sql, params) {
|
363
|
+
const client = await this.pool.connect();
|
364
|
+
try {
|
365
|
+
const result = await client.query(sql, params);
|
366
|
+
return result;
|
367
|
+
} finally {
|
368
|
+
client.release();
|
369
|
+
}
|
370
|
+
}
|
371
|
+
}
|
372
|
+
```
|
373
|
+
|
374
|
+
## Troubleshooting
|
375
|
+
|
376
|
+
### Common MCP Issues
|
377
|
+
|
378
|
+
#### Connection Failures
|
379
|
+
```bash
|
380
|
+
# Debug MCP client connections
|
381
|
+
aia --debug --mcp github test_connection
|
382
|
+
|
383
|
+
# Check client process status
|
384
|
+
ps aux | grep mcp
|
385
|
+
|
386
|
+
# Test client directly
|
387
|
+
python github_analyzer.py --test
|
388
|
+
```
|
389
|
+
|
390
|
+
#### Protocol Errors
|
391
|
+
```yaml
|
392
|
+
# Enable detailed MCP logging
|
393
|
+
mcp:
|
394
|
+
logging:
|
395
|
+
level: debug
|
396
|
+
file: /var/log/aia-mcp.log
|
397
|
+
include_request_response: true
|
398
|
+
|
399
|
+
error_handling:
|
400
|
+
retry_attempts: 3
|
401
|
+
retry_delay: 1000
|
402
|
+
fallback_mode: graceful
|
403
|
+
```
|
404
|
+
|
405
|
+
#### Performance Issues
|
406
|
+
```python
|
407
|
+
# MCP performance monitoring
|
408
|
+
import time
|
409
|
+
import logging
|
410
|
+
|
411
|
+
class PerformanceMCP:
|
412
|
+
def __init__(self):
|
413
|
+
self.logger = logging.getLogger('mcp_performance')
|
414
|
+
|
415
|
+
async def timed_operation(self, operation_name, func, *args):
|
416
|
+
start_time = time.time()
|
417
|
+
try:
|
418
|
+
result = await func(*args)
|
419
|
+
duration = time.time() - start_time
|
420
|
+
self.logger.info(f"{operation_name}: {duration:.2f}s")
|
421
|
+
return result
|
422
|
+
except Exception as e:
|
423
|
+
duration = time.time() - start_time
|
424
|
+
self.logger.error(f"{operation_name} failed after {duration:.2f}s: {e}")
|
425
|
+
raise
|
426
|
+
```
|
427
|
+
|
428
|
+
## Development Guidelines
|
429
|
+
|
430
|
+
### MCP Client Development
|
431
|
+
1. **Follow Protocol** - Implement MCP specification correctly
|
432
|
+
2. **Error Handling** - Comprehensive error handling and reporting
|
433
|
+
3. **Security First** - Validate inputs and limit access
|
434
|
+
4. **Performance** - Optimize for concurrent requests
|
435
|
+
5. **Testing** - Include unit and integration tests
|
436
|
+
|
437
|
+
### Example Test Suite
|
438
|
+
```python
|
439
|
+
# test_github_mcp.py
|
440
|
+
import pytest
|
441
|
+
import asyncio
|
442
|
+
from unittest.mock import patch
|
443
|
+
from github_analyzer import GitHubAnalyzer
|
444
|
+
|
445
|
+
@pytest.fixture
|
446
|
+
def analyzer():
|
447
|
+
return GitHubAnalyzer()
|
448
|
+
|
449
|
+
@pytest.mark.asyncio
|
450
|
+
async def test_repository_analysis(analyzer):
|
451
|
+
with patch('aiohttp.ClientSession.get') as mock_get:
|
452
|
+
mock_get.return_value.__aenter__.return_value.json.return_value = {
|
453
|
+
'name': 'test-repo',
|
454
|
+
'stargazers_count': 100
|
455
|
+
}
|
456
|
+
|
457
|
+
result = await analyzer.analyze_repository('owner', 'repo')
|
458
|
+
assert result['repository']['name'] == 'test-repo'
|
459
|
+
assert result['repository']['stars'] == 100
|
460
|
+
|
461
|
+
@pytest.mark.asyncio
|
462
|
+
async def test_error_handling(analyzer):
|
463
|
+
with patch('aiohttp.ClientSession.get') as mock_get:
|
464
|
+
mock_get.side_effect = Exception("Network error")
|
465
|
+
|
466
|
+
with pytest.raises(Exception):
|
467
|
+
await analyzer.analyze_repository('owner', 'repo')
|
468
|
+
```
|
469
|
+
|
470
|
+
## Related Documentation
|
471
|
+
|
472
|
+
- [MCP Integration Guide](../../mcp-integration.md) - Detailed MCP integration
|
473
|
+
- [Tools Examples](../tools/index.md) - Alternative Ruby tools approach
|
474
|
+
- [Advanced Prompting](../../advanced-prompting.md) - Complex MCP usage patterns
|
475
|
+
- [Configuration](../../configuration.md) - MCP configuration options
|
476
|
+
|
477
|
+
---
|
478
|
+
|
479
|
+
MCP clients provide powerful integration capabilities for AIA. Start with simple read-only clients and gradually build more sophisticated integrations as your needs grow!
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# Analysis Prompts
|
2
|
+
|
3
|
+
Collection of prompts for data analysis, research, and analytical tasks.
|
4
|
+
|
5
|
+
## Available Prompts
|
6
|
+
|
7
|
+
### Data Analysis
|
8
|
+
- **data_analysis.txt** - Comprehensive data analysis
|
9
|
+
- **statistical_analysis.txt** - Statistical analysis and insights
|
10
|
+
- **trend_analysis.txt** - Trend identification and analysis
|
11
|
+
- **correlation_analysis.txt** - Correlation and relationship analysis
|
12
|
+
|
13
|
+
### Research
|
14
|
+
- **research_summary.txt** - Research synthesis and summarization
|
15
|
+
- **literature_review.txt** - Academic literature review
|
16
|
+
- **competitive_analysis.txt** - Competitive landscape analysis
|
17
|
+
- **market_research.txt** - Market analysis and insights
|
18
|
+
|
19
|
+
### Business Analysis
|
20
|
+
- **business_analysis.txt** - Business process analysis
|
21
|
+
- **performance_analysis.txt** - Performance metrics analysis
|
22
|
+
- **risk_assessment.txt** - Risk analysis and mitigation
|
23
|
+
- **opportunity_analysis.txt** - Opportunity identification
|
24
|
+
|
25
|
+
### Financial Analysis
|
26
|
+
- **financial_analysis.txt** - Financial data analysis
|
27
|
+
- **budget_analysis.txt** - Budget review and analysis
|
28
|
+
- **roi_analysis.txt** - Return on investment analysis
|
29
|
+
- **cost_benefit.txt** - Cost-benefit analysis
|
30
|
+
|
31
|
+
### Report Generation
|
32
|
+
- **executive_summary.txt** - Executive summary creation
|
33
|
+
- **detailed_report.txt** - Comprehensive report generation
|
34
|
+
- **dashboard_insights.txt** - Dashboard and metrics interpretation
|
35
|
+
- **recommendations.txt** - Actionable recommendations generation
|
36
|
+
|
37
|
+
## Usage Examples
|
38
|
+
|
39
|
+
```bash
|
40
|
+
# Analyze a dataset
|
41
|
+
aia data_analysis dataset.csv --focus "sales trends"
|
42
|
+
|
43
|
+
# Generate research summary
|
44
|
+
aia research_summary research_papers/ --topic "AI trends"
|
45
|
+
|
46
|
+
# Create executive summary
|
47
|
+
aia executive_summary quarterly_data.xlsx --audience "executives"
|
48
|
+
```
|
49
|
+
|
50
|
+
## Analysis Workflows
|
51
|
+
|
52
|
+
### Data Pipeline
|
53
|
+
1. **data_preprocessing.txt** - Clean and prepare data
|
54
|
+
2. **exploratory_analysis.txt** - Initial data exploration
|
55
|
+
3. **detailed_analysis.txt** - Deep dive analysis
|
56
|
+
4. **insight_generation.txt** - Extract actionable insights
|
57
|
+
5. **report_creation.txt** - Generate final report
|
58
|
+
|
59
|
+
### Research Workflow
|
60
|
+
1. **source_collection.txt** - Gather research sources
|
61
|
+
2. **content_analysis.txt** - Analyze source content
|
62
|
+
3. **synthesis.txt** - Synthesize findings
|
63
|
+
4. **gap_analysis.txt** - Identify research gaps
|
64
|
+
5. **conclusion.txt** - Draw conclusions
|
65
|
+
|
66
|
+
## Customization Parameters
|
67
|
+
|
68
|
+
- **Focus Area** - Specific aspect to analyze
|
69
|
+
- **Depth Level** - Surface or deep analysis
|
70
|
+
- **Audience** - Target audience for results
|
71
|
+
- **Format** - Output format (charts, tables, narrative)
|
72
|
+
- **Timeframe** - Analysis time period
|
73
|
+
|
74
|
+
## Related
|
75
|
+
|
76
|
+
- [Development Prompts](../development/index.md) - Code analysis
|
77
|
+
- [Automation Prompts](../automation/index.md) - Process analysis
|
78
|
+
- [Tools Examples](../../tools/index.md) - Analysis tools
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# Automation Prompts
|
2
|
+
|
3
|
+
Collection of prompts for system administration, process automation, and workflow management.
|
4
|
+
|
5
|
+
## Available Prompts
|
6
|
+
|
7
|
+
### System Administration
|
8
|
+
- **system_health.txt** - System health monitoring and analysis
|
9
|
+
- **log_analysis.txt** - Log file analysis and insights
|
10
|
+
- **performance_monitoring.txt** - System performance analysis
|
11
|
+
- **security_audit.txt** - Security assessment and audit
|
12
|
+
|
13
|
+
### Deployment and DevOps
|
14
|
+
- **deployment_checklist.txt** - Deployment readiness assessment
|
15
|
+
- **ci_cd_analysis.txt** - CI/CD pipeline analysis
|
16
|
+
- **infrastructure_review.txt** - Infrastructure assessment
|
17
|
+
- **rollback_procedures.txt** - Rollback planning and procedures
|
18
|
+
|
19
|
+
### Process Automation
|
20
|
+
- **workflow_optimization.txt** - Process optimization suggestions
|
21
|
+
- **task_automation.txt** - Task automation recommendations
|
22
|
+
- **monitoring_setup.txt** - Monitoring and alerting setup
|
23
|
+
- **maintenance_scheduler.txt** - Maintenance task scheduling
|
24
|
+
|
25
|
+
### Configuration Management
|
26
|
+
- **config_validation.txt** - Configuration file validation
|
27
|
+
- **environment_sync.txt** - Environment synchronization
|
28
|
+
- **dependency_check.txt** - Dependency analysis and management
|
29
|
+
- **version_management.txt** - Version control and management
|
30
|
+
|
31
|
+
### Incident Response
|
32
|
+
- **incident_analysis.txt** - Incident investigation and analysis
|
33
|
+
- **root_cause_analysis.txt** - Root cause identification
|
34
|
+
- **recovery_procedures.txt** - Recovery planning and execution
|
35
|
+
- **post_mortem.txt** - Post-incident analysis and learning
|
36
|
+
|
37
|
+
## Usage Examples
|
38
|
+
|
39
|
+
```bash
|
40
|
+
# Analyze system health
|
41
|
+
aia system_health --logs /var/log/ --timeframe "24h"
|
42
|
+
|
43
|
+
# Validate deployment readiness
|
44
|
+
aia deployment_checklist --environment production --service api
|
45
|
+
|
46
|
+
# Perform security audit
|
47
|
+
aia security_audit --scope "web_application" --depth comprehensive
|
48
|
+
```
|
49
|
+
|
50
|
+
## Automation Workflows
|
51
|
+
|
52
|
+
### Deployment Pipeline
|
53
|
+
1. **pre_deployment.txt** - Pre-deployment checks
|
54
|
+
2. **deployment_execution.txt** - Deployment process
|
55
|
+
3. **post_deployment.txt** - Post-deployment validation
|
56
|
+
4. **rollback_if_needed.txt** - Conditional rollback
|
57
|
+
5. **deployment_report.txt** - Deployment summary
|
58
|
+
|
59
|
+
### Monitoring Setup
|
60
|
+
1. **baseline_establishment.txt** - Establish performance baselines
|
61
|
+
2. **alert_configuration.txt** - Configure monitoring alerts
|
62
|
+
3. **dashboard_creation.txt** - Create monitoring dashboards
|
63
|
+
4. **escalation_procedures.txt** - Define escalation paths
|
64
|
+
5. **monitoring_validation.txt** - Validate monitoring effectiveness
|
65
|
+
|
66
|
+
### Incident Response
|
67
|
+
1. **incident_detection.txt** - Initial incident assessment
|
68
|
+
2. **impact_analysis.txt** - Assess incident impact
|
69
|
+
3. **mitigation_actions.txt** - Define mitigation steps
|
70
|
+
4. **communication_plan.txt** - Stakeholder communication
|
71
|
+
5. **resolution_verification.txt** - Verify resolution
|
72
|
+
|
73
|
+
## Integration Points
|
74
|
+
|
75
|
+
### Shell Integration
|
76
|
+
```markdown
|
77
|
+
//shell systemctl status nginx
|
78
|
+
//shell df -h
|
79
|
+
//shell top -b -n 1 | head -20
|
80
|
+
```
|
81
|
+
|
82
|
+
### Tool Integration
|
83
|
+
```bash
|
84
|
+
# Use with system monitoring tools
|
85
|
+
aia --tools system_monitor.rb system_health
|
86
|
+
|
87
|
+
# Combine with log analysis tools
|
88
|
+
aia --tools log_analyzer.rb incident_analysis /var/log/app.log
|
89
|
+
```
|
90
|
+
|
91
|
+
### MCP Integration
|
92
|
+
```markdown
|
93
|
+
//mcp filesystem,monitoring
|
94
|
+
```
|
95
|
+
|
96
|
+
## Customization Parameters
|
97
|
+
|
98
|
+
- **Environment** - target environment (dev, staging, prod)
|
99
|
+
- **Service** - specific service or application
|
100
|
+
- **Timeframe** - analysis time window
|
101
|
+
- **Depth** - analysis depth level
|
102
|
+
- **Scope** - analysis scope and boundaries
|
103
|
+
|
104
|
+
## Related
|
105
|
+
|
106
|
+
- [Development Prompts](../development/index.md) - Development automation
|
107
|
+
- [Analysis Prompts](../analysis/index.md) - System analysis
|
108
|
+
- [MCP Examples](../../mcp/index.md) - External system integration
|