21 / IMPLEMENTATION
Implementation
Source files, generated outputs, build commands, validation, and extension procedures.
Agent Instructions / extend
You are extending the ROFL Design System. Read index.md and the relevant section first. Edit readable shared sources in ssi/newDesign/src/ and build with .github/tools/build-assets.mjs. Reuse current components, semantic tokens, style registries, and asset/sound contracts. Update system.source.json or bots.source.json, regenerate with tools/build_design_system.mjs, and run both builders with --check plus focused tests. Add independent local previews and explicit provenance for new assets or behaviors. Preserve stable IDs and licenses. Keep generated files reproducible, fixtures fictional, and public manifests free of secrets or private state. Keep reference paragraphs to 120 words or fewer. Do not merge or deploy unless explicitly authorized. For site-wide motion, follow the footer's keys and rollback switches and the release order in /design/sections/motion.md. Follow WCAG 2.2 AA for new or changed content: semantic HTML, keyboard access, visible focus, readable contrast in every theme, text alternatives, labeled controls, and explicit errors. Support zoom/reflow, respect reduced motion, and keep sound optional. Read /design/sections/accessibility.md for acceptance checks. Report unresolved barriers; automated checks alone do not establish conformance.
Start with index.md. It is a small routing guide, not the entire asset catalog. Each section has its own /design/ID.htm page, and each component and layout has its own /design/components/ID.htm or /design/layouts/ID.htm page, all linked from the sidebar, search, and previous/next controls. Fetch only the relevant /design/sections/ID.md; each starts with a task-scoped Agent Instructions block and the shared accessibility rule. Separate token, asset, sound, and bot JSON files let an agent ask for the data it needs without loading everything.
Edit shared CSS, JS, and SSI in ssi/newDesign/src/, then run node .github/tools/build-assets.mjs and its --check mode. Commit sources and compiled outputs; deploy only outputs. Style scripts and artwork are not built. Preserve cache-busting versions when changing served assets, including the borrowed CSS/JS URLs in design previews.
Edit system.source.json for shared prose/prompts, components.source.json for the component catalog, illustrations.source.json for illustration evidence and production guidance, and bots.source.json for reviewed profile summaries. After the shared asset build, tools/build_design_system.mjs derives the HTML, section Markdown, inventory, token declarations, theme helpers, component examples, portable illustration SVGs, extracted inline SVGs, and synthesized WAVs. Generated files are checked in because this site serves files; there is no production Node build step.
For a new section, add it to one of the groups at the top of system.source.json and place its entry in the same position in sections, numbering its eyebrow to match. The groups drive the sidebar, the mobile drawer, the overview tiles, index.md, guide.md, manifest.json, and the previous/next order, and the build fails if any of them disagree. Give the section its own KIRUPAicon.
For a new component, start with the working component examples, which builds each component's own page from components.source.json, reuse their classes and semantic roles, add only the missing behavior, and add a meaningful specimen. Set its zero-based afterParagraph to place it beside its explanation.
For a new visual style, follow header.shtml's registry, scoped style CSS/JS, icon layers, sound roles, and globe renderer contract. Refresh the real screenshots with node tools/capture_design_screenshots.mjs; its manifest records source URLs, modes, dimensions, dates, and hashes separately from the icon inventory.
Run node tools/build_design_system.mjs, then node tools/build_design_system.mjs --check. The check fails on stale or orphaned generated outputs and records explicit source hashes. Run node --test tools/design_system.test.mjs for route/data/source contracts. Start the SSI-aware, read-only preview with php -S 127.0.0.1:8876 -t . design/index.php. With Playwright available, run node tools/design_system.browser.mjs for rendering, independent themes, audio, downloads, emoji, and keyboard/mobile behavior. Run node tools/design_catalogs.browser.mjs for every component variant, illustration, portable font, local search, and no-JavaScript fallback. DESIGN_BASE_URL overrides the server; DESIGN_PLAYWRIGHT_PATH can point to an existing Playwright module without adding a site dependency.
Site-wide motion has its own release order. kirupa.js loads motion.js and motion.css, and reveal.js and reveal.css, after the page's load event when the browser is idle, under the keys in footer.shtml's kirupaBackgroundIcons and kirupaContentReveals switches. To change them:
- Edit
ssi/newDesign/src/, runnode .github/tools/build-assets.mjs, then bump the footer'svfor the layer you changed and thekirupa.jskey. - Publish the CSS and JS first, then
kirupa.js, then any content pages, andfooter.shtmllast. Byte-verify each upload and runpython3 tools/deployment/check.py --live-only. - Never request a new
?v=URL before its upload: the edge caches CSS and JS for about 31 days under each exact URL. - Roll back with
on: falsein the footer's switch, which turns a layer off everywhere with no other change, and use fresh keys for any rollback of the files themselves. - Opt pages and elements out with
data-live-demo,data-reveal-skip,data-motion-avoid,data-motion, ordata-reveal. - Run
node tools/motion.browser.mjsin WebKit and Chromium, then rebuild the design system:design/generated/motion-specimen-config.jscopies the footer's keys for the Motion specimens.
A release is a reviewed source change, not permission to deploy. Follow the deployment instructions for the requested release only, drift-check against live files before an authorized upload, and preserve the legacy Design Center archive. Do not scrape private state into public manifests.
- Do update the source of truth and regenerate; do not hand-patch a generated inventory or WAV.
- Do keep stable IDs and source links, and document intentional exclusions.
- Do not let a generated helper become an independently maintained implementation.
- Do keep each paragraph to one idea and 120 words or fewer. Split a longer one where the topic shifts, or turn parallel facts into a list or table with a sentence introducing it. The build fails on longer paragraphs.