Auto-import from git on empty DB (bd-189)

- Add checkAndAutoImport() that detects empty DB with issues in git
- Automatically imports from git HEAD:.beads/issues.jsonl
- Integrated into list, ready, and stats commands
- Zero cognitive load for agents in fresh clones
- Makes JSONL truly the source of truth
- DB becomes ephemeral cache that auto-rebuilds

Also:
- Update AGENTS.md onboarding section with import instructions
- Merge PR #98 (enhanced .gitignore)

Amp-Thread-ID: https://ampcode.com/threads/T-ffcb5e95-e5a0-486b-a0ae-ce8bd861ab9d
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-21 14:09:11 -07:00
parent cfe15a9d34
commit 3f4878eb09
5 changed files with 406 additions and 190 deletions

View File

@@ -462,6 +462,13 @@ Happy coding! 🔗
### Quick Start
**FIRST TIME?** Import existing issues from git:
```bash
bd import -i .beads/issues.jsonl --json
# Or if issues.jsonl is empty in working tree but exists in git:
git show HEAD:.beads/issues.jsonl | bd import -i /dev/stdin --json
```
**Check for ready work:**
```bash
bd ready --json