clikit-plugin 0.3.10 → 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.
Files changed (40) hide show
  1. package/AGENTS.md +38 -10
  2. package/README.md +20 -22
  3. package/command/create.md +104 -20
  4. package/command/discuss.md +111 -0
  5. package/command/handoff.md +7 -5
  6. package/command/init.md +2 -2
  7. package/command/pr.md +2 -4
  8. package/command/research.md +130 -28
  9. package/command/resume.md +2 -2
  10. package/command/ship.md +1 -1
  11. package/command/start.md +8 -9
  12. package/command/status.md +11 -9
  13. package/dist/.tsbuildinfo +1 -1
  14. package/dist/clikit.schema.json +0 -8
  15. package/dist/config.d.ts +0 -5
  16. package/dist/config.d.ts.map +1 -1
  17. package/dist/hooks/index.d.ts +0 -2
  18. package/dist/hooks/index.d.ts.map +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +0 -72
  21. package/memory/_templates/discussion.md +91 -0
  22. package/memory/_templates/handoff.md +2 -2
  23. package/memory/_templates/plan.md +83 -176
  24. package/memory/_templates/research.md +33 -7
  25. package/memory/_templates/review.md +2 -2
  26. package/memory/discussions/.gitkeep +0 -0
  27. package/package.json +2 -2
  28. package/skill/requesting-code-review/SKILL.md +2 -2
  29. package/skill/ritual-workflow/SKILL.md +6 -4
  30. package/src/agents/AGENTS.md +13 -11
  31. package/src/agents/build.md +4 -4
  32. package/src/agents/explore.md +14 -14
  33. package/src/agents/plan.md +195 -57
  34. package/src/agents/research.md +41 -11
  35. package/src/agents/review.md +3 -3
  36. package/command/import-plan.md +0 -175
  37. package/command/issue.md +0 -109
  38. package/dist/hooks/tilth-first-guard.d.ts +0 -18
  39. package/dist/hooks/tilth-first-guard.d.ts.map +0 -1
  40. package/memory/_templates/spec.md +0 -128
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Deep-dive any library, API, or pattern web search, official docs, and real GitHub examples synthesized into a saved research report.
2
+ description: Optional standalone research pass read discussion context, identify decision gaps, gather evidence, and write a planning-ready research report.
3
3
  agent: research
4
4
  subtask: true
5
5
  ---
@@ -10,35 +10,103 @@ You are the **Research Agent**. Execute the `/research` command.
10
10
 
11
11
  Use template at: `@.opencode/memory/_templates/research.md`
12
12
 
13
- ## Your Task
13
+ ## Purpose
14
14
 
15
- Conduct deep research on a topic before planning implementation.
15
+ Run a **GSD-inspired research pass adapted for CliKit**.
16
16
 
17
- ## Process
17
+ This command is not a generic fact-finding exercise. Its purpose is to close the **decision gaps that would otherwise force Plan or Build to guess**.
18
+
19
+ Keep the workflow compatible with the current kit:
20
+ - Save artifacts to `.opencode/memory/research/YYYY-MM-DD-<topic>.md`
21
+ - Do **not** create `.planning/*` artifacts
22
+ - Do **not** modify plans or source code
23
+ - Use your own research tools to gather external evidence
24
+ - Produce an output that is directly useful to `/create`, `/start`, or manual planning
25
+ - Always read discussion context first when a discussion artifact exists
26
+
27
+ ## Inputs
18
28
 
19
- 1. **Identify research questions** from spec or user request
29
+ Use whichever context is available:
30
+ - The explicit user request
31
+ - Active discussion artifact
32
+ - Active PRD / plan / handoff / prior research artifacts
33
+ - Known constraints: language, framework, runtime, platform, versions
20
34
 
21
- 2. **Run focused external research** with:
22
- - Question to research
23
- - Constraints (language, framework, versions)
24
- - Format: summary | comparison | deep-dive
25
- - Depth: quick | standard | deep
35
+ If context is incomplete, state your assumption at the top of the report instead of stalling.
26
36
 
