···11+# SQLite databases
22+*.db
33+*.db?*
44+*.db-journal
55+*.db-wal
66+*.db-shm
77+88+# Daemon runtime files
99+daemon.lock
1010+daemon.log
1111+daemon.pid
1212+bd.sock
1313+sync-state.json
1414+last-touched
1515+1616+# Local version tracking (prevents upgrade notification spam after git ops)
1717+.local_version
1818+1919+# Legacy database files
2020+db.sqlite
2121+bd.db
2222+2323+# Worktree redirect file (contains relative path to main repo's .beads/)
2424+# Must not be committed as paths would be wrong in other clones
2525+redirect
2626+2727+# Merge artifacts (temporary files from 3-way merge)
2828+beads.base.jsonl
2929+beads.base.meta.json
3030+beads.left.jsonl
3131+beads.left.meta.json
3232+beads.right.jsonl
3333+beads.right.meta.json
3434+3535+# NOTE: Do NOT add negation patterns (e.g., !issues.jsonl) here.
3636+# They would override fork protection in .git/info/exclude, allowing
3737+# contributors to accidentally commit upstream issue databases.
3838+# The JSONL files (issues.jsonl, interactions.jsonl) and config files
3939+# are tracked by git by default since no pattern above ignores them.
+81
.beads/README.md
···11+# Beads - AI-Native Issue Tracking
22+33+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.
44+55+## What is Beads?
66+77+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.
88+99+**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
1010+1111+## Quick Start
1212+1313+### Essential Commands
1414+1515+```bash
1616+# Create new issues
1717+bd create "Add user authentication"
1818+1919+# View all issues
2020+bd list
2121+2222+# View issue details
2323+bd show <issue-id>
2424+2525+# Update issue status
2626+bd update <issue-id> --status in_progress
2727+bd update <issue-id> --status done
2828+2929+# Sync with git remote
3030+bd sync
3131+```
3232+3333+### Working with Issues
3434+3535+Issues in Beads are:
3636+- **Git-native**: Stored in `.beads/issues.jsonl` and synced like code
3737+- **AI-friendly**: CLI-first design works perfectly with AI coding agents
3838+- **Branch-aware**: Issues can follow your branch workflow
3939+- **Always in sync**: Auto-syncs with your commits
4040+4141+## Why Beads?
4242+4343+✨ **AI-Native Design**
4444+- Built specifically for AI-assisted development workflows
4545+- CLI-first interface works seamlessly with AI coding agents
4646+- No context switching to web UIs
4747+4848+🚀 **Developer Focused**
4949+- Issues live in your repo, right next to your code
5050+- Works offline, syncs when you push
5151+- Fast, lightweight, and stays out of your way
5252+5353+🔧 **Git Integration**
5454+- Automatic sync with git commits
5555+- Branch-aware issue tracking
5656+- Intelligent JSONL merge resolution
5757+5858+## Get Started with Beads
5959+6060+Try Beads in your own projects:
6161+6262+```bash
6363+# Install Beads
6464+curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
6565+6666+# Initialize in your repo
6767+bd init
6868+6969+# Create your first issue
7070+bd create "Try out Beads"
7171+```
7272+7373+## Learn More
7474+7575+- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
7676+- **Quick Start Guide**: Run `bd quickstart`
7777+- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)
7878+7979+---
8080+8181+*Beads: Issue tracking that moves at the speed of thought* ⚡
+62
.beads/config.yaml
···11+# Beads Configuration File
22+# This file configures default behavior for all bd commands in this repository
33+# All settings can also be set via environment variables (BD_* prefix)
44+# or overridden with command-line flags
55+66+# Issue prefix for this repository (used by bd init)
77+# If not set, bd init will auto-detect from directory name
88+# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
99+# issue-prefix: ""
1010+1111+# Use no-db mode: load from JSONL, no SQLite, write back after each command
1212+# When true, bd will use .beads/issues.jsonl as the source of truth
1313+# instead of SQLite database
1414+# no-db: false
1515+1616+# Disable daemon for RPC communication (forces direct database access)
1717+# no-daemon: false
1818+1919+# Disable auto-flush of database to JSONL after mutations
2020+# no-auto-flush: false
2121+2222+# Disable auto-import from JSONL when it's newer than database
2323+# no-auto-import: false
2424+2525+# Enable JSON output by default
2626+# json: false
2727+2828+# Default actor for audit trails (overridden by BD_ACTOR or --actor)
2929+# actor: ""
3030+3131+# Path to database (overridden by BEADS_DB or --db)
3232+# db: ""
3333+3434+# Auto-start daemon if not running (can also use BEADS_AUTO_START_DAEMON)
3535+# auto-start-daemon: true
3636+3737+# Debounce interval for auto-flush (can also use BEADS_FLUSH_DEBOUNCE)
3838+# flush-debounce: "5s"
3939+4040+# Git branch for beads commits (bd sync will commit to this branch)
4141+# IMPORTANT: Set this for team projects so all clones use the same sync branch.
4242+# This setting persists across clones (unlike database config which is gitignored).
4343+# Can also use BEADS_SYNC_BRANCH env var for local override.
4444+# If not set, bd sync will require you to run 'bd config set sync.branch <branch>'.
4545+# sync-branch: "beads-sync"
4646+4747+# Multi-repo configuration (experimental - bd-307)
4848+# Allows hydrating from multiple repositories and routing writes to the correct JSONL
4949+# repos:
5050+# primary: "." # Primary repo (where this database lives)
5151+# additional: # Additional repos to hydrate from (read-only)
5252+# - ~/beads-planning # Personal planning repo
5353+# - ~/work-planning # Work planning repo
5454+5555+# Integration settings (access with 'bd config get/set')
5656+# These are stored in the database, not in this file:
5757+# - jira.url
5858+# - jira.project
5959+# - linear.url
6060+# - linear.api-key
6161+# - github.org
6262+# - github.repo
.beads/interactions.jsonl
This is a binary file and will not be displayed.
+12
.beads/issues.jsonl
···11+{"id":"is-tree-00n","title":"Add --workparent flag and column","description":"Add workparent column showing the directory name of the workparent (without path) for worktrees.","status":"open","priority":3,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:40.245737161-05:00","created_by":"rektide","updated_at":"2026-01-08T20:44:48.135512658-05:00","dependencies":[{"issue_id":"is-tree-00n","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:51.545126882-05:00","created_by":"rektide"}]}
22+{"id":"is-tree-070","title":"Add --date flag for date format specification","description":"Add -date flag for specifying date format string, default to ISO 8601.","status":"open","priority":3,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:34.7246953-05:00","created_by":"rektide","updated_at":"2026-01-08T20:44:46.808971954-05:00","dependencies":[{"issue_id":"is-tree-070","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:50.416305393-05:00","created_by":"rektide"}]}
33+{"id":"is-tree-1hz","title":"Add --change-date flag and column","description":"Add change-date column showing the most recent file change date for each repository.","status":"open","priority":3,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:36.238982256-05:00","created_by":"rektide","updated_at":"2026-01-08T20:44:47.650039629-05:00","dependencies":[{"issue_id":"is-tree-1hz","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:51.170223198-05:00","created_by":"rektide"}]}
44+{"id":"is-tree-3rl","title":"Add --reverse/-R flag for reversing sort order","description":"Add --reverse/-R flag to reverse the sort order of results.","status":"closed","priority":3,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:25.164452341-05:00","created_by":"rektide","updated_at":"2026-01-08T20:45:09.26853254-05:00","closed_at":"2026-01-08T20:45:09.26853254-05:00","close_reason":"Removed from spec - reverse functionality replaced with +/- suffixes on sort columns","dependencies":[{"issue_id":"is-tree-3rl","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:49.671575997-05:00","created_by":"rektide"}]}
55+{"id":"is-tree-b47","title":"Add --all/-a flag for testing all directories","description":"Add -all/-a flag to test all directories in the current path.","status":"open","priority":3,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:13.284435802-05:00","created_by":"rektide","updated_at":"2026-01-08T20:44:39.979880568-05:00","dependencies":[{"issue_id":"is-tree-b47","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:48.410347085-05:00","created_by":"rektide"}]}
66+{"id":"is-tree-bdv","title":"Add --sort flag for sorting results","description":"Add -sort flag for sorting results by any column, with comma-separated multiple sorts and +/- suffixes for direction.","status":"open","priority":3,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:24.45670004-05:00","created_by":"rektide","updated_at":"2026-01-08T20:44:41.012519597-05:00","dependencies":[{"issue_id":"is-tree-bdv","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:49.294378668-05:00","created_by":"rektide"}]}
77+{"id":"is-tree-e8o","title":"Add --filter flag for type filtering","description":"Add -filter flag to filter results by type: git, jj, worktree, worktree-git, worktree-jj.","status":"open","priority":3,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:14.101564202-05:00","created_by":"rektide","updated_at":"2026-01-08T20:44:40.475782286-05:00","dependencies":[{"issue_id":"is-tree-e8o","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:48.770131028-05:00","created_by":"rektide"}]}
88+{"id":"is-tree-sro","title":"Add --commit-date flag and column","description":"Add commit-date column showing the most recent commit date for each repository.","status":"open","priority":3,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:35.59115589-05:00","created_by":"rektide","updated_at":"2026-01-08T20:44:47.252980365-05:00","dependencies":[{"issue_id":"is-tree-sro","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:50.789560287-05:00","created_by":"rektide"}]}
99+{"id":"is-tree-uh7","title":"Implement basic Git and Jujutsu detection","description":"Implement basic directory detection logic for Git and Jujutsu repositories and worktrees.","status":"open","priority":2,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:12.309327226-05:00","created_by":"rektide","updated_at":"2026-01-08T20:41:12.309327226-05:00","dependencies":[{"issue_id":"is-tree-uh7","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:48.068150262-05:00","created_by":"rektide"}]}
1010+{"id":"is-tree-vv0","title":"Add --json flag for JSON output","description":"Add -json flag to output results in JSON format as an array of objects with all columns as fields.","status":"open","priority":3,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:43.099902307-05:00","created_by":"rektide","updated_at":"2026-01-08T20:44:56.124813305-05:00","dependencies":[{"issue_id":"is-tree-vv0","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:51.929114842-05:00","created_by":"rektide"}]}
1111+{"id":"is-tree-wsl","title":"Add --format flag for custom output format","description":"Add -format flag for custom output format with interpolated columns: status, directory, commit-date, change-date, workparent.","status":"open","priority":3,"issue_type":"task","assignee":"opencode","created_at":"2026-01-08T20:41:27.778302538-05:00","created_by":"rektide","updated_at":"2026-01-08T20:44:46.289183418-05:00","dependencies":[{"issue_id":"is-tree-wsl","depends_on_id":"is-tree-xxv","type":"parent-child","created_at":"2026-01-08T20:41:50.040861907-05:00","created_by":"rektide"}]}
1212+{"id":"is-tree-xxv","title":"Command Options Epic","description":"Implement all CLI command options for is-tree including sorting, filtering, formatting, and output options.","status":"open","priority":2,"issue_type":"epic","created_at":"2026-01-08T20:40:57.497406738-05:00","created_by":"rektide","updated_at":"2026-01-08T20:40:57.497406738-05:00"}
···11+22+# Use bd merge for beads JSONL files
33+.beads/issues.jsonl merge=beads
+40
AGENTS.md
···11+# Agent Instructions
22+33+This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started.
44+55+## Quick Reference
66+77+```bash
88+bd ready # Find available work
99+bd show <id> # View issue details
1010+bd update <id> --status in_progress # Claim work
1111+bd close <id> # Complete work
1212+bd sync # Sync with git
1313+```
1414+1515+## Landing the Plane (Session Completion)
1616+1717+**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
1818+1919+**MANDATORY WORKFLOW:**
2020+2121+1. **File issues for remaining work** - Create issues for anything that needs follow-up
2222+2. **Run quality gates** (if code changed) - Tests, linters, builds
2323+3. **Update issue status** - Close finished work, update in-progress items
2424+4. **PUSH TO REMOTE** - This is MANDATORY:
2525+ ```bash
2626+ git pull --rebase
2727+ bd sync
2828+ git push
2929+ git status # MUST show "up to date with origin"
3030+ ```
3131+5. **Clean up** - Clear stashes, prune remote branches
3232+6. **Verify** - All changes committed AND pushed
3333+7. **Hand off** - Provide context for next session
3434+3535+**CRITICAL RULES:**
3636+- Work is NOT complete until `git push` succeeds
3737+- NEVER stop before pushing - that leaves work stranded locally
3838+- NEVER say "ready to push when you are" - YOU must push
3939+- If push fails, resolve and retry until it succeeds
4040+
+107
README.md
···11+# is-tree
22+33+> CLI utility to detect and classify Git and Jujutsu repositories
44+55+## Usage
66+77+```bash
88+# Test a specific directory
99+is-tree ~/src/compfuzor
1010+1111+# Test all directories in current path with --all/-a
1212+is-tree --all
1313+1414+# Filter for specific types
1515+is-tree --all --filter git
1616+is-tree --all --filter jj
1717+is-tree --all --filter worktree
1818+is-tree --all --filter worktree-git
1919+is-tree --all --filter worktree-jj
2020+2121+# Test specific directories by positional arguments
2222+is-tree ~/src/compfuzor ~/src/niri-mcp
2323+2424+# Sort by any column (use + for ascending, - for descending)
2525+is-tree --all --sort change-date-
2626+is-tree --all --sort commit-date+
2727+is-tree --all --sort workparent,directory+
2828+2929+# Multiple sorts (comma-separated)
3030+is-tree --all --sort status-,change-date+
3131+3232+# Custom output format with interpolated columns
3333+is-tree --all --format "{status} {directory} {commit-date} {change-date} {workparent}"
3434+3535+# Output as JSON
3636+is-tree --all --json
3737+3838+# Custom date format
3939+is-tree --all --date "%Y-%m-%d %H:%M:%S"
4040+```
4141+4242+## Options
4343+4444+- `--all`, `-a` - Test all directories in current path
4545+- `--filter <type>` - Filter results by type: `git`, `jj`, `worktree`, `worktree-git`, `worktree-jj`
4646+- `--sort <column>` - Sort by column(s). Multiple columns comma-separated. Suffix `+` for ascending, `-` for descending
4747+- `--format <string>` - Custom output format with interpolated columns
4848+- `--date <format>` - Date format string (default: ISO 8601)
4949+- `--json` - Output results in JSON format
5050+- Positional arguments - Test specific directories
5151+5252+## Output
5353+5454+Default format: `<status> <directory>`
5555+5656+### Columns
5757+Available columns for custom format:
5858+- `status` - Repository type (git, jj, worktree-git, worktree-jj, none)
5959+- `directory` - Full directory path
6060+- `workparent` - Directory name of the workparent (without path), for worktrees only
6161+- `commit-date` - Most recent commit date
6262+- `change-date` - Most recent file change date
6363+6464+### Status values
6565+- `git` - Git repository (not Jujutsu, not a worktree)
6666+- `jj` - Jujutsu repository (not a worktree)
6767+- `worktree-git` - Git worktree
6868+- `worktree-jj` - Jujutsu worktree
6969+- `none` - Not a recognized repository
7070+7171+### JSON Output
7272+When `--json` is specified, output is an array of objects with all available columns as fields.
7373+7474+## Detection
7575+7676+### Strategy Overview
7777+7878+The detection strategy uses a hierarchical approach to classify directories based on the presence and characteristics of version control metadata.
7979+8080+### Detection Logic
8181+8282+1. **Jujutsu Detection** (Primary Check)
8383+ - Check for `.jj` directory or `.jj` file (workspace)
8484+ - Jujutsu stores a `.jj` file in the workspace root that points to the actual `.jj` store location
8585+ - If `.jj` exists, this is a Jujutsu workspace
8686+8787+2. **Git Detection** (Secondary Check)
8888+ - Check for `.git` directory (regular repository)
8989+ - Check for `.git` file (worktree pointer)
9090+ - Git worktrees use a `.git` file containing `gitdir: <path>` pointing to the actual `.git` directory
9191+9292+3. **Worktree Classification**
9393+ - For Jujutsu: A directory is a worktree if it contains a `.jj` file (pointer) rather than a `.jj` directory (main workspace)
9494+ - For Git: A directory is a worktree if it contains a `.git` file (pointer) rather than a `.git` directory (main repository)
9595+9696+### Priority Rules
9797+9898+- Jujutsu takes precedence over Git when both indicators are present
9999+- Worktree classification is determined by the pointer file vs directory distinction
100100+- If neither `.git` nor `.jj` indicators are found, status is `none`
101101+102102+### Examples
103103+104104+- `~/src/compfuzor` → `git` (has `.git/` directory)
105105+- `~/src/compfuzor-x` → `worktree-git` (has `.git` file with `gitdir:` pointer)
106106+- `~/src/niri-mcp` → `jj` (has `.jj/` directory or `.jj` file in main workspace)
107107+- `~/src/niri-mcp-x` → `worktree-jj` (has `.jj` file pointing to main workspace)