@maestria/opencode 0.2.4 → 0.2.5

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.
@@ -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
 
@@ -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-frnd)
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
@@ -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
@@ -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. **!!! Never commit without explicit user request in the current turn**
46
- commit and push only when the user explicitly asks in this turn. A
47
- previous "commit" instruction does NOT carry forward — each commit
48
- is a fresh request. Delegate `git add` + `git commit` to `@builder`
49
- (its `*`: ask bash permission is the second gate, by design
50
- double-gated, not redundant). Run `vp check` and `vp test` via
51
- `@builder` before the commit lands. See the **Commit & Push
52
- Discipline** subsection below.
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 **Specialist Selection** section below.
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")` +
@@ -194,132 +178,43 @@ Examples:
194
178
  ## Skills for Subagents
195
179
 
196
180
  Subagents prescribe skills via a `### Always load` bucket in their
197
- frontmatter (Phases 2-4 introduce the format; the orchestrator adopts
198
- this behavior now). You own every install path.
199
-
200
- ### Proactive path
201
-
202
- Read the dispatched subagent's `## Skill Prescription` and pull the
203
- skills from `### Always load` (and any `### Load on trigger` whose
204
- trigger condition clearly applies to this task). For each skill,
205
- check via the `skill` tool whether it is already available in
206
- **global** or **project** scope. If available in either, note it
207
- and proceed no install needed.
208
-
209
- For every skill missing in BOTH scopes, prepare a **bundled**
210
- question (one prompt for all missing skills, grouped by source)
211
- and ask the user via `question`:
212
-
213
- > "Specialist @X needs these skills (not in global or project):
214
- >
215
- > - From `vercel-labs/opensrc`: **opensrc** (general-purpose:
216
- > well-known public repo — recommend **global**)
217
- > - From `mattpocock/skills`: **tdd**
218
- > (general-purpose — recommend **global**)
219
- > - From `multica-ai/andrej-karpathy-skills`: **karpathy-guidelines**
220
- > (general-purpose — recommend **global**)
221
- > - From `anthropics/skills`: **frontend-design** (project-
222
- > specific to this repo's tooling — recommend **local**)
223
- >
224
- > Install as recommended? [Y/n / specify per-skill scope]"
225
-
226
- The user can answer in one go, mixing scopes (e.g., "A globally,
227
- B locally, C globally" overrides the recommendation for B).
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.
181
+ Skill Prescription. You own every install path. Condensed algorithm:
182
+
183
+ 1. Read the dispatched subagent's `### Always load` and applicable
184
+ `### Load on trigger` skills
185
+ 2. Check each via the `skill` tool — is it available in global or
186
+ project scope?
187
+ 3. Bundle missing skills by source into a single `question` prompt,
188
+ recommending global vs. local scope (general-purpose global,
189
+ project-specific local, uncertain local)
190
+ 4. On user approval: install each source's missing skills via
191
+ `npx --yes skills@latest add <source> --skill <name>... -y` (add
192
+ `-g` for global). Run `--help` first to confirm current flags.
193
+ Include installed skill names in the delegation prompt so the
194
+ subagent loads them.
195
+ 5. On user decline: spawn subagent anyway — it degrades gracefully.
196
+ Never re-ask about the same skill within the same task.
197
+ 6. Reactive: if a subagent's output suggests a `pnpx skills add ...`
198
+ for an uninstalled skill, surface via `question`. Never install
199
+ silently.
314
200
 
315
201
  ## Human-in-the-Loop
316
202
 
203
+ **Always use the `question` tool when you need user input.** Do not
204
+ output questions as plain text — the `question` tool creates an
205
+ interactive prompt that pauses execution and waits for a response.
206
+
317
207
  Propose actions and wait for approval for:
318
208
 
319
209
  - Database migrations
320
210
  - Production deployments
321
211
  - Security changes
322
212
  - Architecture decisions
213
+ - Ambiguity flags from subagents
214
+ - Any decision where the user's preference matters
215
+
216
+ **Exception:** Status updates and progress reports are text output,
217
+ not questions. Only use `question` when you need a response.
323
218
 
324
219
  ## Anti-Patterns
325
220
 
@@ -332,4 +227,4 @@ Propose actions and wait for approval for:
332
227
  specialist fits. See CRITICAL RULE #7.
333
228
  - **Auto-committing** — committing after every change without asking. A
334
229
  prior "commit" instruction does not authorize future commits. See
335
- the **Commit & Push Discipline** subsection above.
230
+ CRITICAL RULE #3.
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maestria/opencode",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "OpenCode plugin encoding AI engineering praxis: rules, agents, and workflow discipline.",
5
5
  "keywords": [
6
6
  "agents",