How Craft turns rules into output you can verify

A connected example built on repository data · version 1.0.0

A system becomes a tool when it describes the whole path to the result

Craft ties composition, standalone assets and checks into one repeatable process

The core stays small and testable

35
interface components
19
interface fragments
15
canonical slide fragments

Source: scripts/craft.json · version 1.0.0

From task to standalone file in four explicit steps

01

Define

Audience, task, real data and the conclusion you need.

02

Scaffold

scaffold.py prepares a minimal format and local assets.

03

Compose

compose.py inserts fragments under a checked contract.

04

Check

check_project.py checks structure, resources, screen and PDF.

The working loop fits in three commands

python3 scripts/scaffold.py ./report --surface interface --title "Report"

python3 scripts/compose.py ./report --fragment section \
  --set SECTION_ID=summary --set SECTION_TITLE="Conclusion" \
  --set SECTION_SUMMARY="What matters" \
  --html 'SECTION_CONTENT=<p>A verifiable result.</p>'

python3 scripts/check_project.py ./report

compose.py escapes text, takes HTML only when you pass it explicitly, and --dry-run leaves the project unchanged.

Each layer owns its own contract

Contracts of the main Craft parts
LayerWhat it pins downHow it is checked
TokensColor, type, rhythmStatic contracts
FragmentsMarkup and placeholder typesRegistry and composition
FormatScreen, theme, keyboardChromium at three widths
ResultStandalone HTML and PDFValidator and print

The catalog tests the visual language. A finished piece tests how its parts work together.

68 catalog pages test the range. This deck tests a connected story

Source: the expanded pages of catalog/slides/index.html, recorded in scripts/craft.json.

From an empty file to a checked result

Documentation

Open the documentation →