@maestria/opencode 0.3.6 → 0.3.8
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 +4 -1
- package/agents/architect.md +5 -1
- package/agents/builder.md +3 -1
- package/agents/diagnose.md +3 -1
- package/agents/orchestrator.md +5 -1
- package/agents/planner.md +3 -1
- package/agents/reviewer.md +3 -1
- package/agents/writer.md +6 -1
- package/dist/index.js +3 -96
- package/package.json +3 -2
package/agents/adventurer.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: >
|
|
3
|
+
Codebase reconnaissance agent for deep code understanding.
|
|
3
4
|
Maps unknown territory — traces call chains, maps module relationships,
|
|
4
5
|
generates structured reports for downstream specialists.
|
|
5
6
|
Use for: understanding unfamiliar code, tracing dependencies, gathering
|
|
@@ -13,11 +14,13 @@ permission:
|
|
|
13
14
|
lsp: allow
|
|
14
15
|
webfetch: allow
|
|
15
16
|
skill: allow
|
|
17
|
+
todowrite: allow
|
|
16
18
|
edit: deny
|
|
17
19
|
bash:
|
|
18
20
|
"*": ask
|
|
19
21
|
"git log*": allow
|
|
20
22
|
"git diff*": allow
|
|
23
|
+
"git status*": allow
|
|
21
24
|
"which *": allow
|
|
22
25
|
---
|
|
23
26
|
|
package/agents/architect.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: >
|
|
3
|
+
Architecture decisions using decision matrices and ADRs.
|
|
3
4
|
Evaluates options with weighted criteria, clarifies business context first.
|
|
4
5
|
Use for: technology choices, implementation approaches, trade-off analysis.
|
|
5
6
|
mode: subagent
|
|
@@ -13,6 +14,9 @@ permission:
|
|
|
13
14
|
edit: deny
|
|
14
15
|
bash:
|
|
15
16
|
"*": ask
|
|
17
|
+
"git diff*": allow
|
|
18
|
+
"git log*": allow
|
|
19
|
+
"git status*": allow
|
|
16
20
|
"which *": allow
|
|
17
21
|
"npm view *": allow
|
|
18
22
|
---
|
package/agents/builder.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: >
|
|
3
|
+
Focused implementation agent for atomic tasks.
|
|
3
4
|
Executes one verifiable unit of work with minimal context.
|
|
4
5
|
Use for: targeted fixes, feature implementation, refactors, adding tests.
|
|
5
6
|
mode: subagent
|
|
@@ -20,6 +21,7 @@ permission:
|
|
|
20
21
|
"npm test*": allow
|
|
21
22
|
"pnpm test*": allow
|
|
22
23
|
"npx tsc*": allow
|
|
24
|
+
"npm view *": allow
|
|
23
25
|
---
|
|
24
26
|
|
|
25
27
|
You are a focused implementation agent.
|
package/agents/diagnose.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: >
|
|
3
|
+
Systematic 6-step regression tracing.
|
|
3
4
|
From error message to root cause to prevention.
|
|
4
5
|
Use for: cryptic errors, regressions, production bugs.
|
|
5
6
|
mode: subagent
|
|
@@ -10,6 +11,7 @@ permission:
|
|
|
10
11
|
lsp: allow
|
|
11
12
|
webfetch: allow
|
|
12
13
|
skill: allow
|
|
14
|
+
todowrite: allow
|
|
13
15
|
edit: ask
|
|
14
16
|
bash:
|
|
15
17
|
"*": ask
|
package/agents/orchestrator.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: >
|
|
3
|
+
Manager agent for complex multi-step tasks.
|
|
3
4
|
Breaks down work, delegates to specialists, integrates results.
|
|
4
5
|
Use for: multi-file features, cross-domain tasks, 3+ step workflows.
|
|
5
6
|
mode: all
|
|
@@ -15,6 +16,9 @@ permission:
|
|
|
15
16
|
"git status*": allow
|
|
16
17
|
"git diff*": allow
|
|
17
18
|
"git log*": allow
|
|
19
|
+
"git show*": allow
|
|
20
|
+
"git branch*": allow
|
|
21
|
+
"ls *": allow
|
|
18
22
|
"which *": allow
|
|
19
23
|
"pwd": allow
|
|
20
24
|
"npx --yes skills@latest *": allow
|
package/agents/planner.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: >
|
|
3
|
+
Create detailed implementation plans with phased dependencies, timelines, and success criteria.
|
|
3
4
|
Breaks down complex features into verifiable milestones.
|
|
4
5
|
Use for: complex features requiring multi-phase execution, when the plan needs review before building.
|
|
5
6
|
mode: subagent
|
|
@@ -14,6 +15,7 @@ permission:
|
|
|
14
15
|
"git status*": allow
|
|
15
16
|
"git diff*": allow
|
|
16
17
|
"git log*": allow
|
|
18
|
+
"which *": allow
|
|
17
19
|
webfetch: allow
|
|
18
20
|
todowrite: allow
|
|
19
21
|
skill: allow
|
package/agents/reviewer.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: >
|
|
3
|
+
Code review with quality gates.
|
|
3
4
|
Reviews code for correctness, edge cases, security, performance, maintainability,
|
|
4
5
|
and adherence to conventions. Provides specific, actionable feedback.
|
|
5
6
|
Use for: PR review, pre-commit review, architecture document review.
|
|
@@ -16,6 +17,7 @@ permission:
|
|
|
16
17
|
"git status*": allow
|
|
17
18
|
"git diff*": allow
|
|
18
19
|
"git log*": allow
|
|
20
|
+
"git show*": allow
|
|
19
21
|
webfetch: allow
|
|
20
22
|
---
|
|
21
23
|
|
package/agents/writer.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: >
|
|
3
|
+
Documentation writing following structured patterns.
|
|
3
4
|
Creates clear, comprehensive docs for code, APIs, systems.
|
|
4
5
|
Use for: README files, API docs, architecture docs, changelogs, decision records.
|
|
5
6
|
mode: subagent
|
|
@@ -7,12 +8,16 @@ permission:
|
|
|
7
8
|
read: allow
|
|
8
9
|
glob: allow
|
|
9
10
|
grep: allow
|
|
11
|
+
lsp: allow
|
|
10
12
|
edit: allow
|
|
11
13
|
webfetch: allow
|
|
12
14
|
skill: allow
|
|
15
|
+
todowrite: allow
|
|
13
16
|
bash:
|
|
14
17
|
"*": ask
|
|
15
18
|
"git status*": allow
|
|
19
|
+
"git diff*": allow
|
|
20
|
+
"git log*": allow
|
|
16
21
|
"npm view *": allow
|
|
17
22
|
---
|
|
18
23
|
|
package/dist/index.js
CHANGED
|
@@ -1,105 +1,12 @@
|
|
|
1
1
|
import { readFileSync, readdirSync } from "fs";
|
|
2
2
|
import { join, dirname, basename } from "path";
|
|
3
|
+
import { parse as parseYaml } from "yaml";
|
|
3
4
|
import { fileURLToPath } from "url";
|
|
4
5
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
5
6
|
const agentsDir = join(__dirname, "..", "agents");
|
|
6
7
|
const rulesPath = join(__dirname, "..", "rules", "AGENTS.md");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* - string values ("allow", "ask", "deny")
|
|
10
|
-
* - nested objects (bash: { "*": "ask" })
|
|
11
|
-
* - multiline strings (description)
|
|
12
|
-
*/
|
|
13
|
-
function parseFrontmatter(yaml) {
|
|
14
|
-
const lines = yaml.split("\n");
|
|
15
|
-
const result = {};
|
|
16
|
-
let currentKey = null;
|
|
17
|
-
let currentValue = [];
|
|
18
|
-
let nestedStack = [];
|
|
19
|
-
function flushValue() {
|
|
20
|
-
if (currentKey === null)
|
|
21
|
-
return;
|
|
22
|
-
const value = currentValue.join(" ").trim();
|
|
23
|
-
if (value) {
|
|
24
|
-
if (nestedStack.length > 0) {
|
|
25
|
-
nestedStack[nestedStack.length - 1].obj[currentKey] = value;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
result[currentKey] = value;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
currentKey = null;
|
|
32
|
-
currentValue = [];
|
|
33
|
-
}
|
|
34
|
-
function getIndent(line) {
|
|
35
|
-
let count = 0;
|
|
36
|
-
for (const ch of line) {
|
|
37
|
-
if (ch === " " || ch === "\t")
|
|
38
|
-
count++;
|
|
39
|
-
else
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
return count;
|
|
43
|
-
}
|
|
44
|
-
function parseKeyValue(line) {
|
|
45
|
-
const colonIdx = line.indexOf(":");
|
|
46
|
-
if (colonIdx === -1)
|
|
47
|
-
return null;
|
|
48
|
-
const key = line.slice(0, colonIdx).trim();
|
|
49
|
-
const value = line.slice(colonIdx + 1).trim();
|
|
50
|
-
return { key, value };
|
|
51
|
-
}
|
|
52
|
-
for (let i = 0; i < lines.length; i++) {
|
|
53
|
-
const line = lines[i];
|
|
54
|
-
const indent = getIndent(line);
|
|
55
|
-
const trimmed = line.trim();
|
|
56
|
-
if (!trimmed || trimmed.startsWith("#"))
|
|
57
|
-
continue;
|
|
58
|
-
const kv = parseKeyValue(line);
|
|
59
|
-
// Pop nested stacks that have ended
|
|
60
|
-
while (nestedStack.length > 0 && indent <= nestedStack[nestedStack.length - 1].indent) {
|
|
61
|
-
flushValue();
|
|
62
|
-
nestedStack.pop();
|
|
63
|
-
}
|
|
64
|
-
if (kv) {
|
|
65
|
-
flushValue();
|
|
66
|
-
currentKey = kv.key;
|
|
67
|
-
if (kv.value) {
|
|
68
|
-
// Inline value: key: value
|
|
69
|
-
if (nestedStack.length > 0) {
|
|
70
|
-
nestedStack[nestedStack.length - 1].obj[currentKey] = kv.value;
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
result[currentKey] = kv.value;
|
|
74
|
-
}
|
|
75
|
-
currentKey = null;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
// Potential nested object: key:
|
|
79
|
-
// Check next line for indentation
|
|
80
|
-
const nextLine = lines[i + 1];
|
|
81
|
-
if (nextLine && getIndent(nextLine) > indent) {
|
|
82
|
-
const nestedObj = {};
|
|
83
|
-
if (nestedStack.length > 0) {
|
|
84
|
-
nestedStack[nestedStack.length - 1].obj[currentKey] = nestedObj;
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
result[currentKey] = nestedObj;
|
|
88
|
-
}
|
|
89
|
-
nestedStack.push({ key: currentKey, obj: nestedObj, indent });
|
|
90
|
-
currentKey = null;
|
|
91
|
-
}
|
|
92
|
-
// Otherwise it's an empty value, ignore
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
// Continuation line (for multiline strings like description)
|
|
97
|
-
if (currentKey && indent > 0) {
|
|
98
|
-
currentValue.push(trimmed);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
flushValue();
|
|
8
|
+
function parseFrontmatter(yamlStr) {
|
|
9
|
+
const result = parseYaml(yamlStr);
|
|
103
10
|
return {
|
|
104
11
|
description: result.description || "",
|
|
105
12
|
mode: result.mode || "subagent",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maestria/opencode",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "OpenCode plugin encoding AI engineering praxis: rules, agents, and workflow discipline.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"provenance": true
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@opencode-ai/plugin": "^1.17.0"
|
|
42
|
+
"@opencode-ai/plugin": "^1.17.0",
|
|
43
|
+
"yaml": "^2.7.0"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@types/node": "^24",
|