POST /api/scan
Extract tokens, layout DNA, semantic graph, and a Design Contract pack.
{ "url": "https://stripe.com", "mode": "accurate" }Turn any public website into an installable Design Contract — tokens, layout DNA, a semantic graph, and agent-ready guidance.
npx --yes github:byronwade/Design init --profile web-marketing --app-type marketing-site npx --yes github:byronwade/Design resolve --request "rebuild the hero"
Installed packs are upheld by the Design engine. Init with a profile plus one of four app types — saas-workbench, admin-console, content-studio, or marketing-site — then run the loop:
npx --yes github:byronwade/Design init --profile web-app --app-type saas-workbench npx --yes github:byronwade/Design resolve --request "rebuild the hero" # build the change with the resolved semantic tokens npx --yes github:byronwade/Design check npx --yes github:byronwade/Design verify --mode release
verify --mode release emits receipts. Scans also seed .design/receipts/contextds-drift.json — observation-only drift evidence that never rewrites DESIGN.md.
POST /api/scan
Extract tokens, layout DNA, semantic graph, and a Design Contract pack.
{ "url": "https://stripe.com", "mode": "accurate" }GET /api/contracts/download?domain=stripe.com
Download the installable contract ZIP for the latest scan.
GET /api/scan/export-llm?domain=stripe.com
LLM-friendly JSON (or ?format=markdown) from the serverless store.
Chat uses the Vercel AI SDK + AI Gateway (`ToolLoopAgent`) with tools scan_site, get_tokens, resolve_graph, and get_contract_download.
POST /api/agent/chat
{ "messages": [ /* UIMessage[] from useChat */ ] }
# .env.local
AI_GATEWAY_API_KEY=...
SCANNER_SERVICE_URL=https://designcontracts-scanner.vercel.appWhen SCANNER_SERVICE_URL is set, chat defaults to accurate browser capture via the Vercel Chromium scanner.