The public monorepo for Quirk Systems — an asset registry and mutation engine where unstructured material (prose, photography, graphic design, audio, prompts, datasets) is captured, annotated, semantically versioned, mutated, and promoted through data-supported curation.
Built on a production Next.js 16 scaffold: everything here is real, wired, and validated in CI.
A registry for unstructured assets with pgvector embeddings and full lifecycle tracking:
capture → annotate → mutate → diff → experiment → promote → publish
| Piece | What it does |
|---|---|
quirk_assets + versions |
Canonical rows for text/image/audio/video/pdf/prompt/song/dataset assets, embedded (pgvector 1536) and semantically versioned |
| Annotations & tags | persona_fit, spawn_path, risk, quality, theme — the research signal that drives curation |
| Quirk Diff | Semantic version control: additions/removals/meaning-shift between versions, not line diffs |
| Experiments & runs | Track persona/mask/prompt/model variations; promote winners |
| Pipelines | Multi-step asset processing with run tracking |
| Media storage | Binary assets (photography, design work) in private object storage, served via signed URLs |
| Offers | One-of-one claimable drops minted from curated assets — persona-voiced, atomically claimed by exactly one person |
Named agents own lifecycle stages: Archivist Goblin (ingest/normalize), Curator (annotation), Diff Witch (semantic diffing), Foreman (pipelines), Lab Rat King (experiments).
A persona/register composition layer over the Claude API: a frozen, prompt-cacheable house persona modulated by tonal registers (deadpan, warm, hype, mock_panic, swoon), each with an animation vocabulary the UI keys motion off. Personality as configuration, not copy-paste.
Stripe billing (checkout, order-safe webhooks, billing portal), Resend + react-email, PostHog analytics/flags, structured pino logging, Auth.js — all lazy-initialized so the repo builds and validates with zero secrets.
bun install
cp .env.example .env # everything optional; features no-op until configured
bun run dev # http://localhost:3000 — /quirk is the registry UIMedia capture (requires SUPABASE_URL + SUPABASE_SERVICE_ROLE_KEY):
curl -F "[email protected]" -F "title=Golden hour test" \
http://localhost:3000/api/assets/upload| Command | Description |
|---|---|
bun run dev |
Dev server (runs migrations first) |
bun run validate |
lint + type-check + tests + build — the merge gate |
bun run db:migrate / db:seed |
Schema + Quirk OS seed data |
bun run test:e2e |
Playwright suite |
bun run email:dev |
Preview react-email templates |
Single-app today, workspace-shaped on purpose — see docs/ARCHITECTURE.md for the layout, the module boundaries that graduate to packages, and the asset lifecycle in depth. CLAUDE.md is the source of truth for conventions and is kept current by the agents that work this repo.
See CONTRIBUTING.md and SECURITY.md.