@osovv/vv-opencode 0.9.1 → 0.11.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/README.md +248 -205
- package/dist/commands/agent.js +11 -14
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/completion.js +3 -2
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/init.js +7 -7
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.js +6 -6
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/sync.js +6 -6
- package/dist/commands/sync.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/managed-agents.d.ts +17 -1
- package/dist/lib/managed-agents.js +49 -4
- package/dist/lib/managed-agents.js.map +1 -1
- package/dist/lib/opencode.d.ts +6 -6
- package/dist/lib/opencode.js +32 -31
- package/dist/lib/opencode.js.map +1 -1
- package/package.json +2 -2
- package/templates/agents/enhancer.md +95 -0
package/README.md
CHANGED
|
@@ -1,221 +1,278 @@
|
|
|
1
1
|
# @osovv/vv-opencode
|
|
2
2
|
|
|
3
|
-
Portable OpenCode workflow package with plugins and a Bun CLI for
|
|
3
|
+
Portable OpenCode workflow package with plugins and a Bun CLI for setup, sync, diagnostics, and explicit memory.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## What You Get
|
|
6
6
|
|
|
7
|
+
- `vvoc` CLI for bootstrap, sync, inspection, and model overrides
|
|
7
8
|
- `GuardianPlugin` for permission review
|
|
8
9
|
- `MemoryPlugin` for explicit persistent memory
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- `GuardianPlugin`
|
|
20
|
-
- `MemoryPlugin`
|
|
21
|
-
- CLI commands:
|
|
22
|
-
- `agent`
|
|
23
|
-
- `completion`
|
|
24
|
-
- `config`
|
|
25
|
-
- `init`
|
|
26
|
-
- `install`
|
|
27
|
-
- `path-provider`
|
|
28
|
-
- `plugin`
|
|
29
|
-
- `sync`
|
|
30
|
-
- `status`
|
|
31
|
-
- `doctor`
|
|
32
|
-
- `guardian`
|
|
33
|
-
- `upgrade`
|
|
34
|
-
- `version`
|
|
35
|
-
|
|
36
|
-
## Installation
|
|
37
|
-
|
|
38
|
-
Install into the current project:
|
|
10
|
+
- `SecretsRedactionPlugin` for redacting secrets before LLM requests
|
|
11
|
+
- report-only `memory-reviewer` subagent
|
|
12
|
+
- vvoc-managed prompt files and OpenCode agent registrations
|
|
13
|
+
- managed primary agent `enhancer` for meta-prompting raw intent into structured XML
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
Examples below use `vvoc` directly.
|
|
18
|
+
|
|
19
|
+
Install the package:
|
|
39
20
|
|
|
40
21
|
```bash
|
|
41
|
-
bun add @osovv/vv-opencode
|
|
22
|
+
bun add -g @osovv/vv-opencode
|
|
42
23
|
```
|
|
43
24
|
|
|
44
|
-
|
|
25
|
+
Bootstrap the default global setup:
|
|
45
26
|
|
|
46
27
|
```bash
|
|
47
|
-
vvoc
|
|
28
|
+
vvoc install
|
|
48
29
|
```
|
|
49
30
|
|
|
50
|
-
|
|
31
|
+
Inspect the result:
|
|
51
32
|
|
|
52
|
-
|
|
33
|
+
```bash
|
|
34
|
+
vvoc status
|
|
35
|
+
```
|
|
53
36
|
|
|
54
|
-
|
|
37
|
+
Use project-local scope instead of global scope:
|
|
55
38
|
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
"$schema": "https://opencode.ai/config.json",
|
|
59
|
-
"plugin": ["@osovv/vv-opencode@<installed-version>"]
|
|
60
|
-
}
|
|
39
|
+
```bash
|
|
40
|
+
vvoc install --scope project
|
|
61
41
|
```
|
|
62
42
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
`vvoc install` writes this pinned package specifier automatically and avoids stale `latest` plugin cache behavior inside OpenCode.
|
|
43
|
+
`vvoc install` does the following:
|
|
66
44
|
|
|
67
|
-
|
|
45
|
+
- adds a pinned `@osovv/vv-opencode@<installed-version>` entry to the OpenCode `plugin` array
|
|
46
|
+
- registers vvoc-managed OpenCode agents, including the primary `enhancer` agent
|
|
47
|
+
- creates managed prompt files under `vvoc/agents/` when missing
|
|
48
|
+
- creates `guardian.jsonc`, `memory.jsonc`, and `secrets-redaction.config.json` when missing
|
|
49
|
+
- keeps vvoc-managed config separate from native OpenCode config
|
|
50
|
+
- leaves unmanaged files alone unless `--force` is passed
|
|
68
51
|
|
|
69
|
-
|
|
52
|
+
For conversational meta-prompting, use the managed `enhancer` primary agent. It can ask follow-up questions and then return a clean XML prompt with semantically unique repeated tags such as `<constraint-1>...</constraint-1>` and `<verification-check-2>...</verification-check-2>`.
|
|
70
53
|
|
|
71
|
-
|
|
72
|
-
- project: `./opencode.json` or `./opencode.jsonc`
|
|
54
|
+
Typical workflow:
|
|
73
55
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
56
|
+
```text
|
|
57
|
+
1. Start a fresh session with the enhancer agent
|
|
58
|
+
2. Paste the rough request in plain language
|
|
59
|
+
3. Answer any short follow-up questions
|
|
60
|
+
4. Copy the final XML prompt into the execution session
|
|
61
|
+
```
|
|
80
62
|
|
|
81
|
-
|
|
63
|
+
The OpenCode config entry written by `install` looks like this:
|
|
82
64
|
|
|
83
|
-
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"$schema": "https://opencode.ai/config.json",
|
|
68
|
+
"plugin": ["@osovv/vv-opencode@<installed-version>"]
|
|
69
|
+
}
|
|
70
|
+
```
|
|
84
71
|
|
|
85
|
-
|
|
86
|
-
- project Guardian config: `./.vvoc/guardian.jsonc`
|
|
87
|
-
- project-local memory data: `~/.local/share/vvoc/projects/<project-id>/memory/`
|
|
88
|
-
- global shared memory data: `~/.local/share/vvoc/memory/shared/<namespace>/`
|
|
89
|
-
- project memory settings: `./.vvoc/memory.jsonc`
|
|
90
|
-
- global managed agent prompts: `~/.config/vvoc/agents/*.md`
|
|
91
|
-
- project managed agent prompts: `./.vvoc/agents/*.md`
|
|
72
|
+
That package entry points at the package root, which exports `GuardianPlugin`, `MemoryPlugin`, and `SecretsRedactionPlugin`.
|
|
92
73
|
|
|
93
|
-
|
|
74
|
+
## Common Workflows
|
|
94
75
|
|
|
95
|
-
|
|
76
|
+
### Interactive Bootstrap
|
|
96
77
|
|
|
97
|
-
|
|
78
|
+
Use `init` when you want an interactive setup flow:
|
|
98
79
|
|
|
99
80
|
```bash
|
|
100
|
-
vvoc
|
|
81
|
+
vvoc init
|
|
82
|
+
vvoc init --scope project
|
|
101
83
|
```
|
|
102
84
|
|
|
103
|
-
|
|
85
|
+
Use `--non-interactive` if you want `init` without prompts:
|
|
104
86
|
|
|
105
87
|
```bash
|
|
106
|
-
vvoc
|
|
88
|
+
vvoc init --non-interactive --scope project
|
|
107
89
|
```
|
|
108
90
|
|
|
109
|
-
|
|
91
|
+
### Scripted Install
|
|
92
|
+
|
|
93
|
+
`install` is the non-interactive bootstrap command and is the best fit for repeatable setup:
|
|
110
94
|
|
|
111
95
|
```bash
|
|
112
96
|
vvoc install
|
|
97
|
+
vvoc install --scope project
|
|
98
|
+
vvoc install --config-dir /tmp/vvoc-home
|
|
113
99
|
```
|
|
114
100
|
|
|
115
|
-
`
|
|
116
|
-
|
|
101
|
+
When `--config-dir` is used for global scope, `vvoc` writes under the supplied root for both `opencode/` and `vvoc/`.
|
|
102
|
+
|
|
103
|
+
### Sync Managed Files
|
|
117
104
|
|
|
118
|
-
|
|
105
|
+
Refresh the pinned package entry, managed agent registrations, managed prompt files, and managed `guardian.jsonc` / `memory.jsonc` files:
|
|
119
106
|
|
|
120
107
|
```bash
|
|
121
|
-
vvoc
|
|
108
|
+
vvoc sync
|
|
109
|
+
vvoc sync --scope project
|
|
122
110
|
```
|
|
123
111
|
|
|
124
|
-
|
|
112
|
+
### Inspect And Validate Setup
|
|
125
113
|
|
|
126
114
|
```bash
|
|
127
|
-
vvoc
|
|
115
|
+
vvoc status
|
|
116
|
+
vvoc doctor
|
|
117
|
+
vvoc config validate
|
|
128
118
|
```
|
|
129
119
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
- `/tmp/vvoc-home/vvoc/guardian.jsonc`
|
|
134
|
-
- `/tmp/vvoc-home/vvoc/memory.jsonc`
|
|
135
|
-
- `/tmp/vvoc-home/vvoc/agents/guardian.md`
|
|
136
|
-
- `/tmp/vvoc-home/vvoc/agents/memory-reviewer.md`
|
|
137
|
-
- `/tmp/vvoc-home/vvoc/agents/implementer.md`
|
|
138
|
-
- `/tmp/vvoc-home/vvoc/agents/spec-reviewer.md`
|
|
139
|
-
- `/tmp/vvoc-home/vvoc/agents/code-reviewer.md`
|
|
140
|
-
- `/tmp/vvoc-home/vvoc/agents/investitagor.md`
|
|
120
|
+
- `status` shows the current installation state
|
|
121
|
+
- `doctor` reports parse problems and missing required setup
|
|
122
|
+
- `config validate` validates `guardian.jsonc` and `memory.jsonc` in global, project, or both scopes
|
|
141
123
|
|
|
142
|
-
|
|
124
|
+
Validate a specific scope or config type:
|
|
143
125
|
|
|
144
126
|
```bash
|
|
145
|
-
vvoc
|
|
127
|
+
vvoc config validate --scope global
|
|
128
|
+
vvoc config validate --scope project --guardian-only
|
|
129
|
+
vvoc config validate --scope project --memory-only
|
|
146
130
|
```
|
|
147
131
|
|
|
148
|
-
|
|
132
|
+
### Manage Agent Models
|
|
133
|
+
|
|
134
|
+
List configured model overrides:
|
|
149
135
|
|
|
150
136
|
```bash
|
|
151
|
-
vvoc
|
|
137
|
+
vvoc agent list
|
|
152
138
|
```
|
|
153
139
|
|
|
154
|
-
|
|
155
|
-
It does not manage auth for you, so keep using OpenCode's normal StepFun credential flow.
|
|
156
|
-
|
|
157
|
-
Manage model overrides for built-in and bundled agents:
|
|
140
|
+
Set model overrides:
|
|
158
141
|
|
|
159
142
|
```bash
|
|
160
|
-
vvoc agent list
|
|
161
143
|
vvoc agent set general openai/gpt-5-nano
|
|
162
144
|
vvoc agent set explore openai/gpt-5-nano
|
|
145
|
+
vvoc agent set enhancer openai/gpt-5
|
|
163
146
|
vvoc agent set implementer openai/gpt-5
|
|
164
147
|
vvoc agent set code-reviewer anthropic/claude-sonnet-4-20250514
|
|
165
|
-
vvoc agent
|
|
148
|
+
vvoc agent set guardian anthropic/claude-sonnet-4-5:high
|
|
149
|
+
vvoc agent set memory-reviewer openai/gpt-5:high
|
|
166
150
|
```
|
|
167
151
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
Inspect current setup:
|
|
152
|
+
Remove overrides:
|
|
171
153
|
|
|
172
154
|
```bash
|
|
173
|
-
vvoc
|
|
174
|
-
vvoc
|
|
155
|
+
vvoc agent unset spec-reviewer
|
|
156
|
+
vvoc agent unset guardian
|
|
157
|
+
vvoc agent unset memory-reviewer
|
|
175
158
|
```
|
|
176
159
|
|
|
177
|
-
|
|
160
|
+
Supported agent IDs:
|
|
161
|
+
|
|
162
|
+
- `guardian`
|
|
163
|
+
- `memory-reviewer`
|
|
164
|
+
- `general`
|
|
165
|
+
- `explore`
|
|
166
|
+
- `enhancer`
|
|
167
|
+
- `implementer`
|
|
168
|
+
- `spec-reviewer`
|
|
169
|
+
- `code-reviewer`
|
|
170
|
+
- `investitagor`
|
|
171
|
+
|
|
172
|
+
`guardian` and `memory-reviewer` accept `provider/model[:variant]` syntax. The other agent targets use `provider/model`.
|
|
173
|
+
|
|
174
|
+
### Plugin Inspection, Provider Presets, And Shell Completion
|
|
178
175
|
|
|
179
176
|
```bash
|
|
177
|
+
vvoc plugin list
|
|
178
|
+
vvoc plugin list --verbose
|
|
179
|
+
vvoc path-provider stepfun-ai
|
|
180
180
|
vvoc completion
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
|
|
183
|
+
- `plugin list` shows plugin entries from OpenCode config
|
|
184
|
+
- `path-provider stepfun-ai` patches the global OpenCode provider base URL for StepFun
|
|
185
|
+
- `completion` installs completions for the current shell (`bash`, `zsh`, or `fish`)
|
|
184
186
|
|
|
185
|
-
|
|
187
|
+
### Check For Upgrades
|
|
186
188
|
|
|
187
189
|
```bash
|
|
188
|
-
vvoc
|
|
189
|
-
vvoc
|
|
190
|
+
vvoc upgrade
|
|
191
|
+
vvoc version
|
|
190
192
|
```
|
|
191
193
|
|
|
192
|
-
|
|
194
|
+
## Command Reference
|
|
193
195
|
|
|
194
|
-
|
|
196
|
+
| Command | Purpose |
|
|
197
|
+
| --- | --- |
|
|
198
|
+
| `vvoc init` | Interactive bootstrap flow |
|
|
199
|
+
| `vvoc install` | Non-interactive setup and scaffolding |
|
|
200
|
+
| `vvoc sync` | Refresh managed config and prompt files |
|
|
201
|
+
| `vvoc status` | Show current installation state |
|
|
202
|
+
| `vvoc doctor` | Diagnose setup problems |
|
|
203
|
+
| `vvoc agent list/set/unset` | Manage model overrides |
|
|
204
|
+
| `vvoc guardian config` | Print or write `guardian.jsonc` |
|
|
205
|
+
| `vvoc config validate` | Validate `guardian.jsonc` and `memory.jsonc` |
|
|
206
|
+
| `vvoc plugin list` | List OpenCode plugins from config |
|
|
207
|
+
| `vvoc path-provider stepfun-ai` | Patch a global provider endpoint preset |
|
|
208
|
+
| `vvoc completion` | Install shell completions |
|
|
209
|
+
| `vvoc upgrade` | Check npm for a newer package version |
|
|
210
|
+
| `vvoc version` | Print the installed `vvoc` version |
|
|
195
211
|
|
|
196
|
-
|
|
197
|
-
- existing unmanaged files are not overwritten unless `--force` is passed
|
|
198
|
-
- Guardian now reads vvoc-managed config from `.vvoc/` or `$XDG_CONFIG_HOME/vvoc/`
|
|
199
|
-
- `vvoc install` also creates `memory.jsonc` when it is missing
|
|
212
|
+
## Config And Data Layout
|
|
200
213
|
|
|
201
|
-
|
|
214
|
+
OpenCode config stays in OpenCode-managed paths:
|
|
202
215
|
|
|
203
|
-
`
|
|
216
|
+
- global: `$XDG_CONFIG_HOME/opencode/opencode.json` or `~/.config/opencode/opencode.json`
|
|
217
|
+
- project: `./opencode.json` or `./opencode.jsonc`
|
|
204
218
|
|
|
205
|
-
|
|
219
|
+
vvoc-managed config stays separate:
|
|
206
220
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
221
|
+
- global: `$XDG_CONFIG_HOME/vvoc/` or `~/.config/vvoc/`
|
|
222
|
+
- project: `./.vvoc/`
|
|
223
|
+
|
|
224
|
+
Persisted vvoc data lives under the XDG data root:
|
|
225
|
+
|
|
226
|
+
- global data root: `$XDG_DATA_HOME/vvoc/` or `~/.local/share/vvoc/`
|
|
227
|
+
- project-local memory: `$XDG_DATA_HOME/vvoc/projects/<project-id>/memory/`
|
|
228
|
+
- shared memory: `$XDG_DATA_HOME/vvoc/memory/shared/<namespace>/`
|
|
229
|
+
|
|
230
|
+
Managed prompt files live here:
|
|
231
|
+
|
|
232
|
+
- global: `~/.config/vvoc/agents/*.md`
|
|
233
|
+
- project: `./.vvoc/agents/*.md`
|
|
234
|
+
|
|
235
|
+
Common managed config files:
|
|
236
|
+
|
|
237
|
+
- global Guardian config: `~/.config/vvoc/guardian.jsonc`
|
|
238
|
+
- project Guardian config: `./.vvoc/guardian.jsonc`
|
|
239
|
+
- global Memory config: `~/.config/vvoc/memory.jsonc`
|
|
240
|
+
- project Memory config: `./.vvoc/memory.jsonc`
|
|
241
|
+
- global Secrets Redaction config: `~/.config/vvoc/secrets-redaction.config.json`
|
|
242
|
+
- project Secrets Redaction config: `./.vvoc/secrets-redaction.config.json`
|
|
243
|
+
|
|
244
|
+
Scope rules:
|
|
245
|
+
|
|
246
|
+
- project config overrides global config for vvoc-managed settings
|
|
247
|
+
- managed files include a marker header so `vvoc` can recognize them safely
|
|
248
|
+
- existing unmanaged files are not rewritten unless `--force` is passed
|
|
249
|
+
|
|
250
|
+
## Plugins Included
|
|
251
|
+
|
|
252
|
+
### GuardianPlugin
|
|
253
|
+
|
|
254
|
+
`GuardianPlugin` reviews OpenCode permission requests with a constrained Guardian agent and safe deny behavior.
|
|
255
|
+
|
|
256
|
+
Generate or rewrite a managed `guardian.jsonc` file:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
vvoc guardian config --print
|
|
260
|
+
vvoc guardian config --model "anthropic/claude-sonnet-4-5" --variant high
|
|
212
261
|
```
|
|
213
262
|
|
|
214
|
-
|
|
263
|
+
Supported Guardian config fields:
|
|
264
|
+
|
|
265
|
+
- `model`
|
|
266
|
+
- `variant`
|
|
267
|
+
- `timeoutMs`
|
|
268
|
+
- `approvalRiskThreshold`
|
|
269
|
+
- `reviewToastDurationMs`
|
|
215
270
|
|
|
216
|
-
|
|
271
|
+
`guardian.jsonc` is only auto-rewritten when it is clearly vvoc-managed, unless you pass `--force`.
|
|
217
272
|
|
|
218
|
-
|
|
273
|
+
### MemoryPlugin
|
|
274
|
+
|
|
275
|
+
`MemoryPlugin` adds explicit persistent memory tools to OpenCode.
|
|
219
276
|
|
|
220
277
|
Available tools:
|
|
221
278
|
|
|
@@ -229,78 +286,94 @@ Available tools:
|
|
|
229
286
|
Memory is explicit-only:
|
|
230
287
|
|
|
231
288
|
- stored entries are never injected into the prompt automatically
|
|
232
|
-
- the agent must call memory tools directly when
|
|
233
|
-
-
|
|
234
|
-
- session, branch, and project memory data live under `$XDG_DATA_HOME/vvoc/projects/<project-id>/memory/`
|
|
235
|
-
- shared memory data lives under `$XDG_DATA_HOME/vvoc/memory/shared/<namespace>/`
|
|
236
|
-
- the plugin adds a short system instruction that reminds the agent to consider memory tools proactively when durable context may help
|
|
289
|
+
- the agent must call memory tools directly when durable context is useful
|
|
290
|
+
- settings live in `./.vvoc/memory.jsonc` or `$XDG_CONFIG_HOME/vvoc/memory.jsonc`
|
|
237
291
|
|
|
238
292
|
Supported scopes:
|
|
239
293
|
|
|
240
|
-
- `session`
|
|
241
|
-
- `branch`
|
|
242
|
-
- `project` -
|
|
243
|
-
- `shared` -
|
|
244
|
-
|
|
245
|
-
In practice:
|
|
294
|
+
- `session` for the current session in the current project
|
|
295
|
+
- `branch` for the current git branch in the current project
|
|
296
|
+
- `project` for repository-specific memory
|
|
297
|
+
- `shared` for cross-project memory
|
|
246
298
|
|
|
247
|
-
|
|
248
|
-
- use `project` for repository-specific facts and workflows
|
|
249
|
-
- use `branch` for work that only matters on one branch
|
|
250
|
-
- use `session` for temporary context you want to keep only for the current session
|
|
299
|
+
`memory.jsonc` supports these fields:
|
|
251
300
|
|
|
252
|
-
|
|
301
|
+
- `enabled`
|
|
302
|
+
- `defaultSearchLimit`
|
|
303
|
+
- `reviewerModel`
|
|
304
|
+
- `reviewerVariant`
|
|
253
305
|
|
|
254
306
|
The package also installs a bundled reviewer subagent named `memory-reviewer`.
|
|
255
307
|
|
|
256
|
-
|
|
308
|
+
Example:
|
|
257
309
|
|
|
258
310
|
```text
|
|
259
311
|
@memory-reviewer review the current memory and suggest keep/update/merge/delete actions
|
|
260
312
|
```
|
|
261
313
|
|
|
262
|
-
The reviewer can read memory
|
|
314
|
+
The reviewer can read memory but cannot modify it.
|
|
263
315
|
|
|
264
|
-
|
|
316
|
+
### SecretsRedactionPlugin
|
|
265
317
|
|
|
266
|
-
`
|
|
318
|
+
`SecretsRedactionPlugin` redacts secrets from chat content before LLM requests and restores placeholders after the request lifecycle where needed.
|
|
267
319
|
|
|
268
|
-
-
|
|
269
|
-
- project: `./.vvoc/agents/*.md`
|
|
320
|
+
`vvoc install` scaffolds a managed `secrets-redaction.config.json` file. The generated config uses:
|
|
270
321
|
|
|
271
|
-
|
|
322
|
+
```json
|
|
323
|
+
{
|
|
324
|
+
"secret": "${VVOC_SECRET}"
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Set `VVOC_SECRET` if you want placeholder restoration to stay stable across restarts.
|
|
329
|
+
|
|
330
|
+
If no config file exists, the plugin falls back to defaults and generates a random secret for the current runtime.
|
|
331
|
+
|
|
332
|
+
Built-in patterns cover common identifiers and tokens such as:
|
|
333
|
+
|
|
334
|
+
- email addresses
|
|
335
|
+
- UUIDs
|
|
336
|
+
- IP and MAC addresses
|
|
337
|
+
- OpenAI, Anthropic, GitHub, AWS, and Stripe-style keys
|
|
338
|
+
- bearer tokens and generic hex-like tokens
|
|
272
339
|
|
|
273
|
-
|
|
274
|
-
- `memory-reviewer.md`
|
|
275
|
-
- `implementer.md`
|
|
276
|
-
- `spec-reviewer.md`
|
|
277
|
-
- `code-reviewer.md`
|
|
278
|
-
- `investitagor.md`
|
|
340
|
+
## Managed Prompts And Subagents
|
|
279
341
|
|
|
280
|
-
`
|
|
281
|
-
There is no bundled runtime fallback, so missing files should be repaired with `vvoc install` or `vvoc sync`.
|
|
342
|
+
`vvoc` manages prompt files for:
|
|
282
343
|
|
|
283
|
-
|
|
344
|
+
- `guardian`
|
|
345
|
+
- `memory-reviewer`
|
|
346
|
+
- `implementer`
|
|
347
|
+
- `spec-reviewer`
|
|
348
|
+
- `code-reviewer`
|
|
349
|
+
- `investitagor`
|
|
284
350
|
|
|
285
|
-
`
|
|
351
|
+
`install` and `sync` register these OpenCode subagents in `opencode.json`:
|
|
286
352
|
|
|
287
353
|
- `implementer`
|
|
288
354
|
- `spec-reviewer`
|
|
289
355
|
- `code-reviewer`
|
|
290
356
|
- `investitagor`
|
|
291
357
|
|
|
292
|
-
|
|
358
|
+
`GuardianPlugin` and `MemoryPlugin` load `guardian.md` and `memory-reviewer.md` from vvoc-managed paths at runtime.
|
|
293
359
|
|
|
294
|
-
|
|
360
|
+
If a managed prompt file is missing, rerun one of these commands:
|
|
295
361
|
|
|
296
|
-
|
|
362
|
+
```bash
|
|
363
|
+
vvoc install
|
|
364
|
+
vvoc sync
|
|
365
|
+
```
|
|
297
366
|
|
|
298
367
|
## Package API
|
|
299
368
|
|
|
300
369
|
Root exports:
|
|
301
370
|
|
|
302
371
|
```ts
|
|
303
|
-
import {
|
|
372
|
+
import {
|
|
373
|
+
GuardianPlugin,
|
|
374
|
+
MemoryPlugin,
|
|
375
|
+
SecretsRedactionPlugin,
|
|
376
|
+
} from "@osovv/vv-opencode";
|
|
304
377
|
```
|
|
305
378
|
|
|
306
379
|
Subpath exports:
|
|
@@ -308,9 +381,10 @@ Subpath exports:
|
|
|
308
381
|
```ts
|
|
309
382
|
import { GuardianPlugin } from "@osovv/vv-opencode/plugins/guardian";
|
|
310
383
|
import { MemoryPlugin } from "@osovv/vv-opencode/plugins/memory";
|
|
384
|
+
import { SecretsRedactionPlugin } from "@osovv/vv-opencode/plugins/secrets-redaction";
|
|
311
385
|
```
|
|
312
386
|
|
|
313
|
-
## Local
|
|
387
|
+
## Local Development
|
|
314
388
|
|
|
315
389
|
Install dependencies:
|
|
316
390
|
|
|
@@ -318,7 +392,7 @@ Install dependencies:
|
|
|
318
392
|
bun install
|
|
319
393
|
```
|
|
320
394
|
|
|
321
|
-
Run
|
|
395
|
+
Run the full local verification stack:
|
|
322
396
|
|
|
323
397
|
```bash
|
|
324
398
|
bun run typecheck
|
|
@@ -326,6 +400,7 @@ bun run lint
|
|
|
326
400
|
bun run fmt:check
|
|
327
401
|
bun test
|
|
328
402
|
bun run build
|
|
403
|
+
bun run pack:check
|
|
329
404
|
```
|
|
330
405
|
|
|
331
406
|
Format source files:
|
|
@@ -339,7 +414,7 @@ Git hooks are managed with `lefthook`.
|
|
|
339
414
|
- `bun install` runs `lefthook install --force` through the `prepare` script
|
|
340
415
|
- the `pre-commit` hook runs `bun run lint` and `bun run fmt:check`
|
|
341
416
|
|
|
342
|
-
Smoke-test the CLI against a temporary config
|
|
417
|
+
Smoke-test the built CLI against a temporary config root:
|
|
343
418
|
|
|
344
419
|
```bash
|
|
345
420
|
tmpdir="$(mktemp -d)"
|
|
@@ -350,52 +425,20 @@ bun dist/cli.js status --config-dir "$tmpdir"
|
|
|
350
425
|
|
|
351
426
|
## Publishing
|
|
352
427
|
|
|
353
|
-
This
|
|
428
|
+
This package is published manually from the terminal.
|
|
354
429
|
|
|
355
430
|
Typical release flow:
|
|
356
431
|
|
|
357
432
|
```bash
|
|
358
|
-
bun run
|
|
433
|
+
bun run typecheck
|
|
434
|
+
bun run lint
|
|
435
|
+
bun run fmt:check
|
|
436
|
+
bun test
|
|
359
437
|
bun run build
|
|
360
438
|
bun run pack:check
|
|
361
439
|
npm publish
|
|
362
440
|
```
|
|
363
441
|
|
|
364
|
-
##
|
|
365
|
-
|
|
366
|
-
- `src/plugins/guardian/` - Guardian OpenCode plugin runtime
|
|
367
|
-
- `src/plugins/memory/` - Memory OpenCode plugin runtime + system instruction
|
|
368
|
-
- `templates/agents/` - canonical managed prompt templates copied into `vvoc/agents/`
|
|
369
|
-
- `src/plugins/memory-store.ts` - file-based memory store and search logic
|
|
370
|
-
- `src/lib/opencode.ts` - config path resolution and JSONC helpers for the CLI
|
|
371
|
-
- `src/lib/vvoc-paths.ts` - shared vvoc/openCode path helpers
|
|
372
|
-
- `src/commands/` - `vvoc` commands
|
|
373
|
-
- `src/cli.ts` - CLI entrypoint
|
|
374
|
-
- `docs/` - GRACE planning, verification, and graph artifacts
|
|
375
|
-
|
|
376
|
-
## Notes
|
|
377
|
-
|
|
378
|
-
- `src/` is the source of truth
|
|
379
|
-
- `dist/` is generated output for packaging and local smoke tests
|
|
380
|
-
- if you change CLI behavior, plugin exports, vvoc config paths, or memory workflow, keep this README in sync
|
|
381
|
-
|
|
382
|
-
## Highly Recommended Addons
|
|
383
|
-
|
|
384
|
-
### RTK — LLM Token Optimizer
|
|
385
|
-
|
|
386
|
-
[RTK](https://github.com/rtk-ai/rtk) is a CLI proxy that reduces LLM token consumption by 60-90% on common dev commands like `git`, `ls`, `cat`, `rg`, `grep`, `pytest`, `cargo test`, and 100+ more. Single Rust binary, zero dependencies.
|
|
387
|
-
|
|
388
|
-
**Why use it with vvoc:**
|
|
389
|
-
- Transparent command rewriting — no workflow changes needed
|
|
390
|
-
- Works alongside vvoc's Guardian and Memory plugins
|
|
391
|
-
- Minimal overhead (<10ms)
|
|
392
|
-
|
|
393
|
-
**Quick install:**
|
|
394
|
-
```bash
|
|
395
|
-
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
|
|
396
|
-
rtk init -g --opencode
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
After install, commands like `git status` and `cargo test` are automatically rewritten to their RTK equivalents, producing compact output that costs 60-90% fewer tokens.
|
|
442
|
+
## Optional: RTK
|
|
400
443
|
|
|
401
|
-
|
|
444
|
+
[RTK](https://github.com/rtk-ai/rtk) is a CLI proxy that reduces token usage for common developer commands. It works well alongside `vvoc`, and the interactive `vvoc init` flow recommends it after setup.
|