27
- 3. **Document findings** at `.opencode/memory/research/YYYY-MM-DD-<topic>.md`
37
+ ## Process
38
+
39
+ 1. **Read available planning context first**
40
+ - Check the user request
41
+ - Read any relevant discussion, PRD, plan, handoff, or prior research artifacts
42
+ - Treat the discussion artifact as the first planning constraint input when it exists
43
+ - Identify what is already known so you do not repeat solved work
44
+
45
+ 2. **Create a Research Brief**
46
+ - What exact question or decision needs evidence?
47
+ - Why does it matter for planning or implementation?
48
+ - What constraints apply?
49
+ - What is still unknown?
50
+
51
+ 3. **Identify decision gaps**
52
+ Focus only on gaps that materially affect one of these:
53
+ - architecture or approach selection
54
+ - API / library choice
55
+ - version compatibility
56
+ - implementation boundaries
57
+ - test / verification strategy
58
+ - known risks, edge cases, or migration constraints
59
+
60
+ 4. **Decide whether external research is actually needed**
61
+ - If the available context already answers the question well enough, say so explicitly
62
+ - In that case, produce a short report recommending that planning proceed without more external research
63
+ - Otherwise, research only the high-impact gaps
64
+
65
+ 5. **Gather external evidence**
66
+ Use your tools with this priority:
67
+ - authoritative sources first
68
+ - version-pinned findings when possible
69
+ - real-world patterns only when they affect implementation decisions
70
+ - explicit conflict reporting when sources disagree
71
+
72
+ 6. **Synthesize for planning use**
73
+ - Tag claims inline as `[VERIFIED]`, `[CITED]`, or `[ASSUMED]`
74
+ - Assign overall confidence: `high | medium | low`
75
+ - Convert findings into planning guidance, not just a summary
76
+ - End with recommended approach, planning impact, and verification hooks
77
+
78
+ 7. **Write the research artifact yourself**
79
+ - Create or update `.opencode/memory/research/YYYY-MM-DD-<topic>.md`
80
+ - You may write only inside `.opencode/memory/research/`
81
+ - Do not write anywhere else in the repository
28
82
 
29
- 4. **Summarize key insights** for planning
83
+ ## Tools to Use
84
+
85
+ - `webfetch` — fetch known docs, changelogs, specs
86
+ - `context7_resolve-library-id` + `context7_query-docs` — official library docs
87
+ - `grep_searchGitHub` — real-world usage patterns
88
+ - `websearch` — recent findings when direct docs are insufficient
89
+ - `write` / `edit` — save the final research report to `.opencode/memory/research/`
30
90
 
31
91
  ## Research Request Format
32
92
 
33
93
  Use this request schema:
94
+
34
95
  ```yaml
35
96
  type: "research"
36
- question: "[Research question]"
97
+ mode: "pre-plan-phase"
98
+ question: "[Exact question or decision to research]"
99
+ planning_goal: "[What planning decision this research should unblock]"
100
+ decision_gaps:
101
+ - "[Gap 1]"
102
+ - "[Gap 2]"
37
103
  constraints:
38
104
  language: "[Language]"
39
105
  framework: "[Framework]"
40
- format: "comparison" # summary | comparison | deep-dive
41
- depth: "standard" # quick | standard | deep
106
+ platform: "[Platform]"
107
+ versions: "[Known version range]"
108
+ format: "planning-brief" # planning-brief | comparison | deep-dive
109
+ depth: "standard" # quick | standard | deep
42
110
  ```
43
111
 
44
112
  ## Research Report Template
@@ -58,13 +126,25 @@ bead_id: [optional]
58
126
  # Research: [Topic]
59
127
 
60
128
  **Question:** [Original research question]
129
+ **Planning Goal:** [What decision this report should unblock]
130
+ **Assumptions:** [Any assumption made due to incomplete context, or "None"]
61
131
 
62
132
  ## Summary
63
- [2-3 sentence answer]
133
+ [2-4 sentence direct answer focused on planning usefulness]
134
+
135
+ ## Research Brief
136
+
137
+ - **Decision gaps:** [What was unknown before research]
138
+ - **Constraints:** [Language, framework, platform, versions, architecture constraints]
139
+ - **Research scope:** [What was investigated and what was intentionally skipped]
64
140
 
65
141
  ## Key Findings
66
- 1. [Finding 1]
67
- 2. [Finding 2]
142
+
143
+ ### Finding 1: [Title]
144
+ [VERIFIED]/[CITED]/[ASSUMED] [Finding details and why it matters]
145
+
146
+ ### Finding 2: [Title]
147
+ [VERIFIED]/[CITED]/[ASSUMED] [Finding details and why it matters]
68
148
 
69
149
  ## Comparison (if applicable)
70
150
  | Option | Pros | Cons | Best For |
@@ -78,13 +158,31 @@ bead_id: [optional]
78
158
  ```
79
159
 
80
160
  ## Recommendation
81
- [Recommended approach]
82
161
 
83
- ## Verification Steps
84
- - [ ] [Item to verify in implementation]
162
+ **Recommended approach:** [Recommended approach]
163
+
164
+ **Why:**
165
+ 1. [Reason 1]
166
+ 2. [Reason 2]
167
+
168
+ ## Planning Impact
169
+
170
+ - [How this changes the implementation approach]
171
+ - [What Plan or Build should do differently because of this research]
172
+ - [Any packet, scope, dependency, or sequencing implications]
173
+
174
+ ## Verification Hooks
175
+
176
+ - [ ] [Executable check, targeted test, or implementation-time assertion]
177
+ - [ ] [Another verification hook]
178
+
179
+ ## Conflicting Evidence (if any)
180
+
181
+ - [Source A says X, source B says Y, and why that matters]
85
182
 
86
183
  ## Open Questions
87
- - [Question needing verification]
184
+
185
+ - [Question needing implementation-time confirmation]
88
186
 
89
187
  ## Sources
90
188
  | Source | Type | Reliability |
@@ -92,10 +190,14 @@ bead_id: [optional]
92
190
  | [URL/Title] | Official Docs | High |
93
191
  ```
94
192
 
95
- ## Tools to Use
96
- - `websearch` — general web search
97
- - `webfetch` fetch and read specific URLs
98
- - `context7_resolve-library-id` + `context7_query-docs` official library documentation
99
- - `grep_searchGitHub` real-world code patterns from public repos
193
+ ## Rules
194
+
195
+ - Start from planning needs, not from tool-first exploration
196
+ - Avoid redundant research when existing artifacts already answer the question
197
+ - Research only what changes planning, sequencing, scope, or verification
198
+ - Prefer official docs over community summaries
199
+ - Preserve conflicting evidence instead of flattening it
200
+ - Write only the final research artifact under `.opencode/memory/research/`
201
+ - Save a report that another agent can use without re-reading the web
100
202
 
101
- Identify the research questions from the user's request or the active spec, then begin research immediately.
203
+ Begin by deriving the research brief from the user's request and available planning context, then proceed immediately.
package/command/resume.md CHANGED
@@ -22,7 +22,7 @@ You are the **Build Agent**. Execute the `/resume` command **immediately without
22
22
  ### 2. Load Related Artifacts
23
23
 
24
24
  In parallel:
25
- - Load spec from `.opencode/memory/specs/` (if referenced or latest)
25
+ - Load discussion from `.opencode/memory/discussions/` (if referenced or latest)
26
26
  - Load plan from `.opencode/memory/plans/` (if referenced or latest)
27
27
  - Run `git status --short` and `git log --oneline -3`
28
28
 
@@ -46,7 +46,7 @@ Output this format, then **immediately begin the first next step**:
46
46
 
47
47
  **Drift:** <none | brief note of changes>
48
48
 
49
- **Next:** <first action from handoff's "What To Do Next">
49
+ **Next:** <first action from handoff's "Next Steps">
50
50
 
51
51
  ---
52
52
  Starting now.
package/command/ship.md CHANGED
@@ -32,7 +32,7 @@ Run `/verify` for full quality assurance before shipping.
32
32
 
33
33
  Before landing changes:
34
34
  - Review changed files (`git diff --name-only` and `git diff`)
35
- - Confirm acceptance criteria from spec/plan are satisfied
35
+ - Confirm acceptance criteria from the plan are satisfied
36
36
  - Confirm no debug artifacts (`console.log`, `TODO`, temporary hacks)
37
37
  - Confirm changes stay within planned file impact
38
38
 
package/command/start.md CHANGED
@@ -11,7 +11,7 @@ Execute the plan: claim the next packet, implement it, verify it, and close it.
11
11
 
12
12
  **Standalone use:** You can run `/start` directly if you already have a plan in `.opencode/memory/plans/` or describe what to implement and the agent will create a minimal plan inline.
13
13
 
14
- **In workflow:** `/start` picks up after `/create` which produces both spec and plan.
14
+ **In workflow:** `/start` usually picks up after `/discuss → /create`, where `/create` reads the discussion artifact, runs a mandatory research pass, and then produces the plan.
15
15
 
16
16
  ## Process
17
17
 
@@ -21,15 +21,14 @@ Look for plans in `.opencode/memory/plans/`. If multiple exist, ask the user whi
21
21
 
22
22
  If no plan exists:
23
23
  - **If user described a task inline**: create a minimal single-packet plan on the fly and proceed
24
- - **Otherwise**: suggest running `/create` first to produce a full spec + plan
25
- - Check for specs in `.opencode/memory/specs/`
24
+ - **Otherwise**: suggest running `/create` first to produce a full plan
26
25
 
27
26
  ### 2. Load Context
28
27
 
