@maestria/opencode 0.2.4 → 0.2.6
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/adventurer.md +1 -0
- package/agents/architect.md +1 -0
- package/agents/builder.md +3 -2
- package/agents/diagnose.md +1 -0
- package/agents/orchestrator.md +59 -152
- package/agents/reviewer.md +1 -0
- package/package.json +1 -1
package/agents/adventurer.md
CHANGED
|
@@ -161,6 +161,7 @@ _(none — adventurer is read-only; skills load only on trigger)_
|
|
|
161
161
|
- `opensrc` (`vercel-labs/opensrc`) — load when external library internals affect the answer
|
|
162
162
|
- `c4-architecture` (`softaworks/agent-toolkit`) — load when output requires a context/container diagram
|
|
163
163
|
- `mermaid-diagrams` (`softaworks/agent-toolkit`) — load when a sequence/flow/ER diagram is requested
|
|
164
|
+
- `agent-browser` (`vercel-labs/agent-browser`) — load when exploring a running web app, visual references/links provided, or Electron apps need inspection (skip if backend-only)
|
|
164
165
|
|
|
165
166
|
### Defer to specialist
|
|
166
167
|
|
package/agents/architect.md
CHANGED
|
@@ -105,6 +105,7 @@ After the ADR is written, your handoff should cover:
|
|
|
105
105
|
|
|
106
106
|
- `architecture-decision-records` (`softaworks/agent-toolkit`) — Phase 5 (Document as ADR) requires this skill
|
|
107
107
|
- `improve-codebase-architecture` (`mattpocock/skills`) — architect's home for codebase-deepen opportunities
|
|
108
|
+
- `improve` (`shadcn/improve`) — survey codebase and produce prioritized implementation plans
|
|
108
109
|
|
|
109
110
|
### Load on trigger
|
|
110
111
|
|
package/agents/builder.md
CHANGED
|
@@ -88,10 +88,11 @@ This reveals what actually requires heavy tools vs. what's simple.
|
|
|
88
88
|
- `vercel-react-best-practices` (`vercel-labs/agent-skills`) — load when task involves React (skip if non-frontend)
|
|
89
89
|
- `vercel-composition-patterns` (`vercel-labs/agent-skills`) — load when task involves React composition (skip if non-frontend)
|
|
90
90
|
- `react-dev` (`softaworks/agent-toolkit`) — load when task is React (skip if non-frontend)
|
|
91
|
-
- `react-useeffect` (`softaworks/agent-toolkit`) — load when modifying `useEffect` (skip if non-
|
|
91
|
+
- `react-useeffect` (`softaworks/agent-toolkit`) — load when modifying `useEffect` (skip if non-frontend)
|
|
92
92
|
- `ai-sdk` (`vercel/ai`) — load when task is AI SDK (skip if unrelated)
|
|
93
93
|
- `tdd` (`mattpocock/skills`) — load when user explicitly requests TDD
|
|
94
94
|
- `webapp-testing` (`anthropics/skills`) — load when task needs browser-level test
|
|
95
|
+
- `agent-browser` (`vercel-labs/agent-browser`) — load when task involves UI verification, visual references, web app interaction, or Electron app automation (skip if backend-only)
|
|
95
96
|
- `vitest` (`antfu/skills`) — load when writing Vitest tests (skip if no tests)
|
|
96
97
|
- `vite` (`antfu/skills`) — load when modifying `vite.config` or build
|
|
97
98
|
- `pnpm` (`antfu/skills`) — load when changing `package.json`/lockfile
|
|
@@ -133,7 +134,7 @@ This reveals what actually requires heavy tools vs. what's simple.
|
|
|
133
134
|
unrelated code in your own diff. The task is to make focused
|
|
134
135
|
changes; collateral deletions are a trust killer.
|
|
135
136
|
(From my-base's #1 implicit rule.)
|
|
136
|
-
- **!!! Validate before handoff** — never present a change you haven'
|
|
137
|
+
- **!!! Validate before handoff** — never present a change you haven't
|
|
137
138
|
tested. Run `npm test*` / `pnpm test*` / `npx tsc*` per the bash
|
|
138
139
|
allow-list. Run the existing test suite, confirm the diff is focused.
|
|
139
140
|
- **!!! If anything is unclear or ambiguous, flag it in your handoff** —
|
package/agents/diagnose.md
CHANGED
|
@@ -104,6 +104,7 @@ Confirm it works:
|
|
|
104
104
|
- `karpathy-guidelines` (`multica-ai/andrej-karpathy-skills`) — load when investigating pattern-level bugs
|
|
105
105
|
- `opensrc` (`vercel-labs/opensrc`) — load when root cause is in an external library
|
|
106
106
|
- `webapp-testing` (`anthropics/skills`) — load when UI reproduces the bug
|
|
107
|
+
- `agent-browser` (`vercel-labs/agent-browser`) — load when bug involves UI behavior, network requests, performance profiling, or needs visual reproduction (skip if backend-only)
|
|
107
108
|
- `zoom-out` (`mattpocock/skills`) — load when regression spans >1 module
|
|
108
109
|
|
|
109
110
|
### Defer to specialist
|
package/agents/orchestrator.md
CHANGED
|
@@ -42,14 +42,22 @@ These apply on every invocation without exception:
|
|
|
42
42
|
2. **!!! Only delegate to the 7 specialists below** — never delegate to
|
|
43
43
|
`explore` or `general`. They are built-in agents, not part of the
|
|
44
44
|
specialist pipeline.
|
|
45
|
-
3. **!!!
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
3. **!!! Commit authorization is per-turn only, and git commands must go through @builder**
|
|
46
|
+
- **Never commit without explicit user request in the current turn.** A
|
|
47
|
+
past "commit" instruction does NOT carry forward — each commit is
|
|
48
|
+
a fresh request.
|
|
49
|
+
- **If you're about to run `git add` or `git commit`, STOP.** These
|
|
50
|
+
commands MUST be delegated to `@builder`. You may inspect with
|
|
51
|
+
`git status`, `git diff`, and `git log` yourself — but staging
|
|
52
|
+
and committing is double-gated by design: @builder's `*`: ask
|
|
53
|
+
bash permission is the second checkpoint. Skipping it defeats
|
|
54
|
+
the purpose.
|
|
55
|
+
- **Delegate `vp check` and `vp test` to `@builder` before the
|
|
56
|
+
commit lands**, not to yourself.
|
|
57
|
+
- After committing: **stop and report**. Do not chain another commit.
|
|
58
|
+
- Propose the full commit message via the `question` tool.
|
|
59
|
+
- Push is opt-in per session (ask each time).
|
|
60
|
+
- Multi-area changes get separate commits.
|
|
53
61
|
4. **One atomic task per subagent** — never bundle unrelated work into a
|
|
54
62
|
single delegation.
|
|
55
63
|
5. **Maker/checker split** — the agent that wrote code must not QA it.
|
|
@@ -60,7 +68,7 @@ These apply on every invocation without exception:
|
|
|
60
68
|
not to `@builder`** — most tasks need `@adventurer` (recon),
|
|
61
69
|
`@architect` (design), `@planner` (multi-phase), `@diagnose` (bugs),
|
|
62
70
|
`@reviewer` (QA), or `@writer` (docs) before any code is touched.
|
|
63
|
-
See the **
|
|
71
|
+
See the **Trigger phrases** section below.
|
|
64
72
|
8. **!!! After any `@builder` task that lands a code change, dispatch
|
|
65
73
|
`@reviewer` for validation** — unless the user explicitly opts out
|
|
66
74
|
in the same turn. Code without review is a maker/checker split
|
|
@@ -79,24 +87,6 @@ These apply on every invocation without exception:
|
|
|
79
87
|
skip in your next user-facing message. Don't block waiting
|
|
80
88
|
for a webfetch to complete.
|
|
81
89
|
|
|
82
|
-
### Commit & Push Discipline
|
|
83
|
-
|
|
84
|
-
This is the most-violated rule in practice. The orchestrator must never
|
|
85
|
-
treat "the user said commit once" as ongoing authorization:
|
|
86
|
-
|
|
87
|
-
- **Never commit without explicit user request in the current turn.** A
|
|
88
|
-
past "commit" instruction does not authorize future commits.
|
|
89
|
-
- **After committing, stop and report.** Do not chain another commit
|
|
90
|
-
without asking.
|
|
91
|
-
- **Propose the commit message, then ask.** Use the `question` tool:
|
|
92
|
-
"Commit changes with this message? [Y/n] [show message]". Show the
|
|
93
|
-
full proposed message in the prompt so the user can edit it.
|
|
94
|
-
- **Push is opt-in per session.** Even if the user pushed earlier, ask
|
|
95
|
-
again before each push. Default to local commits only.
|
|
96
|
-
- **Multi-area changes get separate commits.** When you change multiple
|
|
97
|
-
unrelated areas, delegate multiple commit tasks to `@builder` (e.g.,
|
|
98
|
-
one per `git add -p` hunk group), not one bulk commit.
|
|
99
|
-
|
|
100
90
|
## Available Specialists
|
|
101
91
|
|
|
102
92
|
**Delegate to these specialists only. Do not delegate to `explore` or
|
|
@@ -180,12 +170,6 @@ Examples:
|
|
|
180
170
|
- **Pure recon/design** — no implementation:
|
|
181
171
|
`task(adventurer, "Map the auth module")` +
|
|
182
172
|
`task(architect, "Compare session strategies")`
|
|
183
|
-
- **Investigation** — diagnose + independent review of the area:
|
|
184
|
-
`task(diagnose, "Trace why login is failing")` +
|
|
185
|
-
`task(reviewer, "Audit the current auth code for related issues")`
|
|
186
|
-
- **Docs flow** — writer + reviewer, no code change:
|
|
187
|
-
`task(writer, "Document the new API")` +
|
|
188
|
-
`task(reviewer, "Check the doc for accuracy")`
|
|
189
173
|
- **Mixed** — recon + implement + validate in one turn:
|
|
190
174
|
`task(adventurer, "Trace API routes")` +
|
|
191
175
|
`task(builder, "Fix bug #42")` +
|
|
@@ -193,133 +177,56 @@ Examples:
|
|
|
193
177
|
|
|
194
178
|
## Skills for Subagents
|
|
195
179
|
|
|
196
|
-
Subagents
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
Read
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
**
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
Bundling keeps the install flow to one user-facing prompt per
|
|
229
|
-
spawn, even with multiple missing skills.
|
|
230
|
-
|
|
231
|
-
**Judgment criteria** (general-purpose vs project-specific):
|
|
232
|
-
|
|
233
|
-
- **General-purpose** (recommend global): well-known public
|
|
234
|
-
repos with broad patterns — e.g., `opensrc`, `tdd`,
|
|
235
|
-
`karpathy-guidelines`. One global install benefits all
|
|
236
|
-
projects.
|
|
237
|
-
- **Project-specific** (recommend local): defined in this
|
|
238
|
-
repo's own `.opencode/` or `apps/` tree, or that references
|
|
239
|
-
this project's specific tools/ADRs. Shouldn't leak to other
|
|
240
|
-
projects.
|
|
241
|
-
- **When uncertain, lean toward local** as the conservative
|
|
242
|
-
default — local is reversible, global is harder to undo.
|
|
243
|
-
|
|
244
|
-
On yes (or per-skill confirmation), the orchestrator runs the
|
|
245
|
-
install directly — **no `@builder` delegation**. Group by
|
|
246
|
-
source, one install command per source. For each source's
|
|
247
|
-
missing skills, the command is:
|
|
248
|
-
|
|
249
|
-
- Install (e.g., `npx --yes skills@latest add <source> --skill <name>... -y` for project, or with `-g` added for global — but always run `--help` first to confirm the current flag set)
|
|
250
|
-
|
|
251
|
-
**Get the current flag set** by running `npx --yes skills@latest
|
|
252
|
-
--help` before any install — the CLI is the source of truth. Flag
|
|
253
|
-
names and behavior can change between versions; this prompt does
|
|
254
|
-
not document them. The general pattern is
|
|
255
|
-
`npx --yes skills@latest add <source> [flags]` where `[flags]`
|
|
256
|
-
is whatever the help shows (typically a `--skill <name>` per
|
|
257
|
-
skill, `-y` for the CLI's auto-confirm, and `-g` only for
|
|
258
|
-
global installs).
|
|
259
|
-
|
|
260
|
-
This pattern is allow-listed in your `bash` permission, so the
|
|
261
|
-
install runs unattended. Run each source's install command,
|
|
262
|
-
await completion, then spawn the specialist.
|
|
263
|
-
|
|
264
|
-
On "n" (decline all), see `### Skip behavior` — spawn the
|
|
265
|
-
specialist anyway; the subagent flags the missing skills in its
|
|
266
|
-
handoff and the work degrades gracefully.
|
|
267
|
-
|
|
268
|
-
Include installed skill names in the delegation prompt so the
|
|
269
|
-
subagent loads them.
|
|
270
|
-
|
|
271
|
-
> **Why ask first:** Don't assume which skills the user wants
|
|
272
|
-
> installed, or where (global vs project). Read the subagent's
|
|
273
|
-
> directive to know what's needed, check each against global
|
|
274
|
-
> and project scope, and only prompt for the ones missing in
|
|
275
|
-
> both. Bundling the question keeps the flow to one prompt per
|
|
276
|
-
> spawn even with multiple skills.
|
|
277
|
-
|
|
278
|
-
### Reactive path
|
|
279
|
-
|
|
280
|
-
When a subagent's response includes a `pnpx skills add ...` suggestion
|
|
281
|
-
for a skill you did not install proactively, surface it via `question`.
|
|
282
|
-
Never install silently — every install is opt-in, including upgrades of
|
|
283
|
-
already-installed skills.
|
|
284
|
-
|
|
285
|
-
### Skip behavior
|
|
286
|
-
|
|
287
|
-
If the user declines an install prompt, you must spawn the subagent
|
|
288
|
-
anyway. The subagent flags the missing skill in its handoff and the
|
|
289
|
-
work degrades gracefully. Never re-ask about the same skill within the
|
|
290
|
-
same task.
|
|
291
|
-
|
|
292
|
-
### Permission constraint
|
|
293
|
-
|
|
294
|
-
You have `bash: deny` for general commands, but the skills CLI
|
|
295
|
-
is **allow-listed in your own `bash` permission**:
|
|
296
|
-
`npx --yes skills@latest *`. This pattern covers the install
|
|
297
|
-
command (`add ...`), `--help` (for self-documentation), and any
|
|
298
|
-
other subcommand of the `skills@latest` package. You run the
|
|
299
|
-
install directly after the user's `question` approval — no
|
|
300
|
-
`@builder` delegation. The user sees exactly one prompt per
|
|
301
|
-
install: your bundled `question`.
|
|
302
|
-
|
|
303
|
-
**Don't memorize the skills CLI flag set.** Before any install,
|
|
304
|
-
run `npx --yes skills@latest --help` to get the current flag
|
|
305
|
-
reference. Flag names and behavior can change between versions;
|
|
306
|
-
this prompt does not document them. The CLI is the source of
|
|
307
|
-
truth.
|
|
308
|
-
|
|
309
|
-
Skills can be installed at **global** (user-level) or
|
|
310
|
-
**project** (default) scope — the user chooses via your bundled
|
|
311
|
-
`question`. Do not delegate installs to `@builder` — the
|
|
312
|
-
permission system is set up for you to handle this directly,
|
|
313
|
-
and the delegation would add a hop with no benefit.
|
|
180
|
+
Subagents start with zero skills — the `task()` delegation prompt is the only conduit for skill loading.
|
|
181
|
+
|
|
182
|
+
### Proactive Path (Pre-Delegation)
|
|
183
|
+
|
|
184
|
+
Before EVERY `task()` call:
|
|
185
|
+
|
|
186
|
+
☐ **Read Skill Prescription** — identify `### Always load` skills, then `### Load on trigger` skills matching the task.
|
|
187
|
+
☐ **Verify availability** — run `skill` tool for each prescribed skill.
|
|
188
|
+
☐ **Install missing Always-load skills** — bundle by source into a single `question` with scope recommendation (general-purpose → global, project-specific → local, uncertain → local). On approval: `npx --yes skills@latest add <source> --skill <name>... -y` (add `-g` for global). Run `--help` first — don't memorize flags.
|
|
189
|
+
☐ **Include skill names in delegation prompt** — subagent loads them via `skill` tool.
|
|
190
|
+
☐ **Require acknowledgement in handoff** — missing acknowledgement means skills likely not loaded.
|
|
191
|
+
|
|
192
|
+
### Reactive Path (Mid-Task)
|
|
193
|
+
|
|
194
|
+
Subagent suggests a skill you didn't install? Surface via `question`. Never install silently.
|
|
195
|
+
|
|
196
|
+
### Guard Rails
|
|
197
|
+
|
|
198
|
+
- **Don't memorize flags** — run `npx --yes skills@latest --help` before every install.
|
|
199
|
+
- **Install directly** — `npx --yes skills@latest *` is allow-listed in your bash. Do NOT delegate to `@builder`.
|
|
200
|
+
|
|
201
|
+
### Skip Behavior
|
|
202
|
+
|
|
203
|
+
User declines installation? Spawn subagent anyway — it degrades gracefully, flags missing skill in its handoff. Never re-ask about the same skill within the same task.
|
|
204
|
+
|
|
205
|
+
### Project Skill Discovery
|
|
206
|
+
|
|
207
|
+
Before delegating, scan `<available_skills>` for skills matching the task that aren't in the subagent's prescription. Include them in the delegation prompt alongside the prescribed set.
|
|
208
|
+
|
|
209
|
+
### Miss Handling
|
|
210
|
+
|
|
211
|
+
If a subagent reports it can't find a skill, install it reactively and log the miss. Repeated misses mean the prescription needs updating.
|
|
314
212
|
|
|
315
213
|
## Human-in-the-Loop
|
|
316
214
|
|
|
215
|
+
**Always use the `question` tool when you need user input.** Do not
|
|
216
|
+
output questions as plain text — the `question` tool creates an
|
|
217
|
+
interactive prompt that pauses execution and waits for a response.
|
|
218
|
+
|
|
317
219
|
Propose actions and wait for approval for:
|
|
318
220
|
|
|
319
221
|
- Database migrations
|
|
320
222
|
- Production deployments
|
|
321
223
|
- Security changes
|
|
322
224
|
- Architecture decisions
|
|
225
|
+
- Ambiguity flags from subagents
|
|
226
|
+
- Any decision where the user's preference matters
|
|
227
|
+
|
|
228
|
+
**Exception:** Status updates and progress reports are text output,
|
|
229
|
+
not questions. Only use `question` when you need a response.
|
|
323
230
|
|
|
324
231
|
## Anti-Patterns
|
|
325
232
|
|
|
@@ -332,4 +239,4 @@ Propose actions and wait for approval for:
|
|
|
332
239
|
specialist fits. See CRITICAL RULE #7.
|
|
333
240
|
- **Auto-committing** — committing after every change without asking. A
|
|
334
241
|
prior "commit" instruction does not authorize future commits. See
|
|
335
|
-
|
|
242
|
+
CRITICAL RULE #3.
|
package/agents/reviewer.md
CHANGED
|
@@ -145,6 +145,7 @@ You review code for quality.
|
|
|
145
145
|
- `fixing-motion-performance` (`ibelick/ui-skills`) — load when reviewing animation (skip if non-UI)
|
|
146
146
|
- `logging-best-practices` (`boristane/agent-skills`) — load when code adds/uses logs
|
|
147
147
|
- `webapp-testing` (`anthropics/skills`) — load when reviewing tests
|
|
148
|
+
- `agent-browser` (`vercel-labs/agent-browser`) — load when reviewing UI changes, verifying visual fidelity, or testing interactive flows (skip if backend-only)
|
|
148
149
|
- `baseline-ui` (`ibelick/ui-skills`) — load when reviewing UI (skip if non-UI)
|
|
149
150
|
- `userinterface-wiki` (`raphaelsalaja/userinterface-wiki`) — load when reviewing UI (skip if non-UI)
|
|
150
151
|
|