A full-featured CRM built with React, shadcn/ui, and Supabase.
remove `core.md`
erwanMarmelab32fc466a6ac0
diff --git a/.claude/skills/delete-initial-resource/SKILL.md b/.claude/skills/delete-initial-resource/SKILL.mdindex 45bb34cc..6cf2505a 100644--- a/.claude/skills/delete-initial-resource/SKILL.md+++ b/.claude/skills/delete-initial-resource/SKILL.md@@ -5,18 +5,60 @@ description: Remove one or more of the initial CRM resources (contacts, companie# delete-initial-resource-Removes one or more of the five initial Atomic CRM resources (`contacts`, `companies`, `deals`, `tags`, `tasks`) and every reference to them.+Removes one or more of the five initial Atomic CRM resources (`contacts`, `companies`, `deals`, `tags`, `tasks`) and every reference to them. **Irreversible — confirm the target(s) with the user first; rely on git to recover.**-## How to proceed+## Steps-1. **Read [`core.md`](core.md) first** — the script, the shapes a resource takes, the backend checklist, and the verify gates. These apply to every resource.-2. **Confirm the target(s)** with the user — the deletion is irreversible. For each resource named, read its file:- - `contacts` → [`contacts.md`](contacts.md) — spine resource, **confirm cascade scope first**- - `companies` → [`companies.md`](companies.md) — spine/link resource, **confirm cascade scope first**- - `deals` → [`deals.md`](deals.md)- - `tags` → [`tags.md`](tags.md)- - `tasks` → [`tasks.md`](tasks.md)-3. **Run the script** (see core.md), then clean each dependent file it prints — guided by core.md's "shapes" patterns and the per-resource specifics.-4. **Verify** per core.md: `make typecheck && make lint`, targeted greps, and `db reset` if Supabase is running.+1. **Confirm the target(s)**, then read each one's file before editing:+ - `contacts` → [`contacts.md`](contacts.md) — spine; **confirm cascade scope first**+ - `companies` → [`companies.md`](companies.md) — spine/link; **confirm cascade scope first**+ - `deals` → [`deals.md`](deals.md) · `tags` → [`tags.md`](tags.md) · `tasks` → [`tasks.md`](tasks.md)+2. **Run the script** (below) — deletes each `src/components/atomic-crm/<resource>/` folder and prints the dependent files to clean.+3. **Clean each dependent file** using the "Shapes" patterns below + the per-resource file.+4. **Verify** (below).-Deleting several at once? See "Deleting several at once" in core.md, and read each named resource's file before editing.+Deleting several at once: clean from the most-coupled resource outward; clean a shared file **once** for both; and reconcile interacting union guidance — deleting both `contacts` and `deals` removes the notes/activity-log reference *entirely* rather than each narrowing it, so don't half-apply each file's "narrow the union" note.++## The script++```bash+node .claude/skills/delete-initial-resource/delete-initial-resource.ts <resource> [<resource> ...]+```++Validates the names, deletes each resource's folder, and prints the **merged, de-duplicated dependent-file list** (files inside a just-deleted folder are dropped). It does **not** edit those files — that's your job. Each entry in the script's `dependentFiles` map has a `//` comment saying *what* to remove; read it alongside the printed list, and update the map if the codebase grows new references.++## Shapes a resource takes++A resource is rarely just a folder. The later shapes are invisible to a `\b<resource>\b` grep:++- **Standalone** — imports, JSX, routes, menu/nav, dashboard widgets, the `<Resource>` entry in `root/CRM.tsx`. Wrapper components *outside* the folder that only render the resource: delete outright, then clean importers.+- **Field/column on another record** — fans out far wider: the `types.ts` type, `providers/commons/mergeContacts.ts`, CSV/JSON import, i18n, stories/tests, `StoryWrapper` builders, and the sample CSVs (header **and** every row). For a *link* column, decide per-link: orphaned shell (typed, defaulted) or drop — remove the UI either way.+- **Aggregated `nb_<resource>`** (from the `_summary` views) lands on a record type, read across shows/lists/filters/generators. **Invisible to a `\b<resource>\b` grep** (the `_` is a word char) — grep `nb_<resource>` and the denormalized `company_name` separately.+- **Shared subsystems** — notes (`reference: "contacts" | "deals"`) and the activity log (`"company" | "contact" | "deal" | "all"` union). Narrow the union, delete the per-type render components (`ActivityLog*Created.tsx`) + dead branches, prune the `providers/commons/activity.ts` fetcher + `consts.ts`/`types.ts` members. Surviving `=== "<other>"` checks stay valid — only the deleted member's branches go.+- **Config props** (`taskTypes`, `dealStages`, `companySectors`) live in `root/defaultConfiguration.ts`, `ConfigurationContext.tsx`, `CRM.tsx` (default + jsdoc + store seed), `App.tsx`, and `SettingsPage.tsx` (the `<Card>` **and** the section-list entry). **Not always named after the resource** — grep the settings `<Card>` for other keys (Deals owned `currency`) and flag borderline-general ones rather than dropping them silently.+- **Custom dataProvider methods** live in **both** providers; `CrmDataProvider` derives from the supabase one, so removing them there drops them from the type. Also clean the lifecycle-callback blocks in both providers, the `sales` `beforeDelete` reassignment, the supabase `<resource> -> <resource>_summary` `getList` routing, and the FakeRest generators (which *drive* record creation).+- **JSON importer** (`misc/useImportFromJson.ts`) treats `contacts`/`companies`/`notes`/`tasks` as top-level types (`import<X>` fn, `$.<x>.*` path, a `TYPES` arm + switch, guards, `stats`/`failedImports`/`idsMaps` keys). Mirror in `ImportPage.tsx` + `import-sample.json`; the CSV importer (`useContactImport.tsx`) has parallel mappings.+- Check `useCallback`/`useMemo` deps — a stale `getTags`/`getCompanies` there is invisible until `tsc`.++## Backend (the script only touches frontend)++See the `backend-dev` skill for the migration workflow. In `supabase/schemas/`:++- Drop/adjust the table + view, generate a migration (`npx supabase db diff --local -f remove_<resource>`); update `contacts_summary`/`companies_summary` if they aggregated it.+- **`activity_log`** is a `UNION ALL` with the same column set per branch — remove the resource's columns from **every** branch (keep them aligned), delete its dedicated branch(es), and drop the matching snake→camel rename in the supabase `getList("activity_log")`.+- `06_grants.sql` grants the table **and** its `<resource>_id_seq` (drop both). `05_policies.sql` has an RLS-enable line **and** `create policy` statements (drop both).+- A resource used inside a SQL function (`merge_contacts`): drop those lines + the unused local var. Editing `02_functions.sql` regenerates the whole function (expected) — renumber leftover step comments.+- **Orphan check:** deleting triggers can orphan helpers — but verify shared callers first (`get_domain_favicon` survives a `companies` delete because contact avatars also call it).+- **Edge functions** are separate and easy to miss: `merge_contacts/`, `_shared/db.ts` (Kysely types), `postmark/` (inbound email), and `mcp/` (an AI subsystem whose depth varies per resource). When a surviving function loses a capability, **flag it to the user**.++## Verify++```bash+make typecheck && make lint+```++Resolve whatever `tsc` surfaces (the dependent-file list is a guide, not a guarantee). Then `grep -rniE "\b<resource>\b"` over `src/`+`supabase/`, plus **separate** greps for `nb_<resource>`, `company_name`, and config-prop names (`<resource>Types`, `companySectors`, `currency`). Watch for benign/substring false positives (each resource file lists its own); never edit `supabase/migrations/`.++**i18n is all-or-nothing:** `frenchCrmMessages.ts` is type-checked against the type derived from `englishCrmMessages.ts`, so remove a key from **both** catalogs or **neither** (a one-sided removal is a `tsc` error). Dead `resources.<x>.*` keys are harmless — flag rather than force. `frenchCrmMessages.ts` uses literal `…` escapes; if an exact-string `Edit` fails on a block spanning one, fall back to `sed -i '<from>,<to>d'`.++If Supabase is running, `npx supabase db reset --local` replays the chain + `seed.sql` and catches a broken view/function/grant `db diff` misses (benign `index "…_pkey" does not exist` NOTICEs expected). On Node 22 (see `.nvmrc`), `make test` (vitest) is also available.diff --git a/.claude/skills/delete-initial-resource/companies.md b/.claude/skills/delete-initial-resource/companies.mdindex 56b9fa59..51b0acfe 100644--- a/.claude/skills/delete-initial-resource/companies.md+++ b/.claude/skills/delete-initial-resource/companies.md@@ -1,6 +1,6 @@# Deleting `companies`-A **spine/link** resource: it owns the `companies` table *and* is a `company_id` link on **both** `contacts` and `deals`, its `companies_summary` view aggregates `nb_contacts`/`nb_deals`, and it adds a **denormalized `company_name`** to the `Contact` type. So it fans out far wider than its folder (≈50 frontend files + backend). (Read [`core.md`](core.md) first.)+A **spine/link** resource: it owns the `companies` table *and* is a `company_id` link on **both** `contacts` and `deals`, its `companies_summary` view aggregates `nb_contacts`/`nb_deals`, and it adds a **denormalized `company_name`** to the `Contact` type. So it fans out far wider than its folder (≈50 frontend files + backend).## Confirm cascade scope firstAsk whether to:@@ -13,7 +13,7 @@ The full removal is what makes the deletion large.- **Activity log** — a dedicated `company.created` branch (delete `ActivityLogCompanyCreated.tsx` outright + the branch in `ActivityLogIterator.tsx` + `COMPANY_CREATED` in `consts.ts`/`types.ts`) **and** a `"company"` member in the context union. Narrowing the union turns the `=== "company"` checks in `ActivityLogContactCreated`/`ActivityLogContactNoteCreated`/`ActivityLogDealCreated`/`ActivityLogDealNoteCreated` into type errors — prune those branches (the `company_id` "to/at `<company>`" ReferenceField + the `CompanyAvatar` in the deal-note header). `ActivityLog.tsx` has a `companyId` prop + `company_id` filter; `providers/commons/activity.ts` has a `getNewCompanies` fetcher + `companyId` param.- **`company_id` link** on contacts (`ContactInputs` selector, `ContactShow`/`ContactListContent` avatar+name, the exporter's `fetchRelatedRecords` + the `company` CSV column, `contactModel.ts`'s vCard `ORG:` line, `ExportVCardButton.tsx`) and on deals (`DealInputs` required selector, `DealCard`/`DealShow`/`DealEdit` avatar, `DealList` filter), plus the note-header `CompanyAvatar` in `notes/Note.tsx`.- **Denormalized `company_name`** (from `companies_summary`'s `c.name as company_name`) — read in `ContactOption.tsx`, `deals/ContactList.tsx`, `dashboard/HotContacts.tsx`, and the `position_at_company` rendering. **Invisible to a `\bcompan(y|ies)\b` grep** — grep `company_name` separately.-- **`companySectors` config prop** — the Companies `<Card>` holds only a `companySectors` `ArrayInput` (no `validateItemsInUse`); the prop also lives in `defaultConfiguration.ts`, `ConfigurationContext.tsx`, `CRM.tsx`, `App.tsx`, and `SettingsPage.tsx` (the `<Card>`, the section-list entry, transform/defaultValues). It's also read in `useImportFromJson.ts` to validate an imported `sector`.+- **`companySectors` config prop** — see SKILL.md "Shapes a resource takes" for the standard config-prop locations. Companies-specific: the `<Card>` holds only a `companySectors` `ArrayInput` (no `validateItemsInUse`), and it's also read in `useImportFromJson.ts` to validate an imported `sector`.- **Providers** — supabase `getList`/`getOne` route `companies -> companies_summary` (drop both); the contacts FTS list adds `company_name`. FakeRest has `processCompanyLogo` (favicon), `fetchAndUpdateCompanyData` (stamps `company_name` onto contacts, called from the contacts `beforeCreate`/`beforeUpdate`), `updateCompany` (maintains `nb_contacts`/`nb_deals` from the contacts/deals `afterCreate`/`afterDelete`), the whole `companies` callback block, the `companies` arm of the `sales` `beforeDelete` reassignment, and the `getActivityLog(dataProvider, companyId, salesId)` call (drop the `companyId` arg + the `companyId`/`company_id` filter plumbing in `providers/commons/activity.ts`). Delete `providers/commons/getCompanyAvatar.ts` + test.- **FakeRest generators are deeply company-coupled** — `dataGenerator/companies.ts` deleted outright + dropped from `index.ts` (mind the order: sales → tags → [companies] → contacts → …) and `types.ts` (`Db.companies`). `contacts.ts` *picks a company* to derive `company_id`/`company_name`/`sales_id`/`first_seen` (+ a per-company `maxContacts` cap), and `deals.ts` *picks a company* then filters contacts by `company_id` for `contact_ids` — rewrite both to pick a random `db.sales` + `randomDate()` (and random contacts for deals). The `faker` `company` namespace import is unrelated — keep it.- **JSON importer** treats `companies` as a top-level type (`importCompany`, `$.companies.*`, `CompanyImport`/`isCompany`, `mapSizeToCategory`, `companySectors` validation, stats/idsMaps keys) + the `company_id` mapping on imported contacts. Mirror in `ImportPage.tsx` + `import-sample.json`. CSV importer (`useContactImport.tsx`) has a `getCompanies` cache + a `company` column → `company_id`.diff --git a/.claude/skills/delete-initial-resource/contacts.md b/.claude/skills/delete-initial-resource/contacts.mdindex 64de404b..b6928cb9 100644--- a/.claude/skills/delete-initial-resource/contacts.md+++ b/.claude/skills/delete-initial-resource/contacts.md@@ -1,6 +1,6 @@# Deleting `contacts`-**The spine of the CRM and the widest deletion of the five.** Notes attach to `contacts | deals`, tasks belong only to contacts, `tags` is a field on `Contact`, companies aggregate `nb_contacts`, deals link `contact_ids`, and the activity-log + JSON-import + merge subsystems all revolve around it. Removing it orphans notes/tasks/tags. (Read [`core.md`](core.md) first.)+**The spine of the CRM and the widest deletion of the five.** Notes attach to `contacts | deals`, tasks belong only to contacts, `tags` is a field on `Contact`, companies aggregate `nb_contacts`, deals link `contact_ids`, and the activity-log + JSON-import + merge subsystems all revolve around it. Removing it orphans notes/tasks/tags.## Confirm cascade scope firstAsk the user how far to cascade — the answer changes the whole job:diff --git a/.claude/skills/delete-initial-resource/core.md b/.claude/skills/delete-initial-resource/core.mddeleted file mode 100644index f01d8f00..00000000--- a/.claude/skills/delete-initial-resource/core.md+++ /dev/null@@ -1,62 +0,0 @@-# delete-initial-resource — common rules--Read this before touching any resource, then read the per-resource file(s) for what you're deleting.--## The script--`delete-initial-resource.ts` deletes each resource's own folder, then prints the **merged, de-duplicated list of dependent files** (files inside a just-deleted folder are dropped automatically — e.g. `companies/CompanyShow.tsx` won't be listed if you also deleted `companies`). It does **not** edit those files — that's your job. Each entry in the script's `dependentFiles` map has a `//` comment telling you *what* to remove from that path; read it alongside the printed list.--Run from the project root directly:--```bash-node .claude/skills/delete-initial-resource/delete-initial-resource.ts <resource> [<resource> ...]-```--It validates every name (exits on an unknown one or a missing folder), deletes `src/components/atomic-crm/<resource>/` for each, and prints the dependent files plus shared files like `root/CRM.tsx`.--## Shapes a resource takes--A resource is rarely just a folder. Look for each of these — the later ones are invisible to a `\b<resource>\b` grep:--- **Standalone usage** — imports, JSX, routes, menu/nav entries, dashboard widgets, the `<Resource name="...">` entry + imports in `root/CRM.tsx`. Some wrapper components *outside* the folder exist only to render the resource — delete them outright, then clean their importers.-- **Field/column on another record** — fans out much wider than a folder: the type in `types.ts`, the merge logic (`providers/commons/mergeContacts.ts`), CSV/JSON import, i18n, stories/tests, the `StoryWrapper` record builders, and the sample CSVs (`contacts_export.csv`, `test-data/contacts.csv` — drop the column from the header **and** every row). For a *link* column, decide per-link: keep it as an orphaned shell (typed, defaulted) or drop it — remove the UI either way.-- **Aggregated `nb_<resource>` columns** (from the `_summary` views) land on a record type and are read across shows/lists/filters/generators. **Invisible to `\b<resource>\b` grep** (the `_` is a word char) — grep `nb_<resource>` separately. Same for the denormalized `company_name`.-- **Shared subsystems** — notes (over `reference: "contacts" | "deals"`) and the activity log (over a `"company" | "contact" | "deal" | "all"` context union) are parameterised by a union, not keyed to a folder. Narrow the union, delete the per-type render components (`ActivityLog*Created.tsx`) and dead branches, and prune the `providers/commons/activity.ts` fetcher + the `consts.ts`/`types.ts` members. Surviving `=== "<other>"` checks stay valid (tsc won't flag them) — only the deleted member's branches go.-- **Config props** (e.g. `taskTypes`, `dealStages`, `companySectors`) live in `root/defaultConfiguration.ts`, `ConfigurationContext.tsx`, `CRM.tsx` (default + jsdoc + store seed), `App.tsx`, and `SettingsPage.tsx` (the `<Card>` **and** the section-list entry + transform/defaultValues). **A config prop isn't always named after the resource** — grep the resource's settings `<Card>` for other keys (Deals also owned `currency`) and trace each one's consumers; flag borderline-general props rather than dropping them silently.-- **Custom dataProvider methods** live in **both** providers; `CrmDataProvider` is `ReturnType<typeof getDataProviderWithCustomMethods>` (the supabase provider), so removing them there drops them from the type. Also clean each resource's lifecycle-callback blocks in both providers, the `sales` `beforeDelete` reassignment, the supabase `getList` `<resource> -> <resource>_summary` routing, and the FakeRest generators — which *drive* record creation, not just reference the field.-- **The JSON importer** (`misc/useImportFromJson.ts`) treats `contacts`/`companies`/`notes`/`tasks` as top-level importable types (an `import<X>` fn, a `$.<x>.*` path, a `TYPES` arm + switch case, type guards, `stats`/`failedImports`/`idsMaps` keys). Mirror the trims in `ImportPage.tsx` (stats row + help text) and the `import-sample.json` fixture. The CSV importer (`useContactImport.tsx`) has parallel cache + column mappings.-- Don't forget `useCallback`/`useMemo` dependency arrays — a stale `getTags`/`getCompanies` reference there is invisible until `tsc` runs.--## Deleting several at once--- **Order cleanup from the most-coupled resource outward** and read all the relevant per-resource files before editing — the cascade interactions compound.-- Clean a file shared by two deleted resources **once**, for both — don't make two passes that fight each other.-- Reconcile interacting union guidance: deleting both `contacts` and `deals` removes the notes/activity-log subsystem reference *entirely* rather than each narrowing it the other's way — don't half-apply each file's "narrow the union" note.--## Backend (the script only touches frontend)--See the `backend-dev` skill for the migration workflow. In `supabase/schemas/`:--- Drop/adjust the table + view, generate a migration (`npx supabase db diff --local -f remove_<resource>`). Update `contacts_summary`/`companies_summary` if they aggregated the removed data.-- The **`activity_log` view** is a `UNION ALL` where **every branch declares the same column set** — remove the resource's columns from **every** branch (keep the lists aligned), delete its dedicated branch(es), and drop the matching snake→camel rename in the supabase provider's `getList("activity_log")`.-- `06_grants.sql` grants **both** the table and its `<resource>_id_seq` (drop both, or `db diff` fails with `relation "public.<resource>_id_seq" does not exist`). `05_policies.sql` has an `enable row level security` line **and** `create policy` statements (remove both).-- For a resource referenced inside a SQL **function** (`merge_contacts`), drop those lines + the now-unused local var. Editing `02_functions.sql` regenerates the whole function (expected) — renumber leftover step comments so they stay sequential.-- **Orphan subtlety:** deleting triggers can orphan helper functions — but check for shared callers first (`get_domain_favicon` is called by *both* `handle_company_saved` and contact avatars, so it survives a `companies` delete).-- **Edge functions** are separate from the schema and easy to miss: `merge_contacts/`, `_shared/db.ts` (Kysely table types), `postmark/` (inbound email → contact notes), and especially `mcp/` — a whole AI subsystem whose depth varies per resource. When a function loses a capability but survives, **flag the behavior change to the user**.--## Verify--```bash-make typecheck && make lint-```--The dependent-file list is a guide, not a guarantee — resolve whatever `tsc` surfaces. A final `grep -rniE "\b<resource>\b"` over `src/` and `supabase/` is worth it, plus **separate** greps for `nb_<resource>`, `company_name`, and config-prop names (`<resource>Types`, `companySectors`, `currency`). Watch for **benign/substring false positives** and don't blind-delete (each resource file lists its own). Never edit historical files under `supabase/migrations/`.--**i18n is all-or-nothing across both catalogs:** `frenchCrmMessages.ts` is type-checked against the `CrmMessages` type derived from `englishCrmMessages.ts`, so a key must be removed from **both** or **neither** — a one-sided removal is a `tsc` error. Dead `resources.<x>.*` keys are harmless; because cleanup is large and all-or-nothing, **flag them to the user rather than forcing it**. Note: `frenchCrmMessages.ts` uses literal `…` escapes — if an exact-string `Edit` fails on a block spanning one, fall back to `sed -i '<from>,<to>d'` after confirming line numbers with a fresh read.--If local Supabase is running, `npx supabase db reset --local` replays the whole chain + `seed.sql` and catches a broken view/function/grant that `db diff` alone won't (benign `index "…_pkey" does not exist, skipping` NOTICEs are expected). The project runs on Node 22 (see `.nvmrc`), so `make test` (vitest) is also available as a gate if the resource had unit tests.--## Notes--- The deletion is irreversible — rely on git to recover if needed. Confirm the resource(s) with the user before running.-- Per-file guidance lives in the script's `dependentFiles` map comments; if the codebase grows new references, update that map so future runs stay accurate.diff --git a/.claude/skills/delete-initial-resource/deals.md b/.claude/skills/delete-initial-resource/deals.mdindex bac88103..9c01b1f1 100644--- a/.claude/skills/delete-initial-resource/deals.md+++ b/.claude/skills/delete-initial-resource/deals.md@@ -1,6 +1,6 @@# Deleting `deals`-`deals` owns the `deals` + `deal_notes` tables but is woven into **two shared subsystems** (notes, activity log), adds an aggregated `nb_deals` to `companies_summary`, ships **three** config props plus a non-eponymous one, and has a custom dataProvider method — so it fans out almost as wide as a column removal. (Read [`core.md`](core.md) first.)+`deals` owns the `deals` + `deal_notes` tables but is woven into **two shared subsystems** (notes, activity log), adds an aggregated `nb_deals` to `companies_summary`, ships **three** config props plus a non-eponymous one, and has a custom dataProvider method — so it fans out almost as wide as a column removal.## Frontend specifics- **Shared subsystems** — narrow the notes union to `"contacts"` and the activity-log union to drop `"deal"`; prune the `=== "deals"`/`deal_id`/`DealNote` branches (the `=== "contacts"` checks stay valid). Delete `ActivityLogDealCreated.tsx` + `ActivityLogDealNoteCreated.tsx` outright; drop `getNewDealsAndNotes` in `providers/commons/activity.ts` and `DEAL_CREATED`/`DEAL_NOTE_CREATED` + `ActivityDeal*` in `consts.ts`/`types.ts`. Drop the `"deals"` reference test in `NoteInputs.test.tsx`.diff --git a/.claude/skills/delete-initial-resource/tags.md b/.claude/skills/delete-initial-resource/tags.mdindex 0a73be51..41c7548d 100644--- a/.claude/skills/delete-initial-resource/tags.md+++ b/.claude/skills/delete-initial-resource/tags.md@@ -1,11 +1,11 @@# Deleting `tags`-The simplest of the five: `tags` is a **field** (`number[]`) on `Contact` plus a small standalone `tags` folder. No shared subsystem, no config prop, no aggregated column. (Read [`core.md`](core.md) first.)+The simplest of the five: `tags` is a **field** (`number[]`) on `Contact` plus a small standalone `tags` folder. No shared subsystem, no config prop, no aggregated column.## Frontend specifics- Tag-only components under `contacts/` — delete outright: `TagsList.tsx`, `TagsListEdit.tsx`, `BulkTagButton.tsx`. Clean their consumers (`ContactShow`, `ContactAside`, `ContactListContent`, `ContactList`, `ContactListFilter`).- The `contacts.tags` field lives in `contactModel.ts`, `useContactImport.tsx`, `providers/commons/mergeContacts.ts`, the FakeRest generators (`dataGenerator/contacts.ts` + `index.ts` + `types.ts`), the stories/tests (`ContactList.stories.tsx`, `ContactList.test.tsx`, `StoryWrapper.tsx`), and the sample CSVs (`contacts_export.csv`, `test-data/contacts.csv`).-- i18n: drop the `bulk_tag` block, `filters.tags`, and the `tags` resource block (both catalogs — see core.md).+- i18n: drop the `bulk_tag` block, `filters.tags`, and the `tags` resource block (both catalogs — see SKILL.md).## Backend- Drop the `tags` table + its grants/policies/sequence. `merge_contacts` in `02_functions.sql` merges `tags` — drop those lines + the now-unused local var, and renumber step comments.diff --git a/.claude/skills/delete-initial-resource/tasks.md b/.claude/skills/delete-initial-resource/tasks.mdindex b08f7d4b..e9da9550 100644--- a/.claude/skills/delete-initial-resource/tasks.md+++ b/.claude/skills/delete-initial-resource/tasks.md@@ -1,12 +1,12 @@# Deleting `tasks`-`tasks` looks standalone (it owns the `tasks` folder + table) but it **adds an aggregated `nb_tasks` column to `contacts_summary`** (which lands on the `Contact` type) and ships a **`taskTypes` config prop** — so it fans out almost like a column removal. (Read [`core.md`](core.md) first.)+`tasks` looks standalone (it owns the `tasks` folder + table) but it **adds an aggregated `nb_tasks` column to `contacts_summary`** (which lands on the `Contact` type) and ships a **`taskTypes` config prop** — so it fans out almost like a column removal.## Frontend specifics- **`nb_tasks` readers:** `CompanyShow.tsx`, `ContactListContent.tsx`, `ContactShow.tsx` (+ test), `ContactListFilter.tsx` (a `nb_tasks@gt` filter), `ContactMergeButton.tsx`, and the FakeRest provider/generators (which increment/decrement it). **Invisible to `\btasks?\b` grep** — grep `nb_tasks` separately.-- **`taskTypes` config prop** — see core.md "Config props". The Tasks `<Card>` has no `validateItemsInUse`.+- **`taskTypes` config prop** — see SKILL.md "Shapes a resource takes". The Tasks `<Card>` has no `validateItemsInUse`.- **Wrapper components** outside the folder, delete outright: `dashboard/TasksList.tsx`, `contacts/ContactTasksList.tsx`.-- i18n: drop the `tasks` resource block, `task_count`, `upcoming_tasks`, `filters.tasks`, `settings.tasks`, and the import description (both catalogs — see core.md).+- i18n: drop the `tasks` resource block, `task_count`, `upcoming_tasks`, `filters.tasks`, `settings.tasks`, and the import description (both catalogs — see SKILL.md).## Backend- Drop the `tasks` table + grants/policies/sequence.