@maestria/opencode 0.2.5 → 0.3.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/LICENSE +21 -0
- package/README.md +21 -0
- package/agents/architect.md +3 -0
- package/agents/builder.md +5 -1
- package/agents/diagnose.md +5 -1
- package/agents/orchestrator.md +32 -20
- package/package.json +9 -10
- package/rules/AGENTS.md +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agustinus Nathaniel
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -37,6 +37,27 @@ If you want to pin a specific version, you can also keep a `package.json` in you
|
|
|
37
37
|
4. **Agents available** — All 7 agents are available as subagents via `@` mention
|
|
38
38
|
5. **State preserved** — `session.compacting` hook preserves task status across compaction events
|
|
39
39
|
|
|
40
|
+
### Design Philosophy
|
|
41
|
+
|
|
42
|
+
This plugin is built on the **Harness Engineering** principle:
|
|
43
|
+
`Agent = Model + Harness`. The harness is what turns a raw LLM into a
|
|
44
|
+
reliable coding agent — the model is just one component.
|
|
45
|
+
|
|
46
|
+
The 6 harness components map directly to plugin features:
|
|
47
|
+
|
|
48
|
+
| Component | Plugin Mapping |
|
|
49
|
+
| ----------------- | --------------------------------------------- |
|
|
50
|
+
| **Instructions** | `rules/AGENTS.md` injected into every session |
|
|
51
|
+
| **Tools** | Skill prescription system + MCP integration |
|
|
52
|
+
| **Sandboxes** | `permission` frontmatter on every agent |
|
|
53
|
+
| **Orchestration** | `mode: all/subagent` + `task()` delegation |
|
|
54
|
+
| **Guardrails** | `edit: deny`, `bash: ask`, iteration limits |
|
|
55
|
+
| **Observability** | Session compaction hooks, structured handoffs |
|
|
56
|
+
|
|
57
|
+
Most agent failures are configuration failures, not model failures. The
|
|
58
|
+
plugin's agents are designed with this principle — precise rules, explicit
|
|
59
|
+
boundaries, and clear delegation chains over raw capability.
|
|
60
|
+
|
|
40
61
|
## Updating
|
|
41
62
|
|
|
42
63
|
OpenCode auto-updates plugins on restart. Or run:
|
package/agents/architect.md
CHANGED
|
@@ -133,6 +133,9 @@ After the ADR is written, your handoff should cover:
|
|
|
133
133
|
|
|
134
134
|
## Constraints
|
|
135
135
|
|
|
136
|
+
- **!!! Read the docs first** — before making recommendations, verify API
|
|
137
|
+
behavior and library capabilities against official documentation. Don't
|
|
138
|
+
guess at how a tool works.
|
|
136
139
|
- Don't assume — verify against official docs and references
|
|
137
140
|
- Don't oversimplify — acknowledge trade-offs honestly
|
|
138
141
|
- For irreversible decisions, recommend more conservative options
|
package/agents/builder.md
CHANGED
|
@@ -96,6 +96,7 @@ This reveals what actually requires heavy tools vs. what's simple.
|
|
|
96
96
|
- `vitest` (`antfu/skills`) — load when writing Vitest tests (skip if no tests)
|
|
97
97
|
- `vite` (`antfu/skills`) — load when modifying `vite.config` or build
|
|
98
98
|
- `pnpm` (`antfu/skills`) — load when changing `package.json`/lockfile
|
|
99
|
+
- `commit-work` (`softaworks/agent-toolkit`) — load when committing, staging changes, or crafting commit messages
|
|
99
100
|
- `writing-clearly-and-concisely` (`softaworks/agent-toolkit`) — load when writing a commit message
|
|
100
101
|
|
|
101
102
|
### Defer to specialist
|
|
@@ -118,6 +119,9 @@ This reveals what actually requires heavy tools vs. what's simple.
|
|
|
118
119
|
- Prefer `edit` over `write` — preserve existing code
|
|
119
120
|
- **!!! Run tests before claiming done**
|
|
120
121
|
- **!!! Never implement without reading the target files first**
|
|
122
|
+
- **!!! Read the docs first** — before writing code that uses unfamiliar
|
|
123
|
+
APIs, tools, or migration paths, consult official documentation. Don't
|
|
124
|
+
guess at API changes.
|
|
121
125
|
- If a change grows beyond the original task scope, flag it in your
|
|
122
126
|
handoff
|
|
123
127
|
- Keep the change focused — one concern per invocation
|
|
@@ -134,7 +138,7 @@ This reveals what actually requires heavy tools vs. what's simple.
|
|
|
134
138
|
unrelated code in your own diff. The task is to make focused
|
|
135
139
|
changes; collateral deletions are a trust killer.
|
|
136
140
|
(From my-base's #1 implicit rule.)
|
|
137
|
-
- **!!! Validate before handoff** — never present a change you haven'
|
|
141
|
+
- **!!! Validate before handoff** — never present a change you haven't
|
|
138
142
|
tested. Run `npm test*` / `pnpm test*` / `npx tsc*` per the bash
|
|
139
143
|
allow-list. Run the existing test suite, confirm the diff is focused.
|
|
140
144
|
- **!!! If anything is unclear or ambiguous, flag it in your handoff** —
|
package/agents/diagnose.md
CHANGED
|
@@ -105,6 +105,7 @@ Confirm it works:
|
|
|
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
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)
|
|
108
|
+
- `dependency-updater` (`softaworks/agent-toolkit`) — load when investigating dependency-related bugs, lockfile issues, or version conflicts
|
|
108
109
|
- `zoom-out` (`mattpocock/skills`) — load when regression spans >1 module
|
|
109
110
|
|
|
110
111
|
### Defer to specialist
|
|
@@ -132,7 +133,9 @@ Document findings at each step:
|
|
|
132
133
|
- Prevention measures
|
|
133
134
|
- **Open questions for orchestrator** — what is still unclear, what assumptions you made
|
|
134
135
|
|
|
135
|
-
Save
|
|
136
|
+
**!!! Save your findings as persistent knowledge artifacts** — don't let
|
|
137
|
+
diagnostic work disappear after the session ends. Create a markdown file
|
|
138
|
+
or use `@writer` to store the investigation record for future reference.
|
|
136
139
|
|
|
137
140
|
## Iteration Limits
|
|
138
141
|
|
|
@@ -142,6 +145,7 @@ Save these as knowledge artifacts so they can be referenced later.
|
|
|
142
145
|
|
|
143
146
|
## Rules
|
|
144
147
|
|
|
148
|
+
- **!!! Document your diagnostic work as persistent knowledge artifacts** — save what you investigated, ruled out, root cause, and fix applied. Don't let findings disappear when the session ends. Use `@writer` or a markdown file if no knowledge base exists yet.
|
|
145
149
|
- **!!! Edit and bash permissions are `ask`** — explain why before any change
|
|
146
150
|
- **!!! Always verify before handoff** — Never present broken code
|
|
147
151
|
- **!!! Maker/checker split** — your work is reviewed by `@reviewer` before it lands. The model that wrote the fix is too nice grading its own homework. Apply the fix, do not QA it.
|
package/agents/orchestrator.md
CHANGED
|
@@ -177,26 +177,38 @@ Examples:
|
|
|
177
177
|
|
|
178
178
|
## Skills for Subagents
|
|
179
179
|
|
|
180
|
-
Subagents
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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.
|
|
200
212
|
|
|
201
213
|
## Human-in-the-Loop
|
|
202
214
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maestria/opencode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "OpenCode plugin encoding AI engineering praxis: rules, agents, and workflow discipline.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -37,20 +37,19 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"build": "tsc",
|
|
42
|
-
"test": "vp test",
|
|
43
|
-
"prepublishOnly": "npm run build"
|
|
44
|
-
},
|
|
45
40
|
"dependencies": {
|
|
46
41
|
"@opencode-ai/plugin": "^1.17.0"
|
|
47
42
|
},
|
|
48
43
|
"devDependencies": {
|
|
49
|
-
"@types/node": "
|
|
50
|
-
"commit-and-tag-version": "
|
|
51
|
-
"typescript": "
|
|
44
|
+
"@types/node": "^24",
|
|
45
|
+
"commit-and-tag-version": "^12.7.3",
|
|
46
|
+
"typescript": "^5"
|
|
52
47
|
},
|
|
53
48
|
"engines": {
|
|
54
49
|
"node": ">=22.12.0"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsc",
|
|
53
|
+
"test": "vp test"
|
|
55
54
|
}
|
|
56
|
-
}
|
|
55
|
+
}
|
package/rules/AGENTS.md
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
- **!!! Don't assume** — verify against actual code and docs.
|
|
6
6
|
Guesses lead to bugs.
|
|
7
|
+
- **!!! Read the docs first** — before writing code that touches
|
|
8
|
+
unfamiliar tools, APIs, or migration paths, consult official
|
|
9
|
+
documentation. Don't guess at API changes. This rule is scar
|
|
10
|
+
tissue from repeated failures, not a preference.
|
|
7
11
|
- **Don't reference internal project names in explanations** — avoid
|
|
8
12
|
leaking context outside the workspace.
|
|
9
13
|
- **Use `opensrc` for repos; `webfetch` for pages** — when analyzing a
|