Package Scripts
apps/web scripts run from apps/web/; root scripts run from the repo root. Always pnpm — never npm or npx.
Settled — do not re-propose
- A root
build:<app>script per app. A root script that only delegates to a package is a second definition of the line at the call site; what earns a root script its line isopenspec/specs/architecture/monorepo-tooling/design.md, "Recursive script orchestration". - Majoring the published packages because an export was renamed or removed.
lerna.jsonisconventionalCommits: truein fixed mode, so aBREAKING CHANGE:footer moves every public package to the next whole number; a rename or a removal ships as therefactorit is, and a package is kept at its smallest form rather than its oldest surface (openspec/specs/architecture/no-compatibility-debt/design.md). pnpm releasefor a new package's first publish. It versions, tags and pushes every package and publishes all of them with a code each. A new name's first publish is by hand, and its sequence is.agents/skills/file-organization/references/npm-lifecycle.md.- A developer's machine as the routine release. The routine release is the nightly
Release.yamlrun: its gate and version halves hold no credential, and the push credential is held only by a job that runs no repository code.pnpm releasestays for the owner's manual release (openspec/specs/architecture/release-flow/design.md, the job graph;openspec/specs/architecture/monorepo-tooling/design.md, "Lerna Lite").
`apps/web`
apps/web's pnpm typecheck is the only typecheck, and root vp run lint the only lint — why a root check aggregates its leaves and what the binaries under them miss is references/app-scripts.md.
Root Scripts — `references/root-scripts.md`
pnpm i after a manifest change, pnpm test with the paths a change touched, never the whole suite locally (the ban is the testing skill's, references/running-the-suite.md), vp run build:packages for the libraries as a set, pnpm release for a manual release (the nightly runs its halves, release:gate and release:version), and vp run lint:unused for knip; the ai:<domain>:<verb> scripts no human types are references/ai-scripts.md.
A `.ts` script runs under `node` — `references/typescript-scripts.md`
Node strips types natively, every source file is erasable and every package reaches its source through its manifest's subpath imports, so no script needs another loader.
`"scriptsComments"` — `references/scripts-comments.md`
A script that records something to undo later carries one @TODO: string in a sibling top-level "scriptsComments" object — never a "// …" key inside scripts, which pnpm lists as runnable (scripts/src/workspace/packages/packageScripts.test.ts).
Check Suite (after edits)
Once, after all the edits going out together: the tests of what the change touched, as package-relative paths — never the whole suite. Typecheck and lint are CI's (references/check-suite.md, the running-checks skill).
Key Rules
- A
--filterthat matches nothing exits 0 — preferpnpm -C <dir>, and treat a filtered check's empty output as "it did not run" until a real compiler banner or test count proves otherwise. - Never
pnpm <script> -- <args>— pnpm forwards the literal--and the flags are dropped; pass them as direct args (pnpm test -u). - A caller runs the script, not the binary under it —
pnpm exec <binary>in a workflow is a second definition that drifts; where no script has the shape, add one (bench:ci). - A command stays a script unless caching earns it a
vp runtask in the rootvite.config.ts— the three conditions, and what each rules out, areopenspec/specs/architecture/vite-plus/design.md, "The task cache". - A script is invoked bare —
pnpm <script>, neverpnpm run <script>— including under-Cand--filter.runis load-bearing only for a name that shadows a pnpm command;scripts/src/workspace/packages/packageScripts.test.tsfails on any other inside a manifest, so a workflow or a doc is where the collision is still unchecked. - A script a session writes a second time becomes a command. An inline Python, shell or node snippet run once in a scratchpad stays there (a backfill is the
backfillsskill's); the second time the same job is scripted it is a citty command underscripts(thecliskill) with itsai:*alias and its row inreferences/ai-scripts.md, so every session and team member runs the same tool through pnpm. - A tool's default configuration stays unless a measured reason still holds. An override, or a hook built to work around a default, is removed when its reason goes.
- How each fails, and the name that shadows a pnpm command:
references/pnpm-traps.md.
Reference pages
references/app-scripts.md— when running a script fromapps/web, or reaching for the binary under one.references/check-suite.md— when a change's tests are owed: the directory and the test paths.references/root-scripts.md— when choosing which root script runs a build, the suite, a bench, a dependency report or the release.references/ai-scripts.md— when a sweep, a review or a skill needs the script that runs its scan.references/typescript-scripts.md— when adding a.tsscript or choosing its runner.references/scripts-comments.md— when a script is shaped by something that should later be undone.references/pnpm-traps.md— when a filtered check passes too quickly, flags are forwarded through a script, arunprefix is in question, a script spawnspnpm, or a format or a node command fails on Windows.