with one click
e7-systematic-batch-fix
// Triage and fix repeated migration errors in batches by root cause.
// Triage and fix repeated migration errors in batches by root cause.
| name | e7-systematic-batch-fix |
| description | Triage and fix repeated migration errors in batches by root cause. |
description: Triage and fix repeated migration errors in batches by root cause. When to use: After build, multiple errors appear that need organized resolution
Purpose: Efficiently handle many errors by grouping and prioritizing fixes.
Capture complete error list:
Organize errors:
Total Errors: 47
By File:
- src/services/user.service.ts: 8 errors
- src/models/user.model.ts: 3 errors
- src/components/dashboard.component.ts: 12 errors
...
Categorize by error type:
Import/Module Errors:
Cannot find module 'X'Module not foundType Errors:
Type 'X' is not assignable to type 'Y'Property 'X' does not exist on type 'Y'Syntax Errors:
Unexpected token';' expectedConfiguration Errors:
Example grouping:
## Error Groups
### Group 1: Missing Imports (15 errors)
- Cannot find module '@angular/core' (3 occurrences)
- Cannot find module './user.model' (8 occurrences)
- Cannot find module 'rxjs/operators' (4 occurrences)
### Group 2: Type Mismatches (12 errors)
- Type 'null' not assignable to 'User' (5 occurrences)
- Property 'id' does not exist on type '{}' (7 occurrences)
### Group 3: Undefined Methods (8 errors)
- Property 'size' does not exist on type 'any[]' (8 occurrences)
### Group 4: Missing Properties (6 errors)
- Property 'email' missing in type (6 occurrences)
### Group 5: Configuration (6 errors)
- Cannot find file 'main.ts' (1 occurrence)
- Missing tsconfig option (5 occurrences)
Priority 1: Blocking Errors (fix first)
Priority 2: High-Frequency Errors (big impact)
Priority 3: Low-Complexity Errors (quick wins)
Priority 4: Complex Errors (fix last)
Prioritized plan:
## Fix Order
**Round 1: Configuration (Priority 1)**
1. Fix tsconfig.json
2. Add missing main.ts
Estimated fixes: 6 errors ā 41 remaining
**Round 2: Missing Imports Framework (Priority 1+2)**
1. Install @angular/core
2. Install rxjs
Estimated fixes: 7 errors ā 34 remaining
**Round 3: Internal Import Paths (Priority 2)**
1. Fix relative paths to models
2. Fix service import paths
Estimated fixes: 8 errors ā 26 remaining
**Round 4: Collection Methods (Priority 2+3)**
1. Replace .size() with .length globally
Estimated fixes: 8 errors ā 18 remaining
**Round 5: Type Annotations (Priority 3)**
1. Add | null to nullable types
2. Add missing interface properties
Estimated fixes: 11 errors ā 7 remaining
**Round 6: Complex Issues (Priority 4)**
1. Manually review remaining 7 errors
For each group in priority order:
Step 4a: Select appropriate skill
Step 4b: Apply fix to all instances
Step 4c: Rebuild after each group
npm run build
Step 4d: Verify errors are resolved
Step 4e: Update error tracking
ā
Round 1 Complete: 6 errors fixed
Remaining: 41 errors
ā
Round 2 Complete: 7 errors fixed
Remaining: 34 errors
Watch for:
If error count increases:
Example cascade:
Before: 20 import errors (imports commented out)
Fix: Uncomment imports
After: 20 import errors gone, but 15 new type errors appear
Reason: Types are now checked but weren't before
If stuck after 3 attempts:
Document the error:
// TODO: Fix this error - type mismatch
// Error: Type 'X' is not assignable to 'Y'
// Attempted fixes: tried casting, tried changing type
// Need to research proper solution
const value: any = problematicValue; // Temporary workaround
Add to tracking:
## Known Issues (Deferred)
1. **File:** user.service.ts:45
**Error:** Complex type inference issue
**Status:** Deferred - application builds and runs
**Workaround:** Using 'any' type temporarily
**Plan:** Research proper typing after core migration complete
Move on:
When error count is low (< 5):
Review each remaining error individually:
Run final build:
npm run build --verbose
Verify:
Throughout process, provide updates:
šØ **Error Fixing Progress**
Initial errors: 47
Round 1 (Config): 47 ā 41 (6 fixed)
Round 2 (Framework): 41 ā 34 (7 fixed)
Round 3 (Imports): 34 ā 26 (8 fixed)
Round 4 (Collections): 26 ā 18 (8 fixed)
Round 5 (Types): 18 ā 7 (11 fixed)
Round 6 (Manual): 7 ā 0 (7 fixed)
ā
**All errors resolved!**
Total fixed: 47 errors
Build: SUCCESS
npm run build
ERROR in src/services/user.service.ts:1:31
Cannot find module '@angular/core'
ERROR in src/services/user.service.ts:2:24
Cannot find module 'rxjs/operators'
ERROR in src/services/user.service.ts:15:5
Property 'size' does not exist on type 'any[]'
[... 44 more errors ...]
Total: 47 errors
1. Missing @angular/core (3 files) - Priority 1
2. Missing rxjs (4 files) - Priority 1
3. Collection .size() ā .length (8 instances) - Priority 2
4. Type mismatches (32 instances) - Priority 3
npm install @angular/core @angular/common
npm install rxjs
npm run build
# Now: 40 errors (7 fixed)
// Find all: .size()
// Replace: .length
# Now: 32 errors (8 fixed)
// Fix type annotations one by one
# Now: 0 errors (32 fixed)
ā
Build successful!
Fixed: 47 errors
Time: 45 minutes
[HINT] Download the complete skill directory including SKILL.md and all related files