On this page
Revision 1 November 5, 2026 scripts-policy.md

Script and build policy

Type: Policy. When can you change scripts, build and test pipeline.

Changing a startup command can affect operation order, output files, and reproducibility. Work on scripts therefore starts with the task: which command behavior changes, and why the existing process is insufficient. Existing commands are preserved when the task only concerns the code they call.

Prohibited:

  • add file deletion, including cleanup of build output before builds or tests, through a separate command or a call from code
  • change the order of commands
  • add &&

Node.js and npm conventions and examples are collected in Languages and platforms.

If, after moving the files to dist, stale artifacts remain, remove them point by point in a separate operation. Don't change the project's permanent build/test pipeline for this.

Deleting files is allowed only if the task is explicitly specified.

Additional examples

Acceptable:

  • add a new script only if the task directly requires a new entrypoint
  • change the implementation of the called file without changing the launch script itself, if the task is about the behavior of this file

Good practices

  • consider scripts as part of the project contract, and not as a service detail
  • before changing the script, check if the order of steps, side effects and entry points has changed

Configuration and verification

Compiler, bundler, framework and test config are part of the build/runtime wiring. A change to alias, adapter, SSR, include pattern, test environment or assertion requirements is considered a change to the contract. This change should not suppress an application defect or environmental problem.

Generated output is not edited manually and does not serve as confirmation of the operation of the new source. Build-time and runtime variables retain the owners described in the project's configuration and documentation. Secrets do not go into package scripts, public variables, or examples with real values.

Each affected command is checked separately: exit status, side effects, output artifacts and compatibility of local and production workflow. A failed command is indicated explicitly in the report.