opencodekit 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +4 -25
- package/dist/template/.opencode/.template-manifest.json +115 -188
- package/dist/template/.opencode/AGENTS.md +18 -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.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 +14 -152
- package/dist/template/.opencode/plugin/README.md +1 -1
- 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,19 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Review code for quality, security, and compliance
|
|
3
|
-
argument-hint: "[path|
|
|
3
|
+
argument-hint: "[path|pr-number|'all'] [--quick|--thorough]"
|
|
4
4
|
agent: review
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Review: $ARGUMENTS
|
|
8
8
|
|
|
9
|
-
## Load Skills
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
skill({ name: "beads" });
|
|
13
|
-
skill({ name: "requesting-code-review" });
|
|
14
|
-
skill({ name: "verification-gates" });
|
|
15
|
-
```
|
|
16
|
-
|
|
17
9
|
## Determine Input Type
|
|
18
10
|
|
|
19
11
|
| Input Type | Detection | Action |
|
|
@@ -22,6 +14,7 @@ skill({ name: "verification-gates" });
|
|
|
22
14
|
| Commit hash (40-char) | SHA pattern | `git show <hash>` |
|
|
23
15
|
| Branch name | String, not matching above | `git diff main...HEAD` |
|
|
24
16
|
| PR URL/number | Contains "github.com" or "#" | `gh pr diff` |
|
|
17
|
+
| Current plan | `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` | Review against spec |
|
|
25
18
|
|
|
26
19
|
## Before You Review
|
|
27
20
|
|
|
@@ -54,22 +47,22 @@ For each changed file:
|
|
|
54
47
|
- Read the full file to understand context
|
|
55
48
|
- Don't rely on diff alone — code that looks wrong in isolation may be correct
|
|
56
49
|
|
|
57
|
-
If
|
|
50
|
+
If plan exists, read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` to review against spec.
|
|
58
51
|
|
|
59
52
|
## Phase 2: Determine Scope
|
|
60
53
|
|
|
61
54
|
| Input | Scope | How to Get Code |
|
|
62
55
|
| ------------------------ | --------------------- | ------------------------- |
|
|
63
56
|
| File/directory path | That path only | `read` or `glob` + `read` |
|
|
64
|
-
|
|
|
57
|
+
| Current plan | Implementation vs spec | Read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` then `git diff` |
|
|
65
58
|
| PR number (e.g., `#45`) | PR changes | `gh pr diff 45` |
|
|
66
59
|
| `all` or empty | Recent changes | `git diff main...HEAD` |
|
|
67
60
|
|
|
68
|
-
If
|
|
61
|
+
If plan exists, read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` to review against spec.
|
|
69
62
|
|
|
70
63
|
## Phase 3: Automated Checks
|
|
71
64
|
|
|
72
|
-
|
|
65
|
+
Use the `verification-before-completion` skill to run gates.
|
|
73
66
|
|
|
74
67
|
Check `package.json` scripts, `Makefile`, or `justfile` for project-specific commands first — prefer those over generic defaults.
|
|
75
68
|
|
|
@@ -1,37 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Ship a
|
|
3
|
-
argument-hint: "<bead-id>"
|
|
2
|
+
description: Ship a plan - implement specs, verify, review, close
|
|
4
3
|
agent: build
|
|
5
4
|
---
|
|
6
5
|
|
|
7
|
-
# Ship
|
|
6
|
+
# Ship
|
|
8
7
|
|
|
9
|
-
Execute
|
|
8
|
+
Execute spec tasks, verify each passes, run review, mark complete.
|
|
10
9
|
|
|
11
|
-
> **Workflow:** `/create` → **`/ship
|
|
12
|
-
>
|
|
13
|
-
> Bead MUST have `prd.md`. If not yet claimed, `/ship` auto-claims it.
|
|
10
|
+
> **Workflow:** `/create` → **`/ship`**
|
|
14
11
|
|
|
15
12
|
## Load Skills
|
|
16
13
|
|
|
17
14
|
```typescript
|
|
18
|
-
skill({ name: "beads" });
|
|
19
|
-
skill({ name: "memory-grounding" });
|
|
20
|
-
skill({ name: "workspace-setup" });
|
|
21
15
|
skill({ name: "verification-before-completion" });
|
|
22
|
-
skill({ name: "reflection-checkpoints" }); // Mid-point + completion checks during execution
|
|
23
|
-
// For user-facing UI changes: skill({ name: "ux-quality-gates" });
|
|
24
|
-
// If local web/browser verification needs stable URLs: skill({ name: "portless" });
|
|
25
16
|
```
|
|
26
17
|
|
|
27
|
-
## Determine Input Type
|
|
28
|
-
|
|
29
|
-
| Input Type | Detection | Action |
|
|
30
|
-
| ---------- | --------------------------- | -------------------------- |
|
|
31
|
-
| Bead ID | Matches `br-xxx` or numeric | Ship that bead |
|
|
32
|
-
| Path | File/directory path | Not supported for ship |
|
|
33
|
-
| `all` | Keyword | Ship all in_progress beads |
|
|
34
|
-
|
|
35
18
|
## Before You Ship
|
|
36
19
|
|
|
37
20
|
- **Be certain**: Only ship if all tasks pass verification
|
|
@@ -39,7 +22,7 @@ skill({ name: "reflection-checkpoints" }); // Mid-point + completion checks duri
|
|
|
39
22
|
- **Run the review**: Always spawn review agent before closing
|
|
40
23
|
- **Verify goals**: Tasks completing ≠ goals achieved (use goal-backward verification)
|
|
41
24
|
- **Commit before close**: Per-task commits required, don't ship without git history
|
|
42
|
-
- **Ask before closing**: Never close
|
|
25
|
+
- **Ask before closing**: Never close without user confirmation
|
|
43
26
|
|
|
44
27
|
## Available Tools
|
|
45
28
|
|
|
@@ -53,55 +36,37 @@ skill({ name: "reflection-checkpoints" }); // Mid-point + completion checks duri
|
|
|
53
36
|
|
|
54
37
|
## Phase 1: Guards
|
|
55
38
|
|
|
56
|
-
### Memory
|
|
57
|
-
|
|
58
|
-
Follow the [memory-grounding](../skill/memory-grounding/SKILL.md) skill protocol. Focus on: failed approaches to avoid repeating.
|
|
39
|
+
### Memory Search
|
|
59
40
|
|
|
60
|
-
|
|
41
|
+
Search memory for: failed approaches to avoid repeating.
|
|
61
42
|
|
|
62
|
-
|
|
63
|
-
br show $ARGUMENTS
|
|
64
|
-
```
|
|
43
|
+
### Plan Validation
|
|
65
44
|
|
|
66
45
|
Verify:
|
|
67
46
|
|
|
68
|
-
-
|
|
69
|
-
- `.beads/artifacts/$ARGUMENTS/prd.md` exists (if not, tell user to run `/create` first)
|
|
47
|
+
- `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` exists (if not, tell user to run `/create` first)
|
|
70
48
|
|
|
71
49
|
Check what artifacts exist:
|
|
72
50
|
|
|
73
|
-
Read `.
|
|
74
|
-
|
|
75
|
-
## Phase 1B: Auto-Claim (if not yet in_progress)
|
|
76
|
-
|
|
77
|
-
If bead status is NOT `in_progress`, auto-claim it:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
br update $ARGUMENTS --status in_progress
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Then ask about workspace:
|
|
51
|
+
Read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/` to check what artifacts exist (spec.md, plan.md, etc.).
|
|
84
52
|
|
|
85
53
|
### Workspace Setup
|
|
86
54
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
**If bead is already `in_progress`:** Skip this phase entirely.
|
|
55
|
+
Set up the workspace: create branch, install deps if needed.
|
|
90
56
|
|
|
91
57
|
## Phase 2: Route to Execution
|
|
92
58
|
|
|
93
|
-
| Artifact exists | Action |
|
|
59
|
+
| Artifact exists in `.opencode/artifacts/$(cat .opencode/artifacts/.active)/` | Action |
|
|
94
60
|
| --------------- | -------------------------------------------------------- |
|
|
95
|
-
| `plan.md` |
|
|
96
|
-
| `
|
|
97
|
-
| Only `
|
|
61
|
+
| `plan.md` | Parse plan header + dependency graph, execute wave-by-wave |
|
|
62
|
+
| `tasks.json` | Proceed to PRD task loop below |
|
|
63
|
+
| Only `spec.md` | Convert spec to `tasks.json`, then proceed |
|
|
98
64
|
|
|
99
65
|
## Phase 3: Wave-Based Execution
|
|
100
66
|
|
|
101
67
|
If `plan.md` exists with dependency graph:
|
|
102
68
|
|
|
103
|
-
1. **
|
|
104
|
-
2. **Parse waves** from dependency graph section
|
|
69
|
+
1. **Parse waves** from dependency graph section
|
|
105
70
|
3. **Execute wave-by-wave:**
|
|
106
71
|
- Single-task wave → execute directly (no subagent overhead)
|
|
107
72
|
- Multi-task wave → dispatch parallel `task({ subagent_type: "general" })` subagents, one per task
|
|
@@ -122,8 +87,8 @@ For each task (wave-based or sequential fallback):
|
|
|
122
87
|
6. **Verify** — run each verification step from the task
|
|
123
88
|
7. **If verification fails**, fix and retry (max 2 attempts per task)
|
|
124
89
|
8. **Commit** — per-task commit (see below)
|
|
125
|
-
9. **Mark** `passes: true` in
|
|
126
|
-
10. **Append** progress to `.
|
|
90
|
+
9. **Mark** `passes: true` in `.opencode/artifacts/tasks.json`
|
|
91
|
+
10. **Append** progress to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/progress.md`
|
|
127
92
|
|
|
128
93
|
### Checkpoint Protocol
|
|
129
94
|
|
|
@@ -196,7 +161,7 @@ After each task completes (verification passed):
|
|
|
196
161
|
3. **Commit with type prefix:**
|
|
197
162
|
|
|
198
163
|
```bash
|
|
199
|
-
git commit -m "feat
|
|
164
|
+
git commit -m "feat: [task description]
|
|
200
165
|
|
|
201
166
|
- [key change 1]
|
|
202
167
|
- [key change 2]"
|
|
@@ -228,7 +193,7 @@ Follow the [Verification Protocol](../skill/verification-before-completion/refer
|
|
|
228
193
|
- All 4 gates must pass before proceeding to commit/push
|
|
229
194
|
- Also run PRD `Verify:` commands
|
|
230
195
|
|
|
231
|
-
If the PRD requires local web, browser, OAuth callback, webhook, or multi-service verification,
|
|
196
|
+
If the PRD requires local web, browser, OAuth callback, webhook, or multi-service verification, use stable URLs as verification evidence.
|
|
232
197
|
|
|
233
198
|
## Phase 5: Review
|
|
234
199
|
|
|
@@ -237,9 +202,20 @@ BASE_SHA=$(git rev-parse origin/main 2>/dev/null || git rev-parse HEAD~1)
|
|
|
237
202
|
HEAD_SHA=$(git rev-parse HEAD)
|
|
238
203
|
```
|
|
239
204
|
|
|
240
|
-
###
|
|
205
|
+
### Mode Selection
|
|
206
|
+
|
|
207
|
+
| Condition | Mode |
|
|
208
|
+
|---|---|
|
|
209
|
+
| Routine change, low risk | Standard Review (below) |
|
|
210
|
+
| High-risk feature, explicit user request for quality gating, or the build agent flagged the feature as requiring iterative quality gating | Iterative Quality Loop |
|
|
241
211
|
|
|
242
|
-
|
|
212
|
+
When using Standard Review mode, apply the UI Quality Gate then the parallel review. When using Iterative Loop mode, apply the UI Quality Gate first (before entering the loop), then run the scored loop flow.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
### UI Quality Gate (always — both modes)
|
|
217
|
+
|
|
218
|
+
Detect changed UI files:
|
|
243
219
|
|
|
244
220
|
```bash
|
|
245
221
|
git diff --name-only $BASE_SHA...HEAD -- \
|
|
@@ -248,29 +224,26 @@ git diff --name-only $BASE_SHA...HEAD -- \
|
|
|
248
224
|
|
|
249
225
|
If any UI files changed:
|
|
250
226
|
|
|
251
|
-
1.
|
|
252
|
-
2.
|
|
253
|
-
3. Verify UX gates for changed surfaces:
|
|
227
|
+
1. Run `/ui-slop-check auto --since=$BASE_SHA` or manually apply its checklist when slash-command invocation is unavailable.
|
|
228
|
+
2. Verify UX gates for changed surfaces:
|
|
254
229
|
- One primary action per view/section
|
|
255
230
|
- Empty/loading/error/success states for async/data flows
|
|
256
231
|
- Retry/undo/confirm paths for errors and destructive actions
|
|
257
232
|
- Form labels, helper text, validation, and error association
|
|
258
233
|
- Semantic HTML, keyboard path, visible focus, reduced motion
|
|
259
234
|
- Component family consistency for related controls
|
|
260
|
-
|
|
235
|
+
3. Treat Critical findings like review Critical findings: fix inline, rerun verification, then continue.
|
|
261
236
|
|
|
262
|
-
|
|
237
|
+
---
|
|
263
238
|
|
|
264
|
-
|
|
265
|
-
skill({ name: "requesting-code-review" });
|
|
266
|
-
```
|
|
239
|
+
### Standard Review Mode
|
|
267
240
|
|
|
268
|
-
Run **5 parallel agents
|
|
241
|
+
Run **5 parallel agents** for review: security/correctness, performance/architecture, type-safety/tests, conventions/patterns, simplicity/completeness.
|
|
269
242
|
|
|
270
243
|
Fill placeholders:
|
|
271
244
|
|
|
272
|
-
- `{WHAT_WAS_IMPLEMENTED}`:
|
|
273
|
-
- `{PLAN_OR_REQUIREMENTS}`: `.
|
|
245
|
+
- `{WHAT_WAS_IMPLEMENTED}`: brief summary of what changed
|
|
246
|
+
- `{PLAN_OR_REQUIREMENTS}`: `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md`
|
|
274
247
|
- `{BASE_SHA}` / `{HEAD_SHA}`: from above
|
|
275
248
|
|
|
276
249
|
Wait for all 5 agents to return. Synthesize findings.
|
|
@@ -279,10 +252,98 @@ Wait for all 5 agents to return. Synthesize findings.
|
|
|
279
252
|
|
|
280
253
|
- Critical issues → fix inline, re-run Phase 4 verification, continue
|
|
281
254
|
- Important issues → fix inline, continue
|
|
282
|
-
- Minor issues →
|
|
255
|
+
- Minor issues → note in `.opencode/artifacts/$(cat .opencode/artifacts/.active)/progress.md`, flag for `/compound` step
|
|
283
256
|
|
|
284
257
|
If review finds critical issues that require architectural decisions → stop → present options to user.
|
|
285
258
|
|
|
259
|
+
### Iterative Quality Loop Mode
|
|
260
|
+
|
|
261
|
+
Score-gated feedback loop for high-risk features. Replaces the standard parallel review with a structured iteration cycle.
|
|
262
|
+
|
|
263
|
+
#### Setup
|
|
264
|
+
|
|
265
|
+
Initialize loop state:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
SLUG=$(cat .opencode/artifacts/.active)
|
|
269
|
+
cat > ".opencode/artifacts/$SLUG/review-state.json" << EOF
|
|
270
|
+
{
|
|
271
|
+
"slug": "$SLUG",
|
|
272
|
+
"rounds": 0,
|
|
273
|
+
"maxRounds": 5,
|
|
274
|
+
"lastScore": 0,
|
|
275
|
+
"sameScoreCount": 0,
|
|
276
|
+
"findingsResolved": 0,
|
|
277
|
+
"findingsRemaining": 0,
|
|
278
|
+
"status": "active"
|
|
279
|
+
}
|
|
280
|
+
EOF
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
#### Loop
|
|
284
|
+
|
|
285
|
+
Repeat steps 2-8 until exit or escalation:
|
|
286
|
+
|
|
287
|
+
| Step | Action |
|
|
288
|
+
|---|---|
|
|
289
|
+
| **1. EXECUTE** | Implement per spec/plan (already done in Phase 3) |
|
|
290
|
+
| **2. REVIEW** | Spawn **one review subagent** (`subagent_type: "review"`) with spec + current diff + `review-state.json`. Returns: score (X/5), findings array (severity + file:line + suggestion), suggested next action |
|
|
291
|
+
| **3. GATE** | Score ≥ 5 → mark done (`status: "passed"`), exit loop, proceed to Goal-Backward Verification. Score 4 → ask user if they want to proceed or loop. Score <4 → continue |
|
|
292
|
+
| **4. STALL?** | If `sameScoreCount ≥ 2` → escalate: surface accumulated findings, present to user with a recommendation |
|
|
293
|
+
| **5. MAX?** | If `rounds ≥ maxRounds` → escalate with full finding log |
|
|
294
|
+
| **6. FILTER** | Split findings into categories and handle each: |
|
|
295
|
+
| | • **Actionable** (code-level, clear fix) → proceed to fix |
|
|
296
|
+
| | • **Informational** (note, no code change) → log to progress.md with `[info]` |
|
|
297
|
+
| | • **Architecture/Design** → stop loop, present to user for decision |
|
|
298
|
+
| **7. FIX** | For each actionable finding, spawn a fix subagent with the exact file:line and suggested fix. Run sequentially for same-file findings, parallel for different files |
|
|
299
|
+
| **8. RE-REVIEW** | Update `review-state.json`: increment rounds, update score, reset/resolve findings. Go to step 2 |
|
|
300
|
+
|
|
301
|
+
#### Loop State Updates
|
|
302
|
+
|
|
303
|
+
After each round, update `review-state.json`:
|
|
304
|
+
|
|
305
|
+
**`sameScoreCount` rule:**
|
|
306
|
+
- If new score === `lastScore` → increment `sameScoreCount`
|
|
307
|
+
- If new score !== `lastScore` → reset `sameScoreCount` to 0
|
|
308
|
+
|
|
309
|
+
**Example after round 1 (score: 3):**
|
|
310
|
+
|
|
311
|
+
```json
|
|
312
|
+
{
|
|
313
|
+
"rounds": 1,
|
|
314
|
+
"lastScore": 3,
|
|
315
|
+
"sameScoreCount": 0,
|
|
316
|
+
"findingsResolved": 2,
|
|
317
|
+
"findingsRemaining": 1,
|
|
318
|
+
"status": "active"
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**Status transitions:**
|
|
323
|
+
|
|
324
|
+
- Stall detected (`sameScoreCount ≥ 2`) → `status: "stalled"`, append accumulated findings to progress.md
|
|
325
|
+
- Max rounds reached → `status: "maxed"`, append full finding log to progress.md
|
|
326
|
+
- Pass (score ≥ 5) → `status: "passed"`, proceed to Goal-Backward Verification
|
|
327
|
+
|
|
328
|
+
#### Review Subagent Prompt
|
|
329
|
+
|
|
330
|
+
When spawning, include:
|
|
331
|
+
|
|
332
|
+
- The original spec/slug
|
|
333
|
+
- The current diff (all changed files since the start of Phase 3)
|
|
334
|
+
- The current `review-state.json`
|
|
335
|
+
- Return format: `{ score: number, findings: Array<{severity:"critical"|"important"|"minor", file:string, line:number, suggestion:string, type:"actionable"|"informational"|"architecture"}>, nextAction: string }`
|
|
336
|
+
|
|
337
|
+
#### Exit Conditions
|
|
338
|
+
|
|
339
|
+
| Condition | Action |
|
|
340
|
+
|---|---|
|
|
341
|
+
| Score ≥ 5 | Proceed to Goal-Backward Verification |
|
|
342
|
+
| User approves score 4 | Proceed to Goal-Backward Verification |
|
|
343
|
+
| Architecture finding | Stop, present options to user |
|
|
344
|
+
| Stalled (same score 2x) | Escalate with accumulated findings |
|
|
345
|
+
| Max rounds | Escalate with full finding log |
|
|
346
|
+
|
|
286
347
|
### Goal-Backward Verification (if plan.md exists)
|
|
287
348
|
|
|
288
349
|
Verify that tasks completed ≠ goals achieved:
|
|
@@ -325,10 +386,10 @@ question({
|
|
|
325
386
|
questions: [
|
|
326
387
|
{
|
|
327
388
|
header: "Close",
|
|
328
|
-
question: "All tasks pass, gates green, review clean.
|
|
389
|
+
question: "All tasks pass, gates green, review clean. Mark plan as complete?",
|
|
329
390
|
options: [
|
|
330
|
-
{ label: "Yes,
|
|
331
|
-
{ label: "No, keep
|
|
391
|
+
{ label: "Yes, mark complete (Recommended)", description: "All checks passed" },
|
|
392
|
+
{ label: "No, keep working", description: "Need more work" },
|
|
332
393
|
],
|
|
333
394
|
},
|
|
334
395
|
],
|
|
@@ -337,12 +398,9 @@ question({
|
|
|
337
398
|
|
|
338
399
|
If confirmed:
|
|
339
400
|
|
|
340
|
-
|
|
341
|
-
br close $ARGUMENTS --reason "Shipped: all PRD tasks pass, verification + review passed"
|
|
342
|
-
br sync --flush-only
|
|
343
|
-
```
|
|
401
|
+
Update `.opencode/artifacts/todo.md` to mark all tasks complete and append summary to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/progress.md`.
|
|
344
402
|
|
|
345
|
-
Record significant learnings with `/compound
|
|
403
|
+
Record significant learnings with `/compound` after closing.
|
|
346
404
|
|
|
347
405
|
## Output
|
|
348
406
|
|
|
@@ -380,7 +438,7 @@ Report:
|
|
|
380
438
|
6. **Next Steps:**
|
|
381
439
|
- `/pr` to create pull request
|
|
382
440
|
- Manual commits if not already done
|
|
383
|
-
-
|
|
441
|
+
- Note deferred work in `.opencode/artifacts/todo.md`
|
|
384
442
|
|
|
385
443
|
## Related Commands
|
|
386
444
|
|
|
@@ -10,10 +10,8 @@ model: proxypal/gemini-3-pro-preview
|
|
|
10
10
|
## Load Skills
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
skill({ name: "visual-analysis" }); // Analysis framework
|
|
14
13
|
skill({ name: "accessibility-audit" }); // WCAG checklists
|
|
15
14
|
skill({ name: "frontend-design" }); // Anti-patterns, design quality
|
|
16
|
-
skill({ name: "ux-quality-gates" }); // IA, heuristics, forms, recovery, state coverage
|
|
17
15
|
```
|
|
18
16
|
|
|
19
17
|
## Input
|
|
@@ -28,7 +26,7 @@ Parse `$ARGUMENTS`:
|
|
|
28
26
|
|
|
29
27
|
### 1. Analyze the Input
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
Analyze the input:
|
|
32
30
|
|
|
33
31
|
- Content inventory (elements, text, icons)
|
|
34
32
|
- Visual properties (colors, typography, spacing, layout)
|
|
@@ -36,7 +34,7 @@ Use the `visual-analysis` skill to perform deep analysis:
|
|
|
36
34
|
|
|
37
35
|
### 2. Usability Heuristic Pass
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
Before visual scoring, check:
|
|
40
38
|
|
|
41
39
|
- System status is visible for async or multi-step work
|
|
42
40
|
- Labels and navigation use user vocabulary, not implementation terms
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Verify implementation completeness, correctness, and coherence
|
|
3
|
-
argument-hint: "
|
|
3
|
+
argument-hint: "[path|all] [--quick] [--full] [--fix] [--no-cache]"
|
|
4
4
|
agent: review
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -11,16 +11,14 @@ Check implementation against PRD before shipping.
|
|
|
11
11
|
## Load Skills
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
skill({ name: "beads" });
|
|
15
14
|
skill({ name: "verification-before-completion" });
|
|
16
|
-
// If local web/browser verification needs stable URLs: skill({ name: "portless" });
|
|
17
15
|
```
|
|
18
16
|
|
|
19
17
|
## Parse Arguments
|
|
20
18
|
|
|
21
19
|
| Argument | Default | Description |
|
|
22
20
|
| ------------ | -------- | ---------------------------------------------- |
|
|
23
|
-
| `<
|
|
21
|
+
| `<path\|all>`| required | The path or keyword to verify |
|
|
24
22
|
| `--quick` | false | Gates only, skip coherence check |
|
|
25
23
|
| `--full` | false | Force full verification mode (non-incremental) |
|
|
26
24
|
| `--fix` | false | Auto-fix lint/format issues |
|
|
@@ -28,11 +26,10 @@ skill({ name: "verification-before-completion" });
|
|
|
28
26
|
|
|
29
27
|
## Determine Input Type
|
|
30
28
|
|
|
31
|
-
| Input Type | Detection
|
|
32
|
-
| ---------- |
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
| `all` | Keyword | Verify all in-progress work |
|
|
29
|
+
| Input Type | Detection | Action |
|
|
30
|
+
| ---------- | ------------------- | -------------------------- |
|
|
31
|
+
| Path | File/directory path | Verify that specific path |
|
|
32
|
+
| `all` | Keyword | Verify all in-progress work |
|
|
36
33
|
|
|
37
34
|
## Before You Verify
|
|
38
35
|
|
|
@@ -51,7 +48,7 @@ CURRENT_STAMP=$(printf '%s\n%s' \
|
|
|
51
48
|
"$(git rev-parse HEAD)" \
|
|
52
49
|
"$(git diff HEAD -- '*.ts' '*.tsx' '*.js' '*.jsx')" \
|
|
53
50
|
| shasum -a 256 | cut -d' ' -f1)
|
|
54
|
-
LAST_STAMP=$(tail -1 .
|
|
51
|
+
LAST_STAMP=$(tail -1 .opencode/artifacts/verify.log 2>/dev/null | awk '{print $1}')
|
|
55
52
|
```
|
|
56
53
|
|
|
57
54
|
| Condition | Action |
|
|
@@ -68,19 +65,16 @@ Verification: cached PASS (no changes since <timestamp from verify.log>)
|
|
|
68
65
|
|
|
69
66
|
## Phase 1: Gather Context
|
|
70
67
|
|
|
71
|
-
|
|
72
|
-
br show $ARGUMENTS
|
|
73
|
-
```
|
|
68
|
+
Read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` to understand the requirements.
|
|
74
69
|
|
|
75
|
-
Read `.
|
|
70
|
+
Read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/` to check what plan artifacts exist.
|
|
76
71
|
|
|
77
72
|
Read the PRD and any other artifacts (plan.md, research.md, design.md).
|
|
78
73
|
|
|
79
74
|
**Verify guards:**
|
|
80
75
|
|
|
81
|
-
- [ ]
|
|
82
|
-
- [ ]
|
|
83
|
-
- [ ] You have read the full PRD
|
|
76
|
+
- [ ] Plan/spec exists and is up to date
|
|
77
|
+
- [ ] You have read the full spec
|
|
84
78
|
|
|
85
79
|
## Phase 2: Completeness
|
|
86
80
|
|
|
@@ -106,7 +100,7 @@ Follow the [Verification Protocol](../skill/verification-before-completion/refer
|
|
|
106
100
|
1. **Parallel**: typecheck + lint (simultaneously)
|
|
107
101
|
2. **Sequential** (after parallel passes): test, then build (ship only)
|
|
108
102
|
|
|
109
|
-
For browser/manual local-web requirements,
|
|
103
|
+
For browser/manual local-web requirements, use stable URLs as verification evidence. A reachable URL supplements, but never replaces, typecheck/lint/test/build evidence.
|
|
110
104
|
|
|
111
105
|
Report results with mode column:
|
|
112
106
|
|
|
@@ -122,7 +116,7 @@ Report results with mode column:
|
|
|
122
116
|
**After all gates pass**, record to verification cache:
|
|
123
117
|
|
|
124
118
|
```bash
|
|
125
|
-
echo "$CURRENT_STAMP $(date -u +%Y-%m-%dT%H:%M:%SZ) PASS" >> .
|
|
119
|
+
echo "$CURRENT_STAMP $(date -u +%Y-%m-%dT%H:%M:%SZ) PASS" >> .opencode/artifacts/verify.log
|
|
126
120
|
```
|
|
127
121
|
|
|
128
122
|
If `--fix` flag provided, run the project's auto-fix command (e.g., `npm run lint:fix`, `ruff check --fix`, `cargo clippy --fix`).
|
|
@@ -139,9 +133,7 @@ Flag contradictions with specific file references.
|
|
|
139
133
|
|
|
140
134
|
## Phase 5: Report
|
|
141
135
|
|
|
142
|
-
|
|
143
|
-
br comments add $ARGUMENTS "Verification: [PASS|PARTIAL|FAIL] - [summary]"
|
|
144
|
-
```
|
|
136
|
+
Append to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/progress.md`: `Verification: [PASS|PARTIAL|FAIL] - [summary]`
|
|
145
137
|
|
|
146
138
|
Output:
|
|
147
139
|
|
|
@@ -157,7 +149,7 @@ Record significant findings with `observation()`:
|
|
|
157
149
|
```typescript
|
|
158
150
|
observation({
|
|
159
151
|
type: "discovery", // or "warning", "bugfix"
|
|
160
|
-
title: "Verify: [
|
|
152
|
+
title: "Verify: [scope] [key finding]",
|
|
161
153
|
narrative: "[What was found, impact, resolution]",
|
|
162
154
|
concepts: "verification, [component]",
|
|
163
155
|
confidence: "high",
|