Why
The build rejects any Cloudinary URL not containing /mu/ or /fetch/ in its path, but the meaning of these folders is undocumented — an agent adding image support will place images in the wrong location and face an opaque validation failure, then may disable the check to unblock itself.
Current state
io/cloudinary/validation.ts rejects Cloudinary URLs that do not contain /mu/ or /fetch/ in their path. There is no comment in the file or in CLAUDE.md explaining what these two path segments represent, why they are required, or how an agent should construct a valid Cloudinary URL when adding image support to a new page or section.
Ideal state
- A comment in
io/cloudinary/validation.ts explains: mu/ is the Cloudinary upload folder for owned images managed in this project; fetch/ is used for externally-hosted images proxied through Cloudinary for optimisation.
- The comment states that any image added to the site must be placed in one of these two locations.
- CLAUDE.md echoes this convention so an agent reads it before touching any image-related code.
- An agent knows how to construct a valid Cloudinary URL without needing to read validation source code.
Out of scope
- Changing the folder structure in Cloudinary.
- Changing the validation logic itself.
Starting points
io/cloudinary/validation.ts — the path validation to annotate; read this first
.claude/CLAUDE.md — the file to update with the folder convention
QA plan
- Read
io/cloudinary/validation.ts — expect a comment explaining mu/ as the owned-image upload folder and fetch/ as the proxy folder for external images.
- Read CLAUDE.md — expect a note on the Cloudinary folder convention.
- Construct a test Cloudinary URL using each folder prefix and confirm it passes the validation.
Done when
validation.ts contains a comment fully explaining the mu/ and fetch/ folder conventions, and CLAUDE.md echoes the constraint so an agent does not need to read validation source code to know where to place images.
Why
The build rejects any Cloudinary URL not containing
/mu/or/fetch/in its path, but the meaning of these folders is undocumented — an agent adding image support will place images in the wrong location and face an opaque validation failure, then may disable the check to unblock itself.Current state
io/cloudinary/validation.tsrejects Cloudinary URLs that do not contain/mu/or/fetch/in their path. There is no comment in the file or in CLAUDE.md explaining what these two path segments represent, why they are required, or how an agent should construct a valid Cloudinary URL when adding image support to a new page or section.Ideal state
io/cloudinary/validation.tsexplains:mu/is the Cloudinary upload folder for owned images managed in this project;fetch/is used for externally-hosted images proxied through Cloudinary for optimisation.Out of scope
Starting points
io/cloudinary/validation.ts— the path validation to annotate; read this first.claude/CLAUDE.md— the file to update with the folder conventionQA plan
io/cloudinary/validation.ts— expect a comment explainingmu/as the owned-image upload folder andfetch/as the proxy folder for external images.Done when
validation.tscontains a comment fully explaining themu/andfetch/folder conventions, and CLAUDE.md echoes the constraint so an agent does not need to read validation source code to know where to place images.