beads/examples
Abhinav Gupta ac8ef9b9e3
test: replace manual os.Chdir with t.Chdir in tests (#457)
Replaces manual working directory save/restore patterns
with Go's built-in `t.Chdir()` helper across 23 test files.

The manual pattern involved calling `os.Getwd()` to save
the original directory, using `defer os.Chdir(origWd)` for
restoration, and manually handling errors during directory
changes. This boilerplate has been replaced with single
`t.Chdir(path)` calls that handle cleanup automatically.

The `t.Chdir()` method automatically restores the working
directory when the test completes, eliminating the need for
manual defer statements and error handling.

Total:
~75 instances replaced (assuming Claude's math is right)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-04 11:21:43 -08:00
..
bash-agent Add Agent Mail documentation and bash-agent integration 2025-11-08 01:10:20 -08:00
bd-example-extension-go Fix SQLite driver name mismatch causing "unknown driver" errors (#252) 2025-11-07 14:19:14 -08:00
claude-code-skill fix(deps): improve parent-child dependency UX (GH #440) 2025-12-01 21:07:23 -08:00
claude-desktop-mcp bd sync: 2025-11-26 18:07:01 2025-11-26 18:07:01 -08:00
compaction Add comprehensive compaction documentation 2025-10-16 01:09:48 -07:00
contributor-workflow feat: Add bd init --contributor and --team wizards 2025-11-05 19:04:14 -08:00
git-hooks fix(hooks): update comments and handle malformed YAML 2025-11-30 11:21:15 -08:00
github-import gh2jsonl: add intra-batch collision detection for hash IDs 2025-11-25 20:33:35 -08:00
go-agent Add go.mod to go-agent example to fix goreleaser 2025-11-08 23:10:53 -08:00
jira-import fix(jira): migrate from deprecated API v2 to v3 2025-12-01 21:02:20 -08:00
library-usage test: replace manual os.Chdir with t.Chdir in tests (#457) 2025-12-04 11:21:43 -08:00
markdown-to-jsonl feat: Add markdown-to-jsonl converter example [addresses #9] 2025-10-14 13:24:20 -07:00
monitor-webui fix: use nullish coalescing to fix priority 0 bug display 2025-11-23 14:58:58 -08:00
multi-phase-development Add workflow examples: multi-phase development and multiple personas (bd-p68x) 2025-11-05 19:12:58 -08:00
multiple-personas Add workflow examples: multi-phase development and multiple personas (bd-p68x) 2025-11-05 19:12:58 -08:00
protected-branch Add comprehensive protected branch workflow documentation (bd-5ce8) 2025-11-02 18:41:51 -08:00
python-agent Complete Agent Mail documentation (bd-nl8z) 2025-11-08 02:36:27 -08:00
startup-hooks feat: Add agent upgrade awareness documentation and tooling 2025-11-23 16:29:56 -08:00
team-workflow Refactor AGENTS.md: Extract detailed instructions to prevent context pollution 2025-11-20 22:04:17 -05:00
README.md feat: Add agent upgrade awareness documentation and tooling 2025-11-23 16:29:56 -08:00

Beads Examples

This directory contains examples of how to integrate bd with AI agents and workflows.

Examples

Agent Integration

Tools & Utilities

Workflow Patterns

Quick Start

# Try the Python agent example
cd python-agent
python agent.py

# Try the bash agent example
cd bash-agent
./agent.sh

# Install git hooks
cd git-hooks
./install.sh

# REMOVED (bd-4c74): branch-merge demo - hash IDs eliminate collision resolution

Creating Your Own Agent

The basic agent workflow:

  1. Find ready work: bd ready --json --limit 1
  2. Claim the task: bd update <id> --status in_progress --json
  3. Do the work: Execute the task
  4. Discover new issues: bd create "Found bug" --json
  5. Link discoveries: bd dep add <new-id> <parent-id> --type discovered-from
  6. Complete the task: bd close <id> --reason "Done" --json

All commands support --json for easy parsing.