Repository navigation
Specify drawer/0.2 and printer/0.2, with dunnage check - #10
Merged
Merged
Conversation
The formats now have a written spec and a JSON Schema in docs/format/. The schemas are TypeBox in src/core/schema.ts, so the core's types and the published JSON come from one place; a test fails if the JSON is stale, and Ajv validates the fixtures against it as an outside reader would. Core check() reads a file through YAML, the format line (older versions migrate, newer ones are refused), the schema and then what the schema can't say: ids resolve, things fit the drawer and miss each other, and holders hold real things in a way the base allows. Each problem carries a path and a line, and union errors are narrowed to the branch the author meant. dunnage check prints them one per line, or as JSON with --json. The check found unquoted commas in the coffee fixture's flow mappings, which YAML had been reading as extra keys; they're quoted now. Closes #2 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Define the id pattern and format versions in one place each, refuse versions with leading zeros, always stamp a migrated file's format, and describe box poses and tilts by axis, not by which edge is longer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2
What
docs/format/:README.md(versions, checking, editors),drawer.md,printer.md, anddrawer-0.2.schema.json/printer-0.2.schema.json.src/core/schema.ts, giving the core its types.bun run schemawrites the JSON; a test fails if it's stale, and Ajv validates the fixtures against the published JSON as an outside reader would.check(text)/load(text). It runs YAML, then the format line, then the schema, then the checks a schema can't express:holds, and reviewon/act.aside;layout[3].atand a line and column. Union errors are narrowed to the branch the author meant: a holder is judged by itsmethodand an item byboxorcylinder, and a bad value gets a list of the values allowed.dunnage checkprintsfile:line:col: path: messageand exits 1 on any problem.--jsongives agents the same as JSON. The CLI also checks that theprinter:profile is beside the drawer.migratesteps older files up throughMIGRATIONS, which is empty because 0.2 is the first published format. Newer files are refused, with versions compared numerically.Worth knowing
{ why: …, left to right. }) had been parsed as extra keys. They're quoted now. Hailey's prototype copy has the same bug.drawer.md):gaprule;Tests
bun run typecheck,bun run test(54 passing),bun run buildandbun run validateall pass. The built CLI also runs on Node.🤖 Generated with Claude Code