fix: improve JSONL-only mode detection and error messages (GH #534)

- Add JSONL-only mode detection in ensureStoreActive() with context-aware
  error messages that suggest correct actions based on project state
- Improve error messages in main.go to detect JSONL presence and suggest
  appropriate solutions (bd init, --no-db flag, or config.yaml setting)
- Update documentation to use issues.jsonl as canonical filename:
  - AGENT_INSTRUCTIONS.md, README.md, resolve-beads-conflict.md
  - docs/GIT_INTEGRATION.md
- Update hook template comments to clarify issues.jsonl is canonical
  while maintaining backward compatibility for beads.jsonl

Fixes #534

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-13 11:00:41 -08:00
parent e01b7412d9
commit 5d71ca6356
9 changed files with 847 additions and 811 deletions

View File

@@ -1,13 +1,13 @@
---
description: How to resolve merge conflicts in .beads/beads.jsonl
description: How to resolve merge conflicts in .beads/issues.jsonl
---
# Resolving `beads.jsonl` Merge Conflicts
# Resolving `issues.jsonl` Merge Conflicts
If you encounter a merge conflict in `.beads/beads.jsonl` that doesn't have standard git conflict markers (or if `bd merge` failed automatically), follow this procedure.
If you encounter a merge conflict in `.beads/issues.jsonl` that doesn't have standard git conflict markers (or if `bd merge` failed automatically), follow this procedure.
## 1. Identify the Conflict
Check if `beads.jsonl` is in conflict:
Check if `issues.jsonl` is in conflict:
```powershell
git status
```
@@ -20,9 +20,9 @@ Git stores three versions of conflicted files in its index:
Extract them to temporary files:
```powershell
git show :1:.beads/beads.jsonl > beads.base.jsonl
git show :2:.beads/beads.jsonl > beads.ours.jsonl
git show :3:.beads/beads.jsonl > beads.theirs.jsonl
git show :1:.beads/issues.jsonl > beads.base.jsonl
git show :2:.beads/issues.jsonl > beads.ours.jsonl
git show :3:.beads/issues.jsonl > beads.theirs.jsonl
```
## 3. Run `bd merge` Manually
@@ -43,13 +43,13 @@ Optionally, verify the content (e.g., check for missing IDs if you suspect data
## 5. Apply the Merge
Overwrite the conflicted file with the resolved version:
```powershell
cp beads.merged.jsonl .beads/beads.jsonl
cp beads.merged.jsonl .beads/issues.jsonl
```
## 6. Cleanup and Continue
Stage the resolved file and continue the merge:
```powershell
git add .beads/beads.jsonl
git add .beads/issues.jsonl
git merge --continue
```