Commit Graph

4406 Commits

Author SHA1 Message Date
Steve Yegge
28fa733fae bd sync: 2025-12-30 18:11:14 2025-12-30 18:11:14 -08:00
Steve Yegge
902670d165 bd sync: 2025-12-30 16:50:04 2025-12-30 16:50:04 -08:00
Steve Yegge
bd62686646 bd sync: 2025-12-30 16:47:43 2025-12-30 16:47:43 -08:00
Steve Yegge
7bdad6035b bd sync: 2025-12-30 16:47:00 2025-12-30 16:47:00 -08:00
Steve Yegge
f35b37a42b bd sync: 2025-12-30 16:45:58 2025-12-30 16:45:58 -08:00
Steve Yegge
4763973ba9 bd sync: 2025-12-30 16:10:24 2025-12-30 16:10:24 -08:00
Steve Yegge
3ed2589511 Fix BD_ACTOR handling in direct mode paths
BUG: BD_ACTOR env var was only read in --no-db mode (lines 352-360)
and daemon RPC path. Normal direct mode and JSONL-only mode detection
paths fell back to $USER without checking BD_ACTOR.

Fix: Add explicit os.Getenv("BD_ACTOR") check in both:
- JSONL-only mode detection path (lines 393-402)
- Normal direct mode path (lines 440-450)

(gt-6r18e.2)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:07:39 -08:00
Steve Yegge
ece899e6d1 bd sync: 2025-12-30 15:56:45 2025-12-30 15:56:45 -08:00
Steve Yegge
5167dcd0af bd sync: 2025-12-30 15:54:09 2025-12-30 15:54:09 -08:00
Steve Yegge
a0dda7da6b bd sync: 2025-12-30 15:52:08 2025-12-30 15:52:08 -08:00
Steve Yegge
1d6139e51e bd sync: 2025-12-30 15:47:21 2025-12-30 15:47:21 -08:00
Steve Yegge
a51abd2a6d bd sync: 2025-12-30 15:44:48 2025-12-30 15:44:48 -08:00
Steve Yegge
b5284f7f5d bd sync: 2025-12-30 15:44:39 2025-12-30 15:44:39 -08:00
Steve Yegge
29743528f6 bd sync: 2025-12-30 10:38:01 2025-12-30 10:38:01 -08:00
Steve Yegge
96f2996997 Show actor on status/pinned change events in activity feed
Added actor field to RPC client and set it before daemon requests.
This ensures status changes (like pinned events) show who performed
the action in bd activity output.

Changes:
- Added actor field to Client struct
- Added SetActor method to set actor for audit trail
- Modified ExecuteWithCwd to include actor in RPC requests
- Updated main.go to call SetActor after daemon connection

Fixes gt-1ydd9

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 06:57:51 -08:00
Steve Yegge
7f5378ba26 bd sync: 2025-12-30 00:55:05 2025-12-30 00:55:05 -08:00
Steve Yegge
553544f6ac bd sync: 2025-12-30 00:42:19 2025-12-30 00:42:25 -08:00
Steve Yegge
8f07b619ac bd sync: 2025-12-30 00:42:11 2025-12-30 00:42:25 -08:00
Steve Yegge
7216109284 feat: add pager support to bd list (bd-jdz3)
Add pager support following gh cli conventions:

Flags:
- --no-pager: disable pager for this command

Environment variables:
- BD_PAGER / PAGER: pager program (default: less)
- BD_NO_PAGER: disable pager globally

Behavior:
- Auto-enable pager when output exceeds terminal height
- Respect LESS env var for pager options
- Disable pager when stdout is not a TTY (pipes/scripts)

Implementation:
- New internal/ui/pager.go with ToPager() function
- Added formatIssueLong/formatIssueCompact helper functions
- Buffer output before displaying to support pager

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:41:11 -08:00
Steve Yegge
ebd5c1b72a fix: rename BondRef.ProtoID to SourceID for clarity (bd-ia3g)
The ProtoID field in BondRef was misleading as it could hold both proto
IDs (from proto+proto bonds) and molecule IDs (from mol+mol bonds).
Rename to SourceID with updated JSON tag to better reflect its purpose.

Changes:
- Rename BondRef.ProtoID to SourceID in types.go
- Update JSON tag from proto_id to source_id
- Update all usages in mol_bond.go and tests

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:40:16 -08:00
Steve Yegge
b273465966 chore: remove stale TODOs for implemented Expand/ExpandVars (bd-qe7j)
- Step.Expand and Step.ExpandVars are implemented in ApplyInlineExpansions
  (expand.go), but had stale TODO comments claiming they were not
- Updated doc comments to reference the implementation
- Updated bd-7zka to reflect which features are still not implemented
  (Step.Condition and Step.Gate remain as future work)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:39:16 -08:00
