opencodekit 0.20.2 → 0.20.4
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/dist/index.js +1 -1
- package/dist/template/.opencode/agent/build.md +4 -0
- package/dist/template/.opencode/agent/explore.md +4 -0
- package/dist/template/.opencode/agent/general.md +4 -0
- package/dist/template/.opencode/agent/plan.md +4 -0
- package/dist/template/.opencode/agent/review.md +4 -0
- package/dist/template/.opencode/agent/scout.md +4 -0
- package/dist/template/.opencode/command/create.md +119 -25
- package/dist/template/.opencode/command/design.md +1 -2
- package/dist/template/.opencode/command/health.md +234 -0
- package/dist/template/.opencode/command/init-user.md +15 -0
- package/dist/template/.opencode/command/plan.md +3 -4
- package/dist/template/.opencode/command/pr.md +13 -0
- package/dist/template/.opencode/command/research.md +15 -3
- package/dist/template/.opencode/command/review-codebase.md +11 -1
- package/dist/template/.opencode/command/ship.md +72 -8
- package/dist/template/.opencode/command/status.md +1 -1
- package/dist/template/.opencode/command/ui-review.md +0 -1
- package/dist/template/.opencode/command/ui-slop-check.md +1 -1
- package/dist/template/.opencode/command/verify.md +11 -1
- package/dist/template/.opencode/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +1678 -1677
- package/dist/template/.opencode/plugin/README.md +1 -1
- package/dist/template/.opencode/plugin/lib/compact.ts +194 -0
- package/dist/template/.opencode/plugin/lib/compile.ts +253 -0
- package/dist/template/.opencode/plugin/lib/db/graph.ts +253 -0
- package/dist/template/.opencode/plugin/lib/db/observations.ts +8 -3
- package/dist/template/.opencode/plugin/lib/db/schema.ts +96 -5
- package/dist/template/.opencode/plugin/lib/db/types.ts +73 -0
- package/dist/template/.opencode/plugin/lib/index-generator.ts +170 -0
- package/dist/template/.opencode/plugin/lib/lint.ts +359 -0
- package/dist/template/.opencode/plugin/lib/memory-admin-tools.ts +78 -4
- package/dist/template/.opencode/plugin/lib/memory-db.ts +19 -1
- package/dist/template/.opencode/plugin/lib/memory-helpers.ts +30 -0
- package/dist/template/.opencode/plugin/lib/memory-hooks.ts +10 -0
- package/dist/template/.opencode/plugin/lib/memory-tools.ts +167 -2
- package/dist/template/.opencode/plugin/lib/operation-log.ts +109 -0
- package/dist/template/.opencode/plugin/lib/validate.ts +243 -0
- package/dist/template/.opencode/plugin/memory.ts +2 -1
- package/dist/template/.opencode/skill/design-taste-frontend/SKILL.md +13 -1
- package/dist/template/.opencode/skill/figma-go/SKILL.md +1 -1
- package/dist/template/.opencode/skill/full-output-enforcement/SKILL.md +13 -0
- package/dist/template/.opencode/skill/high-end-visual-design/SKILL.md +13 -0
- package/dist/template/.opencode/skill/industrial-brutalist-ui/SKILL.md +13 -0
- package/dist/template/.opencode/skill/memory-system/SKILL.md +65 -1
- package/dist/template/.opencode/skill/minimalist-ui/SKILL.md +13 -0
- package/dist/template/.opencode/skill/redesign-existing-projects/SKILL.md +13 -0
- package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +48 -2
- package/dist/template/.opencode/skill/requesting-code-review/references/specialist-profiles.md +108 -0
- package/dist/template/.opencode/skill/skill-creator/SKILL.md +25 -0
- package/dist/template/.opencode/skill/stitch-design-taste/SKILL.md +13 -0
- package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +46 -0
- package/package.json +1 -1
- package/dist/template/.opencode/agent/runner.md +0 -79
- package/dist/template/.opencode/command/start.md +0 -156
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: memory-system
|
|
3
3
|
description: Use when persisting learnings, loading previous context, or searching past decisions - covers memory file structure, tools, and when to update each file
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
tags: [context, workflow]
|
|
6
6
|
dependencies: []
|
|
7
7
|
---
|
|
@@ -78,6 +78,70 @@ After creating an observation: `memory-search` with relevant keywords should fin
|
|
|
78
78
|
- For ongoing work, append to one handoff file per task/day instead of many tiny files.
|
|
79
79
|
- Keep observation titles concrete and action-oriented.
|
|
80
80
|
|
|
81
|
+
## Admin Operations
|
|
82
|
+
|
|
83
|
+
The `memory-admin` tool supports these operations:
|
|
84
|
+
|
|
85
|
+
### Core (existing)
|
|
86
|
+
| Operation | Purpose |
|
|
87
|
+
|---|---|
|
|
88
|
+
| `status` | Storage stats, FTS5 health, pipeline counts |
|
|
89
|
+
| `full` | Full maintenance cycle (archive + checkpoint + vacuum) |
|
|
90
|
+
| `archive` | Archive observations older than N days |
|
|
91
|
+
| `checkpoint` | Checkpoint WAL file |
|
|
92
|
+
| `vacuum` | Vacuum database |
|
|
93
|
+
| `migrate` | Import .opencode/memory/observations/*.md into SQLite |
|
|
94
|
+
| `capture-stats` | Temporal message capture statistics |
|
|
95
|
+
| `distill-now` | Force distillation for current session |
|
|
96
|
+
| `curate-now` | Force curator run |
|
|
97
|
+
|
|
98
|
+
### Knowledge Intelligence (new in v2.1)
|
|
99
|
+
| Operation | Purpose |
|
|
100
|
+
|---|---|
|
|
101
|
+
| `lint` | Find duplicates, contradictions, stale/orphan observations |
|
|
102
|
+
| `index` | Generate a structured catalog of all observations |
|
|
103
|
+
| `compile` | Build concept-grouped articles from observation clusters |
|
|
104
|
+
| `log` | View the append-only operation audit trail |
|
|
105
|
+
|
|
106
|
+
Examples:
|
|
107
|
+
```
|
|
108
|
+
memory-admin({ operation: "lint" })
|
|
109
|
+
memory-admin({ operation: "lint", older_than_days: 60 })
|
|
110
|
+
memory-admin({ operation: "index" })
|
|
111
|
+
memory-admin({ operation: "compile" })
|
|
112
|
+
memory-admin({ operation: "log" })
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Reading Compiled Artifacts
|
|
116
|
+
```
|
|
117
|
+
memory-read({ file: "index" }) // Full observation catalog
|
|
118
|
+
memory-read({ file: "compiled/auth" }) // Compiled article for "auth" concept
|
|
119
|
+
memory-read({ file: "log" }) // Operation audit trail
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Validation Gate
|
|
123
|
+
|
|
124
|
+
The `observation` tool now validates before storing:
|
|
125
|
+
- **Exact duplicate** → rejected (returns duplicate ID + supersede hint)
|
|
126
|
+
- **Near-duplicate** → stored with warning
|
|
127
|
+
- **Contradiction** → stored with warning (for decisions sharing concepts)
|
|
128
|
+
- **Low quality** → stored with warning (no narrative + no concepts)
|
|
129
|
+
|
|
130
|
+
To update an existing observation, use `supersedes`:
|
|
131
|
+
```
|
|
132
|
+
observation({ type: "decision", title: "Use JWT", supersedes: "42", ... })
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Idle Pipeline
|
|
136
|
+
|
|
137
|
+
During `session.idle`, the memory system automatically runs:
|
|
138
|
+
1. Distill undistilled messages
|
|
139
|
+
2. Curate observations from distillations
|
|
140
|
+
3. Optimize FTS5 index
|
|
141
|
+
4. Checkpoint WAL if large
|
|
142
|
+
5. Compile concept articles (max 10)
|
|
143
|
+
6. Regenerate memory index
|
|
144
|
+
|
|
81
145
|
## See Also
|
|
82
146
|
|
|
83
147
|
- `context-management`
|
|
@@ -3,6 +3,19 @@ name: minimalist-ui
|
|
|
3
3
|
description: Use INSTEAD OF design-taste-frontend when user requests clean, editorial, or minimalist aesthetics. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## When to Use
|
|
7
|
+
|
|
8
|
+
- When the user requests clean, editorial, or minimalist aesthetics
|
|
9
|
+
- For content-focused sites, blogs, or documentation pages
|
|
10
|
+
- Instead of design-taste-frontend when warm monochrome and flat layouts are desired
|
|
11
|
+
|
|
12
|
+
## When NOT to Use
|
|
13
|
+
|
|
14
|
+
- When bold, attention-grabbing, or luxury visual design is requested
|
|
15
|
+
- For data-heavy dashboards that need dense information display
|
|
16
|
+
- When industrial-brutalist-ui or high-end-visual-design is a better fit
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
# Protocol: Premium Utilitarian Minimalism UI Architect
|
|
7
20
|
|
|
8
21
|
## 1. Protocol Overview
|
|
@@ -3,6 +3,19 @@ name: redesign-existing-projects
|
|
|
3
3
|
description: Use when upgrading an existing website or app's visual design to premium quality. Audits current design, identifies generic AI patterns, applies high-end standards without breaking functionality. MUST load before any design overhaul of existing projects.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## When to Use
|
|
7
|
+
|
|
8
|
+
- When upgrading an existing website or app's visual design to premium quality
|
|
9
|
+
- Before any design overhaul of existing projects
|
|
10
|
+
- When the current design has been identified as generic, template-looking, or AI-default
|
|
11
|
+
|
|
12
|
+
## When NOT to Use
|
|
13
|
+
|
|
14
|
+
- For greenfield projects (use frontend-design with an aesthetic overlay instead)
|
|
15
|
+
- When the design is already polished and only minor tweaks are needed
|
|
16
|
+
- For non-visual changes (performance, accessibility-only fixes)
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
# Redesign Skill
|
|
7
20
|
|
|
8
21
|
## How This Works
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: requesting-code-review
|
|
3
3
|
description: Use when completing meaningful implementation work and needing a high-signal review pass before merge or release - dispatches scoped review agents, synthesizes findings, and routes follow-up actions by severity.
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
tags: [workflow, code-quality, research]
|
|
6
6
|
dependencies: []
|
|
7
|
+
references:
|
|
8
|
+
- references/specialist-profiles.md
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
# Requesting Code Review
|
|
@@ -90,7 +92,9 @@ Choose the smallest review depth that still covers the risk.
|
|
|
90
92
|
|
|
91
93
|
- **targeted**: use 1-2 specific review prompts
|
|
92
94
|
- **standard**: use security/correctness, tests/types, and completeness
|
|
93
|
-
- **full**: use all 5 specialized review prompts
|
|
95
|
+
- **full**: use all 5 specialized review prompts + specialist profiles from [references/specialist-profiles.md](references/specialist-profiles.md)
|
|
96
|
+
|
|
97
|
+
For **standard** and **full** reviews, enhance dispatch prompts with specialist reviewer profiles (security, architecture, performance) and run an adversarial pass on findings. See [references/specialist-profiles.md](references/specialist-profiles.md) for the exact prompt additions and confidence thresholds.
|
|
94
98
|
|
|
95
99
|
Do **not** dispatch 5 reviewers by reflex for every tiny change. That produces noise, not rigor.
|
|
96
100
|
|
|
@@ -395,3 +399,45 @@ Run `/compound` after resolving review findings to capture:
|
|
|
395
399
|
- Newly discovered codebase conventions
|
|
396
400
|
|
|
397
401
|
That turns review from a gate into a feedback loop.
|
|
402
|
+
|
|
403
|
+
## Autofix Classification
|
|
404
|
+
|
|
405
|
+
Every review finding should include a **fix category** that routes remediation. This prevents the user from manually triaging every finding.
|
|
406
|
+
|
|
407
|
+
| Category | Meaning | Agent Action |
|
|
408
|
+
| -------------- | ------------------------------------------------ | ----------------------------------------- |
|
|
409
|
+
| `safe_auto` | Zero-risk fix (formatting, unused imports, typos) | Fix immediately without asking |
|
|
410
|
+
| `gated_auto` | Likely correct fix, but verify first | Fix and show diff before committing |
|
|
411
|
+
| `manual` | Requires human judgment or architectural decision | Report to user with context, don't touch |
|
|
412
|
+
| `advisory` | Informational only, no action required | Include in report, no remediation needed |
|
|
413
|
+
|
|
414
|
+
### Reviewer Output Format (Enhanced)
|
|
415
|
+
|
|
416
|
+
Reviewers should return findings in this structure:
|
|
417
|
+
|
|
418
|
+
```markdown
|
|
419
|
+
### [SEVERITY]: [Title]
|
|
420
|
+
|
|
421
|
+
- **File:** `path/to/file.ts:123`
|
|
422
|
+
- **Category:** safe_auto | gated_auto | manual | advisory
|
|
423
|
+
- **Issue:** [concrete description of the problem]
|
|
424
|
+
- **Fix:** [specific fix if category is safe_auto or gated_auto]
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
### Classification Rules
|
|
428
|
+
|
|
429
|
+
1. **safe_auto** — formatting, whitespace, unused imports, typo in comments, missing trailing newlines. Must not change behavior.
|
|
430
|
+
2. **gated_auto** — missing null checks, error handling gaps, type narrowing fixes. Changes behavior but fix is clear and low-risk.
|
|
431
|
+
3. **manual** — architectural concerns, API design questions, security decisions, breaking changes. Requires human context.
|
|
432
|
+
4. **advisory** — "consider doing X", performance suggestions without evidence, alternative patterns. No action needed.
|
|
433
|
+
|
|
434
|
+
### Post-Synthesis Routing
|
|
435
|
+
|
|
436
|
+
After synthesizing all findings:
|
|
437
|
+
|
|
438
|
+
1. **Apply all `safe_auto` fixes** immediately
|
|
439
|
+
2. **Show `gated_auto` diffs** to user for approval before applying
|
|
440
|
+
3. **Present `manual` findings** as a prioritized list for user decision
|
|
441
|
+
4. **Append `advisory` findings** at the end of the report for reference
|
|
442
|
+
|
|
443
|
+
This routing ensures trivial fixes don't block the review while keeping humans in the loop for judgment calls.
|
package/dist/template/.opencode/skill/requesting-code-review/references/specialist-profiles.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Specialist Reviewer Profiles
|
|
2
|
+
|
|
3
|
+
Use these profiles when dispatching review agents for **standard** or **full** depth reviews. Each profile focuses the reviewer on a specific domain, reducing noise and increasing finding quality.
|
|
4
|
+
|
|
5
|
+
## Security Reviewer
|
|
6
|
+
|
|
7
|
+
**Focus:** OWASP Top 10, auth/authz, data exposure, injection, secrets
|
|
8
|
+
|
|
9
|
+
**Dispatch prompt addition:**
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
You are reviewing as a SECURITY SPECIALIST. Focus exclusively on:
|
|
13
|
+
|
|
14
|
+
1. Authentication/authorization gaps (missing auth checks, privilege escalation)
|
|
15
|
+
2. Injection vulnerabilities (SQL, XSS, command injection, path traversal)
|
|
16
|
+
3. Secrets exposure (hardcoded tokens, API keys in source, logged credentials)
|
|
17
|
+
4. Data validation gaps (missing input sanitization, unsafe deserialization)
|
|
18
|
+
5. Insecure defaults (permissive CORS, missing rate limiting, debug mode)
|
|
19
|
+
|
|
20
|
+
Ignore: Style, architecture, performance (other reviewers handle those).
|
|
21
|
+
|
|
22
|
+
Confidence threshold: Only report findings with confidence >= 0.60.
|
|
23
|
+
Below 0.60, include in a separate "Low Confidence / Investigate" section.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**When to use:** Always in standard and full reviews. Skip only for purely internal tools with no user input.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Architecture Reviewer
|
|
31
|
+
|
|
32
|
+
**Focus:** Coupling, SOLID principles, API design, dependency direction
|
|
33
|
+
|
|
34
|
+
**Dispatch prompt addition:**
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
You are reviewing as an ARCHITECTURE SPECIALIST. Focus exclusively on:
|
|
38
|
+
|
|
39
|
+
1. Coupling violations (circular deps, god modules, leaky abstractions)
|
|
40
|
+
2. API contract issues (breaking changes, inconsistent error formats, missing versioning)
|
|
41
|
+
3. Dependency direction violations (inner layers importing outer layers)
|
|
42
|
+
4. Abstraction misuse (over-engineering, unnecessary indirection, premature abstraction)
|
|
43
|
+
5. Pattern divergence (new code contradicts established codebase patterns)
|
|
44
|
+
|
|
45
|
+
Rules:
|
|
46
|
+
- Only flag architecture issues that will cause CONCRETE problems (maintenance cost, bugs, scaling)
|
|
47
|
+
- "I would have done it differently" is NOT a finding
|
|
48
|
+
- Preference for existing patterns over theoretically better ones
|
|
49
|
+
|
|
50
|
+
Confidence threshold: Only report findings with confidence >= 0.60.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**When to use:** Full reviews only. Skip for small fixes, config changes, or documentation updates.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Performance Reviewer
|
|
58
|
+
|
|
59
|
+
**Focus:** Runtime efficiency, bundle size, database queries, memory
|
|
60
|
+
|
|
61
|
+
**Dispatch prompt addition:**
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
You are reviewing as a PERFORMANCE SPECIALIST. Focus exclusively on:
|
|
65
|
+
|
|
66
|
+
1. N+1 query patterns (loops that make DB/API calls)
|
|
67
|
+
2. Missing memoization on expensive computations
|
|
68
|
+
3. Unbounded data loading (no pagination, no limits)
|
|
69
|
+
4. Bundle size regressions (large imports that could be lazy-loaded)
|
|
70
|
+
5. Memory leaks (event listeners without cleanup, growing caches)
|
|
71
|
+
|
|
72
|
+
Rules:
|
|
73
|
+
- Only flag issues with MEASURABLE impact (not theoretical)
|
|
74
|
+
- "This could be faster" without evidence is NOT a finding
|
|
75
|
+
- Quantify impact where possible (e.g., "This runs N queries instead of 1")
|
|
76
|
+
|
|
77
|
+
Confidence threshold: Only report findings with confidence >= 0.70.
|
|
78
|
+
Performance findings below 0.70 are usually speculative — suppress them.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**When to use:** Full reviews only, and only when the change touches data-heavy paths, rendering, or database queries.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Adversarial Pass
|
|
86
|
+
|
|
87
|
+
After all specialist reviews complete, run an adversarial pass on the combined findings. This prevents false positives from making it into the final report.
|
|
88
|
+
|
|
89
|
+
**Adversarial prompt:**
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Review these findings from specialist reviewers. For EACH finding, challenge it from these angles:
|
|
93
|
+
|
|
94
|
+
1. **False positive check**: Does this issue actually exist in the code, or did the reviewer misread context?
|
|
95
|
+
2. **Severity inflation**: Is the severity appropriate, or is a CRITICAL actually a MINOR?
|
|
96
|
+
3. **Codebase context**: Does the existing codebase already handle this elsewhere (middleware, framework, config)?
|
|
97
|
+
4. **Cost-benefit**: Is the fix worth the effort, or is this pedantic?
|
|
98
|
+
|
|
99
|
+
For each finding, output:
|
|
100
|
+
- CONFIRMED (keep as-is)
|
|
101
|
+
- DOWNGRADED (reduce severity, explain why)
|
|
102
|
+
- REJECTED (false positive, explain why)
|
|
103
|
+
|
|
104
|
+
Only CONFIRMED and DOWNGRADED findings should appear in the final report.
|
|
105
|
+
Confidence threshold for rejection: >= 0.60 (be sure before removing a finding).
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**When to use:** Full reviews with 3+ specialist reviewers. Reduces noise by ~30% based on typical review output.
|
|
@@ -154,3 +154,28 @@ Answer these questions:
|
|
|
154
154
|
- [ ] **No XML-style tags**
|
|
155
155
|
- [ ] **SKILL.md under 200 lines**
|
|
156
156
|
- [ ] **All referenced files exist**
|
|
157
|
+
|
|
158
|
+
## Recommended Sections for SKILL.md
|
|
159
|
+
|
|
160
|
+
Beyond the required structure, include these sections when applicable:
|
|
161
|
+
|
|
162
|
+
### `## Gotchas`
|
|
163
|
+
|
|
164
|
+
Every skill should accumulate a Gotchas section over time. This is **failure-driven documentation** — each entry should trace to a specific failure encountered during real use.
|
|
165
|
+
|
|
166
|
+
```markdown
|
|
167
|
+
## Gotchas
|
|
168
|
+
|
|
169
|
+
- **[Short description of what went wrong]** — [What the agent did wrong, why, and the fix]. Discovered [date or session reference].
|
|
170
|
+
- **[Another failure]** — [Details]. Discovered [date].
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Rules for Gotchas:**
|
|
174
|
+
|
|
175
|
+
1. Every entry must trace to an actual failure, not a hypothetical risk
|
|
176
|
+
2. Include what the agent did, why it failed, and how to avoid it
|
|
177
|
+
3. New entries are added when a skill causes a failure — the fix PR should include a gotcha entry
|
|
178
|
+
4. Keep entries concise (1-3 sentences each)
|
|
179
|
+
5. This section grows over time and is never cleared — it's the skill's scar tissue
|
|
180
|
+
|
|
181
|
+
**Why this matters:** Skills without gotchas are untested skills. A skill with 5 gotchas has been battle-tested through 5 real failures and is structurally better than a pristine skill with zero. When a skill causes a failure, always ask: "Should this become a gotcha entry?"
|
|
@@ -3,6 +3,19 @@ name: stitch-design-taste
|
|
|
3
3
|
description: Use when generating DESIGN.md files for Google Stitch projects to enforce premium, anti-generic UI standards. Load BEFORE stitch skill when design quality matters. Stitch-specific only — do not use for general web projects.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## When to Use
|
|
7
|
+
|
|
8
|
+
- When generating DESIGN.md files for Google Stitch projects
|
|
9
|
+
- Before loading the stitch skill when design quality matters
|
|
10
|
+
- When enforcing premium, anti-generic UI standards in Stitch workflows
|
|
11
|
+
|
|
12
|
+
## When NOT to Use
|
|
13
|
+
|
|
14
|
+
- For general web projects not using Google Stitch
|
|
15
|
+
- When the stitch project already has a satisfactory DESIGN.md
|
|
16
|
+
- For non-UI Stitch operations (data, API, backend)
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
# Stitch Design Taste — Semantic Design System Skill
|
|
7
20
|
|
|
8
21
|
## Overview
|
|
@@ -95,6 +95,52 @@ Skip any step = lying, not verifying
|
|
|
95
95
|
| "Partial check is enough" | Partial proves nothing |
|
|
96
96
|
| "Different words so rule doesn't apply" | Spirit over letter |
|
|
97
97
|
|
|
98
|
+
## Diagnostic Failure Phrases
|
|
99
|
+
|
|
100
|
+
These phrases are **automatic re-verification triggers**. If you catch yourself writing any of these (or semantic equivalents), STOP and run the actual verification command before continuing.
|
|
101
|
+
|
|
102
|
+
### Completion Claims Without Evidence
|
|
103
|
+
|
|
104
|
+
- "This should fix it"
|
|
105
|
+
- "That should resolve the issue"
|
|
106
|
+
- "The problem should be gone now"
|
|
107
|
+
- "This will work"
|
|
108
|
+
- "It's fixed"
|
|
109
|
+
- "Everything looks good"
|
|
110
|
+
- "We're all set"
|
|
111
|
+
|
|
112
|
+
### Confidence Substitution
|
|
113
|
+
|
|
114
|
+
- "I'm fairly certain this is correct"
|
|
115
|
+
- "Based on my understanding, this works"
|
|
116
|
+
- "This is straightforward enough"
|
|
117
|
+
- "The logic is sound"
|
|
118
|
+
- "This follows the pattern so it should be fine"
|
|
119
|
+
|
|
120
|
+
### Deflection / Minimization
|
|
121
|
+
|
|
122
|
+
- "It's just a minor change"
|
|
123
|
+
- "Nothing else should be affected"
|
|
124
|
+
- "The rest of the code is unchanged"
|
|
125
|
+
- "This is a safe change"
|
|
126
|
+
- "No side effects expected"
|
|
127
|
+
|
|
128
|
+
### Post-Hoc Rationalization
|
|
129
|
+
|
|
130
|
+
- "The error was probably just [X]"
|
|
131
|
+
- "That failure was likely a fluke"
|
|
132
|
+
- "It probably works in production"
|
|
133
|
+
- "The test environment might be the issue"
|
|
134
|
+
|
|
135
|
+
### False Completion
|
|
136
|
+
|
|
137
|
+
- "All done!" / "Done!" / "Complete!"
|
|
138
|
+
- "That takes care of everything"
|
|
139
|
+
- "Ready for review" (without verification output)
|
|
140
|
+
- "Committing now" (without verification output)
|
|
141
|
+
|
|
142
|
+
**Rule:** If any of these phrases appear in your draft response, delete them and replace with actual verification command output. The phrase IS the signal that you're about to lie.
|
|
143
|
+
|
|
98
144
|
## Key Patterns
|
|
99
145
|
|
|
100
146
|
**Tests:**
|
package/package.json
CHANGED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Lightweight runner for trivial shell, git, and filesystem operations
|
|
3
|
-
mode: subagent
|
|
4
|
-
temperature: 0.0
|
|
5
|
-
permission:
|
|
6
|
-
bash:
|
|
7
|
-
"*": allow
|
|
8
|
-
"git push*": ask
|
|
9
|
-
"git commit*": ask
|
|
10
|
-
"git merge*": ask
|
|
11
|
-
"git reset*": ask
|
|
12
|
-
"rm*": ask
|
|
13
|
-
"sudo*": deny
|
|
14
|
-
write:
|
|
15
|
-
"*": deny
|
|
16
|
-
edit:
|
|
17
|
-
"*": deny
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
You are OpenCode, the best coding agent on the planet.
|
|
21
|
-
|
|
22
|
-
# Runner Agent
|
|
23
|
-
|
|
24
|
-
**Purpose**: Execute trivial operations — scripts, git commands, file system ops. No code reasoning.
|
|
25
|
-
|
|
26
|
-
## Identity
|
|
27
|
-
|
|
28
|
-
You are the runner agent. You execute simple, well-defined operations quickly and reliably. You don't write code or make architectural decisions.
|
|
29
|
-
|
|
30
|
-
## Model Guidance
|
|
31
|
-
|
|
32
|
-
- Use the cheapest/fastest available model for execution tasks
|
|
33
|
-
- Temperature: 0.0 (deterministic execution)
|
|
34
|
-
|
|
35
|
-
## Capabilities
|
|
36
|
-
|
|
37
|
-
- Run shell commands and scripts
|
|
38
|
-
- Git operations (commit, push, pull, tag, branch, merge)
|
|
39
|
-
- File system operations (move, copy, delete — with confirmation for destructive ops)
|
|
40
|
-
- Run build/test/lint commands
|
|
41
|
-
- Read command output and report results
|
|
42
|
-
|
|
43
|
-
## Restrictions
|
|
44
|
-
|
|
45
|
-
- **Never edit source code files** — delegate to general or build agent
|
|
46
|
-
- **Never make architectural decisions** — escalate to plan agent
|
|
47
|
-
- **No complex reasoning** — if a task requires understanding code logic, escalate
|
|
48
|
-
- **No implementation work** — do not fix bugs or build features
|
|
49
|
-
|
|
50
|
-
## When to Use
|
|
51
|
-
|
|
52
|
-
- Simple shell commands
|
|
53
|
-
- Git operations (commit, push, tag, merge)
|
|
54
|
-
- Running build/test/lint scripts
|
|
55
|
-
- File system operations (move, copy, delete with confirmation)
|
|
56
|
-
|
|
57
|
-
## When NOT to Use
|
|
58
|
-
|
|
59
|
-
- Code changes or refactors
|
|
60
|
-
- Bug fixes or feature implementation
|
|
61
|
-
- Tasks requiring code logic analysis
|
|
62
|
-
- Architecture or design decisions
|
|
63
|
-
|
|
64
|
-
## Rules
|
|
65
|
-
|
|
66
|
-
1. Execute exactly what is requested — no improvisation
|
|
67
|
-
2. Report command output faithfully — never fabricate
|
|
68
|
-
3. Ask before destructive operations (delete, force push, reset)
|
|
69
|
-
4. If a command fails, report the error — don't attempt creative fixes
|
|
70
|
-
5. Stage specific files only — never `git add .`
|
|
71
|
-
|
|
72
|
-
## Output Format
|
|
73
|
-
|
|
74
|
-
For every operation:
|
|
75
|
-
1. Show the command being run
|
|
76
|
-
2. Show the output
|
|
77
|
-
3. Confirm success or report failure
|
|
78
|
-
|
|
79
|
-
Keep output minimal. No explanations unless something fails.
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Start working on a bead - claim it and prepare workspace
|
|
3
|
-
argument-hint: "<bead-id> [--worktree]"
|
|
4
|
-
agent: build
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Start: $ARGUMENTS
|
|
8
|
-
|
|
9
|
-
Claim a task and prepare workspace. Bridge between specification (`/create`) and implementation (`/ship`).
|
|
10
|
-
|
|
11
|
-
> **Workflow:** `/create` → **`/start <id>`** → `/ship <id>`
|
|
12
|
-
>
|
|
13
|
-
> ⛔ Bead MUST have `prd.md` (created via `/create`).
|
|
14
|
-
|
|
15
|
-
## Load Skills
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
skill({ name: "beads" });
|
|
19
|
-
skill({ name: "prd-task" }); // PRD → executable tasks
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Parse Arguments
|
|
23
|
-
|
|
24
|
-
| Argument | Default | Description |
|
|
25
|
-
| ------------ | -------- | ---------------------------- |
|
|
26
|
-
| `<bead-id>` | required | The bead to start |
|
|
27
|
-
| `--worktree` | false | Create isolated git worktree |
|
|
28
|
-
|
|
29
|
-
## Determine Input Type
|
|
30
|
-
|
|
31
|
-
| Input Type | Detection | Action |
|
|
32
|
-
| ---------- | --------------------------- | ----------------------- |
|
|
33
|
-
| Bead ID | Matches `br-xxx` or numeric | Start that bead |
|
|
34
|
-
| Path | File/directory path | Not supported for start |
|
|
35
|
-
|
|
36
|
-
## Before You Start
|
|
37
|
-
|
|
38
|
-
- **Be certain**: Only start beads with valid PRD (check Phase 2)
|
|
39
|
-
- **Check workspace**: Don't start if uncommitted changes exist (Phase 1)
|
|
40
|
-
- **One task at a time**: Warn if other tasks in progress
|
|
41
|
-
- **Validate spec**: Verify prd.md exists and has real content
|
|
42
|
-
- **Ask about workspace**: Let user choose branch/worktree strategy
|
|
43
|
-
|
|
44
|
-
## Phase 1: Pre-flight
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
git status --porcelain
|
|
48
|
-
git branch --show-current
|
|
49
|
-
br list --status=in_progress
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
- If uncommitted changes: ask user to stash, commit, or continue
|
|
53
|
-
- If other tasks in progress: warn before claiming another
|
|
54
|
-
|
|
55
|
-
## Phase 2: Validate Specification
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
br show $ARGUMENTS
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Read `.beads/artifacts/$ARGUMENTS/` to check what artifacts exist.
|
|
62
|
-
|
|
63
|
-
Verify `prd.md` exists and has real content (not just placeholders). If missing or incomplete, tell user to run `/create` first.
|
|
64
|
-
|
|
65
|
-
## Phase 3: Claim
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
br update $ARGUMENTS --status in_progress
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Phase 4: Prepare Workspace
|
|
72
|
-
|
|
73
|
-
Ask user how to handle workspace:
|
|
74
|
-
|
|
75
|
-
```typescript
|
|
76
|
-
question({
|
|
77
|
-
questions: [
|
|
78
|
-
{
|
|
79
|
-
header: "Workspace",
|
|
80
|
-
question: "How do you want to set up the workspace?",
|
|
81
|
-
options: [
|
|
82
|
-
{
|
|
83
|
-
label: "Create feature branch (Recommended)",
|
|
84
|
-
description: "git checkout -b feat/<bead-id>-<title>",
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
label: "Use current branch",
|
|
88
|
-
description: "Work on current branch",
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
label: "Create worktree",
|
|
92
|
-
description: "Isolated git worktree for this bead",
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
});
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
**If feature branch selected:**
|
|
101
|
-
|
|
102
|
-
Map bead type to branch prefix:
|
|
103
|
-
|
|
104
|
-
| Bead Type | Branch Prefix |
|
|
105
|
-
| --------- | ------------- |
|
|
106
|
-
| feature | feat |
|
|
107
|
-
| bug | fix |
|
|
108
|
-
| task | task |
|
|
109
|
-
| epic | epic |
|
|
110
|
-
|
|
111
|
-
Create the branch:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
# Example: feat/br-42-add-auth
|
|
115
|
-
git checkout -b $PREFIX/$BEAD_ID-$TITLE_SLUG
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Slugify the title (lowercase, spaces to hyphens) and use the bead type to determine the prefix.
|
|
119
|
-
|
|
120
|
-
**If worktree selected:**
|
|
121
|
-
|
|
122
|
-
```typescript
|
|
123
|
-
skill({ name: "using-git-worktrees" });
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**If current branch:** Continue without branch creation.
|
|
127
|
-
|
|
128
|
-
## Phase 5: Convert PRD to Tasks
|
|
129
|
-
|
|
130
|
-
If `prd.json` doesn't exist yet, use `prd-task` skill to convert PRD markdown → executable JSON.
|
|
131
|
-
|
|
132
|
-
If `prd.json` already exists, show progress (completed/total tasks).
|
|
133
|
-
|
|
134
|
-
## Phase 6: Report and Route
|
|
135
|
-
|
|
136
|
-
Output:
|
|
137
|
-
|
|
138
|
-
1. Bead type and status
|
|
139
|
-
2. Branch name
|
|
140
|
-
3. Workspace (main or worktree)
|
|
141
|
-
4. Artifact status (prd.md validated, prd.json exists/created)
|
|
142
|
-
5. Next step recommendation
|
|
143
|
-
|
|
144
|
-
| State | Next Command |
|
|
145
|
-
| ------------------ | ------------------------ |
|
|
146
|
-
| Has prd.json | `/ship $ARGUMENTS` |
|
|
147
|
-
| Epic with subtasks | `/start <first-subtask>` |
|
|
148
|
-
| Complex task | `/plan $ARGUMENTS` |
|
|
149
|
-
|
|
150
|
-
## Related Commands
|
|
151
|
-
|
|
152
|
-
| Need | Command |
|
|
153
|
-
| ------------------- | ------------ |
|
|
154
|
-
| Create spec first | `/create` |
|
|
155
|
-
| Plan implementation | `/plan <id>` |
|
|
156
|
-
| Implement and ship | `/ship <id>` |
|