Files
beads/.beads
Steve Yegge d1641c7d2e Fix bd-afd: Auto-fix metadata.json jsonl_export mismatch
## Summary

When metadata.json gets deleted (git clean, merge conflict, rebase), the
version tracking code auto-recreates it using DefaultConfig() which hardcoded
jsonl_export to 'issues.jsonl'. But many repos (including beads itself) use
'beads.jsonl', causing a mismatch between config and actual JSONL file.

## Changes

1. **bd doctor --fix auto-detection** (cmd/bd/doctor/fix/database_config.go)
   - New DatabaseConfig() fix function that auto-detects actual JSONL file
   - Prefers beads.jsonl over issues.jsonl (canonical name)
   - Skips backup files and merge artifacts
   - Wired into doctor.go applyFixes()

2. **Version tracking auto-detection** (cmd/bd/version_tracking.go)
   - trackBdVersion() now scans for existing JSONL files before defaulting
   - Prevents mismatches when metadata.json gets recreated
   - Added findActualJSONLFile() helper function

3. **Canonical default name** (internal/configfile/configfile.go)
   - DefaultConfig() changed from issues.jsonl to beads.jsonl
   - Aligns with canonical naming convention

4. **FindJSONLPath preference** (internal/beads/beads.go)
   - Now prefers beads.jsonl over issues.jsonl when scanning
   - Default changed from issues.jsonl to beads.jsonl

5. **Test coverage**
   - Added comprehensive tests for DatabaseConfig fix
   - Updated configfile tests for new default
   - Verified backup file skipping logic

## Testing

- All existing tests pass
- New tests verify auto-fix behavior
- Integration tested with simulated mismatches

Closes: bd-afd
2025-11-23 23:11:08 -08:00
..
2025-11-23 18:06:25 -08:00

Beads - AI-Native Issue Tracking

Welcome to Beads! This repository uses Beads for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.

What is Beads?

Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.

Learn more: github.com/steveyegge/beads

Quick Start

Essential Commands

# Create new issues
bd create "Add user authentication"

# View all issues
bd list

# View issue details
bd show <issue-id>

# Update issue status
bd update <issue-id> --status in-progress
bd update <issue-id> --status done

# Sync with git remote
bd sync

Working with Issues

Issues in Beads are:

  • Git-native: Stored in .beads/issues.jsonl and synced like code
  • AI-friendly: CLI-first design works perfectly with AI coding agents
  • Branch-aware: Issues can follow your branch workflow
  • Always in sync: Auto-syncs with your commits

Why Beads?

AI-Native Design

  • Built specifically for AI-assisted development workflows
  • CLI-first interface works seamlessly with AI coding agents
  • No context switching to web UIs

🚀 Developer Focused

  • Issues live in your repo, right next to your code
  • Works offline, syncs when you push
  • Fast, lightweight, and stays out of your way

🔧 Git Integration

  • Automatic sync with git commits
  • Branch-aware issue tracking
  • Intelligent JSONL merge resolution

Get Started with Beads

Try Beads in your own projects:

# Install Beads
curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash

# Initialize in your repo
bd init

# Create your first issue
bd create "Try out Beads"

Learn More


Beads: Issue tracking that moves at the speed of thought