Commit Graph

5369 Commits

Author SHA1 Message Date
beads/crew/dave 2ee0995f51 feat(rpc): add AllowStale option to List API (bd-dpkdm)
Add AllowStale field to ListArgs struct to support resilient hook detection.
When set, callers signal they accept potentially stale data rather than
failing on staleness check errors.

This enables gastown checkSlungWork() to fall back gracefully when the
beads database is out of sync with JSONL (common after concurrent agent syncs).

- Add AllowStale bool to ListArgs in internal/rpc/protocol.go
- Pass --allow-stale flag through to RPC in cmd/bd/list.go

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

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2026-01-09 00:42:13 -08:00
mayor 2d0d3d2c95 bd sync: 2026-01-08 22:58:36 2026-01-08 22:58:36 -08:00
dave 6331a9771a feat(mol): add bd ready --gated for gate-resume discovery (bd-lhalq)
Add new command to find molecules where a gate has closed and the workflow
is ready to resume:

- `bd ready --gated` - Flag on existing ready command
- `bd mol ready` - Subcommand for discoverability

The command finds molecules where:
1. A gate bead (type=gate) has been closed
2. The step blocked by that gate is now ready
3. The molecule is not currently hooked by any agent

This enables the Deacon patrol to discover and dispatch gate-ready
molecules without explicit waiter tracking, supporting async molecule
resume workflows.

Includes 5 tests verifying:
- No false positives when no gates exist
- Detection of molecules with closed gates
- Filtering out molecules with open gates
- Filtering out already-hooked molecules
- Handling multiple gate-ready molecules

Part of epic bd-ka761 (Gate-based async molecule resume).

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

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2026-01-08 21:22:17 -08:00
Ryan Snodgrass cfd1f39e1e feat(ux): visual improvements for list tree, graph, and show commands
bd list --tree:
- Use actual parent-child dependencies instead of dotted ID hierarchy
- Treat epic dependencies as parent-child relationships
- Sort children by priority (P0 first)
- Fix tree display in daemon mode with read-only store access

bd graph:
- Add --all flag to show dependency graph of all open issues
- Add --compact flag for tree-style rendering (reduces 44+ lines to 13)
- Fix "needs:N" cognitive noise by using semantic colors
- Add blocks:N indicator with semantic red coloring

bd show:
- Tufte-aligned header with status icon, priority, and type badges
- Add glamour markdown rendering with auto light/dark mode detection
- Cap markdown line width at 100 chars for readability
- Mute entire row for closed dependencies (work done, no attention needed)

Design system:
- Add shared status icons (○ ◐ ● ✓ ❄) with semantic colors
- Implement priority colors: P0 red, P1 orange, P2 muted gold, P3-P4 neutral
- Add TrueColor profile for distinct hex color rendering
- Type badges for epic (purple) and bug (red)

Design principles:
- Semantic colors only for actionable items
- Closed items fade (muted gray)
- Icons > text labels for better scanability

Co-Authored-By: SageOx <ox@sageox.ai>
2026-01-08 20:50:56 -08:00
Ryan Snodgrass 7e70de1f6d docs: add daemon technical analysis and update agent instructions
- Add comprehensive daemon architecture documentation to CLAUDE.md
- Update AGENTS.md with AI workflow guidelines
- Document auto-sync configuration for simpler agent workflows

