UNAVAILABLE IN THIS PROJECT
This skill drives a shell scaffolder that
prometheus-skills-minidoes not ship. The scaffolders are 2,879 lines of bash across 7 files that generate React/Vite/Tauri/Flutter starter projects; porting them is a separate change from the refiner core, and this project forbids executing a.shat all (C1, C3) — so the commands below will not run here.The skill is carried rather than deleted so its interface and intent stay visible, and it says so loudly rather than appearing functional and failing on invocation. A loud absence beats a silent breakage.
Follow-up: port the scaffolders to Node, or drop these skills. Tracked in
.prometheus/decisions.md(2026-09-21, scope of the artifact-refiner port).
Scaffold React + Vite
Take a refined React TSX artifact (from ideation, refine-ui, or
convert-htmx-react) and a brand TOML, produce a buildable project on disk.
Setup
- Set
artifact_type: scaffold - Set
content_type: direct:scaffold - Load domain adapter from
references/domain/ui.md - Load convention docs:
references/scaffolds/clean-architecture.mdreferences/scaffolds/kebab-case-rename.md
User Input
The user will provide: $ARGUMENTS
Parse the arguments for:
--name <artifact-name>(required) — feature folder name, kebab-cased automatically--source <path-to-tsx>(required) — the refined TSX artifact--brand <brand-name>(required) — brand TOML stem underassets/library/brands/--target <path>(required) — output directory (must not exist; v1 has no overwrite)--with-axum-wrapper(optional flag) — also generate<target>/server/with the Rust binary
Procedure
Dispatch to the orchestration script:
bash scripts/scaffold-react-vite.sh \
--name "${NAME}" \
--source "${SOURCE_TSX}" \
--brand "${BRAND}" \
--target "${TARGET}" \
${WITH_AXUM:+--with-axum-wrapper}
The script:
- Pre-flight: verifies
pnpm,node,template-forgeare present. - Runs
pnpm dlx shadcn@latest init --template vite --base base --yesto scaffold the React stack. - Renders brand-tokens CSS via
template-forge render --template vite-shell-css. - Reorganizes the default tree into clean-architecture layout (
src/{app,features,shared}/). - Patches the source TSX into
src/features/<name>/:- Default export →
components/<name>.tsx - Named hooks (
useFoo) →hooks/use-foo.ts - Other named exports → routed per
kebab-case-rename.mdheuristic - Auto-
shadcn addany@/shared/components/ui/<name>imports it finds
- Default export →
- Updates
components.json,tsconfig.jsonaliases. - Rewrites
src/main.tsxto consume the feature. - Writes
<target>/README.mdrecording provenance. - Runs
pnpm install && pnpm buildto verify. - If
--with-axum-wrapper, chains intoscaffold-react-vite-axum.sh.
Architectural Baseline
Every scaffolded project conforms to the state architecture documented at
references/scaffolds/state-architecture.md:
- Components → Hooks → Stores → I/O (strict dependency rule, enforced via generated
eslint.config.mjs) - zustand + immer installed automatically;
src/features/<f>/stores/andsrc/app/stores/directories created - Local
useStateallowed only for ephemeral single-component state (toggles, drafts) - Stores own all I/O and realtime subscriptions; stores never import React
- TSX always, never JSX
The scaffolder routes named exports during patching:
useXxxStore(matches/^use[A-Z].*Store$/) →src/features/<f>/stores/useXxx(matches/^use[A-Z]/but not ending inStore) →src/features/<f>/hooks/- Default-exported component →
src/features/<f>/components/<feature>.tsx
Responsive primitives are emitted into every scaffold:
src/shared/hooks/use-breakpoint.ts(viewport-classifier hook)src/shared/hooks/use-is-mobile.tssrc/app/responsive-shell.tsx(desktop/mobile layout switcher)src/shared/lib/runtime.ts(isTauri()helper)- Brand CSS template includes safe-area-inset variables
Default Constraints
- Target directory must not exist (no overwrite in v1).
- Source TSX must be a single .tsx file.
- File names are always kebab-case.
- React component identifiers stay PascalCase (only files are renamed).
- Hook function names stay camelCase with
use*prefix. - Features cannot import from other features (clean architecture rule).
- Tailwind v4 CSS-vars (
--background,--foreground, etc.) and brand-tokens (--color-bg,--color-ember, etc.) live in separate namespaces and never collide. - shadcn components land in
src/shared/components/ui/.
When to Use the Axum Wrapper
Add --with-axum-wrapper when the deliverable is a single-binary self-contained server:
- Distributing a desktop app or kiosk that ships one executable.
- Deploying to a container, edge runtime, or VM without a Node.js runtime.
- Wanting to add Rust API routes alongside the SPA (the generated
main.rshas axum visible — just add routes).
Do not use the wrapper when:
- The frontend will be deployed to a static-only host (Vercel, Netlify static, S3).
- You want hot-reload during frontend development (use
pnpm devdirectly; the binary is for production).
Output Contract
artifact_type: scaffold
content_type: direct:scaffold
outputs:
- path: <target>/
description: Buildable Vite + React 19 + TS + shadcn-on-Base-UI project
- path: <target>/server/ # only when --with-axum-wrapper
description: Rust + Axum binary that embeds and serves the SPA
constraints_satisfied:
- vite_8_react_19_tailwind_v4
- shadcn_on_base_ui
- kebab_case_file_names
- feature_based_clean_architecture
- brand_tokens_applied
- pnpm_build_succeeds
- cargo_check_succeeds # when --with-axum-wrapper
References
references/scaffolds/clean-architecture.md— directory + dependency rulesreferences/scaffolds/kebab-case-rename.md— renaming heuristictools/template-forge-rs/templates/vite-shell-css.html— brand CSS templateopenspec/changes/phase-2-scaffold-react-vite/{proposal,tasks,design}.md— design rationale