Initial Commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# json-spec-conformance
|
||||
|
||||
- **Change ID**: json-spec-conformance
|
||||
- **Package**: `@suaveplan/json`
|
||||
- **Status**: PROPOSED
|
||||
- **Type**: spec-conformance
|
||||
- **Date**: 2026-04-26
|
||||
|
||||
## Why
|
||||
|
||||
The folded `openspec/specs/json/spec.md` documented requirements as a flat
|
||||
`R1`-`R14` bullet list under a `### ADDED Requirements` heading. The
|
||||
conformance parser only sees `### Requirement: <name>` or `### CAP-NN —`
|
||||
headings, so the audit reported "0 requirements parsed" — a parsing gap,
|
||||
not a contract gap. The implementation already satisfies every `R*` clause;
|
||||
this change makes them machine-checkable and pins each scenario to existing
|
||||
test cases.
|
||||
|
||||
## What changes
|
||||
|
||||
- Rewrite `openspec/specs/json/spec.md` from the bullet-list form to seven
|
||||
`### Requirement: <name>` blocks (Safe parse, prototype-pollution defense,
|
||||
Safe stringify, non-throwing helpers, byte-size estimator, round-trip,
|
||||
OTel + error-code namespace).
|
||||
- Add `**Verified by:**` lines under every requirement naming concrete
|
||||
`it(...)` titles in `src/safe-json/safe-json.test.ts`.
|
||||
- No source changes; no public-surface changes; no new tests required.
|
||||
|
||||
## Out of scope
|
||||
|
||||
- New behaviour. Heading rewrite + verification annotation only.
|
||||
- Source mapping table — `@suaveplan/json` is genesis-original.
|
||||
|
||||
## Verification approach
|
||||
|
||||
Every requirement is pinned to `it(...)` titles in
|
||||
`src/safe-json/safe-json.test.ts`, the existing 47-case suite that pre-dated
|
||||
this change.
|
||||
|
||||
## Migration impact
|
||||
|
||||
None — additive metadata only. Public surface unchanged.
|
||||
Reference in New Issue
Block a user