# tailor-platform/sdk architecture

> Architecture diagram of the GitHub repository tailor-platform/sdk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tailor-platform/sdk
- Repository: https://github.com/tailor-platform/sdk

## Overview

This monorepo provides the Tailor Platform SDK and adjacent developer tools: a platform CLI, project scaffolding, lint and migration tools, plugins, and protocol definitions. The main user workflow is invoking the CLI, which dispatches commands; deployment commands coordinate resource changes through the platform client. The challenge runner and verification modules form a separate workflow. Several subsystems are represented from the README and file tree rather than sampled implementation, so their internal links are omitted where evidence is unavailable.

Main entry points: [`packages/sdk/src/cli/main.ts`](https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/main.ts) (CLI entry), [`llm-challenge/src/verification.ts`](https://github.com/tailor-platform/sdk/blob/main/llm-challenge/src/verification.ts) (Verification), [`packages/sdk/src/cli/commands/deploy/application.ts`](https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/commands/deploy/application.ts) (Deployment), [`packages/tailor-proto/src/tailor/v1/pipeline_pb.js`](https://github.com/tailor-platform/sdk/blob/main/packages/tailor-proto/src/tailor/v1/pipeline_pb.js) (Pipeline schemas)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sdk["Platform SDK"]
  node_cli["CLI entry<br/>[main.ts]"]
  node_deploy["Deployment<br/>[application.ts]"]
  node_client["Platform client<br/>[client.ts]"]
  node_logger["CLI output<br/>[logger.ts]"]
  node_cache["Bundle cache<br/>[manager.ts]"]
  node_sdkservices["SDK services"]
end

subgraph group_devtools["Developer Tools"]
  node_create["Project scaffolder<br/>[init.ts]"]
  node_eslint["SDK lint rules<br/>[index.ts]"]
  node_ast["AST analysis<br/>[ast.ts]"]
  node_codemod["Migration tools<br/>[runner.ts]"]
end

subgraph group_plugins["SDK Plugins"]
  node_seed["Data seeding<br/>[apply.ts]"]
  node_setup["Setup automation<br/>[generate.ts]"]
  node_setupmanaged["Managed templates<br/>[managed.ts]"]
  node_frontend["Frontend plugin<br/>[index.ts]"]
  node_erd["TailorDB ERD<br/>[serve.ts]"]
end

subgraph group_protocol["Protocol Definitions"]
  node_proto["Service schemas<br/>[service_pb.js]"]
  node_pipeline["Pipeline schemas<br/>[pipeline_pb.js]"]
  node_pipeline_resource["Pipeline resources"]
end

subgraph group_challenge["Challenge Runner"]
  node_challenge_runner["Challenge runner<br/>[runner.ts]"]
  node_verification["Verification<br/>[verification.ts]"]
  node_verification_spec["Verification specs"]
  node_workspace_files["Workspace files<br/>[workspace-files.ts]"]
end

node_engineer(("SDK user"))

node_engineer -->|"runs commands"| node_cli
node_cli -->|"dispatches commands"| node_deploy
node_deploy -->|"calls platform"| node_client
node_sdkservices -.->|"uses client"| node_client
node_eslint -->|"uses analysis"| node_ast
node_frontend -->|"depends on SDK"| node_cli
node_seed -->|"uses CLI services"| node_cli
node_setup -->|"uses templates"| node_setupmanaged
node_proto -->|"imports schemas"| node_pipeline
node_pipeline -->|"imports resources"| node_pipeline_resource
node_challenge_runner -->|"runs checks"| node_verification
node_verification -->|"loads specification"| node_verification_spec
node_verification -->|"uses files"| node_workspace_files
node_verification_spec -->|"uses files"| node_workspace_files

click node_cli "https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/main.ts"
click node_deploy "https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/commands/deploy/application.ts"
click node_client "https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/shared/client.ts"
click node_logger "https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/shared/logger.ts"
click node_cache "https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/cache/manager.ts"
click node_sdkservices "https://github.com/tailor-platform/sdk/tree/main/packages/sdk/src/cli/services"
click node_create "https://github.com/tailor-platform/sdk/blob/main/packages/create-sdk/src/init.ts"
click node_eslint "https://github.com/tailor-platform/sdk/blob/main/packages/eslint-plugin-sdk/src/index.ts"
click node_ast "https://github.com/tailor-platform/sdk/blob/main/packages/eslint-plugin-sdk/src/lib/ast.ts"
click node_codemod "https://github.com/tailor-platform/sdk/blob/main/packages/sdk-codemod/src/runner.ts"
click node_seed "https://github.com/tailor-platform/sdk/blob/main/packages/sdk-plugin-seed/src/apply.ts"
click node_setup "https://github.com/tailor-platform/sdk/blob/main/packages/sdk-plugin-setup/src/generate.ts"
click node_setupmanaged "https://github.com/tailor-platform/sdk/blob/main/packages/sdk-plugin-setup/src/managed.ts"
click node_frontend "https://github.com/tailor-platform/sdk/blob/main/packages/sdk-plugin-frontend/src/index.ts"
click node_erd "https://github.com/tailor-platform/sdk/blob/main/packages/sdk-plugin-tailordb-erd/src/serve.ts"
click node_proto "https://github.com/tailor-platform/sdk/blob/main/packages/tailor-proto/src/tailor/v1/service_pb.js"
click node_pipeline "https://github.com/tailor-platform/sdk/blob/main/packages/tailor-proto/src/tailor/v1/pipeline_pb.js"
click node_pipeline_resource "https://github.com/tailor-platform/sdk/blob/main/packages/tailor-proto/src/tailor/v1/pipeline_resource_pb.js"
click node_challenge_runner "https://github.com/tailor-platform/sdk/blob/main/llm-challenge/src/runner.ts"
click node_verification "https://github.com/tailor-platform/sdk/blob/main/llm-challenge/src/verification.ts"
click node_verification_spec "https://github.com/tailor-platform/sdk/blob/main/llm-challenge/src/verification-spec.ts"
click node_workspace_files "https://github.com/tailor-platform/sdk/blob/main/llm-challenge/src/workspace-files.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_deploy,node_client,node_logger,node_cache,node_sdkservices,node_engineer toneBlue
class node_create,node_eslint,node_ast,node_codemod toneAmber
class node_seed,node_setup,node_setupmanaged,node_frontend,node_erd toneMint
class node_proto,node_pipeline,node_pipeline_resource toneRose
class node_challenge_runner,node_verification,node_verification_spec,node_workspace_files toneIndigo
```

## Components

### Platform SDK

- [CLI entry](https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/main.ts): `packages/sdk/src/cli/main.ts`
- [Deployment](https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/commands/deploy/application.ts): `packages/sdk/src/cli/commands/deploy/application.ts`
- [Platform client](https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/shared/client.ts): `packages/sdk/src/cli/shared/client.ts`
- [CLI output](https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/shared/logger.ts): `packages/sdk/src/cli/shared/logger.ts`
- [Bundle cache](https://github.com/tailor-platform/sdk/blob/main/packages/sdk/src/cli/cache/manager.ts): `packages/sdk/src/cli/cache/manager.ts`
- [SDK services](https://github.com/tailor-platform/sdk/tree/main/packages/sdk/src/cli/services): `packages/sdk/src/cli/services`

### Developer Tools

- [Project scaffolder](https://github.com/tailor-platform/sdk/blob/main/packages/create-sdk/src/init.ts): `packages/create-sdk/src/init.ts`
- [SDK lint rules](https://github.com/tailor-platform/sdk/blob/main/packages/eslint-plugin-sdk/src/index.ts): `packages/eslint-plugin-sdk/src/index.ts`
- [AST analysis](https://github.com/tailor-platform/sdk/blob/main/packages/eslint-plugin-sdk/src/lib/ast.ts): `packages/eslint-plugin-sdk/src/lib/ast.ts`
- [Migration tools](https://github.com/tailor-platform/sdk/blob/main/packages/sdk-codemod/src/runner.ts): `packages/sdk-codemod/src/runner.ts`

### SDK Plugins

- [Data seeding](https://github.com/tailor-platform/sdk/blob/main/packages/sdk-plugin-seed/src/apply.ts): `packages/sdk-plugin-seed/src/apply.ts`
- [Setup automation](https://github.com/tailor-platform/sdk/blob/main/packages/sdk-plugin-setup/src/generate.ts): `packages/sdk-plugin-setup/src/generate.ts`
- [Managed templates](https://github.com/tailor-platform/sdk/blob/main/packages/sdk-plugin-setup/src/managed.ts): `packages/sdk-plugin-setup/src/managed.ts`
- [Frontend plugin](https://github.com/tailor-platform/sdk/blob/main/packages/sdk-plugin-frontend/src/index.ts): `packages/sdk-plugin-frontend/src/index.ts`
- [TailorDB ERD](https://github.com/tailor-platform/sdk/blob/main/packages/sdk-plugin-tailordb-erd/src/serve.ts): `packages/sdk-plugin-tailordb-erd/src/serve.ts`

### Protocol Definitions

- [Service schemas](https://github.com/tailor-platform/sdk/blob/main/packages/tailor-proto/src/tailor/v1/service_pb.js): `packages/tailor-proto/src/tailor/v1/service_pb.js`
- [Pipeline schemas](https://github.com/tailor-platform/sdk/blob/main/packages/tailor-proto/src/tailor/v1/pipeline_pb.js): `packages/tailor-proto/src/tailor/v1/pipeline_pb.js`
- [Pipeline resources](https://github.com/tailor-platform/sdk/blob/main/packages/tailor-proto/src/tailor/v1/pipeline_resource_pb.js): `packages/tailor-proto/src/tailor/v1/pipeline_resource_pb.js`

### Challenge Runner

- [Challenge runner](https://github.com/tailor-platform/sdk/blob/main/llm-challenge/src/runner.ts): `llm-challenge/src/runner.ts`
- [Verification](https://github.com/tailor-platform/sdk/blob/main/llm-challenge/src/verification.ts): `llm-challenge/src/verification.ts`
- [Verification specs](https://github.com/tailor-platform/sdk/blob/main/llm-challenge/src/verification-spec.ts): `llm-challenge/src/verification-spec.ts`
- [Workspace files](https://github.com/tailor-platform/sdk/blob/main/llm-challenge/src/workspace-files.ts): `llm-challenge/src/workspace-files.ts`

### Other components

- **SDK user**

## Connections

- SDK user → CLI entry: runs commands (evidence: `README.md`)
- CLI entry → Deployment: dispatches commands (evidence: `packages/sdk/src/cli/main.ts`)
- Deployment → Platform client: calls platform (evidence: `packages/sdk/src/cli/commands/deploy/application.ts`)
- SDK services → Platform client: uses client
- SDK lint rules → AST analysis: uses analysis
- Frontend plugin → CLI entry: depends on SDK (evidence: `packages/sdk-plugin-frontend/src/index.ts`)
- Data seeding → CLI entry: uses CLI services (evidence: `packages/sdk-plugin-seed/src/apply.ts`)
- Setup automation → Managed templates: uses templates (evidence: `packages/sdk-plugin-setup/src/generate.ts`)
- Service schemas → Pipeline schemas: imports schemas (evidence: `packages/tailor-proto/src/tailor/v1/service_pb.js`)
- Pipeline schemas → Pipeline resources: imports resources (evidence: `packages/tailor-proto/src/tailor/v1/pipeline_pb.js`)
- Challenge runner → Verification: runs checks (evidence: `llm-challenge/src/verification.ts`)
- Verification → Verification specs: loads specification (evidence: `llm-challenge/src/verification.ts`)
- Verification → Workspace files: uses files (evidence: `llm-challenge/src/verification.ts`)
- Verification specs → Workspace files: uses files (evidence: `llm-challenge/src/verification-spec.ts`)
