Spillway CMSStructured content like Drupal. Page building like Puck. Setup like Ghost. AI that drafts, people who approve.
Menu

Build a kit with an agent

A kit is a JSON manifest that installs a site's structure: content types, vocabularies with terms, collections, forms, menus, starter pages and sample content. It is the quickest thing to build with an agent, because the format is declarative and the server validates it. Read kits.md first; the four bundled kits under packages/kits/ are the examples.

The prompt

Paste into the agent in a checkout of the Spillway repository (so it can run the kit test), with the brackets filled:

Write a Spillway CMS kit for [a sector: e.g. a public library system] at packages/kits/[dir]/kit.json
(key "[key]", label "[Label]"), following docs/kits.md and the KitManifest type in
packages/shared/src/index.ts. Model it on packages/kits/higher-ed/kit.json.

It should model: [the things the site is about: e.g. branches, events, programs, staff, news, resources].

Requirements:
- Content types with typed fields; a titleField; pathPattern like /branches/{slug}; aiHint on fields
  the AI will fill; taxonomy fields that name vocabularies shipped in the same kit; reference fields
  that point at types in the same kit.
- Vocabularies with terms (a hierarchical one where the sector has one), termPathPattern where a
  listing page per term makes sense.
- Collections per listing page; events use a daterange field, occurrence.start filters and
  "expand": "occurrences"; a "$term:" filter where a page lists one category.
- At least one form with sensible fields and a success message; no connectors with secrets.
- Menus "main" and "footer".
- Pages: Home (home: true; hero, quick links, two collections, a call to action), one finder page per
  type with a keyword search filter and a taxonomy filter, an events page with a Calendar block, a
  contact page. Every block has a unique props.id. No lorem ipsum, no invented statistics or names of
  real organizations.
- Sample content: at least 12 published entries across the types, including one recurring event
  with an exception, so every page has something to show. Media placeholders are small inline SVGs
  (base64, under 10 KB each) referenced as $media:<key>.
- If the kit builds on another kit or needs a module, declare it under "requires" (kits by key with a
  semver range, modules by registry name, core as a range) instead of copying the other kit's types;
  see docs/kits.md "Dependencies".
- A README.md in the kit folder listing the types, fields, vocabularies, collections, forms, menus
  and pages, like packages/kits/city/README.md.
- Add the kit to the variants list in packages/core/src/test/kits-variants.test.ts (counts, pages,
  one search check, one taxonomy check, the calendar feed strings, home page strings).

Run `pnpm --filter @spillway-cms/core exec vitest run kits-variants` until it is green. Report what you
built and anything you could not verify. Do not commit.

What to check

  1. It installs clean. pnpm --filter @spillway-cms/core exec vitest run kits-variants passes: nothing is reported as skipped with a reason on a fresh site, every starter page renders, the search and taxonomy filters find exactly what the test says, the calendar feed carries the recurrence, and a second install creates nothing.
  2. Keys and labels. Keys match ^[a-z][a-z0-9_]{1,62}$; labels read well in the admin; labelPlural is set.
  3. The pages are real. Open the site after spillway kit install <key> --sample (or the admin's Install with sample content): the home page makes sense to the sector, every finder filters, the menus link to pages that exist.
  4. No invented facts. Sample content is clearly sample content (placeholder organization, no real people, no statistics), and media is tiny.
  5. The AI hints are useful: each aiHint says what belongs in the field in one sentence, because that is what the drafting model is told.
  6. Export round trip. Install the kit, then Kits → Export structure: the manifest that comes back should match what you wrote, which is how the kit will evolve in git.

Publish it with publish.md once a person has installed it and looked at the pages.

Spillway 0.1.0 · Edit this page on GitHub

Was this page helpful?