opencodekit 0.18.8 → 0.18.10
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/explore.md +26 -9
- package/dist/template/.opencode/agent/general.md +3 -1
- package/dist/template/.opencode/agent/plan.md +4 -2
- package/dist/template/.opencode/agent/review.md +3 -1
- package/dist/template/.opencode/command/ui-slop-check.md +146 -0
- 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/package.json +1 -1
- package/dist/template/.opencode/plugin/lib/context.ts +9 -5
- package/dist/template/.opencode/plugin/lib/db/types.ts +1 -1
- package/dist/template/.opencode/plugin/lib/memory-hooks.ts +17 -6
- package/dist/template/.opencode/skill/frontend-design/SKILL.md +114 -44
- package/dist/template/.opencode/skill/frontend-design/references/animation/motion-core.md +118 -108
- package/dist/template/.opencode/skill/frontend-design/references/design/color-system.md +111 -0
- package/dist/template/.opencode/skill/frontend-design/references/design/interaction.md +149 -0
- package/dist/template/.opencode/skill/frontend-design/references/design/typography-rules.md +106 -0
- package/dist/template/.opencode/skill/frontend-design/references/design/ux-writing.md +99 -0
- package/dist/template/.opencode/skill/tilth-cli/SKILL.md +180 -0
- package/package.json +1 -1
- package/dist/template/.opencode/memory/memory.db +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# UX Writing
|
|
2
|
+
|
|
3
|
+
## Button Labels
|
|
4
|
+
|
|
5
|
+
Specific verb + object. Never generic:
|
|
6
|
+
|
|
7
|
+
| Bad | Good | Why |
|
|
8
|
+
| ---------- | --------------- | ------------------------------ |
|
|
9
|
+
| OK | Save changes | Says what happens |
|
|
10
|
+
| Submit | Create account | Describes the outcome |
|
|
11
|
+
| Yes | Delete message | Confirms what gets deleted |
|
|
12
|
+
| Cancel | Keep editing | Tells user what "cancel" means |
|
|
13
|
+
| Click here | Download report | Verb + object, no "click" |
|
|
14
|
+
|
|
15
|
+
## Error Messages
|
|
16
|
+
|
|
17
|
+
Three-part formula — every time:
|
|
18
|
+
|
|
19
|
+
1. **What happened** (not "Error occurred")
|
|
20
|
+
2. **Why** (if known)
|
|
21
|
+
3. **How to fix**
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Bad: "Error: Invalid input"
|
|
26
|
+
Bad: "Something went wrong"
|
|
27
|
+
Bad: "Oops! That didn't work"
|
|
28
|
+
|
|
29
|
+
Good: "Email address is invalid. Check for typos or use a different address."
|
|
30
|
+
Good: "Payment declined — your card issuer rejected the charge. Try a different card or contact your bank."
|
|
31
|
+
Good: "File too large (52 MB). Maximum size is 25 MB. Compress the file or split it into parts."
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Never use humor for errors.** Users are frustrated — be helpful, not cute.
|
|
35
|
+
|
|
36
|
+
## Empty States
|
|
37
|
+
|
|
38
|
+
Empty states are **onboarding opportunities**, not blank screens:
|
|
39
|
+
|
|
40
|
+
1. **Acknowledge**: "No messages yet"
|
|
41
|
+
2. **Explain value**: "Messages from your team will appear here"
|
|
42
|
+
3. **Clear action**: [Start a conversation]
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Bad: (blank white space)
|
|
47
|
+
Bad: "No data"
|
|
48
|
+
Bad: "Nothing to show"
|
|
49
|
+
|
|
50
|
+
Good: "No projects yet — Create your first project to get started" [Create project]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Confirmation vs Information
|
|
54
|
+
|
|
55
|
+
| Type | Pattern | Example |
|
|
56
|
+
| ----------- | ----------------------------------------- | -------------------------------------- |
|
|
57
|
+
| Success | Brief toast (auto-dismiss 3-5s) | "Changes saved" |
|
|
58
|
+
| Warning | Inline banner (persistent, dismissible) | "Your trial ends in 3 days" |
|
|
59
|
+
| Error | Inline at source (persistent until fixed) | "Password must be 8+ characters" |
|
|
60
|
+
| Destructive | Confirmation dialog (requires action) | "Delete account? This can't be undone" |
|
|
61
|
+
|
|
62
|
+
## Consistent Terminology
|
|
63
|
+
|
|
64
|
+
Pick ONE term and use it everywhere:
|
|
65
|
+
|
|
66
|
+
| Pick one | Not these |
|
|
67
|
+
| ---------------- | ----------------------------------- |
|
|
68
|
+
| Delete | Remove, Trash, Erase, Destroy |
|
|
69
|
+
| Settings | Preferences, Options, Configuration |
|
|
70
|
+
| Log in / Log out | Sign in / Sign out (pick a pair) |
|
|
71
|
+
| Save | Submit, Apply, Update, Confirm |
|
|
72
|
+
|
|
73
|
+
## Voice vs Tone
|
|
74
|
+
|
|
75
|
+
- **Voice** = consistent brand personality (always the same)
|
|
76
|
+
- **Tone** = adapts to moment:
|
|
77
|
+
- Success → celebratory, brief
|
|
78
|
+
- Error → empathetic, helpful
|
|
79
|
+
- Onboarding → encouraging, clear
|
|
80
|
+
- Warning → direct, specific
|
|
81
|
+
|
|
82
|
+
## Internationalization
|
|
83
|
+
|
|
84
|
+
- **Plan for 30% text expansion** — German, French, Finnish expand significantly
|
|
85
|
+
- Design layouts with flexible text containers
|
|
86
|
+
- Never truncate translated text without tooltip/expansion
|
|
87
|
+
- Use ICU message format for plurals: `{count, plural, one {# item} other {# items}}`
|
|
88
|
+
- Right-to-left (RTL) support: use logical properties (`margin-inline-start` not `margin-left`)
|
|
89
|
+
|
|
90
|
+
## Microcopy Checklist
|
|
91
|
+
|
|
92
|
+
- [ ] All buttons use verb + object
|
|
93
|
+
- [ ] All errors follow 3-part formula
|
|
94
|
+
- [ ] All empty states have acknowledgment + value + action
|
|
95
|
+
- [ ] Terminology is consistent across all screens
|
|
96
|
+
- [ ] No humor in error states
|
|
97
|
+
- [ ] No "click here" or "click below"
|
|
98
|
+
- [ ] No ALL CAPS for body text (small-caps for abbreviations only)
|
|
99
|
+
- [ ] Loading states have context ("Loading messages..." not "Loading...")
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tilth-cli
|
|
3
|
+
description: AST-aware code navigation via tilth CLI. Use when subagents need structural code search, smart file reading, or codebase mapping — complements MCP tilth (which only the main agent can access).
|
|
4
|
+
version: 1.1.0
|
|
5
|
+
tags: [code-navigation, search, subagent]
|
|
6
|
+
dependencies: []
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# tilth CLI for Subagents
|
|
10
|
+
|
|
11
|
+
> **Why this exists:** tilth MCP tools (`tilth_tilth_search`, `tilth_tilth_read`, etc.) are only available to the main agent. Subagents cannot access MCP tools but CAN use Bash. This skill teaches subagents to call tilth directly from the command line.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- When subagents need structural code search (they cannot access tilth MCP tools)
|
|
16
|
+
- When you need `--map` for codebase skeleton (CLI-only feature, not in MCP)
|
|
17
|
+
- For any agent that has Bash access but not tilth MCP
|
|
18
|
+
|
|
19
|
+
## When NOT to Use
|
|
20
|
+
|
|
21
|
+
- Main agent should prefer tilth MCP tools — they have session dedup and hash-anchored editing
|
|
22
|
+
- For trivial lookups where grep/read suffices
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
tilth must be available. Use `npx -y tilth` if not globally installed:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx -y tilth <query> [options]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## How tilth CLI Works
|
|
33
|
+
|
|
34
|
+
tilth has **one command** with **smart auto-detection**. Pass a query and it figures out what to do:
|
|
35
|
+
|
|
36
|
+
| Query Pattern | Detection | Action |
|
|
37
|
+
| ------------- | -------------------------------- | ------------------------------------------------------- |
|
|
38
|
+
| `src/auth.ts` | File path (exists on disk) | **Read file** — smart outline for large, full for small |
|
|
39
|
+
| `handleAuth` | Symbol name (camelCase, etc.) | **Symbol search** — AST definitions + usages |
|
|
40
|
+
| `"*.test.ts"` | Glob pattern (contains `*`, `?`) | **File listing** — matched paths with token estimates |
|
|
41
|
+
| `"TODO fix"` | Text (doesn't match above) | **Text search** — literal content matches |
|
|
42
|
+
|
|
43
|
+
## Core Operations
|
|
44
|
+
|
|
45
|
+
### 1. Read a File
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx -y tilth src/index.ts # Smart view (outline if large, full if small)
|
|
49
|
+
npx -y tilth src/index.ts --full # Force full content
|
|
50
|
+
npx -y tilth src/index.ts --section 45-89 # Exact line range
|
|
51
|
+
npx -y tilth src/index.ts --section "## Config" # By heading
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Output: numbered lines (`N content`). Large files get a structural outline; use `--section` to drill into specific ranges.
|
|
55
|
+
|
|
56
|
+
### 2. Search for Symbols
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx -y tilth initCommand --scope src/ # Find definition + all usages
|
|
60
|
+
npx -y tilth handleAuth --scope src/auth/ # Scoped to subdirectory
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Returns: definitions first (with expanded source), then usages with context lines.
|
|
64
|
+
|
|
65
|
+
### 3. Search for Text
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx -y tilth "TODO" --scope src/ # Literal text search
|
|
69
|
+
npx -y tilth "version" --scope src/ # Finds all occurrences
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
tilth auto-detects text vs symbol. Identifiers (camelCase, snake_case) → symbol search. Multi-word or quoted strings → text search.
|
|
73
|
+
|
|
74
|
+
### 4. List Files (Glob)
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npx -y tilth "*.test.ts" --scope src/ # List test files
|
|
78
|
+
npx -y tilth "*.ts" --scope src/commands/ # List TS files in subdir
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Returns: matched file paths with token size estimates.
|
|
82
|
+
|
|
83
|
+
### 5. Codebase Map (CLI-Only)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npx -y tilth --map --scope src/ # Structural skeleton
|
|
87
|
+
npx -y tilth --map --scope . # Whole project
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Returns: directory tree with exported symbols per file. **CLI-only** — not available in MCP mode.
|
|
91
|
+
|
|
92
|
+
## Available Flags
|
|
93
|
+
|
|
94
|
+
| Flag | Purpose | Example |
|
|
95
|
+
| ------------------- | -------------------------------------- | -------------------- |
|
|
96
|
+
| `--scope <DIR>` | Restrict search to directory | `--scope src/` |
|
|
97
|
+
| `--section <RANGE>` | Line range or heading for file reads | `--section 45-89` |
|
|
98
|
+
| `--full` | Force full file content (skip outline) | `--full` |
|
|
99
|
+
| `--budget <N>` | Max tokens in response | `--budget 2000` |
|
|
100
|
+
| `--json` | Machine-readable JSON output | `--json` |
|
|
101
|
+
| `--map` | Generate codebase structure map | `--map --scope src/` |
|
|
102
|
+
|
|
103
|
+
**Note:** `--kind`, `--deps`, `--expand`, and multi-symbol comma syntax are MCP-only features. The CLI does not support them.
|
|
104
|
+
|
|
105
|
+
## MCP vs CLI Comparison
|
|
106
|
+
|
|
107
|
+
| Feature | MCP (main agent) | CLI (all agents) |
|
|
108
|
+
| ------------------------------------- | ---------------- | ------------------- |
|
|
109
|
+
| Session dedup (`[shown earlier]`) | Yes | No |
|
|
110
|
+
| Hash-anchored editing (`tilth_edit`) | Yes | No |
|
|
111
|
+
| Blast-radius analysis (`tilth_deps`) | Yes | No |
|
|
112
|
+
| Multi-symbol search (`sym1,sym2`) | Yes | No |
|
|
113
|
+
| `--kind` flag (content/regex/callers) | Yes | No |
|
|
114
|
+
| `--expand` control | Yes | No |
|
|
115
|
+
| `--map` codebase skeleton | No | Yes |
|
|
116
|
+
| Subagent access | No (main only) | Yes (any with Bash) |
|
|
117
|
+
| Process overhead | Once (~17ms) | Per call (~17ms) |
|
|
118
|
+
|
|
119
|
+
## Output Format Examples
|
|
120
|
+
|
|
121
|
+
### File read (small file)
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
# src/config.ts (45 lines, ~380 tokens) [full]
|
|
125
|
+
|
|
126
|
+
1 import { z } from 'zod';
|
|
127
|
+
2 export const schema = z.object({
|
|
128
|
+
...
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Symbol search
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
# Search: "initCommand" in src/ — 6 matches (2 definitions, 4 usages)
|
|
135
|
+
|
|
136
|
+
### Definitions (2)
|
|
137
|
+
## commands/init.ts:515-961 [definition]
|
|
138
|
+
→ [515-961] export async function initCommand(...)
|
|
139
|
+
|
|
140
|
+
### Usages — same package (4)
|
|
141
|
+
## index.ts:10 [usage]
|
|
142
|
+
→ [10] import { initCommand } from "./commands/init.js";
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Codebase map
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
# Map: src/ (depth 3)
|
|
149
|
+
index.ts (~1214 tokens)
|
|
150
|
+
commands/
|
|
151
|
+
init.ts: initCommand, detectMode, ...
|
|
152
|
+
upgrade.ts: checkVersion, upgradeCommand, ...
|
|
153
|
+
utils/
|
|
154
|
+
errors.ts: resolveOpencodePath, showError, ...
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Usage Tips
|
|
158
|
+
|
|
159
|
+
- **Search first, read second** — symbol search finds definitions AND shows expanded source
|
|
160
|
+
- **Use `--section` for large files** — outline tells you line ranges; drill in with `--section 44-89`
|
|
161
|
+
- **Use `--scope`** to narrow searches — avoids scanning irrelevant directories
|
|
162
|
+
- **Use `--budget`** when you need concise output (limits token count)
|
|
163
|
+
- **~17ms per call** — fast enough for interactive use, but avoid unnecessary repeated calls
|
|
164
|
+
|
|
165
|
+
## Example Subagent Dispatch
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
task({
|
|
169
|
+
subagent_type: "general",
|
|
170
|
+
prompt: `Use tilth CLI for code navigation (run via: npx -y tilth).
|
|
171
|
+
|
|
172
|
+
Find the definition of \`initCommand\` and understand how it's called:
|
|
173
|
+
npx -y tilth initCommand --scope src/
|
|
174
|
+
|
|
175
|
+
Then read the relevant file section:
|
|
176
|
+
npx -y tilth src/commands/init.ts --section 515-600
|
|
177
|
+
|
|
178
|
+
[rest of task instructions]`,
|
|
179
|
+
});
|
|
180
|
+
```
|
package/package.json
CHANGED
|
File without changes
|