Commit Graph

4250 Commits

Author SHA1 Message Date
Steve Yegge
09876fff99 bd sync: 2025-12-28 16:02:46 2025-12-28 16:02:46 -08:00
Steve Yegge
7f950eeabd bd sync: 2025-12-28 15:42:33 2025-12-28 15:42:46 -08:00
Steve Yegge
f459f8ef7f refactor: Extract stepTypeToIssueType helper to remove duplicated switch (bd-j3dj)
Extracted duplicated switch statement for mapping step type strings to
types.IssueType into a single helper function. This removes code
duplication between collectStepsToSubgraph() and collectStepsRecursive().

The new stepTypeToIssueType() function:
- Converts 'task', 'bug', 'feature', 'epic', 'chore' to types
- Returns types.TypeTask for empty or unrecognized types
- Used by both functions with children-override-to-epic logic preserved
2025-12-28 15:42:24 -08:00
Steve Yegge
167e9a18bc bd sync: 2025-12-28 15:38:09 2025-12-28 15:38:09 -08:00
Steve Yegge
d70d669e76 bd sync: 2025-12-28 15:33:10 2025-12-28 15:33:10 -08:00
Steve Yegge
5e99b68863 bd sync: 2025-12-28 13:52:31 2025-12-28 14:00:14 -08:00
Steve Yegge
0f008d3979 docs: Add components overview explaining CLI vs Plugin vs MCP
Clarifies the relationship between bd CLI, Claude Code Plugin,
and MCP server. Most users only need the CLI.

Closes #782

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 14:00:05 -08:00
Steve Yegge
274f53514a docs: Add installation method comparison table
Clarifies trade-offs between Homebrew, npm, script, go install,
and source builds. Homebrew is recommended as the default.

Closes #779

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 13:56:31 -08:00
Steve Yegge
135802f1aa Consolidate CLI commands to reduce top-level surface area
- migrate-* commands → subcommands of `bd migrate`
- relate/unrelate → subcommands of `bd dep`
- daemons subcommands → available under `bd daemon`
- comment alias → hidden with deprecation warning

