WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,7 +186,11 @@ my-angular-workspace/
186
186
187
187
### Component Analysis
188
188
189
-
-**`report-violations`**: Report deprecated CSS usage in a directory with configurable grouping format
189
+
-**`report-violations`**: Report deprecated CSS usage for a specific component in a directory. Supports optional file output with statistics.
190
+
191
+
-**`report-all-violations`**: Report all deprecated CSS usage across all components in a directory. Supports optional file output with statistics.
192
+
193
+
-**`group-violations`**: Creates balanced work distribution groups from violations reports using bin-packing algorithm. Maintains path exclusivity and directory boundaries for parallel development.
190
194
191
195
-**`report-deprecated-css`**: Report deprecated CSS classes found in styling files
Copy file name to clipboardExpand all lines: docs/tools.md
+35-13Lines changed: 35 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,35 @@
1
-
# Design System Tools for AI Agents
1
+
# Angular MCP Tools for AI Agents
2
2
3
-
This document provides comprehensive guidance for AI agents working with Angular Design System (DS) migration and analysis tools. Each tool is designed to support automated refactoring, validation, and analysis workflows.
3
+
This document provides comprehensive guidance for AI agents working with Angular migration and analysis tools. Each tool is designed to support automated refactoring, validation, and analysis workflows.
4
4
5
5
## Tool Categories
6
6
7
7
### 🔍 Project Analysis Tools
8
8
9
9
#### `report-violations`
10
-
**Purpose**: Identifies deprecated DS CSS usage patterns in Angular projects
11
-
**AI Usage**: Use as the first step in migration workflows to identify all violations before planning refactoring
10
+
**Purpose**: Identifies deprecated CSS usage patterns for a specific component in Angular projects
11
+
**AI Usage**: Use when you need to analyze violations for a specific component before planning refactoring
12
12
**Key Parameters**:
13
13
-`directory`: Target analysis directory (use relative paths like `./src/app`)
14
-
-`componentName`: DS component class name (e.g., `DsButton`)
14
+
-`componentName`: Component class name (e.g., `DsButton`)
15
15
-`groupBy`: `"file"` or `"folder"` for result organization
16
-
**Output**: Structured violation reports grouped by file or folder
17
-
**Best Practice**: Always run this before other migration tools to establish baseline
16
+
-`saveAsFile`: Optional boolean - if `true`, saves report to `tmp/.angular-toolkit-mcp/violations-report/<componentName>/<directory>-violations.json`
17
+
**Output**:
18
+
- Default: Structured violation reports grouped by file or folder
19
+
- With `saveAsFile: true`: File path and statistics (components, files, lines)
20
+
**Best Practice**: Use `saveAsFile: true` when you need to persist results for later processing or grouping workflows
18
21
19
22
#### `report-all-violations`
20
-
**Purpose**: Reports all deprecated DS CSS usage for every DS component within a directory
23
+
**Purpose**: Reports all deprecated CSS usage for every component within a directory
21
24
**AI Usage**: Use for a fast, global inventory of violations across the codebase before narrowing to specific components
22
25
**Key Parameters**:
23
26
-`directory`: Target analysis directory (use relative paths like `./src/app`)
24
-
-`groupBy`: `"file"` or `"folder"` for result organization (default: `"file"`)
25
-
**Output**: Structured violation reports grouped by file or folder covering all DS components
26
-
**Best Practice**: Use to discover all violations and establish the baseline for subsequent refactoring.
27
+
-`groupBy`: `"component"` or `"file"` for result organization (default: `"component"`)
28
+
-`saveAsFile`: Optional boolean - if `true`, saves report to `tmp/.angular-toolkit-mcp/violations-report/<directory>-violations.json`
29
+
**Output**:
30
+
- Default: Structured violation reports grouped by component or file covering all components
31
+
- With `saveAsFile: true`: File path and statistics (components, files, lines)
32
+
**Best Practice**: Use `saveAsFile: true` to persist results for grouping workflows or large-scale migration planning. The saved file can be used as input for work distribution grouping tools.
27
33
28
34
#### `get-project-dependencies`
29
35
**Purpose**: Analyzes project structure, dependencies, and buildability
@@ -34,6 +40,21 @@ This document provides comprehensive guidance for AI agents working with Angular
**Best Practice**: Use to understand project constraints before recommending changes
36
42
43
+
#### `group-violations`
44
+
**Purpose**: Creates balanced work distribution groups from violations reports for parallel development
45
+
**AI Usage**: Use after `report-all-violations` to organize violations into balanced work groups for team distribution
46
+
**Key Parameters**:
47
+
-`fileName`: Name of violations JSON file in `tmp/.angular-toolkit-mcp/violations-report/` (e.g., `"packages-poker-core-lib-violations.json"`)
48
+
-`minGroups`: Minimum number of groups (default: 3)
49
+
-`maxGroups`: Maximum number of groups (default: 5)
50
+
-`variance`: Acceptable variance percentage for balance (default: 20)
51
+
**Output**:
52
+
- Work groups with balanced violation counts
53
+
- Individual JSON and Markdown files per group
54
+
- Metadata with validation results
55
+
- Saved to `tmp/.angular-toolkit-mcp/violation-groups/<reportName>/`
56
+
**Best Practice**: Use after saving violations with `saveAsFile: true`. The tool accepts both component-grouped and file-grouped reports. Groups maintain path exclusivity (each file in exactly one group) and preserve directory boundaries to enable parallel development without merge conflicts.
57
+
37
58
#### `report-deprecated-css`
38
59
**Purpose**: Scans styling files for deprecated CSS classes
39
60
**AI Usage**: Complement violation reports with style-specific analysis
@@ -147,8 +168,9 @@ This document provides comprehensive guidance for AI agents working with Angular
147
168
### 1. Discovery & Analysis Workflow
148
169
```
149
170
1. list-ds-components → Discover available DS components
'Path where to save the contract file. Supports both absolute and relative paths.',
20
+
description: `Path where to save the contract file. Supports both absolute and relative paths. If not provided, defaults to ${DEFAULT_OUTPUT_BASE}/${OUTPUT_SUBDIRS.CONTRACTS}/<component-name>-contract.json. When building contracts for comparison, use descriptive names like <component-name>-before-contract.json or <component-name>-after-contract.json to distinguish between refactoring phases.`,
'Path where to save the diff result file. Supports both absolute and relative paths.',
20
+
description: `Path where to save the diff result file. Supports both absolute and relative paths. If not provided, defaults to ${DEFAULT_OUTPUT_BASE}/${OUTPUT_SUBDIRS.CONTRACT_DIFFS}/<component-name>-diff.json`,
18
21
},
19
22
contractBeforePath: {
20
23
type: 'string',
21
-
description:
22
-
'Path to the contract file before refactoring. Supports both absolute and relative paths.',
24
+
description: `Path to the contract file before refactoring. Supports both absolute and relative paths. Typically located at ${DEFAULT_OUTPUT_BASE}/${OUTPUT_SUBDIRS.CONTRACTS}/<component-name>-before-contract.json`,
23
25
},
24
26
contractAfterPath: {
25
27
type: 'string',
26
-
description:
27
-
'Path to the contract file after refactoring. Supports both absolute and relative paths.',
28
+
description: `Path to the contract file after refactoring. Supports both absolute and relative paths. Typically located at ${DEFAULT_OUTPUT_BASE}/${OUTPUT_SUBDIRS.CONTRACTS}/<component-name>-after-contract.json`,
28
29
},
29
30
dsComponentName: {
30
31
type: 'string',
31
32
description: 'The name of the design system component being used',
0 commit comments