-
Notifications
You must be signed in to change notification settings - Fork 0
feat(): report all violations #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
06560e9
feat(): report all violations
9590185
feat(): fix code style and tool description
c70351c
feat(): update tool docs
e29b780
feat(): don't show duplicated violations
6654c58
chore(): add tool / prompt testing component
a58480b
feat(): update cursor rules and ds-refactoring-flow
a055c37
refactor(): clean up cursor files
5ab16db
docs(): extend docs with alternative flow
d046408
refactor(): update names for consistency
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,21 +27,34 @@ Flows are collections of rule files (.mdc) that guide the AI through multi-step | |
**Location:** `ds-refactoring-flow/` | ||
**Purpose:** Migrate components from deprecated design system patterns to modern alternatives | ||
|
||
**Files:** | ||
- `01-find-violations.mdc` - Identify deprecated component usage | ||
- `02-plan-refactoring.mdc` - Create detailed migration strategy | ||
**Flow Options:** | ||
|
||
**Option A: Targeted Approach** (recommended for focused, incremental migrations) | ||
- `01-find-violations.mdc` - Identify specific deprecated component usage | ||
- `02-plan-refactoring.mdc` - Create detailed migration strategy for specific cases | ||
|
||
**Option B: Comprehensive Approach** (recommended for large-scale migrations) | ||
- `01a-find-all-violations.mdc` - Scan entire codebase, group by folders, select subfolder for detailed analysis | ||
- `02a-plan-refactoring-for-all-violations.mdc` - Create comprehensive migration plan for all violations in scope | ||
|
||
**Continuation Steps** (used with both approaches): | ||
- `03-non-viable-cases.mdc` - Handle non-migratable components by marking them for exclusion | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just noticed that we have two 03 step files. |
||
- `03-fix-violations.mdc` - Execute code changes | ||
- `04-validate-changes.mdc` - Verify improvements through contract comparison | ||
- `05-prepare-report.mdc` - Generate testing checklists and documentation | ||
- `clean-global-styles.mdc` - Independent analysis of deprecated CSS usage | ||
|
||
**Choosing Your Approach:** | ||
- **Targeted (01 → 02)**: Use when working on specific components or small sets of violations. Provides focused analysis and incremental progress. | ||
- **Comprehensive (01a → 02a)**: Use when planning large-scale migrations across multiple folders. Provides broad overview first, then detailed planning for selected scope. | ||
|
||
**Special Handling:** | ||
- **Non-Viable Cases**: When components are identified as non-viable during the planning step, use `03-non-viable-cases.mdc` instead of proceeding with the normal fix violations step. This marks components with special prefixes (`after-migration-[ORIGINAL_CLASS]`) to exclude them from future violation reports. | ||
|
||
**Use Cases:** | ||
- **Primary Flow**: Migrating components to modern design system patterns | ||
- **Non-Viable Handling**: Alternative handling within the main flow for legacy components that cannot be migrated | ||
- **Targeted Flow**: Incremental migration of specific components or small violation sets | ||
- **Comprehensive Flow**: Large-scale migration planning across multiple directories | ||
- **Non-Viable Handling**: Alternative handling within either flow for legacy components that cannot be migrated | ||
|
||
## How to Use Flows | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
.cursor/flows/ds-refactoring-flow/02a-plan-refactoring-for-all-violations.mdc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
description: | ||
globs: | ||
alwaysApply: false | ||
--- | ||
You are an AI assistant tasked with helping a development team migrate legacy components to a new design system. Your goal is to analyze the current codebase, identify areas that need updating, and provide a detailed plan for the migration process. This task will be completed in three phases: a comprehensive analysis, a detailed plan creation, and a checklist creation. | ||
|
||
You will be working with the following inputs: | ||
<folder_path>{{FOLDER_PATH}}</folder_path>: The path to the folder containing the legacy components | ||
<component_docs>{{COMPONENT_DOCS}}</component_docs>: The official documentation for the target design-system components | ||
<component_code>{{COMPONENT_CODE}}</component_code>: The source files of the target design-system components | ||
<usage_graph>{{USAGE_GRAPH}}</usage_graph>: A graph showing the usage of the legacy components in the specified folder | ||
<library_data>{{LIBRARY_DATA}}</library_data>: Information about library type | ||
|
||
# Phase 1: Comprehensive Analysis | ||
|
||
1. Review all provided inputs: COMPONENT_DOCS, COMPONENT_CODE, USAGE_GRAPH, and LIBRARY_DATA. | ||
|
||
2. Analyze the current codebase, focusing on: | ||
a. The approved markup and API for the target components | ||
b. The actual implementation of the design-system components | ||
c. All files (templates, TS, styles, specs, NgModules) that reference the legacy components | ||
d. Dependencies and library information | ||
|
||
3. Create a comprehensive summary of the analysis, including: | ||
a. Total number of files affected | ||
b. Assessment of migration complexity (Low, Medium, High) | ||
c. Any potential non-viable migrations that may require manual rethinking | ||
d. Key decisions or assumptions made during the analysis | ||
e. Insights gained from examining the component files | ||
f. Implications of the LIBRARY_DATA on the migration process | ||
|
||
Write your comprehensive analysis in <comprehensive_analysis> tags. | ||
|
||
# Phase 2: Detailed Plan Creation | ||
|
||
Please think about this problem thoroughly |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Option B and file name 01a. Not that critical, but inconsistent.