l-generator-cli-tester
Test a single create-zudo-doc CLI generation pattern. Scaffolds a project, builds it, starts dev server, and verifies expected features. Use when testing generator output for a specific pattern.
Generator CLI Pattern Tester
Test a single create-zudo-doc CLI generation pattern by scaffolding a project, building it, running the dev server briefly, and verifying the expected files and settings.
Usage
/ l- generator- cli- tester <pattern>
/ l- generator- cli- tester <pattern> - - headlessWhere <pattern> is one of the test patterns listed below.
Options
--headless— After standard checks, also run headless browser verification using/to confirm pages actually render (Step 8.5). Without this flag, headless checks are skipped.headless- browser
Test Patterns
| Pattern | Description |
|---|---|
barebone | Everything OFF — minimal project |
search | Only search enabled |
i18n | Only i18n enabled |
sidebar-filter | Only sidebar filter enabled |
claude-resources | Only claude resources enabled |
design-token-panel | Only design token panel enabled (uses --design-token-panel CLI flag) |
light-dark | Light-dark color mode |
lang-ja | Japanese as default language |
all-features | Everything ON |
Step 0: Build the CLI
Before running any test, set REPO_ROOT and build the CLI:
REPO_ROOT=$(git rev-parse --show-toplevel)
cd packages/create-zudo-doc && pnpm buildIf the build fails, stop and report the error.
Step 1: Create Temp Directory
mkdir -p __inbox/generator-test-<pattern>Step 2: Run the Generator
Set REPO_ROOT to the repository root (absolute path). Run the generator from within the temp directory. Always use --no-install to handle installation separately.
CLI Commands per Pattern
barebone:
cd __inbox/generator-test-barebone && \
node $REPO_ROOT/packages/create-zudo-doc/dist/index.js test-project --yes \
--no-search --no-sidebar-filter --no-i18n --no-claude-resources \
--no-image-enlarge --no-tag-governance \
--color-scheme-mode single --scheme "Default Dark" --no-installsearch:
cd __inbox/generator-test-search && \
node $REPO_ROOT/packages/create-zudo-doc/dist/index.js test-project --yes \
--search --no-sidebar-filter --no-i18n --no-claude-resources \
--color-scheme-mode single --scheme "Default Dark" --no-installi18n:
cd __inbox/generator-test-i18n && \
node $REPO_ROOT/packages/create-zudo-doc/dist/index.js test-project --yes \
--no-search --no-sidebar-filter --i18n --no-claude-resources \
--color-scheme-mode single --scheme "Default Dark" --no-installsidebar-filter:
cd __inbox/generator-test-sidebar-filter && \
node $REPO_ROOT/packages/create-zudo-doc/dist/index.js test-project --yes \
--no-search --sidebar-filter --no-i18n --no-claude-resources \
--color-scheme-mode single --scheme "Default Dark" --no-installNote:
sidebarFilteris built intosidebar-tree.tsxand ships in base by design (seesrc/); it is NOT tracked infeatures/ index. ts: 37 settings.ts(no field emitted).--no-sidebar-filtercurrently has no structural effect. This test verifies the flag does not cause errors.
claude-resources:
cd __inbox/generator-test-claude-resources && \
node $REPO_ROOT/packages/create-zudo-doc/dist/index.js test-project --yes \
--no-search --no-sidebar-filter --no-i18n --claude-resources \
--color-scheme-mode single --scheme "Default Dark" --no-installdesign-token-panel:
cd __inbox/generator-test-design-token-panel && \
node $REPO_ROOT/packages/create-zudo-doc/dist/index.js test-project --yes \
--no-search --no-sidebar-filter --no-i18n --no-claude-resources \
--no-image-enlarge --no-tag-governance --design-token-panel \
--color-scheme-mode single --scheme "Default Dark" --no-installlight-dark:
cd __inbox/generator-test-light-dark && \
node $REPO_ROOT/packages/create-zudo-doc/dist/index.js test-project --yes \
--no-search --no-sidebar-filter --no-i18n --no-claude-resources \
--color-scheme-mode light-dark --light-scheme "Default Light" --dark-scheme "Default Dark" \
--no-installlang-ja:
cd __inbox/generator-test-lang-ja && \
node $REPO_ROOT/packages/create-zudo-doc/dist/index.js test-project --yes \
--no-search --no-sidebar-filter --no-i18n --no-claude-resources \
--lang ja --color-scheme-mode single --scheme "Default Dark" --no-installall-features:
cd __inbox/generator-test-all-features && \
node $REPO_ROOT/packages/create-zudo-doc/dist/index.js test-project --yes \
--i18n --search --sidebar-filter --claude-resources --claude-skills \
--design-token-panel --sidebar-resizer --sidebar-toggle --versioning \
--doc-history --body-foot-util --llms-txt --skill-symlinker \
--footer-nav-group --image-enlarge --footer-copyright --changelog \
--tag-governance --doc-tags --footer-taglist \
--color-scheme-mode light-dark --light-scheme "Default Light" \
--dark-scheme "Default Dark" --default-mode dark \
--github-url "https://github.com/example/test-project" --no-installStep 3: Install Dependencies
cd __inbox/generator-test-<pattern>/test-project && pnpm installIf installation fails, report the error and stop.
Step 4: Build
cd __inbox/generator-test-<pattern>/test-project && pnpm buildIf the build fails, report the error and stop.
Step 5: Dev Server Smoke Test
Start the dev server, wait for startup, check it didn't crash, then kill it:
cd __inbox/generator-test-<pattern>/test-project && \
timeout 15 pnpm dev 2>&1 &
DEV_PID=$!
sleep 8
if kill -0 $DEV_PID 2>/dev/null; then
echo "DEV_SERVER: OK — process still running"
kill $DEV_PID 2>/dev/null
wait $DEV_PID 2>/dev/null
else
wait $DEV_PID
EXIT_CODE=$?
echo "DEV_SERVER: FAILED — process exited with code $EXIT_CODE"
fiIf the dev server crashed, report the error.
Step 6: Verify Files
Check that expected files exist or don't exist in __inbox/generator-test-<pattern>/test-project/.
File Expectations per Pattern
Use these tables to verify. Check each file with test -e <path>.
Note on
theme-toggle.tsx: this component always ships on disk as part of the base template — whether it renders at runtime is gated by thecolorModesetting. The expectation tables below therefore only assert PRESENT for thelight-darkandall-featurespatterns and do not assert ABSENT elsewhere.Note on file extensions: all components are
.tsx— there are no.astrofiles in the generated project. The generator uses zfb/Preact, not Astro.
barebone — minimal, no optional features:
| File | Expected |
|---|---|
src/ | ABSENT |
src/ | ABSENT |
src/ | PRESENT (ships in base unconditionally, runtime-gated by the docHistory setting) |
src/ | ABSENT |
src/ | ABSENT |
src/ | PRESENT |
src/ | PRESENT |
zfb.config.ts | PRESENT |
search:
| File | Expected |
|---|---|
src/ | ABSENT |
src/ | ABSENT |
src/ | PRESENT |
src/ | PRESENT |
Note: the
searchfeature wires search via the zfb config andpackage.jsondeps; it does not copy a dedicated search component file tosrc/components/. Verify search is enabled by checkingpackage.jsondevDependencies for"pagefind"and dependencies for"minisearch"; checkzfb.config.tsforsearch-index-plugin.mjs.
i18n:
| File | Expected |
|---|---|
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | ABSENT |
src/ | ABSENT |
sidebar-filter:
| File | Expected |
|---|---|
src/ | PRESENT |
src/ | ABSENT |
src/ | ABSENT |
Note:
sidebar-tree.tsxalways ships with the base template; thesidebarFilterflag controls whether filtering UI is active at runtime.sidebarFilteris NOT emitted as a field insettings.ts(no field). Confirm viazfb.config.tsor runtime behavior — not a settings field.
claude-resources:
| File | Expected |
|---|---|
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | ABSENT |
design-token-panel:
| File | Expected |
|---|---|
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | ABSENT |
light-dark:
| File | Expected |
|---|---|
src/ | PRESENT |
src/ | ABSENT |
src/ | ABSENT |
lang-ja:
| File | Expected |
|---|---|
src/ | PRESENT |
src/ | PRESENT |
src/ | ABSENT |
all-features:
| File | Expected |
|---|---|
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
src/ | PRESENT |
scripts/ | PRESENT |
scripts/ | PRESENT |
pages/ | PRESENT |
Step 7: Verify Settings
Read _ and check:
Settings Expectations per Pattern
barebone:
colorScheme: "Default Dark"colorMode: falselocales: {}(empty)imageEnlarge: falsetagGovernance: "off"(notags:audit/tags:suggestscripts, no string-similarity/pluralize devDeps)tagVocabulary: falsedesignTokenPanel: falseclaudeResources: false
search:
colorScheme: "Default Dark"colorMode: false
i18n:
locales:should containjaentry withdir:"src/ content/ docs- ja"
sidebar-filter:
Same as barebone but with
sidebarFilterdefaulting to included
claude-resources:
claudeResources:should be truthy (object withclaudeDir)
design-token-panel:
designTokenPanel: true
light-dark:
colorMode:should be an object withdefaultMode,lightScheme: "Default Light",darkScheme: "Default Dark"
lang-ja:
colorScheme: "Default Dark"Check
src/forconfig/ settings. ts defaultLocale: "ja"— this is the authoritative field emitted by settings-gen.ts;src/derivesconfig/ i18n. ts defaultLocalefromsettings.defaultLocaleat runtime and does not hardcode it
all-features:
colorMode:should be an object (light-dark mode)locales:should containjaentryclaudeResources:should be truthydesignTokenPanel: true
Step 8: Compare Against Showcase
For the feature being tested, briefly compare the generated project against the main zudo-doc showcase:
Read the equivalent component/config in
src/(the showcase) and in the generated projectVerify they share the same structure (the generated version may have stripped imports/features, but the enabled feature's code should match)
This is a sanity check, not a full diff. Focus on the feature under test.
Step 8.5: Headless Browser Check (only with --headless)
Skip this step unless --headless was passed.
Start the dev server and use / (Tier 1: headless-check.js) to verify pages actually render in a browser.
8.5a. Start dev server
cd __inbox/generator-test-<pattern>/test-project
pnpm dev --port 14350 &
DEV_PID=$!
sleep 68.5b. Check pages with headless browser
Check the index page and a docs page:
HC=~/.claude/skills/headless-browser/scripts/headless-check.js
node $HC --url "http://localhost:14350/" --screenshot viewport --no-block-resources
node $HC --url "http://localhost:14350/docs/getting-started" --screenshot viewport --no-block-resourcesFor i18n and all-features patterns, also check the Japanese page:
node $HC --url "http://localhost:14350/ja/docs/getting-started" --screenshot viewport --no-block-resources8.5c. Verify results
All pages should return
statusCode: 200pageErrorsshould be empty (no JS errors)networkErrors.failedRequests— ignorenet::ERR_ABORTED(Vite HMR re-optimization, normal in dev). Flag any other failures.Read the screenshots with the Read tool and visually confirm:
search: search icon (magnifying glass) visible in header
i18n: "EN / JA" language switcher in header
light-dark: theme toggle icon in header
design-token-panel: design token icon in header
claude-resources: page renders without errors
all-features: all icons present (search, theme toggle, language switcher, color tweak)
barebone: no extra icons in header (no search, no theme toggle, no language switcher)
lang-ja: Japanese content ("ようこそ" title)
8.5d. Kill dev server
kill $DEV_PID 2>/dev/null; wait $DEV_PID 2>/dev/nullStep 9: Clean Up
rm -rf ./__inbox/generator-test-<pattern>Always use relative path with . prefix for cleanup.
Step 10: Report Results
Provide a clear pass/fail report:
# # Pattern: <pattern>
# # # Scaffold: PASS/ FAIL
# # # Install: PASS/ FAIL
# # # Build: PASS/ FAIL
# # # Dev Server: PASS/ FAIL
# # # File Verification: PASS/ FAIL
- [list any unexpected files present/ absent]
# # # Settings Verification: PASS/ FAIL
- [list any mismatches]
# # # Showcase Comparison: PASS/ FAIL
- [notes]
# # # Headless Browser: PASS/ FAIL/ SKIPPED
- [only if - - headless was passed]
# # # Overall: PASS/ FAILImportant Notes
Always
cdback to the repo root between major steps (use absolute paths)The
--yesflag auto-fills all unspecified options with defaults. Feature defaults with--yes: search=true, sidebarFilter=true, imageEnlarge=true, tagGovernance=true, i18n=false, claudeResources=false, designTokenPanel=false (all other features false)Use
--no-installwith CLI to prevent auto-install, then install manually for better error visibilitysidebarFilteris built intosidebar-tree.tsxby design (not a TODO); no strip step exists in the additive architectureThe dev server smoke test uses
pnpm dev(generated projects have a singledevscript)If any step fails, still report all steps attempted before stopping
The
--headlessflag enables Step 8.5 (headless browser visual check). Without it, only process-level checks are performed