clikit-plugin 0.3.9 → 0.3.11
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/AGENTS.md +38 -10
- package/README.md +21 -20
- package/command/create.md +104 -20
- package/command/discuss.md +111 -0
- package/command/handoff.md +7 -5
- package/command/init.md +2 -2
- package/command/pr.md +2 -4
- package/command/research.md +130 -28
- package/command/resume.md +2 -2
- package/command/ship.md +1 -1
- package/command/start.md +8 -9
- package/command/status.md +11 -9
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -0
- package/memory/_digest.md +1 -1
- package/memory/_templates/discussion.md +91 -0
- package/memory/_templates/handoff.md +2 -2
- package/memory/_templates/plan.md +83 -176
- package/memory/_templates/research.md +33 -7
- package/memory/_templates/review.md +2 -2
- package/memory/discussions/.gitkeep +0 -0
- package/package.json +3 -3
- package/skill/requesting-code-review/SKILL.md +2 -2
- package/skill/ritual-workflow/SKILL.md +6 -4
- package/src/agents/AGENTS.md +13 -10
- package/src/agents/build.md +4 -4
- package/src/agents/explore.md +14 -13
- package/src/agents/plan.md +195 -57
- package/src/agents/research.md +41 -11
- package/src/agents/review.md +3 -3
- package/command/import-plan.md +0 -175
- package/command/issue.md +0 -109
- package/memory/_templates/spec.md +0 -128
|
@@ -7,183 +7,90 @@ Use this template when creating implementation plans.
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
```markdown
|
|
10
|
-
# Implementation Plan: [Feature]
|
|
11
|
-
|
|
12
|
-
**Date:** YYYY-MM-DD
|
|
13
|
-
**Author:** [Name]
|
|
14
|
-
**Status:** Draft | Approved
|
|
15
|
-
**bead_id:** [ID]
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Overview
|
|
20
|
-
|
|
21
|
-
[Brief description of what will be built]
|
|
22
|
-
|
|
23
|
-
## References
|
|
24
|
-
|
|
25
|
-
- **Spec:** `.opencode/memory/specs/YYYY-MM-DD-descriptor.md`
|
|
26
|
-
- **PRD:** `.opencode/memory/prds/YYYY-MM-DD-feature.md` (if applicable)
|
|
27
|
-
- **Research:** `.opencode/memory/research/YYYY-MM-DD-topic.md` (if applicable)
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Conventions & Past Decisions
|
|
32
|
-
|
|
33
|
-
### Git Conventions
|
|
34
|
-
- **Commit format:** [e.g., conventional commits, prefix patterns]
|
|
35
|
-
- **Branch naming:** [e.g., feature/xxx, bead/B-xxx]
|
|
36
|
-
- **File organization:** [patterns observed from recent commits]
|
|
37
|
-
|
|
38
|
-
### Relevant Past Decisions
|
|
39
|
-
- [Decision from memory/handoffs that affects this plan, or "None found"]
|
|
40
|
-
|
|
41
|
-
### Learnings & Gotchas
|
|
42
|
-
- [Past learnings, blockers, workarounds from memory that apply, or "None found"]
|
|
43
|
-
|
|
44
|
-
### Prior Research
|
|
45
|
-
- [Relevant findings from .opencode/memory/research/*.md, or "None found"]
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Tasks
|
|
50
|
-
|
|
51
|
-
### Task 1: [Title]
|
|
52
|
-
|
|
53
|
-
| Field | Value |
|
|
54
|
-
|-------|-------|
|
|
55
|
-
| **task_id** | T-001 |
|
|
56
|
-
| **type** | task \| bug \| feature \| chore |
|
|
57
|
-
| **assignee** | build \| fe \| be \| mobile \| devops |
|
|
58
|
-
| **effort** | S \| M \| L \| XL |
|
|
59
|
-
| **priority** | P0 \| P1 \| P2 |
|
|
60
|
-
| **status** | not_started \| in_progress \| blocked \| done |
|
|
61
|
-
| **dependencies** | [T-xxx] or none |
|
|
62
|
-
|
|
63
|
-
**Description:**
|
|
64
|
-
[What needs to be done]
|
|
65
|
-
|
|
66
|
-
**Input:**
|
|
67
|
-
- [Required artifacts/context]
|
|
68
|
-
|
|
69
|
-
**Output:**
|
|
70
|
-
- [Expected deliverables]
|
|
71
|
-
- [Files to create/modify]
|
|
72
|
-
|
|
73
|
-
**Acceptance Criteria:**
|
|
74
|
-
- [ ] AC-01: [Criteria]
|
|
75
|
-
- [ ] AC-02: [Criteria]
|
|
76
|
-
|
|
77
|
-
**Boundaries:**
|
|
78
|
-
- [What NOT to do]
|
|
79
|
-
|
|
80
|
-
**Task Packet:**
|
|
81
|
-
- **packet_id:** P-T-001
|
|
82
|
-
- **goal:** [Single executable concern]
|
|
83
|
-
- **files_in_scope:**
|
|
84
|
-
- create: [`path/to/new-file.ts`]
|
|
85
|
-
- modify: [`path/to/existing.ts`]
|
|
86
|
-
- delete: []
|
|
87
|
-
- **verification_commands:**
|
|
88
|
-
- `bun run typecheck`
|
|
89
|
-
- `bun test path/to/test.ts`
|
|
90
|
-
- **risks:**
|
|
91
|
-
- [Top risk for this packet]
|
|
92
|
-
- **escalate_if:**
|
|
93
|
-
- [Verification fails twice]
|
|
94
|
-
- [A file outside scope must be edited]
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
### Task 2: [Title]
|
|
99
|
-
|
|
100
|
-
[Repeat structure]
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## File Impact
|
|
105
|
-
|
|
106
|
-
**Files to CREATE:**
|
|
107
|
-
- `path/to/new-file.ts` — [Purpose]
|
|
108
|
-
|
|
109
|
-
**Files to MODIFY:**
|
|
110
|
-
- `path/to/existing.ts` — [Reason]
|
|
111
|
-
|
|
112
|
-
**Files to DELETE:**
|
|
113
|
-
- (none)
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Execution Model
|
|
118
|
-
|
|
119
|
-
- Workflow quick mode: `/create → /start → /verify → /ship`
|
|
120
|
-
- Workflow deep mode: `/create → /research → /design → /start → /verify → /ship`
|
|
121
|
-
- Execution unit: **Task Packet**
|
|
122
|
-
- Source of truth: **Beads**
|
|
123
|
-
- `/start`: execute + per-packet verify loop
|
|
124
|
-
- `/verify`: pre-ship gate (all 4 checks, SHIP_READY verdict required before `/ship`)
|
|
125
|
-
- `/ship`: commit + sync/push landed changes in the shared checkout; `/pr` is an explicit exception path
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Dependencies
|
|
130
|
-
|
|
131
|
-
```mermaid
|
|
132
|
-
graph TD
|
|
133
|
-
T001[T-001: Title] --> T002[T-002: Title]
|
|
134
|
-
T002 --> T003[T-003: Title]
|
|
135
|
-
T001 --> T003
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Effort Summary
|
|
141
|
-
|
|
142
|
-
| Task | Effort | Priority |
|
|
143
|
-
|------|--------|----------|
|
|
144
|
-
| T-001 | S | P0 |
|
|
145
|
-
| T-002 | M | P0 |
|
|
146
|
-
| T-003 | S | P1 |
|
|
147
|
-
|
|
148
|
-
**Total Estimated Effort:** [X days/weeks]
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## Risk Assessment
|
|
153
|
-
|
|
154
|
-
| Risk | Probability | Impact | Mitigation |
|
|
155
|
-
|------|-------------|--------|------------|
|
|
156
|
-
| [Risk 1] | L/M/H | L/M/H | [Mitigation] |
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## Quick Mode Eligibility
|
|
161
|
-
|
|
162
|
-
Tasks eligible for Quick Mode (no full plan needed):
|
|
163
|
-
- [ ] T-001 (S, ≤3 files, no security/db/api)
|
|
164
|
-
|
|
165
|
-
## Packet Checklist
|
|
166
|
-
|
|
167
|
-
- [ ] Every task has a packet_id
|
|
168
|
-
- [ ] Every packet stays within 1–3 files
|
|
169
|
-
- [ ] Every packet has executable verification commands
|
|
170
|
-
- [ ] Every packet has an escalate_if clause
|
|
171
|
-
- [ ] File Impact matches all packet scopes
|
|
172
|
-
|
|
173
10
|
---
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
11
|
+
phase: XX-name
|
|
12
|
+
plan: NN
|
|
13
|
+
type: execute
|
|
14
|
+
wave: N
|
|
15
|
+
depends_on: []
|
|
16
|
+
files_modified: []
|
|
17
|
+
autonomous: true
|
|
18
|
+
requirements: []
|
|
19
|
+
must_haves:
|
|
20
|
+
truths: []
|
|
21
|
+
artifacts: []
|
|
22
|
+
key_links: []
|
|
182
23
|
---
|
|
183
24
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
25
|
+
<objective>
|
|
26
|
+
[What this plan accomplishes]
|
|
27
|
+
</objective>
|
|
28
|
+
|
|
29
|
+
<context>
|
|
30
|
+
[Relevant context files and source references]
|
|
31
|
+
</context>
|
|
32
|
+
|
|
33
|
+
<tasks>
|
|
34
|
+
<task type="auto">
|
|
35
|
+
<packet_id>P-T001</packet_id>
|
|
36
|
+
<task_id>T-001</task_id>
|
|
37
|
+
<name>Task 1: [Action-oriented name]</name>
|
|
38
|
+
<goal>[One executable concern]</goal>
|
|
39
|
+
<files_in_scope>
|
|
40
|
+
<create>[]</create>
|
|
41
|
+
<modify>["path/to/file.ext"]</modify>
|
|
42
|
+
<delete>[]</delete>
|
|
43
|
+
</files_in_scope>
|
|
44
|
+
<dependencies>[]</dependencies>
|
|
45
|
+
<action>[Specific implementation]</action>
|
|
46
|
+
<acceptance_criteria>
|
|
47
|
+
<criterion cmd="bun test path/to/test.ts">exits 0</criterion>
|
|
48
|
+
<criterion cmd="lsp_diagnostics path/to/file.ext">zero errors</criterion>
|
|
49
|
+
</acceptance_criteria>
|
|
50
|
+
<verification_commands>
|
|
51
|
+
<command>bun run typecheck</command>
|
|
52
|
+
<command>bun test path/to/test.ts</command>
|
|
53
|
+
</verification_commands>
|
|
54
|
+
<risks>
|
|
55
|
+
<risk>[Top risk for this packet]</risk>
|
|
56
|
+
</risks>
|
|
57
|
+
<escalate_if>
|
|
58
|
+
<condition>Verification fails after 2 attempts</condition>
|
|
59
|
+
<condition>Implementation requires file outside files_in_scope</condition>
|
|
60
|
+
</escalate_if>
|
|
61
|
+
<context_refs>
|
|
62
|
+
<discussion_paths>[]</discussion_paths>
|
|
63
|
+
<plan_path>.opencode/memory/plans/YYYY-MM-DD-<feature>.md</plan_path>
|
|
64
|
+
<research_paths>[]</research_paths>
|
|
65
|
+
</context_refs>
|
|
66
|
+
</task>
|
|
67
|
+
</tasks>
|
|
68
|
+
|
|
69
|
+
<file_impact>
|
|
70
|
+
<create>[]</create>
|
|
71
|
+
<modify>["path/to/file.ext"]</modify>
|
|
72
|
+
<delete>[]</delete>
|
|
73
|
+
</file_impact>
|
|
74
|
+
|
|
75
|
+
<dag>
|
|
76
|
+
<wave number="1">P-T001</wave>
|
|
77
|
+
</dag>
|
|
78
|
+
|
|
79
|
+
<boundaries>
|
|
80
|
+
<always>[Required invariants and constraints]</always>
|
|
81
|
+
<ask_first>[Changes that require explicit approval]</ask_first>
|
|
82
|
+
<never>[Out-of-scope or forbidden changes]</never>
|
|
83
|
+
</boundaries>
|
|
84
|
+
|
|
85
|
+
<out_of_scope>
|
|
86
|
+
[Explicitly excluded work]
|
|
87
|
+
</out_of_scope>
|
|
88
|
+
|
|
89
|
+
<verification>
|
|
90
|
+
[Overall phase checks]
|
|
91
|
+
</verification>
|
|
92
|
+
|
|
93
|
+
<success_criteria>
|
|
94
|
+
[Measurable completion]
|
|
95
|
+
</success_criteria>
|
|
189
96
|
```
|
|
@@ -4,6 +4,8 @@ Use this template when documenting research findings.
|
|
|
4
4
|
|
|
5
5
|
**Output path:** `.opencode/memory/research/YYYY-MM-DD-<topic>.md`
|
|
6
6
|
|
|
7
|
+
This template is optimized for **pre-plan research**: the report should reduce guessing for Plan and Build, not just summarize information.
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
```markdown
|
|
@@ -21,25 +23,35 @@ bead_id: [optional]
|
|
|
21
23
|
# Research: [Topic]
|
|
22
24
|
|
|
23
25
|
**Question:** [Original research question]
|
|
26
|
+
**Planning Goal:** [What planning or implementation decision this report should unblock]
|
|
27
|
+
**Assumptions:** [Any assumption made because context was incomplete, or "None"]
|
|
24
28
|
|
|
25
29
|
---
|
|
26
30
|
|
|
27
31
|
## Summary
|
|
28
32
|
|
|
29
|
-
[2-
|
|
33
|
+
[2-4 sentence answer that directly helps planning or execution]
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Research Brief
|
|
38
|
+
|
|
39
|
+
- **Decision gaps:** [Which unknowns this research was meant to resolve]
|
|
40
|
+
- **Constraints:** [Language, framework, platform, architecture, version limits]
|
|
41
|
+
- **Research scope:** [What was investigated and what was intentionally excluded]
|
|
30
42
|
|
|
31
43
|
---
|
|
32
44
|
|
|
33
45
|
## Key Findings
|
|
34
46
|
|
|
35
47
|
### Finding 1: [Title]
|
|
36
|
-
[Details]
|
|
48
|
+
[VERIFIED]/[CITED]/[ASSUMED] [Details and why this matters]
|
|
37
49
|
|
|
38
50
|
### Finding 2: [Title]
|
|
39
|
-
[Details]
|
|
51
|
+
[VERIFIED]/[CITED]/[ASSUMED] [Details and why this matters]
|
|
40
52
|
|
|
41
53
|
### Finding 3: [Title]
|
|
42
|
-
[Details]
|
|
54
|
+
[VERIFIED]/[CITED]/[ASSUMED] [Details and why this matters]
|
|
43
55
|
|
|
44
56
|
---
|
|
45
57
|
|
|
@@ -76,10 +88,24 @@ bead_id: [optional]
|
|
|
76
88
|
|
|
77
89
|
---
|
|
78
90
|
|
|
79
|
-
##
|
|
91
|
+
## Planning Impact
|
|
92
|
+
|
|
93
|
+
- [How this research should influence the plan or packet boundaries]
|
|
94
|
+
- [What Build should avoid or sequence carefully]
|
|
95
|
+
- [Any dependency, migration, or scope implications]
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Verification Hooks
|
|
100
|
+
|
|
101
|
+
- [ ] [Targeted test, command, or assertion to run during implementation]
|
|
102
|
+
- [ ] [Another implementation-time check]
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Conflicting Evidence (if any)
|
|
80
107
|
|
|
81
|
-
- [
|
|
82
|
-
- [ ] [Test with specific scenario]
|
|
108
|
+
- [Source A says X, source B says Y, and the practical implication]
|
|
83
109
|
|
|
84
110
|
---
|
|
85
111
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Review Template
|
|
2
2
|
|
|
3
|
-
Use this template when reviewing code, PRDs,
|
|
3
|
+
Use this template when reviewing code, PRDs, or plans.
|
|
4
4
|
|
|
5
5
|
**Output path:** `.opencode/memory/reviews/YYYY-MM-DD-<subject>-review.md`
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ Use this template when reviewing code, PRDs, specs, or plans.
|
|
|
8
8
|
|
|
9
9
|
```markdown
|
|
10
10
|
---
|
|
11
|
-
type: Code | PRD |
|
|
11
|
+
type: Code | PRD | Plan | Security
|
|
12
12
|
date: YYYY-MM-DD
|
|
13
13
|
reviewer: [Name/Agent]
|
|
14
14
|
artifact: [Path to reviewed artifact]
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clikit-plugin",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "OpenCode plugin — 7 agents,
|
|
3
|
+
"version": "0.3.11",
|
|
4
|
+
"description": "OpenCode plugin — 7 agents, 14 commands, 26 skills, 11 hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"homepage": "https://github.com/KiraKas-Tr/CliKit#readme",
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@opencode-ai/plugin": "1.
|
|
58
|
+
"@opencode-ai/plugin": "1.3.13",
|
|
59
59
|
"gray-matter": "^4.0.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
@@ -15,7 +15,7 @@ Request review after: major features, significant refactors, before merge, when
|
|
|
15
15
|
|------|---------|
|
|
16
16
|
| Diff range | `a1b2c3d..e4f5g6h` |
|
|
17
17
|
| What changed | "Added JWT auth with refresh tokens" |
|
|
18
|
-
|
|
|
18
|
+
| Plan ref | `.opencode/memory/plans/auth.md` |
|
|
19
19
|
| Known gaps | "Edge case X not handled yet" |
|
|
20
20
|
|
|
21
21
|
## Dispatch
|
|
@@ -23,7 +23,7 @@ Request review after: major features, significant refactors, before merge, when
|
|
|
23
23
|
```
|
|
24
24
|
@review: review changes from <sha>..<sha>
|
|
25
25
|
Context: <what was built>
|
|
26
|
-
|
|
26
|
+
Plan: <path>
|
|
27
27
|
Known issues: <list or none>
|
|
28
28
|
```
|
|
29
29
|
|
|
@@ -14,7 +14,7 @@ DISCOVER → PLAN → IMPLEMENT → VERIFY → COMPLETE
|
|
|
14
14
|
| Phase | Gate (must pass before advancing) |
|
|
15
15
|
|-------|-----------------------------------|
|
|
16
16
|
| DISCOVER | Problem statement written, success criteria defined |
|
|
17
|
-
| PLAN | User approves
|
|
17
|
+
| PLAN | User approves plan |
|
|
18
18
|
| IMPLEMENT | All planned tasks checked off |
|
|
19
19
|
| VERIFY | typecheck + tests + lint + build all pass |
|
|
20
20
|
| COMPLETE | Changes landed on default branch / deployed |
|
|
@@ -23,8 +23,10 @@ DISCOVER → PLAN → IMPLEMENT → VERIFY → COMPLETE
|
|
|
23
23
|
|
|
24
24
|
| Mode | Commands |
|
|
25
25
|
|------|----------|
|
|
26
|
-
| Quick | `/create` → `/start` → `/verify` → `/ship` |
|
|
27
|
-
| Deep (
|
|
26
|
+
| Quick | `/discuss` → `/create` → `/start` → `/verify` → `/ship` |
|
|
27
|
+
| Deep (UI) | `/discuss` → `/create` → `/design` → `/start` → `/verify` → `/ship` |
|
|
28
|
+
|
|
29
|
+
`/create` includes a mandatory pre-plan research pass via `@research` before it finalizes the plan. `/research` remains available as an optional standalone command when the user wants a dedicated evidence pass.
|
|
28
30
|
|
|
29
31
|
## Enforcement
|
|
30
32
|
|
|
@@ -37,5 +39,5 @@ DISCOVER → PLAN → IMPLEMENT → VERIFY → COMPLETE
|
|
|
37
39
|
|
|
38
40
|
- Implementing without a plan
|
|
39
41
|
- Marking COMPLETE with failing `/verify` gates
|
|
40
|
-
- Moving forward without user approval on
|
|
42
|
+
- Moving forward without user approval on the plan
|
|
41
43
|
- Running `/ship` before SHIP_READY
|
package/src/agents/AGENTS.md
CHANGED
|
@@ -7,16 +7,16 @@ Each `.md` file in this directory defines an agent. The frontmatter sets model,
|
|
|
7
7
|
| Agent | Role | Mode | Modifies Code? |
|
|
8
8
|
|---|---|---|---|
|
|
9
9
|
| **@build** | Primary orchestrator and code executor. Delegates, implements, verifies. | primary | ✅ Yes |
|
|
10
|
-
| **@plan** | Primary strategic planner.
|
|
10
|
+
| **@plan** | Primary strategic planner. Handles `/discuss` intent locking and `/create` plan generation. Produces discussion artifacts and XML-structured plans. | primary | ❌ Code / ✅ planning artifacts |
|
|
11
11
|
| **@oracle** | High-depth read-only advisor for hard architecture trade-offs, complex debugging, and second-opinion analysis. Expensive specialist — invoke only when `@explore` or `@research` cannot resolve the question. | subagent | ❌ Read-only |
|
|
12
12
|
| **@explore** | Fast local codebase navigator. Symbol definitions, usages, file structure, git history. Read-only. | subagent | ❌ Read-only |
|
|
13
|
-
| **@research** | External evidence specialist. Docs, APIs, GitHub patterns, web sources.
|
|
13
|
+
| **@research** | External evidence specialist. Docs, APIs, GitHub patterns, web sources. May write research artifacts when invoked by `/research` or Plan's pre-plan pass. | subagent | ❌ Code / ✅ research artifacts |
|
|
14
14
|
| **@review** | Code reviewer and security auditor. Quality gate before merge. | subagent | ❌ Read-only |
|
|
15
15
|
| **@vision** | Design architect and visual implementer. Frontend UI only. | subagent | ✅ Frontend only |
|
|
16
16
|
|
|
17
17
|
## Specialist Boundaries
|
|
18
18
|
|
|
19
|
-
The
|
|
19
|
+
The specialist subagents have distinct scopes — choose the right one:
|
|
20
20
|
|
|
21
21
|
| Need | Use | Why |
|
|
22
22
|
|------|-----|-----|
|
|
@@ -28,17 +28,19 @@ The three read-only specialists have distinct scopes — choose the right one:
|
|
|
28
28
|
|
|
29
29
|
## File Reading Strategy
|
|
30
30
|
|
|
31
|
-
All agents that read files must follow the **tilth-first
|
|
31
|
+
All agents that read files must follow the **tilth-first policy** (see `skill/tilth-reading/SKILL.md`):
|
|
32
32
|
|
|
33
33
|
```
|
|
34
34
|
1. tilth <path> / tilth <symbol> --scope <dir> — direct CLI first for read/search/navigation
|
|
35
|
-
2.
|
|
36
|
-
3.
|
|
35
|
+
2. read <path> — fallback: narrowed raw content
|
|
36
|
+
3. grep <pattern> — fallback: text pattern search
|
|
37
37
|
4. glob <pattern> — fallback: explicit path discovery only
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
> Prefer direct `tilth` CLI first. Use `npx tilth` only when the CLI is not installed globally.
|
|
41
|
-
> The runtime hook (`tilth_reading`) automatically enhances `read` tool output via tilth
|
|
41
|
+
> The runtime hook (`tilth_reading`) automatically enhances `read` tool output via tilth when available, so `read` remains the primary raw-content fallback.
|
|
42
|
+
> This is a documented operating rule, not a hard runtime guard.
|
|
43
|
+
> `@explore` should follow the same practical order: `tilth CLI` first, then `read` / `grep` / `glob` depending on the exact fallback need; use LSP after navigation when semantic confirmation is required.
|
|
42
44
|
|
|
43
45
|
## Active Roles in Compressed Workflow
|
|
44
46
|
|
|
@@ -62,12 +64,13 @@ Agents use **Beads** (`beads-village_*` MCP tools) for persistent task tracking.
|
|
|
62
64
|
|
|
63
65
|
**Core cycle:**
|
|
64
66
|
```
|
|
65
|
-
beads-village_init → beads-village_add → beads-village_claim → work → beads-village_done
|
|
67
|
+
beads-village_init → beads-village_status/include_agents → beads-village_inbox → beads-village_ls(status="ready") → beads-village_show(id) → beads-village_add (if needed) → beads-village_claim → beads-village_reservations → beads-village_reserve → work → verify → beads-village_done → beads-village_sync
|
|
66
68
|
```
|
|
67
69
|
|
|
68
70
|
Execution happens one **Task Packet** at a time.
|
|
69
71
|
|
|
70
72
|
- **@build**: Creates issues for non-trivial tasks, claims and closes on completion
|
|
73
|
+
- **@build**: Reads issue context before claiming, reserves packet files, verifies evidence, and syncs on completion
|
|
71
74
|
- **@plan**: Creates issues for every plan task after plan approval
|
|
72
75
|
- **Subagents**: Read-only — do not create/modify Beads issues
|
|
73
76
|
|
|
@@ -93,7 +96,7 @@ User → @build (orchestrator)
|
|
|
93
96
|
└── @review (quality gate before merge)
|
|
94
97
|
|
|
95
98
|
User → @plan (planning)
|
|
96
|
-
├── @explore (
|
|
97
|
-
├── @research (external info, version compatibility)
|
|
99
|
+
├── @explore (local context, relevant files, existing patterns)
|
|
100
|
+
├── @research (external info, version compatibility, pre-plan evidence)
|
|
98
101
|
└── @oracle (architecture trade-offs, risky design decisions)
|
|
99
102
|
```
|
package/src/agents/build.md
CHANGED
|
@@ -50,12 +50,12 @@ You are the Build Agent — the primary executor and orchestrator. You own the f
|
|
|
50
50
|
|
|
51
51
|
### 0.1 Where Build fits in the workflow
|
|
52
52
|
|
|
53
|
-
When Build is invoked, `@plan` has already produced artifacts on disk:
|
|
53
|
+
When Build is invoked, `@plan` has already produced artifacts on disk, and `/discuss` or `/research` may already have written supporting context:
|
|
54
54
|
|
|
55
55
|
| Artifact | Path | What it contains |
|
|
56
56
|
|----------|------|-----------------|
|
|
57
|
+
| **Discussion** | `.opencode/memory/discussions/YYYY-MM-DD-<topic>.md` | Locked intent, confirmed assumptions, deferred items |
|
|
57
58
|
| **Plan** | `.opencode/memory/plans/YYYY-MM-DD-<feature>.md` | DAG, File Impact, Boundaries, all Task Packets |
|
|
58
|
-
| **Spec** | `.opencode/memory/specs/YYYY-MM-DD-<feature>.md` | Requirements, user stories, acceptance criteria |
|
|
59
59
|
| **Research** | `.opencode/memory/research/YYYY-MM-DD-<topic>.md` | External evidence, library findings |
|
|
60
60
|
| **Digest** | `.opencode/memory/_digest.md` | Auto-generated summary of all prior session observations |
|
|
61
61
|
|
|
@@ -210,12 +210,12 @@ tilth <path> --section 45-89 # section by line range
|
|
|
210
210
|
|
|
211
211
|
```
|
|
212
212
|
# Fallback order
|
|
213
|
+
read <path> # raw content once narrowed
|
|
213
214
|
grep <pattern> # text pattern fallback across files
|
|
214
|
-
read <path> # full raw content once narrowed
|
|
215
215
|
glob <pattern> # path enumeration only when required
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
-
> Follow this order by default: `tilth` → `
|
|
218
|
+
> Follow this order by default: `tilth CLI` → `read` → `grep` → `glob`, then use LSP when semantic confirmation is required.
|
|
219
219
|
> Use `glob` only when you need explicit path discovery.
|
|
220
220
|
> `read` tool output is still enhanced by the tilth runtime hook when tilth is available.
|
|
221
221
|
|
package/src/agents/explore.md
CHANGED
|
@@ -67,14 +67,15 @@ Bash access is enabled for **read-only navigation only** and is restricted by fr
|
|
|
67
67
|
Never use mutating shell commands. In particular: `rm`, `git push`, `git commit`, `git reset`, and `sudo` are forbidden.
|
|
68
68
|
|
|
69
69
|
Use **tilth CLI as the default navigation/search tool**.
|
|
70
|
-
You
|
|
70
|
+
You should make a relevant tilth attempt before using `read`, `grep`, or `glob` unless bash tilth execution is unavailable.
|
|
71
|
+
This is a documented operating rule, not a hard runtime block.
|
|
71
72
|
For codebase exploration, follow this fallback order exactly:
|
|
72
73
|
|
|
73
74
|
```text
|
|
74
|
-
tilth →
|
|
75
|
+
tilth CLI → read → grep → glob
|
|
75
76
|
```
|
|
76
77
|
|
|
77
|
-
Use `glob` only when you specifically need raw path enumeration
|
|
78
|
+
Use `read` for narrowed raw content, `grep` for text-pattern fallback, and `glob` only when you specifically need raw path enumeration.
|
|
78
79
|
|
|
79
80
|
Start with explicit `bash: tilth` CLI whenever you are locating symbols, sections, files, callers, or likely integration points:
|
|
80
81
|
|
|
@@ -89,21 +90,21 @@ bash: tilth "<text-or-regex>" --scope <dir>
|
|
|
89
90
|
bash: tilth <symbol> --kind callers --scope <dir>
|
|
90
91
|
```
|
|
91
92
|
|
|
92
|
-
If `tilth` does not answer the question or is unavailable, fall back to `grep`,
|
|
93
|
-
|
|
93
|
+
If `tilth` does not answer the question or is unavailable, fall back to `read`, `grep`, or `glob` based on what kind of answer you need.
|
|
94
|
+
Use LSP tools when semantic confirmation is required after navigation narrows the target.
|
|
94
95
|
|
|
95
96
|
### Search priority table
|
|
96
97
|
|
|
97
98
|
| Priority | What to find | Tools |
|
|
98
99
|
|----------|-------------|-------|
|
|
99
100
|
| 1 | Symbol navigation, sections, likely integration points, callers, file discovery, content search | `bash: tilth <path>` / `bash: tilth --section ...` / `bash: tilth <symbol> --scope ...` |
|
|
100
|
-
| 2 |
|
|
101
|
-
| 3 |
|
|
102
|
-
| 4 |
|
|
103
|
-
| 5 |
|
|
101
|
+
| 2 | Raw file content once narrowed | `read <path>` |
|
|
102
|
+
| 3 | Text pattern fallback across files | `grep` |
|
|
103
|
+
| 4 | File discovery when path enumeration is required | `glob` |
|
|
104
|
+
| 5 | Semantic confirmation: definitions, refs, types | `lsp_workspace_symbols`, `lsp_goto_definition`, `lsp_find_references`, `lsp_hover` |
|
|
104
105
|
| 6 | Recent changes, authorship | `bash: git log`, `git blame`, `git show`, `git diff` |
|
|
105
106
|
|
|
106
|
-
Use LSP after tilth/grep when you need semantic confirmation or full reference accuracy.
|
|
107
|
+
Use LSP after tilth/read/grep/glob when you need semantic confirmation or full reference accuracy.
|
|
107
108
|
|
|
108
109
|
---
|
|
109
110
|
|
|
@@ -146,8 +147,8 @@ Omit empty sections. Keep each entry to one line. If more than 20 locations are
|
|
|
146
147
|
|
|
147
148
|
**Always:**
|
|
148
149
|
- Use bash only within the read-only restrictions defined in frontmatter
|
|
149
|
-
- Start navigation with `tilth` CLI;
|
|
150
|
-
- Use direct `tilth` CLI patterns for symbol lookup, content search, callers, and path discovery before reaching for
|
|
150
|
+
- Start navigation with `tilth` CLI; then choose `read`, `grep`, or `glob` based on the exact fallback need
|
|
151
|
+
- Use direct `tilth` CLI patterns for symbol lookup, content search, callers, and path discovery before reaching for fallback tools
|
|
151
152
|
- Use `glob` only for explicit path enumeration, not as the default navigator
|
|
152
153
|
- Search broad first to find the right file, then narrow to exact lines
|
|
153
154
|
- Return file paths relative to repo root with line numbers
|
|
@@ -157,6 +158,6 @@ Omit empty sections. Keep each entry to one line. If more than 20 locations are
|
|
|
157
158
|
- Write or edit any file
|
|
158
159
|
- Run commands that mutate state (build, install, test, push)
|
|
159
160
|
- Run `rm`, `git push`, `git commit`, `git reset`, or `sudo`
|
|
160
|
-
- Skip the tilth-first fallback order unless bash tilth execution is unavailable or a later tool is clearly required by the task
|
|
161
|
+
- Skip the documented tilth-first fallback order unless bash tilth execution is unavailable or a later tool is clearly required by the task
|
|
161
162
|
- Start with `read`, `grep`, or `glob` when a relevant `tilth` query can answer the request
|
|
162
163
|
- Explore beyond the stated scope without explicit reason
|