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
@@ -1,164 +1,173 @@
1
1
  ---
2
2
  name: context-management
3
- description: Use when context is growing large, needing to prune/distill tool outputs, or managing conversation size - covers DCP slash commands and context budgets
4
- version: 1.0.0
5
- tags: [context, workflow]
3
+ description: Unified protocol for context health and session lifecycle management using DCP tools, thresholds, handoff, and resume workflows
4
+ version: 2.0.0
5
+ tags: [context, workflow, session]
6
6
  dependencies: []
7
7
  ---
8
8
 
9
9
  # Context Management
10
10
 
11
+ > **Replaces** manual context tracking and ad-hoc session management — unified protocol for context health across a session lifecycle
12
+
13
+ Use this skill to keep context useful from first turn to final handoff.
14
+
11
15
  ## When to Use
12
16
 
13
- - Context is growing large and you need to compress/distill/prune tool outputs
14
- - You are finishing a phase and want to preserve signal while freeing tokens
17
+ - Context size is growing and you need to reduce noise without losing critical details
18
+ - You are finishing a work phase and want to compress completed exploration/implementation
19
+ - You are preparing `/handoff` or resuming a prior session
20
+ - You need to recover relevant prior context with `find_sessions`, `read_session`, and memory files
15
21
 
16
22
  ## When NOT to Use
17
23
 
18
- - You still need active file contents for upcoming edits
19
- - The output is protected or required for immediate modifications
20
-
24
+ - You are actively editing files whose raw content must remain exact
25
+ - You are in a short, single-step task that will finish before context pressure appears
21
26
 
22
- ## Tool Hierarchy (v2.2+ Philosophy)
27
+ ## Core Principle
23
28
 
24
- DCP beta shifted to a compress-first approach. Follow this order strictly:
29
+ Prefer **phase-level compression** over reactive cleanup.
25
30
 
26
- ```
31
+ ```text
27
32
  compress > distill > prune
28
33
  ```
29
34
 
30
- | Tool | Use When | Cache Impact |
31
- | ---------- | ------------------------------------------------------ | ------------ |
32
- | `compress` | A phase of work is complete collapse the whole phase | Minimal |
33
- | `distill` | Large raw output with extractable value to preserve | Low |
34
- | `prune` | Pure noise: wrong target, irrelevant, zero value | Moderate |
35
+ - **compress**: Best default when a phase is complete
36
+ - **distill**: Use when you must preserve technical detail but can remove bulky raw outputs
37
+ - **prune**: Use only for true noise you are certain will never be needed
35
38
 
36
- **Why this matters:** Granular `prune` calls trigger cache invalidation on every provider, especially Anthropic. Compressing whole phases instead of surgically deleting individual outputs is cheaper, faster, and more reliable.
39
+ ## DCP Tool Usage
37
40
 
38
- **Never prune because it's convenient. Only prune true noise.**
41
+ ### `/dcp compress`
39
42
 
40
- ## DCP Slash Commands (Recommended)
43
+ Use for completed chapters of work (research, implementation wave, review sweep).
41
44
 
42
- | Command | Purpose | When to Use |
43
- | ----------------------- | ---------------------------------------- | ----------------------------------- |
44
- | `/dcp compress [focus]` | Collapse conversation range into summary | Phase complete, research done |
45
- | `/dcp distill [focus]` | Distill key findings before removing | Large outputs with valuable details |
46
- | `/dcp sweep [count]` | Prune all tools since last user message | Cleanup pure noise only |
47
- | `/dcp context` | Show token breakdown by category | Check context usage |
48
- | `/dcp stats` | Show cumulative pruning stats | Review efficiency |
45
+ - Best for large ranges of now-stable outputs
46
+ - Lowest cognitive overhead on later turns
47
+ - Usually lowest risk of deleting needed details
49
48
 
50
- ## Tool Calls (Fallback)
49
+ ### `/dcp distill`
51
50
 
52
- Use when slash commands aren't suitable:
51
+ Use when raw output is large but details still matter later.
53
52
 
54
- | Tool | Purpose | When to Use |
55
- | ---------- | ----------------------------- | ------------------------------------- |
56
- | `compress` | Collapse conversation range | Phase complete, research done |
57
- | `distill` | Extract key info, then remove | Large outputs with valuable details |
58
- | `prune` | Remove tool outputs (no save) | Noise only — irrelevant, never-needed |
53
+ Include concrete facts in distillation:
59
54
 
60
- **Note:** Prefer `/dcp compress` slash command over the `compress` tool — better boundary matching.
55
+ - function signatures
56
+ - constraints and assumptions
57
+ - file paths and key decisions
58
+ - verification outcomes
61
59
 
62
- ## Phase-Boundary Compress Triggers
60
+ ### `/dcp prune`
63
61
 
64
- The most effective compress timing is at natural phase endings. For the Compound Engineering loop:
62
+ Use only for irrelevant/noise outputs:
65
63
 
66
- | Phase ends | What to compress | Keep |
67
- | --------------------- | ---------------------------------------- | --------------------------------- |
68
- | `/plan` research done | Exploration turns, scout/explore outputs | Plan.md facts, key decisions |
69
- | `/ship` wave complete | Implementation turns, read file outputs | Commit refs, verification results |
70
- | `/review` complete | Raw agent outputs (all 5 reviewers) | Synthesized findings summary |
71
- | `/compound` done | Entire compound loop session | Observation titles stored |
72
- | Session → handoff | Everything since last compress | Handoff doc summary |
64
+ - wrong-target searches
65
+ - failed dead-end exploration no longer needed
66
+ - duplicate or superseded junk output
73
67
 
74
- **Rule:** Every completed phase is a compress candidate. Don't wait until context is full — compress as chapters close.
68
+ Do **not** prune because output is "long". Length alone is not noise.
75
69
 
76
- ## DCP Auto-Strategies
70
+ ## Session Lifecycle Protocol
77
71
 
78
- DCP runs these automatically at zero LLM cost — don't manually manage these:
72
+ ### 1) Start Session
79
73
 
80
- - **Deduplication** removes duplicate tool calls (same tool + same args)
81
- - **Supersede Writes** removes write inputs when file is later read
82
- - **Purge Errors** removes errored tool inputs after 4 turns
74
+ 1. Load task spec and essential policy docs only
75
+ 2. Check context health (`/dcp context`)
76
+ 3. Pull prior work only if needed:
77
+ - `find_sessions({ query })`
78
+ - `read_session({ session_id, focus })`
79
+ - `memory-read({ file })` or `memory-search({ query })`
83
80
 
84
- ## When to Evaluate
81
+ ### 2) During Active Work
85
82
 
86
- **DO evaluate at:**
83
+ - Keep active files readable until edits are done
84
+ - At each natural boundary, evaluate compress candidates
85
+ - Distill high-value technical outputs before removal
87
86
 
88
- - Start of new turn after receiving user message (best timing — you know what's needed next)
89
- - Phase boundary: research done, implementation wave done, review done
90
- - Large tool output just returned that won't be needed for upcoming edits
91
- - Information superseded by newer, more specific output
87
+ ### 3) Pre-Handoff / Closeout
92
88
 
93
- **DO NOT manage when:**
89
+ 1. Compress completed phase ranges
90
+ 2. Persist key decisions/learnings to memory (observation or memory-update)
91
+ 3. Create concise handoff summary (what changed, what is pending, known risks)
94
92
 
95
- - Output needed for upcoming file edits (read files stay until edit is done)
96
- - Contains active file contents you're about to modify
97
- - Uncertain if you'll need it — defer until certain
98
- - DCP auto-strategies already handle it
93
+ ### 4) Resume Session
99
94
 
100
- ## Protected Content
95
+ 1. Rehydrate only relevant context (don’t replay everything)
96
+ 2. Validate assumptions against current files/git state
97
+ 3. Continue with fresh context budget, not accumulated clutter
101
98
 
102
- Auto-protected from pruning (v2.1.7+):
99
+ ## Context Budget Thresholds
103
100
 
104
- - `write` and `edit` tool outputs
105
- - `.env*` files
106
- - `AGENTS.md`
107
- - `.opencode/**` config
108
- - `.beads/**` tasks
109
- - `package.json`, `tsconfig.json`
101
+ Use these thresholds as operational triggers:
110
102
 
111
- Don't manually protect what's already protected.
103
+ | Threshold | Interpretation | Required Action |
104
+ | --- | --- | --- |
105
+ | <50k | Healthy start | Keep inputs minimal, avoid unnecessary reads |
106
+ | 50k–100k | Moderate growth | Compress completed phases, keep active files intact |
107
+ | >100k | High pressure | Aggressively compress by phase; distill critical leftovers |
108
+ | >150k | Near capacity | Perform handoff and resume in a fresh session |
112
109
 
113
- ## Distill — Preserve + Remove
110
+ Secondary guardrails:
114
111
 
115
- Extract high-fidelity knowledge from tool outputs, then remove the raw output. Distillation must be a **complete technical substitute** — capture signatures, types, logic, constraints, everything essential.
112
+ - ~70%: Consolidate and drop stale exploration
113
+ - ~85%: Plan handoff window at next natural break
114
+ - ~95%: Immediate cleanup or restart required
116
115
 
117
- ```typescript
118
- distill({
119
- targets: [
120
- {
121
- id: "10",
122
- distillation:
123
- "auth.ts: validateToken(token: string) -> User|null, uses bcrypt 12 rounds, throws on expired tokens",
124
- },
125
- {
126
- id: "11",
127
- distillation:
128
- "user.ts: interface User { id: string, email: string, permissions: Permission[], status: 'active'|'suspended' }",
129
- },
130
- ],
131
- });
132
- ```
116
+ ## Phase Boundary Triggers
133
117
 
134
- ## Context Budget Guidelines
118
+ Compress at these boundaries:
135
119
 
136
- | Phase | Target | Action |
137
- | ----------------- | ------- | ------------------------------------------------- |
138
- | Starting work | <50k | Load only essential AGENTS.md + task spec |
139
- | Mid-task | 50-100k | Compress completed phases, keep active files |
140
- | Approaching limit | >100k | Compress aggressively by phase, distill remaining |
141
- | Near capacity | >150k | Session restart with handoff |
120
+ - Research complete → compress exploration + search outputs
121
+ - Implementation wave complete compress completed read/edit/test cycles
122
+ - Review complete compress raw reviewer outputs, keep synthesized findings
123
+ - Before `/handoff` compress everything non-essential since last checkpoint
142
124
 
143
- At >100k: prefer compressing full phases over distilling individual outputs. The cache cost is lower.
125
+ Rule: **Completed phases should not remain uncompressed for long.**
144
126
 
145
- ## Quick Reference
127
+ ## Context Transfer Sources (Cross-Session)
146
128
 
129
+ Use in priority order:
130
+
131
+ 1. Memory artifacts (`memory-search`, `memory-read`, observations)
132
+ 2. Session history (`find_sessions`, `read_session`)
133
+ 3. Task tracker state (`br show <id>` when applicable)
134
+ 4. Git evidence (`git diff`, `git log`, test output)
135
+
136
+ Carry forward decisions and constraints, not every intermediate log.
137
+
138
+ ## Anti-Patterns
139
+
140
+ | Anti-Pattern | Why It Hurts | Correct Pattern |
141
+ | --- | --- | --- |
142
+ | Compressing active work areas (losing precision needed for edits) | Removes exact lines needed for safe edits | Keep active file/tool outputs until edit + verification complete |
143
+ | Pruning tool outputs you'll need later | Forces rework and increases error risk | Distill first, then remove raw output |
144
+ | Not compressing completed exploration phases | Bloats context and degrades later turns | Compress immediately at phase completion |
145
+ | Session handoff without persisting key decisions to memory | Next session loses rationale and constraints | Write observations/memory updates before handoff |
146
+
147
+ ## Verification
148
+
149
+ Check context health: are completed phases compressed? Are active files still readable?
150
+
151
+ Before claiming cleanup done, confirm:
152
+
153
+ - Active edit targets are still present in readable form
154
+ - Completed phases are compressed/distilled
155
+ - No critical decision exists only in transient tool output
156
+ - Handoff includes next actions and blockers
157
+
158
+ ## Quick Playbook
159
+
160
+ ```text
161
+ 1) Start turn: /dcp context
162
+ 2) Identify completed phase ranges
163
+ 3) compress completed ranges
164
+ 4) distill high-value technical outputs
165
+ 5) prune true noise only
166
+ 6) persist key decisions to memory
167
+ 7) handoff/resume with focused rehydration
147
168
  ```
148
- HIERARCHY: compress > distill > prune
149
- TIMING: manage at turn START, not turn END
150
- PHASE ENDS = compress trigger
151
-
152
- DCP SLASH COMMANDS (preferred):
153
- /dcp compress [focus] → Collapse completed phase
154
- /dcp distill [focus] → Distill key findings
155
- /dcp sweep [count] → Prune pure noise only
156
- /dcp context → Show token breakdown
157
-
158
- TOOL CALLS (fallback):
159
- compress({ topic, content: { startId, endId, summary } })
160
- distill({ targets: [{ id, distillation }] })
161
- prune({ ids: [...] }) ← last resort only
162
-
163
- BUDGET: <50k start → 50-100k compress phases → >100k aggressive → >150k restart
164
- ```
169
+
170
+ ## See Also
171
+
172
+ - `memory-system`
173
+ - `compaction`
@@ -8,6 +8,8 @@ dependencies: []
8
8
 
9
9
  # Defense-in-Depth Validation
10
10
 
11
+ > **Replaces** single-layer validation where bad data propagates silently until it causes cryptic failures deep in execution
12
+
11
13
  ## When to Use
12
14
 
13
15
  - A bug is caused by invalid data flowing through multiple layers
@@ -18,6 +20,15 @@ dependencies: []
18
20
  - Simple, single-layer validation at an obvious entry point is enough
19
21
  - The issue is unrelated to invalid data or boundary checks
20
22
 
23
+ ## Anti-Patterns
24
+
25
+ | Anti-Pattern | Why It Fails | Instead |
26
+ | --- | --- | --- |
27
+ | Validating only at the entry point (trusting downstream) | Alternate paths and refactors bypass one gate | Add independent checks at each boundary |
28
+ | Duplicating identical validation at every layer | Creates noise without improving safety | Tailor each layer to boundary-specific invariants |
29
+ | Catching and swallowing errors silently | Hides failures and delays detection | Raise explicit errors with actionable context |
30
+ | Mixing validation with business logic | Makes behavior hard to reason about and test | Keep validation checks explicit and separate from core logic |
31
+
21
32
  ## Overview
22
33
 
23
34
  When you fix a bug caused by invalid data, adding validation at one place feels sufficient. But that single check can be bypassed by different code paths, refactoring, or mocks.
@@ -144,3 +155,12 @@ All four layers were necessary. During testing, each layer caught bugs the other
144
155
  - Debug logging identified structural misuse
145
156
 
146
157
  **Don't stop at one validation point.** Add checks at every layer.
158
+
159
+ ## Verification
160
+
161
+ - Test with invalid input at each layer boundary — each should reject independently.
162
+ - Remove one validation layer — the next layer should still catch the error.
163
+
164
+ ## See Also
165
+
166
+ - **structured-edit** - Reliable read/verify/edit workflow when changing validation code across layers
@@ -1,152 +1,153 @@
1
1
  ---
2
2
  name: design-system-audit
3
- description: Use when auditing existing design systems for consistency, documenting undocumented design tokens, identifying design debt, preparing for design system refactoring, or comparing implementation vs design specs
4
- version: 1.0.0
5
- tags: [design, code-quality]
3
+ description: Unified design audit workflow for UI pattern analysis, design token auditing, and visual comparison against specs
4
+ version: 2.0.0
5
+ tags: [design, audit, ui]
6
6
  dependencies: []
7
7
  ---
8
8
 
9
- # Design System Audit Skill
9
+ # Design System Audit
10
+
11
+ > **Replaces** separate, overlapping design review skills — unified design analysis covering UI patterns, design tokens, and visual properties
12
+
13
+ Use this skill for end-to-end design analysis across code, screenshots, and design specs.
10
14
 
11
15
  ## When to Use
12
16
 
13
- - Auditing existing design systems for consistency
14
- - Documenting undocumented design tokens
15
- - Identifying design debt
16
- - Preparing for design system refactoring
17
- - Comparing implementation vs design specs
17
+ - Auditing UI consistency across a component library or app
18
+ - Documenting existing patterns before refactor or migration
19
+ - Extracting/validating design tokens from implementation and visuals
20
+ - Comparing rendered output against mockups/Figma/screenshots
18
21
 
19
22
  ## When NOT to Use
20
23
 
21
- - No design system or token set to analyze.
24
+ - Pure backend work with no user-facing UI
25
+ - One-off micro tweak where system-level consistency is irrelevant
22
26
 
27
+ ## Modes
23
28
 
24
- ## Core Workflow
29
+ ### UI Pattern Analysis
30
+ Analyze component patterns, identify inconsistencies, document undocumented patterns.
25
31
 
26
- ### Phase 1: Visual Inventory
32
+ Focus areas:
27
33
 
28
- ```
29
- Analyze application screenshots and create a visual inventory:
30
-
31
- 1. COLOR PALETTE
32
- - Primary colors (brand)
33
- - Secondary colors
34
- - Neutral/gray scale
35
- - Semantic colors (success, warning, error, info)
36
-
37
- 2. TYPOGRAPHY SCALE
38
- - Heading sizes (H1-H6)
39
- - Body text sizes
40
- - Font families used
41
- - Font weights observed
42
-
43
- 3. SPACING PATTERNS
44
- - Common padding values
45
- - Common margin values
46
- - Gap patterns
47
-
48
- 4. COMPONENT VARIANTS
49
- - Button styles
50
- - Input field styles
51
- - Card variations
52
-
53
- 5. INCONSISTENCIES DETECTED
54
- - Similar but different colors
55
- - Inconsistent spacing
56
- - Typography variations
57
-
58
- Output as structured JSON design tokens.
59
- ```
34
+ - Component variants and usage drift
35
+ - Repeated interaction patterns (forms, tables, dialogs, navigation)
36
+ - Pattern ownership (where canonical implementation should live)
37
+ - Inconsistent states (hover/focus/disabled/error/loading)
60
38
 
61
- ### Phase 2: Consistency Analysis
39
+ Deliverables:
62
40
 
63
- ```
64
- Compare visual inventory with code.
65
-
66
- Identify:
67
- 1. Tokens used in code but not in designs
68
- 2. Visual patterns not codified as tokens
69
- 3. Naming inconsistencies
70
- 4. Redundant/duplicate values
71
- 5. Missing semantic tokens
72
- ```
41
+ - Pattern inventory with file references
42
+ - Consolidation candidates
43
+ - Priority fixes by user impact
73
44
 
74
- ## Design Token Structure
75
-
76
- ```json
77
- {
78
- "color": {
79
- "primitive": {
80
- "blue": { "50": "#eff6ff", "500": "#3b82f6", "900": "#1e3a8a" }
81
- },
82
- "semantic": {
83
- "primary": "{color.primitive.blue.500}",
84
- "background": { "default": "#f9fafb", "muted": "#f3f4f6" },
85
- "text": { "default": "#111827", "muted": "#6b7280" }
86
- }
87
- },
88
- "spacing": { "1": "0.25rem", "2": "0.5rem", "4": "1rem", "8": "2rem" },
89
- "typography": {
90
- "fontFamily": { "sans": "Inter", "mono": "JetBrains Mono" },
91
- "fontSize": { "sm": "0.875rem", "base": "1rem", "lg": "1.125rem" }
92
- },
93
- "borderRadius": { "sm": "0.125rem", "md": "0.375rem", "lg": "0.5rem" }
94
- }
95
- ```
45
+ ### Design Token Audit
46
+ Extract and verify color, typography, spacing tokens against implementation.
96
47
 
97
- ## Audit Report Template
48
+ Focus areas:
98
49
 
99
- ```markdown
100
- # Design System Audit Report
50
+ - Color token usage vs one-off literals
51
+ - Typography scale consistency (size/weight/line-height)
52
+ - Spacing/radius/shadow value normalization
53
+ - Semantic token gaps (text-muted, border-subtle, success, warning, etc.)
101
54
 
102
- **Date:** [Date]
103
- **Application:** [Name]
55
+ Deliverables:
104
56
 
105
- ## Summary
57
+ - Token map (source of truth + current usage)
58
+ - Drift report (where implementation diverges)
59
+ - Proposed canonical token set and migration order
106
60
 
107
- - Total unique colors: X (recommended: <20)
108
- - Total spacing values: X (recommended: 8-12)
109
- - Typography variants: X
110
- - Consistency score: X/100
61
+ ### Visual Comparison
62
+ Compare rendered output against mockups/specs with specific measurements.
111
63
 
112
- ## Color Audit
64
+ Focus areas:
113
65
 
114
- | Category | Count | Issues |
115
- | ---------- | ----- | ------------ |
116
- | Primitives | X | X duplicates |
117
- | Semantics | X | X missing |
118
- | One-offs | X | Should be 0 |
66
+ - Pixel-level spacing/sizing mismatches
67
+ - Color differences (hex-level)
68
+ - Typography mismatches (font, size, weight, line height)
69
+ - Layout/responsive behavior across breakpoints
119
70
 
120
- ### Recommendations
71
+ Deliverables:
121
72
 
122
- 1. Consolidate similar colors
123
- 2. Add semantic tokens
124
- 3. Remove one-off colors
73
+ - Spec-vs-implementation discrepancy list
74
+ - Severity-ranked visual defects
75
+ - Concrete fix list with measurable targets
125
76
 
126
- ## Priority Actions
77
+ ## Recommended Workflow
127
78
 
128
- ### High Priority
79
+ 1. **Scope**
80
+ - Identify target surfaces (pages/components/states/breakpoints)
81
+ - Gather artifacts (code paths, screenshots, mockups)
129
82
 
130
- 1. [Action with impact]
83
+ 2. **Inventory**
84
+ - Capture pattern and token inventory from code + visuals
85
+ - Note duplicates, drift, and undocumented conventions
131
86
 
132
- ### Medium Priority
87
+ 3. **Cross-Reference**
88
+ - Validate findings against design system tokens/components
89
+ - Distinguish intentional exceptions from accidental drift
133
90
 
134
- 1. [Action]
91
+ 4. **Measure**
92
+ - Record measurable values for each issue:
93
+ - hex color
94
+ - px/rem size
95
+ - spacing/gap/padding values
96
+ - breakpoint-specific behavior
135
97
 
136
- ### Low Priority (Design Debt)
98
+ 5. **Report**
99
+ - Produce actionable findings with file:line and target value
100
+ - Group by severity and migration effort
137
101
 
138
- 1. [Action]
102
+ ## Audit Output Template
103
+
104
+ ```markdown
105
+ ## Design Audit: [Scope]
106
+
107
+ ### Findings
108
+ 1. [Severity] [Issue]
109
+ - File: `path/to/file.tsx:123`
110
+ - Current: `#6B7280`, `14px`, `gap: 10px`
111
+ - Expected: `var(--color-text-muted)`, `13px`, `gap: 8px`
112
+ - Impact: [consistency/accessibility/brand mismatch]
113
+
114
+ ### Token Drift Summary
115
+ - Colors: X one-offs, Y missing semantic mappings
116
+ - Typography: X non-scale values
117
+ - Spacing: X non-token values
118
+
119
+ ### Priority Actions
120
+ - P0: [high impact, low effort]
121
+ - P1: [high impact, medium effort]
122
+ - P2: [design debt cleanup]
139
123
  ```
140
124
 
125
+ ## Anti-Patterns
126
+
127
+ | Anti-Pattern | Why It Hurts | Better Approach |
128
+ | --- | --- | --- |
129
+ | Vague feedback ("looks good") instead of specific measurements | Not actionable, impossible to verify | Report concrete values (hex, px/rem, exact delta) |
130
+ | Not checking existing design tokens before proposing new values | Creates token sprawl and inconsistency | Map to existing tokens first; add new tokens only when justified |
131
+ | Auditing in isolation without cross-referencing the design system | Flags intentional patterns as bugs | Validate each finding against canonical component/token sources |
132
+ | Reporting visual issues without checking responsive breakpoints | Misses major UX regressions on mobile/tablet | Verify each issue across defined breakpoints and states |
133
+
134
+ ## Verification
135
+
136
+ After audit: every finding should reference a specific file:line and measurable value (hex color, px size, etc.)
137
+
138
+ Minimum quality gate:
139
+
140
+ - Each finding has location + current value + expected value
141
+ - Each recommendation maps to token/system guidance
142
+ - Responsive states checked for impacted components
143
+
141
144
  ## Storage
142
145
 
143
- Save audit reports to `.opencode/memory/design/audits/`
144
- Save design tokens to `.opencode/memory/design/tokens/`
146
+ - Save audits to `.opencode/memory/design/audits/`
147
+ - Save extracted token snapshots to `.opencode/memory/design/tokens/`
145
148
 
146
- ## Related Skills
149
+ ## See Also
147
150
 
148
- | Need | Skill |
149
- | -------------------- | --------------------- |
150
- | Aesthetic principles | `frontend-design` |
151
- | Implement components | `mockup-to-code` |
152
- | Accessibility | `accessibility-audit` |
151
+ - `mockup-to-code`
152
+ - `frontend-design`
153
+ - `accessibility-audit`
@@ -8,6 +8,8 @@ dependencies: []
8
8
 
9
9
  # Dispatching Parallel Agents
10
10
 
11
+ > **Replaces** sequential investigation of independent failures — one-by-one debugging when problems don't share state
12
+
11
13
  ## When to Use
12
14
 
13
15
  - 3+ independent failures across different subsystems or test files
@@ -178,3 +180,9 @@ From debugging session (2025-10-03):
178
180
  - All investigations completed concurrently
179
181
  - All fixes integrated successfully
180
182
  - Zero conflicts between agent changes
183
+
184
+ ## See Also
185
+
186
+ - `agent-teams` — for coordinated parallel work (not just debugging)
187
+ - `swarm-coordination` — for large-scale task decomposition
188
+ - `executing-plans` — for plan-driven parallel execution
@@ -8,6 +8,7 @@ dependencies: [writing-plans]
8
8
 
9
9
  # Executing Plans
10
10
 
11
+ > **Replaces** unstructured implementation where the agent jumps between tasks without review checkpoints or batch control
11
12
  ## When to Use
12
13
 
13
14
  - A complete implementation plan exists and you need to execute it in batches with checkpoints
@@ -221,3 +222,9 @@ Use numeric batch numbers, not task names, for predictable reference.
221
222
  - Reference skills when plan says to
222
223
  - Between batches: just report and wait
223
224
  - Stop when blocked, don't guess
225
+
226
+ ## See Also
227
+
228
+ - `writing-plans` - Create detailed, zero-ambiguity implementation plans before execution
229
+ - `swarm-coordination` - Coordinate parallel execution when many independent tasks can run concurrently
230
+ - `verification-before-completion` - Run final verification gates before claiming completion