## RiverbankCMS SDK Context

This repository is a site using **RiverbankCMS** as a headless CMS via the `@riverbankcms/sdk` package.

### What This Means

- Content (pages, entries, blocks, navigation) is managed in RiverbankCMS
- The SDK CLI syncs content between local files and the CMS
- Configuration lives in `riverbank.config.ts`
- You work with local content files, then push changes to the CMS

### Key Configuration Files

- `riverbank.config.ts` - Site schema, custom blocks, field extensions
- `.env.local` - Local CMS credentials (never commit)

### Agent Documentation

Detailed documentation is available in `.riverbank/docs/`:

- `getting-started.md` - Quick orientation for working with this site
- `cli-reference.md` - Full SDK CLI command reference
- `content-management.md` - Content model and sync workflows
- `schema.md` - Site-specific schema (auto-generated from config)
- `block-types.md` - Available block types (auto-generated)
- `theme-schema.md` - Theme schema reference (auto-generated from Zod)
- `workflows/` - Step-by-step guides for common tasks, including editor workflows
- `site-workflows/` - Site-specific workflows and customizations

### Quick Commands

```bash
riverbankcms pull              # Download all content from CMS
riverbankcms push --dry-run    # Preview what would be pushed
riverbankcms push              # Push local changes to CMS
riverbankcms push-config       # Sync riverbank.config.ts schema/config to CMS
```

### Working with Content

1. **Pull latest**: `riverbankcms pull` downloads content to `content/` directory
2. **Make changes**: Edit JSON files or use CLI commands
3. **Preview**: `riverbankcms push --dry-run` shows what would change
4. **Push**: `riverbankcms push` applies changes to CMS

### Editing Page Content Directly

Page content lives in `content/pages/[identifier].json`. Each page has a `blocks` array containing the actual content. To edit copy:

1. Read the page file (e.g., `content/pages/websites.json`)
2. Find the block by its `identifier` or `kind`
3. Edit the `data` object directly using the Edit tool
4. Text content is either plain strings or TipTap JSON (look for `{"type": "doc", "content": [...]}`)

**Content style guide**: See `docs/content-style.md` for tone and voice guidelines when writing copy.

### Code Quality Guidelines

- Prefer functional, composable helpers over large classes
- Keep changes small and focused
- Use typed content from the SDK where available
- Follow existing patterns in the codebase
