aia 2.0.0.0.pre.alpha → 2.0.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.
Files changed (236) hide show
  1. checksums.yaml +4 -4
  2. data/.version +1 -1
  3. data/CHANGELOG.md +151 -228
  4. data/README.md +42 -19
  5. data/bin/aia +8 -3
  6. data/lib/aia/aia_completion.bash +2 -3
  7. data/lib/aia/aia_completion.fish +6 -5
  8. data/lib/aia/aia_completion.zsh +2 -3
  9. data/lib/aia/chat_loop.rb +24 -66
  10. data/lib/aia/config/cli_parser.rb +164 -123
  11. data/lib/aia/config/defaults.yml +12 -39
  12. data/lib/aia/config/mcp_parser.rb +42 -40
  13. data/lib/aia/config/model_spec.rb +8 -14
  14. data/lib/aia/config/validator.rb +144 -156
  15. data/lib/aia/config/value_caster.rb +76 -0
  16. data/lib/aia/config.rb +72 -54
  17. data/lib/aia/content_extractor.rb +2 -0
  18. data/lib/aia/cost_calculator.rb +1 -0
  19. data/lib/aia/crew.rb +29 -19
  20. data/lib/aia/debate_handler.rb +45 -20
  21. data/lib/aia/delegate_handler.rb +7 -3
  22. data/lib/aia/directive.rb +10 -8
  23. data/lib/aia/directives/configuration_directives.rb +164 -109
  24. data/lib/aia/directives/context_directives.rb +55 -40
  25. data/lib/aia/directives/execution_directives.rb +25 -25
  26. data/lib/aia/directives/model_directives.rb +112 -195
  27. data/lib/aia/directives/trakflow_directives.rb +27 -9
  28. data/lib/aia/directives/utility_directives.rb +86 -87
  29. data/lib/aia/directives/web_and_file_directives.rb +83 -63
  30. data/lib/aia/fact_asserter.rb +3 -3
  31. data/lib/aia/history_transfer.rb +64 -24
  32. data/lib/aia/layered_orchestrator.rb +66 -43
  33. data/lib/aia/logger.rb +27 -62
  34. data/lib/aia/mcp_config_normalizer.rb +27 -14
  35. data/lib/aia/mcp_connection_manager.rb +193 -186
  36. data/lib/aia/mcp_discovery.rb +43 -15
  37. data/lib/aia/mcp_grouper.rb +2 -1
  38. data/lib/aia/mcp_server_config.rb +48 -0
  39. data/lib/aia/mcp_utility.rb +28 -20
  40. data/lib/aia/mention_router.rb +22 -52
  41. data/lib/aia/modality_query.rb +36 -0
  42. data/lib/aia/model_alias_registry.rb +11 -11
  43. data/lib/aia/model_registry.rb +75 -0
  44. data/lib/aia/network_builder.rb +17 -11
  45. data/lib/aia/network_memory_manager.rb +6 -6
  46. data/lib/aia/patches/ruby_llm_streaming_error.rb +21 -4
  47. data/lib/aia/patches/ruby_llm_tool_param_compat.rb +18 -0
  48. data/lib/aia/pipeline_orchestrator.rb +88 -45
  49. data/lib/aia/plugin_monitor.rb +9 -6
  50. data/lib/aia/prompt_decomposer.rb +6 -4
  51. data/lib/aia/prompt_handler.rb +90 -69
  52. data/lib/aia/provider_registry.rb +105 -0
  53. data/lib/aia/robot_builder.rb +1 -1
  54. data/lib/aia/robot_factory.rb +77 -69
  55. data/lib/aia/robot_namer.rb +2 -8
  56. data/lib/aia/robot_sync.rb +79 -0
  57. data/lib/aia/role_catalog.rb +89 -0
  58. data/lib/aia/session.rb +32 -14
  59. data/lib/aia/session_tracker.rb +39 -41
  60. data/lib/aia/similarity_scorer.rb +5 -3
  61. data/lib/aia/skill_utils.rb +60 -19
  62. data/lib/aia/spawn_handler.rb +16 -4
  63. data/lib/aia/spawn_spec_parser.rb +6 -7
  64. data/lib/aia/special_mode_handler.rb +80 -57
  65. data/lib/aia/speech.rb +103 -0
  66. data/lib/aia/startup_coordinator.rb +17 -91
  67. data/lib/aia/streaming_runner.rb +16 -5
  68. data/lib/aia/system_prompt_assembler.rb +20 -15
  69. data/lib/aia/task_board.rb +60 -0
  70. data/lib/aia/task_coordinator.rb +10 -5
  71. data/lib/aia/timing.rb +15 -0
  72. data/lib/aia/tool_approver.rb +205 -0
  73. data/lib/aia/tool_filter.rb +1 -9
  74. data/lib/aia/tool_filter_strategy.rb +39 -25
  75. data/lib/aia/tool_introspection.rb +25 -0
  76. data/lib/aia/tool_loader.rb +71 -31
  77. data/lib/aia/tool_utility.rb +6 -5
  78. data/lib/aia/tools/delegate_to_foreman_tool.rb +6 -4
  79. data/lib/aia/tools/recruit_robot_tool.rb +12 -12
  80. data/lib/aia/tools/reskill_robot_tool.rb +7 -7
  81. data/lib/aia/tools/task_board_tool.rb +17 -16
  82. data/lib/aia/trakflow_bridge.rb +19 -11
  83. data/lib/aia/turn_state.rb +32 -8
  84. data/lib/aia/ui_presenter.rb +83 -59
  85. data/lib/aia/utility.rb +8 -24
  86. data/lib/aia/variable_input_collector.rb +1 -3
  87. data/lib/aia/verification_network.rb +10 -12
  88. data/lib/aia.rb +49 -8
  89. metadata +27 -162
  90. data/.better-commits.json +0 -150
  91. data/.config/tocer/configuration.yml +0 -6
  92. data/.envrc +0 -15
  93. data/.loki +0 -231
  94. data/.quality/flay_baseline.txt +0 -1
  95. data/.quality/flog_baseline.txt +0 -29
  96. data/.quality/reek_baseline.txt +0 -80
  97. data/.rubocop.yml +0 -116
  98. data/COMMITS.md +0 -196
  99. data/IMPLEMENTATION_PLAN.md +0 -506
  100. data/Rakefile +0 -160
  101. data/architecture_review.md +0 -314
  102. data/docs/AGENTS.md +0 -40
  103. data/docs/advanced-prompting.md +0 -814
  104. data/docs/assets/images/aia.png +0 -0
  105. data/docs/cli-reference.md +0 -1241
  106. data/docs/configuration.md +0 -747
  107. data/docs/contributing.md +0 -386
  108. data/docs/directives-reference.md +0 -1145
  109. data/docs/examples/index.md +0 -277
  110. data/docs/examples/mcp/index.md +0 -475
  111. data/docs/examples/prompts/analysis/index.md +0 -78
  112. data/docs/examples/prompts/automation/index.md +0 -109
  113. data/docs/examples/prompts/development/index.md +0 -125
  114. data/docs/examples/prompts/index.md +0 -333
  115. data/docs/examples/prompts/learning/index.md +0 -127
  116. data/docs/examples/prompts/writing/index.md +0 -62
  117. data/docs/examples/tools/index.md +0 -282
  118. data/docs/faq.md +0 -578
  119. data/docs/guides/available-models.md +0 -366
  120. data/docs/guides/basic-usage.md +0 -478
  121. data/docs/guides/chat.md +0 -680
  122. data/docs/guides/crew.md +0 -239
  123. data/docs/guides/executable-prompts.md +0 -331
  124. data/docs/guides/first-prompt.md +0 -454
  125. data/docs/guides/getting-started.md +0 -455
  126. data/docs/guides/image-generation.md +0 -507
  127. data/docs/guides/index.md +0 -48
  128. data/docs/guides/local-models.md +0 -306
  129. data/docs/guides/migrate-prompts.md +0 -335
  130. data/docs/guides/models.md +0 -1017
  131. data/docs/guides/shared-tools.md +0 -254
  132. data/docs/guides/tools.md +0 -831
  133. data/docs/index.md +0 -259
  134. data/docs/installation.md +0 -274
  135. data/docs/mcp-integration.md +0 -603
  136. data/docs/prompt_management.md +0 -665
  137. data/docs/security.md +0 -674
  138. data/docs/special_projects_guide.md +0 -386
  139. data/docs/tools-and-mcp-examples.md +0 -1211
  140. data/docs/workflows-and-pipelines.md +0 -636
  141. data/examples/.gitignore +0 -2
  142. data/examples/00_setup_aia.sh +0 -111
  143. data/examples/01_basic_usage.sh +0 -23
  144. data/examples/02_frontmatter.sh +0 -33
  145. data/examples/03_shell_integration.sh +0 -55
  146. data/examples/04_erb_templating.sh +0 -56
  147. data/examples/05_shell_then_erb.sh +0 -38
  148. data/examples/06_prompt_chaining.sh +0 -59
  149. data/examples/07_pipeline.sh +0 -46
  150. data/examples/08_context_files.sh +0 -43
  151. data/examples/09_roles.sh +0 -67
  152. data/examples/10_stdin_piping.sh +0 -49
  153. data/examples/11_multi_model.sh +0 -65
  154. data/examples/12_token_usage.sh +0 -52
  155. data/examples/13_cost_tracking.sh +0 -68
  156. data/examples/14_output_file.sh +0 -91
  157. data/examples/15_parameters.sh +0 -68
  158. data/examples/16_directives.sh +0 -113
  159. data/examples/17_require_and_conditionals.sh +0 -68
  160. data/examples/18_tools.sh +0 -61
  161. data/examples/19_local_tools.sh +0 -34
  162. data/examples/20_mcp_servers.sh +0 -102
  163. data/examples/21_executable_prompts.sh +0 -78
  164. data/examples/22_chat_mode.sh +0 -217
  165. data/examples/23_verify.sh +0 -139
  166. data/examples/24_decompose.sh +0 -139
  167. data/examples/25_spawn.sh +0 -139
  168. data/examples/26_debate.sh +0 -97
  169. data/examples/27_mention_routing.sh +0 -157
  170. data/examples/28_model_switching.sh +0 -106
  171. data/examples/29_agent_harness.sh +0 -177
  172. data/examples/README.md +0 -321
  173. data/examples/advanced_multi_robot_capabilities_without_examples.md +0 -106
  174. data/examples/aia_config.yml +0 -22
  175. data/examples/aia_config_orchestrator.yml +0 -45
  176. data/examples/aia_config_with_mcp.yml +0 -21
  177. data/examples/common.sh +0 -39
  178. data/examples/context/project_goals.md +0 -6
  179. data/examples/context/tech_stack.md +0 -7
  180. data/examples/directives/timestamp_directive.rb +0 -22
  181. data/examples/mcp/filesystem.json +0 -9
  182. data/examples/prompts_dir/analyze.md +0 -2
  183. data/examples/prompts_dir/brainstorm.md +0 -2
  184. data/examples/prompts_dir/conditional.md +0 -17
  185. data/examples/prompts_dir/creative.md +0 -4
  186. data/examples/prompts_dir/erbinfo.md +0 -5
  187. data/examples/prompts_dir/erbinfo_raw.md +0 -8
  188. data/examples/prompts_dir/evaluate.md +0 -2
  189. data/examples/prompts_dir/explain_joke.md +0 -1
  190. data/examples/prompts_dir/explain_recursion.md +0 -1
  191. data/examples/prompts_dir/fun_fact +0 -3
  192. data/examples/prompts_dir/greeting.md +0 -8
  193. data/examples/prompts_dir/greeting_required.md +0 -7
  194. data/examples/prompts_dir/hello.md +0 -1
  195. data/examples/prompts_dir/includes/ruby_facts.md +0 -4
  196. data/examples/prompts_dir/limerick.md +0 -1
  197. data/examples/prompts_dir/list_with_mcp.md +0 -3
  198. data/examples/prompts_dir/pick_best.md +0 -2
  199. data/examples/prompts_dir/project_summary +0 -12
  200. data/examples/prompts_dir/quiz_with_include.md +0 -6
  201. data/examples/prompts_dir/require_demo.md +0 -5
  202. data/examples/prompts_dir/roles/formal.md +0 -3
  203. data/examples/prompts_dir/roles/orchestrator.md +0 -21
  204. data/examples/prompts_dir/roles/pirate.md +0 -3
  205. data/examples/prompts_dir/shell_then_erb.md +0 -6
  206. data/examples/prompts_dir/sort_compare.md +0 -2
  207. data/examples/prompts_dir/summarize_context.md +0 -2
  208. data/examples/prompts_dir/sysinfo.md +0 -5
  209. data/examples/prompts_dir/sysinfo_raw.md +0 -8
  210. data/examples/prompts_dir/tagline.md +0 -1
  211. data/examples/prompts_dir/tell_joke.md +0 -1
  212. data/examples/prompts_dir/tell_joke_with_next.md +0 -4
  213. data/examples/prompts_dir/use_local_tool.md +0 -8
  214. data/examples/prompts_dir/use_tools.md +0 -8
  215. data/examples/prompts_dir/weather.md +0 -2
  216. data/examples/prompts_dir/whats_new.md +0 -2
  217. data/examples/prompts_dir/with_timestamp.md +0 -5
  218. data/examples/requirements/sinatra_taskflow_app.md +0 -139
  219. data/examples/rules/01_classify_ruby.rb +0 -16
  220. data/examples/rules/02_prefer_claude_for_code.rb +0 -19
  221. data/examples/rules/03_gate_prompt_length.rb +0 -19
  222. data/examples/rules/04_tool_selection.rb +0 -41
  223. data/examples/rules/README.md +0 -30
  224. data/examples/run_all.sh +0 -294
  225. data/examples/tools/word_count_tool.rb +0 -30
  226. data/lib/AGENTS.md +0 -57
  227. data/lib/aia/model_switch_handler.rb +0 -100
  228. data/mcp_servers/README.md +0 -110
  229. data/mcp_servers/apple-mcp.json +0 -8
  230. data/mcp_servers/filesystem.json +0 -9
  231. data/mcp_servers/mcp_server_chart.json +0 -11
  232. data/mcp_servers/playwright_one.json +0 -8
  233. data/mcp_servers/playwright_server_definition.json +0 -9
  234. data/mcp_servers/playwright_two.json +0 -8
  235. data/mcp_servers/tavily_mcp_server.json +0 -8
  236. data/mkdocs.yml +0 -169
