# Scrybe

*Schema-driven conversational authoring → native static HTML.*

Author content as schema-valid JSON (by hand or by talking to the `/studio` agent) →
`npm run build` → native static HTML in `dist/`, deployed to Cloudflare Pages.
No CMS, no runtime, no framework. (The demo site in this repo is **Cybercussion**.)

**Starting your own site?** Read **[`SCRYBE.md`](./SCRYBE.md)**, then run `npm run init -- --yes` to clear
the demo content and reset `site.config.json` to a blank stub.

## Build & test
```bash
npm install      # one dev dep: ajv (build-time only, never shipped)
npm run build    # validate content/ → dist/ (routed pages, indexes, sitemap/robots/llms/index.json)
npm test         # node --test
```

## Create a page
- **Conversationally** — the `/studio` skill: describe it ("new release for my song at `<link>`,
  suspenseful synthwave"). It resolves platform links, fetches art, drafts in your voice,
  validates, builds, shows a review, and deploys **only when you say "ship it"**.
- **Quick draft** — the `/new-post <type>` skill, or hand-write `content/<folder>/<slug>.json`
  matching a file in `examples/`. Types: `release`, `editorial`, `review`, `profile`.

## Theme it
Set `"theme"` in `site.config.json` (`default` or `ember`), then `npm run build`. A theme is one
file of design tokens in `themes/`; the structure layer never changes. See `docs/theme-contract.md`.

## Vibe (appearance)

Every page and `site.config.json` accept an optional `appearance` object:

```json
"appearance": {
  "background": "aurora" | "mesh" | "cover" | "image" | "none",
  "bgImage": "/assets/img/bg/band1.jpg",
  "surface":  "glass" | "solid",
  "fx":       ["scanlines", "grain", "vignette"],
  "layout":   "bento" | "flow"
}
```

Site-level sets the default; per-page overrides win. All fields are opt-in
(defaults: `background: "none"`, `surface: "solid"`, `fx: []`, `layout: "flow"`).
The bento layout (`"layout": "bento"`) renders content-height tiles in a responsive
grid; the featured first card goes wide when there are ≥3 cards to balance it.

See **`docs/layouts.md`** for the full menu (layouts, backgrounds, surfaces, FX, blocks),
copy-paste recipes, and a plain-language guide — it doubles as the `/studio` vibe wizard.

## Deploy (Cloudflare Pages)
**Easiest:** talk to the **`/deploy`** skill — it walks preflight (node/wrangler), `wrangler login`,
project create, a human-gated publish, and the custom-domain setup.

Manual: one-time `npx wrangler pages project create <name>` (set `name` in `wrangler.toml`), then
`npm run build && npx wrangler pages deploy`. `dist/` is native HTML/CSS/JS — no runtime, no third-party
scripts beyond the media embeds a visitor chooses to load. Any static host works (Netlify/Vercel/GitHub
Pages) — just serve `dist/`.

## Design docs
`docs/superpowers/specs/` (the design spec) and `docs/superpowers/plans/` (the A–D build plans).
```
