# Generate Mercury examples — Mercury LMS ## Prerequisites Use the source-launcher alias from [First steps](/mg/first-steps/llms.txt). `mg help gen examples` must list --check and --root. If gen is absent, this build needs the generator source update. Requires jonnify’s fiberfx/ui/src and design-explorer tree, not just an app starter. ## Workflow From the checkout root: ```sh git diff -- sites/mercury/playgrounds/design-explorer/generated mg gen examples --check mg gen examples git diff -- sites/mercury/playgrounds/design-explorer/generated mg gen examples --check ``` Inspect existing edits before generation overwrites outputs. First --check may exit 1 with MG-GEN-DRIFT; it writes nothing. Generation reads authored stories and writes adapted modules, catalog.ts and manifest.json under sites/mercury/playgrounds/design-explorer/generated. Successful commands report family/story/module/example counts. Final --check should exit 0; unchanged inputs may produce no Git diff. From elsewhere: `mg gen examples --check --root "$HOME/dev/jonnify"`, replacing the path with the actual checkout. Default root discovery searches upward. ## Recovery and scope - Exit 1 MG-GEN-DRIFT: review listed missing/differing files, regenerate when appropriate, recheck. - Other source refusal: inspect named input; the adapter could not handle it under its rules. - Exit 2: wrong checkout or invocation; correct it. - Exit 3: I/O could not complete; fix file access. Edit authored UI stories, then regenerate. Story play tests are omitted, and a matching catalog does not prove browser behavior. Use explorer build/browser checks separately. Next: [Automation](/mg/automation/llms.txt). ## Navigation - [Read this page in the browser](/mg/generate-examples) - [mg](/mg/llms.txt) - [llms.txt](/llms.txt) - [All English companions](/llms-full.txt) - [Sitemap](/sitemap.xml)