@osovv/vv-opencode 0.9.1 → 0.10.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 CHANGED
@@ -1,221 +1,278 @@
1
1
  # @osovv/vv-opencode
2
2
 
3
- Portable OpenCode workflow package with plugins and a Bun CLI for install, sync, and cross-device setup.
3
+ Portable OpenCode workflow package with plugins and a Bun CLI for setup, sync, diagnostics, and explicit memory.
4
4
 
5
- Current package scope:
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
- - built-in `memory-reviewer` subagent for report-only memory audits
10
- - vvoc-managed subagents: `implementer`, `spec-reviewer`, `code-reviewer`, `investitagor`
11
- - `vvoc` CLI for bootstrap, sync, and diagnostics
12
- - vvoc-managed config kept separate from OpenCode config
13
-
14
- ## What is included
15
-
16
- - npm package: `@osovv/vv-opencode`
17
- - binary: `vvoc`
18
- - exported plugins:
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 subagent registrations
13
+ - vvoc-managed OpenCode slash command: `/enhance` with runtime chatbox rewrite when available
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
- Use the CLI as:
25
+ Bootstrap the default global setup:
45
26
 
46
27
  ```bash
47
- vvoc --help
28
+ vvoc install
48
29
  ```
49
30
 
50
- Examples below use `vvoc` directly and assume the binary is available in your `PATH`.
31
+ Inspect the result:
51
32
 
52
- ## OpenCode usage
33
+ ```bash
34
+ vvoc status
35
+ ```
53
36
 
54
- Add the package to your OpenCode config with a pinned version:
37
+ Use project-local scope instead of global scope:
55
38
 
56
- ```json
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
- OpenCode loads all exported plugin functions from the package, so this enables both `GuardianPlugin` and `MemoryPlugin`.
43
+ `vvoc install` does the following:
64
44
 
65
- `vvoc install` writes this pinned package specifier automatically and avoids stale `latest` plugin cache behavior inside OpenCode.
45
+ - adds a pinned `@osovv/vv-opencode@<installed-version>` entry to the OpenCode `plugin` array
46
+ - registers the vvoc-managed `/enhance` command in OpenCode config
47
+ - registers vvoc-managed OpenCode subagents
48
+ - creates managed prompt files under `vvoc/agents/` when missing
49
+ - creates `guardian.jsonc`, `memory.jsonc`, and `secrets-redaction.config.json` when missing
50
+ - keeps vvoc-managed config separate from native OpenCode config
51
+ - leaves unmanaged files alone unless `--force` is passed
66
52
 
67
- ## Config layout
53
+ Use `/enhance` inside the OpenCode TUI to wrap a raw request in vvoc's structured XML execution prompt before it is sent to the current agent:
68
54
 
69
- OpenCode config stays in OpenCode-managed locations:
70
-
71
- - global: `$XDG_CONFIG_HOME/opencode/opencode.json` or `~/.config/opencode/opencode.json`
72
- - project: `./opencode.json` or `./opencode.jsonc`
55
+ ```text
56
+ /enhance fix the failing memory plugin tests and keep the diff minimal
57
+ ```
73
58
 
74
- vvoc-managed config stays separate:
59
+ When the vvoc runtime plugin can reach OpenCode TUI APIs, `/enhance` clears the current prompt box and inserts the expanded XML prompt there (instead of appending the slash-command expansion to chat history). This lets you review/edit before sending.
75
60
 
76
- - global: `$XDG_CONFIG_HOME/vvoc/` or `~/.config/vvoc/`
77
- - project: `./.vvoc/`
61
+ If TUI rewrite APIs are unavailable or fail in the current runtime, vvoc falls back to default OpenCode command behavior and `/enhance` submits normally.
78
62
 
79
- vvoc persisted data stays in the XDG data root:
63
+ The raw request is preserved inside `command.enhance` as a CDATA payload, so multi-word input is passed through without hand-writing the XML envelope yourself.
80
64
 
81
- - global data: `$XDG_DATA_HOME/vvoc/` or `~/.local/share/vvoc/`
65
+ The OpenCode config entry written by `install` looks like this:
82
66
 
83
- Examples:
67
+ ```json
68
+ {
69
+ "$schema": "https://opencode.ai/config.json",
70
+ "plugin": ["@osovv/vv-opencode@<installed-version>"]
71
+ }
72
+ ```
84
73
 
85
- - global Guardian config: `~/.config/vvoc/guardian.jsonc`
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`
74
+ That package entry points at the package root, which exports `GuardianPlugin`, `MemoryPlugin`, `EnhanceCommandPlugin`, and `SecretsRedactionPlugin`.
92
75
 
