.cursor/skills/module-boundaries/SKILL.md
Configure and enforce module boundaries in Nx workspace. Use when creating new packages, adding dependencies, or when module boundary violations occur. Applies tags, updates ESLint rules, and ensures dependency constraints are respected.
npx skillsauth add Eventiva/Eventiva module-boundariesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Configure and enforce module boundaries for Eventiva packages using Nx tags and ESLint rules.
Projects should have 2-3 tags:
type:core, type:database, type:extension, type:platformlayer:backend, layer:frontend, layer:sharedcapability:entities, capability:workflows, capability:ui| Source | Can Depend On |
|--------|---------------|
| type:core | (nothing) |
| type:database | type:core |
| type:extension | type:core, type:extension |
| type:platform | type:core, type:database, type:extension, type:platform |
| Source | Can Depend On |
|--------|---------------|
| layer:backend | layer:backend, layer:shared |
| layer:frontend | layer:frontend, layer:shared |
| layer:shared | layer:shared |
Note: Projects with multiple tags must satisfy ALL applicable constraints.
When creating or modifying packages, add 2-3 tags to project.json:
{
"tags": ["type:extension", "layer:backend", "capability:entities", "capability:workflows"]
}
Tag Selection:
Module boundaries are enforced in eslint.config.mjs with both type and layer constraints:
'@nx/enforce-module-boundaries': [
'error',
{
depConstraints: [
// Type-based constraints
{ sourceTag: 'type:core', onlyDependOnLibsWithTags: [] },
{ sourceTag: 'type:database', onlyDependOnLibsWithTags: ['type:core'] },
{ sourceTag: 'type:extension', onlyDependOnLibsWithTags: ['type:core', 'type:extension'] },
{ sourceTag: 'type:platform', onlyDependOnLibsWithTags: ['type:core', 'type:database', 'type:extension', 'type:platform'] },
// Layer-based constraints
{ sourceTag: 'layer:backend', onlyDependOnLibsWithTags: ['layer:backend', 'layer:shared'] },
{ sourceTag: 'layer:frontend', onlyDependOnLibsWithTags: ['layer:frontend', 'layer:shared'] },
{ sourceTag: 'layer:shared', onlyDependOnLibsWithTags: ['layer:shared'] },
],
},
],
project.json: "tags": ["type:extension", "layer:backend", "capability:entities", "capability:workflows"]pnpm nx lint to verifyIf an extension needs database types but cannot have runtime dependency:
dependencies in package.jsondevDependencies in package.jsonWhen ESLint reports a violation:
devDependencies if only types are needed, orAll tags (type, layer, capability) are synchronized with GitHub labels via .github/config.json. Labels use the same naming convention for consistency.
docs/learnings/module-boundaries.mddevelopment
Explore and understand Nx workspaces. USE WHEN answering questions about the workspace, projects, or tasks. ALSO USE WHEN an nx command fails or you need to check available targets/configuration before running a task. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What depends on library Y?', 'What targets can I run?', 'Cannot find configuration for task', 'debug nx task failure'.
development
Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.
tools
Find and add Nx plugins. USE WHEN user wants to discover available plugins, install a new plugin, or add support for a specific framework or technology to the workspace.
development
Import, merge, or combine repositories into an Nx workspace using nx import. USE WHEN the user asks to adopt Nx across repos, move projects into a monorepo, or bring code/history from another repository.