# Company OS ## Architecture - [Company OS Architecture Overview](https://docs.cos.lisseworkslab.dev/architecture/overview) - [Layers](https://docs.cos.lisseworkslab.dev/architecture/layers) ## Concepts - [One-Way Doors](https://docs.cos.lisseworkslab.dev/concepts/one-way-doors) - [Primitives](https://docs.cos.lisseworkslab.dev/concepts/primitives) ## Operations - [Database Migrations](https://docs.cos.lisseworkslab.dev/operations/migrations): Guide to managing database schema changes using Drizzle ORM, including generating, reviewing, and applying migrations in development and production environments. - [Deployment](https://docs.cos.lisseworkslab.dev/operations/deployment): Documentation of the deployment process for the OpenServer application, covering Docker image building, environment configuration, CI/CD pipelines for documentation and wiki updates, and considerations for rolling updates in a multi-tenant setup. - [Logging and Observability](https://docs.cos.lisseworkslab.dev/operations/logging): Structured logging with evlog, Langfuse integration for tracing, and metering via Receipt primitives for billing and debugging. - [Security](https://docs.cos.lisseworkslab.dev/operations/security) - [Setup](https://docs.cos.lisseworkslab.dev/operations/setup) - [Tenant Management](https://docs.cos.lisseworkslab.dev/operations/tenant-management): Ongoing tenant operations including viewing receipts, managing users and agents, adjusting policies, and monitoring usage and costs via the admin UI. ## Systems - [Admin ui](https://docs.cos.lisseworkslab.dev/systems/admin-ui) - [Authentication](https://docs.cos.lisseworkslab.dev/systems/auth): The authentication system uses Better Auth to manage user and agent sessions, handle identity providers, and integrate with the oRPC server via middleware and route handlers. - [Company OS System](https://docs.cos.lisseworkslab.dev/systems/company-os): The Company OS control plane provides unified connectivity, access control, metering, and governance for tenant workloads and external channels. - [Database](https://docs.cos.lisseworkslab.dev/systems/database): The database schema design using PostgreSQL via Drizzle ORM, covering tables for tenants, principals, capabilities, tasks, receipts, policies, and authentication, along with migration strategies and table relationships. - [Server API](https://docs.cos.lisseworkslab.dev/systems/server-api): Details of the Hono + oRPC server setup, including routing, middleware, context creation, and service integration. ## Testing - [End-to-End Tests](https://docs.cos.lisseworkslab.dev/testing/e2e): Overview of the end-to-end test setup including configuration (e2e.config.ts), test structure using @e2e-dev/web, and key scenarios for request flow, tenant onboarding, and capability invocation. - [Quality Checks](https://docs.cos.lisseworkslab.dev/testing/checks): Documentation of the quality gate scripts that run linting, formatting, type checking, and planned layering and secret checks via `bun run check`. - [Testing Strategy](https://docs.cos.lisseworkslab.dev/testing/strategy) ## Agent skills - [company-os](https://docs.cos.lisseworkslab.dev/.well-known/agent-skills/company-os/SKILL.md): Read the Company OS docs instead of answering from memory. Use when a task involves Company OS: how it works, how to set it up or configure it, or its API. ## Agent resources - [llms-full.txt](https://docs.cos.lisseworkslab.dev/llms-full.txt): The full Markdown of every page in one file. - [Page Markdown](https://docs.cos.lisseworkslab.dev/index.md): Append `.md` to any page URL to fetch that page as raw Markdown. - [JSON API](https://docs.cos.lisseworkslab.dev/api/docs/pages.json): Page index of the JSON docs API; each entry links the page's JSON and Markdown forms. Described by the OpenAPI document at https://docs.cos.lisseworkslab.dev/openapi.json. - [Agent skills](https://docs.cos.lisseworkslab.dev/.well-known/agent-skills/index.json): Agent Skills discovery index of the skills this site publishes. - [API catalog](https://docs.cos.lisseworkslab.dev/.well-known/api-catalog): RFC 9727 linkset of the APIs documented here. - [AI catalog](https://docs.cos.lisseworkslab.dev/.well-known/ai-catalog.json): ARD manifest of the agent-facing resources on this site (MCP server, skills, APIs). - [agent-readability.json](https://docs.cos.lisseworkslab.dev/agent-readability.json): Manifest of every agent-facing artifact on this site. - [Sitemap](https://docs.cos.lisseworkslab.dev/sitemap.xml): Every indexable page URL with its last-modified date.