opencodekit 0.19.4 → 0.19.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.
Files changed (34) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/agent/vision.md +5 -5
  3. package/dist/template/.opencode/command/compound.md +4 -3
  4. package/dist/template/.opencode/command/create.md +6 -11
  5. package/dist/template/.opencode/command/design.md +3 -3
  6. package/dist/template/.opencode/command/handoff.md +4 -2
  7. package/dist/template/.opencode/command/init-context.md +79 -55
  8. package/dist/template/.opencode/command/init-user.md +11 -6
  9. package/dist/template/.opencode/command/init.md +1 -3
  10. package/dist/template/.opencode/command/lfg.md +4 -2
  11. package/dist/template/.opencode/command/plan.md +9 -9
  12. package/dist/template/.opencode/command/pr.md +5 -1
  13. package/dist/template/.opencode/command/resume.md +4 -4
  14. package/dist/template/.opencode/command/review-codebase.md +4 -4
  15. package/dist/template/.opencode/command/ship.md +5 -7
  16. package/dist/template/.opencode/command/start.md +8 -10
  17. package/dist/template/.opencode/command/status.md +1 -1
  18. package/dist/template/.opencode/command/ui-slop-check.md +6 -6
  19. package/dist/template/.opencode/command/verify.md +4 -4
  20. package/dist/template/.opencode/dcp-prompts/defaults/compress-message.md +11 -12
  21. package/dist/template/.opencode/dcp-prompts/defaults/compress-range.md +1 -1
  22. package/dist/template/.opencode/dcp-prompts/defaults/context-limit-nudge.md +3 -9
  23. package/dist/template/.opencode/dcp-prompts/defaults/iteration-nudge.md +0 -2
  24. package/dist/template/.opencode/dcp-prompts/defaults/system.md +0 -13
  25. package/dist/template/.opencode/dcp-prompts/defaults/turn-nudge.md +1 -2
  26. package/dist/template/.opencode/dcp.jsonc +9 -3
  27. package/dist/template/.opencode/memory.db +0 -0
  28. package/dist/template/.opencode/memory.db-shm +0 -0
  29. package/dist/template/.opencode/memory.db-wal +0 -0
  30. package/dist/template/.opencode/opencode.json +6 -14
  31. package/dist/template/.opencode/skill/context-initialization/SKILL.md +16 -17
  32. package/dist/template/.opencode/skill/pencil/SKILL.md +36 -32
  33. package/dist/template/.opencode/skill/tilth-cli/SKILL.md +47 -20
  34. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
20
20
 
21
21
  //#endregion
22
22
  //#region package.json
23
- var version = "0.19.4";
23
+ var version = "0.19.6";
24
24
 
25
25
  //#endregion
26
26
  //#region src/utils/license.ts
@@ -71,7 +71,7 @@ Route by need:
71
71
  | Mockup-to-implementation mapping | `mockup-to-code` |
72
72
  | Distinctive UI direction / anti-slop guidance | `frontend-design` |
73
73
  | Figma design data (read/write via MCP) | `figma-go` |
74
- | Pencil design-as-code workflow | `pencil` |
74
+ | OpenPencil design-as-code workflow | `pencil` |
75
75
  | Brand identity extraction from URLs | `webclaw` |
76
76
 
77
77
  ### Taste-Skill Variants (installed)
@@ -108,12 +108,12 @@ If Figma is available, request MCP access via `figma-go` and ground feedback in
108
108
  2. Use `figma-go` to pull `get_design_context` or `get_node`
109
109
  3. Reference node IDs in findings for traceability
110
110
 
111
- ## Pencil-First Workflow (when no Figma)
111
+ ## OpenPencil Workflow (when no Figma)
112
112
 
113
- If design must be created or iterated quickly, use Pencil:
113
+ If design must be created or iterated quickly, use OpenPencil via the legacy `pencil` skill:
114
114
 
115
- 1. Create/modify `.pen` via Pencil CLI
116
- 2. Export PNGs for review
115
+ 1. Create/modify `.op` via `op` CLI
116
+ 2. Export PNGs or code for review
117
117
  3. Provide audit with node-level critique where possible
