@futurethesislab/schemas
v0.11.2
Published
Cohort Venture Kit Zod schemas — the brand + content contract, importable outside the kit (e.g. by the venture pipeline).
Maintainers
Readme
@futurethesislab/schemas
The Cohort Venture Kit content contract as a standalone package: every Zod schema that shapes a venture's brand tokens and content JSON (brands/<slug>.json, content/<venture>/…), importable outside the kit — e.g. by the AI pipeline that generates and validates that JSON.
Usage
import { brandSchema, globalConfigSchema, pageSchema } from '@futurethesislab/schemas';
const brand = brandSchema.parse(json);zod is a peer dependency (^3.25.0 || ^4.0.0). The schemas are authored against the zod/v4 API, which both ranges ship, so they interop with zod v4 consumers — including z.toJSONSchema(...):
import { z } from 'zod/v4';
import { brandSchema } from '@futurethesislab/schemas';
const jsonSchema = z.toJSONSchema(brandSchema);The compile entry
@futurethesislab/schemas/compile is a second, pure entry (no fs, no process, no React, no Next) carrying the kit's content validator — the single oracle the kit CLI, the venture pipeline and the mobile app all use:
import { validateVentureTree } from '@futurethesislab/schemas/compile';
// files: every JSON under content/<venture>/, keyed by its relative path.
const issues = validateVentureTree(files, catalog); // [{ file, path, rule, severity, message, fixHint }]
const blocking = issues.filter((i) => i.severity === 'error');Rules cover every { seo, sections[] } page in every locale, the app/** contract, catalog membership for every variant slot, href resolution against routes.json + the fixed page set, locale parity and stable ids, the route archetypes, and media-manifest linkage. New rules are warnings by default and become errors when the venture ships a routes.json or the caller passes { mode: 'strict' }.
Page archetypes. A routes.json route declares an archetype (landing, solution, feature, industry, trust, pricing, contact, legal, hub, plus the depth kinds use-case, comparison and guide — the same list, in the same order, that the catalog publishes as website.pageKinds; new kinds are appended so an older pinned catalog stays a prefix). Its section rules — required opener, count bounds, allowed types — ship as ARCHETYPE_RULES on the main entry and are evaluated by archetypeViolations(archetype, sectionTypes, table?) on the compile entry, so a planner can check a proposed page shape with the exact rules the venture repo will enforce.
Source of truth
The package is built (tsup: ESM + CJS + types) from src/schemas/index.ts in the kit repo — the same files the kit app imports as @/schemas/*. Nothing is forked; publishing is a re-export of the kit's contract.
Versioning
Versioned in lockstep with @futurethesislab/registry and @futurethesislab/cli — see PUBLISHING.md in the kit repo.
