diff --git a/.beads/.gitignore b/.beads/.gitignore new file mode 100644 index 00000000..7ba2a936 --- /dev/null +++ b/.beads/.gitignore @@ -0,0 +1,81 @@ +# Dolt database (managed by Dolt, not git) +dolt/ +embeddeddolt/ +proxieddb/ + +# Runtime files +bd.sock +bd.sock.startlock +sync-state.json +last-touched +.exclusive-lock + +# Daemon runtime (lock, log, pid) +daemon.* + +# Push state (runtime, per-machine) +push-state.json + +# Lock files (various runtime locks) +*.lock + +# Credential key (encryption key for federation peer auth — never commit) +.beads-credential-key + +# Local version tracking (prevents upgrade notification spam after git ops) +.local_version + +proxied_server_client_info.json + +# Worktree redirect file (contains relative path to main repo's .beads/) +# Must not be committed as paths would be wrong in other clones +redirect + +# Sync state (local-only, per-machine) +# These files are machine-specific and should not be shared across clones +.sync.lock + +# Workspace operation gate (internal/workspacegate): physical-root gate +# files live beside the guarded root inside .beads (e.g. dolt.gate.lock) +*.gate.lock* +export-state/ +export-state.json +last_pull + +# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned) +ephemeral.sqlite3 +ephemeral.sqlite3-journal +ephemeral.sqlite3-wal +ephemeral.sqlite3-shm + +# Dolt server management (auto-started by bd) +dolt-server.pid +dolt-server.log +dolt-server.lock +dolt-server.port +dolt-server.activity + +# Debug-mode pprof artifacts (written when dolt.debug: true in config.yaml) +dolt-pprof/ + +# Corrupt backup directories (created by bd doctor --fix recovery) +*.corrupt.backup/ + +# Backup data (auto-exported JSONL, local-only) +backup/ + +# Per-project environment file (Dolt connection config, GH#2520) +.env + +# Legacy files (from pre-Dolt versions) +*.db +*.db?* +*.db-journal +*.db-wal +*.db-shm +db.sqlite +bd.db +# NOTE: Do NOT add negation patterns here. +# They would override fork protection in .git/info/exclude. +# Config files (metadata.json, config.yaml) are tracked by git by default +# since no pattern above ignores them. diff --git a/.beads/README.md b/.beads/README.md new file mode 100644 index 00000000..63e8f4c2 --- /dev/null +++ b/.beads/README.md @@ -0,0 +1,81 @@ +# 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](https://github.com/steveyegge/beads) + +## Quick Start + +### Essential Commands + +```bash +# Create new issues +bd create "Add user authentication" + +# View all issues +bd list + +# View issue details +bd show + +# Update issue status +bd update --claim +bd update --status done + +# Sync with Dolt remote +bd dolt push +``` + +### Working with Issues + +Issues in Beads are: +- **Git-native**: Stored in Dolt database with version control and branching +- **AI-friendly**: CLI-first design works perfectly with AI coding agents +- **Branch-aware**: Issues can follow your branch workflow +- **Sync-ready**: Uses Dolt remotes for backup and team sharing + +## 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** +- Dolt-native sync via bd dolt push / bd dolt pull +- Branch-aware issue tracking +- Dolt-native three-way merge resolution + +## Get Started with Beads + +Try Beads in your own projects: + +```bash +# 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 + +- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs) +- **Quick Start Guide**: Run `bd quickstart` +- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples) + +--- + +*Beads: Issue tracking that moves at the speed of thought* ⚡ diff --git a/.beads/config.yaml b/.beads/config.yaml new file mode 100644 index 00000000..4862e85e --- /dev/null +++ b/.beads/config.yaml @@ -0,0 +1,74 @@ +# Beads Configuration File +# This file configures default behavior for all bd commands in this repository +# All settings can also be set via environment variables (BD_* prefix) +# or overridden with command-line flags + +# Issue prefix for this repository (used by bd init) +# If not set, bd init will auto-detect from directory name +# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc. +# issue-prefix: "" + +# Use no-db mode: JSONL-only, no Dolt database +# When true, .beads/issues.jsonl is the only local store +# no-db: false + +# Enable JSON output by default +# json: false + +# Feedback title formatting for mutating commands (create/update/close/dep/edit) +# 0 = hide titles, N > 0 = truncate to N characters +# output: +# title-length: 255 + +# Default actor for audit trails (overridden by BEADS_ACTOR or --actor) +# actor: "" + +# Optional JSONL sidecar for explicit agent/tool interaction audit records. +# Issue history is always recorded in the database and is visible with +# bd history --events; this only controls .beads/interactions.jsonl. +# audit: +# enabled: false + +# Export events (audit trail) to .beads/events.jsonl on each flush/sync +# When enabled, new events are appended incrementally using a high-water mark. +# Use 'bd export --events' to trigger manually regardless of this setting. +# events-export: false + +# Multi-repo configuration (experimental - bd-307) +# Allows hydrating from multiple repositories and routing writes to the correct database +# repos: +# primary: "." # Primary repo (where this database lives) +# additional: # Additional repos to hydrate from (read-only) +# - ~/beads-planning # Personal planning repo +# - ~/work-planning # Work planning repo + +# Dolt-native backup (periodic backup for off-machine recovery) +# This is full database backup only. Cross-machine sync uses Dolt remotes. +# backup: +# enabled: false # Disable auto-backup entirely +# interval: 15m # Minimum time between auto-backups +# git-push: false # Disable git push (backup locally only) +# git-repo: "" # Separate git repo for backups (default: project repo) + +# Optional JSONL auto-export for viewers, interchange, and issue-level migration. +# Disabled by default; enable only when an integration needs fresh .beads/issues.jsonl. +# Use relative paths under .beads/ for JSONL import/export filenames. +# export: +# auto: false +# path: issues.jsonl +# interval: 60s +# git-add: false +# import: +# path: issues.jsonl + +# Integration settings (access with 'bd config get/set') +# Non-secret keys (stored in the database): +# - jira.url, jira.project +# - linear.team_id +# - github.org, github.repo +# +# Secret keys (stored in this file but prefer env vars to avoid git exposure): +# - linear.api_key → use LINEAR_API_KEY env var instead +# - github.token → use GITHUB_TOKEN env var instead + +dolt.shared-server: true \ No newline at end of file diff --git a/.beads/hooks/post-checkout b/.beads/hooks/post-checkout new file mode 100755 index 00000000..19d309b8 --- /dev/null +++ b/.beads/hooks/post-checkout @@ -0,0 +1,59 @@ +#!/usr/bin/env sh +# --- BEGIN BEADS INTEGRATION v1.3.0 --- +# This section is managed by beads. Do not remove these markers. +if command -v bd >/dev/null 2>&1; then + export BD_GIT_HOOK=1 + _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} + case "$_bd_timeout" in + *[!0-9]*|'') _bd_timeout_invalid=1 ;; + *[1-9]*) _bd_timeout_invalid=0 ;; + *) _bd_timeout_invalid=1 ;; + esac + if [ "$_bd_timeout_invalid" -eq 1 ]; then + echo >&2 "beads: invalid BEADS_HOOK_TIMEOUT; using 300 seconds" + _bd_timeout=300 + fi + _bd_timeout_backend=none + _bd_timeout_command= + for _bd_timeout_candidate in timeout gtimeout; do + if command -v "$_bd_timeout_candidate" >/dev/null 2>&1; then + if _bd_timeout_version="$("$_bd_timeout_candidate" --version 2>/dev/null)"; then + case "$_bd_timeout_version" in + "timeout (GNU coreutils) "*) _bd_timeout_command=$_bd_timeout_candidate; break ;; + esac + fi + fi + done + if [ -n "$_bd_timeout_command" ]; then + _bd_timeout_backend=coreutils + if "$_bd_timeout_command" -- "$_bd_timeout" bd hooks run post-checkout "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + elif command -v perl >/dev/null 2>&1; then + _bd_timeout_backend=perl + if perl -e 'alarm shift; exec @ARGV' -- "$_bd_timeout" bd hooks run post-checkout "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + else + echo >&2 "beads: hook 'post-checkout' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT" + if bd hooks run post-checkout "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + fi + if { [ "$_bd_timeout_backend" = coreutils ] && [ "$_bd_exit" -eq 124 ]; } || { [ "$_bd_timeout_backend" = perl ] && [ "$_bd_exit" -eq 142 ]; }; then + echo >&2 "beads: hook 'post-checkout' timed out after ${_bd_timeout}s — continuing without beads" + _bd_exit=0 + fi + if [ "$_bd_exit" -eq 3 ]; then + echo >&2 "beads: database not initialized — skipping hook 'post-checkout'" + _bd_exit=0 + fi + if [ "$_bd_exit" -ne 0 ]; then exit "$_bd_exit"; fi +fi +# --- END BEADS INTEGRATION v1.3.0 --- diff --git a/.beads/hooks/post-merge b/.beads/hooks/post-merge new file mode 100755 index 00000000..4d315045 --- /dev/null +++ b/.beads/hooks/post-merge @@ -0,0 +1,59 @@ +#!/usr/bin/env sh +# --- BEGIN BEADS INTEGRATION v1.3.0 --- +# This section is managed by beads. Do not remove these markers. +if command -v bd >/dev/null 2>&1; then + export BD_GIT_HOOK=1 + _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} + case "$_bd_timeout" in + *[!0-9]*|'') _bd_timeout_invalid=1 ;; + *[1-9]*) _bd_timeout_invalid=0 ;; + *) _bd_timeout_invalid=1 ;; + esac + if [ "$_bd_timeout_invalid" -eq 1 ]; then + echo >&2 "beads: invalid BEADS_HOOK_TIMEOUT; using 300 seconds" + _bd_timeout=300 + fi + _bd_timeout_backend=none + _bd_timeout_command= + for _bd_timeout_candidate in timeout gtimeout; do + if command -v "$_bd_timeout_candidate" >/dev/null 2>&1; then + if _bd_timeout_version="$("$_bd_timeout_candidate" --version 2>/dev/null)"; then + case "$_bd_timeout_version" in + "timeout (GNU coreutils) "*) _bd_timeout_command=$_bd_timeout_candidate; break ;; + esac + fi + fi + done + if [ -n "$_bd_timeout_command" ]; then + _bd_timeout_backend=coreutils + if "$_bd_timeout_command" -- "$_bd_timeout" bd hooks run post-merge "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + elif command -v perl >/dev/null 2>&1; then + _bd_timeout_backend=perl + if perl -e 'alarm shift; exec @ARGV' -- "$_bd_timeout" bd hooks run post-merge "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + else + echo >&2 "beads: hook 'post-merge' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT" + if bd hooks run post-merge "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + fi + if { [ "$_bd_timeout_backend" = coreutils ] && [ "$_bd_exit" -eq 124 ]; } || { [ "$_bd_timeout_backend" = perl ] && [ "$_bd_exit" -eq 142 ]; }; then + echo >&2 "beads: hook 'post-merge' timed out after ${_bd_timeout}s — continuing without beads" + _bd_exit=0 + fi + if [ "$_bd_exit" -eq 3 ]; then + echo >&2 "beads: database not initialized — skipping hook 'post-merge'" + _bd_exit=0 + fi + if [ "$_bd_exit" -ne 0 ]; then exit "$_bd_exit"; fi +fi +# --- END BEADS INTEGRATION v1.3.0 --- diff --git a/.beads/hooks/pre-commit b/.beads/hooks/pre-commit new file mode 100755 index 00000000..2bd8eef9 --- /dev/null +++ b/.beads/hooks/pre-commit @@ -0,0 +1,59 @@ +#!/usr/bin/env sh +# --- BEGIN BEADS INTEGRATION v1.3.0 --- +# This section is managed by beads. Do not remove these markers. +if command -v bd >/dev/null 2>&1; then + export BD_GIT_HOOK=1 + _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} + case "$_bd_timeout" in + *[!0-9]*|'') _bd_timeout_invalid=1 ;; + *[1-9]*) _bd_timeout_invalid=0 ;; + *) _bd_timeout_invalid=1 ;; + esac + if [ "$_bd_timeout_invalid" -eq 1 ]; then + echo >&2 "beads: invalid BEADS_HOOK_TIMEOUT; using 300 seconds" + _bd_timeout=300 + fi + _bd_timeout_backend=none + _bd_timeout_command= + for _bd_timeout_candidate in timeout gtimeout; do + if command -v "$_bd_timeout_candidate" >/dev/null 2>&1; then + if _bd_timeout_version="$("$_bd_timeout_candidate" --version 2>/dev/null)"; then + case "$_bd_timeout_version" in + "timeout (GNU coreutils) "*) _bd_timeout_command=$_bd_timeout_candidate; break ;; + esac + fi + fi + done + if [ -n "$_bd_timeout_command" ]; then + _bd_timeout_backend=coreutils + if "$_bd_timeout_command" -- "$_bd_timeout" bd hooks run pre-commit "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + elif command -v perl >/dev/null 2>&1; then + _bd_timeout_backend=perl + if perl -e 'alarm shift; exec @ARGV' -- "$_bd_timeout" bd hooks run pre-commit "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + else + echo >&2 "beads: hook 'pre-commit' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT" + if bd hooks run pre-commit "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + fi + if { [ "$_bd_timeout_backend" = coreutils ] && [ "$_bd_exit" -eq 124 ]; } || { [ "$_bd_timeout_backend" = perl ] && [ "$_bd_exit" -eq 142 ]; }; then + echo >&2 "beads: hook 'pre-commit' timed out after ${_bd_timeout}s — continuing without beads" + _bd_exit=0 + fi + if [ "$_bd_exit" -eq 3 ]; then + echo >&2 "beads: database not initialized — skipping hook 'pre-commit'" + _bd_exit=0 + fi + if [ "$_bd_exit" -ne 0 ]; then exit "$_bd_exit"; fi +fi +# --- END BEADS INTEGRATION v1.3.0 --- diff --git a/.beads/hooks/pre-push b/.beads/hooks/pre-push new file mode 100755 index 00000000..49e857ea --- /dev/null +++ b/.beads/hooks/pre-push @@ -0,0 +1,59 @@ +#!/usr/bin/env sh +# --- BEGIN BEADS INTEGRATION v1.3.0 --- +# This section is managed by beads. Do not remove these markers. +if command -v bd >/dev/null 2>&1; then + export BD_GIT_HOOK=1 + _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} + case "$_bd_timeout" in + *[!0-9]*|'') _bd_timeout_invalid=1 ;; + *[1-9]*) _bd_timeout_invalid=0 ;; + *) _bd_timeout_invalid=1 ;; + esac + if [ "$_bd_timeout_invalid" -eq 1 ]; then + echo >&2 "beads: invalid BEADS_HOOK_TIMEOUT; using 300 seconds" + _bd_timeout=300 + fi + _bd_timeout_backend=none + _bd_timeout_command= + for _bd_timeout_candidate in timeout gtimeout; do + if command -v "$_bd_timeout_candidate" >/dev/null 2>&1; then + if _bd_timeout_version="$("$_bd_timeout_candidate" --version 2>/dev/null)"; then + case "$_bd_timeout_version" in + "timeout (GNU coreutils) "*) _bd_timeout_command=$_bd_timeout_candidate; break ;; + esac + fi + fi + done + if [ -n "$_bd_timeout_command" ]; then + _bd_timeout_backend=coreutils + if "$_bd_timeout_command" -- "$_bd_timeout" bd hooks run pre-push "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + elif command -v perl >/dev/null 2>&1; then + _bd_timeout_backend=perl + if perl -e 'alarm shift; exec @ARGV' -- "$_bd_timeout" bd hooks run pre-push "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + else + echo >&2 "beads: hook 'pre-push' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT" + if bd hooks run pre-push "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + fi + if { [ "$_bd_timeout_backend" = coreutils ] && [ "$_bd_exit" -eq 124 ]; } || { [ "$_bd_timeout_backend" = perl ] && [ "$_bd_exit" -eq 142 ]; }; then + echo >&2 "beads: hook 'pre-push' timed out after ${_bd_timeout}s — continuing without beads" + _bd_exit=0 + fi + if [ "$_bd_exit" -eq 3 ]; then + echo >&2 "beads: database not initialized — skipping hook 'pre-push'" + _bd_exit=0 + fi + if [ "$_bd_exit" -ne 0 ]; then exit "$_bd_exit"; fi +fi +# --- END BEADS INTEGRATION v1.3.0 --- diff --git a/.beads/hooks/prepare-commit-msg b/.beads/hooks/prepare-commit-msg new file mode 100755 index 00000000..bf8cfb8f --- /dev/null +++ b/.beads/hooks/prepare-commit-msg @@ -0,0 +1,59 @@ +#!/usr/bin/env sh +# --- BEGIN BEADS INTEGRATION v1.3.0 --- +# This section is managed by beads. Do not remove these markers. +if command -v bd >/dev/null 2>&1; then + export BD_GIT_HOOK=1 + _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} + case "$_bd_timeout" in + *[!0-9]*|'') _bd_timeout_invalid=1 ;; + *[1-9]*) _bd_timeout_invalid=0 ;; + *) _bd_timeout_invalid=1 ;; + esac + if [ "$_bd_timeout_invalid" -eq 1 ]; then + echo >&2 "beads: invalid BEADS_HOOK_TIMEOUT; using 300 seconds" + _bd_timeout=300 + fi + _bd_timeout_backend=none + _bd_timeout_command= + for _bd_timeout_candidate in timeout gtimeout; do + if command -v "$_bd_timeout_candidate" >/dev/null 2>&1; then + if _bd_timeout_version="$("$_bd_timeout_candidate" --version 2>/dev/null)"; then + case "$_bd_timeout_version" in + "timeout (GNU coreutils) "*) _bd_timeout_command=$_bd_timeout_candidate; break ;; + esac + fi + fi + done + if [ -n "$_bd_timeout_command" ]; then + _bd_timeout_backend=coreutils + if "$_bd_timeout_command" -- "$_bd_timeout" bd hooks run prepare-commit-msg "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + elif command -v perl >/dev/null 2>&1; then + _bd_timeout_backend=perl + if perl -e 'alarm shift; exec @ARGV' -- "$_bd_timeout" bd hooks run prepare-commit-msg "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + else + echo >&2 "beads: hook 'prepare-commit-msg' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT" + if bd hooks run prepare-commit-msg "$@"; then + _bd_exit=0 + else + _bd_exit=$? + fi + fi + if { [ "$_bd_timeout_backend" = coreutils ] && [ "$_bd_exit" -eq 124 ]; } || { [ "$_bd_timeout_backend" = perl ] && [ "$_bd_exit" -eq 142 ]; }; then + echo >&2 "beads: hook 'prepare-commit-msg' timed out after ${_bd_timeout}s — continuing without beads" + _bd_exit=0 + fi + if [ "$_bd_exit" -eq 3 ]; then + echo >&2 "beads: database not initialized — skipping hook 'prepare-commit-msg'" + _bd_exit=0 + fi + if [ "$_bd_exit" -ne 0 ]; then exit "$_bd_exit"; fi +fi +# --- END BEADS INTEGRATION v1.3.0 --- diff --git a/.beads/metadata.json b/.beads/metadata.json new file mode 100644 index 00000000..4addd78e --- /dev/null +++ b/.beads/metadata.json @@ -0,0 +1,10 @@ +{ + "database": "dolt", + "backend": "dolt", + "dolt_mode": "server", + "dolt_server_user": "skillrx", + "dolt_database": "sc-compose", + "project_id": "c1942a32-4ccd-4fa2-b363-92244fd64c48", + "global_dolt_database": "beads_global", + "global_project_id": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file