@smartsoft001-mobilems/claude-plugins 2.84.0 → 2.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/.claude-plugin/marketplace.json +2 -6
  2. package/README.md +97 -0
  3. package/package.json +2 -2
  4. package/plugins/flow/scripts/refresh-mobilems-api-spec.sh +372 -0
  5. package/plugins/flow/skills/mobilems-docs-reader/SKILL.md +116 -0
  6. package/plugins/flow-external/scripts/refresh-mobilems-api-spec.sh +372 -0
  7. package/plugins/flow-external/skills/mobilems-docs-reader/SKILL.md +116 -0
  8. package/plugins/flow-legacy/scripts/refresh-mobilems-api-spec.sh +372 -0
  9. package/plugins/flow-legacy/skills/mobilems-docs-reader/SKILL.md +116 -0
  10. package/plugins/mobilems/.claude-plugin/README.md +30 -0
  11. package/plugins/mobilems/.claude-plugin/plugin.json +5 -0
  12. package/plugins/mobilems/scripts/refresh-mobilems-api-spec.sh +372 -0
  13. package/plugins/mobilems/skills/mobilems-docs-reader/SKILL.md +116 -0
  14. package/plugins/flow/.claude-plugin/README.md +0 -91
  15. package/plugins/flow/.claude-plugin/merge-permissions.js +0 -97
  16. package/plugins/flow/.claude-plugin/plugin.json +0 -5
  17. package/plugins/flow/.claude-plugin/settings.template.json +0 -86
  18. package/plugins/flow/agents/angular-component-scaffolder.md +0 -175
  19. package/plugins/flow/agents/angular-directive-builder.md +0 -153
  20. package/plugins/flow/agents/angular-guard-builder.md +0 -243
  21. package/plugins/flow/agents/angular-jest-test-writer.md +0 -474
  22. package/plugins/flow/agents/angular-pipe-builder.md +0 -169
  23. package/plugins/flow/agents/angular-resolver-builder.md +0 -286
  24. package/plugins/flow/agents/angular-service-builder.md +0 -161
  25. package/plugins/flow/agents/angular-signal-state-builder.md +0 -339
  26. package/plugins/flow/agents/angular-test-diagnostician.md +0 -279
  27. package/plugins/flow/agents/angular-testbed-configurator.md +0 -315
  28. package/plugins/flow/agents/arch-scaffolder.md +0 -278
  29. package/plugins/flow/agents/e2e-data-testid-injector.md +0 -197
  30. package/plugins/flow/agents/e2e-project-scaffolder.md +0 -194
  31. package/plugins/flow/agents/e2e-test-writer.md +0 -350
  32. package/plugins/flow/agents/shared-agent-evolver.md +0 -294
  33. package/plugins/flow/agents/shared-build-verifier.md +0 -160
  34. package/plugins/flow/agents/shared-config-updater.md +0 -310
  35. package/plugins/flow/agents/shared-coverage-enforcer.md +0 -184
  36. package/plugins/flow/agents/shared-error-handler.md +0 -217
  37. package/plugins/flow/agents/shared-file-creator.md +0 -344
  38. package/plugins/flow/agents/shared-impl-orchestrator.md +0 -312
  39. package/plugins/flow/agents/shared-impl-reporter.md +0 -339
  40. package/plugins/flow/agents/shared-impl-teammate.md +0 -201
  41. package/plugins/flow/agents/shared-linear-subtask-iterator.md +0 -337
  42. package/plugins/flow/agents/shared-logic-implementer.md +0 -243
  43. package/plugins/flow/agents/shared-maia-api.md +0 -26
  44. package/plugins/flow/agents/shared-parallelization-analyzer.md +0 -343
  45. package/plugins/flow/agents/shared-performance-validator.md +0 -168
  46. package/plugins/flow/agents/shared-plan-perspective.md +0 -269
  47. package/plugins/flow/agents/shared-project-standardizer.md +0 -205
  48. package/plugins/flow/agents/shared-report-synthesizer.md +0 -188
  49. package/plugins/flow/agents/shared-review-teammate.md +0 -189
  50. package/plugins/flow/agents/shared-security-scanner.md +0 -186
  51. package/plugins/flow/agents/shared-style-enforcer.md +0 -230
  52. package/plugins/flow/agents/shared-subtask-dependency-analyzer.md +0 -188
  53. package/plugins/flow/agents/shared-tdd-developer.md +0 -350
  54. package/plugins/flow/agents/shared-team-coordinator.md +0 -189
  55. package/plugins/flow/agents/shared-test-fixer.md +0 -186
  56. package/plugins/flow/agents/shared-test-runner.md +0 -191
  57. package/plugins/flow/agents/shared-ui-classifier.md +0 -263
  58. package/plugins/flow/agents/shared-verification-orchestrator.md +0 -194
  59. package/plugins/flow/agents/shared-verification-runner.md +0 -140
  60. package/plugins/flow/agents/ui-a11y-validator.md +0 -305
  61. package/plugins/flow/agents/ui-screenshot-reporter.md +0 -329
  62. package/plugins/flow/agents/ui-web-designer.md +0 -214
  63. package/plugins/flow/skills/a11y-audit/SKILL.md +0 -214
  64. package/plugins/flow/skills/angular-patterns/SKILL.md +0 -191
  65. package/plugins/flow/skills/browser-capture/SKILL.md +0 -238
  66. package/plugins/flow/skills/commit/SKILL.md +0 -259
  67. package/plugins/flow/skills/debug-helper/SKILL.md +0 -375
  68. package/plugins/flow/skills/impl/SKILL.md +0 -992
  69. package/plugins/flow/skills/linear-suggestion/SKILL.md +0 -132
  70. package/plugins/flow/skills/maia-files-delete/SKILL.md +0 -59
  71. package/plugins/flow/skills/maia-files-upload/SKILL.md +0 -57
  72. package/plugins/flow/skills/nx-conventions/SKILL.md +0 -326
  73. package/plugins/flow/skills/plan/SKILL.md +0 -1003
  74. package/plugins/flow/skills/push/SKILL.md +0 -737
  75. package/plugins/flow/skills/review/SKILL.md +0 -443
  76. package/plugins/flow/skills/test-e2e/SKILL.md +0 -161
  77. package/plugins/flow/skills/test-unit/SKILL.md +0 -456
  78. package/plugins/flow-external/.claude-plugin/README.md +0 -152
  79. package/plugins/flow-external/.claude-plugin/merge-permissions.js +0 -80
  80. package/plugins/flow-external/.claude-plugin/plugin.json +0 -5
  81. package/plugins/flow-external/.claude-plugin/settings.template.json +0 -78
  82. package/plugins/flow-external/agents/angular-component-scaffolder.md +0 -269
  83. package/plugins/flow-external/agents/angular-directive-builder.md +0 -130
  84. package/plugins/flow-external/agents/angular-guard-builder.md +0 -70
  85. package/plugins/flow-external/agents/angular-pipe-builder.md +0 -82
  86. package/plugins/flow-external/agents/angular-resolver-builder.md +0 -74
  87. package/plugins/flow-external/agents/angular-service-builder.md +0 -160
  88. package/plugins/flow-external/agents/angular-state-builder.md +0 -254
  89. package/plugins/flow-external/agents/shared-build-verifier.md +0 -67
  90. package/plugins/flow-external/agents/shared-impl-orchestrator.md +0 -88
  91. package/plugins/flow-external/agents/shared-impl-reporter.md +0 -107
  92. package/plugins/flow-external/agents/shared-linear-subtask-iterator.md +0 -70
  93. package/plugins/flow-external/agents/shared-ui-classifier.md +0 -38
  94. package/plugins/flow-external/agents/ui-web-designer.md +0 -179
  95. package/plugins/flow-external/skills/a11y-audit/SKILL.md +0 -96
  96. package/plugins/flow-external/skills/angular-cli-conventions/SKILL.md +0 -267
  97. package/plugins/flow-external/skills/angular-patterns/SKILL.md +0 -170
  98. package/plugins/flow-external/skills/browser-capture/SKILL.md +0 -68
  99. package/plugins/flow-external/skills/commit/SKILL.md +0 -114
  100. package/plugins/flow-external/skills/debug-helper/SKILL.md +0 -131
  101. package/plugins/flow-external/skills/impl/SKILL.md +0 -217
  102. package/plugins/flow-external/skills/linear-suggestion/SKILL.md +0 -62
  103. package/plugins/flow-external/skills/maia-files-delete/SKILL.md +0 -34
  104. package/plugins/flow-external/skills/maia-files-upload/SKILL.md +0 -41
  105. package/plugins/flow-external/skills/plan/SKILL.md +0 -302
  106. package/plugins/flow-external/skills/push/SKILL.md +0 -210
  107. package/plugins/flow-legacy/.claude-plugin/README.md +0 -143
  108. package/plugins/flow-legacy/.claude-plugin/merge-permissions.js +0 -94
  109. package/plugins/flow-legacy/.claude-plugin/plugin.json +0 -5
  110. package/plugins/flow-legacy/.claude-plugin/settings.template.json +0 -79
  111. package/plugins/flow-legacy/agents/angular-component-scaffolder.md +0 -323
  112. package/plugins/flow-legacy/agents/angular-directive-builder.md +0 -258
  113. package/plugins/flow-legacy/agents/angular-guard-builder.md +0 -322
  114. package/plugins/flow-legacy/agents/angular-pipe-builder.md +0 -227
  115. package/plugins/flow-legacy/agents/angular-resolver-builder.md +0 -332
  116. package/plugins/flow-legacy/agents/angular-service-builder.md +0 -271
  117. package/plugins/flow-legacy/agents/angular-state-builder.md +0 -479
  118. package/plugins/flow-legacy/agents/shared-impl-orchestrator.md +0 -174
  119. package/plugins/flow-legacy/agents/shared-impl-reporter.md +0 -204
  120. package/plugins/flow-legacy/agents/shared-linear-subtask-iterator.md +0 -187
  121. package/plugins/flow-legacy/agents/shared-tdd-developer.md +0 -306
  122. package/plugins/flow-legacy/agents/shared-test-runner.md +0 -131
  123. package/plugins/flow-legacy/agents/shared-ui-classifier.md +0 -145
  124. package/plugins/flow-legacy/skills/a11y-audit/SKILL.md +0 -214
  125. package/plugins/flow-legacy/skills/angular-patterns/SKILL.md +0 -346
  126. package/plugins/flow-legacy/skills/browser-capture/SKILL.md +0 -238
  127. package/plugins/flow-legacy/skills/commit/SKILL.md +0 -215
  128. package/plugins/flow-legacy/skills/debug-helper/SKILL.md +0 -395
  129. package/plugins/flow-legacy/skills/impl/SKILL.md +0 -710
  130. package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +0 -132
  131. package/plugins/flow-legacy/skills/maia-files-delete/SKILL.md +0 -59
  132. package/plugins/flow-legacy/skills/maia-files-upload/SKILL.md +0 -57
  133. package/plugins/flow-legacy/skills/nx-conventions/SKILL.md +0 -368
  134. package/plugins/flow-legacy/skills/plan/SKILL.md +0 -708
  135. package/plugins/flow-legacy/skills/push/SKILL.md +0 -623
  136. package/plugins/flow-legacy/skills/test-unit/SKILL.md +0 -500
