beads

package module
v0.0.0-...-d497cf0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 3 Imported by: 0

README ΒΆ

BeadsLog

Git-backed devlog sessions that capture why you built things, for AI agents and teams.

BeadsLog extends Beads with automated session mapping and background AI enrichment. It turns your natural devlog narratives into a permanent, version-controlled knowledge graph.

# Install
go install github.com/untoldecay/BeadsLog/cmd/bd@latest

# Initialize in repo
bd init

# Connect AI agent
bd onboard

πŸ”„ The BeadsLog Workflow

BeadsLog is engineered for the era of AI coding agents where context is the most valuable resource. The workflow follows a high-efficiency iterative loop:

  1. Probing: Efficient building begins with architectural awareness. Rather than forcing agents to "brute-force" the entire codebase using slow, token-intensive searches, BeadsLog provides an instant structural probe. By querying the local knowledge graph via graph, impact, and entities, you can immediately pinpoint the exact components and dependencies relevant to your task.
  2. Mapping: As work progresses, the system automatically records the evolving architecture, intent, and decision-making process. This transforms the session into a structured map of technical relationships and historical context.
  3. Iterating: This creates a continuous, high-velocity development loop: acquire context -> implement -> iterate -> record context. Every "Bead" added to the chain ensures the project's collective memory grows stronger and more precise.

By offloading slow AI tasks to a background process, your CLI interactions remain instant while your architectural foresight grows automatically.

🌟 Real Use Cases

πŸ” New agent debugging a complex flow:

bd devlog search "auth session timeout"
# Returns: "Switched from Redis to Memcached (memory spike fix),
#          impacts AuthService and SessionManager"

🀝 Architectural impact before refactoring:

bd devlog impact "PostgresConnector"
# Returns: "Used by UserManager, BillingService, and AnalyticsJob."

⚑ Resuming context after a 3-day break:

bd devlog resume --last 1
# Returns: "Last session: Fixed redirect loop, left off at validation tests."

πŸ“š Docs

  • Use Cases β€” Real-world scenarios for agents and teams.
  • Devlog β€” Understanding the "Bead" concept and the narrative format.
  • Devlog Architecture β€” How the background AI and crystallization engine works.
  • Ollama Enrichment β€” Configuring Ollama for background semantic analysis.
  • Issue Architecture β€” Standard Beads data model and sync mechanism.
  • Hooks β€” Automating your workflow with Git integration.
  • Visualization β€” Exploring Search, Impact, and the Graph.
  • Evaluation β€” Measuring agent performance and token efficiency.
  • Commands β€” Full categorized CLI reference.
  • Installation β€” Setup guide and platform requirements.

Documentation ΒΆ

Overview ΒΆ

Package beads provides a minimal public API for extending bd with custom orchestration.

Most extensions should use direct SQL queries against bd's database. This package exports only the essential types and functions needed for Go-based extensions that want to use bd's storage layer programmatically.

For detailed guidance on extending bd, see docs/EXTENDING.md.

Index ΒΆ

Constants ΒΆ

View Source
const (
	StatusOpen       = types.StatusOpen
	StatusInProgress = types.StatusInProgress
	StatusBlocked    = types.StatusBlocked
	StatusDeferred   = types.StatusDeferred
	StatusClosed     = types.StatusClosed
)

Status constants

View Source
const (
	TypeBug     = types.TypeBug
	TypeFeature = types.TypeFeature
	TypeTask    = types.TypeTask
	TypeEpic    = types.TypeEpic
	TypeChore   = types.TypeChore
)

IssueType constants

View Source
const (
	DepBlocks            = types.DepBlocks
	DepRelated           = types.DepRelated
	DepParentChild       = types.DepParentChild
	DepDiscoveredFrom    = types.DepDiscoveredFrom
	DepConditionalBlocks = types.DepConditionalBlocks // B runs only if A fails (bd-kzda)
)

DependencyType constants

View Source
const (
	SortPolicyHybrid   = types.SortPolicyHybrid
	SortPolicyPriority = types.SortPolicyPriority
	SortPolicyOldest   = types.SortPolicyOldest
)

SortPolicy constants

View Source
const (
	EventCreated           = types.EventCreated
	EventUpdated           = types.EventUpdated
	EventStatusChanged     = types.EventStatusChanged
	EventCommented         = types.EventCommented
	EventClosed            = types.EventClosed
	EventReopened          = types.EventReopened
	EventDependencyAdded   = types.EventDependencyAdded
	EventDependencyRemoved = types.EventDependencyRemoved
	EventLabelAdded        = types.EventLabelAdded
	EventLabelRemoved      = types.EventLabelRemoved
	EventCompacted         = types.EventCompacted
)

EventType constants

Variables ΒΆ

This section is empty.

Functions ΒΆ

func FindBeadsDir ΒΆ

func FindBeadsDir() string

FindBeadsDir finds the .beads/ directory in the current directory tree Returns empty string if not found. Supports both database and JSONL-only mode.

func FindDatabasePath ΒΆ

func FindDatabasePath() string

FindDatabasePath finds the beads database in the current directory tree

func FindJSONLPath ΒΆ

func FindJSONLPath(dbPath string) string

FindJSONLPath finds the JSONL file corresponding to a database path

