aia 1.1.0 → 2.0.0.0.pre.alpha
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/.envrc +5 -1
- data/.loki +231 -0
- data/.quality/flay_baseline.txt +1 -0
- data/.quality/flog_baseline.txt +29 -0
- data/.quality/reek_baseline.txt +80 -0
- data/.rubocop.yml +116 -0
- data/.version +1 -1
- data/CHANGELOG.md +266 -42
- data/IMPLEMENTATION_PLAN.md +506 -0
- data/README.md +266 -238
- data/Rakefile +118 -5
- data/architecture_review.md +314 -0
- data/bin/aia +16 -0
- data/docs/AGENTS.md +40 -0
- data/docs/advanced-prompting.md +67 -3
- data/docs/cli-reference.md +312 -56
- data/docs/configuration.md +130 -19
- data/docs/contributing.md +56 -2
- data/docs/directives-reference.md +593 -78
- data/docs/faq.md +85 -3
- data/docs/guides/available-models.md +1 -1
- data/docs/guides/basic-usage.md +6 -6
- data/docs/guides/chat.md +40 -16
- data/docs/guides/crew.md +239 -0
- data/docs/guides/executable-prompts.md +1 -1
- data/docs/guides/index.md +1 -0
- data/docs/guides/models.md +15 -0
- data/docs/index.md +29 -2
- data/docs/installation.md +44 -17
- data/docs/mcp-integration.md +40 -0
- data/docs/prompt_management.md +85 -86
- data/docs/security.md +47 -0
- data/docs/special_projects_guide.md +386 -0
- data/docs/tools-and-mcp-examples.md +23 -0
- data/docs/workflows-and-pipelines.md +84 -7
- data/examples/.gitignore +1 -0
- data/examples/00_setup_aia.sh +27 -44
- data/examples/11_multi_model.sh +4 -14
- data/examples/12_token_usage.sh +3 -12
- data/examples/18_tools.sh +10 -2
- data/examples/22_chat_mode.sh +0 -10
- data/examples/23_verify.sh +139 -0
- data/examples/24_decompose.sh +139 -0
- data/examples/25_spawn.sh +139 -0
- data/examples/26_debate.sh +97 -0
- data/examples/27_mention_routing.sh +157 -0
- data/examples/28_model_switching.sh +106 -0
- data/examples/29_agent_harness.sh +177 -0
- data/examples/README.md +65 -0
- data/examples/advanced_multi_robot_capabilities_without_examples.md +106 -0
- data/examples/aia_config.yml +1 -1
- data/examples/aia_config_orchestrator.yml +45 -0
- data/examples/common.sh +19 -0
- data/examples/context/tech_stack.md +2 -2
- data/examples/prompts_dir/project_summary +2 -2
- data/examples/prompts_dir/roles/orchestrator.md +21 -0
- data/examples/requirements/sinatra_taskflow_app.md +139 -0
- data/examples/rules/01_classify_ruby.rb +16 -0
- data/examples/rules/02_prefer_claude_for_code.rb +19 -0
- data/examples/rules/03_gate_prompt_length.rb +19 -0
- data/examples/rules/04_tool_selection.rb +41 -0
- data/examples/rules/README.md +30 -0
- data/examples/run_all.sh +48 -15
- data/examples/tools/word_count_tool.rb +1 -1
- data/lib/AGENTS.md +57 -0
- data/lib/aia/chat_loop.rb +306 -159
- data/lib/aia/config/cli_parser.rb +174 -111
- data/lib/aia/config/defaults.yml +62 -33
- data/lib/aia/config/mcp_parser.rb +39 -46
- data/lib/aia/config/model_spec.rb +34 -2
- data/lib/aia/config/validator.rb +121 -138
- data/lib/aia/config.rb +110 -145
- data/lib/aia/content_extractor.rb +153 -0
- data/lib/aia/cost_calculator.rb +38 -0
- data/lib/aia/crew.rb +164 -0
- data/lib/aia/debate_handler.rb +166 -0
- data/lib/aia/delegate_handler.rb +112 -0
- data/lib/aia/directive.rb +33 -18
- data/lib/aia/directive_processor.rb +16 -7
- data/lib/aia/directives/configuration_directives.rb +160 -20
- data/lib/aia/directives/context_directives.rb +38 -26
- data/lib/aia/directives/execution_directives.rb +136 -4
- data/lib/aia/directives/model_directives.rb +76 -34
- data/lib/aia/directives/trakflow_directives.rb +44 -0
- data/lib/aia/directives/utility_directives.rb +203 -6
- data/lib/aia/directives/web_and_file_directives.rb +96 -60
- data/lib/aia/errors.rb +15 -0
- data/lib/aia/fact_asserter.rb +27 -0
- data/lib/aia/fzf.rb +9 -31
- data/lib/aia/handler_context.rb +17 -0
- data/lib/aia/handler_protocol.rb +19 -0
- data/lib/aia/history_transfer.rb +55 -0
- data/lib/aia/input_collector.rb +3 -3
- data/lib/aia/layered_orchestrator.rb +448 -0
- data/lib/aia/logger.rb +24 -4
- data/lib/aia/mcp_config_normalizer.rb +35 -0
- data/lib/aia/mcp_connection_manager.rb +305 -0
- data/lib/aia/mcp_discovery.rb +44 -0
- data/lib/aia/mcp_grouper.rb +33 -0
- data/lib/aia/mcp_utility.rb +57 -0
- data/lib/aia/mention_router.rb +260 -0
- data/lib/aia/model_alias_registry.rb +97 -0
- data/lib/aia/model_switch_handler.rb +100 -0
- data/lib/aia/network_builder.rb +155 -0
- data/lib/aia/network_memory_manager.rb +55 -0
- data/lib/aia/patches/ruby_llm_streaming_error.rb +43 -0
- data/lib/aia/patches/ruby_llm_tool_error.rb +96 -0
- data/lib/aia/pipeline_orchestrator.rb +262 -0
- data/lib/aia/plugin_loader.rb +170 -0
- data/lib/aia/plugin_monitor.rb +208 -0
- data/lib/aia/prompt_decomposer.rb +157 -0
- data/lib/aia/prompt_handler.rb +19 -39
- data/lib/aia/robot_builder.rb +51 -0
- data/lib/aia/robot_factory.rb +334 -0
- data/lib/aia/robot_namer.rb +116 -0
- data/lib/aia/session.rb +83 -17
- data/lib/aia/session_tracker.rb +209 -0
- data/lib/aia/similarity_scorer.rb +39 -0
- data/lib/aia/skill_utils.rb +105 -1
- data/lib/aia/spawn_handler.rb +129 -0
- data/lib/aia/spawn_spec_parser.rb +65 -0
- data/lib/aia/special_mode_handler.rb +302 -0
- data/lib/aia/startup_coordinator.rb +150 -0
- data/lib/aia/streaming_runner.rb +169 -0
- data/lib/aia/system_prompt_assembler.rb +88 -0
- data/lib/aia/task_coordinator.rb +202 -0
- data/lib/aia/task_decomposer.rb +57 -0
- data/lib/aia/task_executor.rb +51 -0
- data/lib/aia/tfidf_math.rb +27 -0
- data/lib/aia/tool_filter/tfidf.rb +116 -0
- data/lib/aia/tool_filter/wordnet_expander.rb +127 -0
- data/lib/aia/tool_filter.rb +82 -0
- data/lib/aia/tool_filter_registry.rb +30 -0
- data/lib/aia/tool_filter_strategy.rb +143 -0
- data/lib/aia/tool_loader.rb +210 -0
- data/lib/aia/tool_utility.rb +30 -0
- data/lib/aia/tools/delegate_to_foreman_tool.rb +70 -0
- data/lib/aia/tools/recruit_robot_tool.rb +60 -0
- data/lib/aia/tools/reskill_robot_tool.rb +44 -0
- data/lib/aia/tools/task_board_tool.rb +114 -0
- data/lib/aia/trakflow_bridge.rb +173 -0
- data/lib/aia/turn_state.rb +94 -0
- data/lib/aia/ui_presenter.rb +166 -198
- data/lib/aia/utility.rb +134 -87
- data/lib/aia/{history_manager.rb → variable_input_collector.rb} +8 -9
- data/lib/aia/verification_network.rb +58 -0
- data/lib/aia.rb +108 -63
- data/mkdocs.yml +1 -0
- metadata +179 -56
- data/justfile +0 -215
- data/lib/aia/adapter/chat_execution.rb +0 -242
- data/lib/aia/adapter/error_handler.rb +0 -68
- data/lib/aia/adapter/gem_activator.rb +0 -57
- data/lib/aia/adapter/mcp_connector.rb +0 -274
- data/lib/aia/adapter/modality_handlers.rb +0 -167
- data/lib/aia/adapter/model_registry.rb +0 -81
- data/lib/aia/adapter/multi_model_chat.rb +0 -218
- data/lib/aia/adapter/provider_configurator.rb +0 -59
- data/lib/aia/adapter/tool_filter.rb +0 -85
- data/lib/aia/adapter/tool_loader.rb +0 -90
- data/lib/aia/chat_processor_service.rb +0 -164
- data/lib/aia/prompt_pipeline.rb +0 -183
- data/lib/aia/ruby_llm_adapter.rb +0 -95
- data/lib/extensions/openstruct_merge.rb +0 -48
- data/lib/extensions/ruby_llm/.irbrc +0 -56
- data/lib/extensions/ruby_llm/modalities.rb +0 -36
- data/lib/extensions/ruby_llm/provider_fix.rb +0 -79
- data/lib/refinements/string.rb +0 -16
- data/main.just +0 -76
data/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<h1>AI Assistant (AIA)</h1>
|
|
3
|
+
|
|
4
|
+
[](https://badge.fury.io/rb/aia)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
3
7
|
<img src="docs/assets/images/aia.png" alt="Robots waiter ready to take your order."><br />
|
|
4
8
|
**The Prompt is the Code**<br />
|
|
5
9
|
<p>Check out the new <a href="http://madbomber.github.io/aia/guides/models/?h=inline+role+syntax#inline-role-syntax">Inline Role Syntax</a> when working with multiple concurrent models.</p>
|
|
@@ -7,28 +11,35 @@
|
|
|
7
11
|
|
|
8
12
|
---
|
|
9
13
|
|
|
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
|
-
---
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
14
|
AIA is a command-line utility that facilitates interaction with AI models through dynamic prompt management. It automates the management of pre-compositional prompts and executes generative AI commands with enhanced features including embedded directives, shell integration, embedded Ruby, history management, interactive chat, and prompt workflows.
|
|
19
15
|
|
|
20
16
|
AIA leverages the following Ruby gems:
|
|
21
17
|
|
|
22
|
-
- **[
|
|
23
|
-
- **[
|
|
24
|
-
- **[
|
|
25
|
-
- and can use the **[shared_tools gem](https://github.com/madbomber/shared_tools)** which provides a collection of common ready-to-use
|
|
18
|
+
- **[prompt_manager](https://github.com/madbomber/prompt_manager)** (via `pm`) to manage prompts,
|
|
19
|
+
- **[robot_lab](https://github.com/madbomber/robot_lab)** as the AI execution engine — builds single robots or multi-model networks,
|
|
20
|
+
- **[trak_flow](https://github.com/madbomber/trak_flow)** for task tracking and robot-to-robot delegation workflows,
|
|
21
|
+
- and can use the **[shared_tools gem](https://github.com/madbomber/shared_tools)** which provides a collection of common ready-to-use tool functions for use with LLMs that support tools.
|
|
26
22
|
|
|
27
23
|
For more information on AIA visit these locations:
|
|
28
24
|
|
|
29
25
|
- **[The AIA Docs Website](https://madbomber.github.io/aia)**<br />
|
|
30
26
|
- **[Blog Series on AIA](https://madbomber.github.io/blog/engineering/AIA-Philosophy/)**
|
|
31
27
|
|
|
28
|
+
## Why AIA?
|
|
29
|
+
|
|
30
|
+
| Feature | AIA | Other CLI AI Tools |
|
|
31
|
+
|---------|-----|--------------------|
|
|
32
|
+
| Multi-model comparison | Built-in — send one prompt to N models simultaneously | Usually single-model |
|
|
33
|
+
| Prompt management | File-based system with history, variables, and fuzzy search | Limited or none |
|
|
34
|
+
| Workflow pipelines | Native `--next` / `--pipeline` chaining | Manual chaining required |
|
|
35
|
+
| Local model support | Ollama and LM Studio out of the box | Varies |
|
|
36
|
+
| Tool integration | RubyLLM tools + MCP server ecosystem | Limited |
|
|
37
|
+
| Shell & ERB integration | Native — prompts are live Ruby/shell programs | External only |
|
|
38
|
+
| Agent orchestration | Debate, spawn, verify, decompose, delegate directives | Not available |
|
|
39
|
+
| Context checkpoints | Save, restore, and review conversation state | Not available |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
32
43
|
## Quick Start
|
|
33
44
|
|
|
34
45
|
1. **Install AIA:**
|
|
@@ -63,15 +74,19 @@ For more information on AIA visit these locations:
|
|
|
63
74
|
|
|
64
75
|
```plain
|
|
65
76
|
|
|
66
|
-
, ,
|
|
67
|
-
(\____/)
|
|
68
|
-
(_oo_)
|
|
69
|
-
(O)
|
|
70
|
-
__
|
|
71
|
-
[/
|
|
72
|
-
/ \
|
|
73
|
-
/ /
|
|
74
|
-
(\ /
|
|
77
|
+
, , AIA v2.0.0.alpha is Online
|
|
78
|
+
(\____/)
|
|
79
|
+
(_oo_) Models: gpt-4o-mini
|
|
80
|
+
(O) DB: refreshed 2026-03-19 at 10:56
|
|
81
|
+
__|||__ \) Libs: ruby_llm v1.14.0, ruby_llm-mcp v1.0.0, robot_lab v0.0.9,
|
|
82
|
+
[/ Tobor \] / simple_flow v0.3.0, trak_flow v0.1.3, typed_bus v0.0.1
|
|
83
|
+
/ \_______/ \/ Tools: 0 tools loaded
|
|
84
|
+
/ /___\ MCP: (none configured)
|
|
85
|
+
(\ /_____\ Crew: @tobor
|
|
86
|
+
::: :::
|
|
87
|
+
::: :::
|
|
88
|
+
|
|
89
|
+
Entering interactive chat mode...
|
|
75
90
|
|
|
76
91
|
```
|
|
77
92
|
|
|
@@ -116,114 +131,6 @@ Implement a schema registry with event-driven synchronization...
|
|
|
116
131
|
|
|
117
132
|
---
|
|
118
133
|
|
|
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
|
-
|
|
227
134
|
<!-- Tocer[start]: Auto-generated, don't remove. -->
|
|
228
135
|
|
|
229
136
|
## Table of Contents
|
|
@@ -243,14 +150,31 @@ Skills accumulate — specify multiple with commas or repeat `-s`. Each skill is
|
|
|
243
150
|
- [Complete Configuration Reference](#complete-configuration-reference)
|
|
244
151
|
- [Advanced Features](#advanced-features)
|
|
245
152
|
- [Prompt Directives](#prompt-directives)
|
|
153
|
+
- [Model & Configuration](#model--configuration)
|
|
154
|
+
- [Content & Data](#content--data)
|
|
155
|
+
- [Execution & Code](#execution--code)
|
|
156
|
+
- [Agent Orchestration](#agent-orchestration)
|
|
157
|
+
- [Prompt Workflows](#prompt-workflows)
|
|
158
|
+
- [Context & Checkpoints](#context--checkpoints)
|
|
159
|
+
- [Status & Info](#status--info)
|
|
160
|
+
- [TrakFlow](#trakflow)
|
|
246
161
|
- [Configuration Directive Examples](#configuration-directive-examples)
|
|
247
162
|
- [Dynamic Content Examples](#dynamic-content-examples)
|
|
163
|
+
- [Context Management with Checkpoints](#context-management-with-checkpoints)
|
|
248
164
|
- [Custom Directive Examples](#custom-directive-examples)
|
|
249
165
|
- [Multi-Model Support](#multi-model-support)
|
|
250
166
|
- [Basic Multi-Model Usage](#basic-multi-model-usage)
|
|
251
167
|
- [Consensus Mode](#consensus-mode)
|
|
252
168
|
- [Individual Responses Mode](#individual-responses-mode)
|
|
253
169
|
- [Model Information](#model-information)
|
|
170
|
+
- [@mention Routing](#mention-routing)
|
|
171
|
+
- [Building a Crew at Runtime](#building-a-crew-at-runtime)
|
|
172
|
+
- [Dynamic Model Switching](#dynamic-model-switching)
|
|
173
|
+
- [Token Usage and Cost Tracking](#token-usage-and-cost-tracking)
|
|
174
|
+
- [Local Model Support](#local-model-support)
|
|
175
|
+
- [Ollama Integration](#ollama-integration)
|
|
176
|
+
- [LM Studio Integration](#lm-studio-integration)
|
|
177
|
+
- [Listing Local Models](#listing-local-models)
|
|
254
178
|
- [Shell Integration](#shell-integration)
|
|
255
179
|
- [Embedded Ruby (ERB)](#embedded-ruby-erb)
|
|
256
180
|
- [Prompt Sequences](#prompt-sequences)
|
|
@@ -259,12 +183,21 @@ Skills accumulate — specify multiple with commas or repeat `-s`. Each skill is
|
|
|
259
183
|
- [Example Workflow](#example-workflow)
|
|
260
184
|
- [Roles and System Prompts](#roles-and-system-prompts)
|
|
261
185
|
- [RubyLLM::Tool Support](#rubyllmtool-support)
|
|
186
|
+
- [TrakFlow Task Integration](#trakflow-task-integration)
|
|
262
187
|
- [MCP Server Configuration](#mcp-server-configuration)
|
|
188
|
+
- [Configuration Format](#configuration-format)
|
|
189
|
+
- [Configuration Options](#configuration-options)
|
|
190
|
+
- [Example: GitHub MCP Server](#example-github-mcp-server)
|
|
191
|
+
- [Example: Hierarchical Temporal Memory (HTM)](#example-hierarchical-temporal-memory-htm)
|
|
192
|
+
- [Example: Multiple MCP Servers](#example-multiple-mcp-servers)
|
|
193
|
+
- [Verifying MCP Server Configuration](#verifying-mcp-server-configuration)
|
|
194
|
+
- [Troubleshooting MCP Servers](#troubleshooting-mcp-servers)
|
|
263
195
|
- [Examples & Tips](#examples--tips)
|
|
264
196
|
- [Practical Examples](#practical-examples)
|
|
265
197
|
- [Code Review Prompt](#code-review-prompt)
|
|
266
198
|
- [Meeting Notes Processor](#meeting-notes-processor)
|
|
267
199
|
- [Documentation Generator](#documentation-generator)
|
|
200
|
+
- [Multi-Model Decision Making](#multi-model-decision-making)
|
|
268
201
|
- [Executable Prompts](#executable-prompts)
|
|
269
202
|
- [Tips from the Author](#tips-from-the-author)
|
|
270
203
|
- [The run Prompt](#the-run-prompt)
|
|
@@ -278,7 +211,7 @@ Skills accumulate — specify multiple with commas or repeat `-s`. Each skill is
|
|
|
278
211
|
- [Troubleshooting](#troubleshooting)
|
|
279
212
|
- [Common Issues](#common-issues)
|
|
280
213
|
- [Error Messages](#error-messages)
|
|
281
|
-
- [Debug Mode](#debug-mode)
|
|
214
|
+
- [Debug Mode and Log Level Options](#debug-mode-and-log-level-options)
|
|
282
215
|
- [Performance Issues](#performance-issues)
|
|
283
216
|
- [Development](#development)
|
|
284
217
|
- [Testing](#testing)
|
|
@@ -298,7 +231,7 @@ Skills accumulate — specify multiple with commas or repeat `-s`. Each skill is
|
|
|
298
231
|
|
|
299
232
|
### Requirements
|
|
300
233
|
|
|
301
|
-
- **Ruby**: >=
|
|
234
|
+
- **Ruby**: >= 4.0.0
|
|
302
235
|
- **External Tools**:
|
|
303
236
|
- [fzf](https://github.com/junegunn/fzf) - Command-line fuzzy finder
|
|
304
237
|
|
|
@@ -366,15 +299,13 @@ aia --fuzzy
|
|
|
366
299
|
| `--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` |
|
|
367
300
|
| `--consensus` | Enable consensus mode for multi-model | `aia --consensus` |
|
|
368
301
|
| `--no-consensus` | Force individual responses | `aia --no-consensus` |
|
|
369
|
-
| `--role ROLE` | Use a role/system prompt
|
|
302
|
+
| `--role ROLE` | Use a role/system prompt (default for all models) | `aia --role expert` |
|
|
370
303
|
| `--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` |
|
|
374
304
|
| `--output FILE` | Specify output file | `aia --output results.md` |
|
|
375
305
|
| `--fuzzy` | Use fuzzy search for prompts | `aia --fuzzy` |
|
|
376
306
|
| `--tokens` | Display token usage in chat mode | `aia --chat --tokens` |
|
|
377
307
|
| `--cost` | Include cost calculations with token usage | `aia --chat --cost` |
|
|
308
|
+
| `--thinking` | Show raw reasoning blocks from local models (default: off) | `aia --chat --thinking -m ollama/qwen3:latest` |
|
|
378
309
|
| `--mcp-list` | List configured MCP servers and exit | `aia --mcp-list` |
|
|
379
310
|
| `--list-tools` | List available tools and exit | `aia --require shared_tools --list-tools` |
|
|
380
311
|
| `--help` | Show complete help | `aia --help` |
|
|
@@ -388,11 +319,6 @@ aia --fuzzy
|
|
|
388
319
|
├── roles/ # Role/system prompts
|
|
389
320
|
│ ├── expert.md # Expert role
|
|
390
321
|
│ └── 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
|
|
396
322
|
└── _prompts.log # History log
|
|
397
323
|
```
|
|
398
324
|
|
|
@@ -468,6 +394,7 @@ The configuration schema is defined in [defaults.yml](lib/aia/config/defaults.ym
|
|
|
468
394
|
| `flags.verbose` | `-v`, `--verbose` | `false` | `AIA_FLAGS__VERBOSE` |
|
|
469
395
|
| `flags.tokens` | `--tokens` | `false` | `AIA_FLAGS__TOKENS` |
|
|
470
396
|
| `flags.cost` | `--cost` | `false` | `AIA_FLAGS__COST` |
|
|
397
|
+
| `flags.thinking` | `--[no-]thinking` | `false` | `AIA_FLAGS__THINKING` |
|
|
471
398
|
| `flags.consensus` | `--[no-]consensus` | `false` | `AIA_FLAGS__CONSENSUS` |
|
|
472
399
|
| `flags.speak` | `--speak` | `false` | `AIA_FLAGS__SPEAK` |
|
|
473
400
|
| `flags.shell` | | `true` | `AIA_FLAGS__SHELL` |
|
|
@@ -486,7 +413,7 @@ The configuration schema is defined in [defaults.yml](lib/aia/config/defaults.ym
|
|
|
486
413
|
| `llm.frequency_penalty` | `--frequency-penalty` | `0.0` | `AIA_LLM__FREQUENCY_PENALTY` |
|
|
487
414
|
| `llm.presence_penalty` | `--presence-penalty` | `0.0` | `AIA_LLM__PRESENCE_PENALTY` |
|
|
488
415
|
|
|
489
|
-
**Prompts
|
|
416
|
+
**Prompts & Roles:**
|
|
490
417
|
|
|
491
418
|
| Config Path | CLI Options | Default | Environment Variable |
|
|
492
419
|
|-------------|-------------|---------|---------------------|
|
|
@@ -495,9 +422,6 @@ The configuration schema is defined in [defaults.yml](lib/aia/config/defaults.ym
|
|
|
495
422
|
| `prompts.roles_prefix` | `--roles-prefix` | `roles` | `AIA_PROMPTS__ROLES_PREFIX` |
|
|
496
423
|
| `prompts.roles_dir` | | `~/.prompts/roles` | `AIA_PROMPTS__ROLES_DIR` |
|
|
497
424
|
| `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
425
|
| `prompts.system_prompt` | `--system-prompt` | | `AIA_PROMPTS__SYSTEM_PROMPT` |
|
|
502
426
|
| `pipeline` | `-p`, `--pipeline` | `[]` | |
|
|
503
427
|
| | `-n`, `--next` | | |
|
|
@@ -517,10 +441,10 @@ The configuration schema is defined in [defaults.yml](lib/aia/config/defaults.ym
|
|
|
517
441
|
|
|
518
442
|
| Config Path | CLI Options | Default | Environment Variable |
|
|
519
443
|
|-------------|-------------|---------|---------------------|
|
|
520
|
-
| `audio.voice` | `--voice` |
|
|
521
|
-
| `audio.speak_command` | | `
|
|
522
|
-
| `audio.speech_model` | `--sm`, `--speech-model` |
|
|
523
|
-
| `audio.transcription_model` | `--tm`, `--transcription-model` |
|
|
444
|
+
| `audio.voice` | `--voice` | `~` (system default) | `AIA_AUDIO__VOICE` |
|
|
445
|
+
| `audio.speak_command` | | `say` (macOS TTS) | `AIA_AUDIO__SPEAK_COMMAND` |
|
|
446
|
+
| `audio.speech_model` | `--sm`, `--speech-model` | `~` (unset) | `AIA_AUDIO__SPEECH_MODEL` |
|
|
447
|
+
| `audio.transcription_model` | `--tm`, `--transcription-model` | `~` (unset) | `AIA_AUDIO__TRANSCRIPTION_MODEL` |
|
|
524
448
|
| `image.size` | `--is`, `--image-size` | `1024x1024` | `AIA_IMAGE__SIZE` |
|
|
525
449
|
| `image.quality` | `--iq`, `--image-quality` | `standard` | `AIA_IMAGE__QUALITY` |
|
|
526
450
|
| `image.style` | `--style`, `--image-style` | `vivid` | `AIA_IMAGE__STYLE` |
|
|
@@ -570,31 +494,83 @@ The configuration schema is defined in [defaults.yml](lib/aia/config/defaults.ym
|
|
|
570
494
|
|
|
571
495
|
### Prompt Directives
|
|
572
496
|
|
|
573
|
-
Directives are special commands in prompt files that begin with `/` and provide dynamic functionality
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
|
578
|
-
|
|
579
|
-
| `/
|
|
580
|
-
| `/
|
|
581
|
-
| `/
|
|
582
|
-
| `/
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
|
587
|
-
|
|
588
|
-
| `/
|
|
589
|
-
| `/
|
|
590
|
-
| `/
|
|
591
|
-
| `/
|
|
592
|
-
| `/
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
497
|
+
Directives are special commands in prompt files and chat sessions that begin with `/` and provide dynamic functionality.
|
|
498
|
+
|
|
499
|
+
#### Model & Configuration
|
|
500
|
+
|
|
501
|
+
| Directive | Aliases | Description | Example |
|
|
502
|
+
|-----------|---------|-------------|---------|
|
|
503
|
+
| `/config` | `/cfg` | View or set configuration values | `/config model = gpt-4` |
|
|
504
|
+
| `/model` | | View or change the active AI model | `/model gpt-4o` |
|
|
505
|
+
| `/temperature` | `/temp` | Set LLM temperature | `/temperature 0.3` |
|
|
506
|
+
| `/top_p` | `/topp` | Set LLM top_p | `/top_p 0.9` |
|
|
507
|
+
|
|
508
|
+
#### Content & Data
|
|
509
|
+
|
|
510
|
+
| Directive | Aliases | Description | Example |
|
|
511
|
+
|-----------|---------|-------------|---------|
|
|
512
|
+
| `/include` | | Insert file contents | `/include path/to/file.txt` |
|
|
513
|
+
| `/paste` | | Insert clipboard contents | `/paste` |
|
|
514
|
+
| `/webpage` | `/web`, `/website` | Fetch and insert a webpage's text content | `/webpage https://example.com` |
|
|
515
|
+
| `/skill` | | Include an AIA skill from the skills directory | `/skill code-quality` |
|
|
516
|
+
| `/skills` | | List available AIA skills (supports search terms) | `/skills ruby -test` |
|
|
517
|
+
|
|
518
|
+
#### Execution & Code
|
|
519
|
+
|
|
520
|
+
| Directive | Aliases | Description | Example |
|
|
521
|
+
|-----------|---------|-------------|---------|
|
|
522
|
+
| `/ruby` | `/rb` | Execute Ruby code | `/ruby puts "Hello World"` |
|
|
523
|
+
| `/shell` | | Execute a shell command | `/shell ls -la` |
|
|
524
|
+
| `/say` | | Speak a string via text-to-speech | `/say Hello there` |
|
|
525
|
+
| `/concurrent` | `/conc` | Enable concurrent MCP for the next prompt | `/concurrent` |
|
|
526
|
+
|
|
527
|
+
#### Agent Orchestration
|
|
528
|
+
|
|
529
|
+
| Directive | Aliases | Description | Example |
|
|
530
|
+
|-----------|---------|-------------|---------|
|
|
531
|
+
| `/verify` | | Two independent answers + reconciliation | `/verify` |
|
|
532
|
+
| `/decompose` | | Decompose prompt into **fully independent**, concurrent sub-tasks; runs normally if tasks cannot all run in parallel | `/decompose` |
|
|
533
|
+
| `/debate` | | Multi-round debate between robots | `/debate` |
|
|
534
|
+
| `/spawn` | | Spawn a specialist robot for a domain-specific question | `/spawn ruby-expert` |
|
|
535
|
+
| `/delegate` | `/del` | Delegate a subtask via TrakFlow | `/delegate` |
|
|
536
|
+
|
|
537
|
+
#### Prompt Workflows
|
|
538
|
+
|
|
539
|
+
| Directive | Aliases | Description | Example |
|
|
540
|
+
|-----------|---------|-------------|---------|
|
|
541
|
+
| `/next` | | Set next prompt in sequence | `/next summary` |
|
|
542
|
+
| `/pipeline` | | Set prompt workflow sequence | `/pipeline analyze,summarize,report` |
|
|
543
|
+
|
|
544
|
+
#### Context & Checkpoints
|
|
545
|
+
|
|
546
|
+
| Directive | Aliases | Description | Example |
|
|
547
|
+
|-----------|---------|-------------|---------|
|
|
548
|
+
| `/checkpoint` | `/ckp`, `/cp` | Create a named context checkpoint | `/checkpoint save_point` |
|
|
549
|
+
| `/restore` | | Restore context to a previous checkpoint | `/restore save_point` |
|
|
550
|
+
| `/review` | `/context` | Display current context with checkpoint markers | `/review` |
|
|
551
|
+
| `/checkpoints` | | List all available checkpoints | `/checkpoints` |
|
|
552
|
+
| `/clear` | | Clear conversation history and checkpoints | `/clear` |
|
|
553
|
+
|
|
554
|
+
#### Status & Info
|
|
555
|
+
|
|
556
|
+
| Directive | Aliases | Description | Example |
|
|
557
|
+
|-----------|---------|-------------|---------|
|
|
558
|
+
| `/available_models` | `/models`, `/llms`, `/am` | List available models | `/available_models` |
|
|
559
|
+
| `/compare` | `/cmp` | Compare responses from multiple models | `/compare` |
|
|
560
|
+
| `/cost` | | Dump per-turn cost/token metrics as CSV | `/cost` |
|
|
561
|
+
| `/tools` | | Show available tools (optional name filter) | `/tools` or `/tools github` |
|
|
562
|
+
| `/mcp` | | Show MCP server connection status | `/mcp` |
|
|
563
|
+
| `/robots` | | Show active robot and network configuration | `/robots` |
|
|
564
|
+
| `/robot` | | Display ASCII robot art with version info | `/robot` |
|
|
565
|
+
| `/help` | | Show available directives | `/help` |
|
|
566
|
+
|
|
567
|
+
#### TrakFlow
|
|
568
|
+
|
|
569
|
+
| Directive | Aliases | Description | Example |
|
|
570
|
+
|-----------|---------|-------------|---------|
|
|
571
|
+
| `/tasks` | `/tf` | Show TrakFlow ready tasks | `/tasks` |
|
|
572
|
+
| `/plan` | | Create a TrakFlow plan from a description | `/plan` |
|
|
573
|
+
| `/task` | | Create a TrakFlow task | `/task` |
|
|
598
574
|
|
|
599
575
|
#### Configuration Directive Examples
|
|
600
576
|
|
|
@@ -806,6 +782,73 @@ Model Details:
|
|
|
806
782
|
- **Error Handling**: Invalid models are reported but don't prevent valid models from working
|
|
807
783
|
- **Batch Mode Support**: Multi-model responses are properly formatted in output files
|
|
808
784
|
|
|
785
|
+
#### @mention Routing
|
|
786
|
+
|
|
787
|
+
Every chat session is a **crew** of robots (a single model is simply a crew of
|
|
788
|
+
one). The lead robot is the **chief**, and you can address other members
|
|
789
|
+
directly by prefixing a name with `@`:
|
|
790
|
+
|
|
791
|
+
```bash
|
|
792
|
+
aia --chat -m gpt-4o,claude-3-5-sonnet
|
|
793
|
+
|
|
794
|
+
# Address a specific robot in the crew
|
|
795
|
+
> @claude-3-5-sonnet What do you think about this approach?
|
|
796
|
+
|
|
797
|
+
# Only the mentioned robot responds; the @mention is stripped from the prompt
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
Robot names are derived from the model name (recruited robots use the name you
|
|
801
|
+
give them). Use `/robots` to see the active crew and their `@mention` handles.
|
|
802
|
+
|
|
803
|
+
**Where** you place the mentions changes how they run:
|
|
804
|
+
|
|
805
|
+
```bash
|
|
806
|
+
# Leading address → concurrent: both run at once, replies render as they finish
|
|
807
|
+
> @gpt-4o @claude-3-5-sonnet what are the trade-offs of optimistic locking?
|
|
808
|
+
|
|
809
|
+
# Body mention → sequential pipeline: each reply is shared into the others'
|
|
810
|
+
# context, so later robots build on earlier ones
|
|
811
|
+
> draft a plan @gpt-4o then have @claude-3-5-sonnet poke holes in it
|
|
812
|
+
|
|
813
|
+
# @crew is a reserved handle that broadcasts to every member, concurrently
|
|
814
|
+
> @crew in one sentence, what is your specialty?
|
|
815
|
+
```
|
|
816
|
+
|
|
817
|
+
#### Building a Crew at Runtime
|
|
818
|
+
|
|
819
|
+
Add and remove members mid-session. Recruited robots persist for the session,
|
|
820
|
+
answer to `@name`, and inherit the chief's tools and MCP servers.
|
|
821
|
+
|
|
822
|
+
```bash
|
|
823
|
+
# Inherit the chief's model
|
|
824
|
+
/add_recruit researcher
|
|
825
|
+
|
|
826
|
+
# Explicit provider/model plus a system prompt (alias: /add)
|
|
827
|
+
/add_recruit critic anthropic/claude-3-5-sonnet You are a ruthless design critic.
|
|
828
|
+
|
|
829
|
+
# A local member
|
|
830
|
+
/add_recruit local ollama/qwen3.6:latest You are concise and fast.
|
|
831
|
+
|
|
832
|
+
# Remove a member (alias: /drop); the chief cannot be dropped
|
|
833
|
+
/drop_recruit researcher
|
|
834
|
+
```
|
|
835
|
+
|
|
836
|
+
Unlike `/spawn` — a one-shot specialist for the next prompt only — recruited
|
|
837
|
+
members stay in the crew. See the [Crews guide](docs/guides/crew.md) for the
|
|
838
|
+
full picture.
|
|
839
|
+
|
|
840
|
+
#### Dynamic Model Switching
|
|
841
|
+
|
|
842
|
+
Switch models mid-session naturally — AIA detects the intent and rebuilds the robot with conversation history preserved:
|
|
843
|
+
|
|
844
|
+
```bash
|
|
845
|
+
> Switch to claude-3-5-sonnet
|
|
846
|
+
# AIA detects the model-change intent, rebuilds the robot,
|
|
847
|
+
# and transfers the full conversation history automatically.
|
|
848
|
+
```
|
|
849
|
+
|
|
850
|
+
Use `/model` to see or set the current model explicitly.
|
|
851
|
+
|
|
809
852
|
#### Token Usage and Cost Tracking
|
|
810
853
|
|
|
811
854
|
Monitor token consumption and estimate costs across all models with `--tokens` and `--cost`:
|
|
@@ -870,6 +913,14 @@ aia --model ollama/llama3.2,gpt-4o-mini --consensus my_prompt
|
|
|
870
913
|
export OLLAMA_API_BASE=http://localhost:11434
|
|
871
914
|
```
|
|
872
915
|
|
|
916
|
+
**Reasoning models:** models such as `qwen3` stream their chain-of-thought
|
|
917
|
+
wrapped in `<think>...</think>` tags. AIA hides these by default; pass
|
|
918
|
+
`--thinking` to display the reasoning along with the answer:
|
|
919
|
+
|
|
920
|
+
```bash
|
|
921
|
+
aia --chat --thinking --model ollama/qwen3:latest
|
|
922
|
+
```
|
|
923
|
+
|
|
873
924
|
#### LM Studio Integration
|
|
874
925
|
|
|
875
926
|
[LM Studio](https://lmstudio.ai) provides a desktop application for running local models with an OpenAI-compatible API.
|
|
@@ -897,16 +948,14 @@ export LMS_API_BASE=http://localhost:1234/v1
|
|
|
897
948
|
|
|
898
949
|
#### Listing Local Models
|
|
899
950
|
|
|
900
|
-
The `/
|
|
951
|
+
The `/available_models` directive (alias: `/models`) lists all models known to the system:
|
|
901
952
|
|
|
902
953
|
```bash
|
|
903
954
|
# In a prompt file or chat session
|
|
904
|
-
/
|
|
955
|
+
/available_models
|
|
905
956
|
|
|
906
|
-
#
|
|
907
|
-
|
|
908
|
-
# - LM Studio models from http://localhost:1234/v1/models
|
|
909
|
-
# - Cloud models from RubyLLM database
|
|
957
|
+
# Or use the short alias
|
|
958
|
+
/models
|
|
910
959
|
```
|
|
911
960
|
|
|
912
961
|
**Benefits of Local Models:**
|
|
@@ -1109,21 +1158,6 @@ echo "You are a senior software architect..." > ~/.prompts/roles/specialized/sen
|
|
|
1109
1158
|
aia --model gpt-4o=specialized/senior_architect design.md
|
|
1110
1159
|
```
|
|
1111
1160
|
|
|
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
1161
|
**Using Config Files for Model Roles:**
|
|
1128
1162
|
|
|
1129
1163
|
Define model-role assignments in your config file (`~/.config/aia/aia.yml`) for reusable setups:
|
|
@@ -1172,35 +1206,6 @@ When model roles are specified in multiple places, the precedence is:
|
|
|
1172
1206
|
3. **Environment variable**: `AIA_MODEL="gpt-4o=architect"`
|
|
1173
1207
|
4. **Config file** (lowest): `models` array in `~/.config/aia/aia.yml`
|
|
1174
1208
|
|
|
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
|
|
1193
|
-
```
|
|
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
|
-
|
|
1204
1209
|
### RubyLLM::Tool Support
|
|
1205
1210
|
|
|
1206
1211
|
AIA supports function calling through RubyLLM tools for extended capabilities:
|
|
@@ -1237,7 +1242,24 @@ aia --tools examples/tools/mcp/github_mcp_server.rb --chat
|
|
|
1237
1242
|
aia --tools examples/tools/mcp/imcp.rb --chat
|
|
1238
1243
|
```
|
|
1239
1244
|
|
|
1240
|
-
These MCP clients
|
|
1245
|
+
These MCP clients provide access to external services and data sources through the Model Context Protocol.
|
|
1246
|
+
|
|
1247
|
+
### TrakFlow Task Integration
|
|
1248
|
+
|
|
1249
|
+
AIA integrates with [TrakFlow](https://github.com/madbomber/trak_flow) for structured task tracking and robot-to-robot delegation.
|
|
1250
|
+
|
|
1251
|
+
```bash
|
|
1252
|
+
# Create a plan from a description
|
|
1253
|
+
> /plan Build a REST API with authentication
|
|
1254
|
+
|
|
1255
|
+
# View ready tasks
|
|
1256
|
+
> /tasks
|
|
1257
|
+
|
|
1258
|
+
# Create an individual task
|
|
1259
|
+
> /task Implement the login endpoint
|
|
1260
|
+
```
|
|
1261
|
+
|
|
1262
|
+
Use `/delegate` to hand off a subtask to a specialist robot — AIA spawns the robot, routes the work, and reports results back into the conversation.
|
|
1241
1263
|
|
|
1242
1264
|
### MCP Server Configuration
|
|
1243
1265
|
|
|
@@ -1351,15 +1373,19 @@ mcp_servers:
|
|
|
1351
1373
|
When MCP servers are configured, AIA displays them in the startup robot:
|
|
1352
1374
|
|
|
1353
1375
|
```
|
|
1354
|
-
, ,
|
|
1355
|
-
(\____/)
|
|
1356
|
-
(_oo_)
|
|
1357
|
-
(O)
|
|
1358
|
-
__
|
|
1359
|
-
[/
|
|
1360
|
-
/ \
|
|
1361
|
-
/ /
|
|
1362
|
-
(\ /
|
|
1376
|
+
, , AIA v2.0.0.alpha is Online
|
|
1377
|
+
(\____/)
|
|
1378
|
+
(_oo_) Models: gpt-4o-mini
|
|
1379
|
+
(O) DB: refreshed 2026-03-19 at 10:56
|
|
1380
|
+
__|||__ \) Libs: ruby_llm v1.14.0, ruby_llm-mcp v1.0.0, robot_lab v0.0.9,
|
|
1381
|
+
[/ Tobor \] / simple_flow v0.3.0, trak_flow v0.1.3, typed_bus v0.0.1
|
|
1382
|
+
/ \_______/ \/ Tools: 24 tools loaded
|
|
1383
|
+
/ /___\ MCP: github, htm
|
|
1384
|
+
(\ /_____\ Crew: @tobor
|
|
1385
|
+
::: :::
|
|
1386
|
+
::: :::
|
|
1387
|
+
|
|
1388
|
+
Entering interactive chat mode...
|
|
1363
1389
|
```
|
|
1364
1390
|
|
|
1365
1391
|
Use the `/tools` directive in chat mode to see all available tools including those from MCP servers:
|
|
@@ -1504,7 +1530,7 @@ Create executable prompts:
|
|
|
1504
1530
|
|
|
1505
1531
|
**weather_report** (make executable with `chmod +x`):
|
|
1506
1532
|
```bash
|
|
1507
|
-
#!/usr/bin/env aia
|
|
1533
|
+
#!/usr/bin/env aia --no-output
|
|
1508
1534
|
# Get current storm activity for the east and south coast of the US
|
|
1509
1535
|
|
|
1510
1536
|
Summarize the tropical storm outlook fpr the Atlantic, Caribbean Sea and Gulf of America.
|
|
@@ -1528,7 +1554,7 @@ Usage:
|
|
|
1528
1554
|
# You could also add a system prompt to preface your intended prompt
|
|
1529
1555
|
```
|
|
1530
1556
|
|
|
1531
|
-
Usage: `echo "What is the meaning of life?" | aia
|
|
1557
|
+
Usage: `echo "What is the meaning of life?" | aia`
|
|
1532
1558
|
|
|
1533
1559
|
#### The Ad Hoc One-shot Prompt
|
|
1534
1560
|
```bash
|
|
@@ -1546,7 +1572,7 @@ export AIA_MODEL=gpt-4o-mini
|
|
|
1546
1572
|
export AIA_FLAGS__VERBOSE=true # Shows spinner while waiting for LLM response
|
|
1547
1573
|
|
|
1548
1574
|
alias chat='aia --chat --terse'
|
|
1549
|
-
ask() { echo "$1" | aia
|
|
1575
|
+
ask() { echo "$1" | aia --no-output; }
|
|
1550
1576
|
```
|
|
1551
1577
|
|
|
1552
1578
|
The `chat` alias and the `ask` function (shown above in HASH) are two powerful tools for interacting with the AI assistant. The `chat` alias allows you to engage in an interactive conversation with the AI assistant, while the `ask` function allows you to ask a question and receive a response. Later in this document the `run` prompt ID is discussed. Besides using the run prompt ID here its also used in making executable prompt files.
|
|
@@ -1732,8 +1758,10 @@ just flay
|
|
|
1732
1758
|
|
|
1733
1759
|
### Architecture Notes
|
|
1734
1760
|
|
|
1735
|
-
|
|
1736
|
-
|
|
1761
|
+
AIA v2 is powered by the `robot_lab` gem. The v1 `RubyLLMAdapter` and `lib/aia/adapter/` layer have been removed.
|
|
1762
|
+
|
|
1763
|
+
- **`RobotFactory`** builds `RobotLab::Robot` or `RobotLab::Network` instances. Supports single-robot, parallel multi-model, consensus, and pipeline network modes.
|
|
1764
|
+
- `robot_lab` uses `ruby_llm` internally for LLM provider access, so the full model ecosystem remains available.
|
|
1737
1765
|
|
|
1738
1766
|
**Prompt Variable Fallback:**
|
|
1739
1767
|
Variables are always parsed from prompt text when no `.json` history file exists, ensuring parameter prompting works correctly.
|