Skip to content

feat: integrate beads_rust as issue tracking backend#429

Merged
quangdang46 merged 5 commits into
masterfrom
feat/beads-integration
Jun 10, 2026
Merged

feat: integrate beads_rust as issue tracking backend#429
quangdang46 merged 5 commits into
masterfrom
feat/beads-integration

Conversation

@quangdang46

Copy link
Copy Markdown
Owner

Summary

Integrates beads_rust (the br issue tracker CLI) as a library dependency into jcode, replacing the dormant jcode-task-types / manual JSON-file task management with a proper SQLite-backed issue tracking system.

What was added

New crate: crates/jcode-beads-bridge

  • BeadsProject — lifecycle facade: open(), init(), open_or_init(), flush() (JSONL export)
  • BeadsTaskManager — task operations: CRUD, dependency graph, ready/blocked queries
  • mappingTodoItem, Goal, GoalMilestone types + conversion traits (ToBeadsIssue, ToBeadsEpic, ToJcodeGoal, ToJcodeTodoItem)

New agent tools (6)

Tool Description
beads_list List issues with status/label/assignee/sort filters
beads_create Create issues with title, priority, labels, type
beads_ready Show ready-to-work issues (no blockers, priority-ordered)
beads_claim Claim an issue (set status to in_progress)
beads_close Close an issue with optional reason
beads_dep Add/remove dependencies with cycle detection

jcode-base rewired

  • todo.rsload_todos(), save_todos(), todos_exist() now backed by beads_rust
  • goal.rs — full rewrite maintaining same public API, backed by beads Epic issues + side panel rendering
  • plan.rs — unchanged (jcode_plan still actively used by swarm control)

Cleanup

  • jcode-task-types dependency removed from jcode-base (still used by jcode-app-core for CatchupBrief)

Verification

cargo check  # ✅ full workspace, all targets, zero errors

Design

  • BeadsProject uses RefCell<SqliteStorage> for interior mutability, allowing shared access across tools
  • BeadsTaskManager wraps BeadsProject for a clean task-oriented API
  • Auto-flush to JSONL on mutation, write lock acquired at project open
  • open_or_init() creates a .beads/ project if none exists, so agents don't need to br init manually

- New crate: crates/jcode-beads-bridge — BeadsProject facade + BeadsTaskManager
  with open/init, CRUD, dependency graph, ready/blocked queries
- jcode-base: todo.rs, goal.rs, beads.rs rewritten to delegate to beads_rust
- New agent tools: beads_list, beads_create, beads_ready, beads_claim,
  beads_close, beads_dep — registered in base_tools()
- Removed jcode-task-types dep from jcode-base (still used by app-core
  for CatchupBrief/PersistedCatchupState)
- Full workspace compiles clean with zero errors
PR #429 needs the dependency to resolve on any machine, not just
the developer's local checkout.
- Replace !Sync RefCell with Mutex in BeadsProject for thread safety
- Add 9 integration tests covering CRUD, deps, cycles, mapping roundtrips
- Fix test path resolution for macOS /var→/private/var symlink handling
- Minor import cleanup
@quangdang46 quangdang46 merged commit 1ad35fb into master Jun 10, 2026
3 of 10 checks passed
@quangdang46 quangdang46 deleted the feat/beads-integration branch June 10, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant