Add preview package and "preview pack" CLI subcommand#75
Merged
Conversation
…reen preview loops Game authors compile a hand-authored games-screen preview loop — a preview/ directory of a preview.yaml manifest plus plain-text frame files — into a single self-contained preview.scp bundle that ships as a release asset. - New public `preview` package (Pack/Load + validation + format constants), documented for game authors. Pack validates and compiles the authoring directory; Load parses a bundle back into a playable Animation. The frame-text contract is enforced at pack time (46x7 cells, SGR-only escapes, rejects C1/invalid-UTF-8/VS16/ZWJ/keycap hazards, 1-64 frames, per-frame ms clamped 80-10000, pad-never-truncate, 64 KiB cap). Widths use github.com/charmbracelet/x/ansi StringWidth so the packer agrees byte-for-byte with the arcade's intake re-validation. - New `shellcade-kit preview pack <dir> [-o out.scp]` CLI subcommand (dispatch, usage line, trailing-flag handling, loud stray-positional rejection). - GUIDE.md: a "Preview loops" authoring section. Co-Authored-By: Claude Fable 5 <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.
Adds the authoring/packing side of the arcade's animated games-screen previews:
previewpackage:Packcompiles apreview/authoring directory (preview.yamlmanifest + plain-text frame files, 46×7 cells, optional ANSI SGR color) into a single self-containedpreview.scpbundle;Loadparses one back into a playableAnimation. Validation enforces the frame-text contract at pack time — SGR-only escapes; C1/invalid-UTF-8/variation-selector/ZWJ/keycap rejection; 1–64 frames; per-frame durations clamped 80–10000 ms; pad-never-truncate; 64 KiB cap. The arcade re-runs identical checks at intake.shellcade-kit preview pack <dir> [-o out.scp]subcommand, so games-repo CI can pack via the existing per-game-pinnedgo runmechanism.New dep:
charmbracelet/x/ansi(display-width measurement identical to the arcade's — packed bundles verified byte-identical against the arcade's packer for two real games).🤖 Generated with Claude Code