{"id":50895249,"url":"https://github.com/devinoldenburg/opencode-goal-mode","last_synced_at":"2026-06-16T00:00:17.829Z","repository":{"id":362980402,"uuid":"1258286812","full_name":"devinoldenburg/opencode-goal-mode","owner":"devinoldenburg","description":"Strict Goal Mode for OpenCode: a goal agent + enforced review gates + a guard plugin that blocks destructive commands and premature \"Goal Completed\", with a live TUI goal banner.","archived":false,"fork":false,"pushed_at":"2026-06-14T11:11:49.000Z","size":417,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T11:25:30.441Z","etag":null,"topics":["agentic","ai-agents","claude","cli","code-review","coding-agent","developer-tools","guardrails","llm","opencode","opencode-plugin","opencode-tui-plugin","tui"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/opencode-goal-mode","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devinoldenburg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-03T12:46:43.000Z","updated_at":"2026-06-14T11:11:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/devinoldenburg/opencode-goal-mode","commit_stats":null,"previous_names":["devinoldenburg/opencode-goal-mode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devinoldenburg/opencode-goal-mode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinoldenburg%2Fopencode-goal-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinoldenburg%2Fopencode-goal-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinoldenburg%2Fopencode-goal-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinoldenburg%2Fopencode-goal-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devinoldenburg","download_url":"https://codeload.github.com/devinoldenburg/opencode-goal-mode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinoldenburg%2Fopencode-goal-mode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34385031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic","ai-agents","claude","cli","code-review","coding-agent","developer-tools","guardrails","llm","opencode","opencode-plugin","opencode-tui-plugin","tui"],"created_at":"2026-06-16T00:00:16.411Z","updated_at":"2026-06-16T00:00:17.818Z","avatar_url":"https://github.com/devinoldenburg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenCode Goal Mode\n\nStrict Goal Mode for OpenCode: a primary `goal` agent, specialized review\nsubagents, slash commands, a `goal-guard` plugin that enforces review discipline\nand blocks destructive shell commands, and a structured Goal-owned todo section\nin the TUI sidebar.\n\n## Install\n\n**One command.** Needs [Node](https://nodejs.org) 20.11+ and a working\n[OpenCode](https://opencode.ai). Works on macOS and Linux:\n\n```bash\nnpm install -g opencode-goal-mode \u0026\u0026 opencode-goal-mode --global\n```\n\nThen **restart OpenCode**. That's the whole install — it copies the Goal agent,\nreview subagents, slash commands, and guard plugin into `~/.config/opencode`, and\nmerge-safely registers the Goal todo sidebar in `~/.config/opencode/tui.json`.\nIn the agent picker you'll see only the **`goal`** agent; reviewers are subagents\nit drives automatically. The install is **idempotent** (re-run it to upgrade in\nplace), never touches files you've edited, and `--uninstall` removes exactly what\nit added. Goal Mode inherits your existing OpenCode model/provider.\n\n\u003cdetails\u003e\n\u003csummary\u003eOther ways to install\u003c/summary\u003e\n\n```bash\n# Global npm install, then run the installer separately\nnpm install -g opencode-goal-mode\nopencode-goal-mode --global          # alias of opencode-goal-mode-install\n\n# Preview first, then install (no writes on --dry-run)\nopencode-goal-mode --global --dry-run\n\n# One-off install with npx (no global package needed; OpenCode still loads the TUI\n# sidebar — it resolves that from its own plugin cache, not the global install)\nnpx opencode-goal-mode --global\n\n# Into a single project (writes ./.opencode, including ./.opencode/tui.json)\nnpx opencode-goal-mode\n\n# Clean removal of everything it installed (incl. its tui.json entry)\nopencode-goal-mode --global --uninstall\n\n# From source\ngit clone https://github.com/devinoldenburg/opencode-goal-mode\ncd opencode-goal-mode \u0026\u0026 npm ci \u0026\u0026 npm run install:global\n```\n\nUse global install for normal daily use. Use project install only when you want\nGoal Mode scoped to one repo and your OpenCode build reads project `.opencode`\nconfig, including `.opencode/tui.json`. See [Installer options](#installer-options).\n\u003c/details\u003e\n\n[![npm version](https://img.shields.io/npm/v/opencode-goal-mode?color=2da44e\u0026label=npm)](https://www.npmjs.com/package/opencode-goal-mode)\n[![npm downloads](https://img.shields.io/npm/dm/opencode-goal-mode?color=2da44e)](https://www.npmjs.com/package/opencode-goal-mode)\n[![CI](https://github.com/devinoldenburg/opencode-goal-mode/actions/workflows/ci.yml/badge.svg)](https://github.com/devinoldenburg/opencode-goal-mode/actions/workflows/ci.yml)\n[![Release](https://github.com/devinoldenburg/opencode-goal-mode/actions/workflows/publish.yml/badge.svg)](https://github.com/devinoldenburg/opencode-goal-mode/actions/workflows/publish.yml)\n[![license](https://img.shields.io/npm/l/opencode-goal-mode?color=2da44e)](LICENSE)\n[![node](https://img.shields.io/node/v/opencode-goal-mode?color=2da44e)](package.json)\n\n![OpenCode Goal Mode sidebar preview](docs/sidebar-preview.png)\n\n\u003csub\u003e↑ In goal mode, the Goal plugin takes over the sidebar todo section with a\nstructured, evidence-aware Goal todo list — a bold `GOAL` label, then the goal\ntitle, gate progress, and per-acceptance/gate todo rows, each on its own line in\nits own colour. Build and every other mode keep\nOpenCode's native todo section — see [TUI integration](#tui-integration).\u003c/sub\u003e\n\n**[Quick start](#quick-start) · [Why it's different](#why-its-different) · [Benchmarks](#benchmarks-honest-edition) · [TUI integration](#tui-integration) · [Configuration](#configuration) · [Releasing](#releasing) · [Architecture](ARCHITECTURE.md)**\n\n## Quick start\n\n```bash\n# 1. Install (needs Node 20.11+ and OpenCode)\nnpm install -g opencode-goal-mode\nopencode-goal-mode-install --global\n\n# 2. Restart OpenCode, then verify it loaded — you should see ONLY `goal (primary)`,\n#    with every specialist as a (subagent):\nopencode agent list | grep goal\n```\n\n3. In OpenCode, start a goal:\n\n   ```\n   /goal add rate limiting to the login endpoint and prove it works\n   ```\n\n   The `goal` agent writes a contract, delegates research/review to subagents, and\n   **cannot** answer `Goal Completed` until every required review gate passes — the\n   guard rewrites a premature claim to `Goal Not Completed`. Try a destructive\n   command mid-session (e.g. `rm -rf build`) and watch it get blocked. If your\n   OpenCode build supports TUI plugins, Goal sessions also get the Goal-owned\n   sidebar todo section (experimental — see [TUI integration](#tui-integration)).\n\nThat's it. Everything below is detail.\n\nSee [ARCHITECTURE.md](ARCHITECTURE.md) for the design and [research/](research/)\nfor the platform reference, comparison, and threat model.\n\n## Why it's different\n\nMost \"goal mode\" / agentic setups are **prompt-only**: the model is *asked* to\nreview its work and to keep going until done. Goal Mode adds a guard plugin that\nmakes that discipline **mechanical at the harness layer** — the model cannot\ndeclare `Goal Completed` until the required reviews actually passed, and it\nis blocked from the benchmarked destructive-command bypasses that a regex guard\nwould miss.\n\n![Mechanically-enforced goal discipline vs. Claude Code and Codex](docs/benchmarks/capability-matrix.svg)\n\nCompared to Claude Code and OpenAI Codex (full analysis, with citations and\nhonest caveats, in [research/goal-mode-comparison.md](research/goal-mode-comparison.md)):\n\n- **It is the only one of the three that mechanically blocks a premature\n  completion claim by default.** Goal Mode intercepts the finished message and\n  rewrites `Goal Completed` → `Goal Not Completed` unless every required reviewer\n  gate has a *fresh* PASS and the claimed `Review cycles: N` matches the recorded\n  counter. Claude Code can do this only via a user-authored Stop hook; Codex's\n  code review is advisory.\n- **An edit automatically invalidates prior approvals.** A reviewer gate counts\n  only when its PASS is newer (by a monotonic integer sequence) than the last\n  edit — so any change forces the relevant reviews to re-run. The public Claude\n  Code and Codex docs reviewed do not describe this stale-review invariant.\n- **Required specialist reviews are auto-selected and enforced** (security, api,\n  data, performance …) from the goal text, contract, and changed files — not left\n  to the model's discretion.\n- **Destructive commands are blocked by a real shell tokenizer**, not a regex.\n  Claude Code's own docs call Bash argument-matching *\"fragile\"*.\n\n### Benchmarks (honest edition)\n\nThe headline number is measured on commands **the analyzer was never fitted to**:\n704 real example commands from [tldr-pages](https://github.com/tldr-pages/tldr)\n(common/linux/osx), authored by hundreds of contributors who have never seen\nthis guard. Ground-truth labels come from a deliberately simple, analyzer-*independent*\nrule (see [build-external-corpus.mjs](benchmarks/build-external-corpus.mjs)).\nReproduce with `npm run bench` or `node benchmarks/external.mjs`.\n\n![Guard accuracy on real third-party commands](docs/benchmarks/external-scorecard.svg)\n\n| On 704 real third-party commands | Legacy regex guard | Goal Mode analyzer |\n| --- | --- | --- |\n| Destructive-command detection | 53.8% | **93.3%** |\n| False positives on safe commands | 0.2% | **0.2%** |\n\nHonest caveats, because the point of this rewrite was to stop overclaiming:\n\n- The 7 remaining \"misses\" are all plain `rm` invocations without `-r`/`-f`\n  (single- or multi-target, a few with `-i`/`-v`/`-d`), which the guard\n  **intentionally permits**: bare `rm` is extremely common, so the guard marks it\n  dirty but lets the host's own `rm *` permission decide, while still blocking the\n  irreversible forms (`rm -r`/`rm -f`, wildcard/root, `$(rm …)`, `bash -c`,\n  `/bin/rm`, interpreters, etc.). Under a strict every-`rm`-is-destructive\n  labeling those count against it.\n- The single counted false positive (`git filter-repo …`) actually *is* a\n  history-rewriting command, so the real-world false-positive rate is effectively\n  zero. `node benchmarks/external.mjs --json` lists every miss and false positive\n  so you can audit the disagreements yourself.\n\nTwo **curated fixture sets** also ship — and they are explicitly *fixtures*, not\nan unbiased benchmark. They define the patterns the analyzer must catch and guard\nagainst regressions, so they pass by construction; do not read the 100%/0% there\nas measured accuracy:\n\n- `benchmarks/corpus.mjs` — 71 destructive patterns (incl. `$(…)`, `bash -c`,\n  `sudo -u`, `/bin/rm`, `git -C … reset --hard`, `curl | sh`, interpreter\n  deletes) and their safe look-alikes (`git checkout -b`, `echo \"rm -rf /\"`).\n- `benchmarks/completion-corpus.mjs` — 9 completion-claim policy cases (missing\n  review-cycle line, stale review after edit, missing contextual gate, inactive\n  session, custom marker). `npm run bench:truthfulness` prints them.\n\nThe analysis costs ~1µs per command (hundreds of thousands of classifications per\nsecond) — negligible for a per-tool-call guard:\n\n![Per-command analysis latency](docs/benchmarks/latency.svg)\n\n## Requirements\n\n- Node.js 20.11 or newer.\n- OpenCode configured to load local agents, commands, and plugins. The package is\n  tested against `@opencode-ai/plugin` 1.17.6 and declares compatibility with the\n  1.15+ plugin hook surface used here; newer OpenCode builds that change plugin\n  or TUI slot APIs may need a package update.\n- A working OpenCode provider/model; Goal Mode does not configure API keys or\n  choose a model for you.\n\n## What it adds\n\n- A primary `goal` agent that owns implementation but delegates research,\n  discovery, verification planning, and reviews to subagents. **`goal` is the only\n  user-selectable agent** — every specialist (security, diff, verifier, …) is a\n  `mode: subagent` that the Goal agent invokes via the task tool; the user never\n  picks one directly, and the guard blocks any other agent from invoking them (see\n  **Goal-only subagents** below). They surface with friendly names (e.g. \"Security Reviewer\",\n  \"API Reviewer\") rather than raw ids.\n- Strict review gates for prompt compliance, diff review, verification, security,\n  UX, operations, data, API, performance, tests, docs, quality, and final audit.\n- Slash commands: `/goal`, `/goal-contract`, `/goal-review`,\n  `/goal-evidence-map`, `/goal-status`, `/goal-repair`, `/goal-final`.\n- The `goal-guard` plugin:\n  - **Quote-aware shell analysis** that blocks destructive and remote-exec\n    commands (including ones that evade naive regexes — `$(rm -rf …)`,\n    `bash -c \"…\"`, `/bin/rm`, `git -C … reset --hard`, `curl | sh`) without\n    false-positiving harmless commands like `git checkout -b`.\n  - **Completion enforcement**: a premature `Goal Completed` is rewritten to\n    `Goal Not Completed` with the exact missing review gates.\n  - **Contextual gating**: the goal text and changed files determine which\n    specialist reviewers are required.\n  - **Goal-only subagents**: the `goal-*` specialist subagents are mechanically\n    locked to Goal Mode. OpenCode resolves subagents globally, so the guard blocks\n    any Build, Plan, or custom agent that tries to invoke a `goal-*` reviewer via\n    the task tool — they run only under the Goal agent (toggle with\n    `restrictSubagents`). General-purpose subagents (`explore`/`general`/`scout`)\n    are never restricted.\n  - **Reviewer Memory**: blocking reviewer findings are carried across cycles,\n    surfaced in status/system context, and marked resolved by fresh PASS verdicts.\n  - **Disk persistence**: review ledgers and Reviewer Memory survive OpenCode restarts.\n  - **Custom tools**: `goal_contract`, `goal_evidence`, `goal_evidence_map`,\n    `goal_reviewer_memory`, `goal_status`, `goal_reset`.\n  - **Live state injection** into the system prompt so the model always knows\n    what the guard requires.\n  - **TUI toasts**: a toast on each review verdict (PASS/FAIL), with the\n    reviewer's friendly name, and a single \"completion unlocked\" toast the moment\n    the last required gate clears.\n- An **experimental** companion TUI plugin (`plugins/goal-sidebar.tsx`) that, in\n  Goal sessions only, takes over the sidebar todo area with a structured,\n  evidence-aware Goal todo list (`GOAL` label, goal title, gate progress, and\n  todo rows — each on its own line in its own colour). See [TUI integration](#tui-integration).\n- A test suite validating the analyzer, plugin hooks, state store, install\n  safety, and config compatibility.\n\n## TUI integration\n\nGoal Mode is a **plugin pair**: the server-side `goal-guard` plugin owns\nenforcement and writes its state to disk, and an experimental TUI plugin\n(`plugins/goal-sidebar.tsx`) reads that same state to render a live todo section.\n\n- **Goal-owned todo section.** In a `goal` session with a goal set, the Goal\n  plugin renders its own structured todo section into the sidebar's `sidebar_content`\n  slot, stacked on separate lines, each in its own colour so it never reads as one\n  run of text:\n  - a bold **`GOAL`** label (yellow while running, red when done);\n  - the short goal title (white);\n  - the gate count `passing/total gates` (cyan), on its own line;\n  - the lifecycle status (orange) on its own line — `in progress`, or\n    `completed · N review cycles`. No \"changes pending\" noise; pending work shows\n    as a todo row instead;\n  - structured todo rows derived from real guard state: one per acceptance\n    criterion (✓ when fresh evidence covers it), a re-verify row when the tree\n    changed, and one row per still-missing review gate by friendly name\n    (e.g. \"Pass Security Reviewer\").\n\n  Each line uses its lifecycle colour (running → yellow label; done → red).\n  Because OpenCode renders the native todo list as that slot's *fallback*,\n  on builds that render `sidebar_content` in replace/single-winner mode the Goal\n  section **replaces** the native todo list while a goal is active; in append mode\n  it sits alongside it. In every case:\n  - **no render** — Build and every non-Goal mode (and a Goal session before a\n    goal is set) render nothing here, so OpenCode's native todo section stays in\n    the same position. The section is scoped to the session that owns the goal: a\n    Build session in the same worktree never inherits another session's goal.\n\n  Toggle/recolour with `sidebarBanner`, `sidebarColor` (running), `sidebarDoneColor`\n  (done), `sidebarMutedColor`, or the `GOAL_GUARD_SIDEBAR_*` env vars.\n\n  **How it loads — important.** TUI plugins are **not** loaded from the `plugins/`\n  dir; OpenCode loads them from `tui.json`. The Goal sidebar registers a\n  `sidebar_content` slot that renders content **only** for the active session when\n  that session is a Goal session; for any other session it renders nothing, so\n  non-Goal modes keep their native todo section. With `--global`, the installer\n  writes `~/.config/opencode/tui.json` for you (merge-safe):\n\n  ```json\n  { \"$schema\": \"https://opencode.ai/tui.json\", \"plugin\": [\"opencode-goal-mode\"] }\n  ```\n\n  OpenCode installs the referenced package into its own plugin cache\n  (`~/.cache/opencode/packages/`) and provides the `@opentui/solid` + `solid-js`\n  runtime to it. It does **not** re-check that cache for newer versions, so the\n  installer clears the cached copy on install/uninstall — that's why an upgrade\n  needs only a restart to load the new sidebar. Restart OpenCode after install. The\n  Goal todo section appears in a **Goal session** view (not the home screen and not\n  Build mode), and because the Goal agent does its own todo tracking (native\n  `todowrite` is disabled in Goal Mode), it replaces — rather than sits beside —\n  the native todo list while a goal is active. The visual harness renders the\n  component headlessly in [visual test](tools/visual-test/README.md)\n  (`npm run test:visual`); the enforcement core is a separate server plugin and\n  works regardless of the sidebar.\n- **Toasts.** Review verdicts and completion-unlock events surface as toasts\n  (`toastOnReview`), and blocked destructive commands / premature completions\n  toast as before (`toastOnBlock`).\n\n## Installer options\n\n```bash\nnpm install -g opencode-goal-mode \u0026\u0026 opencode-goal-mode --global\nnpx opencode-goal-mode --global --dry-run\nnpx opencode-goal-mode --global\nopencode-goal-mode-install --global --uninstall\nnode scripts/install.mjs --dry-run\nnode scripts/install.mjs --target /path/to/opencode-config\nnode scripts/install.mjs --global --force\nnode scripts/install.mjs --global --uninstall\n```\n\nDefault target rules are simple: `--global` writes to `~/.config/opencode`; no\nflag writes to `./.opencode`; `--target` writes to exactly the directory you pass.\nIn every target, the installer copies only `agents/`, `commands/`, `plugins/`,\nwrites `.goal-mode-manifest.json`, and merge-safely adds `opencode-goal-mode` to\n`tui.json` in that same target. On upgrade it replaces files it owns but refuses\nto clobber files you have locally modified unless `--force` is passed.\n`--uninstall` removes only owned files and removes only its own `tui.json` entry.\n\n## Configuration\n\nThe guard works with zero configuration. To tune it, add options in\n`opencode.json`:\n\n```jsonc\n{\n  \"plugin\": [\n    [\"./plugins/goal-guard.js\", { \"blockDestructive\": true, \"contextualGates\": true }]\n  ]\n}\n```\n\nOr via environment variables (`GOAL_GUARD_*`):\n\n| Option / env | Default | Effect |\n| --- | --- | --- |\n| `blockDestructive` / `GOAL_GUARD_BLOCK_DESTRUCTIVE` | `true` | Block destructive bash before execution. |\n| `blockNetworkExec` / `GOAL_GUARD_BLOCK_NETWORK_EXEC` | `true` | Block `curl \\| sh`-style remote execution. |\n| `enforceCompletion` / `GOAL_GUARD_ENFORCE_COMPLETION` | `true` | Rewrite premature `Goal Completed`. |\n| `injectSystemState` / `GOAL_GUARD_INJECT_SYSTEM_STATE` | `true` | Inject live state into the prompt. |\n| `persist` / `GOAL_GUARD_PERSIST` | `true` | Persist state under the XDG state dir. |\n| `contextualGates` / `GOAL_GUARD_CONTEXTUAL_GATES` | `true` | Require specialist gates by goal keywords. |\n| `restrictSubagents` / `GOAL_GUARD_RESTRICT_SUBAGENTS` | `true` | Block non-Goal agents from invoking the `goal-*` subagents via the task tool. |\n| `maxSessions` / `GOAL_GUARD_MAX_SESSIONS` | `200` | Session cache size. |\n| `sessionTtlMs` / `GOAL_GUARD_SESSION_TTL_MS` | `86400000` | Idle session TTL. |\n| `toastOnBlock` / `GOAL_GUARD_TOAST_ON_BLOCK` | `true` | Toast when something is blocked. |\n| `toastOnReview` / `GOAL_GUARD_TOAST_ON_REVIEW` | `true` | Toast on each review verdict and when completion unlocks. |\n| `sidebarBanner` / `GOAL_GUARD_SIDEBAR_BANNER` | `true` | Show the experimental Goal todo section in the TUI sidebar. |\n| `sidebarColor` / `GOAL_GUARD_SIDEBAR_COLOR` | `#FFD700` | Colour of the GOAL label for a **running** goal. |\n| `sidebarDoneColor` / `GOAL_GUARD_SIDEBAR_DONE_COLOR` | `#FF5555` | Colour of a **done** goal in the sidebar (red). |\n| `sidebarMutedColor` / `GOAL_GUARD_SIDEBAR_MUTED_COLOR` | `#808080` | Reserved muted colour for no-goal projections. |\n\n## Custom tools\n\nThe plugin registers six tools the model can call directly:\n\n- `goal_contract` — record the Goal Contract (requirements, non-goals,\n  acceptance criteria). Activates enforcement and fixes the required gates.\n- `goal_evidence` — record a verification command and result.\n- `goal_evidence_map` — return the acceptance-criteria evidence map with\n  reviewer status, gaps, and next actions.\n- `goal_reviewer_memory` — return unresolved and recently resolved reviewer findings.\n- `goal_status` — return the authoritative gate/dirty/completion status.\n- `goal_reset` — clear the session's goal state (requires `confirm: true`).\n\nUse `/goal-evidence-map` when you need a read-only matrix of each acceptance\ncriterion against recorded evidence, reviewer status, gaps, and the next\nrequired action. The command is backed by the `goal_evidence_map` tool, so it\nuses persisted Goal Guard state rather than relying on transcript memory.\n\n## Contributor validation\n\n```bash\nnpm test\nnpm run validate\nnpm run audit\nnpm run publish:check\n```\n\n`npm run validate` runs the test suite, the structural config validator, the\npublish readiness check, and an `npm pack --dry-run`.\n\n## Models\n\nAgents do not pin a provider-specific model, so they inherit the model OpenCode\nis configured to use. To give a particular agent a specific model, add a\n`model:` (and optional `variant:`) line to that agent's frontmatter in your\ninstalled copy.\n\n## Safety\n\nThe installer copies only `agents/*.md`, `commands/*.md`, and the `plugins/`\ntree — never auth files, session files, tokens, or personal provider config.\n\nThe guard blocks destructive shell commands, marks real file mutations dirty,\nkeeps read-only inspection from dirtying the session, preserves goal state during\ncompaction and across restarts, and blocks premature `Goal Completed` responses\nwhen review gates are missing or stale.\n\n## Releasing\n\nReleases are fully automated and **version-synced**: one pushed tag publishes to\nnpm *and* creates the matching GitHub Release. The pipeline lives in\n[`.github/workflows/publish.yml`](.github/workflows/publish.yml) (Node 24).\n\n```bash\nnpm version patch        # bumps package.json + package-lock.json and creates the vX.Y.Z tag\ngit push --follow-tags   # pushes main + the tag → the Release workflow runs\n```\n\nOn a `vX.Y.Z` tag push the workflow:\n\n1. installs and runs the full CI gate (`npm run ci` — tests, audit, structural\n   validation, `npm pack --dry-run`);\n2. runs `npm run publish:check`, which **fails if the tag does not match\n   `package.json`** or if that version already exists on npm;\n3. publishes with `npm publish --access public` using the `NPM_TOKEN` repository\n   secret;\n4. creates the GitHub Release for the tag with auto-generated notes.\n\nSo the git tag, the `package.json` version, the npm version, and the GitHub\nRelease version are always identical. A manual `workflow_dispatch` is available\nand defaults to a safe `npm publish --dry-run`.\n\n**One-time setup:** add a publish-scoped npm token as the `NPM_TOKEN` repository\nsecret (`gh secret set NPM_TOKEN`). Treat that token as sensitive — never commit\nit.\n\n## Goal Completion Contract\n\n`Goal Completed` is allowed only when:\n\n- All acceptance criteria are mapped to evidence.\n- Required verification passed or is credibly accounted for.\n- No edit is newer than the latest required review cycle.\n- Required reviewers return `Verdict: PASS`.\n- The final answer includes an accurate `Review cycles: N`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinoldenburg%2Fopencode-goal-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevinoldenburg%2Fopencode-goal-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinoldenburg%2Fopencode-goal-mode/lists"}