Steve Yegge
6561c9fa98 docs: add CHANGELOG.md documenting breaking changes in v0.24.0 (bd-pdr2)
Created CHANGELOG.md for beads-mcp documenting:
- Breaking change: ready() and list() now return list[IssueMinimal] | CompactedResult
- Migration guide for clients expecting list[Issue]
- Context engineering optimization details (~80% context reduction)

Assessment complete: Current approach is correct:
- Type "mismatch" is intentional two-layer architecture
- Client layer returns List[Issue], MCP layer converts to minimal
- Adding full=True would defeat context optimization purpose
- CONTEXT_ENGINEERING.md already has migration guide

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:35:46 -08:00
Steve Yegge
7f16c9d68c bd sync: 2025-12-30 00:28:24 2025-12-30 00:28:51 -08:00
Steve Yegge
973696c640 chore: remove deprecated setupDaemonLoggerLegacy function (bd-2dwo)
The function was marked for removal once all callers migrated to the new
setupDaemonLogger signature with jsonFormat and level parameters.
Audit confirmed no remaining callers - safe to remove.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:27:12 -08:00
Steve Yegge
0f8d7093b2 fix: add missing mockStorage methods for Storage interface compliance
Added GetDependenciesWithMetadata and GetDependentsWithMetadata to mockStorage
to match the Storage interface definition.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:26:56 -08:00
Steve Yegge
99e205868e bd sync: 2025-12-30 00:07:05 2025-12-30 00:07:29 -08:00
Steve Yegge
fb5fd88722 feat: integrate migration detection into bd doctor (bd-7l27)
Add a consolidated "Pending Migrations" check to bd doctor that:
- Detects sequential ID usage (suggests bd migrate hash-ids)
- Detects legacy deletions.jsonl (suggests bd migrate tombstones)
- Detects missing sync-branch config (suggests bd migrate sync)
- Detects database version mismatches (suggests bd migrate)

Also updates existing checks to use correct modern commands:
- CheckIDFormat: bd migrate hash-ids (was bd migrate --to-hash-ids)
- CheckDeletionsManifest: bd migrate tombstones (was bd migrate-tombstones)
- CheckSyncBranchConfig: bd migrate sync beads-sync (was config.yaml edit)

Removes TODO(bd-7l27) comments from migrate_*.go files.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:06:42 -08:00
Steve Yegge
0597d66275 bd sync: close bd-7t9a (MCP redirect fix) 2025-12-30 00:06:17 -08:00
Steve Yegge
e20de54cb2 fix: MCP plugin follows .beads/redirect files (bd-7t9a, gt-tnw)
The _find_beads_db_in_tree() function now follows .beads/redirect files
to find shared beads databases. This is essential for polecat/crew
directories that use redirect files to share a central database.

Changes:
- Added _resolve_beads_redirect() helper function
- Updated _find_beads_db_in_tree() to check for redirect files before
  looking for local .db files
- Added comprehensive tests for redirect functionality

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:06:17 -08:00
Steve Yegge
99692b52f0 bd sync: 2025-12-30 00:00:49 2025-12-30 00:06:17 -08:00
Steve Yegge
b63df91230 feat: add 'convoy' issue type with reactive completion (bd-hj0s)
- Add TypeConvoy to issue types for cross-project tracking
- Implement reactive completion: when all tracked issues close,
  convoy auto-closes with reason "All tracked issues completed"
- Uses 'tracks' dependency type (non-blocking, cross-prefix capable)
- Update help text for --type flag in list/create commands
- Add test for convoy reactive completion behavior

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2025-12-30 00:04:43 -08:00
Steve Yegge
160feb95ea fix: bd admin compact --older-than=0 now expires all tombstones
Previously, --older-than=0 was indistinguishable from "flag not set"
because both resulted in compactOlderThan==0. The check `> 0` treated
both as "use default 30 days".

Fix:
- Change flag default to -1 (sentinel for "use default")
- Treat 0 as "expire all tombstones" by passing 1ns TTL
- Explicit positive values work as before (N days)

Closes bd-gigi

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:00:25 -08:00
Steve Yegge
cb69f1c154 feat: Show actor on pinned/status change events (gt-1ydd9)
- Add Actor field to MutationEvent struct
- Use new assignee from update args instead of old issue state
- Include actor (who performed the action) in mutation events
- Display actor in bd activity output, falling back to assignee

