Project

aidp

0.0
The project is in a healthy, maintained state
Portable CLI to run a markdown-based AI dev workflow without copying prompts into projects.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 13.0
~> 3.12
~> 1.0

Runtime

~> 1.1
~> 3.2
~> 1.5
~> 1.6
~> 1.3
~> 0.23
~> 0.12
 Project Readme

AI Dev Pipeline (aidp) - Ruby Gem

A portable CLI that automates a complete AI development workflow from idea to implementation using your existing IDE assistants.

Quick Start

# Install the gem
gem install aidp

# Navigate to your project
cd /your/project

# Start the workflow
aidp execute next

User Workflow

The gem automates a complete development pipeline with human-in-the-loop gates at key decision points. Here's the simplest workflow:

1. Start Your Project

cd /your/project
aidp status                   # Check current progress
aidp execute next             # Run the next pending step

2. Handle Gate Steps

When you reach a gate step (PRD, Architecture, Tasks, Implementation), the AI will:

  1. Generate questions in a file (e.g., PRD_QUESTIONS.md) if it needs more information
  2. Create the main output (e.g., docs/PRD.md)
  3. Wait for your approval before proceeding

Your actions at gates:

# Review the generated files
cat PRD_QUESTIONS.md          # Check if AI needs more information
cat docs/PRD.md              # Review the output

# If PRD_QUESTIONS.md exists, answer the questions:
# Edit the questions file directly with your answers
nano PRD_QUESTIONS.md         # Add your answers below each question

# Re-run the step to use your answers
aidp execute prd              # AI will read your answers and complete the step

# Once satisfied with the output, approve and continue
aidp approve current          # Mark the step complete
aidp execute next             # Continue to next step

3. Continue the Pipeline

For non-gate steps, the AI runs automatically:

aidp execute next             # Run next step automatically
aidp status                   # Check progress

4. Complete the Workflow

The pipeline includes 15 steps total:

  • Gates: PRD, Architecture, Tasks, Implementation (require approval)
  • Auto: NFRs, ADRs, Domains, Contracts, Threat Model, Test Plan, Scaffolding, Static Analysis, Observability, Delivery, Docs Portal, Post-Release

Key Commands

aidp status                   # Show progress of all steps
aidp execute next             # Run next pending step
aidp approve current          # Approve current gate step
aidp detect                   # See which AI provider will be used
aidp execute <step>           # Run specific step (e.g., prd, arch, tasks)
aidp approve <step>           # Approve specific step
aidp reset                    # Reset all progress (start over)

AI Providers

The gem automatically detects and uses the best available AI provider:

  • Cursor CLI (cursor-agent) - Preferred
  • Claude CLI (claude/claude-code) - Fallback
  • Gemini CLI (gemini/gemini-cli) - Fallback

Override Provider

AIDP_PROVIDER=anthropic aidp execute next
AIDP_LLM_CMD=/usr/local/bin/claude aidp execute next

File-Based Interaction

At gate steps, the AI creates files for interaction instead of requiring real-time chat:

  • Questions files: PRD_QUESTIONS.md, ARCH_QUESTIONS.md, TASKS_QUESTIONS.md, IMPL_QUESTIONS.md - Contains questions if AI needs more information
  • Output files: docs/PRD.md, docs/Architecture.md - Review and edit as needed
  • Progress tracking: .aidp-progress.yml - Tracks completion status

Answering Questions

When the AI creates a questions file, follow these steps:

  1. Edit the file directly: Add your answers below each question in the file
  2. Re-run the step: The AI will read your answers and complete the step
  3. Approve when satisfied: Mark the step complete and continue

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.

Debug and Logging

# Enable debug output to see AI provider communication
AIDP_DEBUG=1 aidp execute next

# Log to a file for debugging
AIDP_LOG_FILE=aidp.log aidp execute next

# Combine both for full debugging
AIDP_DEBUG=1 AIDP_LOG_FILE=aidp.log aidp execute next

Workflow Example

Here's a typical session:

# 1. Start the workflow
aidp execute next
# → Creates docs/PRD.md and PRD_QUESTIONS.md

# 2. Review the questions (if any)
cat PRD_QUESTIONS.md
# → If questions exist, edit the file with your answers, then re-run

# 3. Review the PRD
cat docs/PRD.md
# → Edit if needed

# 4. Approve and continue
aidp approve current
aidp execute next
# → Creates docs/NFRs.md automatically

# 5. Continue through gates
aidp execute next
# → Creates docs/Architecture.md and ARCH_QUESTIONS.md
# → Repeat review/approve cycle

Development

# Install dependencies
bundle install

# Run tests
bundle exec rspec

# Run linter
bundle exec standardrb

# Auto-fix linting issues
bundle exec standardrb --fix

# Build gem
bundle exec rake build

Contributing

See CONTRIBUTING.md for development setup and conventional commit guidelines.

Pipeline Steps

The gem automates a complete 15-step development pipeline:

Gate Steps (Require Approval)

  • PRD → Product Requirements Document (docs/PRD.md)
  • Architecture → System architecture and ADRs (docs/Architecture.md)
  • Tasks → Implementation tasks and backlog (tasks/backlog.yaml)
  • Implementation → Implementation strategy and guidance (docs/ImplementationGuide.md)

Automatic Steps

  • NFRs → Non-Functional Requirements (docs/NFRs.md)
  • ADRs → Architecture Decision Records (docs/adr/)
  • Domains → Domain decomposition (docs/DomainCharters/)
  • Contracts → API/Event contracts (contracts/)
  • Threat Model → Security analysis (docs/ThreatModel.md)
  • Test Plan → Testing strategy (docs/TestPlan.md)
  • Scaffolding → Project structure guidance (docs/ScaffoldingGuide.md)
  • Static Analysis → Code quality tools (docs/StaticAnalysis.md)
  • Observability → Monitoring and SLOs (docs/Observability.md)
  • Delivery → Deployment strategy (docs/DeliveryPlan.md)
  • Docs Portal → Documentation portal (docs/DocsPortalPlan.md)
  • Post-Release → Post-release analysis (docs/PostReleaseReport.md)

Manual Workflow (Alternative)

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.