@maestria/opencode 0.3.6 → 0.3.7

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.
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Codebase reconnaissance agent for deep code understanding.
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
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Architecture decisions using decision matrices and ADRs.
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
package/agents/builder.md CHANGED
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Focused implementation agent for atomic tasks.
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
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Systematic 6-step regression tracing.
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
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Manager agent for complex multi-step tasks.
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
package/agents/planner.md CHANGED
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Create detailed implementation plans with phased dependencies, timelines, and success criteria.
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
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Code review with quality gates.
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.
package/agents/writer.md CHANGED
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Documentation writing following structured patterns.
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
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
- * Parse a simple YAML frontmatter block. Handles:
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.6",
3
+ "version": "0.3.7",
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",