Add Aider integration for beads issue tracking

Implements GH#206 and bd-3djj: Add support for Aider AI pair programming
tool with beads issue tracking.

Changes:
- Added cmd/bd/setup/aider.go with InstallAider, CheckAider, RemoveAider
- Created .aider.conf.yml template with bd workflow instructions
- Added .aider/README.md template with quick reference
- Updated cmd/bd/setup.go to include aider subcommand
- Fixed cmd/bd/main.go to allow setup subcommands without database by
  checking parent command name
- Added comprehensive docs/AIDER_INTEGRATION.md documentation

Key differences from Claude/Cursor integration:
- Aider requires explicit command execution via /run
- AI suggests bd commands rather than running autonomously
- Documentation emphasizes human-in-the-loop workflow
- Config instructs AI to always suggest, never execute

Usage:
  bd setup aider          # Install integration
  bd setup aider --check  # Verify installation
  bd setup aider --remove # Remove integration

Resolves bd-3djj
Related to GH#206

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-23 15:13:54 -08:00
parent ced8033979
commit 89a5752d6e
5 changed files with 627 additions and 5 deletions

View File

@@ -196,7 +196,15 @@ var rootCmd = &cobra.Command{
"version",
"zsh",
}
if slices.Contains(noDbCommands, cmd.Name()) {
// Check both the command name and parent command name for subcommands
cmdName := cmd.Name()
if cmd.Parent() != nil {
parentName := cmd.Parent().Name()
if slices.Contains(noDbCommands, parentName) {
return
}
}
if slices.Contains(noDbCommands, cmdName) {
return
}
@@ -256,8 +264,10 @@ var rootCmd = &cobra.Command{
if foundDB := beads.FindDatabasePath(); foundDB != "" {
dbPath = foundDB
} else {
// Allow import command to auto-initialize database if missing
if cmd.Name() != "import" {
// Allow some commands to run without a database
// - import: auto-initializes database if missing
// - setup: creates editor integration files (no DB needed)
if cmd.Name() != "import" && cmd.Name() != "setup" {
// No database found - error out instead of falling back to ~/.beads
fmt.Fprintf(os.Stderr, "Error: no beads database found\n")
fmt.Fprintf(os.Stderr, "Hint: run 'bd init' to create a database in the current directory\n")
@@ -265,7 +275,7 @@ var rootCmd = &cobra.Command{
fmt.Fprintf(os.Stderr, " or set BEADS_DB to point to your database file (deprecated)\n")
os.Exit(1)
}
// For import command, set default database path
// For import/setup commands, set default database path
dbPath = filepath.Join(".beads", beads.CanonicalDatabaseName)
}
}