Co-Authored-By: SageOx <ox@sageox.ai>
2026-01-08 20:37:31 -08:00
emma 66047bcc25 fix(lint): resolve CI lint failures for v0.47.0 release
- resolve_conflicts.go: Mark unused `num` parameter with `_`
- .golangci.yml: Add resolve_conflicts.go to G306 exclusion (JSONL files use 0644)
- .golangci.yml: Add doctor/git.go to G304 exclusion (safe path construction)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 20:21:02 -08:00
deacon 4d57f32a3e bd daemon sync: 2026-01-08 18:25:13 2026-01-08 18:25:13 -08:00
deacon a740252222 bd daemon sync: 2026-01-08 18:22:23 2026-01-08 18:22:23 -08:00
deacon 0887b7117b bd daemon sync: 2026-01-08 18:22:02 2026-01-08 18:22:02 -08:00
deacon 90f73ed4ed bd daemon sync: 2026-01-08 17:57:40 2026-01-08 17:57:40 -08:00
deacon 60fb8ae9d7 bd daemon sync: 2026-01-08 17:53:01 2026-01-08 17:53:01 -08:00
emma d1e73294f1 bd daemon sync: 2026-01-08 14:37:40 2026-01-08 14:37:40 -08:00
emma 1dddf6fbef bd daemon sync: 2026-01-08 14:37:26 2026-01-08 14:37:26 -08:00
emma 410b763dce bd daemon sync: 2026-01-08 14:37:20 2026-01-08 14:37:20 -08:00
emma 48190fd805 bd daemon sync: 2026-01-08 14:37:02 2026-01-08 14:37:02 -08:00
Peter Chanthamynavong 28ff9fe991 fix(sync): canonicalize dbPath to fix filepath.Rel error (GH#959) (#960)
Problem:
- When dbPath is set to relative fallback (".beads/beads.db"),
  findJSONLPath() returns a relative path
- daemon_sync_branch.go calls filepath.Rel(absolutePath, relativePath)
  which fails with: "Rel: can't make .beads/issues.jsonl relative to ..."

Solution:
- Canonicalize dbPath at assignment in main.go:471 (source fix)
- Add defensive guard in findJSONLPath() (defense-in-depth)
- Use utils.CanonicalizePath() for OS-agnostic handling
  (symlinks, case normalization on macOS)

Testing:
- Add TestFindJSONLPath_RelativeDbPath (tracer bullet for bug)
- Add edge case tests for BEADS_JSONL and empty dbPath
- All sync mode tests pass including daemon E2E
2026-01-08 14:36:50 -08:00
Peter Chanthamynavong 4486e0e7bd fix(rpc): add --due and --defer handling to daemon mode (GH#952) (#953)
Reviewed by beads/crew/wolf. Fixes daemon mode silently ignoring --due and --defer flags. Adds comprehensive tests including TestDualPathParity for regression prevention.
2026-01-08 14:36:47 -08:00
emma dda3b536fe bd daemon sync: 2026-01-08 14:36:46 2026-01-08 14:36:46 -08:00
Peter Chanthamynavong 65214b7693 fix(rpc): return JSON data for dep add/remove in daemon mode (#961)
* test(rpc): add failing tests for dep add/remove JSON output (GH#952)

- Add TestDepAdd_JSONOutput: verify Response.Data contains JSON
- Add TestDepRemove_JSONOutput: verify Response.Data contains JSON

Tests prove bug exists: handlers return Response{Success: true}
without populating Data field.

* fix(rpc): return JSON data for dep add/remove in daemon mode (GH#952)

Problem:
- bd dep add/remove --json returned empty output in daemon mode
- handleDepAdd() and handleSimpleStoreOp() didn't populate Response.Data

Solution:
- handleDepAdd: add Data field with JSON result
- handleSimpleStoreOp: add optional responseData callback parameter
- handleDepRemove: provide response data callback
- Label handlers: pass nil (maintain current behavior)
2026-01-08 14:36:07 -08:00
emma 498a3090e8 bd daemon sync: 2026-01-08 14:35:24 2026-01-08 14:35:24 -08:00
emma d1917cd368 bd daemon sync: 2026-01-08 14:35:05 2026-01-08 14:35:05 -08:00
Peter Chanthamynavong cbefb11c0f test(dep): add regression tests for FK error messages (GH#952) (#964)
- TestDepAdd_FKError: validates user-friendly error for invalid issue IDs
- TestDepAdd_FKError_JSON: verifies JSON output mode
- TestDepAdd_FKError_Daemon: tests daemon mode error wrapping
- TestDepRemove_FKError: confirms dep remove behavior (N/A for FK errors)

Discovery: Storage layer already pre-validates issue IDs before INSERT,
so FK constraint errors don't occur at that layer. Tests serve as
regression coverage ensuring error messages remain user-friendly.
2026-01-08 14:32:12 -08:00
emma 5a694b0cba bd daemon sync: 2026-01-08 14:31:20 2026-01-08 14:31:20 -08:00
emma 9ea8fa5d68 bd daemon sync: 2026-01-08 14:30:53 2026-01-08 14:30:53 -08:00
emma 29858230d5 bd daemon sync: 2026-01-08 14:30:52 2026-01-08 14:30:52 -08:00
emma df554ae1b1 bd daemon sync: 2026-01-08 14:30:50 2026-01-08 14:30:50 -08:00
emma d1014c2f35 bd daemon sync: 2026-01-08 14:30:48 2026-01-08 14:30:48 -08:00
emma 2d21603a55 bd daemon sync: 2026-01-08 14:30:25 2026-01-08 14:30:25 -08:00
emma 5de5fb4877 bd daemon sync: 2026-01-08 14:30:24 2026-01-08 14:30:24 -08:00
emma 8396febaee bd daemon sync: 2026-01-08 14:30:23 2026-01-08 14:30:23 -08:00
emma fbe38d324d bd daemon sync: 2026-01-08 14:30:22 2026-01-08 14:30:22 -08:00
emma 40463988b2 bd daemon sync: 2026-01-08 14:29:36 2026-01-08 14:29:36 -08:00
emma efc234e267 bd daemon sync: 2026-01-08 14:29:26 2026-01-08 14:29:26 -08:00
emma 2c73246194 bd daemon sync: 2026-01-08 14:23:46 2026-01-08 14:23:46 -08:00
emma 90b3a14d4c bd daemon sync: 2026-01-08 14:23:28 2026-01-08 14:23:28 -08:00
emma fd3b380439 bd daemon sync: 2026-01-08 14:23:27 2026-01-08 14:23:27 -08:00
emma d0441ceac7 bd daemon sync: 2026-01-08 14:23:18 2026-01-08 14:23:18 -08:00
emma a693831607 bd daemon sync: 2026-01-08 14:22:41 2026-01-08 14:22:41 -08:00
emma 5450f55386 bd daemon sync: 2026-01-08 14:22:40 2026-01-08 14:22:40 -08:00
emma 5d1d13ba32 bd daemon sync: 2026-01-08 14:22:38 2026-01-08 14:22:38 -08:00
emma 48a082d633 bd daemon sync: 2026-01-08 14:22:36 2026-01-08 14:22:36 -08:00
emma 3697145f57 bd daemon sync: 2026-01-08 14:22:23 2026-01-08 14:22:23 -08:00
emma 64d0740f64 bd daemon sync: 2026-01-08 14:22:21 2026-01-08 14:22:21 -08:00
emma 97de7136dc bd daemon sync: 2026-01-08 14:22:10 2026-01-08 14:22:10 -08:00
emma d5382f4c10 bd daemon sync: 2026-01-08 14:21:48 2026-01-08 14:21:48 -08:00
emma 8d00801717 bd daemon sync: 2026-01-08 14:20:30 2026-01-08 14:20:30 -08:00
emma c608e9e601 bd daemon sync: 2026-01-08 14:20:28 2026-01-08 14:20:28 -08:00
emma c84e793ba3 bd daemon sync: 2026-01-08 14:20:27 2026-01-08 14:20:27 -08:00
emma 13ed4acb43 bd daemon sync: 2026-01-08 14:20:26 2026-01-08 14:20:26 -08:00
emma 1ebc515f81 bd daemon sync: 2026-01-08 14:20:08 2026-01-08 14:20:08 -08:00