{"name":"StyleGuardAI","description":"API-first design inspiration library backed by versioned Markdown visual languages and deterministic emission.","baseUrl":"https://www.styleguardai.com","quickStart":{"method":"GET","path":"/api/agent-snippet?format=min","body":{}},"recommendedWorkflow":["List structures: GET /api/structures","Bind a lockfile: POST /api/bind (include structureId)","Write/reuse .styleguardai.json (or bindingRef) from /bind","Emit + enforce: POST /api/emit?enforce=1 (or /api/render)","Cache by versionHash; use /versions + /diff to detect changes","Note: /api/usage is documentation only, not a binding step"],"endpoints":[{"method":"GET","path":"/api/agent-snippet","description":"Canonical agent instructions"},{"method":"POST","path":"/api/bind","description":"Lockfile-first binding (validate or create; requires structureId when creating)"},{"method":"POST","path":"/api/emit","description":"Emit code (add ?enforce=1 for enforcement)"},{"method":"POST","path":"/api/render","description":"Emit + enforce in one call"},{"method":"GET","path":"/api/visual-languages","description":"List visual languages (+ filters)"},{"method":"GET","path":"/api/visual-languages/{id}","description":"Fetch full contract + Markdown"},{"method":"GET","path":"/api/visual-languages/{id}/versions","description":"List versions + hashes"},{"method":"GET","path":"/api/visual-languages/{id}/diff","description":"JSON Patch diff between versions (from, to)"},{"method":"GET","path":"/api/visual-languages/{id}/code","description":"Deterministic component template + hash (stack, component)"},{"method":"GET","path":"/api/visual-languages/{id}/preview","description":"Deterministic HTML preview (+ x-preview-hash header)"},{"method":"POST","path":"/api/visual-languages/select","description":"Deterministic selection (no embeddings)"},{"method":"POST","path":"/api/visual-languages/compose","description":"Deterministic composition + sourceMap"},{"method":"GET","path":"/api/structures","description":"List structures (slot surfaces)"},{"method":"POST","path":"/api/enforce","description":"Validate a generated artifact against a contract"}],"agentBootstrap":{"markdownHint":"GET /api/usage?format=markdown","snippetHint":"GET /api/agent-snippet?format=min","systemPrompt":"You have access to StyleGuardAI, a design system library optimized for AI consumption.\n\n## Goal\n\nGenerate consistent UI code by using StyleGuardAI visual language contracts (tokens + guardrails) and structures (slot-based layouts).\n\n## Canonical Endpoints\n\n- POST https://www.styleguardai.com/api/bind (lockfile-first binding)\n- POST https://www.styleguardai.com/api/emit?enforce=1 (emit + enforce)\n- POST https://www.styleguardai.com/api/render (emit + enforce alias)\n- GET https://www.styleguardai.com/api/visual-languages (filters: stack, mood, tag, q)\n- GET https://www.styleguardai.com/api/visual-languages/{id}?version=vX.Y.Z (pinned contract)\n- GET https://www.styleguardai.com/api/structures\n- POST https://www.styleguardai.com/api/enforce (validate a generated artifact against a contract)\n\n## Rules\n\n1) Choose a structure from /api/structures before binding.\n2) Prefer deterministic mode when building reusable code.\n3) Pin to a version when stability matters, then cache by versionHash.\n4) Do not invent tokens or colors: use the contract payload.\n5) Treat emission.agentPayload as the source of truth (schema: styleguardai.agentPayload@v0.1.0).\n6) Follow structure.artDirection and structure.recipes to match the intended look.\n7) If a repo lockfile (.styleguardai.json) exists, reuse it (or bindingRef). (Legacy: .inspirai.json)\n8) Use /api/emit?enforce=1 (or /api/render) so every call emits and enforces.\n9) When unsure, fetch /api/usage first to refresh the workflow (docs only, not a bind step)."},"agentPayloadNotes":["Dashboard structures include artDirection and recipes to guide layout composition.","Follow sectionSequence and contentBudgets for higher-fidelity output.","Use detailDensity, dataModelHints, and visualAssetDirection to enrich sections.","Dashboard includes nav/header utilities and richer toolbar slots (filters.dropdown)."],"determinism":{"note":"Determinism applies to fields under emission.* (not the outer response wrapper).","variesPerRequest":["requestId","generatedAt"],"deterministicModeStability":["emission.bindingId","emission.hash","emission.generatedAt","emission.agentPayload","emission.code"],"agentPayloadSchema":{"id":"styleguardai.agentPayload","version":"v0.1.0","jsonSchemaPath":"apps/inspirai/schemas/agent-payload.json"},"agentPayloadSchemaSupport":{"current":"v0.1.0","supported":["v0.1.0"],"deprecations":[]}},"bindingRefIntegrity":{"note":"bindingRef values are signed tokens.","productionRequirement":"STYLEGUARDAI_BINDING_SECRET must be set to sign/verify bindingRef values."},"generatedAt":"2026-04-20T20:09:12.836Z"}