Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .claude/skills/create-module/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ Files to check in `modules/{new-module-name}/`:
- Policy function names
- Test descriptions and fixture data

#### Config-driven enums

Business values (plans, roles, statuses) must be driven by the module config, never hardcoded in models or schemas.

Pattern:
- Define values in `modules/{module}/config/{module}.development.config.js`
- Reference in Mongoose model: `enum: config.{section}.{enumName}`
- Reference in Zod schema: `z.enum(config.{section}.{enumName})`

> Reference: `modules/users/models/users.schema.js` uses `z.enum(config.whitelists.users.roles)`.

### 5. Apply renames carefully

- Case-sensitive, whole-word matches where possible
Expand Down
12 changes: 12 additions & 0 deletions .claude/skills/naming/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ Audit or apply the project's file and folder naming conventions.

> `[.{name}]` is optional — the reference `tasks` module uses the short form (e.g., `tasks.controller.js`, `tasks.service.js`).

### Multi-entity modules

When a module contains multiple entities (e.g., `organizations` with `membership` and `crud`), files are still prefixed by the **module name**, not the entity:

| Correct | Wrong |
| --- | --- |
| `organizations.membership.model.mongoose.js` | `membership.model.mongoose.js` |
Comment thread
PierreBrisorgueil marked this conversation as resolved.
| `organizations.membership.service.js` | `membership.service.js` |
| `organizations.crud.service.js` | `crud.service.js` |

Pattern: `{module}.{entity}[.{name}].{type}.js`

### Naming Tokens

From a module name (e.g., `my-feature`):
Expand Down
Loading