aidp 0.9.6 → 0.11.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 +194 -25
- data/lib/aidp/analyze/error_handler.rb +4 -2
- data/lib/aidp/{analysis → analyze}/kb_inspector.rb +93 -89
- data/lib/aidp/analyze/prioritizer.rb +3 -2
- data/lib/aidp/analyze/progress.rb +2 -1
- data/lib/aidp/analyze/ruby_maat_integration.rb +7 -3
- data/lib/aidp/analyze/runner.rb +73 -11
- data/lib/aidp/{analysis → analyze}/seams.rb +1 -1
- data/lib/aidp/analyze/steps.rb +10 -8
- data/lib/aidp/{analysis → analyze}/tree_sitter_grammar_loader.rb +11 -5
- data/lib/aidp/{analysis → analyze}/tree_sitter_scan.rb +21 -15
- data/lib/aidp/cli/checkpoint_command.rb +98 -0
- data/lib/aidp/cli/first_run_wizard.rb +83 -103
- data/lib/aidp/cli/jobs_command.rb +270 -36
- data/lib/aidp/cli/terminal_io.rb +3 -3
- data/lib/aidp/cli.rb +411 -69
- data/lib/aidp/config.rb +5 -8
- data/lib/aidp/debug_logger.rb +4 -4
- data/lib/aidp/debug_mixin.rb +11 -4
- data/lib/aidp/execute/checkpoint.rb +282 -0
- data/lib/aidp/execute/checkpoint_display.rb +221 -0
- data/lib/aidp/execute/progress.rb +2 -1
- data/lib/aidp/execute/prompt_manager.rb +62 -0
- data/lib/aidp/execute/runner.rb +67 -20
- data/lib/aidp/execute/steps.rb +36 -27
- data/lib/aidp/execute/work_loop_runner.rb +308 -0
- data/lib/aidp/execute/workflow_selector.rb +50 -26
- data/lib/aidp/harness/condition_detector.rb +4 -4
- data/lib/aidp/harness/config_schema.rb +40 -0
- data/lib/aidp/harness/config_validator.rb +3 -6
- data/lib/aidp/harness/configuration.rb +35 -1
- data/lib/aidp/harness/enhanced_runner.rb +25 -4
- data/lib/aidp/harness/error_handler.rb +103 -28
- data/lib/aidp/harness/provider_factory.rb +6 -1
- data/lib/aidp/harness/provider_manager.rb +273 -19
- data/lib/aidp/harness/runner.rb +14 -6
- data/lib/aidp/harness/simple_user_interface.rb +6 -4
- data/lib/aidp/harness/status_display.rb +118 -106
- data/lib/aidp/harness/test_runner.rb +83 -0
- data/lib/aidp/harness/ui/enhanced_tui.rb +7 -5
- data/lib/aidp/harness/ui/enhanced_workflow_selector.rb +22 -4
- data/lib/aidp/harness/ui/error_handler.rb +7 -2
- data/lib/aidp/harness/ui/frame_manager.rb +61 -39
- data/lib/aidp/harness/ui/job_monitor.rb +2 -0
- data/lib/aidp/harness/ui/navigation/main_menu.rb +27 -16
- data/lib/aidp/harness/ui/navigation/menu_item.rb +1 -0
- data/lib/aidp/harness/ui/navigation/menu_state.rb +1 -0
- data/lib/aidp/harness/ui/navigation/submenu.rb +1 -0
- data/lib/aidp/harness/ui/navigation/workflow_selector.rb +2 -0
- data/lib/aidp/harness/ui/progress_display.rb +26 -7
- data/lib/aidp/harness/ui/question_collector.rb +2 -0
- data/lib/aidp/harness/ui/spinner_group.rb +2 -0
- data/lib/aidp/harness/ui/spinner_helper.rb +1 -1
- data/lib/aidp/harness/ui/status_manager.rb +4 -2
- data/lib/aidp/harness/ui/status_widget.rb +20 -9
- data/lib/aidp/harness/ui/workflow_controller.rb +27 -9
- data/lib/aidp/harness/user_interface.rb +338 -330
- data/lib/aidp/jobs/background_runner.rb +278 -0
- data/lib/aidp/message_display.rb +48 -0
- data/lib/aidp/provider_manager.rb +13 -7
- data/lib/aidp/providers/anthropic.rb +101 -18
- data/lib/aidp/providers/base.rb +51 -1
- data/lib/aidp/providers/codex.rb +248 -0
- data/lib/aidp/providers/cursor.rb +39 -48
- data/lib/aidp/providers/gemini.rb +26 -16
- data/lib/aidp/providers/github_copilot.rb +263 -0
- data/lib/aidp/providers/opencode.rb +38 -47
- data/lib/aidp/version.rb +1 -1
- data/lib/aidp/workflows/definitions.rb +357 -0
- data/lib/aidp/workflows/selector.rb +171 -0
- data/lib/aidp.rb +16 -4
- data/templates/planning/generate_llm_style_guide.md +119 -0
- metadata +43 -31
- data/lib/aidp/analyze/progress_visualizer.rb +0 -314
- /data/templates/{ANALYZE/02_ARCHITECTURE_ANALYSIS.md → analysis/analyze_architecture.md} +0 -0
- /data/templates/{ANALYZE/05_DOCUMENTATION_ANALYSIS.md → analysis/analyze_documentation.md} +0 -0
- /data/templates/{ANALYZE/04_FUNCTIONALITY_ANALYSIS.md → analysis/analyze_functionality.md} +0 -0
- /data/templates/{ANALYZE/01_REPOSITORY_ANALYSIS.md → analysis/analyze_repository.md} +0 -0
- /data/templates/{ANALYZE/06_STATIC_ANALYSIS.md → analysis/analyze_static_code.md} +0 -0
- /data/templates/{ANALYZE/03_TEST_ANALYSIS.md → analysis/analyze_tests.md} +0 -0
- /data/templates/{ANALYZE/07_REFACTORING_RECOMMENDATIONS.md → analysis/recommend_refactoring.md} +0 -0
- /data/templates/{ANALYZE/06a_tree_sitter_scan.md → analysis/scan_with_tree_sitter.md} +0 -0
- /data/templates/{EXECUTE/11_STATIC_ANALYSIS.md → implementation/configure_static_analysis.md} +0 -0
- /data/templates/{EXECUTE/14_DOCS_PORTAL.md → implementation/create_documentation_portal.md} +0 -0
- /data/templates/{EXECUTE/10_IMPLEMENTATION_AGENT.md → implementation/implement_features.md} +0 -0
- /data/templates/{EXECUTE/13_DELIVERY_ROLLOUT.md → implementation/plan_delivery.md} +0 -0
- /data/templates/{EXECUTE/15_POST_RELEASE.md → implementation/review_post_release.md} +0 -0
- /data/templates/{EXECUTE/09_SCAFFOLDING_DEVEX.md → implementation/setup_scaffolding.md} +0 -0
- /data/templates/{EXECUTE/02A_ARCH_GATE_QUESTIONS.md → planning/ask_architecture_questions.md} +0 -0
- /data/templates/{EXECUTE/00_PRD.md → planning/create_prd.md} +0 -0
- /data/templates/{EXECUTE/08_TASKS.md → planning/create_tasks.md} +0 -0
- /data/templates/{EXECUTE/04_DOMAIN_DECOMPOSITION.md → planning/decompose_domain.md} +0 -0
- /data/templates/{EXECUTE/01_NFRS.md → planning/define_nfrs.md} +0 -0
- /data/templates/{EXECUTE/05_CONTRACTS.md → planning/design_apis.md} +0 -0
- /data/templates/{EXECUTE/02_ARCHITECTURE.md → planning/design_architecture.md} +0 -0
- /data/templates/{EXECUTE/06_THREAT_MODEL.md → planning/design_data_model.md} +0 -0
- /data/templates/{EXECUTE/03_ADR_FACTORY.md → planning/generate_adrs.md} +0 -0
- /data/templates/{EXECUTE/12_OBSERVABILITY_SLOS.md → planning/plan_observability.md} +0 -0
- /data/templates/{EXECUTE/07_TEST_PLAN.md → planning/plan_testing.md} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ffba477d4ca2e297b4fe81d7ecb32ccf37d161df6bcd2dceaa91e94ccbc8ea8f
|
|
4
|
+
data.tar.gz: 851fdc47c7a12bd8f6f8304badf60ffdb6855787d0982645d80a309d9caee40b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef68650e5a8c55d8b219a00a42ba7fbff2c87bdd5cacf5f450c8bf406c481d6d1e4c00cd7edabbf41b07928bb28c2b5246c54392e67f52ee8381bac1668d9463
|
|
7
|
+
data.tar.gz: d2ae0a1bc041b0f8c0cdf1ccb3c328fc7bb1c4ba3cbb0599c983f4937056a8ad1f47e0bcb475a96dd8d4d936cfc6d7452a0333121ed36e29a14708b8e4bd15ec
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AI Dev Pipeline (aidp) - Ruby Gem
|
|
2
2
|
|
|
3
|
-
A portable CLI that automates
|
|
3
|
+
A portable CLI that automates AI development workflows from idea to implementation using your existing IDE assistants. Features autonomous work loops, background execution, and comprehensive progress tracking.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
@@ -11,13 +11,16 @@ gem install aidp
|
|
|
11
11
|
# Navigate to your project
|
|
12
12
|
cd /your/project
|
|
13
13
|
|
|
14
|
-
# Start
|
|
15
|
-
aidp
|
|
14
|
+
# Start an interactive workflow
|
|
15
|
+
aidp execute
|
|
16
|
+
|
|
17
|
+
# Or run in background
|
|
18
|
+
aidp execute --background
|
|
16
19
|
```
|
|
17
20
|
|
|
18
21
|
### First-Time Setup
|
|
19
22
|
|
|
20
|
-
On the first run in a project without an `aidp.yml`, AIDP
|
|
23
|
+
On the first run in a project without an `aidp.yml`, AIDP launches a **First-Time Setup Wizard**. You'll be prompted to choose one of:
|
|
21
24
|
|
|
22
25
|
1. Minimal (single provider: cursor)
|
|
23
26
|
2. Development template (multiple providers, safe defaults)
|
|
@@ -27,43 +30,156 @@ On the first run in a project without an `aidp.yml`, AIDP now launches a **First
|
|
|
27
30
|
|
|
28
31
|
Non-interactive environments (CI, scripts, pipes) automatically receive a minimal `aidp.yml` so workflows can proceed without manual intervention.
|
|
29
32
|
|
|
30
|
-
You can re-run the wizard manually
|
|
33
|
+
You can re-run the wizard manually:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
aidp --setup-config
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Core Features
|
|
40
|
+
|
|
41
|
+
### Work Loops
|
|
42
|
+
|
|
43
|
+
AIDP implements **work loops** - an iterative execution pattern where AI agents autonomously work on tasks until completion, with automatic testing and linting feedback.
|
|
44
|
+
|
|
45
|
+
- **Iterative refinement**: Agent works in loops until task is 100% complete
|
|
46
|
+
- **Self-management**: Agent edits PROMPT.md to track its own progress
|
|
47
|
+
- **Automatic validation**: Tests and linters run after each iteration
|
|
48
|
+
- **Self-correction**: Only failures are fed back for the next iteration
|
|
49
|
+
|
|
50
|
+
See [Work Loops Guide](docs/WORK_LOOPS_GUIDE.md) for details.
|
|
51
|
+
|
|
52
|
+
### Background Execution
|
|
53
|
+
|
|
54
|
+
Run workflows in the background while monitoring progress from separate terminals:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Start in background
|
|
58
|
+
aidp execute --background
|
|
59
|
+
✓ Started background job: 20251005_235912_a1b2c3d4
|
|
60
|
+
|
|
61
|
+
# Monitor progress
|
|
62
|
+
aidp jobs list # List all jobs
|
|
63
|
+
aidp jobs status <job_id> # Show job status
|
|
64
|
+
aidp jobs logs <job_id> --tail # View recent logs
|
|
65
|
+
aidp checkpoint summary --watch # Watch metrics in real-time
|
|
66
|
+
|
|
67
|
+
# Control jobs
|
|
68
|
+
aidp jobs stop <job_id> # Stop a running job
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Progress Checkpoints
|
|
31
72
|
|
|
32
|
-
|
|
73
|
+
Track code quality metrics and task progress throughout execution:
|
|
33
74
|
|
|
34
|
-
|
|
75
|
+
```bash
|
|
76
|
+
# View current progress
|
|
77
|
+
aidp checkpoint summary
|
|
78
|
+
|
|
79
|
+
# Watch with auto-refresh
|
|
80
|
+
aidp checkpoint summary --watch
|
|
81
|
+
|
|
82
|
+
# View historical data
|
|
83
|
+
aidp checkpoint history 20
|
|
84
|
+
```
|
|
35
85
|
|
|
36
|
-
|
|
86
|
+
**Tracked Metrics:**
|
|
37
87
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
- **💬 Smart Question Collection**: Interactive prompts with validation and error handling
|
|
88
|
+
- Lines of code
|
|
89
|
+
- Test coverage
|
|
90
|
+
- Code quality scores
|
|
91
|
+
- PRD task completion percentage
|
|
92
|
+
- File count and growth trends
|
|
44
93
|
|
|
45
|
-
|
|
94
|
+
## Command Reference
|
|
95
|
+
|
|
96
|
+
### Execution Modes
|
|
46
97
|
|
|
47
98
|
```bash
|
|
48
|
-
#
|
|
49
|
-
aidp
|
|
99
|
+
# Execute mode - Build new features
|
|
100
|
+
aidp execute # Interactive workflow selection
|
|
101
|
+
aidp execute --background # Run in background
|
|
102
|
+
aidp execute --background --follow # Start and follow logs
|
|
103
|
+
|
|
104
|
+
# Analyze mode - Analyze codebase
|
|
105
|
+
aidp analyze # Interactive analysis
|
|
106
|
+
aidp analyze --background # Background analysis
|
|
107
|
+
```
|
|
50
108
|
|
|
51
|
-
|
|
52
|
-
|
|
109
|
+
### Job Management
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# List all background jobs
|
|
113
|
+
aidp jobs list
|
|
53
114
|
|
|
54
|
-
# Show
|
|
55
|
-
aidp
|
|
115
|
+
# Show job status
|
|
116
|
+
aidp jobs status <job_id>
|
|
117
|
+
aidp jobs status <job_id> --follow # Follow with auto-refresh
|
|
118
|
+
|
|
119
|
+
# View job logs
|
|
120
|
+
aidp jobs logs <job_id>
|
|
121
|
+
aidp jobs logs <job_id> --tail # Last 50 lines
|
|
122
|
+
aidp jobs logs <job_id> --follow # Stream in real-time
|
|
123
|
+
|
|
124
|
+
# Stop a running job
|
|
125
|
+
aidp jobs stop <job_id>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Checkpoint Monitoring
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# View latest checkpoint
|
|
132
|
+
aidp checkpoint show
|
|
133
|
+
|
|
134
|
+
# Progress summary with trends
|
|
135
|
+
aidp checkpoint summary
|
|
136
|
+
aidp checkpoint summary --watch # Auto-refresh every 5s
|
|
137
|
+
aidp checkpoint summary --watch --interval 10 # Custom interval
|
|
138
|
+
|
|
139
|
+
# View checkpoint history
|
|
140
|
+
aidp checkpoint history # Last 10 checkpoints
|
|
141
|
+
aidp checkpoint history 50 # Last 50 checkpoints
|
|
142
|
+
|
|
143
|
+
# Detailed metrics
|
|
144
|
+
aidp checkpoint metrics
|
|
145
|
+
|
|
146
|
+
# Clear checkpoint data
|
|
147
|
+
aidp checkpoint clear
|
|
148
|
+
aidp checkpoint clear --force # Skip confirmation
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### System Commands
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# Show system status
|
|
155
|
+
aidp status
|
|
156
|
+
|
|
157
|
+
# Provider health dashboard
|
|
158
|
+
aidp providers
|
|
159
|
+
|
|
160
|
+
# Harness state management
|
|
161
|
+
aidp harness status
|
|
162
|
+
aidp harness reset
|
|
163
|
+
|
|
164
|
+
# Configuration
|
|
165
|
+
aidp --setup-config # Re-run setup wizard
|
|
166
|
+
aidp --help # Show all commands
|
|
167
|
+
aidp --version # Show version
|
|
56
168
|
```
|
|
57
169
|
|
|
58
170
|
## AI Providers
|
|
59
171
|
|
|
60
172
|
AIDP intelligently manages multiple providers with automatic switching:
|
|
61
173
|
|
|
62
|
-
- **Claude
|
|
63
|
-
- **
|
|
174
|
+
- **Anthropic Claude CLI** - Primary provider for complex analysis and code generation
|
|
175
|
+
- **Codex CLI** - OpenAI's Codex command-line interface for code generation
|
|
64
176
|
- **Cursor CLI** - IDE-integrated provider for code-specific tasks
|
|
177
|
+
- **Gemini CLI** - Google's Gemini command-line interface for general tasks
|
|
178
|
+
- **GitHub Copilot CLI** - GitHub's AI pair programmer command-line interface
|
|
179
|
+
- **macOS UI** - macOS-specific UI automation provider
|
|
180
|
+
- **OpenCode** - Alternative open-source code generation provider
|
|
65
181
|
|
|
66
|
-
The
|
|
182
|
+
The system automatically switches providers when:
|
|
67
183
|
|
|
68
184
|
- Rate limits are hit
|
|
69
185
|
- Providers fail or timeout
|
|
@@ -74,6 +190,15 @@ The TUI automatically switches providers when:
|
|
|
74
190
|
|
|
75
191
|
```yaml
|
|
76
192
|
# aidp.yml
|
|
193
|
+
harness:
|
|
194
|
+
work_loop:
|
|
195
|
+
enabled: true
|
|
196
|
+
max_iterations: 50
|
|
197
|
+
test_commands:
|
|
198
|
+
- "bundle exec rspec"
|
|
199
|
+
lint_commands:
|
|
200
|
+
- "bundle exec standardrb"
|
|
201
|
+
|
|
77
202
|
providers:
|
|
78
203
|
claude:
|
|
79
204
|
type: "usage_based"
|
|
@@ -190,6 +315,49 @@ When the AI creates a questions file, follow these steps:
|
|
|
190
315
|
|
|
191
316
|
The questions file is only created when the AI needs additional information beyond what it can infer from your project structure and existing files. Your answers are preserved for future reference.
|
|
192
317
|
|
|
318
|
+
## Workflow Examples
|
|
319
|
+
|
|
320
|
+
### Standard Interactive Workflow
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# Start execute mode
|
|
324
|
+
aidp execute
|
|
325
|
+
|
|
326
|
+
# Select workflow type (e.g., "Full PRD to Implementation")
|
|
327
|
+
# Answer any questions interactively
|
|
328
|
+
# Review generated files (PRD, architecture, etc.)
|
|
329
|
+
# Workflow runs automatically with harness managing retries
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Background Workflow with Monitoring
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
# Terminal 1: Start background execution
|
|
336
|
+
aidp execute --background
|
|
337
|
+
✓ Started background job: 20251005_235912_a1b2c3d4
|
|
338
|
+
|
|
339
|
+
# Terminal 2: Watch progress in real-time
|
|
340
|
+
aidp checkpoint summary --watch
|
|
341
|
+
|
|
342
|
+
# Terminal 3: Monitor job status
|
|
343
|
+
aidp jobs status 20251005_235912_a1b2c3d4 --follow
|
|
344
|
+
|
|
345
|
+
# Later: Check final results
|
|
346
|
+
aidp checkpoint summary
|
|
347
|
+
aidp jobs logs 20251005_235912_a1b2c3d4 --tail
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Quick Analysis
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
# Run analysis in background
|
|
354
|
+
aidp analyze --background
|
|
355
|
+
|
|
356
|
+
# Check progress
|
|
357
|
+
aidp jobs list
|
|
358
|
+
aidp checkpoint summary
|
|
359
|
+
```
|
|
360
|
+
|
|
193
361
|
## Debug and Logging
|
|
194
362
|
|
|
195
363
|
```bash
|
|
@@ -247,7 +415,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and conventional co
|
|
|
247
415
|
|
|
248
416
|
For detailed information:
|
|
249
417
|
|
|
250
|
-
- **[
|
|
418
|
+
- **[CLI User Guide](docs/CLI_USER_GUIDE.md)** - Complete guide to using AIDP commands
|
|
419
|
+
- **[Work Loops Guide](docs/WORK_LOOPS_GUIDE.md)** - Iterative workflows with automatic validation
|
|
251
420
|
- **[Configuration Guide](docs/harness-configuration.md)** - Detailed configuration options and examples
|
|
252
421
|
- **[Troubleshooting Guide](docs/harness-troubleshooting.md)** - Common issues and solutions
|
|
253
422
|
|
|
@@ -8,7 +8,8 @@ module Aidp
|
|
|
8
8
|
class ErrorHandler
|
|
9
9
|
attr_reader :logger, :error_counts, :recovery_strategies
|
|
10
10
|
|
|
11
|
-
def initialize(log_file: nil, verbose: false)
|
|
11
|
+
def initialize(log_file: nil, verbose: false, output: nil)
|
|
12
|
+
@output = output
|
|
12
13
|
@logger = setup_logger(log_file, verbose)
|
|
13
14
|
@error_counts = Hash.new(0)
|
|
14
15
|
@recovery_strategies = setup_recovery_strategies
|
|
@@ -87,7 +88,8 @@ module Aidp
|
|
|
87
88
|
private
|
|
88
89
|
|
|
89
90
|
def setup_logger(log_file, verbose)
|
|
90
|
-
|
|
91
|
+
output_stream = log_file || @output || $stdout
|
|
92
|
+
logger = Logger.new(output_stream)
|
|
91
93
|
logger.level = verbose ? Logger::DEBUG : Logger::INFO
|
|
92
94
|
logger.formatter = proc do |severity, datetime, progname, msg|
|
|
93
95
|
"#{datetime.strftime("%Y-%m-%d %H:%M:%S")} [#{severity}] #{msg}\n"
|