aidp 0.7.0 → 0.8.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 (119) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -214
  3. data/bin/aidp +1 -1
  4. data/lib/aidp/analysis/kb_inspector.rb +38 -23
  5. data/lib/aidp/analysis/seams.rb +2 -31
  6. data/lib/aidp/analysis/tree_sitter_grammar_loader.rb +0 -13
  7. data/lib/aidp/analysis/tree_sitter_scan.rb +3 -20
  8. data/lib/aidp/analyze/error_handler.rb +2 -75
  9. data/lib/aidp/analyze/json_file_storage.rb +292 -0
  10. data/lib/aidp/analyze/progress.rb +12 -0
  11. data/lib/aidp/analyze/progress_visualizer.rb +12 -17
  12. data/lib/aidp/analyze/ruby_maat_integration.rb +13 -31
  13. data/lib/aidp/analyze/runner.rb +256 -87
  14. data/lib/aidp/cli/jobs_command.rb +100 -432
  15. data/lib/aidp/cli.rb +309 -239
  16. data/lib/aidp/config.rb +298 -10
  17. data/lib/aidp/debug_logger.rb +195 -0
  18. data/lib/aidp/debug_mixin.rb +187 -0
  19. data/lib/aidp/execute/progress.rb +9 -0
  20. data/lib/aidp/execute/runner.rb +221 -40
  21. data/lib/aidp/execute/steps.rb +17 -7
  22. data/lib/aidp/execute/workflow_selector.rb +211 -0
  23. data/lib/aidp/harness/completion_checker.rb +268 -0
  24. data/lib/aidp/harness/condition_detector.rb +1526 -0
  25. data/lib/aidp/harness/config_loader.rb +373 -0
  26. data/lib/aidp/harness/config_manager.rb +382 -0
  27. data/lib/aidp/harness/config_schema.rb +1006 -0
  28. data/lib/aidp/harness/config_validator.rb +355 -0
  29. data/lib/aidp/harness/configuration.rb +477 -0
  30. data/lib/aidp/harness/enhanced_runner.rb +494 -0
  31. data/lib/aidp/harness/error_handler.rb +616 -0
  32. data/lib/aidp/harness/provider_config.rb +423 -0
  33. data/lib/aidp/harness/provider_factory.rb +306 -0
  34. data/lib/aidp/harness/provider_manager.rb +1269 -0
  35. data/lib/aidp/harness/provider_type_checker.rb +88 -0
  36. data/lib/aidp/harness/runner.rb +411 -0
  37. data/lib/aidp/harness/state/errors.rb +28 -0
  38. data/lib/aidp/harness/state/metrics.rb +219 -0
  39. data/lib/aidp/harness/state/persistence.rb +128 -0
  40. data/lib/aidp/harness/state/provider_state.rb +132 -0
  41. data/lib/aidp/harness/state/ui_state.rb +68 -0
  42. data/lib/aidp/harness/state/workflow_state.rb +123 -0
  43. data/lib/aidp/harness/state_manager.rb +586 -0
  44. data/lib/aidp/harness/status_display.rb +888 -0
  45. data/lib/aidp/harness/ui/base.rb +16 -0
  46. data/lib/aidp/harness/ui/enhanced_tui.rb +545 -0
  47. data/lib/aidp/harness/ui/enhanced_workflow_selector.rb +252 -0
  48. data/lib/aidp/harness/ui/error_handler.rb +132 -0
  49. data/lib/aidp/harness/ui/frame_manager.rb +361 -0
  50. data/lib/aidp/harness/ui/job_monitor.rb +500 -0
  51. data/lib/aidp/harness/ui/navigation/main_menu.rb +311 -0
  52. data/lib/aidp/harness/ui/navigation/menu_formatter.rb +120 -0
  53. data/lib/aidp/harness/ui/navigation/menu_item.rb +142 -0
  54. data/lib/aidp/harness/ui/navigation/menu_state.rb +139 -0
  55. data/lib/aidp/harness/ui/navigation/submenu.rb +202 -0
  56. data/lib/aidp/harness/ui/navigation/workflow_selector.rb +176 -0
  57. data/lib/aidp/harness/ui/progress_display.rb +280 -0
  58. data/lib/aidp/harness/ui/question_collector.rb +141 -0
  59. data/lib/aidp/harness/ui/spinner_group.rb +184 -0
  60. data/lib/aidp/harness/ui/spinner_helper.rb +152 -0
  61. data/lib/aidp/harness/ui/status_manager.rb +312 -0
  62. data/lib/aidp/harness/ui/status_widget.rb +280 -0
  63. data/lib/aidp/harness/ui/workflow_controller.rb +312 -0
  64. data/lib/aidp/harness/user_interface.rb +2381 -0
  65. data/lib/aidp/provider_manager.rb +131 -7
  66. data/lib/aidp/providers/anthropic.rb +28 -103
  67. data/lib/aidp/providers/base.rb +170 -0
  68. data/lib/aidp/providers/cursor.rb +52 -181
  69. data/lib/aidp/providers/gemini.rb +24 -107
  70. data/lib/aidp/providers/macos_ui.rb +99 -5
  71. data/lib/aidp/providers/opencode.rb +194 -0
  72. data/lib/aidp/storage/csv_storage.rb +172 -0
  73. data/lib/aidp/storage/file_manager.rb +214 -0
  74. data/lib/aidp/storage/json_storage.rb +140 -0
  75. data/lib/aidp/version.rb +1 -1
  76. data/lib/aidp.rb +54 -39
  77. data/templates/COMMON/AGENT_BASE.md +11 -0
  78. data/templates/EXECUTE/00_PRD.md +4 -4
  79. data/templates/EXECUTE/02_ARCHITECTURE.md +5 -4
  80. data/templates/EXECUTE/07_TEST_PLAN.md +4 -1
  81. data/templates/EXECUTE/08_TASKS.md +4 -4
  82. data/templates/EXECUTE/10_IMPLEMENTATION_AGENT.md +4 -4
  83. data/templates/README.md +279 -0
  84. data/templates/aidp-development.yml.example +373 -0
  85. data/templates/aidp-minimal.yml.example +48 -0
  86. data/templates/aidp-production.yml.example +475 -0
  87. data/templates/aidp.yml.example +598 -0
  88. metadata +93 -69
  89. data/lib/aidp/analyze/agent_personas.rb +0 -71
  90. data/lib/aidp/analyze/agent_tool_executor.rb +0 -439
  91. data/lib/aidp/analyze/data_retention_manager.rb +0 -421
  92. data/lib/aidp/analyze/database.rb +0 -260
  93. data/lib/aidp/analyze/dependencies.rb +0 -335
  94. data/lib/aidp/analyze/export_manager.rb +0 -418
  95. data/lib/aidp/analyze/focus_guidance.rb +0 -517
  96. data/lib/aidp/analyze/incremental_analyzer.rb +0 -533
  97. data/lib/aidp/analyze/language_analysis_strategies.rb +0 -897
  98. data/lib/aidp/analyze/large_analysis_progress.rb +0 -499
  99. data/lib/aidp/analyze/memory_manager.rb +0 -339
  100. data/lib/aidp/analyze/metrics_storage.rb +0 -336
  101. data/lib/aidp/analyze/parallel_processor.rb +0 -454
  102. data/lib/aidp/analyze/performance_optimizer.rb +0 -691
  103. data/lib/aidp/analyze/repository_chunker.rb +0 -697
  104. data/lib/aidp/analyze/static_analysis_detector.rb +0 -577
  105. data/lib/aidp/analyze/storage.rb +0 -655
  106. data/lib/aidp/analyze/tool_configuration.rb +0 -441
  107. data/lib/aidp/analyze/tool_modernization.rb +0 -750
  108. data/lib/aidp/database/pg_adapter.rb +0 -148
  109. data/lib/aidp/database_config.rb +0 -69
  110. data/lib/aidp/database_connection.rb +0 -72
  111. data/lib/aidp/job_manager.rb +0 -41
  112. data/lib/aidp/jobs/base_job.rb +0 -45
  113. data/lib/aidp/jobs/provider_execution_job.rb +0 -83
  114. data/lib/aidp/project_detector.rb +0 -117
  115. data/lib/aidp/providers/agent_supervisor.rb +0 -348
  116. data/lib/aidp/providers/supervised_base.rb +0 -317
  117. data/lib/aidp/providers/supervised_cursor.rb +0 -22
  118. data/lib/aidp/sync.rb +0 -13
  119. data/lib/aidp/workspace.rb +0 -19
