---
description: Platform conventions -- SDK workflows, agents, deployment, resource registry
paths:
  - operations/**
---
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
<!-- Regenerate: pnpm scaffold:sync -->


# Platform (Elevasis SDK)

## Safety Invariants

- Every workflow implements `WorkflowDefinition` from `@elevasis/sdk` with: `config`, `contract` (Zod schemas), `steps` map, and `entryPoint`
- Input/output schemas MUST come from `@core/types` or browser-safe sibling schema files -- never define reusable workflow contracts inline in Node-only workflow files
- `operations/src/index.ts` default-exports a `DeploymentSpec` with `workflows` and `agents` arrays -- every resource must be registered here
- Always run `check` before `deploy`

## Imports

- `@elevasis/sdk` for types (`WorkflowDefinition`, `DeploymentSpec`)
- `@elevasis/sdk/worker` for runtime utilities (`platform`, adapters: `llm`, `storage`, `scheduler`, `notifications`, `acqDb`, `list`)
- `@core/*` resolves to `../core/*` for shared type and org-model imports
- Never import from `ui/src/` -- separate runtimes

## Key Rules

- Use typed adapters over raw `platform.call()` whenever a typed adapter exists
- `version` in resource config is semver -- bump on contract changes
- `status` is `'dev'` or `'prod'` -- new resources start as `'dev'`

## CLI Commands

| Command                              | Purpose                       |
| ------------------------------------ | ----------------------------- |
| `pnpm -C operations run check`       | Validate resource definitions |
| `pnpm -C operations run deploy`      | Deploy to dev                 |
| `pnpm -C operations run deploy:prod` | Deploy to production          |

## Detailed Reference

- `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- workflow anatomy, adapter patterns, trigger patterns
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- end-to-end resource authoring guide
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- lead-gen UI, hooks, list/member state, artifacts, and workflow adapter extension guide
- SDK reference docs: `operations/node_modules/@elevasis/sdk/reference/` (concepts, framework, platform-tools, runtime, CLI)
