docs/AIDER_INTEGRATION.md
This guide explains how to integrate Aider with Beads for AI-assisted coding with issue tracking.
Aider is an AI pair programming tool that works in your terminal. Unlike autonomous AI agents like Claude Code, Aider requires explicit user confirmation to run commands via the /run command.
The beads integration for Aider:
.aider.conf.yml with bd workflow instructions.aider/README.md with quick reference# Install beads CLI
go install github.com/steveyegge/beads/cmd/bd@latest
# Initialize in your project
cd your-project
bd init --quiet
# Install aider integration files
bd setup aider
# Verify installation
bd setup aider --check
This creates:
.aider.conf.yml - Instructions for the AI about bd workflow.aider/README.md - Quick reference guide# Install aider via pip
pip install aider-chat
# Or via pipx (recommended)
pipx install aider-chat
Start aider in your project:
cd your-project
aider
Ask the AI about available work:
You: What issues are ready to work on?
Aider: Let me check the available work. Run:
/run bd ready
Run the suggested command:
/run bd ready
Choose an issue and ask AI to claim it:
You: Let's work on bd-42
Aider: Great choice! To claim it, run:
/run bd update bd-42 --claim
The AI will suggest appropriate bd commands as you work:
Create issues for bugs you find:
You: I found a bug in the auth code
Aider: Let's track that. Run:
/run bd create "Fix auth bug in login handler" --description="Login fails with 500 when password contains quotes" -t bug -p 1
Link discovered work:
Aider: Since we found this while working on bd-42, run:
/run bd create "Fix auth bug" --description="..." -p 1 --deps discovered-from:bd-42
Check issue details:
/run bd show bd-42
When you're done:
You: This issue is complete
Aider: Great! Mark it complete by running:
/run bd close bd-42 --reason "Implemented login fix and added tests"
Then sync to git:
/run bd dolt push
The config file contains instructions for the AI:
# Core workflow rules:
# 1. Track ALL work in bd (never use markdown TODOs)
# 2. Suggest 'bd ready' to find available work
# 3. Suggest 'bd create' for new issues/tasks/bugs
# 4. Suggest 'bd dolt push' at end of session
# 5. ALWAYS suggest commands - user will run them via /run
You can customize this file to add project-specific instructions.
Aider commands start with / and control aider itself:
/run <command> - Run a shell command/add <file> - Add file to context/help - Show aider helpbd commands are run via /run:
/run bd ready - Check available work/run bd create "..." - Create an issue/run bd show bd-42 - View issue details# Check what's available
/run bd ready
# Claim an issue
/run bd update bd-abc --claim
# Create a new issue
/run bd create "Refactor auth module" --description="Current auth code has tight coupling" -t task -p 2
# Link it to current work
/run bd dep add bd-new --type discovered-from --target bd-abc
# Close the issue
/run bd close bd-abc --reason "Implemented and tested"
# Sync to git
/run bd dolt push
# View issue details
/run bd show bd-abc
# List all open issues
/run bd list --status=open
# Check dependencies
/run bd dep tree bd-abc
/runBoth approaches work well with beads! Choose based on your preference for automation vs. control.
Instead of running commands yourself, ask the AI:
You: How do I check what work is available?
Aider: Run `/run bd ready` to see all unblocked issues
The AI knows the bd workflow and will suggest appropriate commands:
You: I'm starting work on the login feature
Aider: First, let's claim it. Run:
/run bd update bd-xyz --claim
Get the full workflow guide:
/run bd prime
The AI will read this and have complete context about bd commands.
Add to your shell config for faster commands:
alias bdr='/run bd ready'
alias bdc='/run bd create'
alias bds='/run bd dolt push'
Then in aider:
bdr # Instead of /run bd ready
bdc "Fix bug" -t bug # Instead of /run bd create "Fix bug" -t bug
Check that .aider.conf.yml exists:
bd setup aider --check
Reload aider to pick up the config:
# Exit aider (Ctrl-D or /exit)
# Restart aider
aider
Explicitly ask about bd:
You: What should I use for issue tracking?
Aider: This project uses Beads (bd) for issue tracking...
Make sure you're in a beads-initialized directory:
/run bd doctor
If not initialized:
/run bd init --quiet
bd setup aider --remove
This removes .aider.conf.yml and .aider/README.md.
Aider can track multiple files. Combine with bd:
You: Add the auth files to context and check for related issues
/run bd list --json | grep -i auth
/add src/auth/*.py
Run multiple bd commands in sequence:
# In your shell (not aider)
bd ready && bd show bd-42 && bd update bd-42 --claim
Aider handles git commits. bd tracks issues. They work together:
/run bd update bd-42 --claim/run bd close bd-42/run bd dolt push$ aider
You: What issues are ready to work on?
Aider: Let me check. Run:
/run bd ready
📋 Ready work (3 issues with no blockers):
1. [P1] bd-42: Fix login bug
2. [P2] bd-99: Add password reset
3. [P3] bd-17: Refactor auth tests
You: Let's work on bd-42
Aider: Great! First claim it:
/run bd update bd-42 --claim
You: Can you show me the details?
Aider: Run:
/run bd show bd-42
[Shows issue details]
You: Ok, add the auth files to context
Aider: Added src/auth/login.py and src/auth/utils.py
You: Fix the bug described in the issue
[Aider makes the changes]
You: Looks good! Mark it complete
Aider: Run:
/run bd close bd-42 --reason "Fixed login bug - added input validation"
Then sync:
/run bd dolt push