aircana 0.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 +7 -0
- data/.devcontainer/devcontainer.json +36 -0
- data/.dockerignore +14 -0
- data/.rspec_status +106 -0
- data/.rubocop.yml +33 -0
- data/CHANGELOG.md +19 -0
- data/CLAUDE.md +58 -0
- data/Dockerfile +17 -0
- data/LICENSE.txt +21 -0
- data/README.md +251 -0
- data/Rakefile +12 -0
- data/SECURITY.md +15 -0
- data/compose.yml +13 -0
- data/exe/aircana +13 -0
- data/lib/aircana/cli/app.rb +93 -0
- data/lib/aircana/cli/commands/add_directory.rb +148 -0
- data/lib/aircana/cli/commands/add_files.rb +26 -0
- data/lib/aircana/cli/commands/agents.rb +152 -0
- data/lib/aircana/cli/commands/clear_files.rb +16 -0
- data/lib/aircana/cli/commands/doctor.rb +85 -0
- data/lib/aircana/cli/commands/doctor_checks.rb +131 -0
- data/lib/aircana/cli/commands/doctor_helpers.rb +119 -0
- data/lib/aircana/cli/commands/dump_context.rb +23 -0
- data/lib/aircana/cli/commands/generate.rb +34 -0
- data/lib/aircana/cli/commands/install.rb +67 -0
- data/lib/aircana/cli/commands/plan.rb +69 -0
- data/lib/aircana/cli/commands/work.rb +69 -0
- data/lib/aircana/cli/shell_command.rb +13 -0
- data/lib/aircana/cli/subcommand.rb +19 -0
- data/lib/aircana/cli.rb +8 -0
- data/lib/aircana/configuration.rb +41 -0
- data/lib/aircana/contexts/confluence.rb +141 -0
- data/lib/aircana/contexts/confluence_content.rb +36 -0
- data/lib/aircana/contexts/confluence_http.rb +41 -0
- data/lib/aircana/contexts/confluence_logging.rb +71 -0
- data/lib/aircana/contexts/confluence_setup.rb +15 -0
- data/lib/aircana/contexts/local.rb +47 -0
- data/lib/aircana/contexts/relevant_files.rb +78 -0
- data/lib/aircana/fzf_helper.rb +117 -0
- data/lib/aircana/generators/agents_generator.rb +75 -0
- data/lib/aircana/generators/base_generator.rb +61 -0
- data/lib/aircana/generators/helpers.rb +16 -0
- data/lib/aircana/generators/relevant_files_command_generator.rb +36 -0
- data/lib/aircana/generators/relevant_files_verbose_results_generator.rb +34 -0
- data/lib/aircana/generators.rb +10 -0
- data/lib/aircana/human_logger.rb +143 -0
- data/lib/aircana/initializers.rb +8 -0
- data/lib/aircana/llm/claude_client.rb +86 -0
- data/lib/aircana/progress_tracker.rb +55 -0
- data/lib/aircana/system_checker.rb +177 -0
- data/lib/aircana/templates/agents/base_agent.erb +30 -0
- data/lib/aircana/templates/agents/defaults/planner.erb +126 -0
- data/lib/aircana/templates/agents/defaults/worker.erb +185 -0
- data/lib/aircana/templates/commands/add_relevant_files.erb +3 -0
- data/lib/aircana/templates/relevant_files_verbose_results.erb +18 -0
- data/lib/aircana/version.rb +5 -0
- data/lib/aircana.rb +53 -0
- data/sig/aircana.rbs +4 -0
- metadata +189 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d98fe572b3ff149c8e0eb6dc6f4f5bc8f446c6216fa11d8daf3c377be199ec7f
|
4
|
+
data.tar.gz: fb04a40e9f5fea114a047091c4e3f2c91981bb5bfa85388c26a5f755de05e07d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 03e138268aa044dfdc1b7101f719f659d78ae8ac873e3bd8f7f5efd033cacd390314f0d522dcc1b6488fb9c53c0abaa83d502cab2ea558e0d18f58b53148629b
|
7
|
+
data.tar.gz: f5b5d624c379f63921e87f640269fa30772dadde5c923bf3df48ff356b30ee22b02876ad3c4244dad6d13be4279f36f77a1a18f031e56952f981febfb01a2fe4
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"name": "Aircana",
|
3
|
+
"dockerComposeFile": "../compose.yml",
|
4
|
+
"service": "app",
|
5
|
+
"workspaceFolder": "/app",
|
6
|
+
"shutdownAction": "stopCompose",
|
7
|
+
"customizations": {
|
8
|
+
"vscode": {
|
9
|
+
"extensions": [
|
10
|
+
"Shopify.ruby-extensions-pack",
|
11
|
+
"Shopify.ruby-lsp",
|
12
|
+
"LoranKloeze.ruby-rubocop-revived"
|
13
|
+
],
|
14
|
+
"settings": {
|
15
|
+
"terminal.integrated.defaultProfile.linux": "bash",
|
16
|
+
"ruby.lsp.enabledFeatures": {
|
17
|
+
"codeActions": true,
|
18
|
+
"diagnostics": true,
|
19
|
+
"documentHighlights": true,
|
20
|
+
"documentLink": true,
|
21
|
+
"documentSymbols": true,
|
22
|
+
"foldingRanges": true,
|
23
|
+
"formatting": true,
|
24
|
+
"hover": true,
|
25
|
+
"inlayHint": true,
|
26
|
+
"onTypeFormatting": true,
|
27
|
+
"selectionRanges": true,
|
28
|
+
"semanticHighlighting": true,
|
29
|
+
"completion": true
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"postCreateCommand": "echo 'Dev container ready!'",
|
35
|
+
"remoteUser": "docker"
|
36
|
+
}
|
data/.dockerignore
ADDED
data/.rspec_status
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
example_id | status | run_time |
|
2
|
+
------------------------------------------------------------ | ------ | --------------- |
|
3
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:1:1:1] | passed | 0.00684 seconds |
|
4
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:1:2:1] | passed | 0.00196 seconds |
|
5
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:1:3:1] | passed | 0.003 seconds |
|
6
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:1:4:1] | passed | 0.00697 seconds |
|
7
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:1:4:2:1] | passed | 0.01864 seconds |
|
8
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:1:5:1] | passed | 0.0032 seconds |
|
9
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:2:1] | passed | 0.00221 seconds |
|
10
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:2:2] | passed | 0.00253 seconds |
|
11
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:3:1] | passed | 0.00089 seconds |
|
12
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:3:2] | passed | 0.00074 seconds |
|
13
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:3:3] | passed | 0.00082 seconds |
|
14
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:3:4] | passed | 0.00084 seconds |
|
15
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:3:5] | passed | 0.00101 seconds |
|
16
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:3:6] | passed | 0.00099 seconds |
|
17
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:3:7] | passed | 0.00082 seconds |
|
18
|
+
./spec/aircana/cli/commands/add_directory_spec.rb[1:3:8] | passed | 0.00071 seconds |
|
19
|
+
./spec/aircana/cli/commands/agents_spec.rb[1:1:1:1] | passed | 0.00044 seconds |
|
20
|
+
./spec/aircana/cli/commands/agents_spec.rb[1:1:1:2] | passed | 0.00055 seconds |
|
21
|
+
./spec/aircana/cli/commands/agents_spec.rb[1:1:1:3] | passed | 0.00038 seconds |
|
22
|
+
./spec/aircana/cli/commands/agents_spec.rb[1:1:2:1] | passed | 0.0013 seconds |
|
23
|
+
./spec/aircana/cli/commands/agents_spec.rb[1:1:3:1] | passed | 0.00038 seconds |
|
24
|
+
./spec/aircana/cli/commands/agents_spec.rb[1:1:3:2] | passed | 0.00028 seconds |
|
25
|
+
./spec/aircana/cli/commands/agents_spec.rb[1:2:1] | passed | 0.0002 seconds |
|
26
|
+
./spec/aircana/cli/commands/plan_spec.rb[1:1:1:1] | passed | 0.00692 seconds |
|
27
|
+
./spec/aircana/cli/commands/plan_spec.rb[1:1:2:1] | passed | 0.00514 seconds |
|
28
|
+
./spec/aircana/cli/commands/plan_spec.rb[1:1:3:1] | passed | 0.00046 seconds |
|
29
|
+
./spec/aircana/cli/commands/work_spec.rb[1:1:1:1] | passed | 0.00433 seconds |
|
30
|
+
./spec/aircana/cli/commands/work_spec.rb[1:1:2:1] | passed | 0.00552 seconds |
|
31
|
+
./spec/aircana/cli/commands/work_spec.rb[1:1:3:1] | passed | 0.00052 seconds |
|
32
|
+
./spec/aircana/configuration_spec.rb[1:1:1] | passed | 0.00114 seconds |
|
33
|
+
./spec/aircana/configuration_spec.rb[1:2:1] | passed | 0.00008 seconds |
|
34
|
+
./spec/aircana/configuration_spec.rb[1:3:1] | passed | 0.00007 seconds |
|
35
|
+
./spec/aircana/configuration_spec.rb[1:4:1] | passed | 0.00007 seconds |
|
36
|
+
./spec/aircana/configuration_spec.rb[1:4:2] | passed | 0.00007 seconds |
|
37
|
+
./spec/aircana/contexts/confluence_spec.rb[1:1:1:1] | passed | 0.00174 seconds |
|
38
|
+
./spec/aircana/contexts/confluence_spec.rb[1:1:1:2] | passed | 0.00052 seconds |
|
39
|
+
./spec/aircana/contexts/confluence_spec.rb[1:1:1:3] | passed | 0.00092 seconds |
|
40
|
+
./spec/aircana/contexts/confluence_spec.rb[1:1:2:1] | passed | 0.0002 seconds |
|
41
|
+
./spec/aircana/contexts/confluence_spec.rb[1:1:2:2] | passed | 0.00015 seconds |
|
42
|
+
./spec/aircana/contexts/confluence_spec.rb[1:1:2:3] | passed | 0.00013 seconds |
|
43
|
+
./spec/aircana/contexts/confluence_spec.rb[1:1:3:1] | passed | 0.00034 seconds |
|
44
|
+
./spec/aircana/contexts/confluence_spec.rb[1:1:3:2] | passed | 0.00035 seconds |
|
45
|
+
./spec/aircana/contexts/local_spec.rb[1:1:1] | passed | 0.00177 seconds |
|
46
|
+
./spec/aircana/contexts/local_spec.rb[1:1:2] | passed | 0.00103 seconds |
|
47
|
+
./spec/aircana/contexts/local_spec.rb[1:1:3] | passed | 0.00099 seconds |
|
48
|
+
./spec/aircana/contexts/local_spec.rb[1:1:4] | passed | 0.00098 seconds |
|
49
|
+
./spec/aircana/contexts/local_spec.rb[1:1:5] | passed | 0.00093 seconds |
|
50
|
+
./spec/aircana/contexts/local_spec.rb[1:1:6] | passed | 0.001 seconds |
|
51
|
+
./spec/aircana/contexts/local_spec.rb[1:1:7] | passed | 0.00141 seconds |
|
52
|
+
./spec/aircana/contexts/local_spec.rb[1:1:8] | passed | 0.00099 seconds |
|
53
|
+
./spec/aircana/fzf_helper_spec.rb[1:1:1:1] | passed | 0.00022 seconds |
|
54
|
+
./spec/aircana/fzf_helper_spec.rb[1:1:1:2] | passed | 0.00016 seconds |
|
55
|
+
./spec/aircana/fzf_helper_spec.rb[1:1:1:3] | passed | 0.0002 seconds |
|
56
|
+
./spec/aircana/fzf_helper_spec.rb[1:1:2:1] | passed | 0.00022 seconds |
|
57
|
+
./spec/aircana/fzf_helper_spec.rb[1:1:3:1] | passed | 0.00019 seconds |
|
58
|
+
./spec/aircana/fzf_helper_spec.rb[1:2:1:1] | passed | 0.0001 seconds |
|
59
|
+
./spec/aircana/fzf_helper_spec.rb[1:2:1:2] | passed | 0.0001 seconds |
|
60
|
+
./spec/aircana/fzf_helper_spec.rb[1:2:1:3] | passed | 0.00303 seconds |
|
61
|
+
./spec/aircana/fzf_helper_spec.rb[1:2:2:1] | passed | 0.00013 seconds |
|
62
|
+
./spec/aircana/fzf_helper_spec.rb[1:2:2:2] | passed | 0.00008 seconds |
|
63
|
+
./spec/aircana/generators/agents_generator_spec.rb[1:1:1] | passed | 0.00003 seconds |
|
64
|
+
./spec/aircana/generators/agents_generator_spec.rb[1:2:1] | passed | 0.0003 seconds |
|
65
|
+
./spec/aircana/generators/agents_generator_spec.rb[1:2:2] | passed | 0.00014 seconds |
|
66
|
+
./spec/aircana/generators/agents_generator_spec.rb[1:3:1:1] | passed | 0.00005 seconds |
|
67
|
+
./spec/aircana/generators/agents_generator_spec.rb[1:3:1:2] | passed | 0.00004 seconds |
|
68
|
+
./spec/aircana/generators/agents_generator_spec.rb[1:3:2:1] | passed | 0.00004 seconds |
|
69
|
+
./spec/aircana/generators/agents_generator_spec.rb[1:3:2:2] | passed | 0.00004 seconds |
|
70
|
+
./spec/aircana/generators/agents_generator_spec.rb[1:4:1:1] | passed | 0.00004 seconds |
|
71
|
+
./spec/aircana/generators/agents_generator_spec.rb[1:4:2:1] | passed | 0.00004 seconds |
|
72
|
+
./spec/aircana/human_logger_spec.rb[1:1:1] | passed | 0.00005 seconds |
|
73
|
+
./spec/aircana/human_logger_spec.rb[1:2:1] | passed | 0.00013 seconds |
|
74
|
+
./spec/aircana/human_logger_spec.rb[1:3:1] | passed | 0.00004 seconds |
|
75
|
+
./spec/aircana/human_logger_spec.rb[1:4:1] | passed | 0.00003 seconds |
|
76
|
+
./spec/aircana/human_logger_spec.rb[1:5:1] | passed | 0.00003 seconds |
|
77
|
+
./spec/aircana/human_logger_spec.rb[1:5:2] | passed | 0.00003 seconds |
|
78
|
+
./spec/aircana/human_logger_spec.rb[1:5:3] | passed | 0.00003 seconds |
|
79
|
+
./spec/aircana/human_logger_spec.rb[1:5:4] | passed | 0.00003 seconds |
|
80
|
+
./spec/aircana/human_logger_spec.rb[1:5:5] | passed | 0.00003 seconds |
|
81
|
+
./spec/aircana/human_logger_spec.rb[1:5:6] | passed | 0.00003 seconds |
|
82
|
+
./spec/aircana/human_logger_spec.rb[1:5:7] | passed | 0.00005 seconds |
|
83
|
+
./spec/aircana/human_logger_spec.rb[1:6:1] | passed | 0.00003 seconds |
|
84
|
+
./spec/aircana/llm/claude_client_spec.rb[1:1:1:1] | passed | 0.00038 seconds |
|
85
|
+
./spec/aircana/llm/claude_client_spec.rb[1:1:1:2] | passed | 0.00034 seconds |
|
86
|
+
./spec/aircana/llm/claude_client_spec.rb[1:1:1:3] | passed | 0.0003 seconds |
|
87
|
+
./spec/aircana/llm/claude_client_spec.rb[1:1:1:4] | passed | 0.0004 seconds |
|
88
|
+
./spec/aircana/llm/claude_client_spec.rb[1:1:2:1] | passed | 0.00047 seconds |
|
89
|
+
./spec/aircana/llm/claude_client_spec.rb[1:1:2:2] | passed | 0.0003 seconds |
|
90
|
+
./spec/aircana/llm/claude_client_spec.rb[1:1:3:1] | passed | 0.00032 seconds |
|
91
|
+
./spec/aircana/llm/claude_client_spec.rb[1:2:1] | passed | 0.0003 seconds |
|
92
|
+
./spec/aircana/llm/claude_client_spec.rb[1:2:2] | passed | 0.00029 seconds |
|
93
|
+
./spec/aircana/llm/claude_client_spec.rb[1:3:1:1] | passed | 0.00021 seconds |
|
94
|
+
./spec/aircana/llm/claude_client_spec.rb[1:3:1:2] | passed | 0.00028 seconds |
|
95
|
+
./spec/aircana/system_checker_spec.rb[1:1:1:1] | passed | 0.0003 seconds |
|
96
|
+
./spec/aircana/system_checker_spec.rb[1:1:2:1] | passed | 0.00038 seconds |
|
97
|
+
./spec/aircana/system_checker_spec.rb[1:1:3:1] | passed | 0.0006 seconds |
|
98
|
+
./spec/aircana/system_checker_spec.rb[1:2:1] | passed | 0.00022 seconds |
|
99
|
+
./spec/aircana/system_checker_spec.rb[1:2:2] | passed | 0.00019 seconds |
|
100
|
+
./spec/aircana/system_checker_spec.rb[1:3:1] | passed | 0.00019 seconds |
|
101
|
+
./spec/aircana/system_checker_spec.rb[1:3:2] | passed | 0.00027 seconds |
|
102
|
+
./spec/aircana/system_checker_spec.rb[1:3:3] | passed | 0.00026 seconds |
|
103
|
+
./spec/aircana/system_checker_spec.rb[1:3:4] | passed | 0.00027 seconds |
|
104
|
+
./spec/aircana/system_checker_spec.rb[1:3:5] | passed | 0.0002 seconds |
|
105
|
+
./spec/aircana_spec.rb[1:1] | passed | 0.00005 seconds |
|
106
|
+
./spec/aircana_spec.rb[1:2] | passed | 0.00083 seconds |
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 3.3
|
3
|
+
NewCops: enable
|
4
|
+
Exclude:
|
5
|
+
- 'bin/**/*'
|
6
|
+
- 'vendor/**/*'
|
7
|
+
|
8
|
+
Style/StringLiterals:
|
9
|
+
EnforcedStyle: double_quotes
|
10
|
+
|
11
|
+
Style/StringLiteralsInInterpolation:
|
12
|
+
EnforcedStyle: double_quotes
|
13
|
+
|
14
|
+
Style/Documentation:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Metrics/BlockLength:
|
18
|
+
Exclude:
|
19
|
+
- 'spec/**/*'
|
20
|
+
- '*.gemspec'
|
21
|
+
|
22
|
+
Layout/LineLength:
|
23
|
+
Max: 120
|
24
|
+
|
25
|
+
Metrics/ClassLength:
|
26
|
+
Exclude:
|
27
|
+
- 'lib/aircana/human_logger.rb'
|
28
|
+
- 'lib/aircana/system_checker.rb'
|
29
|
+
- 'lib/aircana/cli/commands/add_directory.rb'
|
30
|
+
|
31
|
+
Metrics/ModuleLength:
|
32
|
+
Exclude:
|
33
|
+
- 'lib/aircana/cli/commands/add_directory.rb'
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [Unreleased]
|
9
|
+
|
10
|
+
## [0.1.0] - 2025-09-03
|
11
|
+
|
12
|
+
### Added
|
13
|
+
- Initial release
|
14
|
+
- Context management for AI agents
|
15
|
+
- File organization utilities
|
16
|
+
- Template generation
|
17
|
+
- Claude Code integration
|
18
|
+
- CLI interface with Thor
|
19
|
+
- Commands: add_files, clear_files, dump_context, generate, install
|
data/CLAUDE.md
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# CLAUDE.md
|
2
|
+
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
4
|
+
|
5
|
+
## Commands
|
6
|
+
|
7
|
+
### Development
|
8
|
+
- `bundle exec exe/aircana <command>` - Run commands in development mode
|
9
|
+
- `bundle install` - Install dependencies
|
10
|
+
- `bin/setup` - Set up development environment
|
11
|
+
- `bin/console` - Interactive prompt for experimentation
|
12
|
+
|
13
|
+
### Testing and Quality
|
14
|
+
- `rake spec` or `bundle exec rspec` - Run tests
|
15
|
+
- `bundle exec rubocop` - Run linter
|
16
|
+
- `rake` - Run both tests and linter (default task)
|
17
|
+
|
18
|
+
### Gem Management
|
19
|
+
- `bundle exec rake install` - Install gem locally
|
20
|
+
- `bundle exec rake release` - Release new version (updates version, creates git tag, pushes to rubygems)
|
21
|
+
|
22
|
+
### Aircana CLI Commands
|
23
|
+
- `aircana add-files` - Interactively add files to current context
|
24
|
+
- `aircana add-dir [DIRECTORY_PATH]` - Add all files from directory to context
|
25
|
+
- `aircana clear-files` - Remove all files from relevant files
|
26
|
+
- `aircana dump-context <agent_name>` - Dump context for specified agent
|
27
|
+
- `aircana generate` - Generate all configured files
|
28
|
+
- `aircana install` - Install generated files to Claude Code config
|
29
|
+
- `aircana agents create` - Create a new agent
|
30
|
+
- `aircana agents refresh <agent>` - Refresh agent knowledge from Confluence pages with matching labels
|
31
|
+
|
32
|
+
## Architecture
|
33
|
+
|
34
|
+
### Core Structure
|
35
|
+
Aircana is a Ruby gem that provides context management and workflow utilities for AI agents, specifically Claude Code. The main components:
|
36
|
+
|
37
|
+
- **CLI Layer** (`lib/aircana/cli/`): Thor-based command line interface with subcommands
|
38
|
+
- **Contexts** (`lib/aircana/contexts/`): Manages different types of context (relevant files, local, confluence)
|
39
|
+
- **Generators** (`lib/aircana/generators/`): Template generation system for Claude Code integration
|
40
|
+
- **Configuration** (`lib/aircana/configuration.rb`): Centralized configuration management
|
41
|
+
|
42
|
+
### Key Concepts
|
43
|
+
- **Relevant Files**: Current working set of important files stored in `.aircana/relevant_files/`
|
44
|
+
- **Agents**: Knowledge encapsulation with long-term memory and domain knowledge
|
45
|
+
- **Context Management**: Integration with Claude Code through generated templates and configurations
|
46
|
+
|
47
|
+
### File Organization
|
48
|
+
- Configuration files stored in `~/.aircana` (global) and `.aircana/` (project-local)
|
49
|
+
- Claude Code integration through `~/.claude` and `./.claude` directories
|
50
|
+
- Generated output goes to `~/.aircana/aircana.out` by default
|
51
|
+
|
52
|
+
### Dependencies
|
53
|
+
- Thor (~> 0.19.1) for CLI framework
|
54
|
+
- tty-prompt (~> 0.23.1) for interactive prompts
|
55
|
+
- Ruby >= 3.3.0 required
|
56
|
+
|
57
|
+
### Testing
|
58
|
+
Uses RSpec for testing with specs in `spec/` directory. Run individual tests with standard RSpec patterns.
|
data/Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
FROM instructure/ruby:3.3-jammy
|
2
|
+
|
3
|
+
USER root
|
4
|
+
RUN apt-get update && apt-get install -y git fzf && rm -rf /var/lib/apt/lists/*
|
5
|
+
|
6
|
+
WORKDIR /app
|
7
|
+
COPY . .
|
8
|
+
|
9
|
+
RUN chown -R docker:docker /app
|
10
|
+
|
11
|
+
USER docker
|
12
|
+
|
13
|
+
# Install gems to a path owned by docker user
|
14
|
+
RUN bundle config set --local path '/app/vendor/bundle'
|
15
|
+
RUN bundle install
|
16
|
+
|
17
|
+
CMD ["tail", "-f", "/dev/null"]
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2025 Weston Dransfield
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,251 @@
|
|
1
|
+
# Aircana
|
2
|
+
|
3
|
+
A Ruby CLI utility for context management and Claude Code integration. Aircana helps manage relevant files for development sessions, create specialized Claude Code agents, and optionally sync knowledge from Confluence.
|
4
|
+
|
5
|
+
[](https://github.com/westonkd/aircana/actions/workflows/main.yml)
|
6
|
+
[](https://badge.fury.io/rb/aircana)
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Install the gem:
|
11
|
+
|
12
|
+
```bash
|
13
|
+
gem install aircana
|
14
|
+
```
|
15
|
+
|
16
|
+
Or add to your Gemfile:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
gem 'aircana'
|
20
|
+
```
|
21
|
+
|
22
|
+
Then run:
|
23
|
+
|
24
|
+
```bash
|
25
|
+
bundle install
|
26
|
+
```
|
27
|
+
|
28
|
+
Verify installation and check dependencies:
|
29
|
+
|
30
|
+
```bash
|
31
|
+
aircana doctor
|
32
|
+
```
|
33
|
+
|
34
|
+
## Prerequisites
|
35
|
+
|
36
|
+
### Required Dependencies
|
37
|
+
- Ruby >= 3.3.0
|
38
|
+
- `git` (version control operations)
|
39
|
+
- `fzf` (interactive file selection)
|
40
|
+
|
41
|
+
### Optional Dependencies
|
42
|
+
- `bat` (enhanced file previews, falls back to `cat`)
|
43
|
+
- `fd` (faster file searching, falls back to `find`)
|
44
|
+
|
45
|
+
### For Confluence Integration (Optional)
|
46
|
+
- Access to a Confluence instance
|
47
|
+
- Confluence API token
|
48
|
+
- Appropriate permissions to read pages and labels
|
49
|
+
|
50
|
+
## Core Concepts
|
51
|
+
|
52
|
+
Aircana provides two main independent features:
|
53
|
+
|
54
|
+
### 1. Relevant Files Management
|
55
|
+
Track and manage a curated set of "relevant files" - the current working set of important files for your development session. This context is automatically available to Claude Code sessions.
|
56
|
+
|
57
|
+
**This works completely independently from agents** - you can use relevant files without creating any agents.
|
58
|
+
|
59
|
+
### 2. Specialized Agents (Optional)
|
60
|
+
Create Claude Code agents with:
|
61
|
+
- **Domain Knowledge**: Focused expertise in specific areas
|
62
|
+
- **Confluence Integration**: Knowledge sync from labeled pages (requires Confluence setup)
|
63
|
+
- **Customizable Models**: Choose from different Claude models and interface colors
|
64
|
+
|
65
|
+
**Agents work independently from relevant files** - you can create agents without managing relevant files.
|
66
|
+
|
67
|
+
### Knowledge Sources
|
68
|
+
- **Relevant Files**: Current working set managed by Aircana (independent feature)
|
69
|
+
- **Confluence Pages**: Fetched based on agent labels (agent feature, requires setup)
|
70
|
+
- **Local Context**: Project-specific files and configurations
|
71
|
+
|
72
|
+
## What Aircana Does
|
73
|
+
|
74
|
+
- **File Context Management**: Track and manage relevant files for Claude Code sessions
|
75
|
+
- **Agent Configuration**: Create and configure specialized Claude Code agents
|
76
|
+
- **Confluence Integration**: Sync knowledge from Confluence pages to agents (optional)
|
77
|
+
- **Claude Code Shortcuts**: Quick-launch Claude Code with pre-configured agents
|
78
|
+
- **System Health Checks**: Validate dependencies and configuration
|
79
|
+
|
80
|
+
## Quick Start
|
81
|
+
|
82
|
+
1. **Install and verify**:
|
83
|
+
```bash
|
84
|
+
gem install aircana
|
85
|
+
aircana doctor
|
86
|
+
```
|
87
|
+
|
88
|
+
2. **Set up your project**:
|
89
|
+
```bash
|
90
|
+
cd your-project
|
91
|
+
aircana install # Set up Aircana integration in this project
|
92
|
+
```
|
93
|
+
|
94
|
+
3. **Add files to context**:
|
95
|
+
```bash
|
96
|
+
aircana add-files # Interactive selection
|
97
|
+
```
|
98
|
+
|
99
|
+
Then in Claude Code, include them with whenever you want to reload the files into the current context:
|
100
|
+
```
|
101
|
+
/ac-add-relevant-files
|
102
|
+
```
|
103
|
+
|
104
|
+
4. **Create an agent** (optional, but powerful with Confluence):
|
105
|
+
```bash
|
106
|
+
aircana agents create # Tag Confluence pages with the agent's name before or after creation to pull that knowledge into the agent's knowledge base.
|
107
|
+
```
|
108
|
+
|
109
|
+
5. **Launch Claude Code**:
|
110
|
+
|
111
|
+
_These command are still very much a work in progress_
|
112
|
+
|
113
|
+
```bash
|
114
|
+
aircana plan # For planning work
|
115
|
+
aircana work # For implementation
|
116
|
+
```
|
117
|
+
|
118
|
+
## Confluence Setup (Optional)
|
119
|
+
|
120
|
+
To use agent knowledge sync features, you'll need to configure Confluence integration:
|
121
|
+
|
122
|
+
### 1. Generate Confluence API Token
|
123
|
+
|
124
|
+
1. Go to your Confluence instance
|
125
|
+
2. Click your profile picture → **Account Settings**
|
126
|
+
3. Select **Security** → **Create and manage API tokens**
|
127
|
+
4. Click **Create API token**
|
128
|
+
5. Give it a descriptive name (e.g., "Aircana Integration")
|
129
|
+
6. Copy the generated token
|
130
|
+
|
131
|
+
### 2. Set Environment Variables
|
132
|
+
|
133
|
+
Add these to your shell profile (`.bashrc`, `.zshrc`, etc.):
|
134
|
+
|
135
|
+
```bash
|
136
|
+
export CONFLUENCE_BASE_URL="https://your-company.atlassian.net"
|
137
|
+
export CONFLUENCE_USERNAME="your.email@company.com"
|
138
|
+
export CONFLUENCE_API_TOKEN="your-generated-token"
|
139
|
+
```
|
140
|
+
|
141
|
+
Reload your shell or run `source ~/.zshrc` (or your shell config file).
|
142
|
+
|
143
|
+
### 3. Verify Configuration
|
144
|
+
|
145
|
+
```bash
|
146
|
+
aircana doctor
|
147
|
+
```
|
148
|
+
|
149
|
+
This will check if Confluence is properly configured.
|
150
|
+
|
151
|
+
## Agent Workflow Tutorial
|
152
|
+
|
153
|
+
Here's a complete example of creating an agent and syncing knowledge from Confluence:
|
154
|
+
|
155
|
+
### 1. Create an Agent
|
156
|
+
|
157
|
+
```bash
|
158
|
+
aircana agents create
|
159
|
+
```
|
160
|
+
|
161
|
+
You'll be prompted for:
|
162
|
+
- **Agent name**: e.g., "backend-api"
|
163
|
+
- **Description**: e.g., "Helps with backend API development"
|
164
|
+
- **Model**: Choose from sonnet, haiku, or inherit
|
165
|
+
- **Color**: Choose interface color
|
166
|
+
|
167
|
+
### 2. Tag Confluence Pages
|
168
|
+
|
169
|
+
In Confluence, add the label `backend-api` (matching your agent name) to relevant pages:
|
170
|
+
|
171
|
+
1. Open a Confluence page with relevant documentation
|
172
|
+
2. Click **...** → **Edit labels**
|
173
|
+
3. Add label: `backend-api`
|
174
|
+
4. Save
|
175
|
+
|
176
|
+
Repeat for all pages you want the agent to know about.
|
177
|
+
|
178
|
+
### 3. Sync Knowledge
|
179
|
+
|
180
|
+
```bash
|
181
|
+
aircana agents refresh backend-api
|
182
|
+
```
|
183
|
+
|
184
|
+
This downloads all Confluence pages labeled `backend-api` and makes them available to your agent.
|
185
|
+
|
186
|
+
### 4. Use the Agent
|
187
|
+
|
188
|
+
Once created with a good description, Claude Code will automatically use your agent when appropriate during conversations. You can also explicitly request a specific agent:
|
189
|
+
|
190
|
+
```
|
191
|
+
Ask backend-api for a code review of this function
|
192
|
+
Ask backend-api to help debug this API endpoint
|
193
|
+
Ask rspec-test-writer to write and run tests for @file
|
194
|
+
```
|
195
|
+
|
196
|
+
The agent will have access to all the Confluence knowledge you synced.
|
197
|
+
|
198
|
+
### 5. Update Knowledge
|
199
|
+
|
200
|
+
Whenever you update Confluence pages or add new ones with the agent label:
|
201
|
+
|
202
|
+
```bash
|
203
|
+
aircana agents refresh backend-api
|
204
|
+
```
|
205
|
+
|
206
|
+
|
207
|
+
## All Commands
|
208
|
+
|
209
|
+
### File Management
|
210
|
+
```bash
|
211
|
+
aircana add-files # Interactively select files to add to context
|
212
|
+
aircana add-dir [PATH] # Add all files from directory
|
213
|
+
aircana clear-files # Clear current file context
|
214
|
+
aircana dump-context [AGENT] # View current context for agent
|
215
|
+
```
|
216
|
+
|
217
|
+
### Agent Management
|
218
|
+
```bash
|
219
|
+
aircana agents create # Create new agent interactively
|
220
|
+
aircana agents refresh [AGENT] # Sync agent knowledge from Confluence
|
221
|
+
```
|
222
|
+
|
223
|
+
### Claude Code Integration
|
224
|
+
```bash
|
225
|
+
aircana plan # Launch Claude Code with planner agent (experimental)
|
226
|
+
aircana work # Launch Claude Code with worker agent (experimental)
|
227
|
+
aircana generate # Generate Claude Code configuration files
|
228
|
+
aircana install # Install generated files to Claude Code
|
229
|
+
```
|
230
|
+
|
231
|
+
### System
|
232
|
+
```bash
|
233
|
+
aircana doctor # Check system health and dependencies
|
234
|
+
aircana doctor --verbose # Show detailed dependency information
|
235
|
+
```
|
236
|
+
|
237
|
+
## Development
|
238
|
+
|
239
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
240
|
+
|
241
|
+
Run commands in development with `bundle exec exe/aircana <command>`
|
242
|
+
|
243
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
244
|
+
|
245
|
+
## Contributing
|
246
|
+
|
247
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/westonkd/aircana.
|
248
|
+
|
249
|
+
## License
|
250
|
+
|
251
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/SECURITY.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Supported Versions
|
4
|
+
|
5
|
+
| Version | Supported |
|
6
|
+
| ------- | ------------------ |
|
7
|
+
| 0.1.x | :white_check_mark: |
|
8
|
+
|
9
|
+
## Reporting a Vulnerability
|
10
|
+
|
11
|
+
Please report security vulnerabilities by emailing weston@dransfield.dev.
|
12
|
+
|
13
|
+
Do not report security vulnerabilities through public GitHub issues.
|
14
|
+
|
15
|
+
We will respond to security reports within 48 hours and provide regular updates on the status of any reported vulnerabilities.
|
data/compose.yml
ADDED
data/exe/aircana
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require "aircana"
|
6
|
+
|
7
|
+
Aircana.configure do |config|
|
8
|
+
config.confluence_base_url = ENV.fetch("CONFLUENCE_BASE_URL", nil)
|
9
|
+
config.confluence_username = ENV.fetch("CONFLUENCE_USERNAME", nil)
|
10
|
+
config.confluence_api_token = ENV.fetch("CONFLUENCE_API_TOKEN", nil)
|
11
|
+
end
|
12
|
+
|
13
|
+
Aircana::CLI::App.start(ARGV)
|