Snippets Assets Policy
Defines what may be added to snippets/assets/, how assets are organised, and when they may be removed.
Scope
| In scope | Out of scope |
|---|---|
All files under snippets/assets/ | snippets/components/ (JSX component library) |
| Image, SVG, data, and script assets | snippets/data/ (structured JSON/JS data) |
docs.json logo and favicon references | api/ spec files |
Rules
-
Reference required before merge — no asset may be added to
snippets/assets/without a verified reference in at least one of:v1/,v2/,snippets/, ordocs.json. Unreferenced assets will be removed during audits. -
Size limit: 2 MB per image file — images over 2 MB must be optimised before commit. PNG files over 500 KB should be reviewed for WebP conversion. The only exceptions are generated OG images in
media/og-images/. -
No duplicate files across canonical subdirectories — canonical directory wins and duplicate copies should be removed during the owning migration. Current canonical subdirectories:
logos/— shared logo assets, including the favicon bundle inlogos/favicon/media/— shared raster/video assets, includingmedia/og-images/andmedia/images/site/domain/— legacy assets under audit only; no new permanent additionsdata/— non-image data assetsscripts/n8n/— workflow docs pending relocation out of assets
-
No backup files —
.bak,.backup, or similarly named files are not permitted. Use git history for rollback. -
No new files under the removed
site/bucket —site/has been dissolved. New favicon assets go tologos/favicon/, new generated OG artifacts go tomedia/og-images/, and new site-specific images go tomedia/images/site/. -
domain/is frozen pending phase-two audit — do not add new assets underdomain/unless the work is explicitly part of the approved domain migration. Existing domain assets must be classified asMOVEorARCHIVEbefore relocation. -
No ad-hoc subdirectories — new subdirectories under
snippets/assets/require a policy update to this document. Use the existing subdirectories.
Canonical Directory Map
snippets/assets canonical directory map
Enforcement
| Mechanism | Trigger | Action |
|---|---|---|
| Manual audit | Governance cleanup phases | Grep for unreferenced assets; delete after 30-day notice |
| Pre-commit hook | File deletion guard | Requires allow-deletions=true trailer for asset deletions |
| PR review | Any new asset added | Reviewer confirms reference exists before merging |
Transition Status (2026-04-04)
| Phase | Status | Notes |
|---|---|---|
/site migration | complete | logos/favicon/, media/og-images/, and media/images/site/ are canonical |
root sitemap-ai.xml consolidation | complete | snippets/assets/site/sitemap-ai.xml removed; repo root remains canonical |
/domain migration | pending audit | use snippets/_workspace/audit.md as the phase-two planning surface |