All old commands still work with deprecation warnings for backwards
compatibility. Reduces visible top-level commands from ~73 to 66.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 13:52:21 -08:00
Zack Rosen
5ccf12ea57 fix: update perles community tool description (#778)
Perles is built using Go not Node.js this got mixed up in the recent
migration to the community tools page. Also slights changes to the tools
description.
2025-12-28 12:52:29 -08:00
Steve Yegge
b2c60e7d1e bd sync: 2025-12-28 10:59:19 2025-12-28 10:59:48 -08:00
Steve Yegge
6f00e48295 Release v0.40.0
New commands and features:
- bd worktree for parallel development
- bd slot commands for agent bead slot management
- bd agent state for ZFC-compliant state reporting
- bd doctor --deep for full graph integrity validation
- Agent bead support (type=agent, type=role, migration 030)
- Computed .parent field in JSON output
- Auto-bypass daemon for wisp operations
- Pour warning for vapor-phase formulas

Performance:
- O(2^n) → O(V+E) cycle detection (GH#775)

Fixes:
- Import hash mismatch warnings
- Test updates for version tracking thresholds
- Migration test updated for new agent schema fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:59:02 -08:00
Steve Yegge
d8ef771a28 Improve activity feed with title and assignee context
Now shows:
- Truncated title (40 chars max) after issue ID
- Assignee with @ prefix when present
- Format: 'bd-xxx completed · Title here... @assignee'

Also changed 'in_progress' to 'started' for cleaner output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:06:08 -08:00
Steve Yegge
f46cc2e798 chore: remove issue ID references from comments and changelogs
Strip (bd-xxx), (gt-xxx) suffixes from code comments and changelog
entries. The descriptions remain meaningful without the ephemeral
issue IDs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:05:16 -08:00
Steve Yegge
b4deb96924 Merge pull request #772 from StreamlinedStartup/patch-1
Update references to WORKFLOWS.md in SKILL.md
2025-12-28 09:57:15 -08:00
Steve Yegge
568f3bbd5a Merge pull request #776 from maphew/community-tools
docs: consolidate community tools into dedicated page
2025-12-28 09:50:05 -08:00
Steve Yegge
98bd46104e Merge pull request #775 from peterkc/fix/cycle-detection-performance
perf(sqlite): replace O(2^n) cycle detection with O(V+E) DFS
2025-12-28 09:37:08 -08:00
matt wilkie
ac2a2e900e consolidate community tools into dedicated docs page
- Create docs/COMMUNITY_TOOLS.md with curated list of community-built tools ranked by activity
- Include tools from README.md and GitHub discussion #276
- Organize into categories: Terminal UIs, Web UIs, Editor Extensions, Native Apps, Historical
- Update README.md to reference the new dedicated page
2025-12-28 08:05:32 -07:00
Peter Chanthamynavong
3342dc2fe8 perf(sqlite): replace O(2^n) cycle detection with O(V+E) DFS
Replace the recursive SQL CTE in DetectCycles with Go-layer DFS using
shared visited set. The previous implementation enumerated all paths
through the dependency graph, causing exponential blowup with diamond
patterns (multiple issues depending on the same target).

Changes:
- Add loadDependencyGraph() to load deps as adjacency list in one query
- Implement DFS cycle detection with recStack for back-edge detection
- Add normalizeCycle() for consistent cycle deduplication
- Add DetectCycles-specific benchmarks (Linear, Dense, Tree graphs)
- Use direct SQL INSERT in benchmarks to bypass AddDependency overhead

Performance improvement on dense graph (500 nodes, 2500 edges):
- Before: >120s timeout
- After: 1.6ms

Benchmarks:
- DetectCycles_Linear_1000: 0.84ms (1000 nodes, 999 edges)
- DetectCycles_Dense_500: 1.59ms (500 nodes, ~2500 edges)
- DetectCycles_Tree_1000: 0.85ms (1000 nodes, 999 edges)
2025-12-28 06:04:05 -08:00
StreamlinedStartup
dccbb4595d Update references to WORKFLOWS.md in SKILL.md
Updated references in SKILL.md to point to WORKFLOWS.md instead of ADVANCED_WORKFLOWS.md.
2025-12-28 06:07:34 -07:00
Steve Yegge
30c5e0001a feat: add computed .parent field to JSON output for convenience (bd-qket)
Simplifies querying parent ID from:
  bd show <id> --json | jq '.[0].dependencies[] | select(.dependency_type == "parent-child") | .id'

To:
  bd show <id> --json | jq '.[0].parent'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 02:24:39 -08:00
Steve Yegge
f3c663d31c feat: add bd doctor --deep for full graph integrity validation (bd-cwpl)
Add a --deep flag to bd doctor that runs comprehensive graph integrity
checks on the beads database:

- Parent consistency: verify parent-child deps point to existing issues
- Dependency integrity: all dependencies reference valid issues
- Epic completeness: find epics ready to close (all children closed)
- Agent bead integrity: validate agent beads have valid state values
- Mail thread integrity: verify thread_id references exist
- Molecule integrity: check molecules have valid parent-child structures

The deep validation mode warns about potential slowness on large databases
and provides both human-readable and JSON output formats.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 02:13:34 -08:00
Steve Yegge
ad39aaeff5 feat: auto-bypass daemon for wisp operations (bd-ta4r)
Wisp operations (mol wisp *, mol burn, mol squash) and commands operating on
ephemeral issue IDs (bd-eph-*, gt-eph-*, eph-*) now auto-bypass the daemon.

Since wisps are ephemeral (Ephemeral=true) and never exported to JSONL,
the daemon cannot help with them anyway. This eliminates the need to manually
add --no-daemon for every wisp operation.

Changes:
- Add isWispOperation() helper to detect wisp commands and ephemeral IDs
- Add FallbackWispOperation constant for daemon status tracking
- Insert wisp detection in PersistentPreRunE daemon connection logic
- Update error messages in wisp.go, mol_burn.go, mol_squash.go
- Add comprehensive unit tests for isWispOperation()
2025-12-28 02:11:13 -08:00
Steve Yegge
947b5ee1c6 feat: add bd agent state command for ZFC-compliant state reporting (bd-uxlb)
Add agent commands for self-reporting state:
- bd agent state <agent> <state>: Update agent state and last_activity
- bd agent heartbeat <agent>: Update last_activity timestamp only
- bd agent show <agent>: Display agent bead details

States: idle, spawning, running, working, stuck, done, stopped, dead

Also adds AgentState and LastActivity fields to UpdateArgs in RPC protocol.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 01:56:53 -08:00
Steve Yegge
dfc796589f feat: add pour warning for vapor-phase formulas, improve help text, add doctor check
- Add Phase field to Formula type to indicate recommended instantiation phase
- Add warning in 'bd mol pour' when formula has phase="vapor"
- Improve pour/wisp help text with clear comparison of when to use each
- Add CheckPersistentMolIssues doctor check to detect mol- issues in JSONL
- Update beads-release.formula.json with phase="vapor"

This helps prevent accidental persistence of ephemeral workflow issues.
2025-12-28 01:34:01 -08:00
Steve Yegge
b5ab4f2a3b fix: address code review issues in bd worktree command
- Add CheckReadonly calls to create/remove commands
- Add cleanup on partial failure (remove worktree if beads setup fails)
- Prevent removing main repository as worktree
- Fix gitignore entry to use relative path from repo root
- Remove misleading stash check (stashes are repo-wide, not per-worktree)
- Populate Name field in WorktreeInfo struct
- Add #nosec comments for exec.Command and file reads

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 01:07:38 -08:00
Steve Yegge
f631299a87 feat: add bd worktree command for parallel development
Adds user-facing worktree management commands:
- bd worktree create <name> - creates worktree with beads redirect
- bd worktree list - shows all worktrees and their beads state
- bd worktree remove <name> - removes worktree with safety checks
- bd worktree info - shows current worktree info

The create command automatically sets up .beads/redirect to point to
the main repos .beads directory, ensuring all worktrees share
the same issue database. This enables parallel development with
multiple agents or features.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 01:01:52 -08:00
Steve Yegge
ecff74e2af feat: add bd slot commands for agent bead slot management (gt-h5sza)
Add slot management commands:
- bd slot set <agent> <slot> <bead> - set slot (error if occupied)
- bd slot clear <agent> <slot> - clear slot
- bd slot show <agent> - show all slots

These enforce cardinality constraints for agent bead slots.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 00:11:22 -08:00
Steve Yegge
46cdf075d4 feat: add agent ID pattern validation for bd create --type=agent (gt-hlaaf)
- Update ParseIssueType to use canonical types.IsValid() (includes agent, role, gate, message)
- Add ValidateAgentID function to validate gt-<role>[-<rig>[-<name>]] pattern
- Wire up validation in create.go when --type=agent with explicit ID
- Update --type flag help text to include agent and role types
- Add comprehensive test coverage for agent ID validation
2025-12-28 00:07:04 -08:00
Steve Yegge
b5c695075a Add agent-specific fields to bead schema (gt-v2gkv)
Agent identity fields on Issue struct:
- HookBead: reference to current work (0..1 cardinality)
- RoleBead: reference to role definition bead
- AgentState: self-reported state (idle|spawning|running|working|stuck|done|stopped|dead)
- LastActivity: timestamp for heartbeat/timeout detection
- RoleType: agent type (polecat|crew|witness|refinery|mayor|deacon)
- Rig: rig name (empty for town-level agents)

Also adds:
- AgentState type with IsValid() method
- Validation for agent state in Issue.Validate()
- Agent fields included in content hash

This enables the agent-as-bead architecture where agents are tracked
as first-class beads with self-reported state.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:44:39 -08:00
Steve Yegge
927e8374ee Add type=agent and type=role to bead schema (gt-ikyo1, gt-gzp2y)
- Add TypeAgent and TypeRole to IssueType enum in types.go
- Update IsValid() to include new types
- Add UI styles with distinct colors (cyan for agent, green for role)
- Add RenderType cases for consistent display

This enables creating agent beads (identity) and role beads (behavior
definitions) as part of the agent-as-bead architecture.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:38:56 -08:00
Steve Yegge
d686f0e9b1 fix: add --allow-staged flag to bump-version.sh for pre-staged release notes (bd-n97g)
When running the release workflow, users often stage CHANGELOG.md and info.go
changes before running bump-version.sh. Previously, the script would error
on uncommitted changes with --commit.

Now:
- --allow-staged permits pre-staged CHANGELOG.md and cmd/bd/info.go
- Script detects these as expected release files and includes them in commit
- Provides helpful error message if other files are staged

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:36:43 -08:00
Steve Yegge
b1859f54c1 bd sync: 2025-12-27 23:24:32 2025-12-27 23:24:32 -08:00
Steve Yegge
9e7ccb3e03 fix: update jsonl_file_hash on import to prevent hash mismatch warnings (bd-0vtq)
The import command was only updating jsonl_content_hash, not jsonl_file_hash.
After sync imports JSONL but skips re-export (because DB matches JSONL),
the jsonl_file_hash remained stale, causing validateJSONLIntegrity() to
emit spurious "JSONL file hash mismatch" warnings on subsequent operations.

Now import also calls SetJSONLFileHash with the same hash value, keeping
both hashes in sync and eliminating the false warnings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:22:18 -08:00
Steve Yegge
d08c877a33 chore: Bump version to 0.39.1 2025-12-27 22:33:05 -08:00
Steve Yegge
ab3feda007 fix: remove arbitrary 8-char prefix limit from rename-prefix (GH#770)
The limit wasn't enforced by init/create, so users could create issues
with longer prefixes but couldn't use rename-prefix to consolidate them.
Since the DB handles longer prefixes fine, just remove the limit.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 22:24:19 -08:00
Josh Thomas
aa4da74fd1 Add opencode-beads to Community Tools section of README (#771) 2025-12-27 22:21:27 -08:00
Steve Yegge
35f8e197ee feat: add --parent flag to bd update for reparenting issues (bd-cj2e)
Allows reparenting issues to a different epic/parent:
  bd update bd-xyz --parent=bd-epic

Implementation:
- Add Parent field to UpdateArgs in protocol.go
- Handle reparenting in RPC handler (server_issues_epics.go)
- Add --parent flag to updateCmd with both daemon and direct mode support
- Remove old parent-child dependency before adding new one
- Pass empty string to remove parent entirely

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 22:17:24 -08:00
Steve Yegge
05d44503de bd sync: 2025-12-27 22:17:12 2025-12-27 22:17:12 -08:00
Steve Yegge
cd618f4115 bd sync: 2025-12-27 22:17:10 2025-12-27 22:17:10 -08:00
Steve Yegge
92f2e1db8b docs: add Database Redirects section to ADVANCED.md (bd-8x43)
Documents the .beads/redirect feature for sharing databases across
multiple clones, and the new `bd where` command for debugging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 22:04:25 -08:00
Steve Yegge
aa99235a59 refactor: consolidate git context into single cached struct (bd-qph3)
Replaced 3 separate caches (isWorktree, mainRepoRoot, repoRoot) with a
single gitContext struct populated by one git call. This reduces git
subprocess calls from up to 4 down to 1 and simplifies ResetCaches().

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 21:49:52 -08:00
Steve Yegge
59fa2d8d10 bd sync: 2025-12-27 21:49:38 2025-12-27 21:49:38 -08:00
Steve Yegge
e1de09513c bd sync: 2025-12-27 21:44:52 2025-12-27 21:44:52 -08:00
Steve Yegge
7cd4a96847 bd sync: 2025-12-27 21:33:54 2025-12-27 21:33:54 -08:00
Steve Yegge
e72eb41e6f bd sync: 2025-12-27 21:33:33 2025-12-27 21:33:33 -08:00
Steve Yegge
bcc611b0b3 bd sync: 2025-12-27 21:27:50 2025-12-27 21:33:15 -08:00
Steve Yegge
ba1c9d6b17 feat: show redirect info in bd prime output (bd-kblo)
When beads is redirected (e.g., in Gas Town crew clones), bd prime now
shows a notice about the redirect. This helps agents understand why
they share issues with other clones.

CLI mode shows:
> ⚠️ **Redirected**: Local .beads → /path/to/target/.beads
> You share issues with other clones using this redirect.

MCP mode shows:
**Note**: Beads redirected to /path/to/target/.beads (shared with other clones)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 21:33:01 -08:00
Steve Yegge
aa3c4cb3eb feat: add 'bd where' command to show active beads location (bd-8x43)
Adds a new command that shows the active .beads directory path,
including redirect information for debugging. Supports --json output.

Example:
  bd where
  → /Users/stevey/gt/beads/mayor/rig/.beads
    (via redirect from /Users/stevey/gt/beads/crew/emma/.beads)
    prefix: bd
    database: /Users/stevey/gt/beads/mayor/rig/.beads/beads.db

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 21:27:44 -08:00
Steve Yegge
a326df945d bd sync: 2025-12-27 20:42:09 2025-12-27 20:42:18 -08:00