Commit Graph

4451 Commits

Author SHA1 Message Date
Steve Yegge
14388616c3 bd sync: 2025-12-30 18:11:22 2025-12-30 18:11:22 -08:00
Steve Yegge
8f4af0a242 Fix bd sync failing to copy local changes to beads-sync worktree (GH#810)
The root cause was isExternalBeadsDir() incorrectly identifying bare repo
worktrees as "external" repos. This caused bd sync to take the "external
beads dir" code path instead of the worktree-based sync branch path.

The bug: isExternalBeadsDir() compared syncbranch.GetRepoRoot() (which returns
incorrect values for bare repo worktrees) with getRepoRootFromPath() (which
uses --show-toplevel). These returned different values for bare repo
worktrees, causing local worktrees to be treated as external.

The fix: Use git rev-parse --git-common-dir for comparison instead of repo
root. This correctly identifies that worktrees of the same repo share the
same git directory, regardless of bare repo setup.

Also added:
- getGitCommonDir() helper function
- Tests for both getGitCommonDir and isExternalBeadsDir

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 18:11:08 -08:00
Steve Yegge
9cc385debc feat: Add --claim flag to bd update for work queue semantics (gt-il2p7)
Adds atomic claim operation for work queue messages:

- New --claim flag on bd update command
- Sets assignee to claimer and status to in_progress
- Fails with clear error if already claimed by someone else
- Works in both daemon and direct modes
- Includes comprehensive tests for claim functionality

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 18:09:34 -08:00
Steve Yegge
cf4aff1cb4 fix: bypass gitHasBeadsChanges when using sync-branch (#812)
When using sync-branch with aggressive gitignore on code branches
(.beads/* ignored), gitHasBeadsChanges() returns false because git
does not track the files. This caused bd sync to skip CommitToSyncBranch
entirely, even though CommitToSyncBranch has its own internal change
detection that checks the worktree where gitignore is different.

The fix bypasses gitHasBeadsChanges when useSyncBranch is true, letting
CommitToSyncBranch determine if there are actual changes in the worktree.

Closes #812

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 18:04:26 -08:00
Steve Yegge
38a6097512 fix(doctor): wire up CheckRedirectNotTracked and FixRedirectTracking
Completes the work from #813 by actually calling the new functions:
- Add Check 14b in doctor.go for redirect file tracking detection
- Add Redirect Not Tracked case in doctor_fix.go switch statement

Without this wiring, bd doctor would not detect or fix already-tracked
redirect files, only prevent new ones via the updated .gitignore template.

🤖 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 18:01:58 -08:00
Peter Chanthamynavong
c98f5827bf fix(doctor): add redirect to .gitignore template for worktree support (#813)
When bd worktree creates a worktree, it writes a .beads/redirect file
pointing back to the main repo's .beads/. If this file is accidentally
committed (e.g., via git add .), it causes "redirect target does not exist"
warnings when cloned or used in other worktrees.

Changes:
- Add 'redirect' to GitignoreTemplate to prevent future accidental commits
- Add 'redirect' to requiredPatterns so bd doctor detects outdated .gitignore
- Add CheckRedirectNotTracked() to detect already-tracked redirect files
- Add FixRedirectTracking() to untrack accidentally committed redirects

Tests: 8 new tests covering template, detection, and fix scenarios
2025-12-30 18:00:50 -08:00
Steve Yegge
aff38708e0 fix: bd doctor false positive for molecule/wisp prefix variants
The prefix mismatch check in bd doctor was reporting warnings when
issues were created via molecule workflows (bd mol pour), which
intentionally use a different prefix pattern (<base>-mol instead
of just <base>).

Added recognition of valid workflow prefix variants:
- <prefix>-mol (molecules from bd mol pour)
- <prefix>-wisp (ephemeral wisps)
- <prefix>-eph (ephemeral issues)

These are intentional prefix extensions for visual distinction, not
actual mismatches. The check now only warns for truly mismatched
prefixes (e.g., different project entirely).

Added comprehensive regression tests for all prefix variant cases.

Fixes #811

Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 17:43:47 -08:00
Steve Yegge
4ab85eeb9d Add unit tests to improve cmd/bd CLI coverage (bd-llfl)
Added 479 lines of new tests:

- utils_unit_test.go: Tests for utility functions (truncateString,
  pluralize, formatTimeAgo, containsLabel, extractIDSuffix, truncate,
  truncateDescription, showCleanupDeprecationHint, clearAutoFlushState)

- hooks_test.go: Tests for FormatHookWarnings, isRebaseInProgress,
  hasBeadsJSONL

- list_test.go: Tests for formatIssueLong, formatIssueCompact

- version_tracking_test.go: Fixed flaky tests by setting BEADS_DIR
  env var to prevent git worktree detection from finding the actual
  .beads directory instead of the temp directory

Coverage increased from 21.6% to 22.0%. The remaining 78% of untested
code involves daemon/RPC operations, command handlers requiring
database/daemon setup, and git operations that would require
integration tests with mocked dependencies.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 17:14:55 -08:00
Steve Yegge
def4cf4efa Add sync branch integrity guards for force-push detection (bd-hlsw.4)
This implements sync branch integrity guards that detect when the remote
sync branch has been force-pushed since the last sync, preventing silent
data corruption.

Changes:
- Add internal/syncbranch/integrity.go with:
  - CheckForcePush() - detects force-push via stored remote SHA comparison
  - UpdateStoredRemoteSHA() - stores current remote SHA after successful sync
  - ClearStoredRemoteSHA() - clears stored SHA when resetting
  - GetStoredRemoteSHA() - retrieves stored SHA for inspection

- Update cmd/bd/sync.go to:
  - Add --accept-rebase flag for non-interactive reset to remote
  - Add force-push detection before sync branch pull operations
  - Prompt user for confirmation when force-push detected
  - Update stored remote SHA after successful sync

The implementation:
1. Tracks the remote sync branch commit SHA in config after each sync
2. On subsequent syncs, checks if stored SHA is ancestor of current remote
3. If not (force-push detected), warns user with details and prompts
4. User can accept reset or abort to investigate manually
5. --accept-rebase flag allows scripted/non-interactive recovery

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 17:07:25 -08:00
Steve Yegge
6df2d69bbf Design contributor namespace isolation for beads pollution prevention
Addresses the self-hosting recursion problem where contributors using
beads-the-tool on beads-the-project leak personal issues into PRs.

Design recommends auto-routing (Approach 4):
- Detect user role via git remote URL (SSH=maintainer, HTTPS=contributor)
- Route contributor issues to ~/.beads-planning automatically
- Zero-friction default with explicit override available

Key finding: bd-6x6g needs implementation - routing is calculated but
not actually used to switch target repo in bd create.

Enables bd-lfak (PR preflight checks) to implement pollution detection.

(bd-umbf)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 17:06:36 -08:00
Steve Yegge
da550f0e1b Add close_reason to JSONL format documentation and tests (bd-lxzx)
- Add comprehensive JSONL Issue Schema section to docs/ARCHITECTURE.md
  documenting all exported fields including close_reason
- Add TestCloseReasonRoundTrip test in export_import_test.go to verify
  close_reason is preserved through JSONL export/import cycle

Closes: bd-lxzx

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 17:05:48 -08:00
Steve Yegge
24f3afcb0c bd sync: 2025-12-30 17:01:07 2025-12-30 17:01:07 -08:00
Steve Yegge
ec46829da5 bd sync: 2025-12-30 17:00:00 2025-12-30 17:00:00 -08:00
Steve Yegge
a34f189153 Add 'last touched' issue tracking for update/close without ID
When no issue ID is provided to `bd update` or `bd close`, use the last
touched issue from the most recent create, update, show, or close operation.

This addresses the common workflow where you create an issue and then
immediately want to add more details (like changing priority from P2 to P4)
without re-typing the issue ID.

Implementation:
- New file last_touched.go with Get/Set/Clear functions
- Store last touched ID in .beads/last-touched (gitignored)
- Track on create, update, show, and close operations
- Allow update/close with zero args to use last touched

(bd-s2t)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:58:10 -08:00
Steve Yegge
eda74e62ea bd sync: 2025-12-30 16:45:58 2025-12-30 16:58:10 -08:00
Steve Yegge
e39dc88b68 bd sync: 2025-12-30 16:10:24 2025-12-30 16:58:10 -08:00
Steve Yegge
f94e8d468f 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:58:10 -08:00
Steve Yegge
9ed15c2844 bd sync: 2025-12-30 15:56:45 2025-12-30 16:58:10 -08:00
Steve Yegge
d2cd19ab4d bd sync: 2025-12-30 15:54:09 2025-12-30 16:58:10 -08:00
Steve Yegge
3531653fc2 bd sync: 2025-12-30 15:52:08 2025-12-30 16:58:10 -08:00
Steve Yegge
8eccc3d4f1 Add debug logging for YAML parse errors in autoimport (bd-mql4)
When config.yaml has malformed YAML, getLocalSyncBranch and
isNoDbModeConfigured were silently returning empty/false with no
feedback, making debugging difficult. Now they log a warning via
debug.Logf when YAML parsing fails.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:51:14 -08:00
Steve Yegge
eae4e9f11e bd sync: 2025-12-30 16:45:58 2025-12-30 16:51:14 -08:00
Steve Yegge
3df87e4645 bd sync: 2025-12-30 16:10:24 2025-12-30 16:51:14 -08:00
Steve Yegge
952944e295 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:51:14 -08:00
Steve Yegge
d40a08baf5 bd sync: 2025-12-30 15:56:45 2025-12-30 16:51:14 -08:00
Steve Yegge
c904487304 bd sync: 2025-12-30 15:54:09 2025-12-30 16:51:14 -08:00
Steve Yegge
12a6357f07 bd sync: 2025-12-30 15:52:08 2025-12-30 16:51:14 -08:00
Steve Yegge
6b78b3fceb fix: bd sync fails to copy local changes TO beads-sync worktree (#810)
The bug: In a bare repo + worktrees setup, jsonlRelPath was calculated
relative to the project root (containing all worktrees), resulting in
paths like "main/.beads/issues.jsonl". But the sync branch worktree uses
sparse checkout for .beads/*, so files are at ".beads/issues.jsonl".

This caused SyncJSONLToWorktreeWithOptions to write to the wrong location
(e.g., worktree/main/.beads/ instead of worktree/.beads/), so changes
made locally never reached the sync branch worktree.

#785 fixed the reverse direction (worktree → local) by adding
normalizeBeadsRelPath(), but the local → worktree direction was missed.

Fix:
- Export NormalizeBeadsRelPath() (uppercase) for cross-package use
- Apply normalization in SyncJSONLToWorktreeWithOptions for dstPath
- Apply normalization in daemon_sync_branch.go for worktreeJSONLPath
  in both commit and pull paths
- Add unit tests for the normalization function

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:49:50 -08:00
Steve Yegge
7d4e8e2db9 fix: read operations no longer modify database file (GH#804)
Add SQLite read-only mode for commands that only query data (list, ready,
show, stats, blocked, count, search, graph, duplicates, comments, export).

Changes:
- Add NewReadOnly() and NewReadOnlyWithTimeout() to sqlite package
  - Opens with mode=ro to prevent any file writes
  - Skips WAL pragma, schema init, and migrations
  - Skips WAL checkpoint on Close()
- Update main.go to detect read-only commands and use appropriate opener
- Skip auto-migrate, FlushManager, and auto-import for read-only commands
- Add tests verifying file mtime is unchanged after read operations

This fixes the issue where file watchers (like beads-ui) would go into
infinite loops because bd list/show/ready modified the database file.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:47:38 -08:00
Steve Yegge
994512654c fix: prevent sync.branch from being set to main/master (#807)
Two issues fixed:
1. `bd init` was auto-detecting current branch (e.g., main) as sync.branch
   when no --branch flag was specified. This caused worktree conflicts.
2. Added validation to reject main/master as sync.branch values.

When sync.branch is set to main, the worktree mechanism creates a checkout
of main at .git/beads-worktrees/main/, which prevents git checkout main
from working in the user's working directory.

The sync branch feature should use a dedicated branch like 'beads-sync'.

🤖 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 16:45:51 -08:00
Steve Yegge
6d84701a5f fix: migration 022 fails with SQL syntax error on v0.30.3 upgrade
db.Exec was being passed %s format specifiers directly in the SQL
string, but db.Exec does not do printf-style formatting - it uses the
variadic args as SQL parameter bindings. This caused the literal %s
to be sent to SQLite, which failed with near percent: syntax error.

Fixed by using fmt.Sprintf to interpolate the column expressions into
the SQL string before passing to db.Exec.

Added regression test that creates an old-schema database with edge
columns (replies_to, relates_to, duplicate_of, superseded_by) and
verifies migration 022 completes successfully.

Fixes #809

Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:45:01 -08:00
Steve Yegge
f91d4fa975 Refactor: Introduce CommandContext to consolidate global variables (bd-qobn)
This addresses the code smell of 20+ global variables in main.go by:

1. Creating CommandContext struct in context.go that groups all runtime state:
   - Configuration (DBPath, Actor, JSONOutput, etc.)
   - Runtime state (Store, DaemonClient, HookRunner, etc.)
   - Auto-flush/import state
   - Version tracking
   - Profiling handles

2. Adding accessor functions (getStore, getActor, getDaemonClient, etc.)
   that provide backward-compatible access to the state while allowing
   gradual migration to CommandContext.

3. Updating direct_mode.go to demonstrate the migration pattern using
   accessor functions instead of direct global access.

4. Adding test isolation helpers (ensureCleanGlobalState, enableTestModeGlobals)
   to prevent test interference when multiple tests manipulate global state.

Benefits:
- Reduces global count from 20+ to 1 (cmdCtx)
- Better testability (can inject mock contexts)
- Clearer state ownership (all state in one place)
- Thread safety (mutexes grouped with the data they protect)

Note: Two pre-existing test failures (TestTrackBdVersion_*) are unrelated to
this change and fail both with and without these modifications.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:29:28 -08:00
Steve Yegge
21a0ff6d0d Add type: event for state transitions (bd-ecmd)
Adds TypeEvent issue type for recording operational state changes as
immutable beads. Events capture:
- event_category: namespaced category (e.g., patrol.muted, agent.started)
- event_actor: entity URI who caused the event
- event_target: entity URI or bead ID affected
- event_payload: event-specific JSON data

Changes:
- Add TypeEvent constant and IsValid() support in types.go
- Add event fields to Issue struct with ComputeContentHash support
- Add --event-category/actor/target/payload flags to bd create
- Add event fields to RPC CreateArgs and UpdateArgs
- Add migration 033_event_fields to add columns to issues table
- Update insertIssue and queries to include event fields
- Fix migrations_test.go for new column requirements

This enables:
- bd activity --follow showing events
- bd list --type=event --target=agent:deacon
- Full audit trail for operational state
- HOP-compatible transaction records

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:27:59 -08:00
Steve Yegge
aa2c66c4f7 Implement Jira issue timestamp comparison for sync (bd-0qx5)
Add actual timestamp comparison to detect conflicts during Jira sync:
- Add fetchJiraIssueTimestamp() to fetch a single issue's updated timestamp from Jira REST API
- Add extractJiraKey() to parse Jira issue key from external_ref URLs
- Add parseJiraTimestamp() to parse Jira's ISO 8601 timestamp format
- Update detectJiraConflicts() to fetch and compare Jira timestamps instead of marking all locally-updated issues as conflicts
- Update resolveConflictsByTimestamp() to show actual timestamp comparison results
- Update reimportConflicts() to display both local and Jira timestamps

Now only issues that have been modified on BOTH sides since the last sync are reported as conflicts, reducing false positives.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:07:31 -08:00
Steve Yegge
9ee4fb50e2 Refactor TestZFCSkipsExportAfterImport to use direct import logic (bd-h048)
The test was previously skipped because it called importFromJSONL which spawns
a subprocess. During tests, os.Executable() returns the test binary rather
than the bd binary, causing the subprocess to fail.

Changes:
- Remove t.Skip() and TODO comment
- Parse JSONL directly using encoding/json instead of subprocess
- Call importIssuesCore directly instead of importFromJSONL
- Update DB count expectation to reflect actual import behavior (additive)

The core ZFC fix behavior is preserved: when divergence is detected,
import runs and export is skipped to protect the JSONL source of truth.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:05:15 -08:00
Steve Yegge
b45e68c5ce Add BD_AGENT_MODE for ultra-compact output
Adds agent-optimized output mode for `bd list` triggered by:
- BD_AGENT_MODE=1 environment variable (explicit)
- CLAUDE_CODE environment variable (auto-detect)

Agent mode provides:
- Ultra-compact format: just "ID: Title" per line
- Lower default limit (20 vs 50) for context efficiency
- No colors, no emojis, no pager
- Defaults to open/in_progress only (existing behavior)

(bd-x2ht)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:04:39 -08:00
Steve Yegge
288334f8b4 bd sync: 2025-12-30 16:02:24 2025-12-30 16:02:24 -08:00
Steve Yegge
643a162f0e Centralize validation patterns with composable validators (bd-jbqx)
Add composable issue validators to internal/validation package:
- IssueValidator type with Chain() composition function
- Exists(), NotTemplate(), NotPinned(), NotClosed(), NotHooked() validators
- HasStatus(), HasType() for checking allowed values
- ForUpdate(), ForClose(), ForDelete(), ForReopen() convenience chains

Update cmd/bd/show_unit_helpers.go to use centralized validators instead
of duplicated inline validation logic. This enables consistent validation
across all commands with a single source of truth.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:00:22 -08:00
Steve Yegge
0f21a80fe0 Add debug logging for tombstone resurrection events
When debug mode is enabled, the merge system now logs a message when
an expired tombstone loses to a live issue (resurrection occurs).
This helps understand why previously closed issues reappear.

Example output: "Issue bd-abc resurrected (tombstone expired)"

Changes:
- Add debug parameter to Merge3WayWithTTL and merge3Way functions
- Add debug logging in all 4 resurrection code paths
- Update tests to pass new debug parameter (bd-nl2)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 15:59:51 -08:00
Steve Yegge
84a7cea35e bd sync: 2025-12-30 15:59:32 2025-12-30 15:59:32 -08:00
Steve Yegge
31ee2a61b5 Use types.Status constants in merge package for type safety
Added StatusClosed constant derived from types.StatusClosed alongside
the existing StatusTombstone constant. Replaced hardcoded "closed"
strings with the constant for compile-time type checking consistency.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 15:58:49 -08:00
Steve Yegge
48dca4ea33 feat: add bd state and bd set-state helper commands (bd-7l67)
Implements convenience commands for the labels-as-state pattern:

- `bd state <id> <dimension>` - Query current state value from labels
- `bd state list <id>` - List all state dimensions on an issue
- `bd set-state <id> <dimension>=<value> --reason "..."` - Atomically:
  1. Create event bead (source of truth)
  2. Remove old dimension label
  3. Add new dimension:value label (cache)

Common dimensions: patrol, mode, health, status
Convention: <dimension>:<value> (e.g., patrol:active, mode:degraded)

Updated docs/CLI_REFERENCE.md with new State section.
Updated docs/LABELS.md to reflect implemented helpers.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 15:57:08 -08:00
Steve Yegge
a534764315 Document labels-as-state pattern for operational state (bd-31ae)
Adds comprehensive documentation for using labels as a state cache:
- Convention: <dimension>:<value> (e.g., patrol:muted)
- Pattern: Create event bead (history) + update labels (cache)
- Common dimensions table (patrol, mode, status, health, lock)
- State transition examples with audit trail
- Querying and best practices

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 15:56:52 -08:00
Steve Yegge
be46c18850 bd sync: 2025-12-30 15:47:21 2025-12-30 15:56:52 -08:00
Steve Yegge
a98ba7d2bc bd sync: 2025-12-30 15:44:48 2025-12-30 15:56:52 -08:00
Steve Yegge
8916780c74 bd sync: 2025-12-30 15:44:39 2025-12-30 15:56:52 -08:00
Steve Yegge
32c295c7d9 bd sync: 2025-12-30 10:38:01 2025-12-30 15:56:52 -08:00
Steve Yegge
087a9dd984 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 15:56:52 -08:00
Steve Yegge
6d292f6a0f feat: add type: event for operational state changes (bd-ecmd)
Adds support for event beads that capture operational state transitions
as immutable records. Events are a new issue type with fields:
- event_kind: namespaced category (patrol.muted, agent.started)
- actor: entity URI who caused the event
- target: entity URI or bead ID affected
- payload: event-specific JSON data

This enables:
- bd activity --follow showing events
- bd list --type=event --target=agent:deacon
- Full audit trail for operational state
- HOP-compatible transaction records

🤖 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 15:54:51 -08:00
Steve Yegge
407e75b363 feat: add refs field for cross-references with relationship types (bd-irah)
- Add new DependencyType constants: until, caused-by, validates
- Add --refs flag to bd show for reverse reference lookups
- Group refs by type with appropriate emojis
- Update tests for new dependency types

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 15:52:33 -08:00