aia 1.0.0.pre.beta → 1.1.0
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 +89 -0
- data/COMMITS.md +192 -11
- data/README.md +327 -110
- data/docs/cli-reference.md +93 -10
- data/docs/configuration.md +29 -36
- data/docs/contributing.md +2 -2
- data/docs/directives-reference.md +49 -27
- data/docs/examples/index.md +2 -2
- data/docs/examples/mcp/index.md +93 -97
- data/docs/examples/prompts/automation/index.md +3 -2
- data/docs/examples/tools/index.md +17 -27
- data/docs/faq.md +9 -12
- data/docs/guides/basic-usage.md +4 -4
- data/docs/guides/chat.md +39 -34
- data/docs/guides/tools.md +4 -4
- data/docs/index.md +36 -62
- data/docs/installation.md +1 -1
- data/docs/mcp-integration.md +75 -139
- data/docs/prompt_management.md +88 -1
- data/docs/security.md +79 -81
- data/docs/tools-and-mcp-examples.md +8 -6
- data/docs/workflows-and-pipelines.md +2 -6
- data/examples/.gitignore +1 -0
- data/examples/README.md +41 -0
- data/examples/run_all.sh +261 -0
- data/lib/aia/adapter/chat_execution.rb +9 -7
- data/lib/aia/adapter/mcp_connector.rb +0 -29
- data/lib/aia/adapter/modality_handlers.rb +23 -15
- data/lib/aia/adapter/tool_filter.rb +21 -0
- data/lib/aia/adapter/tool_loader.rb +1 -9
- data/lib/aia/chat_loop.rb +244 -0
- data/lib/aia/chat_processor_service.rb +6 -3
- data/lib/aia/config/cli_parser.rb +56 -18
- data/lib/aia/config/defaults.yml +17 -2
- data/lib/aia/config/validator.rb +52 -11
- data/lib/aia/config.rb +29 -3
- data/lib/aia/directive.rb +29 -0
- data/lib/aia/directives/configuration_directives.rb +2 -1
- data/lib/aia/directives/execution_directives.rb +1 -1
- data/lib/aia/directives/model_directives.rb +28 -27
- data/lib/aia/directives/web_and_file_directives.rb +78 -40
- data/lib/aia/errors.rb +20 -1
- data/lib/aia/fzf.rb +8 -7
- data/lib/aia/input_collector.rb +24 -0
- data/lib/aia/prompt_handler.rb +36 -8
- data/lib/aia/prompt_pipeline.rb +183 -0
- data/lib/aia/session.rb +22 -372
- data/lib/aia/skill_utils.rb +61 -0
- data/lib/aia/ui_presenter.rb +8 -0
- data/lib/aia.rb +4 -0
- metadata +19 -45
data/README.md
CHANGED
|
@@ -7,17 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
>
|
|
11
|
-
>
|
|
12
|
-
> **
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
>
|
|
16
|
-
> - **Configuration Files** — Configuration now uses a nested YAML structure with sections like `llm:`, `prompts:`, `output:`, `flags:`, etc. The [defaults.yml](lib/aia/config/defaults.yml) file is the single source of truth for all configuration options. See [Configuration Guide](https://madbomber.github.io/aia/configuration/) for details.
|
|
17
|
-
>
|
|
18
|
-
> - **File Locations** — Configuration files now follow the XDG Base Directory Specification. The default config file location is `~/.config/aia/aia.yml`. See [Installation Guide](https://madbomber.github.io/aia/installation/) for setup instructions.
|
|
19
|
-
>
|
|
20
|
-
> **Review the [Configuration Guide](https://madbomber.github.io/aia/configuration/) before upgrading to v0.10.0.**
|
|
10
|
+
> ### 🚀 New: AI Assistant Scheduler (AIAS)
|
|
11
|
+
> **Schedule and automate your AIA prompts!** AIAS is a new Ruby gem that lets you run AIA prompts on a cron-like schedule — perfect for recurring AI tasks, automated reports, and timed workflows.
|
|
12
|
+
> **[View AIAS on GitHub →](https://github.com/madbomber/aias)**
|
|
13
|
+
|
|
14
|
+
---
|
|
21
15
|
|
|
22
16
|
---
|
|
23
17
|
|
|
@@ -70,9 +64,9 @@ For more information on AIA visit these locations:
|
|
|
70
64
|
```plain
|
|
71
65
|
|
|
72
66
|
, ,
|
|
73
|
-
(\____/) AI Assistant (
|
|
67
|
+
(\____/) AI Assistant (v1.1.0) is Online
|
|
74
68
|
(_oo_) gpt-4o-mini
|
|
75
|
-
(O) using ruby_llm
|
|
69
|
+
(O) using ruby_llm
|
|
76
70
|
__||__ \) model db was last refreshed on
|
|
77
71
|
[/______\] / 2025-06-18
|
|
78
72
|
/ \__AI__/ \/ You can share my tools
|
|
@@ -122,6 +116,114 @@ Implement a schema registry with event-driven synchronization...
|
|
|
122
116
|
|
|
123
117
|
---
|
|
124
118
|
|
|
119
|
+
## 🎭 Give Your Robot a Personality with Roles
|
|
120
|
+
|
|
121
|
+
Why settle for a generic AI when you can have **your** robot? A role is a plain-text file that defines how your AI thinks, talks, and interacts with you. Drop it in `~/.prompts/roles/`, point AIA at it, and your robot instantly becomes someone new.
|
|
122
|
+
|
|
123
|
+
**For fun — because AI doesn't have to be boring:**
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Ahoy! Your AI now talks like a salty sea pirate
|
|
127
|
+
aia --chat --role pirate
|
|
128
|
+
|
|
129
|
+
# Opinionated New York cabbie who has thoughts on EVERYTHING
|
|
130
|
+
aia --chat --role nyc_cabbie
|
|
131
|
+
|
|
132
|
+
# That stoned hacker buddy who somehow solves every problem
|
|
133
|
+
aia --chat --role stoned_hacker
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Create `~/.prompts/roles/pirate.md`:
|
|
137
|
+
```
|
|
138
|
+
Arrr, ye be speakin' with the most knowledgeable AI pirate to ever sail the
|
|
139
|
+
digital seas! Answer every question in authentic pirate speak, drop nautical
|
|
140
|
+
references, and sign off with "Arrr!" No matter how technical the topic,
|
|
141
|
+
keep the pirate spirit alive, matey.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**For serious work — productive personas that deliver results:**
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Explains quantum physics to your 7-year-old
|
|
148
|
+
aia --chat --role first_grade_teacher
|
|
149
|
+
|
|
150
|
+
# Three expert robots reviewing the same design doc simultaneously
|
|
151
|
+
aia --model gpt-4o=architect,claude=security,gemini=performance design.md
|
|
152
|
+
|
|
153
|
+
# Same question, three philosophical stances
|
|
154
|
+
aia --model gpt-4o=optimist,gpt-4o=pessimist,gpt-4o=realist business_plan.md
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Create `~/.prompts/roles/first_grade_teacher.md`:
|
|
158
|
+
```
|
|
159
|
+
You are a patient, enthusiastic first-grade teacher with a magical gift: you can
|
|
160
|
+
explain ANY complex subject using simple words and everyday analogies — toys,
|
|
161
|
+
animals, food, playground games. Your mission is to make hard things feel easy
|
|
162
|
+
and exciting. Never use jargon. Always encourage. Keep it fun!
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Assign a different role to each model and get multiple expert perspectives on the same question in one command. Every robot, its own voice.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 🎓 Teach Your Robot New Skills
|
|
170
|
+
|
|
171
|
+
Skills are structured instruction sets that tell your robot *exactly how* to approach a task — your workflow, your standards, every single time. No more repeating yourself in every prompt.
|
|
172
|
+
|
|
173
|
+
A skill is a directory containing a `SKILL.md` file with YAML front matter and the process you want your robot to follow. Create one for any repeatable task.
|
|
174
|
+
|
|
175
|
+
**Apply skills in seconds:**
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Prepend a skill to any prompt
|
|
179
|
+
aia -s code-quality my_prompt
|
|
180
|
+
|
|
181
|
+
# Stack multiple skills — they apply in order
|
|
182
|
+
aia -s code-quality,security-review,add-tests my_prompt
|
|
183
|
+
|
|
184
|
+
# Chat mode: skills prime the entire session from the start
|
|
185
|
+
aia --chat --role senior_dev -s code-quality
|
|
186
|
+
|
|
187
|
+
# Add a skill mid-chat with the /skill directive
|
|
188
|
+
/skill code-quality
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Create `~/.prompts/skills/code-quality/SKILL.md`:
|
|
192
|
+
```markdown
|
|
193
|
+
---
|
|
194
|
+
name: Code Quality
|
|
195
|
+
description: Enforce SOLID principles and team coding standards
|
|
196
|
+
---
|
|
197
|
+
When reviewing code, evaluate in this exact order:
|
|
198
|
+
|
|
199
|
+
1. **SOLID Principles** — name any violations explicitly
|
|
200
|
+
2. **Security** — flag injection risks, exposed credentials, unsafe inputs
|
|
201
|
+
3. **Performance** — O(n²) or worse, unnecessary allocations, N+1 queries
|
|
202
|
+
4. **Readability** — method names, variable names, comment quality
|
|
203
|
+
5. **Test Coverage** — are edge cases covered? Behavior, not implementation?
|
|
204
|
+
|
|
205
|
+
Format: Summary → Issues by category → Suggested rewrites
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Combine roles AND skills for a fully customized robot:**
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# A pirate who also follows your exact code review process
|
|
212
|
+
aia --chat --role pirate -s code-quality
|
|
213
|
+
|
|
214
|
+
# A first-grade teacher who uses your step-by-step explanation method
|
|
215
|
+
aia --chat --role first_grade_teacher -s explain-with-analogies
|
|
216
|
+
|
|
217
|
+
# Multiple robots, each with its own role and skill set
|
|
218
|
+
aia --model gpt-4o=architect,claude=security \
|
|
219
|
+
-s architecture-review,threat-model \
|
|
220
|
+
design.md
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Skills accumulate — specify multiple with commas or repeat `-s`. Each skill is prepended to your prompt in order, establishing exactly the context you want before the AI sees your actual question. Pair with roles for robots that are both *who you want* and *know what to do*.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
125
227
|
<!-- Tocer[start]: Auto-generated, don't remove. -->
|
|
126
228
|
|
|
127
229
|
## Table of Contents
|
|
@@ -264,8 +366,11 @@ aia --fuzzy
|
|
|
264
366
|
| `--model MODEL` | Specify AI model(s) to use. Supports `MODEL[=ROLE]` syntax | `aia --model gpt-4o-mini,gpt-3.5-turbo` or `aia --model gpt-4o=architect,claude=security` |
|
|
265
367
|
| `--consensus` | Enable consensus mode for multi-model | `aia --consensus` |
|
|
266
368
|
| `--no-consensus` | Force individual responses | `aia --no-consensus` |
|
|
267
|
-
| `--role ROLE` | Use a role/system prompt (
|
|
369
|
+
| `--role ROLE` | Use a role/system prompt; accepts an ID in `~/.prompts/roles/` or a path (`/`, `~/`, `./`, `../`) | `aia --role expert` or `aia --role ~/custom/role.md` |
|
|
268
370
|
| `--list-roles` | List available role files | `aia --list-roles` |
|
|
371
|
+
| `-s, --skill SKILL_IDS` | Prepend skill(s) to prompt; accepts skill IDs or paths to skill directories (`/`, `~/`, `./`, `../`) | `aia -s code-quality my_prompt` or `aia -s ~/skills/my-skill` |
|
|
372
|
+
| `--list-skills` | List available skills and exit | `aia --list-skills` |
|
|
373
|
+
| `--skills-dir DIR` | Set skills directory (default: `~/.prompts/skills`) | `aia --skills-dir ~/skills` |
|
|
269
374
|
| `--output FILE` | Specify output file | `aia --output results.md` |
|
|
270
375
|
| `--fuzzy` | Use fuzzy search for prompts | `aia --fuzzy` |
|
|
271
376
|
| `--tokens` | Display token usage in chat mode | `aia --chat --tokens` |
|
|
@@ -283,6 +388,11 @@ aia --fuzzy
|
|
|
283
388
|
├── roles/ # Role/system prompts
|
|
284
389
|
│ ├── expert.md # Expert role
|
|
285
390
|
│ └── teacher.md # Teaching role
|
|
391
|
+
├── skills/ # Skill directories
|
|
392
|
+
│ ├── code-quality/ # Skill subdirectory
|
|
393
|
+
│ │ └── SKILL.md # Skill definition (YAML front matter + content)
|
|
394
|
+
│ └── summarizer/
|
|
395
|
+
│ └── SKILL.md
|
|
286
396
|
└── _prompts.log # History log
|
|
287
397
|
```
|
|
288
398
|
|
|
@@ -307,8 +417,10 @@ AIA determines configuration settings using this order (highest to lowest priori
|
|
|
307
417
|
1. **Embedded config directives** (in prompt files): `/config model = gpt-4`
|
|
308
418
|
2. **Command-line arguments**: `--model gpt-4`
|
|
309
419
|
3. **Environment variables**: `export AIA_MODEL=gpt-4`
|
|
310
|
-
4. **Configuration files**: `~/.aia/
|
|
311
|
-
5. **Default values
|
|
420
|
+
4. **Configuration files**: `~/.config/aia/aia.yml`
|
|
421
|
+
5. **Default values**: [defaults.yml](lib/aia/config/defaults.yml)
|
|
422
|
+
|
|
423
|
+
**Note:** When `-c` / `--config-file` is used, it replaces the user config and environment variables. Configuration resets to bundled defaults, then the specified file is applied, then CLI arguments take precedence.
|
|
312
424
|
|
|
313
425
|
### Configuration Methods
|
|
314
426
|
|
|
@@ -319,12 +431,16 @@ export AIA_PROMPTS__DIR=~/my-prompts
|
|
|
319
431
|
export AIA_LLM__TEMPERATURE=0.8
|
|
320
432
|
```
|
|
321
433
|
|
|
322
|
-
**Configuration File** (`~/.aia/
|
|
434
|
+
**Configuration File** (`~/.config/aia/aia.yml`):
|
|
323
435
|
```yaml
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
436
|
+
models:
|
|
437
|
+
- name: gpt-4
|
|
438
|
+
prompts:
|
|
439
|
+
dir: ~/my-prompts
|
|
440
|
+
llm:
|
|
441
|
+
temperature: 0.8
|
|
442
|
+
flags:
|
|
443
|
+
chat: false
|
|
328
444
|
```
|
|
329
445
|
|
|
330
446
|
**Embedded Directives** (in prompt files):
|
|
@@ -340,56 +456,113 @@ Your prompt content here...
|
|
|
340
456
|
<details>
|
|
341
457
|
<summary>Click to view all configuration options</summary>
|
|
342
458
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
|
348
|
-
|
|
349
|
-
|
|
|
350
|
-
|
|
|
351
|
-
| debug |
|
|
352
|
-
|
|
|
353
|
-
|
|
|
354
|
-
|
|
|
355
|
-
|
|
|
356
|
-
|
|
|
357
|
-
|
|
|
358
|
-
|
|
|
359
|
-
|
|
|
360
|
-
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
|
365
|
-
|
|
366
|
-
|
|
|
367
|
-
|
|
|
368
|
-
|
|
|
369
|
-
|
|
|
370
|
-
|
|
|
371
|
-
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
|
376
|
-
|
|
377
|
-
|
|
|
378
|
-
|
|
|
379
|
-
|
|
|
380
|
-
|
|
|
381
|
-
|
|
|
382
|
-
|
|
|
383
|
-
|
|
|
384
|
-
|
|
|
385
|
-
|
|
|
386
|
-
|
|
|
387
|
-
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
|
392
|
-
|
|
459
|
+
The configuration schema is defined in [defaults.yml](lib/aia/config/defaults.yml). Environment variables use the `AIA_` prefix with double underscores for nested keys.
|
|
460
|
+
|
|
461
|
+
**Mode & Display Flags:**
|
|
462
|
+
|
|
463
|
+
| Config Path | CLI Options | Default | Environment Variable |
|
|
464
|
+
|-------------|-------------|---------|---------------------|
|
|
465
|
+
| `flags.chat` | `--chat` | `false` | `AIA_FLAGS__CHAT` |
|
|
466
|
+
| `flags.fuzzy` | `-f`, `--fuzzy` | `false` | `AIA_FLAGS__FUZZY` |
|
|
467
|
+
| `flags.debug` | `-d`, `--debug` | `false` | `AIA_FLAGS__DEBUG` |
|
|
468
|
+
| `flags.verbose` | `-v`, `--verbose` | `false` | `AIA_FLAGS__VERBOSE` |
|
|
469
|
+
| `flags.tokens` | `--tokens` | `false` | `AIA_FLAGS__TOKENS` |
|
|
470
|
+
| `flags.cost` | `--cost` | `false` | `AIA_FLAGS__COST` |
|
|
471
|
+
| `flags.consensus` | `--[no-]consensus` | `false` | `AIA_FLAGS__CONSENSUS` |
|
|
472
|
+
| `flags.speak` | `--speak` | `false` | `AIA_FLAGS__SPEAK` |
|
|
473
|
+
| `flags.shell` | | `true` | `AIA_FLAGS__SHELL` |
|
|
474
|
+
| `flags.erb` | | `true` | `AIA_FLAGS__ERB` |
|
|
475
|
+
| `flags.clear` | `--clear` | `false` | `AIA_FLAGS__CLEAR` |
|
|
476
|
+
| `flags.no_mcp` | `--no-mcp` | `false` | `AIA_FLAGS__NO_MCP` |
|
|
477
|
+
|
|
478
|
+
**Model & LLM Parameters:**
|
|
479
|
+
|
|
480
|
+
| Config Path | CLI Options | Default | Environment Variable |
|
|
481
|
+
|-------------|-------------|---------|---------------------|
|
|
482
|
+
| `models` | `-m`, `--model` | `gpt-4o-mini` | `AIA_MODEL` |
|
|
483
|
+
| `llm.temperature` | `-t`, `--temperature` | `0.7` | `AIA_LLM__TEMPERATURE` |
|
|
484
|
+
| `llm.max_tokens` | `--max-tokens` | `2048` | `AIA_LLM__MAX_TOKENS` |
|
|
485
|
+
| `llm.top_p` | `--top-p` | `1.0` | `AIA_LLM__TOP_P` |
|
|
486
|
+
| `llm.frequency_penalty` | `--frequency-penalty` | `0.0` | `AIA_LLM__FREQUENCY_PENALTY` |
|
|
487
|
+
| `llm.presence_penalty` | `--presence-penalty` | `0.0` | `AIA_LLM__PRESENCE_PENALTY` |
|
|
488
|
+
|
|
489
|
+
**Prompts, Roles & Skills:**
|
|
490
|
+
|
|
491
|
+
| Config Path | CLI Options | Default | Environment Variable |
|
|
492
|
+
|-------------|-------------|---------|---------------------|
|
|
493
|
+
| `prompts.dir` | `--prompts-dir` | `~/.prompts` | `AIA_PROMPTS__DIR` |
|
|
494
|
+
| `prompts.extname` | | `.md` | `AIA_PROMPTS__EXTNAME` |
|
|
495
|
+
| `prompts.roles_prefix` | `--roles-prefix` | `roles` | `AIA_PROMPTS__ROLES_PREFIX` |
|
|
496
|
+
| `prompts.roles_dir` | | `~/.prompts/roles` | `AIA_PROMPTS__ROLES_DIR` |
|
|
497
|
+
| `prompts.role` | `-r`, `--role` | | `AIA_PROMPTS__ROLE` |
|
|
498
|
+
| `prompts.skills` | `-s`, `--skill` | `[]` | |
|
|
499
|
+
| `prompts.skills_prefix` | `--skills-prefix` | `skills` | `AIA_PROMPTS__SKILLS_PREFIX` |
|
|
500
|
+
| `skills.dir` | `--skills-dir` | `~/.prompts/skills` | `AIA_SKILLS__DIR` |
|
|
501
|
+
| `prompts.system_prompt` | `--system-prompt` | | `AIA_PROMPTS__SYSTEM_PROMPT` |
|
|
502
|
+
| `pipeline` | `-p`, `--pipeline` | `[]` | |
|
|
503
|
+
| | `-n`, `--next` | | |
|
|
504
|
+
|
|
505
|
+
**Output & Files:**
|
|
506
|
+
|
|
507
|
+
| Config Path | CLI Options | Default | Environment Variable |
|
|
508
|
+
|-------------|-------------|---------|---------------------|
|
|
509
|
+
| `output.file` | `-o`, `--[no-]output` | `temp.md` | `AIA_OUTPUT__FILE` |
|
|
510
|
+
| `output.append` | `-a`, `--[no-]append` | `false` | `AIA_OUTPUT__APPEND` |
|
|
511
|
+
| `output.markdown` | `--md`, `--[no-]markdown` | `true` | `AIA_OUTPUT__MARKDOWN` |
|
|
512
|
+
| `output.history_file` | `--history-file` | `~/.prompts/_prompts.log` | `AIA_OUTPUT__HISTORY_FILE` |
|
|
513
|
+
| `paths.aia_dir` | | `~/.config/aia` | `AIA_PATHS__AIA_DIR` |
|
|
514
|
+
| `paths.config_file` | `-c`, `--config-file` | `~/.config/aia/aia.yml` | `AIA_PATHS__CONFIG_FILE` |
|
|
515
|
+
|
|
516
|
+
**Audio & Image:**
|
|
517
|
+
|
|
518
|
+
| Config Path | CLI Options | Default | Environment Variable |
|
|
519
|
+
|-------------|-------------|---------|---------------------|
|
|
520
|
+
| `audio.voice` | `--voice` | `alloy` | `AIA_AUDIO__VOICE` |
|
|
521
|
+
| `audio.speak_command` | | `afplay` | `AIA_AUDIO__SPEAK_COMMAND` |
|
|
522
|
+
| `audio.speech_model` | `--sm`, `--speech-model` | `tts-1` | `AIA_AUDIO__SPEECH_MODEL` |
|
|
523
|
+
| `audio.transcription_model` | `--tm`, `--transcription-model` | `whisper-1` | `AIA_AUDIO__TRANSCRIPTION_MODEL` |
|
|
524
|
+
| `image.size` | `--is`, `--image-size` | `1024x1024` | `AIA_IMAGE__SIZE` |
|
|
525
|
+
| `image.quality` | `--iq`, `--image-quality` | `standard` | `AIA_IMAGE__QUALITY` |
|
|
526
|
+
| `image.style` | `--style`, `--image-style` | `vivid` | `AIA_IMAGE__STYLE` |
|
|
527
|
+
| `embedding.model` | | `text-embedding-ada-002` | `AIA_EMBEDDING__MODEL` |
|
|
528
|
+
|
|
529
|
+
**Tools & MCP:**
|
|
530
|
+
|
|
531
|
+
| Config Path | CLI Options | Default | Environment Variable |
|
|
532
|
+
|-------------|-------------|---------|---------------------|
|
|
533
|
+
| `tools.paths` | `--tools` | `[]` | `AIA_TOOLS__PATHS` |
|
|
534
|
+
| `tools.allowed` | `--at`, `--allowed-tools` | | `AIA_TOOLS__ALLOWED` |
|
|
535
|
+
| `tools.rejected` | `--rt`, `--rejected-tools` | | `AIA_TOOLS__REJECTED` |
|
|
536
|
+
| `mcp_servers` | | `[]` | |
|
|
537
|
+
| `mcp_use` | `--mu`, `--mcp-use` | | `AIA_MCP_USE` |
|
|
538
|
+
| `mcp_skip` | `--ms`, `--mcp-skip` | | `AIA_MCP_SKIP` |
|
|
539
|
+
| | `--mcp FILE` | | |
|
|
540
|
+
| | `--mcp-list` | | |
|
|
541
|
+
| `require_libs` | `--rq`, `--require` | `[]` | |
|
|
542
|
+
|
|
543
|
+
**Logging:**
|
|
544
|
+
|
|
545
|
+
| Config Path | CLI Options | Default | Environment Variable |
|
|
546
|
+
|-------------|-------------|---------|---------------------|
|
|
547
|
+
| `logger.aia.level` | `--log-level` | `warn` | `AIA_LOGGER__AIA__LEVEL` |
|
|
548
|
+
| `logger.aia.file` | `--log-to` | `STDOUT` | `AIA_LOGGER__AIA__FILE` |
|
|
549
|
+
| `logger.llm.level` | `--log-level` | `warn` | `AIA_LOGGER__LLM__LEVEL` |
|
|
550
|
+
| `logger.llm.file` | `--log-to` | `STDOUT` | `AIA_LOGGER__LLM__FILE` |
|
|
551
|
+
| `logger.mcp.level` | `--log-level` | `warn` | `AIA_LOGGER__MCP__LEVEL` |
|
|
552
|
+
| `logger.mcp.file` | `--log-to` | `STDOUT` | `AIA_LOGGER__MCP__FILE` |
|
|
553
|
+
| `registry.refresh` | `--refresh` | `7` (days) | `AIA_REGISTRY__REFRESH` |
|
|
554
|
+
|
|
555
|
+
**Utility:**
|
|
556
|
+
|
|
557
|
+
| CLI Options | Description |
|
|
558
|
+
|-------------|-------------|
|
|
559
|
+
| `--dump FILE` | Export current configuration to FILE and exit |
|
|
560
|
+
| `--completion SHELL` | Generate shell completion script (bash/zsh/fish) and exit |
|
|
561
|
+
| `--available-models [QUERY]` | List available models and exit |
|
|
562
|
+
| `--list-roles` | List available role files and exit |
|
|
563
|
+
| `--list-tools` | List available tools and exit |
|
|
564
|
+
| `--version` | Show version and exit |
|
|
565
|
+
| `-h`, `--help` | Show help and exit |
|
|
393
566
|
|
|
394
567
|
</details>
|
|
395
568
|
|
|
@@ -407,6 +580,8 @@ Directives are special commands in prompt files that begin with `/` and provide
|
|
|
407
580
|
| `/restore` | Restore context to a previous checkpoint | `/restore save_point` |
|
|
408
581
|
| `/include` | Insert file contents | `/include path/to/file.txt` |
|
|
409
582
|
| `/paste` | Insert clipboard contents | `/paste` |
|
|
583
|
+
| `/skill` | Include a skill by ID or path to a skill directory | `/skill code-quality` or `/skill ~/skills/my-skill` |
|
|
584
|
+
| `/skills` | List available Claude Code skills | `/skills` |
|
|
410
585
|
| `/shell` | Execute shell commands | `/shell ls -la` |
|
|
411
586
|
| `/robot` | Show the pet robot ASCII art w/versions | `/robot` |
|
|
412
587
|
| `/ruby` | Execute Ruby code | `/ruby puts "Hello World"` |
|
|
@@ -513,29 +688,29 @@ Checkpoints: ruby_basics, oop_concepts
|
|
|
513
688
|
|
|
514
689
|
#### Custom Directive Examples
|
|
515
690
|
|
|
516
|
-
You can extend AIA with custom directives by
|
|
691
|
+
You can extend AIA with custom directives by subclassing `AIA::Directive`. Use `desc` before a method to register it as a directive. Aliases are detected automatically via `alias_method`.
|
|
517
692
|
|
|
518
693
|
```ruby
|
|
519
|
-
# examples/directives/
|
|
694
|
+
# examples/directives/timestamp_directive.rb
|
|
520
695
|
module AIA
|
|
521
|
-
class
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
AIA.config.client.chat(meta_prompt)
|
|
696
|
+
class CustomDirectives < Directive
|
|
697
|
+
desc "Insert current timestamp (optional strftime format, default: %Y-%m-%d %H:%M:%S)"
|
|
698
|
+
def timestamp(args = [], context_manager = nil)
|
|
699
|
+
format = args.empty? ? '%Y-%m-%d %H:%M:%S' : args.join(' ')
|
|
700
|
+
Time.now.strftime(format)
|
|
527
701
|
end
|
|
528
702
|
end
|
|
529
703
|
end
|
|
530
704
|
```
|
|
531
705
|
|
|
532
|
-
**Usage:** Use the
|
|
706
|
+
**Usage:** Use the `--tools` option to load a directive file or a directory of files:
|
|
533
707
|
```bash
|
|
534
708
|
# Load custom directive
|
|
535
|
-
aia --tools examples/directives/
|
|
709
|
+
aia --tools examples/directives/timestamp_directive.rb --chat
|
|
536
710
|
|
|
537
|
-
# Use the
|
|
538
|
-
/
|
|
711
|
+
# Use the custom directive in chat mode
|
|
712
|
+
/timestamp
|
|
713
|
+
/timestamp %Y-%m-%d
|
|
539
714
|
```
|
|
540
715
|
|
|
541
716
|
### Multi-Model Support
|
|
@@ -934,25 +1109,40 @@ echo "You are a senior software architect..." > ~/.prompts/roles/specialized/sen
|
|
|
934
1109
|
aia --model gpt-4o=specialized/senior_architect design.md
|
|
935
1110
|
```
|
|
936
1111
|
|
|
937
|
-
**
|
|
1112
|
+
**Path-Based Roles:**
|
|
1113
|
+
|
|
1114
|
+
In addition to role IDs looked up under `~/.prompts/roles/`, you can pass a direct filesystem path as the role. Any value starting with `/`, `~/`, `./`, or `../` is treated as a path rather than an ID. The `.md` extension is appended automatically when the path has none.
|
|
1115
|
+
|
|
1116
|
+
```bash
|
|
1117
|
+
# Absolute path
|
|
1118
|
+
aia --role /team/shared/roles/senior_engineer.md my_prompt
|
|
1119
|
+
|
|
1120
|
+
# Home-relative path (~ expanded)
|
|
1121
|
+
aia --role ~/custom/roles/reviewer my_prompt # loads ~/custom/roles/reviewer.md
|
|
1122
|
+
|
|
1123
|
+
# Relative path
|
|
1124
|
+
aia --role ./local_role my_prompt # loads ./local_role.md
|
|
1125
|
+
```
|
|
1126
|
+
|
|
1127
|
+
**Using Config Files for Model Roles:**
|
|
938
1128
|
|
|
939
|
-
Define model-role assignments in your config file (`~/.aia/
|
|
1129
|
+
Define model-role assignments in your config file (`~/.config/aia/aia.yml`) for reusable setups:
|
|
940
1130
|
|
|
941
1131
|
```yaml
|
|
942
1132
|
# Array of hashes format (mirrors internal structure)
|
|
943
|
-
|
|
944
|
-
-
|
|
1133
|
+
models:
|
|
1134
|
+
- name: gpt-4o
|
|
945
1135
|
role: architect
|
|
946
|
-
-
|
|
1136
|
+
- name: claude
|
|
947
1137
|
role: security
|
|
948
|
-
-
|
|
1138
|
+
- name: gemini
|
|
949
1139
|
role: performance
|
|
950
1140
|
|
|
951
1141
|
# Also supports models without roles
|
|
952
|
-
|
|
953
|
-
-
|
|
1142
|
+
models:
|
|
1143
|
+
- name: gpt-4o
|
|
954
1144
|
role: architect
|
|
955
|
-
-
|
|
1145
|
+
- name: claude # No role assigned
|
|
956
1146
|
```
|
|
957
1147
|
|
|
958
1148
|
Then simply run:
|
|
@@ -961,7 +1151,7 @@ Then simply run:
|
|
|
961
1151
|
aia design_doc.md # Uses model configuration from config file
|
|
962
1152
|
```
|
|
963
1153
|
|
|
964
|
-
**Using Environment Variables
|
|
1154
|
+
**Using Environment Variables:**
|
|
965
1155
|
|
|
966
1156
|
Set default model-role assignments via environment variable:
|
|
967
1157
|
|
|
@@ -980,9 +1170,37 @@ When model roles are specified in multiple places, the precedence is:
|
|
|
980
1170
|
1. **Command-line inline** (highest): `--model gpt-4o=architect`
|
|
981
1171
|
2. **Command-line flag**: `--model gpt-4o --role architect`
|
|
982
1172
|
3. **Environment variable**: `AIA_MODEL="gpt-4o=architect"`
|
|
983
|
-
4. **Config file** (lowest): `
|
|
1173
|
+
4. **Config file** (lowest): `models` array in `~/.config/aia/aia.yml`
|
|
1174
|
+
|
|
1175
|
+
### Skills
|
|
1176
|
+
|
|
1177
|
+
Skills are reusable instruction sets prepended to prompts. Each skill is a directory containing a `SKILL.md` file with YAML front matter and content.
|
|
1178
|
+
|
|
1179
|
+
```bash
|
|
1180
|
+
# Use a skill by ID (looked up under skills.dir, default ~/.prompts/skills)
|
|
1181
|
+
aia -s code-quality my_prompt
|
|
1182
|
+
|
|
1183
|
+
# Comma-separated for multiple skills
|
|
1184
|
+
aia -s code-quality,security-review my_prompt
|
|
1185
|
+
|
|
1186
|
+
# Path-based: pass a direct path to a skill directory
|
|
1187
|
+
aia -s ~/team/skills/my-skill my_prompt # home-relative
|
|
1188
|
+
aia -s /shared/skills/company-style prompt # absolute path
|
|
1189
|
+
aia -s ./local-skill my_prompt # relative path
|
|
1190
|
+
|
|
1191
|
+
# List available skills
|
|
1192
|
+
aia --list-skills
|
|
984
1193
|
```
|
|
985
1194
|
|
|
1195
|
+
Skills can also be applied during chat via the `/skill` directive:
|
|
1196
|
+
|
|
1197
|
+
```
|
|
1198
|
+
/skill code-quality
|
|
1199
|
+
/skill ~/team/skills/my-skill
|
|
1200
|
+
```
|
|
1201
|
+
|
|
1202
|
+
Path-based values (starting with `/`, `~/`, `./`, or `../`) are resolved as filesystem paths to skill directories directly, bypassing the configured skills directory lookup.
|
|
1203
|
+
|
|
986
1204
|
### RubyLLM::Tool Support
|
|
987
1205
|
|
|
988
1206
|
AIA supports function calling through RubyLLM tools for extended capabilities:
|
|
@@ -1023,14 +1241,14 @@ These MCP clients require the `ruby_llm-mcp` gem and provide access to external
|
|
|
1023
1241
|
|
|
1024
1242
|
### MCP Server Configuration
|
|
1025
1243
|
|
|
1026
|
-
AIA supports defining MCP (Model Context Protocol) servers directly in your configuration file. This allows MCP tools to be automatically loaded at startup without needing to specify them on the command line each time.
|
|
1244
|
+
AIA supports defining MCP (Model Context Protocol) servers directly in your configuration file. This allows MCP tools to be automatically loaded at startup without needing to specify them on the command line each time. When multiple MCP servers are configured, AIA connects to them **in parallel** using fiber-based concurrency (via the `simple_flow` gem) for faster startup.
|
|
1027
1245
|
|
|
1028
1246
|
#### Configuration Format
|
|
1029
1247
|
|
|
1030
|
-
Add MCP servers to your `~/.aia/
|
|
1248
|
+
Add MCP servers to your `~/.config/aia/aia.yml` file:
|
|
1031
1249
|
|
|
1032
1250
|
```yaml
|
|
1033
|
-
|
|
1251
|
+
mcp_servers:
|
|
1034
1252
|
- name: "server-name"
|
|
1035
1253
|
command: "server_command"
|
|
1036
1254
|
args: ["arg1", "arg2"]
|
|
@@ -1054,8 +1272,8 @@ Add MCP servers to your `~/.aia/config.yml` file:
|
|
|
1054
1272
|
The GitHub MCP server provides access to GitHub repositories, issues, pull requests, and more:
|
|
1055
1273
|
|
|
1056
1274
|
```yaml
|
|
1057
|
-
# ~/.aia/
|
|
1058
|
-
|
|
1275
|
+
# ~/.config/aia/aia.yml
|
|
1276
|
+
mcp_servers:
|
|
1059
1277
|
- name: "github"
|
|
1060
1278
|
command: "github-mcp-server"
|
|
1061
1279
|
args: ["stdio"]
|
|
@@ -1087,8 +1305,8 @@ See the [full HTM documentation](https://madbomber.github.io/htm) for database c
|
|
|
1087
1305
|
A custom Ruby-based MCP server for accessing database-backed long term memory:
|
|
1088
1306
|
|
|
1089
1307
|
```yaml
|
|
1090
|
-
# ~/.aia/
|
|
1091
|
-
|
|
1308
|
+
# ~/.config/aia/aia.yml
|
|
1309
|
+
mcp_servers:
|
|
1092
1310
|
- name: "htm"
|
|
1093
1311
|
command: "htm_mcp.rb"
|
|
1094
1312
|
args: ["stdio"]
|
|
@@ -1108,8 +1326,8 @@ A custom Ruby-based MCP server for accessing database-backed long term memory:
|
|
|
1108
1326
|
You can configure multiple MCP servers to provide different capabilities:
|
|
1109
1327
|
|
|
1110
1328
|
```yaml
|
|
1111
|
-
# ~/.aia/
|
|
1112
|
-
|
|
1329
|
+
# ~/.config/aia/aia.yml
|
|
1330
|
+
mcp_servers:
|
|
1113
1331
|
- name: "github"
|
|
1114
1332
|
command: "github-mcp-server"
|
|
1115
1333
|
args: ["stdio"]
|
|
@@ -1134,11 +1352,11 @@ When MCP servers are configured, AIA displays them in the startup robot:
|
|
|
1134
1352
|
|
|
1135
1353
|
```
|
|
1136
1354
|
, ,
|
|
1137
|
-
(\____/) AI Assistant (
|
|
1355
|
+
(\____/) AI Assistant (v1.1.0) is Online
|
|
1138
1356
|
(_oo_) gpt-4o-mini (supports tools)
|
|
1139
|
-
(O) using ruby_llm
|
|
1357
|
+
(O) using ruby_llm
|
|
1140
1358
|
__||__ \) model db was last refreshed on
|
|
1141
|
-
[/______\] / 2025-06-
|
|
1359
|
+
[/______\] / 2025-06-18
|
|
1142
1360
|
/ \__AI__/ \/ You can share my tools
|
|
1143
1361
|
/ /__\ MCP: github, htm
|
|
1144
1362
|
(\ /____\
|
|
@@ -1415,11 +1633,11 @@ echo "Home: $HOME" # Should show home directory
|
|
|
1415
1633
|
|
|
1416
1634
|
**Configuration issues:**
|
|
1417
1635
|
```bash
|
|
1418
|
-
#
|
|
1419
|
-
aia --
|
|
1636
|
+
# Dump current configuration to a file
|
|
1637
|
+
aia --dump config_snapshot.yml
|
|
1420
1638
|
|
|
1421
1639
|
# Debug configuration loading
|
|
1422
|
-
aia --debug
|
|
1640
|
+
aia --debug my_prompt
|
|
1423
1641
|
```
|
|
1424
1642
|
|
|
1425
1643
|
### Error Messages
|
|
@@ -1553,7 +1771,6 @@ rake test
|
|
|
1553
1771
|
|
|
1554
1772
|
- **Enhanced Search**: Restore full-text search within prompt files
|
|
1555
1773
|
- **UI Improvements**: Better configuration management for fzf and rg tools
|
|
1556
|
-
- **Logging**: Enhanced logging using Ruby Logger class; integration with RubyLLM and RubyLLM::MCP logging
|
|
1557
1774
|
|
|
1558
1775
|
## License
|
|
1559
1776
|
|