118
118
 
119
119
  ## Brand Extraction Workflow (when auditing existing sites)
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  description: Extract and persist learnings from completed work into institutional memory
3
3
  argument-hint: "[bead-id]"
4
+ agent: build
4
5
  ---
5
6
 
6
7
  # Compound: $ARGUMENTS
@@ -19,9 +20,9 @@ so future Plan and Ship cycles start with institutional knowledge instead of bla
19
20
  ## Phase 1: Gather Evidence
20
21
 
21
22
  ```bash
22
- # Get what changed
23
- git diff origin/main..HEAD --stat
24
- git log origin/main..HEAD --oneline
23
+ # Get what changed (falls back gracefully if no remote)
24
+ git diff origin/main..HEAD --stat 2>/dev/null || git diff HEAD~5..HEAD --stat
25
+ git log origin/main..HEAD --oneline 2>/dev/null || git log --oneline -10
25
26
 
26
27
  # Get review comments if any
27
28
  br comments list $ARGUMENTS 2>/dev/null || echo "No bead"
@@ -10,7 +10,7 @@ Create a bead and its specification (PRD) from a description.
10
10
 
11
11
  > **Workflow:** **`/create`** → `/start <id>` → `/ship <id>`
12
12
  >
13
- > This command creates the specification ONLY. Do NOT write any implementation code.
13
+ > This command creates the specification ONLY. Do NOT write any implementation code.
14
14
 
15
15
  ## Load Skills
16
16
 
@@ -133,24 +133,19 @@ Extract bead title and description from `$ARGUMENTS` before creating the bead.
133
133
  - If user provided multiple lines, use first line as title and full text as description.
134
134
 
135
135
  ```bash
136
- TITLE=$(echo "$ARGUMENTS" | head -n1)
137
- DESCRIPTION=$(echo "$ARGUMENTS")
138
-
139
- if [ "$TITLE" = "$DESCRIPTION" ]; then
140
- DESCRIPTION="$TITLE"
141
- fi
142
-
143
136
  BEAD_ID=$(br create --title "$TITLE" --description "$DESCRIPTION" --type $BEAD_TYPE --json | jq -r '.id')
144
137
  mkdir -p ".beads/artifacts/$BEAD_ID"
145
138
  ```
146
139
 
140
+ Extract title and description from `$ARGUMENTS`:
141
+ - Single line input: use as both title and description
142
+ - Multi-line input: first line as title, full text as description
143
+
147
144
  ## Phase 6: Write PRD
148
145
 
149
146
  Copy and fill the PRD template using context from Phase 3:
150
147
 
151
- ```bash
152
- cp .opencode/memory/_templates/prd.md ".beads/artifacts/$BEAD_ID/prd.md"
153
- ```
148
+ Read the PRD template from `.opencode/memory/_templates/prd.md` and write it to `.beads/artifacts/$BEAD_ID/prd.md`.
154
149
 
155
150
  ### Required Sections
156
151
 
@@ -32,9 +32,9 @@ skill({ name: "frontend-design" }); // Design system guidance, anti-patterns, re
32
32
  ## Phase 1: Detect Existing Design System
33
33
 
34
34
  ```typescript
35
- glob({ pattern: "**/tailwind.config.{js,ts,mjs}" });
36
- glob({ pattern: "**/globals.css" });
37
- glob({ pattern: "**/components.json" }); // shadcn
35
+ tilth_tilth_files({ pattern: "**/tailwind.config.{js,ts,mjs}" });
36
+ tilth_tilth_files({ pattern: "**/globals.css" });
37
+ tilth_tilth_files({ pattern: "**/components.json" }); // shadcn
38
38
  ```
39
39
 
40
40
  Read what exists. Don't design in a vacuum — build on the project's current system.
@@ -33,7 +33,7 @@ br show $ARGUMENTS
33
33
  git status --porcelain
34
34
  git branch --show-current
35
35
  git rev-parse --short HEAD
36
- ls .beads/artifacts/$ARGUMENTS/ 2>/dev/null
36
+ Read `.beads/artifacts/$ARGUMENTS/` to check existing artifacts.
37
37
  ```
