Skip to content

feat: customization tool + clearer skill, ready for v0.7.0#424

Merged
devinoldenburg merged 2 commits into
mainfrom
feat/v0.7.0-customization-tooling
Jun 21, 2026
Merged

feat: customization tool + clearer skill, ready for v0.7.0#424
devinoldenburg merged 2 commits into
mainfrom
feat/v0.7.0-customization-tooling

Conversation

@devinoldenburg

Copy link
Copy Markdown
Owner

Makes Goal Mode customization actually easy and powerful, and cuts the release to v0.7.0.

What's better

  • goal-config tool (scripts/goal-config.mjs, bin opencode-goal-mode-config, npm run config): the agent/user can now discover → apply → verify instead of guessing.
    • list — every key with type, default, env var, and what it does.
    • explain <key> — the exact opencode.json + env snippet to set it, and how to verify.
    • recipes / recipe <name> — paste-ready presets (safe-yolo, full-yolo, allow-commands, block-extra, quiet, no-auto-review, strict).
    • effective '<json>' [--diff] — preview the resolved config before committing.
  • CONFIG_DOCS is the single doc source for every key; a test keeps it in lockstep with DEFAULT_CONFIG so docs can never drift.
  • Rewrote the skill + /goal-mode-customize command into a tight, tool-driven discover → choose → apply → verify loop with a request→key map and the YOLO precedence rule spelled out — far easier for the agent to act on than the previous prose.
  • README points at the tool.

Release

  • Bumped to v0.7.0 with a CHANGELOG entry (YOLO + customization tooling + the ~190-issue hardening sweep since 0.6.12); package-lock synced.

Verification

  • node --test "tests/*.test.mjs"668 pass, 0 fail (8 new goal-config tests).
  • npm run lint clean; validate-opencode-config.mjs passes; release-notes.mjs renders the v0.7.0 section; check-npm-publish-ready --skip-registry ready at 0.7.0; npm pack --dry-run ships the tool, skill, and command.

Does not touch Issue #2.

Devin Oldenburg added 2 commits June 21, 2026 14:30
Make customization concrete and verifiable instead of guesswork:
- CONFIG_DOCS: a single { group, summary } metadata source for every config
  key + envVarFor(); a test keeps it in lockstep with DEFAULT_CONFIG (no drift).
- scripts/goal-config.mjs (bin: opencode-goal-mode-config): list / explain <key>
  / recipes / recipe <name> / effective '<json>' [--diff] — discover keys, get
  the exact opencode.json/env snippet, and preview the resolved config.
- 8 tests covering coverage, env-var naming, and every subcommand.
….7.0

- Rewrote the goal-mode-customization skill and /goal-mode-customize command into
  a tight discover -> choose -> apply -> verify loop driven by goal-config, with a
  request->key map and YOLO precedence rule. Much easier for the agent to act on.
- README: point at goal-config (list/recipe/effective).
- Ship the tool: scripts/goal-config.mjs in files + a third bin + a 'config' script.
- Bump to v0.7.0 with a CHANGELOG entry (YOLO + customization tooling + the
  ~190-issue hardening sweep since 0.6.12); sync package-lock.

@devinoldenburg devinoldenburg left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: APPROVE (recommend merge)

I reviewed this rigorously and ran the full verification suite locally on feat/v0.7.0-customization-tooling. No blocking defects found. (Posting as a comment since GitHub blocks --approve on one's own PR — this is an approving recommendation.)

What I verified

1. goal-config.mjs correctness — all subcommands work, exit codes correct

  • list, explain <key>, recipes, recipe <name>, effective '<json>' [--diff] all produce correct output.
  • Exit non-zero on bad input: explain badkey → 1, recipe nope → 1, effective '{not json' → 1, unknown subcommand → 1. Bare effective (no opts) and bare invocation print help and exit 0 (intended).
  • effective --diff correctly shows only changed-from-default; cross-checked against resolveConfig: full-yolo {yolo,allowDestructive}blockDestructive/blockNetworkExec/enforceCompletion/restrictSubagents/toastOnBlock all false; safe-yolo keeps blockDestructive=true. Matches resolveConfig's relax() set exactly (config.js:270-278).
  • Printed opencode.json/env snippets are valid and reproduce the claimed effect — re-ran each emitted effective verify command and the GOAL_GUARD_ALLOW_COMMANDS="...,..." env-string form; both resolve as advertised.
  • Global-bin path: the ../plugins/goal-guard/config.js import resolves against the script's own URL, not cwd — ran the bin from /tmp (exit 0). Both plugins/goal-guard/config.js and scripts/goal-config.mjs are in files/npm pack output, so the relative import holds in an installed global package.

2. CONFIG_DOCS no-drift — covers exactly DEFAULT_CONFIG (30 keys); the test (goal-config.test.mjs:11-19) is a genuine independent cross-check, not tautological. envVarFor is consistent with every fromEnv mapping; spot-checked sessionTtlMsGOAL_GUARD_SESSION_TTL_MS, blockDestructive, allowCommands.

3. Skill/command accuracy — recipes and the request→key map are correct against real semantics:

  • YOLO precedence claim is true: effective '{"yolo":true,"blockNetworkExec":true}' --diff does NOT relax blockNetworkExec (explicit override wins, config.js:267-269).
  • allowCommands vs extraDestructive match guard.js:582-586 — allow-list bypasses the guard entirely (!allowlisted gates both block paths), deny-list extends the destructive classification. Skill wording ("never blocked, whatever the analyzer thinks" / "treated as destructive") is accurate.
  • full-yolo = {yolo:true, allowDestructive:true} correctly documented as the only way to drop destructive guarding.

4. Release bumppackage.json and package-lock.json both at 0.7.0. node scripts/release-notes.mjs reads package.json version, finds ## v0.7.0, emits a 37-line non-empty section, exits 0. CHANGELOG heading is ## v0.7.0. exports/bin/validator contract intact — validate-opencode-config.mjs passes; the new opencode-goal-mode-config bin points at a packed file.

5. Tests + tooling green

  • node --test: 669 pass / 0 fail (full suite, including the new goal-config.test.mjs and unchanged config.test.mjs).
  • npm run lint (biome): exit 0; the 3 changed JS files lint clean. The warnings/infos shown are pre-existing across the tree, not introduced here.
  • npm pack --dry-run: exit 0, ships goal-config.mjs + config.js.

Nits (non-blocking)

  • scripts/goal-config.mjs:60 exampleValue for list keys hardcodes a sample (["^docker compose ", "^rm -rf \\./tmp/"]) rather than echoing the key's actual default — harmless since list defaults are all [], and a concrete example is arguably more useful. No action needed.
  • The strict recipe resolves to "No effective change from defaults" under effective --diff (it spells out the defaults). Correct and intentional, but a reader running the verify line might briefly expect output. Optional: a one-word note in the recipe blurb. Non-blocking.

Solid, well-tested PR. Recommend merge.

@devinoldenburg devinoldenburg merged commit ad3d154 into main Jun 21, 2026
11 checks passed
@devinoldenburg devinoldenburg deleted the feat/v0.7.0-customization-tooling branch June 21, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant