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.
- checksums.yaml +4 -4
- data/.envrc +5 -1
- data/.loki +231 -0
- data/.quality/flay_baseline.txt +1 -0
- data/.quality/flog_baseline.txt +29 -0
- data/.quality/reek_baseline.txt +80 -0
- data/.rubocop.yml +116 -0
- data/.version +1 -1
- data/CHANGELOG.md +259 -50
- data/IMPLEMENTATION_PLAN.md +506 -0
- data/README.md +266 -238
- data/Rakefile +118 -5
- data/architecture_review.md +314 -0
- data/bin/aia +16 -0
- data/docs/AGENTS.md +40 -0
- data/docs/advanced-prompting.md +67 -3
- data/docs/cli-reference.md +312 -56
- data/docs/configuration.md +130 -19
- data/docs/contributing.md +56 -2
- data/docs/directives-reference.md +593 -78
- data/docs/faq.md +85 -3
- data/docs/guides/available-models.md +1 -1
- data/docs/guides/basic-usage.md +6 -6
- data/docs/guides/chat.md +40 -16
- data/docs/guides/crew.md +239 -0
- data/docs/guides/executable-prompts.md +1 -1
- data/docs/guides/index.md +1 -0
- data/docs/guides/models.md +15 -0
- data/docs/index.md +29 -2
- data/docs/installation.md +44 -17
- data/docs/mcp-integration.md +40 -0
- data/docs/prompt_management.md +85 -86
- data/docs/security.md +47 -0
- data/docs/special_projects_guide.md +386 -0
- data/docs/tools-and-mcp-examples.md +23 -0
- data/docs/workflows-and-pipelines.md +84 -7
- data/examples/.gitignore +1 -0
- data/examples/00_setup_aia.sh +27 -44
- data/examples/11_multi_model.sh +4 -14
- data/examples/12_token_usage.sh +3 -12
- data/examples/18_tools.sh +10 -2
- data/examples/22_chat_mode.sh +0 -10
- data/examples/23_verify.sh +139 -0
- data/examples/24_decompose.sh +139 -0
- data/examples/25_spawn.sh +139 -0
- data/examples/26_debate.sh +97 -0
- data/examples/27_mention_routing.sh +157 -0
- data/examples/28_model_switching.sh +106 -0
- data/examples/29_agent_harness.sh +177 -0
- data/examples/README.md +65 -0
- data/examples/advanced_multi_robot_capabilities_without_examples.md +106 -0
- data/examples/aia_config.yml +1 -1
- data/examples/aia_config_orchestrator.yml +45 -0
- data/examples/common.sh +18 -6
- data/examples/context/tech_stack.md +2 -2
- data/examples/prompts_dir/roles/orchestrator.md +21 -0
- data/examples/requirements/sinatra_taskflow_app.md +139 -0
- data/examples/rules/01_classify_ruby.rb +16 -0
- data/examples/rules/02_prefer_claude_for_code.rb +19 -0
- data/examples/rules/03_gate_prompt_length.rb +19 -0
- data/examples/rules/04_tool_selection.rb +41 -0
- data/examples/rules/README.md +30 -0
- data/examples/run_all.sh +48 -15
- data/examples/tools/word_count_tool.rb +1 -1
- data/lib/AGENTS.md +57 -0
- data/lib/aia/chat_loop.rb +304 -164
- data/lib/aia/config/cli_parser.rb +174 -111
- data/lib/aia/config/defaults.yml +62 -33
- data/lib/aia/config/mcp_parser.rb +39 -46
- data/lib/aia/config/model_spec.rb +34 -2
- data/lib/aia/config/validator.rb +108 -142
- data/lib/aia/config.rb +110 -145
- data/lib/aia/content_extractor.rb +153 -0
- data/lib/aia/cost_calculator.rb +38 -0
- data/lib/aia/crew.rb +164 -0
- data/lib/aia/debate_handler.rb +166 -0
- data/lib/aia/delegate_handler.rb +112 -0
- data/lib/aia/directive.rb +33 -18
- data/lib/aia/directive_processor.rb +16 -7
- data/lib/aia/directives/configuration_directives.rb +160 -20
- data/lib/aia/directives/context_directives.rb +38 -26
- data/lib/aia/directives/execution_directives.rb +136 -4
- data/lib/aia/directives/model_directives.rb +76 -34
- data/lib/aia/directives/trakflow_directives.rb +44 -0
- data/lib/aia/directives/utility_directives.rb +203 -6
- data/lib/aia/directives/web_and_file_directives.rb +96 -60
- data/lib/aia/errors.rb +15 -0
- data/lib/aia/fact_asserter.rb +27 -0
- data/lib/aia/fzf.rb +9 -31
- data/lib/aia/handler_context.rb +17 -0
- data/lib/aia/handler_protocol.rb +19 -0
- data/lib/aia/history_transfer.rb +55 -0
- data/lib/aia/input_collector.rb +3 -3
- data/lib/aia/layered_orchestrator.rb +448 -0
- data/lib/aia/logger.rb +24 -4
- data/lib/aia/mcp_config_normalizer.rb +35 -0
- data/lib/aia/mcp_connection_manager.rb +305 -0
- data/lib/aia/mcp_discovery.rb +44 -0
- data/lib/aia/mcp_grouper.rb +33 -0
- data/lib/aia/mcp_utility.rb +57 -0
- data/lib/aia/mention_router.rb +260 -0
- data/lib/aia/model_alias_registry.rb +97 -0
- data/lib/aia/model_switch_handler.rb +100 -0
- data/lib/aia/network_builder.rb +155 -0
- data/lib/aia/network_memory_manager.rb +55 -0
- data/lib/aia/patches/ruby_llm_streaming_error.rb +43 -0
- data/lib/aia/patches/ruby_llm_tool_error.rb +96 -0
- data/lib/aia/pipeline_orchestrator.rb +262 -0
- data/lib/aia/plugin_loader.rb +170 -0
- data/lib/aia/plugin_monitor.rb +208 -0
- data/lib/aia/prompt_decomposer.rb +157 -0
- data/lib/aia/prompt_handler.rb +19 -39
- data/lib/aia/robot_builder.rb +51 -0
- data/lib/aia/robot_factory.rb +334 -0
- data/lib/aia/robot_namer.rb +116 -0
- data/lib/aia/session.rb +83 -17
- data/lib/aia/session_tracker.rb +209 -0
- data/lib/aia/similarity_scorer.rb +39 -0
- data/lib/aia/skill_utils.rb +105 -1
- data/lib/aia/spawn_handler.rb +129 -0
- data/lib/aia/spawn_spec_parser.rb +65 -0
- data/lib/aia/special_mode_handler.rb +302 -0
- data/lib/aia/startup_coordinator.rb +150 -0
- data/lib/aia/streaming_runner.rb +169 -0
- data/lib/aia/system_prompt_assembler.rb +88 -0
- data/lib/aia/task_coordinator.rb +202 -0
- data/lib/aia/task_decomposer.rb +57 -0
- data/lib/aia/task_executor.rb +51 -0
- data/lib/aia/tfidf_math.rb +27 -0
- data/lib/aia/tool_filter/tfidf.rb +116 -0
- data/lib/aia/tool_filter/wordnet_expander.rb +127 -0
- data/lib/aia/tool_filter.rb +82 -0
- data/lib/aia/tool_filter_registry.rb +30 -0
- data/lib/aia/tool_filter_strategy.rb +143 -0
- data/lib/aia/tool_loader.rb +210 -0
- data/lib/aia/tool_utility.rb +30 -0
- data/lib/aia/tools/delegate_to_foreman_tool.rb +70 -0
- data/lib/aia/tools/recruit_robot_tool.rb +60 -0
- data/lib/aia/tools/reskill_robot_tool.rb +44 -0
- data/lib/aia/tools/task_board_tool.rb +114 -0
- data/lib/aia/trakflow_bridge.rb +173 -0
- data/lib/aia/turn_state.rb +94 -0
- data/lib/aia/ui_presenter.rb +166 -198
- data/lib/aia/utility.rb +134 -87
- data/lib/aia/{history_manager.rb → variable_input_collector.rb} +8 -9
- data/lib/aia/verification_network.rb +58 -0
- data/lib/aia.rb +108 -63
- data/mkdocs.yml +1 -0
- metadata +179 -56
- data/justfile +0 -215
- data/lib/aia/adapter/chat_execution.rb +0 -242
- data/lib/aia/adapter/error_handler.rb +0 -68
- data/lib/aia/adapter/gem_activator.rb +0 -57
- data/lib/aia/adapter/mcp_connector.rb +0 -274
- data/lib/aia/adapter/modality_handlers.rb +0 -167
- data/lib/aia/adapter/model_registry.rb +0 -81
- data/lib/aia/adapter/multi_model_chat.rb +0 -218
- data/lib/aia/adapter/provider_configurator.rb +0 -59
- data/lib/aia/adapter/tool_filter.rb +0 -85
- data/lib/aia/adapter/tool_loader.rb +0 -90
- data/lib/aia/chat_processor_service.rb +0 -178
- data/lib/aia/prompt_pipeline.rb +0 -183
- data/lib/aia/ruby_llm_adapter.rb +0 -95
- data/lib/extensions/openstruct_merge.rb +0 -48
- data/lib/extensions/ruby_llm/.irbrc +0 -56
- data/lib/extensions/ruby_llm/modalities.rb +0 -36
- data/lib/extensions/ruby_llm/provider_fix.rb +0 -79
- data/lib/refinements/string.rb +0 -16
- data/main.just +0 -76
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fa3398e1c7d65c30234833e49a9319b6e49b9febcd97d13c3ba3aa4da7043c80
|
|
4
|
+
data.tar.gz: dbfad1a98f1c48452bfd7006b61c1d1384a108bdd0a6e81fc0308e4d21f3a917
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
+
2.0.0.0-alpha
|