A connected example built on repository data · version 1.0.0
Craft ties composition, standalone assets and checks into one repeatable process
The core stays small and testable
Source: scripts/craft.json · version 1.0.0
From task to standalone file in four explicit steps
Audience, task, real data and the conclusion you need.
scaffold.py prepares a minimal format and local assets.
compose.py inserts fragments under a checked contract.
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
| Layer | What it pins down | How it is checked |
|---|---|---|
| Tokens | Color, type, rhythm | Static contracts |
| Fragments | Markup and placeholder types | Registry and composition |
| Format | Screen, theme, keyboard | Chromium at three widths |
| Result | Standalone HTML and PDF | Validator and print |
The catalog tests the visual language. A finished piece tests how its parts work together.
Source: the expanded pages of catalog/slides/index.html, recorded in scripts/craft.json.