optimized-workflow-level1.mdcโข5.5 kB
---
description: Optimized Level 1 workflow for quick bug fixes with token efficiency
globs: "**/level1*/**", "**/quick*/**", "**/bugfix*/**"
alwaysApply: false
---
# OPTIMIZED LEVEL 1 WORKFLOW
> **TL;DR:** This streamlined workflow for Level 1 tasks (quick bug fixes) optimizes for speed and token efficiency while maintaining quality.
## ๐ง LEVEL 1 PROCESS FLOW
```mermaid
graph TD
Start["START LEVEL 1<br>QUICK FIX"] --> Analyze["1๏ธโฃ ANALYZE<br>Understand issue"]
Analyze --> Implement["2๏ธโฃ IMPLEMENT<br>Fix the issue"]
Implement --> Verify["3๏ธโฃ VERIFY<br>Test the fix"]
Verify --> Document["4๏ธโฃ DOCUMENT<br>Record solution"]
style Start fill:#4da6ff,stroke:#0066cc,color:white
style Analyze fill:#ffa64d,stroke:#cc7a30,color:white
style Implement fill:#4dbb5f,stroke:#36873f,color:white
style Verify fill:#d94dbb,stroke:#a3378a,color:white
style Document fill:#4dbbbb,stroke:#368787,color:white
```
## ๐ CONSOLIDATED DOCUMENTATION
Level 1 tasks use a single-file approach to minimize context switching:
```markdown
# QUICK FIX: [Issue Name]
## Issue Summary
- Type: [Bug/Hotfix/Quick Enhancement]
- Priority: [Low/Medium/High/Critical]
- Reported by: [Name/System]
- Affected area: [Component/Feature]
## Analysis
- Root cause: [Brief description]
- Affected files: [List of files]
- Impact: [Scope of impact]
## Solution
- Approach: [Brief description]
- Changes made: [List of changes]
- Commands executed: [Key commands]
## Verification
- Testing: [How the fix was tested]
- Results: [Test results]
- Additional checks: [Any other verification]
## Status
- [x] Fix implemented
- [x] Tests passed
- [x] Documentation updated
```
## ๐ MEMORY BANK UPDATE
Level 1 tasks use a simplified Memory Bank update with minimal overhead:
```markdown
## tasks.md Update (Level 1)
### Task: [Task Name]
- Status: Complete
- Implementation: [One-line summary]
- Link to fix: [File/line reference]
```
## โก TOKEN-OPTIMIZED TEMPLATE
For maximum efficiency, Level 1 tasks can use this ultra-compact template:
```markdown
## ๐ง FIX: [Issue]
๐ Problem: [Brief description]
๐ Cause: [Root cause]
๐ ๏ธ Solution: [Implemented fix]
โ
Tested: [Verification method]
```
## ๐ AUTO-DOCUMENTATION HELPERS
Use these helpers to automatically generate documentation:
```javascript
function generateLevel1Documentation(issue, rootCause, solution, verification) {
return `## ๐ง FIX: ${issue}
๐ Problem: ${issue}
๐ Cause: ${rootCause}
๐ ๏ธ Solution: ${solution}
โ
Tested: ${verification}`;
}
```
## ๐ QUICK TEMPLATES FOR COMMON ISSUES
### Performance Fix
```markdown
## ๐ง FIX: Performance issue in [component]
๐ Problem: Slow response times in [component]
๐ Cause: Inefficient query/algorithm
๐ ๏ธ Solution: Optimized [specific optimization]
โ
Tested: Response time improved from [X]ms to [Y]ms
```
### Bug Fix
```markdown
## ๐ง FIX: Bug in [component]
๐ Problem: [Specific behavior] not working correctly
๐ Cause: [Root cause analysis]
๐ ๏ธ Solution: Fixed by [implementation details]
โ
Tested: Verified with [test approach]
```
### Quick Enhancement
```markdown
## ๐ง ENHANCEMENT: [Feature]
๐ Request: Add [specific capability]
๐ ๏ธ Implementation: Added by [implementation details]
โ
Tested: Verified with [test approach]
```
## โ
STREAMLINED VERIFICATION
Level 1 tasks use a minimal verification process:
```markdown
VERIFICATION:
[x] Fix implemented and tested
[x] No regressions introduced
[x] Documentation updated
```
## ๐ CONSOLIDATED MEMORY BANK UPDATE
Optimize Memory Bank updates for Level 1 tasks by using a single operation:
```javascript
// Pseudocode for optimized Level 1 Memory Bank update
function updateLevel1MemoryBank(taskInfo) {
// Read current tasks.md
const tasksContent = readFile("tasks.md");
// Create minimal update
const updateBlock = `
### Task: ${taskInfo.name}
- Status: Complete
- Implementation: ${taskInfo.solution}
- Link to fix: ${taskInfo.fileReference}
`;
// Add update to tasks.md
const updatedContent = appendToSection(tasksContent, "Completed Tasks", updateBlock);
// Write in single operation
writeFile("tasks.md", updatedContent);
return "Memory Bank updated";
}
```
## ๐ OPTIMIZED LEVEL 1 WORKFLOW EXAMPLE
```markdown
## ๐ง FIX: Login button not working on mobile devices
๐ Problem:
Users unable to log in on mobile devices, button appears but doesn't trigger authentication
๐ Cause:
Event listener using desktop-specific event (mousedown instead of handling touch events)
๐ ๏ธ Solution:
Updated event handling to use event delegation and support both mouse and touch events:
```js
// Before:
loginButton.addEventListener('mousedown', handleLogin);
// After:
loginButton.addEventListener('mousedown', handleLogin);
loginButton.addEventListener('touchstart', handleLogin);
```
โ
Tested:
- Verified on iOS Safari and Android Chrome
- Login now works on all tested mobile devices
- No regression on desktop browsers
```
## โก TOKEN EFFICIENCY BENEFITS
This optimized Level 1 workflow provides:
1. Reduced documentation overhead (70% reduction)
2. Consolidated Memory Bank updates (single operation vs. multiple)
3. Focused verification process (essential checks only)
4. Template-based approach for common scenarios
5. Streamlined workflow with fewer steps
The updated approach maintains all critical information while significantly reducing token usage.