aidp 0.27.0 → 0.29.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 +4 -4
- data/README.md +89 -0
- data/lib/aidp/cli/models_command.rb +80 -123
- data/lib/aidp/cli/tools_command.rb +333 -0
- data/lib/aidp/cli.rb +18 -9
- data/lib/aidp/config.rb +63 -0
- data/lib/aidp/debug_mixin.rb +23 -1
- data/lib/aidp/execute/agent_signal_parser.rb +22 -0
- data/lib/aidp/execute/repl_macros.rb +2 -2
- data/lib/aidp/execute/steps.rb +94 -1
- data/lib/aidp/execute/work_loop_runner.rb +215 -20
- data/lib/aidp/execute/workflow_selector.rb +2 -25
- data/lib/aidp/firewall/provider_requirements_collector.rb +262 -0
- data/lib/aidp/harness/ai_decision_engine.rb +35 -2
- data/lib/aidp/harness/capability_registry.rb +4 -4
- data/lib/aidp/harness/config_manager.rb +0 -5
- data/lib/aidp/harness/config_schema.rb +8 -0
- data/lib/aidp/harness/configuration.rb +27 -19
- data/lib/aidp/harness/enhanced_runner.rb +1 -4
- data/lib/aidp/harness/error_handler.rb +1 -72
- data/lib/aidp/harness/provider_factory.rb +11 -2
- data/lib/aidp/harness/provider_manager.rb +5 -3
- data/lib/aidp/harness/ruby_llm_registry.rb +239 -0
- data/lib/aidp/harness/state_manager.rb +0 -7
- data/lib/aidp/harness/thinking_depth_manager.rb +47 -68
- data/lib/aidp/harness/ui/enhanced_tui.rb +8 -18
- data/lib/aidp/harness/ui/enhanced_workflow_selector.rb +0 -18
- data/lib/aidp/harness/ui/progress_display.rb +6 -2
- data/lib/aidp/harness/user_interface.rb +0 -58
- data/lib/aidp/init/runner.rb +7 -2
- data/lib/aidp/metadata/cache.rb +201 -0
- data/lib/aidp/metadata/compiler.rb +229 -0
- data/lib/aidp/metadata/parser.rb +204 -0
- data/lib/aidp/metadata/query.rb +237 -0
- data/lib/aidp/metadata/scanner.rb +191 -0
- data/lib/aidp/metadata/tool_metadata.rb +245 -0
- data/lib/aidp/metadata/validator.rb +187 -0
- data/lib/aidp/planning/analyzers/feedback_analyzer.rb +365 -0
- data/lib/aidp/planning/builders/agile_plan_builder.rb +387 -0
- data/lib/aidp/planning/builders/project_plan_builder.rb +193 -0
- data/lib/aidp/planning/generators/gantt_generator.rb +190 -0
- data/lib/aidp/planning/generators/iteration_plan_generator.rb +392 -0
- data/lib/aidp/planning/generators/legacy_research_planner.rb +473 -0
- data/lib/aidp/planning/generators/marketing_report_generator.rb +348 -0
- data/lib/aidp/planning/generators/mvp_scope_generator.rb +310 -0
- data/lib/aidp/planning/generators/user_test_plan_generator.rb +373 -0
- data/lib/aidp/planning/generators/wbs_generator.rb +259 -0
- data/lib/aidp/planning/mappers/persona_mapper.rb +163 -0
- data/lib/aidp/planning/parsers/document_parser.rb +141 -0
- data/lib/aidp/planning/parsers/feedback_data_parser.rb +252 -0
- data/lib/aidp/provider_manager.rb +8 -32
- data/lib/aidp/providers/aider.rb +264 -0
- data/lib/aidp/providers/anthropic.rb +80 -6
- data/lib/aidp/providers/base.rb +129 -35
- data/lib/aidp/providers/codex.rb +27 -4
- data/lib/aidp/providers/cursor.rb +17 -1
- data/lib/aidp/providers/gemini.rb +14 -1
- data/lib/aidp/providers/github_copilot.rb +18 -1
- data/lib/aidp/providers/kilocode.rb +12 -1
- data/lib/aidp/providers/opencode.rb +12 -1
- data/lib/aidp/setup/wizard.rb +284 -146
- data/lib/aidp/version.rb +1 -1
- data/lib/aidp/watch/build_processor.rb +211 -30
- data/lib/aidp/watch/change_request_processor.rb +128 -14
- data/lib/aidp/watch/ci_fix_processor.rb +103 -37
- data/lib/aidp/watch/ci_log_extractor.rb +258 -0
- data/lib/aidp/watch/github_state_extractor.rb +177 -0
- data/lib/aidp/watch/implementation_verifier.rb +284 -0
- data/lib/aidp/watch/plan_generator.rb +7 -43
- data/lib/aidp/watch/plan_processor.rb +7 -6
- data/lib/aidp/watch/repository_client.rb +245 -17
- data/lib/aidp/watch/review_processor.rb +98 -17
- data/lib/aidp/watch/reviewers/base_reviewer.rb +1 -1
- data/lib/aidp/watch/runner.rb +181 -29
- data/lib/aidp/watch/state_store.rb +22 -1
- data/lib/aidp/workflows/definitions.rb +147 -0
- data/lib/aidp/workstream_cleanup.rb +245 -0
- data/lib/aidp/worktree.rb +19 -0
- data/lib/aidp.rb +11 -0
- data/templates/aidp.yml.example +57 -0
- data/templates/implementation/generate_tdd_specs.md +213 -0
- data/templates/implementation/implement_features.md +4 -1
- data/templates/implementation/iterative_implementation.md +122 -0
- data/templates/planning/agile/analyze_feedback.md +183 -0
- data/templates/planning/agile/generate_iteration_plan.md +179 -0
- data/templates/planning/agile/generate_legacy_research_plan.md +171 -0
- data/templates/planning/agile/generate_marketing_report.md +162 -0
- data/templates/planning/agile/generate_mvp_scope.md +127 -0
- data/templates/planning/agile/generate_user_test_plan.md +143 -0
- data/templates/planning/agile/ingest_feedback.md +174 -0
- data/templates/planning/assemble_project_plan.md +113 -0
- data/templates/planning/assign_personas.md +108 -0
- data/templates/planning/create_tasks.md +52 -6
- data/templates/planning/generate_gantt.md +86 -0
- data/templates/planning/generate_wbs.md +85 -0
- data/templates/planning/initialize_planning_mode.md +70 -0
- data/templates/skills/README.md +2 -2
- data/templates/skills/marketing_strategist/SKILL.md +279 -0
- data/templates/skills/product_manager/SKILL.md +177 -0
- data/templates/skills/ruby_aidp_planning/SKILL.md +497 -0
- data/templates/skills/ruby_rspec_tdd/SKILL.md +514 -0
- data/templates/skills/ux_researcher/SKILL.md +222 -0
- metadata +62 -2
- data/lib/aidp/harness/model_discovery_service.rb +0 -259
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 00cbc8656c3ce1550f5246837062879c70a0206fa62c00a7bef6cd20979b9be5
|
|
4
|
+
data.tar.gz: 353616de5a90d4cf722673040d6e7fba09d60ff63618a3c135688202694e3075
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 65109acb0af57d4fefccbefa626f928cec5faaa3eedb5dfe4c0141521e03d95c8f7ca2dac8455baebdf6c14d0cbcd6cd81557a0bf4b2f0cdadb62547f60b414d
|
|
7
|
+
data.tar.gz: ea289ac3406776ccc1c602795fe6fa0a54c09fe8b3729b7e0f3b0151ba2782613cc2fee68b1111f9f6b81c78efeb7d31e77ab233ea49fba48e6d5585505e60f8
|
data/README.md
CHANGED
|
@@ -135,6 +135,95 @@ AIDP implements **work loops** - an iterative execution pattern where AI agents
|
|
|
135
135
|
|
|
136
136
|
See [Work Loops Guide](docs/WORK_LOOPS_GUIDE.md) for details.
|
|
137
137
|
|
|
138
|
+
### Waterfall Planning Mode
|
|
139
|
+
|
|
140
|
+
Create comprehensive project plans with work breakdown structures, Gantt charts, and automated task assignments:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Start planning workflow
|
|
144
|
+
aidp execute
|
|
145
|
+
# Select "Waterfall Planning"
|
|
146
|
+
|
|
147
|
+
# Choose your path:
|
|
148
|
+
# - Ingest existing documentation (PRDs, design docs)
|
|
149
|
+
# - Generate from scratch through AI dialogue
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Generated Artifacts** (in `.aidp/docs/`):
|
|
153
|
+
|
|
154
|
+
- **PRD.md** - Product requirements document
|
|
155
|
+
- **TECH_DESIGN.md** - Technical architecture and design
|
|
156
|
+
- **WBS.md** - Work breakdown structure with phases and tasks
|
|
157
|
+
- **GANTT.md** - Mermaid Gantt chart with critical path analysis
|
|
158
|
+
- **persona_map.yml** - AI-powered task-to-persona assignments
|
|
159
|
+
- **PROJECT_PLAN.md** - Complete integrated project plan
|
|
160
|
+
|
|
161
|
+
**Key Features:**
|
|
162
|
+
|
|
163
|
+
- **Documentation Ingestion** - Import and enhance existing project docs
|
|
164
|
+
- **AI-Guided Planning** - Generate complete plans through dialogue
|
|
165
|
+
- **Critical Path Analysis** - Identify project bottlenecks
|
|
166
|
+
- **Zero Framework Cognition** - AI-powered persona assignment (no heuristics)
|
|
167
|
+
- **Mermaid Visualizations** - Gantt charts renderable on GitHub/GitLab
|
|
168
|
+
- **TDD Integration** - Optional test-driven development workflow
|
|
169
|
+
|
|
170
|
+
See [Waterfall Planning Mode Guide](docs/WATERFALL_PLANNING_MODE.md) for complete documentation.
|
|
171
|
+
|
|
172
|
+
### Agile Development Mode
|
|
173
|
+
|
|
174
|
+
Build products iteratively with user feedback loops, MVP scoping, and data-driven iteration planning:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# Start planning workflow
|
|
178
|
+
aidp execute
|
|
179
|
+
# Select "Agile MVP Planning", "Agile Iteration Planning", or "Legacy Product Research"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Three Agile Workflows:**
|
|
183
|
+
|
|
184
|
+
#### 1. MVP Planning
|
|
185
|
+
|
|
186
|
+
Define minimum viable product scope, create user testing plans, and generate marketing materials:
|
|
187
|
+
|
|
188
|
+
- **Input**: Product Requirements Document (PRD)
|
|
189
|
+
- **Outputs**: MVP scope, user testing plan, marketing report
|
|
190
|
+
- **Use case**: Launching a new product with user validation
|
|
191
|
+
|
|
192
|
+
#### 2. Iteration Planning
|
|
193
|
+
|
|
194
|
+
Analyze user feedback and plan next development iteration:
|
|
195
|
+
|
|
196
|
+
- **Input**: User feedback data (CSV/JSON/markdown)
|
|
197
|
+
- **Outputs**: Feedback analysis, iteration plan with prioritized tasks
|
|
198
|
+
- **Use case**: Improving product based on real user data
|
|
199
|
+
|
|
200
|
+
#### 3. Legacy Research
|
|
201
|
+
|
|
202
|
+
Analyze existing codebase and create user research plan:
|
|
203
|
+
|
|
204
|
+
- **Input**: Codebase path and language
|
|
205
|
+
- **Outputs**: Research plan, feature audit, testing strategy
|
|
206
|
+
- **Use case**: Understanding user needs for existing product
|
|
207
|
+
|
|
208
|
+
**Generated Artifacts** (in `.aidp/docs/`):
|
|
209
|
+
|
|
210
|
+
- **MVP_SCOPE.md** - Must-have vs nice-to-have feature breakdown
|
|
211
|
+
- **USER_TEST_PLAN.md** - Comprehensive user testing strategy
|
|
212
|
+
- **MARKETING_REPORT.md** - Value propositions and messaging
|
|
213
|
+
- **USER_FEEDBACK_ANALYSIS.md** - AI-powered semantic feedback analysis
|
|
214
|
+
- **NEXT_ITERATION_PLAN.md** - Prioritized tasks for next iteration
|
|
215
|
+
- **LEGACY_USER_RESEARCH_PLAN.md** - Research strategy for existing product
|
|
216
|
+
|
|
217
|
+
**Key Features:**
|
|
218
|
+
|
|
219
|
+
- **Zero Framework Cognition** - AI-powered semantic analysis (no heuristics)
|
|
220
|
+
- **Multi-Format Support** - Ingest feedback from CSV, JSON, or markdown
|
|
221
|
+
- **Iterative Loops** - Continuous improvement based on user data
|
|
222
|
+
- **Marketing Focus** - Translate features into customer value
|
|
223
|
+
- **Three New Personas** - Product Manager, UX Researcher, Marketing Strategist
|
|
224
|
+
|
|
225
|
+
See [Agile Development Mode Guide](docs/AGILE_MODE_GUIDE.md) for complete documentation.
|
|
226
|
+
|
|
138
227
|
### Job Management
|
|
139
228
|
|
|
140
229
|
Monitor and control background jobs:
|
|
@@ -4,28 +4,28 @@ require "tty-table"
|
|
|
4
4
|
require "tty-prompt"
|
|
5
5
|
require "tty-spinner"
|
|
6
6
|
require_relative "../harness/model_registry"
|
|
7
|
-
require_relative "../harness/
|
|
7
|
+
require_relative "../harness/ruby_llm_registry"
|
|
8
8
|
|
|
9
9
|
module Aidp
|
|
10
10
|
class CLI
|
|
11
11
|
# Command handler for `aidp models` subcommand group
|
|
12
12
|
#
|
|
13
|
-
# Provides commands for viewing
|
|
13
|
+
# Provides commands for viewing AI models from the RubyLLM registry:
|
|
14
14
|
# - list: Show all available models with tier information
|
|
15
|
-
# - discover: Discover models from
|
|
16
|
-
# -
|
|
15
|
+
# - discover: Discover models from RubyLLM registry for a provider
|
|
16
|
+
# - validate: Validate model configuration
|
|
17
17
|
#
|
|
18
18
|
# Usage:
|
|
19
19
|
# aidp models list [--provider=<name>] [--tier=<tier>]
|
|
20
20
|
# aidp models discover [--provider=<name>]
|
|
21
|
-
# aidp models
|
|
21
|
+
# aidp models validate
|
|
22
22
|
class ModelsCommand
|
|
23
23
|
include Aidp::MessageDisplay
|
|
24
24
|
|
|
25
|
-
def initialize(prompt: TTY::Prompt.new, registry: nil,
|
|
25
|
+
def initialize(prompt: TTY::Prompt.new, registry: nil, ruby_llm_registry: nil)
|
|
26
26
|
@prompt = prompt
|
|
27
27
|
@registry = registry
|
|
28
|
-
@
|
|
28
|
+
@ruby_llm_registry = ruby_llm_registry
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Main entry point for models subcommand
|
|
@@ -39,9 +39,6 @@ module Aidp
|
|
|
39
39
|
when "discover"
|
|
40
40
|
args.shift
|
|
41
41
|
run_discover_command(args)
|
|
42
|
-
when "refresh"
|
|
43
|
-
args.shift
|
|
44
|
-
run_refresh_command(args)
|
|
45
42
|
when "validate"
|
|
46
43
|
args.shift
|
|
47
44
|
run_validate_command(args)
|
|
@@ -58,16 +55,15 @@ module Aidp
|
|
|
58
55
|
@registry ||= Aidp::Harness::ModelRegistry.new
|
|
59
56
|
end
|
|
60
57
|
|
|
61
|
-
def
|
|
62
|
-
@
|
|
58
|
+
def ruby_llm_registry
|
|
59
|
+
@ruby_llm_registry ||= Aidp::Harness::RubyLLMRegistry.new
|
|
63
60
|
end
|
|
64
61
|
|
|
65
62
|
def display_help
|
|
66
63
|
display_message("\nUsage: aidp models <subcommand> [options]", type: :info)
|
|
67
64
|
display_message("\nSubcommands:", type: :info)
|
|
68
65
|
display_message(" list List all available models with tier information", type: :info)
|
|
69
|
-
display_message(" discover Discover models from
|
|
70
|
-
display_message(" refresh Refresh the model discovery cache", type: :info)
|
|
66
|
+
display_message(" discover Discover models from RubyLLM registry for a provider", type: :info)
|
|
71
67
|
display_message(" validate Validate model configuration for all tiers", type: :info)
|
|
72
68
|
display_message("\nOptions:", type: :info)
|
|
73
69
|
display_message(" --provider=<name> Filter/target specific provider", type: :info)
|
|
@@ -76,9 +72,7 @@ module Aidp
|
|
|
76
72
|
display_message(" aidp models list", type: :info)
|
|
77
73
|
display_message(" aidp models list --tier=mini", type: :info)
|
|
78
74
|
display_message(" aidp models list --provider=anthropic", type: :info)
|
|
79
|
-
display_message(" aidp models discover", type: :info)
|
|
80
75
|
display_message(" aidp models discover --provider=anthropic", type: :info)
|
|
81
|
-
display_message(" aidp models refresh", type: :info)
|
|
82
76
|
display_message(" aidp models validate", type: :info)
|
|
83
77
|
end
|
|
84
78
|
|
|
@@ -86,42 +80,35 @@ module Aidp
|
|
|
86
80
|
options = parse_list_options(args)
|
|
87
81
|
|
|
88
82
|
begin
|
|
89
|
-
# Get
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
info && info["tier"] == options[:tier]
|
|
97
|
-
}
|
|
83
|
+
# Get models from RubyLLM registry
|
|
84
|
+
all_model_ids = if options[:provider]
|
|
85
|
+
ruby_llm_registry.models_for_provider(options[:provider])
|
|
86
|
+
else
|
|
87
|
+
# Get all models by iterating known providers
|
|
88
|
+
known_providers = %w[anthropic openai google azure bedrock openrouter]
|
|
89
|
+
known_providers.flat_map { |p| ruby_llm_registry.models_for_provider(p) }.uniq
|
|
98
90
|
end
|
|
99
91
|
|
|
100
92
|
# Build table rows
|
|
101
93
|
rows = []
|
|
102
|
-
|
|
103
|
-
info =
|
|
94
|
+
all_model_ids.each do |model_id|
|
|
95
|
+
info = ruby_llm_registry.get_model_info(model_id)
|
|
104
96
|
next unless info
|
|
105
97
|
|
|
106
|
-
#
|
|
107
|
-
|
|
98
|
+
# Map advanced -> pro for display consistency
|
|
99
|
+
display_tier = (info[:tier] == "advanced") ? "pro" : info[:tier]
|
|
108
100
|
|
|
109
|
-
# Apply
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
if providers.empty?
|
|
114
|
-
# No provider support - show as registry-only
|
|
115
|
-
rows << build_table_row(nil, family, info, "registry")
|
|
116
|
-
else
|
|
117
|
-
providers.each do |provider_name|
|
|
118
|
-
rows << build_table_row(provider_name, family, info, "registry")
|
|
119
|
-
end
|
|
101
|
+
# Apply tier filter if specified (handle pro/advanced mapping)
|
|
102
|
+
if options[:tier]
|
|
103
|
+
filter_tier = (options[:tier] == "pro") ? "advanced" : options[:tier]
|
|
104
|
+
next unless info[:tier] == filter_tier
|
|
120
105
|
end
|
|
106
|
+
|
|
107
|
+
rows << build_table_row(info[:provider], model_id, info, display_tier)
|
|
121
108
|
end
|
|
122
109
|
|
|
123
110
|
# Sort rows by tier, then provider, then model name
|
|
124
|
-
tier_order = {"mini" => 0, "standard" => 1, "advanced" => 2}
|
|
111
|
+
tier_order = {"mini" => 0, "standard" => 1, "pro" => 2, "advanced" => 2}
|
|
125
112
|
rows.sort_by! { |r| [tier_order[r[2]] || 3, r[0] || "", r[1]] }
|
|
126
113
|
|
|
127
114
|
# Display table
|
|
@@ -156,6 +143,7 @@ module Aidp
|
|
|
156
143
|
|
|
157
144
|
def parse_list_options(args)
|
|
158
145
|
options = {}
|
|
146
|
+
valid_tiers = %w[mini standard pro advanced]
|
|
159
147
|
|
|
160
148
|
args.each do |arg|
|
|
161
149
|
case arg
|
|
@@ -163,8 +151,8 @@ module Aidp
|
|
|
163
151
|
options[:provider] = Regexp.last_match(1)
|
|
164
152
|
when /^--tier=(.+)$/
|
|
165
153
|
tier = Regexp.last_match(1)
|
|
166
|
-
unless
|
|
167
|
-
display_message("Invalid tier: #{tier}. Valid tiers: #{
|
|
154
|
+
unless valid_tiers.include?(tier)
|
|
155
|
+
display_message("Invalid tier: #{tier}. Valid tiers: #{valid_tiers.join(", ")}", type: :error)
|
|
168
156
|
exit 1
|
|
169
157
|
end
|
|
170
158
|
options[:tier] = tier
|
|
@@ -177,18 +165,17 @@ module Aidp
|
|
|
177
165
|
options
|
|
178
166
|
end
|
|
179
167
|
|
|
180
|
-
def build_table_row(provider_name,
|
|
181
|
-
capabilities = (info[
|
|
182
|
-
context = format_context_window(info[
|
|
183
|
-
speed = info["speed"] || "unknown"
|
|
168
|
+
def build_table_row(provider_name, model_id, info, display_tier)
|
|
169
|
+
capabilities = (info[:capabilities] || []).join(",")
|
|
170
|
+
context = format_context_window(info[:context_window])
|
|
184
171
|
|
|
185
172
|
[
|
|
186
173
|
provider_name || "-",
|
|
187
|
-
|
|
188
|
-
|
|
174
|
+
model_id,
|
|
175
|
+
display_tier || "unknown",
|
|
189
176
|
capabilities.empty? ? "-" : capabilities,
|
|
190
177
|
context,
|
|
191
|
-
|
|
178
|
+
"-" # Speed not available in registry
|
|
192
179
|
]
|
|
193
180
|
end
|
|
194
181
|
|
|
@@ -213,8 +200,8 @@ module Aidp
|
|
|
213
200
|
|
|
214
201
|
def build_footer(count)
|
|
215
202
|
tips = [
|
|
216
|
-
"💡 Showing #{count} model#{"s" unless count == 1} from
|
|
217
|
-
"💡
|
|
203
|
+
"💡 Showing #{count} model#{"s" unless count == 1} from RubyLLM registry",
|
|
204
|
+
"💡 Registry updated regularly via ruby_llm gem updates"
|
|
218
205
|
]
|
|
219
206
|
tips.join("\n")
|
|
220
207
|
end
|
|
@@ -249,81 +236,56 @@ module Aidp
|
|
|
249
236
|
def run_discover_command(args)
|
|
250
237
|
options = parse_discover_options(args)
|
|
251
238
|
|
|
252
|
-
|
|
253
|
-
display_message("\n
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
# Discover models
|
|
259
|
-
results = if options[:provider]
|
|
260
|
-
{options[:provider] => discovery_service.discover_models(options[:provider], use_cache: false)}
|
|
261
|
-
else
|
|
262
|
-
discovery_service.discover_all_models(use_cache: false)
|
|
263
|
-
end
|
|
239
|
+
unless options[:provider]
|
|
240
|
+
display_message("\n⚠️ Please specify a provider with --provider=<name>", type: :warning)
|
|
241
|
+
display_message("Example: aidp models discover --provider=anthropic\n", type: :info)
|
|
242
|
+
return 1
|
|
243
|
+
end
|
|
264
244
|
|
|
265
|
-
|
|
245
|
+
begin
|
|
246
|
+
display_message("\n🔍 Discovering models for #{options[:provider]} from RubyLLM registry...\n", type: :highlight)
|
|
266
247
|
|
|
267
|
-
#
|
|
268
|
-
|
|
269
|
-
results.each do |provider, models|
|
|
270
|
-
next if models.empty?
|
|
271
|
-
|
|
272
|
-
total_models += models.size
|
|
273
|
-
display_message("\n✓ Found #{models.size} models for #{provider}:", type: :success)
|
|
274
|
-
|
|
275
|
-
# Group by tier
|
|
276
|
-
by_tier = models.group_by { |m| m[:tier] }
|
|
277
|
-
%w[mini standard advanced].each do |tier|
|
|
278
|
-
tier_models = by_tier[tier] || []
|
|
279
|
-
next if tier_models.empty?
|
|
280
|
-
|
|
281
|
-
display_message(" #{tier.capitalize} tier:", type: :info)
|
|
282
|
-
tier_models.each do |model|
|
|
283
|
-
display_message(" - #{model[:name]}", type: :info)
|
|
284
|
-
end
|
|
285
|
-
end
|
|
286
|
-
end
|
|
248
|
+
# Get models from registry
|
|
249
|
+
model_ids = ruby_llm_registry.models_for_provider(options[:provider])
|
|
287
250
|
|
|
288
|
-
if
|
|
289
|
-
display_message("\n⚠️ No models
|
|
251
|
+
if model_ids.empty?
|
|
252
|
+
display_message("\n⚠️ No models found for provider '#{options[:provider]}'.", type: :warning)
|
|
253
|
+
display_message("Provider may not be supported or name may be incorrect.\n", type: :info)
|
|
290
254
|
return 1
|
|
291
255
|
end
|
|
292
256
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
Aidp.log_error("models_command", "discovery error", error: e.message, backtrace: e.backtrace.first(5))
|
|
299
|
-
1
|
|
300
|
-
end
|
|
301
|
-
end
|
|
257
|
+
# Group by tier
|
|
258
|
+
models_by_tier = Hash.new { |h, k| h[k] = [] }
|
|
259
|
+
model_ids.each do |model_id|
|
|
260
|
+
info = ruby_llm_registry.get_model_info(model_id)
|
|
261
|
+
next unless info
|
|
302
262
|
|
|
303
|
-
|
|
304
|
-
|
|
263
|
+
# Map advanced -> pro for display
|
|
264
|
+
tier = (info[:tier] == "advanced") ? "pro" : info[:tier]
|
|
265
|
+
models_by_tier[tier] << model_id
|
|
266
|
+
end
|
|
305
267
|
|
|
306
|
-
|
|
307
|
-
display_message("\n
|
|
268
|
+
# Display results
|
|
269
|
+
display_message("\n✓ Found #{model_ids.size} models for #{options[:provider]}:", type: :success)
|
|
308
270
|
|
|
309
|
-
|
|
310
|
-
|
|
271
|
+
%w[mini standard pro].each do |tier|
|
|
272
|
+
tier_models = models_by_tier[tier]
|
|
273
|
+
next if tier_models.empty?
|
|
311
274
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
display_message("\n✅ Refreshed cache for all providers", type: :success)
|
|
275
|
+
display_message("\n #{tier.capitalize} tier (#{tier_models.size} model#{"s" unless tier_models.size == 1}):", type: :info)
|
|
276
|
+
tier_models.first(5).each do |model|
|
|
277
|
+
display_message(" - #{model}", type: :info)
|
|
278
|
+
end
|
|
279
|
+
if tier_models.size > 5
|
|
280
|
+
display_message(" ... and #{tier_models.size - 5} more", type: :info)
|
|
281
|
+
end
|
|
320
282
|
end
|
|
321
283
|
|
|
322
|
-
display_message("💡
|
|
284
|
+
display_message("\n💡 Use 'aidp models list --provider=#{options[:provider]}' to see full details\n", type: :info)
|
|
323
285
|
0
|
|
324
286
|
rescue => e
|
|
325
|
-
display_message("Error
|
|
326
|
-
Aidp.log_error("models_command", "
|
|
287
|
+
display_message("Error discovering models: #{e.message}", type: :error)
|
|
288
|
+
Aidp.log_error("models_command", "discovery error", error: e.message, backtrace: e.backtrace.first(5))
|
|
327
289
|
1
|
|
328
290
|
end
|
|
329
291
|
end
|
|
@@ -344,10 +306,6 @@ module Aidp
|
|
|
344
306
|
options
|
|
345
307
|
end
|
|
346
308
|
|
|
347
|
-
def parse_refresh_options(args)
|
|
348
|
-
parse_discover_options(args)
|
|
349
|
-
end
|
|
350
|
-
|
|
351
309
|
def run_validate_command(args)
|
|
352
310
|
parse_validate_options(args)
|
|
353
311
|
|
|
@@ -437,8 +395,8 @@ module Aidp
|
|
|
437
395
|
|
|
438
396
|
configured_providers.any? do |provider_name|
|
|
439
397
|
provider_cfg = config.provider_config(provider_name)
|
|
440
|
-
tier_config = provider_cfg.dig(:
|
|
441
|
-
provider_cfg.dig(:
|
|
398
|
+
tier_config = provider_cfg.dig(:thinking_tiers, tier.to_sym) ||
|
|
399
|
+
provider_cfg.dig(:thinking_tiers, tier)
|
|
442
400
|
|
|
443
401
|
tier_config && tier_config[:models] && !tier_config[:models].empty?
|
|
444
402
|
end
|
|
@@ -455,8 +413,7 @@ module Aidp
|
|
|
455
413
|
next unless provider_class
|
|
456
414
|
|
|
457
415
|
provider_cfg = config.provider_config(provider_name)
|
|
458
|
-
|
|
459
|
-
tiers_cfg = thinking_cfg[:tiers] || {}
|
|
416
|
+
tiers_cfg = provider_cfg[:thinking_tiers] || {}
|
|
460
417
|
|
|
461
418
|
# Validate models in each tier
|
|
462
419
|
tiers_cfg.each do |tier, tier_config|
|
|
@@ -537,8 +494,8 @@ module Aidp
|
|
|
537
494
|
end
|
|
538
495
|
|
|
539
496
|
if suggested_model
|
|
540
|
-
"Add to aidp.yml under providers.#{suggested_model[:provider]}.
|
|
541
|
-
" -
|
|
497
|
+
"Add to aidp.yml under providers.#{suggested_model[:provider]}.thinking_tiers.#{tier}.models:\n" \
|
|
498
|
+
" - #{suggested_model[:family]}"
|
|
542
499
|
else
|
|
543
500
|
"Configure a model for this tier in aidp.yml"
|
|
544
501
|
end
|