opencode-gbuild 0.9.0 → 0.9.1

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/README.md CHANGED
@@ -73,8 +73,8 @@ The npm package is published from this directory:
73
73
  One translation note: OpenCode plugins can't register agents, so where the Claude plugin spawns its
74
74
  bundled `gbuild-implementer`/`gbuild-reviewer`/`gbuild-auditor` agents, the OpenCode skills dispatch the
75
75
  built-in `general` subagent instead. For the implementer and reviewer the prompt is run's dispatch
76
- prompt as written, prefixed with `Read <Agent file> and follow it.`, where `<Agent file>` is the
77
- prompt's own `Agent file:` path; the auditor gets `Read <plugin>/agents/gbuild-auditor.md and follow
76
+ prompt with its `Agent file: <path>.` field moved to the front as `Read <path> and follow it.`, so the
77
+ path appears once; the auditor gets `Read <plugin>/agents/gbuild-auditor.md and follow
78
78
  it.` followed by exactly what the review skill passes it. The agent's text is never pasted into the
79
79
  prompt. The review is still a fresh, isolated agent — never the implementer.
80
80
 
@@ -9,7 +9,8 @@ You are implementing one gbuild node. Your prompt is a single line of paths:
9
9
  gbuild node `<slug>`. Store: <DB>. Worktree: <worktree>. Feature branch: <BRANCH>. Agent file: <plugin>/agents/gbuild-implementer.md.
10
10
  ```
11
11
 
12
- On OpenCode the prompt starts with `Read <agent file> and follow it.`, followed by that line.
12
+ On OpenCode the `Agent file:` field moves to the front instead: the prompt starts with
13
+ `Read <agent file> and follow it.`, followed by that line without its `Agent file:` field.
13
14
 
14
15
  Everything else — the node's title, type, acceptance, inputs, outputs, the failed criteria of a
15
16
  previous attempt, and notes left by earlier agents — is in the store, and you read it yourself. The
@@ -19,7 +20,8 @@ bullet. Do the work for real, and make the result file honest.
19
20
 
20
21
  ## PATHS
21
22
 
22
- - `<plugin>` — the agent-file path from your prompt minus `/agents/gbuild-implementer.md` (the
23
+ - `<plugin>` — the agent-file path from your prompt (the `Agent file:` field, or the path in the
24
+ `Read … and follow it.` sentence on OpenCode) minus `/agents/gbuild-implementer.md` (the
23
25
  directory two levels above this file). Every script below is in `<plugin>/cypher/`. Always derive it
24
26
  from the prompt; no plugin-root environment variable is set for you.
25
27
  - `<feature>` — the path segment right before `/db` in `<DB>` (`…/gbuild/<feature>/db`).
@@ -20,9 +20,11 @@ Your prompt is one line of paths and nothing else:
20
20
  gbuild node `<slug>`. Store: <DB>. Worktree: <worktree>. Feature branch: <BRANCH>. Agent file: <plugin>/agents/gbuild-reviewer.md.
21
21
  ```
22
22
 
23
- On OpenCode the prompt starts with `Read <agent file> and follow it.`, followed by that line.
23
+ On OpenCode the `Agent file:` field moves to the front instead: the prompt starts with
24
+ `Read <agent file> and follow it.`, followed by that line without its `Agent file:` field.
24
25
 
