opencodekit 0.18.3 → 0.18.5

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 (44) hide show
  1. package/dist/index.js +407 -17
  2. package/dist/template/.opencode/.version +1 -1
  3. package/dist/template/.opencode/AGENTS.md +13 -1
  4. package/dist/template/.opencode/agent/build.md +4 -1
  5. package/dist/template/.opencode/agent/explore.md +5 -35
  6. package/dist/template/.opencode/command/verify.md +63 -12
  7. package/dist/template/.opencode/memory/research/benchmark-framework.md +162 -0
  8. package/dist/template/.opencode/memory/research/effectiveness-audit.md +213 -0
  9. package/dist/template/.opencode/memory.db +0 -0
  10. package/dist/template/.opencode/memory.db-shm +0 -0
  11. package/dist/template/.opencode/memory.db-wal +0 -0
  12. package/dist/template/.opencode/opencode.json +1429 -1678
  13. package/dist/template/.opencode/package.json +1 -1
  14. package/dist/template/.opencode/plugin/lib/memory-helpers.ts +3 -129
  15. package/dist/template/.opencode/plugin/lib/memory-hooks.ts +4 -60
  16. package/dist/template/.opencode/plugin/memory.ts +0 -3
  17. package/dist/template/.opencode/skill/agent-teams/SKILL.md +16 -1
  18. package/dist/template/.opencode/skill/beads/SKILL.md +22 -0
  19. package/dist/template/.opencode/skill/brainstorming/SKILL.md +28 -0
  20. package/dist/template/.opencode/skill/code-navigation/SKILL.md +130 -0
  21. package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +12 -0
  22. package/dist/template/.opencode/skill/context-management/SKILL.md +122 -113
  23. package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +20 -0
  24. package/dist/template/.opencode/skill/design-system-audit/SKILL.md +113 -112
  25. package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +8 -0
  26. package/dist/template/.opencode/skill/executing-plans/SKILL.md +7 -0
  27. package/dist/template/.opencode/skill/memory-system/SKILL.md +50 -266
  28. package/dist/template/.opencode/skill/mockup-to-code/SKILL.md +21 -6
  29. package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +8 -0
  30. package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +242 -105
  31. package/dist/template/.opencode/skill/root-cause-tracing/SKILL.md +15 -0
  32. package/dist/template/.opencode/skill/session-management/SKILL.md +4 -103
  33. package/dist/template/.opencode/skill/subagent-driven-development/SKILL.md +23 -2
  34. package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +17 -1
  35. package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +21 -0
  36. package/dist/template/.opencode/skill/tool-priority/SKILL.md +34 -16
  37. package/dist/template/.opencode/skill/ui-ux-research/SKILL.md +5 -127
  38. package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +36 -0
  39. package/dist/template/.opencode/skill/verification-before-completion/references/VERIFICATION_PROTOCOL.md +133 -29
  40. package/dist/template/.opencode/skill/visual-analysis/SKILL.md +20 -7
  41. package/dist/template/.opencode/skill/writing-plans/SKILL.md +7 -0
  42. package/dist/template/.opencode/tool/context7.ts +9 -1
  43. package/dist/template/.opencode/tool/grepsearch.ts +9 -1
  44. package/package.json +1 -1
@@ -13,6 +13,8 @@ dependencies: [beads-bridge]
13
13
 
14
14
  # Swarm Coordination - Kimi K2.5 PARL Multi-Agent Execution
15
15
 
16
+ > **Replaces** manual task-by-task execution of large plans — sequential bottleneck when tasks have no dependencies
17
+
16
18
  ## When to Use
17
19
 
18
20
  - Implementing plans with 3+ independent tasks that can run in parallel
@@ -23,7 +25,6 @@ dependencies: [beads-bridge]
23
25
  - Single-task or tightly sequential work without parallelizable groups
24
26
  - Simple 1–2 file changes better handled by a single agent
25
27
 
26
-
27
28
  ## Overview
28
29
 
29
30
  **Swarm = Leader + Workers + Reconciler + Progress Tracking + Todo Persistence**
