# Copilot Instructions

## Context

This repository uses a custom Gulp-based build process for JSCAD v1 style browser usage.
Favor minimal changes that preserve current task names and generated output behavior.

## JSCAD Specifics

- Treat scripts as browser-consumed JSCAD v1 style code.
- Ensure `util.init(CSG)` patterns remain valid when touching examples.
- Prefer JSDoc typing for options and return types on public utilities.

## Build And Test

- Install: `npm install`
- Start watch/dev tasks: `npm start`
- Build all: `npm run build`
- Tests (watch): `npm test`
- Tests (single run): `npm run test:run`

## Troubleshooting Checklist

- Missing dependencies: reinstall packages and rerun build.
- Runtime browser errors in generated files: rebuild and confirm injection/output folders updated.
- Geometry test instability: avoid nondeterministic inputs and assert explicit dimensions/tolerances.
- GL-related test failures: verify local native/headless GL setup before changing test baselines.