feat: scaffold package scripts on init#576
Merged
miguel-heygen merged 1 commit intomainfrom Apr 30, 2026
Merged
Conversation
894d326 to
84a7d6e
Compare
84a7d6e to
0b1d1ee
Compare
vanceingalls
approved these changes
Apr 30, 2026
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.
Problem
New HyperFrames projects should feel like normal JavaScript projects immediately after
hyperframes init: users should have a canonicalnpm run dev,npm run check,npm run render, andnpm run publishloop without needing to memorize raw CLI commands.At the same time, the scaffold should stay opinionated. Adding many aliases would make the project surface harder to explain and maintain.
What this fixes
package.jsonduringhyperframes initwhen the selected example does not already provide one.dev-> preview in Studiocheck-> lint, validate, and inspect in sequencerender-> render the videopublish-> publish the projectnpx --yesinside scripts so first-run commands do not stop on an install confirmation prompt.AGENTS.mdandCLAUDE.mdguidance to present the same four-command workflow.npm run dev,npm run check, andnpm run render.Root cause
scaffoldProject()copied the example, wrotemeta.jsonandhyperframes.json, then copied agent guidance files. It never created a package manifest, so generated projects had no project-local command contract even though the workflow has stable repeated commands.This revision keeps the scaffold narrow:
package.jsonis the project workflow contract, but direct CLI usage remains available for advanced or one-off commands.Verification
Local checks
bun run --filter @hyperframes/cli test src/commands/init.test.tsfailed after updating the expected generated UX becausenpm run checkwas not emitted yet.bun run --filter @hyperframes/cli test src/commands/init.test.tsbunx oxlint packages/cli/src/commands/init.ts packages/cli/src/commands/init.test.tsbunx oxfmt --check packages/cli/src/commands/init.ts packages/cli/src/commands/init.test.ts packages/cli/src/templates/_shared/AGENTS.md packages/cli/src/templates/_shared/CLAUDE.mdbun run --filter @hyperframes/cli typecheckbun run --filter @hyperframes/cli testbun run --filter @hyperframes/cli buildbun run --filter @hyperframes/studio buildgit diff --checknode packages/cli/dist/cli.js --versionGenerated-project smoke at
/tmp/hf-init-package-scripts-opinionated:node packages/cli/dist/cli.js init /tmp/hf-init-package-scripts-opinionated --example blank --non-interactive --skip-skillspackage.jsonand confirmed exactlydev,check,render, andpublishnpx --yes hyperframes@0.4.39 ...npm run checknpm run render -- --quality draft --workers 1 --fps 24 --output /tmp/hf-init-package-scripts-opinionated.mp4ffprobe -v error -select_streams v:0 -show_entries stream=width,height,avg_frame_rate,duration -show_entries format=duration,size -of json /tmp/hf-init-package-scripts-opinionated.mp4npm run publish -- --helpBrowser verification
npm run dev -- --port 5199.agent-browserto openhttp://localhost:5199/#project/hf-init-package-scripts-opinionated./tmp/hf-init-package-scripts-opinionated-browser.png./tmp/hf-init-package-scripts-opinionated-browser.webm.ffprobe: 14.4s, 61 KB.Notes
npx --yes hyperframes ...because source mode reports0.0.0-dev; the packaged CLI smoke covers the real-user pinned path.npm run publishwas verified with--helponly to avoid creating a real publish side effect during PR validation.