@@ -1,132 +0,0 @@
1
- ---
2
- name: linear-suggestion
3
- description: Create a Linear issue in the "MobileMS Framework" project with a suggestion for agent or skill improvements.
4
- allowed-tools: mcp__linear__save_issue
5
- ---
6
-
7
- # Linear Suggestion
8
-
9
- Create a Linear issue in the **MobileMS Framework** project containing a suggestion for improving agent definitions or skills. Used by automated analysis agents to propose changes without blocking the workflow.
10
-
11
- ## When to Use
12
-
13
- - When an automated agent (e.g., `shared-parallelization-analyzer`) identifies a recurring pattern that could improve an agent or skill
14
- - When proposing orchestrator rule changes based on parallelization analysis
15
- - When any non-interactive process needs to suggest framework improvements
16
-
17
- ## Input Parameters
18
-
19
- The invoking agent must provide:
20
-
21
- | Parameter | Required | Description |
22
- | ------------- | -------- | ----------------------------------------------------------------------------- |
23
- | `title` | YES | Short summary of the suggestion (max 100 chars) |
24
- | `description` | YES | Full markdown description with rationale and proposed changes |
25
- | `source` | YES | Agent that generated the suggestion (e.g., `shared-parallelization-analyzer`) |
26
- | `targetFile` | NO | Path to the file to be modified (e.g., `agents/shared-impl-orchestrator.md`) |
27
- | `category` | NO | One of: `OPTIMIZATION`, `NEW_RULE`, `PATTERN_UPDATE`, `BUG_FIX` |
28
-
29
- ## Issue Format
30
-
31
- ### Title
32
-
33
- ```
34
- [Agent Suggestion] {title}
35
- ```
36
-
37
- ### Description
38
-
39
- ```markdown
40
- ## Agent Improvement Suggestion
41
-
42
- **Source agent**: `{source}`
43
- **Category**: {category}
44
- **Target file**: `{targetFile}`
45
-
46
- ---
47
-
48
- {description}
49
-
50
- ---
51
-
52
- _This issue was automatically created by `{source}` via the `linear-suggestion` skill._
53
- _Review and apply manually if the suggestion is valid._
54
- ```
55
-
56
- ## Process
57
-
58
- 1. **Format the issue title** with `[Agent Suggestion]` prefix
59
- 2. **Build the description** using the template above, inserting all provided parameters
60
- 3. **Create the issue** using MCP Linear server:
61
-
62
- ```
63
- Create issue in project "MobileMS Framework":
64
- - Title: [Agent Suggestion] {title}
65
- - Description: {formatted description}
66
- - Label: agent-evolution
67
- ```
68
-
69
- 4. **Return the issue ID and URL** to the invoking agent
70
-
71
- ## Output Format
72
-
73
- After successful creation, return:
74
-
75
- ```
76
- Linear issue created:
77
- - ID: {issueId}
78
- - Title: [Agent Suggestion] {title}
79
- - URL: {issueUrl}
80
- ```
81
-
82
- ## Error Handling
83
-
84
- If issue creation fails (e.g., MCP Linear server unavailable):
85
-
86
- - Log the error silently
87
- - Do NOT block the parent workflow
88
- - Return a failure notice without throwing
89
-
90
- ```
91
- Linear suggestion skipped: {error reason}
92
- ```
93
-
94
- ## Example
95
-
96
- **Input from `shared-parallelization-analyzer`:**
97
-
98
- ```
99
- title: Add parallel scaffolding rule to orchestrator
100
- description: |
101
- ### Observation
102
-
103
- In 3 out of 5 recent tasks, scaffolding agents for independent files
104
- (e.g., `angular-component-scaffolder` + `angular-service-builder`) were
105
- marked as SEQ despite having no shared output files.
106
-
107
- ### Proposed Change
108
-
109
- Add to `shared-impl-orchestrator.md` -> Execution Patterns -> Parallel vs Sequential:
110
-
111
- | Scenario | Pattern | Reason |
112
- | --------------------------------------- | -------- | ------------------------------- |
113
- | Multiple scaffolding for independent files | PARALLEL | No shared output files between scaffolders |
114
-
115
- ### Evidence
116
-
117
- - MOB-700: scaffold-component + scaffold-service (independent)
118
- - MOB-705: scaffold-directive + scaffold-service (independent)
119
- - MOB-710: scaffold-component + scaffold-pipe (independent)
120
- source: shared-parallelization-analyzer
121
- targetFile: packages/shared/claude-plugins/src/plugins/flow-legacy/agents/shared-impl-orchestrator.md
122
- category: OPTIMIZATION
123
- ```
124
-
125
- **Created issue:**
126
-
127
- ```
128
- Linear issue created:
129
- - ID: MOB-815
130
- - Title: [Agent Suggestion] Add parallel scaffolding rule to orchestrator
131
- - URL: https://linear.app/mobilems/issue/MOB-815
132
- ```
@@ -1,59 +0,0 @@
1
- ---
2
- name: maia-files-delete
3
- description: Delete a file from Maia API temporary storage.
4
- allowed-tools: Bash
5
- ---
6
-
7
- # Maia Files Delete
8
-
9
- Delete a file from Maia AI API temporary storage to free up space.
10
-
11
- ## API Endpoint
12
-
13
- ```
14
- DELETE https://maia-ai-api.smartsoft.biz.pl/files/{id}
15
- ```
16
-
17
- ## Usage
18
-
19
- When given a file ID or URL, delete it:
20
-
21
- ```bash
22
- curl -s -X DELETE https://maia-ai-api.smartsoft.biz.pl/files/{id}
23
- ```
24
-
25
- ## Process
26
-
27
- 1. Extract ID from input (can be full URL or just ID)
28
- 2. Send DELETE request
29
- 3. Confirm deletion
30
-
31
- ## Input Formats
32
-
33
- Accept either:
34
-
35
- - Full URL: `https://maia-ai-api.smartsoft.biz.pl/files/abc123`
36
- - Just ID: `abc123`
37
-
38
- ## Output Format
39
-
40
- After successful deletion:
41
-
42
- ```
43
- Deleted: {id}
44
- ```
45
-
46
- ## Batch Deletion
47
-
48
- When given multiple IDs, delete them all:
49
-
50
- ```bash
51
- for id in id1 id2 id3; do
52
- curl -s -X DELETE "https://maia-ai-api.smartsoft.biz.pl/files/$id"
53
- echo "Deleted: $id"
54
- done
55
- ```
56
-
57
- ## Error Handling
58
-
59
- If deletion fails, report the error but continue with remaining files.
@@ -1,57 +0,0 @@
1
- ---
2
- name: maia-files-upload
3
- description: Upload a file to Maia API temporary storage.
4
- allowed-tools: Bash
5
- ---
6
-
7
- # Maia Files Upload
8
-
9
- Upload a file to the Maia AI API temporary storage and get a URL for use in Linear comments or markdown.
10
-
11
- ## API Endpoint
12
-
13
- ```
14
- POST https://maia-ai-api.smartsoft.biz.pl/files
15
- ```
16
-
17
- ## Usage
18
-
19
- When given a file path, upload it:
20
-
21
- ```bash
22
- curl -s -X POST https://maia-ai-api.smartsoft.biz.pl/files \
23
- -F "file=@/path/to/file.png"
24
- ```
25
-
26
- ## Response
27
-
28
- ```json
29
- { "id": "abc123def456" }
30
- ```
31
-
32
- ## Result URL
33
-
34
- ```
35
- https://maia-ai-api.smartsoft.biz.pl/files/{id}
36
- ```
37
-
38
- ## Process
39
-
40
- 1. Validate file exists: `test -f "/path/to/file" && echo "OK"`
41
- 2. Upload file using curl
42
- 3. Extract ID from JSON response
43
- 4. Return ID and full URL
44
-
45
- ## Output Format
46
-
47
- After successful upload, return:
48
-
49
- ```
50
- Uploaded: {filename}
51
- ID: {id}
52
- URL: https://maia-ai-api.smartsoft.biz.pl/files/{id}
53
- ```
54
-
55
- ## Error Handling
56
-
57
- If file doesn't exist or upload fails, report the error clearly.
@@ -1,368 +0,0 @@
1
- ---
2
- name: nx-conventions
3
- description: Nx 14 monorepo patterns with @nrwl/* packages, workspace organization, and build conventions
4
- ---
5
-
6
- # Nx 14 Conventions (Legacy)
7
-
8
- This skill provides guidance on Nx 14 monorepo patterns for legacy projects using `@nrwl/*` packages.
9
-
10
- ## CRITICAL: Nx 14 vs Modern Nx
11
-
12
- | Feature | Nx 14 (Legacy) | Nx 21+ (Modern) |
13
- | -------- | ---------------------------------- | --------------- |
14
- | Packages | `@nrwl/*` | `@nx/*` |
15
- | Node.js | 18.x | 20.x / 22.x |
16
- | Angular | 14.x | 20.x |
17
- | Config | `workspace.json` or `project.json` | `project.json` |
18
-
19
- ## 1. Workspace Structure
20
-
21
- ```
22
- /
23
- ├── apps/
24
- │ ├── web/ # Main Angular 14 application
25
- │ └── web-e2e/ # Cypress E2E tests
26
- ├── libs/
27
- │ └── shared/
28
- │ └── angular/ # Shared Angular library
29
- ├── tools/
30
- │ ├── specs/ # Project specifications
31
- │ └── mockups/ # Design mockups
32
- ├── nx.json # Nx workspace configuration
33
- ├── tsconfig.base.json # Base TypeScript config
34
- └── package.json
35
- ```
36
-
37
- ## 2. Project Naming
38
-
39
- | Type | Pattern | Example |
40
- | ------------------- | ------------------------ | ------------------------------ |
41
- | Apps | `{name}` | `web`, `api` |
42
- | E2E | `{app}-e2e` | `web-e2e` |
43
- | Domain libs | `{domain}-domain` | `museum-objects-domain` |
44
- | Angular libs | `{domain}-shell-angular` | `museum-objects-shell-angular` |
45
- | Shared angular libs | `shared-angular` | `shared-angular` |
46
-
47
- ## 3. Common Nx 14 Commands
48
-
49
- ### Development
50
-
51
- ```bash
52
- # Serve application
53
- nx serve web
54
-
55
- # Serve with specific configuration
56
- nx serve web --configuration=development
57
-
58
- # Build application
59
- nx build web
60
-
61
- # Build for production
62
- nx build web --configuration=production
63
- ```
64
-
65
- ### Testing
66
-
67
- ```bash
68
- # Run unit tests
69
- nx test web
70
- nx test shared-angular
71
-
72
- # Run tests with coverage
73
- nx test web --coverage
74
-
75
- # Run tests in watch mode
76
- nx test web --watch
77
-
78
- # Run E2E tests
79
- nx e2e web-e2e
80
-
81
- # Open Cypress
82
- nx open-cypress web-e2e
83
- ```
84
-
85
- ### Linting
86
-
87
- ```bash
88
- # Lint project
89
- nx lint web
90
- nx lint shared-angular
91
-
92
- # Lint all affected projects
93
- nx affected --target=lint
94
- ```
95
-
96
- ### Building
97
-
98
- ```bash
99
- # Build single project
100
- nx build web
101
-
102
- # Build affected projects
103
- nx affected --target=build
104
-
105
- # Show dependency graph
106
- nx graph
107
- ```
108
-
109
- ## 4. Affected Commands
110
-
111
- Run tasks only on changed projects:
112
-
113
- ```bash
114
- # Test affected
115
- nx affected --target=test
116
-
117
- # Lint affected
118
- nx affected --target=lint
119
-
120
- # Build affected
121
- nx affected --target=build
122
-
123
- # Specify base branch
124
- nx affected --target=test --base=main
125
- ```
126
-
127
- ## 5. Project Configuration (Nx 14)
128
-
129
- ### project.json (Nx 14 format)
130
-
131
- ```json
132
- {
133
- "name": "web",
134
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
135
- "projectType": "application",
136
- "sourceRoot": "apps/web/src",
137
- "prefix": "app",
138
- "targets": {
139
- "build": {
140
- "executor": "@angular-devkit/build-angular:browser",
141
- "options": {
142
- "outputPath": "dist/apps/web",
143
- "index": "apps/web/src/index.html",
144
- "main": "apps/web/src/main.ts",
145
- "polyfills": "apps/web/src/polyfills.ts",
146
- "tsConfig": "apps/web/tsconfig.app.json",
147
- "assets": ["apps/web/src/favicon.ico", "apps/web/src/assets"],
148
- "styles": ["apps/web/src/styles.scss"],
149
- "scripts": []
150
- },
151
- "configurations": {
152
- "production": {
153
- "budgets": [
154
- {
155
- "type": "initial",
156
- "maximumWarning": "2MB",
157
- "maximumError": "4MB"
158
- }
159
- ],
160
- "outputHashing": "all",
161
- "optimization": true
162
- },
163
- "development": {
164
- "buildOptimizer": false,
165
- "optimization": false,
166
- "vendorChunk": true,
167
- "extractLicenses": false,
168
- "sourceMap": true
169
- }
170
- },
171
- "defaultConfiguration": "development"
172
- },
173
- "serve": {
174
- "executor": "@angular-devkit/build-angular:dev-server",
175
- "options": {
176
- "browserTarget": "web:build",
177
- "port": 4200
178
- },
179
- "configurations": {
180
- "production": {
181
- "browserTarget": "web:build:production"
182
- },
183
- "development": {
184
- "browserTarget": "web:build:development"
185
- }
186
- },
187
- "defaultConfiguration": "development"
188
- },
189
- "test": {
190
- "executor": "@nrwl/jest:jest",
191
- "options": {
192
- "jestConfig": "apps/web/jest.config.ts",
193
- "passWithNoTests": true
194
- },
195
- "outputs": ["{workspaceRoot}/coverage/apps/web"]
196
- },
197
- "lint": {
198
- "executor": "@nrwl/linter:eslint",
199
- "options": {
200
- "lintFilePatterns": ["apps/web/src/**/*.ts", "apps/web/src/**/*.html"]
201
- }
202
- }
203
- }
204
- }
205
- ```
206
-
207
- ## 6. Path Mappings
208
-
209
- In `tsconfig.base.json`:
210
-
211
- ```json
212
- {
213
- "compilerOptions": {
214
- "paths": {
215
- "@shared/angular": ["libs/shared/angular/src/index.ts"],
216
- "@shared/angular/*": ["libs/shared/angular/src/lib/*"]
217
- }
218
- }
219
- }
220
- ```
221
-
222
- Usage:
223
-
224
- ```typescript
225
- import { SharedModule } from '@shared/angular';
226
- import { MyService } from '@shared/angular/services';
227
- ```
228
-
229
- ## 7. Library Types
230
-
231
- ### Feature Library
232
-
233
- Contains smart components, routes, and business logic.
234
-
235
- ```typescript
236
- // libs/museum/feature-objects/src/index.ts
237
- export * from './lib/objects.module';
238
- export * from './lib/containers';
239
- ```
240
-
241
- ### UI Library
242
-
243
- Contains presentational (dumb) components only.
244
-
245
- ```typescript
246
- // libs/shared/ui/src/index.ts
247
- export * from './lib/button/button.component';
248
- export * from './lib/card/card.component';
249
- ```
250
-
251
- ### Data Access Library
252
-
253
- Contains services, state management, and API calls.
254
-
255
- ```typescript
256
- // libs/museum/data-access/src/index.ts
257
- export * from './lib/services/objects.service';
258
- export * from './lib/+state/objects.facade';
259
- ```
260
-
261
- ### Utility Library
262
-
263
- Contains pure functions, helpers, and utilities.
264
-
265
- ```typescript
266
- // libs/shared/util-forms/src/index.ts
267
- export * from './lib/validators';
268
- export * from './lib/form-helpers';
269
- ```
270
-
271
- ## 8. Caching
272
-
273
- Nx caches task results. Configure in `nx.json`:
274
-
275
- ```json
276
- {
277
- "targetDefaults": {
278
- "build": {
279
- "cache": true,
280
- "dependsOn": ["^build"]
281
- },
282
- "test": {
283
- "cache": true
284
- },
285
- "lint": {
286
- "cache": true
287
- }
288
- }
289
- }
290
- ```
291
-
292
- ## 9. Task Dependencies
293
-
294
- Define task execution order:
295
-
296
- ```json
297
- {
298
- "targetDefaults": {
299
- "build": {
300
- "dependsOn": ["^build"]
301
- },
302
- "test": {
303
- "dependsOn": ["build"]
304
- }
305
- }
306
- }
307
- ```
308
-
309
- - `^build` means build dependencies first
310
- - `build` means build this project first
311
-
312
- ## 10. Generators (Nx 14 / @nrwl)
313
-
314
- Create new code with generators:
315
-
316
- ```bash
317
- # Generate Angular component
318
- nx g @nrwl/angular:component my-component --project=shared-angular
319
-
320
- # Generate Angular service
321
- nx g @nrwl/angular:service my-service --project=shared-angular
322
-
323
- # Generate library
324
- nx g @nrwl/angular:library my-lib --directory=shared
325
-
326
- # Generate module
327
- nx g @nrwl/angular:module my-module --project=shared-angular
328
-
329
- # Dry run (preview changes)
330
- nx g @nrwl/angular:component my-component --dry-run
331
- ```
332
-
333
- ## 11. CI/CD Integration
334
-
335
- ```yaml
336
- # Example GitHub Actions
337
- - name: Install dependencies
338
- run: npm ci
339
-
340
- - name: Run affected lint
341
- run: npx nx affected --target=lint --base=origin/main
342
-
343
- - name: Run affected test
344
- run: npx nx affected --target=test --base=origin/main
345
-
346
- - name: Run affected build
347
- run: npx nx affected --target=build --base=origin/main --configuration=production
348
- ```
349
-
350
- ## 12. Best Practices (Nx 14)
351
-
352
- 1. **Keep apps thin** - Business logic in libraries
353
- 2. **Use affected** - Only build/test what changed
354
- 3. **Leverage caching** - Let Nx cache task results
355
- 4. **Consistent naming** - Follow naming conventions
356
- 5. **Define boundaries** - Use tags and constraints
357
- 6. **Path aliases** - Use `@scope/lib` imports
358
- 7. **Use @nrwl packages** - NOT @nx packages in Nx 14
359
-
360
- ## 13. Package Differences
361
-
362
- | Feature | @nrwl (Nx 14) | @nx (Modern) |
363
- | ------- | --------------------- | ----------------- |
364
- | Jest | `@nrwl/jest:jest` | `@nx/jest:jest` |
365
- | Linter | `@nrwl/linter:eslint` | `@nx/eslint:lint` |
366
- | Angular | `@nrwl/angular:*` | `@nx/angular:*` |
367
- | Node | `@nrwl/node:*` | `@nx/node:*` |
368
- | Cypress | `@nrwl/cypress:*` | `@nx/cypress:*` |