opencode-dev-framework 1.10.2 → 1.11.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
@@ -1,11 +1,14 @@
1
1
  # opencode-dev-framework
2
2
 
3
+ [![Listed on dsh-plugin.org](https://dsh-plugin.org/badges/listed.svg)](https://dsh-plugin.org/plugins/jwitmann/opencode-dev-framework) [![OpenCode V2](https://img.shields.io/badge/OpenCode-V2-111827)](https://opencode.ai/docs/plugins/) [![npm version](https://img.shields.io/npm/v/opencode-dev-framework.svg)](https://www.npmjs.com/package/opencode-dev-framework) [![CI](https://github.com/jwitmann/opencode-dev-framework/actions/workflows/ci.yml/badge.svg)](https://github.com/jwitmann/opencode-dev-framework/actions) [![License: MIT](https://img.shields.io/npm/l/opencode-dev-framework.svg)](https://github.com/jwitmann/opencode-dev-framework/blob/main/LICENSE)
4
+
3
5
  AI agents can say they're done without proving it. This plugin replaces
4
- assertion with evidence: guardrails, per-edit formatting and lint feedback,
6
+ assertion with evidence: guardrails, per-edit lint feedback (and formatting
7
+ on DSH, where the host provides none),
5
8
  a completion gate that runs your real checks, and verified goals that require
6
9
  a tool-result PASS on the final tree. Exit codes don't negotiate.
7
10
 
8
- One shared enforcement core powers native adapters for
11
+ One shared enforcement core powers adapters for
9
12
  [OpenCode](https://opencode.ai) and [DSH](https://www.deepseek.com/en/harness/)
10
13
  (DeepSeek Harness, via Cordis), with
11
14
  the same config, profiles, rules, and gates on both.
@@ -15,6 +18,16 @@ Inspired by
15
18
  which supports Copilot CLI, Claude Code, and Codex CLI; this is an independent
16
19
  implementation. DSH guide: [`docs/user/dsh.md`](docs/user/dsh.md).
17
20
 
21
+ ## Principles
22
+
23
+ These principles guide every mechanism in this plugin:
24
+
25
+ - **Verbatim evidence.** Work is judged as performed — original output or explicitly marked pointers, never silently rewritten. No output redaction, no revised reports, no laundered context.
26
+ - **Read-only reviewers.** The judging party cannot touch the work. Findings are reported visibly; rework happens in the open, and the gate re-verifies from scratch.
27
+ - **Reveal, don't sanitize.** Audit trails over hidden rewrites — what happened stays inspectable.
28
+ - **No bypass-required measures.** Nothing that fights legitimate use; if a control needs a workaround, it's the control that's wrong.
29
+ - **Bounded and loud.** Enforcement budgets are explicit and stand-down is announced, never a quiet pass.
30
+
18
31
  ## Quickstart
19
32
 
20
33
  Five minutes from zero to your first gated session.
@@ -23,6 +36,8 @@ Five minutes from zero to your first gated session.
23
36
 
24
37
  **On OpenCode:**
25
38
 
39
+ Requires OpenCode `v2.x` (live-verified on `v2.0.26` and `v2.2.0`).
40
+
26
41
  ```bash
27
42
  opencode plugin add opencode-dev-framework
28
43
  ```
@@ -32,12 +47,14 @@ Or declare it in `opencode.json`:
32
47
  ```json
33
48
  {
34
49
  "$schema": "https://opencode.ai/config.json",
35
- "plugin": ["opencode-dev-framework"]
50
+ "plugins": ["opencode-dev-framework"]
36
51
  }
37
52
  ```
38
53
 
39
54
  **On DSH:**
40
55
 
56
+ Requires DSH `0.2.2-rc.3` or newer (live-verified on `0.2.2-rc.5`).
57
+
41
58
  ```bash
42
59
  dsh plugin --profile <name> add opencode-dev-framework
43
60
  df install-dsh --profile <name> # preset seam + verification
@@ -65,14 +82,14 @@ scripted runs (add `--dsh` on DSH so the host-visible skill mirror is
65
82
  scaffolded too):
66
83
 
67
84
  ```bash
68
- npx df init [--dsh]
85
+ npx opencode-dev-framework init [--dsh]
69
86
  ```
70
87
 
71
88
  Conflicts need `--overwrite-existing` or `--skip-existing` — everything
72
- else is under `npx df init --help`.
89
+ else is under `npx opencode-dev-framework --help`.
73
90
 
74
91
  On DSH, run `dsh` from the project root (or export `ODF_WORKDIR`), and
75
- accept template drift via `df-update` if the session reports any.
92
+ accept template drift via `/df-update` if the session reports any.
76
93
 
77
94
  Then ask the agent for a small edit. You will see the plugin working: the
78
95
  edit is checked against guardrails before it lands, your linter runs on the
@@ -132,11 +149,14 @@ semantics, block budgeting, `protect_off` scope, and all eight
132
149
  at session start (bundled default, overridable per project).
133
150
  - **Guardrails.** Blocks or warns on protected paths (`.env`, vendored
134
151
  code, your own globs) and dangerous shell commands (`git push`, `rm -rf`).
152
+ Secrets are blocked at the write, never scrubbed from sight —
153
+ [secret handling](docs/user/enforcement.md#secrets) recommends gitleaks
154
+ at the commit boundary.
135
155
  - **Per-edit lint.** Runs your linter on each edited file. On OpenCode
136
156
  the result is logged against the landed edit; on DSH a finding fails
137
157
  the tool call so the agent retries clean in the same turn.
138
158
  - **Completion gate.** At the would-go-idle boundary, runs typecheck, tests,
139
- acceptance checks, and (optionally) lint on changed files — plus a required
159
+ acceptance checks, and (in `strict`, lint on changed files) — plus a required
140
160
  substantive peer-review artifact in `standard`/`strict` (length floors, no
141
161
  template checkboxes, written after the latest session edit). On OpenCode, failures steer the session back via a
142
162
  synthetic continuation, bounded by `gate.max_blocks` (fewer when
@@ -178,6 +198,10 @@ synthetic continuation); on DSH the same verdict bites earlier — the
178
198
  pre-terminal completion block, same-turn lint `block`s, and dispatched
179
199
  reviewers above all run inside the turn instead of round-tripping through it:
180
200
 
201
+ ![Enforcement flow: implement, guardrails, lint, gate, wrapped by verified goals](https://raw.githubusercontent.com/jwitmann/opencode-dev-framework/HEAD/docs/assets/flow.svg)
202
+
203
+ Text version of the same diagram (identical content, for text-mode readers):
204
+
181
205
  ```text
182
206
  user prompt
183
207
  (plain or /df-goal plan)
@@ -216,8 +240,10 @@ wrappers (dotted lines in the diagram version):
216
240
  native /goal ── wraps the loop, drives turns ──> agent implements
217
241
  ```
218
242
 
219
- The diagram version of this flow (rendered on GitHub) lives in
220
- [`docs/user/enforcement.md`](docs/user/enforcement.md#flow) — update both
243
+ Flow source lives in [`docs/user/enforcement.md`](docs/user/enforcement.md#flow)
244
+ as mermaid; `docs/assets/flow.svg` is rendered from it
245
+ (`npx @mermaid-js/mermaid-cli -i <mermaid> -o docs/assets/flow.svg`) and
246
+ embedded above by absolute URL so it renders on npm too — update all three
221
247
  together.
222
248
 
223
249
  ## Profiles
@@ -262,8 +288,9 @@ of modals. Full reference:
262
288
  from the bounded completion mechanisms below.
263
289
  - A cached pass never survives a restart — after a restart the gate
264
290
  always re-verifies the final tree from scratch.
265
- - Formatting and linting stay with your project tooling — the framework
266
- does not reimplement them.
291
+ - Formatting and linting use your project tooling — the framework never
292
+ reimplements them. On OpenCode the host runs the formatter; on DSH the
293
+ adapter runs your configured formatter command before linting.
267
294
 
268
295
  ### OpenCode
269
296
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-dev-framework",
3
- "version": "1.10.2",
3
+ "version": "1.11.1",
4
4
  "description": "Enforcement gates for AI coding agents on OpenCode and DeepSeek Harness",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,6 +33,10 @@ beats theoretical purity.
33
33
  decision — call it out and justify it; never slip one in.
34
34
  5. **When in doubt, copy the neighbor.** Find the closest existing example of the thing
35
35
  you're building and follow its structure.
36
+ 6. **Check shared contracts before extending.** Before changing an existing helper
37
+ or shared behavior, inspect its contract and affected callers. Do not impose
38
+ one caller's assumptions on the others merely to enable reuse. If the existing
39
+ abstraction does not genuinely fit, raise the mismatch rather than forcing it.
36
40
 
37
41
  ## How to verify
38
42