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.
- package/README.md +1 -1
- package/dist/index.js +4 -25
- package/dist/template/.opencode/.template-manifest.json +115 -188
- package/dist/template/.opencode/AGENTS.md +21 -4
- package/dist/template/.opencode/README.md +1 -1
- package/dist/template/.opencode/agent/build.md +155 -13
- package/dist/template/.opencode/agent/plan.md +7 -16
- package/dist/template/.opencode/agent/scout.md +2 -2
- package/dist/template/.opencode/artifacts/.active +1 -0
- package/dist/template/.opencode/artifacts/example/plan.md +12 -0
- package/dist/template/.opencode/artifacts/example/progress.md +4 -0
- package/dist/template/.opencode/artifacts/example/research.md +4 -0
- package/dist/template/.opencode/artifacts/example/spec.md +16 -0
- package/dist/template/.opencode/artifacts/todo.md +5 -0
- package/dist/template/.opencode/artifacts/verify.log +4 -0
- package/dist/template/.opencode/command/clarify.md +6 -8
- package/dist/template/.opencode/command/create.md +29 -71
- package/dist/template/.opencode/command/design.md +1 -2
- package/dist/template/.opencode/command/explore.md +3 -4
- package/dist/template/.opencode/command/fix.md +0 -1
- package/dist/template/.opencode/command/init.md +1 -4
- package/dist/template/.opencode/command/plan.md +30 -60
- package/dist/template/.opencode/command/pr.md +10 -28
- package/dist/template/.opencode/command/refactor.md +0 -1
- package/dist/template/.opencode/command/research.md +7 -29
- package/dist/template/.opencode/command/review-codebase.md +6 -13
- package/dist/template/.opencode/command/ship.md +136 -78
- package/dist/template/.opencode/command/ui-review.md +2 -4
- package/dist/template/.opencode/command/verify.md +15 -23
- package/dist/template/.opencode/dcp-prompts/overrides/compress-range.md +89 -0
- package/dist/template/.opencode/dcp.jsonc +96 -96
- package/dist/template/.opencode/memory/README.md +1 -1
- package/dist/template/.opencode/memory/_templates/prd.md +1 -1
- package/dist/template/.opencode/memory/_templates/roadmap.md +1 -1
- package/dist/template/.opencode/memory/_templates/state.md +1 -1
- package/dist/template/.opencode/memory/project/gotchas.md +3 -3
- package/dist/template/.opencode/memory/project/project.md +2 -2
- package/dist/template/.opencode/memory/project/roadmap.md +1 -1
- package/dist/template/.opencode/memory/project/state.md +2 -2
- package/dist/template/.opencode/memory/project/tech-stack.md +2 -2
- package/dist/template/.opencode/opencode.json +112 -152
- package/dist/template/.opencode/plugin/README.md +11 -1
- package/dist/template/.opencode/plugin/session-summary.ts +542 -0
- package/dist/template/.opencode/skill/brainstorming/SKILL.md +1 -1
- package/dist/template/.opencode/skill/context-engineering/SKILL.md +1 -1
- package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +26 -45
- package/dist/template/.opencode/skill/gemini-large-context/SKILL.md +4 -4
- package/dist/template/.opencode/skill/opensrc/references/example-workflow.md +1 -1
- package/dist/template/.opencode/skill/subagent-driven-development/SKILL.md +1 -1
- package/dist/template/.opencode/skill/using-git-worktrees/SKILL.md +6 -6
- package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +6 -6
- package/dist/template/.opencode/skill/verification-before-completion/references/VERIFICATION_PROTOCOL.md +5 -5
- package/package.json +76 -76
- package/dist/template/.opencode/plans/1768385996691-silent-wizard.md +0 -247
- package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +0 -418
- package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +0 -170
- package/dist/template/.opencode/plans/1770013678126-witty-planet.md +0 -278
- package/dist/template/.opencode/plans/1770112267595-shiny-rocket.md +0 -258
- package/dist/template/.opencode/plans/swarm-protocol.md +0 -123
- package/dist/template/.opencode/skill/beads/SKILL.md +0 -182
- package/dist/template/.opencode/skill/beads/references/BEST_PRACTICES.md +0 -27
- package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +0 -219
- package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +0 -124
- package/dist/template/.opencode/skill/beads/references/EXAMPLES.md +0 -45
- package/dist/template/.opencode/skill/beads/references/FILE_CLAIMING.md +0 -101
- package/dist/template/.opencode/skill/beads/references/GIT_SYNC.md +0 -25
- package/dist/template/.opencode/skill/beads/references/HIERARCHY.md +0 -71
- package/dist/template/.opencode/skill/beads/references/MULTI_AGENT.md +0 -40
- package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +0 -177
- package/dist/template/.opencode/skill/beads/references/SESSION_PROTOCOL.md +0 -61
- package/dist/template/.opencode/skill/beads/references/TASK_CREATION.md +0 -38
- package/dist/template/.opencode/skill/beads/references/TROUBLESHOOTING.md +0 -38
- package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +0 -226
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Examples
|
|
2
|
-
|
|
3
|
-
## Example 1: Standard Session
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
# 1. Find and claim work
|
|
7
|
-
br ready
|
|
8
|
-
br update auth-123 --status in_progress
|
|
9
|
-
|
|
10
|
-
# 2. Get context
|
|
11
|
-
br show auth-123
|
|
12
|
-
|
|
13
|
-
# 3. Do the work...
|
|
14
|
-
# [implementation]
|
|
15
|
-
|
|
16
|
-
# 4. Complete and sync
|
|
17
|
-
br close auth-123 --reason "Login form with validation, hooks for auth state"
|
|
18
|
-
br sync --flush-only
|
|
19
|
-
git add .beads/
|
|
20
|
-
git commit -m "close auth-123"
|
|
21
|
-
# RESTART SESSION
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Example 2: Discovered Work
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
# Working on task, found more work
|
|
28
|
-
br create --title "Fix edge case in validation" --type bug --priority 1 \
|
|
29
|
-
--description "Empty strings bypass email check - discovered while implementing login"
|
|
30
|
-
# Continue current task, new task tracked for later
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Example 3: Creating Dependencies
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
# Create tasks with dependencies
|
|
37
|
-
br create --title "Setup database" --type task --priority 1
|
|
38
|
-
# Returns: setup-db
|
|
39
|
-
|
|
40
|
-
br create --title "Implement API" --type task --priority 2 --blocked-by setup-db
|
|
41
|
-
# Returns: impl-api (blocked until setup-db closes)
|
|
42
|
-
|
|
43
|
-
br create --title "Add tests" --type task --priority 2 --blocked-by impl-api
|
|
44
|
-
# Returns: add-tests
|
|
45
|
-
```
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# File Path Claiming (Multi-Agent Safety)
|
|
2
|
-
|
|
3
|
-
At multi-agent scale, agents editing the same files cause merge conflicts. File path claiming prevents this by making ownership explicit before any edit happens.
|
|
4
|
-
|
|
5
|
-
## When to Use
|
|
6
|
-
|
|
7
|
-
- **Single agent**: Optional — no conflicts possible
|
|
8
|
-
- **2-10 agents**: Recommended for files touched by multiple tasks
|
|
9
|
-
- **10+ agents**: Required — every file must be claimed before editing
|
|
10
|
-
|
|
11
|
-
## The Claim/Edit/Release Cycle
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
# 1. CLAIM: Declare intent to edit before touching the file
|
|
15
|
-
br reserve <bead-id> --files "src/auth/service.ts,src/auth/types.ts"
|
|
16
|
-
# → Marks files as owned by this bead
|
|
17
|
-
# → Other agents see the reservation and must wait
|
|
18
|
-
|
|
19
|
-
# 2. EDIT: Make your changes
|
|
20
|
-
# (edit files as normal)
|
|
21
|
-
|
|
22
|
-
# 3. VERIFY: Run gates before releasing
|
|
23
|
-
npm run typecheck && npm run lint
|
|
24
|
-
|
|
25
|
-
# 4. CLOSE: Release ownership when done
|
|
26
|
-
br close <bead-id> --reason "Auth service implemented. Gates passed."
|
|
27
|
-
# → Ownership released automatically on close
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## File Claiming Checklist
|
|
31
|
-
|
|
32
|
-
- [ ] Check for conflicts: `br list --status in_progress --json | jq '.[].reserved_files'`
|
|
33
|
-
- [ ] Reserve files before editing: `br reserve <id> --files "..."`
|
|
34
|
-
- [ ] Run gates before closing: `npm run typecheck && npm run lint`
|
|
35
|
-
- [ ] Close bead to release ownership
|
|
36
|
-
|
|
37
|
-
## Checking for Conflicts Before Claiming
|
|
38
|
-
|
|
39
|
-
Before claiming, check if another bead already owns the file:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
# See all reserved files across active beads
|
|
43
|
-
br list --status in_progress --json | jq '.[].reserved_files'
|
|
44
|
-
|
|
45
|
-
# If conflict detected:
|
|
46
|
-
# → Wait for the other bead to close
|
|
47
|
-
# → Or coordinate with the agent owning that bead
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Claiming in Delegation Packets
|
|
51
|
-
|
|
52
|
-
Workers MUST declare file claims in their delegation packet:
|
|
53
|
-
|
|
54
|
-
```markdown
|
|
55
|
-
# Delegation Packet
|
|
56
|
-
|
|
57
|
-
- TASK: task-1 - Implement auth service
|
|
58
|
-
- FILES TO CLAIM BEFORE EDITING:
|
|
59
|
-
- src/auth/service.ts
|
|
60
|
-
- src/auth/types.ts
|
|
61
|
-
- src/auth/middleware.ts
|
|
62
|
-
- MUST NOT EDIT (owned by other tasks):
|
|
63
|
-
- src/db/schema.ts (owned by task-0)
|
|
64
|
-
- src/config.ts (owned by task-2)
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Conflict Resolution Protocol
|
|
68
|
-
|
|
69
|
-
When two agents want the same file:
|
|
70
|
-
|
|
71
|
-
| Scenario | Resolution |
|
|
72
|
-
| ------------------------------------ | ----------------------------------------------- |
|
|
73
|
-
| File not claimed | Claim it and proceed |
|
|
74
|
-
| File claimed by completed bead | Safe to claim (no active owner) |
|
|
75
|
-
| File claimed by in_progress bead | Wait for bead to close, then claim |
|
|
76
|
-
| Urgent: same file, different workers | Escalate to lead agent to split the file change |
|
|
77
|
-
|
|
78
|
-
## Anti-Pattern: Claiming After Editing
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
# WRONG — edit first, claim after → conflict already happened
|
|
82
|
-
edit src/auth/service.ts
|
|
83
|
-
br reserve bead-1 --files "src/auth/service.ts"
|
|
84
|
-
|
|
85
|
-
# RIGHT — claim first, then edit
|
|
86
|
-
br reserve bead-1 --files "src/auth/service.ts"
|
|
87
|
-
edit src/auth/service.ts
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Quick Reference: File Claiming
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
BEFORE EDITING (multi-agent):
|
|
94
|
-
br reserve <id> --files "src/file.ts"
|
|
95
|
-
|
|
96
|
-
CHECK OWNERSHIP:
|
|
97
|
-
br list --status in_progress --json | jq '.[].reserved_files'
|
|
98
|
-
|
|
99
|
-
RELEASE:
|
|
100
|
-
br close <id> --reason "..." ← auto-releases files
|
|
101
|
-
```
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Git Sync
|
|
2
|
-
|
|
3
|
-
## Manual Sync (Non-Invasive)
|
|
4
|
-
|
|
5
|
-
**Important:** `br` never executes git commands. You must manually commit changes.
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Export changes to JSONL
|
|
9
|
-
br sync --flush-only
|
|
10
|
-
|
|
11
|
-
# Then manually commit
|
|
12
|
-
git add .beads/
|
|
13
|
-
git commit -m "sync beads"
|
|
14
|
-
git push
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**Use when**: End of session, before handoff, after major progress.
|
|
18
|
-
|
|
19
|
-
## Cleanup Old Issues
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
br cleanup --days 7
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Removes closed issues older than N days. Run weekly.
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Hierarchical Structure: Epic → Task → Subtask
|
|
2
|
-
|
|
3
|
-
Beads supports up to 3 levels of hierarchy using hierarchical IDs:
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
br-a3f8 (Epic - parent feature)
|
|
7
|
-
├── br-a3f8.1 (Task - first child)
|
|
8
|
-
├── br-a3f8.2 (Task - second child)
|
|
9
|
-
│ ├── br-a3f8.2.1 (Subtask - child of .2)
|
|
10
|
-
│ └── br-a3f8.2.2 (Subtask - child of .2)
|
|
11
|
-
└── br-a3f8.3 (Task - third child)
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## When to Decompose
|
|
15
|
-
|
|
16
|
-
| Scenario | Structure |
|
|
17
|
-
| ---------------------------- | ------------------------------------ |
|
|
18
|
-
| Bug fix, config change | Single bead |
|
|
19
|
-
| Small feature (1-2 files) | Single bead |
|
|
20
|
-
| Feature crossing FE/BE | Epic + tasks by domain |
|
|
21
|
-
| New system/service | Epic + tasks by component |
|
|
22
|
-
| Multi-day work | Epic + tasks for parallelization |
|
|
23
|
-
| Work needing multiple agents | Epic + tasks (agents claim children) |
|
|
24
|
-
|
|
25
|
-
## Creating Hierarchical Beads
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# Step 1: Create Epic (parent)
|
|
29
|
-
br create --title "User Authentication System" --type epic --priority 1 \
|
|
30
|
-
--description "Complete auth with OAuth, sessions, and protected routes"
|
|
31
|
-
# Returns: br-a3f8
|
|
32
|
-
|
|
33
|
-
# Step 2: Create child tasks with parent
|
|
34
|
-
br create --title "Database schema for auth" --type task --priority 2 \
|
|
35
|
-
--parent br-a3f8 --description "Create user and session tables"
|
|
36
|
-
# Returns: br-a3f8.1 ← Hierarchical ID!
|
|
37
|
-
|
|
38
|
-
# Step 3: Create dependent tasks
|
|
39
|
-
br create --title "OAuth integration" --type task --priority 2 \
|
|
40
|
-
--parent br-a3f8 --blocked-by br-a3f8.1
|
|
41
|
-
# Returns: br-a3f8.2
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Parallel Execution with Dependencies
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
br-a3f8.1 [Database] ──┬──> br-a3f8.2 [Backend] ──┐
|
|
48
|
-
(READY) │ │
|
|
49
|
-
│ ▼
|
|
50
|
-
└──> br-a3f8.3 [Frontend] br-a3f8.5 [Testing]
|
|
51
|
-
│ │ ▲
|
|
52
|
-
└──> br-a3f8.4 [Docs] ──────────┘
|
|
53
|
-
|
|
54
|
-
Parallel tracks:
|
|
55
|
-
• Agent 1 (backend): .1 → .2
|
|
56
|
-
• Agent 2 (frontend): wait for .1, then .3
|
|
57
|
-
• Agent 3 (qa): wait for .2 and .3, then .5
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
**Key insight**: After br-a3f8.1 completes, .2, .3, and .4 all become READY simultaneously. Multiple agents can claim them in parallel.
|
|
61
|
-
|
|
62
|
-
## Querying Hierarchy
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# See all open issues
|
|
66
|
-
br list --status open
|
|
67
|
-
|
|
68
|
-
# See ready work (unblocked tasks)
|
|
69
|
-
br ready
|
|
70
|
-
# Returns tasks where all dependencies are closed
|
|
71
|
-
```
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Multi-Agent Coordination (Swarm Mode)
|
|
2
|
-
|
|
3
|
-
For parallel execution with multiple subagents, use the **swarm-coordination** skill:
|
|
4
|
-
|
|
5
|
-
```typescript
|
|
6
|
-
skill({ name: "swarm-coordination" });
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
**swarm-coordination** provides (via unified `swarm` tool):
|
|
10
|
-
|
|
11
|
-
- `swarm({ operation: "sync" })` - Sync Beads tasks to OpenCode todos for subagent visibility
|
|
12
|
-
- `swarm({ operation: "monitor" })` - Real-time progress tracking and visualization
|
|
13
|
-
- `swarm({ operation: "plan" })` - Task classification and dependency analysis
|
|
14
|
-
- `swarm({ operation: "delegate" })` - Create delegation packets for workers
|
|
15
|
-
|
|
16
|
-
**When to use beads vs swarm-coordination:**
|
|
17
|
-
|
|
18
|
-
| Scenario | Use |
|
|
19
|
-
| ------------------------------ | -------------------------------------- |
|
|
20
|
-
| Single agent, linear work | `beads` skill only |
|
|
21
|
-
| Multiple agents in parallel | `swarm-coordination` + `beads` |
|
|
22
|
-
| Need subagents to see tasks | `swarm-coordination` (swarm sync push) |
|
|
23
|
-
| Track worker progress visually | `swarm-coordination` (swarm monitor) |
|
|
24
|
-
|
|
25
|
-
**Example swarm workflow:**
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
// 1. Push beads to OpenCode todos (subagents can see via todoread)
|
|
29
|
-
swarm({ operation: "sync", action: "push" });
|
|
30
|
-
|
|
31
|
-
// 2. Spawn workers in parallel using Task tool
|
|
32
|
-
Task({ subagent_type: "general", description: "Worker 1", prompt: "..." });
|
|
33
|
-
Task({ subagent_type: "general", description: "Worker 2", prompt: "..." });
|
|
34
|
-
|
|
35
|
-
// 3. Monitor progress
|
|
36
|
-
swarm({ operation: "monitor", action: "render_block", team_name: "my-swarm" });
|
|
37
|
-
|
|
38
|
-
// 4. Pull completed work back to beads
|
|
39
|
-
swarm({ operation: "sync", action: "pull" });
|
|
40
|
-
```
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
# Making Tasks Resumable Across Sessions
|
|
2
|
-
|
|
3
|
-
## When Resumability Matters
|
|
4
|
-
|
|
5
|
-
**Use enhanced notes for:**
|
|
6
|
-
|
|
7
|
-
- Multi-session features with API integration
|
|
8
|
-
- Complex algorithms requiring code examples
|
|
9
|
-
- Features with specific output format requirements
|
|
10
|
-
- Work with undocumented APIs
|
|
11
|
-
|
|
12
|
-
**Skip for:**
|
|
13
|
-
|
|
14
|
-
- Simple bug fixes with clear scope
|
|
15
|
-
- Well-understood patterns (CRUD, etc.)
|
|
16
|
-
- Single-session tasks
|
|
17
|
-
- Work with obvious criteria
|
|
18
|
-
|
|
19
|
-
**The test:** Would a fresh agent (or you after 2 weeks) struggle to resume from the notes alone? If yes, add detail.
|
|
20
|
-
|
|
21
|
-
## Anatomy of Resumable Notes
|
|
22
|
-
|
|
23
|
-
### Minimal (Always Include)
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
COMPLETED: What's done
|
|
27
|
-
IN PROGRESS: Current state
|
|
28
|
-
NEXT: Concrete next step
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Enhanced (Complex Work)
|
|
32
|
-
|
|
33
|
-
````
|
|
34
|
-
COMPLETED: Specific deliverables
|
|
35
|
-
IN PROGRESS: Current state + what's working
|
|
36
|
-
NEXT: Concrete next step (not "continue")
|
|
37
|
-
BLOCKERS: What's preventing progress
|
|
38
|
-
KEY DECISIONS: Important context with rationale
|
|
39
|
-
|
|
40
|
-
WORKING CODE:
|
|
41
|
-
```python
|
|
42
|
-
# Tested code that works
|
|
43
|
-
result = api.query(fields='importFormats')
|
|
44
|
-
# Returns: {'text/markdown': ['application/vnd.google-apps.document']}
|
|
45
|
-
````
|
|
46
|
-
|
|
47
|
-
DESIRED OUTPUT:
|
|
48
|
-
|
|
49
|
-
```markdown
|
|
50
|
-
# Example of what output should look like
|
|
51
|
-
|
|
52
|
-
Actual structure, not just "return markdown"
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
````
|
|
56
|
-
|
|
57
|
-
## Example: Before vs After
|
|
58
|
-
|
|
59
|
-
### Not Resumable
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
Title: Add dynamic capabilities
|
|
63
|
-
Notes: Working on it. Made some progress.
|
|
64
|
-
````
|
|
65
|
-
|
|
66
|
-
**Problem:** Future agent doesn't know:
|
|
67
|
-
|
|
68
|
-
- Which API endpoints to call
|
|
69
|
-
- What responses look like
|
|
70
|
-
- What format to return
|
|
71
|
-
|
|
72
|
-
### Resumable
|
|
73
|
-
|
|
74
|
-
````
|
|
75
|
-
Title: Add dynamic capabilities resources
|
|
76
|
-
|
|
77
|
-
Notes:
|
|
78
|
-
COMPLETED: API connection verified. Query working.
|
|
79
|
-
IN PROGRESS: Formatting response as markdown.
|
|
80
|
-
NEXT: Add caching for API responses.
|
|
81
|
-
|
|
82
|
-
WORKING CODE:
|
|
83
|
-
```python
|
|
84
|
-
service = build('drive', 'v3', credentials=creds)
|
|
85
|
-
about = service.about().get(fields='importFormats').execute()
|
|
86
|
-
# Returns dict with 49 entries
|
|
87
|
-
````
|
|
88
|
-
|
|
89
|
-
DESIRED OUTPUT:
|
|
90
|
-
|
|
91
|
-
```markdown
|
|
92
|
-
# Drive Import Formats
|
|
93
|
-
|
|
94
|
-
- **text/markdown** → Google Docs
|
|
95
|
-
- text/plain → Google Docs
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
KEY DECISION: Using live API query because text/markdown support (July 2024) not in static docs.
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
**Result:** Fresh agent can:
|
|
103
|
-
1. See working API code
|
|
104
|
-
2. Understand response structure
|
|
105
|
-
3. Know desired output format
|
|
106
|
-
4. Implement with context
|
|
107
|
-
|
|
108
|
-
## When to Add Detail
|
|
109
|
-
|
|
110
|
-
**During task creation:**
|
|
111
|
-
- Already have working code? Include it.
|
|
112
|
-
- Clear output format? Show example.
|
|
113
|
-
|
|
114
|
-
**During work:**
|
|
115
|
-
- Got API working? Add to notes.
|
|
116
|
-
- Discovered important context? Document it.
|
|
117
|
-
- Made key decision? Explain rationale.
|
|
118
|
-
|
|
119
|
-
**Session end:**
|
|
120
|
-
- If resuming will be hard, add implementation guide.
|
|
121
|
-
- If obvious, skip it.
|
|
122
|
-
|
|
123
|
-
## Anti-Patterns
|
|
124
|
-
|
|
125
|
-
### Over-Documenting Simple Work
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Title: Fix typo in README
|
|
130
|
-
Notes: IMPLEMENTATION GUIDE
|
|
131
|
-
WORKING CODE: Open README.md, change "teh" to "the"...
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**Problem:** Wastes tokens on obvious work.
|
|
136
|
-
|
|
137
|
-
### Vague Progress
|
|
138
|
-
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Notes: Made progress. Will continue later.
|
|
142
|
-
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Problem:** No context for resumption.
|
|
146
|
-
|
|
147
|
-
### Raw Data Dumps
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
API RESPONSE:
|
|
152
|
-
{giant unformatted JSON blob spanning 100 lines}
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
**Problem:** Hard to read. Extract relevant parts.
|
|
157
|
-
|
|
158
|
-
### Right Balance
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
API returns dict with 49 entries. Examples:
|
|
163
|
-
|
|
164
|
-
- 'text/markdown': ['application/vnd.google-apps.document']
|
|
165
|
-
- 'text/plain': ['application/vnd.google-apps.document']
|
|
166
|
-
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## The Principle
|
|
170
|
-
|
|
171
|
-
Help your future self (or next agent) resume without rediscovering everything.
|
|
172
|
-
|
|
173
|
-
Write notes as if explaining to someone with:
|
|
174
|
-
- Zero conversation context
|
|
175
|
-
- No memory of previous sessions
|
|
176
|
-
- Only the task description and notes
|
|
177
|
-
```
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Session Start Protocol
|
|
2
|
-
|
|
3
|
-
**Every session, follow these steps:**
|
|
4
|
-
|
|
5
|
-
## Session Start Checklist
|
|
6
|
-
|
|
7
|
-
- [ ] Run `br ready` to find unblocked work
|
|
8
|
-
- [ ] If none, run `br list --status open` to see all open tasks
|
|
9
|
-
- [ ] Claim the task: `br update <id> --status in_progress`
|
|
10
|
-
- [ ] Load context: `br show <id>`
|
|
11
|
-
|
|
12
|
-
## Step 1: Find Ready Work
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
br ready
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Returns highest priority task with no blockers.
|
|
19
|
-
|
|
20
|
-
If no tasks returned, check all open work:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
br list --status open
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Step 2: Claim Task
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
br update <id> --status in_progress
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Step 3: Get Full Context
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
br show <id>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Shows full description, dependencies, notes, history.
|
|
39
|
-
|
|
40
|
-
## Step 4: Do the Work
|
|
41
|
-
|
|
42
|
-
Implement the task, adding notes as you learn.
|
|
43
|
-
|
|
44
|
-
## Step 5: Complete and Sync
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
br close <id> --reason "Implemented auth with JWT tokens"
|
|
48
|
-
br sync --flush-only
|
|
49
|
-
git add .beads/
|
|
50
|
-
git commit -m "sync beads"
|
|
51
|
-
# RESTART SESSION - fresh context
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Always restart session after closing a task. One task per session.
|
|
55
|
-
|
|
56
|
-
## Session End Checklist
|
|
57
|
-
|
|
58
|
-
- [ ] Close the bead with a clear reason: `br close <id> --reason "..."`
|
|
59
|
-
- [ ] Sync Beads to JSONL: `br sync --flush-only`
|
|
60
|
-
- [ ] Commit `.beads/` changes manually
|
|
61
|
-
- [ ] Restart session (fresh context)
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Task Creation
|
|
2
|
-
|
|
3
|
-
## When to Create Tasks
|
|
4
|
-
|
|
5
|
-
Create tasks when:
|
|
6
|
-
|
|
7
|
-
- User mentions tracking work across sessions
|
|
8
|
-
- User says "we should fix/build/add X"
|
|
9
|
-
- Work has dependencies or blockers
|
|
10
|
-
- Discovered work while implementing (>2 min effort)
|
|
11
|
-
|
|
12
|
-
## Basic Task Creation
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
br create --title "Fix authentication bug" --priority 0 --type bug
|
|
16
|
-
# Priority: 0=critical, 1=high, 2=normal, 3=low, 4=backlog
|
|
17
|
-
# Types: task, bug, feature, epic, chore
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## With Description
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
br create --title "Implement OAuth" --type feature --priority 1 \
|
|
24
|
-
--description "Add OAuth2 support for Google, GitHub. Use passport.js."
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Epic with Children
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
# Create parent epic
|
|
31
|
-
br create --title "Epic: OAuth Implementation" --priority 0 --type epic
|
|
32
|
-
# Returns: oauth-abc
|
|
33
|
-
|
|
34
|
-
# Create child tasks with parent
|
|
35
|
-
br create --title "Research OAuth providers" --priority 1 --parent oauth-abc
|
|
36
|
-
br create --title "Implement auth endpoints" --priority 1 --parent oauth-abc
|
|
37
|
-
br create --title "Add frontend login UI" --priority 2 --parent oauth-abc
|
|
38
|
-
```
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Error Handling
|
|
2
|
-
|
|
3
|
-
## Common Issues
|
|
4
|
-
|
|
5
|
-
**No ready tasks**
|
|
6
|
-
|
|
7
|
-
- Run `br list --status open` to see all tasks
|
|
8
|
-
- Some may be blocked - check dependencies with `br show <id>`
|
|
9
|
-
|
|
10
|
-
**Sync failures**
|
|
11
|
-
|
|
12
|
-
- Run `br doctor` to repair database
|
|
13
|
-
- Check git remote access
|
|
14
|
-
|
|
15
|
-
## Database Lock / WAL Conflicts
|
|
16
|
-
|
|
17
|
-
**Symptoms:**
|
|
18
|
-
|
|
19
|
-
- `SQLITE_BUSY` or `SQLITE_LOCKED` errors when reading beads
|
|
20
|
-
- Stale `.beads/beads.db-wal` or `.beads/beads.db-journal` files after agent crash
|
|
21
|
-
|
|
22
|
-
**Cause:**
|
|
23
|
-
Agent interruption during bead operations can leave WAL/journal files in an inconsistent state.
|
|
24
|
-
|
|
25
|
-
**Fix:**
|
|
26
|
-
|
|
27
|
-
1. Ensure no agents are actively writing to beads.db
|
|
28
|
-
2. Remove stale lock files:
|
|
29
|
-
```bash
|
|
30
|
-
rm -f .beads/beads.db-wal .beads/beads.db-journal
|
|
31
|
-
```
|
|
32
|
-
3. Run `br sync --flush-only` to rebuild from JSONL source of truth
|
|
33
|
-
4. Verify: `br ready` should work without errors
|
|
34
|
-
|
|
35
|
-
**Prevention:**
|
|
36
|
-
|
|
37
|
-
- The memory plugin now retries bead.db reads automatically (3 attempts, 500ms delay)
|
|
38
|
-
- If persistent, check for zombie agent processes: `ps aux | grep opencode`
|