|
2 | 2 |
|
3 | 3 | All notable changes to opencode-sdlc-wizard. |
4 | 4 |
|
| 5 | +## [0.7.0] - 2026-05-05 |
| 6 | + |
| 7 | +### Added — JSON Schemas for review artifacts + zero-dep validator |
| 8 | + |
| 9 | +Codifies the structures the wizard has been hand-writing across review |
| 10 | +rounds. The `.reviews/handoff.json` and `.reviews/response.json` shapes |
| 11 | +were previously implicit — every reviewer + every consumer had to infer |
| 12 | +them. v0.7.0 makes both shapes explicit + machine-checkable. |
| 13 | + |
| 14 | +**`templates/schemas/handoff.schema.json`** — JSON Schema (draft-07) for |
| 15 | +the handoff artifact: `review_id`, `status` (PENDING_REVIEW / IN_REVIEW |
| 16 | +/ CERTIFIED / NOT_CERTIFIED), `round`, `mission`, `success`, `failure`, |
| 17 | +`review_instructions`, plus optional `files_changed`, `verification_state` |
| 18 | +with `tests_green` + `test_counts`, `preflight_path`, `response_path`, |
| 19 | +`artifact_path`. Permissive `additionalProperties: true` for forward |
| 20 | +compat — extra fields don't break validation. |
| 21 | + |
| 22 | +**`templates/schemas/response.schema.json`** — Schema for the response |
| 23 | +artifact: top-level `responses[]` array with per-finding shape |
| 24 | +(`finding_id`, `severity` matching `^P[0-2]( \(.*\))?$` to allow |
| 25 | +parenthetical context, `title`, `claim`, `status`). Conditional |
| 26 | +validation enforces: `FIXED` requires `fix_summary` + `fix_locations`; |
| 27 | +`REJECTED` / `WONT_FIX` requires `rejection_reason`. Pattern-key |
| 28 | +support for `recheck_instructions_for_round_N`. |
| 29 | + |
| 30 | +**`scripts/validate-review-artifact.sh`** + companion `.js` — zero-dep |
| 31 | +validator (pure node, no `npm install`). Implements the draft-07 subset |
| 32 | +the schemas use: `type`, `required`, `properties`, `enum`, `pattern`, |
| 33 | +`minLength`, `minimum`, `items`, `$ref` (#/definitions/*), |
| 34 | +`patternProperties`, `allOf` with `if`/`then`, `const`, `definitions`. |
| 35 | +Exit codes: `0` valid / `1` invalid (errors with jsonpath + reason on |
| 36 | +stderr) / `2` usage / missing-file / unparseable JSON. |
| 37 | + |
| 38 | +Both schemas + validator install to `.opencode/schemas/` and |
| 39 | +`.opencode/scripts/` respectively. Live `.reviews/handoff.json` and |
| 40 | +`.reviews/response.json` (round-2 artifacts from v0.2.0) validate |
| 41 | +against the schemas — the schemas were derived from these artifacts so |
| 42 | +they're guaranteed compatible with prior rounds. |
| 43 | + |
| 44 | +### Updated — skills consume the schemas |
| 45 | + |
| 46 | +**`cross-model-review` SKILL.md** — new Step 1.5 validates handoff + |
| 47 | +response against the schemas before sending the prompt to the reviewer. |
| 48 | +A malformed handoff wastes reviewer tokens and produces a confused |
| 49 | +review; validation is fast (zero deps, sub-100ms) and fails fast with |
| 50 | +specific jsonpath + reason for every error. |
| 51 | + |
| 52 | +**`setup-wizard` SKILL.md** — Step 4 (Generate) now mentions the |
| 53 | +schemas as the canonical shape for review artifacts. No setup work |
| 54 | +required (schemas auto-install); the skill points consumers at them |
| 55 | +when they create their first review artifact. |
| 56 | + |
| 57 | +### Drift-test extension |
| 58 | + |
| 59 | +`tests/test-bundle-drift.sh` extended to: |
| 60 | +- Include `scripts/*.js` companions in the "every script ships in |
| 61 | + install.sh" check (T7) — without this, a `.js` file added to scripts/ |
| 62 | + but forgotten in install.sh would silently never reach consumers. |
| 63 | +- New T12: every `templates/schemas/*.schema.json` must be shipped by |
| 64 | + install.sh — same drift-class for the schemas dir. |
| 65 | + |
| 66 | +### Tests |
| 67 | + |
| 68 | +- `tests/test-review-schemas.sh` — 28 tests covering: schemas exist + |
| 69 | + parse + declare draft-07; validator script exists + executable + |
| 70 | + prints usage on `--help` + handles missing-file/bad-JSON gracefully; |
| 71 | + live `.reviews/*.json` artifacts validate; negative cases for missing |
| 72 | + required fields, bad enum, wrong type, FIXED-status missing |
| 73 | + `fix_summary`/`fix_locations`, REJECTED-status missing |
| 74 | + `rejection_reason`, P3 severity (pattern violation), parenthetical |
| 75 | + P0 severity (allowed), `recheck_instructions_for_round_N` pattern |
| 76 | + keys; bundle-test that install lands schemas + validator at the |
| 77 | + expected paths and the installed pair validates the live handoff |
| 78 | + end-to-end. |
| 79 | + |
| 80 | +**Total: 270 tests across 11 suites** (73 + 11 + 13 + 21 + 10 + 10 + |
| 81 | +26 + 51 + 10 + 17 + 28). bundle-drift grew from 48 → 51 (`.js` |
| 82 | +inclusion + 2 schema-shipped checks). |
| 83 | + |
| 84 | +### Changed |
| 85 | + |
| 86 | +- `install.sh` REQUIRED_SOURCES + declare_target add the validator |
| 87 | + pair (`.sh` + `.js`) and both schemas. |
| 88 | +- `package.json` `description` mentions JSON Schemas; `test` script |
| 89 | + adds the new suite. `files[]` already includes `scripts/` and |
| 90 | + `templates/`, so the new files publish without further changes. |
| 91 | + |
| 92 | +### Why this matters |
| 93 | + |
| 94 | +The handoff/response artifacts have been the load-bearing |
| 95 | +hand-shake between the implementing agent and the reviewer all |
| 96 | +session. Locking the shape down means: (1) `cross-model-review` skill |
| 97 | +fails fast on bad handoffs instead of producing confused reviews, |
| 98 | +(2) the `ditto` cross-host migrator (when it lands at v0.1.0) can |
| 99 | +parse + transform these artifacts safely, (3) any future CI tooling |
| 100 | +gating release on a CERTIFIED status can validate the artifact |
| 101 | +shape with zero `npm install`. Forward-compat is preserved — extra |
| 102 | +keys are allowed, so older artifacts validate against the new schema |
| 103 | +without retrofit. |
| 104 | + |
5 | 105 | ## [0.6.0] - 2026-05-05 |
6 | 106 |
|
7 | 107 | ### Added — `SDLC.md` and `ARCHITECTURE.md` templates |
|
0 commit comments