clikit-plugin 0.3.10 → 0.3.12
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 +62 -41
- package/README.md +118 -57
- package/command/create.md +107 -20
- package/command/discuss.md +123 -0
- package/command/handoff.md +7 -5
- package/command/init.md +4 -3
- 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 +12 -11
- package/command/status.md +20 -15
- package/dist/.tsbuildinfo +1 -1
- package/dist/clikit.schema.json +0 -8
- package/dist/config.d.ts +0 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -77
- package/memory/_templates/discussion.md +99 -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/package.json +7 -6
- package/skill/beads/SKILL.md +29 -29
- package/skill/beads/mcp.json +1 -1
- package/skill/beads/references/api-reference.md +8 -3
- package/skill/requesting-code-review/SKILL.md +2 -2
- package/skill/ritual-workflow/SKILL.md +6 -4
- package/src/agents/AGENTS.md +21 -17
- package/src/agents/build.md +61 -63
- package/src/agents/explore.md +14 -14
- package/src/agents/plan.md +238 -94
- 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/dist/hooks/tilth-first-guard.d.ts +0 -18
- package/dist/hooks/tilth-first-guard.d.ts.map +0 -1
- package/memory/_digest.md +0 -6
- package/memory/_templates/spec.md +0 -128
- package/memory/beads/.gitkeep +0 -0
- package/memory/handoffs/.gitkeep +0 -0
- package/memory/memory.db +0 -0
- package/memory/plans/.gitkeep +0 -0
- package/memory/prds/.gitkeep +0 -0
- package/memory/research/.gitkeep +0 -0
- package/memory/reviews/.gitkeep +0 -0
- package/memory/specs/.gitkeep +0 -0
package/command/create.md
CHANGED
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Turn clarified intent into an execution-ready XML-structured plan — explore codebase, synthesize discussion context, fill remaining gaps, and write a single implementation plan.
|
|
3
3
|
agent: plan
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
You are the **Plan Agent**. Execute the `/create` command.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Template
|
|
9
9
|
|
|
10
|
-
- Spec: `@.opencode/memory/_templates/spec.md`
|
|
11
10
|
- Plan: `@.opencode/memory/_templates/plan.md`
|
|
12
11
|
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
Prefer discussion-first workflow when available:
|
|
15
|
+
- Discussion: `.opencode/memory/discussions/YYYY-MM-DD-<topic>.md`
|
|
16
|
+
- Research: `.opencode/memory/research/YYYY-MM-DD-<topic>.md`
|
|
17
|
+
|
|
13
18
|
## Execution Rules
|
|
14
19
|
|
|
15
20
|
- **DO NOT** start with generic questions — explore the codebase FIRST
|
|
21
|
+
- **DO** read any relevant discussion artifact before re-eliciting requirements or triggering research
|
|
16
22
|
- **DO NOT** end turns passively — always end with a specific question or action
|
|
17
|
-
- Auto-transition to
|
|
23
|
+
- Auto-transition to plan generation when self-clearance passes
|
|
18
24
|
|
|
19
25
|
## Process
|
|
20
26
|
|
|
27
|
+
### 0. Load Discussion Context First
|
|
28
|
+
|
|
29
|
+
- Read any relevant discussion artifact under `.opencode/memory/discussions/`
|
|
30
|
+
- Treat `Locked Decisions` as planning constraints, not suggestions
|
|
31
|
+
- Treat `Open Questions` as the only discussion leftovers worth re-asking
|
|
32
|
+
- If no discussion artifact exists, continue normally — `/create` must remain standalone-compatible
|
|
33
|
+
|
|
21
34
|
### 1. Proactive Exploration (BEFORE asking questions)
|
|
22
35
|
|
|
23
36
|
Fire Explore agents in parallel immediately:
|
|
@@ -25,7 +38,7 @@ Fire Explore agents in parallel immediately:
|
|
|
25
38
|
- Find test infrastructure (framework, coverage, examples)
|
|
26
39
|
- Find related code that this feature will integrate with
|
|
27
40
|
|
|
28
|
-
### 2.
|
|
41
|
+
### 2. Focused Follow-Up
|
|
29
42
|
|
|
30
43
|
Use exploration results to ask SPECIFIC questions across 5 dimensions:
|
|
31
44
|
- **Problem & Context** — Why is this needed? (reference what you found in codebase)
|
|
@@ -34,28 +47,45 @@ Use exploration results to ask SPECIFIC questions across 5 dimensions:
|
|
|
34
47
|
- **Users** — Primary/secondary users?
|
|
35
48
|
- **Constraints** — Technical, business, timeline?
|
|
36
49
|
|
|
37
|
-
|
|
50
|
+
Rules:
|
|
51
|
+
- Max 3 questions per turn
|
|
52
|
+
- Do **not** re-ask anything already locked by `/discuss`
|
|
53
|
+
- Prefer resolving only the gaps that still block plan generation
|
|
54
|
+
- If ambiguity remains high and no discussion artifact exists, you may recommend `/discuss` for a cleaner first pass, but `/create` must still work standalone
|
|
55
|
+
|
|
56
|
+
Update draft after each exchange.
|
|
57
|
+
|
|
58
|
+
### 3. Mandatory Pre-Plan Research Pass
|
|
38
59
|
|
|
39
|
-
|
|
60
|
+
Before finalizing the plan, you MUST run a research pass via `@research`.
|
|
40
61
|
|
|
41
|
-
|
|
62
|
+
Treat this as a `/research`-style contract, not an optional side lookup.
|
|
63
|
+
|
|
64
|
+
Research pass requirements:
|
|
65
|
+
- Provide the active discussion artifact (or note that none exists)
|
|
66
|
+
- Ask `@research` to read discussion context first, then gather only the external evidence that materially affects planning
|
|
67
|
+
- Require `@research` to save or update a research artifact under `.opencode/memory/research/`
|
|
68
|
+
- Treat the resulting research artifact as a planning input, not an optional appendix
|
|
69
|
+
|
|
70
|
+
If the research pass finds no meaningful external gap, it should still produce a short artifact that records that conclusion so planning remains auditable.
|
|
71
|
+
|
|
72
|
+
### 4. Self-Clearance Check
|
|
73
|
+
|
|
74
|
+
When ALL of these are true, auto-transition to plan generation:
|
|
42
75
|
- Core problem understood and confirmed
|
|
43
76
|
- Scope boundaries defined
|
|
44
77
|
- Enough info for acceptance criteria
|
|
45
78
|
- Codebase patterns identified
|
|
79
|
+
- Locked decisions from discussion artifact preserved
|
|
80
|
+
- Research artifact created or updated by the mandatory pre-plan research pass
|
|
46
81
|
- No critical open questions
|
|
47
82
|
|
|
48
|
-
### 4. Generate Spec
|
|
49
|
-
|
|
50
|
-
Write to `.opencode/memory/specs/YYYY-MM-DD-<descriptor>.md` using the spec template.
|
|
51
|
-
|
|
52
|
-
**Acceptance criteria MUST be agent-executable** — commands with expected outputs, not "user manually verifies."
|
|
53
|
-
|
|
54
83
|
### 5. Memory & History Mining (parallel with plan generation)
|
|
55
84
|
|
|
56
85
|
**Memory mining** (Plan reads directly — has file read access):
|
|
57
86
|
```
|
|
58
87
|
Read: ".opencode/memory/_digest.md" — Compact index of memory topics and highlights
|
|
88
|
+
Read: ".opencode/memory/discussions/" — Any related discussion artifacts
|
|
59
89
|
Read: ".opencode/memory/decision.md" — Architectural decisions
|
|
60
90
|
Read: ".opencode/memory/learning.md" — Learnings and gotchas
|
|
61
91
|
Read: ".opencode/memory/blocker.md" — Past blockers and mitigations
|
|
@@ -76,18 +106,68 @@ Explore: "Mine git log for conventions. Return:
|
|
|
76
106
|
|
|
77
107
|
Write to `.opencode/memory/plans/YYYY-MM-DD-<feature>.md` using the plan template.
|
|
78
108
|
|
|
109
|
+
The plan file is the single pre-implementation artifact. It must stay in Markdown with YAML frontmatter plus XML-style sections.
|
|
110
|
+
|
|
111
|
+
The plan must use this structure:
|
|
112
|
+
|
|
113
|
+
```markdown
|
|
114
|
+
---
|
|
115
|
+
phase: XX-name
|
|
116
|
+
plan: NN
|
|
117
|
+
type: execute
|
|
118
|
+
wave: N
|
|
119
|
+
depends_on: []
|
|
120
|
+
files_modified: []
|
|
121
|
+
autonomous: true
|
|
122
|
+
requirements: []
|
|
123
|
+
must_haves:
|
|
124
|
+
truths: []
|
|
125
|
+
artifacts: []
|
|
126
|
+
key_links: []
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
<objective>
|
|
130
|
+
[What this plan accomplishes]
|
|
131
|
+
</objective>
|
|
132
|
+
|
|
133
|
+
<context>
|
|
134
|
+
[Relevant context files and source references]
|
|
135
|
+
</context>
|
|
136
|
+
|
|
137
|
+
<tasks>
|
|
138
|
+
<task type="auto">
|
|
139
|
+
<name>Task 1: [Action-oriented name]</name>
|
|
140
|
+
<files>path/to/file.ext</files>
|
|
141
|
+
<action>[Specific implementation]</action>
|
|
142
|
+
<verify>[Command or check]</verify>
|
|
143
|
+
<done>[Acceptance criteria]</done>
|
|
144
|
+
</task>
|
|
145
|
+
</tasks>
|
|
146
|
+
|
|
147
|
+
<verification>
|
|
148
|
+
[Overall phase checks]
|
|
149
|
+
</verification>
|
|
150
|
+
|
|
151
|
+
<success_criteria>
|
|
152
|
+
[Measurable completion]
|
|
153
|
+
</success_criteria>
|
|
154
|
+
```
|
|
155
|
+
|
|
79
156
|
**Task decomposition rules:**
|
|
80
157
|
- Each task must contain a **Task Packet**
|
|
81
158
|
- 1 packet = 1 concern = 1-3 files
|
|
82
159
|
- Group tasks into parallel waves where possible
|
|
83
160
|
- Every packet must define `files_in_scope`, `verification_commands`, and `escalate_if`
|
|
161
|
+
- Include relevant discussion artifacts in plan references and packet context when they materially constrain execution
|
|
84
162
|
|
|
85
163
|
**File Impact = BUILD BOUNDARY:**
|
|
86
164
|
Build Agent may ONLY touch files listed here. Missing a file = Build can't modify it.
|
|
87
165
|
|
|
88
166
|
### 7. Quality Self-Review
|
|
89
167
|
|
|
90
|
-
Before presenting
|
|
168
|
+
Before presenting the plan, run a verification loop and only stop when all conditions pass, a blocker requires escalation, or one focused user clarification is required.
|
|
169
|
+
|
|
170
|
+
Before presenting the plan, verify:
|
|
91
171
|
- [ ] Every task has task_id, acceptance criteria, effort, priority
|
|
92
172
|
- [ ] File Impact covers ALL files across ALL tasks
|
|
93
173
|
- [ ] No dependency cycles
|
|
@@ -95,24 +175,30 @@ Before presenting spec + plan, verify:
|
|
|
95
175
|
- [ ] All acceptance criteria are agent-executable
|
|
96
176
|
- [ ] Top 2+ risks assessed
|
|
97
177
|
|
|
98
|
-
### 8.
|
|
178
|
+
### 8. Approval, Sync Tracking, & Guide
|
|
99
179
|
|
|
100
|
-
1.
|
|
101
|
-
2.
|
|
102
|
-
3.
|
|
180
|
+
1. Present plan to user
|
|
181
|
+
2. Wait for explicit approval
|
|
182
|
+
3. Only after approval, sync task tracking in the active workflow:
|
|
183
|
+
- Prefer `br` issue creation in DAG order when `.beads/` tracking is active and the runtime can execute `br`
|
|
184
|
+
- If a legacy `beads-village` MCP setup still exists, it may be used as a compatibility fallback
|
|
185
|
+
- Do **not** block plan handoff on missing legacy MCP support
|
|
186
|
+
4. Then say: "Plan ready. Use `/start` to begin execution."
|
|
103
187
|
|
|
104
188
|
## Rules
|
|
105
189
|
|
|
106
190
|
- ✅ Explore codebase BEFORE asking user questions
|
|
107
191
|
- ✅ Write agent-executable acceptance criteria
|
|
108
192
|
- ✅ Tag assumptions as Confirmed/Unconfirmed
|
|
193
|
+
- ✅ Run a mandatory pre-plan research pass and persist its artifact before finalizing the plan
|
|
109
194
|
- ✅ Auto-transition when clearance check passes
|
|
110
|
-
- ✅ Always produce
|
|
195
|
+
- ✅ Always produce a single execution-ready plan before guiding to `/start`
|
|
111
196
|
- ✅ Mine memory for past decisions, learnings, blockers
|
|
112
197
|
- ✅ Delegate git history mining to Explore (Plan has bash: false)
|
|
113
198
|
- ✅ Include Conventions & Past Decisions section in plan
|
|
114
199
|
- ✅ Every task must include a Task Packet
|
|
115
200
|
- ✅ File Impact is the build contract
|
|
201
|
+
- ✅ Create tracker issues only after explicit approval
|
|
116
202
|
- ❌ NEVER ask generic questions without codebase context
|
|
117
203
|
- ❌ NEVER skip acceptance criteria
|
|
118
204
|
- ❌ NEVER end passively — always question or action
|
|
@@ -120,3 +206,4 @@ Before presenting spec + plan, verify:
|
|
|
120
206
|
- ❌ NEVER write "user manually tests..." criteria
|
|
121
207
|
- ❌ NEVER omit File Impact section
|
|
122
208
|
- ❌ NEVER skip gap analysis
|
|
209
|
+
- ❌ NEVER skip the mandatory research pass, even when it only confirms that no extra external evidence is needed
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Pre-create discussion phase — run an interview-style clarification pass, lock preferences, confirm assumptions, and write a planning-ready discussion artifact.
|
|
3
|
+
agent: plan
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are the **Plan Agent** operating in discussion mode. Execute the `/discuss` command as an **interview-style pre-plan phase** and write only the discussion artifact.
|
|
7
|
+
|
|
8
|
+
## Template
|
|
9
|
+
|
|
10
|
+
Use template at: `@.opencode/memory/_templates/discussion.md`
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Run a **pre-create discussion phase adapted for CliKit**.
|
|
15
|
+
|
|
16
|
+
The command name stays `/discuss`, but the interaction style should feel like a focused **interview**:
|
|
17
|
+
- surface the highest-impact gray areas first
|
|
18
|
+
- ask only the questions that change planning direction
|
|
19
|
+
- prefer structured choices over open-ended brainstorming when possible
|
|
20
|
+
- skip topics that are already settled by prior artifacts or strong codebase evidence
|
|
21
|
+
- end with a concise artifact that captures what the interview resolved
|
|
22
|
+
|
|
23
|
+
This command exists to capture the decisions that `/create`, `/research`, and `/start` should not have to guess.
|
|
24
|
+
|
|
25
|
+
Use it to:
|
|
26
|
+
- clarify the intended outcome
|
|
27
|
+
- lock user-facing preferences and constraints
|
|
28
|
+
- confirm the highest-impact assumptions
|
|
29
|
+
- defer ideas that are intentionally out of scope
|
|
30
|
+
- produce a planning-ready artifact for `/create`
|
|
31
|
+
|
|
32
|
+
Keep the workflow compatible with the current kit:
|
|
33
|
+
- Save artifacts to `.opencode/memory/discussions/YYYY-MM-DD-<topic>.md`
|
|
34
|
+
- Do **not** create `.planning/*` artifacts
|
|
35
|
+
- Do **not** write plans, research artifacts, or source code
|
|
36
|
+
- Do **not** create Beads issues
|
|
37
|
+
- Produce an output that `/create` can consume directly
|
|
38
|
+
|
|
39
|
+
## Inputs
|
|
40
|
+
|
|
41
|
+
Use whichever context is available:
|
|
42
|
+
- The explicit user request
|
|
43
|
+
- Prior discussion, PRD, plan, handoff, or research artifacts
|
|
44
|
+
- Relevant codebase files or patterns when they help clarify realistic options
|
|
45
|
+
- Known constraints: language, framework, runtime, platform, timeline, policy
|
|
46
|
+
|
|
47
|
+
If context is incomplete, capture the uncertainty in the artifact instead of blocking.
|
|
48
|
+
|
|
49
|
+
## Process
|
|
50
|
+
|
|
51
|
+
1. **Read available context first**
|
|
52
|
+
- Check the user request and recent conversation
|
|
53
|
+
- Read any relevant discussion, PRD, plan, handoff, or research artifacts
|
|
54
|
+
- Inspect the codebase only far enough to ground the conversation in real patterns
|
|
55
|
+
|
|
56
|
+
2. **Frame the discussion goal**
|
|
57
|
+
- What outcome is the user trying to achieve?
|
|
58
|
+
- What part of the request is already clear?
|
|
59
|
+
- What ambiguity would cause `/create` or `/research` to guess?
|
|
60
|
+
|
|
61
|
+
3. **Surface gray areas and assumptions**
|
|
62
|
+
Focus on ambiguity that materially affects:
|
|
63
|
+
- scope boundaries
|
|
64
|
+
- workflow or UX expectations
|
|
65
|
+
- integration direction
|
|
66
|
+
- constraints or non-goals
|
|
67
|
+
- sequencing between discuss/create/research/build
|
|
68
|
+
|
|
69
|
+
4. **Run an adaptive interview**
|
|
70
|
+
- Start with the few gray areas most likely to change `/create`, `/research`, or `/start`
|
|
71
|
+
- Ask focused, high-signal questions one at a time when possible
|
|
72
|
+
- Prefer decisions or structured options over open-ended brainstorming once enough context exists
|
|
73
|
+
- Avoid re-asking anything already confirmed by prior artifacts
|
|
74
|
+
- If the repository strongly suggests a sensible default, present it as an assumption for confirmation instead of asking a vague question
|
|
75
|
+
- If multiple gray areas remain, prioritize the ones with the biggest scope or workflow impact first
|
|
76
|
+
|
|
77
|
+
5. **Lock what the interview resolved and defer the rest**
|
|
78
|
+
- Record confirmed decisions explicitly
|
|
79
|
+
- Separate confirmed assumptions from unresolved questions
|
|
80
|
+
- Push non-critical ideas into a deferred section rather than expanding scope
|
|
81
|
+
|
|
82
|
+
6. **Write the discussion artifact yourself**
|
|
83
|
+
- Create or update `.opencode/memory/discussions/YYYY-MM-DD-<topic>.md`
|
|
84
|
+
- You may write only inside `.opencode/memory/discussions/`
|
|
85
|
+
- Do not write anywhere else in the repository
|
|
86
|
+
|
|
87
|
+
7. **Hand off to `/create`**
|
|
88
|
+
- End by telling the user the discussion artifact is ready
|
|
89
|
+
- Point them to `/create` as the next step for plan generation
|
|
90
|
+
|
|
91
|
+
## Discussion Request Format
|
|
92
|
+
|
|
93
|
+
Use this request schema:
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
type: "discussion"
|
|
97
|
+
mode: "interview-style-pre-create-phase"
|
|
98
|
+
topic: "[Feature or topic being clarified]"
|
|
99
|
+
goal: "[What outcome the user wants]"
|
|
100
|
+
ambiguities:
|
|
101
|
+
- "[Ambiguity 1]"
|
|
102
|
+
- "[Ambiguity 2]"
|
|
103
|
+
constraints:
|
|
104
|
+
product: "[User or business constraints]"
|
|
105
|
+
technical: "[Technical context if relevant]"
|
|
106
|
+
workflow: "[Any sequencing or approval constraints]"
|
|
107
|
+
format: "discussion-brief"
|
|
108
|
+
depth: "standard" # quick | standard | deep
|
|
109
|
+
question_style: "adaptive-interview"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Rules
|
|
113
|
+
|
|
114
|
+
- Start from user intent, not technical implementation detail
|
|
115
|
+
- Clarify only what changes planning, sequencing, or execution direction
|
|
116
|
+
- Treat `/discuss` as an interview, not an unbounded brainstorm
|
|
117
|
+
- Ask the minimum number of questions needed to remove planning-critical ambiguity
|
|
118
|
+
- Prefer concrete decisions over vague summaries
|
|
119
|
+
- Preserve unresolved items instead of guessing them away
|
|
120
|
+
- Write only the final discussion artifact under `.opencode/memory/discussions/`
|
|
121
|
+
- Save a report that `/create` can use without re-running the conversation
|
|
122
|
+
|
|
123
|
+
Begin by deriving the discussion goal from the user's request and available context, then proceed immediately.
|
package/command/handoff.md
CHANGED
|
@@ -21,18 +21,19 @@ Run these in parallel:
|
|
|
21
21
|
- `git log --oneline -5` — recent commits
|
|
22
22
|
- `git status --short` — uncommitted changes
|
|
23
23
|
- `git diff --stat` — what changed
|
|
24
|
+
- Check `.opencode/memory/discussions/` for active discussion artifact
|
|
24
25
|
- Check `.opencode/memory/plans/` for active plan
|
|
25
|
-
- Check `.opencode/memory/
|
|
26
|
+
- Check `.opencode/memory/research/` for active research artifact
|
|
26
27
|
- Check ritual state if exists
|
|
27
28
|
|
|
28
29
|
### 2. Write Handoff
|
|
29
30
|
|
|
30
|
-
Create `.opencode/memory/handoffs/YYYY-MM-DD
|
|
31
|
+
Create `.opencode/memory/handoffs/YYYY-MM-DD-<phase>.md` with this structure:
|
|
31
32
|
|
|
32
33
|
```markdown
|
|
33
34
|
---
|
|
34
35
|
date: YYYY-MM-DD
|
|
35
|
-
phase:
|
|
36
|
+
phase: discussed | researched | planned | implementing | validating
|
|
36
37
|
branch: <branch>
|
|
37
38
|
---
|
|
38
39
|
|
|
@@ -47,10 +48,11 @@ branch: <branch>
|
|
|
47
48
|
- Uncommitted: <yes/no, list if yes>
|
|
48
49
|
|
|
49
50
|
## Active Artifacts
|
|
50
|
-
-
|
|
51
|
+
- Discussion: `<path>` (if exists)
|
|
51
52
|
- Plan: `<path>` (if exists)
|
|
53
|
+
- Research: `<path>` (if exists)
|
|
52
54
|
|
|
53
|
-
##
|
|
55
|
+
## Next Steps
|
|
54
56
|
1. <immediate next action — be specific>
|
|
55
57
|
2. <following action>
|
|
56
58
|
3. <after that>
|
package/command/init.md
CHANGED
|
@@ -33,15 +33,16 @@ export default CliKitPlugin;
|
|
|
33
33
|
### 3) Create `.opencode` structure
|
|
34
34
|
|
|
35
35
|
Ensure these exist:
|
|
36
|
-
- `.opencode/memory/
|
|
36
|
+
- `.opencode/memory/discussions`
|
|
37
37
|
- `.opencode/memory/plans`
|
|
38
38
|
- `.opencode/memory/research`
|
|
39
39
|
- `.opencode/memory/reviews`
|
|
40
40
|
- `.opencode/memory/handoffs`
|
|
41
41
|
- `.opencode/memory/prds`
|
|
42
|
-
- `.opencode/memory/beads`
|
|
43
42
|
- `.opencode/memory/_templates`
|
|
44
43
|
|
|
44
|
+
Task tracking now lives in the project-root `.beads/` directory created by `br init`, not under `.opencode/memory/beads`.
|
|
45
|
+
|
|
45
46
|
### 4) Handle existing AGENTS.md safely
|
|
46
47
|
|
|
47
48
|
If root `AGENTS.md` exists:
|
|
@@ -97,7 +98,7 @@ Return:
|
|
|
97
98
|
|
|
98
99
|
### Next
|
|
99
100
|
1. Restart OpenCode
|
|
100
|
-
2. Run /
|
|
101
|
+
2. Run /discuss to begin work
|
|
101
102
|
```
|
|
102
103
|
|
|
103
104
|
## Important behavior
|
package/command/pr.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Optional branch-based utility. Generate a complete PR description from git diff — summary, file changes, test evidence, linked
|
|
2
|
+
description: Optional branch-based utility. Generate a complete PR description from git diff — summary, file changes, test evidence, linked plan — then create it via gh when the user or repo policy explicitly requires a PR.
|
|
3
3
|
agent: build
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -37,7 +37,6 @@ If you are still on the shared default branch, stop and ask before proceeding
|
|
|
37
37
|
|
|
38
38
|
### 2. Load Artifacts
|
|
39
39
|
|
|
40
|
-
- `spec.md` — Link requirements
|
|
41
40
|
- `plan.md` — Link implementation plan
|
|
42
41
|
- `review.md` — Link review results (if exists)
|
|
43
42
|
- Bead info — Get from beads village
|
|
@@ -67,7 +66,6 @@ gh pr create \
|
|
|
67
66
|
|
|
68
67
|
### Related
|
|
69
68
|
- **Bead:** [ID]
|
|
70
|
-
- **Spec:** `.opencode/memory/specs/YYYY-MM-DD-feature.md`
|
|
71
69
|
- **Plan:** `.opencode/memory/plans/YYYY-MM-DD-feature.md`
|
|
72
70
|
|
|
73
71
|
---
|
|
@@ -172,7 +170,7 @@ pnpm lint
|
|
|
172
170
|
|
|
173
171
|
## Rules
|
|
174
172
|
|
|
175
|
-
- ✅ ALWAYS link to
|
|
173
|
+
- ✅ ALWAYS link to plan/bead
|
|
176
174
|
- ✅ ALWAYS include testing info
|
|
177
175
|
- ✅ ALWAYS run checks before PR
|
|
178
176
|
- ✅ ALWAYS self-review first
|
package/command/research.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
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
|
-
##
|
|
13
|
+
## Purpose
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Run a **GSD-inspired research pass adapted for CliKit**.
|
|
16
16
|
|
|
17
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
41
|
-
|
|
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-
|
|
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
|
-
|
|
67
|
-
|
|
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
|
-
|
|
84
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
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
|
-
|
|
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
|
|
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 "
|
|
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
|
|
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
|
|