From 7b865eb541d1500da6e0f0f5699a6c4977544c71 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Thu, 20 Nov 2025 14:26:38 -0500 Subject: [PATCH] Remove legacy issues.jsonl and update defaults to beads.jsonl Amp-Thread-ID: https://ampcode.com/threads/T-ae11b392-24b5-4060-b431-606dd81c1763 Co-authored-by: Amp --- .beads/issues.jsonl.zombie-do-not-use | 8 -------- cmd/bd/daemon_sync_branch.go | 10 +++++----- cmd/bd/import.go | 8 ++++---- internal/beads/beads.go | 4 ++-- 4 files changed, 11 insertions(+), 19 deletions(-) delete mode 100644 .beads/issues.jsonl.zombie-do-not-use diff --git a/.beads/issues.jsonl.zombie-do-not-use b/.beads/issues.jsonl.zombie-do-not-use deleted file mode 100644 index 7a471b91..00000000 --- a/.beads/issues.jsonl.zombie-do-not-use +++ /dev/null @@ -1,8 +0,0 @@ -This file has been renamed to prevent confusion. -The canonical JSONL file is: .beads/beads.jsonl - -This file (issues.jsonl) was the original name but kept reappearing -like a zombie despite multiple attempts to remove it. - -DO NOT USE THIS FILE. -Use .beads/beads.jsonl instead. diff --git a/cmd/bd/daemon_sync_branch.go b/cmd/bd/daemon_sync_branch.go index dec2330a..a0b66d9d 100644 --- a/cmd/bd/daemon_sync_branch.go +++ b/cmd/bd/daemon_sync_branch.go @@ -64,14 +64,14 @@ func syncBranchCommitAndPush(ctx context.Context, store storage.Storage, autoPus } // Sync JSONL file to worktree - // Use hardcoded relative path since JSONL is always at .beads/issues.jsonl - jsonlRelPath := filepath.Join(".beads", "issues.jsonl") + // Use hardcoded relative path since JSONL is always at .beads/beads.jsonl + jsonlRelPath := filepath.Join(".beads", "beads.jsonl") if err := wtMgr.SyncJSONLToWorktree(worktreePath, jsonlRelPath); err != nil { return false, fmt.Errorf("failed to sync JSONL to worktree: %w", err) } // Check for changes in worktree - worktreeJSONLPath := filepath.Join(worktreePath, ".beads", "issues.jsonl") + worktreeJSONLPath := filepath.Join(worktreePath, ".beads", "beads.jsonl") hasChanges, err := gitHasChangesInWorktree(ctx, worktreePath, worktreeJSONLPath) if err != nil { return false, fmt.Errorf("failed to check for changes in worktree: %w", err) @@ -226,8 +226,8 @@ func syncBranchPull(ctx context.Context, store storage.Storage, log daemonLogger log.log("Pulled sync branch %s", syncBranch) // Copy JSONL back to main repo - worktreeJSONLPath := filepath.Join(worktreePath, ".beads", "issues.jsonl") - mainJSONLPath := filepath.Join(repoRoot, ".beads", "issues.jsonl") + worktreeJSONLPath := filepath.Join(worktreePath, ".beads", "beads.jsonl") + mainJSONLPath := filepath.Join(repoRoot, ".beads", "beads.jsonl") // Check if worktree JSONL exists if _, err := os.Stat(worktreeJSONLPath); os.IsNotExist(err) { diff --git a/cmd/bd/import.go b/cmd/bd/import.go index fa3e2aaa..d42b0711 100644 --- a/cmd/bd/import.go +++ b/cmd/bd/import.go @@ -118,8 +118,8 @@ NOTE: Import requires direct database access and does not work with daemon mode. if err := attemptAutoMerge(input); err != nil { fmt.Fprintf(os.Stderr, "Error: Automatic merge failed: %v\n\n", err) fmt.Fprintf(os.Stderr, "To resolve manually:\n") - fmt.Fprintf(os.Stderr, " git checkout --ours .beads/issues.jsonl && bd import -i .beads/issues.jsonl\n") - fmt.Fprintf(os.Stderr, " git checkout --theirs .beads/issues.jsonl && bd import -i .beads/issues.jsonl\n\n") + fmt.Fprintf(os.Stderr, " git checkout --ours .beads/beads.jsonl && bd import -i .beads/beads.jsonl\n") + fmt.Fprintf(os.Stderr, " git checkout --theirs .beads/beads.jsonl && bd import -i .beads/beads.jsonl\n\n") fmt.Fprintf(os.Stderr, "For advanced field-level merging, see: https://github.com/neongreen/mono/tree/main/beads-merge\n") os.Exit(1) } @@ -430,8 +430,8 @@ func checkUncommittedChanges(filePath string, result *ImportResult) { // Get line counts for context workingTreeLines := countLines(filePath) headLines := countLinesInGitHEAD(filePath, workDir) - - fmt.Fprintf(os.Stderr, "\n⚠️ Warning: .beads/issues.jsonl has uncommitted changes\n") + + fmt.Fprintf(os.Stderr, "\n⚠️ Warning: %s has uncommitted changes\n", filePath) fmt.Fprintf(os.Stderr, " Working tree: %d lines\n", workingTreeLines) if headLines > 0 { fmt.Fprintf(os.Stderr, " Git HEAD: %d lines\n", headLines) diff --git a/internal/beads/beads.go b/internal/beads/beads.go index 00b8f217..158a6a9e 100644 --- a/internal/beads/beads.go +++ b/internal/beads/beads.go @@ -242,8 +242,8 @@ func FindJSONLPath(dbPath string) string { return matches[0] } - // Default to issues.jsonl - return filepath.Join(dbDir, "issues.jsonl") + // Default to beads.jsonl + return filepath.Join(dbDir, "beads.jsonl") } // DatabaseInfo contains information about a discovered beads database