Frontmatter Schemas

Lito Graph validates frontmatter using Zod schemas. The type field determines which schema is applied.

Standard Doc (type: "doc" or omitted)

---
title: "Page Title"
description: "SEO description"
keywords: [keyword1, keyword2]
author: "Author Name"
publishDate: "2026-01-01"
tags: [tag1, tag2]
section: "Section Name"
version: "v1"
locale: "en"
---
FieldTypeRequiredDefault
titlestringNoDerived from slug
descriptionstringNoFirst paragraph
keywordsstring[]No[]
tagsstring[]No[]
sectionstringNo—
versionstringNo—
localestringNo—

Concept (type: "concept")

---
type: concept
canonical_name: "Workspace"
entity_type: "resource"
aliases: ["Org Workspace"]
related_entities: ["User", "Project"]
tags: [core]
version: "v1"
---
FieldTypeRequiredDefault
type"concept"Yes—
canonical_namestringYes—
entity_typestringNo"resource"
aliasesstring[]No[]
related_entitiesstring[]No[]

API (type: "api")

---
type: api
operation_id: "create_workspace"
api_type: "http"
method: "POST"
path: "/v1/workspaces"
resource: "Workspace"
capabilities: ["create"]
side_effects: ["creates_record"]
preconditions: ["user_authenticated"]
permissions: ["workspace:write"]
rate_limit: "50/min"
---
FieldTypeRequiredDefault
type"api"Yes—
operation_idstringYes—
api_typestringNo"http"
methodstringNo—
pathstringNo—
resourcestringNo—
capabilitiesstring[]No[]
side_effectsstring[]No[]
preconditionsstring[]No[]
permissionsstring[]No[]
rate_limitstringNo—

Backward Compatibility

The legacy Lito format is auto-converted:

# This format:
api: "GET /v1/users"
# Becomes:
type: api
method: "GET"
path: "/v1/users"
operation_id: "get_v1_users"
api_type: "http"

Workflow (type: "workflow")

---
type: workflow
workflow_id: "onboard_new_workspace"
goal: "Onboard a new customer workspace."
primary_entity: "Workspace"
risk_level: "medium"
requires_human_approval: true
tags: [onboarding]
---
FieldTypeRequiredDefault
type"workflow"Yes—
workflow_idstringYes—
goalstringYes—
primary_entitystringNo—
risk_levelstringNo—
requires_human_approvalbooleanNofalse

Required Body Sections

Workflow documents should include these ## sections:

SectionParsed As
## PreconditionsBullet list of prerequisites
## StepsNumbered list of actions (backtick refs create USES_API edges)
## Failure ModesBullet list of what can go wrong
## RecoveryBullet list of recovery actions
## GuardrailsBullet list of hard constraints

Validation

All schemas are defined in src/types/frontmatter.ts using Zod. Invalid frontmatter produces a parse warning and the file is skipped (the build continues).