Build a Deck¶
Build Loop¶
- Create or update a
deck-designintent document indocs/decks/. - Pick a base from
src/deck-templates/if useful. - Assemble pages with page styles from
src/page-templates/. - Fill content using block styles from
src/blocks/. - Generate or update the deck app under
src/decks/. - Preview in local dev server.
- Refine the intent and repeat.
Local Commands¶
npm run build
npm run start
npm run build:update:deck -- <deck-id>
npm run serve:deck -- <deck-id>
npm run serve:local
Single-Deck Loop¶
Use a single deck as the unit of work.
- Update
docs/decks/<deck-id>.md - Run
npm run build:update:deck -- <deck-id> - Run
npm run serve:local - Review the rendered deck
- Refine the intent and repeat
Promotion Workflow¶
deck-demo is the canonical validation-and-reference deck.
Work there first when proving:
- deck metadata conventions
- company-wide visual base rules
- page layout behavior
- block designs
Use Promote <standard> with this exact meaning:
- Decide where the proven element should persist:
- system-wide design in
src/shared/design-system/ - deck-wide standard in
src/deck-templates/ - page layout standard in
src/page-templates/ - block design standard in
src/blocks/ - intent/default or workflow rule in
docs/ - Codify the proven element in the correct reusable artifact so future decks can consume it.
- Remove the promoted element from one-off ownership in
deck-demo, reapply the promoted standard from its new home, and verify the reproduced result matches the proven experiment.
Rule:
- Do not leave a proven pattern living only inside
deck-demo. - Do not promote an experiment until the rendered result is accepted.
- After promotion,
deck-demoshould consume the standard instead of owning it.
Standard Precedence¶
When standards overlap, use this override precedence:
system > deck > page > block
Meaning:
- system-wide standards define the baseline constraints for everything below them
- deck-wide standards are subject to system-wide constraints
- page standards are subject to system-wide and deck-wide constraints
- block standards are subject to system-wide, deck-wide, and page-level constraints
If a rule belongs at a higher layer, promote it there instead of re-implementing it at a lower layer.
Rules¶
- Treat
docs/decks/*.mdas the human-edited source of truth for deck intent. - Treat the React/Spectacle deck app as the primary generated product.
- Keep export/rendering concerns out of the core deck/page prop model.
- Prefer composition over custom slide code.
- If a block is missing, add it to
src/blocks/andsrc/blocks/registry.ts. - If a layout is missing, add it to
src/page-templates/andsrc/page-templates/registry.ts. - Do not modify
src/shared/unless you are a designated maintainer.