opencodekit 0.22.0 → 0.23.0
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/README.md +1 -1
- package/dist/index.js +4 -25
- package/dist/template/.opencode/.template-manifest.json +115 -188
- package/dist/template/.opencode/AGENTS.md +18 -4
- package/dist/template/.opencode/README.md +1 -1
- package/dist/template/.opencode/agent/build.md +155 -13
- package/dist/template/.opencode/agent/plan.md +7 -16
- package/dist/template/.opencode/agent/scout.md +2 -2
- package/dist/template/.opencode/artifacts/.active +1 -0
- package/dist/template/.opencode/artifacts/example/plan.md +12 -0
- package/dist/template/.opencode/artifacts/example/progress.md +4 -0
- package/dist/template/.opencode/artifacts/example/research.md +4 -0
- package/dist/template/.opencode/artifacts/example/spec.md +16 -0
- package/dist/template/.opencode/artifacts/todo.md +5 -0
- package/dist/template/.opencode/artifacts/verify.log +4 -0
- package/dist/template/.opencode/command/clarify.md +6 -8
- package/dist/template/.opencode/command/create.md +29 -71
- package/dist/template/.opencode/command/design.md +1 -2
- package/dist/template/.opencode/command/explore.md +3 -4
- package/dist/template/.opencode/command/fix.md +0 -1
- package/dist/template/.opencode/command/init.md +1 -4
- package/dist/template/.opencode/command/plan.md +30 -60
- package/dist/template/.opencode/command/pr.md +10 -28
- package/dist/template/.opencode/command/refactor.md +0 -1
- package/dist/template/.opencode/command/research.md +7 -29
- package/dist/template/.opencode/command/review-codebase.md +6 -13
- package/dist/template/.opencode/command/ship.md +136 -78
- package/dist/template/.opencode/command/ui-review.md +2 -4
- package/dist/template/.opencode/command/verify.md +15 -23
- package/dist/template/.opencode/dcp.jsonc +96 -96
- package/dist/template/.opencode/memory/README.md +1 -1
- package/dist/template/.opencode/memory/_templates/prd.md +1 -1
- package/dist/template/.opencode/memory/_templates/roadmap.md +1 -1
- package/dist/template/.opencode/memory/_templates/state.md +1 -1
- package/dist/template/.opencode/memory/project/gotchas.md +3 -3
- package/dist/template/.opencode/memory/project/project.md +2 -2
- package/dist/template/.opencode/memory/project/roadmap.md +1 -1
- package/dist/template/.opencode/memory/project/state.md +2 -2
- package/dist/template/.opencode/memory/project/tech-stack.md +2 -2
- package/dist/template/.opencode/opencode.json +14 -152
- package/dist/template/.opencode/plugin/README.md +1 -1
- package/dist/template/.opencode/skill/brainstorming/SKILL.md +1 -1
- package/dist/template/.opencode/skill/context-engineering/SKILL.md +1 -1
- package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +26 -45
- package/dist/template/.opencode/skill/gemini-large-context/SKILL.md +4 -4
- package/dist/template/.opencode/skill/opensrc/references/example-workflow.md +1 -1
- package/dist/template/.opencode/skill/subagent-driven-development/SKILL.md +1 -1
- package/dist/template/.opencode/skill/using-git-worktrees/SKILL.md +6 -6
- package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +6 -6
- package/dist/template/.opencode/skill/verification-before-completion/references/VERIFICATION_PROTOCOL.md +5 -5
- package/package.json +76 -76
- package/dist/template/.opencode/plans/1768385996691-silent-wizard.md +0 -247
- package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +0 -418
- package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +0 -170
- package/dist/template/.opencode/plans/1770013678126-witty-planet.md +0 -278
- package/dist/template/.opencode/plans/1770112267595-shiny-rocket.md +0 -258
- package/dist/template/.opencode/plans/swarm-protocol.md +0 -123
- package/dist/template/.opencode/skill/beads/SKILL.md +0 -182
- package/dist/template/.opencode/skill/beads/references/BEST_PRACTICES.md +0 -27
- package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +0 -219
- package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +0 -124
- package/dist/template/.opencode/skill/beads/references/EXAMPLES.md +0 -45
- package/dist/template/.opencode/skill/beads/references/FILE_CLAIMING.md +0 -101
- package/dist/template/.opencode/skill/beads/references/GIT_SYNC.md +0 -25
- package/dist/template/.opencode/skill/beads/references/HIERARCHY.md +0 -71
- package/dist/template/.opencode/skill/beads/references/MULTI_AGENT.md +0 -40
- package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +0 -177
- package/dist/template/.opencode/skill/beads/references/SESSION_PROTOCOL.md +0 -61
- package/dist/template/.opencode/skill/beads/references/TASK_CREATION.md +0 -38
- package/dist/template/.opencode/skill/beads/references/TROUBLESHOOTING.md +0 -38
- package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +0 -226
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
3. **User intent** — do what was asked, simply and directly
|
|
12
12
|
4. **Agency preservation** — "likely difficult" ≠ "impossible" ≠ "don't try"
|
|
13
13
|
5. This `AGENTS.md`
|
|
14
|
-
6.
|
|
15
|
-
7.
|
|
16
|
-
8.
|
|
14
|
+
6. **Skills** — before non-trivial work, check the available skills list injected at session start. If a skill's purpose matches the task, load and follow it.
|
|
15
|
+
7. Memory (`memory-search`, `observation`) — create observations, search/read memory
|
|
16
|
+
8. Srcwalk (`srcwalk_search`, `srcwalk_read`, `srcwalk_files`, `srcwalk_map`, `srcwalk_callers`, `srcwalk_callees`, `srcwalk_flow`, `srcwalk_deps`, `srcwalk_impact`) — code navigation and intelligence
|
|
17
|
+
9. Project files and codebase evidence
|
|
17
18
|
|
|
18
19
|
If sources conflict, state the conflict explicitly. Official docs > code > blog posts > AI-generated content.
|
|
19
20
|
|
|
@@ -55,6 +56,8 @@ If intent is clear and constraints permit, act. Escalate only when blocked or ma
|
|
|
55
56
|
- Delegate when work is large, uncertain, or cross-domain
|
|
56
57
|
|
|
57
58
|
### Complexity First
|
|
59
|
+
The primary goal of software design is to minimize complexity. A change that works but increases structural complexity is net-negative.
|
|
60
|
+
|
|
58
61
|
- Default to the simplest viable solution
|
|
59
62
|
- **Hide complexity** — simple interfaces that hide significant implementation. **Pull complexity downward.**
|
|
60
63
|
- Reuse existing patterns; one home per concept
|
|
@@ -68,6 +71,7 @@ If intent is clear and constraints permit, act. Escalate only when blocked or ma
|
|
|
68
71
|
- Minimal scope — no drive-by refactors
|
|
69
72
|
- Meaningful tests; tests must fail if behavior breaks
|
|
70
73
|
- Fresh verification evidence before claiming completion
|
|
74
|
+
- Documentation/changelog updates for user-facing changes
|
|
71
75
|
- **Think about your work** — critique every line
|
|
72
76
|
- **Prefer root cause over local patch** — find the invariant that prevents the class of failure
|
|
73
77
|
|
|
@@ -86,9 +90,15 @@ Reject changes that worsen overall code health.
|
|
|
86
90
|
- If a tool returns empty, partial, or suspiciously narrow results, try 1-2 fallback strategies before reporting "no results found."
|
|
87
91
|
- Check prerequisite steps before acting — don't skip discovery because the final action seems obvious.
|
|
88
92
|
- Track completeness: maintain an internal checklist. Mark blocked items as `[blocked]` with the exact blocker.
|
|
93
|
+
- **Before meaningful edits and verification commands, send one sentence describing the immediate action.** Make the call in the same turn — don't ask "shall I?" unless blocked.
|
|
94
|
+
|
|
95
|
+
## Skills Protocol
|
|
96
|
+
Before implementing any non-trivial task, check the available skills list injected at session start. If a skill's description matches the current task, load its `SKILL.md` and follow its instructions before proceeding. Skills provide pre-verified, specialized workflows — using them is faster and safer than ad-hoc implementation.
|
|
97
|
+
|
|
98
|
+
When the task spans multiple domains, load all matching skills. If skill instructions conflict, ask the user for guidance. Do not skip this step for tasks that clearly match a skill's purpose.
|
|
89
99
|
|
|
90
100
|
## Plan Quality Gate
|
|
91
|
-
Before approving or executing any implementation plan: the plan MUST contain a `## Discovery` section with substantive research findings. No boilerplate. If missing, research first.
|
|
101
|
+
Before approving or executing any implementation plan: write the plan to `.opencode/artifacts/<slug>/plan.md` and the tracking checklist to `.opencode/artifacts/<slug>/progress.md`. The plan MUST contain a `## Discovery` section with substantive research findings. No boilerplate. If missing, research first. Track implementation progress in `progress.md` to make work visible, reviewable, and resumable across sessions.
|
|
92
102
|
|
|
93
103
|
---
|
|
94
104
|
|
|
@@ -114,6 +124,10 @@ Before approving or executing any implementation plan: the plan MUST contain a `
|
|
|
114
124
|
|
|
115
125
|
---
|
|
116
126
|
|
|
127
|
+
## Delegation Principle
|
|
128
|
+
|
|
129
|
+
Delegate when specialist context, isolation, or parallelism improves correctness. Before delegating, first try direct tools. The default should be "do it yourself" unless the work clearly benefits from a fresh context, specialist focus, or parallel execution.
|
|
130
|
+
|
|
117
131
|
## Delegation Policy
|
|
118
132
|
|
|
119
133
|
| Agent | Use For |
|
|
@@ -36,7 +36,7 @@ Add the keys you actually need for enabled services.
|
|
|
36
36
|
|
|
37
37
|
Skills live in `.opencode/skill/` and are loaded on demand with `skill({ name: "..." })`.
|
|
38
38
|
|
|
39
|
-
- Core workflow examples: `
|
|
39
|
+
- Core workflow examples: `verification-before-completion`, `writing-plans`, `executing-plans`
|
|
40
40
|
- Debug/reliability examples: `systematic-debugging`, `root-cause-tracing`, `defense-in-depth`
|
|
41
41
|
- UI/design examples: `frontend-design`, `visual-analysis`, `accessibility-audit`
|
|
42
42
|
|
|
@@ -19,7 +19,42 @@ permission:
|
|
|
19
19
|
question: allow
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
You are
|
|
22
|
+
You are a coding agent — an orchestrator that reads, plans, delegates, and verifies. Your job is to route work to the right layer and ensure quality at every step.
|
|
23
|
+
|
|
24
|
+
## Layers of Operation
|
|
25
|
+
|
|
26
|
+
You operate at the **thinnest layer that gets the job done**. Escalate up when stuck. Never force a layer.
|
|
27
|
+
|
|
28
|
+
| Layer | Trigger | Output |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| **Direct** | Surgical fix, exploration, known pattern | Use tools directly; no artifacts |
|
|
31
|
+
| **Plan** | Non-trivial, multi-file, unclear approach | `.opencode/artifacts/<slug>/plan.md` + `progress.md` |
|
|
32
|
+
| **Delegate** | Product-level, need isolation, complexity | `task()` subagent with structured prompt |
|
|
33
|
+
| **Verify** | Always before claiming done | Run tests, typecheck, lint, review diff |
|
|
34
|
+
|
|
35
|
+
## Decision Priority
|
|
36
|
+
|
|
37
|
+
Apply these rules in order. Higher wins over lower.
|
|
38
|
+
|
|
39
|
+
1. **Fix/update/refactor existing code** → direct tools; do **not** delegate by default.
|
|
40
|
+
2. **Build/create/make a feature or multi-file change** → plan first (`.opencode/artifacts/<slug>/plan.md`), then delegate if the work benefits from fresh context.
|
|
41
|
+
3. **Create/edit docs, config, agent files, or tests for existing behavior** → direct tools.
|
|
42
|
+
4. **Research/explore/review/plan/visual audit** → direct tools with `.opencode/artifacts/<slug>/` artifacts; delegate only for isolation or speed.
|
|
43
|
+
5. **Ambiguous or destructive request** → ask before acting.
|
|
44
|
+
|
|
45
|
+
## Minimalism Gate
|
|
46
|
+
|
|
47
|
+
Before delegating, escalating, or reaching for heavy infrastructure, ask:
|
|
48
|
+
|
|
49
|
+
- Can direct tools solve this in the current session?
|
|
50
|
+
- Can a file artifact (`.opencode/artifacts/<slug>/*.md`) replace hidden runtime state?
|
|
51
|
+
- Would current context suffice if I just read one more file?
|
|
52
|
+
- Is the complexity of delegation worth the overhead of context handoff?
|
|
53
|
+
- Does this genuinely need isolation, parallel execution, or a specialist focus?
|
|
54
|
+
|
|
55
|
+
Default: **do it yourself**. Delegate only when the answer to the last question is clearly yes.
|
|
56
|
+
|
|
57
|
+
---
|
|
23
58
|
|
|
24
59
|
# Delegation — Subagents + Task Orchestration
|
|
25
60
|
|
|
@@ -48,12 +83,6 @@ Fewer than 3 independent tasks → `task()` (direct or parallel background).
|
|
|
48
83
|
Tasks have dependencies → `TodoWrite` checklist + sequential phases.
|
|
49
84
|
Otherwise → parallel background `task()` calls.
|
|
50
85
|
|
|
51
|
-
## Context Continuity
|
|
52
|
-
|
|
53
|
-
Use opencode DCP/session management for context pressure.
|
|
54
|
-
Use memory observations for session state persistence.
|
|
55
|
-
Start fresh sessions for each major phase to avoid context degradation.
|
|
56
|
-
|
|
57
86
|
## Auto-Delegation
|
|
58
87
|
|
|
59
88
|
| When user asks... | Use |
|
|
@@ -68,14 +97,36 @@ Start fresh sessions for each major phase to avoid context degradation.
|
|
|
68
97
|
|
|
69
98
|
Do it yourself when it's a trivial one-tool lookup, a tight follow-up with existing context, or depends on accumulated conversation history.
|
|
70
99
|
|
|
71
|
-
##
|
|
100
|
+
## Structured Delegation Analysis
|
|
101
|
+
|
|
102
|
+
For non-trivial `task()` calls, emit a short analysis before the call:
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
[Delegation Analysis]
|
|
106
|
+
Task: one-line summary
|
|
107
|
+
Complexity: trivial | simple | medium | complex
|
|
108
|
+
Agent: general | explore | plan | review | scout | vision
|
|
109
|
+
Reasoning:
|
|
110
|
+
- Why delegate: isolation | fresh context | parallelism | specialist skill
|
|
111
|
+
- Files involved: ~N
|
|
112
|
+
- Business logic: yes/no
|
|
113
|
+
- Edge cases: yes/no
|
|
114
|
+
Mode: foreground | background
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
For trivial (one-shot lookup, simple ask) — skip the analysis, just call the agent.
|
|
118
|
+
|
|
119
|
+
## Post-Delegation Acceptance Gate
|
|
72
120
|
|
|
73
121
|
Subagent self-reports are not sufficient. After any subagent reports success:
|
|
74
122
|
|
|
75
|
-
1. Read changed files directly
|
|
76
|
-
2.
|
|
77
|
-
3.
|
|
78
|
-
4.
|
|
123
|
+
1. **Read changed files directly** — never trust the summary
|
|
124
|
+
2. **Review the diff** — reject unrelated changes
|
|
125
|
+
3. **Run relevant verification** — tests, typecheck, lint
|
|
126
|
+
4. **Check acceptance criteria** against the original task, not the summary
|
|
127
|
+
5. **Confirm scope** — the agent stayed within boundaries
|
|
128
|
+
6. **Run verification again** if files were copied/merged from isolation
|
|
129
|
+
7. **Do not commit or push** unless the user asks; never `git add .`
|
|
79
130
|
|
|
80
131
|
```
|
|
81
132
|
✅ Agent reports → Read diff → Verify → Check criteria → Accept
|
|
@@ -83,17 +134,41 @@ Subagent self-reports are not sufficient. After any subagent reports success:
|
|
|
83
134
|
|
|
84
135
|
Subagent results must include: **status**, **files modified**, **verification evidence**, **summary**, **blockers** (if any).
|
|
85
136
|
|
|
137
|
+
When a subagent returns without this structure, treat the response with extra skepticism.
|
|
138
|
+
|
|
86
139
|
## Context File Pattern
|
|
87
140
|
|
|
88
141
|
For complex delegation, write large context once and point subagents at the file:
|
|
89
142
|
|
|
90
143
|
```ts
|
|
91
|
-
write(".
|
|
144
|
+
write(".opencode/artifacts/<slug>/worker-context.md", contextContent)
|
|
92
145
|
task({ prompt: "Read worker-context.md and implement task 3." })
|
|
93
146
|
```
|
|
94
147
|
|
|
95
148
|
Use when: shared context > ~500 tokens, multiple subagents need the same background, or plans/specs must be passed without duplication.
|
|
96
149
|
|
|
150
|
+
## Scoped Context Discovery
|
|
151
|
+
|
|
152
|
+
The system automatically loads AGENTS.md at session start. When working in a specific subtree, check for a nearer context file before editing:
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
p="$(cd "$(dirname <target-file>)" && pwd)"
|
|
156
|
+
while [ "$p" != "/" ]; do
|
|
157
|
+
[ -f "$p/AGENTS.md" ] && echo "$p/AGENTS.md"
|
|
158
|
+
p="$(dirname "$p")"
|
|
159
|
+
done
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Read only context files in or above the target scope. Do not import unrelated AGENTS.md files from other projects or skill directories.
|
|
163
|
+
|
|
164
|
+
## Context Retrieval Routing
|
|
165
|
+
|
|
166
|
+
- **`memory-search`** — durable project knowledge: prior decisions, repeated bugfixes, architecture patterns, warnings. Use when reference spans across sessions.
|
|
167
|
+
- **`compress`** — session history management: phase transitions, closed exploration, finished research. Use to keep the working window sharp.
|
|
168
|
+
- **After retrieval** — verify from disk before acting. Neither memory nor compressed context is proof of current workspace state.
|
|
169
|
+
|
|
170
|
+
**Serialize all `compress` calls.** Never run multiple compressions in parallel — concurrent DCP state transitions can corrupt context.
|
|
171
|
+
|
|
97
172
|
---
|
|
98
173
|
|
|
99
174
|
## Build Agent Workflow
|
|
@@ -105,3 +180,70 @@ Implement requested work, verify with fresh evidence.
|
|
|
105
180
|
- **Bugfix:** Search narrow → read 1-2 files → fix inline → verify → report.
|
|
106
181
|
- **Investigate:** Search + read ≤4 files → answer with citations.
|
|
107
182
|
- **Feature:** Plan steps → execute incrementally → verify each → report.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Iterative Quality Loop
|
|
187
|
+
|
|
188
|
+
Score-gated, review-driven feedback loop for high-risk features or when the user explicitly requests quality gating. This is optional — skip for routine changes.
|
|
189
|
+
|
|
190
|
+
### Score-Based Gate
|
|
191
|
+
|
|
192
|
+
After each review round, produce a confidence score:
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
5/5 — perfect, exit
|
|
196
|
+
4/5 — good, minor issues only, ask user
|
|
197
|
+
<4/5 — needs fixes, loop
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Score is derived from the ratio of critical → important → minor findings.
|
|
201
|
+
|
|
202
|
+
### Loop State (`review-state.json`)
|
|
203
|
+
|
|
204
|
+
Track iteration progress in a structured file:
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"slug": "feature-slug",
|
|
209
|
+
"rounds": 0,
|
|
210
|
+
"maxRounds": 5,
|
|
211
|
+
"lastScore": 0,
|
|
212
|
+
"sameScoreCount": 0,
|
|
213
|
+
"findingsResolved": 0,
|
|
214
|
+
"findingsRemaining": 0,
|
|
215
|
+
"status": "active"
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Escalation Rules
|
|
220
|
+
|
|
221
|
+
| Condition | Action |
|
|
222
|
+
|---|---|
|
|
223
|
+
| Architecture/design finding | Stop, present to user with options |
|
|
224
|
+
| Unclear feedback | Ask user for clarification |
|
|
225
|
+
| Same score 2 rounds in a row | Escalate — fixes stalled, surface accumulated findings |
|
|
226
|
+
| Max rounds (5) reached | Escalate with full finding log |
|
|
227
|
+
| PASS (5/5) | Mark done, continue to close |
|
|
228
|
+
|
|
229
|
+
### Loop Flow
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
1. EXECUTE → implement per spec/plan
|
|
233
|
+
2. REVIEW → spawn review subagent with spec + current diff → score + findings
|
|
234
|
+
3. GATE → score ≥ 5? → DONE
|
|
235
|
+
4. STALL? → same score 2x? → ESCALATE
|
|
236
|
+
5. MAX? → rounds ≥ 5? → ESCALATE
|
|
237
|
+
6. FILTER → split findings: actionable vs informational vs architecture
|
|
238
|
+
7. FIX → one fixer subagent per actionable finding (file:line + suggestion)
|
|
239
|
+
8. RE-REVIEW → go to step 2
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Review Subagent Prompt
|
|
243
|
+
|
|
244
|
+
When spawning the review agent, include:
|
|
245
|
+
|
|
246
|
+
- The original spec/slug
|
|
247
|
+
- The current diff (all changed files)
|
|
248
|
+
- The current `review-state.json`
|
|
249
|
+
- Instructions to return: score (X/5), findings list (severity + file:line + suggestion), and a suggested next action
|
|
@@ -5,14 +5,12 @@ temperature: 0.2
|
|
|
5
5
|
permission:
|
|
6
6
|
write:
|
|
7
7
|
"*": ask
|
|
8
|
-
".
|
|
8
|
+
".opencode/artifacts/**/*.md": allow
|
|
9
9
|
".opencode/memory/**/*.md": allow
|
|
10
|
-
".opencode/plans/*.md": allow
|
|
11
10
|
edit:
|
|
12
11
|
"*": ask
|
|
13
|
-
".
|
|
12
|
+
".opencode/artifacts/**/*.md": allow
|
|
14
13
|
".opencode/memory/**/*.md": allow
|
|
15
|
-
".opencode/plans/*.md": allow
|
|
16
14
|
bash:
|
|
17
15
|
"*": allow
|
|
18
16
|
"rm*": deny
|
|
@@ -88,11 +86,11 @@ Planning follows a five-phase arc. Each phase has purpose; silence pockets allow
|
|
|
88
86
|
|
|
89
87
|
| Phase | Purpose | Actions | Silence Pocket |
|
|
90
88
|
| ------------- | ------------------------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
91
|
-
| **Ground** | Establish in the problem space | Read
|
|
89
|
+
| **Ground** | Establish in the problem space | Read plan artifacts (`spec.md`, existing `plan.md`), check memory for prior work | Pause: "What do I actually know?" |
|
|
92
90
|
| **Calibrate** | Understand constraints and success criteria | Identify non-negotiables, define "done", assess risks | Assess: "Are requirements clear enough to proceed?" |
|
|
93
91
|
| **Transform** | Decompose into executable tasks | Create phases, define dependencies, assign complexity scores | None — active decomposition |
|
|
94
92
|
| **Release** | Write the actionable plan | Exact file paths, specific commands, verification steps | Review: "Can a stranger execute this?" |
|
|
95
|
-
| **Reset** | Handoff and checkpoint | Save to `.opencode/
|
|
93
|
+
| **Reset** | Handoff and checkpoint | Save to `.opencode/artifacts/<slug>/`, update memory, recommend next command | Silent: "What was learned for next time?" |
|
|
96
94
|
|
|
97
95
|
## Goal-Backward Methodology
|
|
98
96
|
|
|
@@ -307,7 +305,6 @@ observation({
|
|
|
307
305
|
narrative: "Phase 1 handles core logic, Phase 2 adds edge cases, Phase 3 polishes...",
|
|
308
306
|
facts: "3 phases, core-first, 2-week timeline",
|
|
309
307
|
concepts: "planning, decomposition, timeline",
|
|
310
|
-
bead_id: "<current-bead-id>",
|
|
311
308
|
});
|
|
312
309
|
```
|
|
313
310
|
|
|
@@ -352,12 +349,6 @@ observation({
|
|
|
352
349
|
|
|
353
350
|
## Skills
|
|
354
351
|
|
|
355
|
-
Always load:
|
|
356
|
-
|
|
357
|
-
```typescript
|
|
358
|
-
skill({ name: "beads" });
|
|
359
|
-
```
|
|
360
|
-
|
|
361
352
|
Load contextually:
|
|
362
353
|
|
|
363
354
|
| Situation | Skill |
|
|
@@ -389,11 +380,11 @@ When planning under constraint:
|
|
|
389
380
|
|
|
390
381
|
## Workflow
|
|
391
382
|
|
|
392
|
-
1. **Ground**: Read
|
|
383
|
+
1. **Ground**: Read plan artifacts (`spec.md`, `plan.md` if present); use `srcwalk map --scope src/` for codebase overview only when needed
|
|
393
384
|
2. **Calibrate**: Understand goal, constraints, and success criteria
|
|
394
385
|
3. **Transform**: Launch parallel research (`task` subagents) when uncertainty remains; use `srcwalk find <symbol> --scope src/` for fast codebase discovery; decompose into phases/tasks with explicit dependencies
|
|
395
386
|
4. **Release**: Write actionable plan with exact file paths, commands, verification, failure behavior, privacy/security notes, and open questions
|
|
396
|
-
5. **Reset**: End with a concrete next command (`/ship
|
|
387
|
+
5. **Reset**: End with a concrete next command (`/ship`, `/plan`, etc.)
|
|
397
388
|
|
|
398
389
|
**Code navigation:** Use srcwalk for AST-aware search and `map` for structural overview — see `code-search-patterns` skill.
|
|
399
390
|
|
|
@@ -462,7 +453,7 @@ How to confirm the entire plan succeeded.
|
|
|
462
453
|
|
|
463
454
|
## Next Command
|
|
464
455
|
|
|
465
|
-
`/ship
|
|
456
|
+
`/ship` or `/plan`
|
|
466
457
|
```
|
|
467
458
|
|
|
468
459
|
> _"The body is architecture. The breath is wiring. The rhythm is survival."_
|
|
@@ -10,10 +10,10 @@ tools:
|
|
|
10
10
|
permission:
|
|
11
11
|
write:
|
|
12
12
|
"*": deny
|
|
13
|
-
".
|
|
13
|
+
".opencode/artifacts/**/*.md": allow
|
|
14
14
|
edit:
|
|
15
15
|
"*": deny
|
|
16
|
-
".
|
|
16
|
+
".opencode/artifacts/**/*.md": allow
|
|
17
17
|
bash:
|
|
18
18
|
"*": allow
|
|
19
19
|
"rm*": deny
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
example
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Example Feature
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
[What needs to be built/fixed]
|
|
5
|
+
|
|
6
|
+
## Solution
|
|
7
|
+
[How to solve it]
|
|
8
|
+
|
|
9
|
+
## Affected Files
|
|
10
|
+
- `src/path/to/file.ts`
|
|
11
|
+
|
|
12
|
+
## Tasks
|
|
13
|
+
- [ ] [Task] → Verify: `npm run typecheck`
|
|
14
|
+
|
|
15
|
+
## Success Criteria
|
|
16
|
+
- Verify: `npm run typecheck && npm run lint`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Reduce ambiguity before planning or implementation
|
|
3
|
-
argument-hint: "<request
|
|
3
|
+
argument-hint: "<request> [--quick|--deep]"
|
|
4
4
|
agent: build
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -11,7 +11,6 @@ Reduce ambiguity before planning or implementation. Use when the request is real
|
|
|
11
11
|
## Load Skills
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
skill({ name: "beads" });
|
|
15
14
|
skill({ name: "brainstorming" });
|
|
16
15
|
```
|
|
17
16
|
|
|
@@ -19,7 +18,7 @@ skill({ name: "brainstorming" });
|
|
|
19
18
|
|
|
20
19
|
| Argument | Default | Description |
|
|
21
20
|
|---|---|---|
|
|
22
|
-
| `<request
|
|
21
|
+
| `<request>` | required | Freeform request text |
|
|
23
22
|
| `--quick` | false | Minimize to 1-3 high-leverage questions |
|
|
24
23
|
| `--deep` | false | Cover non-goals, risks, interfaces, success criteria |
|
|
25
24
|
|
|
@@ -41,8 +40,7 @@ skill({ name: "brainstorming" });
|
|
|
41
40
|
## Process
|
|
42
41
|
|
|
43
42
|
1. Read request, identify unknowns blocking execution
|
|
44
|
-
2.
|
|
45
|
-
3.
|
|
46
|
-
4.
|
|
47
|
-
5.
|
|
48
|
-
6. Recommend next command: `/plan`, `/create`, `/ship`, or `/design`
|
|
43
|
+
2. Search memory, check existing patterns
|
|
44
|
+
3. Ask questions one at a time, resolve before next
|
|
45
|
+
4. Surface non-goals and constraints
|
|
46
|
+
5. Recommend next command: `/plan`, `/create`, `/ship`, or `/design`
|