PRIME.md (3612B)
1 # Beads Workflow Context 2 3 > **Context Recovery**: Run `bd prime` after compaction, clear, or new session 4 > Hooks auto-call this in Claude Code when .beads/ detected 5 6 ## Project-Specific Rules 7 8 This beads database is shared across multiple notedeck subprojects: 9 - `columns` - notedeck-columns 10 - `dave` - notedeck-dave 11 - `dev` - notedeck-dev 12 - `messages` - notedeck-messages 13 - `core` - main notedeck repo 14 15 **ALWAYS** add a subproject label when creating issues: 16 ```bash 17 bd create --title="Fix bug" --type=bug 18 bd label add <new-issue-id> columns # Add subproject label 19 ``` 20 21 Query issues for a specific subproject: 22 ```bash 23 bd list -l columns 24 bd list -l dave 25 ``` 26 27 # SESSION CLOSE PROTOCOL 28 29 **CRITICAL**: Before saying "done" or "complete", you MUST run this checklist: 30 31 ``` 32 [ ] 1. git status (check what changed) 33 [ ] 2. git add <files> (stage code changes) 34 [ ] 3. bd sync (commit beads changes) 35 [ ] 4. git commit -m "..." (commit code) 36 [ ] 5. bd sync (commit any new beads changes) 37 [ ] 6. git push (push to remote) 38 ``` 39 40 **NEVER skip this.** Work is not done until pushed. 41 42 ## Core Rules 43 - Track strategic work in beads (multi-session, dependencies, discovered work) 44 - Use `bd create` for issues, TodoWrite for simple single-session execution 45 - When in doubt, prefer bd—persistence you don't need beats lost context 46 - Git workflow: hooks auto-sync, run `bd sync` at session end 47 - Session management: check `bd ready` for available work 48 49 ## Essential Commands 50 51 ### Finding Work 52 - `bd ready` - Show issues ready to work (no blockers) 53 - `bd list --status=open` - All open issues 54 - `bd list --status=in_progress` - Your active work 55 - `bd show <id>` - Detailed issue view with dependencies 56 57 ### Creating & Updating 58 - `bd create --title="..." --type=task|bug|feature --priority=2` - New issue 59 - Priority: 0-4 or P0-P4 (0=critical, 2=medium, 4=backlog). NOT "high"/"medium"/"low" 60 - `bd update <id> --status=in_progress` - Claim work 61 - `bd update <id> --assignee=username` - Assign to someone 62 - `bd update <id> --title/--description/--notes/--design` - Update fields inline 63 - `bd close <id>` - Mark complete 64 - `bd close <id1> <id2> ...` - Close multiple issues at once (more efficient) 65 - `bd close <id> --reason="explanation"` - Close with reason 66 - **Tip**: When creating multiple issues/tasks/epics, use parallel subagents for efficiency 67 - **WARNING**: Do NOT use `bd edit` - it opens $EDITOR (vim/nano) which blocks agents 68 69 ### Dependencies & Blocking 70 - `bd dep add <issue> <depends-on>` - Add dependency (issue depends on depends-on) 71 - `bd blocked` - Show all blocked issues 72 - `bd show <id>` - See what's blocking/blocked by this issue 73 74 ### Sync & Collaboration 75 - `bd sync` - Sync with git remote (run at session end) 76 - `bd sync --status` - Check sync status without syncing 77 78 ### Project Health 79 - `bd stats` - Project statistics (open/closed/blocked counts) 80 - `bd doctor` - Check for issues (sync problems, missing hooks) 81 82 ## Common Workflows 83 84 **Starting work:** 85 ```bash 86 bd ready # Find available work 87 bd show <id> # Review issue details 88 bd update <id> --status=in_progress # Claim it 89 ``` 90 91 **Completing work:** 92 ```bash 93 bd close <id1> <id2> ... # Close all completed issues at once 94 bd sync # Push to remote 95 ``` 96 97 **Creating dependent work:** 98 ```bash 99 # Run bd create commands in parallel (use subagents for many items) 100 bd create --title="Implement feature X" --type=feature 101 bd create --title="Write tests for X" --type=task 102 bd dep add beads-yyy beads-xxx # Tests depend on Feature (Feature blocks tests) 103 ```