opencodekit 0.16.4 → 0.16.6
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/dist/index.js +1 -1
- package/dist/template/.opencode/AGENTS.md +106 -384
- package/dist/template/.opencode/README.md +170 -104
- package/dist/template/.opencode/agent/build.md +39 -32
- package/dist/template/.opencode/agent/explore.md +2 -0
- package/dist/template/.opencode/agent/review.md +3 -0
- package/dist/template/.opencode/agent/scout.md +22 -11
- package/dist/template/.opencode/command/create.md +164 -106
- package/dist/template/.opencode/command/design.md +5 -1
- package/dist/template/.opencode/command/handoff.md +6 -4
- package/dist/template/.opencode/command/init.md +1 -1
- package/dist/template/.opencode/command/plan.md +26 -23
- package/dist/template/.opencode/command/research.md +13 -6
- package/dist/template/.opencode/command/resume.md +8 -6
- package/dist/template/.opencode/command/ship.md +1 -1
- package/dist/template/.opencode/command/start.md +30 -25
- package/dist/template/.opencode/command/status.md +9 -42
- package/dist/template/.opencode/command/verify.md +11 -11
- package/dist/template/.opencode/memory/README.md +67 -37
- package/dist/template/.opencode/memory/_templates/prd.md +102 -18
- package/dist/template/.opencode/memory/project/gotchas.md +31 -0
- package/dist/template/.opencode/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +0 -10
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/skill/beads/SKILL.md +164 -380
- package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +23 -22
- package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +23 -29
- package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +5 -8
- package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +43 -39
- package/dist/template/.opencode/skill/beads-bridge/SKILL.md +80 -53
- package/dist/template/.opencode/skill/brainstorming/SKILL.md +19 -5
- package/dist/template/.opencode/skill/context-engineering/SKILL.md +30 -63
- package/dist/template/.opencode/skill/context-management/SKILL.md +115 -0
- package/dist/template/.opencode/skill/deep-research/SKILL.md +4 -4
- package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +305 -0
- package/dist/template/.opencode/skill/memory-system/SKILL.md +3 -3
- package/dist/template/.opencode/skill/prd/SKILL.md +47 -122
- package/dist/template/.opencode/skill/prd-task/SKILL.md +48 -4
- package/dist/template/.opencode/skill/prd-task/references/prd-schema.json +120 -24
- package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +79 -61
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +31 -22
- package/dist/template/.opencode/tool/context7.ts +183 -0
- package/dist/template/.opencode/tool/memory-admin.ts +445 -0
- package/dist/template/.opencode/tool/swarm.ts +572 -0
- package/package.json +1 -1
- package/dist/template/.opencode/memory/_templates/spec.md +0 -66
- package/dist/template/.opencode/tool/beads-sync.ts +0 -657
- package/dist/template/.opencode/tool/context7-query-docs.ts +0 -89
- package/dist/template/.opencode/tool/context7-resolve-library-id.ts +0 -113
- package/dist/template/.opencode/tool/memory-maintain.ts +0 -167
- package/dist/template/.opencode/tool/memory-migrate.ts +0 -319
- package/dist/template/.opencode/tool/swarm-delegate.ts +0 -180
- package/dist/template/.opencode/tool/swarm-monitor.ts +0 -388
- package/dist/template/.opencode/tool/swarm-plan.ts +0 -697
|
@@ -97,7 +97,7 @@ If memory search fails (Ollama not running), continue without it.
|
|
|
97
97
|
|
|
98
98
|
Read all available context:
|
|
99
99
|
|
|
100
|
-
!`cat .beads/artifacts/$ARGUMENTS/
|
|
100
|
+
!`cat .beads/artifacts/$ARGUMENTS/prd.md 2>/dev/null`
|
|
101
101
|
!`cat .beads/artifacts/$ARGUMENTS/plan.md 2>/dev/null`
|
|
102
102
|
!`cat .beads/artifacts/$ARGUMENTS/research.md 2>/dev/null`
|
|
103
103
|
|
|
@@ -108,8 +108,9 @@ Check if there was an active swarm for this task:
|
|
|
108
108
|
```typescript
|
|
109
109
|
// Check for active swarm state
|
|
110
110
|
const teamName = "$ARGUMENTS-swarm";
|
|
111
|
-
const status = await
|
|
112
|
-
operation: "
|
|
111
|
+
const status = await swarm({
|
|
112
|
+
operation: "monitor",
|
|
113
|
+
action: "status",
|
|
113
114
|
team_name: teamName,
|
|
114
115
|
});
|
|
115
116
|
|
|
@@ -118,8 +119,9 @@ if (stats.summary?.total_workers > 0) {
|
|
|
118
119
|
console.log(`✓ Found active swarm with ${stats.summary.total_workers} workers`);
|
|
119
120
|
|
|
120
121
|
// Show current progress
|
|
121
|
-
const ui = await
|
|
122
|
-
operation: "
|
|
122
|
+
const ui = await swarm({
|
|
123
|
+
operation: "monitor",
|
|
124
|
+
action: "render_block",
|
|
123
125
|
team_name: teamName,
|
|
124
126
|
});
|
|
125
127
|
console.log(ui);
|
|
@@ -128,7 +130,7 @@ if (stats.summary?.total_workers > 0) {
|
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
// Sync beads to OpenCode todos for subagent visibility
|
|
131
|
-
|
|
133
|
+
swarm({ operation: "sync", action: "push" });
|
|
132
134
|
```
|
|
133
135
|
|
|
134
136
|
## Check For Stale Context
|
|
@@ -141,7 +141,7 @@ If review finds issues, fix them, re-run verification gates, then re-run review.
|
|
|
141
141
|
## Verify Success Criteria
|
|
142
142
|
|
|
143
143
|
```bash
|
|
144
|
-
cat .beads/artifacts/$ARGUMENTS/
|
|
144
|
+
cat .beads/artifacts/$ARGUMENTS/prd.md
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
Ensure all criteria are met before closing.
|
|
@@ -8,6 +8,8 @@ agent: build
|
|
|
8
8
|
|
|
9
9
|
You're claiming a task and preparing to work on it. This is the entry point before implementation.
|
|
10
10
|
|
|
11
|
+
> **Lifecycle context:** Ideation → Design → Specification → Task Conversion → Planning → **Implementation** → Verification
|
|
12
|
+
>
|
|
11
13
|
> **CCPM Philosophy:** One issue ≠ one task. One issue = multiple parallel work streams.
|
|
12
14
|
> Agents are "context firewalls" - they do heavy work and return concise summaries.
|
|
13
15
|
|
|
@@ -23,6 +25,7 @@ You're claiming a task and preparing to work on it. This is the entry point befo
|
|
|
23
25
|
## Load Skills
|
|
24
26
|
|
|
25
27
|
```typescript
|
|
28
|
+
skill({ name: "development-lifecycle" }); // Phase guidance
|
|
26
29
|
skill({ name: "beads" });
|
|
27
30
|
skill({ name: "beads-bridge" }); // For cross-session todo coordination
|
|
28
31
|
skill({ name: "prd" }); // PRD creation workflow
|
|
@@ -35,7 +38,7 @@ skill({ name: "memory-system" });
|
|
|
35
38
|
First-time setup per repo (prevents stale JSONL issues):
|
|
36
39
|
|
|
37
40
|
```bash
|
|
38
|
-
|
|
41
|
+
br hooks install 2>/dev/null || echo "Hooks already installed"
|
|
39
42
|
```
|
|
40
43
|
|
|
41
44
|
## Current State
|
|
@@ -87,7 +90,7 @@ Make beads tasks visible to subagents via todoread:
|
|
|
87
90
|
|
|
88
91
|
```typescript
|
|
89
92
|
// Push beads state to OpenCode todos
|
|
90
|
-
|
|
93
|
+
swarm({ operation: "sync", action: "push" });
|
|
91
94
|
```
|
|
92
95
|
|
|
93
96
|
This enables subagents to see task context via `todoread()` without beads access.
|
|
@@ -224,7 +227,6 @@ Task({
|
|
|
224
227
|
|
|
225
228
|
Look for:
|
|
226
229
|
|
|
227
|
-
- `spec.md` - Requirements and constraints
|
|
228
230
|
- `prd.md` - PRD created via `prd` skill (defines WHAT to build)
|
|
229
231
|
- `prd.json` - Executable tasks from `prd-task` skill
|
|
230
232
|
- `progress.txt` - PRD execution progress (append-only)
|
|
@@ -305,13 +307,14 @@ const beadInfo = br show $ARGUMENTS --json;
|
|
|
305
307
|
const taskTitle = beadInfo.title;
|
|
306
308
|
const taskDescription = beadInfo.description;
|
|
307
309
|
|
|
308
|
-
// Read
|
|
309
|
-
const
|
|
310
|
+
// Read prd/plan if exists for file context
|
|
311
|
+
const prdContent = read(".beads/artifacts/$ARGUMENTS/prd.md");
|
|
310
312
|
const planContent = read(".beads/artifacts/$ARGUMENTS/plan.md");
|
|
311
313
|
|
|
312
314
|
// Analyze THIS SPECIFIC task for parallel execution
|
|
313
|
-
const analysis =
|
|
314
|
-
operation: "
|
|
315
|
+
const analysis = swarm({
|
|
316
|
+
operation: "plan",
|
|
317
|
+
action: "analyze",
|
|
315
318
|
task: taskTitle, // User's actual task
|
|
316
319
|
context: taskDescription, // User's requirements
|
|
317
320
|
files: "[files from spec/plan]", // Actual affected files
|
|
@@ -340,7 +343,8 @@ The analysis returns **task-specific** streams:
|
|
|
340
343
|
```typescript
|
|
341
344
|
// Iterate over streams from analysis - these are DYNAMIC based on task
|
|
342
345
|
for (const stream of analysis.streams) {
|
|
343
|
-
|
|
346
|
+
swarm({
|
|
347
|
+
operation: "delegate",
|
|
344
348
|
bead_id: "$ARGUMENTS",
|
|
345
349
|
title: stream.purpose, // From analysis, not hardcoded
|
|
346
350
|
expected_outcome: `Complete ${stream.purpose} for task requirements`,
|
|
@@ -360,8 +364,9 @@ for (const stream of analysis.streams) {
|
|
|
360
364
|
// Launch workers based on ACTUAL analysis results
|
|
361
365
|
for (const stream of analysis.streams) {
|
|
362
366
|
// Initialize monitoring for this stream
|
|
363
|
-
|
|
364
|
-
operation: "
|
|
367
|
+
swarm({
|
|
368
|
+
operation: "monitor",
|
|
369
|
+
action: "progress_update",
|
|
365
370
|
team_name: "$ARGUMENTS-swarm",
|
|
366
371
|
worker_id: stream.id,
|
|
367
372
|
phase: "starting",
|
|
@@ -403,8 +408,9 @@ for (const stream of analysis.streams) {
|
|
|
403
408
|
|
|
404
409
|
```typescript
|
|
405
410
|
// Render progress visualization
|
|
406
|
-
|
|
407
|
-
operation: "
|
|
411
|
+
swarm({
|
|
412
|
+
operation: "monitor",
|
|
413
|
+
action: "render_block",
|
|
408
414
|
team_name: "$ARGUMENTS-swarm",
|
|
409
415
|
});
|
|
410
416
|
```
|
|
@@ -424,8 +430,9 @@ swarm_monitor({
|
|
|
424
430
|
Before proceeding, verify parallelization makes sense:
|
|
425
431
|
|
|
426
432
|
```typescript
|
|
427
|
-
|
|
428
|
-
operation: "
|
|
433
|
+
swarm({
|
|
434
|
+
operation: "plan",
|
|
435
|
+
action: "check",
|
|
429
436
|
task: taskTitle,
|
|
430
437
|
files: analysis.streams.length,
|
|
431
438
|
recommended_agents: analysis.recommended_agents,
|
|
@@ -495,14 +502,14 @@ Based on task type and what exists:
|
|
|
495
502
|
|
|
496
503
|
### For Tasks/Subtasks (leaf work)
|
|
497
504
|
|
|
498
|
-
| Artifacts Found
|
|
499
|
-
|
|
|
500
|
-
| Nothing
|
|
501
|
-
| Only
|
|
502
|
-
| prd.md (no prd.json)
|
|
503
|
-
| prd.json exists
|
|
504
|
-
|
|
|
505
|
-
| plan.md exists
|
|
505
|
+
| Artifacts Found | Next Step |
|
|
506
|
+
| -------------------- | ----------------------------------------- |
|
|
507
|
+
| Nothing | Ask user for task description |
|
|
508
|
+
| Only prd.md | `/plan $ARGUMENTS` or use `prd-task` |
|
|
509
|
+
| prd.md (no prd.json) | Run `prd-task` skill to convert to tasks |
|
|
510
|
+
| prd.json exists | `/ship $ARGUMENTS` (PRD-driven execution) |
|
|
511
|
+
| prd.md + research.md | `/plan $ARGUMENTS` |
|
|
512
|
+
| plan.md exists | `/ship $ARGUMENTS` |
|
|
506
513
|
|
|
507
514
|
### PRD vs Plan Decision
|
|
508
515
|
|
|
@@ -530,10 +537,9 @@ Hierarchy:
|
|
|
530
537
|
└── Children: [count or "none"]
|
|
531
538
|
|
|
532
539
|
Artifacts:
|
|
533
|
-
•
|
|
540
|
+
• prd.md: [exists/missing]
|
|
534
541
|
• research.md: [exists/missing]
|
|
535
542
|
• plan.md: [exists/missing]
|
|
536
|
-
• prd.md: [exists/missing]
|
|
537
543
|
• prd.json: [exists/missing] ([N] tasks, [M] complete)
|
|
538
544
|
|
|
539
545
|
[If PRD exists:]
|
|
@@ -607,7 +613,6 @@ Task({
|
|
|
607
613
|
| Need | Command |
|
|
608
614
|
| -------------------- | -------------------------------- |
|
|
609
615
|
| Skip to implement | `/ship $ARGUMENTS` |
|
|
610
|
-
| Create PRD first | `/create $ARGUMENTS --prd` |
|
|
611
616
|
| Research first | `/research $ARGUMENTS` |
|
|
612
617
|
| Plan implementation | `/plan $ARGUMENTS` |
|
|
613
618
|
| Convert PRD to tasks | Use `prd-task` skill |
|
|
@@ -22,9 +22,9 @@ Run all status checks simultaneously:
|
|
|
22
22
|
|
|
23
23
|
```
|
|
24
24
|
# Beads CLI commands
|
|
25
|
-
!`br
|
|
26
|
-
!`br list --status in_progress
|
|
27
|
-
!`br
|
|
25
|
+
!`br stats`
|
|
26
|
+
!`br list --status in_progress`
|
|
27
|
+
!`br ready`
|
|
28
28
|
|
|
29
29
|
# Git state
|
|
30
30
|
!`git status --porcelain`
|
|
@@ -33,10 +33,6 @@ Run all status checks simultaneously:
|
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
```typescript
|
|
36
|
-
// Custom tools (message inbox, locks)
|
|
37
|
-
bd - inbox({ n: 5, unread: true, to: "all" });
|
|
38
|
-
bd - release(); // Lists active locks when called with no args
|
|
39
|
-
|
|
40
36
|
// Built-in tools
|
|
41
37
|
list_sessions({ project: "current", since: "today", limit: 5 });
|
|
42
38
|
```
|
|
@@ -114,11 +110,11 @@ TASK OVERVIEW
|
|
|
114
110
|
|
|
115
111
|
IN PROGRESS
|
|
116
112
|
━━━━━━━━━━━
|
|
117
|
-
ID │ Priority │ Title │
|
|
113
|
+
ID │ Priority │ Title │ Assignee │ Age
|
|
118
114
|
─────────┼──────────┼──────────────────────────┼──────────┼────────
|
|
119
|
-
bd-abc12 │ P0 │ Fix auth regression │
|
|
120
|
-
bd-def34 │ P1 │ Add user dashboard │
|
|
121
|
-
bd-ghi56 │ P2 │ Refactor logging │
|
|
115
|
+
bd-abc12 │ P0 │ Fix auth regression │ user │ 2h
|
|
116
|
+
bd-def34 │ P1 │ Add user dashboard │ user │ 1d
|
|
117
|
+
bd-ghi56 │ P2 │ Refactor logging │ user │ 3h
|
|
122
118
|
|
|
123
119
|
|
|
124
120
|
READY TO START
|
|
@@ -130,35 +126,6 @@ bd-xyz22 │ P2 │ Update API docs │ -
|
|
|
130
126
|
bd-xyz33 │ P2 │ Add analytics │ bd-abc12
|
|
131
127
|
|
|
132
128
|
|
|
133
|
-
MESSAGES
|
|
134
|
-
━━━━━━━━
|
|
135
|
-
[If unread messages exist:]
|
|
136
|
-
📬 3 unread messages
|
|
137
|
-
|
|
138
|
-
From │ Subject │ Time
|
|
139
|
-
────────────┼──────────────────────────────────┼────────
|
|
140
|
-
build-1 │ Need API spec for dashboard │ 2h ago
|
|
141
|
-
review │ Tests failing on staging │ 4h ago
|
|
142
|
-
build-2 │ Migration complete │ 1d ago
|
|
143
|
-
|
|
144
|
-
[If no messages:]
|
|
145
|
-
📭 No unread messages
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
FILE LOCKS
|
|
149
|
-
━━━━━━━━━━
|
|
150
|
-
[If locks exist:]
|
|
151
|
-
🔒 2 active locks
|
|
152
|
-
|
|
153
|
-
Path │ Owner │ Expires
|
|
154
|
-
───────────────────────────────┼───────────┼─────────
|
|
155
|
-
src/auth/service.ts │ build │ 8m
|
|
156
|
-
src/components/Dashboard.tsx │ build │ 15m
|
|
157
|
-
|
|
158
|
-
[If no locks:]
|
|
159
|
-
🔓 No active file locks
|
|
160
|
-
|
|
161
|
-
|
|
162
129
|
GIT STATUS
|
|
163
130
|
━━━━━━━━━━
|
|
164
131
|
Branch: feature/auth-refactor
|
|
@@ -255,7 +222,7 @@ Fri ██████████ 10
|
|
|
255
222
|
|
|
256
223
|
```typescript
|
|
257
224
|
// Check memory system status
|
|
258
|
-
|
|
225
|
+
memory_admin({ operation: "status" });
|
|
259
226
|
```
|
|
260
227
|
|
|
261
228
|
Display memory stats in dashboard:
|
|
@@ -389,7 +356,7 @@ Handle gracefully:
|
|
|
389
356
|
```
|
|
390
357
|
[If beads unavailable:]
|
|
391
358
|
⚠️ Beads database not initialized
|
|
392
|
-
Run:
|
|
359
|
+
Run: br init
|
|
393
360
|
|
|
394
361
|
[If git not available:]
|
|
395
362
|
⚠️ Not a git repository
|
|
@@ -48,7 +48,7 @@ ls .beads/artifacts/$ARGUMENTS/
|
|
|
48
48
|
Read all artifacts:
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
cat .beads/artifacts/$ARGUMENTS/
|
|
51
|
+
cat .beads/artifacts/$ARGUMENTS/prd.md 2>/dev/null
|
|
52
52
|
cat .beads/artifacts/$ARGUMENTS/plan.md 2>/dev/null
|
|
53
53
|
cat .beads/artifacts/$ARGUMENTS/research.md 2>/dev/null
|
|
54
54
|
cat .beads/artifacts/$ARGUMENTS/design.md 2>/dev/null
|
|
@@ -62,14 +62,14 @@ cat .beads/artifacts/$ARGUMENTS/design.md 2>/dev/null
|
|
|
62
62
|
|
|
63
63
|
| Artifact | Required | Status |
|
|
64
64
|
| ------------- | -------- | ------ |
|
|
65
|
-
| `
|
|
65
|
+
| `prd.md` | Yes | [ ] |
|
|
66
66
|
| `plan.md` | Yes | [ ] |
|
|
67
67
|
| `research.md` | No | [ ] |
|
|
68
68
|
| `design.md` | No | [ ] |
|
|
69
69
|
|
|
70
|
-
**Are all tasks in the
|
|
70
|
+
**Are all tasks in the PRD addressed?**
|
|
71
71
|
|
|
72
|
-
Extract tasks/criteria from
|
|
72
|
+
Extract tasks/criteria from prd.md and verify each is implemented:
|
|
73
73
|
|
|
74
74
|
```markdown
|
|
75
75
|
## Completeness Report
|
|
@@ -149,12 +149,12 @@ golangci-lint run 2>&1 | tail -10
|
|
|
149
149
|
|
|
150
150
|
Cross-reference artifacts for contradictions:
|
|
151
151
|
|
|
152
|
-
| Check | Status | Issue
|
|
153
|
-
| ---------------------------- | ------ |
|
|
154
|
-
|
|
|
155
|
-
| plan.md ↔ implementation | ✓ | Code follows plan structure
|
|
156
|
-
| research.md ↔ implementation | ⚠ | Didn't use recommended approach
|
|
157
|
-
| design.md ↔ implementation | ✓ | Follows design patterns
|
|
152
|
+
| Check | Status | Issue |
|
|
153
|
+
| ---------------------------- | ------ | ----------------------------------- |
|
|
154
|
+
| prd.md ↔ plan.md | ✓ | Plan addresses all PRD requirements |
|
|
155
|
+
| plan.md ↔ implementation | ✓ | Code follows plan structure |
|
|
156
|
+
| research.md ↔ implementation | ⚠ | Didn't use recommended approach |
|
|
157
|
+
| design.md ↔ implementation | ✓ | Follows design patterns |
|
|
158
158
|
|
|
159
159
|
**Common coherence issues:**
|
|
160
160
|
|
|
@@ -234,7 +234,7 @@ if (missingTests) {
|
|
|
234
234
|
Record verification results in bead:
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
|
|
237
|
+
br comments add $ARGUMENTS "Verification: [PASS|PARTIAL|FAIL] - [summary]"
|
|
238
238
|
```
|
|
239
239
|
|
|
240
240
|
---
|
|
@@ -1,59 +1,89 @@
|
|
|
1
1
|
---
|
|
2
|
-
purpose:
|
|
3
|
-
updated:
|
|
2
|
+
purpose: PARA-organized memory system with SQLite backing
|
|
3
|
+
updated: 2026-02-04
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Project Memory
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Multi-layer memory system combining PARA organization with SQLite + FTS5 search.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Directory Structure
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
```
|
|
13
|
+
memory/
|
|
14
|
+
├── project/ # Tacit knowledge (always-injected context)
|
|
15
|
+
│ ├── user.md # User preferences, identity
|
|
16
|
+
│ ├── tech-stack.md # Framework, dependencies, constraints
|
|
17
|
+
│ └── gotchas.md # Footguns, edge cases, warnings
|
|
18
|
+
├── knowledge/ # PARA-organized reference (curated)
|
|
19
|
+
│ ├── projects/ # Active work with deadlines
|
|
20
|
+
│ ├── areas/ # Ongoing responsibilities
|
|
21
|
+
│ ├── resources/ # Reference material
|
|
22
|
+
│ └── archives/ # Completed/inactive items
|
|
23
|
+
├── daily/ # Chronological session logs
|
|
24
|
+
├── research/ # Deep-dive analysis documents
|
|
25
|
+
├── handoffs/ # Session handoff context
|
|
26
|
+
└── _templates/ # File templates
|
|
27
|
+
```
|
|
18
28
|
|
|
19
|
-
##
|
|
29
|
+
## Memory Layers (3-Layer Architecture)
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
| Layer | Location | Purpose | Access |
|
|
32
|
+
| ------------------- | ------------- | ----------------------- | ---------------------------------- |
|
|
33
|
+
| **Knowledge Graph** | SQLite + FTS5 | Searchable observations | `memory-search()`, `observation()` |
|
|
34
|
+
| **Daily Notes** | `daily/` | Chronological narrative | Manual review |
|
|
35
|
+
| **Tacit Knowledge** | `project/` | Always-present context | Auto-injected |
|
|
22
36
|
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
purpose: How this memory should influence agent behavior
|
|
26
|
-
updated: YYYY-MM-DD
|
|
27
|
-
---
|
|
28
|
-
```
|
|
37
|
+
## SQLite Memory Tools
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
| Tool | Purpose |
|
|
40
|
+
| ------------------- | --------------------------------------------- |
|
|
41
|
+
| `observation()` | Write structured observations to SQLite |
|
|
42
|
+
| `memory-search()` | FTS5 full-text search (returns compact index) |
|
|
43
|
+
| `memory-get()` | Fetch full observation details by ID |
|
|
44
|
+
| `memory-timeline()` | Get chronological context around anchor |
|
|
45
|
+
| `memory-update()` | Update markdown files in memory |
|
|
31
46
|
|
|
32
|
-
|
|
33
|
-
- **During work**: Agents update files when learning new information
|
|
34
|
-
- **Session end**: Critical learnings persisted here survive context reset
|
|
47
|
+
## PARA Categories
|
|
35
48
|
|
|
36
|
-
|
|
49
|
+
- **Projects**: Active work with deadlines → `knowledge/projects/`
|
|
50
|
+
- **Areas**: Ongoing responsibilities → `knowledge/areas/`
|
|
51
|
+
- **Resources**: Reference material → `knowledge/resources/`
|
|
52
|
+
- **Archives**: Completed/inactive → `knowledge/archives/`
|
|
37
53
|
|
|
38
|
-
|
|
54
|
+
## Memory Tiers (Decay-based)
|
|
39
55
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
| Tier | Access Pattern | Location |
|
|
57
|
+
| -------- | -------------- | -------------------------- |
|
|
58
|
+
| **Hot** | Daily/Weekly | Active SQLite + `project/` |
|
|
59
|
+
| **Warm** | Monthly | `knowledge/` directories |
|
|
60
|
+
| **Cold** | Rarely | `knowledge/archives/` |
|
|
43
61
|
|
|
44
|
-
|
|
62
|
+
## Workflow
|
|
45
63
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
64
|
+
### Session Start
|
|
65
|
+
|
|
66
|
+
1. `memory-search()` - Find relevant context
|
|
67
|
+
2. Read `project/` files (auto-injected)
|
|
68
|
+
3. Check `daily/` for recent sessions if needed
|
|
69
|
+
|
|
70
|
+
### During Work
|
|
71
|
+
|
|
72
|
+
1. Use `observation()` for decisions, patterns, gotchas
|
|
73
|
+
2. Update `project/gotchas.md` for footguns
|
|
74
|
+
3. Add to `knowledge/` for curated reference
|
|
75
|
+
|
|
76
|
+
### Session End
|
|
77
|
+
|
|
78
|
+
1. Summary appended to `daily/YYYY-MM-DD.md`
|
|
79
|
+
2. Sync beads: `br sync --flush-only`
|
|
49
80
|
|
|
50
81
|
## Philosophy
|
|
51
82
|
|
|
52
|
-
**
|
|
83
|
+
**Three-layer memory beats single-layer:**
|
|
53
84
|
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
- Architecture insights → Update `architecture.md`
|
|
85
|
+
- SQLite for searchability (Knowledge Graph)
|
|
86
|
+
- Daily notes for context (Chronological)
|
|
87
|
+
- Project files for presence (Tacit Knowledge)
|
|
58
88
|
|
|
59
|
-
|
|
89
|
+
Each layer serves a different retrieval pattern.
|
|
@@ -1,12 +1,37 @@
|
|
|
1
1
|
# Beads PRD Template
|
|
2
2
|
|
|
3
|
-
**Bead:** bd-[id]
|
|
4
|
-
**Created:** [date]
|
|
5
|
-
**Status:** Draft
|
|
3
|
+
**Bead:** bd-[id]
|
|
4
|
+
**Created:** [date]
|
|
5
|
+
**Status:** Draft | In Review | Approved
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Bead Metadata
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```yaml
|
|
10
|
+
depends_on: [] # Bead IDs that must complete before this one
|
|
11
|
+
parallel: true # Can run concurrently with other parallel beads
|
|
12
|
+
conflicts_with: [] # Bead IDs that modify same files (cannot parallelize)
|
|
13
|
+
blocks: [] # Bead IDs waiting on this one
|
|
14
|
+
estimated_hours: 2 # Time estimate for planning
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Problem Statement
|
|
20
|
+
|
|
21
|
+
### What problem are we solving?
|
|
22
|
+
|
|
23
|
+
[Clear description of the problem. Include user impact and business impact.]
|
|
24
|
+
|
|
25
|
+
### Why now?
|
|
26
|
+
|
|
27
|
+
[What triggered this work? Cost of inaction?]
|
|
28
|
+
|
|
29
|
+
### Who is affected?
|
|
30
|
+
|
|
31
|
+
- **Primary users:** [Description]
|
|
32
|
+
- **Secondary users:** [Description]
|
|
33
|
+
|
|
34
|
+
---
|
|
10
35
|
|
|
11
36
|
## Scope
|
|
12
37
|
|
|
@@ -17,20 +42,55 @@ What exactly are we building and why does it exist?
|
|
|
17
42
|
### Out-of-Scope
|
|
18
43
|
|
|
19
44
|
- [List what's explicitly off-limits]
|
|
45
|
+
- [Deferred to future iterations]
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Proposed Solution
|
|
50
|
+
|
|
51
|
+
### Overview
|
|
52
|
+
|
|
53
|
+
[One paragraph describing what this feature does when complete.]
|
|
20
54
|
|
|
21
|
-
|
|
55
|
+
### User Flow (if user-facing)
|
|
22
56
|
|
|
23
57
|
1. [Step 1]
|
|
24
58
|
2. [Step 2]
|
|
25
59
|
3. [Step 3]
|
|
26
60
|
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Requirements
|
|
64
|
+
|
|
65
|
+
### Functional Requirements
|
|
66
|
+
|
|
67
|
+
#### [Requirement Name]
|
|
68
|
+
|
|
69
|
+
Brief description of what must be true.
|
|
70
|
+
|
|
71
|
+
**Scenarios:**
|
|
72
|
+
|
|
73
|
+
- **WHEN** [precondition or trigger] **THEN** [expected outcome]
|
|
74
|
+
- **WHEN** [edge case condition] **THEN** [expected behavior]
|
|
75
|
+
|
|
76
|
+
### Non-Functional Requirements
|
|
77
|
+
|
|
78
|
+
- **Performance:** [constraint if applicable]
|
|
79
|
+
- **Security:** [constraint if applicable]
|
|
80
|
+
- **Accessibility:** [WCAG level if applicable]
|
|
81
|
+
- **Compatibility:** [constraint if applicable]
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
27
85
|
## Success Criteria
|
|
28
86
|
|
|
29
|
-
- [ ] [Specific, measurable
|
|
87
|
+
- [ ] [Specific, measurable criterion 1]
|
|
30
88
|
- Verify: `[command or manual check]`
|
|
31
|
-
- [ ] [Specific, measurable
|
|
89
|
+
- [ ] [Specific, measurable criterion 2]
|
|
32
90
|
- Verify: `[command or manual check]`
|
|
33
91
|
|
|
92
|
+
---
|
|
93
|
+
|
|
34
94
|
## Technical Context
|
|
35
95
|
|
|
36
96
|
### Existing Patterns
|
|
@@ -41,26 +101,44 @@ What exactly are we building and why does it exist?
|
|
|
41
101
|
|
|
42
102
|
- `src/relevant/file.ts` - Why relevant
|
|
43
103
|
|
|
44
|
-
|
|
104
|
+
### Affected Files
|
|
45
105
|
|
|
46
|
-
|
|
106
|
+
Files this bead will modify (for conflict detection):
|
|
47
107
|
|
|
48
|
-
|
|
108
|
+
```yaml
|
|
109
|
+
files:
|
|
110
|
+
- src/path/to/file.ts # Why
|
|
111
|
+
- src/path/to/other.ts # Why
|
|
112
|
+
```
|
|
49
113
|
|
|
50
|
-
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Risks & Mitigations
|
|
117
|
+
|
|
118
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
119
|
+
| ------ | ------------ | ------------ | --------------- |
|
|
120
|
+
| Risk 1 | High/Med/Low | High/Med/Low | How to mitigate |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Open Questions
|
|
125
|
+
|
|
126
|
+
| Question | Owner | Due Date | Status |
|
|
127
|
+
| ---------- | ----- | -------- | ------------- |
|
|
128
|
+
| Question 1 | Name | Date | Open/Resolved |
|
|
51
129
|
|
|
52
130
|
---
|
|
53
131
|
|
|
54
132
|
## Tasks
|
|
55
133
|
|
|
56
|
-
Write tasks in a machine-convertible format for `prd-task
|
|
134
|
+
Write tasks in a machine-convertible format for `prd-task` skill.
|
|
57
135
|
|
|
58
|
-
Rules
|
|
136
|
+
**Rules:**
|
|
59
137
|
|
|
60
|
-
- Each task is a `### <Title> [category]` heading
|
|
61
|
-
- Provide one sentence describing the end state
|
|
62
|
-
- Include `**
|
|
63
|
-
- Include `**
|
|
138
|
+
- Each task is a `### <Title> [category]` heading
|
|
139
|
+
- Provide one sentence describing the end state
|
|
140
|
+
- Include `**Metadata:**` with dependency info
|
|
141
|
+
- Include `**Verification:**` with bullet steps proving it works
|
|
64
142
|
|
|
65
143
|
### <Task Title> [category]
|
|
66
144
|
|
|
@@ -106,3 +184,9 @@ files: []
|
|
|
106
184
|
| `parallel` | Can run concurrently with other parallel tasks | `true` / `false` |
|
|
107
185
|
| `conflicts_with` | Cannot run in parallel (same files) | `["Update config"]` |
|
|
108
186
|
| `files` | Files this task modifies (for conflict detection) | `["src/db/schema.ts", "src/db/client.ts"]` |
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Notes
|
|
191
|
+
|
|
192
|
+
[Additional context, constraints, or decisions]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
purpose: Footguns, edge cases, and warnings discovered during development
|
|
3
|
+
updated: 2026-02-04
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Gotchas
|
|
7
|
+
|
|
8
|
+
Track unexpected behaviors, edge cases, and warnings here. Update when you hit something surprising.
|
|
9
|
+
|
|
10
|
+
## OpenCode Config
|
|
11
|
+
|
|
12
|
+
- **`compaction` key invalid**: Not in official schema at opencode.ai/config.json. Remove if present.
|
|
13
|
+
- **`experimental` key invalid**: Not in schema. Remove if present.
|
|
14
|
+
- **`tools` key invalid**: Not in schema. Remove if present.
|
|
15
|
+
- **`formatter` valid but undocumented**: Works but missing from schema (schema incomplete).
|
|
16
|
+
|
|
17
|
+
## Memory System
|
|
18
|
+
|
|
19
|
+
- Subagents (explore, scout, review) should NOT write to memory - only leader agents
|
|
20
|
+
- Use `observation: false` and `memory-update: false` in agent configs to enforce
|
|
21
|
+
|
|
22
|
+
## Build System
|
|
23
|
+
|
|
24
|
+
- `dist/` is generated - never edit directly
|
|
25
|
+
- Build copies `.opencode/` to `dist/template/` via rsync
|
|
26
|
+
- Run `npm run build` to regenerate
|
|
27
|
+
|
|
28
|
+
## Beads
|
|
29
|
+
|
|
30
|
+
- Only leader agents (build, plan) should modify beads state
|
|
31
|
+
- Subagents read with `br show <id>`, report findings back
|
|
Binary file
|
|
Binary file
|