25
- `<plugin>` is the directory two levels above the agent-file path (the path minus
26
+ `<plugin>` is the directory two levels above the agent-file path — the `Agent file:` field, or the
27
+ path in the `Read … and follow it.` sentence on OpenCode (the path minus
26
28
  `/agents/gbuild-reviewer.md`). Never rely on `${CLAUDE_PLUGIN_ROOT}` here; derive it from the path.
27
29
  `<INBOX>` is the inbox directory beside `<DB>`: the `<DB>` path with its trailing `/db` replaced by
28
30
  `/inbox`. You fetch everything else yourself, in this order:
package/index.ts CHANGED
@@ -38,8 +38,8 @@ instructions above:
38
38
  registered agents here. When the instructions say to spawn one, dispatch the
39
39
  built-in \`general\` subagent instead:
40
40
  - \`gbuild-implementer\` / \`gbuild-reviewer\`: the prompt is run's dispatch
41
- template as written, prefixed with \`Read <Agent file> and follow it.\`,
42
- where \`<Agent file>\` is the template's own \`Agent file:\` path
41
+ template with its closing \`Agent file: <path>.\` field moved to the front
42
+ as \`Read <path> and follow it.\` — the path appears once
43
43
  (\`${join(root, "agents", "gbuild-implementer.md")}\` /
44
44
  \`${join(root, "agents", "gbuild-reviewer.md")}\`).
45
45
  - \`gbuild-auditor\`: send
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "opencode-gbuild",
4
- "version": "0.9.0",
4
+ "version": "0.9.1",
5
5
  "description": "OpenCode plugin for gbuild — graph-native task planning and execution with concurrent fan-out, per-node review, and durable checkpoints.",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -30,7 +30,11 @@ fails means revise the graph (with Cypher), not add a caveat in prose.
30
30
  `retry` everywhere without thinking about it.
31
31
  12. **`model_tier` is `strong` only where judgement, not throughput, is the bottleneck** — see
32
32
  `reference/cost-model.md`.
33
- 13. **The graph, run end to end with every node passing review, actually reaches `destination`.** Read
33
+ 13. **No `research`, `decision` or `verify` node's acceptance requires a file change.** Those nodes edit
34
+ no files (`graph-format.md`); an ADR, doc or other file a decision implies belongs to a `code` node
35
+ reading the decision's outputs. `validate.cypher` can't see this — acceptance is free text — so check
36
+ each one.
37
+ 14. **The graph, run end to end with every node passing review, actually reaches `destination`.** Read
34
38
  the `Feature` node's `destination` property back against the node set: if every node completed, is
35
39
  the feature actually done? A graph that's internally consistent but doesn't add up to the
36
40
  destination is still wrong.
@@ -88,13 +88,19 @@ serves is `SATISFIES` edges, not a property.
88
88
 
89
89
  | type | label | produces |
90
90
  | ---------- | ---------- | -------------------------------------------------------------------- |
91
- | `research` | `Research` | findings — an answer to a question, cited |
92
- | `decision` | `Decision` | a choice made and recorded, with the alternatives it ruled out |
91
+ | `research` | `Research` | findings — an answer to a question, cited, as output values |
92
+ | `decision` | `Decision` | a choice and the alternatives it ruled out, as output values |
93
93
  | `code` | `Code` | a coherent, reviewable change, committed |
94
94
  | `test` | `Test` | coverage for behavior a `code` node landed, when genuinely separable |
95
95
  | `verify` | `Verify` | a check on another node's output — never the same agent, never self |
96
96
  | `chore` | `Chore` | mechanical work with no behavior change |
97
97
 
98
+ **`research`, `decision` and `verify` nodes edit no files.** They get no worktree of their own — `run`
99
+ gives them the feature worktree read-only — and deliver only through their `OUTPUT` values. When a
100
+ choice or a finding must also land in the repo (an ADR, a doc), chart a `code` node that reads those
101
+ outputs through `FROM` and commits the file. A `chore` would fail `orphan-chore` unless something
102
+ depends on it.
103
+
98
104
  **`acceptance` must be concrete** — checkable by a fresh context with no other information. Not
99
105
  "looks correct" or "works well": name a file, a command's exit code, a specific behavior, or a literal
100
106
  output value.
@@ -117,6 +117,9 @@ For each GbuildNode decide (full model in `graph-format.md`):
117
117
 
118
118
  - `slug` — kebab-case, immutable; what skills and the store key on. `title` — what the user reads.
119
119
  - `type` — `research | decision | code | test | verify | chore`, plus the matching PascalCase label.
120
+ `research`, `decision` and `verify` nodes get no worktree and edit no files — they deliver through
121
+ their `OUTPUT` values only. Anything that must land in the repo (an ADR, a doc, a config file) belongs
122
+ to a `code` node that reads those outputs through `FROM`.
120
123
  - **`OUTPUT` fields** — every node declares at least one, each with a precise `shape`
121
124
  (`<integer>`, `<list of changed file paths>`, `<commit sha>`). Values will be scalars or lists of
122
125
  scalars; for anything nested, the shape says it is a JSON-encoded string.