@@ -150,6 +151,15 @@ SHUTDOWN:
150
151
  10. **Use reconciler at scale** - Required for 50+ agents, recommended for 10+
151
152
  11. **Reconciler watches continuously** - Spawns fix tasks on detected failures
152
153
 
154
+ ## Anti-Patterns
155
+
156
+ | Anti-Pattern | Why It Fails | Instead |
157
+ | ------------------------------------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------------- |
158
+ | Spawning agents for tasks with shared file dependencies | Workers block or overwrite each other, causing merge churn | Partition work by non-overlapping files/modules first |
159
+ | Not tracking agent completion status | Leader loses visibility; work appears done when it is not | Require `monitor.progress_update` lifecycle (start/progress/done) |
160
+ | Dispatching without pre-computed dependency graph | Tasks run out of order, causing rework and serial fallback | Run `swarm plan` first and dispatch by `parallelizable_groups` |
161
+ | Using swarm for < 3 tasks (overhead not worth it) | Coordination overhead exceeds execution savings | Use a single agent or 2 direct `Task()` calls |
162
+
153
163
  ## References
154
164
 
155
165
  - `references/architecture.md` - Swarm architecture diagram
@@ -161,3 +171,9 @@ SHUTDOWN:
161
171
  - `references/integration-beads.md` - Swarm integration workflow with Beads
162
172
  - `references/tmux-integration.md` - Tmux monitoring setup and commands
163
173
  - `references/tier-enforcement.md` - Tier enforcement (Longshot pattern)
174
+
175
+ ## See Also
176
+
177
+ - `agent-teams` — for coordinated multi-role collaboration beyond large plan execution
178
+ - `dispatching-parallel-agents` — for lightweight parallel debugging of independent failures
179
+ - `executing-plans` — for plan-driven execution when parallelism is moderate or bounded
@@ -8,6 +8,8 @@ dependencies: []
8
8
 
9
9
  # Systematic Debugging
10
10
 
11
+ > **Replaces** "shotgun debugging" — making random changes hoping something fixes the issue without understanding the cause
12
+
11
13
  ## When to Use
12
14
 
13
15
  - Test failures, production bugs, build breaks, or unexpected behavior
@@ -338,6 +340,15 @@ If you catch yourself thinking:
338
340
  | "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause. |
339
341
  | "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question pattern, don't fix again. |
340
342
 
343
+ ## Anti-Patterns
344
+
345
+ | Anti-Pattern | Why It Fails | Instead |
346
+ | --- | --- | --- |
347
+ | Changing multiple things at once | You can’t isolate what actually fixed or broke behavior | Change one variable at a time and measure outcome |
348
+ | Not reading the error message carefully | You skip direct clues (file, line, code, failing invariant) | Read the full error and stack trace before edits |
349
+ | Assuming the bug is in the most recently changed code | Correlation bias hides older or shared-state causes | Trace actual data/control flow from symptom to source |
350
+ | Skipping reproduction steps | Non-repro bugs encourage guessing and untestable fixes | Establish reliable repro steps, then verify fix against them |
351
+
341
352
  ## Quick Reference
342
353
 
343
354
  | Phase | Key Activities | Success Criteria |
@@ -379,3 +390,13 @@ From debugging sessions:
379
390
  - Random fixes approach: 2-3 hours of thrashing
380
391
  - First-time fix rate: 95% vs 40%
381
392
  - New bugs introduced: Near zero vs common
393
+
394
+ ## Verification
395
+
396
+ - Confirm the fix: reproduce the original bug scenario — it must now succeed.
397
+ - Regression check: run related tests to ensure fix didn't break adjacent behavior.
398
+
399
+ ## See Also
400
+
401
+ - **root-cause-tracing** - Deep call-stack tracing to identify original trigger before fixing
402
+ - **condition-based-waiting** - Stabilize timing/race-condition fixes with state-based waits
@@ -23,14 +23,15 @@ dependencies: []
23
23
  **LSP → Search → Swarm → Memory → File Operations**
24
24
 
25
25
  1. **LSP** - Semantic code intelligence (9 operations via unified tool)
