aia 0.11.1 → 1.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/.version +1 -1
- data/CHANGELOG.md +17 -0
- data/README.md +93 -93
- data/Rakefile +6 -1
- data/docs/advanced-prompting.md +62 -62
- data/docs/cli-reference.md +2 -2
- data/docs/configuration.md +7 -7
- data/docs/contributing.md +1 -1
- data/docs/directives-reference.md +174 -166
- data/docs/examples/index.md +3 -3
- data/docs/examples/mcp/index.md +6 -6
- data/docs/examples/prompts/analysis/index.md +30 -30
- data/docs/examples/prompts/automation/index.md +39 -39
- data/docs/examples/prompts/development/index.md +26 -26
- data/docs/examples/prompts/index.md +24 -24
- data/docs/examples/prompts/learning/index.md +51 -51
- data/docs/examples/prompts/writing/index.md +20 -20
- data/docs/examples/tools/index.md +1 -1
- data/docs/faq.md +22 -22
- data/docs/guides/available-models.md +10 -10
- data/docs/guides/basic-usage.md +9 -9
- data/docs/guides/chat.md +110 -31
- data/docs/guides/executable-prompts.md +182 -268
- data/docs/guides/first-prompt.md +50 -50
- data/docs/guides/getting-started.md +32 -32
- data/docs/guides/image-generation.md +39 -39
- data/docs/guides/local-models.md +4 -4
- data/docs/guides/migrate-prompts.md +335 -0
- data/docs/guides/models.md +90 -36
- data/docs/guides/shared-tools.md +1 -1
- data/docs/guides/tools.md +11 -11
- data/docs/index.md +83 -14
- data/docs/installation.md +1 -1
- data/docs/mcp-integration.md +17 -17
- data/docs/prompt_management.md +67 -67
- data/docs/security.md +3 -3
- data/docs/tools-and-mcp-examples.md +6 -6
- data/docs/workflows-and-pipelines.md +69 -69
- data/lib/aia/aia_completion.bash +2 -2
- data/lib/aia/aia_completion.fish +3 -3
- data/lib/aia/aia_completion.zsh +2 -2
- data/lib/aia/config/cli_parser.rb +8 -7
- data/lib/aia/config/defaults.yml +3 -3
- data/lib/aia/config/validator.rb +44 -8
- data/lib/aia/config.rb +3 -4
- data/lib/aia/directive.rb +88 -0
- data/lib/aia/directive_processor.rb +51 -56
- data/lib/aia/directives/configuration_directives.rb +108 -0
- data/lib/aia/directives/context_directives.rb +244 -0
- data/lib/aia/directives/execution_directives.rb +39 -0
- data/lib/aia/directives/model_directives.rb +243 -0
- data/lib/aia/directives/utility_directives.rb +88 -0
- data/lib/aia/directives/web_and_file_directives.rb +105 -0
- data/lib/aia/errors.rb +5 -0
- data/lib/aia/fzf.rb +1 -1
- data/lib/aia/history_manager.rb +23 -57
- data/lib/aia/prompt_handler.rb +255 -114
- data/lib/aia/ruby_llm_adapter.rb +30 -21
- data/lib/aia/session.rb +61 -129
- data/lib/aia/topic_context.rb +3 -3
- data/lib/aia.rb +2 -6
- data/mkdocs.yml +1 -0
- metadata +28 -23
- data/lib/aia/directives/checkpoint.rb +0 -283
- data/lib/aia/directives/configuration.rb +0 -117
- data/lib/aia/directives/execution.rb +0 -37
- data/lib/aia/directives/models.rb +0 -452
- data/lib/aia/directives/registry.rb +0 -122
- data/lib/aia/directives/utility.rb +0 -86
- data/lib/aia/directives/web_and_file.rb +0 -85
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79adae0e7c376a4b6aceab36d1378322ac8d35f3a716ec55f165744ebe7e901a
|
|
4
|
+
data.tar.gz: 0f8bc3fc75d717c1833ee13b9d37b447f674cc178d1c80e4367ec5781333f97b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 880eb80b2670139b80461bd62e45f393072cea612f3067d8799c79ceceb60f5ac862e1527e6d6856bf7c8841140dc14c04621db0e282cb70c6a1b4a4ee13fdfc
|
|
7
|
+
data.tar.gz: 3b345422fa6aab72da7a3baa28b347720a3fed7999b807da9b350a28459d6e64daa0f7bcdc731da8446c56929a3010518cfec17cc6a06c04bf28a4ea0e05e74e
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
1.0.0-alpha
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
## [0.11.1] - 2026-02-03
|
|
3
|
+
|
|
4
|
+
### New Features
|
|
5
|
+
- **`bin/migrate_prompts` Script**: Standalone Ruby script for migrating prompt files from prompt_manager v0.5.8 format to v1.0.0 format
|
|
6
|
+
- Converts `.txt` + `.json` files to `.md` with YAML front matter and ERB parameters
|
|
7
|
+
- Placeholder conversion: `[PLACEHOLDER]` → `<%= placeholder %>`
|
|
8
|
+
- Space placeholder normalization: `[TECH STACK]` → `<%= tech_stack %>`
|
|
9
|
+
- Directive migration: `//config`, `//temp`, `//topp`, `//include`, `//shell`, `//ruby`, `//backend`, `//next`, `//pipeline`
|
|
10
|
+
- Comment conversion: `#` lines → HTML comments (preserves comments inside code fences and ERB blocks)
|
|
11
|
+
- Code fence detection: files containing ``` fences are flagged as `.txt-review` for manual review
|
|
12
|
+
- JSON history file migration: `.json` parameter history converted to YAML `parameters:` block in front matter
|
|
13
|
+
- `--reprocess` option to re-examine `.txt-review` files and recover those that now process cleanly
|
|
14
|
+
- `--dry-run` mode for safe previewing of changes
|
|
15
|
+
- `--verbose` logging with detailed per-file output
|
|
16
|
+
- `--force` to overwrite existing `.md` files
|
|
17
|
+
- Supports both directory scanning and specific file arguments
|
|
18
|
+
|
|
2
19
|
## [0.11.0] - 2026-02-02
|
|
3
20
|
|
|
4
21
|
### New Features
|
data/README.md
CHANGED
|
@@ -25,7 +25,7 @@ AIA is a command-line utility that facilitates interaction with AI models throug
|
|
|
25
25
|
|
|
26
26
|
AIA leverages the following Ruby gems:
|
|
27
27
|
|
|
28
|
-
- **[
|
|
28
|
+
- **[pm](https://github.com/madbomber/prompt_manager)** to manage prompts,
|
|
29
29
|
- **[ruby_llm](https://rubyllm.com)** to access LLM providers,
|
|
30
30
|
- **[ruby_llm-mcp](https://www.rubyllm-mcp.com)** for Model Context Protocol (MCP) support,
|
|
31
31
|
- and can use the **[shared_tools gem](https://github.com/madbomber/shared_tools)** which provides a collection of common ready-to-use MCP clients and functions for use with LLMs that support tools.
|
|
@@ -50,7 +50,7 @@ For more information on AIA visit these locations:
|
|
|
50
50
|
3. **Create your first prompt:**
|
|
51
51
|
```bash
|
|
52
52
|
mkdir -p ~/.prompts
|
|
53
|
-
echo "What is [TOPIC]?" > ~/.prompts/what_is.
|
|
53
|
+
echo "What is [TOPIC]?" > ~/.prompts/what_is.md
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
4. **Run your prompt:**
|
|
@@ -278,11 +278,11 @@ aia --fuzzy
|
|
|
278
278
|
|
|
279
279
|
```
|
|
280
280
|
~/.prompts/ # Default prompts directory
|
|
281
|
-
├── ask.
|
|
282
|
-
├── code_review.
|
|
281
|
+
├── ask.md # Simple question prompt
|
|
282
|
+
├── code_review.md # Code review prompt
|
|
283
283
|
├── roles/ # Role/system prompts
|
|
284
|
-
│ ├── expert.
|
|
285
|
-
│ └── teacher.
|
|
284
|
+
│ ├── expert.md # Expert role
|
|
285
|
+
│ └── teacher.md # Teaching role
|
|
286
286
|
└── _prompts.log # History log
|
|
287
287
|
```
|
|
288
288
|
|
|
@@ -304,7 +304,7 @@ The most commonly used configuration options:
|
|
|
304
304
|
|
|
305
305
|
AIA determines configuration settings using this order (highest to lowest priority):
|
|
306
306
|
|
|
307
|
-
1. **Embedded config directives** (in prompt files):
|
|
307
|
+
1. **Embedded config directives** (in prompt files): `/config model = gpt-4`
|
|
308
308
|
2. **Command-line arguments**: `--model gpt-4`
|
|
309
309
|
3. **Environment variables**: `export AIA_MODEL=gpt-4`
|
|
310
310
|
4. **Configuration files**: `~/.aia/config.yml`
|
|
@@ -329,8 +329,8 @@ chat: false
|
|
|
329
329
|
|
|
330
330
|
**Embedded Directives** (in prompt files):
|
|
331
331
|
```
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
/config model = gpt-4
|
|
333
|
+
/config temperature = 0.8
|
|
334
334
|
|
|
335
335
|
Your prompt content here...
|
|
336
336
|
```
|
|
@@ -365,7 +365,7 @@ Your prompt content here...
|
|
|
365
365
|
| parameter_regex | --regex | '(?-mix:(\[[A-Z _\|]+\]))' | AIA_PROMPTS__PARAMETER_REGEX |
|
|
366
366
|
| pipeline | --pipeline | [] | AIA_PIPELINE |
|
|
367
367
|
| presence_penalty | --presence-penalty | 0.0 | AIA_LLM__PRESENCE_PENALTY |
|
|
368
|
-
| prompt_extname | | .
|
|
368
|
+
| prompt_extname | | .md | AIA_PROMPTS__EXTNAME |
|
|
369
369
|
| prompts_dir | --prompts-dir | ~/.prompts | AIA_PROMPTS__DIR |
|
|
370
370
|
| refresh | --refresh | 7 (days) | AIA_REGISTRY__REFRESH |
|
|
371
371
|
| require_libs | --rq --require | [] | AIA_REQUIRE_LIBS |
|
|
@@ -397,27 +397,27 @@ Your prompt content here...
|
|
|
397
397
|
|
|
398
398
|
### Prompt Directives
|
|
399
399
|
|
|
400
|
-
Directives are special commands in prompt files that begin with
|
|
400
|
+
Directives are special commands in prompt files that begin with `/` and provide dynamic functionality:
|
|
401
401
|
|
|
402
402
|
| Directive | Description | Example |
|
|
403
403
|
|-----------|-------------|---------|
|
|
404
|
-
|
|
|
405
|
-
|
|
|
406
|
-
|
|
|
407
|
-
|
|
|
408
|
-
|
|
|
409
|
-
|
|
|
410
|
-
|
|
|
411
|
-
|
|
|
412
|
-
|
|
|
413
|
-
|
|
|
414
|
-
|
|
|
415
|
-
|
|
|
416
|
-
|
|
|
417
|
-
|
|
|
418
|
-
|
|
|
419
|
-
|
|
|
420
|
-
|
|
|
404
|
+
| `/config` | Set configuration values | `/config model = gpt-4` |
|
|
405
|
+
| `/context` | Show context for this conversation with checkpoint markers | `/context` |
|
|
406
|
+
| `/checkpoint` | Create a named checkpoint of current context | `/checkpoint save_point` |
|
|
407
|
+
| `/restore` | Restore context to a previous checkpoint | `/restore save_point` |
|
|
408
|
+
| `/include` | Insert file contents | `/include path/to/file.txt` |
|
|
409
|
+
| `/paste` | Insert clipboard contents | `/paste` |
|
|
410
|
+
| `/shell` | Execute shell commands | `/shell ls -la` |
|
|
411
|
+
| `/robot` | Show the pet robot ASCII art w/versions | `/robot` |
|
|
412
|
+
| `/ruby` | Execute Ruby code | `/ruby puts "Hello World"` |
|
|
413
|
+
| `/next` | Set next prompt in sequence | `/next summary` |
|
|
414
|
+
| `/pipeline` | Set prompt workflow | `/pipeline analyze,summarize,report` |
|
|
415
|
+
| `/clear` | Clear conversation history | `/clear` |
|
|
416
|
+
| `/help` | Show available directives | `/help` |
|
|
417
|
+
| `/model` | Show current model configuration | `/model` |
|
|
418
|
+
| `/available_models` | List available models | `/available_models` |
|
|
419
|
+
| `/tools` | Show available tools (optional filter by name) | `/tools` or `/tools file` |
|
|
420
|
+
| `/review` | Review current context with checkpoint markers | `/review` |
|
|
421
421
|
|
|
422
422
|
Directives can also be used in the interactive chat sessions.
|
|
423
423
|
|
|
@@ -425,12 +425,12 @@ Directives can also be used in the interactive chat sessions.
|
|
|
425
425
|
|
|
426
426
|
```bash
|
|
427
427
|
# Set model and temperature for this prompt
|
|
428
|
-
|
|
429
|
-
|
|
428
|
+
/config model = gpt-4
|
|
429
|
+
/config temperature = 0.9
|
|
430
430
|
|
|
431
431
|
# Enable chat mode and terse responses
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
/config chat = true
|
|
433
|
+
/config terse = true
|
|
434
434
|
|
|
435
435
|
Your prompt content here...
|
|
436
436
|
```
|
|
@@ -439,16 +439,16 @@ Your prompt content here...
|
|
|
439
439
|
|
|
440
440
|
```bash
|
|
441
441
|
# Include file contents
|
|
442
|
-
|
|
442
|
+
/include ~/project/README.md
|
|
443
443
|
|
|
444
444
|
# Paste clipboard contents
|
|
445
|
-
|
|
445
|
+
/paste
|
|
446
446
|
|
|
447
447
|
# Execute shell commands
|
|
448
|
-
|
|
448
|
+
/shell git log --oneline -10
|
|
449
449
|
|
|
450
450
|
# Run Ruby code
|
|
451
|
-
|
|
451
|
+
/ruby require 'json'; puts JSON.pretty_generate({status: "ready"})
|
|
452
452
|
|
|
453
453
|
Analyze the above information and provide insights.
|
|
454
454
|
```
|
|
@@ -459,19 +459,19 @@ AIA provides powerful context management capabilities in chat mode through check
|
|
|
459
459
|
|
|
460
460
|
```bash
|
|
461
461
|
# Create a checkpoint with automatic naming (1, 2, 3...)
|
|
462
|
-
|
|
462
|
+
/checkpoint
|
|
463
463
|
|
|
464
464
|
# Create a named checkpoint
|
|
465
|
-
|
|
465
|
+
/checkpoint important_decision
|
|
466
466
|
|
|
467
467
|
# Restore to the last checkpoint
|
|
468
|
-
|
|
468
|
+
/restore
|
|
469
469
|
|
|
470
470
|
# Restore to a specific checkpoint
|
|
471
|
-
|
|
471
|
+
/restore important_decision
|
|
472
472
|
|
|
473
473
|
# View context with checkpoint markers
|
|
474
|
-
|
|
474
|
+
/context
|
|
475
475
|
```
|
|
476
476
|
|
|
477
477
|
**Example Chat Session:**
|
|
@@ -479,17 +479,17 @@ AIA provides powerful context management capabilities in chat mode through check
|
|
|
479
479
|
You: Tell me about Ruby programming
|
|
480
480
|
AI: Ruby is a dynamic programming language...
|
|
481
481
|
|
|
482
|
-
You:
|
|
482
|
+
You: /checkpoint ruby_basics
|
|
483
483
|
|
|
484
484
|
You: Now explain object-oriented programming
|
|
485
485
|
AI: Object-oriented programming (OOP) is...
|
|
486
486
|
|
|
487
|
-
You:
|
|
487
|
+
You: /checkpoint oop_concepts
|
|
488
488
|
|
|
489
489
|
You: Actually, let's go back to Ruby basics
|
|
490
|
-
You:
|
|
490
|
+
You: /restore ruby_basics
|
|
491
491
|
|
|
492
|
-
You:
|
|
492
|
+
You: /context
|
|
493
493
|
=== Chat Context ===
|
|
494
494
|
Total messages: 4
|
|
495
495
|
Checkpoints: ruby_basics, oop_concepts
|
|
@@ -506,10 +506,10 @@ Checkpoints: ruby_basics, oop_concepts
|
|
|
506
506
|
|
|
507
507
|
**Key Features:**
|
|
508
508
|
- **Auto-naming**: Checkpoints without names use incrementing integers (1, 2, 3...)
|
|
509
|
-
- **Named checkpoints**: Use meaningful names like
|
|
510
|
-
- **Default restore**:
|
|
511
|
-
- **Context visualization**:
|
|
512
|
-
- **Clean slate**:
|
|
509
|
+
- **Named checkpoints**: Use meaningful names like `/checkpoint before_refactor`
|
|
510
|
+
- **Default restore**: `/restore` without a name restores to the last checkpoint
|
|
511
|
+
- **Context visualization**: `/context` shows checkpoint markers in conversation history
|
|
512
|
+
- **Clean slate**: `/clear` removes all context and checkpoints
|
|
513
513
|
|
|
514
514
|
#### Custom Directive Examples
|
|
515
515
|
|
|
@@ -535,7 +535,7 @@ end
|
|
|
535
535
|
aia --tools examples/directives/ask.rb --chat
|
|
536
536
|
|
|
537
537
|
# Use the results of the custom directive as input to a prompt
|
|
538
|
-
|
|
538
|
+
/ask gather the latest closing data for the DOW, NASDAQ, and S&P 500
|
|
539
539
|
```
|
|
540
540
|
|
|
541
541
|
### Multi-Model Support
|
|
@@ -602,11 +602,11 @@ Response from the third model...
|
|
|
602
602
|
|
|
603
603
|
#### Model Information
|
|
604
604
|
|
|
605
|
-
View your current multi-model configuration using the
|
|
605
|
+
View your current multi-model configuration using the `/model` directive:
|
|
606
606
|
|
|
607
607
|
```bash
|
|
608
608
|
# In any prompt file or chat session
|
|
609
|
-
|
|
609
|
+
/model
|
|
610
610
|
```
|
|
611
611
|
|
|
612
612
|
**Example Output:**
|
|
@@ -722,11 +722,11 @@ export LMS_API_BASE=http://localhost:1234/v1
|
|
|
722
722
|
|
|
723
723
|
#### Listing Local Models
|
|
724
724
|
|
|
725
|
-
The
|
|
725
|
+
The `/models` directive automatically detects local providers and queries their endpoints:
|
|
726
726
|
|
|
727
727
|
```bash
|
|
728
728
|
# In a prompt file or chat session
|
|
729
|
-
|
|
729
|
+
/models
|
|
730
730
|
|
|
731
731
|
# Output will show:
|
|
732
732
|
# - Ollama models from http://localhost:11434/api/tags
|
|
@@ -792,8 +792,8 @@ Chain multiple prompts for complex workflows:
|
|
|
792
792
|
aia analyze --next summarize --next report
|
|
793
793
|
|
|
794
794
|
# In prompt files
|
|
795
|
-
# analyze.
|
|
796
|
-
# summarize.
|
|
795
|
+
# analyze.md contains: /next summarize
|
|
796
|
+
# summarize.md contains: /next report
|
|
797
797
|
```
|
|
798
798
|
|
|
799
799
|
#### Using --pipeline
|
|
@@ -803,31 +803,31 @@ aia analyze --next summarize --next report
|
|
|
803
803
|
aia research --pipeline analyze,summarize,report,present
|
|
804
804
|
|
|
805
805
|
# In prompt file
|
|
806
|
-
|
|
806
|
+
/pipeline analyze,summarize,report,present
|
|
807
807
|
```
|
|
808
808
|
|
|
809
809
|
#### Example Workflow
|
|
810
810
|
|
|
811
|
-
**research.
|
|
811
|
+
**research.md:**
|
|
812
812
|
```
|
|
813
|
-
|
|
814
|
-
|
|
813
|
+
/config model = gpt-4
|
|
814
|
+
/next analyze
|
|
815
815
|
|
|
816
816
|
Research the topic: [RESEARCH_TOPIC]
|
|
817
817
|
Provide comprehensive background information.
|
|
818
818
|
```
|
|
819
819
|
|
|
820
|
-
**analyze.
|
|
820
|
+
**analyze.md:**
|
|
821
821
|
```
|
|
822
|
-
|
|
823
|
-
|
|
822
|
+
/config output = analysis.md
|
|
823
|
+
/next summarize
|
|
824
824
|
|
|
825
825
|
Analyze the research data and identify key insights.
|
|
826
826
|
```
|
|
827
827
|
|
|
828
|
-
**summarize.
|
|
828
|
+
**summarize.md:**
|
|
829
829
|
```
|
|
830
|
-
|
|
830
|
+
/config output = summary.md
|
|
831
831
|
|
|
832
832
|
Create a concise summary of the analysis with actionable recommendations.
|
|
833
833
|
```
|
|
@@ -841,7 +841,7 @@ Roles define the context and personality for AI responses:
|
|
|
841
841
|
aia --role expert analyze_code.rb
|
|
842
842
|
|
|
843
843
|
# Roles are stored in ~/.prompts/roles/
|
|
844
|
-
# expert.
|
|
844
|
+
# expert.md might contain:
|
|
845
845
|
# "You are a senior software engineer with 15 years of experience..."
|
|
846
846
|
```
|
|
847
847
|
|
|
@@ -849,7 +849,7 @@ aia --role expert analyze_code.rb
|
|
|
849
849
|
|
|
850
850
|
```bash
|
|
851
851
|
# Create a code reviewer role
|
|
852
|
-
cat > ~/.prompts/roles/code_reviewer.
|
|
852
|
+
cat > ~/.prompts/roles/code_reviewer.md << EOF
|
|
853
853
|
You are an experienced code reviewer. Focus on:
|
|
854
854
|
- Code quality and best practices
|
|
855
855
|
- Security vulnerabilities
|
|
@@ -928,7 +928,7 @@ Roles can be organized in subdirectories:
|
|
|
928
928
|
```bash
|
|
929
929
|
# Create nested role structure
|
|
930
930
|
mkdir -p ~/.prompts/roles/specialized
|
|
931
|
-
echo "You are a senior software architect..." > ~/.prompts/roles/specialized/senior_architect.
|
|
931
|
+
echo "You are a senior software architect..." > ~/.prompts/roles/specialized/senior_architect.md
|
|
932
932
|
|
|
933
933
|
# Use nested roles
|
|
934
934
|
aia --model gpt-4o=specialized/senior_architect design.md
|
|
@@ -1144,11 +1144,11 @@ When MCP servers are configured, AIA displays them in the startup robot:
|
|
|
1144
1144
|
(\ /____\
|
|
1145
1145
|
```
|
|
1146
1146
|
|
|
1147
|
-
Use the
|
|
1147
|
+
Use the `/tools` directive in chat mode to see all available tools including those from MCP servers:
|
|
1148
1148
|
|
|
1149
1149
|
```bash
|
|
1150
1150
|
aia --chat
|
|
1151
|
-
>
|
|
1151
|
+
> /tools
|
|
1152
1152
|
|
|
1153
1153
|
Available Tools:
|
|
1154
1154
|
- github_create_issue: Create a new GitHub issue
|
|
@@ -1158,7 +1158,7 @@ Available Tools:
|
|
|
1158
1158
|
...
|
|
1159
1159
|
|
|
1160
1160
|
# Filter tools by name (case-insensitive)
|
|
1161
|
-
>
|
|
1161
|
+
> /tools github
|
|
1162
1162
|
|
|
1163
1163
|
Available Tools (filtered by 'github')
|
|
1164
1164
|
- github_create_issue: Create a new GitHub issue
|
|
@@ -1206,7 +1206,7 @@ aia --require shared_tools/ruby_llm/edit_file --chat
|
|
|
1206
1206
|
aia --require shared_tools/ruby_llm --tools ~/my-tools/ --chat
|
|
1207
1207
|
```
|
|
1208
1208
|
|
|
1209
|
-
The above examples show the shared_tools being used within an interactive chat session. They are also available in batch prompts as well using the same --require option. You can also use the
|
|
1209
|
+
The above examples show the shared_tools being used within an interactive chat session. They are also available in batch prompts as well using the same --require option. You can also use the /ruby directive to require the shared_tools as well and using a require statement within an ERB block.
|
|
1210
1210
|
|
|
1211
1211
|
## Examples & Tips
|
|
1212
1212
|
|
|
@@ -1214,9 +1214,9 @@ The above examples show the shared_tools being used within an interactive chat s
|
|
|
1214
1214
|
|
|
1215
1215
|
#### Code Review Prompt
|
|
1216
1216
|
```bash
|
|
1217
|
-
# ~/.prompts/code_review.
|
|
1218
|
-
|
|
1219
|
-
|
|
1217
|
+
# ~/.prompts/code_review.md
|
|
1218
|
+
/config model = gpt-4o-mini
|
|
1219
|
+
/config temperature = 0.3
|
|
1220
1220
|
|
|
1221
1221
|
Review this code for:
|
|
1222
1222
|
- Best practices adherence
|
|
@@ -1231,21 +1231,21 @@ Usage: `aia code_review mycode.rb`
|
|
|
1231
1231
|
|
|
1232
1232
|
#### Meeting Notes Processor
|
|
1233
1233
|
```bash
|
|
1234
|
-
# ~/.prompts/meeting_notes.
|
|
1235
|
-
|
|
1236
|
-
|
|
1234
|
+
# ~/.prompts/meeting_notes.md
|
|
1235
|
+
/config model = gpt-4o-mini
|
|
1236
|
+
/pipeline format,action_items
|
|
1237
1237
|
|
|
1238
1238
|
Raw meeting notes:
|
|
1239
|
-
|
|
1239
|
+
/include [NOTES_FILE]
|
|
1240
1240
|
|
|
1241
1241
|
Please clean up and structure these meeting notes.
|
|
1242
1242
|
```
|
|
1243
1243
|
|
|
1244
1244
|
#### Documentation Generator
|
|
1245
1245
|
```bash
|
|
1246
|
-
# ~/.prompts/document.
|
|
1247
|
-
|
|
1248
|
-
|
|
1246
|
+
# ~/.prompts/document.md
|
|
1247
|
+
/config model = gpt-4o-mini
|
|
1248
|
+
/shell find [PROJECT_DIR] -name "*.rb" | head -10
|
|
1249
1249
|
|
|
1250
1250
|
Generate documentation for the Ruby project shown above.
|
|
1251
1251
|
Include: API references, usage examples, and setup instructions.
|
|
@@ -1253,7 +1253,7 @@ Include: API references, usage examples, and setup instructions.
|
|
|
1253
1253
|
|
|
1254
1254
|
#### Multi-Model Decision Making
|
|
1255
1255
|
```bash
|
|
1256
|
-
# ~/.prompts/decision_maker.
|
|
1256
|
+
# ~/.prompts/decision_maker.md
|
|
1257
1257
|
# Compare different AI perspectives on complex decisions
|
|
1258
1258
|
|
|
1259
1259
|
What are the pros and cons of [DECISION_TOPIC]?
|
|
@@ -1289,7 +1289,7 @@ Create executable prompts:
|
|
|
1289
1289
|
|
|
1290
1290
|
Summarize the tropical storm outlook fpr the Atlantic, Caribbean Sea and Gulf of America.
|
|
1291
1291
|
|
|
1292
|
-
|
|
1292
|
+
/webpage https://www.nhc.noaa.gov/text/refresh/MIATWOAT+shtml/201724_MIATWOAT.shtml
|
|
1293
1293
|
```
|
|
1294
1294
|
|
|
1295
1295
|
Usage:
|
|
@@ -1302,7 +1302,7 @@ Usage:
|
|
|
1302
1302
|
|
|
1303
1303
|
#### The run Prompt
|
|
1304
1304
|
```bash
|
|
1305
|
-
# ~/.prompts/run.
|
|
1305
|
+
# ~/.prompts/run.md
|
|
1306
1306
|
# Desc: A configuration only prompt file for use with executable prompts
|
|
1307
1307
|
# Put whatever you want here to setup the configuration desired.
|
|
1308
1308
|
# You could also add a system prompt to preface your intended prompt
|
|
@@ -1312,7 +1312,7 @@ Usage: `echo "What is the meaning of life?" | aia run`
|
|
|
1312
1312
|
|
|
1313
1313
|
#### The Ad Hoc One-shot Prompt
|
|
1314
1314
|
```bash
|
|
1315
|
-
# ~/.prompts/ad_hoc.
|
|
1315
|
+
# ~/.prompts/ad_hoc.md
|
|
1316
1316
|
[WHAT_NOW_HUMAN]
|
|
1317
1317
|
```
|
|
1318
1318
|
Usage: `aia ad_hoc` - perfect for any quick one-shot question without cluttering shell history.
|
|
@@ -1358,16 +1358,16 @@ AIA executes shell commands and Ruby code embedded in prompts. This provides pow
|
|
|
1358
1358
|
|
|
1359
1359
|
```bash
|
|
1360
1360
|
# ✅ Good: Use parameters for sensitive data
|
|
1361
|
-
|
|
1361
|
+
/config api_key = [API_KEY]
|
|
1362
1362
|
|
|
1363
1363
|
# ❌ Bad: Hardcode secrets
|
|
1364
|
-
|
|
1364
|
+
/config api_key = sk-1234567890abcdef
|
|
1365
1365
|
|
|
1366
1366
|
# ✅ Good: Validate shell commands
|
|
1367
|
-
|
|
1367
|
+
/shell ls -la /safe/directory
|
|
1368
1368
|
|
|
1369
1369
|
# ❌ Bad: Dangerous shell commands
|
|
1370
|
-
|
|
1370
|
+
/shell rm -rf / # Never do this!
|
|
1371
1371
|
```
|
|
1372
1372
|
|
|
1373
1373
|
### Recommended Security Setup
|
|
@@ -1375,7 +1375,7 @@ AIA executes shell commands and Ruby code embedded in prompts. This provides pow
|
|
|
1375
1375
|
```bash
|
|
1376
1376
|
# Set restrictive permissions on prompts directory
|
|
1377
1377
|
chmod 700 ~/.prompts
|
|
1378
|
-
chmod 600 ~/.prompts/*.
|
|
1378
|
+
chmod 600 ~/.prompts/*.md
|
|
1379
1379
|
```
|
|
1380
1380
|
|
|
1381
1381
|
## Troubleshooting
|
|
@@ -1388,7 +1388,7 @@ chmod 600 ~/.prompts/*.txt
|
|
|
1388
1388
|
ls $AIA_PROMPTS__DIR
|
|
1389
1389
|
|
|
1390
1390
|
# Verify prompt file exists
|
|
1391
|
-
ls ~/.prompts/my_prompt.
|
|
1391
|
+
ls ~/.prompts/my_prompt.md
|
|
1392
1392
|
|
|
1393
1393
|
# Use fuzzy search
|
|
1394
1394
|
aia --fuzzy
|
|
@@ -1478,7 +1478,7 @@ aia --fatal --chat
|
|
|
1478
1478
|
|
|
1479
1479
|
**Large prompt processing:**
|
|
1480
1480
|
- Break into smaller prompts using `--pipeline`
|
|
1481
|
-
- Use
|
|
1481
|
+
- Use `/include` selectively instead of large files
|
|
1482
1482
|
- Consider model context limits
|
|
1483
1483
|
|
|
1484
1484
|
## Development
|
data/Rakefile
CHANGED
|
@@ -25,14 +25,19 @@ Minitest::TestTask.create(:test) do |t|
|
|
|
25
25
|
t.libs << "test"
|
|
26
26
|
t.libs << "lib"
|
|
27
27
|
t.warning = false
|
|
28
|
+
# Load SimpleCov before minitest/autorun so at_exit ordering is correct
|
|
29
|
+
t.test_prelude = 'ENV["TEST_SUITE"]="unit"; require "simplecov_helper"'
|
|
28
30
|
# Include all unit tests under test/, excluding integration tests
|
|
29
|
-
|
|
31
|
+
# Dir.glob does not support ! negation, so compute the file list manually
|
|
32
|
+
t.test_globs = Dir["test/**/*_test.rb"].reject { |f| f.start_with?("test/integration/") }
|
|
30
33
|
end
|
|
31
34
|
|
|
32
35
|
Minitest::TestTask.create(:integration) do |t|
|
|
33
36
|
t.libs << "test"
|
|
34
37
|
t.libs << "lib"
|
|
35
38
|
t.warning = false
|
|
39
|
+
# Load SimpleCov before minitest/autorun so at_exit ordering is correct
|
|
40
|
+
t.test_prelude = 'ENV["TEST_SUITE"]="integration"; require "simplecov_helper"'
|
|
36
41
|
t.test_globs = ["test/integration/**/*_test.rb"]
|
|
37
42
|
end
|
|
38
43
|
|