create-kuckit-app 2.0.2 → 2.1.0
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.
- package/README.md +24 -14
- package/package.json +1 -1
- package/templates/base/.claude/skills/beads/CLAUDE.md +87 -0
- package/templates/base/.claude/skills/beads/README.md +123 -0
- package/templates/base/.claude/skills/beads/SKILL.md +77 -715
- package/templates/base/.claude/skills/beads/adr/0001-bd-prime-as-source-of-truth.md +61 -0
- package/templates/base/.claude/skills/beads/resources/AGENTS.md +62 -0
- package/templates/base/.claude/skills/beads/resources/ASYNC_GATES.md +175 -0
- package/templates/base/.claude/skills/beads/resources/BOUNDARIES.md +520 -0
- package/templates/base/.claude/skills/beads/resources/CHEMISTRY_PATTERNS.md +197 -0
- package/templates/base/.claude/skills/beads/resources/CLI_REFERENCE.md +561 -0
- package/templates/base/.claude/skills/beads/resources/DEPENDENCIES.md +754 -0
- package/templates/base/.claude/skills/beads/resources/INTEGRATION_PATTERNS.md +438 -0
- package/templates/base/.claude/skills/beads/resources/ISSUE_CREATION.md +150 -0
- package/templates/base/.claude/skills/beads/resources/MOLECULES.md +370 -0
- package/templates/base/.claude/skills/beads/resources/PATTERNS.md +363 -0
- package/templates/base/.claude/skills/beads/resources/RESUMABILITY.md +239 -0
- package/templates/base/.claude/skills/beads/resources/STATIC_DATA.md +61 -0
- package/templates/base/.claude/skills/beads/resources/TROUBLESHOOTING.md +537 -0
- package/templates/base/.claude/skills/beads/resources/WORKFLOWS.md +638 -0
- package/templates/base/.claude/skills/beads/resources/WORKTREES.md +95 -0
- package/templates/base/.claude/skills/browser-skill/SKILL.md +72 -0
- package/templates/base/.claude/skills/knowledge/SKILL.md +155 -205
- package/templates/base/.claude/skills/knowledge/reference/doc-mapping.md +49 -0
- package/templates/base/.claude/skills/knowledge/reference/extraction-prompts.md +102 -0
- package/templates/base/.claude/skills/kuckit/SKILL.md +15 -9
- package/templates/base/.claude/skills/kuckit/references/MODULE-DEVELOPMENT.md +142 -0
- package/templates/base/.claude/skills/kuckit/references/PACKAGES.md +22 -17
- package/templates/base/.claude/skills/kuckit/references/PUBLISHING.md +92 -0
- package/templates/base/.claude/skills/module-testing/SKILL.md +1 -1
- package/templates/base/.claude/skills/planning/SKILL.md +26 -1
- package/templates/base/.env.example +1 -1
- package/templates/base/AGENTS.md +155 -418
- package/templates/base/apps/server/src/modules.ts +14 -1
- package/templates/base/apps/web/.env.example +1 -1
- package/templates/base/apps/web/src/routes/$.tsx +0 -1
- package/templates/base/apps/web/src/routes/dashboard.tsx +3 -1
- package/templates/base/docs/ARCHITECTURE.md +689 -0
- package/templates/base/docs/DEPENDENCY-INJECTION.md +871 -0
- package/templates/base/docs/DEPLOYMENT.md +573 -0
- package/templates/base/docs/INDEX.md +135 -0
- package/templates/base/docs/MIGRATION.md +989 -0
- package/templates/base/docs/MODULE_CSS.md +343 -0
- package/templates/base/docs/MODULE_TESTING.md +368 -0
- package/templates/base/docs/MULTI_AGENT_WORKFLOW.md +909 -0
- package/templates/base/docs/TESTING.md +579 -0
- package/templates/base/docs/TROUBLESHOOTING.md +360 -0
- package/templates/base/package.json +2 -0
- package/templates/base/packages/items-module/AGENTS.md +3 -1
- package/templates/base/packages/items-module/src/server/adapters/{item.drizzle.ts → item.repository.ts} +1 -13
- package/templates/base/packages/items-module/src/server/module.ts +2 -1
- package/templates/base/packages/items-module/src/server/schema/item.ts +13 -0
|
@@ -1,740 +1,102 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: beads
|
|
3
|
-
description:
|
|
3
|
+
description: >
|
|
4
|
+
Git-backed issue tracker for multi-session work with dependencies and persistent
|
|
5
|
+
memory across conversation compaction. Use when work spans sessions, has blockers,
|
|
6
|
+
or needs context recovery after compaction.
|
|
7
|
+
allowed-tools: 'Read,Bash(bd:*)'
|
|
8
|
+
version: '0.43.0'
|
|
9
|
+
author: 'Steve Yegge <https://github.com/steveyegge>'
|
|
10
|
+
license: 'MIT'
|
|
4
11
|
---
|
|
5
12
|
|
|
6
|
-
# Beads
|
|
13
|
+
# Beads - Persistent Task Memory for AI Agents
|
|
7
14
|
|
|
8
|
-
|
|
15
|
+
Graph-based issue tracker that survives conversation compaction. Provides persistent memory for multi-session work with complex dependencies.
|
|
9
16
|
|
|
10
|
-
bd
|
|
17
|
+
## bd vs TodoWrite
|
|
11
18
|
|
|
12
|
-
|
|
19
|
+
| bd (persistent) | TodoWrite (ephemeral) |
|
|
20
|
+
| --------------------- | --------------------- |
|
|
21
|
+
| Multi-session work | Single-session tasks |
|
|
22
|
+
| Complex dependencies | Linear execution |
|
|
23
|
+
| Survives compaction | Conversation-scoped |
|
|
24
|
+
| Git-backed, team sync | Local to session |
|
|
13
25
|
|
|
14
|
-
|
|
26
|
+
**Decision test**: "Will I need this context in 2 weeks?" → YES = bd
|
|
15
27
|
|
|
16
|
-
|
|
17
|
-
- **Complex dependencies** - Work with blockers, prerequisites, or hierarchical structure
|
|
18
|
-
- **Knowledge work** - Strategic documents, research, or tasks with fuzzy boundaries
|
|
19
|
-
- **Side quests** - Exploratory work that might pause the main task
|
|
20
|
-
- **Project memory** - Need to resume work after weeks away with full context
|
|
28
|
+
**When to use bd**:
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
- Work spans multiple sessions or days
|
|
31
|
+
- Tasks have dependencies or blockers
|
|
32
|
+
- Need to survive conversation compaction
|
|
33
|
+
- Exploratory/research work with fuzzy boundaries
|
|
34
|
+
- Collaboration with team (git sync)
|
|
23
35
|
|
|
24
|
-
|
|
25
|
-
- **Linear execution** - Straightforward step-by-step tasks with no branching
|
|
26
|
-
- **Immediate context** - All information already in conversation
|
|
27
|
-
- **Simple tracking** - Just need a checklist to show progress
|
|
36
|
+
**When to use TodoWrite**:
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
- Single-session linear tasks
|
|
39
|
+
- Simple checklist for immediate work
|
|
40
|
+
- All context is in current conversation
|
|
41
|
+
- Will complete within current session
|
|
30
42
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Ask these questions to decide:
|
|
34
|
-
|
|
35
|
-
**Choose bd if:**
|
|
36
|
-
|
|
37
|
-
- ❓ "Will I need this context in 2 weeks?" → Yes = bd
|
|
38
|
-
- ❓ "Could conversation history get compacted?" → Yes = bd
|
|
39
|
-
- ❓ "Does this have blockers/dependencies?" → Yes = bd
|
|
40
|
-
- ❓ "Is this fuzzy/exploratory work?" → Yes = bd
|
|
41
|
-
|
|
42
|
-
**Choose TodoWrite if:**
|
|
43
|
-
|
|
44
|
-
- ❓ "Will this be done in this session?" → Yes = TodoWrite
|
|
45
|
-
- ❓ "Is this just a task list for me right now?" → Yes = TodoWrite
|
|
46
|
-
- ❓ "Is this linear with no branching?" → Yes = TodoWrite
|
|
47
|
-
|
|
48
|
-
**When in doubt**: Use bd. Better to have persistent memory you don't need than to lose context you needed.
|
|
49
|
-
|
|
50
|
-
**For detailed decision criteria and examples, read:** [references/BOUNDARIES.md](references/BOUNDARIES.md)
|
|
51
|
-
|
|
52
|
-
## Surviving Compaction Events
|
|
53
|
-
|
|
54
|
-
**Critical**: Compaction events delete conversation history but preserve beads. After compaction, bd state is your only persistent memory.
|
|
55
|
-
|
|
56
|
-
**What survives compaction:**
|
|
57
|
-
|
|
58
|
-
- All bead data (issues, notes, dependencies, status)
|
|
59
|
-
- Complete work history and context
|
|
60
|
-
|
|
61
|
-
**What doesn't survive:**
|
|
62
|
-
|
|
63
|
-
- Conversation history
|
|
64
|
-
- TodoWrite lists
|
|
65
|
-
- Recent discussion context
|
|
66
|
-
|
|
67
|
-
**Writing notes for post-compaction recovery:**
|
|
68
|
-
|
|
69
|
-
Write notes as if explaining to a future agent with zero conversation context:
|
|
70
|
-
|
|
71
|
-
**Pattern:**
|
|
72
|
-
|
|
73
|
-
```markdown
|
|
74
|
-
notes field format:
|
|
75
|
-
|
|
76
|
-
- COMPLETED: Specific deliverables ("implemented JWT refresh endpoint + rate limiting")
|
|
77
|
-
- IN PROGRESS: Current state + next immediate step ("testing password reset flow, need user input on email template")
|
|
78
|
-
- BLOCKERS: What's preventing progress
|
|
79
|
-
- KEY DECISIONS: Important context or user guidance
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**After compaction:** `bd show <issue-id>` reconstructs full context from notes field.
|
|
83
|
-
|
|
84
|
-
### Notes Quality Self-Check
|
|
85
|
-
|
|
86
|
-
Before checkpointing (especially pre-compaction), verify your notes pass these tests:
|
|
87
|
-
|
|
88
|
-
❓ **Future-me test**: "Could I resume this work in 2 weeks with zero conversation history?"
|
|
89
|
-
|
|
90
|
-
- [ ] What was completed? (Specific deliverables, not "made progress")
|
|
91
|
-
- [ ] What's in progress? (Current state + immediate next step)
|
|
92
|
-
- [ ] What's blocked? (Specific blockers with context)
|
|
93
|
-
- [ ] What decisions were made? (Why, not just what)
|
|
94
|
-
|
|
95
|
-
❓ **Stranger test**: "Could another developer understand this without asking me?"
|
|
96
|
-
|
|
97
|
-
- [ ] Technical choices explained (not just stated)
|
|
98
|
-
- [ ] Trade-offs documented (why this approach vs alternatives)
|
|
99
|
-
- [ ] User input captured (decisions that came from discussion)
|
|
100
|
-
|
|
101
|
-
**Good note example:**
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
COMPLETED: JWT auth with RS256 (1hr access, 7d refresh tokens)
|
|
105
|
-
KEY DECISION: RS256 over HS256 per security review - enables key rotation
|
|
106
|
-
IN PROGRESS: Password reset flow - email service working, need rate limiting
|
|
107
|
-
BLOCKERS: Waiting on user decision: reset token expiry (15min vs 1hr trade-off)
|
|
108
|
-
NEXT: Implement rate limiting (5 attempts/15min) once expiry decided
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
**Bad note example:**
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
Working on auth. Made some progress. More to do.
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
**For complete compaction recovery workflow, read:** [references/WORKFLOWS.md](references/WORKFLOWS.md#compaction-survival)
|
|
118
|
-
|
|
119
|
-
## Session Start Protocol
|
|
120
|
-
|
|
121
|
-
**bd is available when:**
|
|
122
|
-
|
|
123
|
-
- Project has a `.beads/` directory (project-local database), OR
|
|
124
|
-
- `~/.beads/` exists (global fallback database for any directory)
|
|
125
|
-
|
|
126
|
-
**At session start, always check for bd availability and run ready check.**
|
|
127
|
-
|
|
128
|
-
### Session Start Checklist
|
|
129
|
-
|
|
130
|
-
Copy this checklist when starting any session where bd is available:
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
Session Start:
|
|
134
|
-
- [ ] Run bd ready --json to see available work
|
|
135
|
-
- [ ] Run bd list --status in_progress --json for active work
|
|
136
|
-
- [ ] If in_progress exists: bd show <issue-id> to read notes
|
|
137
|
-
- [ ] Report context to user: "X items ready: [summary]"
|
|
138
|
-
- [ ] If using global ~/.beads, mention this in report
|
|
139
|
-
- [ ] If nothing ready: bd blocked --json to check blockers
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
**Pattern**: Always check both `bd ready` AND `bd list --status in_progress`. Read notes field first to understand where previous session left off.
|
|
143
|
-
|
|
144
|
-
**Report format**:
|
|
145
|
-
|
|
146
|
-
- "I can see X items ready to work on: [summary]"
|
|
147
|
-
- "Issue Y is in_progress. Last session: [summary from notes]. Next: [from notes]. Should I continue with that?"
|
|
148
|
-
|
|
149
|
-
This establishes immediate shared context about available and active work without requiring user prompting.
|
|
150
|
-
|
|
151
|
-
**For detailed collaborative handoff process, read:** [references/WORKFLOWS.md](references/WORKFLOWS.md#session-handoff)
|
|
152
|
-
|
|
153
|
-
**Note**: bd auto-discovers the database:
|
|
154
|
-
|
|
155
|
-
- Uses `.beads/*.db` in current project if exists
|
|
156
|
-
- Falls back to `~/.beads/default.db` otherwise
|
|
157
|
-
- No configuration needed
|
|
158
|
-
|
|
159
|
-
### When No Work is Ready
|
|
160
|
-
|
|
161
|
-
If `bd ready` returns empty but issues exist:
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
bd blocked --json
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Report blockers and suggest next steps.
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Progress Checkpointing
|
|
172
|
-
|
|
173
|
-
Update bd notes at these checkpoints (don't wait for session end):
|
|
174
|
-
|
|
175
|
-
**Critical triggers:**
|
|
176
|
-
|
|
177
|
-
- ⚠️ **Context running low** - User says "running out of context" / "approaching compaction" / "close to token limit"
|
|
178
|
-
- 📊 **Token budget > 70%** - Proactively checkpoint when approaching limits
|
|
179
|
-
- 🎯 **Major milestone reached** - Completed significant piece of work
|
|
180
|
-
- 🚧 **Hit a blocker** - Can't proceed, need to capture what was tried
|
|
181
|
-
- 🔄 **Task transition** - Switching issues or about to close this one
|
|
182
|
-
- ❓ **Before user input** - About to ask decision that might change direction
|
|
183
|
-
|
|
184
|
-
**Proactive monitoring during session:**
|
|
185
|
-
|
|
186
|
-
- At 70% token usage: "We're at 70% token usage - good time to checkpoint bd notes?"
|
|
187
|
-
- At 85% token usage: "Approaching token limit (85%) - checkpointing current state to bd"
|
|
188
|
-
- At 90% token usage: Automatically checkpoint without asking
|
|
189
|
-
|
|
190
|
-
**Current token usage**: Check `<system-warning>Token usage:` messages to monitor proactively.
|
|
191
|
-
|
|
192
|
-
**Checkpoint checklist:**
|
|
193
|
-
|
|
194
|
-
```
|
|
195
|
-
Progress Checkpoint:
|
|
196
|
-
- [ ] Update notes with COMPLETED/IN_PROGRESS/NEXT format
|
|
197
|
-
- [ ] Document KEY DECISIONS or BLOCKERS since last update
|
|
198
|
-
- [ ] Mark current status (in_progress/blocked/closed)
|
|
199
|
-
- [ ] If discovered new work: create issues with discovered-from
|
|
200
|
-
- [ ] Verify notes are self-explanatory for post-compaction resume
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Most important**: When user says "running out of context" OR when you see >70% token usage - checkpoint immediately, even if mid-task.
|
|
204
|
-
|
|
205
|
-
**Test yourself**: "If compaction happened right now, could future-me resume from these notes?"
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
### Database Selection
|
|
210
|
-
|
|
211
|
-
bd automatically selects the appropriate database:
|
|
212
|
-
|
|
213
|
-
- **Project-local** (`.beads/` in project): Used for project-specific work
|
|
214
|
-
- **Global fallback** (`~/.beads/`): Used when no project-local database exists
|
|
215
|
-
|
|
216
|
-
**Use case for global database**: Cross-project tracking, personal task management, knowledge work that doesn't belong to a specific project.
|
|
217
|
-
|
|
218
|
-
**When to use --db flag explicitly:**
|
|
219
|
-
|
|
220
|
-
- Accessing a specific database outside current directory
|
|
221
|
-
- Working with multiple databases (e.g., project database + reference database)
|
|
222
|
-
- Example: `bd --db /path/to/reference/terms.db list`
|
|
223
|
-
|
|
224
|
-
**Database discovery rules:**
|
|
225
|
-
|
|
226
|
-
- bd looks for `.beads/*.db` in current working directory
|
|
227
|
-
- If not found, uses `~/.beads/default.db`
|
|
228
|
-
- Shell cwd can reset between commands - use absolute paths with --db when operating on non-local databases
|
|
229
|
-
|
|
230
|
-
**For complete session start workflows, read:** [references/WORKFLOWS.md](references/WORKFLOWS.md#session-start)
|
|
231
|
-
|
|
232
|
-
## Core Operations
|
|
233
|
-
|
|
234
|
-
All bd commands support `--json` flag for structured output when needed for programmatic parsing.
|
|
235
|
-
|
|
236
|
-
### Essential Operations
|
|
237
|
-
|
|
238
|
-
**Check ready work:**
|
|
239
|
-
|
|
240
|
-
```bash
|
|
241
|
-
bd ready
|
|
242
|
-
bd ready --json # For structured output
|
|
243
|
-
bd ready --priority 0 # Filter by priority
|
|
244
|
-
bd ready --assignee alice # Filter by assignee
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
**Create new issue:**
|
|
248
|
-
|
|
249
|
-
**IMPORTANT**: Always quote title and description arguments with double quotes, especially when containing spaces or special characters.
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
bd create "Fix login bug"
|
|
253
|
-
bd create "Add OAuth" -p 0 -t feature
|
|
254
|
-
bd create "Write tests" -d "Unit tests for auth module" --assignee alice
|
|
255
|
-
bd create "Research caching" --design "Evaluate Redis vs Memcached"
|
|
256
|
-
|
|
257
|
-
# Examples with special characters (requires quoting):
|
|
258
|
-
bd create "Fix: auth doesn't handle edge cases" -p 1
|
|
259
|
-
bd create "Refactor auth module" -d "Split auth.go into separate files (handlers, middleware, utils)"
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
**Update issue status:**
|
|
263
|
-
|
|
264
|
-
```bash
|
|
265
|
-
bd update issue-123 --status in_progress
|
|
266
|
-
bd update issue-123 --priority 0
|
|
267
|
-
bd update issue-123 --assignee bob
|
|
268
|
-
bd update issue-123 --design "Decided to use Redis for persistence support"
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
**Close completed work:**
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
bd close issue-123
|
|
275
|
-
bd close issue-123 --reason "Implemented in PR #42"
|
|
276
|
-
bd close issue-1 issue-2 issue-3 --reason "Bulk close related work"
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
**Show issue details:**
|
|
280
|
-
|
|
281
|
-
```bash
|
|
282
|
-
bd show issue-123
|
|
283
|
-
bd show issue-123 --json
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
**List issues:**
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
bd list
|
|
290
|
-
bd list --status open
|
|
291
|
-
bd list --priority 0
|
|
292
|
-
bd list --type bug
|
|
293
|
-
bd list --assignee alice
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
**For complete CLI reference with all flags and examples, read:** [references/CLI_REFERENCE.md](references/CLI_REFERENCE.md)
|
|
297
|
-
|
|
298
|
-
## Field Usage Reference
|
|
299
|
-
|
|
300
|
-
Quick guide for when and how to use each bd field:
|
|
301
|
-
|
|
302
|
-
| Field | Purpose | When to Set | Update Frequency |
|
|
303
|
-
| ----------------------- | ------------------------------------------------ | -------------------- | --------------------------------- |
|
|
304
|
-
| **description** | Immutable problem statement | At creation | Never (fixed forever) |
|
|
305
|
-
| **design** | Initial approach, architecture, decisions | During planning | Rarely (only if approach changes) |
|
|
306
|
-
| **acceptance-criteria** | Concrete deliverables checklist (`- [ ]` syntax) | When design is clear | Mark `- [x]` as items complete |
|
|
307
|
-
| **notes** | Session handoff (COMPLETED/IN_PROGRESS/NEXT) | During work | At session end, major milestones |
|
|
308
|
-
| **status** | Workflow state (open→in_progress→closed) | As work progresses | When changing phases |
|
|
309
|
-
| **priority** | Urgency level (0=highest, 3=lowest) | At creation | Adjust if priorities shift |
|
|
310
|
-
|
|
311
|
-
**Key pattern**: Notes field is your "read me first" at session start. See [WORKFLOWS.md](references/WORKFLOWS.md#session-handoff) for session handoff details.
|
|
312
|
-
|
|
313
|
-
---
|
|
314
|
-
|
|
315
|
-
## Issue Lifecycle Workflow
|
|
316
|
-
|
|
317
|
-
### 1. Discovery Phase (Proactive Issue Creation)
|
|
318
|
-
|
|
319
|
-
**During exploration or implementation, proactively file issues for:**
|
|
320
|
-
|
|
321
|
-
- Bugs or problems discovered
|
|
322
|
-
- Potential improvements noticed
|
|
323
|
-
- Follow-up work identified
|
|
324
|
-
- Technical debt encountered
|
|
325
|
-
- Questions requiring research
|
|
326
|
-
|
|
327
|
-
**Pattern:**
|
|
328
|
-
|
|
329
|
-
```bash
|
|
330
|
-
# When encountering new work during a task:
|
|
331
|
-
bd create "Found: auth doesn't handle profile permissions"
|
|
332
|
-
bd dep add current-task-id new-issue-id --type discovered-from
|
|
333
|
-
|
|
334
|
-
# Continue with original task - issue persists for later
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
**Key benefit**: Capture context immediately instead of losing it when conversation ends.
|
|
338
|
-
|
|
339
|
-
### 2. Execution Phase (Status Maintenance)
|
|
340
|
-
|
|
341
|
-
**Mark issues in_progress when starting work:**
|
|
342
|
-
|
|
343
|
-
```bash
|
|
344
|
-
bd update issue-123 --status in_progress
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
**Update throughout work:**
|
|
348
|
-
|
|
349
|
-
```bash
|
|
350
|
-
# Add design notes as implementation progresses
|
|
351
|
-
bd update issue-123 --design "Using JWT with RS256 algorithm"
|
|
352
|
-
|
|
353
|
-
# Update acceptance criteria if requirements clarify
|
|
354
|
-
bd update issue-123 --acceptance "- JWT validation works\n- Tests pass\n- Error handling returns 401"
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
**Close when complete:**
|
|
358
|
-
|
|
359
|
-
```bash
|
|
360
|
-
bd close issue-123 --reason "Implemented JWT validation with tests passing"
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
**Important**: Closed issues remain in database - they're not deleted, just marked complete for project history.
|
|
364
|
-
|
|
365
|
-
### 3. Planning Phase (Dependency Graphs)
|
|
366
|
-
|
|
367
|
-
For complex multi-step work, structure issues with dependencies before starting:
|
|
368
|
-
|
|
369
|
-
**Create parent epic:**
|
|
370
|
-
|
|
371
|
-
```bash
|
|
372
|
-
bd create "Implement user authentication" -t epic -d "OAuth integration with JWT tokens"
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
**Create subtasks:**
|
|
376
|
-
|
|
377
|
-
```bash
|
|
378
|
-
bd create "Set up OAuth credentials" -t task
|
|
379
|
-
bd create "Implement authorization flow" -t task
|
|
380
|
-
bd create "Add token refresh" -t task
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
**Link with dependencies:**
|
|
43
|
+
## Prerequisites
|
|
384
44
|
|
|
385
45
|
```bash
|
|
386
|
-
#
|
|
387
|
-
bd dep add auth-epic auth-setup --type parent-child
|
|
388
|
-
bd dep add auth-epic auth-flow --type parent-child
|
|
389
|
-
|
|
390
|
-
# blocks for ordering
|
|
391
|
-
bd dep add auth-setup auth-flow
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
**For detailed dependency patterns and types, read:** [references/DEPENDENCIES.md](references/DEPENDENCIES.md)
|
|
395
|
-
|
|
396
|
-
## Dependency Types Reference
|
|
397
|
-
|
|
398
|
-
bd supports four dependency types:
|
|
399
|
-
|
|
400
|
-
1. **blocks** - Hard blocker (issue A blocks issue B from starting)
|
|
401
|
-
2. **related** - Soft link (issues are related but not blocking)
|
|
402
|
-
3. **parent-child** - Hierarchical (epic/subtask relationship)
|
|
403
|
-
4. **discovered-from** - Provenance (issue B discovered while working on A)
|
|
404
|
-
|
|
405
|
-
**For complete guide on when to use each type with examples and patterns, read:** [references/DEPENDENCIES.md](references/DEPENDENCIES.md)
|
|
406
|
-
|
|
407
|
-
## Integration with TodoWrite
|
|
408
|
-
|
|
409
|
-
**Both tools complement each other at different timescales:**
|
|
410
|
-
|
|
411
|
-
### Temporal Layering Pattern
|
|
412
|
-
|
|
413
|
-
**TodoWrite** (short-term working memory - this hour):
|
|
414
|
-
|
|
415
|
-
- Tactical execution: "Review Section 3", "Expand Q&A answers"
|
|
416
|
-
- Marked completed as you go
|
|
417
|
-
- Present/future tense ("Review", "Expand", "Create")
|
|
418
|
-
- Ephemeral: Disappears when session ends
|
|
419
|
-
|
|
420
|
-
**Beads** (long-term episodic memory - this week/month):
|
|
421
|
-
|
|
422
|
-
- Strategic objectives: "Continue work on strategic planning document"
|
|
423
|
-
- Key decisions and outcomes in notes field
|
|
424
|
-
- Past tense in notes ("COMPLETED", "Discovered", "Blocked by")
|
|
425
|
-
- Persistent: Survives compaction and session boundaries
|
|
426
|
-
|
|
427
|
-
### The Handoff Pattern
|
|
428
|
-
|
|
429
|
-
1. **Session start**: Read bead → Create TodoWrite items for immediate actions
|
|
430
|
-
2. **During work**: Mark TodoWrite items completed as you go
|
|
431
|
-
3. **Reach milestone**: Update bead notes with outcomes + context
|
|
432
|
-
4. **Session end**: TodoWrite disappears, bead survives with enriched notes
|
|
433
|
-
|
|
434
|
-
**After compaction**: TodoWrite is gone forever, but bead notes reconstruct what happened.
|
|
435
|
-
|
|
436
|
-
### Example: TodoWrite tracks execution, Beads capture meaning
|
|
437
|
-
|
|
438
|
-
**TodoWrite:**
|
|
439
|
-
|
|
46
|
+
bd --version # Requires v0.34.0+
|
|
440
47
|
```
|
|
441
|
-
[completed] Implement login endpoint
|
|
442
|
-
[in_progress] Add password hashing with bcrypt
|
|
443
|
-
[pending] Create session middleware
|
|
444
|
-
```
|
|
445
|
-
|
|
446
|
-
**Corresponding bead notes:**
|
|
447
|
-
|
|
448
|
-
```
|
|
449
|
-
bd update issue-123 --notes "COMPLETED: Login endpoint with bcrypt password
|
|
450
|
-
hashing (12 rounds). KEY DECISION: Using JWT tokens (not sessions) for stateless
|
|
451
|
-
auth - simplifies horizontal scaling. IN PROGRESS: Session middleware implementation.
|
|
452
|
-
NEXT: Need user input on token expiry time (1hr vs 24hr trade-off)."
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
**Don't duplicate**: TodoWrite tracks execution, Beads captures meaning and context.
|
|
456
|
-
|
|
457
|
-
**For patterns on transitioning between tools mid-session, read:** [references/BOUNDARIES.md](references/BOUNDARIES.md#integration-patterns)
|
|
458
|
-
|
|
459
|
-
## Common Patterns
|
|
460
|
-
|
|
461
|
-
### Pattern 1: Knowledge Work Session
|
|
462
|
-
|
|
463
|
-
**Scenario**: User asks "Help me write a proposal for expanding the analytics platform"
|
|
464
|
-
|
|
465
|
-
**What you see**:
|
|
466
|
-
|
|
467
|
-
```bash
|
|
468
|
-
$ bd ready
|
|
469
|
-
# Returns: bd-42 "Research analytics platform expansion proposal" (in_progress)
|
|
470
|
-
|
|
471
|
-
$ bd show bd-42
|
|
472
|
-
Notes: "COMPLETED: Reviewed current stack (Mixpanel, Amplitude)
|
|
473
|
-
IN PROGRESS: Drafting cost-benefit analysis section
|
|
474
|
-
NEXT: Need user input on budget constraints before finalizing recommendations"
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
**What you do**:
|
|
478
|
-
|
|
479
|
-
1. Read notes to understand current state
|
|
480
|
-
2. Create TodoWrite for immediate work:
|
|
481
|
-
```
|
|
482
|
-
- [ ] Draft cost-benefit analysis
|
|
483
|
-
- [ ] Ask user about budget constraints
|
|
484
|
-
- [ ] Finalize recommendations
|
|
485
|
-
```
|
|
486
|
-
3. Work on tasks, mark TodoWrite items completed
|
|
487
|
-
4. At milestone, update bd notes:
|
|
488
|
-
```bash
|
|
489
|
-
bd update bd-42 --notes "COMPLETED: Cost-benefit analysis drafted.
|
|
490
|
-
KEY DECISION: User confirmed $50k budget cap - ruled out enterprise options.
|
|
491
|
-
IN PROGRESS: Finalizing recommendations (Posthog + custom ETL).
|
|
492
|
-
NEXT: Get user review of draft before closing issue."
|
|
493
|
-
```
|
|
494
|
-
|
|
495
|
-
**Outcome**: TodoWrite disappears at session end, but bd notes preserve context for next session.
|
|
496
|
-
|
|
497
|
-
### Pattern 2: Side Quest Handling
|
|
498
|
-
|
|
499
|
-
During main task, discover a problem:
|
|
500
|
-
|
|
501
|
-
1. Create issue: `bd create "Found: inventory system needs refactoring"`
|
|
502
|
-
2. Link using discovered-from: `bd dep add main-task new-issue --type discovered-from`
|
|
503
|
-
3. Assess: blocker or can defer?
|
|
504
|
-
4. If blocker: `bd update main-task --status blocked`, work on new issue
|
|
505
|
-
5. If deferrable: note in issue, continue main task
|
|
506
|
-
|
|
507
|
-
### Pattern 3: Multi-Session Project Resume
|
|
508
|
-
|
|
509
|
-
Starting work after time away:
|
|
510
|
-
|
|
511
|
-
1. Run `bd ready` to see available work
|
|
512
|
-
2. Run `bd blocked` to understand what's stuck
|
|
513
|
-
3. Run `bd list --status closed --limit 10` to see recent completions
|
|
514
|
-
4. Run `bd show issue-id` on issue to work on
|
|
515
|
-
5. Update status and begin work
|
|
516
|
-
|
|
517
|
-
**For complete workflow walkthroughs with checklists, read:** [references/WORKFLOWS.md](references/WORKFLOWS.md)
|
|
518
|
-
|
|
519
|
-
## Issue Creation
|
|
520
|
-
|
|
521
|
-
**Quick guidelines:**
|
|
522
|
-
|
|
523
|
-
- Ask user first for knowledge work with fuzzy boundaries
|
|
524
|
-
- Create directly for clear bugs, technical debt, or discovered work
|
|
525
|
-
- Use clear titles, sufficient context in descriptions
|
|
526
|
-
- Design field: HOW to build (can change during implementation)
|
|
527
|
-
- Acceptance criteria: WHAT success looks like (should remain stable)
|
|
528
|
-
|
|
529
|
-
### Issue Creation Checklist
|
|
530
|
-
|
|
531
|
-
Copy when creating new issues:
|
|
532
|
-
|
|
533
|
-
```
|
|
534
|
-
Creating Issue:
|
|
535
|
-
- [ ] Title: Clear, specific, action-oriented
|
|
536
|
-
- [ ] Description: Problem statement (WHY this matters) - immutable
|
|
537
|
-
- [ ] Design: HOW to build (can change during work)
|
|
538
|
-
- [ ] Acceptance: WHAT success looks like (stays stable)
|
|
539
|
-
- [ ] Priority: 0=critical, 1=high, 2=normal, 3=low
|
|
540
|
-
- [ ] Type: bug/feature/task/epic/chore
|
|
541
|
-
```
|
|
542
|
-
|
|
543
|
-
**Self-check for acceptance criteria:**
|
|
544
|
-
|
|
545
|
-
❓ "If I changed the implementation approach, would these criteria still apply?"
|
|
546
|
-
|
|
547
|
-
- → **Yes** = Good criteria (outcome-focused)
|
|
548
|
-
- → **No** = Move to design field (implementation-focused)
|
|
549
|
-
|
|
550
|
-
**Example:**
|
|
551
48
|
|
|
552
|
-
-
|
|
553
|
-
-
|
|
49
|
+
- **bd CLI** installed and in PATH
|
|
50
|
+
- **Git repository** (bd requires git for sync)
|
|
51
|
+
- **Initialization**: `bd init` run once (humans do this, not agents)
|
|
554
52
|
|
|
555
|
-
|
|
53
|
+
## CLI Reference
|
|
556
54
|
|
|
557
|
-
|
|
55
|
+
**Run `bd prime`** for AI-optimized workflow context (auto-loaded by hooks).
|
|
56
|
+
**Run `bd <command> --help`** for specific command usage.
|
|
558
57
|
|
|
559
|
-
|
|
58
|
+
Essential commands: `bd ready`, `bd create`, `bd show`, `bd update`, `bd close`, `bd sync`
|
|
560
59
|
|
|
561
|
-
|
|
60
|
+
## Session Protocol
|
|
562
61
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
bd
|
|
569
|
-
bd stats --json
|
|
570
|
-
```
|
|
571
|
-
|
|
572
|
-
Returns: total issues, open, in_progress, closed, blocked, ready, avg lead time
|
|
573
|
-
|
|
574
|
-
**Find blocked work:**
|
|
575
|
-
|
|
576
|
-
```bash
|
|
577
|
-
bd blocked
|
|
578
|
-
bd blocked --json
|
|
579
|
-
```
|
|
580
|
-
|
|
581
|
-
Use stats to:
|
|
582
|
-
|
|
583
|
-
- Report progress to user
|
|
584
|
-
- Identify bottlenecks
|
|
585
|
-
- Understand project velocity
|
|
62
|
+
1. `bd ready` — Find unblocked work
|
|
63
|
+
2. `bd show <id>` — Get full context
|
|
64
|
+
3. `bd update <id> --status in_progress` — Start work
|
|
65
|
+
4. Add notes as you work (critical for compaction survival)
|
|
66
|
+
5. `bd close <id> --reason "..."` — Complete task
|
|
67
|
+
6. `bd sync` — Persist to git (always run at session end)
|
|
586
68
|
|
|
587
69
|
## Advanced Features
|
|
588
70
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
bd
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
# Show full dependency tree for an issue
|
|
622
|
-
bd dep tree issue-123
|
|
623
|
-
|
|
624
|
-
# Check for circular dependencies
|
|
625
|
-
bd dep cycles
|
|
626
|
-
```
|
|
627
|
-
|
|
628
|
-
### Built-in Help
|
|
629
|
-
|
|
630
|
-
```bash
|
|
631
|
-
# Quick start guide (comprehensive built-in reference)
|
|
632
|
-
bd quickstart
|
|
633
|
-
|
|
634
|
-
# Command-specific help
|
|
635
|
-
bd create --help
|
|
636
|
-
bd dep --help
|
|
637
|
-
```
|
|
638
|
-
|
|
639
|
-
## JSON Output
|
|
640
|
-
|
|
641
|
-
All bd commands support `--json` flag for structured output:
|
|
642
|
-
|
|
643
|
-
```bash
|
|
644
|
-
bd ready --json
|
|
645
|
-
bd show issue-123 --json
|
|
646
|
-
bd list --status open --json
|
|
647
|
-
bd stats --json
|
|
648
|
-
```
|
|
649
|
-
|
|
650
|
-
Use JSON output when you need to parse results programmatically or extract specific fields.
|
|
651
|
-
|
|
652
|
-
## Troubleshooting
|
|
653
|
-
|
|
654
|
-
**If bd command not found:**
|
|
655
|
-
|
|
656
|
-
- Check installation: `bd version`
|
|
657
|
-
- Verify PATH includes bd binary location
|
|
658
|
-
|
|
659
|
-
**If issues seem lost:**
|
|
660
|
-
|
|
661
|
-
- Use `bd list` to see all issues
|
|
662
|
-
- Filter by status: `bd list --status closed`
|
|
663
|
-
- Closed issues remain in database permanently
|
|
664
|
-
|
|
665
|
-
**If bd show can't find issue by name:**
|
|
666
|
-
|
|
667
|
-
- `bd show` requires issue IDs, not issue titles
|
|
668
|
-
- Workaround: `bd list | grep -i "search term"` to find ID first
|
|
669
|
-
- Then: `bd show issue-id` with the discovered ID
|
|
670
|
-
- For glossaries/reference databases where names matter more than IDs, consider using markdown format alongside the database
|
|
671
|
-
|
|
672
|
-
**If dependencies seem wrong:**
|
|
673
|
-
|
|
674
|
-
- Use `bd show issue-id` to see full dependency tree
|
|
675
|
-
- Use `bd dep tree issue-id` for visualization
|
|
676
|
-
- Dependencies are directional: `bd dep add from-id to-id` means from-id blocks to-id
|
|
677
|
-
- See [references/DEPENDENCIES.md](references/DEPENDENCIES.md#common-mistakes)
|
|
678
|
-
|
|
679
|
-
**If database seems out of sync:**
|
|
680
|
-
|
|
681
|
-
- bd auto-syncs JSONL after each operation (5s debounce)
|
|
682
|
-
- bd auto-imports JSONL when newer than DB (after git pull)
|
|
683
|
-
- Manual operations: `bd export`, `bd import`
|
|
684
|
-
|
|
685
|
-
## Related Skills & Tools
|
|
686
|
-
|
|
687
|
-
### bv (Beads Viewer)
|
|
688
|
-
|
|
689
|
-
`bv` is a TUI and analysis tool that complements `bd`:
|
|
690
|
-
|
|
691
|
-
```bash
|
|
692
|
-
bv # Interactive TUI dashboard
|
|
693
|
-
bv --robot-next # Get top priority bead to work on
|
|
694
|
-
bv --robot-triage # Full prioritized recommendations
|
|
695
|
-
bv --robot-plan # Parallel execution tracks
|
|
696
|
-
bv --robot-suggest # Missing dependency suggestions
|
|
697
|
-
bv --robot-insights # Graph analysis (bottlenecks, cycles)
|
|
698
|
-
bv --robot-priority # Priority recommendations based on graph
|
|
699
|
-
```
|
|
700
|
-
|
|
701
|
-
**Use `bd` for CRUD, use `bv` for analysis.**
|
|
702
|
-
|
|
703
|
-
### Related Skills
|
|
704
|
-
|
|
705
|
-
| Skill | Use When |
|
|
706
|
-
| ---------------- | ------------------------------------------------------- |
|
|
707
|
-
| **file-beads** | Batch create beads from a plan or spec |
|
|
708
|
-
| **review-beads** | Polish beads with bv analysis + content quality |
|
|
709
|
-
| **worker** | Session-managed bead execution with context persistence |
|
|
710
|
-
| **orchestrator** | Multi-agent parallel execution coordination |
|
|
711
|
-
|
|
712
|
-
### Full Workflow
|
|
713
|
-
|
|
714
|
-
For complex epics with multiple agents:
|
|
715
|
-
|
|
716
|
-
```
|
|
717
|
-
1. CREATE → file-beads skill
|
|
718
|
-
2. REVIEW → review-beads skill (uses bv)
|
|
719
|
-
3. PLAN → bv --robot-plan
|
|
720
|
-
4. COORDINATE → orchestrator skill + Agent Mail
|
|
721
|
-
5. EXECUTE → worker skill (session management)
|
|
722
|
-
6. COMPLETE → bd close + Agent Mail notification
|
|
723
|
-
```
|
|
724
|
-
|
|
725
|
-
See `worker` and `orchestrator` skills for detailed protocols.
|
|
726
|
-
|
|
727
|
-
---
|
|
728
|
-
|
|
729
|
-
## Reference Files
|
|
730
|
-
|
|
731
|
-
Detailed information organized by topic:
|
|
732
|
-
|
|
733
|
-
| Reference | Read When |
|
|
734
|
-
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |
|
|
735
|
-
| [references/BOUNDARIES.md](references/BOUNDARIES.md) | Need detailed decision criteria for bd vs TodoWrite, or integration patterns |
|
|
736
|
-
| [references/CLI_REFERENCE.md](references/CLI_REFERENCE.md) | Need complete command reference, flag details, or examples |
|
|
737
|
-
| [references/WORKFLOWS.md](references/WORKFLOWS.md) | Need step-by-step workflows with checklists for common scenarios |
|
|
738
|
-
| [references/DEPENDENCIES.md](references/DEPENDENCIES.md) | Need deep understanding of dependency types or relationship patterns |
|
|
739
|
-
| [references/ISSUE_CREATION.md](references/ISSUE_CREATION.md) | Need guidance on when to ask vs create issues, issue quality, or design vs acceptance criteria |
|
|
740
|
-
| [references/STATIC_DATA.md](references/STATIC_DATA.md) | Want to use bd for reference databases, glossaries, or static data instead of work tracking |
|
|
71
|
+
| Feature | CLI | Resource |
|
|
72
|
+
| --------------------- | ---------------------------- | -------------------------------------------------------- |
|
|
73
|
+
| Molecules (templates) | `bd mol --help` | [MOLECULES.md](resources/MOLECULES.md) |
|
|
74
|
+
| Chemistry (pour/wisp) | `bd mol pour`, `bd mol wisp` | [CHEMISTRY_PATTERNS.md](resources/CHEMISTRY_PATTERNS.md) |
|
|
75
|
+
| Agent beads | `bd agent --help` | [AGENTS.md](resources/AGENTS.md) |
|
|
76
|
+
| Async gates | `bd gate --help` | [ASYNC_GATES.md](resources/ASYNC_GATES.md) |
|
|
77
|
+
| Worktrees | `bd worktree --help` | [WORKTREES.md](resources/WORKTREES.md) |
|
|
78
|
+
|
|
79
|
+
## Resources
|
|
80
|
+
|
|
81
|
+
| Resource | Content |
|
|
82
|
+
| ------------------------------------------------------------ | ----------------------------------- |
|
|
83
|
+
| [BOUNDARIES.md](resources/BOUNDARIES.md) | bd vs TodoWrite detailed comparison |
|
|
84
|
+
| [CLI_REFERENCE.md](resources/CLI_REFERENCE.md) | Complete command syntax |
|
|
85
|
+
| [DEPENDENCIES.md](resources/DEPENDENCIES.md) | Dependency system deep dive |
|
|
86
|
+
| [INTEGRATION_PATTERNS.md](resources/INTEGRATION_PATTERNS.md) | TodoWrite and tool integration |
|
|
87
|
+
| [ISSUE_CREATION.md](resources/ISSUE_CREATION.md) | When and how to create issues |
|
|
88
|
+
| [MOLECULES.md](resources/MOLECULES.md) | Proto definitions, component labels |
|
|
89
|
+
| [PATTERNS.md](resources/PATTERNS.md) | Common usage patterns |
|
|
90
|
+
| [RESUMABILITY.md](resources/RESUMABILITY.md) | Compaction survival guide |
|
|
91
|
+
| [STATIC_DATA.md](resources/STATIC_DATA.md) | Database schema reference |
|
|
92
|
+
| [TROUBLESHOOTING.md](resources/TROUBLESHOOTING.md) | Error handling and fixes |
|
|
93
|
+
| [WORKFLOWS.md](resources/WORKFLOWS.md) | Step-by-step workflow patterns |
|
|
94
|
+
| [AGENTS.md](resources/AGENTS.md) | Agent bead tracking (v0.40+) |
|
|
95
|
+
| [ASYNC_GATES.md](resources/ASYNC_GATES.md) | Human-in-the-loop gates |
|
|
96
|
+
| [CHEMISTRY_PATTERNS.md](resources/CHEMISTRY_PATTERNS.md) | Mol vs Wisp decision tree |
|
|
97
|
+
| [WORKTREES.md](resources/WORKTREES.md) | Parallel development patterns |
|
|
98
|
+
|
|
99
|
+
## Full Documentation
|
|
100
|
+
|
|
101
|
+
- **bd prime**: AI-optimized workflow context
|
|
102
|
+
- **GitHub**: [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
|