When pinning/updating status, the activity feed now shows who performed
the action (e.g., "@gastown/crew/jack") instead of showing nothing.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 23:42:20 -08:00
Steve Yegge
e5cf9b3199 bd sync: 2025-12-29 21:26:41 2025-12-29 23:42:20 -08:00
Steve Yegge
48cca7f73d bd sync: 2025-12-29 21:16:05 2025-12-29 23:42:20 -08:00
Steve Yegge
3c6354c051 fix: prevent label accumulation when updating agent role_type/rig
When updating role_type or rig on an agent bead, remove existing
role_type:* or rig:* labels before adding the new one. This prevents
label accumulation that would break filtering.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 21:41:14 -08:00
Steve Yegge
1b9c0e145e feat: add prepare-commit-msg hook for agent identity trailers (bd-luso)
Automatically adds trailers to commits when running in Gas Town agent context:
- Executed-By: agent identity (e.g., beads/crew/dave)
- Rig: the rig name
- Role: crew, polecat, witness, etc.
- Molecule: pinned molecule ID (if any)

Detection sources:
1. GT_ROLE environment variable (set by Gas Town sessions)
2. cwd path patterns (crew/, polecats/, witness/, refinery/)

Trailers are skipped for:
- Human commits (no agent context detected)
- Merge commits (have their own format)
- Commits that already have Executed-By trailer (avoid duplicates)

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2025-12-29 21:26:32 -08:00
Steve Yegge
a8748936e4 feat: add structured labels for agent beads (bd-g7eq)
Add role_type and rig labels to agent beads for filtering queries.

Changes:
- Add RoleType/Rig to CreateArgs and UpdateArgs in RPC protocol
- Auto-add role_type:<value> and rig:<value> labels when creating/updating agents
- Add --role-type and --agent-rig flags to bd create (requires --type=agent)
- Add bd agent backfill-labels command to update existing agent beads

This enables queries like:
  bd list --type=agent --label=role_type:witness
  bd list --type=agent --label=rig:gastown

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 21:15:46 -08:00
Steve Yegge
22fb3ff56b fix: improve --town mode robustness from code review
- resolveBeadsRedirect now verifies target exists before returning
- Added failure tracking to runTownActivityFollow (warns on rig disconnect)
- Created fetchTownMutationsWithStatus for tracking daemon availability
- Shows reconnection message when rigs come back online

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 21:13:37 -08:00
Steve Yegge
5f5a341624 bd sync: 2025-12-29 21:13:11 2025-12-29 21:13:11 -08:00
Steve Yegge
6b12efbb2b bd sync: 2025-12-29 21:10:00 2025-12-29 21:10:10 -08:00
Steve Yegge
26e491d7d4 feat: add --town flag to bd activity for aggregated cross-rig feed (bd-dx6e)
Adds --town flag that:
- Discovers all rigs via routes.jsonl
- Connects to each rig daemon
- Aggregates mutations from all daemons
- Sorts by timestamp for unified feed
- Works with --follow for real-time streaming

Usage:
  bd activity --town              # Aggregated feed from all rigs
  bd activity --follow --town     # Stream all rig activity

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 21:09:53 -08:00
Steve Yegge
35ffeea804 bd sync: 2025-12-29 21:09:05 2025-12-29 21:09:05 -08:00
Steve Yegge
b8a5ee162b feat: Add tracks relation type for convoy tracking (bd-3roq)
Adds non-blocking tracks dependency type for convoy to issue relationships:
- Non-blocking: does not affect ready work calculation
- Cross-prefix capable: convoys in hq-* can track issues in gt-*, bd-*
- Reverse lookup: bd dep list <id> --direction=up -t tracks

Also adds bd dep list command with direction and type filtering for
querying dependencies/dependents.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 21:04:45 -08:00
Steve Yegge
2b90f51d0c feat: add doctor check for issues.jsonl git tracking (GH#796)
Safeguard for users with global gitignore patterns like *.jsonl that
could cause issues.jsonl to be ignored, breaking bd sync.

The check runs git check-ignore and warns if issues.jsonl would be
ignored by any gitignore rule (global, parent directory, etc).
2025-12-29 20:58:30 -08:00
Steve Yegge
61edfafe4c bd sync: 2025-12-29 20:49:22 2025-12-29 20:49:22 -08:00
Steve Yegge
447fe84bf0 bd sync: 2025-12-29 20:47:42 2025-12-29 20:47:55 -08:00
Steve Yegge
fd781cee5b bd sync: 2025-12-29 18:30:11 2025-12-29 20:47:55 -08:00
Steve Yegge
aa759c06aa fix: improve jira sync error when Python script not found (GH#803)
- Add BD_JIRA_SCRIPT env var to let users specify script location
- Improve error message with clear instructions for binary users
- Show all locations that were searched
2025-12-29 18:44:03 -08:00
Steve Yegge
34e2548c86 feat: bd list defaults to non-closed issues with 50 limit (GH#788)
Changes:
- Default to excluding closed issues (use --all to include)
- Default limit of 50 issues (use --limit 0 for unlimited)
- --all flag now overrides the closed filter

This addresses agent context blowout from seeing hundreds of closed issues.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 17:54:56 -08:00