Ghostmaxxing A public lab for testing camouflage
Maintain the project

Know what each command reads, writes, and replaces.

An operational index for documentation, tests, validation, source exports, generated assets, and packaging.

Run these commands from the repository root. Review generated diffs. A successful exit proves only that the script completed its own checks.

Routine commands

Implemented in packages.json

TaskCommandOutput or effect
Build functional pagesnpm run docs:functionalWrites the public pages under docs/ plus docs.html.
Capture guide screenshotsnpm run docs:screenshots -- --locale en,itOverwrites stable PNGs, manifest, and index under docs/assets/screenshots/.
Build API referencenpm run docsWrites generated JSDoc under docs/jsdoc/.
Clean and rebuild APInpm run docs:rebuildDeletes only docs/jsdoc/, then regenerates it.
Validate all Ghostylesnpm run validate:ghostylesReports errors and warnings; stops on the first failed file.
Run fast checksnpm run checkValidates Ghostyles, then runs unit tests.
Run all testsnpm testRuns unit tests, then Playwright end-to-end tests.
Build architecture mapnpm run codemapWrites the JSON graph and standalone HTML viewer.
Extract translationsnpm run i18n:extractOverwrites POT and pipe-delimited summary files.
Documentation workflow

Functional HTML and JSDoc are separate outputs.

01

Edit source

Update docs-src/en/*.body.html for functional pages, JSDOC_index.md for the technical home, or source comments and tutorials for API detail.

02

Generate

Run npm run docs:functional. Run npm run docs:rebuild when JSDoc inputs changed.

03

Capture only when needed

Use committed deterministic fixtures. The default screenshot run excludes the optional Face Brush sequence. A Transfer result requires the optional Before, After, and Target trio.

04

Review evidence

Inspect dimensions, capture region, and provenance in manifest.json. Do not publish synthetic states as observed experiments.

05

Verify routes and copy

Open the landing page, every changed guide, one JSDoc module, mobile layout, and missing-image behaviour. Extract visible text for editorial review.

scripts-dev inventory

Every support script has a boundary.

build-functional-docs.cjs

Wraps English body fragments in shared site chrome and documentation navigation. Writes ten static pages under docs/ and the docs.html compatibility redirect. It does not translate content or generate JSDoc.

capture-doc-screenshots.cjs

Drives Lab and Video Loader with Playwright fixtures. Writes stable screenshots and records pixel dimensions, aspect ratio, crop, viewport, and provenance in the manifest. Brush is an optional path.

build-codemap.js

Parses top-level lab-js/*.js, imports, exports, events, and root HTML entries into codemap/codemap.json. It is a static heuristic, not a runtime trace.

build-codemap-html.js

Injects the JSON map into codemap/codemap-template.html and writes a standalone viewer. Check that the template marker was actually replaced.

validate-plugin.js

Checks one Ghostyle header and supported export patterns without executing the module. Its regular-expression checks cover only a subset of the full authoring policy.

extract-i18n-pot.cjs

Evaluates the translation catalogue and overwrites the POT and summary files. It extracts interface strings, not functional documentation prose.

extract-text-only.js

Extracts reviewable visible copy, metadata, and accessibility attributes from public HTML and structured data. It is an editorial aid, not a complete DOM or localisation audit.

code2prompt.js

Builds filtered source bundles for design, runtime, tests, copy, map, or broad review. Its include and exclude rules are executable configuration; inspect the produced bundle instead of relying only on the estimated tree.

update-coverage-badge.js

Reads Vitest JSON statement coverage and rewrites the marked badge block in README.md. Run coverage first and inspect for an UNKNOWN result.

install-client-interface.cjs

Clears and repopulates the fixed sibling backend client-interface directory. This is the destructive support command: verify the resolved target before running it.

test-upload-consent-post.cjs

Sends an actual multipart clip to the configured backend endpoint and prints response data. It is not a dry run, does not test the browser consent UI, and does not delete the upload.

build-logo.py

Overwrites the named SVG logo set and, when CairoSVG works, PNG icon variants. Reconcile its current geometry and touch-icon output path with the live brand system before regeneration.

Before hand-off

Reminder before issuing a new release.

  • Run the relevant unit and end-to-end tests, not only npm run check.
  • Validate every Ghostyle and inspect warnings.
  • Generate functional docs, JSDoc, references, and the codemap when their sources changed.
  • Check English copy and translation catalogues separately.
  • Open Lab, Loader, Transfer, the docs landing, one guide, and one API page through the same server path used for deployment.
  • Inspect the packaged client directory and all “skip missing” messages before deployment.