template-storybook
Project-scoped skill for the in-repo exemplar at
projects/templates/template_storybook/. Load this when working inside the project.
When to Use
- Working inside the
template_storybookexemplar — running scripts, editing story
content, or regenerating illustrated pages.
- Forking this exemplar as the starting scaffold for a new illustrated-PDF project.
- Validating that the exemplar's contracts (thin-orchestrator, layer boundaries,
no-mocks testing) still hold after changes.
Workflow
- Read the project
AGENTS.md. - Edit story content in
content/story.yaml. - Put rendering behavior in
src/storybook/(models.py,characters.py,
story.py, illustration.py, text_layout.py, rendering.py) — never in
scripts/.
- Verify with tests and Stage-02 PDF generation.
Quick Reference
# From the repository root
uv run pytest projects/templates/template_storybook/tests --cov=projects/templates/template_storybook/src --cov-fail-under=90
uv run python scripts/pipeline/stage_02_analysis.py --project templates/template_storybook
uv run python scripts/pipeline/stage_03_render.py --project templates/template_storybook
uv run python scripts/pipeline/stage_04_validate.py --project templates/template_storybook
uv run python scripts/pipeline/stage_05_copy.py --project templates/template_storybook
Pitfalls
- Keep scripts thin. Character construction, image composition, text
overlay, and PDF assembly belong in src/storybook/, not in scripts/.
- No mocks. All tests must use real data, real files, and real
computation.
- Outputs are disposable. Never hand-edit
output/— regenerate from
content/story.yaml and source.
- Run from the repo root. Commands assume the template monorepo root
as working directory unless the child AGENTS.md states otherwise.