aia 1.1.1 → 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.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/.envrc +5 -1
  3. data/.loki +231 -0
  4. data/.quality/flay_baseline.txt +1 -0
  5. data/.quality/flog_baseline.txt +29 -0
  6. data/.quality/reek_baseline.txt +80 -0
  7. data/.rubocop.yml +116 -0
  8. data/.version +1 -1
  9. data/CHANGELOG.md +259 -50
  10. data/IMPLEMENTATION_PLAN.md +506 -0
  11. data/README.md +266 -238
  12. data/Rakefile +118 -5
  13. data/architecture_review.md +314 -0
  14. data/bin/aia +16 -0
  15. data/docs/AGENTS.md +40 -0
  16. data/docs/advanced-prompting.md +67 -3
  17. data/docs/cli-reference.md +312 -56
  18. data/docs/configuration.md +130 -19
  19. data/docs/contributing.md +56 -2
  20. data/docs/directives-reference.md +593 -78
  21. data/docs/faq.md +85 -3
  22. data/docs/guides/available-models.md +1 -1
  23. data/docs/guides/basic-usage.md +6 -6
  24. data/docs/guides/chat.md +40 -16
  25. data/docs/guides/crew.md +239 -0
  26. data/docs/guides/executable-prompts.md +1 -1
  27. data/docs/guides/index.md +1 -0
  28. data/docs/guides/models.md +15 -0
  29. data/docs/index.md +29 -2
  30. data/docs/installation.md +44 -17
  31. data/docs/mcp-integration.md +40 -0
  32. data/docs/prompt_management.md +85 -86
  33. data/docs/security.md +47 -0
  34. data/docs/special_projects_guide.md +386 -0
  35. data/docs/tools-and-mcp-examples.md +23 -0
  36. data/docs/workflows-and-pipelines.md +84 -7
  37. data/examples/.gitignore +1 -0
  38. data/examples/00_setup_aia.sh +27 -44
  39. data/examples/11_multi_model.sh +4 -14
  40. data/examples/12_token_usage.sh +3 -12
  41. data/examples/18_tools.sh +10 -2
  42. data/examples/22_chat_mode.sh +0 -10
  43. data/examples/23_verify.sh +139 -0
  44. data/examples/24_decompose.sh +139 -0
  45. data/examples/25_spawn.sh +139 -0
  46. data/examples/26_debate.sh +97 -0
  47. data/examples/27_mention_routing.sh +157 -0
  48. data/examples/28_model_switching.sh +106 -0
  49. data/examples/29_agent_harness.sh +177 -0
  50. data/examples/README.md +65 -0
  51. data/examples/advanced_multi_robot_capabilities_without_examples.md +106 -0
  52. data/examples/aia_config.yml +1 -1
  53. data/examples/aia_config_orchestrator.yml +45 -0
  54. data/examples/common.sh +18 -6
  55. data/examples/context/tech_stack.md +2 -2
  56. data/examples/prompts_dir/roles/orchestrator.md +21 -0
  57. data/examples/requirements/sinatra_taskflow_app.md +139 -0
  58. data/examples/rules/01_classify_ruby.rb +16 -0
  59. data/examples/rules/02_prefer_claude_for_code.rb +19 -0
  60. data/examples/rules/03_gate_prompt_length.rb +19 -0
  61. data/examples/rules/04_tool_selection.rb +41 -0
  62. data/examples/rules/README.md +30 -0
  63. data/examples/run_all.sh +48 -15
  64. data/examples/tools/word_count_tool.rb +1 -1
  65. data/lib/AGENTS.md +57 -0
  66. data/lib/aia/chat_loop.rb +304 -164
  67. data/lib/aia/config/cli_parser.rb +174 -111
  68. data/lib/aia/config/defaults.yml +62 -33
  69. data/lib/aia/config/mcp_parser.rb +39 -46
  70. data/lib/aia/config/model_spec.rb +34 -2
  71. data/lib/aia/config/validator.rb +108 -142
  72. data/lib/aia/config.rb +110 -145
  73. data/lib/aia/content_extractor.rb +153 -0
  74. data/lib/aia/cost_calculator.rb +38 -0
  75. data/lib/aia/crew.rb +164 -0
  76. data/lib/aia/debate_handler.rb +166 -0
  77. data/lib/aia/delegate_handler.rb +112 -0
  78. data/lib/aia/directive.rb +33 -18
  79. data/lib/aia/directive_processor.rb +16 -7
  80. data/lib/aia/directives/configuration_directives.rb +160 -20
  81. data/lib/aia/directives/context_directives.rb +38 -26
  82. data/lib/aia/directives/execution_directives.rb +136 -4
  83. data/lib/aia/directives/model_directives.rb +76 -34
  84. data/lib/aia/directives/trakflow_directives.rb +44 -0
  85. data/lib/aia/directives/utility_directives.rb +203 -6
  86. data/lib/aia/directives/web_and_file_directives.rb +96 -60
  87. data/lib/aia/errors.rb +15 -0
  88. data/lib/aia/fact_asserter.rb +27 -0
  89. data/lib/aia/fzf.rb +9 -31
  90. data/lib/aia/handler_context.rb +17 -0
  91. data/lib/aia/handler_protocol.rb +19 -0
  92. data/lib/aia/history_transfer.rb +55 -0
  93. data/lib/aia/input_collector.rb +3 -3
  94. data/lib/aia/layered_orchestrator.rb +448 -0
  95. data/lib/aia/logger.rb +24 -4
  96. data/lib/aia/mcp_config_normalizer.rb +35 -0
  97. data/lib/aia/mcp_connection_manager.rb +305 -0
  98. data/lib/aia/mcp_discovery.rb +44 -0
  99. data/lib/aia/mcp_grouper.rb +33 -0
  100. data/lib/aia/mcp_utility.rb +57 -0
  101. data/lib/aia/mention_router.rb +260 -0
  102. data/lib/aia/model_alias_registry.rb +97 -0
  103. data/lib/aia/model_switch_handler.rb +100 -0
  104. data/lib/aia/network_builder.rb +155 -0
  105. data/lib/aia/network_memory_manager.rb +55 -0
  106. data/lib/aia/patches/ruby_llm_streaming_error.rb +43 -0
  107. data/lib/aia/patches/ruby_llm_tool_error.rb +96 -0
  108. data/lib/aia/pipeline_orchestrator.rb +262 -0
  109. data/lib/aia/plugin_loader.rb +170 -0
  110. data/lib/aia/plugin_monitor.rb +208 -0
  111. data/lib/aia/prompt_decomposer.rb +157 -0
  112. data/lib/aia/prompt_handler.rb +19 -39
  113. data/lib/aia/robot_builder.rb +51 -0
  114. data/lib/aia/robot_factory.rb +334 -0
  115. data/lib/aia/robot_namer.rb +116 -0
  116. data/lib/aia/session.rb +83 -17
  117. data/lib/aia/session_tracker.rb +209 -0
  118. data/lib/aia/similarity_scorer.rb +39 -0
  119. data/lib/aia/skill_utils.rb +105 -1
  120. data/lib/aia/spawn_handler.rb +129 -0
  121. data/lib/aia/spawn_spec_parser.rb +65 -0
  122. data/lib/aia/special_mode_handler.rb +302 -0
  123. data/lib/aia/startup_coordinator.rb +150 -0
  124. data/lib/aia/streaming_runner.rb +169 -0
  125. data/lib/aia/system_prompt_assembler.rb +88 -0
  126. data/lib/aia/task_coordinator.rb +202 -0
  127. data/lib/aia/task_decomposer.rb +57 -0
  128. data/lib/aia/task_executor.rb +51 -0
  129. data/lib/aia/tfidf_math.rb +27 -0
  130. data/lib/aia/tool_filter/tfidf.rb +116 -0
  131. data/lib/aia/tool_filter/wordnet_expander.rb +127 -0
  132. data/lib/aia/tool_filter.rb +82 -0
  133. data/lib/aia/tool_filter_registry.rb +30 -0
  134. data/lib/aia/tool_filter_strategy.rb +143 -0
  135. data/lib/aia/tool_loader.rb +210 -0
  136. data/lib/aia/tool_utility.rb +30 -0
  137. data/lib/aia/tools/delegate_to_foreman_tool.rb +70 -0
  138. data/lib/aia/tools/recruit_robot_tool.rb +60 -0
  139. data/lib/aia/tools/reskill_robot_tool.rb +44 -0
  140. data/lib/aia/tools/task_board_tool.rb +114 -0
  141. data/lib/aia/trakflow_bridge.rb +173 -0
  142. data/lib/aia/turn_state.rb +94 -0
  143. data/lib/aia/ui_presenter.rb +166 -198
  144. data/lib/aia/utility.rb +134 -87
  145. data/lib/aia/{history_manager.rb → variable_input_collector.rb} +8 -9
  146. data/lib/aia/verification_network.rb +58 -0
  147. data/lib/aia.rb +108 -63
  148. data/mkdocs.yml +1 -0
  149. metadata +179 -56
  150. data/justfile +0 -215
  151. data/lib/aia/adapter/chat_execution.rb +0 -242
  152. data/lib/aia/adapter/error_handler.rb +0 -68
  153. data/lib/aia/adapter/gem_activator.rb +0 -57
  154. data/lib/aia/adapter/mcp_connector.rb +0 -274
  155. data/lib/aia/adapter/modality_handlers.rb +0 -167
  156. data/lib/aia/adapter/model_registry.rb +0 -81
  157. data/lib/aia/adapter/multi_model_chat.rb +0 -218
  158. data/lib/aia/adapter/provider_configurator.rb +0 -59
  159. data/lib/aia/adapter/tool_filter.rb +0 -85
  160. data/lib/aia/adapter/tool_loader.rb +0 -90
  161. data/lib/aia/chat_processor_service.rb +0 -178
  162. data/lib/aia/prompt_pipeline.rb +0 -183
  163. data/lib/aia/ruby_llm_adapter.rb +0 -95
  164. data/lib/extensions/openstruct_merge.rb +0 -48
  165. data/lib/extensions/ruby_llm/.irbrc +0 -56
  166. data/lib/extensions/ruby_llm/modalities.rb +0 -36
  167. data/lib/extensions/ruby_llm/provider_fix.rb +0 -79
  168. data/lib/refinements/string.rb +0 -16
  169. data/main.just +0 -76
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8f6a82b1c6cc29b4245e51ed43a325a835a921a0da5c2818dbdfbdeeeb97c40
4
- data.tar.gz: ff0cff98ed30d391970a11a44519cb9ea95082bfae2a08e5ebf03b71eeefac15
3
+ metadata.gz: fa3398e1c7d65c30234833e49a9319b6e49b9febcd97d13c3ba3aa4da7043c80
4
+ data.tar.gz: dbfad1a98f1c48452bfd7006b61c1d1384a108bdd0a6e81fc0308e4d21f3a917
5
5
  SHA512:
