opencodekit 0.22.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +4 -25
  3. package/dist/template/.opencode/.template-manifest.json +115 -188
  4. package/dist/template/.opencode/AGENTS.md +21 -4
  5. package/dist/template/.opencode/README.md +1 -1
  6. package/dist/template/.opencode/agent/build.md +155 -13
  7. package/dist/template/.opencode/agent/plan.md +7 -16
  8. package/dist/template/.opencode/agent/scout.md +2 -2
  9. package/dist/template/.opencode/artifacts/.active +1 -0
  10. package/dist/template/.opencode/artifacts/example/plan.md +12 -0
  11. package/dist/template/.opencode/artifacts/example/progress.md +4 -0
  12. package/dist/template/.opencode/artifacts/example/research.md +4 -0
  13. package/dist/template/.opencode/artifacts/example/spec.md +16 -0
  14. package/dist/template/.opencode/artifacts/todo.md +5 -0
  15. package/dist/template/.opencode/artifacts/verify.log +4 -0
  16. package/dist/template/.opencode/command/clarify.md +6 -8
  17. package/dist/template/.opencode/command/create.md +29 -71
  18. package/dist/template/.opencode/command/design.md +1 -2
  19. package/dist/template/.opencode/command/explore.md +3 -4
  20. package/dist/template/.opencode/command/fix.md +0 -1
  21. package/dist/template/.opencode/command/init.md +1 -4
  22. package/dist/template/.opencode/command/plan.md +30 -60
  23. package/dist/template/.opencode/command/pr.md +10 -28
  24. package/dist/template/.opencode/command/refactor.md +0 -1
  25. package/dist/template/.opencode/command/research.md +7 -29
  26. package/dist/template/.opencode/command/review-codebase.md +6 -13
  27. package/dist/template/.opencode/command/ship.md +136 -78
  28. package/dist/template/.opencode/command/ui-review.md +2 -4
  29. package/dist/template/.opencode/command/verify.md +15 -23
  30. package/dist/template/.opencode/dcp-prompts/overrides/compress-range.md +89 -0
  31. package/dist/template/.opencode/dcp.jsonc +96 -96
  32. package/dist/template/.opencode/memory/README.md +1 -1
  33. package/dist/template/.opencode/memory/_templates/prd.md +1 -1
  34. package/dist/template/.opencode/memory/_templates/roadmap.md +1 -1
  35. package/dist/template/.opencode/memory/_templates/state.md +1 -1
  36. package/dist/template/.opencode/memory/project/gotchas.md +3 -3
  37. package/dist/template/.opencode/memory/project/project.md +2 -2
  38. package/dist/template/.opencode/memory/project/roadmap.md +1 -1
  39. package/dist/template/.opencode/memory/project/state.md +2 -2
  40. package/dist/template/.opencode/memory/project/tech-stack.md +2 -2
  41. package/dist/template/.opencode/opencode.json +112 -152
  42. package/dist/template/.opencode/plugin/README.md +11 -1
  43. package/dist/template/.opencode/plugin/session-summary.ts +542 -0
  44. package/dist/template/.opencode/skill/brainstorming/SKILL.md +1 -1
  45. package/dist/template/.opencode/skill/context-engineering/SKILL.md +1 -1
  46. package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +26 -45
  47. package/dist/template/.opencode/skill/gemini-large-context/SKILL.md +4 -4
  48. package/dist/template/.opencode/skill/opensrc/references/example-workflow.md +1 -1
  49. package/dist/template/.opencode/skill/subagent-driven-development/SKILL.md +1 -1
  50. package/dist/template/.opencode/skill/using-git-worktrees/SKILL.md +6 -6
  51. package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +6 -6
  52. package/dist/template/.opencode/skill/verification-before-completion/references/VERIFICATION_PROTOCOL.md +5 -5
  53. package/package.json +76 -76
  54. package/dist/template/.opencode/plans/1768385996691-silent-wizard.md +0 -247
  55. package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +0 -418
  56. package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +0 -170
  57. package/dist/template/.opencode/plans/1770013678126-witty-planet.md +0 -278
  58. package/dist/template/.opencode/plans/1770112267595-shiny-rocket.md +0 -258
  59. package/dist/template/.opencode/plans/swarm-protocol.md +0 -123
  60. package/dist/template/.opencode/skill/beads/SKILL.md +0 -182
  61. package/dist/template/.opencode/skill/beads/references/BEST_PRACTICES.md +0 -27
  62. package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +0 -219
  63. package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +0 -124
  64. package/dist/template/.opencode/skill/beads/references/EXAMPLES.md +0 -45
  65. package/dist/template/.opencode/skill/beads/references/FILE_CLAIMING.md +0 -101
  66. package/dist/template/.opencode/skill/beads/references/GIT_SYNC.md +0 -25
  67. package/dist/template/.opencode/skill/beads/references/HIERARCHY.md +0 -71
  68. package/dist/template/.opencode/skill/beads/references/MULTI_AGENT.md +0 -40
  69. package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +0 -177
  70. package/dist/template/.opencode/skill/beads/references/SESSION_PROTOCOL.md +0 -61
  71. package/dist/template/.opencode/skill/beads/references/TASK_CREATION.md +0 -38
  72. package/dist/template/.opencode/skill/beads/references/TROUBLESHOOTING.md +0 -38
  73. package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +0 -226