38
38
 
39
39
  ---
@@ -60,10 +60,12 @@ question({
60
60
  If user chooses commit:
61
61
 
62
62
  ```bash
63
- git add -A
63
+ git add <specific-files-you-modified>
64
64
  git commit -m "WIP: $ARGUMENTS - [brief description of where you stopped]"
65
65
  ```
66
66
 
67
+ **Never use `git add -A` or `git add .`** — stage only the files you modified.
68
+
67
69
  ---
68
70
 
69
71
  ## Phase 3: Write Handoff
@@ -1,14 +1,26 @@
1
1
  ---
2
- description: Initialize GSD-style project planning context with integrated skill usage
2
+ description: Initialize project planning context (roadmap, state) with optional brownfield analysis
3
3
  argument-hint: "[--skip-questions] [--brownfield]"
4
4
  agent: build
5
5
  ---
6
6
 
7
7
  # Init-Context: $ARGUMENTS
8
8
 
9
- Initialize GSD-style project planning with integrated skill usage.
9
+ Initialize project planning context files from templates.
10
10
 
11
- `tech-stack.md` is the default baseline project memory file. This command adds the optional planning files (`project.md`, `roadmap.md`, `state.md`) used for richer multi-session project context.
11
+ ## Architecture
12
+
13
+ **Auto-injected files** (always loaded into every prompt via `instructions[]`):
14
+ - `user.md` — identity, preferences
15
+ - `tech-stack.md` — framework, constraints
16
+ - `project.md` — vision, success criteria, principles
17
+ - `git-context.md` — spatial awareness
18
+
19
+ **On-demand files** (created by this command, loaded via `memory-read` when needed):
20
+ - `roadmap.md` — phases, milestones, bead planning
21
+ - `state.md` — current position, blockers, next actions
22
+
23
+ > **Warning:** Do NOT add roadmap.md or state.md to `instructions[]`. Per-prompt injection of too many files causes session OOM crashes. Use `memory-read({ file: "project/roadmap" })` or `memory-read({ file: "project/state" })` when needed.
12
24
 
13
25
  ## Load Skills
14
26
 
@@ -32,18 +44,20 @@ const args = {
32
44
 
33
45
  ### 1.1 Check Existing Context
34
46
 
35
- ```bash
36
- ls .opencode/memory/project/ 2>/dev/null && HAS_CONTEXT=true || HAS_CONTEXT=false
37
- cat .opencode/memory/project/project.md 2>/dev/null | head -20
47
+ Use tilth or Read to check for existing files:
48
+
49
+ ```typescript
50
+ tilth_tilth_files({ pattern: "*.md", scope: ".opencode/memory/project" });
51
+ // Or: Read({ filePath: ".opencode/memory/project/project.md", limit: 20 });
38
52
  ```
39
53
 
40
54
  **If planning context exists:**
41
55
 
42
56
  ```
43
- Existing optional planning context found:
44
- - project.md: [exists/size]
45
- - roadmap.md: [exists/size]
46
- - state.md: [exists/size]
57
+ Existing planning context found:
58
+ - project.md: [exists/size] (auto-injected)
59
+ - roadmap.md: [exists/size] (on-demand)
60
+ - state.md: [exists/size] (on-demand)
47
61
 
48
62
  Options:
49
63
  1. Refresh - Delete and recreate from templates
@@ -58,11 +72,10 @@ Wait for user selection.
58
72
  If `--brownfield` flag is set:
59
73
 
60
74
  ```typescript
61
- // Spawn parallel analysis agents (like GSD map-codebase)
62
75
  skill({ name: "swarm-coordination" });
63
76
 
64
77
  // Agent 1: Map tech stack
65
- Task({
78
+ task({
66
79
  subagent_type: "explore",
67
80
  description: "Analyze tech stack",
68
81
  prompt:
@@ -70,7 +83,7 @@ Task({
70
83
  });
71
84
 
72
85
  // Agent 2: Map architecture
73
- Task({
86
+ task({
74
87
  subagent_type: "explore",
75
88
  description: "Analyze architecture",
76
89
  prompt:
@@ -82,12 +95,11 @@ Task({
82
95
 
83
96
  ## Phase 2: Requirements Gathering
84
97
 
85
- ### 2.1 Load Brainstorming Skill (if not --skip-questions)
98
+ ### 2.1 Brainstorming (if not --skip-questions)
86
99
 
87
100
  ```typescript
88
101
  if (!args.skipQuestions) {
89
- skill({ name: "brainstorming" });
90
-
102
+ // brainstorming skill already loaded in Load Skills phase
91
103
  // Follow brainstorming process for project vision
92
104
  // Ask questions one at a time (as per brainstorming skill)
93
105
  // Output: Refined vision, success criteria, target users
@@ -106,12 +118,14 @@ Use template defaults with placeholders for:
106
118
 
107
119
  ## Phase 3: Document Creation
108
120
 
109
- ### 3.1 Create project.md
121
+ ### 3.1 Update project.md (auto-injected)
122
+
123
+ This file is auto-injected into every prompt. Keep it concise.
110
124
 
111
125
  **Load template:**
112
126
 
113
- ```bash
114
- cat .opencode/memory/_templates/project.md
127
+ ```typescript
128
+ Read({ filePath: ".opencode/memory/_templates/project.md" });
115
129
  ```
116
130
 
117
131
  **Fill with gathered data:**
@@ -122,9 +136,15 @@ cat .opencode/memory/_templates/project.md
122
136
  - Core principles (convention over config, minimal, extensible)
123
137
  - Current phase (from user input or template default)
124
138
 
125
- **Write to:** `.opencode/memory/project/project.md`
139
+ **Write using memory tools:**
140
+
141
+ ```typescript
142
+ memory-update({ file: "project/project", content: filledContent, mode: "replace" });
143
+ ```
144
+
145
+ ### 3.2 Create roadmap.md (on-demand)
126
146
 
127
- ### 3.2 Create roadmap.md
147
+ This file is NOT auto-injected. Access via `memory-read({ file: "project/roadmap" })`.
128
148
 
129
149
  **Parse phases from input:**
130
150
 
@@ -141,9 +161,15 @@ cat .opencode/memory/_templates/project.md
141
161
  | [Phase 1] | [Goal] | [Status] | [#] |
142
162
  ```
143
163
 
144
- **Write to:** `.opencode/memory/project/roadmap.md`
164
+ **Write using memory tools:**
145
165
 
146
- ### 3.3 Create state.md
166
+ ```typescript
167
+ memory-update({ file: "project/roadmap", content: roadmapContent, mode: "replace" });
168
+ ```
169
+
170
+ ### 3.3 Create state.md (on-demand)
171
+
172
+ This file is NOT auto-injected. Access via `memory-read({ file: "project/state" })`.
147
173
 
148
174
  **Initialize with:**
149
175
 
@@ -157,7 +183,11 @@ cat .opencode/memory/_templates/project.md
157
183
  - Open Questions: (empty table)
158
184
  - Next Actions: (empty list)
159
185
 
160
- **Write to:** `.opencode/memory/project/state.md`
186
+ **Write using memory tools:**
187
+
188
+ ```typescript
189
+ memory-update({ file: "project/state", content: stateContent, mode: "replace" });
190
+ ```
161
191
 
162
192
  ### 3.4 Brownfield Analysis Integration (if applicable)
163
193
 
@@ -166,16 +196,18 @@ If `--brownfield` analysis was run:
166
196
  ```typescript
167
197
  // Append tech/arch findings to project.md Context Notes section
168
198
  // Or create separate .opencode/memory/project/codebase/ documents
169
- // (similar to GSD's .planning/codebase/ approach)
170
199
  ```
171
200
 
172
201
  ## Phase 4: Verification & Security
173
202
 
174
203
  ### 4.1 Verify Documents Created
175
204
 
176
- ```bash
177
- ls -la .opencode/memory/project/
178
- wc -l .opencode/memory/project/*.md
205
+ ```typescript
206
+ tilth_tilth_files({ pattern: "*.md", scope: ".opencode/memory/project" });
207
+ // Verify each file exists and has content
208
+ Read({ filePath: ".opencode/memory/project/project.md", limit: 5 });
209
+ Read({ filePath: ".opencode/memory/project/roadmap.md", limit: 5 });
210
+ Read({ filePath: ".opencode/memory/project/state.md", limit: 5 });
179
211
  ```
180
212
 
181
213
  **Check:**
@@ -185,20 +217,19 @@ wc -l .opencode/memory/project/*.md
185
217
  - [ ] state.md exists and >20 lines
186
218
  - [ ] All files are readable
187
219
 
188
- ### 4.2 Secret Scan (Critical - from GSD pattern)
220
+ ### 4.2 Secret Scan
189
221
 
190
222
  ```bash
191
223
  # Scan for accidentally leaked secrets in generated docs
192
- grep -E '(sk-[a-zA-Z0-9]{20,}|sk_live_[a-zA-Z0-9]+|AKIA[A-Z0-9]{16}|ghp_[a-zA-Z0-9]{36}|-----BEGIN.*PRIVATE KEY)' .opencode/memory/project/*.md 2>/dev/null && SECRETS_FOUND=true || SECRETS_FOUND=false
224
+ grep -rE '(sk-[a-zA-Z0-9]{20,}|sk_live_[a-zA-Z0-9]+|AKIA[A-Z0-9]{16}|ghp_[a-zA-Z0-9]{36}|xoxb-[a-zA-Z0-9-]+|-----BEGIN.*PRIVATE KEY)' .opencode/memory/project/*.md 2>/dev/null && SECRETS_FOUND=true || SECRETS_FOUND=false
193
225
  ```
194
226
 
195
227
  **If secrets found:** Alert user and pause before proceeding.
196
228
 
197
- ### 4.3 Load Verification Skill
229
+ ### 4.3 Run Verification
198
230
 
199
231
  ```typescript
200
- skill({ name: "verification-before-completion" });
201
-
232
+ // verification-before-completion skill already loaded
202
233
  // Run verification checklist:
203
234
  // 1. IDENTIFY: Files created, structure valid
204
235
  // 2. RUN: Validation commands
@@ -207,25 +238,15 @@ skill({ name: "verification-before-completion" });
207
238
  // 5. CLAIM: Context initialization complete
208
239
  ```
209
240
 
210
- ## Phase 5: Beads Integration
211
-
212
- ### 5.1 Create Initialization Bead (optional)
213
-
214
- ```bash
215
- # If user wants to track context setup as a bead
216
- br create "Initialize project context" --type=task
217
- br update <bead-id> --status closed --reason="Context files created"
218
- ```
219
-
220
241
  ## Output
221
242
 
222
- Creates optional planning context in `.opencode/memory/project/`:
243
+ Creates planning context in `.opencode/memory/project/`:
223
244
 
224
- | File | Purpose | Lines (typical) |
225
- | ------------ | ---------------------------------------- | --------------- |
226
- | `project.md` | Vision, success criteria, principles | 50-100 |
227
- | `roadmap.md` | Phases, milestones, bead planning | 80-150 |
228
- | `state.md` | Current position, blockers, next actions | 60-100 |
245
+ | File | Purpose | Injection | Access |
246
+ | ------------ | ---------------------------------------- | ----------- | -------------------------------------------- |
247
+ | `project.md` | Vision, success criteria, principles | Auto-injected | Updated in-place (already in `instructions[]`) |
248
+ | `roadmap.md` | Phases, milestones, bead planning | On-demand | `memory-read({ file: "project/roadmap" })` |
249
+ | `state.md` | Current position, blockers, next actions | On-demand | `memory-read({ file: "project/state" })` |
229
250
 
230
251
  **If `--brownfield`:**
231
252
  Additional files in `.opencode/memory/project/codebase/`:
@@ -235,21 +256,24 @@ Additional files in `.opencode/memory/project/codebase/`:
235
256
 
236
257
  ## Success Criteria
237
258
 
238
- - [ ] All `/init-context` planning documents created from templates
259
+ - [ ] All planning documents created from templates
239
260
  - [ ] Documents follow template structure
240
261
  - [ ] No secrets leaked in generated files
241
262
  - [ ] Files pass basic validation (readable, non-empty)
242
- - [ ] User informed of next steps
263
+ - [ ] User informed of next steps and access patterns
243
264
 
244
- ## Phase 6: Custom Context (Optional)
265
+ ## Custom Context (Optional)
245
266
 
246
267
  Inform user about `.opencode/context/` for additional project-specific context:
247
268
 
248
269
  ```
249
270
  Custom context folder available at .opencode/context/
250
271
  - Add .md files with architecture decisions, domain knowledge, team agreements
251
- - Add file paths to opencode.json → instructions[] for AI prompt injection
252
272
  - This folder is preserved during init --force and upgrade
273
+
274
+ ⚠️ Only add files to instructions[] if they are essential for EVERY prompt.
275
+ Per-prompt injection adds ~2-4KB each. Too many files cause session OOM.
276
+ Prefer memory-read() for on-demand access instead.
253
277
  ```
254
278
 
255
279
  ## Next Steps
@@ -259,7 +283,7 @@ After init-context completes:
259
283
  1. **For new projects:** Use `/plan` to create first implementation plan
260
284
  2. **For brownfield:** Review codebase analysis, then `/plan`
261
285
  3. **For existing beads:** Use `/resume` to continue tracked work
262
- 4. **For custom context:** Add `.md` files to `.opencode/context/` and reference in `opencode.json` instructions
286
+ 4. **For custom context:** Add `.md` files to `.opencode/context/` (on-demand via Read, not auto-injected)
263
287
 
264
288
  ---
265
289
 
@@ -267,7 +291,7 @@ After init-context completes:
267
291
 
268
292
  | Skill | When Used | Purpose |
269
293
  | -------------------------------- | --------------------------------- | ------------------------------ |
294
+ | `context-initialization` | Phase 1 | Template verification |
270
295
  | `brainstorming` | Phase 2 (if not --skip-questions) | Refine vision and requirements |
271
296
  | `swarm-coordination` | Phase 1.2 (if --brownfield) | Parallel codebase analysis |
272
297
  | `verification-before-completion` | Phase 4 | Validate created files |
273
- | `beads` | Phase 5 | Track as bead if desired |
@@ -83,23 +83,28 @@ updated: [today]
83
83
 
84
84
  Ensure `user.md` is loaded in `instructions` (bare paths, no `file://` prefix).
85
85
 
86
- `tech-stack.md` is the core project memory file. Other files such as `project.md`, `roadmap.md`, `state.md`, and `gotchas.md` are optional/project-specific and should only be added if they actually exist and you want them injected.
87
-
88
- Example minimal setup:
86
+ The default `instructions[]` includes 4 auto-injected files:
89
87
 
90
88
  ```json
91
89
  {
92
- "instructions": [".opencode/memory/project/user.md", ".opencode/memory/project/tech-stack.md"]
90
+ "instructions": [
91
+ ".opencode/memory/project/user.md",
92
+ ".opencode/memory/project/tech-stack.md",
93
+ ".opencode/memory/project/project.md",
94
+ ".opencode/context/git-context.md"
95
+ ]
93
96
  }
94
97
  ```
95
98
 
99
+ > **Warning:** Do not add more files to `instructions[]` unless they are essential for every prompt. Per-prompt injection of too many files causes session OOM crashes. Use `memory-read()` for on-demand access instead.
100
+
96
101
  ## Phase 4: Report
97
102
 
98
103
  Output:
99
104
 
100
105
  1. user.md created at `.opencode/memory/project/user.md`
101
106
  2. Preferences captured
102
- 3. `tech-stack.md` is the only required project memory file by default
103
- 4. Additional project memory files are optional and can be added later
107
+ 3. 4 files are auto-injected by default: user.md, tech-stack.md, project.md, git-context.md
108
+ 4. Additional planning files (roadmap.md, state.md) are on-demand via `/init-context`
104
109
  5. Custom context available at `.opencode/context/` (preserved during init --force and upgrade)
105
110
  6. Next step: `/init-context` if the user wants fuller project-planning memory files
@@ -74,9 +74,7 @@ Create `./AGENTS.md` — **target <60 lines** (max 150). Follow the `index-knowl
74
74
 
75
75
  From template `.opencode/memory/_templates/tech-stack.md`:
76
76
 
77
- ```bash
78
- cp .opencode/memory/_templates/tech-stack.md .opencode/memory/project/tech-stack.md
79
- ```
77
+ Read the template from `.opencode/memory/_templates/tech-stack.md` and write it to `.opencode/memory/project/tech-stack.md`.
80
78
 
81
79
  Fill detected values:
82
80
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  description: Full autonomous chain - Plan → Ship → Review → Compound in one command
3
3
  argument-hint: "<bead-id> [--skip-plan]"
4
+ agent: build
4
5
  ---
5
6
 
6
7
  # LFG (Let's Fucking Go): $ARGUMENTS
@@ -22,9 +23,10 @@ Full compound engineering cycle. One command, all four steps.
22
23
 
23
24
  ```bash
24
25
  br show $BEAD_ID
25
- ls .beads/artifacts/$BEAD_ID/
26
26
  ```
27
27
 
28
+ Read `.beads/artifacts/$BEAD_ID/` to check what artifacts exist.
29
+
28
30
  Verify:
29
31
 
30
32
  - Bead exists and is `in_progress`
@@ -73,7 +75,7 @@ Checkpoint only at `checkpoint:human-verify` or `checkpoint:decision` tasks.
73
75
  ## Step 3: REVIEW
74
76
 
75
77
  ```bash
76
- BASE_SHA=$(git rev-parse origin/main 2>/dev/null || git rev-parse HEAD~$(git log --oneline | wc -l | tr -d ' '))
78
+ BASE_SHA=$(git rev-parse origin/main 2>/dev/null || git merge-base HEAD origin/main)
77
79
  HEAD_SHA=$(git rev-parse HEAD)
78
80
  ```
79
81
 
@@ -10,7 +10,7 @@ Create a detailed implementation plan with TDD steps. Optional deep-planning bet
10
10
 
11
11
  > **Workflow:** `/create` → `/start <id>` → **`/plan <id>`** (optional) → `/ship <id>`
12
12
  >
13
- > Bead MUST be `in_progress` with `prd.md`. Use `/start` first.
13
+ > Bead MUST be `in_progress` with `prd.md`. Use `/start` first.
14
14
  >
15
15
  > **When to use:** Complex tasks where PRD verification steps aren't enough guidance. Skip for simple tasks.
16
16
 
@@ -97,9 +97,10 @@ task({
97
97
 
98
98
  ```bash
99
99
  br show $ARGUMENTS
100
- ls .beads/artifacts/$ARGUMENTS/
101
100
  ```
102
101
 
102
+ Read `.beads/artifacts/$ARGUMENTS/` to check what artifacts exist.
103
+
103
104
  Verify:
104
105
 
105
106
  - Bead is `in_progress`
@@ -125,24 +126,23 @@ Before research, determine discovery level based on PRD:
125
126
  **Decision:** Ask user to confirm or adjust:
126
127
 
127
128
  ```typescript
128
- const suggestedLevel = assessDiscoveryLevel(prdContent);
129
-
130
129
  question({
131
130
  questions: [
132
131
  {
133
132
  header: "Discovery Level",
134
- question: `Suggested: Level ${suggestedLevel} (${getLevelDescription(suggestedLevel)}). Proceed?`,
133
+ question: "Suggested discovery level based on PRD complexity. Proceed?",
135
134
  options: [
136
- { label: `Yes, Level ${suggestedLevel} (Recommended)` },
137
- { label: "Lower (less research)", description: "If you know the patterns" },
138
- { label: "Higher (more research)", description: "If uncertain about approach" },
139
- { label: "Skip research", description: "I know the codebase" },
135
+ { label: "Deep (Recommended for complex work)", description: "Level 2-3: spawn scout + explore agents" },
136
+ { label: "Standard", description: "Level 1: quick doc lookup" },
137
+ { label: "Skip research", description: "Level 0: I know the codebase" },
140
138
  ],
141
139
  },
142
140
  ],
143
141
  });
144
142
  ```
145
143
 
144
+ Determine level from PRD content: Level 2+ if new library, external API, or "choose/evaluate" language. Level 3 if "architecture/design/system".
145
+
146
146
  ## Phase 3: Research (if Level 1-3)
147
147
 
148
148
  Read the PRD and extract tasks, success criteria, affected files, scope.
@@ -53,9 +53,10 @@ If bead ID provided:
53
53
 
54
54
  ```bash
55
55
  br show $ARGUMENTS
56
- ls .beads/artifacts/$ARGUMENTS/
57
56
  ```
58
57
 
58
+ Read `.beads/artifacts/$ARGUMENTS/` to check what artifacts exist.
59
+
59
60
  Read the PRD to extract goal and success criteria for the PR description.
60
61
 
61
62
  ## Phase 2B: Pre-PR Review
@@ -115,6 +116,9 @@ git push -u origin $(git branch --show-current)
115
116
  ## Phase 4: Create PR
116
117
 
117
118
  ```bash
119
+ # Verify gh CLI is installed
120
+ command -v gh >/dev/null 2>&1 || { echo "Error: gh CLI not found. Install: https://cli.github.com"; exit 1; }
121
+
118
122
  gh pr create --title "<title>" --body "$(cat <<'EOF'
119
123
  ## Summary
120
124
 
@@ -33,13 +33,13 @@ If not on the right branch, check out the feature branch. If uncommitted changes
33
33
 
34
34
  ## Phase 3: Find Handoff
35
35
 
36
- Check for handoff notes:
36
+ Check for handoff notes in the memory system:
37
37
 
38
- ```bash
39
- ls .beads/artifacts/$ARGUMENTS/handoffs/ 2>/dev/null
38
+ ```typescript
39
+ memory_read({ file: "handoffs/$ARGUMENTS" });
40
40
  ```
41
41
 
42
- If a handoff exists, read the latest one. It tells you:
42
+ If a handoff exists, it tells you:
43
43
 
44
44
  - What was completed
45
45
  - Where work stopped
@@ -37,7 +37,7 @@ skill({ name: "requesting-code-review" });
37
37
  | `explore` | Finding patterns in codebase, prior art |
38
38
  | `scout` | External research, best practices |
39
39
  | `lsp` | Finding symbol definitions, references |
40
- | `grep` | Finding code patterns |
40
+ | `tilth_tilth_search` | Finding code patterns |
41
41
  | `codesearch` | Real-world usage examples |
42
42
 
43
43
  ## Phase 1: Gather Context
@@ -66,7 +66,7 @@ If bead provided, read `.beads/artifacts/$ID/prd.md` to review against spec.
66
66
 
67
67
  If bead provided, read `.beads/artifacts/$ID/prd.md` to review against spec.
68
68
 
69
- ## Phase 2: Automated Checks
69
+ ## Phase 3: Automated Checks
70
70
 
71
71
  Detect project type and run the appropriate checks in parallel:
72
72
 
@@ -86,7 +86,7 @@ Also scan for common issues appropriate to the detected language:
86
86
  - `TODO|FIXME|HACK` markers
87
87
  - Hardcoded secrets patterns
88
88
 
89
- ## Phase 3: Manual Review
89
+ ## Phase 4: Manual Review
90
90
 
91
91
  Review each category:
92
92
 
@@ -105,7 +105,7 @@ Review each category:
105
105
  - Default: Full automated + manual review
106
106
  - `--thorough`: Deep analysis of all categories
107
107
 
108
- ## Phase 4: Report
108
+ ## Phase 5: Report
109
109
 
110
110
  Group findings by severity:
111
111