data/.loki DELETED
@@ -1,231 +0,0 @@
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
@@ -1 +0,0 @@
1
- 1866838872
@@ -1,29 +0,0 @@
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
@@ -1,80 +0,0 @@
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 DELETED
@@ -1,116 +0,0 @@
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/COMMITS.md DELETED
@@ -1,196 +0,0 @@
1
- ---
2
- url: https://www.conventionalcommits.org/en/v1.0.0/
3
- title: Conventional Commits
4
- description: A specification for adding human and machine readable meaning to commit messages
5
- access_date: 2025-07-31T20:51:29.000Z
6
- current_date: 2025-07-31T20:51:29.601Z
7
- ---
8
-
9
- # Conventional Commits
10
-
11
- A specification for adding human and machine readable meaning to commit messages
12
-
13
- Quick Summary Full Specification Contribute
14
-
15
- # Conventional Commits 1.0.0
16
-
17
- ## Summary
18
-
19
- The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.
20
-
21
- The commit message should be structured as follows:
22
-
23
- ---
24
-
25
- ```
26
- <type>[optional scope]: <description>
27
-
28
- [optional body]
29
-
30
- [optional footer(s)]
31
-
32
- ```
33
-
34
- ---
35
-
36
- The commit contains the following structural elements, to communicate intent to the consumers of your library:
37
-
38
- 1. **fix:** a commit of the _type_ `fix` patches a bug in your codebase (this correlates with `PATCH` in Semantic Versioning).
39
- 2. **feat:** a commit of the _type_ `feat` introduces a new feature to the codebase (this correlates with `MINOR` in Semantic Versioning).
40
- 3. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces a breaking API change (correlating with `MAJOR` in Semantic Versioning). A BREAKING CHANGE can be part of commits of any _type_.
41
- 4. _types_ other than `fix:` and `feat:` are allowed, for example @commitlint/config-conventional (based on the Angular convention) recommends `build:`, `chore:`,`ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others.
42
- 5. _footers_ other than `BREAKING CHANGE: <description>` may be provided and follow a convention similar to git trailer format.
43
-
44
- Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE). A scope may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`.
45
-
46
- ## Examples
47
-
48
- ### Commit message with description and breaking change footer
49
-
50
- ```
51
- feat: allow provided config object to extend other configs
52
-
53
- BREAKING CHANGE: `extends` key in config file is now used for extending other config files
54
-
55
- ```
56
-
57
- ### Commit message with `!` to draw attention to breaking change
58
-
59
- ```
60
- feat!: send an email to the customer when a product is shipped
61
-
62
- ```
63
-
64
- ### Commit message with scope and `!` to draw attention to breaking change
65
-
66
- ```
67
- feat(api)!: send an email to the customer when a product is shipped
68
-
69
- ```
70
-
71
- ### Commit message with both `!` and BREAKING CHANGE footer
72
-
73
- ```
74
- chore!: drop support for Node 6
75
-
76
- BREAKING CHANGE: use JavaScript features not available in Node 6.
77
-
78
- ```
79
-
80
- ### Commit message with no body
81
-
82
- ```
83
- docs: correct spelling of CHANGELOG
84
-
85
- ```
86
-
87
- ### Commit message with scope
88
-
89
- ```
90
- feat(lang): add Polish language
91
-
92
- ```
93
-
94
- ### Commit message with multi-paragraph body and multiple footers
95
-
96
- ```
97
- fix: prevent racing of requests
98
-
99
- Introduce a request id and a reference to latest request. Dismiss
100
- incoming responses other than from latest request.
101
-
102
- Remove timeouts which were used to mitigate the racing issue but are
103
- obsolete now.
104
-
105
- Reviewed-by: Z
106
- Refs: #123
107
-
108
- ```
109
-
110
- ## Specification
111
-
112
- The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
113
-
114
- 1. Commits MUST be prefixed with a type, which consists of a noun, `feat`, `fix`, etc., followed by the OPTIONAL scope, OPTIONAL `!`, and REQUIRED terminal colon and space.
115
- 2. The type `feat` MUST be used when a commit adds a new feature to your application or library.
116
- 3. The type `fix` MUST be used when a commit represents a bug fix for your application.
117
- 4. A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., `fix(parser):`
118
- 5. A description MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., _fix: array parsing issue when multiple spaces were contained in string_.
119
- 6. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.
120
- 7. A commit body is free-form and MAY consist of any number of newline separated paragraphs.
121
- 8. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of a word token, followed by either a `:<space>` or `<space>#` separator, followed by a string value (this is inspired by the git trailer convention).
122
- 9. A footer’s token MUST use `-` in place of whitespace characters, e.g., `Acked-by` (this helps differentiate the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used as a token.
123
- 10. A footer’s value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer token/separator pair is observed.
124
- 11. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the footer.
125
- 12. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g.,_BREAKING CHANGE: environment variables now take precedence over config files_.
126
- 13. If included in the type/scope prefix, breaking changes MUST be indicated by a`!` immediately before the `:`. If `!` is used, `BREAKING CHANGE:` MAY be omitted from the footer section, and the commit description SHALL be used to describe the breaking change.
127
- 14. Types other than `feat` and `fix` MAY be used in your commit messages, e.g., _docs: update ref docs._
128
- 15. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.
129
- 16. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.
130
-
131
- ## Why Use Conventional Commits
132
-
133
- * Automatically generating CHANGELOGs.
134
- * Automatically determining a semantic version bump (based on the types of commits landed).
135
- * Communicating the nature of changes to teammates, the public, and other stakeholders.
136
- * Triggering build and publish processes.
137
- * Making it easier for people to contribute to your projects, by allowing them to explore a more structured commit history.
138
-
139
- ## FAQ
140
-
141
- ### How should I deal with commit messages in the initial development phase?
142
-
143
- We recommend that you proceed as if you’ve already released the product. Typically _somebody_, even if it’s your fellow software developers, is using your software. They’ll want to know what’s fixed, what breaks etc.
144
-
145
- ### Are the types in the commit title uppercase or lowercase?
146
-
147
- Any casing may be used, but it’s best to be consistent.
148
-
149
- ### What do I do if the commit conforms to more than one of the commit types?
150
-
151
- Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.
152
-
153
- ### Doesn’t this discourage rapid development and fast iteration?
154
-
155
- It discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors.
156
-
157
- ### Might Conventional Commits lead developers to limit the type of commits they make because they’ll be thinking in the types provided?
158
-
159
- Conventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time.
160
-
161
- ### How does this relate to SemVer?
162
-
163
- `fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases.
164
-
165
- ### How should I version my extensions to the Conventional Commits Specification, e.g. `@jameswomack/conventional-commit-spec`?
166
-
167
- We recommend using SemVer to release your own extensions to this specification (and encourage you to make these extensions!)
168
-
169
- ### What do I do if I accidentally use the wrong commit type?
170
-
171
- #### When you used a type that’s of the spec but not the correct type, e.g. `fix` instead of `feat`
172
-
173
- Prior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, the cleanup will be different according to what tools and processes you use.
174
-
175
- #### When you used a type _not_ of the spec, e.g. `feet` instead of `feat`
176
-
177
- In a worst case scenario, it’s not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec.
178
-
179
- ### Do all my contributors need to use the Conventional Commits specification?
180
-
181
- No! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they’re merged—adding no workload to casual committers. A common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge.
182
-
183
- ### How does Conventional Commits handle revert commits?
184
-
185
- Reverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch?
186
-
187
- Conventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling authors to use the flexibility of _types_ and _footers_ to develop their logic for handling reverts.
188
-
189
- One recommendation is to use the `revert` type, and a footer that references the commit SHAs that are being reverted:
190
-
191
- ```
192
- revert: let us never again speak of the noodle incident
193
-
194
- Refs: 676104e, a215868
195
-
196
- ```