Skip to content

docs: describe the builders and strict mode as scoped - #165

Merged
NSchatz merged 1 commit into
mainfrom
docs/builder-wording
Oct 7, 2026
Merged

NSchatz merged 1 commit into
mainfrom
docs/builder-wording

Conversation

@NSchatz

@NSchatz NSchatz commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Wording changes in the README and docs-content so each sentence says exactly what the builders and strict mode do. Checked on the published @cosyte/x12 0.1.1 from a clean install outside any repository: buildInterchange refuses an empty interchange control number and a ? delimiter with X12_BUILD_INVALID_SPEC (two of the cases the emit page lists); { strict: true } throws an X12ParseError carrying the same code a lenient parse records (X12_TRANSACTION_COUNT_MISMATCH, X12_PRE_005010); and with CLP-04 450.00 and a PLB of +50.00, a BPR-02 of 400.00 balances while 500.00 raises X12_835_REMIT_BALANCE_MISMATCH, as these pages state.

File Before After
README.md (Emit) a domain builder (build835, build837P, build271, and the rest) that layers that guide's own invariants on top. a domain builder (build835, build837P, build271, and the rest).
docs-content/intro.md ships both a lenient reader and a spec-clean domain builder: ships both a lenient reader and a domain builder:
docs-content/intro.md while the builders emit spec-clean X12 and refuse (never silently corrupt) a structurally impossible spec while the builders refuse (never silently corrupt) a structurally impossible spec
docs-content/spec-notes-transaction-sets.md a lenient reader and a spec-clean domain builder a lenient reader and a domain builder
docs-content/emit-and-serialize.md where a builder meets a spec it cannot emit conformantly it refuses ... a wrong payment, so emitting something plausible and wrong is the one outcome the emit side is built to make impossible. where a builder meets one of the specs listed below it refuses ... a wrong payment.
docs-content/spec-notes-tolerance.md Tier 1: spec-clean. Parses with no warnings. Tier 1: no deviation flagged. Parses with no warnings.
docs-content/spec-notes-tolerance.md so a strict run is a spec-conformance gate so a strict run fails on every deviation the parser flags
docs-content/cookbook.md useful for a spec-conformance gate on a trusted trading partner useful as a gate on a trusted trading partner

No runnable block changes; the emit page keeps the words docs-content.test.ts requires ("refuse", "silently corrupt"). prettier --check passes on every changed file. The README's description paragraph is left as it is, because readme-standard.test.ts holds it equal to the package.json description, which changes only with a release.

https://claude.ai/code/session_011dC8vE9axM3hqC8rNEX3W9

- README Emit bullet: ends at "a domain builder (build835, build837P,
  build271, and the rest)."
- intro: "a lenient reader and a spec-clean domain builder" becomes "a
  lenient reader and a domain builder"; "the builders emit spec-clean
  X12 and refuse (never silently corrupt) a structurally impossible
  spec" becomes "the builders refuse (never silently corrupt) a
  structurally impossible spec".
- transaction sets: "a spec-clean domain builder" becomes "a domain
  builder".
- emit and serialize: a builder refuses "where it meets one of the specs
  listed below"; the closing sentence ends at "a wrong payment".
- tolerance: "Tier 1: spec-clean" becomes "Tier 1: no deviation
  flagged"; a strict run "fails on every deviation the parser flags".
- cookbook: strict mode is "useful as a gate on a trusted trading
  partner".

Claude-Session: https://claude.ai/code/session_011dC8vE9axM3hqC8rNEX3W9
@NSchatz
NSchatz merged commit c9297bd into main Oct 7, 2026
14 checks passed
@NSchatz
NSchatz deleted the docs/builder-wording branch October 7, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant