@smartsoft001-mobilems/claude-plugins 2.85.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.
- package/.claude-plugin/marketplace.json +2 -6
- package/package.json +2 -2
- package/plugins/mobilems/.claude-plugin/README.md +30 -0
- package/plugins/mobilems/.claude-plugin/plugin.json +5 -0
- package/plugins/mobilems/scripts/refresh-mobilems-api-spec.sh +372 -0
- package/plugins/mobilems/skills/mobilems-docs-reader/SKILL.md +116 -0
- package/plugins/flow/.claude-plugin/README.md +0 -91
- package/plugins/flow/.claude-plugin/merge-permissions.js +0 -97
- package/plugins/flow/.claude-plugin/plugin.json +0 -5
- package/plugins/flow/.claude-plugin/settings.template.json +0 -86
- package/plugins/flow/agents/angular-component-scaffolder.md +0 -175
- package/plugins/flow/agents/angular-directive-builder.md +0 -153
- package/plugins/flow/agents/angular-guard-builder.md +0 -243
- package/plugins/flow/agents/angular-jest-test-writer.md +0 -474
- package/plugins/flow/agents/angular-pipe-builder.md +0 -169
- package/plugins/flow/agents/angular-resolver-builder.md +0 -286
- package/plugins/flow/agents/angular-service-builder.md +0 -161
- package/plugins/flow/agents/angular-signal-state-builder.md +0 -339
- package/plugins/flow/agents/angular-test-diagnostician.md +0 -279
- package/plugins/flow/agents/angular-testbed-configurator.md +0 -315
- package/plugins/flow/agents/arch-scaffolder.md +0 -278
- package/plugins/flow/agents/e2e-data-testid-injector.md +0 -197
- package/plugins/flow/agents/e2e-project-scaffolder.md +0 -194
- package/plugins/flow/agents/e2e-test-writer.md +0 -350
- package/plugins/flow/agents/shared-agent-evolver.md +0 -294
- package/plugins/flow/agents/shared-build-verifier.md +0 -160
- package/plugins/flow/agents/shared-config-updater.md +0 -310
- package/plugins/flow/agents/shared-coverage-enforcer.md +0 -184
- package/plugins/flow/agents/shared-error-handler.md +0 -217
- package/plugins/flow/agents/shared-file-creator.md +0 -344
- package/plugins/flow/agents/shared-impl-orchestrator.md +0 -312
- package/plugins/flow/agents/shared-impl-reporter.md +0 -368
- package/plugins/flow/agents/shared-impl-teammate.md +0 -201
- package/plugins/flow/agents/shared-linear-subtask-iterator.md +0 -337
- package/plugins/flow/agents/shared-logic-implementer.md +0 -243
- package/plugins/flow/agents/shared-maia-api.md +0 -26
- package/plugins/flow/agents/shared-parallelization-analyzer.md +0 -343
- package/plugins/flow/agents/shared-performance-validator.md +0 -168
- package/plugins/flow/agents/shared-plan-perspective.md +0 -269
- package/plugins/flow/agents/shared-project-standardizer.md +0 -205
- package/plugins/flow/agents/shared-report-synthesizer.md +0 -188
- package/plugins/flow/agents/shared-review-teammate.md +0 -189
- package/plugins/flow/agents/shared-security-scanner.md +0 -186
- package/plugins/flow/agents/shared-style-enforcer.md +0 -230
- package/plugins/flow/agents/shared-subtask-dependency-analyzer.md +0 -188
- package/plugins/flow/agents/shared-tdd-developer.md +0 -350
- package/plugins/flow/agents/shared-team-coordinator.md +0 -189
- package/plugins/flow/agents/shared-test-fixer.md +0 -186
- package/plugins/flow/agents/shared-test-runner.md +0 -191
- package/plugins/flow/agents/shared-ui-classifier.md +0 -263
- package/plugins/flow/agents/shared-verification-orchestrator.md +0 -194
- package/plugins/flow/agents/shared-verification-runner.md +0 -140
- package/plugins/flow/agents/ui-a11y-validator.md +0 -305
- package/plugins/flow/agents/ui-screenshot-reporter.md +0 -329
- package/plugins/flow/agents/ui-web-designer.md +0 -214
- package/plugins/flow/scripts/compute-session-tokens.sh +0 -39
- package/plugins/flow/skills/a11y-audit/SKILL.md +0 -214
- package/plugins/flow/skills/angular-patterns/SKILL.md +0 -191
- package/plugins/flow/skills/browser-capture/SKILL.md +0 -238
- package/plugins/flow/skills/commit/SKILL.md +0 -259
- package/plugins/flow/skills/debug-helper/SKILL.md +0 -375
- package/plugins/flow/skills/impl/SKILL.md +0 -992
- package/plugins/flow/skills/linear-suggestion/SKILL.md +0 -132
- package/plugins/flow/skills/maia-files-delete/SKILL.md +0 -59
- package/plugins/flow/skills/maia-files-upload/SKILL.md +0 -57
- package/plugins/flow/skills/nx-conventions/SKILL.md +0 -326
- package/plugins/flow/skills/plan/SKILL.md +0 -1033
- package/plugins/flow/skills/push/SKILL.md +0 -759
- package/plugins/flow/skills/review/SKILL.md +0 -443
- package/plugins/flow/skills/test-e2e/SKILL.md +0 -161
- package/plugins/flow/skills/test-unit/SKILL.md +0 -456
- package/plugins/flow-external/.claude-plugin/README.md +0 -152
- package/plugins/flow-external/.claude-plugin/merge-permissions.js +0 -80
- package/plugins/flow-external/.claude-plugin/plugin.json +0 -5
- package/plugins/flow-external/.claude-plugin/settings.template.json +0 -78
- package/plugins/flow-external/agents/angular-component-scaffolder.md +0 -269
- package/plugins/flow-external/agents/angular-directive-builder.md +0 -130
- package/plugins/flow-external/agents/angular-guard-builder.md +0 -70
- package/plugins/flow-external/agents/angular-pipe-builder.md +0 -82
- package/plugins/flow-external/agents/angular-resolver-builder.md +0 -74
- package/plugins/flow-external/agents/angular-service-builder.md +0 -160
- package/plugins/flow-external/agents/angular-state-builder.md +0 -254
- package/plugins/flow-external/agents/shared-build-verifier.md +0 -67
- package/plugins/flow-external/agents/shared-impl-orchestrator.md +0 -88
- package/plugins/flow-external/agents/shared-impl-reporter.md +0 -135
- package/plugins/flow-external/agents/shared-linear-subtask-iterator.md +0 -70
- package/plugins/flow-external/agents/shared-ui-classifier.md +0 -38
- package/plugins/flow-external/agents/ui-web-designer.md +0 -179
- package/plugins/flow-external/scripts/compute-session-tokens.sh +0 -39
- package/plugins/flow-external/skills/a11y-audit/SKILL.md +0 -96
- package/plugins/flow-external/skills/angular-cli-conventions/SKILL.md +0 -267
- package/plugins/flow-external/skills/angular-patterns/SKILL.md +0 -170
- package/plugins/flow-external/skills/browser-capture/SKILL.md +0 -68
- package/plugins/flow-external/skills/commit/SKILL.md +0 -114
- package/plugins/flow-external/skills/debug-helper/SKILL.md +0 -131
- package/plugins/flow-external/skills/impl/SKILL.md +0 -217
- package/plugins/flow-external/skills/linear-suggestion/SKILL.md +0 -62
- package/plugins/flow-external/skills/maia-files-delete/SKILL.md +0 -34
- package/plugins/flow-external/skills/maia-files-upload/SKILL.md +0 -41
- package/plugins/flow-external/skills/plan/SKILL.md +0 -334
- package/plugins/flow-external/skills/push/SKILL.md +0 -232
- package/plugins/flow-legacy/.claude-plugin/README.md +0 -143
- package/plugins/flow-legacy/.claude-plugin/merge-permissions.js +0 -94
- package/plugins/flow-legacy/.claude-plugin/plugin.json +0 -5
- package/plugins/flow-legacy/.claude-plugin/settings.template.json +0 -79
- package/plugins/flow-legacy/agents/angular-component-scaffolder.md +0 -323
- package/plugins/flow-legacy/agents/angular-directive-builder.md +0 -258
- package/plugins/flow-legacy/agents/angular-guard-builder.md +0 -322
- package/plugins/flow-legacy/agents/angular-pipe-builder.md +0 -227
- package/plugins/flow-legacy/agents/angular-resolver-builder.md +0 -332
- package/plugins/flow-legacy/agents/angular-service-builder.md +0 -271
- package/plugins/flow-legacy/agents/angular-state-builder.md +0 -479
- package/plugins/flow-legacy/agents/shared-impl-orchestrator.md +0 -174
- package/plugins/flow-legacy/agents/shared-impl-reporter.md +0 -232
- package/plugins/flow-legacy/agents/shared-linear-subtask-iterator.md +0 -187
- package/plugins/flow-legacy/agents/shared-tdd-developer.md +0 -306
- package/plugins/flow-legacy/agents/shared-test-runner.md +0 -131
- package/plugins/flow-legacy/agents/shared-ui-classifier.md +0 -145
- package/plugins/flow-legacy/scripts/compute-session-tokens.sh +0 -39
- package/plugins/flow-legacy/skills/a11y-audit/SKILL.md +0 -214
- package/plugins/flow-legacy/skills/angular-patterns/SKILL.md +0 -346
- package/plugins/flow-legacy/skills/browser-capture/SKILL.md +0 -238
- package/plugins/flow-legacy/skills/commit/SKILL.md +0 -215
- package/plugins/flow-legacy/skills/debug-helper/SKILL.md +0 -395
- package/plugins/flow-legacy/skills/impl/SKILL.md +0 -710
- package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +0 -132
- package/plugins/flow-legacy/skills/maia-files-delete/SKILL.md +0 -59
- package/plugins/flow-legacy/skills/maia-files-upload/SKILL.md +0 -57
- package/plugins/flow-legacy/skills/nx-conventions/SKILL.md +0 -368
- package/plugins/flow-legacy/skills/plan/SKILL.md +0 -742
- package/plugins/flow-legacy/skills/push/SKILL.md +0 -645
- 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/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,326 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: nx-conventions
|
|
3
|
-
description: Nx monorepo patterns, workspace organization, and build conventions
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Nx Conventions
|
|
7
|
-
|
|
8
|
-
This skill provides guidance on Nx monorepo patterns for this project.
|
|
9
|
-
|
|
10
|
-
## 1. Workspace Structure
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
/
|
|
14
|
-
├── apps/
|
|
15
|
-
│ ├── web/ # Main Angular SSR application
|
|
16
|
-
│ └── web-e2e/ # Cypress E2E tests
|
|
17
|
-
├── libs/
|
|
18
|
-
│ └── shared/
|
|
19
|
-
│ └── angular/ # Shared Angular library
|
|
20
|
-
├── tools/
|
|
21
|
-
│ ├── specs/ # Project specifications
|
|
22
|
-
│ └── mockups/ # Design mockups
|
|
23
|
-
├── nx.json # Nx workspace configuration
|
|
24
|
-
├── tsconfig.base.json # Base TypeScript config
|
|
25
|
-
└── package.json
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## 2. Project Naming
|
|
29
|
-
|
|
30
|
-
| Type | Pattern | Example |
|
|
31
|
-
| ------------------- | ------------------------ | ------------------------------ |
|
|
32
|
-
| Apps | `{name}` | `web`, `api` |
|
|
33
|
-
| E2E | `{app}-e2e` | `web-e2e` |
|
|
34
|
-
| Domain libs | `{domain}-domain` | `museum-objects-domain` |
|
|
35
|
-
| Angular libs | `{domain}-shell-angular` | `museum-objects-shell-angular` |
|
|
36
|
-
| Shared angular libs | `shared-angular` | `shared-angular` |
|
|
37
|
-
|
|
38
|
-
## 3. Common Nx Commands
|
|
39
|
-
|
|
40
|
-
### Development
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
# Serve application
|
|
44
|
-
nx serve web
|
|
45
|
-
|
|
46
|
-
# Serve with specific configuration
|
|
47
|
-
nx serve web --configuration=development
|
|
48
|
-
|
|
49
|
-
# Build application
|
|
50
|
-
nx build web
|
|
51
|
-
|
|
52
|
-
# Build for production
|
|
53
|
-
nx build web --configuration=production
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Testing
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
# Run unit tests
|
|
60
|
-
nx test web
|
|
61
|
-
nx test shared-angular
|
|
62
|
-
|
|
63
|
-
# Run tests with coverage
|
|
64
|
-
nx test web --coverage
|
|
65
|
-
|
|
66
|
-
# Run tests in watch mode
|
|
67
|
-
nx test web --watch
|
|
68
|
-
|
|
69
|
-
# Run E2E tests
|
|
70
|
-
nx e2e web-e2e
|
|
71
|
-
|
|
72
|
-
# Open Cypress
|
|
73
|
-
nx open-cypress web-e2e
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Linting
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# Lint project
|
|
80
|
-
nx lint web
|
|
81
|
-
nx lint shared-angular
|
|
82
|
-
|
|
83
|
-
# Lint all affected projects
|
|
84
|
-
nx affected --target=lint
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### Building
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
# Build single project
|
|
91
|
-
nx build web
|
|
92
|
-
|
|
93
|
-
# Build affected projects
|
|
94
|
-
nx affected --target=build
|
|
95
|
-
|
|
96
|
-
# Show dependency graph
|
|
97
|
-
nx graph
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## 4. Affected Commands
|
|
101
|
-
|
|
102
|
-
Run tasks only on changed projects:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
# Test affected
|
|
106
|
-
nx affected --target=test
|
|
107
|
-
|
|
108
|
-
# Lint affected
|
|
109
|
-
nx affected --target=lint
|
|
110
|
-
|
|
111
|
-
# Build affected
|
|
112
|
-
nx affected --target=build
|
|
113
|
-
|
|
114
|
-
# Specify base branch
|
|
115
|
-
nx affected --target=test --base=main
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
## 5. Project Configuration
|
|
119
|
-
|
|
120
|
-
### project.json
|
|
121
|
-
|
|
122
|
-
```json
|
|
123
|
-
{
|
|
124
|
-
"name": "web",
|
|
125
|
-
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
126
|
-
"projectType": "application",
|
|
127
|
-
"sourceRoot": "apps/web/src",
|
|
128
|
-
"prefix": "app",
|
|
129
|
-
"targets": {
|
|
130
|
-
"build": {
|
|
131
|
-
"executor": "@angular-devkit/build-angular:application",
|
|
132
|
-
"options": {
|
|
133
|
-
"outputPath": "dist/apps/web",
|
|
134
|
-
"index": "apps/web/src/index.html",
|
|
135
|
-
"browser": "apps/web/src/main.ts",
|
|
136
|
-
"polyfills": ["zone.js"],
|
|
137
|
-
"tsConfig": "apps/web/tsconfig.app.json"
|
|
138
|
-
},
|
|
139
|
-
"configurations": {
|
|
140
|
-
"production": {
|
|
141
|
-
"budgets": [
|
|
142
|
-
{
|
|
143
|
-
"type": "initial",
|
|
144
|
-
"maximumWarning": "2MB",
|
|
145
|
-
"maximumError": "4MB"
|
|
146
|
-
}
|
|
147
|
-
],
|
|
148
|
-
"outputHashing": "all"
|
|
149
|
-
},
|
|
150
|
-
"development": {
|
|
151
|
-
"optimization": false,
|
|
152
|
-
"sourceMap": true
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
"defaultConfiguration": "development"
|
|
156
|
-
},
|
|
157
|
-
"serve": {
|
|
158
|
-
"executor": "@angular-devkit/build-angular:dev-server",
|
|
159
|
-
"options": {
|
|
160
|
-
"port": 4210
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"test": {
|
|
164
|
-
"executor": "@nx/jest:jest",
|
|
165
|
-
"options": {
|
|
166
|
-
"jestConfig": "apps/web/jest.config.ts",
|
|
167
|
-
"passWithNoTests": true
|
|
168
|
-
},
|
|
169
|
-
"configurations": {
|
|
170
|
-
"ci": {
|
|
171
|
-
"codeCoverage": true
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
## 6. Path Mappings
|
|
180
|
-
|
|
181
|
-
In `tsconfig.base.json`:
|
|
182
|
-
|
|
183
|
-
```json
|
|
184
|
-
{
|
|
185
|
-
"compilerOptions": {
|
|
186
|
-
"paths": {
|
|
187
|
-
"@shared/angular": ["libs/shared/angular/src/index.ts"],
|
|
188
|
-
"@shared/angular/*": ["libs/shared/angular/src/lib/*"]
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Usage:
|
|
195
|
-
|
|
196
|
-
```typescript
|
|
197
|
-
import { SharedModule } from '@shared/angular';
|
|
198
|
-
import { MyService } from '@shared/angular/services';
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
## 7. Library Types
|
|
202
|
-
|
|
203
|
-
### Feature Library
|
|
204
|
-
|
|
205
|
-
Contains smart components, routes, and business logic.
|
|
206
|
-
|
|
207
|
-
```typescript
|
|
208
|
-
// libs/museum/feature-objects/src/index.ts
|
|
209
|
-
export * from './lib/objects.routes';
|
|
210
|
-
export * from './lib/containers';
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### UI Library
|
|
214
|
-
|
|
215
|
-
Contains presentational (dumb) components only.
|
|
216
|
-
|
|
217
|
-
```typescript
|
|
218
|
-
// libs/shared/ui/src/index.ts
|
|
219
|
-
export * from './lib/button/button.component';
|
|
220
|
-
export * from './lib/card/card.component';
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Data Access Library
|
|
224
|
-
|
|
225
|
-
Contains services, state management, and API calls.
|
|
226
|
-
|
|
227
|
-
```typescript
|
|
228
|
-
// libs/museum/data-access/src/index.ts
|
|
229
|
-
export * from './lib/services/objects.service';
|
|
230
|
-
export * from './lib/+state/objects.facade';
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
### Utility Library
|
|
234
|
-
|
|
235
|
-
Contains pure functions, helpers, and utilities.
|
|
236
|
-
|
|
237
|
-
```typescript
|
|
238
|
-
// libs/shared/util-forms/src/index.ts
|
|
239
|
-
export * from './lib/validators';
|
|
240
|
-
export * from './lib/form-helpers';
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
## 8. Caching
|
|
244
|
-
|
|
245
|
-
Nx caches task results. Configure in `nx.json`:
|
|
246
|
-
|
|
247
|
-
```json
|
|
248
|
-
{
|
|
249
|
-
"targetDefaults": {
|
|
250
|
-
"build": {
|
|
251
|
-
"cache": true,
|
|
252
|
-
"dependsOn": ["^build"]
|
|
253
|
-
},
|
|
254
|
-
"test": {
|
|
255
|
-
"cache": true
|
|
256
|
-
},
|
|
257
|
-
"lint": {
|
|
258
|
-
"cache": true
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
## 9. Task Dependencies
|
|
265
|
-
|
|
266
|
-
Define task execution order:
|
|
267
|
-
|
|
268
|
-
```json
|
|
269
|
-
{
|
|
270
|
-
"targetDefaults": {
|
|
271
|
-
"build": {
|
|
272
|
-
"dependsOn": ["^build"]
|
|
273
|
-
},
|
|
274
|
-
"test": {
|
|
275
|
-
"dependsOn": ["build"]
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
- `^build` means build dependencies first
|
|
282
|
-
- `build` means build this project first
|
|
283
|
-
|
|
284
|
-
## 10. Generators
|
|
285
|
-
|
|
286
|
-
Create new code with generators:
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
# Generate Angular component
|
|
290
|
-
nx g @nx/angular:component my-component --project=shared-angular
|
|
291
|
-
|
|
292
|
-
# Generate Angular service
|
|
293
|
-
nx g @nx/angular:service my-service --project=shared-angular
|
|
294
|
-
|
|
295
|
-
# Generate library
|
|
296
|
-
nx g @nx/angular:library my-lib --directory=shared
|
|
297
|
-
|
|
298
|
-
# Dry run (preview changes)
|
|
299
|
-
nx g @nx/angular:component my-component --dry-run
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
## 11. CI/CD Integration
|
|
303
|
-
|
|
304
|
-
```yaml
|
|
305
|
-
# Example GitHub Actions
|
|
306
|
-
- name: Install dependencies
|
|
307
|
-
run: npm ci
|
|
308
|
-
|
|
309
|
-
- name: Run affected lint
|
|
310
|
-
run: npx nx affected --target=lint --base=origin/main
|
|
311
|
-
|
|
312
|
-
- name: Run affected test
|
|
313
|
-
run: npx nx affected --target=test --base=origin/main --configuration=ci
|
|
314
|
-
|
|
315
|
-
- name: Run affected build
|
|
316
|
-
run: npx nx affected --target=build --base=origin/main --configuration=production
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
## 12. Best Practices
|
|
320
|
-
|
|
321
|
-
1. **Keep apps thin** - Business logic in libraries
|
|
322
|
-
2. **Use affected** - Only build/test what changed
|
|
323
|
-
3. **Leverage caching** - Let Nx cache task results
|
|
324
|
-
4. **Consistent naming** - Follow naming conventions
|
|
325
|
-
5. **Define boundaries** - Use tags and constraints
|
|
326
|
-
6. **Path aliases** - Use `@scope/lib` imports
|