Scaffold
The scaffold drops a small, layered CSS project into your repo: an entry stylesheet, reset, base styles, hooks for primitives and semantics, and a place for modules. After write, those files are ordinary project source—edit them, commit them, and build them with the processor (or any other tool you prefer).
Scaffold is independent of the processor. You can adopt the tree without Argot’s build step, or process CSS that never came from a scaffold.
Command #
argot scaffold [--directory=path/to/directory]
Default target is the current working directory (or a path you pass). The
command refuses to overwrite existing project files unless you pass an explicit
force flag; prefer a dry-run first when unsure. See CLI
reference for flags, and
Architecture for the file map
(aligned with packaged templates/ and this site’s website/styles/).
What you get #
A typical layout (names may match styles/ in the app):
styles/
index.css # entry: @layer order + @import into layers
vars-primitive.css # color primitive custom properties
vars-semantic.css # semantic tokens custom properties (template)
reset.css # unopinionated CSS reset
base.css # document defaults
layout.css # placeholder for layout styles
modules/
index.css # placeholder to @import each module partial
This documentation site’s website/styles/ follows the same pattern and is a
live example of the architecture.
Ownership #
| Kind of file | Who owns it after scaffold |
|---|---|
| Entrypoint, reset, base, layout, modules | You — edit freely; scaffold does not reclaim them |
Semantic mappings (vars-semantic.css) |
You — fill and maintain values; regenerate only when you choose a fresh template |
| Primitive palette CSS | Generator-owned when produced by argot palette — regenerate from the JSON definition with --force |
Build output (dist/…) |
Processor — never confuses source with output |
Rules of thumb:
- Generation is never an implicit build step. Processing CSS does not run scaffold, palette, or semantics generation.
- Regeneration is explicit. Palette rewrite needs
--force(and supports--dry-run). Semantic template write currently overwrites the target path; point it at a path you intend to replace, or keep mappings in a file you own by hand. - Destructive replacement of consumer-owned source is refused by default on scaffold init.
Compose the pieces #
You do not have to take the whole tree:
- Scaffold only — get layers and file habits; assign token values yourself.
- Semantics only —
argot semanticswithout a full scaffold (see Semantic tokens). - Palette only —
argot paletteinto any primitives file (see Palette generator). - Full path — scaffold → palette → fill semantics →
argot styles/styles.css dist/styles.css.
Next #
- Architecture — cascade layers and file responsibilities
- Custom property structure — primitive → semantic → module
- Getting started