clikit-plugin 0.3.1 → 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/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
|
|
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
|