---
file_path: { full_path }
file_name: { sanitized_name }
epic_association: { E.XXXX-name or "general" }
epic_exists: { true|false|created }
timestamp: { YYYYMMDD-HHMM }
iteration: { 1-5 }
max_iterations: 5
tool_triggered: { Edit|MultiEdit|Write }
severity: { CRITICAL|HIGH|MEDIUM|LOW }
status: pending
error_context: { any errors during creation }
---

# Remediation Needed: {file_name}

## Environment Context

- **Epic Status**: {existing|created|general}
- **Report Location**: {full path to this report}
- **Previous Iterations**: {list if any}
- **Project Type**: {React Frontend|NestJS Backend|Node.js Library}

## Issues Detected

### TypeScript Compilation

**Status**: ❌ FAILED | ✅ PASSED  
**Errors Found**: {count}

```typescript
// Error details with line numbers
{specific errors}
```

**Context7 Documentation**:

- {relevant TypeScript docs retrieved}

### ESLint Violations

**Status**: ❌ ERRORS | ⚠️ WARNINGS | ✅ CLEAN  
**Issues Found**: {count}

```javascript
// Violation details with rule names
{specific violations}
```

**Context7 Documentation**:

- {relevant ESLint rule docs}

### Prettier Formatting

**Status**: ❌ NEEDS FORMATTING | ✅ FORMATTED  
**Changes Required**: {yes|no}

```diff
// Formatting differences
- {original}
+ {formatted}
```

### Security Issues

**Status**: ❌ VULNERABILITIES | ✅ SECURE  
**Critical Issues**: {count}

- {list of security concerns}

## Recommended Fixes

### Priority 1: Critical (Must Fix)

1. **{Issue}**: {specific fix with code example}
   - Rationale: {why this fix}
   - Context7 Reference: {documentation link/content}

### Priority 2: High (Should Fix)

1. **{Issue}**: {specific fix}
   - Rationale: {reasoning}
   - Auto-fixable: {yes|no}

### Priority 3: Medium (Consider Fixing)

1. **{Issue}**: {improvement suggestion}
   - Impact: {what this improves}

## Sequential Thinking Analysis

```
Thought 1: {initial analysis}
Thought 2: {problem identification}
Thought 3: {solution approach}
Thought 4: {validation strategy}
Decision: {recommended approach}
```

## Auto-Fix Availability

- **TypeScript**: {percentage auto-fixable}
- **ESLint**: {percentage auto-fixable with --fix}
- **Prettier**: ✅ 100% auto-fixable
- **Overall**: {percentage requiring manual intervention}

## Execution Plan

1. [ ] Apply Prettier formatting
2. [ ] Run ESLint with --fix flag
3. [ ] Fix TypeScript compilation errors
4. [ ] Address security vulnerabilities
5. [ ] Re-run validation suite

## Risk Assessment

- **Breaking Changes**: {none|low|medium|high}
- **Side Effects**: {list potential impacts}
- **Dependencies**: {any new dependencies needed}

## Manual Actions Required

{If any issues cannot be auto-fixed, list specific manual interventions needed}

## Notes

{Additional context, warnings, or information}

---

_Generated by Universal QA Agent_  
_Timestamp: {ISO timestamp}_  
_Agent Version: 1.0.0_