26
- 2. **grep** - Fast text search (logs, config, code patterns)
27
- 3. **glob** - File discovery by name pattern
28
- 4. **skill** - Load skills for specialized knowledge
29
- 5. **task** - Parallel subagent execution
30
- 6. **Swarm tool** - swarm (plan, monitor, delegate, sync operations)
31
- 7. **Memory tools** - memory-search, memory-read, memory-update, memory-admin
32
- 8. **Research tools** - context7, websearch, codesearch, grepsearch
33
- 9. **read/edit/write** - File operations (always read before edit)
26
+ 2. **tilth** (MCP) - AST-aware code search + smart file reading. Replaces grep/glob/read for code navigation when available
27
+ 3. **grep** - Fast text search (logs, config, code patterns). Replaces bash rg/grep
28
+ 4. **glob** - File discovery by name pattern. Replaces bash find/ls
29
+ 5. **skill** - Load skills for specialized knowledge
30
+ 6. **task** - Parallel subagent execution
31
+ 7. **Swarm tool** - swarm (plan, monitor, delegate, sync operations)
32
+ 8. **Memory tools** - memory-search, memory-read, memory-update, memory-admin
33
+ 9. **Research tools** - context7, websearch, codesearch, grepsearch
34
+ 10. **read/edit/write** - File operations (always read before edit)
34
35
 
35
36
  **Golden Rule**: Always `read` before `edit` to verify content.
36
37
 
