Installs a 3-layer Cursor-aligned agent pipeline so future agent
sessions can orient quickly and stay inside guard rails:
L1 — context for any agent reading the repo:
- AGENTS.md (top-level orientation, conventions, no-go zones)
- .cursor/rules/ (no-go-zones, api-routes, prisma, prisma-schema-map)
- .cursor/skills/ (add-api-route, add-prisma-model)
- docs/SCHEMA_MAP.md generated from prisma/schema.prisma
- scripts/generate-schema-map.ts (regenerate the map; wired up as
`npm run schema:map`)
L2 — subagent roles for the 9-stage idea-to-feature pipeline:
- .cursor/agents/role-*.md (conductor, architect, ia-architect,
design-system-auditor, implementer, reviewer, ux-reviewer,
a11y-auditor, doc-writer) with explicit multitask annotations.
L3 — pipeline scaffolding:
- .github/CODEOWNERS, PR template, and CI workflows (ci.yml,
preview-smoke.yml, visual-diff.yml, pr-health-rollup.yml).
Test job is intentionally disabled until Playwright is wired up.
- .convoys/ folder for per-feature run notes + scripts/log-convoy-event.sh.
- scripts/wt.sh worktree helper.
- src/lib/flags/index.ts simple env-driven feature flag wrapper.
- tests/smoke/app.smoke.spec.ts (Playwright smoke; excluded from
tsc until @playwright/test is installed — see tsconfig change).
Also writes .agent-context-manifest.yml so the sync-agent-context
skill can detect drift and offer selective updates from upstream.
Follow-ups (not in this commit):
- Install @playwright/test and re-enable the test job in ci.yml.
- Review .cursor/agents/role-*.md and trim any roles that don't
apply to this codebase.
Co-authored-by: Cursor <cursoragent@cursor.com>
6 KiB
6 KiB
Prisma Schema Map
Auto-generated by npm run schema:map from prisma/schema.prisma. Do not edit by hand.
Models: 21 • Enums: 0 • Groups: 9
Table of contents
- Auth & Users (5)
- Org & Membership (4)
- Locations & Events (2)
- Form Templates (2)
- Cards & OCR (2)
- People (CRM) (1)
- Integrations (1)
- Activity & Notifications (2)
- Settings (2)
Auth & Users
| Model | Table | Relations | Linked to |
|---|---|---|---|
| Account | — |
1 | User |
| PasswordResetToken | — |
0 | — |
| Session | — |
1 | User |
| User | — |
8 | Account, ActivityLog, Notification, OrgMember, ResponseCard, Session |
| VerificationToken | — |
0 | — |
ER diagram
erDiagram
Account "1" ||--|| "1" User : user
PasswordResetToken {
string id
}
Session "1" ||--|| "1" User : user
User "1" ||--o{ "many" OrgMember : memberships
User "1" ||--o{ "many" ResponseCard : assignedCards
User "1" ||--o{ "many" ActivityLog : activityLogs
User "1" ||--o{ "many" Notification : notifications
VerificationToken {
string id
}
Org & Membership
| Model | Table | Relations | Linked to |
|---|---|---|---|
| ApiKey | — |
1 | Organization |
| Invitation | — |
1 | Organization |
| Organization | — |
9 | ApiKey, FormTemplate, Integration, Invitation, Location, OrgMember, Person, ProcessingJob, ResponseCard |
| OrgMember | — |
2 | Organization, User |
ER diagram
erDiagram
ApiKey "1" ||--|| "1" Organization : organization
Invitation "1" ||--|| "1" Organization : organization
Organization "1" ||--o{ "many" Location : locations
Organization "1" ||--o{ "many" OrgMember : members
Organization "1" ||--o{ "many" ResponseCard : cards
Organization "1" ||--o{ "many" ProcessingJob : jobs
Organization "1" ||--o{ "many" Integration : integrations
Organization "1" ||--o{ "many" FormTemplate : formTemplates
Organization "1" ||--o{ "many" Person : persons
OrgMember "1" ||--|| "1" User : user
Locations & Events
| Model | Table | Relations | Linked to |
|---|---|---|---|
| CollectionDay | — |
2 | Location, ResponseCard |
| Location | — |
3 | CollectionDay, Organization, ResponseCard |
ER diagram
erDiagram
CollectionDay "1" ||--|| "1" Location : location
CollectionDay "1" ||--o{ "many" ResponseCard : cards
Location "1" ||--|| "1" Organization : organization
Location "1" ||--o{ "many" ResponseCard : cards
Form Templates
| Model | Table | Relations | Linked to |
|---|---|---|---|
| FormField | — |
1 | FormTemplate |
| FormTemplate | — |
3 | FormField, Organization, ResponseCard |
ER diagram
erDiagram
FormField "1" ||--|| "1" FormTemplate : formTemplate
FormTemplate "1" ||--|| "1" Organization : organization
FormTemplate "1" ||--o{ "many" ResponseCard : cards
Cards & OCR
| Model | Table | Relations | Linked to |
|---|---|---|---|
| ProcessingJob | — |
1 | Organization |
| ResponseCard | — |
8 | CollectionDay, FormTemplate, Location, Organization, Person, User |
ER diagram
erDiagram
ProcessingJob "1" ||--|| "1" Organization : organization
ResponseCard "1" ||--|| "1" User : assignedTo
ResponseCard "1" ||--|| "1" Organization : organization
ResponseCard "1" ||--|| "1" Location : location
ResponseCard "1" ||--|| "1" CollectionDay : collectionDay
ResponseCard "1" ||--|| "1" FormTemplate : formTemplate
ResponseCard "1" ||--|| "1" Person : person
People (CRM)
| Model | Table | Relations | Linked to |
|---|---|---|---|
| Person | — |
4 | Organization, Person, ResponseCard |
ER diagram
erDiagram
Person "1" ||--|| "1" Organization : organization
Person "1" ||--o{ "many" ResponseCard : cards
Integrations
| Model | Table | Relations | Linked to |
|---|---|---|---|
| Integration | — |
1 | Organization |
ER diagram
erDiagram
Integration "1" ||--|| "1" Organization : organization
Activity & Notifications
| Model | Table | Relations | Linked to |
|---|---|---|---|
| ActivityLog | — |
1 | User |
| Notification | — |
1 | User |
ER diagram
erDiagram
ActivityLog "1" ||--|| "1" User : user
Notification "1" ||--|| "1" User : user
Settings
| Model | Table | Relations | Linked to |
|---|---|---|---|
| AppSettings | — |
0 | — |
| SystemConfig | — |
0 | — |
ER diagram
erDiagram
AppSettings {
string id
}
SystemConfig {
string id
}
Regenerate after schema changes: npm run schema:map. Curated groupings live in scripts/generate-schema-map.ts under MODEL_GROUPS.