@@ -1,123 +0,0 @@
1
- # Swarm Protocol (Beads-as-Board)
2
-
3
- ## Goal
4
-
5
- Use `.beads/` as the single source of truth for task state + dependencies, while agents coordinate through structured artifacts (not freeform chatter) and verification gates.
6
-
7
- ## Roles (Strict)
8
-
9
- - Lead: Owns scope, prioritization, and all Beads state transitions.
10
- - Planner: Turns intent into Beads tasks + dependency DAG; no code changes.
11
- - Worker: Executes exactly one claimed task; posts a structured report.
12
- - Verifier: Independently validates acceptance checks; blocks close on missing evidence.
13
-
14
- ## Board = Beads
15
-
16
- Canonical state lives in `.beads/issues.jsonl` (tasks) and `.beads/artifacts/<id>/` (task artifacts).
17
-
18
- - Create tasks: `br create "Title" -p <1-3>`
19
- - See unblocked work: `br ready`
20
- - Inspect context: `br show <id>`
21
- - Claim work: `br update <id> --status=in_progress`
22
- - Close work: `br close <id> --reason="..."` then `br sync --flush-only`
23
-
24
- ## Task Artifact Contract
25
-
26
- Every task MUST have `.beads/artifacts/<id>/spec.md`.
27
-
28
- Optional supporting files:
29
-
30
- - `.beads/artifacts/<id>/plan.md`: multi-step implementation plan, files touched, and gates
31
- - `.beads/artifacts/<id>/review.md`: verifier notes + evidence summary
32
-
33
- ### spec.md (Minimum Template)
34
-
35
- - Context: why this exists
36
- - Scope: in / out
37
- - Constraints: MUST / MUST NOT (security, deps, dist/, etc.)
38
- - Acceptance Criteria: checkboxes, each with a verification method
39
- - Evidence Required: exact commands and expected signals (e.g. "typecheck command passes")
40
-
41
- #### Verification Defaults (Language-Agnostic)
42
-
43
- Do NOT assume npm/pnpm/pytest/etc. Prefer this pattern:
44
-
45
- - `typecheck`: `<command>`
46
- - `lint`: `<command>`
47
- - `test`: `<command>`
48
- - `build` (optional): `<command>`
49
-
50
- If the repository has a canonical list of commands, reference it (e.g. `.opencode/memory/project/commands.md`).
51
-
52
- Common stacks (examples only):
53
-
54
- | Stack | typecheck | lint | test |
55
- | ------- | ------------------------------------------ | ---------------------------- | ---------------------- |
56
- | Node/TS | `npm run typecheck` or `npm run typecheck` | `npm run lint` | `vitest` or `npm test` |
57
- | Python | `python -m mypy .` | `ruff check .` | `pytest` |
58
- | Go | `go test ./...` (compile+test) | `golangci-lint run` | `go test ./...` |
59
- | Rust | `cargo check` | `cargo fmt --check` (format) | `cargo test` |
60
-
61
- ## Delegation Packet (Worker Input)
62
-
63
- Every delegated task MUST include the following envelope:
64
-
65
- - TASK: `<id> - <title>`
66
- - EXPECTED OUTCOME: measurable end state
67
- - REQUIRED TOOLS: e.g. `read`, `grep`, `lsp`, `bash`
68
- - MUST DO: e.g. LSP-before-edits, run typecheck, run lint
69
- - MUST NOT DO: e.g. no new deps, no dist/ edits, no git push
70
- - ACCEPTANCE CHECKS: list of commands + pass criteria
71
- - CONTEXT: links to `.beads/artifacts/<id>/spec.md` + relevant files
72
-
73
- ### Helper Tool
74
-
75
- If available, use the custom tool `swarm-delegate` to generate (and optionally write) a delegation packet:
76
-
77
- ```ts
78
- swarm -
79
- delegate({
80
- bead_id: "opencodekit-template-xyz",
81
- expected_outcome: "<measurable end state>",
82
- required_tools: "read, grep, lsp, bash",
83
- must_do: "LSP before edits, run project verification commands",
84
- must_not_do: "no new deps, don't edit dist/",
85
- acceptance_checks: "typecheck: <command>, lint: <command>, test: <command>",
86
- context: "See .beads/artifacts/<id>/spec.md",
87
- write: true,
88
- });
89
- ```
90
-
91
- ## Worker Report (Worker Output)
92
-
93
- Workers MUST respond with a structured report:
94
-
95
- - Result: done / blocked / needs replan
96
- - Changes: file list + what changed (with file references)
97
- - Verification: commands run + pass/fail summary
98
- - Risks/Notes: edge cases, follow-ups
99
- - Confidence: high / medium / low
100
-
101
- ## Gates (Non-Negotiable)
102
-
103
- - Planning gate: `.beads/artifacts/<id>/spec.md` exists with acceptance criteria BEFORE implementation starts
104
- - Execution gate: worker provides verification evidence BEFORE close
105
- - Review gate (risk-based): verifier signs off in `review.md` BEFORE close
106
-
107
- ## Replan Triggers
108
-
109
- Immediately stop execution and return to planning if:
110
-
111
- - Scope expands to 4+ files unexpectedly
112
- - Requirement ambiguity changes implementation choice
113
- - Two-strike tool failures
114
- - New dependency or `.opencode/` structure change would be needed
115
-
116
- ## Lead Checklist
117
-
118
- 1. `br ready` -> pick task -> `br show <id>`
119
- 2. Ensure `.beads/artifacts/<id>/spec.md` has acceptance checks
120
- 3. `br update <id> --status=in_progress`
121
- 4. Delegate with the packet format
122
- 5. Require worker report + evidence
123
- 6. `br close <id> --reason="..."` + `br sync --flush-only`
@@ -1,182 +0,0 @@
1
- ---
2
- name: beads
3
- description: >
4
- Multi-agent task coordination using br (beads_rust) CLI. Use when work spans multiple
5
- sessions, has dependencies, needs file locking, or requires agent coordination. Covers
6
- claim/reserve/done cycle, dependency management, hierarchical decomposition, and session protocols.
7
- version: "2.0.0"
8
- license: MIT
9
- tags: [workflow, agent-coordination]
10
- dependencies: []
11
- ---
12
-
13
- # Beads Workflow - Multi-Agent Task Coordination
14
-
15
- > **Replaces** ad-hoc task tracking with sticky notes, TODO comments, or mental checklists that lose state between sessions
16
-
17
- ## When to Use
18
-
19
- - Coordinating multi-session work with dependencies, blockers, or file locking needs
20
- - Running multi-agent work where tasks must persist across sessions and handoffs
21
-
22
- ## When NOT to Use
23
-
24
- - Single-session, linear tasks tracked via TodoWrite
25
- - Quick changes with no dependencies or handoff needs
26
-
27
- ## Overview
28
-
29
- **br (beads_rust) CLI** replaces the old `bd` (beads) CLI with a faster Rust implementation.
30
-
31
- **Key Distinction**:
32
-
33
- - **br CLI**: Multi-session work, dependencies, file locking, agent coordination
34
- - **TodoWrite**: Single-session tasks, linear execution, conversation-scoped
35
-
36
- **When to Use br vs TodoWrite**:
37
-
38
- - "Will I need this context in 2 weeks?" → **YES** = br
39
- - "Does this have blockers/dependencies?" → **YES** = br
40
- - "Multiple agents editing same codebase?" → **YES** = br
41
- - "Will this be done in this session?" → **YES** = TodoWrite
42
-
43
- **Decision Rule**: If resuming in 2 weeks would be hard without beads, use beads.
44
-
45
- ## Essential Commands
46
-
47
- ```bash
48
- br ready # Show issues ready to work (no blockers)
49
- br list --status open # All open issues
50
- br show <id> # Full issue details with dependencies
51
- br create --title "Fix bug" --type bug --priority 2 --description "Details here"
52
- br update <id> --status in_progress
53
- br close <id> --reason "Completed"
54
- br sync --flush-only # Export to JSONL (then git add/commit manually)
55
- ```
56
-
57
- ## Hierarchy & Dependencies (Summary)
58
-
59
- - Beads supports up to 3 levels of hierarchy: Epic → Task → Subtask
60
- - Use hierarchy for multi-day, cross-domain, or multi-agent work
61
- - Dependencies unblock parallel work when parents close
62
-
63
- See: `references/HIERARCHY.md` and `references/DEPENDENCIES.md` for full details.
64
-
65
- ## Session Protocol (Summary)
66
-
67
- **Start:** `br ready` → `br update <id> --status in_progress` → `br show <id>`
68
-
69
- **End:** `br close <id> --reason "..."` → `br sync --flush-only` → commit `.beads/` → restart session
70
-
71
- See: `references/SESSION_PROTOCOL.md` and `references/WORKFLOWS.md` for detailed steps and checklists.
72
-
73
- ## Task Creation (Summary)
74
-
75
- Create tasks when work spans sessions, has dependencies, or is discovered mid-implementation (>2 min).
76
-
77
- ```bash
78
- br create --title "Fix authentication bug" --priority 0 --type bug
79
- ```
80
-
81
- See: `references/TASK_CREATION.md` for full examples and patterns.
82
-
83
- ## Git Sync (Summary)
84
-
85
- `br` never runs git commands. Always `br sync --flush-only` and commit `.beads/` manually.
86
-
87
- See: `references/GIT_SYNC.md` for detailed flow and cleanup guidance.
88
-
89
- ## Troubleshooting (Summary)
90
-
91
- - No ready tasks → `br list --status open`, check blockers via `br show <id>`
92
- - Sync failures → `br doctor`
93
-
94
- See: `references/TROUBLESHOOTING.md` for common issues and fixes.
95
-
96
- ## Examples
97
-
98
- See: `references/EXAMPLES.md` for complete usage examples.
99
-
100
- ## Multi-Agent Coordination (Summary)
101
-
102
- For parallel execution with multiple subagents, use the **swarm-coordination** skill.
103
-
104
- See: `references/MULTI_AGENT.md` for swarm tool usage and examples.
105
-
106
- ## Rules
107
-
108
- 1. **Check `br ready` first** - Find unblocked work before starting
109
- 2. **Claim before editing** - `br update <id> --status in_progress`
110
- 3. **One task per session** - Restart after `br close`
111
- 4. **Always sync and commit** - `br sync --flush-only` then `git add .beads/ && git commit`
112
- 5. **Write notes for future agents** - Assume zero conversation context
113
- 6. **Claim file paths before editing** - Use reserve to declare ownership (multi-agent only)
114
-
115
- ## Anti-Patterns
116
-
117
- | Anti-Pattern | Why It Fails | Instead |
118
- | ------------------------------------------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------- |
119
- | Claiming a bead without reading its current state first (`br show`) | Misses dependencies, blockers, and prior context | Run `br show <id>` before `br update <id> --status in_progress` |
120
- | Closing a bead without verification evidence | Marks incomplete or broken work as done | Run verification commands and capture output before `br close` |
121
- | Working on blocked beads (dependencies not met) | Wastes time and causes out-of-order delivery | Use `br ready` and confirm dependencies in `br show <id>` |
122
- | Modifying bead state without user confirmation | Violates workflow expectations and can surprise collaborators | Ask before changing bead status, especially close/sync actions |
123
- | Using `br sync` without `--flush-only` (can cause conflicts) | May write unexpected state and increase sync conflict risk | Always use `br sync --flush-only` then commit `.beads/` manually |
124
-
125
- ## Verification
126
-
127
- - **Before closing:** run verification commands, paste output as evidence
128
- - **After close:** `br show <id>` confirms `status=closed`
129
- - **After sync:** `git status` shows clean working tree
130
-
131
- ## File Path Claiming (Summary)
132
-
133
- Claim files before editing in multi-agent work using `br reserve <id> --files "..."`.
134
-
135
- See: `references/FILE_CLAIMING.md` for the full protocol and examples.
136
-
137
- ## Best Practices (Summary)
138
-
139
- - One task per session, then restart
140
- - File issues for work >2 minutes
141
- - Weekly `br doctor`, periodic `br cleanup --days 7`
142
-
143
- See: `references/BEST_PRACTICES.md` for maintenance and database health guidance.
144
-
145
- ## Quick Reference
146
-
147
- ```
148
- SESSION START:
149
- br ready → br update <id> --status in_progress → br show <id>
150
-
151
- DURING WORK:
152
- br create for discovered work (>2min)
153
- br show <id> for context
154
-
155
- SESSION END:
156
- br close <id> --reason "..." → br sync --flush-only → git add .beads/ && git commit → RESTART SESSION
157
-
158
- MAINTENANCE:
159
- br doctor - weekly health check
160
- br cleanup --days 7 - remove old issues
161
- ```
162
-
163
- ## References
164
-
165
- - `references/BOUNDARIES.md`
166
- - `references/RESUMABILITY.md`
167
- - `references/DEPENDENCIES.md`
168
- - `references/WORKFLOWS.md`
169
- - `references/HIERARCHY.md`
170
- - `references/SESSION_PROTOCOL.md`
171
- - `references/TASK_CREATION.md`
172
- - `references/GIT_SYNC.md`
173
- - `references/TROUBLESHOOTING.md`
174
- - `references/EXAMPLES.md`
175
- - `references/MULTI_AGENT.md`
176
- - `references/FILE_CLAIMING.md`
177
- - `references/BEST_PRACTICES.md`
178
-
179
- ## See Also
180
-
181
- - `verification-before-completion`
182
- - `swarm-coordination`
@@ -1,27 +0,0 @@
1
- # Best Practices
2
-
3
- ## Daily/Weekly Maintenance
4
-
5
- | Task | Frequency | Command | Why |
6
- | ------------ | -------------- | --------------------- | ---------------------------------------------- |
7
- | Health check | Weekly | `br doctor` | Repairs database issues, detects orphaned work |
8
- | Cleanup | Every few days | `br cleanup --days 7` | Keep DB under 200-500 issues for performance |
9
-
10
- ## Key Principles
11
-
12
- 1. **Plan outside Beads first** - Use planning tools, then import tasks to beads
13
- 2. **One task per session, then restart** - Fresh context prevents confusion
14
- 3. **File lots of issues** - Any work >2 minutes should be tracked
15
- 4. **"Land the plane" = PUSH** - `br sync --flush-only` + git commit/push, not "ready when you are"
16
- 5. **Include issue ID in commits** - `git commit -m "Fix bug (br-abc)"`
17
-
18
- ## Database Health
19
-
20
- ```bash
21
- # Check database size
22
- br list --status all --json | wc -l
23
-
24
- # Target: under 200-500 issues
25
- # If over, run cleanup more aggressively:
26
- br cleanup --days 3
27
- ```
@@ -1,219 +0,0 @@
1
- # Boundaries: When to Use br vs TodoWrite
2
-
3
- Decision criteria for choosing between beads tools and TodoWrite.
4
-
5
- ## The Core Question
6
-
7
- **"Could I resume this work after 2 weeks away?"**
8
-
9
- - If beads would help you resume → **use br**
10
- - If markdown skim would suffice → **TodoWrite is fine**
11
-
12
- ## Decision Matrix
13
-
14
- ### Use br for:
15
-
16
- **Multi-Session Work**
17
-
18
- - Strategic document development
19
- - Feature implementation across sessions
20
- - Bug investigation over time
21
- - Architecture design iterations
22
-
23
- **Complex Dependencies**
24
-
25
- - OAuth integration requiring DB, endpoints, frontend
26
- - Research with parallel investigation threads
27
- - Refactoring with dependencies between areas
28
- - Migration requiring sequential steps
29
-
30
- **Knowledge Work**
31
-
32
- - Architecture decisions requiring research
33
- - API design with multiple options
34
- - Performance optimization experiments
35
- - Documentation requiring system understanding
36
-
37
- **Side Quests**
38
-
39
- - Found better pattern during feature work
40
- - Noticed architectural issue while debugging
41
- - Identified improvement during code review
42
- - Edge case requiring research during tests
43
-
44
- **Multi-Agent Coordination**
45
-
46
- - Multiple agents editing same codebase
47
- - File locking needed
48
- - Cross-team communication
49
-
50
- ### Use TodoWrite for:
51
-
52
- **Single-Session Tasks**
53
-
54
- - Implementing single function from spec
55
- - Fixing bug with known root cause
56
- - Adding unit tests for existing code
57
- - Updating documentation
58
-
59
- **Linear Execution**
60
-
61
- - Database migration with clear sequence
62
- - Deployment checklist
63
- - Code style cleanup
64
- - Dependency updates
65
-
66
- **Immediate Context**
67
-
68
- - User provides complete spec
69
- - Bug report with reproduction and fix
70
- - Refactoring with clear before/after
71
- - Config changes from preferences
72
-
73
- **Simple Tracking**
74
-
75
- - Breaking down implementation
76
- - Showing validation progress
77
- - Demonstrating systematic approach
78
-
79
- ## Detailed Comparison
80
-
81
- | Aspect | br CLI | TodoWrite |
82
- | ---------------- | --------------------------------- | ---------------------- |
83
- | **Persistence** | Git-backed, survives compaction | Session-only |
84
- | **Dependencies** | Graph-based, auto ready detection | Manual |
85
- | **File Locking** | Yes, prevents conflicts | No |
86
- | **Multi-Agent** | Yes, coordination tools | No |
87
- | **Visibility** | Background structure | Visible in chat |
88
- | **Best for** | Complex, multi-session | Simple, single-session |
89
-
90
- ## Integration Patterns
91
-
92
- ### Pattern 1: br as Strategic, TodoWrite as Tactical
93
-
94
- ```
95
- br task: "Implement user authentication" (epic)
96
- ├─ Child: "Create login endpoint"
97
- ├─ Child: "Add JWT validation" ← Currently working
98
- └─ Child: "Implement logout"
99
-
100
- TodoWrite (for JWT validation):
101
- - [ ] Install JWT library
102
- - [ ] Create validation middleware
103
- - [ ] Add tests for expiry
104
- - [ ] Update docs
105
- ```
106
-
107
- ### Pattern 2: TodoWrite as Working Copy
108
-
109
- ```
110
- Session start:
111
- - br ready gets "Add JWT validation"
112
- - br update <id> --status in_progress
113
- - Extract acceptance criteria into TodoWrite
114
- - Work through TodoWrite items
115
- - Update br notes as you learn
116
- - br close <id> when TodoWrite complete
117
- ```
118
-
119
- ### Pattern 3: Transition Mid-Session
120
-
121
- **From TodoWrite to br:**
122
-
123
- Trigger signals:
124
-
125
- - Discovering blockers or dependencies
126
- - Work won't complete this session
127
- - Finding side quests
128
- - Need to pause and resume later
129
-
130
- **How to transition:**
131
-
132
- ```
133
- 1. br create with current TodoWrite content
134
- 2. Note: "Discovered multi-session work"
135
- 3. Add dependencies as discovered
136
- 4. Keep TodoWrite for current session
137
- 5. Update br notes before session ends
138
- ```
139
-
140
- ## Common Mistakes
141
-
142
- ### Mistake 1: TodoWrite for Multi-Session Work
143
-
144
- **What happens:**
145
-
146
- - Next session, forget what was done
147
- - Scroll history to reconstruct
148
- - Lose design decisions
149
- - Duplicate work
150
-
151
- **Solution:** Use br instead.
152
-
153
- ### Mistake 2: br for Simple Linear Tasks
154
-
155
- **What happens:**
156
-
157
- - Overhead not justified
158
- - User can't see progress
159
- - Extra tool use for no benefit
160
-
161
- **Solution:** Use TodoWrite.
162
-
163
- ### Mistake 3: Not Transitioning When Complexity Emerges
164
-
165
- **What happens:**
166
-
167
- - Start with TodoWrite
168
- - Discover blockers mid-way
169
- - Keep using TodoWrite despite poor fit
170
- - Lose context when session ends
171
-
172
- **Solution:** Transition to br when complexity appears.
173
-
174
- ### Mistake 4: Creating Too Many br Issues
175
-
176
- **What happens:**
177
-
178
- - Every tiny task gets an issue
179
- - Database cluttered
180
- - Hard to find meaningful work
181
-
182
- **Solution:** Use 2-week test. Would br help after 2 weeks? If no, skip.
183
-
184
- ## The Transition Point
185
-
186
- **Transition signals:**
187
-
188
- - "This is taking longer than expected"
189
- - "I've discovered a blocker"
190
- - "This needs more research"
191
- - "I should investigate X first"
192
- - "User might not continue today"
193
- - "Found three related issues"
194
-
195
- When you notice these: Create br issue, preserve context.
196
-
197
- ## Summary Heuristics
198
-
199
- **Time horizon:**
200
-
201
- - Same session → TodoWrite
202
- - Multiple sessions → br
203
-
204
- **Dependency structure:**
205
-
206
- - Linear steps → TodoWrite
207
- - Blockers/prerequisites → br
208
-
209
- **Scope clarity:**
210
-
211
- - Well-defined → TodoWrite
212
- - Exploratory → br
213
-
214
- **Multi-agent:**
215
-
216
- - Single agent → Either
217
- - Multiple agents → br
218
-
219
- **When in doubt:** Use the 2-week test.
@@ -1,124 +0,0 @@
1
- # Dependency Types Guide
2
-
3
- Beads supports task dependencies for ordering work.
4
-
5
- ## Overview
6
-
7
- Dependencies affect what work is "ready" - tasks with unmet dependencies won't appear in `br ready` results.
8
-
9
- ## Creating Dependencies
10
-
11
- ```bash
12
- br create --title "Implement API endpoint" --blocked-by setup-db
13
- # This task depends on setup-db completing first
14
- ```
15
-
16
- ## Dependency Patterns
17
-
18
- ### Sequential Work
19
-
20
- ```
21
- setup-db → implement-api → add-tests → deploy
22
- ```
23
-
24
- Each task depends on the previous. `br ready` shows only the current step.
25
-
26
- ### Parallel Then Merge
27
-
28
- ```
29
- research-a ─┐
30
- research-b ─┼→ decision
31
- research-c ─┘
32
- ```
33
-
34
- Multiple parallel tasks, then one that needs all of them.
35
-
36
- ### Foundation First
37
-
38
- ```
39
- setup ─┬→ feature-a
40
- ├→ feature-b
41
- └→ feature-c
42
- ```
43
-
44
- One foundational task blocks multiple features.
45
-
46
- ## Epic with Children
47
-
48
- ```bash
49
- # Create epic
50
- br create --title "OAuth Integration" --type epic --priority 1
51
- # Returns: oauth-abc
52
-
53
- # Create children with parent
54
- br create --title "Setup credentials" --parent oauth-abc
55
- br create --title "Implement flow" --parent oauth-abc --blocked-by credentials
56
- br create --title "Add UI" --parent oauth-abc --blocked-by flow
57
- ```
58
-
59
- ## Automatic Unblocking
60
-
61
- When you close a task that's blocking others:
62
-
63
- ```
64
- 1. br close setup-db --reason "Schema created"
65
- 2. Beads automatically updates: implement-api is now ready
66
- 3. br ready returns implement-api
67
- 4. No manual unblocking needed
68
- ```
69
-
70
- ## Common Mistakes
71
-
72
- ### Using Dependencies for Preferences
73
-
74
- **Wrong:**
75
-
76
- ```
77
- docs depends on feature // "prefer to update docs after"
78
- ```
79
-
80
- **Problem:** Documentation doesn't actually need feature complete.
81
-
82
- **Right:** Only use dependencies for actual blockers.
83
-
84
- ### Wrong Direction
85
-
86
- **Wrong:**
87
-
88
- ```bash
89
- br create --title "API" --blocked-by tests # API depends on tests?
90
- ```
91
-
92
- **Problem:** Usually tests depend on API, not the other way.
93
-
94
- **Right:** Think "X needs Y complete first" → X depends on Y.
95
-
96
- ### Over-Using Dependencies
97
-
98
- **Problem:** Everything depends on everything. No parallel work possible.
99
-
100
- **Right:** Only add dependencies for actual technical blockers.
101
-
102
- ## Decision Guide
103
-
104
- **Add dependency when:**
105
-
106
- - Task literally cannot start without other task complete
107
- - Code won't compile/run without prerequisite
108
- - Data/schema must exist first
109
-
110
- **Skip dependency when:**
111
-
112
- - Just a preference for order
113
- - Both can proceed independently
114
- - Just want to note relationship
115
-
116
- ## Viewing Dependencies
117
-
118
- ```bash
119
- br show <id>
120
- # Shows what blocks this task and what this task blocks
121
-
122
- br list --status open
123
- # Shows all open tasks, check dependencies in details
124
- ```