@@ -130,20 +131,37 @@ Task({
130
131
 
131
132
  ### Research Tools
132
133
 
133
- | Tool | Purpose | When to Use |
134
- | ----------------- | ---------------------------- | ----------------------- |
135
- | **context7** | Library documentation lookup | API reference, examples |
136
- | **websearch** | Recent info, troubleshooting | Docs not in Context7 |
137
- | **codesearch** | Real implementation patterns | GitHub code examples |
138
- | **grepsearch** | Cross-repo patterns | grep.app search |
139
- | **webfetch** | Specific URL content | User-provided links |
140
- | **review (Task)** | Second opinion | Validate approach |
134
+ | Tool | Purpose | When to Use |
135
+ | ----------------- | --------------------------------------------------------------- | ----------------------- |
136
+ | **context7** | Library documentation lookup. Replaces manual doc searching | API reference, examples |
137
+ | **websearch** | Web search. Replaces browser for current info | Docs not in Context7 |
138
+ | **codesearch** | Code examples from GitHub. Replaces manual GitHub search | Real-world patterns |
139
+ | **grepsearch** | Cross-repo code patterns. Replaces browsing GitHub for examples | grep.app search |
140
+ | **webfetch** | Fetch specific URL content. Replaces curl/browser | User-provided links |
141
+ | **review (Task)** | Second opinion | Validate approach |
141
142
 
142
143
  **context7 operations:**
143
144
 
144
145
  - `resolve`: Find library ID from name (e.g., "react" → "/reactjs/react.dev")
145
146
  - `query`: Get documentation for a library topic
146
147
 
148
+ ### With tilth MCP (When Available)
149
+
150
+ tilth provides AST-aware code intelligence. When installed, prefer tilth tools over built-in equivalents:
151
+
152
+ | Need | Without tilth | With tilth | Why tilth wins |
153
+ | --------------- | -------------------- | ------------------------------- | ------------------------------------------------------- |
154
+ | Find symbol | `grep` + `read` | `tilth_search` (expand: 2) | Returns definitions with inline source — no second read |
155
+ | Read large file | `read` (full) | `tilth_read` | Auto-outlines, shows structure; section drill-down |
156
+ | Find files | `glob` | `tilth_files` | Adds token estimates per file |
157
+ | Find callers | `lsp(incomingCalls)` | `tilth_search(kind: "callers")` | Cross-language, structural matching |
158
+ | Blast radius | Manual tracing | `tilth_deps` | Shows imports + downstream callers automatically |
159
+
160
+ **WHEN to use tilth_deps**: Before renaming, removing, or changing the signature of an export.
161
+ **SKIP**: When adding new code, fixing internal bugs, or just reading.
162
+
163
+ **IMPORTANT**: Expanded tilth_search results include full source code — do NOT re-read files already shown in search output.
164
+
147
165
  ## Workflow Pattern
148
166
 
149
167
  ```typescript
@@ -1,131 +1,9 @@
1
1
  ---
2
- name: ui-ux-research
3
- description: Use when analyzing UI patterns across codebases, comparing design system implementations, auditing UI consistency, or understanding existing patterns before implementation
4
- version: 1.0.0
5
- tags: [design, research]
6
- dependencies: []
2
+ description: "Merged into design-system-audit. Load that skill instead."
7
3
  ---
8
4
 
9
- # UI/UX Research Skill
5
+ # UI/UX Research
10
6
 
11
- ## When to Use
12
-
13
- - Analyzing UI patterns across large codebases
14
- - Comparing design system implementations
15
- - Auditing UI consistency
16
- - Understanding existing patterns before implementation
17
-
18
- ## When NOT to Use
19
-
20
- - Single-file UI changes without broader pattern investigation.
21
-
22
-
23
- ## Research Patterns
24
-
25
- ### Find All UI Components
26
-
27
- ```
28
- Analyze the components directory.
29
- List all UI components with their props interfaces.
30
- ```
31
-
32
- ### Audit Design System Consistency
33
-
34
- ```
35
- Check design token usage consistency:
36
- - Colors
37
- - Spacing
38
- - Typography
39
-
40
- Identify inconsistencies and suggest consolidation.
41
- ```
42
-
43
- ### Compare UI Implementations
44
-
45
- ```
46
- Compare layout patterns across pages.
47
- Identify inconsistencies and recommend standardization.
48
- ```
49
-
50
- ### Accessibility Audit
51
-
52
- ```
53
- Audit components for WCAG compliance:
54
- - Color contrast
55
- - ARIA labels
56
- - Keyboard navigation
57
-
58
- Prioritize issues by severity.
59
- ```
60
-
61
- ### Responsive Design Review
62
-
63
- ```
64
- Find all responsive breakpoints and media queries.
65
- Assess mobile-first compliance.
66
- Identify missing responsive considerations.
67
- ```
68
-
69
- ## Pattern Search Template
70
-
71
- ```
72
- Has [PATTERN] been implemented?
73
-
74
- Show:
75
- 1. Files containing the pattern
76
- 2. Implementation approach
77
- 3. Consistency across usages
78
- 4. Potential improvements
79
- ```
80
-
81
- **Common patterns to search:**
82
-
83
- - Dark mode toggle
84
- - Form validation
85
- - Loading states
86
- - Error boundaries
87
- - Toast notifications
88
- - Modal dialogs
89
- - Data tables
90
-
91
- ## Integration with Beads
92
-
93
- For task-constrained research:
94
-
95
- 1. Check bead spec constraints
96
- 2. Research within those constraints
97
- 3. Save findings to bead artifacts
98
-
99
- ## Storage
100
-
101
- Save research findings to `.opencode/memory/design/research/`
102
-
103
- ## Output Format
104
-
105
- ```markdown
106
- ## Research: [Topic]
107
-
108
- ### Findings
109
-
110
- [Key discoveries]
111
-
112
- ### Current Implementation
113
-
114
- [What exists]
115
-
116
- ### Recommendations
117
-
118
- [What to improve]
119
-
120
- ### Next Steps
121
-
122
- [Actionable items]
123
- ```
124
-
125
- ## Related Skills
126
-
127
- | After Research | Use Skill |
128
- | --------------------------- | --------------------- |
129
- | Need implementation | `mockup-to-code` |
130
- | Need aesthetic improvements | `frontend-design` |
131
- | Need accessibility fixes | `accessibility-audit` |
7
+ > This skill has been merged into `design-system-audit` which now covers UI pattern analysis, design token auditing, and visual comparison.
8
+ >
9
+ > Load `design-system-audit` instead.
@@ -132,6 +132,42 @@ Skip any step = lying, not verifying
132
132
  ❌ Trust agent report
133
133
  ```
134
134
 
135
+ ## Smart Verification
136
+
137
+ The Iron Law demands evidence, but evidence should be gathered efficiently.
138
+
139
+ ### Incremental by Default
140
+
141
+ Unless shipping or `--full` is passed, verify only what changed:
142
+
143
+ - **Lint**: `oxlint <changed-files>` instead of linting the entire codebase
144
+ - **Test**: `vitest run --changed` instead of running all tests
145
+ - **Typecheck**: always full (type errors propagate across files)
146
+
147
+ See the [Verification Protocol](./references/VERIFICATION_PROTOCOL.md) for exact commands.
148
+
149
+ ### Parallel Execution
150
+
151
+ Run independent gates simultaneously to reduce wall-clock time:
152
+
153
+ ```
154
+ Parallel: typecheck + lint → both must pass
155
+ Sequential: test → build (ship only)
156
+ ```
157
+
158
+ Total time = max(typecheck, lint) + test, not typecheck + lint + test.
159
+
160
+ ### Verification Cache
161
+
162
+ If you just verified and nothing changed, don't re-verify:
163
+
164
+ 1. After gates pass, record a stamp in `.beads/verify.log`
165
+ 2. Before running gates, compare current state to last stamp
166
+ 3. If match → report cached PASS, skip redundant work
167
+ 4. Cache is always bypassed for `--full` and ship/release
168
+
169
+ This matters when other commands need verification (e.g., closing beads, `/ship`). If you verified 30 seconds ago and made no changes, the cache lets you skip.
170
+
135
171
  ## Why This Matters
136
172
 
137
173
  From 24 failure memories:
@@ -1,21 +1,69 @@
1
1
  # Verification Protocol
2
2
 
3
+ ## Default: Incremental Mode
4
+
5
+ **Incremental is the default.** Only switch to full mode when:
6
+
7
+ - `--full` flag is explicitly passed
8
+ - Shipping/releasing (pre-merge, CI pipeline)
9
+ - More than 20 files changed
10
+
11
+ ### Changed Files Detection
12
+
13
+ ```bash
14
+ # Get changed files (uncommitted + staged + untracked)
15
+ CHANGED=$({
16
+ git diff --name-only --diff-filter=d HEAD -- '*.ts' '*.tsx' '*.js' '*.jsx'
17
+ git ls-files --others --exclude-standard -- '*.ts' '*.tsx' '*.js' '*.jsx'
18
+ } | sort -u)
19
+
20
+ # If in a bead worktree, diff against the branch point:
21
+ # CHANGED=$({
22
+ # git diff --name-only --diff-filter=d main...HEAD -- '*.ts' '*.tsx' '*.js' '*.jsx'
23
+ # git ls-files --others --exclude-standard -- '*.ts' '*.tsx' '*.js' '*.jsx'
24
+ # } | sort -u)
25
+
26
+ # Count for mode decision
27
+ FILE_COUNT=$(echo "$CHANGED" | grep -c .)
28
+ # > 20 files → switch to full mode automatically
29
+ ```
30
+
3
31
  ## Standard Gates
4
32
 
5
- Run these gates in parallel where possible:
33
+ ### Gate Execution Order
34
+
35
+ ```
36
+ ┌─────────────────────────────────────┐
37
+ │ Parallel (run simultaneously) │
38
+ │ ┌─────────────┐ ┌───────────────┐ │
39
+ │ │ Typecheck │ │ Lint │ │
40
+ │ │ (always │ │ (changed │ │
41
+ │ │ full) │ │ files only) │ │
42
+ │ └──────┬──────┘ └──────┬────────┘ │
43
+ │ └───────┬───────┘ │
44
+ │ both must pass │
45
+ ├─────────────────────────────────────┤
46
+ │ Sequential (after parallel passes) │
47
+ │ ┌─────────────┐ ┌───────────────┐ │
48
+ │ │ Test │ │ Build │ │
49
+ │ │ (--changed │ │ (ship/release│ │
50
+ │ │ or full) │ │ only) │ │
51
+ │ └─────────────┘ └───────────────┘ │
52
+ └─────────────────────────────────────┘
53
+ ```
6
54
 
7
55
  ### Parallel Group (independent — run simultaneously)
8
56
 
9
57
  ```bash
10
- # Gate 1: Typecheck
58
+ # Gate 1: Typecheck (always full — type errors propagate across files)
11
59
  npm run typecheck 2>&1 &
12
60
  PID_TC=$!
13
61
 
14
- # Gate 2: Lint (incremental when possible)
15
- # Full codebase:
16
- npm run lint 2>&1 &
17
- # Or incremental (changed files only):
18
- # npx oxlint $(git diff --name-only --diff-filter=d HEAD | grep -E '\.(ts|tsx|js|jsx)$')
62
+ # Gate 2: Lint
63
+ # Incremental (default): lint only changed files
64
+ npx oxlint $CHANGED 2>&1 &
65
+ # Full mode: lint everything
66
+ # npm run lint 2>&1 &
19
67
  PID_LINT=$!
20
68
 
21
69
  wait $PID_TC $PID_LINT
@@ -24,44 +72,100 @@ wait $PID_TC $PID_LINT
24
72
  ### Sequential Group (depends on parallel group passing)
25
73
 
26
74
  ```bash
27
- # Gate 3: Tests (incremental when possible)
28
- # Full: npm test
29
- # Incremental: npx vitest --changed
30
- npm test
75
+ # Gate 3: Tests
76
+ # Incremental (default): only tests affected by changed files
77
+ npx vitest run --changed
78
+ # Full mode: run all tests
79
+ # npm test
80
+
81
+ # Gate 4: Build (only if shipping/releasing)
82
+ # npm run build
83
+ ```
84
+
85
+ ### Gate Commands Summary
86
+
87
+ | Gate | Incremental (default) | Full (`--full`) | When |
88
+ | --------- | ---------------------------- | ------------------- | ----------------- |
89
+ | Typecheck | `npm run typecheck` | `npm run typecheck` | Always (parallel) |
90
+ | Lint | `npx oxlint <changed-files>` | `npm run lint` | Always (parallel) |
91
+ | Test | `npx vitest run --changed` | `npm test` | Always |
92
+ | Build | Skip | `npm run build` | Ship/release only |
93
+
94
+ ## Verification Cache
95
+
96
+ Avoid redundant verification when nothing changed since the last successful run.
97
+
98
+ ### Cache Protocol
99
+
100
+ After all gates pass, record a verification stamp:
101
+
102
+ ```bash
103
+ # Compute fingerprint: commit hash + full diff content + untracked files
104
+ # This ensures the stamp changes on ANY code change (commit, edit, or new file)
105
+ STAMP=$(printf '%s\n%s\n%s' \
106
+ "$(git rev-parse HEAD)" \
107
+ "$(git diff HEAD -- '*.ts' '*.tsx' '*.js' '*.jsx')" \
108
+ "$(git ls-files --others --exclude-standard -- '*.ts' '*.tsx' '*.js' '*.jsx' | xargs cat 2>/dev/null)" \
109
+ | shasum -a 256 | cut -d' ' -f1)
110
+
111
+ echo "$STAMP $(date -u +%Y-%m-%dT%H:%M:%SZ) PASS" >> .beads/verify.log
112
+ ```
113
+
114
+ ### Skip Check (before running gates)
31
115
 
32
- # Gate 4: Build (only if shipping)
33
- npm run build
116
+ ```bash
117
+ # Read last verification stamp
118
+ LAST_STAMP=$(tail -1 .beads/verify.log 2>/dev/null | awk '{print $1}')
119
+
120
+ # Recompute current fingerprint (same formula as recording)
121
+ CURRENT_STAMP=$(printf '%s\n%s\n%s' \
122
+ "$(git rev-parse HEAD)" \
123
+ "$(git diff HEAD -- '*.ts' '*.tsx' '*.js' '*.jsx')" \
124
+ "$(git ls-files --others --exclude-standard -- '*.ts' '*.tsx' '*.js' '*.jsx' | xargs cat 2>/dev/null)" \
125
+ | shasum -a 256 | cut -d' ' -f1)
126
+
127
+ if [ "$LAST_STAMP" = "$CURRENT_STAMP" ]; then
128
+ echo "Verification cached: no changes since last PASS"
129
+ # Skip gates — report cached result
130
+ else
131
+ # Run gates normally
132
+ fi
34
133
  ```
35
134
 
36
- ## Incremental Mode
135
+ ### When Cache is Invalidated
136
+
137
+ - Any file edited, staged, or committed since last verification
138
+ - `--full` flag always bypasses cache
139
+ - Manual `--no-cache` flag bypasses cache
140
+ - Different bead context (bead ID changed)
37
141
 
38
- Use incremental mode when:
142
+ ### Agent Behavior
39
143
 
40
- - Only a few files changed (< 20 files)
41
- - Not shipping/releasing (pre-commit, mid-development)
144
+ When another command needs verification (e.g., closing a bead, `/ship`):
42
145
 
43
- | Gate | Full Command | Incremental Command |
44
- | --------- | ------------------- | ------------------------------------------ |
45
- | Typecheck | `npm run typecheck` | `npm run typecheck` (always full — needed) |
46
- | Lint | `npm run lint` | `npx oxlint $(git diff --name-only HEAD)` |
47
- | Test | `npm test` | `npx vitest --changed` |
48
- | Build | `npm run build` | Skip (only needed for ship/release) |
146
+ 1. **Check cache first** if clean, report `"Verification: cached PASS (no changes since <timestamp>)"`
147
+ 2. **If cache miss** run incremental gates normally
148
+ 3. **Always record** append to `verify.log` after successful run
149
+ 4. **Never skip on ship/release** always run full mode regardless of cache
49
150
 
50
151
  ## Gate Results Format
51
152
 
52
153
  Report results as:
53
154
 
54
155
  ```text
55
- | Gate | Status | Time |
56
- |-----------|--------|--------|
57
- | Typecheck | PASS | 2.1s |
58
- | Lint | PASS | 0.8s |
59
- | Test | PASS | 5.3s |
60
- | Build | SKIP | — |
156
+ | Gate | Status | Mode | Time |
157
+ |-----------|--------|-------------|--------|
158
+ | Typecheck | PASS | full | 2.1s |
159
+ | Lint | PASS | incremental | 0.3s |
160
+ | Test | PASS | incremental | 1.2s |
161
+ | Build | SKIP | — | — |
61
162
  ```
62
163
 
164
+ Include the mode column so it's clear whether incremental or full was used.
165
+
63
166
  ## Failure Handling
64
167
 
65
168
  - If any gate fails, stop and fix before proceeding
66
169
  - Show the FULL error output for failed gates
67
170
  - After fixing, re-run ONLY the failed gate(s) + any downstream gates
171
+ - Cache is NOT written on failure — next run will execute gates normally
@@ -8,6 +8,8 @@ dependencies: []
8
8
 
9
9
  # Visual Analysis Skill
10
10
 
11
+ > **Replaces** guessing at visual properties from code alone — direct inspection of rendered output for colors, layout, spacing, and typography
12
+
11
13
  ## When to Use
12
14
 
13
15
  - Analyzing UI mockups or screenshots
@@ -19,6 +21,12 @@ dependencies: []
19
21
 
20
22
  - Pure text/code review without any visual assets.
21
23
 
24
+ ## Workflow
25
+
26
+ 1. **Capture** — Get the image (screenshot, mockup, or user-provided)
27
+ 2. **Analyze** — Use vision agent to extract specific properties (colors as hex, font sizes, spacing in px/rem)
28
+ 3. **Compare** — Cross-reference extracted values against design tokens and existing CSS
29
+ 4. **Report** — List discrepancies with specific values and file locations
22
30
 
23
31
  ## Quick Mode
24
32
 
@@ -131,11 +139,16 @@ Output CSS/Tailwind structure.
131
139
 
132
140
  Save findings to `.opencode/memory/design/analysis/`
133
141
 
134
- ## Related Skills
142
+ ## Anti-Patterns
143
+
144
+ | Anti-Pattern | Why It Fails | Instead |
145
+ | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
146
+ | Describing layout vaguely ("looks good") instead of extracting specific values | Feedback is non-actionable and hard to validate | Report measurable values (hex, px/rem, font size/weight) with locations |
147
+ | Not comparing against existing design tokens | Findings drift from system standards and create inconsistent recommendations | Map extracted values to tokens first, then flag true mismatches |
148
+ | Analyzing low-resolution screenshots (artifacts mislead analysis) | Compression/noise causes false readings for spacing and color | Request higher-resolution captures or zoomed crops before final conclusions |
149
+
150
+ ## See Also
135
151
 
136
- | Need | Skill |
137
- | --------------------------- | --------------------- |
138
- | Found accessibility issues | `accessibility-audit` |
139
- | Need to implement design | `mockup-to-code` |
140
- | Want design tokens | `design-system-audit` |
141
- | Need aesthetic improvements | `frontend-design` |
152
+ - `mockup-to-code`
153
+ - `design-system-audit`
154
+ - `accessibility-audit`
@@ -8,6 +8,7 @@ dependencies: []
8
8
 
9
9
  # Writing Plans
10
10
 
11
+ > **Replaces** vague implementation plans that assume the engineer knows the codebase — produces zero-ambiguity plans with exact file paths and complete code examples
11
12
  ## When to Use
12
13
 
13
14
  - Design/PRD is complete and you need a detailed, step-by-step implementation plan
@@ -311,3 +312,9 @@ After saving the plan, offer execution choice:
311
312
  - **REQUIRED SUB-SKILL:** New session uses skill({ name: "executing-plans" })
312
313
  ```
313
314
  ````
315
+
316
+ ## See Also
317
+
318
+ - `executing-plans` - Execute vetted plans in controlled batches with checkpoints
319
+ - `prd` - Convert validated design into explicit behavioral requirements
320
+ - `brainstorming` - Refine rough ideas and constraints before specification/planning
@@ -22,7 +22,15 @@ interface SearchResponse {
22
22
  * Operations: resolve (find library ID), query (get docs)
23
23
  */
24
24
  export default tool({
25
- description: `Context7 documentation lookup: resolve library IDs and query docs.
25
+ description: `Context7 documentation lookup: resolve library IDs and query docs. Replaces manual doc searching and outdated API guessing — use this for all library documentation needs.
26
+
27
+ WHEN: Looking up library APIs, checking function signatures, finding usage examples.
28
+ SKIP: Searching your own codebase (use grep/LSP), general web research (use websearch).
29
+
30
+ Common mistakes:
31
+ - DON'T search for internal project code (use grep/tilth instead)
32
+ - DON'T guess library versions — always resolve first, then query
33
+ - DON'T use for general web research (use websearch instead)
26
34
 
27
35
  Operations:
28
36
  - "resolve": Find library ID from name (e.g., "react" → "/reactjs/react.dev")
@@ -15,7 +15,15 @@ interface GrepResponse {
15
15
  }
16
16
 
17
17
  export default tool({
18
- description: `Search real-world code examples from GitHub repositories via grep.app.
18
+ description: `Search real-world code examples from GitHub repositories via grep.app. Replaces asking "how do others use X?" — use this for finding production patterns and real-world API usage.
19
+
20
+ WHEN: Implementing unfamiliar APIs, looking for production patterns, understanding library integrations.
21
+ SKIP: Searching your own codebase (use grep/tilth), looking up docs (use context7), general research (use websearch).
22
+
23
+ Common mistakes:
24
+ - DON'T search for keywords like "react tutorial" — search for literal code: "useState("
25
+ - DON'T use without language filter when searching common patterns
26
+ - DON'T ignore the repo filter when you know which project to search
19
27
 
20
28
  Use when:
21
29
  - Implementing unfamiliar APIs - see how others use a library
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodekit",
3
- "version": "0.18.3",
3
+ "version": "0.18.5",
4
4
  "description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
5
5
  "keywords": [
6
6
  "agents",