@@ -0,0 +1,373 @@
1
+ # Development AIDP Configuration
2
+ # This is a development-friendly configuration with debugging features enabled
3
+ # Copy this file to your project root as 'aidp.yml' and customize as needed
4
+
5
+ # Harness configuration
6
+ harness:
7
+ # Default provider to use
8
+ default_provider: "cursor"
9
+
10
+ # Fallback providers
11
+ fallback_providers: ["claude"]
12
+
13
+ # Development settings
14
+ max_retries: 1
15
+ request_timeout: 60
16
+ user_feedback_timeout: 60
17
+ work_completion_timeout: 300
18
+
19
+ # Development features
20
+ auto_switch_on_error: true
21
+ auto_switch_on_rate_limit: true
22
+ max_concurrent_requests: 2
23
+
24
+ # Circuit breaker configuration (relaxed for development)
25
+ circuit_breaker:
26
+ enabled: false
27
+ failure_threshold: 10
28
+ timeout: 60
29
+ half_open_max_calls: 5
30
+
31
+ # Retry configuration (minimal for development)
32
+ retry:
33
+ enabled: true
34
+ max_attempts: 1
35
+ base_delay: 0.5
36
+ max_delay: 5.0
37
+ exponential_base: 2.0
38
+ jitter: false
39
+
40
+ # Rate limiting configuration (relaxed for development)
41
+ rate_limit:
42
+ enabled: false
43
+ default_reset_time: 60
44
+ burst_limit: 100
45
+ sustained_limit: 50
46
+
47
+ # Load balancing configuration
48
+ load_balancing:
49
+ enabled: false
50
+ strategy: "round_robin"
51
+ health_check_interval: 300
52
+ unhealthy_threshold: 10
53
+
54
+ # Health check configuration (relaxed for development)
55
+ health_check:
56
+ enabled: false
57
+ interval: 300
58
+ timeout: 30
59
+ failure_threshold: 10
60
+ success_threshold: 1
61
+
62
+ # Metrics configuration (minimal for development)
63
+ metrics:
64
+ enabled: true
65
+ retention_days: 1
66
+ aggregation_interval: 60
67
+ export_interval: 300
68
+
69
+ # Session configuration
70
+ session:
71
+ enabled: true
72
+ timeout: 600
73
+ sticky_sessions: false
74
+ session_affinity: "provider"
75
+
76
+ # User interface configuration (enhanced for development)
77
+ ui:
78
+ enabled: true
79
+ interactive_mode: true
80
+ file_selection: true
81
+ progress_display: true
82
+ status_updates: true
83
+ pause_resume: true
84
+
85
+ # Error handling configuration (enhanced for development)
86
+ error_handling:
87
+ enabled: true
88
+ log_errors: true
89
+ retry_on_error: false
90
+ fallback_on_error: true
91
+ error_notification: true
92
+
93
+ # Performance optimization (disabled for development)
94
+ performance:
95
+ enabled: false
96
+ cache_responses: false
97
+ parallel_processing: false
98
+ batch_requests: false
99
+ connection_pooling: false
100
+
101
+ # Security configuration (relaxed for development)
102
+ security:
103
+ enabled: false
104
+ ssl_verify: false
105
+ allowed_hosts: []
106
+ blocked_hosts: []
107
+ api_key_rotation: false
108
+ audit_logging: false
109
+
110
+ # Provider configurations
111
+ providers:
112
+ # Cursor provider (primary for development)
113
+ cursor:
114
+ type: "package"
115
+ priority: 1
116
+ default_flags: []
117
+
118
+ # Available models
119
+ models: ["cursor-default", "cursor-fast"]
120
+
121
+ # Model weights for load balancing
122
+ model_weights:
123
+ cursor-default: 2
124
+ cursor-fast: 1
125
+
126
+ # Model-specific configurations
127
+ models_config:
128
+ cursor-default:
129
+ flags: []
130
+ timeout: 120
131
+ cursor-fast:
132
+ flags: ["--fast"]
133
+ timeout: 60
134
+
135
+ # Provider features
136
+ features:
137
+ file_upload: true
138
+ code_generation: true
139
+ analysis: true
140
+ streaming: true
141
+
142
+ # Monitoring configuration (enhanced for development)
143
+ monitoring:
144
+ enabled: true
145
+ metrics_interval: 10
146
+
147
+ # Rate limiting configuration (disabled for development)
148
+ rate_limit:
149
+ enabled: false
150
+ requests_per_minute: 1000
151
+ requests_per_hour: 10000
152
+ burst_limit: 100
153
+
154
+ # Retry configuration (minimal for development)
155
+ retry:
156
+ enabled: true
157
+ max_attempts: 1
158
+ base_delay: 0.5
159
+ max_delay: 5.0
160
+ exponential_base: 2.0
161
+ jitter: false
162
+
163
+ # Circuit breaker configuration (disabled for development)
164
+ circuit_breaker:
165
+ enabled: false
166
+ failure_threshold: 100
167
+ timeout: 60
168
+ half_open_max_calls: 10
169
+
170
+ # Cost tracking
171
+ cost:
172
+ input_cost_per_token: 0.0
173
+ output_cost_per_token: 0.0
174
+ fixed_cost_per_request: 0.0
175
+ currency: "USD"
176
+
177
+ # Health check configuration (disabled for development)
178
+ health_check:
179
+ enabled: false
180
+ interval: 300
181
+ timeout: 30
182
+ failure_threshold: 100
183
+ success_threshold: 1
184
+
185
+ # Logging configuration (enhanced for development)
186
+ log:
187
+ enabled: true
188
+ level: "debug"
189
+ file: "logs/cursor-dev.log"
190
+ max_size: 10485760 # 10MB
191
+ max_files: 3
192
+ format: "text"
193
+ log_requests: true
194
+ log_responses: true
195
+
196
+ # Cache configuration (disabled for development)
197
+ cache:
198
+ enabled: false
199
+ ttl: 60
200
+ max_size: 10
201
+ strategy: "lru"
202
+
203
+ # Security configuration (relaxed for development)
204
+ security:
205
+ ssl_verify: false
206
+ allowed_hosts: []
207
+ blocked_hosts: []
208
+ timeout: 60
209
+ max_redirects: 10
210
+
211
+ # Claude provider (fallback for development)
212
+ claude:
213
+ type: "api"
214
+ priority: 2
215
+ max_tokens: 10000
216
+ default_flags: ["--dangerously-skip-permissions"]
217
+
218
+ # Available models (limited for development)
219
+ models: ["claude-3-5-haiku-20241022"]
220
+
221
+ # Model weights for load balancing
222
+ model_weights:
223
+ claude-3-5-haiku-20241022: 1
224
+
225
+ # Model-specific configurations
226
+ models_config:
227
+ claude-3-5-haiku-20241022:
228
+ flags: ["--dangerously-skip-permissions"]
229
+ max_tokens: 10000
230
+ timeout: 60
231
+
232
+ # Authentication configuration
233
+ auth:
234
+ api_key_env: "ANTHROPIC_API_KEY"
235
+
236
+ # Endpoint configuration
237
+ endpoints:
238
+ default: "https://api.anthropic.com/v1/messages"
239
+
240
+ # Provider features
241
+ features:
242
+ file_upload: true
243
+ code_generation: true
244
+ analysis: true
245
+ vision: true
246
+ streaming: true
247
+ function_calling: true
248
+ tool_use: true
249
+
250
+ # Monitoring configuration (enhanced for development)
251
+ monitoring:
252
+ enabled: true
253
+ metrics_interval: 10
254
+
255
+ # Rate limiting configuration (relaxed for development)
256
+ rate_limit:
257
+ enabled: false
258
+ requests_per_minute: 100
259
+ requests_per_hour: 1000
260
+ tokens_per_minute: 10000
261
+ tokens_per_hour: 100000
262
+ burst_limit: 20
263
+
264
+ # Retry configuration (minimal for development)
265
+ retry:
266
+ enabled: true
267
+ max_attempts: 1
268
+ base_delay: 0.5
269
+ max_delay: 5.0
270
+ exponential_base: 2.0
271
+ jitter: false
272
+ retry_on_rate_limit: false
273
+
274
+ # Circuit breaker configuration (disabled for development)
275
+ circuit_breaker:
276
+ enabled: false
277
+ failure_threshold: 100
278
+ timeout: 60
279
+ half_open_max_calls: 10
280
+
281
+ # Cost tracking
282
+ cost:
283
+ input_cost_per_token: 0.000003
284
+ output_cost_per_token: 0.000015
285
+ fixed_cost_per_request: 0.0
286
+ currency: "USD"
287
+
288
+ # Health check configuration (disabled for development)
289
+ health_check:
290
+ enabled: false
291
+ interval: 300
292
+ timeout: 30
293
+ failure_threshold: 100
294
+ success_threshold: 1
295
+ check_url: "https://api.anthropic.com/v1/messages"
296
+
297
+ # Logging configuration (enhanced for development)
298
+ log:
299
+ enabled: true
300
+ level: "debug"
301
+ file: "logs/claude-dev.log"
302
+ max_size: 10485760 # 10MB
303
+ max_files: 3
304
+ format: "text"
305
+ log_requests: true
306
+ log_responses: true
307
+
308
+ # Cache configuration (disabled for development)
309
+ cache:
310
+ enabled: false
311
+ ttl: 60
312
+ max_size: 10
313
+ strategy: "lru"
314
+
315
+ # Security configuration (relaxed for development)
316
+ security:
317
+ ssl_verify: false
318
+ allowed_hosts: []
319
+ blocked_hosts: []
320
+ timeout: 60
321
+ max_redirects: 10
322
+
323
+ # Environment-specific configurations
324
+ environments:
325
+ development:
326
+ harness:
327
+ max_retries: 1
328
+ request_timeout: 60
329
+ providers:
330
+ cursor:
331
+ log:
332
+ level: "debug"
333
+ monitoring:
334
+ enabled: true
335
+ claude:
336
+ rate_limit:
337
+ enabled: false
338
+ log:
339
+ level: "debug"
340
+ monitoring:
341
+ enabled: true
342
+
343
+ # Feature flags for development
344
+ features:
345
+ debugging:
346
+ harness:
347
+ log_errors: true
348
+ error_notification: true
349
+ providers:
350
+ cursor:
351
+ log:
352
+ level: "debug"
353
+ log_requests: true
354
+ log_responses: true
355
+ claude:
356
+ log:
357
+ level: "debug"
358
+ log_requests: true
359
+ log_responses: true
360
+
361
+ # Configuration tips for development:
362
+ # - Use minimal retry settings for faster feedback
363
+ # - Enable detailed logging for debugging
364
+ # - Disable rate limiting for testing
365
+ # - Use relaxed timeouts for development
366
+ # - Enable request/response logging
367
+ # - Disable caching to see fresh results
368
+ # - Use minimal health checks
369
+ # - Disable circuit breakers for testing
370
+ # - Use text format logs for readability
371
+ # - Set up proper API keys in environment variables
372
+ # - Use fast models for quicker iteration
373
+ # - Enable all debugging features
@@ -0,0 +1,48 @@
1
+ # Minimal AIDP Configuration
2
+ # This is a minimal configuration file for basic harness usage
3
+ # Copy this file to your project root as 'aidp.yml' and customize as needed
4
+
5
+ # Harness configuration
6
+ harness:
7
+ # Default provider to use
8
+ default_provider: "cursor"
9
+
10
+ # Fallback providers
11
+ fallback_providers: ["claude"]
12
+
13
+ # Basic retry configuration
14
+ max_retries: 2
15
+
16
+ # Provider configurations
17
+ providers:
18
+ # Cursor provider (package-based)
19
+ cursor:
20
+ type: "package"
21
+ priority: 1
22
+ models: ["cursor-default"]
23
+ features:
24
+ file_upload: true
25
+ code_generation: true
26
+ analysis: true
27
+
28
+ # Claude provider (API-based)
29
+ claude:
30
+ type: "api"
31
+ priority: 2
32
+ max_tokens: 100000
33
+ models: ["claude-3-5-sonnet-20241022"]
34
+ auth:
35
+ api_key_env: "ANTHROPIC_API_KEY"
36
+ endpoints:
37
+ default: "https://api.anthropic.com/v1/messages"
38
+ features:
39
+ file_upload: true
40
+ code_generation: true
41
+ analysis: true
42
+ vision: true
43
+
44
+ # Configuration tips:
45
+ # - Set your ANTHROPIC_API_KEY environment variable for Claude
46
+ # - Adjust max_tokens based on your API plan limits
47
+ # - Add more providers as needed
48
+ # - Configure fallback_providers for automatic failover