{
  "$schema": "./registry.schema.md",
  "version": 1,
  "note": "FreeDocStore standards registry. Maps a repo/slice's detectable signals to the gold-standard KB(s) it should be judged against. Owned by VibeCode QA (the rubric it judges against). Consumers: the vcqa CLI/engine and any AI judge and any AI that judges code against a fixed standard instead of its own memory. See SCHEMA.md.",
  "signals": {
    "note": "Reference of the atoms a `detect` predicate may test, gathered per slice by the resolver.",
    "dep": "a dependency name present in the slice's package.json (deps + devDeps)",
    "file": "an exact file present in the slice",
    "fileGlob": "a glob matched within the slice",
    "config": "a parsed key present (e.g. wrangler.toml has [[d1_databases]])"
  },
  "standards": [
    {
      "id": "react-spa",
      "type": "archetype",
      "title": "React SPA",
      "summary": "React, client-rendered, hosted as static files. No SSR, no server of its own.",
      "url": "https://vibecodeqa.online/standards/react-spa",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "published",
      "detect": {
        "all": [
          { "dep": "react" },
          { "dep": "react-dom" },
          { "anyDep": ["vite", "webpack", "esbuild", "@rsbuild/core"] },
          { "noneDep": ["next", "nuxt", "@remix-run/react", "@react-router/dev", "express", "hono", "fastify", "@nestjs/core"] },
          { "noneFileGlob": ["functions/**/*.{ts,js}", "server/**/*.{ts,js}"] }
        ]
      },
      "recommends": ["typescript", "security", "testing", "accessibility", "dependencies"],
      "optionalLayers": ["tailwind", "tanstack-query", "zod-validation", "oauth-client"],
      "editions": [
        { "version": "v1", "path": "/v1", "status": "latest", "reviewed": "2026-07", "nextReview": "2027-07", "targets": { "react": "19", "vite": "8", "tailwind": "4", "typescript": "6" } }
      ]
    },
    {
      "id": "pages-fullstack",
      "type": "archetype",
      "title": "Cloudflare Pages Functions (fullstack)",
      "summary": "Server-side API co-deployed with a static frontend as Cloudflare Pages Functions. Edge runtime, bindings, no long-lived server.",
      "url": "https://vibecodeqa.online/standards/pages-fullstack",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": {
        "all": [
          { "file": "wrangler.toml" },
          { "anyFileGlob": ["functions/**/*.{ts,js}", "**/functions/**/*.{ts,js}"] }
        ]
      },
      "recommends": ["typescript", "security", "dependencies"],
      "optionalLayers": ["d1-database", "r2-storage", "cf-access"],
      "editions": []
    },
    {
      "id": "worker-edge",
      "type": "archetype",
      "title": "Cloudflare Worker",
      "summary": "A standalone Cloudflare Worker (or Durable Object) service. Edge runtime, module worker, bindings.",
      "url": "https://vibecodeqa.online/standards/worker-edge",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": {
        "all": [
          { "anyFile": ["wrangler.toml", "wrangler.jsonc", "wrangler.json"] },
          { "anyFileGlob": ["src/**/*.{ts,js}"] },
          { "noneFileGlob": ["functions/**/*.{ts,js}", "index.html"] }
        ]
      },
      "recommends": ["typescript", "security", "dependencies"],
      "optionalLayers": ["d1-database", "r2-storage", "durable-objects"],
      "editions": []
    },
    {
      "id": "node-service",
      "type": "archetype",
      "title": "Node service / CLI",
      "summary": "A Node runtime program: an HTTP service or a command-line tool. Not shipped to a browser.",
      "url": "https://vibecodeqa.online/standards/node-service",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": {
        "any": [
          { "config": "package.json:bin" },
          { "anyDep": ["express", "hono", "fastify", "@nestjs/core", "commander", "yargs"] }
        ]
      },
      "recommends": ["typescript", "security", "testing", "dependencies"],
      "editions": []
    },
    {
      "id": "library",
      "type": "archetype",
      "title": "Library / SDK",
      "summary": "A published package consumed by other code. No app entry, no server; exports an API surface.",
      "url": "https://vibecodeqa.online/standards/library",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": {
        "all": [
          { "config": "package.json:exportsOrMain" },
          { "noneDep": ["react-dom", "next", "vite"] },
          { "noneFileGlob": ["index.html", "functions/**/*.{ts,js}"] },
          { "noneFile": ["wrangler.toml"] }
        ]
      },
      "recommends": ["typescript", "testing", "dependencies"],
      "editions": []
    },
    {
      "id": "react-ssr",
      "type": "archetype",
      "title": "React SSR",
      "summary": "Server-rendered React (Next.js / React Router framework mode / Remix). A server renders HTML.",
      "url": "https://vibecodeqa.online/standards/react-ssr",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": { "anyDep": ["next", "@react-router/dev", "@remix-run/react", "nuxt"] },
      "recommends": ["typescript", "security", "testing", "accessibility", "dependencies"],
      "editions": []
    },

    {
      "id": "d1-database",
      "type": "layer",
      "title": "Cloudflare D1",
      "summary": "SQLite-at-the-edge: schema, migrations discipline, parameterized queries, local/remote parity.",
      "url": "https://vibecodeqa.online/standards/d1-database",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": {
        "any": [
          { "config": "wrangler.toml:d1_databases" },
          { "anyFileGlob": ["migrations/*.sql", "**/migrations/*.sql"] }
        ]
      },
      "editions": []
    },
    {
      "id": "mcp-server",
      "type": "layer",
      "title": "MCP server",
      "summary": "Exposes tools/resources over the Model Context Protocol. Composes onto whatever runtime hosts it (worker-edge, node-service). Tool schemas, auth scopes, read-before-write, audit.",
      "url": "https://vibecodeqa.online/standards/mcp-server",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": { "anyDep": ["@modelcontextprotocol/sdk"] },
      "editions": []
    },
    {
      "id": "tailwind",
      "type": "layer",
      "title": "Tailwind CSS",
      "summary": "Utility-first styling. v4 CSS-first config, tokens in @theme, no runtime CSS-in-JS.",
      "url": "https://vibecodeqa.online/standards/tailwind",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": { "anyDep": ["tailwindcss", "@tailwindcss/vite"] },
      "editions": []
    },
    {
      "id": "tanstack-query",
      "type": "layer",
      "title": "TanStack Query",
      "summary": "Server-cache for remote data: caching, dedupe, retries, loading/error modelling.",
      "url": "https://vibecodeqa.online/standards/tanstack-query",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": { "anyDep": ["@tanstack/react-query", "@tanstack/query-core"] },
      "editions": []
    },
    {
      "id": "zod-validation",
      "type": "layer",
      "title": "Zod validation",
      "summary": "Runtime schema validation at boundaries; one schema shared by form and API edge.",
      "url": "https://vibecodeqa.online/standards/zod-validation",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": { "dep": "zod" },
      "editions": []
    },

    {
      "id": "typescript",
      "type": "cross-cutting",
      "title": "TypeScript",
      "summary": "Strict flags, project references, no-any, typed-and-validated boundaries.",
      "url": "https://vibecodeqa.online/standards/typescript",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": { "any": [ { "dep": "typescript" }, { "anyFileGlob": ["**/*.ts", "**/*.tsx"] } ] },
      "editions": []
    },
    {
      "id": "security",
      "type": "cross-cutting",
      "title": "Security",
      "summary": "Secrets handling, input validation, XSS/injection, dependency supply chain.",
      "url": "https://vibecodeqa.online/standards/security",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": { "always": true },
      "editions": []
    },
    {
      "id": "testing",
      "type": "cross-cutting",
      "title": "Testing",
      "summary": "Runner choice, behavior-not-implementation, coverage floor, CI gating.",
      "url": "https://vibecodeqa.online/standards/testing",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": { "always": true },
      "editions": []
    },
    {
      "id": "accessibility",
      "type": "cross-cutting",
      "title": "Accessibility",
      "summary": "Semantics, keyboard, focus, ARIA, contrast. Applies to any UI-rendering slice.",
      "url": "https://vibecodeqa.online/standards/accessibility",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": { "anyFileGlob": ["index.html", "src/**/*.tsx", "app/**/*.tsx"] },
      "editions": []
    },
    {
      "id": "dependencies",
      "type": "cross-cutting",
      "title": "Dependency hygiene",
      "summary": "Lockfile pinning, audit, vetting, no unexpected install scripts.",
      "url": "https://vibecodeqa.online/standards/dependencies",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "slice",
      "status": "planned",
      "detect": { "file": "package.json" },
      "editions": []
    },

    {
      "id": "react-spa-on-cloudflare-pages",
      "type": "recipe",
      "title": "React SPA on Cloudflare Pages (with Functions)",
      "summary": "Blessed combo: a react-spa frontend co-deployed with a pages-fullstack API in one Pages project. Contains only the SEAM rules; composes the primitives.",
      "url": "https://vibecodeqa.online/standards/react-spa-on-cloudflare-pages",
      "repo": "vibecodeqa/vibecodeqa",
      "appliesTo": "repo",
      "status": "planned",
      "composes": ["react-spa", "pages-fullstack"],
      "detect": { "all": [ { "matched": "react-spa" }, { "matched": "pages-fullstack" } ] },
      "seamTopics": [
        "same-origin /api/* (no CORS, one auth origin)",
        "_routes.json excludes the SPA from function matching",
        "secrets live in Functions, never the client bundle",
        "shared types between functions and app via a workspace package",
        "one Pages deploy builds both; migrations gate the build"
      ],
      "editions": []
    }
  ]
}