Types ΒΆ

type BlockedIssue ΒΆ

type BlockedIssue = types.BlockedIssue

Core types from internal/types

type Comment ΒΆ

type Comment = types.Comment

Core types from internal/types

type DatabaseInfo ΒΆ

type DatabaseInfo = beads.DatabaseInfo

DatabaseInfo contains information about a beads database

func FindAllDatabases ΒΆ

func FindAllDatabases() []DatabaseInfo

FindAllDatabases finds all beads databases in the system

type Dependency ΒΆ

type Dependency = types.Dependency

Core types from internal/types

type DependencyCounts ΒΆ

type DependencyCounts = types.DependencyCounts

Core types from internal/types

type DependencyType ΒΆ

type DependencyType = types.DependencyType

Core types from internal/types

type EpicStatus ΒΆ

type EpicStatus = types.EpicStatus

Core types from internal/types

type Event ΒΆ

type Event = types.Event

Core types from internal/types

type EventType ΒΆ

type EventType = types.EventType

Core types from internal/types

type Issue ΒΆ

type Issue = types.Issue

Core types from internal/types

type IssueFilter ΒΆ

type IssueFilter = types.IssueFilter

Core types from internal/types

type IssueType ΒΆ

type IssueType = types.IssueType

Core types from internal/types

type IssueWithCounts ΒΆ

type IssueWithCounts = types.IssueWithCounts

Core types from internal/types

type Label ΒΆ

type Label = types.Label

Core types from internal/types

type RedirectInfo ΒΆ

type RedirectInfo = beads.RedirectInfo

RedirectInfo contains information about a beads directory redirect

func GetRedirectInfo ΒΆ

func GetRedirectInfo() RedirectInfo

GetRedirectInfo checks if the current beads directory is redirected. Returns RedirectInfo with IsRedirected=true if a redirect is active.

type SortPolicy ΒΆ

type SortPolicy = types.SortPolicy

Core types from internal/types

type StaleFilter ΒΆ

type StaleFilter = types.StaleFilter

Core types from internal/types

type Status ΒΆ

type Status = types.Status

Core types from internal/types

type Storage ΒΆ

type Storage = beads.Storage

Storage is the interface for beads storage operations

func NewSQLiteStorage ΒΆ

func NewSQLiteStorage(ctx context.Context, dbPath string) (Storage, error)

NewSQLiteStorage creates a new SQLite storage instance at the given path

type Transaction ΒΆ

type Transaction = beads.Transaction

Transaction provides atomic multi-operation support within a database transaction. Use Storage.RunInTransaction() to obtain a Transaction instance.

type TreeNode ΒΆ

type TreeNode = types.TreeNode

Core types from internal/types

type WorkFilter ΒΆ

type WorkFilter = types.WorkFilter

Core types from internal/types

Directories ΒΆ

Path Synopsis
_LEGACY
_rules
_evals command
cmd
bd command
Package main provides the CommandContext struct that consolidates runtime state.
Package main provides the CommandContext struct that consolidates runtime state.
bd/doctor
Package doctor provides health check and repair functionality for beads.
Package doctor provides health check and repair functionality for beads.
internal
beads
Package beads provides a minimal public API for extending bd with custom orchestration.
Package beads provides a minimal public API for extending bd with custom orchestration.
compact
Package compact provides AI-powered issue compaction using Claude Haiku.
Package compact provides AI-powered issue compaction using Claude Haiku.
formula
Package formula provides advice operators for step transformations.
Package formula provides advice operators for step transformations.
git
hooks
Package hooks provides a hook system for extensibility.
Package hooks provides a hook system for extensibility.
linear
Package linear provides client and data types for the Linear GraphQL API.
Package linear provides client and data types for the Linear GraphQL API.
molecules
Package molecules handles loading template molecules from molecules.jsonl catalogs.
Package molecules handles loading template molecules from molecules.jsonl catalogs.
recipes
Package recipes provides recipe-based configuration for bd setup.
Package recipes provides recipe-based configuration for bd setup.
rpc
storage
Package storage defines the interface for issue storage backends.
Package storage defines the interface for issue storage backends.
storage/memory
Package memory implements the storage interface using in-memory data structures.
Package memory implements the storage interface using in-memory data structures.
storage/sqlite
Package sqlite provides the blocked_issues_cache optimization for GetReadyWork performance.
Package sqlite provides the blocked_issues_cache optimization for GetReadyWork performance.
syncbranch
Package syncbranch provides sync branch configuration and integrity checking.
Package syncbranch provides sync branch configuration and integrity checking.
testutil/fixtures
Package fixtures provides realistic test data generation for benchmarks and tests.
Package fixtures provides realistic test data generation for benchmarks and tests.
timeparsing
Package timeparsing provides layered time parsing for relative date/time expressions.
Package timeparsing provides layered time parsing for relative date/time expressions.
types
Package types defines core data structures for the bd issue tracker.
Package types defines core data structures for the bd issue tracker.
ui
Package ui provides terminal styling for beads CLI output.
Package ui provides terminal styling for beads CLI output.
utils
Package utils provides utility functions for issue ID parsing and resolution.
Package utils provides utility functions for issue ID parsing and resolution.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL