| name | beads-tasks |
| description | Persistent task management via Beads CLI (bd). Use when user mentions tasks, todos, issues, or tracking work. Check `which bd` first โ if missing, offer: `npm install -g @beads/bd`. All commands: run from `$BEATS_DIR` (for example `~/.niahere/beads`) and use `bd <command>`. Always label: `--label project:<project-name>`. Run `bd --help` or `bd help --all` for available commands. Not for ephemeral in-conversation tracking.
|
Overview
Global task manager powered by Beads. Stores all tasks in
~/.niahere/beads/ as a single cross-project DB. Projects are organized via project:<name> labels.
Quick Start
- Check
which bd โ install if missing.
- Ensure
~/.niahere/beads/.beads exists โ bd init if not.
- Set
BEATS_DIR to your Beads workspace (for example ~/.niahere/beads).
- All commands:
cd "$BEATS_DIR" && bd <command>.
- Always label with
--label project:<name>.
- Run
cd "$BEATS_DIR" && bd --help or bd help --all for available commands.
Core Commands
Creating tasks
bd create --title "Fix auth token refresh" --priority P2 --type bug
bd create --title "Extract shared logic" --priority P2 --type task --parent <parent-id>
bd create --title "Chat fails on long docs" --type bug --description "Fails on docs >500 pages. Ref: https://..."
bd create --title "API performance improvements" --type epic --priority P2
Updating tasks
bd update is the workhorse โ use it for reparenting, reprioritizing, retyping, renaming:
bd update <id> --parent <new-parent-id>
bd update <id> --parent ""
bd update <id> --priority P1
bd update <id> --type bug
bd update <id> --title "Better title"
bd update <id> --status in_progress
bd update <id> --description "..."
bd update <id> --add-label personal
bd update <id> --set-labels bug,urgent
bd update <id> --claim
bd update <id> --set-metadata team=platform
Chain multiple updates: bd update <id> --priority P1 --type bug --parent <parent-id>
Viewing tasks
bd list
bd list --all
bd list --label project:<name>
bd ready
bd ready --claim
bd show <id>
bd show <id> --long
bd show --current --long
bd children <id>
Closing tasks
bd close <id>
bd reopen <id>
Warning: Closing a parent does NOT close or reparent its children. If a parent epic is done but children remain open, reparent them first or they become orphaned top-level items.
Decision Points
- User says "add a task" / "remind me to" / "track this" โ
bd create
- User says "what's on my plate" / "show tasks" โ
bd list
- User asks about a specific task โ
bd show <id>
- User says "done with X" / "finished" โ
bd close <id>
- User wants to see cross-project work โ
bd list (no project filter)
- User wants project-specific view โ
bd list --label project:<name>
- bd not installed โ offer install, don't silently fail
- Ephemeral/conversation-only tracking โ use conversation context, not beads
bd set-state ... state=... is for operational metadata only; it does not change the task status shown in list.
Agent Session Tracking
When a Beads task is worked in Claude Code, Codex, or another agent CLI, store the active session on the task as metadata. Do not invent session IDs yourself; let the tool create the session, then attach the discovered session ID to the bead.
Use one shared metadata schema for all tools:
session_tool=codex|claude
session_id=<tool-created-session-id>
session_cwd=<absolute repo/worktree path>
session_resume_cmd=<exact resume command>
session_attached_at=<ISO timestamp>
Attach a session after starting or identifying it:
cd "$BEATS_DIR"
bd update <id> --claim
bd update <id> \
--set-metadata session_tool=codex \
--set-metadata session_id="$sid" \
--set-metadata session_cwd="$PWD" \
--set-metadata session_resume_cmd="cd $PWD && codex resume $sid" \
--set-metadata session_attached_at="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
bd note <id> "Attached codex session $sid"
For Claude, use the same keys and a Claude resume command:
bd update <id> \
--set-metadata session_tool=claude \
--set-metadata session_id="$sid" \
--set-metadata session_cwd="$PWD" \
--set-metadata session_resume_cmd="cd $PWD && claude --resume $sid" \
--set-metadata session_attached_at="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
Find session-backed tasks:
bd list --has-metadata-key session_id --all --long
bd list --metadata-field session_tool=codex --all --long
bd list --metadata-field session_tool=claude --all --long
bd show <id> --long
bd show --current --long
Use task metadata as the source of truth. bd kv is global and not task-scoped, so do not use it for task sessions. bd audit is append-only history, not a jump table. Notes/comments are useful human breadcrumbs, but the resume command and session ID should live in metadata.
Hierarchy & Organization
When to use parent-child vs labels
- Parent-child (
--parent): for structural grouping โ epics containing subtasks, features broken into steps.
- Labels (
--add-label): for cross-cutting tags โ personal, urgent, project:<name>. A task can have multiple labels but only one parent.
Epic patterns
- Use
--type epic for containers that group related work.
- Epics can nest: epic > sub-epic > tasks.
- Keep epic titles broad ("API improvements"), subtask titles specific ("Reduce /search latency from 2s to 200ms").
Cleanup & auditing
Periodically review with bd list and look for:
- Orphaned tasks โ top-level items that should be under an epic.
- Similar ungrouped tasks โ multiple tasks on the same topic that should share a parent.
- Misplaced tasks โ bugs under improvement epics or vice versa.
- Stale tasks โ open tasks that are actually done or no longer relevant.
When reorganizing, reparent with bd update <id> --parent <new-parent> โ don't delete and recreate.
Conventions
- Titles: descriptive, actionable (e.g. "Fix auth token refresh in niahere")
- Descriptions: always include context โ what's broken, why it matters, links to references (Canny, threads, logs). Future you needs enough to start working without asking questions.
- Types:
epic, bug, feature, task, chore, decision
- Priority: P0 (critical) โ P4 (nice-to-have). Default P2 unless user specifies.
- Labels:
project:<name>, personal, bug, feature, chore, urgent
- Status flow:
open โ in_progress โ closed
Validation
bd list returns results after creating a task
- Labels appear correctly in list output
- Parent-child relationships show as indented tree in
bd list
- Dependencies show in
bd dep tree