6
- metadata.gz: ec35e9ae94d6c74ad6ecf87ad6a8511de29407d1bac99db1ff1266b7072ac078746bf9fcabb45f6aeed1858198b318ff2906e8858b74185de8107cfdcf48bfca
7
- data.tar.gz: 7ee21fda6bdf851e2418d739450f2b8d6ffd8580e5aaaef7b84e5c16c83ded0eefb83e6c8a943ffa5bbe09960463eb8617c44adf9a66f6ad87b460edc50ed6b7
6
+ metadata.gz: 8147c86f02e631253a5eedc5e1f1469ac5631bcc998ffcdeb27dc435e018f86dacd2cfb97af3d2b7ce633924aa6ae9d8c69c834fbfe35458713a29e7dfc21e48
7
+ data.tar.gz: 68b51a79936852cafc714a9c540cb9b2b0fc016efb9fa88351a29b021c56ecefb6cbf31dacd4decab64467815cccccb8eccda4dcac18cf5700270d4af5c21948
data/.envrc CHANGED
@@ -1,6 +1,9 @@
1
1
  source_up
2
2
 
3
- export RR=`pwd`
3
+ export RR=$(pwd)
4
+
5
+ export AIA_PLUGINS_DIR=$RR/plugins
6
+
4
7
  # PATH_add $RR/bin
5
8
 
6
9
  # see aia --help for --model option
@@ -9,3 +12,4 @@ export RR=`pwd`
9
12
  # Use a comma to seperate the models in a multi-model setup
10
13
  #
11
14
  # export AIA_MODEL=claude-haiku-4-5,gpt-4o-mini
15
+ export AIA_MODEL=ollama/qwen3.6
data/.loki ADDED
@@ -0,0 +1,231 @@
1
+ # frozen_string_literal: true
2
+ # aia/.loki — asgard task runner for the aia gem
3
+
4
+ class Tasks
5
+ @@rr ||= Dir.pwd.freeze
6
+
7
+ header "aia — AI Assistant CLI gem"
8
+ footer "Run `asgard help TASK` for details on any task"
9
+
10
+ map "t" => :test
11
+ map "i" => :install
12
+ map "inc" => :bump
13
+
14
+ default_task :list
15
+
16
+ # ── Terminal utilities ─────────────────────────────────────────────────────
17
+
18
+ desc "Fix half-duplex terminal"
19
+ def fix = sh "stty sane"
20
+
21
+ desc "Clear the scroll-back buffer"
22
+ def clear_buffer = sh 'printf "\e[3J"'
23
+
24
+ # ── Mods ──────────────────────────────────────────────────────────────────
25
+
26
+ desc "Delete all mods saved conversations"
27
+ def mods_delete_all
28
+ sh "mods -l | awk '{print $1}' | xargs -I {} mods -d {}"
29
+ end
30
+
31
+ # ── Run ───────────────────────────────────────────────────────────────────
32
+
33
+ desc "aia [ARGS]", "Run the aia CLI with pass-through arguments (e.g. asgard aia --chat)"
34
+ def aia(*args)
35
+ sh "#{@@rr}/bin/aia #{args.join(' ')}"
36
+ end
37
+
38
+ # ── Tests & Quality ────────────────────────────────────────────────────────
39
+
40
+ desc "Run unit tests"
41
+ def test = sh "bundle exec rake test"
42
+
43
+ depends_on :test
44
+ desc "Open coverage report in browser (depends on: test)"
45
+ def coverage = sh "open #{@@rr}/coverage/index.html"
46
+
47
+ desc "Check code complexity with Flog"
48
+ def flog = sh "bundle exec rake flog_check > flog_output.txt 2>&1"
49
+
50
+ desc "Check for structural duplication with Flay"
51
+ def flay = sh "bundle exec rake flay_check > flay_output.txt 2>&1"
52
+
53
+ desc "Check code smells with Reek (fails only on new or worsened files)"
54
+ def reek
55
+ current = reek_scan
56
+ baseline = load_reek_baseline
57
+
58
+ new_files = current.reject { |f, _| baseline.key?(f) }
59
+ worsened = current.select { |f, c| baseline.key?(f) && c > baseline[f] }
60
+ improved = baseline.count { |f, c| current.key?(f) && current[f] < c }
61
+ cleaned = baseline.keys - current.keys
62
+
63
+ total_current = current.values.sum
64
+ total_baseline = baseline.values.sum
65
+
66
+ puts "\nReek: #{total_current} warning(s) across #{current.size} file(s) " \
67
+ "(#{total_baseline} grandfathered across #{baseline.size} file(s))."
68
+ puts " #{cleaned.size} file(s) fully clean — run `asgard reek_baseline` to prune." unless cleaned.empty?
69
+ puts " #{improved} file(s) improved — run `asgard reek_baseline` to ratchet down." unless improved.zero?
70
+
71
+ problems = new_files.map { |f, c| format("NEW %3d warning(s): %s", c, f) } +
72
+ worsened.map { |f, c| format("WORSENED %3d -> %3d: %s", baseline[f], c, f) }
73
+
74
+ if problems.empty?
75
+ puts "Reek quality gate passed (no new or worsened files)."
76
+ else
77
+ puts "\nReek quality gate FAILED:"
78
+ problems.each { |p| puts " #{p}" }
79
+ abort "\nReek: #{problems.size} file(s) regressed. Fix smells, or `asgard reek_baseline` if intentional."
80
+ end
81
+ end
82
+
83
+ desc "Regenerate the Reek baseline (grandfathers current smell counts per file)"
84
+ def reek_baseline
85
+ require 'fileutils'
86
+ FileUtils.mkdir_p('.quality')
87
+ warnings = reek_scan
88
+ body = warnings.sort_by { |f, _| f }.map { |f, c| "#{c}\t#{f}" }.join("\n")
89
+ File.write('.quality/reek_baseline.txt', body.empty? ? '' : "#{body}\n")
90
+ puts "Wrote #{warnings.size} file(s) with smells to .quality/reek_baseline.txt"
91
+ end
92
+
93
+ desc "Check code style with RuboCop"
94
+ def rubocop = sh "bundle exec rubocop > rubocop_output.txt 2>&1"
95
+
96
+ desc "Auto-correct RuboCop offenses"
97
+ def rubocop_fix = sh "bundle exec rubocop -a"
98
+
99
+ desc "Run all quality gates: tests + Flog + Flay + Reek + RuboCop"
100
+ def quality
101
+ gates = {
102
+ test: -> { system("bundle exec rake test") },
103
+ flog: -> { system("bundle exec rake flog_check > flog_output.txt 2>&1") },
104
+ flay: -> { system("bundle exec rake flay_check > flay_output.txt 2>&1") },
105
+ reek: -> { reek_gate },
106
+ rubocop: -> { system("bundle exec rubocop > rubocop_output.txt 2>&1") }
107
+ }
108
+
109
+ results = gates.transform_values { |gate| gate.call }
110
+
111
+ puts "\n Quality Gate Summary"
112
+ puts " #{'─' * 32}"
113
+ results.each do |gate, ok|
114
+ badge = ok ? "\e[32mPASS\e[0m" : "\e[31mFAIL\e[0m"
115
+ file = gate == :test ? "test_output.txt" : "#{gate}_output.txt"
116
+ puts " #{badge} #{gate.to_s.ljust(10)} see #{file}"
117
+ end
118
+ puts " #{'─' * 32}"
119
+
120
+ if results.values.all?
121
+ puts "\n \e[32mAll quality gates passed.\e[0m\n\n"
122
+ else
123
+ failed = results.reject { |_, v| v }.keys.join(', ')
124
+ abort "\n \e[31mFailed: #{failed}\e[0m\n\n"
125
+ end
126
+ end
127
+
128
+ # ── Documentation ─────────────────────────────────────────────────────────
129
+
130
+ desc "Update README table of contents"
131
+ def update_toc_in_readmen = sh "rake toc"
132
+
133
+ depends_on :update_toc_in_readmen
134
+ desc "Generate documentation (depends on: update_toc_in_readmen)"
135
+ def gen_doc = puts "Documentation generated."
136
+
137
+ # ── Build & Install ────────────────────────────────────────────────────────
138
+
139
+ depends_on :update_toc_in_readmen
140
+ desc "Install gem locally (depends on: update_toc_in_readmen)"
141
+ def install = sh "rake install"
142
+
143
+ # ── Backup ────────────────────────────────────────────────────────────────
144
+
145
+ desc "Backup .envrc and *.loki support files"
146
+ def backup_support_files
147
+ backup_loki_files
148
+ backup_envrc_files
149
+ end
150
+
151
+ # ── Version management ────────────────────────────────────────────────────
152
+
153
+ desc "Create a git tag for the current version"
154
+ def tag = sh "git tag v#{current_version}"
155
+
156
+ desc "Push commits and all tags to origin"
157
+ def push
158
+ sh "git push"
159
+ sh "git push origin --tags"
160
+ end
161
+
162
+ desc "bump [LEVEL]", "Increment version level: major, minor, or patch (default: patch)"
163
+ def bump(level = "patch")
164
+ require "versionaire"
165
+ path = version_filepath
166
+ old_ver = Versionaire::Version(File.read(path).strip)
167
+ new_ver = old_ver.bump(level.to_sym)
168
+ puts "Bumping #{level}: #{old_ver} to #{new_ver}"
169
+ File.write(path, "#{new_ver}\n")
170
+ sh "git add #{path}", silent: true
171
+ end
172
+
173
+ depends_on :tag, :push, :bump
174
+ desc "Tag the current commit, push it, then bump the version"
175
+ def tag_push_and_bump = puts "Tagged, pushed, and bumped."
176
+
177
+ # ── List ──────────────────────────────────────────────────────────────────
178
+
179
+ desc "List available tasks (default)"
180
+ def list = sh "asgard help"
181
+
182
+ # ── Private helpers ───────────────────────────────────────────────────────
183
+
184
+ private
185
+
186
+ def version_filepath = File.join(@@rr, ".version")
187
+ def current_version = File.read(version_filepath).strip
188
+
189
+ def backup_loki_files = sh "backup_just.rb", silent: true
190
+ def backup_envrc_files = sh "backup_envrc.rb", silent: true
191
+
192
+ def reek_scan
193
+ require 'reek'
194
+ require 'reek/configuration/app_configuration'
195
+ config_path = Pathname.new('.reek.yml')
196
+ config = config_path.exist? ? Reek::Configuration::AppConfiguration.from_path(config_path) : nil
197
+ sources = Dir.glob('lib/**/*.rb') + Dir.glob('plugins/**/*.rb')
198
+ sources.each_with_object({}) do |f, acc|
199
+ examiner = Reek::Examiner.new(File.read(f), configuration: config)
200
+ count = examiner.smells.size
201
+ acc[f] = count if count > 0
202
+ end
203
+ end
204
+
205
+ def load_reek_baseline
206
+ path = File.join(@@rr, '.quality', 'reek_baseline.txt')
207
+ return {} unless File.exist?(path)
208
+
209
+ File.readlines(path).each_with_object({}) do |line, acc|
210
+ count, file = line.strip.split("\t", 2)
211
+ acc[file] = count.to_i if file && !file.empty?
212
+ end
213
+ end
214
+
215
+ def reek_gate
216
+ current = reek_scan
217
+ baseline = load_reek_baseline
218
+ new_files = current.reject { |f, _| baseline.key?(f) }
219
+ worsened = current.select { |f, c| baseline.key?(f) && c > baseline[f] }
220
+ (new_files.empty? && worsened.empty?).tap do |ok|
221
+ File.write('reek_output.txt', ok ? "Reek quality gate passed.\n" : reek_failure_report(new_files, worsened, current, baseline))
222
+ end
223
+ end
224
+
225
+ def reek_failure_report(new_files, worsened, current, baseline)
226
+ lines = ["Reek quality gate FAILED:\n"]
227
+ lines += new_files.map { |f, c| format(" NEW %3d warning(s): %s\n", c, f) }
228
+ lines += worsened.map { |f, c| format(" WORSENED %3d -> %3d: %s\n", baseline[f], c, f) }
229
+ lines.join
230
+ end
231
+ end
@@ -0,0 +1 @@
1
+ 1866838872
@@ -0,0 +1,29 @@
1
+ 141.7 AIA::ToolFilterStrategy#display_timing_table
2
+ 137.5 AIA::ConfigurationDirectives#model
3
+ 122.8 AIA::SpecialModeHandler#handle_decomposition
4
+ 108.0 AIA::ConfigValidator::load_mcp_tools_grouped
5
+ 96.2 AIA::CLIParser::list_available_models
6
+ 94.0 AIA::UIPresenter#display_multi_model_metrics
7
+ 89.1 AIA::UtilityDirectives#tools
8
+ 79.0 AIA::ModelDirectives#show_rubyllm_models
9
+ 74.3 AIA::DebateHandler#handle
10
+ 71.0 AIA::ConfigurationDirectives#cost
11
+ 69.3 AIA::LayeredOrchestrator#handle
12
+ 67.1 AIA::UtilityDirectives#mcp
13
+ 64.8 AIA::PromptHandler#apply_root_shorthands
14
+ 63.2 AIA::ConfigValidator::handle_mcp_list
15
+ 62.9 AIA::ModelDirectives#show_ollama_models
16
+ 61.9 AIA::ConfigValidator::process_role_configuration
17
+ 61.3 AIA::ToolLoader#filtered_tools
18
+ 60.7 AIA::SessionTracker#record_network_turn
19
+ 60.2 AIA::MCPConnectionManager#connect_one
20
+ 58.4 AIA::ChatLoop#speak
21
+ 58.4 AIA::WebAndFileDirectives#skills
22
+ 57.7 AIA::LayeredOrchestrator#run_specialists_wave
23
+ 56.2 AIA::McpParser::convert_mcp_servers_format
24
+ 54.8 AIA::MentionRouter#speak
25
+ 54.6 AIA::ContextDirectives#review
26
+ 54.3 AIA::CLIParser::validate_role_exists
27
+ 52.6 AIA::ModelDirectives#show_lms_models
28
+ 50.9 AIA::ConfigValidator::load_local_tools
29
+ 50.2 AIA::Directive::help
@@ -0,0 +1,80 @@
1
+ 1 lib/aia.rb
2
+ 22 lib/aia/chat_loop.rb
3
+ 11 lib/aia/config.rb
4
+ 23 lib/aia/config/cli_parser.rb
5
+ 4 lib/aia/config/mcp_parser.rb
6
+ 1 lib/aia/config/model_spec.rb
7
+ 23 lib/aia/config/validator.rb
8
+ 7 lib/aia/content_extractor.rb
9
+ 1 lib/aia/cost_calculator.rb
10
+ 1 lib/aia/crew.rb
11
+ 8 lib/aia/debate_handler.rb
12
+ 6 lib/aia/delegate_handler.rb
13
+ 4 lib/aia/directive.rb
14
+ 2 lib/aia/directive_processor.rb
15
+ 15 lib/aia/directives/configuration_directives.rb
16
+ 12 lib/aia/directives/context_directives.rb
17
+ 10 lib/aia/directives/execution_directives.rb
18
+ 12 lib/aia/directives/model_directives.rb
19
+ 1 lib/aia/directives/trakflow_directives.rb
20
+ 11 lib/aia/directives/utility_directives.rb
21
+ 11 lib/aia/directives/web_and_file_directives.rb
22
+ 2 lib/aia/fact_asserter.rb
23
+ 1 lib/aia/fzf.rb
24
+ 1 lib/aia/history_transfer.rb
25
+ 19 lib/aia/layered_orchestrator.rb
26
+ 10 lib/aia/logger.rb
27
+ 1 lib/aia/mcp_config_normalizer.rb
28
+ 17 lib/aia/mcp_connection_manager.rb
29
+ 2 lib/aia/mcp_discovery.rb
30
+ 1 lib/aia/mcp_grouper.rb
31
+ 2 lib/aia/mcp_utility.rb
32
+ 17 lib/aia/mention_router.rb
33
+ 2 lib/aia/model_switch_handler.rb
34
+ 7 lib/aia/network_builder.rb
35
+ 2 lib/aia/network_memory_manager.rb
36
+ 1 lib/aia/patches/ruby_llm_streaming_error.rb
37
+ 2 lib/aia/patches/ruby_llm_tool_error.rb
38
+ 15 lib/aia/pipeline_orchestrator.rb
39
+ 2 lib/aia/plugin_loader.rb
40
+ 6 lib/aia/plugin_monitor.rb
41
+ 2 lib/aia/prompt_decomposer.rb
42
+ 19 lib/aia/prompt_handler.rb
43
+ 1 lib/aia/robot_builder.rb
44
+ 7 lib/aia/robot_factory.rb
45
+ 1 lib/aia/robot_namer.rb
46
+ 12 lib/aia/session.rb
47
+ 5 lib/aia/session_tracker.rb
48
+ 2 lib/aia/similarity_scorer.rb
49
+ 3 lib/aia/skill_utils.rb
50
+ 1 lib/aia/spawn_handler.rb
51
+ 14 lib/aia/special_mode_handler.rb
52
+ 2 lib/aia/startup_coordinator.rb
53
+ 8 lib/aia/streaming_runner.rb
54
+ 5 lib/aia/system_prompt_assembler.rb
55
+ 10 lib/aia/task_coordinator.rb
56
+ 2 lib/aia/tfidf_math.rb
57
+ 2 lib/aia/tool_filter.rb
58
+ 2 lib/aia/tool_filter/tfidf.rb
59
+ 1 lib/aia/tool_filter/wordnet_expander.rb
60
+ 12 lib/aia/tool_filter_strategy.rb
61
+ 13 lib/aia/tool_loader.rb
62
+ 1 lib/aia/tools/delegate_to_foreman_tool.rb
63
+ 1 lib/aia/tools/recruit_robot_tool.rb
64
+ 1 lib/aia/tools/reskill_robot_tool.rb
65
+ 4 lib/aia/tools/task_board_tool.rb
66
+ 10 lib/aia/trakflow_bridge.rb
67
+ 11 lib/aia/turn_state.rb
68
+ 7 lib/aia/ui_presenter.rb
69
+ 3 lib/aia/utility.rb
70
+ 1 lib/aia/variable_input_collector.rb
71
+ 1 lib/aia/verification_network.rb
72
+ 26 plugins/cli_help_analyzer_tool.rb
73
+ 4 plugins/git_context.rb
74
+ 1 plugins/joke.rb
75
+ 16 plugins/jq_tool.rb
76
+ 2 plugins/list_ruby_methods_tool.rb
77
+ 7 plugins/memory_tool.rb
78
+ 1 plugins/quick_file_tool.rb
79
+ 2 plugins/search_files_tool.rb
80
+ 10 plugins/search_replace_tool.rb
data/.rubocop.yml ADDED
@@ -0,0 +1,116 @@
1
+ inherit_from:
2
+ - .rubocop_todo.yml
3
+ - ../.rubocop-base.yml
4
+ - .rubocop_strict.yml
5
+
6
+ inherit_mode:
7
+ merge:
8
+ - Exclude
9
+
10
+ AllCops:
11
+ Exclude:
12
+ - 'examples/**/*'
13
+ - 'site/**/*'
14
+ - 'notes/**/*'
15
+ - 'docs/**/*'
16
+ - 'coverage/**/*'
17
+ - 'pkg/**/*'
18
+ - 'orchestrated_build_*/**/*'
19
+ - 'rubyllm_with_schema_test.rb'
20
+ - 'with_schema_test.rb'
21
+
22
+ # ── Gemspec: dev deps in gemspec for publisher convenience ───────────────────
23
+ Gemspec/DevelopmentDependencies:
24
+ EnforcedStyle: gemspec
25
+ Exclude:
26
+ - 'Gemfile'
27
+ - 'Gemfile.local'
28
+
29
+ # ── Style: intentional lib patterns ─────────────────────────────────────────
30
+ # extend self used in skill_utils.rb so methods are public when included
31
+ Style/ModuleFunction:
32
+ Exclude:
33
+ - 'lib/aia/skill_utils.rb'
34
+
35
+ # $DEBUG_ME is an intentional global for CLI debug toggle
36
+ Style/GlobalVars:
37
+ Exclude:
38
+ - 'lib/aia.rb'
39
+ - 'lib/aia/config/cli_parser.rb'
40
+
41
+ # %{key} Ruby format tokens are intentional for LLM prompt template interpolation
42
+ Style/FormatStringToken:
43
+ Enabled: false
44
+
45
+ # Safe navigation chains > 2 are intentional in this codebase
46
+ Style/SafeNavigationChainLength:
47
+ Enabled: false
48
+
49
+ # Duplicate branch bodies are intentional in several dispatch patterns
50
+ Lint/DuplicateBranch:
51
+ Enabled: false
52
+
53
+ # ── Test files: relax cops that fire on intentional test patterns ─────────────
54
+ Style/OpenStructUse:
55
+ Exclude:
56
+ - 'test/**/*'
57
+
58
+ Lint/MissingSuper:
59
+ Exclude:
60
+ - 'test/**/*'
61
+
62
+ Lint/FloatComparison:
63
+ Exclude:
64
+ - 'test/**/*'
65
+
66
+ Style/MixinUsage:
67
+ Exclude:
68
+ - 'test/test_helper.rb'
69
+
70
+ Style/OptionalBooleanParameter:
71
+ Exclude:
72
+ - 'test/test_helper.rb'
73
+
74
+ Naming/VariableNumber:
75
+ Exclude:
76
+ - 'test/**/*'
77
+
78
+ Lint/ConstantDefinitionInBlock:
79
+ Exclude:
80
+ - 'Rakefile'
81
+ - 'test/**/*'
82
+
83
+ Metrics/AbcSize:
84
+ Max: 40
85
+ Exclude:
86
+ - 'test/**/*'
87
+
88
+ Metrics/MethodLength:
89
+ Max: 35
90
+ CountAsOne:
91
+ - heredoc
92
+ - array
93
+ - hash
94
+ Exclude:
95
+ - 'test/**/*'
96
+
97
+ Metrics/BlockLength:
98
+ Exclude:
99
+ - 'Rakefile'
100
+ - '*.gemspec'
101
+ - 'test/**/*'
102
+
103
+ Metrics/CyclomaticComplexity:
104
+ Max: 20
105
+ Exclude:
106
+ - 'test/**/*'
107
+
108
+ Metrics/PerceivedComplexity:
109
+ Max: 20
110
+ Exclude:
111
+ - 'test/**/*'
112
+
113
+ Metrics/ModuleLength:
114
+ Max: 200
115
+ Exclude:
116
+ - 'test/**/*'
data/.version CHANGED
@@ -1 +1 @@
1
- 1.1.1
1
+ 2.0.0.0-alpha