Scripts and generated files

The scripts/ folders, the files the scripts generate, the rule that only a script changes them, and the one route list every browser tool reads.

Updated

Every command runs as pnpm <name>, and the tools index lists each one with what it does. Skills and documents name commands, never script paths, so a script can move without breaking them. Every script prints its usage with --help.

The folders

FolderWhat it holds
scripts/libShared code: the repository root, the help printer and site-pages.mjs, the route list
scripts/lintThe lints and their tests: lines, type, radius, heads, practices, registries, copies, public, pictures and SEO
scripts/checkThe page check (pagecheck/), the captures and the gallery shoot
scripts/buildThe generators: skills, deck, marks, the Inter subsets, thumbnails, motion, tools, updated dates
scripts/skillsThe skill installer, the usage counter and the skill-script test runner
scripts/mediaThe artifact picture cutter, mood-tone

Generated files

These files are committed, so the site builds from them alone, and they change only through their scripts:

FileWritten by
src/lib/updated.tspnpm build:updated: each page's last change, from git
src/lib/skills.ts, skills/README.mdpnpm build:skills
docs/TOOLS.mdpnpm build:tools
public/brand-deck.html, public/deck-assets/pnpm build:deck
public/marks/pnpm build:marks
public/fonts/inter/, the social card faces in src/app/og/pnpm build:inter
public/shots/thumb/pnpm build:thumbs, from the captures pnpm capture:pages takes
src/lib/motion.tspnpm build:motion, run only when the Videos session hands a film over

pnpm gen:all runs them in this order: skills, deck, marks, Inter, thumbnails, motion (skipped where the full motion/ folder is absent), tools, then updated dates last, since it dates the changes the others leave uncommitted. A merge runs it and commits what it writes.

The route list

siteRoutes() in scripts/lib/site-pages.mjs is the one list of routes every browser tool walks. Each row names its route, its source folders and its tools: check (the page check), live (the live lints), lines (the line audit of the shell) and capture (the thumbnails). The page check, lint:lines:shell, the live lints and the captures all read it, so a new page is added in one place.

First slugs read by regex

Five rows of the route list point at a page whose slug comes from data: the first skill, the first motion package, the first archive entry, the first exploration and the newest post. siteRoutes() reads each slug from its source file with a regular expression, so the list follows the data with no second registry to keep.

RouteRead fromWhat the expression matches
The first skillsrc/lib/skills.ts, generatedthe first id: '<slug>' after export const SKILLS
The first motion packagesrc/lib/motion.ts, generatedthe first quoted string after export const MOTION_PACKAGE_SLUGS
The first archive entrysrc/lib/archive.tsthe first entry('<slug>'
The first explorationsrc/lib/directions.tsthe first slug: '<slug>' in a DIRECTIONS entry without site: true
The newest postcontent/blog/*.mdxthe latest date: in the frontmatter

The expressions read single quotes and exact field names. A generator that changes its output shape, by writing double quotes or renaming a field, breaks every browser gate at once: the page check, lint:lines:shell, the live lints and the captures all start from this list. firstSlug() throws when a file holds no match, so a renamed registry fails the run with the file's name instead of auditing a 404 page as if it were clean. Check 3 of pnpm lint:registries runs the four registry expressions in lint:static, so the break shows before any browser starts.

On this page