93
- This keeps vvoc state clearly separated from native OpenCode config and avoids future clashes if OpenCode adds its own memory features.
76
+ ## Common Workflows
94
77
 
95
- ## CLI
78
+ ### Interactive Bootstrap
96
79
 
97
- Show help:
80
+ Use `init` when you want an interactive setup flow:
98
81
 
99
82
  ```bash
100
- vvoc --help
83
+ vvoc init
84
+ vvoc init --scope project
101
85
  ```
102
86
 
103
- Show the installed `vvoc` package version:
87
+ Use `--non-interactive` if you want `init` without prompts:
104
88
 
105
89
  ```bash
106
- vvoc version
90
+ vvoc init --non-interactive --scope project
107
91
  ```
108
92
 
109
- Install package config and bootstrap Guardian + Memory config plus managed subagents:
93
+ ### Scripted Install
94
+
95
+ `install` is the non-interactive bootstrap command and is the best fit for repeatable setup:
110
96
 
111
97
  ```bash
112
98
  vvoc install
99
+ vvoc install --scope project
100
+ vvoc install --config-dir /tmp/vvoc-home
113
101
  ```
114
102
 
115
- `install` writes the current installed package version into the OpenCode `plugin` array instead of using an unpinned `latest` reference.
116
- It also registers vvoc-managed subagents in OpenCode config and creates managed `guardian.jsonc`, `memory.jsonc`, and `vvoc/agents/*.md` prompt files when they are missing.
103
+ When `--config-dir` is used for global scope, `vvoc` writes under the supplied root for both `opencode/` and `vvoc/`.
117
104
 
118
- Use project scope instead of global scope:
105
+ ### Sync Managed Files
106
+
107
+ Refresh the pinned package entry, managed subagent registrations, managed prompt files, and managed `guardian.jsonc` / `memory.jsonc` files:
119
108
 
120
109
  ```bash
121
- vvoc install --scope project
110
+ vvoc sync
111
+ vvoc sync --scope project
122
112
  ```
123
113
 
124
- Override the global config home used for both `opencode/` and `vvoc/`:
114
+ ### Inspect And Validate Setup
125
115
 
126
116
  ```bash
127
- vvoc install --config-dir /tmp/vvoc-home
117
+ vvoc status
118
+ vvoc doctor
119
+ vvoc config validate
128
120
  ```
129
121
 
130
- This writes:
122
+ - `status` shows the current installation state
123
+ - `doctor` reports parse problems and missing required setup
124
+ - `config validate` validates `guardian.jsonc` and `memory.jsonc` in global, project, or both scopes
131
125
 
132
- - `/tmp/vvoc-home/opencode/opencode.json`
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`
141
-
142
- Sync managed config files:
126
+ Validate a specific scope or config type:
143
127
 
144
128
  ```bash
145
- vvoc sync
129
+ vvoc config validate --scope global
130
+ vvoc config validate --scope project --guardian-only
131
+ vvoc config validate --scope project --memory-only
146
132
  ```
147
133
 
148
- Patch the global OpenCode StepFun provider to use the `stepfun.ai` endpoint:
134
+ ### Manage Agent Models
135
+
136
+ List configured model overrides:
149
137
 
150
138
  ```bash
151
- vvoc path-provider stepfun-ai
139
+ vvoc agent list
152
140
  ```
153
141
 
154
- This writes `provider.stepfun.options.baseURL = "https://api.stepfun.ai/v1"` into the global OpenCode config.
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:
142
+ Set model overrides:
158
143
 
159
144
  ```bash
160
- vvoc agent list
161
145
  vvoc agent set general openai/gpt-5-nano
162
146
  vvoc agent set explore openai/gpt-5-nano
163
147
  vvoc agent set implementer openai/gpt-5
164
148
  vvoc agent set code-reviewer anthropic/claude-sonnet-4-20250514
165
- vvoc agent unset spec-reviewer
149
+ vvoc agent set guardian anthropic/claude-sonnet-4-5:high
150
+ vvoc agent set memory-reviewer openai/gpt-5:high
166
151
  ```
167
152
 
168
- `vvoc agent set general ...` and `vvoc agent set explore ...` write `agent.general.model` and `agent.explore.model` into OpenCode config so the built-in subagents do not inherit the main session model.
169
-
170
- Inspect current setup:
153
+ Remove overrides:
171
154
 
172
155
  ```bash
