aidp 0.1.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 +7 -0
- data/LICENSE +21 -0
- data/README.md +210 -0
- data/bin/aidp +5 -0
- data/lib/aidp/analyze/agent_personas.rb +71 -0
- data/lib/aidp/analyze/agent_tool_executor.rb +445 -0
- data/lib/aidp/analyze/data_retention_manager.rb +426 -0
- data/lib/aidp/analyze/database.rb +243 -0
- data/lib/aidp/analyze/dependencies.rb +335 -0
- data/lib/aidp/analyze/error_handler.rb +486 -0
- data/lib/aidp/analyze/export_manager.rb +425 -0
- data/lib/aidp/analyze/feature_analyzer.rb +397 -0
- data/lib/aidp/analyze/focus_guidance.rb +517 -0
- data/lib/aidp/analyze/incremental_analyzer.rb +543 -0
- data/lib/aidp/analyze/language_analysis_strategies.rb +897 -0
- data/lib/aidp/analyze/large_analysis_progress.rb +504 -0
- data/lib/aidp/analyze/memory_manager.rb +365 -0
- data/lib/aidp/analyze/parallel_processor.rb +460 -0
- data/lib/aidp/analyze/performance_optimizer.rb +694 -0
- data/lib/aidp/analyze/prioritizer.rb +402 -0
- data/lib/aidp/analyze/progress.rb +75 -0
- data/lib/aidp/analyze/progress_visualizer.rb +320 -0
- data/lib/aidp/analyze/report_generator.rb +582 -0
- data/lib/aidp/analyze/repository_chunker.rb +702 -0
- data/lib/aidp/analyze/ruby_maat_integration.rb +572 -0
- data/lib/aidp/analyze/runner.rb +245 -0
- data/lib/aidp/analyze/static_analysis_detector.rb +577 -0
- data/lib/aidp/analyze/steps.rb +53 -0
- data/lib/aidp/analyze/storage.rb +600 -0
- data/lib/aidp/analyze/tool_configuration.rb +456 -0
- data/lib/aidp/analyze/tool_modernization.rb +750 -0
- data/lib/aidp/execute/progress.rb +76 -0
- data/lib/aidp/execute/runner.rb +135 -0
- data/lib/aidp/execute/steps.rb +113 -0
- data/lib/aidp/shared/cli.rb +117 -0
- data/lib/aidp/shared/config.rb +35 -0
- data/lib/aidp/shared/project_detector.rb +119 -0
- data/lib/aidp/shared/providers/anthropic.rb +26 -0
- data/lib/aidp/shared/providers/base.rb +17 -0
- data/lib/aidp/shared/providers/cursor.rb +102 -0
- data/lib/aidp/shared/providers/gemini.rb +26 -0
- data/lib/aidp/shared/providers/macos_ui.rb +26 -0
- data/lib/aidp/shared/sync.rb +15 -0
- data/lib/aidp/shared/util.rb +41 -0
- data/lib/aidp/shared/version.rb +7 -0
- data/lib/aidp/shared/workspace.rb +21 -0
- data/lib/aidp.rb +53 -0
- data/templates/ANALYZE/01_REPOSITORY_ANALYSIS.md +100 -0
- data/templates/ANALYZE/02_ARCHITECTURE_ANALYSIS.md +151 -0
- data/templates/ANALYZE/03_TEST_ANALYSIS.md +182 -0
- data/templates/ANALYZE/04_FUNCTIONALITY_ANALYSIS.md +200 -0
- data/templates/ANALYZE/05_DOCUMENTATION_ANALYSIS.md +202 -0
- data/templates/ANALYZE/06_STATIC_ANALYSIS.md +233 -0
- data/templates/ANALYZE/07_REFACTORING_RECOMMENDATIONS.md +316 -0
- data/templates/COMMON/AGENT_BASE.md +129 -0
- data/templates/COMMON/CONVENTIONS.md +19 -0
- data/templates/COMMON/TEMPLATES/ADR_TEMPLATE.md +21 -0
- data/templates/COMMON/TEMPLATES/DOMAIN_CHARTER.md +27 -0
- data/templates/COMMON/TEMPLATES/EVENT_EXAMPLE.yaml +16 -0
- data/templates/COMMON/TEMPLATES/MERMAID_C4.md +46 -0
- data/templates/COMMON/TEMPLATES/OPENAPI_STUB.yaml +11 -0
- data/templates/EXECUTE/00_PRD.md +36 -0
- data/templates/EXECUTE/01_NFRS.md +27 -0
- data/templates/EXECUTE/02A_ARCH_GATE_QUESTIONS.md +13 -0
- data/templates/EXECUTE/02_ARCHITECTURE.md +42 -0
- data/templates/EXECUTE/03_ADR_FACTORY.md +22 -0
- data/templates/EXECUTE/04_DOMAIN_DECOMPOSITION.md +24 -0
- data/templates/EXECUTE/05_CONTRACTS.md +27 -0
- data/templates/EXECUTE/06_THREAT_MODEL.md +23 -0
- data/templates/EXECUTE/07_TEST_PLAN.md +24 -0
- data/templates/EXECUTE/08_TASKS.md +29 -0
- data/templates/EXECUTE/09_SCAFFOLDING_DEVEX.md +25 -0
- data/templates/EXECUTE/10_IMPLEMENTATION_AGENT.md +30 -0
- data/templates/EXECUTE/11_STATIC_ANALYSIS.md +22 -0
- data/templates/EXECUTE/12_OBSERVABILITY_SLOS.md +21 -0
- data/templates/EXECUTE/13_DELIVERY_ROLLOUT.md +21 -0
- data/templates/EXECUTE/14_DOCS_PORTAL.md +23 -0
- data/templates/EXECUTE/15_POST_RELEASE.md +25 -0
- metadata +301 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 15737cc2920d4af142a562df51e1acd5951625e836584f62dca3d30f7eb51a81
|
4
|
+
data.tar.gz: a8243c124ab94cc09f775088cbb62faf6f6fa558f3c6a78bbf52b455d3b446f5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: db054e792e7c69e22ea2ccda883674e9045febe6907e7d8a9ffc925db952c98e253303d883b3dbb744b079255ea554b66448bdd3eaf6ce0a60130c09ddac6868
|
7
|
+
data.tar.gz: 4ebe66fadbdef39a5ddad1df6fb7790b86a16a0fef306636b00b7154dc5191c403763484d1448b21c89daf0c5f22c9a39cda1bc7fe2668e632b817951a4d9a3a
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Bart Agapinan
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,210 @@
|
|
1
|
+
# AI Dev Pipeline (aidp) - Ruby Gem
|
2
|
+
|
3
|
+
A portable CLI that automates a complete AI development workflow from idea to implementation using your existing IDE assistants.
|
4
|
+
|
5
|
+
## Quick Start
|
6
|
+
|
7
|
+
```bash
|
8
|
+
# Install the gem
|
9
|
+
gem install aidp
|
10
|
+
|
11
|
+
# Navigate to your project
|
12
|
+
cd /your/project
|
13
|
+
|
14
|
+
# Start the workflow
|
15
|
+
aidp execute next
|
16
|
+
```
|
17
|
+
|
18
|
+
## User Workflow
|
19
|
+
|
20
|
+
The gem automates a complete development pipeline with **human-in-the-loop gates** at key decision points. Here's the simplest workflow:
|
21
|
+
|
22
|
+
### 1. Start Your Project
|
23
|
+
|
24
|
+
```bash
|
25
|
+
cd /your/project
|
26
|
+
aidp status # Check current progress
|
27
|
+
aidp execute next # Run the next pending step
|
28
|
+
```
|
29
|
+
|
30
|
+
### 2. Handle Gate Steps
|
31
|
+
|
32
|
+
When you reach a **gate step** (PRD, Architecture, Tasks, Implementation), the AI will:
|
33
|
+
|
34
|
+
1. **Generate questions** in a file (e.g., `PRD_QUESTIONS.md`) if it needs more information
|
35
|
+
2. **Create the main output** (e.g., `docs/PRD.md`)
|
36
|
+
3. **Wait for your approval** before proceeding
|
37
|
+
|
38
|
+
**Your actions at gates:**
|
39
|
+
|
40
|
+
```bash
|
41
|
+
# Review the generated files
|
42
|
+
cat PRD_QUESTIONS.md # Check if AI needs more information
|
43
|
+
cat docs/PRD.md # Review the output
|
44
|
+
|
45
|
+
# If PRD_QUESTIONS.md exists, answer the questions:
|
46
|
+
# Edit the questions file directly with your answers
|
47
|
+
nano PRD_QUESTIONS.md # Add your answers below each question
|
48
|
+
|
49
|
+
# Re-run the step to use your answers
|
50
|
+
aidp execute prd # AI will read your answers and complete the step
|
51
|
+
|
52
|
+
# Once satisfied with the output, approve and continue
|
53
|
+
aidp approve current # Mark the step complete
|
54
|
+
aidp execute next # Continue to next step
|
55
|
+
```
|
56
|
+
|
57
|
+
### 3. Continue the Pipeline
|
58
|
+
|
59
|
+
For non-gate steps, the AI runs automatically:
|
60
|
+
|
61
|
+
```bash
|
62
|
+
aidp execute next # Run next step automatically
|
63
|
+
aidp status # Check progress
|
64
|
+
```
|
65
|
+
|
66
|
+
### 4. Complete the Workflow
|
67
|
+
|
68
|
+
The pipeline includes 15 steps total:
|
69
|
+
|
70
|
+
- **Gates**: PRD, Architecture, Tasks, Implementation (require approval)
|
71
|
+
- **Auto**: NFRs, ADRs, Domains, Contracts, Threat Model, Test Plan, Scaffolding, Static Analysis, Observability, Delivery, Docs Portal, Post-Release
|
72
|
+
|
73
|
+
## Key Commands
|
74
|
+
|
75
|
+
```bash
|
76
|
+
aidp status # Show progress of all steps
|
77
|
+
aidp execute next # Run next pending step
|
78
|
+
aidp approve current # Approve current gate step
|
79
|
+
aidp detect # See which AI provider will be used
|
80
|
+
aidp execute <step> # Run specific step (e.g., prd, arch, tasks)
|
81
|
+
aidp approve <step> # Approve specific step
|
82
|
+
aidp reset # Reset all progress (start over)
|
83
|
+
```
|
84
|
+
|
85
|
+
## AI Providers
|
86
|
+
|
87
|
+
The gem automatically detects and uses the best available AI provider:
|
88
|
+
|
89
|
+
- **Cursor CLI** (`cursor-agent`) - Preferred
|
90
|
+
- **Claude CLI** (`claude`/`claude-code`) - Fallback
|
91
|
+
- **Gemini CLI** (`gemini`/`gemini-cli`) - Fallback
|
92
|
+
|
93
|
+
### Override Provider
|
94
|
+
|
95
|
+
```bash
|
96
|
+
AIDP_PROVIDER=anthropic aidp execute next
|
97
|
+
AIDP_LLM_CMD=/usr/local/bin/claude aidp execute next
|
98
|
+
```
|
99
|
+
|
100
|
+
## File-Based Interaction
|
101
|
+
|
102
|
+
At gate steps, the AI creates files for interaction instead of requiring real-time chat:
|
103
|
+
|
104
|
+
- **Questions files**: `PRD_QUESTIONS.md`, `ARCH_QUESTIONS.md`, `TASKS_QUESTIONS.md`, `IMPL_QUESTIONS.md` - Contains questions if AI needs more information
|
105
|
+
- **Output files**: `docs/PRD.md`, `docs/Architecture.md` - Review and edit as needed
|
106
|
+
- **Progress tracking**: `.aidp-progress.yml` - Tracks completion status
|
107
|
+
|
108
|
+
### Answering Questions
|
109
|
+
|
110
|
+
When the AI creates a questions file, follow these steps:
|
111
|
+
|
112
|
+
1. **Edit the file directly**: Add your answers below each question in the file
|
113
|
+
2. **Re-run the step**: The AI will read your answers and complete the step
|
114
|
+
3. **Approve when satisfied**: Mark the step complete and continue
|
115
|
+
|
116
|
+
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.
|
117
|
+
|
118
|
+
## Debug and Logging
|
119
|
+
|
120
|
+
```bash
|
121
|
+
# Enable debug output to see AI provider communication
|
122
|
+
AIDP_DEBUG=1 aidp execute next
|
123
|
+
|
124
|
+
# Log to a file for debugging
|
125
|
+
AIDP_LOG_FILE=aidp.log aidp execute next
|
126
|
+
|
127
|
+
# Combine both for full debugging
|
128
|
+
AIDP_DEBUG=1 AIDP_LOG_FILE=aidp.log aidp execute next
|
129
|
+
```
|
130
|
+
|
131
|
+
## Workflow Example
|
132
|
+
|
133
|
+
Here's a typical session:
|
134
|
+
|
135
|
+
```bash
|
136
|
+
# 1. Start the workflow
|
137
|
+
aidp execute next
|
138
|
+
# → Creates docs/PRD.md and PRD_QUESTIONS.md
|
139
|
+
|
140
|
+
# 2. Review the questions (if any)
|
141
|
+
cat PRD_QUESTIONS.md
|
142
|
+
# → If questions exist, edit the file with your answers, then re-run
|
143
|
+
|
144
|
+
# 3. Review the PRD
|
145
|
+
cat docs/PRD.md
|
146
|
+
# → Edit if needed
|
147
|
+
|
148
|
+
# 4. Approve and continue
|
149
|
+
aidp approve current
|
150
|
+
aidp execute next
|
151
|
+
# → Creates docs/NFRs.md automatically
|
152
|
+
|
153
|
+
# 5. Continue through gates
|
154
|
+
aidp execute next
|
155
|
+
# → Creates docs/Architecture.md and ARCH_QUESTIONS.md
|
156
|
+
# → Repeat review/approve cycle
|
157
|
+
```
|
158
|
+
|
159
|
+
## Development
|
160
|
+
|
161
|
+
```bash
|
162
|
+
# Install dependencies
|
163
|
+
bundle install
|
164
|
+
|
165
|
+
# Run tests
|
166
|
+
bundle exec rspec
|
167
|
+
|
168
|
+
# Run linter
|
169
|
+
bundle exec standardrb
|
170
|
+
|
171
|
+
# Auto-fix linting issues
|
172
|
+
bundle exec standardrb --fix
|
173
|
+
|
174
|
+
# Build gem
|
175
|
+
bundle exec rake build
|
176
|
+
```
|
177
|
+
|
178
|
+
## Contributing
|
179
|
+
|
180
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and conventional commit guidelines.
|
181
|
+
|
182
|
+
## Pipeline Steps
|
183
|
+
|
184
|
+
The gem automates a complete 15-step development pipeline:
|
185
|
+
|
186
|
+
### Gate Steps (Require Approval)
|
187
|
+
|
188
|
+
- **PRD** → Product Requirements Document (`docs/PRD.md`)
|
189
|
+
- **Architecture** → System architecture and ADRs (`docs/Architecture.md`)
|
190
|
+
- **Tasks** → Implementation tasks and backlog (`tasks/backlog.yaml`)
|
191
|
+
- **Implementation** → Implementation strategy and guidance (`docs/ImplementationGuide.md`)
|
192
|
+
|
193
|
+
### Automatic Steps
|
194
|
+
|
195
|
+
- **NFRs** → Non-Functional Requirements (`docs/NFRs.md`)
|
196
|
+
- **ADRs** → Architecture Decision Records (`docs/adr/`)
|
197
|
+
- **Domains** → Domain decomposition (`docs/DomainCharters/`)
|
198
|
+
- **Contracts** → API/Event contracts (`contracts/`)
|
199
|
+
- **Threat Model** → Security analysis (`docs/ThreatModel.md`)
|
200
|
+
- **Test Plan** → Testing strategy (`docs/TestPlan.md`)
|
201
|
+
- **Scaffolding** → Project structure guidance (`docs/ScaffoldingGuide.md`)
|
202
|
+
- **Static Analysis** → Code quality tools (`docs/StaticAnalysis.md`)
|
203
|
+
- **Observability** → Monitoring and SLOs (`docs/Observability.md`)
|
204
|
+
- **Delivery** → Deployment strategy (`docs/DeliveryPlan.md`)
|
205
|
+
- **Docs Portal** → Documentation portal (`docs/DocsPortalPlan.md`)
|
206
|
+
- **Post-Release** → Post-release analysis (`docs/PostReleaseReport.md`)
|
207
|
+
|
208
|
+
## Manual Workflow (Alternative)
|
209
|
+
|
210
|
+
The gem packages markdown prompts that can also be used directly with Cursor or any LLM. See the `templates/` directory for the individual prompt files that can be run manually.
|
data/bin/aidp
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aidp
|
4
|
+
module Analyze
|
5
|
+
# Defines AI agent personas for analyze mode
|
6
|
+
class AgentPersonas
|
7
|
+
PERSONAS = {
|
8
|
+
"Repository Analyst" => {
|
9
|
+
"name" => "Repository Analyst",
|
10
|
+
"description" => "Expert in analyzing version control data, code evolution patterns, and repository metrics. Specializes in identifying hotspots, technical debt, and code quality trends over time.",
|
11
|
+
"expertise" => ["Git analysis", "Code metrics", "Temporal patterns", "Hotspot identification"],
|
12
|
+
"tools" => ["Code Maat", "Git log analysis", "Statistical analysis"]
|
13
|
+
},
|
14
|
+
"Architecture Analyst" => {
|
15
|
+
"name" => "Architecture Analyst",
|
16
|
+
"description" => "Senior architect with deep understanding of software architecture patterns, design principles, and system design. Focuses on structural analysis, dependency mapping, and architectural recommendations.",
|
17
|
+
"expertise" => ["System architecture", "Design patterns", "Dependency analysis", "Scalability assessment"],
|
18
|
+
"tools" => ["Architecture diagrams", "Dependency graphs", "Pattern recognition"]
|
19
|
+
},
|
20
|
+
"Test Analyst" => {
|
21
|
+
"name" => "Test Analyst",
|
22
|
+
"description" => "Quality assurance expert specializing in test coverage analysis, testing strategies, and test infrastructure assessment. Identifies testing gaps and recommends improvements.",
|
23
|
+
"expertise" => ["Test coverage", "Testing strategies", "Test infrastructure", "Quality metrics"],
|
24
|
+
"tools" => ["Coverage analysis", "Test frameworks", "Quality assessment"]
|
25
|
+
},
|
26
|
+
"Functionality Analyst" => {
|
27
|
+
"name" => "Functionality Analyst",
|
28
|
+
"description" => "Business analyst and domain expert who understands application functionality, business logic, and feature mapping. Analyzes code from a functional perspective.",
|
29
|
+
"expertise" => ["Business logic", "Feature analysis", "Domain modeling", "Functional requirements"],
|
30
|
+
"tools" => ["Feature mapping", "Business logic analysis", "Domain understanding"]
|
31
|
+
},
|
32
|
+
"Documentation Analyst" => {
|
33
|
+
"name" => "Documentation Analyst",
|
34
|
+
"description" => "Technical writer and documentation specialist who evaluates documentation quality, completeness, and effectiveness. Recommends documentation improvements.",
|
35
|
+
"expertise" => ["Documentation quality", "Technical writing", "Information architecture", "User experience"],
|
36
|
+
"tools" => ["Documentation analysis", "Content assessment", "Readability metrics"]
|
37
|
+
},
|
38
|
+
"Static Analysis Expert" => {
|
39
|
+
"name" => "Static Analysis Expert",
|
40
|
+
"description" => "Code quality specialist with expertise in static analysis tools, code review practices, and quality metrics. Identifies code quality issues and tooling opportunities.",
|
41
|
+
"expertise" => ["Static analysis", "Code quality", "Tool integration", "Quality metrics"],
|
42
|
+
"tools" => ["Linters", "Static analyzers", "Quality assessment tools"]
|
43
|
+
},
|
44
|
+
"Refactoring Specialist" => {
|
45
|
+
"name" => "Refactoring Specialist",
|
46
|
+
"description" => "Refactoring expert who identifies refactoring opportunities, assesses risks, and provides step-by-step refactoring plans. Focuses on improving code maintainability.",
|
47
|
+
"expertise" => ["Refactoring techniques", "Risk assessment", "Code improvement", "Maintainability"],
|
48
|
+
"tools" => ["Refactoring tools", "Impact analysis", "Risk assessment"]
|
49
|
+
}
|
50
|
+
}.freeze
|
51
|
+
|
52
|
+
def self.get_persona(name)
|
53
|
+
PERSONAS[name]
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.list_personas
|
57
|
+
PERSONAS.keys
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.get_expertise(name)
|
61
|
+
persona = get_persona(name)
|
62
|
+
persona ? persona["expertise"] : []
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.get_tools(name)
|
66
|
+
persona = get_persona(name)
|
67
|
+
persona ? persona["tools"] : []
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|