# Twenty Crm Foundation

> Use when building a multi-tenant application or CRM with dynamic schema — upgrade-aware repository proxies and cursor-driven metadata adapters, RLS predicate rewriting, normalized Postgres error taxonomies with duplicate-key diagnostics, workspace DDL managers, SQL identifier escaping, generation-stamped promise memoizers, integer-gap record ordering, metadata-driven upsert engine, tool-facing CRUD validation envelopes, ORM update-event fidelity contracts (id-keyed pairing, authoritative timestamps, snapshot clone discipline), timeline activity routing/coalescing kernel (hash-keyed routing plans, dual-emission junction repoints, sorted advisory-lock funnels), the GraphQL record-filter compiler (bracket-composition walker, where/andWhere first-entry semantics, permission-gated field parsing, depth-capped join-based MANY_TO_ONE sub-filters, composite sub-field flattening, ~18-operator parameterized SQL ladder with randomized param namespacing, null-equivalent widening vs strict eqStrict/isStrictly…

- Skill: `ryan-brosas/twenty-crm-foundation` (Agent Skill, multi-file: 38 files)
- Install (CLI): `npx skillmds@latest add ryan-brosas/twenty-crm-foundation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ryan-brosas/twenty-crm-foundation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: ryan-brosas (https://skillmd.com/u/ryan-brosas)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/ryan-brosas/twenty-crm-foundation

---

# twenty-crm: Multi-Tenant CRM & Dynamic Schema Foundation

## Foundation contract

This is a cold, source-specific foundation, not an operational procedure. It is
historical, revision-pinned evidence rather than timeless guidance. Current
project source, tests, requirements, and runtime behavior outrank this
projection and decide what ships.

## Provenance and revision

- Source record: `twenty-crm`; portable upstream identity, license, coverage caveats, and retrieval history are preserved in the index.
- Recorded revision: `main@9e4717278c29efa3ba0c147f6acf0d68e99a625c`.
- Full provenance, coverage caveats, boundaries, and preserved evidence:
  `references/index.md`.

## Topic map

- Representative topics: Zero-Downtime Upgrade Plane; Multi-Tenant ORM &
  Security; Error Handling & Diagnostics; Dynamic Schema & DDL Engine; Caching
  & Hydration; Record Ordering & Position; Upsert Engine; Tool-Facing CRUD
  Surface.
- Scope and retrieval questions: `references/index.md#use-this-for`.
- Complete capsule chooser: `references/index.md#load-the-matching-source-dump`.
- Detailed grouped map: `references/index.md#capsule-map`.
- Source limitations and portability boundaries: `references/index.md#boundaries`.

## Retrieval

Open the index, choose one capsule matching the active question, and load only
that capsule. Revalidate its cited source and revision before relying on it. Do
not bulk-load the inventory, treat historical claims as current truth, or apply
this foundation as a procedure.