173
- vvoc status
174
- vvoc doctor
156
+ vvoc agent unset spec-reviewer
157
+ vvoc agent unset guardian
158
+ vvoc agent unset memory-reviewer
175
159
  ```
176
160
 
177
- Install shell completions for the current shell:
161
+ Supported agent IDs:
162
+
163
+ - `guardian`
164
+ - `memory-reviewer`
165
+ - `general`
166
+ - `explore`
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
- For `zsh`, `vvoc completion` writes `~/.zsh/completions/_vvoc` and appends a small loader block to `~/.zshrc`.
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
- Generate or print `guardian.jsonc`:
187
+ ### Check For Upgrades
186
188
 
187
189
  ```bash
188
- vvoc guardian config --print
189
- vvoc guardian config --model "anthropic/claude-sonnet-4-5" --variant high
190
+ vvoc upgrade
191
+ vvoc version
190
192
  ```
191
193
 
192
- ### Guardian config behavior
194
+ ## Command Reference
193
195
 
194
- `vvoc` creates a managed `guardian.jsonc` with a marker header.
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
- - managed files can be resynced safely
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
- ### Memory config behavior
214
+ OpenCode config stays in OpenCode-managed paths:
202
215
 
203
- `vvoc` also manages `memory.jsonc`.
216
+ - global: `$XDG_CONFIG_HOME/opencode/opencode.json` or `~/.config/opencode/opencode.json`
217
+ - project: `./opencode.json` or `./opencode.jsonc`
204
218
 
205
- Current supported settings:
219
+ vvoc-managed config stays separate:
206
220
 
207
- ```jsonc
208
- {
209
- "enabled": true,
210
- "defaultSearchLimit": 8
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
- Project config overrides global config.
263
+ Supported Guardian config fields:
264
+
265
+ - `model`
266
+ - `variant`
267
+ - `timeoutMs`
268
+ - `approvalRiskThreshold`
269
+ - `reviewToastDurationMs`
270
+
271
+ `guardian.jsonc` is only auto-rewritten when it is clearly vvoc-managed, unless you pass `--force`.
215
272
 
216
- ## Memory plugin
273
+ ### MemoryPlugin
217
274
 
218
- `MemoryPlugin` adds explicit memory tools to OpenCode.
275
+ `MemoryPlugin` adds explicit persistent memory tools to OpenCode.
219
276
 
220
277
  Available tools:
221
278
 
@@ -229,78 +286,95 @@ 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 it needs durable context
233
- - memory settings live in `./.vvoc/memory.jsonc` or `$XDG_CONFIG_HOME/vvoc/memory.jsonc`
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` - local to the current session in the current project
241
- - `branch` - local to the current git branch in the current project
242
- - `project` - local to the current project
243
- - `shared` - global across projects
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
244
298
 
245
- In practice:
299
+ `memory.jsonc` supports these fields:
246
300
 
247
- - use `shared` for reusable personal preferences, reusable docs locations, and cross-project habits
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
251
-
252
- ### Memory review
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
- Use it when you want a report-only audit of stored memory:
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 with `memory_list`, `memory_get`, and `memory_search`, but it does not modify entries.
314
+ The reviewer can read memory but cannot modify it.
263
315
 
264
- ## Managed agent prompts
316
+ ### SecretsRedactionPlugin
265
317
 
266
- `vvoc install` and `vvoc sync` create vvoc-managed prompt files under:
318
+ `SecretsRedactionPlugin` redacts secrets from chat content before LLM requests and restores placeholders after the request lifecycle where needed.
267
319
 
268
- - global: `~/.config/vvoc/agents/*.md`
269
- - project: `./.vvoc/agents/*.md`
320
+ `vvoc install` scaffolds a managed `secrets-redaction.config.json` file. The generated config uses:
270
321
 
271
- This includes:
322
+ ```json
323
+ {
324
+ "secret": "${VVOC_SECRET}"
325
+ }
326
+ ```
327
+
328
+ Set `VVOC_SECRET` if you want placeholder restoration to stay stable across restarts.
272
329
 
273
- - `guardian.md`
274
- - `memory-reviewer.md`
275
- - `implementer.md`
276
- - `spec-reviewer.md`
277
- - `code-reviewer.md`
278
- - `investitagor.md`
330
+ If no config file exists, the plugin falls back to defaults and generates a random secret for the current runtime.
279
331
 
280
- `GuardianPlugin` and `MemoryPlugin` now read `guardian.md` and `memory-reviewer.md` from those vvoc-managed paths at runtime.
281
- There is no bundled runtime fallback, so missing files should be repaired with `vvoc install` or `vvoc sync`.
332
+ Built-in patterns cover common identifiers and tokens such as:
282
333
 
283
- ## Managed subagents
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
339
+
340
+ ## Managed Prompts And Subagents
341
+
342
+ `vvoc` manages prompt files for:
343
+
344
+ - `guardian`
345
+ - `memory-reviewer`
346
+ - `implementer`
347
+ - `spec-reviewer`
348
+ - `code-reviewer`
349
+ - `investitagor`
284
350
 
285
- `vvoc install` and `vvoc sync` also register four OpenCode subagents in `opencode.json`:
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
- Their prompt files also live under the same vvoc-managed `agents/` directory instead of being embedded directly into the TypeScript command code.
358
+ `GuardianPlugin` and `MemoryPlugin` load `guardian.md` and `memory-reviewer.md` from vvoc-managed paths at runtime.
293
359
 
294
- OpenCode registration stays in `opencode.json`, but each agent points its `prompt` field at the vvoc-managed file with a relative `{file:...}` reference.
360
+ If a managed prompt file is missing, rerun one of these commands:
295
361
 
296
- Model overrides for these four subagents, plus the built-in `general` and `explore` subagents, are written into the corresponding `agent.<name>.model` entry inside OpenCode config via `vvoc agent set|unset ...`.
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 { GuardianPlugin, MemoryPlugin } from "@osovv/vv-opencode";
372
+ import {
373
+ GuardianPlugin,
374
+ MemoryPlugin,
375
+ EnhanceCommandPlugin,
376
+ SecretsRedactionPlugin,
377
+ } from "@osovv/vv-opencode";
304
378
  ```
305
379
 
306
380
  Subpath exports:
@@ -308,9 +382,11 @@ Subpath exports:
308
382
  ```ts
309
383
  import { GuardianPlugin } from "@osovv/vv-opencode/plugins/guardian";
310
384
  import { MemoryPlugin } from "@osovv/vv-opencode/plugins/memory";
385
+ import { EnhanceCommandPlugin } from "@osovv/vv-opencode/plugins/enhance";
386
+ import { SecretsRedactionPlugin } from "@osovv/vv-opencode/plugins/secrets-redaction";
311
387
  ```
312
388
 
313
- ## Local development
389
+ ## Local Development
314
390
 
315
391
  Install dependencies:
316
392
 
@@ -318,7 +394,7 @@ Install dependencies:
318
394
  bun install
319
395
  ```
320
396
 
321
- Run checks:
397
+ Run the full local verification stack:
322
398
 
323
399
  ```bash
324
400
  bun run typecheck
@@ -326,6 +402,7 @@ bun run lint
326
402
  bun run fmt:check
327
403
  bun test
328
404
  bun run build
405
+ bun run pack:check
329
406
  ```
330
407
 
331
408
  Format source files:
@@ -339,7 +416,7 @@ Git hooks are managed with `lefthook`.
339
416
  - `bun install` runs `lefthook install --force` through the `prepare` script
340
417
  - the `pre-commit` hook runs `bun run lint` and `bun run fmt:check`
341
418
 
342
- Smoke-test the CLI against a temporary config home:
419
+ Smoke-test the built CLI against a temporary config root:
343
420
 
344
421
  ```bash
345
422
  tmpdir="$(mktemp -d)"
@@ -350,52 +427,20 @@ bun dist/cli.js status --config-dir "$tmpdir"
350
427
 
351
428
  ## Publishing
352
429
 
353
- This project is published manually from the terminal. There is no CI publish workflow.
430
+ This package is published manually from the terminal.
354
431
 
355
432
  Typical release flow:
356
433
 
357
434
  ```bash
358
- bun run check
435
+ bun run typecheck
436
+ bun run lint
437
+ bun run fmt:check
438
+ bun test
359
439
  bun run build
360
440
  bun run pack:check
361
441
  npm publish
362
442
  ```
363
443
 
364
- ## Repository layout
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.
444
+ ## Optional: RTK
400
445
 
401
- For more commands and details, see the [RTK documentation](https://github.com/rtk-ai/rtk).
446
+ [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.