clikit-plugin 0.3.0 → 0.3.2
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/command/debug.md +19 -11
- package/command/verify.md +16 -3
- package/package.json +1 -1
- package/skill/deep-research/SKILL.md +8 -3
- package/skill/source-code-research/SKILL.md +26 -7
- package/skill/tilth-reading/SKILL.md +41 -24
- package/src/agents/build.md +15 -6
- package/src/agents/explore.md +20 -10
- package/src/agents/oracle.md +18 -7
- package/src/agents/plan.md +6 -1
- package/src/agents/review.md +14 -1
- package/src/agents/vision.md +18 -1
package/command/debug.md
CHANGED
|
@@ -30,8 +30,15 @@ Document:
|
|
|
30
30
|
git log --oneline -10
|
|
31
31
|
git diff HEAD~5
|
|
32
32
|
|
|
33
|
-
#
|
|
34
|
-
|
|
33
|
+
# Read suspicious files — tilth-first
|
|
34
|
+
bash: tilth <path>
|
|
35
|
+
bash: tilth <path> --section "## SectionName"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
# Fallback reading
|
|
40
|
+
read <path> — full content (auto-enhanced by tilth hook)
|
|
41
|
+
grep pattern="<error pattern>" include="*.ts"
|
|
35
42
|
```
|
|
36
43
|
|
|
37
44
|
### 3. Investigate
|
|
@@ -42,7 +49,7 @@ Hypothesis → Evidence → Verify → Repeat
|
|
|
42
49
|
|
|
43
50
|
1. Form hypothesis about cause
|
|
44
51
|
2. Predict what evidence would confirm/deny
|
|
45
|
-
3. Gather evidence
|
|
52
|
+
3. Gather evidence — **tilth-first**: `bash: tilth <path>` → `read` → `grep` → LSP
|
|
46
53
|
4. If wrong, form new hypothesis
|
|
47
54
|
|
|
48
55
|
### 4. Root Cause Analysis (5 Whys)
|
|
@@ -78,14 +85,15 @@ pnpm typecheck
|
|
|
78
85
|
|
|
79
86
|
## Debugging Tools
|
|
80
87
|
|
|
81
|
-
| Tool | Use For |
|
|
82
|
-
|
|
83
|
-
| `
|
|
84
|
-
| `Read` |
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
|
|
|
88
|
+
| Tool | Priority | Use For |
|
|
89
|
+
|------|----------|---------|
|
|
90
|
+
| `bash: tilth <path>` | **1st** | Smart read — outline or full, section targeting |
|
|
91
|
+
| `Read` | 2nd (fallback) | Full file content (auto-enhanced by tilth hook) |
|
|
92
|
+
| `LSP` | **1st for symbols** | Trace definitions, find references, diagnostics |
|
|
93
|
+
| `Grep` | Fallback | Find patterns when tilth section can't isolate |
|
|
94
|
+
| `Bash` | As needed | Run tests, check logs, git bisect |
|
|
95
|
+
| `ast_grep_search` | As needed | Find structural code patterns |
|
|
96
|
+
| Oracle | Escalation | Complex multi-layer analysis |
|
|
89
97
|
|
|
90
98
|
## Common Patterns
|
|
91
99
|
|
package/command/verify.md
CHANGED
|
@@ -9,7 +9,7 @@ You are the **Build Agent**. Execute the `/verify` command.
|
|
|
9
9
|
|
|
10
10
|
`/verify` is a **deep audit**, not a mechanical checklist. Before running any command, you must deeply understand the codebase — read files, trace call chains, understand intent. Only then can you produce a meaningful review.
|
|
11
11
|
|
|
12
|
-
Inspired by Amp's `deep` mode: **silently read and traverse the codebase first
|
|
12
|
+
Inspired by Amp's `deep` mode: **silently read and traverse the codebase first** (tilth-first — smart outline before committing to full reads), understand the full impact chain, then evaluate. Don't rush to output — correctness over speed.
|
|
13
13
|
|
|
14
14
|
`/start` performs a **per-packet** narrow-scope verify.
|
|
15
15
|
`/verify` runs **deep comprehension + 4-gate check + reasoning-grade review** — full SHIP_READY verdict.
|
|
@@ -33,8 +33,21 @@ git log --oneline -5 # recent commit history
|
|
|
33
33
|
|
|
34
34
|
### 1.3 Trace the Impact Chain
|
|
35
35
|
For each changed file:
|
|
36
|
-
1. **Read the file** —
|
|
37
|
-
|
|
36
|
+
1. **Read the file** — tilth-first for smart outline/section; fallback to `read`
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# 1st choice — smart read (outline or full based on size)
|
|
40
|
+
bash: tilth <path>
|
|
41
|
+
bash: tilth <path> --section "## SectionName" # section targeting
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
# Fallback (tilth unavailable)
|
|
46
|
+
read <path> — full raw content (auto-enhanced by tilth hook)
|
|
47
|
+
read <path> offset=X limit=N — section targeting fallback
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
2. **Find callers** — what depends on this? (`lsp_find_references`, then `grep` as fallback)
|
|
38
51
|
3. **Read tests** — what behavior is expected?
|
|
39
52
|
4. **Identify blast radius** — what could break downstream?
|
|
40
53
|
|
package/package.json
CHANGED
|
@@ -13,11 +13,15 @@ description: Use when exploring unfamiliar code or implementing complex features
|
|
|
13
13
|
3. lsp_goto_definition → trace origins
|
|
14
14
|
4. lsp_find_references → map all usages
|
|
15
15
|
5. lsp_document_symbols → understand exports
|
|
16
|
-
6.
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
6. bash: tilth <path> → smart read (outline first, then section drill)
|
|
17
|
+
Fallback: read <path> (auto-enhanced) → grep (pattern search)
|
|
18
|
+
7. Incoming/outgoing call hierarchy → trace data flow
|
|
19
|
+
8. Score each finding 1–10
|
|
20
|
+
9. Save to memory/research/[topic]-findings.md
|
|
19
21
|
```
|
|
20
22
|
|
|
23
|
+
> **Step 6 — tilth-first reading:** for any file surfaced by LSP, use `bash: tilth <path>` to get a smart outline before reading in full. Use `--section` to drill into specific functions. Fall back to `read` + `grep` only when tilth is unavailable.
|
|
24
|
+
|
|
21
25
|
## Confidence Scoring
|
|
22
26
|
|
|
23
27
|
| Score | Meaning |
|
|
@@ -52,6 +56,7 @@ Save to `.opencode/memory/research/[topic]-findings.md`:
|
|
|
52
56
|
## Red Flags
|
|
53
57
|
|
|
54
58
|
- Skipping LSP — guessing structure instead of tracing it
|
|
59
|
+
- Reading large files with `read` without trying `tilth` outline first
|
|
55
60
|
- Not saving findings to memory (lost between sessions)
|
|
56
61
|
- Asserting with confidence < 4 without flagging it
|
|
57
62
|
|
|
@@ -15,17 +15,35 @@ description: Use when API docs are insufficient. Go directly to package source t
|
|
|
15
15
|
## Protocol
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
# 1. Locate source
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
# 1. Locate source — tilth-first
|
|
19
|
+
bash: tilth node_modules/<pkg>/package.json
|
|
20
|
+
bash: tilth node_modules/<pkg>/src/
|
|
21
21
|
|
|
22
|
-
#
|
|
23
|
-
|
|
22
|
+
# Fallback: use grep/read only if tilth unavailable
|
|
23
|
+
grep -E '"main"|"types"|"source"' node_modules/<pkg>/package.json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# 2. Read entry point — tilth-first
|
|
28
|
+
bash: tilth node_modules/<pkg>/src/index.ts
|
|
29
|
+
bash: tilth node_modules/<pkg>/src/index.ts --section "## exports"
|
|
30
|
+
|
|
31
|
+
# Fallback
|
|
32
|
+
read node_modules/<pkg>/src/index.ts
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# 3. Read tests — tilth gives outline first for large test files
|
|
37
|
+
bash: tilth node_modules/<pkg>/test/
|
|
38
|
+
bash: tilth node_modules/<pkg>/__tests__/
|
|
24
39
|
|
|
25
|
-
#
|
|
26
|
-
|
|
40
|
+
# Fallback
|
|
41
|
+
read node_modules/<pkg>/test/index.test.ts
|
|
27
42
|
```
|
|
28
43
|
|
|
44
|
+
> **Tilth-first rule:** always try `bash: tilth <path>` before `read` or `cat`.
|
|
45
|
+
> For large source files, tilth's outline mode shows all exports/functions before you commit to reading the full file.
|
|
46
|
+
|
|
29
47
|
## What to Look For
|
|
30
48
|
|
|
31
49
|
| Question | Where |
|
|
@@ -62,6 +80,7 @@ Save to `.opencode/memory/research/[package]-internals.md`:
|
|
|
62
80
|
- Not reading the tests
|
|
63
81
|
- Assuming behavior from the function name
|
|
64
82
|
- Ignoring error paths
|
|
83
|
+
- Using `cat` or raw `read` on large files without tilth outline first
|
|
65
84
|
|
|
66
85
|
## References
|
|
67
86
|
|
|
@@ -10,43 +10,60 @@ When any task requires reading files or exploring a codebase, follow this priori
|
|
|
10
10
|
## Priority Chain
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
1. tilth
|
|
14
|
-
2. read
|
|
15
|
-
3. glob
|
|
16
|
-
4. grep
|
|
13
|
+
1. bash: tilth <path> → smart, outline-aware, section-targeted reading
|
|
14
|
+
2. read <path> → raw file content (auto-enhanced by hook when tilth available)
|
|
15
|
+
3. glob <pattern> → fallback when you need to discover file paths
|
|
16
|
+
4. grep <pattern> → fallback when you need to search content patterns
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
## Two Paths — Know Which to Use
|
|
20
|
+
|
|
21
|
+
| Situation | How to invoke tilth |
|
|
22
|
+
|-----------|-------------------|
|
|
23
|
+
| Want smart full read or outline | `bash: tilth <path>` |
|
|
24
|
+
| Want a specific section or heading | `bash: tilth <path> --section "## Heading"` |
|
|
25
|
+
| Want a line range | `bash: tilth <path> --section 45-89` |
|
|
26
|
+
| Tilth unavailable or bash not permitted | `read <path>` (hook auto-enhances when possible) |
|
|
27
|
+
| Need to discover paths first | `glob pattern="…"` |
|
|
28
|
+
| Need content pattern search | `grep pattern="…"` |
|
|
29
|
+
|
|
30
|
+
> **Runtime hook:** the `tilth_reading` hook already enhances `read` tool output via tilth when tilth is on PATH.
|
|
31
|
+
> So `read` alone is often sufficient for full-file reads — use explicit `bash: tilth` when you need section targeting or outline-only mode.
|
|
32
|
+
|
|
19
33
|
## Workflow
|
|
20
34
|
|
|
21
|
-
### Step 1 — Try tilth (always first)
|
|
35
|
+
### Step 1 — Try tilth via bash (always first for large/unknown files)
|
|
22
36
|
|
|
23
37
|
```bash
|
|
38
|
+
# Check tilth is available (cache result — don't repeat every call)
|
|
39
|
+
tilth --version
|
|
40
|
+
|
|
24
41
|
# Read a whole file (smart: outline or full depending on size)
|
|
25
42
|
tilth <path>
|
|
26
43
|
|
|
27
|
-
# Read a specific section by line range
|
|
28
|
-
tilth <path> --section 45-89
|
|
29
|
-
|
|
30
44
|
# Read a specific section by markdown heading
|
|
31
45
|
tilth <path> --section "## Installation"
|
|
32
|
-
```
|
|
33
46
|
|
|
34
|
-
|
|
47
|
+
# Read a specific section by line range
|
|
48
|
+
tilth <path> --section 45-89
|
|
49
|
+
```
|
|
35
50
|
|
|
36
51
|
**When tilth succeeds:** use its output directly. Do not duplicate with `read`.
|
|
37
52
|
|
|
38
|
-
**When tilth fails or is unavailable:**
|
|
53
|
+
**When tilth fails or is unavailable:** fall back immediately — do not retry tilth for the same path.
|
|
39
54
|
|
|
40
55
|
---
|
|
41
56
|
|
|
42
|
-
### Step 2 — Fallback: read (full file content)
|
|
57
|
+
### Step 2 — Fallback: read (full file content, hook-enhanced)
|
|
43
58
|
|
|
44
|
-
Use when
|
|
59
|
+
Use when tilth bash is unavailable or you need raw content.
|
|
45
60
|
|
|
46
61
|
```
|
|
47
62
|
read <path>
|
|
48
63
|
```
|
|
49
64
|
|
|
65
|
+
The `tilth_reading` runtime hook automatically runs tilth on the output when available.
|
|
66
|
+
|
|
50
67
|
Use `read` with `offset` + `limit` to scope large files:
|
|
51
68
|
```
|
|
52
69
|
read <path> offset=<line> limit=<n>
|
|
@@ -81,13 +98,13 @@ Combine with `glob` results when searching a pre-discovered set of files.
|
|
|
81
98
|
|
|
82
99
|
## Decision Table
|
|
83
100
|
|
|
84
|
-
| Need |
|
|
85
|
-
|
|
86
|
-
| Read
|
|
87
|
-
| Read
|
|
88
|
-
|
|
|
89
|
-
| Search
|
|
90
|
-
| tilth unavailable
|
|
101
|
+
| Need | Primary | Fallback |
|
|
102
|
+
|------|---------|---------|
|
|
103
|
+
| Read known file — smart outline | `bash: tilth <path>` | `read <path>` |
|
|
104
|
+
| Read known file — specific section | `bash: tilth <path> --section "…"` | `read <path> offset=X limit=N` |
|
|
105
|
+
| Discover file paths | `glob pattern="…"` | — |
|
|
106
|
+
| Search content patterns | `bash: tilth <path>` then `grep` | `grep pattern="…"` |
|
|
107
|
+
| tilth unavailable / bash denied | `read <path>` | `glob` + `grep` |
|
|
91
108
|
|
|
92
109
|
---
|
|
93
110
|
|
|
@@ -96,14 +113,14 @@ Combine with `glob` results when searching a pre-discovered set of files.
|
|
|
96
113
|
- **Never use `read` + `tilth` for the same path** — pick one.
|
|
97
114
|
- **Never use `glob` when you already know the path** — call `read`/`tilth` directly.
|
|
98
115
|
- **Never call `grep` for something `tilth --section` can already isolate.**
|
|
99
|
-
- **
|
|
116
|
+
- **Never assume bash: tilth works** — verify permission first (`tilth*: allow` in agent frontmatter).
|
|
100
117
|
|
|
101
118
|
## Red Flags
|
|
102
119
|
|
|
103
|
-
- Calling `read` on a large file (>500 lines) without first trying `tilth` — tilth's outline mode saves context.
|
|
120
|
+
- Calling `read` on a large file (>500 lines) without first trying `bash: tilth` — tilth's outline mode saves context.
|
|
104
121
|
- Using `grep` to extract a known section — use `tilth --section` instead.
|
|
105
|
-
-
|
|
106
|
-
-
|
|
122
|
+
- Agent has `bash: "*": deny` without `tilth*: allow` — tilth is silently blocked; fallback to `read`.
|
|
123
|
+
- Assuming `read` is not enhanced — the hook runs tilth on `read` output automatically.
|
|
107
124
|
|
|
108
125
|
## References
|
|
109
126
|
|
package/src/agents/build.md
CHANGED
|
@@ -201,15 +201,24 @@ The `files_in_scope` field is the execution boundary — read it first.
|
|
|
201
201
|
|
|
202
202
|
**File reading: load `tilth-reading` skill — tilth first, fallback to read/glob/grep.**
|
|
203
203
|
|
|
204
|
+
```bash
|
|
205
|
+
# 1st choice: smart outline-aware read (bash tool)
|
|
206
|
+
tilth <path>
|
|
207
|
+
tilth <path> --section "## Heading" # section by heading
|
|
208
|
+
tilth <path> --section 45-89 # section by line range
|
|
209
|
+
```
|
|
210
|
+
|
|
204
211
|
```
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
glob + grep # fallback: discovery + pattern search
|
|
212
|
+
# Fallback: use these tools when tilth unavailable or fails
|
|
213
|
+
read <path> # full raw content
|
|
214
|
+
glob + grep # discovery + pattern search
|
|
209
215
|
```
|
|
210
216
|
|
|
211
|
-
>
|
|
212
|
-
>
|
|
217
|
+
> **Two paths available:**
|
|
218
|
+
> - **Automatic:** `read` tool output is already enhanced by the tilth runtime hook when tilth is available.
|
|
219
|
+
> - **Explicit:** call `bash: tilth <path>` for section-targeted reads or outline-only mode.
|
|
220
|
+
>
|
|
221
|
+
> For large files (>500 lines), prefer explicit `tilth` via bash to get an outline first.
|
|
213
222
|
|
|
214
223
|
Use LSP tools to understand the code before touching it:
|
|
215
224
|
|
package/src/agents/explore.md
CHANGED
|
@@ -19,6 +19,8 @@ tools:
|
|
|
19
19
|
permission:
|
|
20
20
|
edit: deny
|
|
21
21
|
bash:
|
|
22
|
+
"tilth*": allow
|
|
23
|
+
"npx tilth*": allow
|
|
22
24
|
"git log*": allow
|
|
23
25
|
"git blame*": allow
|
|
24
26
|
"git show*": allow
|
|
@@ -56,17 +58,24 @@ Work from precise to broad. **Stop when the answer is found** — do not over-ex
|
|
|
56
58
|
|
|
57
59
|
### Reading priority (load `tilth-reading` skill before heavy file work)
|
|
58
60
|
|
|
59
|
-
When reading files,
|
|
61
|
+
When reading files, use `bash: tilth` first — it is now allowed in your bash permissions.
|
|
60
62
|
|
|
63
|
+
```bash
|
|
64
|
+
# 1st choice — bash tool (allowed: tilth* and npx tilth*)
|
|
65
|
+
bash: tilth <path>
|
|
66
|
+
bash: tilth <path> --section "## Heading"
|
|
67
|
+
bash: tilth <path> --section 45-89
|
|
61
68
|
```
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
# Fallback tools (when tilth unavailable or bash fails)
|
|
72
|
+
read <path> — full raw content (hook auto-enhances via tilth when available)
|
|
73
|
+
glob <pattern> — file discovery
|
|
74
|
+
grep <pattern> — content search
|
|
66
75
|
```
|
|
67
76
|
|
|
68
|
-
>
|
|
69
|
-
>
|
|
77
|
+
> `tilth` is permitted via `bash` in your frontmatter (`tilth*: allow`).
|
|
78
|
+
> Use it for any file that may be large (>200 lines) or where section targeting helps.
|
|
70
79
|
|
|
71
80
|
### Search priority table
|
|
72
81
|
|
|
@@ -75,9 +84,10 @@ When reading files, follow the tilth-first chain:
|
|
|
75
84
|
| 1 | Symbol definitions, type signatures | `lsp_workspace_symbols`, `lsp_goto_definition`, `lsp_hover` |
|
|
76
85
|
| 2 | File structure, file listing | `glob` (pattern), `read` (directory listing) |
|
|
77
86
|
| 3 | All call sites / usages | `lsp_find_references` |
|
|
78
|
-
| 4 | File content — known path | `tilth <path>` → `read <path>` (fallback) |
|
|
79
|
-
| 5 |
|
|
80
|
-
| 6 |
|
|
87
|
+
| 4 | File content — known path | `bash: tilth <path>` → `read <path>` (fallback) |
|
|
88
|
+
| 5 | File section — known heading/range | `bash: tilth <path> --section "…"` |
|
|
89
|
+
| 6 | Text pattern across files | `grep` (dedicated tool, not bash) |
|
|
90
|
+
| 7 | Recent changes, authorship | `bash: git log`, `git blame`, `git show`, `git diff` |
|
|
81
91
|
|
|
82
92
|
**Prefer LSP over text search for symbols.** `lsp_find_references` returns all usages with zero false positives; text grep may miss renamed or aliased identifiers.
|
|
83
93
|
|
package/src/agents/oracle.md
CHANGED
|
@@ -21,6 +21,8 @@ tools:
|
|
|
21
21
|
permission:
|
|
22
22
|
edit: deny
|
|
23
23
|
bash:
|
|
24
|
+
"tilth*": allow
|
|
25
|
+
"npx tilth*": allow
|
|
24
26
|
"git log*": allow
|
|
25
27
|
"git blame*": allow
|
|
26
28
|
"git show*": allow
|
|
@@ -95,20 +97,29 @@ If the request is ambiguous, state your interpretation assumption at the top —
|
|
|
95
97
|
|
|
96
98
|
## Phase 2 — Gather Local Evidence
|
|
97
99
|
|
|
98
|
-
Use **LSP tools first**, then `tilth`/`read`/`glob`/`grep`, then git history last.
|
|
100
|
+
Use **LSP tools first**, then `bash: tilth`/`read`/`glob`/`grep`, then git history last.
|
|
99
101
|
|
|
100
|
-
> Load the `tilth-reading` skill for file reading.
|
|
101
|
-
>
|
|
102
|
+
> Load the `tilth-reading` skill for file reading.
|
|
103
|
+
> `tilth` is permitted via bash (`tilth*: allow` in your frontmatter).
|
|
104
|
+
> Priority: `bash: tilth <path>` → `read` (auto-enhanced fallback) → `glob` + `grep`.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Explicit tilth for outline or section (allowed via bash permissions)
|
|
108
|
+
bash: tilth <path>
|
|
109
|
+
bash: tilth <path> --section "## SectionName"
|
|
110
|
+
bash: tilth <path> --section 45-89
|
|
111
|
+
```
|
|
102
112
|
|
|
103
113
|
| Priority | What to find | Tools |
|
|
104
114
|
|----------|-------------|-------|
|
|
105
115
|
| 1 | Symbol definitions, type signatures, current design | `lsp_workspace_symbols`, `lsp_goto_definition`, `lsp_hover` |
|
|
106
116
|
| 2 | All callers / consumers of affected code | `lsp_find_references` |
|
|
107
117
|
| 3 | Structural patterns, coupling, duplication | `ast_grep_search`, `grep` |
|
|
108
|
-
| 4 | File content — smart read (outline or full) | `tilth <path>` → `read <path>` (fallback) |
|
|
109
|
-
| 5 | File
|
|
110
|
-
| 6 |
|
|
111
|
-
| 7 |
|
|
118
|
+
| 4 | File content — smart read (outline or full) | `bash: tilth <path>` → `read <path>` (fallback) |
|
|
119
|
+
| 5 | File section — targeted by heading or range | `bash: tilth <path> --section "…"` |
|
|
120
|
+
| 6 | File structure, scope of change | `glob`, directory listing via `read` |
|
|
121
|
+
| 7 | Recent changes, authorship, regression risk | `bash: git log`, `git blame`, `git diff` |
|
|
122
|
+
| 8 | Type errors, lint issues in affected scope | `lsp_diagnostics` |
|
|
112
123
|
|
|
113
124
|
**Stop when you have enough evidence to make a well-grounded recommendation.** Do not over-read beyond what the decision requires.
|
|
114
125
|
|
package/src/agents/plan.md
CHANGED
|
@@ -34,10 +34,12 @@ beads-village_inbox(unread=true) # check for blockers or messages
|
|
|
34
34
|
beads-village_ls(status="ready") # see what's already queued
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Then read memory context:
|
|
37
|
+
Then read memory context — **tilth-first via `read` tool** (runtime hook auto-enhances):
|
|
38
38
|
- `.opencode/memory/_digest.md` — session-start digest of prior observations
|
|
39
39
|
- Any relevant `memory/specs/`, `memory/plans/`, `memory/research/` artifacts
|
|
40
40
|
|
|
41
|
+
> You have `bash: false`. Use the `read` tool — it is automatically enhanced by the tilth runtime hook when tilth is available (smart outline/section mode). For large files, use `read` with `offset`+`limit` to target sections.
|
|
42
|
+
|
|
41
43
|
---
|
|
42
44
|
|
|
43
45
|
## Phase 1 — Intake & Classify
|
|
@@ -77,6 +79,9 @@ Ask only if the answer materially changes packet boundaries or acceptance criter
|
|
|
77
79
|
**You are in read-only mode during this phase.**
|
|
78
80
|
Delegate ALL codebase inspection to `@explore`. You do not have bash access — do not attempt to read files yourself.
|
|
79
81
|
|
|
82
|
+
> `@explore` uses **tilth-first reading** (`bash: tilth` → `read` → `glob` → `grep`).
|
|
83
|
+
> When delegating, let `@explore` choose the reading strategy — do not prescribe `grep` or `read` in your delegation prompt.
|
|
84
|
+
|
|
80
85
|
Exploration checklist:
|
|
81
86
|
- [ ] Codebase patterns — naming conventions, test locations, folder structure
|
|
82
87
|
- [ ] Affected files — what currently exists that this plan will touch
|
package/src/agents/review.md
CHANGED
|
@@ -15,6 +15,8 @@ tools:
|
|
|
15
15
|
permission:
|
|
16
16
|
edit: deny
|
|
17
17
|
bash:
|
|
18
|
+
"tilth*": allow
|
|
19
|
+
"npx tilth*": allow
|
|
18
20
|
"git diff*": allow
|
|
19
21
|
"git log*": allow
|
|
20
22
|
"git show*": allow
|
|
@@ -98,7 +100,18 @@ Then:
|
|
|
98
100
|
lsp_diagnostics <all-changed-files>
|
|
99
101
|
```
|
|
100
102
|
|
|
101
|
-
Read each changed file
|
|
103
|
+
Read each changed file — **tilth-first**:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# 1st choice — smart read (outline or full based on size)
|
|
107
|
+
bash: tilth <path>
|
|
108
|
+
bash: tilth <path> --section "## SectionName" # section targeting
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
# Fallback (when tilth unavailable)
|
|
113
|
+
read <path> — full raw content (hook auto-enhances when tilth on PATH)
|
|
114
|
+
```
|
|
102
115
|
|
|
103
116
|
For spec/plan context: check `.opencode/memory/plans/` and `specs/`. If none exist, proceed without them — absence of a plan is not a blocker for review.
|
|
104
117
|
|
package/src/agents/vision.md
CHANGED
|
@@ -11,6 +11,8 @@ tools:
|
|
|
11
11
|
permission:
|
|
12
12
|
edit: allow
|
|
13
13
|
bash:
|
|
14
|
+
"tilth*": allow
|
|
15
|
+
"npx tilth*": allow
|
|
14
16
|
"npm run dev*": allow
|
|
15
17
|
"pnpm dev*": allow
|
|
16
18
|
"bun run dev*": allow
|
|
@@ -41,7 +43,22 @@ You are the Vision Agent — a design architect who turns prompts, sketches, and
|
|
|
41
43
|
|
|
42
44
|
Build will provide design context when delegating to you (existing design system, CSS framework, component patterns). Use this context — do not delegate to other agents.
|
|
43
45
|
|
|
44
|
-
If context is insufficient,
|
|
46
|
+
If context is insufficient, read existing code — **tilth-first**:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# 1st choice — smart read (outline or full)
|
|
50
|
+
bash: tilth <path>
|
|
51
|
+
bash: tilth <path> --section "## SectionName"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
# Fallback
|
|
56
|
+
glob pattern="…" — discover files
|
|
57
|
+
read <path> — full content (auto-enhanced by tilth hook)
|
|
58
|
+
grep pattern="…" — content search
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Use to find:
|
|
45
62
|
- CSS variables, theme config, design tokens
|
|
46
63
|
- Existing component naming and prop patterns
|
|
47
64
|
- package.json for CSS framework, component library, icons
|