29
- - Read `plan.md` — get task list, file impact, dependencies
30
- - Read `spec.md` — understand requirements and acceptance criteria
28
+ - Read `plan.md` — get objectives, context, task list, file impact, dependencies, and acceptance criteria
29
+ - Read `discussion.md` (if referenced or latest relevant) preserve locked intent and constraints
31
30
  - Read latest handoff in `.opencode/memory/handoffs/` (if exists) — resume from previous session
32
- - Check bead status via `mcp__beads_village__ls()`
31
+ - Check bead status via `beads-village_ls()`
33
32
 
34
33
  ### 3. Determine Next Packet
35
34
 
@@ -42,7 +41,7 @@ If resuming from handoff, pick up `in_progress` tasks first.
42
41
 
43
42
  ### 4. Execute Packet
44
43
 
45
- - Reserve packet files via `mcp__beads_village__reserve()`
44
+ - Reserve packet files via `beads-village_reserve()`
46
45
  - Follow `files_in_scope` strictly
47
46
  - Implement only the active packet
48
47
 
@@ -67,7 +66,7 @@ If verification fails twice, stop and escalate.
67
66
 
68
67
  ```
69
68
  1. ✅ Plan exists and is approved (created by /create)
70
- 2. ✅ Context loaded (spec, plan, handoff)
69
+ 2. ✅ Context loaded (plan, discussion, handoff)
71
70
  3. ✅ Next task identified
72
71
  4. ✅ Packet selected
73
72
  5. ✅ Files reserved
@@ -76,7 +75,7 @@ If verification fails twice, stop and escalate.
76
75
 
77
76
  ## Rules
78
77
 
79
- - ✅ ALWAYS load plan and spec before starting
78
+ - ✅ ALWAYS load the plan before starting
80
79
  - ✅ ALWAYS check for existing handoff to resume
81
80
  - ✅ ALWAYS execute one packet at a time
82
81
  - ✅ ALWAYS verify before marking packet done
package/command/status.md CHANGED
@@ -14,9 +14,11 @@ Show the current state of work: beads, tasks, files, and git status.
14
14
  ### 1. Check Beads Village
15
15
 
16
16
  ```
17
- mcp__beads_village__status()
17
+ beads-village_status()
18
18
  ```
19
19
 
20
+ Also inspect ready work, reservations, and inbox state using the matching `beads-village_*` tools.
21
+
20
22
  ### 2. Check Git State
21
23
 
22
24
  ```bash
@@ -28,7 +30,7 @@ git log --oneline -5
28
30
  ### 3. Check Artifacts
29
31
 
30
32
  Look for:
31
- - `.opencode/memory/specs/` — Active specifications
33
+ - `.opencode/memory/discussions/` — Discussion artifacts
32
34
  - `.opencode/memory/plans/` — Implementation plans
33
35
  - `.opencode/memory/handoffs/` — Pending handoffs
34
36
  - `.opencode/memory/research/` — Research docs
@@ -66,7 +68,7 @@ Look for:
66
68
 
67
69
  | Type | File | Status |
68
70
  |------|------|--------|
69
- | Spec | YYYY-MM-DD-feature.md | Active |
71
+ | Discussion | YYYY-MM-DD-topic.md | 🧭 Intent Locked |
70
72
  | Plan | YYYY-MM-DD-feature.md | ✅ Active |
71
73
  | Research | YYYY-MM-DD-topic.md | 📚 Reference |
72
74
  | Handoff | YYYY-MM-DD-phase.md | ⏸️ Paused |
@@ -92,7 +94,7 @@ Look for:
92
94
 
93
95
  | Need | Command |
94
96
  |------|---------|
95
- | Start new feature | `/create` |
97
+ | Start new feature | `/discuss` |
96
98
  | Begin implementing | `/start` |
97
99
  | Resume paused work | `/resume` |
98
100
  | Ship & land | `/ship` |
@@ -111,11 +113,11 @@ Look for:
111
113
 
112
114
  | Area | Tool |
113
115
  |------|------|
114
- | Beads | `mcp__beads_village__status()` |
115
- | Tasks | `mcp__beads_village__ls()` |
116
- | Ready tasks | `mcp__beads_village__ls(status="ready")` |
117
- | Reservations | `mcp__beads_village__reservations()` |
118
- | Messages | `mcp__beads_village__inbox()` |
116
+ | Beads | `beads-village_status()` |
117
+ | Tasks | `beads-village_ls()` |
118
+ | Ready tasks | `beads-village_ls(status="ready")` |
119
+ | Reservations | `beads-village_reservations()` |
120
+ | Messages | `beads-village_inbox()` |
119
121
  | Git | `git status`, `git log` |
120
122
  | Artifacts | `glob`, `Read` |
121
123