softschema 0.1.4
Synchronized patch release of the Python (PyPI) and TypeScript (npm) packages following a full engineering review and four-phase remediation. Both packages release together at exact behavioral parity, now proven under Node (the published npm runtime) as well as Bun.
Behavior changes
status: enforcednow has teeth. When the effective status isenforced, structural validation treats object schemas that declarepropertiesbut omitadditionalPropertiesas closed (additionalProperties: false); an explicitadditionalPropertiesalways wins, andsoft/permissivebehavior is unchanged. The overlay is validation-time only; compiled sidecars never change.- Unknown keys in the
softschema:block are rejected (per the spec), and a contract ID must be a non-empty string. validateworks without--model/--schemaas a metadata-only check (frontmatter parses, thesoftschema:block is well-formed, the envelope resolves), making the CLI useful from thesoftstage.- Library envelope inference now follows the spec: a contract with no
envelope_keyinfers the single non-softschematop-level key, and rejects zero-key (envelope_missing) or multi-key (envelope_ambiguous) documents instead of merging them. - Pure-yaml artifacts recognize a root
softschema:block as metadata (never payload); an explicit envelope key nests the payload, otherwise the remaining root is the payload. - The maintainer-internal
agentsandpublishingdocs topics were removed fromsoftschema docsand the package bundles.
Fixes and hardening
- Clean CLI error handling everywhere: missing files, malformed frontmatter/metadata, and bad
--modelspecs exit 2 with a one-line message (no tracebacks);generateruntime errors exit 2 with exit 1 reserved for drift; identical exit codes across both CLIs. - TypeScript CLI: agent
--helpepilog (npx bootstrap now works),--version, EPIPE/SIGINT handling, no stdout truncation on exit, cached Ajv validators,./cliexport, publicreadFrontmatter. - Python CLI:
--version, atomic skill installs, git-root-awareskill --install; the wheel now ships thetypescript-designdoc topic. - Cross-language parity hardening: Python-style number rendering in TS error messages, byte-identical frontmatter edge-case handling (empty/whitespace/unterminated),
x-softschemamerge semantics, andvalidatereads the document once. - Skill:
allowed-toolsfrontmatter,format=f01stamp on installed mirrors, runner-selection ladder anddoctorcommand.
Testing and release safety
- The golden corpus now covers the whole CLI surface and runs under Python 3.11-3.14, Node, and Bun, with a direct Python-vs-TypeScript byte-comparison job in CI.
publintgates the npm package layout in CI and the publish workflow.
Full details in the repository's review and plan documents under docs/project/.