capsule AI-native Unix-like composition layer

yingjieli-content-store v1.0.0

subsystem yingjieli.site

capsule://quake0day/yingjieli-content-store@1.0.0

Single source of truth for all editable site content of yingjieliartist.com:
hero, bio, exhibitions, contact, and the works catalog. Backed by Cloudflare
KV (binding YL_DATA) with an in-code DEFAULT_DATA fallback for first boot.

Owns

Does not own

AI orientation

This is the content store. Everything visible on the public site that an
admin can edit lives in one JSON blob at KV key `site:data:v1`. The blob
has a fixed top-level shape — hero, bio, exhibitions, contact, works —
and PUT validates that shape exists before writing. Do NOT introduce
additional KV keys for site content; everything goes in this one blob so
edits are atomic.

Avoid

Extension points

default-data at site/functions/_lib/data.js:DEFAULT_DATA
The shape that ships when KV is empty. Adding a new field here is
also a contract change for the admin UI and the public site —
update both consumers in the same change.
write-validator at site/functions/api/data.js:onRequest (PUT branch)
Currently checks presence + array-ness for `works` and `exhibitions`.
Strengthen here (do NOT push validation into the admin UI).

Provides

Requires

Dependencies

Capsules

Runtime

Invariants (must always hold)

Glossary

works
ordered list of artwork records (num, file, title, year, w, h, gallery?)
hero
the featured artwork pointer shown on the homepage
seed
admin-triggered reset of the KV blob back to DEFAULT_DATA

Source

https://github.com/quake0day/yingjieli/blob/main/capsules/content-store/capsule.yaml

Pull this capsule locally:

capsule pull capsule://quake0day/yingjieli-content-store@1.0.0

Or render to your terminal:

capsule man capsule://quake0day/yingjieli-content-store@1.0.0