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,34 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Create a
|
|
3
|
-
argument-hint: "<description>
|
|
2
|
+
description: Create a specification with PRD, tasks, and workspace setup
|
|
3
|
+
argument-hint: "<description>"
|
|
4
4
|
agent: build
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Create: $ARGUMENTS
|
|
8
8
|
|
|
9
|
-
Create a
|
|
9
|
+
Create a specification (PRD), set up workspace, and define executable tasks — ready for `/ship`.
|
|
10
10
|
|
|
11
|
-
> **Workflow:** **`/create`** → `/ship
|
|
12
|
-
>
|
|
13
|
-
> Use `--spec-only` to create the specification without claiming or setting up workspace.
|
|
14
|
-
|
|
15
|
-
## Load Skills
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
skill({ name: "beads" });
|
|
19
|
-
skill({ name: "memory-grounding" });
|
|
20
|
-
skill({ name: "workspace-setup" });
|
|
21
|
-
skill({ name: "prd" }); // PRD template guidance
|
|
22
|
-
skill({ name: "prd-task" }); // PRD → executable tasks (Phase 8)
|
|
23
|
-
```
|
|
11
|
+
> **Workflow:** **`/create`** → `/ship`
|
|
24
12
|
|
|
25
13
|
## Parse Arguments
|
|
26
14
|
|
|
27
15
|
| Argument | Default | Description |
|
|
28
16
|
| --------------- | ------------- | ----------------------------------------- |
|
|
29
17
|
| `<description>` | required | What to build/fix (quoted string) |
|
|
30
|
-
| `--type` | auto-detected | Override: epic, feature, task, bug |
|
|
31
|
-
| `--spec-only` | false | Create spec without claiming or workspace |
|
|
32
18
|
|
|
33
19
|
## Determine Input Type
|
|
34
20
|
|
|
@@ -36,13 +22,12 @@ skill({ name: "prd-task" }); // PRD → executable tasks (Phase 8)
|
|
|
36
22
|
| ----------- | -------------------- | ----------------------------- |
|
|
37
23
|
| Quoted text | `"description here"` | Create PRD from description |
|
|
38
24
|
| Short form | Simple string | Ask for more detail if needed |
|
|
39
|
-
| `--type` | Flag provided | Use provided type |
|
|
40
25
|
|
|
41
26
|
## Before You Create
|
|
42
27
|
|
|
43
|
-
- **Be certain**: Only create
|
|
28
|
+
- **Be certain**: Only create specs you're confident have clear scope
|
|
44
29
|
- **Don't over-spec**: If the description is vague, ask clarifying questions first
|
|
45
|
-
- **Check duplicates**: Always
|
|
30
|
+
- **Check duplicates**: Always check for existing work
|
|
46
31
|
- **No implementation**: This command creates specs and workspace — don't write implementation code
|
|
47
32
|
- **Verify PRD**: Before saving, verify all sections are filled (no placeholders)
|
|
48
33
|
- **Flag uncertainty**: Use `[NEEDS CLARIFICATION]` markers for unknowns — never guess silently
|
|
@@ -53,30 +38,16 @@ skill({ name: "prd-task" }); // PRD → executable tasks (Phase 8)
|
|
|
53
38
|
| --------- | -------------------------------------------- |
|
|
54
39
|
| `explore` | Finding patterns in codebase, affected files |
|
|
55
40
|
| `scout` | External research, best practices |
|
|
56
|
-
| `br` | Creating and managing beads |
|
|
57
41
|
|
|
58
42
|
## Phase 1: Duplicate Check
|
|
59
43
|
|
|
60
44
|
### Memory Search
|
|
61
45
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
### Bead List Check
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
br list --status=open --status=in_progress
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
If a matching bead exists, stop and tell the user to use `/ship <id>` instead.
|
|
71
|
-
|
|
72
|
-
## Phase 2: Classify Type
|
|
46
|
+
Search memory for: prior decisions, similar work.
|
|
73
47
|
|
|
74
|
-
|
|
48
|
+
### Existing Work Check
|
|
75
49
|
|
|
76
|
-
|
|
77
|
-
- **feature**: New capability, scoped (add, implement, build, integrate)
|
|
78
|
-
- **bug**: Something broken (fix, error, crash, not working)
|
|
79
|
-
- **task**: Tactical change, clear scope (everything else)
|
|
50
|
+
Check `.opencode/artifacts/.active` for existing work in progress. If active slug exists with a `spec.md`, ask user if they want to continue with `/ship` instead.
|
|
80
51
|
|
|
81
52
|
## Phase 3: Choose Research Depth
|
|
82
53
|
|
|
@@ -136,16 +107,19 @@ Based on research depth choice, spawn agents:
|
|
|
136
107
|
|
|
137
108
|
**While agents run**, ask clarifying questions if the description lacks scope or expected outcome. For bugs, also ask for reproduction steps and expected vs actual behavior.
|
|
138
109
|
|
|
139
|
-
## Phase 5:
|
|
110
|
+
## Phase 5: Initialize Plan
|
|
140
111
|
|
|
141
|
-
Extract
|
|
112
|
+
Extract title and description from `$ARGUMENTS`:
|
|
142
113
|
|
|
143
114
|
- If user provided a single line, use it for both title and description.
|
|
144
115
|
- If user provided multiple lines, use first line as title and full text as description.
|
|
145
116
|
|
|
117
|
+
Derive a kebab-case slug from the title. This slug becomes the feature's namespace:
|
|
118
|
+
|
|
146
119
|
```bash
|
|
147
|
-
|
|
148
|
-
mkdir -p ".
|
|
120
|
+
SLUG=$(echo "$TITLE" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9 ]//g' | tr ' ' '-' | sed 's/--*/-/g; s/^-//; s/-$//')
|
|
121
|
+
mkdir -p ".opencode/artifacts/$SLUG"
|
|
122
|
+
echo "$SLUG" > ".opencode/artifacts/.active"
|
|
149
123
|
```
|
|
150
124
|
|
|
151
125
|
## Phase 6: Determine PRD Rigor
|
|
@@ -154,13 +128,12 @@ Not every change needs a full spec. Assess complexity to choose the right PRD le
|
|
|
154
128
|
|
|
155
129
|
| Signal | Lite PRD | Full PRD |
|
|
156
130
|
| --- | --- | --- |
|
|
157
|
-
|
|
|
131
|
+
| Scope | Simple, single-concern | Cross-cutting, multi-system |
|
|
158
132
|
| Files affected | 1-3 | 4+ |
|
|
159
|
-
| Scope | Clear, single-concern | Cross-cutting, multi-system |
|
|
160
133
|
| Research depth | Skip or Minimal | Standard or Deep |
|
|
161
134
|
| Description | "Fix X in Y" | "Implement X with Y and Z" |
|
|
162
135
|
|
|
163
|
-
**Auto-detect:** If
|
|
136
|
+
**Auto-detect:** If research was Skip/Minimal AND description is a single sentence → default to Lite.
|
|
164
137
|
|
|
165
138
|
### Lite PRD Format
|
|
166
139
|
|
|
@@ -190,7 +163,7 @@ For simple, well-scoped work (bugs, small tasks):
|
|
|
190
163
|
|
|
191
164
|
For features and complex work, use the full template:
|
|
192
165
|
|
|
193
|
-
Read the PRD template
|
|
166
|
+
Read the PRD template and write it to the active feature's spec (`.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md`).
|
|
194
167
|
|
|
195
168
|
## Phase 7: Write PRD
|
|
196
169
|
|
|
@@ -214,7 +187,7 @@ Copy and fill the PRD template (lite or full) using context from Phase 4.
|
|
|
214
187
|
|
|
215
188
|
### Task Format
|
|
216
189
|
|
|
217
|
-
Tasks must follow
|
|
190
|
+
Tasks must follow this format:
|
|
218
191
|
|
|
219
192
|
- Title with `[category]` tag
|
|
220
193
|
- One-sentence **end state** description (not step-by-step)
|
|
@@ -236,32 +209,22 @@ Before saving, verify:
|
|
|
236
209
|
|
|
237
210
|
If any check fails, fix it — don't ask the user.
|
|
238
211
|
|
|
239
|
-
## Phase 9:
|
|
240
|
-
|
|
241
|
-
**If `--spec-only` was passed, skip to Phase 12 (Report).**
|
|
212
|
+
## Phase 9: Prepare Workspace
|
|
242
213
|
|
|
243
214
|
### Workspace Check
|
|
244
215
|
|
|
245
216
|
```bash
|
|
246
217
|
git status --porcelain
|
|
247
218
|
git branch --show-current
|
|
248
|
-
br list --status=in_progress
|
|
249
219
|
```
|
|
250
220
|
|
|
251
221
|
- If uncommitted changes: ask user to stash, commit, or continue
|
|
252
|
-
- If other tasks in progress: warn before claiming another
|
|
253
|
-
|
|
254
|
-
### Claim Bead
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
br update $BEAD_ID --status in_progress
|
|
258
|
-
```
|
|
259
222
|
|
|
260
223
|
### Create Branch
|
|
261
224
|
|
|
262
225
|
### Workspace Setup
|
|
263
226
|
|
|
264
|
-
|
|
227
|
+
Set up the workspace: create branch, install deps if needed.
|
|
265
228
|
|
|
266
229
|
Additionally offer a "Create worktree" option:
|
|
267
230
|
|
|
@@ -271,21 +234,16 @@ skill({ name: "using-git-worktrees" });
|
|
|
271
234
|
|
|
272
235
|
## Phase 10: Convert PRD to Tasks
|
|
273
236
|
|
|
274
|
-
|
|
237
|
+
Convert PRD markdown → executable JSON (`prd.json`).
|
|
275
238
|
|
|
276
239
|
## Phase 11: Report
|
|
277
240
|
|
|
278
241
|
Output:
|
|
279
242
|
|
|
280
|
-
1.
|
|
281
|
-
2.
|
|
282
|
-
3.
|
|
283
|
-
4.
|
|
284
|
-
5. Next step: `/ship $BEAD_ID` (or `/plan $BEAD_ID` for complex work)
|
|
285
|
-
|
|
286
|
-
```bash
|
|
287
|
-
br comments add $BEAD_ID "Created prd.md with [N] tasks, [M] success criteria"
|
|
288
|
-
```
|
|
243
|
+
1. Summary: task count, success criteria count, affected files count
|
|
244
|
+
2. Branch name and workspace (if claimed)
|
|
245
|
+
3. Active feature: `.opencode/artifacts/$(cat .opencode/artifacts/.active)/`
|
|
246
|
+
4. Next step: `/ship` (or `/plan` for complex work)
|
|
289
247
|
|
|
290
248
|
---
|
|
291
249
|
|
|
@@ -294,5 +252,5 @@ br comments add $BEAD_ID "Created prd.md with [N] tasks, [M] success criteria"
|
|
|
294
252
|
| Need | Command |
|
|
295
253
|
| ------------------ | ------------ |
|
|
296
254
|
| Research first | `/research` |
|
|
297
|
-
| Plan after spec | `/plan
|
|
298
|
-
| Implement and ship | `/ship
|
|
255
|
+
| Plan after spec | `/plan` |
|
|
256
|
+
| Implement and ship | `/ship` |
|
|
@@ -25,7 +25,6 @@ Design a component, page, or design system with a clear aesthetic point of view.
|
|
|
25
25
|
|
|
26
26
|
```typescript
|
|
27
27
|
skill({ name: "frontend-design" }); // Design system guidance, anti-patterns, references
|
|
28
|
-
skill({ name: "ux-quality-gates" }); // IA, forms, recovery, loading, usability gates
|
|
29
28
|
```
|
|
30
29
|
|
|
31
30
|
---
|
|
@@ -66,7 +65,7 @@ State these decisions explicitly:
|
|
|
66
65
|
5. **State model** — empty, loading, error, success, disabled, and optimistic states required
|
|
67
66
|
6. **Pattern selection** — form, table/list/grid, notification, modal, or navigation pattern if applicable
|
|
68
67
|
|
|
69
|
-
|
|
68
|
+
Keep these decisions concrete and explicit.
|
|
70
69
|
|
|
71
70
|
---
|
|
72
71
|
|
|
@@ -6,7 +6,7 @@ agent: plan
|
|
|
6
6
|
|
|
7
7
|
# Explore: $ARGUMENTS
|
|
8
8
|
|
|
9
|
-
Think through an idea, problem, or approach with structured alternatives and tradeoffs — before committing to a
|
|
9
|
+
Think through an idea, problem, or approach with structured alternatives and tradeoffs — before committing to a plan.
|
|
10
10
|
|
|
11
11
|
> **Workflow:** **`/explore`** → `/create` (if worth pursuing) or discard
|
|
12
12
|
>
|
|
@@ -18,7 +18,6 @@ Think through an idea, problem, or approach with structured alternatives and tra
|
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
20
|
skill({ name: "brainstorming" }); // Collaborative refinement
|
|
21
|
-
skill({ name: "memory-grounding" }); // Load past decisions
|
|
22
21
|
```
|
|
23
22
|
|
|
24
23
|
## Phase 1: Ground
|
|
@@ -134,8 +133,8 @@ Write the proposal as a structured document:
|
|
|
134
133
|
`/create "[description based on chosen approach]"`
|
|
135
134
|
```
|
|
136
135
|
|
|
137
|
-
**If a
|
|
138
|
-
**If no
|
|
136
|
+
**If a plan exists:** Save to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/research.md`
|
|
137
|
+
**If no plan:** Display inline, don't create files.
|
|
139
138
|
|
|
140
139
|
## Phase 6: Ask User
|
|
141
140
|
|
|
@@ -14,11 +14,8 @@ Initialize project setup. Run once per project. Supports three modes via argumen
|
|
|
14
14
|
## Load Skills
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
skill({ name: "index-knowledge" });
|
|
18
|
-
skill({ name: "context-initialization" });
|
|
19
17
|
skill({ name: "brainstorming" });
|
|
20
18
|
skill({ name: "verification-before-completion" });
|
|
21
|
-
skill({ name: "swarm-coordination" }); // For --brownfield analysis
|
|
22
19
|
```
|
|
23
20
|
|
|
24
21
|
## Parse Arguments
|
|
@@ -58,7 +55,7 @@ Show detected summary and ask for confirmation before writing.
|
|
|
58
55
|
|
|
59
56
|
### Phase 3: Create AGENTS.md
|
|
60
57
|
|
|
61
|
-
Create `./AGENTS.md` — target <60 lines (max 150).
|
|
58
|
+
Create `./AGENTS.md` — target <60 lines (max 150). Include:
|
|
62
59
|
- Tech stack with versions, file structure, validated commands
|
|
63
60
|
- Code example from actual codebase
|
|
64
61
|
- Testing conventions, boundaries, gotchas
|
|
@@ -1,41 +1,27 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Create detailed implementation plan with TDD steps
|
|
3
|
-
argument-hint: "<bead-id> [--create-beads]"
|
|
2
|
+
description: Create detailed implementation plan with TDD steps
|
|
4
3
|
agent: plan
|
|
5
4
|
---
|
|
6
5
|
|
|
7
|
-
# Plan
|
|
6
|
+
# Plan
|
|
8
7
|
|
|
9
8
|
Create a detailed implementation plan with TDD steps. Optional deep-planning between `/create` and `/ship`.
|
|
10
9
|
|
|
11
|
-
> **Workflow:** `/create` → **`/plan
|
|
10
|
+
> **Workflow:** `/create` → **`/plan`** (optional) → `/ship`
|
|
12
11
|
>
|
|
13
|
-
>
|
|
14
|
-
>
|
|
15
|
-
> **When to use:** Complex tasks where PRD verification steps aren't enough guidance. Skip for simple tasks.
|
|
16
|
-
|
|
17
|
-
## Load Skills
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
20
|
-
skill({ name: "beads" });
|
|
21
|
-
skill({ name: "memory-grounding" });
|
|
22
|
-
skill({ name: "writing-plans" }); // TDD plan format
|
|
23
|
-
// For user-facing UI work: skill({ name: "ux-quality-gates" });
|
|
24
|
-
```
|
|
12
|
+
> **When to use:** Complex tasks where spec verification steps aren't enough guidance. Skip for simple tasks.
|
|
25
13
|
|
|
26
14
|
## Parse Arguments
|
|
27
15
|
|
|
28
|
-
| Argument
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
| `--create-beads` | false | Create child beads for each phase |
|
|
16
|
+
| Argument | Default | Description |
|
|
17
|
+
| -------- | -------- | --------------------------------- |
|
|
18
|
+
| none | — | Plan based on current spec |
|
|
32
19
|
|
|
33
20
|
## Before You Plan
|
|
34
21
|
|
|
35
22
|
- **Be certain**: Only create tasks you're confident about
|
|
36
|
-
- **Don't over-plan**: If the
|
|
23
|
+
- **Don't over-plan**: If the spec is clear, trust it
|
|
37
24
|
- **Budget context**: Target ~50% context per execution
|
|
38
|
-
- **Split signals**: Create child beads for complex work
|
|
39
25
|
- **Vertical slices**: Each task should cover one feature end-to-end
|
|
40
26
|
|
|
41
27
|
## Phase 0: Institutional Research (Mandatory)
|
|
@@ -46,7 +32,7 @@ Before touching the PRD or planning anything, load what the codebase already kno
|
|
|
46
32
|
|
|
47
33
|
### Step 1: Search institutional memory
|
|
48
34
|
|
|
49
|
-
|
|
35
|
+
Search memory for: bugfixes, existing plans (ask user before overwriting).
|
|
50
36
|
|
|
51
37
|
If relevant observations found: incorporate them directly into the plan. Don't re-solve solved problems.
|
|
52
38
|
|
|
@@ -92,17 +78,10 @@ task({
|
|
|
92
78
|
|
|
93
79
|
## Phase 1: Guards
|
|
94
80
|
|
|
95
|
-
```bash
|
|
96
|
-
br show $ARGUMENTS
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Read `.beads/artifacts/$ARGUMENTS/` to check what artifacts exist.
|
|
100
|
-
|
|
101
81
|
Verify:
|
|
102
82
|
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
- If `plan.md` already exists, ask user: overwrite or skip?
|
|
83
|
+
- `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` exists (if not, tell user to run `/create` first)
|
|
84
|
+
- If `.opencode/artifacts/$(cat .opencode/artifacts/.active)/plan.md` already exists, ask user: overwrite or skip?
|
|
106
85
|
|
|
107
86
|
## Phase 2: Discovery Assessment
|
|
108
87
|
|
|
@@ -243,7 +222,7 @@ Assess size to determine plan structure:
|
|
|
243
222
|
| ------------- | --------- | ---------------------------------------- |
|
|
244
223
|
| S (1-3 files) | 2-4 tasks | Single plan, no phases |
|
|
245
224
|
| M (3-8 files) | 5-8 tasks | 2-3 phases |
|
|
246
|
-
| L (8+ files) | 9+ tasks |
|
|
225
|
+
| L (8+ files) | 9+ tasks | Split into separate plans for each subsystem |
|
|
247
226
|
|
|
248
227
|
## Phase 6: Dependency Graph & Wave Assignment
|
|
249
228
|
|
|
@@ -272,14 +251,14 @@ Wave 3: C (depends on B)
|
|
|
272
251
|
|
|
273
252
|
## Phase 7: Write Plan
|
|
274
253
|
|
|
275
|
-
Write `.
|
|
254
|
+
Write `.opencode/artifacts/$(cat .opencode/artifacts/.active)/plan.md`:
|
|
276
255
|
|
|
277
256
|
### Required Plan Header
|
|
278
257
|
|
|
279
258
|
```markdown
|
|
280
259
|
# [Feature] Implementation Plan
|
|
281
260
|
|
|
282
|
-
> **For Claude:**
|
|
261
|
+
> **For Claude:** Implement this plan task-by-task.
|
|
283
262
|
|
|
284
263
|
**Goal:** [Outcome-shaped goal from PRD]
|
|
285
264
|
|
|
@@ -361,15 +340,18 @@ Scan `plan.md` content for these patterns:
|
|
|
361
340
|
### Check Process
|
|
362
341
|
|
|
363
342
|
```bash
|
|
343
|
+
ACTIVE_SLUG=$(cat .opencode/artifacts/.active 2>/dev/null)
|
|
344
|
+
if [ -z "$ACTIVE_SLUG" ]; then echo "No active feature."; exit 1; fi
|
|
345
|
+
ARTIFACT_DIR=".opencode/artifacts/$ACTIVE_SLUG"
|
|
364
346
|
# Scan plan for violation patterns (fixed-string mode to avoid regex false positives)
|
|
365
|
-
grep -inF "git add ."
|
|
366
|
-
grep -inF "git add -A"
|
|
367
|
-
grep -inF -- "--no-verify"
|
|
368
|
-
grep -inF "force push"
|
|
369
|
-
grep -inF -- "--force"
|
|
370
|
-
grep -inF "reset --hard"
|
|
371
|
-
grep -inF "checkout ."
|
|
372
|
-
grep -inF "clean -fd"
|
|
347
|
+
grep -inF "git add ." "$ARTIFACT_DIR/plan.md"
|
|
348
|
+
grep -inF "git add -A" "$ARTIFACT_DIR/plan.md"
|
|
349
|
+
grep -inF -- "--no-verify" "$ARTIFACT_DIR/plan.md"
|
|
350
|
+
grep -inF "force push" "$ARTIFACT_DIR/plan.md"
|
|
351
|
+
grep -inF -- "--force" "$ARTIFACT_DIR/plan.md"
|
|
352
|
+
grep -inF "reset --hard" "$ARTIFACT_DIR/plan.md"
|
|
353
|
+
grep -inF "checkout ." "$ARTIFACT_DIR/plan.md"
|
|
354
|
+
grep -inF "clean -fd" "$ARTIFACT_DIR/plan.md"
|
|
373
355
|
```
|
|
374
356
|
|
|
375
357
|
Also check:
|
|
@@ -400,16 +382,7 @@ If violations found:
|
|
|
400
382
|
Violations resolved. Plan is compliant.
|
|
401
383
|
```
|
|
402
384
|
|
|
403
|
-
## Phase 9:
|
|
404
|
-
|
|
405
|
-
For large work, create child beads for each plan phase:
|
|
406
|
-
|
|
407
|
-
```bash
|
|
408
|
-
CHILD=$(br create "[Phase title]" --type task --json | jq -r '.id')
|
|
409
|
-
br dep add $CHILD $ARGUMENTS
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
## Phase 10: Report
|
|
385
|
+
## Phase 9: Report
|
|
413
386
|
|
|
414
387
|
Output:
|
|
415
388
|
|
|
@@ -419,18 +392,15 @@ Output:
|
|
|
419
392
|
4. **Dependency Waves:** [N] waves for parallel execution
|
|
420
393
|
5. **Task count:** [N] tasks, [M] TDD steps
|
|
421
394
|
6. **Files affected:** [List]
|
|
422
|
-
7. **Plan location:** `.
|
|
423
|
-
8. **
|
|
424
|
-
9. **Next step:** `/ship $ARGUMENTS`
|
|
395
|
+
7. **Plan location:** `.opencode/artifacts/$(cat .opencode/artifacts/.active)/plan.md`
|
|
396
|
+
8. **Next step:** `/ship`
|
|
425
397
|
|
|
426
|
-
|
|
427
|
-
br comments add $ARGUMENTS "Created plan.md: Level [N] discovery, [X] waves, [Y] tasks, [Z] TDD steps"
|
|
428
|
-
```
|
|
398
|
+
---
|
|
429
399
|
|
|
430
400
|
## Related Commands
|
|
431
401
|
|
|
432
402
|
| Need | Command |
|
|
433
403
|
| -------------- | ------------ |
|
|
434
404
|
| Create spec | `/create` |
|
|
435
|
-
| Execute plan | `/ship
|
|
405
|
+
| Execute plan | `/ship` |
|
|
436
406
|
| Research first | `/research` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Create and submit pull request
|
|
3
|
-
argument-hint: "[
|
|
2
|
+
description: Create and submit a pull request
|
|
3
|
+
argument-hint: "[--draft]"
|
|
4
4
|
agent: build
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -9,18 +9,14 @@ agent: build
|
|
|
9
9
|
## Load Skills
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
skill({ name: "beads" });
|
|
13
|
-
skill({ name: "memory-grounding" });
|
|
14
|
-
skill({ name: "verification-gates" });
|
|
15
12
|
skill({ name: "verification-before-completion" });
|
|
16
13
|
```
|
|
17
14
|
|
|
18
15
|
## Parse Arguments
|
|
19
16
|
|
|
20
|
-
| Argument
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
| `--draft` | false | Create as draft PR |
|
|
17
|
+
| Argument | Default | Description |
|
|
18
|
+
| --------- | ------- | ------------------ |
|
|
19
|
+
| `--draft` | false | Create as draft PR |
|
|
24
20
|
|
|
25
21
|
## Phase 1: Pre-PR Verification
|
|
26
22
|
|
|
@@ -30,7 +26,7 @@ git status --porcelain
|
|
|
30
26
|
|
|
31
27
|
If uncommitted changes exist, ask whether to commit first.
|
|
32
28
|
|
|
33
|
-
|
|
29
|
+
All gates must pass before creating the PR.
|
|
34
30
|
|
|
35
31
|
Check `package.json` scripts, `Makefile`, or `justfile` for project-specific commands first — prefer those over generic defaults.
|
|
36
32
|
|
|
@@ -40,7 +36,7 @@ If any gate fails, stop. Fix errors first, then run `/pr` again.
|
|
|
40
36
|
|
|
41
37
|
### Memory Grounding
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
Search memory for relevant findings to include in the PR description.
|
|
44
40
|
|
|
45
41
|
### Git Context
|
|
46
42
|
|
|
@@ -50,27 +46,13 @@ git log main...HEAD --oneline
|
|
|
50
46
|
git diff main...HEAD --stat
|
|
51
47
|
```
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
br show $ARGUMENTS
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Read `.beads/artifacts/$ARGUMENTS/` to check what artifacts exist.
|
|
60
|
-
|
|
61
|
-
Read the PRD to extract goal and success criteria for the PR description.
|
|
49
|
+
Read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` to extract goal and success criteria for the PR description.
|
|
62
50
|
|
|
63
51
|
## Phase 2B: Pre-PR Review
|
|
64
52
|
|
|
65
53
|
This is the last gate before code hits GitHub. Run it every time.
|
|
66
54
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
```typescript
|
|
70
|
-
skill({ name: "requesting-code-review" });
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Run **5 parallel agents**: security/correctness, performance/architecture, type-safety/tests, conventions/patterns, simplicity/completeness.
|
|
55
|
+
Run **5 parallel agents** for review: security/correctness, performance/architecture, type-safety/tests, conventions/patterns, simplicity/completeness.
|
|
74
56
|
|
|
75
57
|
```bash
|
|
76
58
|
BASE_SHA=$(git rev-parse origin/main 2>/dev/null || git merge-base HEAD origin/main)
|
|
@@ -147,7 +129,7 @@ EOF
|
|
|
147
129
|
|
|
148
130
|
If `--draft`, add `--draft` flag.
|
|
149
131
|
|
|
150
|
-
|
|
132
|
+
Add a link to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` for requirements context.
|
|
151
133
|
|
|
152
134
|
## Output
|
|
153
135
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Research a topic
|
|
3
|
-
argument-hint: "<topic
|
|
2
|
+
description: Research a topic before implementation
|
|
3
|
+
argument-hint: "<topic> [--quick|--thorough]"
|
|
4
4
|
agent: scout
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,39 +10,23 @@ Gather information before implementation. Find answers, document findings, stop
|
|
|
10
10
|
|
|
11
11
|
> Research can happen at any phase when you need external information or codebase understanding.
|
|
12
12
|
|
|
13
|
-
## Load Skills
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
skill({ name: "beads" });
|
|
17
|
-
skill({ name: "memory-grounding" });
|
|
18
|
-
// For --thorough mode:
|
|
19
|
-
skill({ name: "deep-research" });
|
|
20
|
-
```
|
|
21
|
-
|
|
22
13
|
## Parse Arguments
|
|
23
14
|
|
|
24
15
|
| Argument | Default | Description |
|
|
25
16
|
| ---------------- | -------- | ----------------------------------- |
|
|
26
|
-
| Topic
|
|
17
|
+
| Topic | required | What to research |
|
|
27
18
|
| `--quick` | false | ~10 tool calls, single question |
|
|
28
19
|
| `--thorough` | false | ~100+ calls, comprehensive analysis |
|
|
29
20
|
|
|
30
21
|
Default depth: ~30 tool calls for moderate exploration.
|
|
31
22
|
|
|
32
|
-
## Determine Input Type
|
|
33
|
-
|
|
34
|
-
| Input Type | Detection | Action |
|
|
35
|
-
| ---------- | --------------------------- | --------------------------------- |
|
|
36
|
-
| Bead ID | Matches `br-xxx` or numeric | Research within that bead context |
|
|
37
|
-
| Topic | String | Standalone research |
|
|
38
|
-
|
|
39
23
|
## Before You Research
|
|
40
24
|
|
|
41
25
|
- **Be certain**: Only research what you need for implementation
|
|
42
26
|
- **Don't over-research**: Stop when you have enough to proceed
|
|
43
27
|
- **Use source priority**: Codebase → Docs → Source → GitHub → Web
|
|
44
28
|
- **Verify confidence**: Medium+ confidence required before stopping
|
|
45
|
-
- **Document findings**: Write to research.md
|
|
29
|
+
- **Document findings**: Write to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/research.md` or report directly
|
|
46
30
|
|
|
47
31
|
## Available Tools
|
|
48
32
|
|
|
@@ -57,17 +41,11 @@ Default depth: ~30 tool calls for moderate exploration.
|
|
|
57
41
|
|
|
58
42
|
## Phase 1: Load Context
|
|
59
43
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
br show $ARGUMENTS
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Read PRD if it exists and extract questions that need answering.
|
|
44
|
+
Read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` if it exists and extract questions that need answering.
|
|
67
45
|
|
|
68
46
|
### Memory Search (Required)
|
|
69
47
|
|
|
70
|
-
|
|
48
|
+
Search memory for existing findings. Use them to: skip already-answered questions, narrow scope to gaps only, avoid contradicting prior decisions without justification.
|
|
71
49
|
|
|
72
50
|
## Phase 2: Research
|
|
73
51
|
|
|
@@ -102,7 +80,7 @@ Follow the [memory-grounding](../skill/memory-grounding/SKILL.md) skill protocol
|
|
|
102
80
|
|
|
103
81
|
## Phase 4: Document
|
|
104
82
|
|
|
105
|
-
Write findings to `.
|
|
83
|
+
Write findings to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/research.md` (if plan exists) or report directly (if topic):
|
|
106
84
|
|
|
107
85
|
- Questions asked → answered/partial/unanswered with confidence
|
|
108
86
|
- Key findings with sources (file paths, docs)
|