com um clique
add-entity
// Use when creating a new database table, entity, or data model. ALWAYS use for any new TypeORM EntitySchema creation.
// Use when creating a new database table, entity, or data model. ALWAYS use for any new TypeORM EntitySchema creation.
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
Design system for Activepieces (open-source AI automation platform, "open source replacement for Zapier"). Use whenever designing, mocking, or building UI for Activepieces — the web app (flow builder, runs, connections, dashboard), docs, or marketing surfaces. Provides brand purple `#8142E3`, Inter type ramp with `sm` (14px) as body default, Tailwind neutrals, Lucide icons, Shadcn/Radix primitive conventions, the signature dotted-canvas builder background, and a recreated web UI kit.
Use when adding a new API endpoint, route, or HTTP handler. ALWAYS use for new Fastify controller endpoints.
Use when the user asks to add a feature, implement functionality, or build something spanning database, API, and frontend. ALWAYS use for multi-layer feature work.
Creates TypeORM database migrations for the Activepieces server. Use when the user asks to add a column, create a table, add an index, or make any schema change to the database.
Maintains feature documentation in .agents/features/ and performs mandatory feature overlap detection before any new feature is proposed. Also builds a shared domain vocabulary for Activepieces. Use when the user asks to define domain terms, build a glossary, harden terminology, create ubiquitous language, references "domain model" or "DDD", or asks about adding a new feature.
| name | add-entity |
| description | Use when creating a new database table, entity, or data model. ALWAYS use for any new TypeORM EntitySchema creation. |
Create entity for $ARGUMENTS.
Read the pattern: Open packages/server/api/src/app/tables/table/table.entity.ts as reference.
Create entity file at packages/server/api/src/app/{module}/{name}.entity.ts:
EntitySchema (NOT decorators)...BaseColumnSchemaPart (id, created, updated)ApIdSchema for foreign key columns ({ ...ApIdSchema, nullable: false })projectId column + relation to project (CASCADE delete)foreignKeyConstraintName on all join columns{ type: String, array: true, nullable: false }Register entity: Import and add to getEntities() array in packages/server/api/src/app/database/database-connection.ts. This is REQUIRED — TypeORM does NOT auto-discover.
Create migration:
{Timestamp}{PascalCaseDescription} (e.g., AddMyFeature1774500000000)packages/server/api/src/app/database/postgres-connection.tsgetMigrations() array (chronological order)CREATE INDEX (not CONCURRENTLY). Set transaction = false for CONCURRENTLY.Create repository: const myRepo = repoFactory(MyEntity) — call as myRepo() or myRepo(entityManager) for transactions.
Verify: npm run lint-dev