spawn_audit_math
Audit numeric invariants in game functions without a browser. Sweeps input domains and reports exact arguments causing NaN, Infinity, divide-by-zero, or bound violations.
Instructions
Run declared numeric invariants over the game's pure functions, locally: no browser, no live room, no push, no credentials. Sweeps each function across its declared input domain and reports the exact arguments that broke a rule. Catches what playing the game catches slowly and unreliably — NaN and Infinity, divide-by-zero at boundary inputs, difficulty curves that flatten or invert, values escaping their declared bounds. Reads audit/math.json by default; pass manifest for another path or checks to try one inline without writing a file. Use spawn_audit_scan first to see what is auditable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | Return the full machine-readable report instead of the compact summary | |
| checks | No | Inline checks, same shape as the manifest's `checks`. Overrides the file. | |
| manifest | No | Manifest path, relative to the project. Default audit/math.json | |
| projectDir | No | Absolute path to the Spawn game project. Defaults to SPAWN_PROJECT_DIR or cwd. |