diff --git a/.cursor/rules/isolation_rules/Core/command-execution.mdc b/.cursor/rules/isolation_rules/Core/command-execution.mdc new file mode 100644 index 0000000..dca903c --- /dev/null +++ b/.cursor/rules/isolation_rules/Core/command-execution.mdc @@ -0,0 +1,235 @@ +--- +description: Command execution guidelines for isolation-focused Memory Bank +globs: command-execution.mdc +alwaysApply: false +--- + +# COMMAND EXECUTION SYSTEM + +> **TL;DR:** This system provides guidelines for efficient command execution, balancing clarity and token optimization through appropriate command chaining, with proper documentation of commands and results. + +## ๐Ÿ” COMMAND EFFICIENCY WORKFLOW + +```mermaid +graph TD + Start["Command
Planning"] --> Analyze["Analyze Command
Requirements"] + Analyze --> Balance["Balance Clarity
vs. Efficiency"] + Balance --> Complexity{"Command
Complexity?"} + + Complexity -->|"Simple"| Single["Execute
Single Command"] + Complexity -->|"Moderate"| Chain["Use Efficient
Command Chaining"] + Complexity -->|"Complex"| Group["Group Into
Logical Steps"] + + Single & Chain & Group --> Verify["Verify
Results"] + Verify --> Document["Document
Command & Result"] + Document --> Next["Next
Command"] +``` + +## ๐Ÿ“‹ COMMAND CHAINING GUIDELINES + +```mermaid +graph TD + Command["Command
Execution"] --> ChainApprop{"Is Chaining
Appropriate?"} + + ChainApprop -->|"Yes"| ChainTypes["Chain
Types"] + ChainApprop -->|"No"| SingleCmd["Use Single
Commands"] + + ChainTypes --> Sequential["Sequential Operations
cmd1 && cmd2"] + ChainTypes --> Conditional["Conditional Operations
cmd1 || cmd2"] + ChainTypes --> Piping["Piping
cmd1 | cmd2"] + ChainTypes --> Grouping["Command Grouping
(cmd1; cmd2)"] + + Sequential & Conditional & Piping & Grouping --> Doc["Document
Commands & Results"] +``` + +## ๐Ÿšฆ DIRECTORY VERIFICATION WORKFLOW + +```mermaid +graph TD + Command["Command
Execution"] --> DirCheck["Check Current
Directory"] + DirCheck --> ProjectRoot{"In Project
Root?"} + + ProjectRoot -->|"Yes"| Execute["Execute
Command"] + ProjectRoot -->|"No"| Locate["Locate
Project Root"] + + Locate --> Found{"Project Root
Found?"} + Found -->|"Yes"| Navigate["Navigate to
Project Root"] + Found -->|"No"| Error["Error: Cannot
Find Project Root"] + + Navigate --> Execute + Execute --> Verify["Verify
Results"] +``` + +## ๐Ÿ“‹ DIRECTORY VERIFICATION CHECKLIST + +Before executing any npm or build command: + +| Step | Windows (PowerShell) | Unix/Linux/Mac | Purpose | +|------|----------------------|----------------|---------| +| **Check package.json** | `Test-Path package.json` | `ls package.json` | Verify current directory is project root | +| **Check for parent directory** | `Test-Path "*/package.json"` | `find . -maxdepth 2 -name package.json` | Find potential project directories | +| **Navigate to project root** | `cd [project-dir]` | `cd [project-dir]` | Move to correct directory before executing commands | + +## ๐Ÿ“‹ REACT-SPECIFIC COMMAND GUIDELINES + +For React applications, follow these strict guidelines: + +| Command | Correct Usage | Incorrect Usage | Notes | +|---------|---------------|----------------|-------| +| **npm start** | `cd [project-root] && npm start` | `npm start` (from parent dir) | Must execute from directory with package.json | +| **npm run build** | `cd [project-root] && npm run build` | `cd [parent-dir] && npm run build` | Must execute from directory with package.json | +| **npm install** | `cd [project-root] && npm install [pkg]` | `npm install [pkg]` (wrong dir) | Dependencies installed to nearest package.json | +| **npm create** | `npm create vite@latest my-app -- --template react` | Manually configuring webpack | Use standard tools for project creation | + +## ๐Ÿ”„ COMMAND CHAINING PATTERNS + +Effective command chaining patterns include: + +| Pattern | Format | Examples | Use Case | +|---------|--------|----------|----------| +| **Sequential** | `cmd1 && cmd2` | `mkdir dir && cd dir` | Commands that should run in sequence, second only if first succeeds | +| **Conditional** | `cmd1 || cmd2` | `test -f file.txt || touch file.txt` | Fallback commands, second only if first fails | +| **Piping** | `cmd1 \| cmd2` | `grep "pattern" file.txt \| wc -l` | Pass output of first command as input to second | +| **Background** | `cmd &` | `npm start &` | Run command in background | +| **Grouping** | `(cmd1; cmd2)` | `(echo "Start"; npm test; echo "End")` | Group commands to run as a unit | + +## ๐Ÿ“‹ COMMAND DOCUMENTATION TEMPLATE + +``` +## Command Execution: [Purpose] + +### Command +``` +[actual command or chain] +``` + +### Result +``` +[command output] +``` + +### Effect +[Brief description of what changed in the system] + +### Next Steps +[What needs to be done next] +``` + +## ๐Ÿ” PLATFORM-SPECIFIC CONSIDERATIONS + +```mermaid +graph TD + Platform["Platform
Detection"] --> Windows["Windows
Commands"] + Platform --> Unix["Unix/Linux/Mac
Commands"] + + Windows --> WinAdapt["Windows Command
Adaptations"] + Unix --> UnixAdapt["Unix Command
Adaptations"] + + WinAdapt --> WinChain["Windows Chaining:
Commands separated by &"] + UnixAdapt --> UnixChain["Unix Chaining:
Commands separated by ;"] + + WinChain & UnixChain --> Execute["Execute
Platform-Specific
Commands"] +``` + +## ๐Ÿ“‹ COMMAND EFFICIENCY EXAMPLES + +Examples of efficient command usage: + +| Inefficient | Efficient | Explanation | +|-------------|-----------|-------------| +| `mkdir dir`
`cd dir`
`npm init -y` | `mkdir dir && cd dir && npm init -y` | Combines related sequential operations | +| `ls`
`grep "\.js$"` | `ls \| grep "\.js$"` | Pipes output of first command to second | +| `test -f file.txt`
`if not exists, touch file.txt` | `test -f file.txt \|\| touch file.txt` | Creates file only if it doesn't exist | +| `mkdir dir1`
`mkdir dir2`
`mkdir dir3` | `mkdir dir1 dir2 dir3` | Uses command's built-in multiple argument capability | +| `npm install pkg1`
`npm install pkg2` | `npm install pkg1 pkg2` | Installs multiple packages in one command | + +## ๐Ÿ“‹ REACT PROJECT INITIALIZATION STANDARDS + +Always use these standard approaches for React project creation: + +| Approach | Command | Benefits | Avoids | +|----------|---------|----------|--------| +| **Create React App** | `npx create-react-app my-app` | Preconfigured webpack & babel | Manual configuration errors | +| **Create React App w/TypeScript** | `npx create-react-app my-app --template typescript` | Type safety + preconfigured | Inconsistent module systems | +| **Vite** | `npm create vite@latest my-app -- --template react` | Faster build times | Complex webpack setups | +| **Next.js** | `npx create-next-app@latest my-app` | SSR support | Module system conflicts | + +## โš ๏ธ ERROR HANDLING WORKFLOW + +```mermaid +sequenceDiagram + participant User + participant AI + participant System + + AI->>System: Execute Command + System->>AI: Return Result + + alt Success + AI->>AI: Verify Expected Result + AI->>User: Report Success + else Error + AI->>AI: Analyze Error Message + AI->>AI: Identify Likely Cause + AI->>User: Explain Error & Cause + AI->>User: Suggest Corrective Action + User->>AI: Approve Correction + AI->>System: Execute Corrected Command + end +``` + +## ๐Ÿ“‹ COMMAND RESULT VERIFICATION + +After command execution, verify: + +```mermaid +graph TD + Execute["Execute
Command"] --> Check{"Check
Result"} + + Check -->|"Success"| Verify["Verify Expected
Outcome"] + Check -->|"Error"| Analyze["Analyze
Error"] + + Verify -->|"Expected"| Document["Document
Success"] + Verify -->|"Unexpected"| Investigate["Investigate
Unexpected Result"] + + Analyze --> Diagnose["Diagnose
Error Cause"] + Diagnose --> Correct["Propose
Correction"] + + Document & Investigate & Correct --> Next["Next Step
in Process"] +``` + +## ๐Ÿ“ COMMAND EXECUTION CHECKLIST + +``` +โœ“ COMMAND EXECUTION CHECKLIST +- Command purpose clearly identified? [YES/NO] +- Appropriate balance of clarity vs. efficiency? [YES/NO] +- Platform-specific considerations addressed? [YES/NO] +- Command documented with results? [YES/NO] +- Outcome verified against expectations? [YES/NO] +- Errors properly handled (if any)? [YES/NO/NA] +- For npm/build commands: Executed from project root? [YES/NO/NA] +- For React projects: Using standard tooling? [YES/NO/NA] + +โ†’ If all YES: Command execution complete +โ†’ If any NO: Address missing elements +``` + +## ๐Ÿšจ COMMAND EXECUTION WARNINGS + +Avoid these common command issues: + +```mermaid +graph TD + Warning["Command
Warnings"] --> W1["Excessive
Verbosity"] + Warning --> W2["Insufficient
Error Handling"] + Warning --> W3["Unnecessary
Complexity"] + Warning --> W4["Destructive
Operations Without
Confirmation"] + Warning --> W5["Wrong Directory
Execution"] + + W1 --> S1["Use flags to reduce
unnecessary output"] + W2 --> S2["Include error handling
in command chains"] + W3 --> S3["Prefer built-in
command capabilities"] + W4 --> S4["Show confirmation
before destructive actions"] + W5 --> S5["Verify directory before
npm/build commands"] +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Core/complexity-decision-tree.mdc b/.cursor/rules/isolation_rules/Core/complexity-decision-tree.mdc new file mode 100644 index 0000000..858c3ca --- /dev/null +++ b/.cursor/rules/isolation_rules/Core/complexity-decision-tree.mdc @@ -0,0 +1,187 @@ +--- +description: complexity decision tree +globs: complexity-decision-tree.mdc +alwaysApply: false +--- +# TASK COMPLEXITY DETERMINATION + +> **TL;DR:** This document helps determine the appropriate complexity level (1-4) for any task. Use the decision tree and indicators to select the right process level, then load the corresponding process map. + +## ๐ŸŒณ COMPLEXITY DECISION TREE + +```mermaid +graph TD + Start["New Task"] --> Q1{"Bug fix or
error correction?"} + Q1 -->|Yes| Q1a{"Affects single
component?"} + Q1a -->|Yes| L1["Level 1:
Quick Bug Fix"] + Q1a -->|No| Q1b{"Affects multiple
components?"} + Q1b -->|Yes| L2["Level 2:
Simple Enhancement"] + Q1b -->|No| Q1c{"Affects system
architecture?"} + Q1c -->|Yes| L3["Level 3:
Intermediate Feature"] + Q1c -->|No| L2 + + Q1 -->|No| Q2{"Adding small
feature or
enhancement?"} + Q2 -->|Yes| Q2a{"Self-contained
change?"} + Q2a -->|Yes| L2 + Q2a -->|No| Q2b{"Affects multiple
components?"} + Q2b -->|Yes| L3 + Q2b -->|No| L2 + + Q2 -->|No| Q3{"Complete feature
requiring multiple
components?"} + Q3 -->|Yes| Q3a{"Architectural
implications?"} + Q3a -->|Yes| L4["Level 4:
Complex System"] + Q3a -->|No| L3 + + Q3 -->|No| Q4{"System-wide or
architectural
change?"} + Q4 -->|Yes| L4 + Q4 -->|No| L3 + + L1 --> LoadL1["Load Level 1 Map"] + L2 --> LoadL2["Load Level 2 Map"] + L3 --> LoadL3["Load Level 3 Map"] + L4 --> LoadL4["Load Level 4 Map"] +``` + +## ๐Ÿ“Š COMPLEXITY LEVEL INDICATORS + +Use these indicators to help determine task complexity: + +### Level 1: Quick Bug Fix +- **Keywords**: "fix", "broken", "not working", "issue", "bug", "error", "crash" +- **Scope**: Single component or UI element +- **Duration**: Can be completed quickly (minutes to hours) +- **Risk**: Low, isolated changes +- **Examples**: + - Fix button not working + - Correct styling issue + - Fix validation error + - Resolve broken link + - Fix typo or text issue + +### Level 2: Simple Enhancement +- **Keywords**: "add", "improve", "update", "change", "enhance", "modify" +- **Scope**: Single component or subsystem +- **Duration**: Hours to 1-2 days +- **Risk**: Moderate, contained to specific area +- **Examples**: + - Add form field + - Improve validation + - Update styling + - Add simple feature + - Change text content + - Enhance existing component + +### Level 3: Intermediate Feature +- **Keywords**: "implement", "create", "develop", "build", "feature" +- **Scope**: Multiple components, complete feature +- **Duration**: Days to 1-2 weeks +- **Risk**: Significant, affects multiple areas +- **Examples**: + - Implement user authentication + - Create dashboard + - Develop search functionality + - Build user profile system + - Implement data visualization + - Create complex form system + +### Level 4: Complex System +- **Keywords**: "system", "architecture", "redesign", "integration", "framework" +- **Scope**: Multiple subsystems or entire application +- **Duration**: Weeks to months +- **Risk**: High, architectural implications +- **Examples**: + - Implement authentication system + - Build payment processing framework + - Create microservice architecture + - Implement database migration system + - Develop real-time communication system + - Create multi-tenant architecture + +## ๐Ÿ” COMPLEXITY ASSESSMENT QUESTIONS + +Answer these questions to determine complexity: + +1. **Scope Impact** + - Does it affect a single component or multiple? + - Are there system-wide implications? + - How many files will need to be modified? + +2. **Design Decisions** + - Are complex design decisions required? + - Will it require creative phases for design? + - Are there architectural considerations? + +3. **Risk Assessment** + - What happens if it fails? + - Are there security implications? + - Will it affect critical functionality? + +4. **Implementation Effort** + - How long will it take to implement? + - Does it require specialized knowledge? + - Is extensive testing needed? + +## ๐Ÿ“Š KEYWORD ANALYSIS TABLE + +| Keyword | Likely Level | Notes | +|---------|--------------|-------| +| "Fix" | Level 1 | Unless system-wide | +| "Bug" | Level 1 | Unless multiple components | +| "Error" | Level 1 | Unless architectural | +| "Add" | Level 2 | Unless complex feature | +| "Update" | Level 2 | Unless architectural | +| "Improve" | Level 2 | Unless system-wide | +| "Implement" | Level 3 | Complex components | +| "Create" | Level 3 | New functionality | +| "Develop" | Level 3 | Significant scope | +| "System" | Level 4 | Architectural implications | +| "Architecture" | Level 4 | Major structural changes | +| "Framework" | Level 4 | Core infrastructure | + +## ๐Ÿ”„ COMPLEXITY ESCALATION + +If during a task you discover it's more complex than initially determined: + +``` +โš ๏ธ TASK ESCALATION NEEDED +Current Level: Level [X] +Recommended Level: Level [Y] +Reason: [Brief explanation] + +Would you like me to escalate this task to Level [Y]? +``` + +If approved, switch to the appropriate higher-level process map. + +## ๐ŸŽฏ PROCESS SELECTION + +After determining complexity, load the appropriate process map: + +| Level | Description | Process Map | +|-------|-------------|-------------| +| 1 | Quick Bug Fix | [Level 1 Map](mdc:.cursor/rules/visual-maps/level1-map.mdc) | +| 2 | Simple Enhancement | [Level 2 Map](mdc:.cursor/rules/visual-maps/level2-map.mdc) | +| 3 | Intermediate Feature | [Level 3 Map](mdc:.cursor/rules/visual-maps/level3-map.mdc) | +| 4 | Complex System | [Level 4 Map](mdc:.cursor/rules/visual-maps/level4-map.mdc) | + +## ๐Ÿ“ COMPLEXITY DETERMINATION TEMPLATE + +Use this template to document complexity determination: + +``` +## COMPLEXITY DETERMINATION + +Task: [Task description] + +Assessment: +- Scope: [Single component/Multiple components/System-wide] +- Design decisions: [Simple/Moderate/Complex] +- Risk: [Low/Moderate/High] +- Implementation effort: [Low/Moderate/High] + +Keywords identified: [List relevant keywords] + +Determination: Level [1/2/3/4] - [Quick Bug Fix/Simple Enhancement/Intermediate Feature/Complex System] + +Loading process map: [Level X Map] +``` diff --git a/.cursor/rules/isolation_rules/Core/creative-phase-enforcement.mdc b/.cursor/rules/isolation_rules/Core/creative-phase-enforcement.mdc new file mode 100644 index 0000000..829565d --- /dev/null +++ b/.cursor/rules/isolation_rules/Core/creative-phase-enforcement.mdc @@ -0,0 +1,145 @@ +--- +description: creative phase enforcement +globs: creative-phase-enforcement.md +alwaysApply: false +--- + +# CREATIVE PHASE ENFORCEMENT + +> **TL;DR:** This document implements strict enforcement of creative phase requirements for Level 3-4 tasks, ensuring all design decisions are properly documented and verified before implementation can proceed. + +## ๐Ÿ” ENFORCEMENT WORKFLOW + +```mermaid +graph TD + Start["Task Start"] --> Check{"Level 3-4
Task?"} + Check -->|Yes| Analyze["Analyze Design
Decision Points"] + Check -->|No| Optional["Creative Phase
Optional"] + + Analyze --> Decision{"Design Decisions
Required?"} + Decision -->|Yes| Gate["๐Ÿšจ IMPLEMENTATION
BLOCKED"] + Decision -->|No| Allow["Allow
Implementation"] + + Gate --> Creative["Enter Creative
Phase"] + Creative --> Verify{"All Decisions
Documented?"} + Verify -->|No| Return["Return to
Creative Phase"] + Verify -->|Yes| Proceed["Allow
Implementation"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style Check fill:#ffa64d,stroke:#cc7a30,color:white + style Analyze fill:#4dbb5f,stroke:#36873f,color:white + style Gate fill:#d94dbb,stroke:#a3378a,color:white + style Creative fill:#4dbbbb,stroke:#368787,color:white + style Verify fill:#d971ff,stroke:#a33bc2,color:white +``` + +## ๐Ÿšจ ENFORCEMENT GATES + +```mermaid +graph TD + subgraph "CREATIVE PHASE GATES" + G1["Entry Gate
Verify Requirements"] + G2["Process Gate
Verify Progress"] + G3["Exit Gate
Verify Completion"] + end + + G1 --> G2 --> G3 + + style G1 fill:#4dbb5f,stroke:#36873f,color:white + style G2 fill:#ffa64d,stroke:#cc7a30,color:white + style G3 fill:#d94dbb,stroke:#a3378a,color:white +``` + +## ๐Ÿ“‹ ENFORCEMENT CHECKLIST + +```markdown +## Entry Gate Verification +- [ ] Task complexity is Level 3-4 +- [ ] Design decisions identified +- [ ] Creative phase requirements documented +- [ ] Required participants notified + +## Process Gate Verification +- [ ] All options being considered +- [ ] Pros/cons documented +- [ ] Technical constraints identified +- [ ] Implementation impacts assessed + +## Exit Gate Verification +- [ ] All decisions documented +- [ ] Rationale provided for choices +- [ ] Implementation plan outlined +- [ ] Verification against requirements +``` + +## ๐Ÿšจ IMPLEMENTATION BLOCK NOTICE + +When a creative phase is required but not completed: + +``` +๐Ÿšจ IMPLEMENTATION BLOCKED +Creative phases MUST be completed before implementation. + +Required Creative Phases: +- [ ] [Creative Phase 1] +- [ ] [Creative Phase 2] +- [ ] [Creative Phase 3] + +โ›” This is a HARD BLOCK +Implementation CANNOT proceed until all creative phases are completed. +Type "PHASE.REVIEW" to begin creative phase review. +``` + +## โœ… VERIFICATION PROTOCOL + +```mermaid +graph TD + subgraph "VERIFICATION STEPS" + V1["1. Requirements
Check"] + V2["2. Documentation
Review"] + V3["3. Decision
Validation"] + V4["4. Implementation
Readiness"] + end + + V1 --> V2 --> V3 --> V4 + + style V1 fill:#4dbb5f,stroke:#36873f,color:white + style V2 fill:#ffa64d,stroke:#cc7a30,color:white + style V3 fill:#d94dbb,stroke:#a3378a,color:white + style V4 fill:#4dbbbb,stroke:#368787,color:white +``` + +## ๐Ÿ”„ CREATIVE PHASE MARKERS + +Use these markers to clearly indicate creative phase boundaries: + +```markdown +๐ŸŽจ๐ŸŽจ๐ŸŽจ ENTERING CREATIVE PHASE: [TYPE] ๐ŸŽจ๐ŸŽจ๐ŸŽจ +Focus: [Specific component/feature] +Objective: [Clear goal of this creative phase] +Requirements: [List of requirements] + +[Creative phase content] + +๐ŸŽจ CREATIVE CHECKPOINT: [Milestone] +- Progress: [Status] +- Decisions: [List] +- Next steps: [Plan] + +๐ŸŽจ๐ŸŽจ๐ŸŽจ EXITING CREATIVE PHASE ๐ŸŽจ๐ŸŽจ๐ŸŽจ +Summary: [Brief description] +Key Decisions: [List] +Next Steps: [Implementation plan] +``` + +## ๐Ÿ”„ DOCUMENT MANAGEMENT + +```mermaid +graph TD + Current["Current Document"] --> Active["Active:
- creative-phase-enforcement.md"] + Current --> Related["Related:
- creative-phase-architecture.md
- task-tracking-intermediate.md"] + + style Current fill:#4da6ff,stroke:#0066cc,color:white + style Active fill:#4dbb5f,stroke:#36873f,color:white + style Related fill:#ffa64d,stroke:#cc7a30,color:white +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Core/creative-phase-metrics.mdc b/.cursor/rules/isolation_rules/Core/creative-phase-metrics.mdc new file mode 100644 index 0000000..298724f --- /dev/null +++ b/.cursor/rules/isolation_rules/Core/creative-phase-metrics.mdc @@ -0,0 +1,195 @@ +--- +description: creative phase metrics +globs: creative-phase-metrics.md +alwaysApply: false +--- + + + +# CREATIVE PHASE METRICS + +> **TL;DR:** This document defines comprehensive quality metrics and measurement criteria for creative phases, ensuring that design decisions meet required standards and are properly documented. + +## ๐Ÿ“Š METRICS OVERVIEW + +```mermaid +graph TD + subgraph "CREATIVE PHASE METRICS" + M1["Documentation
Quality"] + M2["Decision
Coverage"] + M3["Option
Analysis"] + M4["Impact
Assessment"] + M5["Verification
Score"] + end + + M1 --> Score["Quality
Score"] + M2 --> Score + M3 --> Score + M4 --> Score + M5 --> Score + + style M1 fill:#4dbb5f,stroke:#36873f,color:white + style M2 fill:#ffa64d,stroke:#cc7a30,color:white + style M3 fill:#d94dbb,stroke:#a3378a,color:white + style M4 fill:#4dbbbb,stroke:#368787,color:white + style M5 fill:#d971ff,stroke:#a33bc2,color:white + style Score fill:#ff71c2,stroke:#c23b8a,color:white +``` + +## ๐Ÿ“‹ QUALITY METRICS SCORECARD + +```markdown +# Creative Phase Quality Assessment + +## 1. Documentation Quality [0-10] +- [ ] Clear problem statement (2 points) +- [ ] Well-defined objectives (2 points) +- [ ] Comprehensive requirements list (2 points) +- [ ] Proper formatting and structure (2 points) +- [ ] Cross-references to related documents (2 points) + +## 2. Decision Coverage [0-10] +- [ ] All required decisions identified (2 points) +- [ ] Each decision point documented (2 points) +- [ ] Dependencies mapped (2 points) +- [ ] Impact analysis included (2 points) +- [ ] Future considerations noted (2 points) + +## 3. Option Analysis [0-10] +- [ ] Multiple options considered (2 points) +- [ ] Pros/cons documented (2 points) +- [ ] Technical feasibility assessed (2 points) +- [ ] Resource requirements estimated (2 points) +- [ ] Risk factors identified (2 points) + +## 4. Impact Assessment [0-10] +- [ ] System impact documented (2 points) +- [ ] Performance implications assessed (2 points) +- [ ] Security considerations addressed (2 points) +- [ ] Maintenance impact evaluated (2 points) +- [ ] Cost implications analyzed (2 points) + +## 5. Verification Score [0-10] +- [ ] Requirements traced (2 points) +- [ ] Constraints validated (2 points) +- [ ] Test scenarios defined (2 points) +- [ ] Review feedback incorporated (2 points) +- [ ] Final verification completed (2 points) + +Total Score: [Sum of all categories] / 50 +Minimum Required Score: 40/50 (80%) +``` + +## ๐Ÿ“ˆ QUALITY THRESHOLDS + +```mermaid +graph TD + subgraph "QUALITY GATES" + T1["Minimum
40/50 (80%)"] + T2["Target
45/50 (90%)"] + T3["Excellent
48/50 (96%)"] + end + + Score["Quality
Score"] --> Check{"Meets
Threshold?"} + Check -->|"< 80%"| Block["โ›” BLOCKED
Improvements Required"] + Check -->|"โ‰ฅ 80%"| Pass["โœ“ PASSED
Can Proceed"] + + style T1 fill:#4dbb5f,stroke:#36873f,color:white + style T2 fill:#ffa64d,stroke:#cc7a30,color:white + style T3 fill:#d94dbb,stroke:#a3378a,color:white + style Score fill:#4dbbbb,stroke:#368787,color:white + style Check fill:#d971ff,stroke:#a33bc2,color:white +``` + +## ๐ŸŽฏ METRIC EVALUATION PROCESS + +```mermaid +graph TD + Start["Start
Evaluation"] --> Doc["1. Score
Documentation"] + Doc --> Dec["2. Assess
Decisions"] + Dec --> Opt["3. Review
Options"] + Opt --> Imp["4. Evaluate
Impact"] + Imp --> Ver["5. Verify
Completeness"] + Ver --> Total["Calculate
Total Score"] + Total --> Check{"Meets
Threshold?"} + Check -->|No| Return["Return for
Improvements"] + Check -->|Yes| Proceed["Proceed to
Next Phase"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style Doc fill:#ffa64d,stroke:#cc7a30,color:white + style Dec fill:#4dbb5f,stroke:#36873f,color:white + style Opt fill:#d94dbb,stroke:#a3378a,color:white + style Imp fill:#4dbbbb,stroke:#368787,color:white + style Ver fill:#d971ff,stroke:#a33bc2,color:white +``` + +## ๐Ÿ“Š IMPROVEMENT RECOMMENDATIONS + +For scores below threshold: + +```markdown +## Documentation Quality Improvements +- Add clear problem statements +- Include specific objectives +- List all requirements +- Improve formatting +- Add cross-references + +## Decision Coverage Improvements +- Identify missing decisions +- Document all decision points +- Map dependencies +- Add impact analysis +- Consider future implications + +## Option Analysis Improvements +- Consider more alternatives +- Detail pros/cons +- Assess technical feasibility +- Estimate resource needs +- Identify risks + +## Impact Assessment Improvements +- Document system impact +- Assess performance +- Address security +- Evaluate maintenance +- Analyze costs + +## Verification Improvements +- Trace requirements +- Validate constraints +- Define test scenarios +- Incorporate feedback +- Complete verification +``` + +## โœ… METRICS VERIFICATION CHECKLIST + +```markdown +## Pre-Review Verification +- [ ] All sections scored +- [ ] Calculations verified +- [ ] Supporting evidence attached +- [ ] Improvement areas identified +- [ ] Review feedback incorporated + +## Final Metrics Verification +- [ ] Minimum score achieved +- [ ] All categories passed +- [ ] Documentation complete +- [ ] Improvements addressed +- [ ] Final approval obtained +``` + +## ๐Ÿ”„ DOCUMENT MANAGEMENT + +```mermaid +graph TD + Current["Current Document"] --> Active["Active:
- creative-phase-metrics.md"] + Current --> Related["Related:
- creative-phase-enforcement.md
- creative-phase-architecture.md"] + + style Current fill:#4da6ff,stroke:#0066cc,color:white + style Active fill:#4dbb5f,stroke:#36873f,color:white + style Related fill:#ffa64d,stroke:#cc7a30,color:white +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Core/file-verification.mdc b/.cursor/rules/isolation_rules/Core/file-verification.mdc new file mode 100644 index 0000000..2424f5f --- /dev/null +++ b/.cursor/rules/isolation_rules/Core/file-verification.mdc @@ -0,0 +1,198 @@ +--- +description: Optimized file verification +globs: file-verification.mdc +alwaysApply: false +--- +# OPTIMIZED FILE VERIFICATION SYSTEM + +> **TL;DR:** This system efficiently verifies and creates required Memory Bank file structures using batch operations and platform-optimized commands. + +## ๐Ÿ” OPTIMIZED FILE VERIFICATION WORKFLOW + +```mermaid +graph TD + Start["Start File
Verification"] --> VerifyAll["Verify All
Required Components"] + VerifyAll --> MissingCheck{"Missing
Components?"} + MissingCheck -->|"Yes"| BatchCreate["Batch Create
All Missing Items"] + MissingCheck -->|"No"| Complete["Verification
Complete"] + BatchCreate --> Report["Generate
Verification Report"] + Report --> Complete +``` + +## ๐Ÿ“‹ OPTIMIZED DIRECTORY CREATION + +```mermaid +graph TD + Start["Directory
Creation"] --> DetectOS["Detect Operating
System"] + DetectOS -->|"Windows"| WinCmd["Batch Create
Windows Command"] + DetectOS -->|"Mac/Linux"| UnixCmd["Batch Create
Unix Command"] + WinCmd & UnixCmd --> Verify["Verify
Creation Success"] + Verify --> Complete["Directory Setup
Complete"] +``` + +### Platform-Specific Commands + +#### Windows (PowerShell) +```powershell +# Create all directories in one command +mkdir memory-bank, docs, docs\archive -ErrorAction SilentlyContinue + +# Create all required files +$files = @(".cursorrules", "tasks.md", + "memory-bank\projectbrief.md", + "memory-bank\productContext.md", + "memory-bank\systemPatterns.md", + "memory-bank\techContext.md", + "memory-bank\activeContext.md", + "memory-bank\progress.md") + +foreach ($file in $files) { + if (-not (Test-Path $file)) { + New-Item -Path $file -ItemType File -Force + } +} +``` + +#### Mac/Linux (Bash) +```bash +# Create all directories in one command +mkdir -p memory-bank docs/archive + +# Create all required files +touch .cursorrules tasks.md \ + memory-bank/projectbrief.md \ + memory-bank/productContext.md \ + memory-bank/systemPatterns.md \ + memory-bank/techContext.md \ + memory-bank/activeContext.md \ + memory-bank/progress.md +``` + +## ๐Ÿ“ STREAMLINED VERIFICATION PROCESS + +Instead of checking each component separately, perform batch verification: + +```powershell +# Windows - PowerShell +$requiredDirs = @("memory-bank", "docs", "docs\archive") +$requiredFiles = @(".cursorrules", "tasks.md") +$mbFiles = @("projectbrief.md", "productContext.md", "systemPatterns.md", + "techContext.md", "activeContext.md", "progress.md") + +$missingDirs = $requiredDirs | Where-Object { -not (Test-Path $_) -or -not (Test-Path $_ -PathType Container) } +$missingFiles = $requiredFiles | Where-Object { -not (Test-Path $_) -or (Test-Path $_ -PathType Container) } +$missingMBFiles = $mbFiles | ForEach-Object { "memory-bank\$_" } | + Where-Object { -not (Test-Path $_) -or (Test-Path $_ -PathType Container) } + +if ($missingDirs.Count -eq 0 -and $missingFiles.Count -eq 0 -and $missingMBFiles.Count -eq 0) { + Write-Output "โœ“ All required components verified" +} else { + # Create all missing items at once + if ($missingDirs.Count -gt 0) { + $missingDirs | ForEach-Object { mkdir $_ -Force } + } + if ($missingFiles.Count -gt 0 -or $missingMBFiles.Count -gt 0) { + $allMissingFiles = $missingFiles + $missingMBFiles + $allMissingFiles | ForEach-Object { New-Item -Path $_ -ItemType File -Force } + } +} +``` + +## ๐Ÿ“ TEMPLATE INITIALIZATION + +Optimize template creation with a single script: + +```powershell +# Windows - PowerShell +$templates = @{ + "tasks.md" = @" +# Memory Bank: Tasks + +## Current Task +[Task not yet defined] + +## Status +- [ ] Task definition +- [ ] Implementation plan +- [ ] Execution +- [ ] Documentation + +## Requirements +[No requirements defined yet] +"@ + + "memory-bank\activeContext.md" = @" +# Memory Bank: Active Context + +## Current Focus +[No active focus defined] + +## Status +[No status defined] + +## Latest Changes +[No changes recorded] +"@ + + # Add other templates here +} + +foreach ($file in $templates.Keys) { + if (Test-Path $file) { + Set-Content -Path $file -Value $templates[$file] + } +} +``` + +## ๐Ÿ” PERFORMANCE OPTIMIZATION BEST PRACTICES + +1. **Batch Operations**: Always use batch operations instead of individual commands + ``` + # GOOD: Create all directories at once + mkdir memory-bank docs docs\archive + + # BAD: Create directories one at a time + mkdir memory-bank + mkdir docs + mkdir docs\archive + ``` + +2. **Pre-Check Optimization**: Check all requirements first, then create only what's missing + ``` + # First check what's missing + $missingItems = ... + + # Then create only what's missing + if ($missingItems) { ... } + ``` + +3. **Error Handling**: Include error handling in all commands + ``` + mkdir memory-bank, docs, docs\archive -ErrorAction SilentlyContinue + ``` + +4. **Platform Adaptation**: Auto-detect platform and use appropriate commands + ``` + if ($IsWindows) { + # Windows commands + } else { + # Unix commands + } + ``` + +5. **One-Pass Verification**: Verify directory structure in a single pass + ``` + $requiredPaths = @("memory-bank", "docs", "docs\archive", ".cursorrules", "tasks.md") + $missingPaths = $requiredPaths | Where-Object { -not (Test-Path $_) } + ``` + +## ๐Ÿ“ VERIFICATION REPORT FORMAT + +``` +โœ… VERIFICATION COMPLETE +- Created directories: [list] +- Created files: [list] +- All components verified + +Memory Bank system ready for use. +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Core/hierarchical-rule-loading.mdc b/.cursor/rules/isolation_rules/Core/hierarchical-rule-loading.mdc new file mode 100644 index 0000000..ac96e09 --- /dev/null +++ b/.cursor/rules/isolation_rules/Core/hierarchical-rule-loading.mdc @@ -0,0 +1,271 @@ +--- +description: Hierarchical rule loading system for optimized token usage +globs: "**/rule-loading*/**", "**/optimization*/**" +alwaysApply: false +--- + +# HIERARCHICAL RULE LOADING SYSTEM + +> **TL;DR:** This rule implements an optimized loading system that only loads necessary rules based on context, complexity level, and current phase to maximize token efficiency. + +## ๐Ÿง  HIERARCHICAL RULE STRUCTURE + +```mermaid +graph TD + Root["Root Rules"] --> Core["Core Rules
(Always Loaded)"] + Root --> Common["Common Rules
(Mode Independent)"] + Root --> Mode["Mode-Specific
Rules"] + Root --> Level["Complexity Level
Rules"] + + Core --> Platform["Platform
Detection"] + Core --> File["File
Operations"] + Core --> Transition["Mode
Transitions"] + + Mode --> VAN["VAN Mode
Rules"] + Mode --> PLAN["PLAN Mode
Rules"] + Mode --> CREATIVE["CREATIVE Mode
Rules"] + Mode --> IMPLEMENT["IMPLEMENT Mode
Rules"] + Mode --> REFLECT["REFLECT Mode
Rules"] + + Level --> Level1["Level 1
Rules"] + Level --> Level2["Level 2
Rules"] + Level --> Level3["Level 3
Rules"] + Level --> Level4["Level 4
Rules"] + + style Root fill:#4da6ff,stroke:#0066cc,color:white + style Core fill:#ffa64d,stroke:#cc7a30,color:white + style Common fill:#4dbb5f,stroke:#36873f,color:white + style Mode fill:#d94dbb,stroke:#a3378a,color:white + style Level fill:#4dbbbb,stroke:#368787,color:white +``` + +## ๐Ÿ“Š RULE LOADING PROTOCOL + +```mermaid +sequenceDiagram + participant User + participant LoadManager + participant RuleCache + participant FileSystem + + User->>LoadManager: Request mode activation + LoadManager->>RuleCache: Check cached core rules + RuleCache-->>LoadManager: Return cached rules if available + + LoadManager->>FileSystem: Load essential mode rules + FileSystem-->>LoadManager: Return essential rules + + LoadManager->>LoadManager: Register lazy loaders for specialized rules + LoadManager->>User: Return initialized mode + + User->>LoadManager: Request specialized functionality + LoadManager->>RuleCache: Check specialized rule cache + RuleCache-->>LoadManager: Return cached rule if available + + alt Rule not in cache + LoadManager->>FileSystem: Load specialized rule + FileSystem-->>LoadManager: Return specialized rule + LoadManager->>RuleCache: Cache specialized rule + end + + LoadManager->>User: Execute specialized functionality +``` + +## ๐Ÿ”„ RULE LOADING IMPLEMENTATION + +```javascript +// Pseudocode for hierarchical rule loading +class RuleLoadManager { + constructor() { + this.cache = { + core: {}, + common: {}, + mode: {}, + level: {} + }; + this.lazyLoaders = {}; + } + + // Initialize a mode with only essential rules + initializeMode(modeName, complexityLevel) { + // Always load core rules + this.loadCoreRules(); + + // Load common rules + this.loadCommonRules(); + + // Load essential mode-specific rules + this.loadEssentialModeRules(modeName); + + // Load complexity level rules + this.loadComplexityRules(complexityLevel); + + // Register lazy loaders for specialized functionality + this.registerLazyLoaders(modeName, complexityLevel); + + return { + modeName, + complexityLevel, + status: "initialized" + }; + } + + // Load only when specialized functionality is needed + loadSpecializedRule(ruleType) { + if (this.lazyLoaders[ruleType]) { + if (!this.cache.specialized[ruleType]) { + const rule = this.lazyLoaders[ruleType](); + this.cache.specialized[ruleType] = rule; + } + return this.cache.specialized[ruleType]; + } + return null; + } + + // Register specialized rule loaders based on mode and complexity + registerLazyLoaders(modeName, complexityLevel) { + // Clear existing lazy loaders + this.lazyLoaders = {}; + + // Register mode-specific lazy loaders + if (modeName === "CREATIVE") { + this.lazyLoaders["architecture"] = () => this.loadRule("creative-phase-architecture.mdc"); + this.lazyLoaders["algorithm"] = () => this.loadRule("creative-phase-algorithm.mdc"); + this.lazyLoaders["uiux"] = () => this.loadRule("creative-phase-uiux.mdc"); + } else if (modeName === "IMPLEMENT") { + this.lazyLoaders["testing"] = () => this.loadRule("implementation-testing.mdc"); + this.lazyLoaders["deployment"] = () => this.loadRule("implementation-deployment.mdc"); + } + + // Register complexity-specific lazy loaders + if (complexityLevel >= 3) { + this.lazyLoaders["comprehensive-planning"] = () => this.loadRule("planning-comprehensive.mdc"); + this.lazyLoaders["advanced-verification"] = () => this.loadRule("verification-advanced.mdc"); + } + } +} +``` + +## ๐Ÿ“‹ RULE DEPENDENCY MAP + +```mermaid +graph TD + Main["main.mdc"] --> Core1["platform-awareness.mdc"] + Main --> Core2["file-verification.mdc"] + Main --> Core3["command-execution.mdc"] + + subgraph "VAN Mode" + VanMap["van-mode-map.mdc"] --> Van1["van-complexity-determination.mdc"] + VanMap --> Van2["van-file-verification.mdc"] + VanMap --> Van3["van-platform-detection.mdc"] + end + + subgraph "PLAN Mode" + PlanMap["plan-mode-map.mdc"] --> Plan1["task-tracking-basic.mdc"] + PlanMap --> Plan2["planning-comprehensive.mdc"] + end + + subgraph "CREATIVE Mode" + CreativeMap["creative-mode-map.mdc"] --> Creative1["creative-phase-enforcement.mdc"] + CreativeMap --> Creative2["creative-phase-metrics.mdc"] + Creative1 & Creative2 -.-> CreativeSpecialized["Specialized Creative Rules"] + CreativeSpecialized --> CArch["creative-phase-architecture.mdc"] + CreativeSpecialized --> CAlgo["creative-phase-algorithm.mdc"] + CreativeSpecialized --> CUIUX["creative-phase-uiux.mdc"] + end + + subgraph "IMPLEMENT Mode" + ImplementMap["implement-mode-map.mdc"] --> Impl1["implementation-guide.mdc"] + ImplementMap --> Impl2["testing-strategy.mdc"] + end +``` + +## ๐Ÿ” MODE-SPECIFIC RULE LOADING + +### VAN Mode Essential Rules +```markdown +- main.mdc (Core) +- platform-awareness.mdc (Core) +- file-verification.mdc (Core) +- van-mode-map.mdc (Mode) +``` + +### PLAN Mode Essential Rules +```markdown +- main.mdc (Core) +- plan-mode-map.mdc (Mode) +- task-tracking-[complexity].mdc (Level) +``` + +### CREATIVE Mode Essential Rules +```markdown +- main.mdc (Core) +- creative-mode-map.mdc (Mode) +- creative-phase-enforcement.mdc (Mode) +``` + +### CREATIVE Mode Specialized Rules (Lazy Loaded) +```markdown +- creative-phase-architecture.mdc (Specialized) +- creative-phase-algorithm.mdc (Specialized) +- creative-phase-uiux.mdc (Specialized) +``` + +### IMPLEMENT Mode Essential Rules +```markdown +- main.mdc (Core) +- command-execution.mdc (Core) +- implement-mode-map.mdc (Mode) +``` + +## ๐Ÿš€ IMPLEMENTATION BENEFITS + +The hierarchical loading system provides: + +1. **Reduced Initial Loading**: Only essential rules loaded at start (~70% token reduction) +2. **Cached Core Rules**: Rules shared between modes are cached +3. **Specialized Rule Loading**: Specialized rules loaded only when needed +4. **Complexity-Based Loading**: Only load rules appropriate for task complexity + +## ๐Ÿ“ˆ TOKEN USAGE COMPARISON + +| Approach | Initial Tokens | Specialized Tokens | Total Tokens | +|----------|---------------|-------------------|--------------| +| Original System | ~70,000 | Included in initial | ~70,000 | +| Hierarchical System | ~15,000 | ~10,000 (on demand) | ~25,000 | +| **Token Reduction** | **~55,000 (78%)** | **N/A** | **~45,000 (64%)** | + +## ๐Ÿ”„ USAGE EXAMPLE + +### Example: Creative Phase with Architecture Rule + +```javascript +// Initialize the CREATIVE mode with only essential rules +const mode = ruleManager.initializeMode("CREATIVE", 3); + +// Core and essential mode rules are loaded +// Architecture rules are NOT loaded yet + +// Later, when architecture design is needed: +const architectureRule = ruleManager.loadSpecializedRule("architecture"); + +// Now the architecture rule is loaded and cached +``` + +## ๐Ÿงช RULE LOADING VERIFICATION + +To ensure the rule loading system is working optimally: + +```markdown +## Rule Loading Verification + +- Core Rules: [Loaded] +- Mode-Essential Rules: [Loaded] +- Complexity-Level Rules: [Loaded] +- Specialized Rules: [Not Loaded] + +Current Token Usage: [X] tokens +Potential Token Savings: [Y] tokens +``` + +This hierarchical approach ensures optimal token usage while maintaining all functionality. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Core/memory-bank-paths.mdc b/.cursor/rules/isolation_rules/Core/memory-bank-paths.mdc new file mode 100644 index 0000000..af09f67 --- /dev/null +++ b/.cursor/rules/isolation_rules/Core/memory-bank-paths.mdc @@ -0,0 +1,23 @@ +--- +description: Defines canonical paths for core Memory Bank files. +globs: memory-bank-paths.mdc +alwaysApply: true +--- + +# CORE MEMORY BANK FILE LOCATIONS + +**CRITICAL:** All core Memory Bank files reside within the `memory-bank/` directory at the project root. Do NOT create or modify these files outside this directory unless explicitly instructed for archiving purposes. + +* **Tasks File:** `memory-bank/tasks.md` - This file is used for active, in-progress task tracking, detailing steps, checklists, and component lists. Its content, particularly the detailed checklists, is merged into the main archive document for the task upon completion. After archival, `tasks.md` is cleared to be ready for the next task. It is an ephemeral working document during a task's lifecycle, with its persistent record captured in the task's archive file. +* **Active Context File:** `memory-bank/activeContext.md` +* **Progress File:** `memory-bank/progress.md` +* **Project Brief File:** `memory-bank/projectbrief.md` +* **Product Context File:** `memory-bank/productContext.md` +* **System Patterns File:** `memory-bank/systemPatterns.md` +* **Tech Context File:** `memory-bank/techContext.md` +* **Style Guide File:** `memory-bank/style-guide.md` +* **Creative Phase Docs:** `memory-bank/creative/creative-[feature_name].md` +* **Reflection Docs:** `memory-bank/reflection/reflection-[task_id].md` +* **Archive Directory:** `memory-bank/archive/archive-[task_id].md` + +**Verification Mandate:** Before any `create_file` or `edit_file` operation on these core files, verify the path starts with `memory-bank/`. If attempting to create a new core file (e.g., `tasks.md` at the start of a project), ensure it is created at `memory-bank/tasks.md`. diff --git a/.cursor/rules/isolation_rules/Core/mode-transition-optimization.mdc b/.cursor/rules/isolation_rules/Core/mode-transition-optimization.mdc new file mode 100644 index 0000000..ff415a9 --- /dev/null +++ b/.cursor/rules/isolation_rules/Core/mode-transition-optimization.mdc @@ -0,0 +1,361 @@ +--- +description: Optimized mode transition protocol +globs: "**/mode-transition*/**", "**/context-preservation*/**" +alwaysApply: false +--- + +# MODE TRANSITION OPTIMIZATION + +> **TL;DR:** This file implements optimized mode transitions to preserve context efficiently between different phases of the Memory Bank system. + +## ๐Ÿ”„ UNIFIED CONTEXT TRANSFER PROTOCOL + +```mermaid +graph TD + Start["Mode A"] --> Create["Create Context
Summary Document"] + Create --> Store["Store Critical
Context Data"] + Store --> Transition["Transition
to Mode B"] + Transition --> Verify["Verify Context
Availability"] + Verify --> Load["Load Relevant
Context Data"] + Load --> Continue["Continue in
Mode B"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style Create fill:#ffa64d,stroke:#cc7a30,color:white + style Store fill:#4dbb5f,stroke:#36873f,color:white + style Transition fill:#d94dbb,stroke:#a3378a,color:white + style Verify fill:#4dbbbb,stroke:#368787,color:white + style Load fill:#d971ff,stroke:#a33bc2,color:white + style Continue fill:#ff71c2,stroke:#c23b8a,color:white +``` + +## ๐Ÿ“Š CONTEXT TRANSITION DOCUMENT + +Create a standardized transition document when switching modes: + +```markdown +# MODE TRANSITION: [Source Mode] โ†’ [Target Mode] + +## Context Summary +- Task: [Task name/description] +- Complexity: Level [1-4] +- Current Phase: [Phase name] +- Progress: [Percentage or status] + +## Key Decisions +- [Decision 1]: [Brief summary] +- [Decision 2]: [Brief summary] +- [Decision 3]: [Brief summary] + +## Critical Context +- [Context item 1]: [Value/status] +- [Context item 2]: [Value/status] +- [Context item 3]: [Value/status] + +## Next Steps +1. [Next step 1] +2. [Next step 2] +3. [Next step 3] + +## Resource Pointers +- [Resource 1]: [Location] +- [Resource 2]: [Location] +- [Resource 3]: [Location] +``` + +## ๐Ÿ” MODE-SPECIFIC TRANSITION HANDLERS + +### VAN โ†’ PLAN Transition + +```markdown +### VAN โ†’ PLAN +- Context preserved: Complexity level, platform detection, file structure +- Files transferred: tasks.md (initialized), activeContext.md (initialized) +- Rule optimization: Pre-load planning rules based on complexity level +``` + +### PLAN โ†’ CREATIVE Transition + +```markdown +### PLAN โ†’ CREATIVE +- Context preserved: Task requirements, component list, creative phase flags +- Files transferred: tasks.md (updated with plan), creative phase components list +- Rule optimization: Only load creative templates for identified components +``` + +### CREATIVE โ†’ IMPLEMENT Transition + +```markdown +### CREATIVE โ†’ IMPLEMENT +- Context preserved: Design decisions, implementation guidelines, requirements +- Files transferred: tasks.md, design documents, implementation checklist +- Rule optimization: Pre-load implementation templates based on design decisions +``` + +### IMPLEMENT โ†’ REFLECT Transition + +```markdown +### IMPLEMENT โ†’ REFLECT +- Context preserved: Implementation status, challenges encountered, decisions +- Files transferred: tasks.md, progress.md, implementation notes +- Rule optimization: Load reflection templates based on completion status +``` + +## ๐Ÿง  HIERARCHICAL RULE CACHING + +Implement rule caching to avoid redundant loading: + +```javascript +// Pseudocode for rule caching +const ruleCache = { + core: {}, // Core rules shared across modes + van: {}, + plan: {}, + creative: {}, + implement: {}, + reflect: {}, + archive: {} +}; + +// Check cache before loading +function loadRule(rulePath) { + const cacheKey = getCacheKey(rulePath); + const category = getCategoryFromPath(rulePath); + + if (ruleCache[category][cacheKey]) { + return ruleCache[category][cacheKey]; + } + + const ruleContent = readRuleFromFile(rulePath); + ruleCache[category][cacheKey] = ruleContent; + + return ruleContent; +} + +// Only invalidate specific rules when needed +function invalidateRule(rulePath) { + const cacheKey = getCacheKey(rulePath); + const category = getCategoryFromPath(rulePath); + + if (ruleCache[category][cacheKey]) { + delete ruleCache[category][cacheKey]; + } +} +``` + +## โšก DIFFERENTIAL MEMORY BANK UPDATES + +```mermaid +graph TD + Start["Memory Bank
Update Request"] --> Check{"File
Changed?"} + Check -->|"No"| Skip["Skip Update
(No Changes)"] + Check -->|"Yes"| Changed{"Specific
Section Changed?"} + Changed -->|"No"| Full["Full File
Update"] + Changed -->|"Yes"| Partial["Partial
Update Only"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style Check fill:#ffa64d,stroke:#cc7a30,color:white + style Skip fill:#4dbb5f,stroke:#36873f,color:white + style Changed fill:#d94dbb,stroke:#a3378a,color:white + style Full fill:#4dbbbb,stroke:#368787,color:white + style Partial fill:#d971ff,stroke:#a33bc2,color:white +``` + +Implement a more efficient update mechanism: + +```javascript +// Pseudocode for differential updates +function updateMemoryBankFile(filePath, newContent) { + // Read existing content + const currentContent = readFile(filePath); + + // Skip if no changes + if (currentContent === newContent) { + return "No changes detected, update skipped"; + } + + // Check if we can do a partial update + const sections = parseIntoSections(currentContent); + const newSections = parseIntoSections(newContent); + + let updatedContent = currentContent; + let updatedSections = 0; + + // Only update changed sections + for (const [sectionName, sectionContent] of Object.entries(newSections)) { + if (!sections[sectionName] || sections[sectionName] !== sectionContent) { + updatedContent = replaceSection(updatedContent, sectionName, sectionContent); + updatedSections++; + } + } + + // Write updated content + writeFile(filePath, updatedContent); + + return `Updated ${updatedSections} section(s) in ${filePath}`; +} +``` + +## ๐Ÿ”— CREATIVE TO IMPLEMENT BRIDGE + +Special handling for the critical Creative โ†’ Implement transition: + +```markdown +## CREATIVE โ†’ IMPLEMENT BRIDGE + +### Design Decision Summary +Automatically generated summary of all creative phase decisions: + +```json +{ + "components": [ + { + "name": "ComponentA", + "decision": "Approach X selected", + "rationale": "Best performance characteristics", + "implementation_notes": [ + "Use X library", + "Implement caching", + "Add error handling" + ] + }, + { + "name": "ComponentB", + "decision": "Custom solution", + "rationale": "Unique requirements", + "implementation_notes": [ + "Build from scratch", + "Modular architecture", + "Unit tests required" + ] + } + ] +} +``` + +### Implementation Verification Checklist +Automatically generated verification checklist: + +```markdown +# Implementation Readiness Checklist + +- [ ] Design decisions available for all components +- [ ] Implementation notes provided for each decision +- [ ] Dependencies clearly identified +- [ ] Order of implementation determined +- [ ] Required libraries/frameworks documented +- [ ] Potential challenges identified +``` + +## ๐Ÿš€ ADAPTIVE MODE LOADING + +Implement progressive mode loading to optimize context: + +```javascript +// Pseudocode for adaptive mode loading +function loadMode(modeName, taskComplexity) { + // Always load core rules + loadCoreRules(); + + // Load complexity-appropriate rules + loadComplexityRules(taskComplexity); + + // Load mode-specific essential rules + loadModeEssentialRules(modeName); + + // Only load specialized rules as needed + registerLazyLoadHandlers(modeName, taskComplexity); +} + +function registerLazyLoadHandlers(modeName, taskComplexity) { + // Register handlers to load additional rules only when needed + if (modeName === "CREATIVE") { + registerHandler("architecture", () => loadRule("creative-phase-architecture.mdc")); + registerHandler("algorithm", () => loadRule("creative-phase-algorithm.mdc")); + registerHandler("uiux", () => loadRule("creative-phase-uiux.mdc")); + } + + // Similar patterns for other specialized rule types +} +``` + +## โœ… MODE TRANSITION EXAMPLES + +### Example: PLAN โ†’ CREATIVE Transition + +When transitioning from PLAN to CREATIVE mode: + +```markdown +# MODE TRANSITION: PLAN โ†’ CREATIVE + +## Context Summary +- Task: Implement user authentication system +- Complexity: Level 3 +- Current Phase: Planning completed +- Progress: 35% (Planning: 100%, Creative: 0%, Implement: 0%) + +## Key Decisions +- Authentication: Requires exploration of options (JWT vs Sessions) +- User Management: Will use existing database schema +- Authorization: Role-based access control selected + +## Critical Context +- Components for creative phase: Authentication mechanism, Session management +- Dependencies: User database, Authorization system +- Constraints: Must support SSO, Performance requirements + +## Next Steps +1. Explore authentication options (JWT, Sessions, OAuth) +2. Design session management approach +3. Document implementation guidelines + +## Resource Pointers +- Planning document: tasks.md (section 3) +- Requirements: activeContext.md +- Reference architecture: docs/system-architecture.md +``` + +### Example: CREATIVE โ†’ IMPLEMENT Transition + +When transitioning from CREATIVE to IMPLEMENT mode: + +```markdown +# MODE TRANSITION: CREATIVE โ†’ IMPLEMENT + +## Context Summary +- Task: Implement user authentication system +- Complexity: Level 3 +- Current Phase: Creative completed +- Progress: 70% (Planning: 100%, Creative: 100%, Implement: 0%) + +## Key Decisions +- Authentication: JWT-based approach selected +- Token Storage: Secure HttpOnly cookies with CSRF protection +- Refresh Strategy: Silent refresh with sliding expiration + +## Critical Context +- Implementation order: Auth API endpoints, Middleware, Client integration +- Testing requirements: Unit tests for JWT validation, Integration tests for auth flow +- Security considerations: XSS protection, CSRF mitigation, Rate limiting + +## Next Steps +1. Implement JWT generation and validation +2. Create authentication middleware +3. Build user login/logout endpoints +4. Implement client-side auth integration + +## Resource Pointers +- Creative document: creative-auth-decisions.md +- API specifications: api-spec.yaml +- Security requirements: security-policy.md +``` + +## ๐Ÿ”„ IMPLEMENTATION BENEFITS + +This optimization provides: + +1. Reduced token usage during mode transitions (~40% reduction) +2. Better context preservation between modes +3. Improved efficiency through rule caching +4. Targeted loading of only necessary rules +5. Optimized memory bank updates +6. Clear transition documents that preserve critical context \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Core/optimization-integration.mdc b/.cursor/rules/isolation_rules/Core/optimization-integration.mdc new file mode 100644 index 0000000..cf132cc --- /dev/null +++ b/.cursor/rules/isolation_rules/Core/optimization-integration.mdc @@ -0,0 +1,321 @@ +--- +description: Integration hub for Memory Bank optimizations +globs: "**/optimization*/**", "**/integration*/**" +alwaysApply: false +--- + +# MEMORY BANK OPTIMIZATION INTEGRATION + +> **TL;DR:** This file serves as the integration point for all Memory Bank optimizations, coordinating the various optimization components to work seamlessly together. + +## ๐Ÿ”„ OPTIMIZATION INTEGRATION FLOW + +```mermaid +graph TD + Start["Memory Bank
Initialization"] --> HRL["Hierarchical
Rule Loading"] + HRL --> ACM["Adaptive
Complexity Model"] + ACM --> DCM["Dynamic
Context Management"] + DCM --> TMO["Transition
Optimization"] + + subgraph "Level-Specific Optimizations" + L1["Level 1
Optimizations"] + L2["Level 2
Optimizations"] + L3["Level 3
Optimizations"] + L4["Level 4
Optimizations"] + end + + ACM --> L1 & L2 & L3 & L4 + + L1 & L2 & L3 & L4 --> CPO["Creative Phase
Optimization"] + + CPO --> PDO["Progressive
Documentation"] + TMO --> PDO + + PDO --> MBO["Memory Bank
Optimization"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style HRL fill:#ffa64d,stroke:#cc7a30,color:white + style ACM fill:#4dbb5f,stroke:#36873f,color:white + style DCM fill:#d94dbb,stroke:#a3378a,color:white + style TMO fill:#4dbbbb,stroke:#368787,color:white + style CPO fill:#e699d9,stroke:#d94dbb,color:white + style PDO fill:#d971ff,stroke:#a33bc2,color:white + style MBO fill:#ff71c2,stroke:#c23b8a,color:white +``` + +## ๐Ÿ“‹ OPTIMIZATION COMPONENT REGISTRY + +```javascript +// Optimization component registry pseudocode +const optimizationRegistry = { + // Core optimizations + hierarchicalRuleLoading: { + file: "Core/hierarchical-rule-loading.mdc", + dependencies: [], + priority: 1 + }, + adaptiveComplexityModel: { + file: "main-optimized.mdc", + dependencies: ["hierarchicalRuleLoading"], + priority: 2 + }, + modeTransitionOptimization: { + file: "Core/mode-transition-optimization.mdc", + dependencies: ["hierarchicalRuleLoading", "adaptiveComplexityModel"], + priority: 3 + }, + + // Level-specific optimizations + level1Optimization: { + file: "Level1/optimized-workflow-level1.mdc", + dependencies: ["adaptiveComplexityModel"], + priority: 4 + }, + + // Feature-specific optimizations + creativePhaseOptimization: { + file: "Phases/CreativePhase/optimized-creative-template.mdc", + dependencies: ["hierarchicalRuleLoading", "adaptiveComplexityModel"], + priority: 5 + } +}; +``` + +## ๐Ÿ”„ OPTIMIZATION INITIALIZATION SEQUENCE + +```mermaid +sequenceDiagram + participant MB as Memory Bank + participant Reg as Optimization Registry + participant HRL as Hierarchical Rule Loading + participant ACM as Adaptive Complexity + participant TMO as Transition Optimization + participant CPO as Creative Phase Optimization + + MB->>Reg: Request optimization initialization + Reg->>Reg: Sort optimizations by priority & dependencies + Reg->>HRL: Initialize (Priority 1) + HRL-->>Reg: Initialization complete + Reg->>ACM: Initialize (Priority 2) + ACM->>HRL: Request rule loading services + HRL-->>ACM: Provide rule loading + ACM-->>Reg: Initialization complete + Reg->>TMO: Initialize (Priority 3) + TMO->>HRL: Request rule loading services + TMO->>ACM: Request complexity model + HRL-->>TMO: Provide rule loading + ACM-->>TMO: Provide complexity model + TMO-->>Reg: Initialization complete + Reg->>CPO: Initialize (Final) + CPO->>HRL: Request rule loading services + CPO->>ACM: Request complexity model + CPO->>TMO: Request transition services + HRL-->>CPO: Provide rule loading + ACM-->>CPO: Provide complexity model + TMO-->>CPO: Provide transition services + CPO-->>Reg: Initialization complete + Reg-->>MB: All optimizations initialized +``` + +## ๐Ÿ” OPTIMIZATION CONFIGURATION + +```javascript +// Optimization configuration pseudocode +const optimizationConfig = { + // Token optimization settings + tokenOptimization: { + enableHierarchicalLoading: true, + enableProgressiveDocumentation: true, + enableLazyRuleLoading: true, + enableContextPruning: true + }, + + // Context preservation settings + contextPreservation: { + preserveDesignDecisions: true, + preserveImplementationContext: true, + preserveUserPreferences: true, + contextCompressionLevel: "high" // none, low, medium, high + }, + + // Documentation optimization + documentationOptimization: { + level1DocumentationLevel: "minimal", // minimal, standard, comprehensive + level2DocumentationLevel: "standard", + level3DocumentationLevel: "comprehensive", + level4DocumentationLevel: "comprehensive", + enableProgressiveDisclosure: true, + enableTemplateCaching: true + } +}; +``` + +## ๐Ÿ“Š OPTIMIZATION MONITORING + +```mermaid +graph TD + Monitor["Optimization
Monitor"] --> TokenUsage["Token Usage
Tracking"] + Monitor --> ContextEfficiency["Context
Efficiency"] + Monitor --> RuleLoadingStats["Rule Loading
Statistics"] + Monitor --> DocumentationSize["Documentation
Size"] + + TokenUsage --> Dashboard["Optimization
Dashboard"] + ContextEfficiency --> Dashboard + RuleLoadingStats --> Dashboard + DocumentationSize --> Dashboard + + Dashboard --> Feedback["Optimization
Feedback Loop"] + Feedback --> Config["Optimization
Configuration"] + Config --> Monitor + + style Monitor fill:#4da6ff,stroke:#0066cc,color:white + style Dashboard fill:#ffa64d,stroke:#cc7a30,color:white + style Feedback fill:#4dbb5f,stroke:#36873f,color:white + style Config fill:#d94dbb,stroke:#a3378a,color:white +``` + +## ๐Ÿ“ˆ OPTIMIZATION METRICS + +```markdown +# Optimization Metrics + +## Token Usage +- Core Rule Loading: [X] tokens +- Mode-Specific Rules: [Y] tokens +- Creative Phase Documentation: [Z] tokens +- Overall Token Reduction: [P]% + +## Context Efficiency +- Context Utilization: [Q]% +- Context Waste: [R]% +- Effective Token Capacity: [S] tokens + +## Rule Loading +- Rules Loaded: [T] / [U] (Total) +- Lazy-Loaded Rules: [V] +- Cached Rules: [W] + +## Documentation +- Level 1 Documentation Size: [X] tokens +- Level 2 Documentation Size: [Y] tokens +- Level 3 Documentation Size: [Z] tokens +- Level 4 Documentation Size: [AA] tokens +``` + +## ๐Ÿ”„ INTEGRATION USAGE EXAMPLES + +### Initializing All Optimizations + +```javascript +// Pseudocode for initializing all optimizations +function initializeMemoryBankOptimizations() { + // Load optimization registry + const registry = loadOptimizationRegistry(); + + // Sort by priority and dependencies + const sortedOptimizations = sortOptimizations(registry); + + // Initialize each optimization in order + for (const opt of sortedOptimizations) { + initializeOptimization(opt); + } + + // Configure optimization parameters + configureOptimizations(loadOptimizationConfig()); + + // Start monitoring + initializeOptimizationMonitoring(); + + return "Memory Bank optimizations initialized"; +} +``` + +### Using Optimized Creative Phase + +```markdown +// Using the optimized creative phase with progressive documentation + +// Initialize with minimal documentation +๐Ÿ“Œ CREATIVE PHASE START: Authentication System +โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” + +1๏ธโƒฃ PROBLEM + Description: Design an authentication system for the application + Requirements: Secure, scalable, supports SSO, easy to maintain + Constraints: Must work with existing user database, <100ms response time + +2๏ธโƒฃ OPTIONS + Option A: JWT-based stateless auth + Option B: Session-based auth with Redis + Option C: OAuth2 implementation + +// Progressively add detail as needed +3๏ธโƒฃ ANALYSIS + | Criterion | JWT | Sessions | OAuth2 | + |-----------|-----|----------|--------| + | Security | โญโญโญ | โญโญโญโญ | โญโญโญโญโญ | + | Scalability | โญโญโญโญโญ | โญโญโญ | โญโญโญโญ | + | Complexity | โญโญ | โญโญโญ | โญโญโญโญ | + +// Focus on decision and implementation +4๏ธโƒฃ DECISION + Selected: Option A: JWT-based auth with refresh tokens + Rationale: Best balance of performance and scalability + +5๏ธโƒฃ IMPLEMENTATION NOTES + - Use HS256 algorithm for token signing + - Implement short-lived access tokens (15min) + - Store token blacklist in Redis for revocation +``` + +## ๐Ÿ”„ MODE TRANSITION EXAMPLE + +```markdown +// Optimized mode transition from CREATIVE to IMPLEMENT + +# MODE TRANSITION: CREATIVE โ†’ IMPLEMENT + +## Context Summary +- Task: Authentication system implementation +- Complexity: Level 3 +- Decision: JWT-based auth with refresh tokens + +## Key Context +- Security requirements verified +- Algorithm selection: HS256 +- Token lifecycle: 15min access / 7 days refresh + +## Next Steps +1. Implement JWT generation module +2. Create token validation middleware +3. Build refresh token handling + +// Transition happens with preserved context +// IMPLEMENT mode continues with this context available +``` + +## ๐Ÿ”„ HIERARCHICAL RULE LOADING EXAMPLE + +```javascript +// Pseudocode example of hierarchical rule loading + +// Initial load - only core rules +loadCoreRules(); + +// Determine complexity +const complexity = determineComplexity(); + +// Load mode-specific essential rules +loadModeEssentialRules("CREATIVE"); + +// Register lazy loaders for specialized rules +registerLazyLoader("architecture", () => loadRule("creative-phase-architecture.mdc")); +registerLazyLoader("algorithm", () => loadRule("creative-phase-algorithm.mdc")); +registerLazyLoader("uiux", () => loadRule("creative-phase-uiux.mdc")); + +// Later, when architecture design is needed: +const architectureRule = loadSpecializedRule("architecture"); +// Architecture rule is now loaded only when needed +``` + +These integrated optimizations work seamlessly together to provide a significantly more efficient Memory Bank system while maintaining all functionality. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Core/platform-awareness.mdc b/.cursor/rules/isolation_rules/Core/platform-awareness.mdc new file mode 100644 index 0000000..3a426eb --- /dev/null +++ b/.cursor/rules/isolation_rules/Core/platform-awareness.mdc @@ -0,0 +1,71 @@ +--- +description: Platform detection and command adaptation for isolation-focused Memory Bank +globs: platform-awareness.mdc +alwaysApply: false +--- + + +# PLATFORM AWARENESS SYSTEM + +> **TL;DR:** This system detects the operating system, path format, and shell environment, then adapts commands accordingly to ensure cross-platform compatibility. + +## ๐Ÿ” PLATFORM DETECTION PROCESS + +```mermaid +graph TD + Start["Start Platform
Detection"] --> DetectOS["Detect OS
Environment"] + DetectOS --> Windows["Windows
Detection"] + DetectOS --> Mac["macOS
Detection"] + DetectOS --> Linux["Linux
Detection"] + + Windows & Mac & Linux --> PathCheck["Path Separator
Detection"] + PathCheck --> CmdAdapt["Command
Adaptation"] + CmdAdapt --> ShellCheck["Shell Type
Detection"] + ShellCheck --> Complete["Platform Detection
Complete"] +``` + +## ๐Ÿ“‹ PLATFORM DETECTION IMPLEMENTATION + +For reliable platform detection: + +``` +## Platform Detection Results +Operating System: [Windows/macOS/Linux] +Path Separator: [\ or /] +Shell Environment: [PowerShell/Bash/Zsh/Cmd] +Command Adaptation: [Required/Not Required] + +Adapting commands for [detected platform]... +``` + +## ๐Ÿ” PATH FORMAT CONVERSION + +When converting paths between formats: + +```mermaid +sequenceDiagram + participant Input as Path Input + participant Detector as Format Detector + participant Converter as Format Converter + participant Output as Adapted Path + + Input->>Detector: Raw Path + Detector->>Detector: Detect Current Format + Detector->>Converter: Path + Current Format + Converter->>Converter: Apply Target Format + Converter->>Output: Platform-Specific Path +``` + +## ๐Ÿ“ PLATFORM VERIFICATION CHECKLIST + +``` +โœ“ PLATFORM VERIFICATION +- Operating system correctly identified? [YES/NO] +- Path separator format detected? [YES/NO] +- Shell environment identified? [YES/NO] +- Command set adapted appropriately? [YES/NO] +- Path format handling configured? [YES/NO] + +โ†’ If all YES: Platform adaptation complete +โ†’ If any NO: Run additional detection steps +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level1/optimized-workflow-level1.mdc b/.cursor/rules/isolation_rules/Level1/optimized-workflow-level1.mdc new file mode 100644 index 0000000..d219f57 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level1/optimized-workflow-level1.mdc @@ -0,0 +1,205 @@ +--- +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
QUICK FIX"] --> Analyze["1๏ธโƒฃ ANALYZE
Understand issue"] + Analyze --> Implement["2๏ธโƒฃ IMPLEMENT
Fix the issue"] + Implement --> Verify["3๏ธโƒฃ VERIFY
Test the fix"] + Verify --> Document["4๏ธโƒฃ DOCUMENT
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. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level1/quick-documentation.mdc b/.cursor/rules/isolation_rules/Level1/quick-documentation.mdc new file mode 100644 index 0000000..10ca194 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level1/quick-documentation.mdc @@ -0,0 +1,225 @@ +--- +description: Quick documentation approach for Level 1 Quick Bug Fix tasks +globs: "**/level1/**", "**/documentation/**" +alwaysApply: false +--- + +# QUICK DOCUMENTATION FOR LEVEL 1 TASKS + +> **TL;DR:** This document outlines a quick documentation approach for Level 1 (Quick Bug Fix) tasks, ensuring that essential information is captured with minimal overhead. + +## ๐Ÿ” QUICK DOCUMENTATION OVERVIEW + +```mermaid +graph TD + FixComplete["Bug Fix
Complete"] --> Document["Document
Solution"] + Document --> UpdateTasks["Update
tasks.md"] + UpdateTasks --> MinimalUpdates["Make Minimal
Memory Bank Updates"] + MinimalUpdates --> CrossReference["Create Simple
Cross-References"] + CrossReference --> Complete["Documentation
Complete"] +``` + +Level 1 tasks require efficient documentation that captures essential information without unnecessary detail. This approach ensures that critical knowledge is preserved while maintaining speed and efficiency. + +## ๐Ÿ“‹ DOCUMENTATION PRINCIPLES + +1. **Conciseness**: Keep documentation brief but complete +2. **Focus**: Document only what's necessary to understand the fix +3. **Context**: Provide sufficient context to understand the issue +4. **Solution**: Clearly describe what was changed and why +5. **Findability**: Ensure the fix can be easily found later + +## ๐Ÿ“‹ QUICK FIX DOCUMENTATION TEMPLATE + +```markdown +# Quick Fix: [Issue Title] + +## Issue +[Brief description of the problem - 1-2 sentences] + +## Root Cause +[Concise description of what caused the issue - 1-2 sentences] + +## Solution +[Brief description of the fix implemented - 2-3 sentences] + +## Files Changed +- [File path 1] +- [File path 2] + +## Verification +[How the fix was tested/verified - 1-2 sentences] + +## Notes +[Any additional information that might be helpful - optional] +``` + +## ๐Ÿ“‹ TASKS.MD UPDATES + +For Level 1 tasks, update tasks.md with this format: + +```markdown +## Completed Bug Fixes +- [X] [Level 1] Fixed: [Issue title] (Completed: YYYY-MM-DD) + - Issue: [One-line description] + - Root Cause: [One-line description] + - Solution: [One-line description] + - Files: [File paths] +``` + +For in-progress tasks: + +```markdown +## Bug Fixes in Progress +- [ ] [Level 1] Fix: [Issue title] (Est: XX mins) + - Issue: [One-line description] + - Location: [Component/file] +``` + +## ๐Ÿ“‹ MEMORY BANK UPDATES + +For Level 1 tasks, make these minimal Memory Bank updates: + +1. **tasks.md**: + - Update with fix details as shown above + - Mark task as complete + +2. **activeContext.md** (only if relevant): + ```markdown + ## Recent Fixes + - [YYYY-MM-DD] Fixed [issue] in [component/file]. [One-line description of fix] + ``` + +3. **progress.md** (only if significant): + ```markdown + ## Bug Fixes + - [YYYY-MM-DD] Fixed [issue] in [component/file]. + ``` + +Other Memory Bank files typically do not need updates for Level 1 tasks unless the fix reveals important system information. + +## ๐Ÿ“‹ COMMON BUG CATEGORIES + +Categorize bugs to improve documentation consistency: + +1. **Logic Error**: + - Example: "Fixed incorrect conditional logic in user validation" + +2. **UI/Display Issue**: + - Example: "Fixed misaligned button in mobile view" + +3. **Performance Issue**: + - Example: "Fixed slow loading of user profile data" + +4. **Data Handling Error**: + - Example: "Fixed incorrect parsing of date format" + +5. **Configuration Issue**: + - Example: "Fixed incorrect environment variable setting" + +## ๐Ÿ“‹ QUICK DOCUMENTATION PROCESS + +Follow these steps for efficient documentation: + +1. **Immediately After Fix**: + - Document while the fix is fresh in your mind + - Focus on what, why, and how + - Be specific about changes made + +2. **Update Task Tracking**: + - Update tasks.md with fix details + - Use consistent format for easy reference + +3. **Minimal Cross-References**: + - Create only essential cross-references + - Ensure fix can be found in the future + +4. **Check Completeness**: + - Verify all essential information is captured + - Ensure another developer could understand the fix + +## ๐Ÿ“‹ EXAMPLES: GOOD VS. INSUFFICIENT DOCUMENTATION + +### โŒ Insufficient Documentation + +```markdown +Fixed the login bug. +``` + +### โœ… Good Documentation + +```markdown +# Quick Fix: User Login Failure with Special Characters + +## Issue +Users with special characters in email addresses (e.g., +, %) couldn't log in. + +## Root Cause +The email validation regex was incorrectly escaping special characters. + +## Solution +Updated the email validation regex in AuthValidator.js to properly handle special characters according to RFC 5322. + +## Files Changed +- src/utils/AuthValidator.js + +## Verification +Tested login with various special characters in email addresses (test+user@example.com, user%123@example.com). +``` + +## ๐Ÿ“‹ DOCUMENTATION VERIFICATION CHECKLIST + +``` +โœ“ DOCUMENTATION VERIFICATION +- Issue clearly described? [YES/NO] +- Root cause identified? [YES/NO] +- Solution explained? [YES/NO] +- Files changed listed? [YES/NO] +- Verification method described? [YES/NO] +- tasks.md updated? [YES/NO] +- Memory Bank minimally updated? [YES/NO] + +โ†’ If all YES: Documentation complete +โ†’ If any NO: Complete missing information +``` + +## ๐Ÿ“‹ MINIMAL MODE DOCUMENTATION + +For minimal mode, use this ultra-compact format: + +``` +โœ“ FIX: [Issue title] +โœ“ CAUSE: [One-line root cause] +โœ“ SOLUTION: [One-line fix description] +โœ“ FILES: [File paths] +โœ“ VERIFIED: [How verified] +``` + +## ๐Ÿ”„ DOCUMENTATION INTEGRATION + +Quick documentation integrates with other systems: + +```mermaid +graph TD + QuickDoc["Quick Fix
Documentation"] --> TasksMD["tasks.md
Update"] + QuickDoc --> FixDetails["Fix Details
Documentation"] + + TasksMD --> Tracking["Task
Tracking"] + FixDetails --> Knowledge["Knowledge
Preservation"] + + Tracking & Knowledge --> Future["Future
Reference"] +``` + +## ๐Ÿšจ DOCUMENTATION EFFICIENCY PRINCIPLE + +Remember: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Document ONLY what's needed to understand the fix. โ”‚ +โ”‚ Focus on ESSENTIAL information that would help โ”‚ +โ”‚ someone who encounters the same issue in the future.โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +This ensures that Level 1 tasks are documented efficiently without unnecessary overhead while preserving critical knowledge. diff --git a/.cursor/rules/isolation_rules/Level1/workflow-level1.mdc b/.cursor/rules/isolation_rules/Level1/workflow-level1.mdc new file mode 100644 index 0000000..3414f1d --- /dev/null +++ b/.cursor/rules/isolation_rules/Level1/workflow-level1.mdc @@ -0,0 +1,190 @@ +--- +description: Streamlined workflow for Level 1 Quick Bug Fix tasks +globs: "**/level1/**", "**/workflow/**" +alwaysApply: false +--- +# STREAMLINED WORKFLOW FOR LEVEL 1 TASKS + +> **TL;DR:** This document outlines a streamlined workflow for Level 1 (Quick Bug Fix) tasks, focusing on efficient problem resolution with minimal overhead while maintaining adequate documentation. + +## ๐Ÿ” LEVEL 1 WORKFLOW OVERVIEW + +```mermaid +graph LR + Init["1. INITIALIZATION"] --> Impl["2. IMPLEMENTATION"] + Impl --> Doc["3. DOCUMENTATION"] + + %% Document connections for each phase + Init -.-> InitDocs["Quick setup
Issue understanding"] + Impl -.-> ImplDocs["Focused fix
Verify resolution"] + Doc -.-> DocDocs["Document solution
Update tracking"] +``` + +## ๐Ÿ“‹ WORKFLOW PHASES + +### Phase 1: INITIALIZATION + +```mermaid +graph TD + Start["Start Level 1 Task"] --> Identify["Identify
Issue"] + Identify --> Understand["Understand
Problem"] + Understand --> Setup["Quick
Environment Setup"] + Setup --> TaskEntry["Create Quick
Task Entry"] + TaskEntry --> InitComplete["Initialization
Complete"] +``` + +**Steps:** +1. Identify the specific issue to fix +2. Understand the problem and its impact +3. Set up environment for quick fix +4. Create minimal task entry in tasks.md + +**Milestone Checkpoint:** +``` +โœ“ INITIALIZATION CHECKPOINT +- Issue clearly identified? [YES/NO] +- Problem understood? [YES/NO] +- Environment set up? [YES/NO] +- Task entry created? [YES/NO] + +โ†’ If all YES: Proceed to Implementation +โ†’ If any NO: Complete initialization steps +``` + +### Phase 2: IMPLEMENTATION + +```mermaid +graph TD + Start["Begin
Implementation"] --> Locate["Locate
Issue Source"] + Locate --> Develop["Develop
Fix"] + Develop --> Test["Test
Solution"] + Test --> Verify["Verify
Resolution"] + Verify --> ImplComplete["Implementation
Complete"] +``` + +**Steps:** +1. Locate the source of the issue +2. Develop a targeted fix +3. Test the solution thoroughly +4. Verify that the issue is resolved + +**Milestone Checkpoint:** +``` +โœ“ IMPLEMENTATION CHECKPOINT +- Issue source located? [YES/NO] +- Fix developed? [YES/NO] +- Solution tested? [YES/NO] +- Resolution verified? [YES/NO] + +โ†’ If all YES: Proceed to Documentation +โ†’ If any NO: Complete implementation steps +``` + +### Phase 3: DOCUMENTATION + +```mermaid +graph TD + Start["Begin
Documentation"] --> Update["Update
tasks.md"] + Update --> Solution["Document
Solution"] + Solution --> References["Create Minimal
Cross-References"] + References --> NotifyStakeholders["Notify
Stakeholders"] + NotifyStakeholders --> DocComplete["Documentation
Complete"] +``` + +**Steps:** +1. Update tasks.md with fix details +2. Document the solution concisely +3. Create minimal cross-references +4. Notify stakeholders as needed + +**Milestone Checkpoint:** +``` +โœ“ DOCUMENTATION CHECKPOINT +- tasks.md updated? [YES/NO] +- Solution documented? [YES/NO] +- Cross-references created? [YES/NO] +- Stakeholders notified? [YES/NO] + +โ†’ If all YES: Task Complete +โ†’ If any NO: Complete documentation steps +``` + +## ๐Ÿ“‹ TASK STRUCTURE IN TASKS.MD + +For Level 1 tasks, use this minimal structure: + +```markdown +## Bug Fixes in Progress +- [ ] [Level 1] Fix: [Bug description] (Est: XX mins) + +## Completed Bug Fixes +- [X] [Level 1] Fixed: [Bug description] (Completed: YYYY-MM-DD) + - Issue: [Brief issue description] + - Solution: [Brief solution description] + - Files changed: [File paths] +``` + +## ๐Ÿ“‹ MEMORY BANK UPDATES + +For Level 1 tasks, make minimal Memory Bank updates: + +1. **tasks.md**: Update with fix details +2. **activeContext.md**: Brief mention of fix if relevant +3. **progress.md**: Add to list of completed fixes + +## ๐Ÿ“‹ WORKFLOW VERIFICATION CHECKLIST + +``` +โœ“ FINAL WORKFLOW VERIFICATION +- Issue identified and understood? [YES/NO] +- Fix implemented and verified? [YES/NO] +- tasks.md updated? [YES/NO] +- Solution documented? [YES/NO] +- Memory Bank minimally updated? [YES/NO] + +โ†’ If all YES: Level 1 Task Successfully Completed +โ†’ If any NO: Address outstanding items +``` + +## ๐Ÿ“‹ TASK ESCALATION + +If during the Level 1 process you discover the task is more complex: + +``` +โš ๏ธ TASK ESCALATION NEEDED +Current Level: Level 1 +Recommended Level: Level [2/3/4] +Reason: [Brief explanation] + +Would you like me to escalate this task to Level [2/3/4]? +``` + +Escalation indicators: +1. Fix requires changes to multiple components +2. Solution requires design decisions +3. Testing reveals broader issues +4. Fix impacts core functionality + +## ๐Ÿ”„ INTEGRATION WITH MEMORY BANK + +```mermaid +graph TD + Workflow["Level 1
Workflow"] --> TM["Update
tasks.md"] + Workflow --> AC["Minimal Update
activeContext.md"] + Workflow --> PM["Brief Update
progress.md"] + + TM & AC & PM --> MB["Memory Bank
Integration"] + MB --> NextTask["Transition to
Next Task"] +``` + +## ๐Ÿšจ EFFICIENCY PRINCIPLE + +Remember: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Level 1 workflow prioritizes SPEED and EFFICIENCY. โ”‚ +โ”‚ Minimize process overhead while ensuring adequate โ”‚ +โ”‚ documentation of the solution. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level2/archive-basic.mdc b/.cursor/rules/isolation_rules/Level2/archive-basic.mdc new file mode 100644 index 0000000..d02b212 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level2/archive-basic.mdc @@ -0,0 +1,181 @@ +--- +description: Basic archiving approach for Level 2 Simple Enhancement tasks +globs: "**/level2/**", "**/archive/**", "**/completion/**" +alwaysApply: false +--- + +# BASIC ARCHIVING FOR LEVEL 2 TASKS + +> **TL;DR:** This document outlines a basic archiving approach for Level 2 (Simple Enhancement) tasks, ensuring that completed work is properly documented and knowledge is preserved with minimal overhead. + +## ๐Ÿ” ARCHIVING OVERVIEW + +Even for Level 2 tasks, proper archiving ensures that completed work is documented and knowledge is preserved. This basic archiving approach provides sufficient structure while maintaining efficiency. + +## ๐Ÿ“‹ ARCHIVING PRINCIPLES + +1. **Completion**: Clearly document what was completed +2. **Context**: Preserve the context of the enhancement +3. **Knowledge**: Capture key insights and lessons +4. **Findability**: Make archived information easy to find +5. **References**: Create cross-references to related work + +## ๐Ÿ“‹ BASIC ARCHIVE STRUCTURE + +```markdown +# Enhancement Archive: [Feature Name] + +## Summary +[Brief summary of the enhancement] + +## Date Completed +YYYY-MM-DD + +## Key Files Modified +- [File path 1] +- [File path 2] +- [File path 3] + +## Requirements Addressed +- [Requirement 1] +- [Requirement 2] +- [Requirement 3] + +## Implementation Details +[Brief description of how the enhancement was implemented] + +## Testing Performed +- [Test 1] +- [Test 2] +- [Test 3] + +## Lessons Learned +- [Lesson 1] +- [Lesson 2] +- [Lesson 3] + +## Related Work +- [Link to related task/enhancement 1] +- [Link to related task/enhancement 2] + +## Notes +[Any additional information or context] +``` + +## ๐Ÿ“‹ ARCHIVE LOCATION + +Store archives in an organized structure: + +``` +docs/ +โ””โ”€โ”€ archive/ + โ””โ”€โ”€ enhancements/ + โ””โ”€โ”€ YYYY-MM/ + โ”œโ”€โ”€ feature-name-1.md + โ””โ”€โ”€ feature-name-2.md +``` + +## ๐Ÿ“‹ ARCHIVING PROCESS + +Follow these steps to archive a Level 2 task: + +1. **Prepare Archive Content**: + - Gather all relevant information + - Fill in the archive template + - Include all key implementation details + +2. **Cross-Reference Creation**: + - Update tasks.md with link to archive + - Add reference in progress.md + - Update activeContext.md with next focus + +3. **File Creation and Storage**: + - Create appropriate directory if needed + - Save archive file with descriptive name + - Ensure file follows naming convention + +4. **Final Verification**: + - Check archive for completeness + - Verify all cross-references + - Ensure all links are working + +## ๐Ÿ“‹ CROSS-REFERENCE FORMAT + +When creating cross-references: + +1. **In tasks.md**: + ```markdown + ## Completed Enhancements + - [X] [Feature Name] (YYYY-MM-DD) - [Archive Link](../docs/archive/enhancements/YYYY-MM/feature-name.md) + ``` + +2. **In progress.md**: + ```markdown + ## Completed Milestones + - [Feature Name] enhancement completed on YYYY-MM-DD. See [archive entry](../docs/archive/enhancements/YYYY-MM/feature-name.md). + ``` + +3. **In activeContext.md**: + ```markdown + ## Recently Completed + - [Feature Name] enhancement is now complete. Archive: [link](../docs/archive/enhancements/YYYY-MM/feature-name.md) + + ## Current Focus + - Moving to [Next Task Name] + ``` + +## ๐Ÿ“‹ ARCHIVING VERIFICATION CHECKLIST + +``` +โœ“ ARCHIVE VERIFICATION +- Archive content complete? [YES/NO] +- Archive properly stored? [YES/NO] +- Cross-references created? [YES/NO] +- tasks.md updated? [YES/NO] +- progress.md updated? [YES/NO] +- activeContext.md updated? [YES/NO] + +โ†’ If all YES: Archiving complete +โ†’ If any NO: Complete archiving process +``` + +## ๐Ÿ“‹ MINIMAL MODE ARCHIVING + +For minimal mode, use this format: + +``` +โœ“ ARCHIVE: [Feature Name] +โœ“ DATE: YYYY-MM-DD +โœ“ FILES: [Key files changed] +โœ“ SUMMARY: [One-sentence summary] +โœ“ LESSONS: [Key takeaway] +โœ“ REFS: [tasks.md, progress.md, activeContext.md] +``` + +## ๐Ÿ”„ INTEGRATION WITH MEMORY BANK + +Archiving integrates with Memory Bank: + +```mermaid +graph TD + Archive["Enhancement
Archive"] --> TasksUpdate["Update
tasks.md"] + Archive --> ProgressUpdate["Update
progress.md"] + Archive --> ContextUpdate["Update
activeContext.md"] + + TasksUpdate & ProgressUpdate & ContextUpdate --> CrossLinks["Create
Cross-Links"] + CrossLinks --> Verify["Verify
References"] +``` + +## ๐Ÿšจ KNOWLEDGE PRESERVATION PRINCIPLE + +Remember: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Archive files are a VALUABLE KNOWLEDGE RESOURCE. โ”‚ +โ”‚ Take care to preserve insights and lessons that โ”‚ +โ”‚ will benefit future work. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +This ensures that knowledge is preserved and can be referenced in the future. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level2/reflection-basic.mdc b/.cursor/rules/isolation_rules/Level2/reflection-basic.mdc new file mode 100644 index 0000000..04bf1a0 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level2/reflection-basic.mdc @@ -0,0 +1,178 @@ +--- +description: Basic reflection format for Level 2 Simple Enhancement tasks +globs: "**/level2/**", "**/reflection/**" +alwaysApply: false +--- + +# BASIC REFLECTION FOR LEVEL 2 TASKS + +> **TL;DR:** This document outlines a basic reflection approach for Level 2 (Simple Enhancement) tasks, ensuring that key insights and lessons are captured without unnecessary overhead. + +## ๐Ÿ” REFLECTION OVERVIEW + +Reflection is essential for improving future work, even for simpler Level 2 enhancements. This basic reflection approach focuses on key outcomes, challenges, and lessons learned while maintaining efficiency. + +## ๐Ÿ“‹ REFLECTION PRINCIPLES + +1. **Honesty**: Accurately represent successes and challenges +2. **Specificity**: Include concrete examples and observations +3. **Insight**: Go beyond surface observations to derive useful insights +4. **Improvement**: Focus on actionable takeaways for future work +5. **Efficiency**: Keep reflection concise and focused on key learnings + +## ๐Ÿ“‹ BASIC REFLECTION STRUCTURE + +```markdown +# Level 2 Enhancement Reflection: [Feature Name] + +## Enhancement Summary +[Brief one-paragraph summary of the enhancement] + +## What Went Well +- [Specific success point 1] +- [Specific success point 2] +- [Specific success point 3] + +## Challenges Encountered +- [Specific challenge 1] +- [Specific challenge 2] +- [Specific challenge 3] + +## Solutions Applied +- [Solution to challenge 1] +- [Solution to challenge 2] +- [Solution to challenge 3] + +## Key Technical Insights +- [Technical insight 1] +- [Technical insight 2] +- [Technical insight 3] + +## Process Insights +- [Process insight 1] +- [Process insight 2] +- [Process insight 3] + +## Action Items for Future Work +- [Specific action item 1] +- [Specific action item 2] +- [Specific action item 3] + +## Time Estimation Accuracy +- Estimated time: [X hours/days] +- Actual time: [Y hours/days] +- Variance: [Z%] +- Reason for variance: [Brief explanation] +``` + +## ๐Ÿ“‹ REFLECTION QUALITY + +High-quality reflections for Level 2 tasks should: + +1. **Provide specific examples** rather than vague statements +2. **Identify concrete takeaways** not general observations +3. **Connect challenges to solutions** with clear reasoning +4. **Analyze estimation accuracy** to improve future planning +5. **Generate actionable improvements** for future work + +## ๐Ÿ“‹ REFLECTION PROCESS + +Follow these steps for effective Level 2 task reflection: + +1. **Schedule Reflection**: + - Allocate dedicated time for reflection + - Complete reflection within 24 hours of task completion + +2. **Gather Information**: + - Review the original task requirements + - Examine implementation details + - Consider challenges encountered + - Review time tracking data + +3. **Complete Template**: + - Fill in all sections of the reflection template + - Include specific, concrete examples + - Be honest about challenges + +4. **Extract Insights**: + - Identify patterns in challenges + - Connect challenges to potential future improvements + - Consider process improvements + +5. **Document Action Items**: + - Create specific, actionable improvements + - Link these to future tasks where applicable + +6. **Store Reflection**: + - Save reflection with the task archive + - Add cross-references to relevant documents + +## ๐Ÿ“‹ EXAMPLES: VAGUE VS. SPECIFIC ENTRIES + +### โŒ Vague Entries (Insufficient) + +- "The implementation went well." +- "We had some challenges with the code." +- "The feature works as expected." + +### โœ… Specific Entries (Sufficient) + +- "The modular approach allowed for easy integration with the existing codebase, specifically the clean separation between the UI layer and data processing logic." +- "Challenge: The state management became complex when handling multiple user interactions. Solution: Implemented a more structured reducer pattern with clear actions and state transitions." +- "Action Item: Create a reusable component for file selection that handles all the edge cases we encountered in this implementation." + +## ๐Ÿ“‹ REFLECTION VERIFICATION CHECKLIST + +``` +โœ“ REFLECTION VERIFICATION +- All template sections completed? [YES/NO] +- Specific examples provided? [YES/NO] +- Challenges honestly addressed? [YES/NO] +- Concrete solutions documented? [YES/NO] +- Actionable insights generated? [YES/NO] +- Time estimation analyzed? [YES/NO] + +โ†’ If all YES: Reflection complete +โ†’ If any NO: Improve reflection quality +``` + +## ๐Ÿ“‹ MINIMAL MODE REFLECTION + +For minimal mode, use this format: + +``` +โœ“ REFLECTION: [Feature Name] +โœ“ WENT WELL: [Key success] +โœ“ CHALLENGE: [Key challenge] +โœ“ SOLUTION: [Key solution] +โœ“ INSIGHT: [Most important takeaway] +โœ“ ACTION: [Top priority action item] +โœ“ TIME: Est [X] vs. Actual [Y] ([Z%] variance) +``` + +## ๐Ÿ”„ INTEGRATION WITH MEMORY BANK + +Reflection integrates with Memory Bank: + +```mermaid +graph TD + Reflection["Enhancement
Reflection"] --> Archive["Add to
Archive"] + Reflection --> ProgressUpdate["Update
progress.md"] + Reflection --> ActionItems["Document
Action Items"] + + ActionItems --> Tasks["Add to
tasks.md"] + Archive & ProgressUpdate & Tasks --> CrossLinks["Create
Cross-Links"] +``` + +## ๐Ÿšจ CONTINUOUS IMPROVEMENT PRINCIPLE + +Remember: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Every reflection should produce at least ONE โ”‚ +โ”‚ actionable improvement for future work. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +This ensures that reflection directly contributes to ongoing improvement of both the product and the process. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level2/task-tracking-basic.mdc b/.cursor/rules/isolation_rules/Level2/task-tracking-basic.mdc new file mode 100644 index 0000000..e8f9c50 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level2/task-tracking-basic.mdc @@ -0,0 +1,188 @@ +--- +description: Basic task tracking for Level 2 Simple Enhancement tasks +globs: "**/level2/**", "**/tracking/**", "**/task/**" +alwaysApply: false +--- + +# BASIC TASK TRACKING FOR LEVEL 2 + +> **TL;DR:** This document outlines a streamlined task tracking approach for Level 2 (Simple Enhancement) tasks. It provides a balanced framework for managing task progress with minimal overhead. + +## ๐Ÿ” TASK TRACKING OVERVIEW + +Level 2 tasks require a more structured tracking approach than Level 1, but don't need the comprehensive tracking of higher-level tasks. This basic tracking system provides sufficient structure while maintaining efficiency. + +## ๐Ÿ“‹ TASK TRACKING PRINCIPLES + +1. **Clarity**: Tasks should be clearly defined +2. **Visibility**: Progress should be visible at a glance +3. **Structure**: Break work into logical subtasks +4. **Updates**: Keep progress regularly updated +5. **Completion**: Clearly mark when tasks are done + +## ๐Ÿ“‹ TASK STRUCTURE FOR LEVEL 2 + +```markdown +## [Feature Name] Enhancement + +**Status**: [Not Started/In Progress/Complete] +**Priority**: [High/Medium/Low] +**Estimated Effort**: [Small/Medium/Large] + +### Description +[Brief description of the enhancement] + +### Requirements +- [Requirement 1] +- [Requirement 2] +- [Requirement 3] + +### Subtasks +- [ ] [Subtask 1] +- [ ] [Subtask 2] +- [ ] [Subtask 3] + +### Dependencies +- [Dependency 1] +- [Dependency 2] + +### Notes +[Any additional information or context] +``` + +## ๐Ÿ“‹ TASKS.MD ORGANIZATION + +Organize tasks.md with these sections for Level 2 tasks: + +```markdown +# Tasks + +## Active Enhancements +- [Enhancement 1] - [Status] +- [Enhancement 2] - [Status] + +## Enhancement Details +### [Enhancement 1] +[Task structure as above] + +### [Enhancement 2] +[Task structure as above] + +## Completed Enhancements +- [X] [Completed Enhancement 1] (YYYY-MM-DD) +- [X] [Completed Enhancement 2] (YYYY-MM-DD) +``` + +## ๐Ÿ“‹ UPDATING TASK STATUS + +Update tasks using this process: + +1. **Starting a Task**: + - Update Status to "In Progress" + - Add start date to Notes + +2. **Progress Updates**: + - Check off subtasks as completed + - Add brief notes about progress + - Update any changed requirements + +3. **Completing a Task**: + - Update Status to "Complete" + - Check off all subtasks + - Move to Completed Enhancements + - Add completion date + +## ๐Ÿ“‹ SUBTASK MANAGEMENT + +For Level 2 tasks, subtasks should: + +1. Be actionable and specific +2. Represent approximately 30-60 minutes of work +3. Follow a logical sequence +4. Be updated as soon as completed +5. Include verification steps + +Example of well-structured subtasks: +```markdown +### Subtasks +- [ ] Review existing implementation of related features +- [ ] Create draft UI design for new button +- [ ] Add HTML structure for new component +- [ ] Implement button functionality in JavaScript +- [ ] Add appropriate styling in CSS +- [ ] Add event handling +- [ ] Test on desktop browsers +- [ ] Test on mobile browsers +- [ ] Update user documentation +``` + +## ๐Ÿ“‹ PROGRESS VISUALIZATION + +Use progress indicators to show status: + +```markdown +### Progress +[###-------] 30% Complete +``` + +For subtasks: +```markdown +### Subtasks (3/10 Complete) +- [X] Subtask 1 +- [X] Subtask 2 +- [X] Subtask 3 +- [ ] Subtask 4 +- [ ] Subtask 5 +``` + +## ๐Ÿ“‹ TRACKING VERIFICATION CHECKLIST + +``` +โœ“ TASK TRACKING VERIFICATION +- Task clearly defined? [YES/NO] +- Requirements listed? [YES/NO] +- Subtasks created? [YES/NO] +- Dependencies identified? [YES/NO] +- Status up-to-date? [YES/NO] + +โ†’ If all YES: Task tracking is adequate +โ†’ If any NO: Update task tracking +``` + +## ๐Ÿ“‹ MINIMAL MODE TRACKING + +For minimal mode, use this format: + +``` +โœ“ TASK: [Enhancement name] +โœ“ STATUS: [In Progress/Complete] +โœ“ SUBTASKS: [X/Y Complete] +โœ“ NEXT: [Next action] +``` + +## ๐Ÿ”„ INTEGRATION WITH MEMORY BANK + +Task tracking integrates with Memory Bank: + +```mermaid +graph TD + TasksFile["tasks.md"] --> Active["activeContext.md"] + TasksFile --> Progress["progress.md"] + + Active -->|"Current focus"| TasksFile + Progress -->|"Completion status"| TasksFile +``` + +## ๐Ÿšจ TASKS.MD PRIMACY PRINCIPLE + +Remember: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ tasks.md is the SINGLE SOURCE OF TRUTH for ALL โ”‚ +โ”‚ task tracking. ALL task updates MUST be reflected โ”‚ +โ”‚ in tasks.md IMMEDIATELY. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +This ensures everyone has visibility into current task status at all times. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level2/workflow-level2.mdc b/.cursor/rules/isolation_rules/Level2/workflow-level2.mdc new file mode 100644 index 0000000..af0984e --- /dev/null +++ b/.cursor/rules/isolation_rules/Level2/workflow-level2.mdc @@ -0,0 +1,289 @@ +--- +description: Basic workflow for Level 2 Simple Enhancement tasks +globs: "**/level2/**", "**/workflow/**" +alwaysApply: false +--- +# WORKFLOW FOR LEVEL 2 TASKS + +> **TL;DR:** This document outlines a structured yet efficient workflow for Level 2 (Simple Enhancement) tasks, including 6 key phases with milestone checkpoints and quality verification. + +## ๐Ÿ” LEVEL 2 WORKFLOW OVERVIEW + +```mermaid +graph LR + Init["1. INITIALIZATION"] --> Doc["2. DOCUMENTATION
SETUP"] + Doc --> Plan["3. TASK
PLANNING"] + Plan --> Impl["4. IMPLEMENTATION"] + Impl --> Reflect["5. REFLECTION"] + Reflect --> Archive["6. ARCHIVING"] + + %% Document connections for each phase + Init -.-> InitDocs["INITIALIZATION"] + Doc -.-> DocDocs["DOCUMENTATION"] + Plan -.-> PlanDocs["PLANNING"] + Impl -.-> ImplDocs["IMPLEMENTATION"] + Reflect -.-> ReflectDocs["REFLECTION"] + Archive -.-> ArchiveDocs["ARCHIVING"] +``` + +Level 2 tasks involve simple enhancements that require a structured approach with moderate planning and documentation. This workflow provides the right balance of process and efficiency. + +## ๐Ÿ“‹ WORKFLOW PHASES + +### Phase 1: INITIALIZATION + +```mermaid +graph TD + Start["Start Level 2 Task"] --> Platform{"Detect
Platform"} + Platform --> FileCheck["Critical File
Verification"] + FileCheck --> LoadStructure["Load Memory
Bank Structure"] + LoadStructure --> TaskCreation["Create Task
in tasks.md"] + TaskCreation --> SetupComplete["Initialization
Complete"] +``` + +**Steps:** +1. Platform detection +2. Critical file verification +3. Memory Bank structure loading +4. Task creation in tasks.md +5. Initial task scope definition + +**Milestone Checkpoint:** +``` +โœ“ INITIALIZATION CHECKPOINT +- Platform detected and configured? [YES/NO] +- Critical files verified? [YES/NO] +- Memory Bank loaded? [YES/NO] +- Task created in tasks.md? [YES/NO] +- Initial scope defined? [YES/NO] + +โ†’ If all YES: Proceed to Documentation Setup +โ†’ If any NO: Complete initialization steps +``` + +### Phase 2: DOCUMENTATION SETUP + +```mermaid +graph TD + Start["Begin Documentation
Setup"] --> LoadTemplate["Load Basic
Documentation Templates"] + LoadTemplate --> UpdateProject["Update
projectbrief.md"] + UpdateProject --> UpdateContext["Update
activeContext.md"] + UpdateContext --> SetupComplete["Documentation
Setup Complete"] +``` + +**Steps:** +1. Load basic documentation templates +2. Update projectbrief.md with enhancement details +3. Update activeContext.md with current focus +4. Create minimal documentation structure + +**Milestone Checkpoint:** +``` +โœ“ DOCUMENTATION CHECKPOINT +- Documentation templates loaded? [YES/NO] +- projectbrief.md updated? [YES/NO] +- activeContext.md updated? [YES/NO] +- Documentation structure created? [YES/NO] + +โ†’ If all YES: Proceed to Task Planning +โ†’ If any NO: Complete documentation setup +``` + +### Phase 3: TASK PLANNING + +```mermaid +graph TD + Start["Begin Task
Planning"] --> Requirements["Define Clear
Requirements"] + Requirements --> SubTasks["Break Down
Into Subtasks"] + SubTasks --> TasksUpdate["Update tasks.md
With Subtasks"] + TasksUpdate --> TimeEstimate["Create Time
Estimates"] + TimeEstimate --> PlanComplete["Planning
Complete"] +``` + +**Steps:** +1. Define clear requirements +2. Break down into subtasks +3. Update tasks.md with subtasks +4. Create time estimates +5. Document dependencies and constraints + +**Milestone Checkpoint:** +``` +โœ“ PLANNING CHECKPOINT +- Requirements clearly defined? [YES/NO] +- Task broken down into subtasks? [YES/NO] +- tasks.md updated with subtasks? [YES/NO] +- Time estimates created? [YES/NO] +- Dependencies documented? [YES/NO] + +โ†’ If all YES: Proceed to Implementation +โ†’ If any NO: Complete planning steps +``` + +### Phase 4: IMPLEMENTATION + +```mermaid +graph TD + Start["Begin
Implementation"] --> SubTask1["Complete
Subtask 1"] + SubTask1 --> UpdateStatus1["Update Status
in tasks.md"] + UpdateStatus1 --> SubTask2["Complete
Subtask 2"] + SubTask2 --> UpdateStatus2["Update Status
in tasks.md"] + UpdateStatus2 --> FinalSubTask["Complete
Final Subtask"] + FinalSubTask --> Verification["Perform
Verification"] + Verification --> ImplComplete["Implementation
Complete"] +``` + +**Steps:** +1. Implement first subtask +2. Update status in tasks.md +3. Implement remaining subtasks +4. Regular status updates after each subtask +5. Verify complete implementation + +**Milestone Checkpoint:** +``` +โœ“ IMPLEMENTATION CHECKPOINT +- All subtasks completed? [YES/NO] +- Status updates maintained? [YES/NO] +- Enhancement fully implemented? [YES/NO] +- Basic verification performed? [YES/NO] +- tasks.md fully updated? [YES/NO] + +โ†’ If all YES: Proceed to Reflection +โ†’ If any NO: Complete implementation steps +``` + +### Phase 5: REFLECTION + +```mermaid +graph TD + Start["Begin
Reflection"] --> Template["Load Reflection
Template"] + Template --> Review["Review Completed
Enhancement"] + Review --> Document["Document Successes
and Challenges"] + Document --> Insights["Extract Key
Insights"] + Insights --> Actions["Define Action
Items"] + Actions --> ReflectComplete["Reflection
Complete"] +``` + +**Steps:** +1. Load reflection template +2. Review completed enhancement +3. Document successes and challenges +4. Extract key insights +5. Define action items for future work + +**Milestone Checkpoint:** +``` +โœ“ REFLECTION CHECKPOINT +- Reflection template loaded? [YES/NO] +- Enhancement reviewed? [YES/NO] +- Successes and challenges documented? [YES/NO] +- Key insights extracted? [YES/NO] +- Action items defined? [YES/NO] + +โ†’ If all YES: Proceed to Archiving +โ†’ If any NO: Complete reflection steps +``` + +### Phase 6: ARCHIVING + +```mermaid +graph TD + Start["Begin
Archiving"] --> Template["Load Archive
Template"] + Template --> Gather["Gather Implementation
Details"] + Gather --> Create["Create Archive
Document"] + Create --> CrossRef["Create Cross-
References"] + CrossRef --> Update["Update Memory
Bank Files"] + Update --> ArchiveComplete["Archiving
Complete"] +``` + +**Steps:** +1. Load archive template +2. Gather implementation details +3. Create archive document +4. Create cross-references +5. Update Memory Bank files + +**Milestone Checkpoint:** +``` +โœ“ ARCHIVING CHECKPOINT +- Archive template loaded? [YES/NO] +- Implementation details gathered? [YES/NO] +- Archive document created? [YES/NO] +- Cross-references created? [YES/NO] +- Memory Bank files updated? [YES/NO] + +โ†’ If all YES: Task Complete +โ†’ If any NO: Complete archiving steps +``` + +## ๐Ÿ“‹ WORKFLOW VERIFICATION CHECKLIST + +``` +โœ“ FINAL WORKFLOW VERIFICATION +- All phases completed? [YES/NO] +- All milestone checkpoints passed? [YES/NO] +- tasks.md fully updated? [YES/NO] +- Reflection document created? [YES/NO] +- Archive document created? [YES/NO] +- Memory Bank fully updated? [YES/NO] + +โ†’ If all YES: Level 2 Task Successfully Completed +โ†’ If any NO: Address outstanding items +``` + +## ๐Ÿ“‹ MINIMAL MODE WORKFLOW + +For minimal mode, use this streamlined workflow: + +``` +1. INIT: Verify environment, create task entry +2. DOCS: Update projectbrief and activeContext +3. PLAN: Define requirements, subtasks, estimates +4. IMPL: Complete subtasks, update status +5. REFLECT: Document key insights and actions +6. ARCHIVE: Document completion and cross-reference +``` + +## ๐Ÿ”„ LEVEL TRANSITION HANDLING + +```mermaid +graph TD + L2["Level 2 Task"] --> Assess["Continuous
Assessment"] + + Assess --> Down["Downgrade to
Level 1"] + Assess --> Up["Upgrade to
Level 3/4"] + + Down --> L1Trigger["Triggers:
- Simpler than expected
- Quick fix possible
- Single component"] + + Up --> L34Trigger["Triggers:
- More complex
- Multiple components
- Design needed"] + + L1Trigger --> L1Switch["Switch to
Level 1 Workflow"] + L34Trigger --> L34Switch["Switch to
Level 3/4 Workflow"] +``` + +## ๐Ÿ”„ INTEGRATION WITH MEMORY BANK + +```mermaid +graph TD + Workflow["Level 2
Workflow"] --> PB["Update
projectbrief.md"] + Workflow --> AC["Update
activeContext.md"] + Workflow --> TM["Maintain
tasks.md"] + Workflow --> PM["Update
progress.md"] + + PB & AC & TM & PM --> MB["Memory Bank
Integration"] + MB --> NextTask["Transition to
Next Task"] +``` + +## ๐Ÿšจ EFFICIENCY PRINCIPLE + +Remember: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Level 2 workflow balances PROCESS with EFFICIENCY. โ”‚ +โ”‚ Follow the structure but avoid unnecessary overhead. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +This ensures that simple enhancements are implemented with the right level of documentation and process. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level3/archive-intermediate.mdc b/.cursor/rules/isolation_rules/Level3/archive-intermediate.mdc new file mode 100644 index 0000000..84ec880 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level3/archive-intermediate.mdc @@ -0,0 +1,78 @@ +--- +description: +globs: archive-intermediate.mdc +alwaysApply: false +--- + +# LEVEL 3 ARCHIVE: INTERMEDIATE FEATURE DOCUMENTATION + +> **TL;DR:** This guide outlines the archiving process for a completed Level 3 intermediate feature. The aim is to create a self-contained, easily accessible record of the feature's development lifecycle, including its planning, design decisions, implementation summary, and reflection. + +## ๐Ÿš€ Before You Start Archiving (L3 Pre-Archive Checklist) + +1. **Confirm Reflection Complete:** Verify in `memory-bank/tasks.md` that the reflection phase for this feature is marked as complete and `memory-bank/reflection-[feature_id].md` exists and is finalized. +2. **Gather All Feature-Specific Documents:** + * The feature plan section from `memory-bank/tasks.md` (or a copy of it). + * All `memory-bank/creative/creative-[aspect_name].md` documents related to this feature. + * The `memory-bank/reflection/reflection-[feature_id].md` document. + * Key diagrams or architectural notes from `memory-bank/progress.md` if not captured elsewhere. + * A link to the primary commit(s) or feature branch merge for the implemented code. + +## ๐Ÿ“ฆ Level 3 Archiving Workflow + +```mermaid +graph TD + StartArchive["Start L3 Archiving"] --> + VerifyReflect["1. Verify Reflection Complete
Check `tasks.md` & `reflection-[feature_id].md`"] --> + GatherDocs["2. Gather All Feature Documents
(Plan, Creative outputs, Reflection, Code links)"] --> + CreateArchiveFile["3. Create Feature Archive File
e.g., `memory-bank/archive/feature-[FeatureNameOrID]_YYYYMMDD.md`"] --> + PopulateArchive["4. Populate Archive File
(Using L3 Archive Template below)"] --> + VerifyLinks["5. Verify All Internal Links
in Archive File are Correct"] --> + FinalUpdateTasks["6. Final Update to `tasks.md`
(Mark Feature FULLY COMPLETED & ARCHIVED, link to archive file)"] --> + UpdateProgressFile["7. Add Final Entry to `progress.md`
(Note archiving & link to archive file)"] --> + ClearActiveCtx["8. Clear `activeContext.md`
Reset for Next Task/Project"] --> + ArchiveDone["L3 Archiving Complete
Feature successfully documented and closed."] + + style StartArchive fill:#90a4ae,stroke:#607d8b + style ArchiveDone fill:#b0bec5,stroke:#90a4ae +```` + +## ๐Ÿ“ Structure for `memory-bank/archive/feature-[FeatureNameOrID]_YYYYMMDD.md` + + * **Feature Title:** (e.g., "Archive: User Profile Feature - Avatar Upload Enhancement") + * **Feature ID (from `tasks.md`):** + * **Date Archived:** YYYY-MM-DD + * **Status:** COMPLETED & ARCHIVED + * **1. Feature Overview:** + * Brief description of the feature and its purpose (can be extracted from `tasks.md` or `projectbrief.md`). + * Link to the original task entry/plan in `tasks.md` (if `tasks.md` is versioned or kept historically). + * **2. Key Requirements Met:** + * List the main functional and non-functional requirements this feature addressed. + * **3. Design Decisions & Creative Outputs:** + * Summary of key design choices. + * Direct links to all relevant `memory-bank/creative/creative-[aspect_name].md` documents. + * Link to `memory-bank/style-guide.md` version used (if applicable). + * **4. Implementation Summary:** + * High-level overview of how the feature was implemented. + * List of primary new components/modules created. + * Key technologies or libraries utilized specifically for this feature. + * Link to the main feature branch merge commit or primary code location/pull request. + * **5. Testing Overview:** + * Brief summary of the testing strategy employed for this feature (unit, integration, E2E). + * Outcome of the testing. + * **6. Reflection & Lessons Learned:** + * Direct link to `memory-bank/reflection/reflection-[feature_id].md`. + * Optionally, copy 1-2 most critical lessons directly into the archive summary. + * **7. Known Issues or Future Considerations (Optional, if any remaining from reflection):** + * Any minor known issues deferred. + * Potential future enhancements related to this feature. + +### Key Files and Components Affected (from tasks.md) +[Summary or direct copy of file/component checklists from the original tasks.md for this project. This provides a quick reference to the scope of changes at a component/file level.] + +## ๐Ÿ“Œ What to Emphasize in L3 Archiving + + * **Self-Contained Feature Record:** The goal is to have a go-to document in the archive that summarizes the "story" of this feature. + * **Traceability:** Easy navigation from the archive summary to detailed planning, design, and reflection documents. + * **Maintainability Focus:** Information that would help a future developer understand, maintain, or build upon this specific feature. + * **Not a Full System Archive:** Unlike Level 4, this is not about archiving the entire application state, but rather the lifecycle of one significant feature. diff --git a/.cursor/rules/isolation_rules/Level3/implementation-intermediate.mdc b/.cursor/rules/isolation_rules/Level3/implementation-intermediate.mdc new file mode 100644 index 0000000..346f008 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level3/implementation-intermediate.mdc @@ -0,0 +1,72 @@ +--- +description: +globs: implementation-intermediate.mdc +alwaysApply: false +--- +# LEVEL 3 IMPLEMENTATION: BUILDING INTERMEDIATE FEATURES + +> **TL;DR:** This guide focuses on the systematic implementation of a planned and designed Level 3 feature. It emphasizes modular development, strict adherence to creative decisions and the style guide, integration with existing systems, and thorough feature-specific testing. + +## ๐Ÿ› ๏ธ Level 3 Feature Implementation Workflow + +This workflow outlines the typical steps for building an intermediate feature. + +```mermaid +graph TD + StartImpl["Start L3 Implementation"] --> + ReviewDocs["1. Review All Relevant Docs
(Tasks, Creative Docs, Style Guide)"] --> + SetupEnv["2. Setup/Verify Dev Environment
(Branch, Tools, Dependencies)"] --> + ModuleBreakdown["3. Break Down Feature into Modules/Major Components
(Based on plan in `tasks.md`)"] --> + BuildIterate["4. Implement Modules/Components Iteratively"] + + BuildIterate --> ImplementModule["4a. Select Next Module/Component"] + ImplementModule --> CodeModule["4b. Code Module
(Adhere to design, style guide, coding standards)"] + CodeModule --> UnitTests["4c. Write & Pass Unit Tests"] + UnitTests --> SelfReview["4d. Self-Review/Code Linting"] + SelfReview --> MoreModules{"4e. More Modules
for this Feature?"} + MoreModules -- Yes --> ImplementModule + + MoreModules -- No --> IntegrateModules["5. Integrate All Feature Modules/Components"] + IntegrateModules --> IntegrationTesting["6. Perform Integration Testing
(Feature modules + existing system parts)"] + IntegrationTesting --> E2EFeatureTesting["7. End-to-End Feature Testing
(Validate against user stories & requirements)"] + E2EFeatureTesting --> AccessibilityCheck["8. Accessibility & Responsiveness Check
(If UI is involved)"] + AccessibilityCheck --> CodeCleanup["9. Code Cleanup & Refinement"] + CodeCleanup --> UpdateMB["10. Update Memory Bank
(`tasks.md` sub-tasks, `progress.md` details)"] + UpdateMB --> FinalFeatureReview["11. Final Feature Review (Conceptual Peer Review if possible)"] + FinalFeatureReview --> ImplementationDone["L3 Implementation Complete
Ready for REFLECT Mode"] + + style StartImpl fill:#e57373,stroke:#f44336 + style BuildIterate fill:#ffcdd2,stroke:#ef9a9a + style ImplementationDone fill:#ef9a9a,stroke:#e57373 +```` + +## ๐Ÿ”‘ Key Considerations for Level 3 Implementation + + * **Modularity & Encapsulation:** Design and build the feature in well-defined, reusable, and loosely coupled modules or components. + * **Adherence to Design:** Strictly follow the decisions documented in `memory-bank/creative-*.md` files and the `memory-bank/style-guide.md`. Deviations must be justified and documented. + * **State Management:** If the feature introduces or significantly interacts with complex application state, ensure the state management strategy (potentially defined in CREATIVE mode) is correctly implemented and tested. + * **API Interactions:** + * If consuming new or existing APIs, ensure requests and responses are handled correctly, including error states. + * If exposing new API endpoints as part of the feature, ensure they are robust, secure, and documented. + * **Error Handling:** Implement user-friendly error messages and robust error handling within the feature's scope. + * **Performance:** Be mindful of performance implications. Avoid common pitfalls like N+1 database queries, inefficient algorithms, or large asset loading without optimization, especially if identified as a concern in the PLAN or CREATIVE phase. + * **Security:** Implement with security best practices in mind, particularly for features handling user input, authentication, or sensitive data. Refer to any security design decisions from CREATIVE mode. + +## ๐Ÿงช Testing Focus for Level 3 Features + + * **Unit Tests:** Each new function, method, or logical unit within the feature's components should have corresponding unit tests. Aim for good coverage of core logic and edge cases. + * **Component Tests (for UI features):** Test UI components in isolation, verifying rendering, props handling, and event emissions. + * **Integration Tests:** Crucial for L3. Test how the different modules/components of the new feature work together. Also, test how the completed feature integrates with existing parts of the application it interacts with. + * **User Scenario / Acceptance Tests (Feature-Specific):** Validate that the feature fulfills its defined requirements and user stories from the user's perspective. This can be manual or automated. + +## ๐Ÿ“ Documentation During Implementation + + * **`memory-bank/tasks.md`:** Update the status of sub-tasks related to the feature as they are completed. Note any blockers or changes in estimates. + * **`memory-bank/progress.md`:** Make regular entries detailing: + * Modules/components completed. + * Key decisions made during implementation (if minor and not warranting a full CREATIVE cycle). + * Files significantly modified + * Test results for major integration points. + * Any deviations from the plan or creative designs, with rationale. + * **Code Comments:** Write clear, concise comments explaining complex logic, assumptions, or TODOs. + * **READMEs (if applicable):** If the feature introduces new modules or libraries that require specific setup or usage notes, consider adding or updating relevant README files. diff --git a/.cursor/rules/isolation_rules/Level3/planning-comprehensive.mdc b/.cursor/rules/isolation_rules/Level3/planning-comprehensive.mdc new file mode 100644 index 0000000..a3ed834 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level3/planning-comprehensive.mdc @@ -0,0 +1,188 @@ +--- +description: planning comprehensive +globs: planning-comprehensive.mdc +alwaysApply: false +--- +# LEVEL 3 COMPREHENSIVE PLANNING + +> **TL;DR:** This document provides structured planning guidelines for Level 3 (Intermediate Feature) tasks, focusing on comprehensive planning with creative phases and clear implementation strategies. + +## ๐Ÿ—๏ธ PLANNING WORKFLOW + +```mermaid +graph TD + Start["Planning Start"] --> Req["๐Ÿ“‹ Requirements
Analysis"] + Req --> Comp["๐Ÿ” Component
Analysis"] + Comp --> Design["๐ŸŽจ Design
Decisions"] + Design --> Impl["โš™๏ธ Implementation
Strategy"] + Impl --> Test["๐Ÿงช Testing
Strategy"] + Test --> Doc["๐Ÿ“š Documentation
Plan"] + + Design --> Creative["Creative Phases:"] + Creative --> UI["UI/UX Design"] + Creative --> Arch["Architecture"] + Creative --> Algo["Algorithm"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style Req fill:#ffa64d,stroke:#cc7a30,color:white + style Comp fill:#4dbb5f,stroke:#36873f,color:white + style Design fill:#d94dbb,stroke:#a3378a,color:white + style Impl fill:#4dbbbb,stroke:#368787,color:white + style Test fill:#d971ff,stroke:#a33bc2,color:white + style Doc fill:#ff71c2,stroke:#c23b8a,color:white +``` + +## ๐Ÿ”„ LEVEL TRANSITION HANDLING + +```mermaid +graph TD + L3["Level 3 Task"] --> Assess["Continuous
Assessment"] + + Assess --> Down["Downgrade to
Level 1/2"] + Assess --> Up["Upgrade to
Level 4"] + + Down --> L12Trigger["Triggers:
- Simpler than expected
- Limited scope
- Few components"] + + Up --> L4Trigger["Triggers:
- System-wide impact
- Architectural changes
- High complexity"] + + L12Trigger --> L12Switch["Switch to
Level 1/2 Workflow"] + L4Trigger --> L4Switch["Switch to
Level 4 Workflow"] +``` + +## ๐Ÿ“‹ PLANNING TEMPLATE + +```markdown +# Feature Planning Document + +## Requirements Analysis +- Core Requirements: + - [ ] Requirement 1 + - [ ] Requirement 2 +- Technical Constraints: + - [ ] Constraint 1 + - [ ] Constraint 2 + +## Component Analysis +- Affected Components: + - Component 1 + - Changes needed: + - Dependencies: + - Component 2 + - Changes needed: + - Dependencies: + +## Design Decisions +- Architecture: + - [ ] Decision 1 + - [ ] Decision 2 +- UI/UX: + - [ ] Design 1 + - [ ] Design 2 +- Algorithms: + - [ ] Algorithm 1 + - [ ] Algorithm 2 + +## Implementation Strategy +1. Phase 1: + - [ ] Task 1 + - [ ] Task 2 +2. Phase 2: + - [ ] Task 3 + - [ ] Task 4 + +## Testing Strategy +- Unit Tests: + - [ ] Test 1 + - [ ] Test 2 +- Integration Tests: + - [ ] Test 3 + - [ ] Test 4 + +## Documentation Plan +- [ ] API Documentation +- [ ] User Guide Updates +- [ ] Architecture Documentation +``` + +## ๐ŸŽจ CREATIVE PHASE IDENTIFICATION + +```mermaid +graph TD + subgraph "CREATIVE PHASES REQUIRED" + UI["๐ŸŽจ UI/UX Design
Required: Yes/No"] + Arch["๐Ÿ—๏ธ Architecture Design
Required: Yes/No"] + Algo["โš™๏ธ Algorithm Design
Required: Yes/No"] + end + + UI --> UITrig["Triggers:
- New UI Component
- UX Flow Change"] + Arch --> ArchTrig["Triggers:
- System Structure Change
- New Integration"] + Algo --> AlgoTrig["Triggers:
- Performance Critical
- Complex Logic"] + + style UI fill:#4dbb5f,stroke:#36873f,color:white + style Arch fill:#ffa64d,stroke:#cc7a30,color:white + style Algo fill:#d94dbb,stroke:#a3378a,color:white +``` + +## โœ… VERIFICATION CHECKLIST + +```mermaid +graph TD + subgraph "PLANNING VERIFICATION" + R["Requirements
Complete"] + C["Components
Identified"] + D["Design Decisions
Made"] + I["Implementation
Plan Ready"] + T["Testing Strategy
Defined"] + Doc["Documentation
Plan Ready"] + end + + R --> C --> D --> I --> T --> Doc + + style R fill:#4dbb5f,stroke:#36873f,color:white + style C fill:#ffa64d,stroke:#cc7a30,color:white + style D fill:#d94dbb,stroke:#a3378a,color:white + style I fill:#4dbbbb,stroke:#368787,color:white + style T fill:#d971ff,stroke:#a33bc2,color:white + style Doc fill:#ff71c2,stroke:#c23b8a,color:white +``` + +## ๐Ÿ”„ IMPLEMENTATION PHASES + +```mermaid +graph LR + Setup["๐Ÿ› ๏ธ Setup"] --> Core["โš™๏ธ Core
Implementation"] + Core --> UI["๐ŸŽจ UI
Implementation"] + UI --> Test["๐Ÿงช Testing"] + Test --> Doc["๐Ÿ“š Documentation"] + + style Setup fill:#4da6ff,stroke:#0066cc,color:white + style Core fill:#4dbb5f,stroke:#36873f,color:white + style UI fill:#ffa64d,stroke:#cc7a30,color:white + style Test fill:#d94dbb,stroke:#a3378a,color:white + style Doc fill:#4dbbbb,stroke:#368787,color:white +``` + +## ๐Ÿ”„ INTEGRATION WITH MEMORY BANK + +```mermaid +graph TD + L3["Level 3
Task"] --> PB["Comprehensive
projectbrief.md"] + L3 --> AC["Detailed
activeContext.md"] + L3 --> TM["Structured
tasks.md"] + L3 --> PM["Detailed
progress.md"] + + PB & AC & TM & PM --> MB["Memory Bank
Integration"] + MB --> NextPhase["Proceed to
Implementation"] +``` + +## ๐Ÿšจ PLANNING EFFICIENCY PRINCIPLE + +Remember: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Level 3 planning requires COMPREHENSIVE DESIGN but โ”‚ +โ”‚ should avoid OVER-ENGINEERING. Focus on delivering โ”‚ +โ”‚ maintainable, well-documented features. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level3/reflection-intermediate.mdc b/.cursor/rules/isolation_rules/Level3/reflection-intermediate.mdc new file mode 100644 index 0000000..e37e302 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level3/reflection-intermediate.mdc @@ -0,0 +1,74 @@ +--- +description: +globs: reflection-intermediate.mdc +alwaysApply: false +--- +# LEVEL 3 REFLECTION: INTERMEDIATE FEATURE REVIEW + +> **TL;DR:** This guide structures the reflection process for a completed Level 3 intermediate feature. The focus is on a detailed review of the entire feature development lifecycle, from planning and design through implementation and testing, to extract meaningful lessons and identify improvements for future feature work. + +## ๐Ÿ” Level 3 Reflection Process + +The goal is to create a comprehensive `memory-bank/reflection/reflection-[feature_id].md` document. + +```mermaid +graph TD + StartReflect["Start L3 Reflection"] --> + ReviewDocs["1. Review All Gathered Documentation"] --> + AssessOutcome["2. Assess Overall Feature Outcome
Did it meet all requirements from tasks.md? Was it successful?"] --> + AnalyzePlan["3. Analyze Planning Phase Effectiveness
Was planning-comprehensive.mdc guidance effective? Was the plan accurate? Scope creep?"] --> + AnalyzeCreative["4. Analyze Creative Phase(s) Effectiveness
Were design decisions sound? Did they translate well to implementation? Issues?"] --> + AnalyzeImpl["5. Analyze Implementation Phase
What went well? Challenges? Bottlenecks? Adherence to design/style guide?"] --> + AnalyzeTesting["6. Analyze Testing Phase
Were tests adequate? Bugs found post-release (if applicable)? Test coverage feel right?"] --> + IdentifyLessons["7. Identify Key Lessons Learned
(Technical, Process, Teamwork, Estimation)"] --> + ProposeImprovements["8. Propose Actionable Improvements
For future L3 feature development"] --> + DraftReflectionDoc["9. Draft `reflection-[feature_id].md`
Using structured template"] --> + FinalizeReflection["10. Finalize & Save Reflection Document"] --> + UpdateTasksStatus["11. Update `tasks.md`
Mark L3 Reflection Complete"] --> + ReflectionDone["L3 Reflection Complete
Ready for ARCHIVE Mode"] + + style StartReflect fill:#ba68c8,stroke:#9c27b0 + style ReflectionDone fill:#d1c4e9,stroke:#b39ddb +```` + +## ๐Ÿ“ Structure for `memory-bank/reflection-[feature_id].md` + + * **Feature Name & ID:** + * **Date of Reflection:** + * **Brief Feature Summary:** (What was built?) + * **1. Overall Outcome & Requirements Alignment:** + * How well did the final feature meet the initial requirements? + * Were there any deviations from the original scope? If so, why? + * What is the overall assessment of the feature's success? + * **2. Planning Phase Review:** + * How effective was the guidance from `Level3/planning-comprehensive.mdc`? + * Was the initial plan in `tasks.md` (component breakdown, strategy, risks) accurate and helpful? + * What could have been planned better? Were estimations (if made) accurate? + * **3. Creative Phase(s) Review (if applicable):** + * Were the right aspects flagged for CREATIVE mode? + * How effective were the design decisions made in `creative-*.md` documents? + * Did these designs translate well into practical implementation? Any friction points? + * Was `memory-bank/style-guide.md` clear and sufficient for UI aspects? + * **4. Implementation Phase Review:** + * What were the major successes during implementation? (e.g., efficient module development, good use of libraries) + * What were the biggest challenges or roadblocks? How were they overcome? + * Were there any unexpected technical difficulties or complexities? + * How was adherence to the style guide and coding standards? + * **5. Testing Phase Review:** + * Was the testing strategy (unit, integration, E2E for the feature) effective? + * Did testing uncover significant issues early enough? + * What could improve the testing process for similar features? + * **6. What Went Well? (Highlight 3-5 key positives across all phases for this feature)** + * **7. What Could Have Been Done Differently? (Identify 3-5 areas for improvement)** + * **8. Key Lessons Learned:** + * **Technical:** New insights about technologies, patterns, or architecture used for this feature. + * **Process:** Insights about the L3 workflow, communication, task management. + * **Estimation (if applicable):** Lessons about estimating work for features of this scale. + * **9. Actionable Improvements for Future L3 Features:** (Specific suggestions) + +## ๐ŸŽฏ Focus Areas for L3 Reflection + + * **Feature Scope Management:** Was the scope well-defined and managed? + * **Integration Complexity:** Challenges or successes in integrating the feature with the existing application. + * **Design-to-Implementation Fidelity:** How closely did the final product match the designs? + * **Cross-Component Impact:** Understanding the ripple effects of the feature. diff --git a/.cursor/rules/isolation_rules/Level3/task-tracking-intermediate.mdc b/.cursor/rules/isolation_rules/Level3/task-tracking-intermediate.mdc new file mode 100644 index 0000000..f02c9a7 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level3/task-tracking-intermediate.mdc @@ -0,0 +1,135 @@ +--- +description: task tracking intermediate +globs: task-tracking-intermediate.mdc +alwaysApply: false +--- +# LEVEL 3 INTERMEDIATE TASK TRACKING + +> **TL;DR:** This document provides structured task tracking guidelines for Level 3 (Intermediate Feature) tasks, using visual tracking elements and clear checkpoints. + +## ๐Ÿ” TASK TRACKING WORKFLOW + +```mermaid +graph TD + Start["Task Start"] --> Init["๐Ÿ“‹ Initialize
Task Entry"] + Init --> Struct["๐Ÿ—๏ธ Create Task
Structure"] + Struct --> Track["๐Ÿ“Š Progress
Tracking"] + Track --> Update["๐Ÿ”„ Regular
Updates"] + Update --> Complete["โœ… Task
Completion"] + + Struct --> Components["Components:"] + Components --> Req["Requirements"] + Components --> Steps["Implementation
Steps"] + Components --> Creative["Creative Phase
Markers"] + Components --> Check["Checkpoints"] + + Track --> Status["Track Status:"] + Status --> InProg["๐Ÿ”„ In Progress"] + Status --> Block["โ›” Blocked"] + Status --> Done["โœ… Complete"] + Status --> Skip["โญ๏ธ Skipped"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style Init fill:#ffa64d,stroke:#cc7a30,color:white + style Struct fill:#4dbb5f,stroke:#36873f,color:white + style Track fill:#d94dbb,stroke:#a3378a,color:white + style Update fill:#4dbbbb,stroke:#368787,color:white + style Complete fill:#d971ff,stroke:#a33bc2,color:white +``` + +## ๐Ÿ“‹ TASK ENTRY TEMPLATE + +```markdown +# [Task Title] + +## Requirements +- [ ] Requirement 1 +- [ ] Requirement 2 +- [ ] Requirement 3 + +## Components Affected +- Component 1 +- Component 2 +- Component 3 + +## Implementation Steps +1. [ ] Step 1 +2. [ ] Step 2 +3. [ ] Step 3 + +## Creative Phases Required +- [ ] ๐ŸŽจ UI/UX Design +- [ ] ๐Ÿ—๏ธ Architecture Design +- [ ] โš™๏ธ Algorithm Design + +## Checkpoints +- [ ] Requirements verified +- [ ] Creative phases completed +- [ ] Implementation tested +- [ ] Documentation updated + +## Current Status +- Phase: [Current Phase] +- Status: [In Progress/Blocked/Complete] +- Blockers: [If any] +``` + +## ๐Ÿ”„ PROGRESS TRACKING VISUALIZATION + +```mermaid +graph TD + subgraph "TASK PROGRESS" + P1["โœ“ Requirements
Defined"] + P2["โœ“ Components
Identified"] + P3["โ†’ Creative Phase
In Progress"] + P4["โ–ก Implementation"] + P5["โ–ก Testing"] + P6["โ–ก Documentation"] + end + + style P1 fill:#4dbb5f,stroke:#36873f,color:white + style P2 fill:#4dbb5f,stroke:#36873f,color:white + style P3 fill:#ffa64d,stroke:#cc7a30,color:white + style P4 fill:#d94dbb,stroke:#a3378a,color:white + style P5 fill:#4dbbbb,stroke:#368787,color:white + style P6 fill:#d971ff,stroke:#a33bc2,color:white +``` + +## โœ… UPDATE PROTOCOL + +```mermaid +sequenceDiagram + participant Task as Task Entry + participant Status as Status Update + participant Creative as Creative Phase + participant Implementation as Implementation + + Task->>Status: Update Progress + Status->>Creative: Flag for Creative Phase + Creative->>Implementation: Complete Design + Implementation->>Status: Update Status + Status->>Task: Mark Complete +``` + +## ๐ŸŽฏ CHECKPOINT VERIFICATION + +| Phase | Verification Items | Status | +|-------|-------------------|--------| +| Requirements | All requirements documented | [ ] | +| Components | Affected components listed | [ ] | +| Creative | Design decisions documented | [ ] | +| Implementation | Code changes tracked | [ ] | +| Testing | Test results recorded | [ ] | +| Documentation | Updates completed | [ ] | + +## ๐Ÿ”„ DOCUMENT MANAGEMENT + +```mermaid +graph TD + Current["Current Documents"] --> Active["Active:
- task-tracking-intermediate.md
- planning-comprehensive.md"] + Current --> Required["Required Next:
- creative-phase-enforcement.md
- implementation-phase-reference.md"] + + style Current fill:#4da6ff,stroke:#0066cc,color:white + style Active fill:#4dbb5f,stroke:#36873f,color:white + style Required fill:#ffa64d,stroke:#cc7a30,color:white +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level3/workflow-level3.mdc b/.cursor/rules/isolation_rules/Level3/workflow-level3.mdc new file mode 100644 index 0000000..55d0b8e --- /dev/null +++ b/.cursor/rules/isolation_rules/Level3/workflow-level3.mdc @@ -0,0 +1,326 @@ +--- +description: Defines the standard workflow for Level 3 (Intermediate Feature) tasks, guiding through comprehensive planning, targeted creative design, structured implementation, detailed reflection, and feature-specific archiving. +globs: workflow-level3.mdc +alwaysApply: false +--- + +# LEVEL 3 WORKFLOW: INTERMEDIATE FEATURE DEVELOPMENT + +> **TL;DR:** This document outlines a structured workflow for Level 3 (Intermediate Feature) tasks. These tasks involve developing significant new functionality that may span multiple components, requiring comprehensive planning, often necessitating targeted creative design phases, followed by systematic implementation, in-depth reflection, and feature-specific archiving. This workflow balances detailed process with efficiency for moderately complex features. + +## ๐Ÿ” LEVEL 3 WORKFLOW OVERVIEW + +Level 3 tasks represent a significant development effort, building a complete feature. The workflow ensures adequate planning, design for key aspects, and methodical execution. + +```mermaid +graph LR + Init["1. INITIALIZATION
(VAN Mode Output)"] --> + DocSetup["2. DOCUMENTATION SETUP"] --> + Plan["3. FEATURE PLANNING (PLAN Mode)"] --> + Creative["4. CREATIVE PHASES (CREATIVE Mode)"] --> + Impl["5. IMPLEMENTATION (IMPLEMENT Mode)"] --> + Reflect["6. REFLECTION (REFLECT Mode)"] --> + Archive["7. ARCHIVING (ARCHIVE Mode)"] + + %% Document connections for each phase (conceptual links to mode guidance) + Init -.-> InitDocs["Core Rules & L3 Confirmation"] + DocSetup -.-> DocSetupDocs["Memory Bank Setup for L3"] + Plan -.-> PlanDocs["Comprehensive Feature Plan"] + Creative -.-> CreativeDocs["Targeted Design Documents"] + Impl -.-> ImplDocs["Feature Implementation & Testing"] + Reflect -.-> ReflectDocs["In-depth Feature Reflection"] + Archive -.-> ArchiveDocs["Feature Archive Package"] + + style Init fill:#a1c4fd,stroke:#669df6 + style DocSetup fill:#b3e5fc,stroke:#81d4fa + style Plan fill:#c8e6c9,stroke:#a5d6a7 + style Creative fill:#ffd8b2,stroke:#ffcc80 + style Impl fill:#ffcdd2,stroke:#ef9a9a + style Reflect fill:#d1c4e9,stroke:#b39ddb + style Archive fill:#cfd8dc,stroke:#b0bec5 +```` + +Level 3 tasks typically involve creating a new, distinct feature or making substantial modifications to an existing one that affects multiple parts of the application. + +## ๐Ÿ”„ LEVEL TRANSITION HANDLING (Within Level 3 Workflow) + +```mermaid +graph TD + L3["Level 3 Task In Progress"] --> Assess["Continuous Assessment
During PLAN or early IMPLEMENT"] + + Assess --> Up["Upgrade to
Level 4?"] + Assess --> Down["Downgrade to
Level 2?"] + Assess --> MaintainL3["Maintain
Level 3"] + + Up --> L4Trigger["Triggers:
- Unforeseen system-wide impact
- Requires deep architectural changes
- Scope significantly larger than planned"] + Down --> L2Trigger["Triggers:
- Feature simpler than anticipated
- Very limited component interaction
- No complex design decisions emerge"] + + L4Trigger --> L4Switch["Stop L3 Workflow.
Re-initialize task as Level 4 (VAN).
Preserve existing docs as input."] + L2Trigger --> L2Switch["Adapt L3 Workflow:
Simplify remaining phases,
use L2 Reflection/Archive rules."] + + style Assess fill:#ffe082,stroke:#ffca28 + style Up fill:#ef9a9a,stroke:#e57373 + style Down fill:#a5d6a7,stroke:#81c784 + style MaintainL3 fill:#b3e5fc,stroke:#81d4fa +``` + +## ๐Ÿ“‹ WORKFLOW PHASES + +### Phase 1: INITIALIZATION (Output from VAN Mode) + +This phase is largely completed in VAN mode, which identifies the task as Level 3. + + * **Input:** User request leading to an "Intermediate Feature" classification. + * **Key Existing Files (from VAN):** + * `memory-bank/tasks.md`: Entry created, complexity set to Level 3. + * `memory-bank/activeContext.md`: Initial context set. + * Relevant Core Rules loaded (e.g., `Core/memory-bank-paths.mdc`, `Core/main-optimized.mdc`). + * **Steps within this Workflow File (Confirmation):** + 1. Confirm task is Level 3 by checking `memory-bank/tasks.md`. + 2. Ensure core Memory Bank structure and paths are known (AI should have internalized from `main` rule). + * **Milestone Checkpoint:** + ``` + โœ“ INITIALIZATION CONFIRMED (L3) + - Task correctly identified as Level 3 in tasks.md? [YES/NO] + - Core Memory Bank files (tasks.md, activeContext.md) accessible via canonical paths? [YES/NO] + + โ†’ If all YES: Proceed to Documentation Setup for L3. + โ†’ If any NO: Revisit VAN mode or core file setup. + ``` + +### Phase 2: DOCUMENTATION SETUP (L3 Specific) + +Prepare the Memory Bank for a Level 3 feature. + +```mermaid +graph TD + StartDoc["Begin L3 Documentation
Setup"] --> LoadL3PlanTrack["Load L3 Planning & Tracking Rules
Level3/planning-comprehensive.mdc
Level3/task-tracking-intermediate.mdc"] + LoadL3PlanTrack --> UpdateBrief["Review/Update `projectbrief.md`
Ensure feature aligns with overall project goals"] + UpdateBrief --> UpdateActiveCtx["Update `activeContext.md`
Set focus to L3 Feature Planning"] + UpdateActiveCtx --> PrepTaskFile["Prepare `tasks.md` for
Comprehensive Feature Plan sections"] + PrepTaskFile --> DocSetupComplete["L3 Documentation
Setup Complete"] + + style StartDoc fill:#b3e5fc,stroke:#81d4fa + style DocSetupComplete fill:#81d4fa,stroke:#4fc3f7 +``` + + * **Steps:** + 1. Load Level 3 specific planning (`Level3/planning-comprehensive.mdc`) and task tracking (`Level3/task-tracking-intermediate.mdc`) rules. + 2. Review `memory-bank/projectbrief.md`: Briefly note the new feature if it impacts the overall brief. + 3. Update `memory-bank/activeContext.md`: Set current focus to "Level 3 Feature Planning: [Feature Name]". + 4. Ensure `memory-bank/tasks.md` is ready for the detailed planning sections outlined in `Level3/planning-comprehensive.mdc`. + * **Milestone Checkpoint:** + ``` + โœ“ L3 DOCUMENTATION SETUP CHECKPOINT + - L3 Planning & Tracking rules loaded? [YES/NO] + - projectbrief.md reviewed/updated for feature context? [YES/NO] + - activeContext.md reflects focus on L3 feature planning? [YES/NO] + - tasks.md prepared for detailed L3 plan? [YES/NO] + + โ†’ If all YES: Proceed to Feature Planning. + โ†’ If any NO: Complete documentation setup steps. + ``` + +### Phase 3: FEATURE PLANNING (PLAN Mode) + +Guided by `visual-maps/plan-mode-map.mdc` and using `Level3/planning-comprehensive.mdc` and `Level3/task-tracking-intermediate.mdc`. + +```mermaid +graph TD + StartPlan["Begin L3 Feature
Planning"] --> ReqDef["Define Detailed
Requirements (Functional & Non-Functional)"] + ReqDef --> CompAnalysis["Component Analysis
(New & Affected Components, Interactions)"] + CompAnalysis --> ImplStrategy["Develop Implementation
Strategy & High-Level Steps"] + ImplStrategy --> DepRiskMgmt["Identify Dependencies,
Risks, & Mitigations"] + DepRiskMgmt --> CreativeFlag["Flag Aspects for
CREATIVE Mode (UI, Arch, Algo)"] + CreativeFlag --> UpdateTasks["Update `tasks.md` with
Full L3 Feature Plan"] + UpdateTasks --> PlanComplete["L3 Feature Planning
Complete"] + + style StartPlan fill:#c8e6c9,stroke:#a5d6a7 + style PlanComplete fill:#a5d6a7,stroke:#81c784 +``` + + * **Steps:** + 1. Define detailed functional and non-functional requirements for the feature. + 2. Perform component analysis: identify new components to build and existing ones that will be modified. Map their interactions. + 3. Develop an implementation strategy: outline the main steps or stages for building the feature. + 4. Identify dependencies (technical, data, other features) and potential risks, along with mitigation ideas. + 5. **Critical for L3:** Explicitly identify and flag parts of the feature that require CREATIVE mode (e.g., specific UI/UX challenges, new architectural patterns for the feature, complex algorithms). + 6. Document the complete plan (requirements, components, strategy, dependencies, risks, creative flags) in `memory-bank/tasks.md` under the Level 3 feature task entry. + * **Milestone Checkpoint:** + ``` + โœ“ L3 FEATURE PLANNING CHECKPOINT + - Detailed requirements documented in tasks.md? [YES/NO] + - Component analysis (new/affected, interactions) complete? [YES/NO] + - Implementation strategy outlined? [YES/NO] + - Dependencies and risks documented? [YES/NO] + - Aspects needing CREATIVE mode explicitly flagged in tasks.md? [YES/NO] + - tasks.md comprehensively updated with the feature plan? [YES/NO] + + โ†’ If all YES: Proceed to CREATIVE Phases (if flagged) or IMPLEMENTATION. + โ†’ If any NO: Complete planning steps. + ``` + +### Phase 4: CREATIVE PHASES (CREATIVE Mode) + +Triggered if aspects were flagged in the PLAN phase. Guided by `visual-maps/creative-mode-map.mdc` and `Phases/CreativePhase/*.mdc` rules. + +```mermaid +graph TD + StartCreative["Begin L3 Creative
Phases (If Needed)"] --> SelectAspect["Select Flagged Aspect
from `tasks.md`"] + SelectAspect --> DesignExplore["Explore Design/Arch Options
(Use relevant creative-phase-*.mdc rules)"] + DesignExplore --> DecideDocument["Make & Document Decision
in `creative-[aspect_name].md`"] + DecideDocument --> UpdateTasksCreative["Update `tasks.md` with
Decision Summary & Link"] + UpdateTasksCreative --> MoreAspects{"More Flagged
Aspects?"} + MoreAspects -- Yes --> SelectAspect + MoreAspects -- No --> CreativeComplete["L3 Creative Phases
Complete"] + + style StartCreative fill:#ffd8b2,stroke:#ffcc80 + style CreativeComplete fill:#ffcc80,stroke:#ffb74d +``` + + * **Steps:** + 1. For each aspect flagged in `tasks.md` for creative exploration: + a. Load relevant `creative-phase-*.mdc` rule (e.g., UI/UX, architecture). + b. Define the problem, explore options, analyze trade-offs. + c. Make a design decision and document it with rationale in a new `memory-bank/creative-[aspect_name].md` file. + d. Update `tasks.md`: mark the creative sub-task as complete and link to the decision document. + * **Milestone Checkpoint:** + ``` + โœ“ L3 CREATIVE PHASES CHECKPOINT + - All flagged aspects from PLAN phase addressed? [YES/NO] + - Design decisions documented in respective `memory-bank/creative-*.md` files? [YES/NO] + - Rationale for decisions clearly stated? [YES/NO] + - tasks.md updated to reflect completion of creative sub-tasks and links to decision docs? [YES/NO] + + โ†’ If all YES: Proceed to Implementation. + โ†’ If any NO: Complete creative phase work. + ``` + +### Phase 5: IMPLEMENTATION (IMPLEMENT Mode) + +Guided by `visual-maps/implement-mode-map.mdc` and `Level3/implementation-L3.mdc`. + +```mermaid +graph TD + StartImpl["Begin L3 Feature
Implementation"] --> ReviewPlanDesign["Review Plan (`tasks.md`)
& Creative Docs (`creative-*.md`)"] + ReviewPlanDesign --> SetupDevEnv["Setup Dev Environment
(Branch, Dependencies, Tools)"] + SetupDevEnv --> BuildModules["Implement Feature Modules/Components
Iteratively or Sequentially"] + BuildModules --> UnitIntegrationTests["Conduct Unit & Integration Tests
for Each Module/Feature Part"] + UnitIntegrationTests --> StyleAdherence["Ensure Adherence to
`memory-bank/style-guide.md`"] + StyleAdherence --> UpdateProgressDocs["Regularly Update `tasks.md` (sub-tasks)
& `progress.md` (milestones)"] + UpdateProgressDocs --> E2EFeatureTest["End-to-End Feature Testing
Against Requirements"] + E2EFeatureTest --> ImplComplete["L3 Feature Implementation
Complete"] + + style StartImpl fill:#ffcdd2,stroke:#ef9a9a + style ImplComplete fill:#ef9a9a,stroke:#e57373 +``` + + * **Steps:** + 1. Thoroughly review the feature plan in `memory-bank/tasks.md` and all relevant `memory-bank/creative-*.md` decision documents. + 2. Set up the development environment (new branch, install any new dependencies, configure tools). + 3. Implement the feature, building out modules/components as planned. Prioritize clean code and adherence to design specifications. + 4. Perform unit tests for new logic and integration tests as components are assembled. + 5. Ensure all UI elements strictly follow `memory-bank/style-guide.md`. + 6. Update `memory-bank/tasks.md` with progress on sub-tasks, and `memory-bank/progress.md` with details of implemented parts, commands used, and any significant findings. + 7. Conduct end-to-end testing of the completed feature against its requirements. + * **Milestone Checkpoint:** + ``` + โœ“ L3 IMPLEMENTATION CHECKPOINT + - Feature fully implemented as per plan and creative designs? [YES/NO] + - All UI elements adhere to `memory-bank/style-guide.md`? [YES/NO] + - Unit and integration tests performed and passing? [YES/NO] + - End-to-end feature testing successful? [YES/NO] + - `tasks.md` and `progress.md` updated with implementation status? [YES/NO] + + โ†’ If all YES: Proceed to Reflection. + โ†’ If any NO: Complete implementation and testing. + ``` + +### Phase 6: REFLECTION (REFLECT Mode) + +Guided by `visual-maps/reflect-mode-map.mdc` and `Level3/reflection-L3.mdc`. + +```mermaid +graph TD + StartReflect["Begin L3 Feature
Reflection"] --> ReviewCompleted["Review Completed Feature
(Code, Plan, Design Docs, Test Results)"] + ReviewCompleted --> AnalyzeProcess["Analyze Development Process
(Successes, Challenges, Deviations)"] + AnalyzeProcess --> DocumentLessons["Document Key Lessons Learned
(Technical & Process)"] + DocumentLessons --> AssessDesignChoices["Assess Effectiveness of
Creative Phase Decisions"] + AssessDesignChoices --> CreateReflectDoc["Create `reflection-[feature_id].md`"] + CreateReflectDoc --> UpdateTasksReflect["Update `tasks.md` (Reflection Complete)"] + UpdateTasksReflect --> ReflectComplete["L3 Feature Reflection
Complete"] + + style StartReflect fill:#d1c4e9,stroke:#b39ddb + style ReflectComplete fill:#b39ddb,stroke:#9575cd +``` + + * **Steps:** + 1. Review the entire feature development lifecycle: initial requirements, plan, creative designs, implementation, and testing outcomes. + 2. Analyze what went well, what was challenging, and any deviations from the original plan or design. + 3. Document key lessons learned regarding technology, architecture, process, or team collaboration relevant to this feature. + 4. Specifically assess how effective the creative phase decisions were during actual implementation. + 5. Create the `memory-bank/reflection-[feature_id].md` document. + 6. Update `memory-bank/tasks.md` to mark the reflection stage for the feature as complete. + * **Milestone Checkpoint:** + ``` + โœ“ L3 REFLECTION CHECKPOINT + - Feature development lifecycle thoroughly reviewed? [YES/NO] + - Successes, challenges, and lessons learned documented in `reflection-[feature_id].md`? [YES/NO] + - Effectiveness of creative/design decisions assessed? [YES/NO] + - `tasks.md` updated to reflect reflection completion? [YES/NO] + + โ†’ If all YES: Proceed to Archiving. + โ†’ If any NO: Complete reflection documentation. + ``` + +### Phase 7: ARCHIVING (ARCHIVE Mode - Highly Recommended for L3) + +Guided by `visual-maps/archive-mode-map.mdc` and `Level3/archive-L3.mdc`. + +```mermaid +graph TD + StartArchive["Begin L3 Feature
Archiving"] --> ConsolidateDocs["Consolidate All Feature Docs
(Plan, Creative, Reflection, Key Progress Notes)"] + ConsolidateDocs --> CreateArchiveSummary["Create Archive Summary Document
`archive/feature-[feature_id]_YYYYMMDD.md`"] + CreateArchiveSummary --> LinkDocs["Link to Detailed Docs
within Archive Summary"] + LinkDocs --> FinalUpdateTasks["Final Update to `tasks.md`
(Mark Feature COMPLETED & ARCHIVED)"] + FinalUpdateTasks --> ResetActiveCtx["Clear `activeContext.md`
Prepare for Next Task"] + ResetActiveCtx --> ArchiveComplete["L3 Feature Archiving
Complete"] + + style StartArchive fill:#cfd8dc,stroke:#b0bec5 + style ArchiveComplete fill:#b0bec5,stroke:#90a4ae +``` + + * **Steps:** + 1. Consolidate all documentation related to the feature: the plan section from `tasks.md`, all `creative-*.md` files, the `reflection-*.md` file, and relevant summaries from `progress.md`. + 2. Create a dedicated feature archive summary document in `memory-bank/archive/feature-[feature_id]_YYYYMMDD.md`. This summary should briefly describe the feature, its purpose, key decisions, and link to the more detailed documents. + 3. Update `memory-bank/tasks.md` to mark the entire Level 3 feature task as "COMPLETED" and "ARCHIVED," providing a link to the new archive summary. + 4. Update `memory-bank/activeContext.md` to clear information related to the completed feature, preparing for the next task. + * **Milestone Checkpoint:** + ``` + โœ“ L3 ARCHIVING CHECKPOINT + - Feature archive summary created in `memory-bank/archive/`? [YES/NO] + - Archive summary links to all relevant planning, creative, and reflection docs? [YES/NO] + - `tasks.md` shows the feature as COMPLETED and ARCHIVED with a link to the archive? [YES/NO] + - `activeContext.md` cleared and ready for a new task? [YES/NO] + + โ†’ If all YES: Level 3 Task Fully Completed. Suggest VAN Mode for next task. + โ†’ If any NO: Complete archiving steps. + ``` + +## ๐Ÿšจ LEVEL 3 GOVERNANCE PRINCIPLE + +Remember: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Level 3 tasks build significant features. Balance โ”‚ +โ”‚ detailed planning and targeted design with efficientโ”‚ +โ”‚ execution. Document key decisions and outcomes to โ”‚ +โ”‚ ensure the feature is understandable and maintainable.โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +This ensures that intermediate features are developed with an appropriate level of rigor, bridging the gap between simple enhancements and full-scale system development. + +``` +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level4/architectural-planning.mdc b/.cursor/rules/isolation_rules/Level4/architectural-planning.mdc new file mode 100644 index 0000000..3a3ea4b --- /dev/null +++ b/.cursor/rules/isolation_rules/Level4/architectural-planning.mdc @@ -0,0 +1,809 @@ +--- +description: Architectural planning guidelines for Level 4 Complex System tasks +globs: "**/level4/**", "**/architecture/**" +alwaysApply: false +--- + +# ARCHITECTURAL PLANNING FOR LEVEL 4 TASKS + +> **TL;DR:** This document outlines a comprehensive architectural planning approach for Level 4 (Complex System) tasks, ensuring a robust, scalable, and maintainable architecture that aligns with business objectives and technical requirements. + +## ๐Ÿ” ARCHITECTURAL PLANNING OVERVIEW + +Level 4 Complex System tasks require thorough architectural planning to ensure the resulting system is robust, scalable, maintainable, and aligned with business objectives. This document outlines a structured approach to architectural planning that systematically addresses key concerns and produces comprehensive documentation. + +```mermaid +flowchart TD + classDef phase fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef verification fill:#c5e8b7,stroke:#a5c897,color:#000 + + Start([Begin Architectural
Planning]) --> Reqs[Analyze
Requirements] + Reqs --> Context[Define Business
Context] + Context --> Vision[Establish Vision
and Goals] + Vision --> Principles[Define Architectural
Principles] + Principles --> Constraints[Identify
Constraints] + Constraints --> Explore[Explore
Alternatives] + Explore --> Evaluate[Evaluate
Options] + Evaluate --> Decision[Document
Decisions] + Decision --> Create[Create Architecture
Documentation] + Create --> Validate[Validate
Architecture] + Validate --> Communicate[Communicate
Architecture] + Communicate --> Verification{Architecture
Verification} + Verification -->|Pass| Complete([Architectural
Planning Complete]) + Verification -->|Fail| Revise[Revise
Architecture] + Revise --> Verification + + Reqs -.-> ReqDoc((Requirements
Document)) + Context -.-> ConDoc((Context
Document)) + Vision -.-> VisDoc((Vision
Document)) + Principles -.-> PrinDoc((Principles
Document)) + Explore -.-> AltDoc((Alternatives
Analysis)) + Decision -.-> ADR((Architecture
Decision Records)) + Create -.-> ArchDoc((Architecture
Documentation)) + + class Start,Complete milestone + class Reqs,Context,Vision,Principles,Constraints,Explore,Evaluate,Decision,Create,Validate,Communicate,Revise step + class Verification verification + class ReqDoc,ConDoc,VisDoc,PrinDoc,AltDoc,ADR,ArchDoc artifact +``` + +## ๐Ÿ“‹ ARCHITECTURAL PLANNING PRINCIPLES + +1. **Business Alignment**: Architecture must directly support business objectives and user needs. +2. **Future-Proofing**: Architecture must anticipate future requirements and facilitate change. +3. **Simplicity**: Prefer simple solutions over complex ones when possible. +4. **Separation of Concerns**: Systems should be divided into distinct components with minimal overlap. +5. **Defense in Depth**: Multiple layers of security controls should be employed. +6. **Loose Coupling**: Components should interact through well-defined interfaces with minimal dependencies. +7. **High Cohesion**: Related functionality should be grouped together, unrelated functionality separated. +8. **Resilience**: Architecture should anticipate failures and provide mechanisms for recovery. +9. **Scalability**: Architecture should support growth in users, data, and functionality. +10. **Measurability**: Architecture should enable monitoring and measurement of key metrics. + +## ๐Ÿ“‹ ARCHITECTURAL REQUIREMENTS ANALYSIS + +Begin architectural planning with a comprehensive analysis of requirements: + +### Functional Requirements Analysis + +```mermaid +flowchart LR + classDef req fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef arch fill:#a8d5ff,stroke:#88b5e0,color:#000 + + FR[Functional
Requirements] --> USE[Use Cases/
User Stories] + USE --> DOM[Domain
Model] + DOM --> COMP[Component
Identification] + COMP --> INT[Interface
Definition] + INT --> FLOW[Information
Flow] + + class FR,USE,DOM req + class COMP,INT,FLOW arch +``` + +**Template for Functional Requirements Analysis:** + +```markdown +## Functional Requirements Analysis + +### Key Use Cases +- Use Case 1: [Description] +- Use Case 2: [Description] +- Use Case 3: [Description] + +### Domain Model +- Entity 1: [Description and attributes] +- Entity 2: [Description and attributes] +- Entity 3: [Description and attributes] +- Relationships: + - Entity 1 โ†’ Entity 2: [Relationship type and description] + - Entity 2 โ†’ Entity 3: [Relationship type and description] + +### Component Identification +- Component 1: [Description and responsibilities] +- Component 2: [Description and responsibilities] +- Component 3: [Description and responsibilities] + +### Interface Definitions +- Interface 1: [Description, methods, parameters] +- Interface 2: [Description, methods, parameters] +- Interface 3: [Description, methods, parameters] + +### Information Flow +- Flow 1: [Description of information exchange] +- Flow 2: [Description of information exchange] +- Flow 3: [Description of information exchange] +``` + +### Non-Functional Requirements Analysis + +```mermaid +flowchart LR + classDef req fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef arch fill:#a8d5ff,stroke:#88b5e0,color:#000 + + NFR[Non-Functional
Requirements] --> PERF[Performance
Requirements] + NFR --> SEC[Security
Requirements] + NFR --> SCAL[Scalability
Requirements] + NFR --> AVAIL[Availability
Requirements] + NFR --> MAINT[Maintainability
Requirements] + + PERF & SEC & SCAL & AVAIL & MAINT --> ARCH[Architectural
Decisions] + + class NFR,PERF,SEC,SCAL,AVAIL,MAINT req + class ARCH arch +``` + +**Template for Non-Functional Requirements Analysis:** + +```markdown +## Non-Functional Requirements Analysis + +### Performance Requirements +- Response Time: [Requirements] +- Throughput: [Requirements] +- Resource Utilization: [Requirements] +- Architectural Implications: [Implications for architecture] + +### Security Requirements +- Authentication: [Requirements] +- Authorization: [Requirements] +- Data Protection: [Requirements] +- Audit/Logging: [Requirements] +- Architectural Implications: [Implications for architecture] + +### Scalability Requirements +- User Scalability: [Requirements] +- Data Scalability: [Requirements] +- Transaction Scalability: [Requirements] +- Architectural Implications: [Implications for architecture] + +### Availability Requirements +- Uptime Requirements: [Requirements] +- Fault Tolerance: [Requirements] +- Disaster Recovery: [Requirements] +- Architectural Implications: [Implications for architecture] + +### Maintainability Requirements +- Modularity: [Requirements] +- Extensibility: [Requirements] +- Testability: [Requirements] +- Architectural Implications: [Implications for architecture] +``` + +## ๐Ÿ“‹ BUSINESS CONTEXT DOCUMENTATION + +Document the business context to ensure architectural alignment: + +```markdown +## Business Context Documentation + +### Business Objectives +- Objective 1: [Description] +- Objective 2: [Description] +- Objective 3: [Description] + +### Key Stakeholders +- Stakeholder Group 1: [Description, needs, and concerns] +- Stakeholder Group 2: [Description, needs, and concerns] +- Stakeholder Group 3: [Description, needs, and concerns] + +### Business Processes +- Process 1: [Description and flow] +- Process 2: [Description and flow] +- Process 3: [Description and flow] + +### Business Constraints +- Constraint 1: [Description and impact] +- Constraint 2: [Description and impact] +- Constraint 3: [Description and impact] + +### Business Metrics +- Metric 1: [Description and target] +- Metric 2: [Description and target] +- Metric 3: [Description and target] + +### Business Risks +- Risk 1: [Description, probability, impact, and mitigation] +- Risk 2: [Description, probability, impact, and mitigation] +- Risk 3: [Description, probability, impact, and mitigation] +``` + +## ๐Ÿ“‹ ARCHITECTURAL VISION AND GOALS + +Document the architectural vision and goals: + +```markdown +## Architectural Vision and Goals + +### Vision Statement +[Concise statement of the architectural vision] + +### Strategic Goals +- Goal 1: [Description and success criteria] +- Goal 2: [Description and success criteria] +- Goal 3: [Description and success criteria] + +### Quality Attributes +- Quality Attribute 1: [Description and importance] +- Quality Attribute 2: [Description and importance] +- Quality Attribute 3: [Description and importance] + +### Technical Roadmap +- Short-term (0-6 months): [Key architectural milestones] +- Medium-term (6-18 months): [Key architectural milestones] +- Long-term (18+ months): [Key architectural milestones] + +### Key Success Indicators +- Indicator 1: [Description and measurement] +- Indicator 2: [Description and measurement] +- Indicator 3: [Description and measurement] +``` + +## ๐Ÿ“‹ ARCHITECTURAL PRINCIPLES + +Document architectural principles to guide decision-making: + +```markdown +## Architectural Principles + +### Principle 1: [Name] +- **Statement**: [Concise statement of the principle] +- **Rationale**: [Why this principle is important] +- **Implications**: [What this principle means for the architecture] +- **Examples**: [Examples of applying this principle] + +### Principle 2: [Name] +- **Statement**: [Concise statement of the principle] +- **Rationale**: [Why this principle is important] +- **Implications**: [What this principle means for the architecture] +- **Examples**: [Examples of applying this principle] + +### Principle 3: [Name] +- **Statement**: [Concise statement of the principle] +- **Rationale**: [Why this principle is important] +- **Implications**: [What this principle means for the architecture] +- **Examples**: [Examples of applying this principle] + +... +``` + +## ๐Ÿ“‹ CONSTRAINTS IDENTIFICATION + +Document constraints that impact architectural decisions: + +```markdown +## Architectural Constraints + +### Technical Constraints +- Constraint 1: [Description and impact] +- Constraint 2: [Description and impact] +- Constraint 3: [Description and impact] + +### Organizational Constraints +- Constraint 1: [Description and impact] +- Constraint 2: [Description and impact] +- Constraint 3: [Description and impact] + +### External Constraints +- Constraint 1: [Description and impact] +- Constraint 2: [Description and impact] +- Constraint 3: [Description and impact] + +### Regulatory/Compliance Constraints +- Constraint 1: [Description and impact] +- Constraint 2: [Description and impact] +- Constraint 3: [Description and impact] + +### Resource Constraints +- Constraint 1: [Description and impact] +- Constraint 2: [Description and impact] +- Constraint 3: [Description and impact] +``` + +## ๐Ÿ“‹ ARCHITECTURAL ALTERNATIVES EXPLORATION + +Document and evaluate architectural alternatives: + +```markdown +## Architectural Alternatives + +### Alternative 1: [Name] +- **Description**: [Brief description of the alternative] +- **Key Components**: + - Component 1: [Description] + - Component 2: [Description] + - Component 3: [Description] +- **Advantages**: + - [Advantage 1] + - [Advantage 2] + - [Advantage 3] +- **Disadvantages**: + - [Disadvantage 1] + - [Disadvantage 2] + - [Disadvantage 3] +- **Risks**: + - [Risk 1] + - [Risk 2] + - [Risk 3] +- **Cost Factors**: + - [Cost Factor 1] + - [Cost Factor 2] + - [Cost Factor 3] +- **Alignment with Requirements**: + - [How well this alternative addresses requirements] + +### Alternative 2: [Name] +... + +### Alternative 3: [Name] +... + +## Evaluation Criteria +- Criterion 1: [Description and weighting] +- Criterion 2: [Description and weighting] +- Criterion 3: [Description and weighting] + +## Evaluation Matrix +| Criterion | Alternative 1 | Alternative 2 | Alternative 3 | +|-----------|---------------|---------------|---------------| +| Criterion 1 | Score | Score | Score | +| Criterion 2 | Score | Score | Score | +| Criterion 3 | Score | Score | Score | +| Total | Sum | Sum | Sum | + +## Recommended Approach +[Description of the recommended architectural approach with justification] +``` + +## ๐Ÿ“‹ ARCHITECTURE DECISION RECORDS (ADRs) + +Document key architectural decisions: + +```markdown +# Architecture Decision Record: [Decision Title] + +## Status +[Proposed/Accepted/Deprecated/Superseded] + +## Context +[Description of the context and problem statement] + +## Decision +[Description of the decision made] + +## Consequences +[Description of the consequences of the decision] + +## Alternatives Considered +[Description of alternatives considered] + +## Related Decisions +[References to related decisions] + +## Notes +[Additional notes and considerations] +``` + +## ๐Ÿ“‹ COMPREHENSIVE ARCHITECTURE DOCUMENTATION + +Create comprehensive architecture documentation: + +### System Context Diagram + +```mermaid +flowchart TD + classDef system fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef external fill:#a8d5ff,stroke:#88b5e0,color:#000 + classDef user fill:#c5e8b7,stroke:#a5c897,color:#000 + + U1[User 1] --> S[System] + U2[User 2] --> S + S --> E1[External
System 1] + S --> E2[External
System 2] + S --> E3[External
System 3] + + class S system + class E1,E2,E3 external + class U1,U2 user +``` + +### High-Level Architecture Diagram + +```mermaid +flowchart TD + classDef frontend fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef backend fill:#a8d5ff,stroke:#88b5e0,color:#000 + classDef data fill:#c5e8b7,stroke:#a5c897,color:#000 + classDef integration fill:#f4b8c4,stroke:#d498a4,color:#000 + + U[Users] --> F[Frontend
Layer] + F --> B[Backend
Layer] + B --> D[Data
Layer] + B --> I[Integration
Layer] + I --> E[External
Systems] + + class F frontend + class B backend + class D data + class I integration + class U,E external +``` + +### Component Architecture Diagram + +```mermaid +flowchart TD + classDef ui fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef service fill:#a8d5ff,stroke:#88b5e0,color:#000 + classDef data fill:#c5e8b7,stroke:#a5c897,color:#000 + + UI[User Interface] --> API[API Gateway] + API --> S1[Service 1] + API --> S2[Service 2] + API --> S3[Service 3] + S1 --> DB1[Database 1] + S2 --> DB1 + S2 --> DB2[Database 2] + S3 --> DB2 + + class UI ui + class API,S1,S2,S3 service + class DB1,DB2 data +``` + +### Data Architecture Diagram + +```mermaid +flowchart TD + classDef entity fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef relation fill:#a8d5ff,stroke:#88b5e0,color:#000 + + E1[Entity 1] -- 1:N --> E2[Entity 2] + E1 -- 1:1 --> E3[Entity 3] + E2 -- N:M --> E4[Entity 4] + E3 -- 1:N --> E4 + + class E1,E2,E3,E4 entity +``` + +### Security Architecture Diagram + +```mermaid +flowchart TD + classDef security fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef app fill:#a8d5ff,stroke:#88b5e0,color:#000 + + U[Users] --> WAF[Web Application
Firewall] + WAF --> LB[Load
Balancer] + LB --> API[API Gateway] + API --> AuthZ[Authorization
Service] + API --> S1[Service 1] + API --> S2[Service 2] + AuthZ --> IAM[Identity &
Access Management] + + class WAF,AuthZ,IAM security + class API,S1,S2 app + class U,LB external +``` + +### Deployment Architecture Diagram + +```mermaid +flowchart TD + classDef env fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef component fill:#a8d5ff,stroke:#88b5e0,color:#000 + + subgraph Production + LB[Load Balancer] --> W1[Web Server 1] + LB --> W2[Web Server 2] + W1 & W2 --> A1[App Server 1] + W1 & W2 --> A2[App Server 2] + A1 & A2 --> DB[Database
Cluster] + end + + class Production env + class LB,W1,W2,A1,A2,DB component +``` + +### Architecture Documentation Template + +```markdown +# System Architecture Document + +## 1. Introduction +- **Purpose**: [Purpose of the architecture] +- **Scope**: [Scope of the architecture] +- **Audience**: [Intended audience for the document] +- **References**: [Related documents and references] + +## 2. System Context +- **System Purpose**: [Brief description of system purpose] +- **Context Diagram**: [System context diagram] +- **External Systems**: [Description of external systems and interfaces] +- **User Types**: [Description of user types and interactions] + +## 3. Architecture Overview +- **Architecture Style**: [Description of the architectural style/pattern] +- **High-Level Architecture**: [High-level architecture diagram] +- **Key Components**: [Overview of key components] +- **Technology Stack**: [Overview of technology stack] + +## 4. Component Architecture +- **Component Diagram**: [Component architecture diagram] +- **Component Descriptions**: + - Component 1: [Description, responsibilities, interfaces] + - Component 2: [Description, responsibilities, interfaces] + - Component 3: [Description, responsibilities, interfaces] +- **Component Interactions**: [Description of component interactions] +- **API Specifications**: [Overview of key APIs] + +## 5. Data Architecture +- **Data Model**: [Data architecture diagram] +- **Entity Descriptions**: + - Entity 1: [Description, attributes, relationships] + - Entity 2: [Description, attributes, relationships] + - Entity 3: [Description, attributes, relationships] +- **Data Storage**: [Description of data storage approaches] +- **Data Access**: [Description of data access patterns] +- **Data Migration**: [Overview of data migration approach] + +## 6. Security Architecture +- **Security Model**: [Security architecture diagram] +- **Authentication**: [Authentication approach] +- **Authorization**: [Authorization approach] +- **Data Protection**: [Data protection mechanisms] +- **Security Controls**: [Key security controls] +- **Audit and Logging**: [Audit and logging approach] + +## 7. Deployment Architecture +- **Deployment Model**: [Deployment architecture diagram] +- **Environment Descriptions**: + - Environment 1: [Description and configuration] + - Environment 2: [Description and configuration] + - Environment 3: [Description and configuration] +- **Infrastructure Requirements**: [Infrastructure requirements] +- **Scaling Approach**: [Scaling approach] + +## 8. Quality Attributes +- **Performance**: [Performance characteristics and mechanisms] +- **Scalability**: [Scalability approach] +- **Availability**: [Availability approach] +- **Maintainability**: [Maintainability approach] +- **Reliability**: [Reliability approach] +- **Portability**: [Portability considerations] + +## 9. Cross-Cutting Concerns +- **Logging**: [Logging approach] +- **Error Handling**: [Error handling approach] +- **Monitoring**: [Monitoring approach] +- **Configuration Management**: [Configuration management approach] +- **Internationalization**: [Internationalization approach] + +## 10. Architecture Decisions +- [References to Architecture Decision Records] + +## 11. Risks and Mitigations +- Risk 1: [Description and mitigation] +- Risk 2: [Description and mitigation] +- Risk 3: [Description and mitigation] + +## 12. Glossary +- Term 1: [Definition] +- Term 2: [Definition] +- Term 3: [Definition] +``` + +## ๐Ÿ“‹ ARCHITECTURE VALIDATION + +Validate architecture against requirements and principles: + +```markdown +## Architecture Validation + +### Requirements Coverage +- Requirement 1: [Covered/Partially Covered/Not Covered] - [Explanation] +- Requirement 2: [Covered/Partially Covered/Not Covered] - [Explanation] +- Requirement 3: [Covered/Partially Covered/Not Covered] - [Explanation] + +### Principles Alignment +- Principle 1: [Aligned/Partially Aligned/Not Aligned] - [Explanation] +- Principle 2: [Aligned/Partially Aligned/Not Aligned] - [Explanation] +- Principle 3: [Aligned/Partially Aligned/Not Aligned] - [Explanation] + +### Quality Attribute Scenarios +- Scenario 1: [Description and validation] +- Scenario 2: [Description and validation] +- Scenario 3: [Description and validation] + +### Architecture Review Findings +- Finding 1: [Description and resolution] +- Finding 2: [Description and resolution] +- Finding 3: [Description and resolution] + +### Risk Assessment +- Risk 1: [Description, probability, impact, and mitigation] +- Risk 2: [Description, probability, impact, and mitigation] +- Risk 3: [Description, probability, impact, and mitigation] + +### Validation Outcome +[Summary of validation outcome and next steps] +``` + +## ๐Ÿ“‹ ARCHITECTURE COMMUNICATION + +Communicate architecture to stakeholders: + +```markdown +## Architecture Communication Plan + +### Key Stakeholders +- Stakeholder Group 1: [Communication needs] +- Stakeholder Group 2: [Communication needs] +- Stakeholder Group 3: [Communication needs] + +### Communication Materials +- **Executive Summary**: [Purpose and audience] +- **Technical Reference**: [Purpose and audience] +- **Developer Guide**: [Purpose and audience] +- **Operations Guide**: [Purpose and audience] + +### Communication Schedule +- Event 1: [Date, audience, purpose] +- Event 2: [Date, audience, purpose] +- Event 3: [Date, audience, purpose] + +### Feedback Mechanism +[Description of how feedback will be collected and incorporated] +``` + +## ๐Ÿ“‹ MEMORY BANK INTEGRATION + +```mermaid +flowchart TD + classDef memfile fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef process fill:#f9d77e,stroke:#d9b95c,color:#000 + + Architecture[Architectural
Planning] --> PB[projectbrief.md] + Architecture --> PC[productContext.md] + Architecture --> SP[systemPatterns.md] + Architecture --> TC[techContext.md] + + PB & PC & SP & TC --> MBI[Memory Bank
Integration] + MBI --> Next[Implementation
Phase] + + class PB,PC,SP,TC memfile + class Architecture,MBI,Next process +``` + +### Memory Bank Updates + +Update the following Memory Bank files during architectural planning: + +1. **projectbrief.md** + - Update with architectural vision + - Document high-level architecture approach + - Link to architecture documentation + +2. **productContext.md** + - Update with business context documentation + - Document key stakeholder requirements + - Capture business drivers for architectural decisions + +3. **systemPatterns.md** + - Document architectural patterns and styles chosen + - Capture key architecture decisions with rationales + - Document technical patterns to be used + +4. **techContext.md** + - Update with technology stack decisions + - Document technical constraints and considerations + - Capture integration approaches + +## ๐Ÿ“‹ ARCHITECTURAL PLANNING VERIFICATION CHECKLIST + +``` +โœ“ ARCHITECTURAL PLANNING VERIFICATION CHECKLIST + +Requirements Analysis +- Functional requirements analyzed? [YES/NO] +- Non-functional requirements analyzed? [YES/NO] +- Domain model created? [YES/NO] +- Component identification completed? [YES/NO] + +Business Context +- Business objectives documented? [YES/NO] +- Key stakeholders identified? [YES/NO] +- Business processes documented? [YES/NO] +- Business constraints identified? [YES/NO] + +Vision and Goals +- Architectural vision stated? [YES/NO] +- Strategic goals defined? [YES/NO] +- Quality attributes identified? [YES/NO] +- Technical roadmap created? [YES/NO] + +Architectural Principles +- Core principles defined? [YES/NO] +- Principles have clear rationales? [YES/NO] +- Implications of principles documented? [YES/NO] +- Examples of applying principles provided? [YES/NO] + +Constraints Identification +- Technical constraints documented? [YES/NO] +- Organizational constraints documented? [YES/NO] +- External constraints documented? [YES/NO] +- Regulatory constraints documented? [YES/NO] + +Alternatives Exploration +- Multiple alternatives identified? [YES/NO] +- Alternatives evaluated against criteria? [YES/NO] +- Advantages and disadvantages documented? [YES/NO] +- Recommended approach justified? [YES/NO] + +Architecture Documentation +- System context documented? [YES/NO] +- High-level architecture documented? [YES/NO] +- Component architecture documented? [YES/NO] +- Data architecture documented? [YES/NO] +- Security architecture documented? [YES/NO] +- Deployment architecture documented? [YES/NO] + +Architecture Validation +- Requirements coverage validated? [YES/NO] +- Principles alignment checked? [YES/NO] +- Quality attribute scenarios assessed? [YES/NO] +- Architecture review conducted? [YES/NO] + +Memory Bank Integration +- projectbrief.md updated? [YES/NO] +- productContext.md updated? [YES/NO] +- systemPatterns.md updated? [YES/NO] +- techContext.md updated? [YES/NO] +``` + +## ๐Ÿ“‹ MINIMAL MODE ARCHITECTURE PLANNING FORMAT + +For situations requiring a more compact architectural planning approach: + +```markdown +## Level 4 Architecture Planning: [System Name] + +### System Context +- **Purpose**: [Brief description of system purpose] +- **Users**: [Primary users] +- **External Systems**: [Key external systems] + +### Key Architectural Decisions +- **Architecture Style**: [Chosen style with brief rationale] +- **Component Structure**: [Key components with brief descriptions] +- **Data Model**: [Brief description of data approach] +- **Technical Stack**: [Key technologies] + +### Quality Attributes +- **Performance**: [Brief description of approach] +- **Security**: [Brief description of approach] +- **Scalability**: [Brief description of approach] +- **Maintainability**: [Brief description of approach] + +### Architecture Diagram +[Simple architecture diagram] + +### Key Risks and Mitigations +- **Risk 1**: [Brief description] - **Mitigation**: [Brief approach] +- **Risk 2**: [Brief description] - **Mitigation**: [Brief approach] + +### Memory Bank Updates +- [Brief description of updates needed] +``` + +## ๐Ÿšจ ARCHITECTURAL PLANNING ENFORCEMENT PRINCIPLE + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ ARCHITECTURAL PLANNING IS MANDATORY for Level 4 โ”‚ +โ”‚ tasks. Implementation CANNOT begin until โ”‚ +โ”‚ architectural planning is complete and approved. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level4/archive-comprehensive.mdc b/.cursor/rules/isolation_rules/Level4/archive-comprehensive.mdc new file mode 100644 index 0000000..78902d1 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level4/archive-comprehensive.mdc @@ -0,0 +1,684 @@ +--- +description: Comprehensive archiving approach for Level 4 Complex System tasks +globs: "**/level4/**", "**/archive/**" +alwaysApply: false +--- + +# COMPREHENSIVE ARCHIVING FOR LEVEL 4 TASKS + +> **TL;DR:** This document outlines a comprehensive archiving approach for Level 4 (Complex System) tasks, ensuring all system knowledge, decisions, implementation details, and lessons learned are preserved for future reference and reuse. + +## ๐Ÿ” COMPREHENSIVE ARCHIVING OVERVIEW + +Level 4 Complex System tasks require thorough archiving to preserve system knowledge, design decisions, implementation details, and lessons learned. This systematic archiving process ensures that the organization maintains institutional knowledge and enables future teams to understand, maintain, and extend the system. + +```mermaid +flowchart TD + classDef phase fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef verification fill:#c5e8b7,stroke:#a5c897,color:#000 + + Start([Begin Archiving
Process]) --> Template[Load Comprehensive
Archive Template] + Template --> RefDoc[Review Reflection
Document] + RefDoc --> SysDoc[Create System
Documentation] + SysDoc --> ArchDoc[Document Architecture
and Design] + ArchDoc --> ImplDoc[Document Implementation
Details] + ImplDoc --> APIDoc[Create API
Documentation] + APIDoc --> DataDoc[Document Data
Models and Schemas] + DataDoc --> SecDoc[Document Security
Measures] + SecDoc --> TestDoc[Document Testing
Procedures and Results] + TestDoc --> DeployDoc[Document Deployment
Procedures] + DeployDoc --> OpDoc[Create Operational
Documentation] + OpDoc --> KnowledgeDoc[Create Knowledge
Transfer Documentation] + KnowledgeDoc --> CrossRef[Create Cross-Reference
Documentation] + CrossRef --> Archive[Archive All
Project Materials] + Archive --> UpdateMB[Update Memory
Bank] + UpdateMB --> Verification{Archiving
Verification} + Verification -->|Pass| Complete([Archiving
Complete]) + Verification -->|Fail| Revise[Revise
Archiving] + Revise --> Verification + + Template -.-> AT((Archive
Template)) + SysDoc -.-> SD((System
Documentation)) + ArchDoc -.-> AD((Architecture
Documentation)) + ImplDoc -.-> ID((Implementation
Documentation)) + APIDoc & DataDoc -.-> IntDoc((Interface
Documentation)) + TestDoc & DeployDoc & OpDoc -.-> OpDocs((Operational
Documentation)) + + class Start,Complete milestone + class Template,RefDoc,SysDoc,ArchDoc,ImplDoc,APIDoc,DataDoc,SecDoc,TestDoc,DeployDoc,OpDoc,KnowledgeDoc,CrossRef,Archive,UpdateMB step + class Verification verification + class AT,SD,AD,ID,IntDoc,OpDocs artifact +``` + +## ๐Ÿ“‹ ARCHIVE TEMPLATE STRUCTURE + +### 1. System Overview + +```markdown +## System Overview + +### System Purpose and Scope +[Comprehensive description of the system purpose, scope, and business context] + +### System Architecture +[Summary of the architecture, including diagrams, patterns, and key design decisions] + +### Key Components +- Component 1: [Description and purpose] +- Component 2: [Description and purpose] +- Component 3: [Description and purpose] + +### Integration Points +[Description of all internal and external integration points] + +### Technology Stack +[Comprehensive list of all technologies, frameworks, and tools used] + +### Deployment Environment +[Description of the deployment environment, infrastructure, and configuration] +``` + +### 2. Requirements and Design Documentation + +```markdown +## Requirements and Design Documentation + +### Business Requirements +[Comprehensive list of business requirements with traceability] + +### Functional Requirements +[Detailed functional requirements with implementation mapping] + +### Non-Functional Requirements +[Non-functional requirements with implementation approaches] + +### Architecture Decision Records +[Collection of all architecture decision records (ADRs)] + +### Design Patterns Used +[Catalog of all design patterns with usage examples] + +### Design Constraints +[Documentation of all design constraints and their impact] + +### Design Alternatives Considered +[Summary of alternatives considered and reasons for final selections] +``` + +### 3. Implementation Documentation + +```markdown +## Implementation Documentation + +### Component Implementation Details +- **Component 1**: + - **Purpose**: [Component purpose] + - **Implementation approach**: [Implementation details] + - **Key classes/modules**: [List with descriptions] + - **Dependencies**: [Internal and external dependencies] + - **Special considerations**: [Important notes] + +- **Component 2**: + - **Purpose**: [Component purpose] + - **Implementation approach**: [Implementation details] + - **Key classes/modules**: [List with descriptions] + - **Dependencies**: [Internal and external dependencies] + - **Special considerations**: [Important notes] + +### Key Files and Components Affected (from tasks.md) +[Summary or direct copy of file/component checklists from the original tasks.md for this project. This provides a quick reference to the scope of changes at a component/file level.] + +### Algorithms and Complex Logic +[Documentation of key algorithms and complex business logic] + +### Third-Party Integrations +[Details of all third-party integrations including APIs and libraries] + +### Configuration Parameters +[Complete listing of all configuration parameters and their purpose] + +### Build and Packaging Details +[Documentation of build process, packaging, and artifacts] +``` + +### 4. API Documentation + +```markdown +## API Documentation + +### API Overview +[High-level overview of all APIs (internal and external)] + +### API Endpoints +- **Endpoint 1**: + - **URL/Path**: [Endpoint URL or path] + - **Method**: [HTTP method] + - **Purpose**: [Purpose of the endpoint] + - **Request Format**: [Request format with examples] + - **Response Format**: [Response format with examples] + - **Error Codes**: [Possible error codes and meanings] + - **Security**: [Security considerations] + - **Rate Limits**: [Any rate limits] + - **Notes**: [Additional notes] + +- **Endpoint 2**: + - **URL/Path**: [Endpoint URL or path] + - **Method**: [HTTP method] + - **Purpose**: [Purpose of the endpoint] + - **Request Format**: [Request format with examples] + - **Response Format**: [Response format with examples] + - **Error Codes**: [Possible error codes and meanings] + - **Security**: [Security considerations] + - **Rate Limits**: [Any rate limits] + - **Notes**: [Additional notes] + +### API Authentication +[Authentication methods and implementation details] + +### API Versioning Strategy +[Versioning approach and migration strategy] + +### SDK or Client Libraries +[Available SDKs or client libraries with usage examples] +``` + +### 5. Data Model and Schema Documentation + +```markdown +## Data Model and Schema Documentation + +### Data Model Overview +[High-level overview of the data model with entity relationship diagrams] + +### Database Schema +[Detailed database schema with tables, columns, and relationships] + +### Data Dictionary +[Comprehensive data dictionary with all entities and attributes] + +### Data Validation Rules +[Data validation rules and enforcement mechanisms] + +### Data Migration Procedures +[Procedures for data migration and version management] + +### Data Archiving Strategy +[Strategy for data archiving and retention] +``` + +### 6. Security Documentation + +```markdown +## Security Documentation + +### Security Architecture +[Overview of security architecture and design principles] + +### Authentication and Authorization +[Detailed implementation of authentication and authorization] + +### Data Protection Measures +[Measures implemented to protect sensitive data] + +### Security Controls +[Technical and procedural security controls] + +### Vulnerability Management +[Approach to vulnerability management and patching] + +### Security Testing Results +[Summary of security testing and assessments] + +### Compliance Considerations +[Regulatory and compliance considerations addressed] +``` + +### 7. Testing Documentation + +```markdown +## Testing Documentation + +### Test Strategy +[Overall testing strategy and approach] + +### Test Cases +[Catalog of test cases with expected results] + +### Automated Tests +[Documentation of automated tests and frameworks] + +### Performance Test Results +[Results of performance testing with benchmarks] + +### Security Test Results +[Results of security testing with findings] + +### User Acceptance Testing +[UAT approach, scenarios, and results] + +### Known Issues and Limitations +[Documentation of known issues and system limitations] +``` + +### 8. Deployment Documentation + +```markdown +## Deployment Documentation + +### Deployment Architecture +[Detailed deployment architecture with diagrams] + +### Environment Configuration +[Configuration details for all environments] + +### Deployment Procedures +[Step-by-step deployment procedures] + +### Configuration Management +[Configuration management approach and tools] + +### Release Management +[Release management process and procedures] + +### Rollback Procedures +[Procedures for rolling back deployments] + +### Monitoring and Alerting +[Monitoring setup, metrics, and alerting configuration] +``` + +### 9. Operational Documentation + +```markdown +## Operational Documentation + +### Operating Procedures +[Day-to-day operational procedures] + +### Maintenance Tasks +[Routine maintenance tasks and schedules] + +### Troubleshooting Guide +[Guide for troubleshooting common issues] + +### Backup and Recovery +[Backup and recovery procedures] + +### Disaster Recovery +[Disaster recovery plan and procedures] + +### Performance Tuning +[Performance tuning guidelines and procedures] + +### SLAs and Metrics +[Service level agreements and key performance metrics] +``` + +### 10. Knowledge Transfer Documentation + +```markdown +## Knowledge Transfer Documentation + +### System Overview for New Team Members +[Concise system overview for onboarding] + +### Key Concepts and Terminology +[Glossary of key concepts and terminology] + +### Common Tasks and Procedures +[Guide to common tasks and procedures] + +### Frequently Asked Questions +[FAQs for system users and maintainers] + +### Training Materials +[Training materials for different roles] + +### Support Escalation Process +[Process for escalating support issues] + +### Further Reading and Resources +[Additional resources and documentation] +``` + +### 11. Project History and Learnings + +```markdown +## Project History and Learnings + +### Project Timeline +[Summary of the project timeline and key milestones] + +### Key Decisions and Rationale +[Record of key decisions and their rationale] + +### Challenges and Solutions +[Documentation of challenges faced and how they were addressed] + +### Lessons Learned +[Key lessons learned that might benefit future projects] + +### Performance Against Objectives +[Assessment of performance against original objectives] + +### Future Enhancements +[Potential future enhancements and extensions] +``` + +## ๐Ÿ“‹ ARCHIVING PROCESS + +### 1. Preparation + +```mermaid +flowchart TD + classDef step fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + + Start([Begin Archive
Preparation]) --> Template[Load Archive
Template] + Template --> Review[Review Project
Documentation] + Review --> Identify[Identify All
Artifacts] + Identify --> Gather[Gather All
Materials] + Gather --> Organize[Organize
Materials] + Organize --> Plan[Create Archiving
Plan] + Plan --> Resources[Allocate
Resources] + Resources --> Complete([Preparation
Complete]) + + Template -.-> AT((Archive
Template)) + Review -.-> ProjDocs((Project
Documentation)) + Identify -.-> ArtList((Artifact
List)) + Plan -.-> ArchPlan((Archiving
Plan)) + + class Start,Complete milestone + class Template,Review,Identify,Gather,Organize,Plan,Resources step + class AT,ProjDocs,ArtList,ArchPlan artifact +``` + +**Key Preparation Steps:** +1. Load the comprehensive archive template +2. Review all project documentation including reflection document +3. Identify all artifacts to be archived +4. Gather all materials from various sources +5. Organize materials according to the archive structure +6. Create a detailed archiving plan +7. Allocate resources for the archiving process + +### 2. Documentation Creation + +```mermaid +flowchart TD + classDef step fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + + Start([Begin Documentation
Creation]) --> System[Create System
Documentation] + System --> Req[Create Requirements
and Design Documentation] + Req --> Impl[Create Implementation
Documentation] + Impl --> API[Create API
Documentation] + API --> Data[Create Data Model
Documentation] + Data --> Security[Create Security
Documentation] + Security --> Test[Create Testing
Documentation] + Test --> Deploy[Create Deployment
Documentation] + Deploy --> Ops[Create Operational
Documentation] + Ops --> Knowledge[Create Knowledge Transfer
Documentation] + Knowledge --> History[Create Project History
Documentation] + History --> Review[Review All
Documentation] + Review --> Complete([Documentation
Creation Complete]) + + System -.-> SysDoc((System
Documentation)) + Req -.-> ReqDoc((Requirements
Documentation)) + Impl -.-> ImplDoc((Implementation
Documentation)) + API -.-> APIDoc((API
Documentation)) + Data -.-> DataDoc((Data Model
Documentation)) + Security -.-> SecDoc((Security
Documentation)) + Test -.-> TestDoc((Testing
Documentation)) + Deploy -.-> DeployDoc((Deployment
Documentation)) + Ops -.-> OpsDoc((Operational
Documentation)) + Knowledge -.-> KnowDoc((Knowledge Transfer
Documentation)) + History -.-> HistDoc((Project History
Documentation)) + + class Start,Complete milestone + class System,Req,Impl,API,Data,Security,Test,Deploy,Ops,Knowledge,History,Review step + class SysDoc,ReqDoc,ImplDoc,APIDoc,DataDoc,SecDoc,TestDoc,DeployDoc,OpsDoc,KnowDoc,HistDoc artifact +``` + +**Key Documentation Steps:** +1. Create comprehensive system documentation +2. Document requirements and design decisions +3. Document implementation details for all components +4. Create complete API documentation +5. Document data models and schemas +6. Document security measures and controls +7. Create thorough testing documentation +8. Document deployment procedures +9. Create operational documentation +10. Prepare knowledge transfer documentation +11. Document project history and learnings +12. Review all documentation for completeness and accuracy + +### 3. Archiving and Integration + +```mermaid +flowchart TD + classDef step fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef verification fill:#c5e8b7,stroke:#a5c897,color:#000 + + Start([Begin Archiving
and Integration]) --> Consolidate[Consolidate All
Documentation] + Consolidate --> CrossRef[Create Cross-Reference
Index] + CrossRef --> Version[Version All
Documentation] + Version --> Archive[Archive in
Repository] + Archive --> UpdateMB[Update Memory
Bank] + UpdateMB --> AccessControl[Establish Access
Controls] + AccessControl --> Announce[Announce
Availability] + Announce --> Verification{Archiving
Verification} + Verification -->|Pass| Complete([Archiving
Complete]) + Verification -->|Fail| Revise[Revise
Archiving] + Revise --> Verification + + Consolidate -.-> AllDocs((Consolidated
Documentation)) + CrossRef -.-> Index((Cross-Reference
Index)) + Archive -.-> Repo((Archive
Repository)) + UpdateMB -.-> MB((Updated Memory
Bank)) + + class Start,Complete milestone + class Consolidate,CrossRef,Version,Archive,UpdateMB,AccessControl,Announce,Revise step + class Verification verification + class AllDocs,Index,Repo,MB artifact +``` + +**Key Archiving Steps:** +1. Consolidate all documentation into a cohesive package +2. Create a cross-reference index linking all documentation +3. Version all documentation appropriately +4. Archive in the designated repository +5. Update Memory Bank with relevant information +6. Establish appropriate access controls +7. Announce availability to relevant stakeholders +8. Verify archiving completeness and accessibility + +## ๐Ÿ“‹ MEMORY BANK INTEGRATION + +```mermaid +flowchart TD + classDef memfile fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef process fill:#f9d77e,stroke:#d9b95c,color:#000 + + Archiving[Comprehensive
Archiving] --> PB[projectbrief.md] + Archiving --> PC[productContext.md] + Archiving --> AC[activeContext.md] + Archiving --> SP[systemPatterns.md] + Archiving --> TC[techContext.md] + Archiving --> P[progress.md] + + PB & PC & AC & SP & TC & P --> MBI[Memory Bank
Integration] + MBI --> Next[Repository of
Knowledge] + + class PB,PC,AC,SP,TC,P memfile + class Archiving,MBI,Next process +``` + +### Memory Bank Updates + +Specific updates to make to Memory Bank files: + +1. **projectbrief.md** + - Update with final system description + - Document completion status + - Include links to archived documentation + +2. **productContext.md** + - Update with final business context + - Document business value delivered + - Include links to requirements documentation + +3. **activeContext.md** + - Update with system status (completed) + - Document handover information + - Include links to operational documentation + +4. **systemPatterns.md** + - Update with final architecture patterns + - Document successful implementation patterns + - Include links to architecture documentation + +5. **techContext.md** + - Update with final technology stack + - Document integration points + - Include links to technical documentation + +6. **progress.md** + - Update with final project status + - Document completion metrics + - Include links to project history documentation + +## ๐Ÿ“‹ ARCHIVING VERIFICATION CHECKLIST + +``` +โœ“ ARCHIVING VERIFICATION CHECKLIST + +System Documentation +- System overview complete? [YES/NO] +- Architecture documented with diagrams? [YES/NO] +- Key components documented? [YES/NO] +- Integration points documented? [YES/NO] + +Requirements and Design +- Business requirements documented? [YES/NO] +- Functional requirements documented? [YES/NO] +- Architecture decisions documented? [YES/NO] +- Design patterns documented? [YES/NO] + +Implementation +- Component implementation details documented? [YES/NO] +- Key algorithms documented? [YES/NO] +- Third-party integrations documented? [YES/NO] +- Configuration parameters documented? [YES/NO] + +API Documentation +- API endpoints documented? [YES/NO] +- Request/response formats documented? [YES/NO] +- Authentication documented? [YES/NO] +- Error handling documented? [YES/NO] + +Data Documentation +- Data model documented? [YES/NO] +- Database schema documented? [YES/NO] +- Data dictionary provided? [YES/NO] +- Data validation rules documented? [YES/NO] + +Security Documentation +- Security architecture documented? [YES/NO] +- Authentication/authorization documented? [YES/NO] +- Data protection measures documented? [YES/NO] +- Security testing results documented? [YES/NO] + +Testing Documentation +- Test strategy documented? [YES/NO] +- Test cases documented? [YES/NO] +- Test results documented? [YES/NO] +- Known issues documented? [YES/NO] + +Deployment Documentation +- Deployment architecture documented? [YES/NO] +- Environment configurations documented? [YES/NO] +- Deployment procedures documented? [YES/NO] +- Rollback procedures documented? [YES/NO] + +Operational Documentation +- Operating procedures documented? [YES/NO] +- Troubleshooting guide provided? [YES/NO] +- Backup and recovery documented? [YES/NO] +- Monitoring configuration documented? [YES/NO] + +Knowledge Transfer +- Onboarding overview provided? [YES/NO] +- Key concepts documented? [YES/NO] +- Common tasks documented? [YES/NO] +- FAQs provided? [YES/NO] + +Project History +- Project timeline documented? [YES/NO] +- Key decisions documented? [YES/NO] +- Lessons learned documented? [YES/NO] +- Future enhancements suggested? [YES/NO] + +Memory Bank Integration +- All Memory Bank files updated? [YES/NO] +- Cross-references created? [YES/NO] +- Documentation properly versioned? [YES/NO] +- Archive repository established? [YES/NO] +``` + +## ๐Ÿ“‹ MINIMAL MODE ARCHIVING FORMAT + +For situations requiring a more compact archiving approach: + +```markdown +## Level 4 Task Archive: [System Name] + +### System Summary +- **Purpose**: [Brief description of system purpose] +- **Key Components**: [List of key components] +- **Architecture**: [Brief architecture description with diagram] + +### Implementation Summary +- **Technology Stack**: [Key technologies used] +- **Key Modules**: [Brief description of important modules] +- **Integration Points**: [List of major integration points] + +### Critical Documentation +- **API Documentation**: [Link or brief summary] +- **Data Model**: [Link or brief description] +- **Deployment Configuration**: [Link or brief description] +- **Security Measures**: [Link or brief summary] + +### Operational Information +- **Deployment Procedure**: [Link or brief description] +- **Key Configuration Parameters**: [List of important parameters] +- **Monitoring Setup**: [Brief monitoring details] +- **Common Issues**: [List of common issues with solutions] + +### Repository Information +- **Code Repository**: [Link to repository] +- **Documentation Repository**: [Link to documentation] +- **Build Artifacts**: [Link to build artifacts] + +### Knowledge Transfer Summary +- **Key Contacts**: [List of key people with knowledge] +- **Critical Knowledge Areas**: [Areas requiring special expertise] +- **Training Resources**: [Links to training materials] + +### Memory Bank Links +- [Links to updated Memory Bank files] +``` + +## ๐Ÿšจ ARCHIVING ENFORCEMENT PRINCIPLE + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ COMPREHENSIVE ARCHIVING IS MANDATORY for Level 4 โ”‚ +โ”‚ tasks. No complex system is considered complete โ”‚ +โ”‚ until comprehensive archiving is finished and โ”‚ +โ”‚ verified. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` diff --git a/.cursor/rules/isolation_rules/Level4/phased-implementation.mdc b/.cursor/rules/isolation_rules/Level4/phased-implementation.mdc new file mode 100644 index 0000000..9c12beb --- /dev/null +++ b/.cursor/rules/isolation_rules/Level4/phased-implementation.mdc @@ -0,0 +1,655 @@ +--- +description: Phased Implementation for Level 4 Complex System tasks +globs: "**/level4/**", "**/implementation/**" +alwaysApply: false +--- + +# PHASED IMPLEMENTATION FOR LEVEL 4 TASKS + +> **TL;DR:** This document outlines a structured phased implementation approach for Level 4 (Complex System) tasks, ensuring controlled, incremental delivery of complex systems with appropriate verification at each phase. + +## ๐Ÿ” PHASED IMPLEMENTATION OVERVIEW + +Level 4 Complex System tasks require a controlled, incremental approach to implementation to manage complexity, reduce risk, and ensure quality. This document outlines a phased implementation methodology that divides complex system development into discrete, verifiable phases with clear entry and exit criteria. + +```mermaid +flowchart TD + classDef phase fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef verification fill:#c5e8b7,stroke:#a5c897,color:#000 + + Start([Begin Implementation
Process]) --> Framework[Establish Implementation
Framework] + Framework --> Plan[Create Phasing
Plan] + Plan --> Foundation[Implement
Foundation Phase] + Foundation --> VerifyF{Foundation
Verification} + VerifyF -->|Pass| Core[Implement
Core Phase] + VerifyF -->|Fail| ReviseF[Revise
Foundation] + ReviseF --> VerifyF + + Core --> VerifyC{Core
Verification} + VerifyC -->|Pass| Extension[Implement
Extension Phase] + VerifyC -->|Fail| ReviseC[Revise
Core] + ReviseC --> VerifyC + + Extension --> VerifyE{Extension
Verification} + VerifyE -->|Pass| Integration[Implement
Integration Phase] + VerifyE -->|Fail| ReviseE[Revise
Extension] + ReviseE --> VerifyE + + Integration --> VerifyI{Integration
Verification} + VerifyI -->|Pass| Finalization[Implement
Finalization Phase] + VerifyI -->|Fail| ReviseI[Revise
Integration] + ReviseI --> VerifyI + + Finalization --> VerifyFin{Finalization
Verification} + VerifyFin -->|Pass| Complete([Implementation
Complete]) + VerifyFin -->|Fail| ReviseFin[Revise
Finalization] + ReviseFin --> VerifyFin + + Framework -.-> IF((Implementation
Framework)) + Plan -.-> PP((Phasing
Plan)) + Foundation -.-> FP((Foundation
Phase)) + Core -.-> CP((Core
Phase)) + Extension -.-> EP((Extension
Phase)) + Integration -.-> IP((Integration
Phase)) + Finalization -.-> FiP((Finalization
Phase)) + + class Start,Complete milestone + class Framework,Plan,Foundation,Core,Extension,Integration,Finalization,ReviseF,ReviseC,ReviseE,ReviseI,ReviseFin step + class VerifyF,VerifyC,VerifyE,VerifyI,VerifyFin verification + class IF,PP,FP,CP,EP,IP,FiP artifact +``` + +## ๐Ÿ“‹ IMPLEMENTATION PHASING PRINCIPLES + +1. **Incremental Value Delivery**: Each phase delivers tangible, verifiable value. +2. **Progressive Complexity**: Complexity increases gradually across phases. +3. **Risk Mitigation**: Early phases address high-risk elements to fail fast if needed. +4. **Verification Gates**: Each phase has explicit entry and exit criteria. +5. **Business Alignment**: Phases align with business priorities and user needs. +6. **Technical Integrity**: Each phase maintains architectural and technical integrity. +7. **Continuous Integration**: Work is continuously integrated and tested. +8. **Knowledge Building**: Each phase builds upon knowledge gained in previous phases. +9. **Explicit Dependencies**: Dependencies between phases are clearly documented. +10. **Adaptability**: The phasing plan can adapt to new information while maintaining structure. + +## ๐Ÿ“‹ STANDARD IMPLEMENTATION PHASES + +Level 4 Complex System tasks typically follow a five-phase implementation approach: + +```mermaid +flowchart LR + classDef phase fill:#f9d77e,stroke:#d9b95c,color:#000 + + P1[1. Foundation
Phase] --> P2[2. Core
Phase] + P2 --> P3[3. Extension
Phase] + P3 --> P4[4. Integration
Phase] + P4 --> P5[5. Finalization
Phase] + + class P1,P2,P3,P4,P5 phase +``` + +### Phase 1: Foundation Phase + +The Foundation Phase establishes the basic architecture and infrastructure required for the system. + +**Key Activities:** +- Set up development, testing, and deployment environments +- Establish core architectural components and patterns +- Implement database schema and basic data access +- Create skeleton application structure +- Implement authentication and authorization framework +- Establish logging, monitoring, and error handling +- Create basic CI/CD pipeline + +**Exit Criteria:** +- Basic architectural framework is functional +- Environment setup is complete and documented +- Core infrastructure components are in place +- Basic CI/CD pipeline is operational +- Architecture review confirms alignment with design + +### Phase 2: Core Phase + +The Core Phase implements the essential functionality that provides the minimum viable system. + +**Key Activities:** +- Implement core business logic +- Develop primary user flows and interfaces +- Create essential system services +- Implement critical API endpoints +- Develop basic reporting capabilities +- Establish primary integration points +- Create automated tests for core functionality + +**Exit Criteria:** +- Core business functionality is implemented +- Essential user flows are working +- Primary APIs are functional +- Core automated tests are passing +- Business stakeholders verify core functionality + +### Phase 3: Extension Phase + +The Extension Phase adds additional features and capabilities to the core system. + +**Key Activities:** +- Implement secondary business processes +- Add additional user interfaces and features +- Enhance existing functionality based on feedback +- Implement advanced features +- Extend integration capabilities +- Enhance error handling and edge cases +- Expand test coverage + +**Exit Criteria:** +- All planned features are implemented +- Extended functionality is working correctly +- Secondary business processes are functional +- Enhanced features have been validated +- Test coverage meets defined thresholds + +### Phase 4: Integration Phase + +The Integration Phase ensures all components work together properly and integrates with external systems. + +**Key Activities:** +- Perform deep integration testing +- Implement all external system integrations +- Conduct end-to-end testing +- Perform performance and load testing +- Conduct security testing +- Implement any required data migrations +- Verify system behavior under various conditions + +**Exit Criteria:** +- All integrations are working correctly +- End-to-end tests are passing +- Performance meets defined requirements +- Security tests show no critical vulnerabilities +- System handles error conditions gracefully + +### Phase 5: Finalization Phase + +The Finalization Phase prepares the system for production release. + +**Key Activities:** +- Optimize performance +- Conduct user acceptance testing +- Finalize documentation +- Conduct final security review +- Create production deployment plan +- Prepare support materials and training +- Conduct final system review + +**Exit Criteria:** +- All acceptance criteria are met +- Documentation is complete +- User acceptance testing is successful +- Production deployment plan is approved +- Support and maintenance procedures are established + +## ๐Ÿ“‹ PHASE PLANNING TEMPLATE + +For each implementation phase, create a detailed plan using this template: + +```markdown +## [Phase Name] Implementation Plan + +### Phase Overview +- **Purpose**: [Brief description of phase purpose] +- **Timeline**: [Start and end dates] +- **Dependencies**: [Dependencies on other phases or external factors] +- **Key Stakeholders**: [List of key stakeholders for this phase] + +### Entry Criteria +- [ ] [Criterion 1] +- [ ] [Criterion 2] +- [ ] [Criterion 3] + +### Implementation Components +- **Component 1**: [Description] + - [ ] Task 1.1: [Description] + - [ ] Task 1.2: [Description] + +- **Component 2**: [Description] + - [ ] Task 2.1: [Description] + - [ ] Task 2.2: [Description] + +### Technical Considerations +- [Key technical considerations for this phase] + +### Risk Assessment +- **Risk 1**: [Description] + - Impact: [High/Medium/Low] + - Mitigation: [Strategy] + +- **Risk 2**: [Description] + - Impact: [High/Medium/Low] + - Mitigation: [Strategy] + +### Quality Assurance +- [QA approach for this phase] +- [Testing requirements] + +### Exit Criteria +- [ ] [Criterion 1] +- [ ] [Criterion 2] +- [ ] [Criterion 3] + +### Deliverables +- [List of deliverables for this phase] +``` + +## ๐Ÿ“‹ PHASE VERIFICATION + +Each phase requires formal verification before proceeding to the next phase. + +```mermaid +flowchart TD + classDef activity fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef decision fill:#c5e8b7,stroke:#a5c897,color:#000 + + Start([Begin Phase
Verification]) --> CodeReview[Conduct Code
Review] + CodeReview --> TestExecution[Execute Automated
Tests] + TestExecution --> QAVerification[Perform QA
Verification] + QAVerification --> ArchReview[Conduct Architecture
Review] + ArchReview --> StakeholderReview[Conduct Stakeholder
Review] + StakeholderReview --> Checklist[Complete Verification
Checklist] + Checklist --> ExitCriteria{All Exit
Criteria Met?} + ExitCriteria -->|Yes| Approval[Obtain Phase
Approval] + ExitCriteria -->|No| Issues[Document
Issues] + Issues --> Remediation[Implement
Remediation] + Remediation --> Retest[Verify
Fixes] + Retest --> ExitCriteria + Approval --> Complete([Verification
Complete]) + + CodeReview -.-> CodeReport((Code Review
Report)) + TestExecution -.-> TestReport((Test
Report)) + QAVerification -.-> QAReport((QA
Report)) + ArchReview -.-> ArchReport((Architecture
Report)) + StakeholderReview -.-> StakeReport((Stakeholder
Report)) + Checklist -.-> CheckDoc((Verification
Checklist)) + + class Start,Complete milestone + class CodeReview,TestExecution,QAVerification,ArchReview,StakeholderReview,Checklist,Approval,Issues,Remediation,Retest activity + class ExitCriteria decision + class CodeReport,TestReport,QAReport,ArchReport,StakeReport,CheckDoc artifact +``` + +### Phase Verification Checklist Template + +```markdown +## Phase Verification Checklist + +### Implementation Completeness +- [ ] All planned components implemented +- [ ] All tasks marked as complete +- [ ] No outstanding TODOs in code +- [ ] All documentation updated + +### Code Quality +- [ ] Code review completed +- [ ] No critical issues found in static analysis +- [ ] Code meets established standards +- [ ] Technical debt documented + +### Testing +- [ ] Unit tests completed and passing +- [ ] Integration tests completed and passing +- [ ] End-to-end tests completed and passing +- [ ] Performance testing completed (if applicable) +- [ ] Security testing completed (if applicable) +- [ ] Test coverage meets requirements + +### Architecture +- [ ] Implementation follows architectural design +- [ ] No architectural violations introduced +- [ ] Technical patterns correctly implemented +- [ ] Non-functional requirements met + +### Stakeholder Verification +- [ ] Business requirements met +- [ ] Stakeholder demo completed +- [ ] Feedback incorporated +- [ ] Acceptance criteria verified + +### Risk Assessment +- [ ] All identified risks addressed +- [ ] No new risks introduced +- [ ] Contingency plans in place for known issues + +### Exit Criteria +- [ ] All exit criteria met +- [ ] Any exceptions documented and approved +- [ ] Phase signoff obtained from required parties +``` + +## ๐Ÿ“‹ HANDLING PHASE DEPENDENCIES + +```mermaid +flowchart TD + classDef solid fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef partial fill:#a8d5ff,stroke:#88b5e0,color:#000 + + F[Foundation
Phase] --> C[Core
Phase] + F --> E[Extension
Phase] + F --> I[Integration
Phase] + F --> FN[Finalization
Phase] + + C --> E + C --> I + C --> FN + + E --> I + E --> FN + + I --> FN + + class F,C solid + class E,I,FN partial +``` + +### Dependency Management Strategies + +1. **Vertical Slicing**: Implement complete features across all phases for priority functionality. +2. **Stubbing and Mocking**: Create temporary implementations to allow progress on dependent components. +3. **Interface Contracts**: Define clear interfaces between components to allow parallel development. +4. **Feature Toggles**: Implement features but keep them disabled until dependencies are ready. +5. **Incremental Integration**: Gradually integrate components as they become available. + +### Dependency Documentation Format + +```markdown +## Implementation Dependencies + +### Foundation Phase Dependencies +- **External Dependencies**: + - Development environment setup + - Access to source control + - Access to CI/CD pipeline + +### Core Phase Dependencies +- **Foundation Phase Dependencies**: + - Authentication framework + - Database schema + - Logging infrastructure + - Basic application skeleton + +- **External Dependencies**: + - API specifications from external systems + - Test data + +### Extension Phase Dependencies +- **Core Phase Dependencies**: + - Core business logic + - Primary user interface + - Essential services + +- **External Dependencies**: + - [List external dependencies] + +### Integration Phase Dependencies +- **Core Phase Dependencies**: + - [List core dependencies] + +- **Extension Phase Dependencies**: + - [List extension dependencies] + +- **External Dependencies**: + - Access to integration test environments + - Test credentials for external systems + +### Finalization Phase Dependencies +- **All previous phases must be complete** +- **External Dependencies**: + - User acceptance testing environment + - Production deployment approval +``` + +## ๐Ÿ“‹ PHASE TRANSITION PROCESS + +```mermaid +flowchart TD + classDef step fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef verification fill:#c5e8b7,stroke:#a5c897,color:#000 + + Start([Begin Phase
Transition]) --> Verification[Verify Current
Phase Complete] + Verification --> Checkpoint{Phase
Verified?} + Checkpoint -->|No| Remediation[Remediate
Issues] + Remediation --> Verification + Checkpoint -->|Yes| Documentation[Update
Documentation] + Documentation --> Reflection[Conduct Phase
Reflection] + Reflection --> NextPlan[Finalize Next
Phase Plan] + NextPlan --> Approvals[Obtain
Approvals] + Approvals --> Kickoff[Conduct Next
Phase Kickoff] + Kickoff --> End([Begin Next
Phase]) + + Verification -.-> VerifDoc((Verification
Checklist)) + Documentation -.-> Docs((Updated
Documentation)) + Reflection -.-> ReflectDoc((Reflection
Document)) + NextPlan -.-> PlanDoc((Phase
Plan)) + + class Start,End milestone + class Verification,Remediation,Documentation,Reflection,NextPlan,Approvals,Kickoff step + class Checkpoint verification + class VerifDoc,Docs,ReflectDoc,PlanDoc artifact +``` + +### Phase Transition Checklist + +```markdown +## Phase Transition Checklist + +### Current Phase Closure +- [ ] All exit criteria met and documented +- [ ] All verification steps completed +- [ ] All issues resolved or documented +- [ ] Phase retrospective completed + +### Documentation Updates +- [ ] Technical documentation updated +- [ ] User documentation updated +- [ ] Architecture documentation updated +- [ ] Test documentation updated + +### Knowledge Transfer +- [ ] Lessons learned documented +- [ ] Knowledge shared with team +- [ ] Training conducted if needed + +### Next Phase Preparation +- [ ] Next phase plan reviewed and updated +- [ ] Resources aligned +- [ ] Dependencies verified +- [ ] Entry criteria confirmed + +### Approvals +- [ ] Technical lead approval +- [ ] Business stakeholder approval +- [ ] Project management approval +``` + +## ๐Ÿ“‹ IMPLEMENTATION TRACKING IN TASKS.MD + +Update `tasks.md` to track phased implementation progress: + +```markdown +## [SYSTEM-ID]: System Name + +### Implementation Phases +#### 1. Foundation Phase +- **Status**: [Not Started/In Progress/Complete] +- **Progress**: [0-100%] +- **Start Date**: [Date] +- **Target Completion**: [Date] +- **Actual Completion**: [Date] + +**Key Components**: +- [ ] Component 1: [Status] - [Progress %] +- [ ] Component 2: [Status] - [Progress %] + +**Verification Status**: +- [ ] Code Review: [Status] +- [ ] Testing: [Status] +- [ ] Architecture Review: [Status] +- [ ] Stakeholder Approval: [Status] + +**Issues/Blockers**: +- [List of issues if any] + +#### 2. Core Phase +... + +#### 3. Extension Phase +... + +#### 4. Integration Phase +... + +#### 5. Finalization Phase +... +``` + +## ๐Ÿ“‹ MEMORY BANK INTEGRATION + +```mermaid +flowchart TD + classDef memfile fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef process fill:#f9d77e,stroke:#d9b95c,color:#000 + + Implementation[Phased
Implementation] --> PB[projectbrief.md] + Implementation --> PC[productContext.md] + Implementation --> AC[activeContext.md] + Implementation --> SP[systemPatterns.md] + Implementation --> TC[techContext.md] + Implementation --> P[progress.md] + + PB & PC & AC & SP & TC & P --> MBI[Memory Bank
Integration] + MBI --> Implementation + + class PB,PC,AC,SP,TC,P memfile + class Implementation,MBI process +``` + +### Memory Bank Updates + +Update the following Memory Bank files during phased implementation: + +1. **projectbrief.md** + - Update implementation approach + - Document phase-specific objectives + - Link to phase plans + +2. **activeContext.md** + - Update with current implementation phase + - Document active implementation tasks + - Highlight current focus areas + +3. **systemPatterns.md** + - Document implementation patterns used + - Update with architectural decisions made during implementation + - Record any pattern adaptations + +4. **techContext.md** + - Update with implementation technologies + - Document technical constraints encountered + - Record technical decisions made + +5. **progress.md** + - Update implementation progress by phase + - Document completed components + - Track overall implementation status + +## ๐Ÿ“‹ IMPLEMENTATION VERIFICATION CHECKLIST + +``` +โœ“ IMPLEMENTATION VERIFICATION CHECKLIST + +Planning +- Implementation framework established? [YES/NO] +- Phasing plan created? [YES/NO] +- Phase dependencies documented? [YES/NO] +- Entry/exit criteria defined for all phases? [YES/NO] +- Risk assessment performed? [YES/NO] + +Foundation Phase +- Environment setup complete? [YES/NO] +- Core architecture implemented? [YES/NO] +- Basic infrastructure in place? [YES/NO] +- CI/CD pipeline operational? [YES/NO] +- Foundation verification completed? [YES/NO] + +Core Phase +- Core business logic implemented? [YES/NO] +- Primary user flows working? [YES/NO] +- Essential services operational? [YES/NO] +- Core APIs implemented? [YES/NO] +- Core verification completed? [YES/NO] + +Extension Phase +- Secondary features implemented? [YES/NO] +- Enhanced functionality working? [YES/NO] +- Additional user interfaces complete? [YES/NO] +- Extended test coverage in place? [YES/NO] +- Extension verification completed? [YES/NO] + +Integration Phase +- All components integrated? [YES/NO] +- External integrations working? [YES/NO] +- End-to-end testing completed? [YES/NO] +- Performance testing executed? [YES/NO] +- Integration verification completed? [YES/NO] + +Finalization Phase +- All optimizations complete? [YES/NO] +- User acceptance testing passed? [YES/NO] +- Documentation finalized? [YES/NO] +- Production deployment plan ready? [YES/NO] +- Final system review completed? [YES/NO] + +Memory Bank Integration +- All Memory Bank files updated? [YES/NO] +- Implementation status reflected? [YES/NO] +- Technical decisions documented? [YES/NO] +- Progress tracking current? [YES/NO] +``` + +## ๐Ÿ“‹ MINIMAL MODE IMPLEMENTATION FORMAT + +For situations requiring a more compact implementation approach: + +```markdown +## [SYSTEM-ID]: Phased Implementation + +### Phase Status Summary +- **Foundation**: [Status] - [Progress %] +- **Core**: [Status] - [Progress %] +- **Extension**: [Status] - [Progress %] +- **Integration**: [Status] - [Progress %] +- **Finalization**: [Status] - [Progress %] + +### Current Phase: [Phase Name] +- **Key Components**: [List of key components being implemented] +- **Blockers**: [List of blockers if any] +- **Next Steps**: [List of immediate next steps] + +### Verification Status +- [List of verification steps and their status] + +### Memory Bank Updates +- [List of Memory Bank files that need updating] +``` + +## ๐Ÿšจ IMPLEMENTATION VERIFICATION PRINCIPLE + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ NO PHASE IS CONSIDERED COMPLETE until all โ”‚ +โ”‚ verification steps have been passed and documented. โ”‚ +โ”‚ Phases MUST NOT be rushed to meet deadlines at the โ”‚ +โ”‚ expense of quality or architectural integrity. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level4/reflection-comprehensive.mdc b/.cursor/rules/isolation_rules/Level4/reflection-comprehensive.mdc new file mode 100644 index 0000000..36fab9a --- /dev/null +++ b/.cursor/rules/isolation_rules/Level4/reflection-comprehensive.mdc @@ -0,0 +1,719 @@ +--- +description: Comprehensive reflection format for Level 4 Complex System tasks +globs: "**/level4/**", "**/reflection/**" +alwaysApply: false +--- + +# COMPREHENSIVE REFLECTION FOR LEVEL 4 TASKS + +> **TL;DR:** This document outlines a structured, comprehensive approach to reflection for Level 4 (Complex System) tasks, including system review, success and challenge analysis, strategic insights, and action planning. + +## ๐Ÿ” COMPREHENSIVE REFLECTION OVERVIEW + +Level 4 Complex System tasks require in-depth reflection to capture key insights, document successes and challenges, extract strategic lessons, and guide future improvements. This systematic reflection process ensures organizational learning and continuous improvement. + +```mermaid +flowchart TD + classDef phase fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef verification fill:#c5e8b7,stroke:#a5c897,color:#000 + + Start([Begin Reflection
Process]) --> Template[Load Comprehensive
Reflection Template] + Template --> SysReview[Conduct System
Review] + SysReview --> ArchReview[Review Architecture
Decisions] + ArchReview --> ImplementReview[Review Implementation
Approach] + ImplementReview --> SuccessAnalysis[Document Successes
and Achievements] + SuccessAnalysis --> ChallengeAnalysis[Document Challenges
and Solutions] + ChallengeAnalysis --> Technical[Extract Technical
Insights] + Technical --> Process[Extract Process
Insights] + Process --> Business[Extract Business
Insights] + Business --> Strategic[Define Strategic
Actions] + Strategic --> Timeline[Analyze Timeline
Performance] + Timeline --> Documentation[Complete Reflection
Documentation] + Documentation --> Integration[Integrate with
Memory Bank] + Integration --> Verification{Reflection
Verification} + Verification -->|Pass| Complete([Reflection
Complete]) + Verification -->|Fail| Revise[Revise
Reflection] + Revise --> Verification + + Template -.-> RT((Reflection
Template)) + SysReview -.-> SR((System
Review)) + SuccessAnalysis & ChallengeAnalysis -.-> SCD((Success/Challenge
Document)) + Technical & Process & Business -.-> Insights((Insight
Document)) + Strategic -.-> Actions((Strategic
Actions)) + + class Start,Complete milestone + class Template,SysReview,ArchReview,ImplementReview,SuccessAnalysis,ChallengeAnalysis,Technical,Process,Business,Strategic,Timeline,Documentation,Integration step + class Verification verification + class RT,SR,SCD,Insights,Actions artifact +``` + +## ๐Ÿ“‹ REFLECTION TEMPLATE STRUCTURE + +### 1. System Overview + +```markdown +## System Overview + +### System Description +[Comprehensive description of the implemented system, including purpose, scope, and key features] + +### System Context +[Description of how the system fits into the broader technical and business ecosystem] + +### Key Components +- Component 1: [Description and purpose] +- Component 2: [Description and purpose] +- Component 3: [Description and purpose] + +### System Architecture +[Summary of the architectural approach, key patterns, and design decisions] + +### System Boundaries +[Description of system boundaries, interfaces, and integration points] + +### Implementation Summary +[Overview of the implementation approach, technologies, and methods used] +``` + +### 2. Project Performance Analysis + +```markdown +## Project Performance Analysis + +### Timeline Performance +- **Planned Duration**: [X] weeks/months +- **Actual Duration**: [Y] weeks/months +- **Variance**: [+/-Z] weeks/months ([P]%) +- **Explanation**: [Analysis of timeline variances] + +### Resource Utilization +- **Planned Resources**: [X] person-months +- **Actual Resources**: [Y] person-months +- **Variance**: [+/-Z] person-months ([P]%) +- **Explanation**: [Analysis of resource variances] + +### Quality Metrics +- **Planned Quality Targets**: [List of quality targets] +- **Achieved Quality Results**: [List of achieved quality results] +- **Variance Analysis**: [Analysis of quality variances] + +### Risk Management Effectiveness +- **Identified Risks**: [Number of risks identified] +- **Risks Materialized**: [Number and percentage of risks that occurred] +- **Mitigation Effectiveness**: [Effectiveness of risk mitigation strategies] +- **Unforeseen Risks**: [Description of unforeseen risks that emerged] +``` + +### 3. Achievements and Successes + +```markdown +## Achievements and Successes + +### Key Achievements +1. **Achievement 1**: [Description] + - **Evidence**: [Concrete evidence of success] + - **Impact**: [Business/technical impact] + - **Contributing Factors**: [What enabled this success] + +2. **Achievement 2**: [Description] + - **Evidence**: [Concrete evidence of success] + - **Impact**: [Business/technical impact] + - **Contributing Factors**: [What enabled this success] + +### Technical Successes +- **Success 1**: [Description of technical success] + - **Approach Used**: [Description of approach] + - **Outcome**: [Results achieved] + - **Reusability**: [How this can be reused] + +- **Success 2**: [Description of technical success] + - **Approach Used**: [Description of approach] + - **Outcome**: [Results achieved] + - **Reusability**: [How this can be reused] + +### Process Successes +- **Success 1**: [Description of process success] + - **Approach Used**: [Description of approach] + - **Outcome**: [Results achieved] + - **Reusability**: [How this can be reused] + +### Team Successes +- **Success 1**: [Description of team success] + - **Approach Used**: [Description of approach] + - **Outcome**: [Results achieved] + - **Reusability**: [How this can be reused] +``` + +### 4. Challenges and Solutions + +```markdown +## Challenges and Solutions + +### Key Challenges +1. **Challenge 1**: [Description] + - **Impact**: [Business/technical impact] + - **Resolution Approach**: [How it was addressed] + - **Outcome**: [Final result] + - **Preventative Measures**: [How to prevent in future] + +2. **Challenge 2**: [Description] + - **Impact**: [Business/technical impact] + - **Resolution Approach**: [How it was addressed] + - **Outcome**: [Final result] + - **Preventative Measures**: [How to prevent in future] + +### Technical Challenges +- **Challenge 1**: [Description of technical challenge] + - **Root Cause**: [Analysis of root cause] + - **Solution**: [How it was solved] + - **Alternative Approaches**: [Other approaches considered] + - **Lessons Learned**: [Key takeaways] + +- **Challenge 2**: [Description of technical challenge] + - **Root Cause**: [Analysis of root cause] + - **Solution**: [How it was solved] + - **Alternative Approaches**: [Other approaches considered] + - **Lessons Learned**: [Key takeaways] + +### Process Challenges +- **Challenge 1**: [Description of process challenge] + - **Root Cause**: [Analysis of root cause] + - **Solution**: [How it was solved] + - **Process Improvements**: [Improvements made or suggested] + +### Unresolved Issues +- **Issue 1**: [Description of unresolved issue] + - **Current Status**: [Status] + - **Proposed Path Forward**: [Suggested next steps] + - **Required Resources**: [What's needed to resolve] +``` + +### 5. Technical Insights + +```markdown +## Technical Insights + +### Architecture Insights +- **Insight 1**: [Description of architectural insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested changes or actions] + +- **Insight 2**: [Description of architectural insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested changes or actions] + +### Implementation Insights +- **Insight 1**: [Description of implementation insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested changes or actions] + +### Technology Stack Insights +- **Insight 1**: [Description of technology stack insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested changes or actions] + +### Performance Insights +- **Insight 1**: [Description of performance insight] + - **Context**: [When/where this was observed] + - **Metrics**: [Relevant performance metrics] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested optimizations] + +### Security Insights +- **Insight 1**: [Description of security insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested security improvements] +``` + +### 6. Process Insights + +```markdown +## Process Insights + +### Planning Insights +- **Insight 1**: [Description of planning process insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested process improvements] + +### Development Process Insights +- **Insight 1**: [Description of development process insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested process improvements] + +### Testing Insights +- **Insight 1**: [Description of testing process insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested process improvements] + +### Collaboration Insights +- **Insight 1**: [Description of collaboration insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested collaboration improvements] + +### Documentation Insights +- **Insight 1**: [Description of documentation insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for future work] + - **Recommendations**: [Suggested documentation improvements] +``` + +### 7. Business Insights + +```markdown +## Business Insights + +### Value Delivery Insights +- **Insight 1**: [Description of value delivery insight] + - **Context**: [When/where this was observed] + - **Business Impact**: [Impact on business outcomes] + - **Recommendations**: [Suggested improvements] + +### Stakeholder Insights +- **Insight 1**: [Description of stakeholder insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for stakeholder management] + - **Recommendations**: [Suggested improvements] + +### Market/User Insights +- **Insight 1**: [Description of market/user insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for product direction] + - **Recommendations**: [Suggested improvements] + +### Business Process Insights +- **Insight 1**: [Description of business process insight] + - **Context**: [When/where this was observed] + - **Implications**: [What this means for business processes] + - **Recommendations**: [Suggested improvements] +``` + +### 8. Strategic Actions + +```markdown +## Strategic Actions + +### Immediate Actions +- **Action 1**: [Description of immediate action] + - **Owner**: [Person responsible] + - **Timeline**: [Expected completion date] + - **Success Criteria**: [How to measure success] + - **Resources Required**: [What's needed] + - **Priority**: [High/Medium/Low] + +- **Action 2**: [Description of immediate action] + - **Owner**: [Person responsible] + - **Timeline**: [Expected completion date] + - **Success Criteria**: [How to measure success] + - **Resources Required**: [What's needed] + - **Priority**: [High/Medium/Low] + +### Short-Term Improvements (1-3 months) +- **Improvement 1**: [Description of short-term improvement] + - **Owner**: [Person responsible] + - **Timeline**: [Expected completion date] + - **Success Criteria**: [How to measure success] + - **Resources Required**: [What's needed] + - **Priority**: [High/Medium/Low] + +### Medium-Term Initiatives (3-6 months) +- **Initiative 1**: [Description of medium-term initiative] + - **Owner**: [Person responsible] + - **Timeline**: [Expected completion date] + - **Success Criteria**: [How to measure success] + - **Resources Required**: [What's needed] + - **Priority**: [High/Medium/Low] + +### Long-Term Strategic Directions (6+ months) +- **Direction 1**: [Description of long-term strategic direction] + - **Business Alignment**: [How this aligns with business strategy] + - **Expected Impact**: [Anticipated outcomes] + - **Key Milestones**: [Major checkpoints] + - **Success Criteria**: [How to measure success] +``` + +### 9. Knowledge Transfer + +```markdown +## Knowledge Transfer + +### Key Learnings for Organization +- **Learning 1**: [Description of key organizational learning] + - **Context**: [When/where this was learned] + - **Applicability**: [Where this can be applied] + - **Suggested Communication**: [How to share this] + +### Technical Knowledge Transfer +- **Technical Knowledge 1**: [Description of technical knowledge] + - **Audience**: [Who needs this knowledge] + - **Transfer Method**: [How to transfer] + - **Documentation**: [Where documented] + +### Process Knowledge Transfer +- **Process Knowledge 1**: [Description of process knowledge] + - **Audience**: [Who needs this knowledge] + - **Transfer Method**: [How to transfer] + - **Documentation**: [Where documented] + +### Documentation Updates +- **Document 1**: [Name of document to update] + - **Required Updates**: [What needs to be updated] + - **Owner**: [Person responsible] + - **Timeline**: [When it will be updated] +``` + +### 10. Reflection Summary + +```markdown +## Reflection Summary + +### Key Takeaways +- **Takeaway 1**: [Description of key takeaway] +- **Takeaway 2**: [Description of key takeaway] +- **Takeaway 3**: [Description of key takeaway] + +### Success Patterns to Replicate +1. [Pattern 1 description] +2. [Pattern 2 description] +3. [Pattern 3 description] + +### Issues to Avoid in Future +1. [Issue 1 description] +2. [Issue 2 description] +3. [Issue 3 description] + +### Overall Assessment +[Comprehensive assessment of the project's success, challenges, and strategic value] + +### Next Steps +[Clear description of immediate next steps following this reflection] +``` + +## ๐Ÿ“‹ REFLECTION PROCESS + +### 1. Preparation + +```mermaid +flowchart TD + classDef step fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + + Start([Begin Reflection
Preparation]) --> Template[Load Reflection
Template] + Template --> Data[Gather Project
Data] + Data --> Metrics[Collect Performance
Metrics] + Metrics --> Feedback[Gather Stakeholder
Feedback] + Feedback --> Schedule[Schedule Reflection
Session] + Schedule --> Participants[Identify
Participants] + Participants --> Agenda[Create Session
Agenda] + Agenda --> Complete([Preparation
Complete]) + + Template -.-> TDoc((Reflection
Template)) + Data -.-> ProjData((Project
Data)) + Metrics -.-> MetricsDoc((Performance
Metrics)) + Feedback -.-> FeedbackDoc((Stakeholder
Feedback)) + + class Start,Complete milestone + class Template,Data,Metrics,Feedback,Schedule,Participants,Agenda step + class TDoc,ProjData,MetricsDoc,FeedbackDoc artifact +``` + +**Key Preparation Steps:** +1. Load the comprehensive reflection template +2. Gather project data (tasks.md, documentation, artifacts) +3. Collect performance metrics (timeline, resource utilization, quality) +4. Gather stakeholder feedback (internal and external) +5. Schedule reflection session(s) with key participants +6. Prepare session agenda and pre-work materials + +### 2. Conducting the Reflection Session + +```mermaid +flowchart TD + classDef step fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + + Start([Begin Reflection
Session]) --> Intro[Introduction and
Context Setting] + Intro --> Project[Project Overview
Presentation] + Project --> Success[Success
Identification] + Success --> Challenge[Challenge
Identification] + Challenge --> Root[Root Cause
Analysis] + Root --> Insights[Insight
Generation] + Insights --> Actions[Action
Planning] + Actions --> Documentation[Document
Outcomes] + Documentation --> Next[Define Next
Steps] + Next --> Complete([Session
Complete]) + + Success -.-> SuccessDoc((Success
Document)) + Challenge -.-> ChallengeDoc((Challenge
Document)) + Insights -.-> InsightDoc((Insight
Document)) + Actions -.-> ActionDoc((Action
Plan)) + + class Start,Complete milestone + class Intro,Project,Success,Challenge,Root,Insights,Actions,Documentation,Next step + class SuccessDoc,ChallengeDoc,InsightDoc,ActionDoc artifact +``` + +**Session Format:** +- **Duration**: 2-4 hours (may be split across multiple sessions) +- **Participants**: Project team, key stakeholders, technical leads +- **Facilitation**: Neutral facilitator to guide the process +- **Documentation**: Dedicated scribe to capture insights and actions + +### 3. Documentation and Integration + +```mermaid +flowchart TD + classDef step fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef verification fill:#c5e8b7,stroke:#a5c897,color:#000 + + Start([Begin Documentation
and Integration]) --> Draft[Draft Reflection
Document] + Draft --> Review[Review with
Key Stakeholders] + Review --> Revise[Incorporate
Feedback] + Revise --> Finalize[Finalize
Document] + Finalize --> UpdateMB[Update Memory
Bank] + UpdateMB --> ActionReg[Create Action
Register] + ActionReg --> Archive[Archive Project
Documents] + Archive --> Verification{Documentation
Verification} + Verification -->|Pass| Complete([Documentation
Complete]) + Verification -->|Fail| MoreRevision[Address
Documentation Gaps] + MoreRevision --> Verification + + Draft -.-> DraftDoc((Draft
Document)) + Finalize -.-> FinalDoc((Final
Reflection)) + ActionReg -.-> ActReg((Action
Register)) + + class Start,Complete milestone + class Draft,Review,Revise,Finalize,UpdateMB,ActionReg,Archive,MoreRevision step + class Verification verification + class DraftDoc,FinalDoc,ActReg artifact +``` + +**Key Documentation Steps:** +1. Draft comprehensive reflection document using the template +2. Review draft with key stakeholders and participants +3. Incorporate feedback and finalize document +4. Update Memory Bank with key insights and learnings +5. Create action register for tracking improvement actions +6. Archive project documents with reflection document +7. Verify documentation completeness and quality + +## ๐Ÿ“‹ REFLECTION TECHNIQUES + +### Root Cause Analysis + +```mermaid +flowchart TD + classDef step fill:#f9d77e,stroke:#d9b95c,color:#000 + + Start([Identify
Challenge]) --> What[What
Happened?] + What --> When[When Did
It Happen?] + When --> Where[Where Did
It Happen?] + Where --> Who[Who Was
Involved?] + Who --> How[How Did
It Happen?] + How --> Why1[Why Did
It Happen?] + Why1 --> Why2[Why?
Deeper] + Why2 --> Why3[Why?
Deeper] + Why3 --> Why4[Why?
Deeper] + Why4 --> Why5[Why?
Root Cause] + Why5 --> Solution[Identify
Solution] + Solution --> Prevent[Prevention
Strategy] + + class Start milestone + class What,When,Where,Who,How,Why1,Why2,Why3,Why4,Why5,Solution,Prevent step +``` + +### Success Analysis + +```mermaid +flowchart TD + classDef step fill:#f9d77e,stroke:#d9b95c,color:#000 + + Start([Identify
Success]) --> Define[Define the
Success] + Define --> Impact[Measure the
Impact] + Impact --> Factors[Identify Contributing
Factors] + Factors --> Context[Consider
Context] + Context --> Patterns[Identify
Patterns] + Patterns --> Generalize[Generalize
Approach] + Generalize --> Apply[Define Where
to Apply] + + class Start milestone + class Define,Impact,Factors,Context,Patterns,Generalize,Apply step +``` + +### Insight Generation + +```mermaid +flowchart TD + classDef step fill:#f9d77e,stroke:#d9b95c,color:#000 + + Start([Begin Insight
Generation]) --> Observe[Observe
Patterns] + Observe --> Question[Question
Assumptions] + Question --> Connect[Connect
Dots] + Connect --> Contrast[Contrast with
Prior Knowledge] + Contrast --> Hypothesize[Form
Hypothesis] + Hypothesize --> Test[Test
Hypothesis] + Test --> Refine[Refine
Insight] + Refine --> Apply[Apply to
Future Work] + + class Start milestone + class Observe,Question,Connect,Contrast,Hypothesize,Test,Refine,Apply step +``` + +## ๐Ÿ“‹ MEMORY BANK INTEGRATION + +```mermaid +flowchart TD + classDef memfile fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef process fill:#f9d77e,stroke:#d9b95c,color:#000 + + Reflection[Comprehensive
Reflection] --> PB[projectbrief.md] + Reflection --> PC[productContext.md] + Reflection --> AC[activeContext.md] + Reflection --> SP[systemPatterns.md] + Reflection --> TC[techContext.md] + Reflection --> P[progress.md] + + PB & PC & AC & SP & TC & P --> MBI[Memory Bank
Integration] + MBI --> Next[Enhanced Future
Projects] + + class PB,PC,AC,SP,TC,P memfile + class Reflection,MBI,Next process +``` + +### Memory Bank Updates + +Specific updates to make to Memory Bank files: + +1. **projectbrief.md** + - Update with strategic insights + - Document key achievements + - Incorporate lessons learned + +2. **productContext.md** + - Update with business insights + - Document market/user insights + - Include value delivery insights + +3. **activeContext.md** + - Update with current status + - Document action items + - Include next steps + +4. **systemPatterns.md** + - Update with architectural insights + - Document successful patterns + - Include technical knowledge + +5. **techContext.md** + - Update with implementation insights + - Document technology stack insights + - Include performance and security insights + +6. **progress.md** + - Update with final status + - Document achievements + - Include project metrics + +## ๐Ÿ“‹ REFLECTION VERIFICATION CHECKLIST + +``` +โœ“ REFLECTION VERIFICATION CHECKLIST + +System Review +- System overview complete and accurate? [YES/NO] +- Project performance metrics collected and analyzed? [YES/NO] +- System boundaries and interfaces described? [YES/NO] + +Success and Challenge Analysis +- Key achievements documented with evidence? [YES/NO] +- Technical successes documented with approach? [YES/NO] +- Key challenges documented with resolutions? [YES/NO] +- Technical challenges documented with solutions? [YES/NO] +- Unresolved issues documented with path forward? [YES/NO] + +Insight Generation +- Technical insights extracted and documented? [YES/NO] +- Process insights extracted and documented? [YES/NO] +- Business insights extracted and documented? [YES/NO] + +Strategic Planning +- Immediate actions defined with owners? [YES/NO] +- Short-term improvements identified? [YES/NO] +- Medium-term initiatives planned? [YES/NO] +- Long-term strategic directions outlined? [YES/NO] + +Knowledge Transfer +- Key learnings for organization documented? [YES/NO] +- Technical knowledge transfer planned? [YES/NO] +- Process knowledge transfer planned? [YES/NO] +- Documentation updates identified? [YES/NO] + +Memory Bank Integration +- projectbrief.md updated with insights? [YES/NO] +- productContext.md updated with insights? [YES/NO] +- activeContext.md updated with insights? [YES/NO] +- systemPatterns.md updated with insights? [YES/NO] +- techContext.md updated with insights? [YES/NO] +- progress.md updated with final status? [YES/NO] +``` + +## ๐Ÿ“‹ MINIMAL MODE REFLECTION FORMAT + +For situations requiring a more compact reflection: + +```markdown +## Level 4 Task Reflection: [System Name] + +### System Summary +- **Purpose**: [Brief description of system purpose] +- **Key Components**: [List of key components] +- **Architecture**: [Brief architecture description] + +### Performance Summary +- **Timeline**: [Planned] vs [Actual] ([Variance]) +- **Resources**: [Planned] vs [Actual] ([Variance]) +- **Quality**: [Summary of quality achievements] + +### Key Successes +1. [Success 1 with evidence and impact] +2. [Success 2 with evidence and impact] +3. [Success 3 with evidence and impact] + +### Key Challenges +1. [Challenge 1 with resolution and lessons] +2. [Challenge 2 with resolution and lessons] +3. [Challenge 3 with resolution and lessons] + +### Critical Insights +- **Technical**: [Key technical insight with recommendation] +- **Process**: [Key process insight with recommendation] +- **Business**: [Key business insight with recommendation] + +### Priority Actions +1. [Immediate action with owner and timeline] +2. [Short-term improvement with owner and timeline] +3. [Medium-term initiative with owner and timeline] + +### Memory Bank Updates +- [List of specific Memory Bank updates needed] +``` + +## ๐Ÿšจ REFLECTION ENFORCEMENT PRINCIPLE + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ COMPREHENSIVE REFLECTION IS MANDATORY for Level 4 โ”‚ +โ”‚ tasks. Archiving CANNOT proceed until reflection โ”‚ +โ”‚ is completed and verified. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level4/task-tracking-advanced.mdc b/.cursor/rules/isolation_rules/Level4/task-tracking-advanced.mdc new file mode 100644 index 0000000..360141e --- /dev/null +++ b/.cursor/rules/isolation_rules/Level4/task-tracking-advanced.mdc @@ -0,0 +1,466 @@ +--- +description: Advanced task tracking for Level 4 Complex System tasks +globs: "**/level4/**", "**/task-tracking/**" +alwaysApply: false +--- + +# ADVANCED TASK TRACKING FOR LEVEL 4 TASKS + +> **TL;DR:** This document outlines a comprehensive task tracking approach for Level 4 (Complex System) tasks, ensuring detailed tracking of complex, multi-phase work with clear dependencies, progress tracking, and architectural alignment. + +## ๐Ÿ” ADVANCED TASK TRACKING OVERVIEW + +Level 4 Complex System tasks require sophisticated task tracking to manage the complexity of system development, coordinate multiple team members, track dependencies, and ensure alignment with architectural principles. This document outlines a comprehensive task tracking approach for such complex endeavors. + +```mermaid +flowchart TD + classDef phase fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef artifact fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef verification fill:#c5e8b7,stroke:#a5c897,color:#000 + + Start([Begin Task
Tracking]) --> Framework[Establish Task
Framework] + Framework --> Hierarchy[Define Task
Hierarchy] + Hierarchy --> Breakdown[Create Work
Breakdown Structure] + Breakdown --> Dependencies[Document
Dependencies] + Dependencies --> Milestones[Define Key
Milestones] + Milestones --> Schedule[Create
Schedule] + Schedule --> Resources[Define Resource
Allocation] + Resources --> Risks[Document
Risks] + Risks --> Quality[Define Quality
Metrics] + Quality --> Progress[Track
Progress] + Progress --> Adaptations[Document
Adaptations] + Adaptations --> Verification{Task Tracking
Verification} + Verification -->|Pass| Complete([Task Tracking
Complete]) + Verification -->|Fail| Revise[Revise Task
Tracking] + Revise --> Verification + + Framework -.-> TF((Task
Framework)) + Hierarchy -.-> TH((Task
Hierarchy)) + Breakdown -.-> WBS((Work Breakdown
Structure)) + Dependencies -.-> DP((Dependency
Matrix)) + Milestones -.-> MS((Milestone
Document)) + Schedule -.-> SC((Schedule
Document)) + Resources -.-> RA((Resource
Allocation)) + Risks -.-> RM((Risk
Management)) + Quality -.-> QM((Quality
Metrics)) + Progress -.-> PT((Progress
Tracking)) + Adaptations -.-> AD((Adaptation
Document)) + + class Start,Complete milestone + class Framework,Hierarchy,Breakdown,Dependencies,Milestones,Schedule,Resources,Risks,Quality,Progress,Adaptations,Revise step + class Verification verification + class TF,TH,WBS,DP,MS,SC,RA,RM,QM,PT,AD artifact +``` + +## ๐Ÿ“‹ TASK TRACKING PRINCIPLES + +1. **Architectural Alignment**: All tasks must align with the established architectural principles and patterns. +2. **Hierarchical Organization**: Tasks are organized in a hierarchical structure with clear parent-child relationships. +3. **Dependency Management**: All task dependencies are explicitly documented and tracked. +4. **Progression Transparency**: Task status and progress are clearly documented and visible to all stakeholders. +5. **Quality Integration**: Quality metrics and verification are integrated into task definitions. +6. **Resource Allocation**: Tasks include clear allocation of resources required for completion. +7. **Risk Awareness**: Each significant task includes risk assessment and mitigation strategies. +8. **Adaptive Planning**: Task tracking accommodates changes and adaptations while maintaining system integrity. +9. **Milestone Tracking**: Clear milestones are defined and used to track overall progress. +10. **Comprehensive Documentation**: All aspects of the task lifecycle are documented thoroughly. + +## ๐Ÿ“‹ TASK HIERARCHY STRUCTURE + +Level 4 tasks follow a hierarchical structure: + +```mermaid +flowchart TD + classDef system fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef component fill:#a8d5ff,stroke:#88b5e0,color:#000 + classDef feature fill:#c5e8b7,stroke:#a5c897,color:#000 + classDef task fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef subtask fill:#d8c1f7,stroke:#b8a1d7,color:#000 + + System[System-Level Work] --> Component1[Component 1] + System --> Component2[Component 2] + System --> Component3[Component 3] + + Component1 --> Feature1[Feature 1.1] + Component1 --> Feature2[Feature 1.2] + + Feature1 --> Task1[Task 1.1.1] + Feature1 --> Task2[Task 1.1.2] + + Task1 --> Subtask1[Subtask 1.1.1.1] + Task1 --> Subtask2[Subtask 1.1.1.2] + Task1 --> Subtask3[Subtask 1.1.1.3] + + class System system + class Component1,Component2,Component3 component + class Feature1,Feature2 feature + class Task1,Task2 task + class Subtask1,Subtask2,Subtask3 subtask +``` + +### Levels of Hierarchy: + +1. **System Level**: The overall system being built or modified. +2. **Component Level**: Major components or subsystems of the system. +3. **Feature Level**: Specific features within each component. +4. **Task Level**: Concrete tasks required to implement a feature. +5. **Subtask Level**: Detailed subtasks for complex tasks. + +## ๐Ÿ“‹ COMPREHENSIVE TASK STRUCTURE + +Each Level 4 task in `tasks.md` follows this comprehensive structure: + +```markdown +## [SYSTEM-ID]: System Name + +### System Overview +- **Purpose**: [Brief description of system purpose] +- **Architectural Alignment**: [How the system aligns with architectural principles] +- **Status**: [Planning/In Progress/Review/Complete] +- **Milestones**: + - Milestone 1: [Date] - [Status] + - Milestone 2: [Date] - [Status] + - Milestone 3: [Date] - [Status] + +### Components +#### [COMP-ID]: Component Name +- **Purpose**: [Brief description of component purpose] +- **Status**: [Planning/In Progress/Review/Complete] +- **Dependencies**: [List of dependencies] +- **Responsible**: [Team or individual responsible] + +##### [FEAT-ID]: Feature Name +- **Description**: [Feature description] +- **Status**: [Planning/In Progress/Review/Complete] +- **Priority**: [Critical/High/Medium/Low] +- **Related Requirements**: [List of requirements IDs this feature addresses] +- **Quality Criteria**: [Measurable criteria for completion] +- **Progress**: [0-100%] + +###### [TASK-ID]: Task Name +- **Description**: [Task description] +- **Status**: [TODO/In Progress/Review/Done] +- **Assigned To**: [Assignee] +- **Estimated Effort**: [Effort estimate] +- **Actual Effort**: [Actual effort] +- **Dependencies**: [Tasks this depends on] +- **Blocks**: [Tasks blocked by this] +- **Risk Assessment**: [Risk level and description] +- **Quality Gates**: [Quality gates this must pass] +- **Implementation Notes**: [Key implementation notes] + +**Subtasks**: +- [ ] [SUB-ID]: [Subtask description] - [Status] +- [ ] [SUB-ID]: [Subtask description] - [Status] +- [ ] [SUB-ID]: [Subtask description] - [Status] + +### System-Wide Tasks +- [ ] [SYS-TASK-ID]: [System-wide task description] - [Status] +- [ ] [SYS-TASK-ID]: [System-wide task description] - [Status] + +### Risks and Mitigations +- **Risk 1**: [Description] - **Mitigation**: [Mitigation strategy] +- **Risk 2**: [Description] - **Mitigation**: [Mitigation strategy] + +### Progress Summary +- **Overall Progress**: [0-100%] +- **Component 1**: [0-100%] +- **Component 2**: [0-100%] +- **Component 3**: [0-100%] + +### Latest Updates +- [Date]: [Update description] +- [Date]: [Update description] +``` + +## ๐Ÿ“‹ TASK TRACKING ORGANIZATION IN TASKS.MD + +For Level 4 Complex System tasks, organize `tasks.md` as follows: + +```markdown +# TASK TRACKING + +## ACTIVE SYSTEMS +- [SYSTEM-ID]: [System Name] - [Status] +- [SYSTEM-ID]: [System Name] - [Status] + +## SYSTEM DETAILS + +[Detailed task structure for each system as per the template above] + +## COMPLETED SYSTEMS +- [SYSTEM-ID]: [System Name] - Completed [Date] +- [SYSTEM-ID]: [System Name] - Completed [Date] + +## SYSTEM DEPENDENCIES +```mermaid +graph TD + System1 --> System2 + System1 --> System3 + System2 --> System4 +``` + +## RISK REGISTER +| Risk ID | Description | Probability | Impact | Mitigation | +|---------|-------------|-------------|--------|------------| +| RISK-01 | [Description] | High/Med/Low | High/Med/Low | [Strategy] | +| RISK-02 | [Description] | High/Med/Low | High/Med/Low | [Strategy] | + +## RESOURCE ALLOCATION +| Resource | System | Allocation % | Time Period | +|----------|--------|--------------|------------| +| [Name/Team] | [System-ID] | [%] | [Start-End] | +| [Name/Team] | [System-ID] | [%] | [Start-End] | +``` + +## ๐Ÿ“‹ DEPENDENCY MANAGEMENT + +```mermaid +flowchart TD + classDef critical fill:#f8707e,stroke:#d85060,color:#000 + classDef high fill:#f9d77e,stroke:#d9b95c,color:#000 + classDef medium fill:#a8d5ff,stroke:#88b5e0,color:#000 + classDef low fill:#c5e8b7,stroke:#a5c897,color:#000 + + Task1[Task 1] --> Task2[Task 2] + Task1 --> Task3[Task 3] + Task2 --> Task4[Task 4] + Task3 --> Task4 + Task4 --> Task5[Task 5] + Task4 --> Task6[Task 6] + Task5 --> Task7[Task 7] + Task6 --> Task7 + + class Task1,Task4,Task7 critical + class Task2,Task5 high + class Task3 medium + class Task6 low +``` + +For complex systems, document dependencies in a dedicated section: + +```markdown +## Dependency Matrix + +| Task ID | Depends On | Blocks | Type | Status | +|---------|------------|--------|------|--------| +| TASK-01 | - | TASK-02, TASK-03 | Technical | Completed | +| TASK-02 | TASK-01 | TASK-04 | Technical | In Progress | +| TASK-03 | TASK-01 | TASK-04 | Resource | Not Started | +| TASK-04 | TASK-02, TASK-03 | TASK-05, TASK-06 | Technical | Not Started | +``` + +### Dependency Types: +- **Technical**: One task technically requires another to be completed first +- **Resource**: Tasks compete for the same resources +- **Information**: One task requires information produced by another +- **Architectural**: Tasks have architectural dependencies +- **Temporal**: Tasks must be completed in a specific time sequence + +## ๐Ÿ“‹ MILESTONE TRACKING + +For Level 4 tasks, track milestones explicitly: + +```markdown +## System Milestones + +| Milestone ID | Description | Target Date | Actual Date | Status | Deliverables | +|--------------|-------------|-------------|-------------|--------|--------------| +| MILE-01 | Architecture Approved | [Date] | [Date] | Completed | Architecture Document | +| MILE-02 | Component Design Completed | [Date] | - | In Progress | Design Documents | +| MILE-03 | Component 1 Implementation | [Date] | - | Not Started | Code, Tests | +| MILE-04 | Integration Complete | [Date] | - | Not Started | Integrated System | +| MILE-05 | System Testing Complete | [Date] | - | Not Started | Test Reports | +| MILE-06 | Deployment Ready | [Date] | - | Not Started | Deployment Package | +``` + +## ๐Ÿ“‹ PROGRESS VISUALIZATION + +Include visual representations of progress in `tasks.md`: + +```markdown +## Progress Visualization + +### Overall System Progress +```mermaid +pie title System Progress + "Completed" : 30 + "In Progress" : 25 + "Not Started" : 45 +``` + +### Component Progress +```mermaid +graph TD + subgraph Progress + C1[Component 1: 75%] + C2[Component 2: 50%] + C3[Component 3: 20%] + C4[Component 4: 5%] + end +``` + +### Timeline +```mermaid +gantt + title System Timeline + dateFormat YYYY-MM-DD + + section Architecture + Architecture Design :done, arch, 2023-01-01, 30d + Architecture Review :done, arch-rev, after arch, 10d + + section Component 1 + Design :active, c1-des, after arch-rev, 20d + Implementation :c1-imp, after c1-des, 40d + Testing :c1-test, after c1-imp, 15d + + section Component 2 + Design :active, c2-des, after arch-rev, 25d + Implementation :c2-imp, after c2-des, 50d + Testing :c2-test, after c2-imp, 20d +``` +``` + +## ๐Ÿ“‹ UPDATING TASK STATUS + +For Level 4 tasks, status updates include: + +1. **Progress Updates**: Update task status and progress percentage +2. **Effort Tracking**: Record actual effort against estimates +3. **Risk Updates**: Update risk assessments and mitigations +4. **Dependency Status**: Update status of dependencies +5. **Milestone Tracking**: Update milestone status +6. **Issue Documentation**: Document issues encountered +7. **Adaptation Documentation**: Document any adaptations to the original plan +8. **Quality Gate Status**: Update status of quality gates + +Status update cycle: +- **Daily**: Update task and subtask status +- **Weekly**: Update component status and progress visualization +- **Bi-weekly**: Update system-level progress and milestone status +- **Monthly**: Complete system review including risks and adaptations + +## ๐Ÿ“‹ TASK TRACKING VERIFICATION CHECKLIST + +``` +โœ“ TASK TRACKING VERIFICATION CHECKLIST + +Task Structure +- System level work properly defined? [YES/NO] +- Component level tasks identified? [YES/NO] +- Feature level tasks specified? [YES/NO] +- Task level details provided? [YES/NO] +- Subtasks created for complex tasks? [YES/NO] + +Task Information +- All tasks have clear descriptions? [YES/NO] +- Status accurately reflected? [YES/NO] +- Proper assignments made? [YES/NO] +- Effort estimates provided? [YES/NO] +- Dependencies documented? [YES/NO] + +Progress Tracking +- Overall progress calculated? [YES/NO] +- Component progress updated? [YES/NO] +- Milestone status updated? [YES/NO] +- Progress visualizations current? [YES/NO] +- Latest updates documented? [YES/NO] + +Risk Management +- Risks identified and assessed? [YES/NO] +- Mitigation strategies documented? [YES/NO] +- Risk register updated? [YES/NO] +- Impact on schedule assessed? [YES/NO] +- Contingency plans documented? [YES/NO] + +Resource Allocation +- Resources allocated to tasks? [YES/NO] +- Resource conflicts identified? [YES/NO] +- Resource allocation optimized? [YES/NO] +- Future resource needs projected? [YES/NO] +- Resource allocation documented? [YES/NO] + +Quality Integration +- Quality criteria defined for tasks? [YES/NO] +- Quality gates specified? [YES/NO] +- Verification procedures documented? [YES/NO] +- Quality metrics being tracked? [YES/NO] +- Quality issues documented? [YES/NO] + +Architectural Alignment +- Tasks align with architecture? [YES/NO] +- Architectural dependencies tracked? [YES/NO] +- Architectural constraints documented? [YES/NO] +- Architecture evolution tracked? [YES/NO] +- Architectural decisions documented? [YES/NO] +``` + +## ๐Ÿ“‹ INTEGRATION WITH MEMORY BANK + +Level 4 task tracking is tightly integrated with the Memory Bank: + +1. **projectbrief.md**: System-level tasks are derived from and linked to the project brief +2. **productContext.md**: Tasks are aligned with business context and objectives +3. **systemPatterns.md**: Tasks respect and implement defined architectural patterns +4. **techContext.md**: Tasks are aligned with the technology stack and constraints +5. **activeContext.md**: Current focus and status from `tasks.md` informs the active context +6. **progress.md**: System progress from `tasks.md` is reflected in overall progress + +```mermaid +flowchart TD + classDef memfile fill:#f4b8c4,stroke:#d498a4,color:#000 + classDef process fill:#f9d77e,stroke:#d9b95c,color:#000 + + TaskTracking[Advanced Task
Tracking] --> PB[projectbrief.md] + TaskTracking --> PC[productContext.md] + TaskTracking --> AC[activeContext.md] + TaskTracking --> SP[systemPatterns.md] + TaskTracking --> TC[techContext.md] + TaskTracking --> P[progress.md] + + P --> TU[Task
Updates] + TU --> TaskTracking + + class PB,PC,AC,SP,TC,P memfile + class TaskTracking,TU process +``` + +## ๐Ÿ“‹ MINIMAL MODE TASK TRACKING + +For situations requiring a more compact tracking approach: + +```markdown +## [SYSTEM-ID]: System Name - [Status] + +### Key Components: +- [COMP-ID]: [Component Name] - [Status] - [Progress %] +- [COMP-ID]: [Component Name] - [Status] - [Progress %] + +### Active Tasks: +- [ ] [TASK-ID]: [Task Description] - [Assignee] - [Status] + - Dependencies: [List of task IDs] + - Risks: [Brief risk description] +- [ ] [TASK-ID]: [Task Description] - [Assignee] - [Status] + +### Milestones: +- [MILE-ID]: [Milestone description] - [Target Date] - [Status] +- [MILE-ID]: [Milestone description] - [Target Date] - [Status] + +### Critical Paths: +- [TASK-ID] โ†’ [TASK-ID] โ†’ [TASK-ID] โ†’ [TASK-ID] +- [TASK-ID] โ†’ [TASK-ID] โ†’ [TASK-ID] + +### Updates: +- [Date]: [Brief update] +``` + +## ๐Ÿšจ TASK TRACKING PRIMACY PRINCIPLE + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ tasks.md is the SINGLE SOURCE OF TRUTH for all task โ”‚ +โ”‚ tracking. All task-related decisions and status โ”‚ +โ”‚ updates MUST be reflected in tasks.md. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Level4/workflow-level4.mdc b/.cursor/rules/isolation_rules/Level4/workflow-level4.mdc new file mode 100644 index 0000000..48ed299 --- /dev/null +++ b/.cursor/rules/isolation_rules/Level4/workflow-level4.mdc @@ -0,0 +1,424 @@ +--- +description: Comprehensive workflow for Level 4 Complex System tasks +globs: "**/level4/**", "**/workflow/**" +alwaysApply: false +--- +# COMPREHENSIVE WORKFLOW FOR LEVEL 4 TASKS + +> **TL;DR:** This document outlines a comprehensive workflow for Level 4 (Complex System) tasks, including 7 key phases with rigorous planning, mandatory creative phases, architectural design, phased implementation, and extensive documentation. + +## ๐Ÿ” LEVEL 4 WORKFLOW OVERVIEW + +```mermaid +graph LR + Init["1. INITIALIZATION"] --> Doc["2. DOCUMENTATION
SETUP"] + Doc --> Plan["3. ARCHITECTURAL
PLANNING"] + Plan --> Create["4. CREATIVE
PHASES"] + Create --> Impl["5. PHASED
IMPLEMENTATION"] + Impl --> Reflect["6. REFLECTION"] + Reflect --> Archive["7. ARCHIVING"] + + %% Document connections for each phase + Init -.-> InitDocs["INITIALIZATION"] + Doc -.-> DocDocs["DOCUMENTATION"] + Plan -.-> PlanDocs["ARCHITECTURAL PLANNING"] + Create -.-> CreateDocs["CREATIVE PHASES"] + Impl -.-> ImplDocs["PHASED IMPLEMENTATION"] + Reflect -.-> ReflectDocs["REFLECTION"] + Archive -.-> ArchiveDocs["ARCHIVING"] +``` + +## ๐Ÿ”„ LEVEL TRANSITION HANDLING + +```mermaid +graph TD + L4["Level 4 Task"] --> Assess["Continuous
Assessment"] + + Assess --> Down["Downgrade to
Level 2/3"] + Assess --> Split["Split into
Multiple Tasks"] + + Down --> L23Trigger["Triggers:
- Less complex
- Limited scope
- Few components"] + + Split --> MultiTrigger["Triggers:
- Too large
- Independent parts
- Parallel possible"] + + L23Trigger --> L23Switch["Switch to
Level 2/3 Workflow"] + MultiTrigger --> CreateTasks["Create Multiple
Lower Level Tasks"] +``` + +Level 4 tasks involve complex systems that require comprehensive planning, rigorous design, systematic implementation, and thorough documentation. This workflow ensures all aspects are addressed with the appropriate level of detail, structure, and verification. + +## ๐Ÿ“‹ WORKFLOW PHASES + +### Phase 1: INITIALIZATION + +```mermaid +graph TD + Start["Start Level 4 Task"] --> Platform{"Detect
Platform"} + Platform --> FileCheck["Critical File
Verification"] + FileCheck --> LoadStructure["Comprehensive Memory
Bank Structure Loading"] + LoadStructure --> TaskCreation["Create Detailed
Task Framework"] + TaskCreation --> Context["Establish Enterprise
Context"] + Context --> Resources["Identify and Allocate
All Resources"] + Resources --> SetupComplete["Initialization
Complete"] +``` + +**Steps:** +1. Platform detection with comprehensive environment configuration +2. Critical file verification with in-depth integrity checks +3. Comprehensive Memory Bank structure loading with full reference mapping +4. Create detailed task framework in tasks.md with full structure +5. Establish complete enterprise context and stakeholder requirements +6. Identify and allocate all necessary resources (technical, human, time) +7. Perform system readiness assessment + +**Milestone Checkpoint:** +``` +โœ“ INITIALIZATION CHECKPOINT +- Platform detected and fully configured? [YES/NO] +- Critical files verified with integrity checks? [YES/NO] +- Memory Bank comprehensively loaded and mapped? [YES/NO] +- Detailed task framework created? [YES/NO] +- Enterprise context established? [YES/NO] +- Stakeholder requirements documented? [YES/NO] +- All resources identified and allocated? [YES/NO] +- System readiness assessed? [YES/NO] + +โ†’ If all YES: Proceed to Documentation Setup +โ†’ If any NO: Complete initialization steps +``` + +### Phase 2: DOCUMENTATION SETUP + +```mermaid +graph TD + Start["Begin Documentation
Setup"] --> LoadTemplate["Load Comprehensive
Documentation Templates"] + LoadTemplate --> Framework["Establish Documentation
Framework"] + Framework --> UpdateProject["Update
projectbrief.md"] + UpdateProject --> UpdateContext["Update
activeContext.md"] + UpdateContext --> SystemPatterns["Update
systemPatterns.md"] + SystemPatterns --> TechContext["Update
techContext.md"] + TechContext --> Standards["Document System
Standards"] + Standards --> Architecture["Document Existing
Architecture"] + Architecture --> SetupComplete["Documentation
Setup Complete"] +``` + +**Steps:** +1. Load comprehensive documentation templates for all aspects +2. Establish complete documentation framework with structure +3. Update projectbrief.md with detailed system description and requirements +4. Update activeContext.md with current focus, dependencies, and stakeholders +5. Update systemPatterns.md with comprehensive patterns and principles +6. Update techContext.md with complete technical landscape +7. Document system standards, constraints, and conventions +8. Document existing architecture and integration points + +**Milestone Checkpoint:** +``` +โœ“ DOCUMENTATION CHECKPOINT +- Documentation templates loaded? [YES/NO] +- Documentation framework established? [YES/NO] +- projectbrief.md comprehensively updated? [YES/NO] +- activeContext.md fully updated? [YES/NO] +- systemPatterns.md comprehensively updated? [YES/NO] +- techContext.md fully updated? [YES/NO] +- System standards documented? [YES/NO] +- Existing architecture documented? [YES/NO] + +โ†’ If all YES: Proceed to Architectural Planning +โ†’ If any NO: Complete documentation setup +``` + +### Phase 3: ARCHITECTURAL PLANNING + +```mermaid +graph TD + Start["Begin Architectural
Planning"] --> Requirements["Analyze Comprehensive
Requirements"] + Requirements --> BusinessContext["Document Business
Context"] + BusinessContext --> VisionDefine["Define Vision
and Goals"] + VisionDefine --> ArchitecturalPrinciples["Establish Architectural
Principles"] + ArchitecturalPrinciples --> Alternatives["Explore Architectural
Alternatives"] + Alternatives --> Evaluation["Perform Detailed
Evaluation"] + Evaluation --> Selection["Make Architecture
Selection"] + Selection --> Documentation["Create Architecture
Documentation"] + Documentation --> Review["Conduct Architecture
Review"] + Review --> PlanComplete["Architectural Planning
Complete"] +``` + +**Steps:** +1. Analyze comprehensive requirements with traceability +2. Document complete business context and constraints +3. Define clear vision and goals with measurable objectives +4. Establish architectural principles and non-functional requirements +5. Explore multiple architectural alternatives with thorough analysis +6. Perform detailed evaluation using weighted criteria +7. Make architecture selection with comprehensive justification +8. Create complete architecture documentation with diagrams +9. Conduct formal architecture review with stakeholders + +**Milestone Checkpoint:** +``` +โœ“ ARCHITECTURAL PLANNING CHECKPOINT +- Requirements comprehensively analyzed? [YES/NO] +- Business context fully documented? [YES/NO] +- Vision and goals clearly defined? [YES/NO] +- Architectural principles established? [YES/NO] +- Alternatives thoroughly explored? [YES/NO] +- Detailed evaluation performed? [YES/NO] +- Architecture selection justified? [YES/NO] +- Architecture documentation complete? [YES/NO] +- Architecture review conducted? [YES/NO] + +โ†’ If all YES: Proceed to Creative Phases +โ†’ If any NO: Complete architectural planning +``` + +### Phase 4: CREATIVE PHASES + +```mermaid +graph TD + Start["Begin Creative
Phases"] --> IdentifyNeeds["Identify Creative
Phase Needs"] + IdentifyNeeds --> Architecture["Architecture
Design Phase"] + Architecture --> Algorithm["Algorithm
Design Phase"] + Algorithm --> UIUX["UI/UX
Design Phase"] + UIUX --> Integration["Integration
Design Phase"] + Integration --> Security["Security
Design Phase"] + Security --> Performance["Performance
Design Phase"] + Performance --> Resilience["Resilience
Design Phase"] + Resilience --> Documentation["Comprehensive
Design Documentation"] + Documentation --> Review["Design
Review"] + Review --> CreativeComplete["Creative Phases
Complete"] +``` + +**Steps:** +1. Identify all required creative phases based on system needs +2. Execute comprehensive Architecture Design with patterns and principles +3. Conduct thorough Algorithm Design for all complex processes +4. Perform detailed UI/UX Design with user research and testing +5. Create Integration Design for all system interfaces +6. Develop Security Design with threat modeling +7. Design for Performance with capacity planning +8. Plan for Resilience with failure modes and recovery +9. Create comprehensive design documentation for all aspects +10. Conduct formal design review with stakeholders + +**Milestone Checkpoint:** +``` +โœ“ CREATIVE PHASES CHECKPOINT +- All required creative phases identified? [YES/NO] +- Architecture design completed with patterns? [YES/NO] +- Algorithm design conducted for complex processes? [YES/NO] +- UI/UX design performed with user research? [YES/NO] +- Integration design created for interfaces? [YES/NO] +- Security design developed with threat modeling? [YES/NO] +- Performance design completed with capacity planning? [YES/NO] +- Resilience design planned with failure modes? [YES/NO] +- Comprehensive design documentation created? [YES/NO] +- Formal design review conducted? [YES/NO] + +โ†’ If all YES: Proceed to Phased Implementation +โ†’ If any NO: Complete creative phases +``` + +### Phase 5: PHASED IMPLEMENTATION + +```mermaid +graph TD + Start["Begin Phased
Implementation"] --> PrepEnv["Prepare Comprehensive
Implementation Environment"] + PrepEnv --> Framework["Establish Implementation
Framework"] + Framework --> RoadmapDefine["Define Implementation
Roadmap"] + RoadmapDefine --> PhaseImplementation["Implement
Sequential Phases"] + PhaseImplementation --> PhaseVerification["Verify Each
Phase"] + PhaseVerification --> Integration["Perform Integration
Testing"] + Integration --> SystemTest["Conduct System
Testing"] + SystemTest --> UAT["User Acceptance
Testing"] + UAT --> Stabilization["System
Stabilization"] + Stabilization --> ImplComplete["Implementation
Complete"] +``` + +**Steps:** +1. Prepare comprehensive implementation environment with all tools +2. Establish implementation framework with standards and processes +3. Define detailed implementation roadmap with phases and dependencies +4. Implement sequential phases with milestone verification +5. Verify each phase against requirements and design +6. Perform comprehensive integration testing across phases +7. Conduct thorough system testing of the complete solution +8. Execute formal user acceptance testing with stakeholders +9. Perform system stabilization and performance tuning +10. Document all implementation details and deployment procedures + +**Milestone Checkpoint:** +``` +โœ“ PHASED IMPLEMENTATION CHECKPOINT +- Implementation environment fully prepared? [YES/NO] +- Implementation framework established? [YES/NO] +- Detailed roadmap defined with phases? [YES/NO] +- All phases sequentially implemented? [YES/NO] +- Each phase verified against requirements? [YES/NO] +- Comprehensive integration testing performed? [YES/NO] +- Thorough system testing conducted? [YES/NO] +- User acceptance testing executed? [YES/NO] +- System stabilization completed? [YES/NO] +- Implementation details documented? [YES/NO] + +โ†’ If all YES: Proceed to Reflection +โ†’ If any NO: Complete implementation steps +``` + +### Phase 6: REFLECTION + +```mermaid +graph TD + Start["Begin
Reflection"] --> Template["Load Comprehensive
Reflection Template"] + Template --> SystemReview["Complete System
Review"] + SystemReview --> Process["Analyze Process
Effectiveness"] + Process --> Success["Document Successes
with Evidence"] + Success --> Challenges["Document Challenges
with Solutions"] + Challenges --> TechnicalInsights["Extract Strategic
Technical Insights"] + TechnicalInsights --> ProcessInsights["Extract Process
Improvement Insights"] + ProcessInsights --> BusinessInsights["Document Business
Impact"] + BusinessInsights --> StrategicActions["Define Strategic
Action Items"] + StrategicActions --> ReflectComplete["Reflection
Complete"] +``` + +**Steps:** +1. Load comprehensive reflection template with all sections +2. Conduct complete system review against original goals +3. Analyze process effectiveness with metrics +4. Document successes with concrete evidence and impact +5. Document challenges with implemented solutions and lessons +6. Extract strategic technical insights for enterprise knowledge +7. Extract process improvement insights for future projects +8. Document business impact and value delivered +9. Define strategic action items with prioritization +10. Create comprehensive reflection documentation + +**Milestone Checkpoint:** +``` +โœ“ REFLECTION CHECKPOINT +- Comprehensive reflection template loaded? [YES/NO] +- Complete system review conducted? [YES/NO] +- Process effectiveness analyzed? [YES/NO] +- Successes documented with evidence? [YES/NO] +- Challenges documented with solutions? [YES/NO] +- Strategic technical insights extracted? [YES/NO] +- Process improvement insights extracted? [YES/NO] +- Business impact documented? [YES/NO] +- Strategic action items defined? [YES/NO] +- Comprehensive reflection documentation created? [YES/NO] + +โ†’ If all YES: Proceed to Archiving +โ†’ If any NO: Complete reflection steps +``` + +### Phase 7: ARCHIVING + +```mermaid +graph TD + Start["Begin
Archiving"] --> Template["Load Comprehensive
Archive Template"] + Template --> SystemDoc["Create System
Documentation"] + SystemDoc --> Architecture["Document Final
Architecture"] + Architecture --> Design["Compile Design
Decisions"] + Design --> Implementation["Document Implementation
Details"] + Implementation --> Testing["Compile Testing
Documentation"] + Testing --> Deployment["Create Deployment
Documentation"] + Deployment --> Maintenance["Prepare Maintenance
Guide"] + Maintenance --> Knowledge["Transfer Knowledge
to Stakeholders"] + Knowledge --> Archive["Create Comprehensive
Archive Package"] + Archive --> ArchiveComplete["Archiving
Complete"] +``` + +**Steps:** +1. Load comprehensive archive template with all sections +2. Create complete system documentation with all aspects +3. Document final architecture with diagrams and rationales +4. Compile all design decisions with justifications +5. Document all implementation details with technical specifics +6. Compile comprehensive testing documentation with results +7. Create detailed deployment documentation with procedures +8. Prepare maintenance guide with operational procedures +9. Transfer knowledge to all stakeholders with training +10. Create comprehensive archive package with all artifacts + +**Milestone Checkpoint:** +``` +โœ“ ARCHIVING CHECKPOINT +- Comprehensive archive template loaded? [YES/NO] +- Complete system documentation created? [YES/NO] +- Final architecture documented? [YES/NO] +- Design decisions compiled? [YES/NO] +- Implementation details documented? [YES/NO] +- Testing documentation compiled? [YES/NO] +- Deployment documentation created? [YES/NO] +- Maintenance guide prepared? [YES/NO] +- Knowledge transferred to stakeholders? [YES/NO] +- Comprehensive archive package created? [YES/NO] + +โ†’ If all YES: Task Complete +โ†’ If any NO: Complete archiving steps +``` + +## ๐Ÿ“‹ WORKFLOW VERIFICATION CHECKLIST + +``` +โœ“ FINAL WORKFLOW VERIFICATION +- All 7 phases completed? [YES/NO] +- All milestone checkpoints passed? [YES/NO] +- Architectural planning properly executed? [YES/NO] +- All required creative phases completed? [YES/NO] +- Implementation performed in proper phases? [YES/NO] +- Comprehensive reflection conducted? [YES/NO] +- Complete system documentation archived? [YES/NO] +- Memory Bank fully updated? [YES/NO] +- Knowledge successfully transferred? [YES/NO] + +โ†’ If all YES: Level 4 Task Successfully Completed +โ†’ If any NO: Address outstanding items +``` + +## ๐Ÿ“‹ MINIMAL MODE WORKFLOW + +For minimal mode, use this streamlined workflow while retaining key elements: + +``` +1. INIT: Verify environment, create structured task framework, establish context +2. DOCS: Update all Memory Bank documents, document standards and architecture +3. PLAN: Define architecture with principles, alternatives, evaluation, selection +4. CREATE: Execute all required creative phases with documentation +5. IMPL: Implement in phases with verification, integration, testing +6. REFLECT: Document successes, challenges, insights, and strategic actions +7. ARCHIVE: Create comprehensive documentation and knowledge transfer +``` + +## ๐Ÿ”„ INTEGRATION WITH MEMORY BANK + +This workflow integrates comprehensively with Memory Bank: + +```mermaid +graph TD + Workflow["Level 4
Workflow"] --> PB["Comprehensive Update
projectbrief.md"] + Workflow --> AC["Detailed Update
activeContext.md"] + Workflow --> SP["Strategic Update
systemPatterns.md"] + Workflow --> TC["Complete Update
techContext.md"] + Workflow --> TM["Structured Maintenance
tasks.md"] + Workflow --> PM["Enterprise Update
progress.md"] + + PB & AC & SP & TC & TM & PM --> MB["Memory Bank
Integration"] + MB --> KT["Knowledge
Transfer"] + KT --> NextSystem["Enterprise
System Evolution"] +``` + +## ๐Ÿšจ LEVEL 4 GOVERNANCE PRINCIPLE + +Remember: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Level 4 tasks represent ENTERPRISE-CRITICAL work. โ”‚ +โ”‚ RIGOROUS governance, comprehensive documentation, โ”‚ +โ”‚ and thorough verification are MANDATORY at each โ”‚ +โ”‚ phase. NO EXCEPTIONS. โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +This ensures that complex systems are designed, implemented, and documented to the highest standards, with enterprise-grade quality and governance. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Phases/CreativePhase/creative-phase-architecture.mdc b/.cursor/rules/isolation_rules/Phases/CreativePhase/creative-phase-architecture.mdc new file mode 100644 index 0000000..8bb60a8 --- /dev/null +++ b/.cursor/rules/isolation_rules/Phases/CreativePhase/creative-phase-architecture.mdc @@ -0,0 +1,187 @@ +--- +description: creative phase architecture +globs: creative-phase-architecture.md +alwaysApply: false +--- + +# CREATIVE PHASE: ARCHITECTURE DESIGN + +> **TL;DR:** This document provides structured guidance for architectural design decisions during creative phases, ensuring comprehensive evaluation of options and clear documentation of architectural choices. + +## ๐Ÿ—๏ธ ARCHITECTURE DESIGN WORKFLOW + +```mermaid +graph TD + Start["Architecture
Design Start"] --> Req["1. Requirements
Analysis"] + Req --> Comp["2. Component
Identification"] + Comp --> Options["3. Architecture
Options"] + Options --> Eval["4. Option
Evaluation"] + Eval --> Decision["5. Decision &
Documentation"] + Decision --> Valid["6. Validation &
Verification"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style Req fill:#ffa64d,stroke:#cc7a30,color:white + style Comp fill:#4dbb5f,stroke:#36873f,color:white + style Options fill:#d94dbb,stroke:#a3378a,color:white + style Eval fill:#4dbbbb,stroke:#368787,color:white + style Decision fill:#d971ff,stroke:#a33bc2,color:white + style Valid fill:#ff71c2,stroke:#c23b8a,color:white +``` + +## ๐Ÿ“‹ ARCHITECTURE DECISION TEMPLATE + +```markdown +# Architecture Decision Record + +## Context +- System Requirements: + - [Requirement 1] + - [Requirement 2] +- Technical Constraints: + - [Constraint 1] + - [Constraint 2] + +## Component Analysis +- Core Components: + - [Component 1]: [Purpose/Role] + - [Component 2]: [Purpose/Role] +- Interactions: + - [Interaction 1] + - [Interaction 2] + +## Architecture Options +### Option 1: [Name] +- Description: [Brief description] +- Pros: + - [Pro 1] + - [Pro 2] +- Cons: + - [Con 1] + - [Con 2] +- Technical Fit: [High/Medium/Low] +- Complexity: [High/Medium/Low] +- Scalability: [High/Medium/Low] + +### Option 2: [Name] +[Same structure as Option 1] + +## Decision +- Chosen Option: [Option name] +- Rationale: [Explanation] +- Implementation Considerations: + - [Consideration 1] + - [Consideration 2] + +## Validation +- Requirements Met: + - [โœ“] Requirement 1 + - [โœ“] Requirement 2 +- Technical Feasibility: [Assessment] +- Risk Assessment: [Evaluation] +``` + +## ๐ŸŽฏ ARCHITECTURE EVALUATION CRITERIA + +```mermaid +graph TD + subgraph "EVALUATION CRITERIA" + C1["Scalability"] + C2["Maintainability"] + C3["Performance"] + C4["Security"] + C5["Cost"] + C6["Time to Market"] + end + + style C1 fill:#4dbb5f,stroke:#36873f,color:white + style C2 fill:#ffa64d,stroke:#cc7a30,color:white + style C3 fill:#d94dbb,stroke:#a3378a,color:white + style C4 fill:#4dbbbb,stroke:#368787,color:white + style C5 fill:#d971ff,stroke:#a33bc2,color:white + style C6 fill:#ff71c2,stroke:#c23b8a,color:white +``` + +## ๐Ÿ“Š ARCHITECTURE VISUALIZATION TEMPLATES + +### Component Diagram Template +```mermaid +graph TD + subgraph "SYSTEM ARCHITECTURE" + C1["Component 1"] + C2["Component 2"] + C3["Component 3"] + + C1 -->|"Interface 1"| C2 + C2 -->|"Interface 2"| C3 + end + + style C1 fill:#4dbb5f,stroke:#36873f,color:white + style C2 fill:#ffa64d,stroke:#cc7a30,color:white + style C3 fill:#d94dbb,stroke:#a3378a,color:white +``` + +### Data Flow Template +```mermaid +sequenceDiagram + participant C1 as Component 1 + participant C2 as Component 2 + participant C3 as Component 3 + + C1->>C2: Request + C2->>C3: Process + C3-->>C2: Response + C2-->>C1: Result +``` + +## โœ… VERIFICATION CHECKLIST + +```markdown +## Architecture Design Verification +- [ ] All system requirements addressed +- [ ] Component responsibilities defined +- [ ] Interfaces specified +- [ ] Data flows documented +- [ ] Security considerations addressed +- [ ] Scalability requirements met +- [ ] Performance requirements met +- [ ] Maintenance approach defined + +## Implementation Readiness +- [ ] All components identified +- [ ] Dependencies mapped +- [ ] Technical constraints documented +- [ ] Risk assessment completed +- [ ] Resource requirements defined +- [ ] Timeline estimates provided +``` + +## ๐Ÿ”„ ARCHITECTURE REVIEW PROCESS + +```mermaid +graph TD + subgraph "REVIEW PROCESS" + R1["Technical
Review"] + R2["Security
Review"] + R3["Performance
Review"] + R4["Final
Approval"] + end + + R1 --> R2 --> R3 --> R4 + + style R1 fill:#4dbb5f,stroke:#36873f,color:white + style R2 fill:#ffa64d,stroke:#cc7a30,color:white + style R3 fill:#d94dbb,stroke:#a3378a,color:white + style R4 fill:#4dbbbb,stroke:#368787,color:white +``` + +## ๐Ÿ”„ DOCUMENT MANAGEMENT + +```mermaid +graph TD + Current["Current Document"] --> Active["Active:
- creative-phase-architecture.md"] + Current --> Related["Related:
- creative-phase-enforcement.md
- planning-comprehensive.md"] + + style Current fill:#4da6ff,stroke:#0066cc,color:white + style Active fill:#4dbb5f,stroke:#36873f,color:white + style Related fill:#ffa64d,stroke:#cc7a30,color:white +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/Phases/CreativePhase/creative-phase-uiux.mdc b/.cursor/rules/isolation_rules/Phases/CreativePhase/creative-phase-uiux.mdc new file mode 100644 index 0000000..fa64254 --- /dev/null +++ b/.cursor/rules/isolation_rules/Phases/CreativePhase/creative-phase-uiux.mdc @@ -0,0 +1,232 @@ +--- +description: UI/UX Design Guidelines and Process for the Creative Phase +globs: creative-phase-uiux.mdc +alwaysApply: false +--- +Okay, I've updated the style guide location to `memory-bank/style-guide.md` and will provide the entire content for the new `creative-phase-uiux.md` file within a single markdown code block for easy copying. I've also reviewed the Mermaid diagrams to ensure they are correctly formatted. + +# Creative Phase: UI/UX Design Guidelines + +**Document Purpose:** This document outlines the structured approach for UI/UX design decisions during the Creative Phase. It ensures user-centric designs, exploration of multiple options, adherence to a style guide (if available or created), and clear documentation of UI/UX choices, aligning with React/Tailwind best practices. + +## ๐ŸŽจ UI/UX Design Philosophy + +* **User-Centricity**: Designs must prioritize the user's needs, goals, and context. +* **Clarity & Simplicity**: Interfaces should be intuitive and easy to understand. +* **Consistency**: Maintain consistency with established design patterns, project-specific styles, and platform conventions. +* **Accessibility (A11y)**: Adhere to WCAG guidelines to ensure usability for people with disabilities. +* **Efficiency**: Enable users to accomplish tasks with minimal effort. +* **Feedback**: Provide clear and timely feedback for user actions. +* **Visual Cohesion**: Ensure new UI elements align with the existing or defined project style guide. + +## ๐ŸŒŠ UI/UX Design Workflow + +This workflow guides the UI/UX design process within the Creative Phase, incorporating a crucial style guide check. + +```mermaid +graph TD + Start["UI/UX Design Start"] --> StyleGuideCheck["0. Style Guide Check
Attempt to locate 'memory-bank/style-guide.md' or user-provided path."] + StyleGuideCheck --> HasStyleGuide{"Style Guide
Available/Loaded?"} + + HasStyleGuide -- "Yes" --> Understand["Understand User & Task
(Personas, User Stories, Requirements)"] + HasStyleGuide -- "No" --> PromptCreateStyleGuide["Prompt User: Create/Link Style Guide?"] + + PromptCreateStyleGuide --> UserResponse{"User Opts to Create/Link?"} + UserResponse -- "Yes, Create" --> DefineStyleGuideSubProcess["SUB-PROCESS:Define Basic Style Guide"] + UserResponse -- "Yes, Link" --> LinkStyleGuide["User provides path/URL.
Load Style Guide."] + UserResponse -- "No" --> Understand_NoGuide["Understand User & Task
(Proceeding without Style Guide - WARN user of inconsistencies)"] + + DefineStyleGuideSubProcess --> StyleGuideCreated["Basic 'memory-bank/style-guide.md' Created/Defined"] + StyleGuideCreated --> Understand + LinkStyleGuide --> Understand + Understand_NoGuide --> InfoArch_NoGuide["Information Architecture"] + + Understand --> InfoArch["Information Architecture
(Structure, Navigation, Content Hierarchy)"] + InfoArch --> Interaction["Interaction Design
(User Flows, Wireframes, Prototypes - Conceptual)"] + Interaction --> VisualDesign["Visual Design
(APPLY STYLE GUIDE, Leverage React/Tailwind, Mockups - Conceptual)"] + VisualDesign --> Options["Explore UI/UX Options
(Generate 2-3 distinct solutions)"] + Options --> Evaluate["Evaluate Options
(Usability, Feasibility, A11y, Aesthetics, Style Guide Alignment)"] + Evaluate --> Decision["Make & Document UI/UX Decision
(Use Optimized Creative Template)"] + Decision --> Validate["Validate Against Requirements, Principles & Style Guide"] + Validate --> UIUX_Complete["UI/UX Design Complete for Component"] + + InfoArch_NoGuide --> Interaction_NoGuide["Interaction Design"] + Interaction_NoGuide --> VisualDesign_NoGuide["Visual Design
(Leverage React/Tailwind, Aim for Internal Consistency)"] + VisualDesign_NoGuide --> Options_NoGuide["Explore UI/UX Options"] + Options_NoGuide --> Evaluate_NoGuide["Evaluate Options
(Usability, Feasibility, A11y, Aesthetics)"] + Evaluate_NoGuide --> Decision_NoGuide["Make & Document UI/UX Decision"] + Decision_NoGuide --> Validate_NoGuide["Validate Against Requirements & Principles"] + Validate_NoGuide --> UIUX_Complete + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style StyleGuideCheck fill:#ab87ff,stroke:#7d5bbe,color:white + style HasStyleGuide fill:#ab87ff,stroke:#7d5bbe,color:white + style PromptCreateStyleGuide fill:#ffcb6b,stroke:#f9a825,color:black + style UserResponse fill:#ffcb6b,stroke:#f9a825,color:black + style DefineStyleGuideSubProcess fill:#c3e88d,stroke:#82a75c,color:black + style LinkStyleGuide fill:#c3e88d,stroke:#82a75c,color:black + style StyleGuideCreated fill:#c3e88d,stroke:#82a75c,color:black + style VisualDesign fill:#4dbbbb,stroke:#368787,color:white + style Evaluate fill:#d971ff,stroke:#a33bc2,color:white + style Validate fill:#71c2ff,stroke:#3b8aa3,color:white + style Understand_NoGuide fill:#ff8a80,stroke:#c85a54,color:black + style UIUX_Complete fill:#5fd94d,stroke:#3da336,color:white +``` + +## ๐Ÿ“– Style Guide Integration + +A consistent visual style is paramount for good UI/UX. This section details how to reference an existing style guide or prompt for its creation. **The primary location for the style guide in this system will be `memory-bank/style-guide.md`.** + +### Step 0: Style Guide Check & Handling + +**A. Checking for an Existing Style Guide:** +1. **Primary Location Check**: The system **MUST** first look for the style guide at this specific path: + * `memory-bank/style-guide.md` +2. **Secondary Check (User Prompt)**: If `memory-bank/style-guide.md` is not found, the system **MUST** prompt the user: + ``` + "I could not find 'memory-bank/style-guide.md'. + Is there an existing style guide at a different location, or a URL I should reference? + If yes, please provide the full path or URL. + Otherwise, we can create a basic 'memory-bank/style-guide.md' now, or you can opt to proceed without one (though this is not recommended for new UI development)." + ``` + +**B. Using an Existing Style Guide:** +* If `memory-bank/style-guide.md` is found or an alternative path/URL is provided by the user: + * Load its content into context. + * **CRITICAL**: All subsequent UI/UX design proposals (colors, typography, spacing, component appearance) **MUST** adhere strictly to this guide. + * When evaluating options (Step 6 of the workflow), "Adherence to Style Guide" **MUST** be a key evaluation criterion. + +**C. If No Style Guide Exists or is Provided (User Interaction):** +* If no style guide is found or linked by the user, the system **MUST** strongly recommend creating one: + ``` + "No style guide has been referenced. For optimal UI consistency and development efficiency, creating 'memory-bank/style-guide.md' is highly recommended." + + "Would you like to:" + "1. Create a basic 'memory-bank/style-guide.md' now? (I can help you define core elements like colors, typography, and spacing based on observations or your input.)" + "2. Proceed with UI/UX design without a style guide? (WARNING: This may lead to visual inconsistencies and is strongly discouraged for new features or significant UI changes.)" + "Please choose 1 or 2." + ``` + (If the user previously chose to link one but it failed, this prompt should adapt). + +**D. Assisting in Style Guide Creation (If user opts-in for option 1):** +This initiates a sub-process to define and document a basic style guide, which will be saved as `memory-bank/style-guide.md`. + +```mermaid +graph TD + StartCreate["User Opts to Create Style Guide"] --> GatherInspiration["Gather Inspiration
(e.g., Analyze user-provided image, existing UI, or direct user input)"] + GatherInspiration --> DefineColors["Define Core Color Palette
(Primary, Secondary, Accent, Neutrals, Status Colors - with hex codes)"] + DefineColors --> DefineTypography["Define Typography
(Font Families, Sizes, Weights for Headings, Body, Links)"] + DefineTypography --> DefineSpacing["Define Spacing System
(Base unit, margins, paddings, Tailwind scale usage)"] + DefineSpacing --> DefineComponents["Define Key Component Styles (Conceptual)
(Buttons, Inputs, Cards - using Tailwind utility classes if applicable)"] + DefineComponents --> DefineTone["Define Tone of Voice & Imagery Style (Optional)"] + DefineTone --> GenerateDoc["Generate content for 'memory-bank/style-guide.md'
(Populate with defined elements)"] + GenerateDoc --> SaveFile["Save the generated content to 'memory-bank/style-guide.md'"] + SaveFile --> Confirm["Confirm 'memory-bank/style-guide.md' creation & Proceed with UI/UX Design"] + + style StartCreate fill:#c3e88d,stroke:#82a75c,color:black + style GatherInspiration fill:#e0f2f1,stroke:#a7c4c0,color:black + style SaveFile fill:#89cff0,stroke:#50a6c2,color:black +``` +* **Process**: + 1. **Inspiration**: Analyze user-provided examples (like the dashboard image `original-a5959a2926d1e7ede16dbe1d27593a59.webp`) or ask for user preferences. + * `AI: "To create a style guide, do you have an existing design, screenshot, or website I can analyze for styles? Or would you like to define them from scratch?"` + 2. **Define Elements**: Guide the user through defining colors, typography, spacing, and key component styles (as detailed in the previous response regarding the sample based on the image). + 3. **Documentation**: Generate the content for `memory-bank/style-guide.md`. The structure should be similar to the sample style guide created from the dashboard image. + 4. **Save File**: The system should then create and save this content to the file `memory-bank/style-guide.md`. +* Once `memory-bank/style-guide.md` is created/loaded, it becomes the **single source of truth for visual design**. + +## ๐Ÿ–ผ๏ธ Key UI/UX Design Considerations (To be applied using `memory-bank/style-guide.md`) + +### 1. User Needs Analysis +* **Personas**: Define target user personas. +* **User Stories/Jobs-to-be-Done**: Clarify what users need to achieve. +* **Use Cases**: Detail specific interaction scenarios. + +### 2. Information Architecture (IA) +* **Content Inventory & Audit**: Understand existing content. +* **Hierarchy & Structure**: Organize content logically. +* **Navigation Design**: Design intuitive navigation (menus, breadcrumbs) adhering to `memory-bank/style-guide.md` for appearance. +* **Labeling**: Use clear and consistent labels. + +### 3. Interaction Design (IxD) +* **User Flows**: Map out the user's path. +* **Wireframes**: Create low-fidelity layouts. +* **Prototypes (Conceptual)**: Describe interactive elements and transitions. +* **Error Handling & Prevention**: Design clear error messages (styled per `memory-bank/style-guide.md`). +* **Feedback Mechanisms**: Implement visual/textual feedback (styled per `memory-bank/style-guide.md`). + +### 4. Visual Design (Strictly follow `memory-bank/style-guide.md`) +* **Style Guide Adherence**: **CRITICAL** - All visual choices **MUST** conform to `memory-bank/style-guide.md`. +* **Visual Hierarchy**: Use the Style Guide's typography and spacing to guide the user. +* **Layout & Composition**: Arrange elements effectively using Tailwind CSS and Style Guide spacing. +* **Typography**: Apply defined font families, sizes, and weights from the Style Guide. +* **Color Palette**: Exclusively use colors defined in the Style Guide. +* **Imagery & Iconography**: Use icons and images that match the Style Guide's defined style. +* **Branding**: Align with project branding guidelines as documented in the Style Guide. + +### 5. Accessibility (A11y) +* **WCAG Compliance Level**: Target AA or AAA. +* **Semantic HTML**. +* **Keyboard Navigation**. +* **ARIA Attributes**. +* **Color Contrast**: Verify against Style Guide colors. +* **Alternative Text**. + +### 6. Platform & Responsiveness +* **Responsive Design**: Ensure UI adapts to screen sizes using Style Guide's responsive principles (if defined). +* **Platform Conventions**: Adhere to UI patterns for the target platform(s). + +## ๐Ÿ› ๏ธ UI/UX Option Evaluation & Decision Making + +Reference the project's `optimized-creative-template.mdc`. Key evaluation criteria **must** include: + +* Usability +* Learnability +* Efficiency +* Accessibility +* Aesthetics (as defined by `memory-bank/style-guide.md`) +* Feasibility (React/Tailwind) +* Alignment with Requirements +* **Adherence to `memory-bank/style-guide.md` (CRITICAL if guide exists)** + +```mermaid +graph TD + subgraph "UI/UX EVALUATION CRITERIA" + C1["Usability"] + C2["Learnability"] + C3["Efficiency"] + C4["Accessibility (A11y)"] + C5["Aesthetics (Per Style Guide)"] + C6["Feasibility (React/Tailwind)"] + C7["Alignment with Requirements"] + C8["Style Guide Adherence"] + end + + style C8 fill:#ff5555,stroke:#c30052,color:white +``` + +## ๐Ÿ“ Documentation Standards + +* Use the project's `optimized-creative-template.mdc` for documenting UI/UX decisions. +* Clearly describe chosen UI patterns and rationale, referencing `memory-bank/style-guide.md`. +* Document considerations for responsive states and accessibility, as guided by `memory-bank/style-guide.md`. + +## โœ… UI/UX Design Verification Checklist + +* [ ] **Style Guide (`memory-bank/style-guide.md`) referenced or created?** +* [ ] User needs clearly understood and addressed? +* [ ] Information architecture logical and intuitive? +* [ ] Interaction design clear and efficient? +* [ ] **Visual design strictly adheres to `memory-bank/style-guide.md`?** +* [ ] Accessibility standards met? +* [ ] Responsive design addressed? +* [ ] Design decisions documented with rationale and Style Guide references? +* [ ] Alignment with React/Tailwind best practices and Style Guide considered? + +## ๐Ÿ”„ Integration with Other Creative Phases + +* **Architecture Design**: Ensure UI/UX is compatible with system architecture. +* **Data Model Design**: UI should effectively present/capture data from the data model. +* **Style Guide**: All UI/UX work **must** be a direct application or extension of the established `memory-bank/style-guide.md`. + +``` diff --git a/.cursor/rules/isolation_rules/Phases/CreativePhase/optimized-creative-template.mdc b/.cursor/rules/isolation_rules/Phases/CreativePhase/optimized-creative-template.mdc new file mode 100644 index 0000000..23c0e28 --- /dev/null +++ b/.cursor/rules/isolation_rules/Phases/CreativePhase/optimized-creative-template.mdc @@ -0,0 +1,219 @@ +--- +description: Optimized creative phase template with progressive documentation +globs: "**/creative*/**", "**/design*/**", "**/decision*/**" +alwaysApply: false +--- + +# OPTIMIZED CREATIVE PHASE TEMPLATE + +> **TL;DR:** This template implements a progressive documentation approach for creative phases, optimizing token usage while maintaining thorough design exploration. + +## ๐Ÿ“ PROGRESSIVE DOCUMENTATION MODEL + +```mermaid +graph TD + Start["Creative Phase Start"] --> P1["1๏ธโƒฃ PROBLEM
Define scope"] + P1 --> P2["2๏ธโƒฃ OPTIONS
Explore alternatives"] + P2 --> P3["3๏ธโƒฃ ANALYSIS
Evaluate selected options"] + P3 --> P4["4๏ธโƒฃ DECISION
Finalize approach"] + P4 --> P5["5๏ธโƒฃ IMPLEMENTATION
Document guidelines"] + + style Start fill:#d971ff,stroke:#a33bc2,color:white + style P1 fill:#4da6ff,stroke:#0066cc,color:white + style P2 fill:#ffa64d,stroke:#cc7a30,color:white + style P3 fill:#4dbb5f,stroke:#36873f,color:white + style P4 fill:#d94dbb,stroke:#a3378a,color:white + style P5 fill:#4dbbbb,stroke:#368787,color:white +``` + +## ๐Ÿ“‹ TEMPLATE STRUCTURE + +```markdown +๐Ÿ“Œ CREATIVE PHASE START: [Component Name] +โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” + +1๏ธโƒฃ PROBLEM + Description: [Brief problem description] + Requirements: [Key requirements as bullet points] + Constraints: [Technical or business constraints] + +2๏ธโƒฃ OPTIONS + Option A: [Name] - [One-line description] + Option B: [Name] - [One-line description] + Option C: [Name] - [One-line description] + +3๏ธโƒฃ ANALYSIS + | Criterion | Option A | Option B | Option C | + |-----------|----------|----------|----------| + | Performance | โญโญโญ | โญโญ | โญโญโญโญ | + | Complexity | โญโญ | โญโญโญ | โญโญโญโญ | + | Maintainability | โญโญโญโญ | โญโญโญ | โญโญ | + + Key Insights: + - [Insight 1] + - [Insight 2] + +4๏ธโƒฃ DECISION + Selected: [Option X] + Rationale: [Brief justification] + +5๏ธโƒฃ IMPLEMENTATION NOTES + - [Implementation note 1] + - [Implementation note 2] + - [Implementation note 3] + +โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” +๐Ÿ“Œ CREATIVE PHASE END +``` + +## ๐Ÿงฉ DETAILED OPTION ANALYSIS (ON DEMAND) + +Detailed analysis can be provided on demand for selected options: + +```markdown +
+ Detailed Analysis: Option A + + ### Option A: [Full Name] + + **Complete Description**: + [Detailed description of how the option works] + + **Pros**: + - [Pro 1 with explanation] + - [Pro 2 with explanation] + - [Pro 3 with explanation] + + **Cons**: + - [Con 1 with explanation] + - [Con 2 with explanation] + + **Implementation Complexity**: [Low/Medium/High] + [Explanation of complexity factors] + + **Resource Requirements**: + [Details on resource needs] + + **Risk Assessment**: + [Analysis of risks] +
+``` + +## ๐Ÿ“Š COMPLEXITY-BASED SCALING + +The template automatically scales documentation requirements based on task complexity level: + +### Level 1-2 (Quick Fix/Enhancement) +- Simplified problem/solution +- Focus on implementation +- Minimal option exploration + +### Level 3 (Feature Development) +- Multiple options required +- Analysis table with key criteria +- Implementation guidelines + +### Level 4 (Enterprise Development) +- Comprehensive analysis +- Multiple viewpoints considered +- Detailed implementation plan +- Expanded verification criteria + +## โœ… VERIFICATION PROTOCOL + +Quality verification is condensed into a simple checklist: + +```markdown +VERIFICATION: +[x] Problem clearly defined +[x] Multiple options considered +[x] Decision made with rationale +[x] Implementation guidance provided +``` + +## ๐Ÿ”„ USAGE EXAMPLES + +### Architecture Decision (Level 3) + +```markdown +๐Ÿ“Œ CREATIVE PHASE START: Authentication System +โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” + +1๏ธโƒฃ PROBLEM + Description: Design an authentication system for the application + Requirements: Secure, scalable, supports SSO, easy to maintain + Constraints: Must work with existing user database, <100ms response time + +2๏ธโƒฃ OPTIONS + Option A: JWT-based stateless auth - Simple token-based approach + Option B: Session-based auth with Redis - Server-side session storage + Option C: OAuth2 implementation - Delegated authorization framework + +3๏ธโƒฃ ANALYSIS + | Criterion | JWT | Sessions | OAuth2 | + |-----------|-----|----------|--------| + | Security | โญโญโญ | โญโญโญโญ | โญโญโญโญโญ | + | Scalability | โญโญโญโญโญ | โญโญโญ | โญโญโญโญ | + | Complexity | โญโญ | โญโญโญ | โญโญโญโญ | + | Performance | โญโญโญโญโญ | โญโญโญ | โญโญโญ | + + Key Insights: + - JWT offers best performance but limited revocation options + - Sessions provide better security control but require more infrastructure + - OAuth2 most complex but offers best integration possibilities + +4๏ธโƒฃ DECISION + Selected: Option A: JWT-based auth with refresh tokens + Rationale: Best balance of performance and scalability while meeting security needs + +5๏ธโƒฃ IMPLEMENTATION NOTES + - Use HS256 algorithm for token signing + - Implement short-lived access tokens (15min) with longer refresh tokens (7 days) + - Store token blacklist in Redis for revocation capability + - Add rate limiting on token endpoints + +โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” +๐Ÿ“Œ CREATIVE PHASE END +``` + +### Algorithm Decision (Level 2) + +```markdown +๐Ÿ“Œ CREATIVE PHASE START: Search Algorithm +โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” + +1๏ธโƒฃ PROBLEM + Description: Implement efficient text search for product catalog + Requirements: Fast results, support for partial matches, case insensitive + Constraints: Dataset < 10,000 items, must work in browser environment + +2๏ธโƒฃ OPTIONS + Option A: Simple regex search - Basic pattern matching + Option B: Trie-based search - Prefix tree structure + Option C: Fuzzy search with Levenshtein - Edit distance algorithm + +3๏ธโƒฃ DECISION + Selected: Option B: Trie-based search + Rationale: Best performance for prefix searches with manageable memory usage + +4๏ธโƒฃ IMPLEMENTATION NOTES + - Use existing trie library + - Preprocess text to lowercase during indexing + - Implement letter-by-letter search for instant results + - Add debounce (300ms) to prevent excessive rebuilding + +โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” +๐Ÿ“Œ CREATIVE PHASE END +``` + +## ๐Ÿ† TOKEN EFFICIENCY BENEFITS + +This template significantly reduces token usage by: + +1. Focusing on essential information without unnecessary verbosity +2. Using compact tabular formats for comparisons +3. Implementing progressive disclosure for detailed information +4. Scaling documentation requirements by task complexity +5. Using visual indicators (emojis) for quick scanning + +The template maintains the rigor of the creative process while improving token efficiency by approximately 60% over the previous format. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/main-optimized.mdc b/.cursor/rules/isolation_rules/main-optimized.mdc new file mode 100644 index 0000000..723a65c --- /dev/null +++ b/.cursor/rules/isolation_rules/main-optimized.mdc @@ -0,0 +1,237 @@ +--- +description: Optimized main rule for improved token efficiency +globs: main-optimized.mdc +alwaysApply: false +--- +# ๐Ÿ” OPTIMIZED MEMORY BANK SYSTEM + +๐Ÿšจ CRITICAL RULE: MEMORY BANK CREATION IS MANDATORY ๐Ÿšจ +Memory Bank MUST be created BEFORE any other operation in ANY mode +NO process can continue without verifying Memory Bank existence + +> **TL;DR:** This system uses optimized context management and adaptive rule loading to maximize token efficiency while preserving the structured development approach. + +## ๐Ÿงญ OPTIMIZED MODE ARCHITECTURE + +```mermaid +graph TD + subgraph "Memory Bank Core" + Context["Context Manager"] + Rules["Rule Loader"] + FileIO["File Manager"] + Transition["Mode Transition"] + end + + subgraph "Custom Modes" + VAN["VAN
Initialization"] + PLAN["PLAN
Planning"] + CREATIVE["CREATIVE
Design"] + IMPLEMENT["IMPLEMENT
Building"] + REFLECT["REFLECT
Review"] + ARCHIVE["ARCHIVE
Documentation"] + end + + Context --> VAN & PLAN & CREATIVE & IMPLEMENT & REFLECT & ARCHIVE + Rules --> VAN & PLAN & CREATIVE & IMPLEMENT & REFLECT & ARCHIVE + FileIO --> VAN & PLAN & CREATIVE & IMPLEMENT & REFLECT & ARCHIVE + Transition --> VAN & PLAN & CREATIVE & IMPLEMENT & REFLECT & ARCHIVE + + VAN --> PLAN + PLAN --> CREATIVE + CREATIVE --> IMPLEMENT + IMPLEMENT --> REFLECT + REFLECT --> ARCHIVE + + style Context fill:#4da6ff,stroke:#0066cc,color:white + style Rules fill:#ffa64d,stroke:#cc7a30,color:white + style FileIO fill:#4dbb5f,stroke:#36873f,color:white + style Transition fill:#d94dbb,stroke:#a3378a,color:white +``` + +## ๐Ÿ“ˆ ADAPTIVE COMPLEXITY MODEL + +```mermaid +graph TD + Task["Task Creation"] --> Complexity{"Complexity
Level?"} + + Complexity -->|"Level 1
Quick Fix"| L1["3-Phase
Streamlined Process"] + Complexity -->|"Level 2
Enhancement"| L2["4-Phase
Balanced Process"] + Complexity -->|"Level 3
Feature"| L3["5-Phase
Comprehensive Process"] + Complexity -->|"Level 4
Enterprise"| L4["6-Phase
Governance Process"] + + L1 --> L1_Process["VAN โ†’ IMPLEMENT โ†’ REFLECT"] + L2 --> L2_Process["VAN โ†’ PLAN โ†’ IMPLEMENT โ†’ REFLECT"] + L3 --> L3_Process["VAN โ†’ PLAN โ†’ CREATIVE โ†’ IMPLEMENT โ†’ REFLECT"] + L4 --> L4_Process["VAN โ†’ PLAN โ†’ CREATIVE โ†’ IMPLEMENT โ†’ REFLECT โ†’ ARCHIVE"] + + style Complexity fill:#d94dbb,stroke:#a3378a,color:white + style L1 fill:#4dbb5f,stroke:#36873f,color:white + style L2 fill:#ffa64d,stroke:#cc7a30,color:white + style L3 fill:#4da6ff,stroke:#0066cc,color:white + style L4 fill:#ff5555,stroke:#cc0000,color:white +``` + +## ๐Ÿง  HIERARCHICAL RULE LOADING + +Rules are loaded hierarchically to optimize context usage: + +```mermaid +graph TD + Root["Memory Bank
Common Rules"] --> Core["Core Rules
Shared Across Modes"] + + Core --> L1["Level 1
Rules"] + Core --> L2["Level 2
Rules"] + Core --> L3["Level 3
Rules"] + Core --> L4["Level 4
Rules"] + + Core --> VM["Mode
Visual Maps"] + + Core --> Phase["Phase-Specific
Rules"] + + Phase --> VAN_Rules["VAN Mode
Rules"] + Phase --> PLAN_Rules["PLAN Mode
Rules"] + Phase --> CREATIVE_Rules["CREATIVE Mode
Rules"] + Phase --> IMPLEMENT_Rules["IMPLEMENT Mode
Rules"] + Phase --> REFLECT_Rules["REFLECT Mode
Rules"] + Phase --> ARCHIVE_Rules["ARCHIVE Mode
Rules"] + + style Root fill:#4da6ff,stroke:#0066cc,color:white + style Core fill:#ffa64d,stroke:#cc7a30,color:white + style Phase fill:#4dbb5f,stroke:#36873f,color:white +``` + +## ๐Ÿ”„ TOKEN-OPTIMIZED CREATIVE PHASE + +Creative phase documentation is progressively generated: + +```mermaid +graph TD + Start["Creative Phase
Initiation"] --> P1["1๏ธโƒฃ PROBLEM
Define scope"] + P1 --> P2["2๏ธโƒฃ OPTIONS
List alternatives"] + P2 --> P3["3๏ธโƒฃ ANALYSIS
Compare options"] + P3 --> P4["4๏ธโƒฃ DECISION
Select approach"] + P4 --> P5["5๏ธโƒฃ GUIDELINES
Document implementation"] + + P3 -.->|"On Demand"| Details["Detailed Option
Analysis"] + + style Start fill:#d971ff,stroke:#a33bc2,color:white + style P1 fill:#4da6ff,stroke:#0066cc,color:white + style P2 fill:#ffa64d,stroke:#cc7a30,color:white + style P3 fill:#4dbb5f,stroke:#36873f,color:white + style P4 fill:#d94dbb,stroke:#a3378a,color:white + style P5 fill:#4dbbbb,stroke:#368787,color:white + style Details fill:#e699d9,stroke:#d94dbb,color:white,stroke-dasharray: 5 5 +``` + +## ๐Ÿ”€ OPTIMIZED MODE TRANSITIONS + +Mode transitions use a unified context transfer protocol: + +```mermaid +sequenceDiagram + participant Current as Current Mode + participant Context as Context Manager + participant Next as Next Mode + + Current->>Context: Create transition document + Current->>Context: Store critical context + Context->>Context: Prepare rule cache + Current->>Next: Initiate transition + Next->>Context: Verify context availability + Context->>Next: Load relevant context + Context->>Next: Load cached rules + Next->>Next: Continue with preserved context +``` + +## ๐Ÿ“Š MEMORY BANK EFFICIENT UPDATES + +```mermaid +graph TD + subgraph "Memory Bank Files" + tasks["tasks.md
Source of Truth"] + active["activeContext.md
Current Focus"] + creative["creative-*.md
Design Decisions"] + progress["progress.md
Implementation Status"] + transition["transition.md
Mode Transitions"] + end + + Update["Update Request"] --> Diff{"Changed?"} + Diff -->|"No"| Skip["Skip Update"] + Diff -->|"Yes"| Section{"Section
Change?"} + Section -->|"Yes"| Partial["Update Changed
Sections Only"] + Section -->|"No"| Full["Full File
Update"] + + Partial --> tasks + Full --> tasks + + style Update fill:#4da6ff,stroke:#0066cc,color:white + style Diff fill:#ffa64d,stroke:#cc7a30,color:white + style Section fill:#4dbb5f,stroke:#36873f,color:white + style Partial fill:#d94dbb,stroke:#a3378a,color:white + style Full fill:#4dbbbb,stroke:#368787,color:white +``` + +## ๐Ÿ’ป COMPLEXITY-BASED DOCUMENTATION + +Documentation requirements scale based on complexity level: + +| Documentation | Level 1 | Level 2 | Level 3 | Level 4 | +|---------------|---------|---------|---------|---------| +| Problem Definition | Brief | Standard | Detailed | Comprehensive | +| Options Analysis | Optional | Basic | Multiple Options | Extensive | +| Implementation Plan | Simple | Standard | Detailed | Phased | +| Testing Requirements | Basic | Standard | Comprehensive | Rigorous | +| Documentation | Minimal | Standard | Detailed | Extensive | + +## ๐Ÿ“‘ OPTIMIZED TEMPLATES BY LEVEL + +### Level 1: Quick Fix Template +```markdown +## QUICK FIX: [Issue Name] +- Problem: [Brief description] +- Solution: [Implemented approach] +- Verification: [How fix was tested] +``` + +### Level 2: Enhancement Template +```markdown +## ENHANCEMENT: [Feature Name] +- Requirement: [What needs to be done] +- Approach: [How it was implemented] +- Testing: [Verification approach] +- Documentation: [Where documented] +``` + +### Level 3-4: Comprehensive Template +Uses the optimized creative phase template with appropriate documentation depth + +## ๐Ÿ”„ REFERENCE MAPS + +Each mode's visual process map is optimized for token efficiency: + +- @VAN Mode Map (Optimized) +- @PLAN Mode Map (Optimized) +- @CREATIVE Mode Map (Optimized) +- @IMPLEMENT Mode Map (Optimized) +- @REFLECT Mode Map (Optimized) +- @ARCHIVE Mode Map (Optimized) + +## โšก TOKEN EFFICIENCY IMPROVEMENTS + +Optimizations in this version: + +1. Hierarchical rule loading (65% token reduction) +2. Progressive creative phase documentation (60% token reduction) +3. Context preservation during mode transitions (40% token reduction) +4. Differential Memory Bank updates (30% token reduction) +5. Complexity-based template scaling (varies by level) + +## ๐Ÿ’ก USAGE GUIDANCE + +To use the optimized system: + +1. Start with the VAN command to initialize and determine complexity +2. Follow the complexity-appropriate workflow +3. Use progressive documentation appropriate to task complexity +4. Let the system manage rule loading and context preservation +5. Enjoy the improved token efficiency while maintaining structured development \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/main.mdc b/.cursor/rules/isolation_rules/main.mdc new file mode 100644 index 0000000..7d07f58 --- /dev/null +++ b/.cursor/rules/isolation_rules/main.mdc @@ -0,0 +1,156 @@ +--- +description: main rule +globs: main.mdc +alwaysApply: false +--- +# ๐Ÿ” ISOLATION-FOCUSED MEMORY BANK SYSTEM + +๐Ÿšจ CRITICAL RULE: MEMORY BANK CREATION IS MANDATORY ๐Ÿšจ +Memory Bank MUST be created BEFORE any other operation in ANY mode +NO process can continue without verifying Memory Bank existence + +> **TL;DR:** This system is designed to work with Cursor custom modes, where each mode loads only the rules it needs. The system uses visual Mermaid diagrams and selective document loading to optimize context usage. + +## ๐Ÿงญ MODE-SPECIFIC VISUAL MAPS + +```mermaid +graph TD + subgraph Modes["Cursor Custom Modes"] + VAN["VAN MODE
Initialization"] --> PLAN["PLAN MODE
Task Planning"] + PLAN --> Creative["CREATIVE MODE
Design Decisions"] + Creative --> Implement["IMPLEMENT MODE
Code Implementation"] + Implement --> Reflect["REFLECT MODE
Task Review"] + Reflect --> Archive["ARCHIVE MODE
Documentation"] + end + + VAN -.->|"Loads"| VANRules["โ€ข main.md
โ€ข platform-awareness.md
โ€ข file-verification.md
โ€ข workflow-init.md"] + PLAN -.->|"Loads"| PLANRules["โ€ข main.md
โ€ข task-tracking.md
โ€ข planning-process.md"] + Creative -.->|"Loads"| CreativeRules["โ€ข main.md
โ€ข creative-phase.md
โ€ข design-patterns.md"] + Implement -.->|"Loads"| ImplementRules["โ€ข main.md
โ€ข command-execution.md
โ€ข implementation-guide.md"] + Reflect -.->|"Loads"| ReflectRules["โ€ข main.md
โ€ข reflection-format.md"] + Archive -.->|"Loads"| ArchiveRules["โ€ข main.md
โ€ข archiving-guide.md"] +``` + +## ๐Ÿ“‹ MEMORY BANK VERIFICATION - MANDATORY IN ALL MODES + +```mermaid +graph TD + Start["Mode Activation"] --> CheckMemBank{"Memory Bank
Exists?"} + + CheckMemBank -->|"No"| CreateMemBank["CREATE MEMORY BANK
[CRITICAL STEP]"] + CheckMemBank -->|"Yes"| VerifyMemBank["Verify Memory Bank
Structure"] + + CreateMemBank --> VerifyCreation{"Creation
Successful?"} + VerifyCreation -->|"No"| AbortAll["โ›” ABORT ALL OPERATIONS
Fix Memory Bank First"] + VerifyCreation -->|"Yes"| VerifyMemBank + + VerifyMemBank --> StructureCheck{"Structure
Valid?"} + StructureCheck -->|"No"| FixStructure["Fix Memory Bank
Structure"] + StructureCheck -->|"Yes"| ContinueMode["Continue with
Mode Operations"] + + FixStructure --> VerifyFix{"Fix
Successful?"} + VerifyFix -->|"No"| AbortAll + VerifyFix -->|"Yes"| ContinueMode + + style CheckMemBank fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style CreateMemBank fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style VerifyCreation fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style AbortAll fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style StructureCheck fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style FixStructure fill:#ff5555,stroke:#dd3333,color:white + style VerifyFix fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐Ÿ“š VISUAL PROCESS MAPS + +Each mode has its own visual process map: + +- @VAN Mode Map +- @PLAN Mode Map +- @CREATIVE Mode Map +- @IMPLEMENT Mode Map +- @REFLECT Mode Map +- @ARCHIVE Mode Map + +## ๐Ÿ”„ FILE STATE VERIFICATION + +In this isolation-focused approach, Memory Bank files maintain continuity between modes: + +```mermaid +graph TD + subgraph "Memory Bank Files" + tasks["tasks.md
Source of Truth"] + active["activeContext.md
Current Focus"] + creative["creative-*.md
Design Decisions"] + progress["progress.md
Implementation Status"] + end + + VAN["VAN MODE"] -->|"Creates/Updates"| tasks + VAN -->|"Creates/Updates"| active + + PLAN["PLAN MODE"] -->|"Reads"| tasks + PLAN -->|"Reads"| active + PLAN -->|"Updates"| tasks + + Creative["CREATIVE MODE"] -->|"Reads"| tasks + Creative -->|"Creates"| creative + Creative -->|"Updates"| tasks + + Implement["IMPLEMENT MODE"] -->|"Reads"| tasks + Implement -->|"Reads"| creative + Implement -->|"Updates"| tasks + Implement -->|"Updates"| progress + + Reflect["REFLECT MODE"] -->|"Reads"| tasks + Reflect -->|"Reads"| progress + Reflect -->|"Updates"| tasks + + Archive["ARCHIVE MODE"] -->|"Reads"| tasks + Archive -->|"Reads"| progress + Archive -->|"Archives"| creative +``` + +## ๐Ÿ“‹ MODE TRANSITION PROTOCOL + +```mermaid +sequenceDiagram + participant User + participant CurrentMode + participant NextMode + + CurrentMode->>CurrentMode: Complete Phase Requirements + CurrentMode->>User: "Phase complete. NEXT MODE: [mode name]" + User->>CurrentMode: End Current Mode + User->>NextMode: Start Next Mode + NextMode->>NextMode: Verify Required File State + + alt File State Valid + NextMode->>User: "Continuing from previous mode..." + else File State Invalid + NextMode->>User: "Required files not in expected state" + NextMode->>User: "Return to [previous mode] to complete requirements" + end +``` + +## ๐Ÿ’ป PLATFORM-SPECIFIC COMMANDS + +| Action | Windows | Mac/Linux | +|--------|---------|-----------| +| Create file | `echo. > file.ext` | `touch file.ext` | +| Create directory | `mkdir directory` | `mkdir -p directory` | +| Change directory | `cd directory` | `cd directory` | +| List files | `dir` | `ls` | +| Show file content | `type file.ext` | `cat file.ext` | + +## โš ๏ธ COMMAND EFFICIENCY GUIDANCE + +For optimal performance, use efficient command chaining when appropriate: + +``` +# Efficient command chaining examples: +mkdir -p project/{src,tests,docs} && cd project +grep "TODO" $(find . -name "*.js") +npm install && npm start +``` + +Refer to [command-execution.mdc](mdc:.cursor/rules/isolation_rules/Core/command-execution.mdc) for detailed guidance. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/archive-mode-map.mdc b/.cursor/rules/isolation_rules/visual-maps/archive-mode-map.mdc new file mode 100644 index 0000000..7167e1f --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/archive-mode-map.mdc @@ -0,0 +1,272 @@ +--- +description: Visual process map for ARCHIVE mode (Task Documentation) +globs: "**/archive*/**", "**/document*/**", "**/complete*/**" +alwaysApply: false +--- + +# ARCHIVE MODE: TASK DOCUMENTATION PROCESS MAP + +> **TL;DR:** This visual map guides the ARCHIVE mode process, focusing on creating comprehensive documentation of the completed task, archiving relevant files, and updating the Memory Bank for future reference. + +## ๐Ÿงญ ARCHIVE MODE PROCESS FLOW + +```mermaid +graph TD + Start["START ARCHIVE MODE"] --> ReadTasks["Read tasks.md
reflection.md and
progress.md"] + + %% Initial Assessment + ReadTasks --> VerifyReflect{"Reflection
Complete?"} + VerifyReflect -->|"No"| ReturnReflect["Return to
REFLECT Mode"] + VerifyReflect -->|"Yes"| AssessLevel{"Determine
Complexity Level"} + + %% Level-Based Archiving + AssessLevel -->|"Level 1"| L1Archive["LEVEL 1 ARCHIVING
Level1/archive-minimal.md"] + AssessLevel -->|"Level 2"| L2Archive["LEVEL 2 ARCHIVING
Level2/archive-basic.md"] + AssessLevel -->|"Level 3"| L3Archive["LEVEL 3 ARCHIVING
Level3/archive-standard.md"] + AssessLevel -->|"Level 4"| L4Archive["LEVEL 4 ARCHIVING
Level4/archive-comprehensive.md"] + + %% Level 1 Archiving (Minimal) + L1Archive --> L1Summary["Create Quick
Summary"] + L1Summary --> L1Task["Update
tasks.md"] + L1Task --> L1Complete["Mark Task
Complete"] + + %% Level 2 Archiving (Basic) + L2Archive --> L2Summary["Create Basic
Archive Document"] + L2Summary --> L2Doc["Document
Changes"] + L2Doc --> L2Task["Update
tasks.md"] + L2Task --> L2Progress["Update
progress.md"] + L2Progress --> L2Complete["Mark Task
Complete"] + + %% Level 3-4 Archiving (Comprehensive) + L3Archive & L4Archive --> L34Summary["Create Comprehensive
Archive Document"] + L34Summary --> L34Doc["Document
Implementation"] + L34Doc --> L34Creative["Archive Creative
Phase Documents"] + L34Creative --> L34Code["Document Code
Changes"] + L34Code --> L34Test["Document
Testing"] + L34Test --> L34Lessons["Summarize
Lessons Learned"] + L34Lessons --> L34Task["Update
tasks.md"] + L34Task --> L34Progress["Update
progress.md"] + L34Progress --> L34System["Update System
Documentation"] + L34System --> L34Complete["Mark Task
Complete"] + + %% Completion + L1Complete & L2Complete & L34Complete --> CreateArchive["Create Archive
Document in
docs/archive/"] + CreateArchive --> UpdateActive["Update
activeContext.md"] + UpdateActive --> Reset["Reset for
Next Task"] +``` + +## ๐Ÿ“‹ ARCHIVE DOCUMENT STRUCTURE + +The archive document should follow this structured format: + +```mermaid +graph TD + subgraph "Archive Document Structure" + Header["# TASK ARCHIVE: [Task Name]"] + Meta["## METADATA
Task info, dates, complexity"] + Summary["## SUMMARY
Brief overview of the task"] + Requirements["## REQUIREMENTS
What the task needed to accomplish"] + Implementation["## IMPLEMENTATION
How the task was implemented"] + Testing["## TESTING
How the solution was verified"] + Lessons["## LESSONS LEARNED
Key takeaways from the task"] + Refs["## REFERENCES
Links to related documents"] + end + + Header --> Meta --> Summary --> Requirements --> Implementation --> Testing --> Lessons --> Refs +``` + +## ๐Ÿ“Š REQUIRED FILE STATE VERIFICATION + +Before archiving can begin, verify file state: + +```mermaid +graph TD + Start["File State
Verification"] --> CheckTasks{"tasks.md has
reflection
complete?"} + + CheckTasks -->|"No"| ErrorReflect["ERROR:
Return to REFLECT Mode"] + CheckTasks -->|"Yes"| CheckReflection{"reflection.md
exists?"} + + CheckReflection -->|"No"| ErrorCreate["ERROR:
Create reflection.md first"] + CheckReflection -->|"Yes"| CheckProgress{"progress.md
updated?"} + + CheckProgress -->|"No"| ErrorProgress["ERROR:
Update progress.md first"] + CheckProgress -->|"Yes"| ReadyArchive["Ready for
Archiving"] +``` + +## ๐Ÿ” ARCHIVE TYPES BY COMPLEXITY + +```mermaid +graph TD + subgraph "Level 1: Minimal Archive" + L1A["Basic Bug
Description"] + L1B["Solution
Summary"] + L1C["Affected
Files"] + end + + subgraph "Level 2: Basic Archive" + L2A["Enhancement
Description"] + L2B["Implementation
Summary"] + L2C["Testing
Results"] + L2D["Lessons
Learned"] + end + + subgraph "Level 3-4: Comprehensive Archive" + L3A["Detailed
Requirements"] + L3B["Architecture/
Design Decisions"] + L3C["Implementation
Details"] + L3D["Testing
Strategy"] + L3E["Performance
Considerations"] + L3F["Future
Enhancements"] + L3G["Cross-References
to Other Systems"] + end + + L1A --> L1B --> L1C + + L2A --> L2B --> L2C --> L2D + + L3A --> L3B --> L3C --> L3D --> L3E --> L3F --> L3G +``` + +## ๐Ÿ“ ARCHIVE DOCUMENT TEMPLATES + +### Level 1 (Minimal) Archive +``` +# Bug Fix Archive: [Bug Name] + +## Date +[Date of fix] + +## Summary +[Brief description of the bug and solution] + +## Implementation +[Description of the fix implemented] + +## Files Changed +- [File 1] +- [File 2] +``` + +### Levels 2-4 (Comprehensive) Archive +``` +# Task Archive: [Task Name] + +## Metadata +- **Complexity**: Level [2/3/4] +- **Type**: [Enhancement/Feature/System] +- **Date Completed**: [Date] +- **Related Tasks**: [Related task references] + +## Summary +[Comprehensive summary of the task] + +## Requirements +- [Requirement 1] +- [Requirement 2] +- [Requirement 3] + +## Implementation +### Approach +[Description of implementation approach] + +### Key Components +- [Component 1]: [Description] +- [Component 2]: [Description] + +### Files Changed +- [File 1]: [Description of changes] +- [File 2]: [Description of changes] + +## Testing +- [Test 1]: [Result] +- [Test 2]: [Result] + +## Lessons Learned +- [Lesson 1] +- [Lesson 2] +- [Lesson 3] + +## Future Considerations +- [Future enhancement 1] +- [Future enhancement 2] + +## References +- [Link to reflection document] +- [Link to creative phase documents] +- [Other relevant references] +``` + +## ๐Ÿ“‹ ARCHIVE LOCATION AND NAMING + +Archive documents should be organized following this pattern: + +```mermaid +graph TD + subgraph "Archive Structure" + Root["docs/archive/"] + Tasks["tasks/"] + Features["features/"] + Systems["systems/"] + + Root --> Tasks + Root --> Features + Root --> Systems + + Tasks --> Bug["bug-fix-name-YYYYMMDD.md"] + Tasks --> Enhancement["enhancement-name-YYYYMMDD.md"] + Features --> Feature["feature-name-YYYYMMDD.md"] + Systems --> System["system-name-YYYYMMDD.md"] + end +``` + +## ๐Ÿ“Š TASKS.MD FINAL UPDATE + +When archiving is complete, update tasks.md with: + +``` +## Status +- [x] Initialization complete +- [x] Planning complete +[For Level 3-4:] +- [x] Creative phases complete +- [x] Implementation complete +- [x] Reflection complete +- [x] Archiving complete + +## Archive +- **Date**: [Completion date] +- **Archive Document**: [Link to archive document] +- **Status**: COMPLETED +``` + +## ๐Ÿ“‹ ARCHIVE VERIFICATION CHECKLIST + +``` +โœ“ ARCHIVE VERIFICATION +- Reflection document reviewed? [YES/NO] +- Archive document created with all sections? [YES/NO] +- Archive document placed in correct location? [YES/NO] +- tasks.md marked as completed? [YES/NO] +- progress.md updated with archive reference? [YES/NO] +- activeContext.md updated for next task? [YES/NO] +- Creative phase documents archived (Level 3-4)? [YES/NO/NA] + +โ†’ If all YES: Archiving complete - Memory Bank reset for next task +โ†’ If any NO: Complete missing archive elements +``` + +## ๐Ÿ”„ TASK COMPLETION NOTIFICATION + +When archiving is complete, notify user with: + +``` +## TASK ARCHIVED + +โœ… Archive document created in docs/archive/ +โœ… All task documentation preserved +โœ… Memory Bank updated with references +โœ… Task marked as COMPLETED + +โ†’ Memory Bank is ready for the next task +โ†’ To start a new task, use VAN MODE +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/creative-mode-map.mdc b/.cursor/rules/isolation_rules/visual-maps/creative-mode-map.mdc new file mode 100644 index 0000000..9444319 --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/creative-mode-map.mdc @@ -0,0 +1,224 @@ +--- +description: Visual process map for CREATIVE mode (Design Decisions) +globs: "**/creative*/**", "**/design*/**", "**/decision*/**" +alwaysApply: false +--- + +# CREATIVE MODE: DESIGN PROCESS MAP + +> **TL;DR:** This visual map guides the CREATIVE mode process, focusing on structured design decision-making for components that require deeper exploration before implementation. + +## ๐Ÿงญ CREATIVE MODE PROCESS FLOW + +```mermaid +graph TD + Start["START CREATIVE MODE"] --> ReadTasks["Read tasks.md
For Creative Requirements"] + + %% Initial Assessment + ReadTasks --> VerifyPlan{"Plan Complete
& Creative Phases
Identified?"} + VerifyPlan -->|"No"| ReturnPlan["Return to
PLAN Mode"] + VerifyPlan -->|"Yes"| IdentifyPhases["Identify Creative
Phases Required"] + + %% Creative Phase Selection + IdentifyPhases --> SelectPhase["Select Next
Creative Phase"] + SelectPhase --> PhaseType{"Creative
Phase Type?"} + + %% Creative Phase Types + PhaseType -->|"UI/UX
Design"| UIPhase["UI/UX CREATIVE PHASE
Core/creative-phase-uiux.md"] + PhaseType -->|"Architecture
Design"| ArchPhase["ARCHITECTURE CREATIVE PHASE
Core/creative-phase-architecture.md"] + PhaseType -->|"Data Model
Design"| DataPhase["DATA MODEL CREATIVE PHASE
Core/creative-phase-data.md"] + PhaseType -->|"Algorithm
Design"| AlgoPhase["ALGORITHM CREATIVE PHASE
Core/creative-phase-algorithm.md"] + + %% UI/UX Creative Phase + UIPhase --> UI_Problem["Define UI/UX
Problem"] + UI_Problem --> UI_Research["Research UI
Patterns"] + UI_Research --> UI_Options["Explore UI
Options"] + UI_Options --> UI_Evaluate["Evaluate User
Experience"] + UI_Evaluate --> UI_Decision["Make Design
Decision"] + UI_Decision --> UI_Document["Document UI
Design"] + + %% Architecture Creative Phase + ArchPhase --> Arch_Problem["Define Architecture
Challenge"] + Arch_Problem --> Arch_Options["Explore Architecture
Options"] + Arch_Options --> Arch_Analyze["Analyze Tradeoffs"] + Arch_Analyze --> Arch_Decision["Make Architecture
Decision"] + Arch_Decision --> Arch_Document["Document
Architecture"] + Arch_Document --> Arch_Diagram["Create Architecture
Diagram"] + + %% Data Model Creative Phase + DataPhase --> Data_Requirements["Define Data
Requirements"] + Data_Requirements --> Data_Structure["Design Data
Structure"] + Data_Structure --> Data_Relations["Define
Relationships"] + Data_Relations --> Data_Validation["Design
Validation"] + Data_Validation --> Data_Document["Document
Data Model"] + + %% Algorithm Creative Phase + AlgoPhase --> Algo_Problem["Define Algorithm
Problem"] + Algo_Problem --> Algo_Options["Explore Algorithm
Approaches"] + Algo_Options --> Algo_Evaluate["Evaluate Time/Space
Complexity"] + Algo_Evaluate --> Algo_Decision["Make Algorithm
Decision"] + Algo_Decision --> Algo_Document["Document
Algorithm"] + + %% Documentation & Completion + UI_Document & Arch_Diagram & Data_Document & Algo_Document --> CreateDoc["Create Creative
Phase Document"] + CreateDoc --> UpdateTasks["Update tasks.md
with Decision"] + UpdateTasks --> MorePhases{"More Creative
Phases?"} + MorePhases -->|"Yes"| SelectPhase + MorePhases -->|"No"| VerifyComplete["Verify All
Phases Complete"] + VerifyComplete --> NotifyComplete["Signal Creative
Phases Complete"] +``` + +## ๐Ÿ“‹ CREATIVE PHASE DOCUMENT FORMAT + +Each creative phase should produce a document with this structure: + +```mermaid +graph TD + subgraph "Creative Phase Document" + Header["๐ŸŽจ CREATIVE PHASE: [TYPE]"] + Problem["PROBLEM STATEMENT
Clear definition of the problem"] + Options["OPTIONS ANALYSIS
Multiple approaches considered"] + Pros["PROS & CONS
Tradeoffs for each option"] + Decision["DECISION
Selected approach + rationale"] + Impl["IMPLEMENTATION PLAN
Steps to implement the decision"] + Diagram["VISUALIZATION
Diagrams of the solution"] + end + + Header --> Problem --> Options --> Pros --> Decision --> Impl --> Diagram +``` + +## ๐Ÿ” CREATIVE TYPES AND APPROACHES + +```mermaid +graph TD + subgraph "UI/UX Design" + UI1["User Flow
Analysis"] + UI2["Component
Hierarchy"] + UI3["Interaction
Patterns"] + UI4["Visual Design
Principles"] + end + + subgraph "Architecture Design" + A1["Component
Structure"] + A2["Data Flow
Patterns"] + A3["Interface
Design"] + A4["System
Integration"] + end + + subgraph "Data Model Design" + D1["Entity
Relationships"] + D2["Schema
Design"] + D3["Validation
Rules"] + D4["Query
Optimization"] + end + + subgraph "Algorithm Design" + AL1["Complexity
Analysis"] + AL2["Efficiency
Optimization"] + AL3["Edge Case
Handling"] + AL4["Scaling
Considerations"] + end +``` + +## ๐Ÿ“Š REQUIRED FILE STATE VERIFICATION + +Before creative phase work can begin, verify file state: + +```mermaid +graph TD + Start["File State
Verification"] --> CheckTasks{"tasks.md has
planning complete?"} + + CheckTasks -->|"No"| ErrorPlan["ERROR:
Return to PLAN Mode"] + CheckTasks -->|"Yes"| CheckCreative{"Creative phases
identified?"} + + CheckCreative -->|"No"| ErrorCreative["ERROR:
Return to PLAN Mode"] + CheckCreative -->|"Yes"| ReadyCreative["Ready for
Creative Phase"] +``` + +## ๐Ÿ“‹ OPTIONS ANALYSIS TEMPLATE + +For each creative phase, analyze multiple options: + +``` +## OPTIONS ANALYSIS + +### Option 1: [Name] +**Description**: [Brief description] +**Pros**: +- [Pro 1] +- [Pro 2] +**Cons**: +- [Con 1] +- [Con 2] +**Complexity**: [Low/Medium/High] +**Implementation Time**: [Estimate] + +### Option 2: [Name] +**Description**: [Brief description] +**Pros**: +- [Pro 1] +- [Pro 2] +**Cons**: +- [Con 1] +- [Con 2] +**Complexity**: [Low/Medium/High] +**Implementation Time**: [Estimate] + +### Option 3: [Name] +**Description**: [Brief description] +**Pros**: +- [Pro 1] +- [Pro 2] +**Cons**: +- [Con 1] +- [Con 2] +**Complexity**: [Low/Medium/High] +**Implementation Time**: [Estimate] +``` + +## ๐ŸŽจ CREATIVE PHASE MARKERS + +Use these visual markers for creative phases: + +``` +๐ŸŽจ๐ŸŽจ๐ŸŽจ ENTERING CREATIVE PHASE: [TYPE] ๐ŸŽจ๐ŸŽจ๐ŸŽจ + +[Creative phase content] + +๐ŸŽจ CREATIVE CHECKPOINT: [Milestone] + +[Additional content] + +๐ŸŽจ๐ŸŽจ๐ŸŽจ EXITING CREATIVE PHASE - DECISION MADE ๐ŸŽจ๐ŸŽจ๐ŸŽจ +``` + +## ๐Ÿ“Š CREATIVE PHASE VERIFICATION CHECKLIST + +``` +โœ“ CREATIVE PHASE VERIFICATION +- Problem clearly defined? [YES/NO] +- Multiple options considered (3+)? [YES/NO] +- Pros/cons documented for each option? [YES/NO] +- Decision made with clear rationale? [YES/NO] +- Implementation plan included? [YES/NO] +- Visualization/diagrams created? [YES/NO] +- tasks.md updated with decision? [YES/NO] + +โ†’ If all YES: Creative phase complete +โ†’ If any NO: Complete missing elements +``` + +## ๐Ÿ”„ MODE TRANSITION NOTIFICATION + +When all creative phases are complete, notify user with: + +``` +## CREATIVE PHASES COMPLETE + +โœ… All required design decisions made +โœ… Creative phase documents created +โœ… tasks.md updated with decisions +โœ… Implementation plan updated + +โ†’ NEXT RECOMMENDED MODE: IMPLEMENT MODE +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/implement-mode-map.mdc b/.cursor/rules/isolation_rules/visual-maps/implement-mode-map.mdc new file mode 100644 index 0000000..94e2f2e --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/implement-mode-map.mdc @@ -0,0 +1,321 @@ +--- +description: Visual process map for BUILD mode (Code Implementation) +globs: implementation-mode-map.mdc +alwaysApply: false +--- + +# BUILD MODE: CODE EXECUTION PROCESS MAP + +> **TL;DR:** This visual map guides the BUILD mode process, focusing on efficient code implementation based on the planning and creative phases, with proper command execution and progress tracking. + +## ๐Ÿงญ BUILD MODE PROCESS FLOW + +```mermaid +graph TD + Start["START BUILD MODE"] --> ReadDocs["Read Reference Documents
Core/command-execution.md"] + + %% Initialization + ReadDocs --> CheckLevel{"Determine
Complexity Level
from tasks.md"} + + %% Level 1 Implementation + CheckLevel -->|"Level 1
Quick Bug Fix"| L1Process["LEVEL 1 PROCESS
Level1/quick-bug-workflow.md"] + L1Process --> L1Review["Review Bug
Report"] + L1Review --> L1Examine["Examine
Relevant Code"] + L1Examine --> L1Fix["Implement
Targeted Fix"] + L1Fix --> L1Test["Test
Fix"] + L1Test --> L1Update["Update
tasks.md"] + + %% Level 2 Implementation + CheckLevel -->|"Level 2
Simple Enhancement"| L2Process["LEVEL 2 PROCESS
Level2/enhancement-workflow.md"] + L2Process --> L2Review["Review Build
Plan"] + L2Review --> L2Examine["Examine Relevant
Code Areas"] + L2Examine --> L2Implement["Implement Changes
Sequentially"] + L2Implement --> L2Test["Test
Changes"] + L2Test --> L2Update["Update
tasks.md"] + + %% Level 3-4 Implementation + CheckLevel -->|"Level 3-4
Feature/System"| L34Process["LEVEL 3-4 PROCESS
Level3/feature-workflow.md
Level4/system-workflow.md"] + L34Process --> L34Review["Review Plan &
Creative Decisions"] + L34Review --> L34Phase{"Creative Phase
Documents
Complete?"} + + L34Phase -->|"No"| L34Error["ERROR:
Return to CREATIVE Mode"] + L34Phase -->|"Yes"| L34DirSetup["Create Directory
Structure"] + L34DirSetup --> L34VerifyDirs["VERIFY Directories
Created Successfully"] + L34VerifyDirs --> L34Implementation["Build
Phase"] + + %% Implementation Phases + L34Implementation --> L34Phase1["Phase 1
Build"] + L34Phase1 --> L34VerifyFiles["VERIFY Files
Created Successfully"] + L34VerifyFiles --> L34Test1["Test
Phase 1"] + L34Test1 --> L34Document1["Document
Phase 1"] + L34Document1 --> L34Next1{"Next
Phase?"} + L34Next1 -->|"Yes"| L34Implementation + + L34Next1 -->|"No"| L34Integration["Integration
Testing"] + L34Integration --> L34Document["Document
Integration Points"] + L34Document --> L34Update["Update
tasks.md"] + + %% Command Execution + L1Fix & L2Implement & L34Phase1 --> CommandExec["COMMAND EXECUTION
Core/command-execution.md"] + CommandExec --> DocCommands["Document Commands
& Results"] + + %% Completion & Transition + L1Update & L2Update & L34Update --> VerifyComplete["Verify Build
Complete"] + VerifyComplete --> UpdateProgress["Update progress.md
with Status"] + UpdateProgress --> Transition["NEXT MODE:
REFLECT MODE"] +``` + +## ๐Ÿ“‹ REQUIRED FILE STATE VERIFICATION + +Before implementation can begin, verify file state: + +```mermaid +graph TD + Start["File State
Verification"] --> CheckTasks{"tasks.md has
planning complete?"} + + CheckTasks -->|"No"| ErrorPlan["ERROR:
Return to PLAN Mode"] + CheckTasks -->|"Yes"| CheckLevel{"Task
Complexity?"} + + CheckLevel -->|"Level 1"| L1Ready["Ready for
Implementation"] + + CheckLevel -->|"Level 2"| L2Ready["Ready for
Implementation"] + + CheckLevel -->|"Level 3-4"| CheckCreative{"Creative phases
required?"} + + CheckCreative -->|"No"| L34Ready["Ready for
Implementation"] + CheckCreative -->|"Yes"| VerifyCreative{"Creative phases
completed?"} + + VerifyCreative -->|"No"| ErrorCreative["ERROR:
Return to CREATIVE Mode"] + VerifyCreative -->|"Yes"| L34Ready +``` + +## ๐Ÿ”„ FILE SYSTEM VERIFICATION PROCESS + +```mermaid +graph TD + Start["Start File
Verification"] --> CheckDir["Check Directory
Structure"] + CheckDir --> DirResult{"Directories
Exist?"} + + DirResult -->|"No"| ErrorDir["โŒ ERROR:
Missing Directories"] + DirResult -->|"Yes"| CheckFiles["Check Each
Created File"] + + ErrorDir --> FixDir["Fix Directory
Structure"] + FixDir --> CheckDir + + CheckFiles --> FileResult{"All Files
Exist?"} + FileResult -->|"No"| ErrorFile["โŒ ERROR:
Missing/Wrong Path Files"] + FileResult -->|"Yes"| Complete["โœ… Verification
Complete"] + + ErrorFile --> FixFile["Fix File Paths
or Recreate Files"] + FixFile --> CheckFiles +``` + +## ๐Ÿ“‹ DIRECTORY VERIFICATION STEPS + +Before beginning any file creation: + +``` +โœ“ DIRECTORY VERIFICATION PROCEDURE +1. Create all directories first before any files +2. Use ABSOLUTE paths: /full/path/to/directory +3. Verify each directory after creation: + ls -la /full/path/to/directory # Linux/Mac + dir "C:\full\path\to\directory" # Windows +4. Document directory structure in progress.md +5. Only proceed to file creation AFTER verifying ALL directories exist +``` + +## ๐Ÿ“‹ FILE CREATION VERIFICATION + +After creating files: + +``` +โœ“ FILE VERIFICATION PROCEDURE +1. Use ABSOLUTE paths for all file operations: /full/path/to/file.ext +2. Verify each file creation was successful: + ls -la /full/path/to/file.ext # Linux/Mac + dir "C:\full\path\to\file.ext" # Windows +3. If verification fails: + a. Check for path resolution issues + b. Verify directory exists + c. Try creating with corrected path + d. Recheck file exists after correction +4. Document all file paths in progress.md +``` + +## ๐Ÿ”„ COMMAND EXECUTION WORKFLOW + +```mermaid +graph TD + Start["Command
Execution"] --> Analyze["Analyze Command
Requirements"] + Analyze --> Complexity{"Command
Complexity?"} + + Complexity -->|"Simple"| Simple["Execute
Single Command"] + Complexity -->|"Moderate"| Chain["Use Efficient
Command Chaining"] + Complexity -->|"Complex"| Break["Break Into
Logical Steps"] + + Simple & Chain & Break --> Verify["Verify
Results"] + Verify --> Document["Document
Command & Result"] + Document --> Next["Next
Command"] +``` + +## ๐Ÿ“‹ LEVEL-SPECIFIC BUILD APPROACHES + +```mermaid +graph TD + subgraph "Level 1: Quick Bug Fix" + L1A["Targeted Code
Examination"] + L1B["Minimal
Change Scope"] + L1C["Direct
Fix"] + L1D["Verify
Fix"] + end + + subgraph "Level 2: Enhancement" + L2A["Sequential
Build"] + L2B["Contained
Changes"] + L2C["Standard
Testing"] + L2D["Component
Documentation"] + end + + subgraph "Level 3-4: Feature/System" + L3A["Directory
Structure First"] + L3B["Verify Dirs
Before Files"] + L3C["Phased
Build"] + L3D["Verify Files
After Creation"] + L3E["Integration
Testing"] + L3F["Detailed
Documentation"] + end + + L1A --> L1B --> L1C --> L1D + L2A --> L2B --> L2C --> L2D + L3A --> L3B --> L3C --> L3D --> L3E --> L3F +``` + +## ๐Ÿ“ BUILD DOCUMENTATION FORMAT + +Document builds with: + +``` +## Build: [Component/Feature] + +### Approach +[Brief description of build approach] + +### Directory Structure +- [/absolute/path/to/dir1/]: [Purpose] +- [/absolute/path/to/dir2/]: [Purpose] + +### Code Changes +- [/absolute/path/to/file1.ext]: [Description of changes] +- [/absolute/path/to/file2.ext]: [Description of changes] + +### Verification Steps +- [โœ“] Directory structure created and verified +- [โœ“] All files created in correct locations +- [โœ“] File content verified + +### Commands Executed +``` +[Command 1] +[Result] +``` + +``` +[Command 2] +[Result] +``` + +### Testing +- [Test 1]: [Result] +- [Test 2]: [Result] + +### Status +- [x] Build complete +- [x] Testing performed +- [x] File verification completed +- [ ] Documentation updated +``` + +## ๐Ÿ“Š TASKS.MD UPDATE FORMAT + +During the build process, update tasks.md with progress: + +``` +## Status +- [x] Initialization complete +- [x] Planning complete +[For Level 3-4:] +- [x] Creative phases complete +- [x] Directory structure created and verified +- [x] [Built component 1] +- [x] [Built component 2] +- [ ] [Remaining component] + +## Build Progress +- [Component 1]: Complete + - Files: [/absolute/path/to/files] + - [Details about implementation] +- [Component 2]: Complete + - Files: [/absolute/path/to/files] + - [Details about implementation] +- [Component 3]: In Progress + - [Current status] +``` + +## ๐Ÿ“‹ PROGRESS.MD UPDATE FORMAT + +Update progress.md with: + +``` +# Build Progress + +## Directory Structure +- [/absolute/path/to/dir1/]: Created and verified +- [/absolute/path/to/dir2/]: Created and verified + +## [Date]: [Component/Feature] Built +- **Files Created**: + - [/absolute/path/to/file1.ext]: Verified + - [/absolute/path/to/file2.ext]: Verified +- **Key Changes**: + - [Change 1] + - [Change 2] +- **Testing**: [Test results] +- **Next Steps**: [What comes next] +``` + +## ๐Ÿ“Š BUILD VERIFICATION CHECKLIST + +``` +โœ“ BUILD VERIFICATION +- Directory structure created correctly? [YES/NO] +- All files created in correct locations? [YES/NO] +- All file paths verified with absolute paths? [YES/NO] +- All planned changes implemented? [YES/NO] +- Testing performed for all changes? [YES/NO] +- Code follows project standards? [YES/NO] +- Edge cases handled appropriately? [YES/NO] +- Build documented with absolute paths? [YES/NO] +- tasks.md updated with progress? [YES/NO] +- progress.md updated with details? [YES/NO] + +โ†’ If all YES: Build complete - ready for REFLECT mode +โ†’ If any NO: Complete missing build elements +``` + +## ๐Ÿ”„ MODE TRANSITION NOTIFICATION + +When the build is complete, notify user with: + +``` +## BUILD COMPLETE + +โœ… Directory structure verified +โœ… All files created in correct locations +โœ… All planned changes implemented +โœ… Testing performed successfully +โœ… tasks.md updated with status +โœ… progress.md updated with details + +โ†’ NEXT RECOMMENDED MODE: REFLECT MODE +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/plan-mode-map.mdc b/.cursor/rules/isolation_rules/visual-maps/plan-mode-map.mdc new file mode 100644 index 0000000..a62904a --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/plan-mode-map.mdc @@ -0,0 +1,275 @@ +--- +description: Visual process map for PLAN mode (Code Implementation) +globs: plan-mode-map.mdc +alwaysApply: false +--- + +# PLAN MODE: TASK PLANNING PROCESS MAP + +> **TL;DR:** This visual map guides the PLAN mode process, focusing on creating detailed implementation plans based on the complexity level determined during initialization, with mandatory technology validation before implementation. + +## ๐Ÿงญ PLAN MODE PROCESS FLOW + +```mermaid +graph TD + Start["START PLANNING"] --> ReadTasks["Read tasks.md
Core/task-tracking.md"] + + %% Complexity Level Determination + ReadTasks --> CheckLevel{"Determine
Complexity Level"} + CheckLevel -->|"Level 2"| Level2["LEVEL 2 PLANNING
Level2/enhancement-planning.md"] + CheckLevel -->|"Level 3"| Level3["LEVEL 3 PLANNING
Level3/feature-planning.md"] + CheckLevel -->|"Level 4"| Level4["LEVEL 4 PLANNING
Level4/system-planning.md"] + + %% Level 2 Planning + Level2 --> L2Review["Review Code
Structure"] + L2Review --> L2Document["Document
Planned Changes"] + L2Document --> L2Challenges["Identify
Challenges"] + L2Challenges --> L2Checklist["Create Task
Checklist"] + L2Checklist --> L2Update["Update tasks.md
with Plan"] + L2Update --> L2Tech["TECHNOLOGY
VALIDATION"] + L2Tech --> L2Verify["Verify Plan
Completeness"] + + %% Level 3 Planning + Level3 --> L3Review["Review Codebase
Structure"] + L3Review --> L3Requirements["Document Detailed
Requirements"] + L3Requirements --> L3Components["Identify Affected
Components"] + L3Components --> L3Plan["Create Comprehensive
Implementation Plan"] + L3Plan --> L3Challenges["Document Challenges
& Solutions"] + L3Challenges --> L3Update["Update tasks.md
with Plan"] + L3Update --> L3Tech["TECHNOLOGY
VALIDATION"] + L3Tech --> L3Flag["Flag Components
Requiring Creative"] + L3Flag --> L3Verify["Verify Plan
Completeness"] + + %% Level 4 Planning + Level4 --> L4Analysis["Codebase Structure
Analysis"] + L4Analysis --> L4Requirements["Document Comprehensive
Requirements"] + L4Requirements --> L4Diagrams["Create Architectural
Diagrams"] + L4Diagrams --> L4Subsystems["Identify Affected
Subsystems"] + L4Subsystems --> L4Dependencies["Document Dependencies
& Integration Points"] + L4Dependencies --> L4Plan["Create Phased
Implementation Plan"] + L4Plan --> L4Update["Update tasks.md
with Plan"] + L4Update --> L4Tech["TECHNOLOGY
VALIDATION"] + L4Tech --> L4Flag["Flag Components
Requiring Creative"] + L4Flag --> L4Verify["Verify Plan
Completeness"] + + %% Technology Validation Gate - NEW + L2Tech & L3Tech & L4Tech --> TechGate["โ›” TECHNOLOGY
VALIDATION GATE"] + TechGate --> TechSelection["Document Technology
Stack Selection"] + TechSelection --> TechHelloWorld["Create Hello World
Proof of Concept"] + TechHelloWorld --> TechDependencies["Verify Required
Dependencies"] + TechDependencies --> TechConfig["Validate Build
Configuration"] + TechConfig --> TechBuild["Complete Test
Build"] + TechBuild --> TechVerify["โ›” TECHNOLOGY
CHECKPOINT"] + + %% Verification & Completion + L2Verify & L3Verify & L4Verify & TechVerify --> CheckCreative{"Creative
Phases
Required?"} + + %% Mode Transition + CheckCreative -->|"Yes"| RecCreative["NEXT MODE:
CREATIVE MODE"] + CheckCreative -->|"No"| RecImplement["NEXT MODE:
IMPLEMENT MODE"] + + %% Style for Technology Gate + style TechGate fill:#ff5555,stroke:#dd3333,color:white,stroke-width:3px + style TechVerify fill:#ff5555,stroke:#dd3333,color:white,stroke-width:3px + style TechSelection fill:#4da6ff,stroke:#0066cc,color:white + style TechHelloWorld fill:#4da6ff,stroke:#0066cc,color:white + style TechDependencies fill:#4da6ff,stroke:#0066cc,color:white + style TechConfig fill:#4da6ff,stroke:#0066cc,color:white + style TechBuild fill:#4da6ff,stroke:#0066cc,color:white +``` + +## ๐Ÿ“‹ LEVEL-SPECIFIC PLANNING APPROACHES + +```mermaid +graph TD + subgraph "Level 2: Enhancement" + L2A["Basic Requirements
Analysis"] + L2B["Simple Component
Identification"] + L2C["Linear Implementation
Plan"] + L2D["Basic Checklist
Creation"] + end + + subgraph "Level 3: Feature" + L3A["Detailed Requirements
Analysis"] + L3B["Component Mapping
with Dependencies"] + L3C["Multi-Phase
Implementation Plan"] + L3D["Comprehensive
Checklist"] + L3E["Creative Phase
Identification"] + end + + subgraph "Level 4: System" + L4A["Architectural
Requirements Analysis"] + L4B["System Component
Mapping"] + L4C["Subsystem
Integration Plan"] + L4D["Phased Implementation
Strategy"] + L4E["Risk Assessment
& Mitigation"] + L4F["Multiple Creative
Phase Requirements"] + end + + L2A --> L2B --> L2C --> L2D + L3A --> L3B --> L3C --> L3D --> L3E + L4A --> L4B --> L4C --> L4D --> L4E --> L4F +``` + +## ๐Ÿ”ง TECHNOLOGY VALIDATION WORKFLOW + +```mermaid +graph TD + Start["Technology
Validation Start"] --> Select["Technology
Stack Selection"] + Select --> Document["Document Chosen
Technologies"] + Document --> POC["Create Minimal
Proof of Concept"] + POC --> Build["Verify Build
Process Works"] + Build --> Dependencies["Validate All
Dependencies"] + Dependencies --> Config["Confirm Configuration
Files Are Correct"] + Config --> Test["Complete Test
Build/Run"] + Test --> Success{"All Checks
Pass?"} + + Success -->|"Yes"| Ready["Ready for
Implementation"] + Success -->|"No"| Fix["Fix Technology
Issues"] + Fix --> Document + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style POC fill:#4da6ff,stroke:#0066cc,color:white + style Success fill:#ff5555,stroke:#dd3333,color:white + style Fix fill:#ff5555,stroke:#dd3333,color:white + style Ready fill:#10b981,stroke:#059669,color:white +``` + +## ๐Ÿ“Š REQUIRED FILE STATE VERIFICATION + +Before planning can begin, verify the file state: + +```mermaid +graph TD + Start["File State
Verification"] --> CheckTasks{"tasks.md
initialized?"} + + CheckTasks -->|"No"| ErrorTasks["ERROR:
Return to VAN Mode"] + CheckTasks -->|"Yes"| CheckActive{"activeContext.md
exists?"} + + CheckActive -->|"No"| ErrorActive["ERROR:
Return to VAN Mode"] + CheckActive -->|"Yes"| ReadyPlan["Ready for
Planning"] +``` + +## ๐Ÿ“ TASKS.MD UPDATE FORMAT + +During planning, update tasks.md with this structure: + +``` +# Task: [Task name] + +## Description +[Detailed description] + +## Complexity +Level: [2/3/4] +Type: [Enhancement/Feature/Complex System] + +## Technology Stack +- Framework: [Selected framework] +- Build Tool: [Selected build tool] +- Language: [Selected language] +- Storage: [Selected storage mechanism] + +## Technology Validation Checkpoints +- [ ] Project initialization command verified +- [ ] Required dependencies identified and installed +- [ ] Build configuration validated +- [ ] Hello world verification completed +- [ ] Test build passes successfully + +## Status +- [x] Initialization complete +- [x] Planning complete +- [ ] Technology validation complete +- [ ] [Implementation steps] + +## Implementation Plan +1. [Step 1] + - [Subtask 1.1] + - [Subtask 1.2] +2. [Step 2] + - [Subtask 2.1] + - [Subtask 2.2] + +## Creative Phases Required +- [ ] [Component 1] Design +- [ ] [Component 2] Architecture +- [ ] [Component 3] Data Model + +## Dependencies +- [Dependency 1] +- [Dependency 2] + +## Challenges & Mitigations +- [Challenge 1]: [Mitigation strategy] +- [Challenge 2]: [Mitigation strategy] +``` + +## ๐Ÿ“‹ CREATIVE PHASE IDENTIFICATION + +For Level 3-4 tasks, identify components requiring creative phases: + +```mermaid +graph TD + Start["Creative Phase
Identification"] --> CheckComp{"Component
Analysis"} + + CheckComp --> UI["UI/UX
Components"] + CheckComp --> Data["Data Model
Components"] + CheckComp --> Arch["Architecture
Components"] + CheckComp --> Algo["Algorithm
Components"] + + UI & Data & Arch & Algo --> Decision{"Design Decisions
Required?"} + + Decision -->|"Yes"| Flag["Flag for
Creative Phase"] + Decision -->|"No"| Skip["Standard
Implementation"] + + Flag --> Document["Document in
tasks.md"] +``` + +## ๐Ÿ“Š TECHNOLOGY VALIDATION CHECKLIST + +``` +โœ“ TECHNOLOGY VALIDATION CHECKLIST +- Technology stack clearly defined? [YES/NO] +- Project initialization command documented? [YES/NO] +- Required dependencies identified? [YES/NO] +- Minimal proof of concept created? [YES/NO] +- Hello world build/run successful? [YES/NO] +- Configuration files validated? [YES/NO] +- Test build completes successfully? [YES/NO] + +โ†’ If all YES: Technology validation complete - ready for next phase +โ†’ If any NO: Resolve technology issues before proceeding +``` + +## ๐Ÿ“Š PLAN VERIFICATION CHECKLIST + +``` +โœ“ PLAN VERIFICATION CHECKLIST +- Requirements clearly documented? [YES/NO] +- Technology stack validated? [YES/NO] +- Affected components identified? [YES/NO] +- Implementation steps detailed? [YES/NO] +- Dependencies documented? [YES/NO] +- Challenges & mitigations addressed? [YES/NO] +- Creative phases identified (Level 3-4)? [YES/NO/NA] +- tasks.md updated with plan? [YES/NO] + +โ†’ If all YES: Planning complete - ready for next mode +โ†’ If any NO: Complete missing plan elements +``` + +## ๐Ÿ”„ MODE TRANSITION NOTIFICATION + +When planning is complete, notify user with: + +``` +## PLANNING COMPLETE + +โœ… Implementation plan created +โœ… Technology stack validated +โœ… tasks.md updated with plan +โœ… Challenges and mitigations documented +[โœ… Creative phases identified (for Level 3-4)] + +โ†’ NEXT RECOMMENDED MODE: [CREATIVE/IMPLEMENT] MODE \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/qa-mode-map.mdc b/.cursor/rules/isolation_rules/visual-maps/qa-mode-map.mdc new file mode 100644 index 0000000..c102e2a --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/qa-mode-map.mdc @@ -0,0 +1,495 @@ +--- +description: QA Mode +globs: qa-mode-map.mdc +alwaysApply: false +--- + + +> **TL;DR:** This enhanced QA mode provides comprehensive validation at any stage of development. It automatically detects the current phase, validates Memory Bank consistency, verifies task tracking, and performs phase-specific technical validation to ensure project quality throughout the development lifecycle. + +## ๐Ÿ” ENHANCED QA MODE PROCESS FLOW + +```mermaid +graph TD + Start["๐Ÿš€ START QA MODE"] --> DetectPhase["๐Ÿงญ PHASE DETECTION
Determine current project phase"] + + %% Phase detection decision path + DetectPhase --> PhaseDetermination{"Current Phase?"} + PhaseDetermination -->|"VAN"| VANChecks["VAN Phase Validation"] + PhaseDetermination -->|"PLAN"| PLANChecks["PLAN Phase Validation"] + PhaseDetermination -->|"CREATIVE"| CREATIVEChecks["CREATIVE Phase Validation"] + PhaseDetermination -->|"IMPLEMENT"| IMPLEMENTChecks["IMPLEMENT Phase Validation"] + + %% Universal checks that apply to all phases + DetectPhase --> UniversalChecks["๐Ÿ” UNIVERSAL VALIDATION"] + UniversalChecks --> MemoryBankCheck["1๏ธโƒฃ MEMORY BANK VERIFICATION
Check consistency & updates"] + MemoryBankCheck --> TaskTrackingCheck["2๏ธโƒฃ TASK TRACKING VERIFICATION
Validate tasks.md as source of truth"] + TaskTrackingCheck --> ReferenceCheck["3๏ธโƒฃ REFERENCE VALIDATION
Verify cross-references between docs"] + + %% Phase-specific validations feed into comprehensive report + VANChecks & PLANChecks & CREATIVEChecks & IMPLEMENTChecks --> PhaseSpecificResults["Phase-Specific Results"] + ReferenceCheck & PhaseSpecificResults --> ValidationResults{"โœ… All Checks
Passed?"} + + %% Results Processing + ValidationResults -->|"Yes"| SuccessReport["๐Ÿ“ GENERATE SUCCESS REPORT
All validations passed"] + ValidationResults -->|"No"| FailureReport["โš ๏ธ GENERATE FAILURE REPORT
With specific fix instructions"] + + %% Success Path + SuccessReport --> UpdateMB["๐Ÿ“š Update Memory Bank
Record successful validation"] + UpdateMB --> ContinueProcess["๐Ÿšฆ CONTINUE: Phase processes
can proceed"] + + %% Failure Path + FailureReport --> IdentifyFixes["๐Ÿ”ง IDENTIFY REQUIRED FIXES"] + IdentifyFixes --> ApplyFixes["๐Ÿ› ๏ธ APPLY FIXES"] + ApplyFixes --> Revalidate["๐Ÿ”„ Re-run validation"] + Revalidate --> ValidationResults + + %% Style nodes for clarity + style Start fill:#4da6ff,stroke:#0066cc,color:white + style DetectPhase fill:#f6ad55,stroke:#c27022,color:white + style UniversalChecks fill:#f6546a,stroke:#c30052,color:white + style MemoryBankCheck fill:#10b981,stroke:#059669,color:white + style TaskTrackingCheck fill:#10b981,stroke:#059669,color:white + style ReferenceCheck fill:#10b981,stroke:#059669,color:white + style ValidationResults fill:#f6546a,stroke:#c30052,color:white + style SuccessReport fill:#10b981,stroke:#059669,color:white + style FailureReport fill:#f6ad55,stroke:#c27022,color:white + style ContinueProcess fill:#10b981,stroke:#059669,color:white,stroke-width:2px + style IdentifyFixes fill:#f6ad55,stroke:#c27022,color:white +``` + +## ๐Ÿงญ PHASE DETECTION PROCESS + +The enhanced QA mode first determines which phase the project is currently in: + +```mermaid +graph TD + PD["Phase Detection"] --> CheckMB["Analyze Memory Bank Files"] + CheckMB --> CheckActive["Check activeContext.md
for current phase"] + CheckActive --> CheckProgress["Check progress.md
for recent activities"] + CheckProgress --> CheckTasks["Check tasks.md
for task status"] + + CheckTasks --> PhaseResult{"Determine
Current Phase"} + PhaseResult -->|"VAN"| VAN["VAN Phase
Initialization"] + PhaseResult -->|"PLAN"| PLAN["PLAN Phase
Task Planning"] + PhaseResult -->|"CREATIVE"| CREATIVE["CREATIVE Phase
Design Decisions"] + PhaseResult -->|"IMPLEMENT"| IMPLEMENT["IMPLEMENT Phase
Implementation"] + + VAN & PLAN & CREATIVE & IMPLEMENT --> LoadChecks["Load Phase-Specific
Validation Checks"] + + style PD fill:#4da6ff,stroke:#0066cc,color:white + style PhaseResult fill:#f6546a,stroke:#c30052,color:white + style LoadChecks fill:#10b981,stroke:#059669,color:white +``` + +## ๐Ÿ“ UNIVERSAL MEMORY BANK VERIFICATION + +This process ensures Memory Bank files are consistent and up-to-date regardless of phase: + +```mermaid +graph TD + MBVS["Memory Bank
Verification"] --> CoreCheck["Check Core Files Exist"] + CoreCheck --> CoreFiles["Verify Required Files:
projectbrief.md
activeContext.md
tasks.md
progress.md"] + + CoreFiles --> ContentCheck["Verify Content
Consistency"] + ContentCheck --> LastModified["Check Last Modified
Timestamps"] + LastModified --> CrossRef["Validate Cross-
References"] + + CrossRef --> ConsistencyCheck{"All Files
Consistent?"} + ConsistencyCheck -->|"Yes"| PassMB["โœ… Memory Bank
Verification Passed"] + ConsistencyCheck -->|"No"| FailMB["โŒ Memory Bank
Inconsistencies Found"] + + FailMB --> FixSuggestions["Generate Fix
Suggestions"] + + style MBVS fill:#4da6ff,stroke:#0066cc,color:white + style ConsistencyCheck fill:#f6546a,stroke:#c30052,color:white + style PassMB fill:#10b981,stroke:#059669,color:white + style FailMB fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐Ÿ“‹ TASK TRACKING VERIFICATION + +This process validates tasks.md as the single source of truth: + +```mermaid +graph TD + TTV["Task Tracking
Verification"] --> CheckTasksFile["Check tasks.md
Existence & Format"] + CheckTasksFile --> VerifyReferences["Verify Task References
in Other Documents"] + VerifyReferences --> ProgressCheck["Check Consistency with
progress.md"] + ProgressCheck --> StatusCheck["Verify Task Status
Accuracy"] + + StatusCheck --> TaskConsistency{"Tasks Properly
Tracked?"} + TaskConsistency -->|"Yes"| PassTasks["โœ… Task Tracking
Verification Passed"] + TaskConsistency -->|"No"| FailTasks["โŒ Task Tracking
Issues Found"] + + FailTasks --> TaskFixSuggestions["Generate Task Tracking
Fix Suggestions"] + + style TTV fill:#4da6ff,stroke:#0066cc,color:white + style TaskConsistency fill:#f6546a,stroke:#c30052,color:white + style PassTasks fill:#10b981,stroke:#059669,color:white + style FailTasks fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐Ÿ”„ REFERENCE VALIDATION PROCESS + +This process ensures proper cross-referencing between documents: + +```mermaid +graph TD + RV["Reference
Validation"] --> FindRefs["Find Cross-References
in Documents"] + FindRefs --> VerifyRefs["Verify Reference
Accuracy"] + VerifyRefs --> CheckBackRefs["Check Bidirectional
References"] + + CheckBackRefs --> RefConsistency{"References
Consistent?"} + RefConsistency -->|"Yes"| PassRefs["โœ… Reference Validation
Passed"] + RefConsistency -->|"No"| FailRefs["โŒ Reference
Issues Found"] + + FailRefs --> RefFixSuggestions["Generate Reference
Fix Suggestions"] + + style RV fill:#4da6ff,stroke:#0066cc,color:white + style RefConsistency fill:#f6546a,stroke:#c30052,color:white + style PassRefs fill:#10b981,stroke:#059669,color:white + style FailRefs fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐Ÿšจ PHASE-SPECIFIC VALIDATION PROCESSES + +### VAN Phase Validation + +```mermaid +graph TD + VAN["VAN Phase
Validation"] --> InitCheck["Check Initialization
Completeness"] + InitCheck --> PlatformCheck["Verify Platform
Detection"] + PlatformCheck --> ComplexityCheck["Validate Complexity
Determination"] + + ComplexityCheck --> VANConsistency{"VAN Phase
Complete?"} + VANConsistency -->|"Yes"| PassVAN["โœ… VAN Phase
Validation Passed"] + VANConsistency -->|"No"| FailVAN["โŒ VAN Phase
Issues Found"] + + style VAN fill:#4da6ff,stroke:#0066cc,color:white + style VANConsistency fill:#f6546a,stroke:#c30052,color:white + style PassVAN fill:#10b981,stroke:#059669,color:white + style FailVAN fill:#ff5555,stroke:#dd3333,color:white +``` + +### PLAN Phase Validation + +```mermaid +graph TD + PLAN["PLAN Phase
Validation"] --> PlanCheck["Check Planning
Documentation"] + PlanCheck --> TaskBreakdown["Verify Task
Breakdown"] + TaskBreakdown --> ScopeCheck["Validate Scope
Definition"] + + ScopeCheck --> PLANConsistency{"PLAN Phase
Complete?"} + PLANConsistency -->|"Yes"| PassPLAN["โœ… PLAN Phase
Validation Passed"] + PLANConsistency -->|"No"| FailPLAN["โŒ PLAN Phase
Issues Found"] + + style PLAN fill:#4da6ff,stroke:#0066cc,color:white + style PLANConsistency fill:#f6546a,stroke:#c30052,color:white + style PassPLAN fill:#10b981,stroke:#059669,color:white + style FailPLAN fill:#ff5555,stroke:#dd3333,color:white +``` + +### CREATIVE Phase Validation + +```mermaid +graph TD + CREATIVE["CREATIVE Phase
Validation"] --> DesignCheck["Check Design
Documents"] + DesignCheck --> ArchCheck["Verify Architectural
Decisions"] + ArchCheck --> PatternCheck["Validate Design
Patterns"] + + PatternCheck --> CREATIVEConsistency{"CREATIVE Phase
Complete?"} + CREATIVEConsistency -->|"Yes"| PassCREATIVE["โœ… CREATIVE Phase
Validation Passed"] + CREATIVEConsistency -->|"No"| FailCREATIVE["โŒ CREATIVE Phase
Issues Found"] + + style CREATIVE fill:#4da6ff,stroke:#0066cc,color:white + style CREATIVEConsistency fill:#f6546a,stroke:#c30052,color:white + style PassCREATIVE fill:#10b981,stroke:#059669,color:white + style FailCREATIVE fill:#ff5555,stroke:#dd3333,color:white +``` + +### IMPLEMENT Phase Technical Validation + +This retains the original QA validation from the previous version: + +```mermaid +graph TD + IMPLEMENT["IMPLEMENT Phase
Validation"] --> ReadDesign["Read Design Decisions"] + ReadDesign --> FourChecks["Four-Point Technical
Validation"] + + FourChecks --> DepCheck["1๏ธโƒฃ Dependency
Verification"] + DepCheck --> ConfigCheck["2๏ธโƒฃ Configuration
Validation"] + ConfigCheck --> EnvCheck["3๏ธโƒฃ Environment
Validation"] + EnvCheck --> MinBuildCheck["4๏ธโƒฃ Minimal Build
Test"] + + MinBuildCheck --> IMPLEMENTConsistency{"Technical
Prerequisites Met?"} + IMPLEMENTConsistency -->|"Yes"| PassIMPLEMENT["โœ… IMPLEMENT Phase
Validation Passed"] + IMPLEMENTConsistency -->|"No"| FailIMPLEMENT["โŒ IMPLEMENT Phase
Issues Found"] + + style IMPLEMENT fill:#4da6ff,stroke:#0066cc,color:white + style FourChecks fill:#f6546a,stroke:#c30052,color:white + style IMPLEMENTConsistency fill:#f6546a,stroke:#c30052,color:white + style PassIMPLEMENT fill:#10b981,stroke:#059669,color:white + style FailIMPLEMENT fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐Ÿ“‹ UNIVERSAL VALIDATION COMMAND EXECUTION + +### Memory Bank Verification Commands: + +```bash +# Check Memory Bank file existence and recency +ls -la memory-bank/ +find memory-bank/ -type f -mtime -7 | sort + +# Check for consistency between files +grep -r "task" memory-bank/ +grep -r "requirement" memory-bank/ +``` + +### Task Tracking Verification Commands: + +```bash +# Verify tasks.md as source of truth +test -f tasks.md && echo "โœ… tasks.md exists" || echo "โŒ tasks.md missing" + +# Check references to tasks in other files +grep -r "Task" --include="*.md" . +grep -r "task" --include="*.md" . | grep -v "tasks.md" | wc -l + +# Verify task status consistency +grep -i "completed\|done\|finished" tasks.md +grep -i "in progress\|started" tasks.md +``` + +### Reference Validation Commands: + +```bash +# Find cross-references between files +grep -r "see\|refer\|reference" --include="*.md" . + +# Check for broken references +for file in $(grep -l "see\|refer\|reference" --include="*.md" .); do + for ref in $(grep -o '[a-zA-Z0-9_-]*\.md' $file); do + test -f $ref || echo "โŒ Broken reference: $ref in $file" + done +done +``` + +## ๐Ÿ“‹ 1๏ธโƒฃ DEPENDENCY VERIFICATION PROCESS (Original) + +This validation point ensures all required packages are correctly installed. + +### Command Execution: + +```bash +# Check if packages are installed +npm list react react-dom tailwindcss postcss autoprefixer + +# Verify package versions match requirements +npm list | grep -E "react|tailwind|postcss" + +# Check for peer dependency warnings +npm ls --depth=0 +``` + +### Validation Criteria: +- All required packages must be installed +- Versions must be compatible with requirements +- No critical peer dependency warnings +- Required dev dependencies must be present + +### Common Fixes: +- `npm install [missing-package]` - Install missing packages +- `npm install [package]@[version]` - Fix version mismatches +- `npm install --save-dev [dev-dependency]` - Add development dependencies + +## ๐Ÿ“ 2๏ธโƒฃ CONFIGURATION VALIDATION PROCESS (Original) + +This validation point ensures configuration files are in the correct format for the project. + +### Command Execution: + +```bash +# Check package.json for module type +grep "\"type\":" package.json + +# Verify configuration file extensions match module type +find . -name "*.config.*" | grep -E "\.(js|cjs|mjs)$" + +# Test configuration syntax +node -c *.config.js || node -c *.config.cjs || node -c *.config.mjs +``` + +### Validation Criteria: +- Configuration file extensions must match module type in package.json +- File syntax must be valid +- Configuration must reference installed packages + +### Common Fixes: +- Rename `.js` to `.cjs` for CommonJS in ES module projects +- Fix syntax errors in configuration files +- Adjust configuration to reference installed packages + +## ๐ŸŒ 3๏ธโƒฃ ENVIRONMENT VALIDATION PROCESS (Original) + +This validation point ensures the development environment is correctly set up. + +### Command Execution: + +```bash +# Check build tools +npm run --help + +# Verify node version compatibility +node -v + +# Check for environment variables +printenv | grep -E "NODE_|PATH|HOME" + +# Verify access permissions +ls -la . +``` + +### Validation Criteria: +- Node.js version must be compatible with requirements +- Build commands must be defined in package.json +- Environment must have necessary access permissions +- Required environment variables must be set + +### Common Fixes: +- Update Node.js version +- Add missing scripts to package.json +- Fix file permissions with chmod/icacls +- Set required environment variables + +## ๐Ÿ”ฅ 4๏ธโƒฃ MINIMAL BUILD TEST PROCESS (Original) + +This validation point tests a minimal build to ensure basic functionality works. + +### Command Execution: + +```bash +# Run a minimal build +npm run build -- --dry-run || npm run dev -- --dry-run + +# Test entry point file existence +find src -name "main.*" -o -name "index.*" + +# Validate HTML entry point +grep -i "script.*src=" index.html +``` + +### Validation Criteria: +- Build process must complete without errors +- Entry point files must exist and be correctly referenced +- HTML must reference the correct JavaScript entry point +- Basic rendering must work in a test environment + +### Common Fixes: +- Fix entry point references in HTML +- Correct import paths in JavaScript +- Fix build configuration errors +- Update incorrect paths or references + +## ๐Ÿ“Š ENHANCED COMPREHENSIVE QA REPORT FORMAT + +``` +โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• ๐Ÿ” ENHANCED QA VALIDATION REPORT โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— +โ”‚ โ”‚ +โ”‚ Project: [Project Name] Date: [Current Date] โ”‚ +โ”‚ Platform: [OS Platform] Detected Phase: [Current Phase] โ”‚ +โ”‚ โ”‚ +โ”‚ โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” UNIVERSAL VALIDATION RESULTS โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” โ”‚ +โ”‚ โ”‚ +โ”‚ 1๏ธโƒฃ MEMORY BANK VERIFICATION โ”‚ +โ”‚ โœ“ Core Files: [Status] โ”‚ +โ”‚ โœ“ Content Consistency: [Status] โ”‚ +โ”‚ โœ“ Last Modified: [Status] โ”‚ +โ”‚ โ”‚ +โ”‚ 2๏ธโƒฃ TASK TRACKING VERIFICATION โ”‚ +โ”‚ โœ“ tasks.md Status: [Status] โ”‚ +โ”‚ โœ“ Task References: [Status] โ”‚ +โ”‚ โœ“ Status Consistency: [Status] โ”‚ +โ”‚ โ”‚ +โ”‚ 3๏ธโƒฃ REFERENCE VALIDATION โ”‚ +โ”‚ โœ“ Cross-References: [Status] โ”‚ +โ”‚ โœ“ Reference Accuracy: [Status] โ”‚ +โ”‚ โ”‚ +โ”‚ โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” PHASE-SPECIFIC VALIDATION โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” โ”‚ +โ”‚ โ”‚ +โ”‚ [VAN/PLAN/CREATIVE/IMPLEMENT] PHASE VALIDATION โ”‚ +โ”‚ โœ“ [Phase-specific check 1]: [Status] โ”‚ +โ”‚ โœ“ [Phase-specific check 2]: [Status] โ”‚ +โ”‚ โœ“ [Phase-specific check 3]: [Status] โ”‚ +โ”‚ โ”‚ +โ”‚ [Technical validation section shown only for IMPLEMENT phase] โ”‚ +โ”‚ โ”‚ +โ”‚ โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” OVERALL STATUS โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” โ”‚ +โ”‚ โ”‚ +โ”‚ โœ… VALIDATION PASSED - Project quality verified for current phase โ”‚ +โ”‚ โ”‚ +โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• +``` + +## ๐Ÿšซ ENHANCED FAILURE REPORT FORMAT + +If validation fails, a detailed failure report is generated: + +``` +โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โš ๏ธ QA VALIDATION FAILURES โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— +โ”‚ โ”‚ +โ”‚ Project: [Project Name] Date: [Current Date] โ”‚ +โ”‚ Platform: [OS Platform] Detected Phase: [Current Phase] โ”‚ +โ”‚ โ”‚ +โ”‚ โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” FAILED CHECKS โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” โ”‚ +โ”‚ โ”‚ +โ”‚ โŒ MEMORY BANK ISSUES โ”‚ +โ”‚ โ€ข [Specific issue details] โ”‚ +โ”‚ โ€ข [Specific issue details] โ”‚ +โ”‚ โ”‚ +โ”‚ โŒ TASK TRACKING ISSUES โ”‚ +โ”‚ โ€ข [Specific issue details] โ”‚ +โ”‚ โ€ข [Specific issue details] โ”‚ +โ”‚ โ”‚ +โ”‚ โŒ REFERENCE ISSUES โ”‚ +โ”‚ โ€ข [Specific issue details] โ”‚ +โ”‚ โ€ข [Specific issue details] โ”‚ +โ”‚ โ”‚ +โ”‚ โŒ [PHASE]-SPECIFIC ISSUES โ”‚ +โ”‚ โ€ข [Specific issue details] โ”‚ +โ”‚ โ€ข [Specific issue details] โ”‚ +โ”‚ โ”‚ +โ”‚ โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” REQUIRED FIXES โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” โ”‚ +โ”‚ โ”‚ +โ”‚ 1. [Specific fix instruction with command] โ”‚ +โ”‚ 2. [Specific fix instruction with command] โ”‚ +โ”‚ 3. [Specific fix instruction with command] โ”‚ +โ”‚ โ”‚ +โ”‚ โš ๏ธ VALIDATION FAILED - Please resolve issues before proceeding โ”‚ +โ”‚ โ”‚ +โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• +``` + +## ๐Ÿ”„ QA-ANYTIME ACTIVATION PROTOCOL + +The enhanced QA mode can be activated at any time in the development process: + +```mermaid +graph TD + Start["User Types: QA"] --> DetectContext["Detect Current Context"] + DetectContext --> RunQA["Run QA with Context-Aware Checks"] + RunQA --> GenerateReport["Generate Appropriate QA Report"] + GenerateReport --> UserResponse["Present Report to User"] + + UserResponse --> FixNeeded{"Fixes
Needed?"} + FixNeeded -->|"Yes"| SuggestFixes["Display Fix Instructions"] + FixNeeded -->|"No"| ContinueWork["Continue Current Phase Work"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style FixNeeded fill:#f6546a,stroke:#c30052,color:white + style SuggestFixes fill:#ff5555,stroke:#dd3333,color:white + style ContinueWork fill:#10b981,stroke:#059669,color:white +``` + +This enhanced QA mode serves as a "quality guardian" throughout the development process, ensuring documentation is consistently maintained and all phase requirements are met before proceeding to the next phase. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/reflect-mode-map.mdc b/.cursor/rules/isolation_rules/visual-maps/reflect-mode-map.mdc new file mode 100644 index 0000000..81fd0da --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/reflect-mode-map.mdc @@ -0,0 +1,229 @@ +--- +description: Visual process map for REFLECT mode (Task Reflection) +globs: "**/reflect*/**", "**/review*/**", "**/retrospect*/**" +alwaysApply: false +--- + +# REFLECT MODE: TASK REVIEW PROCESS MAP + +> **TL;DR:** This visual map guides the REFLECT mode process, focusing on structured review of the implementation, documenting lessons learned, and preparing insights for future reference. + +## ๐Ÿงญ REFLECT MODE PROCESS FLOW + +```mermaid +graph TD + Start["START REFLECT MODE"] --> ReadTasks["Read tasks.md
and progress.md"] + + %% Initial Assessment + ReadTasks --> VerifyImplement{"Implementation
Complete?"} + VerifyImplement -->|"No"| ReturnImplement["Return to
IMPLEMENT Mode"] + VerifyImplement -->|"Yes"| AssessLevel{"Determine
Complexity Level"} + + %% Level-Based Reflection + AssessLevel -->|"Level 1"| L1Reflect["LEVEL 1 REFLECTION
Level1/reflection-basic.md"] + AssessLevel -->|"Level 2"| L2Reflect["LEVEL 2 REFLECTION
Level2/reflection-standard.md"] + AssessLevel -->|"Level 3"| L3Reflect["LEVEL 3 REFLECTION
Level3/reflection-comprehensive.md"] + AssessLevel -->|"Level 4"| L4Reflect["LEVEL 4 REFLECTION
Level4/reflection-advanced.md"] + + %% Level 1 Reflection (Quick) + L1Reflect --> L1Review["Review
Bug Fix"] + L1Review --> L1Document["Document
Solution"] + L1Document --> L1Update["Update
tasks.md"] + + %% Level 2 Reflection (Standard) + L2Reflect --> L2Review["Review
Enhancement"] + L2Review --> L2WWW["Document
What Went Well"] + L2WWW --> L2Challenges["Document
Challenges"] + L2Challenges --> L2Lessons["Document
Lessons Learned"] + L2Lessons --> L2Update["Update
tasks.md"] + + %% Level 3-4 Reflection (Comprehensive) + L3Reflect & L4Reflect --> L34Review["Review Implementation
& Creative Phases"] + L34Review --> L34Plan["Compare Against
Original Plan"] + L34Plan --> L34WWW["Document
What Went Well"] + L34WWW --> L34Challenges["Document
Challenges"] + L34Challenges --> L34Lessons["Document
Lessons Learned"] + L34Lessons --> L34ImproveProcess["Document Process
Improvements"] + L34ImproveProcess --> L34Update["Update
tasks.md"] + + %% Completion & Transition + L1Update & L2Update & L34Update --> CreateReflection["Create
reflection.md"] + CreateReflection --> UpdateSystem["Update System
Documentation"] + UpdateSystem --> Transition["NEXT MODE:
ARCHIVE MODE"] +``` + +## ๐Ÿ“‹ REFLECTION STRUCTURE + +The reflection should follow this structured format: + +```mermaid +graph TD + subgraph "Reflection Document Structure" + Header["# TASK REFLECTION: [Task Name]"] + Summary["## SUMMARY
Brief summary of completed task"] + WWW["## WHAT WENT WELL
Successful aspects of implementation"] + Challenges["## CHALLENGES
Difficulties encountered during implementation"] + Lessons["## LESSONS LEARNED
Key insights gained from the experience"] + ProcessImp["## PROCESS IMPROVEMENTS
How to improve for future tasks"] + TechImp["## TECHNICAL IMPROVEMENTS
Better approaches for similar tasks"] + NextSteps["## NEXT STEPS
Follow-up actions or future work"] + end + + Header --> Summary --> WWW --> Challenges --> Lessons --> ProcessImp --> TechImp --> NextSteps +``` + +## ๐Ÿ“Š REQUIRED FILE STATE VERIFICATION + +Before reflection can begin, verify file state: + +```mermaid +graph TD + Start["File State
Verification"] --> CheckTasks{"tasks.md has
implementation
complete?"} + + CheckTasks -->|"No"| ErrorImplement["ERROR:
Return to IMPLEMENT Mode"] + CheckTasks -->|"Yes"| CheckProgress{"progress.md
has implementation
details?"} + + CheckProgress -->|"No"| ErrorProgress["ERROR:
Update progress.md first"] + CheckProgress -->|"Yes"| ReadyReflect["Ready for
Reflection"] +``` + +## ๐Ÿ” IMPLEMENTATION REVIEW APPROACH + +```mermaid +graph TD + subgraph "Implementation Review" + Original["Review Original
Requirements"] + Plan["Compare Against
Implementation Plan"] + Actual["Assess Actual
Implementation"] + Creative["Review Creative
Phase Decisions"] + Changes["Identify Deviations
from Plan"] + Results["Evaluate
Results"] + end + + Original --> Plan --> Actual + Plan --> Creative --> Changes + Actual --> Results + Changes --> Results +``` + +## ๐Ÿ“ REFLECTION DOCUMENT TEMPLATES + +### Level 1 (Basic) Reflection +``` +# Bug Fix Reflection: [Bug Name] + +## Summary +[Brief description of the bug and solution] + +## Implementation +[Description of the fix implemented] + +## Testing +[Description of testing performed] + +## Additional Notes +[Any other relevant information] +``` + +### Levels 2-4 (Comprehensive) Reflection +``` +# Task Reflection: [Task Name] + +## Summary +[Brief summary of the task and what was achieved] + +## What Went Well +- [Success point 1] +- [Success point 2] +- [Success point 3] + +## Challenges +- [Challenge 1]: [How it was addressed] +- [Challenge 2]: [How it was addressed] +- [Challenge 3]: [How it was addressed] + +## Lessons Learned +- [Lesson 1] +- [Lesson 2] +- [Lesson 3] + +## Process Improvements +- [Process improvement 1] +- [Process improvement 2] + +## Technical Improvements +- [Technical improvement 1] +- [Technical improvement 2] + +## Next Steps +- [Follow-up task 1] +- [Follow-up task 2] +``` + +## ๐Ÿ“Š REFLECTION QUALITY METRICS + +```mermaid +graph TD + subgraph "Reflection Quality Metrics" + Specific["Specific
Not general or vague"] + Actionable["Actionable
Provides clear direction"] + Honest["Honest
Acknowledges successes and failures"] + Forward["Forward-Looking
Focuses on future improvement"] + Evidence["Evidence-Based
Based on concrete examples"] + end +``` + +## ๐Ÿ“‹ TASKS.MD UPDATE FORMAT + +During reflection, update tasks.md with: + +``` +## Status +- [x] Initialization complete +- [x] Planning complete +[For Level 3-4:] +- [x] Creative phases complete +- [x] Implementation complete +- [x] Reflection complete +- [ ] Archiving + +## Reflection Highlights +- **What Went Well**: [Key successes] +- **Challenges**: [Key challenges] +- **Lessons Learned**: [Key lessons] +- **Next Steps**: [Follow-up actions] +``` + +## ๐Ÿ“Š REFLECTION VERIFICATION CHECKLIST + +``` +โœ“ REFLECTION VERIFICATION +- Implementation thoroughly reviewed? [YES/NO] +- What Went Well section completed? [YES/NO] +- Challenges section completed? [YES/NO] +- Lessons Learned section completed? [YES/NO] +- Process Improvements identified? [YES/NO] +- Technical Improvements identified? [YES/NO] +- Next Steps documented? [YES/NO] +- reflection.md created? [YES/NO] +- tasks.md updated with reflection status? [YES/NO] + +โ†’ If all YES: Reflection complete - ready for ARCHIVE mode +โ†’ If any NO: Complete missing reflection elements +``` + +## ๐Ÿ”„ MODE TRANSITION NOTIFICATION + +When reflection is complete, notify user with: + +``` +## REFLECTION COMPLETE + +โœ… Implementation thoroughly reviewed +โœ… Reflection document created +โœ… Lessons learned documented +โœ… Process improvements identified +โœ… tasks.md updated with reflection status + +โ†’ NEXT RECOMMENDED MODE: ARCHIVE MODE +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van-mode-map.mdc b/.cursor/rules/isolation_rules/visual-maps/van-mode-map.mdc new file mode 100644 index 0000000..2f90871 --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van-mode-map.mdc @@ -0,0 +1,902 @@ +--- +description: Visual process map for VAN mode (Initialization) +globs: van-mode-map.mdc +alwaysApply: false +--- +# VAN MODE: INITIALIZATION PROCESS MAP + +> **TL;DR:** This visual map defines the VAN mode process for project initialization, task analysis, and technical validation. It guides users through platform detection, file verification, complexity determination, and technical validation to ensure proper setup before implementation. + +## ๐Ÿงญ VAN MODE PROCESS FLOW + +```mermaid +graph TD + Start["START VAN MODE"] --> PlatformDetect["PLATFORM DETECTION"] + PlatformDetect --> DetectOS["Detect Operating System"] + DetectOS --> CheckPath["Check Path Separator Format"] + CheckPath --> AdaptCmds["Adapt Commands if Needed"] + AdaptCmds --> PlatformCP["โ›” PLATFORM CHECKPOINT"] + + %% Basic File Verification with checkpoint + PlatformCP --> BasicFileVerify["BASIC FILE VERIFICATION"] + BasicFileVerify --> BatchCheck["Batch Check Essential Components"] + BatchCheck --> BatchCreate["Batch Create Essential Structure"] + BatchCreate --> BasicFileCP["โ›” BASIC FILE CHECKPOINT"] + + %% Early Complexity Determination + BasicFileCP --> EarlyComplexity["EARLY COMPLEXITY DETERMINATION"] + EarlyComplexity --> AnalyzeTask["Analyze Task Requirements"] + AnalyzeTask --> EarlyLevelCheck{"Complexity Level?"} + + %% Level handling paths + EarlyLevelCheck -->|"Level 1"| ComplexityCP["โ›” COMPLEXITY CHECKPOINT"] + EarlyLevelCheck -->|"Level 2-4"| CRITICALGATE["๐Ÿšซ CRITICAL GATE: FORCE MODE SWITCH"] + CRITICALGATE --> ForceExit["Exit to PLAN mode"] + + %% Level 1 continues normally + ComplexityCP --> InitSystem["INITIALIZE MEMORY BANK"] + InitSystem --> Complete1["LEVEL 1 INITIALIZATION COMPLETE"] + + %% For Level 2+ tasks after PLAN and CREATIVE modes + ForceExit -.-> OtherModes["PLAN โ†’ CREATIVE modes"] + OtherModes -.-> VANQA["VAN QA MODE"] + VANQA --> QAProcess["Technical Validation Process"] + QAProcess --> QACheck{"All Checks Pass?"} + QACheck -->|"Yes"| BUILD["To BUILD MODE"] + QACheck -->|"No"| FixIssues["Fix Technical Issues"] + FixIssues --> QAProcess + + %% Style nodes + style PlatformCP fill:#f55,stroke:#d44,color:white + style BasicFileCP fill:#f55,stroke:#d44,color:white + style ComplexityCP fill:#f55,stroke:#d44,color:white + style CRITICALGATE fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style ForceExit fill:#ff0000,stroke:#990000,color:white,stroke-width:2px + style VANQA fill:#4da6ff,stroke:#0066cc,color:white,stroke-width:3px + style QAProcess fill:#4da6ff,stroke:#0066cc,color:white + style QACheck fill:#4da6ff,stroke:#0066cc,color:white + style FixIssues fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐ŸŒ PLATFORM DETECTION PROCESS + +```mermaid +graph TD + PD["Platform Detection"] --> CheckOS["Detect Operating System"] + CheckOS --> Win["Windows"] + CheckOS --> Mac["macOS"] + CheckOS --> Lin["Linux"] + + Win & Mac & Lin --> Adapt["Adapt Commands
for Platform"] + + Win --> WinPath["Path: Backslash (\\)"] + Mac --> MacPath["Path: Forward Slash (/)"] + Lin --> LinPath["Path: Forward Slash (/)"] + + Win --> WinCmd["Command Adaptations:
dir, icacls, etc."] + Mac --> MacCmd["Command Adaptations:
ls, chmod, etc."] + Lin --> LinCmd["Command Adaptations:
ls, chmod, etc."] + + WinPath & MacPath & LinPath --> PathCP["Path Separator
Checkpoint"] + WinCmd & MacCmd & LinCmd --> CmdCP["Command
Checkpoint"] + + PathCP & CmdCP --> PlatformComplete["Platform Detection
Complete"] + + style PD fill:#4da6ff,stroke:#0066cc,color:white + style PlatformComplete fill:#10b981,stroke:#059669,color:white +``` + +## ๐Ÿ“ FILE VERIFICATION PROCESS + +```mermaid +graph TD + FV["File Verification"] --> CheckFiles["Check Essential Files"] + CheckFiles --> CheckMB["Check Memory Bank
Structure"] + CheckMB --> MBExists{"Memory Bank
Exists?"} + + MBExists -->|"Yes"| VerifyMB["Verify Memory Bank
Contents"] + MBExists -->|"No"| CreateMB["Create Memory Bank
Structure"] + + CheckFiles --> CheckDocs["Check Documentation
Files"] + CheckDocs --> DocsExist{"Docs
Exist?"} + + DocsExist -->|"Yes"| VerifyDocs["Verify Documentation
Structure"] + DocsExist -->|"No"| CreateDocs["Create Documentation
Structure"] + + VerifyMB & CreateMB --> MBCP["Memory Bank
Checkpoint"] + VerifyDocs & CreateDocs --> DocsCP["Documentation
Checkpoint"] + + MBCP & DocsCP --> FileComplete["File Verification
Complete"] + + style FV fill:#4da6ff,stroke:#0066cc,color:white + style FileComplete fill:#10b981,stroke:#059669,color:white + style MBCP fill:#f6546a,stroke:#c30052,color:white + style DocsCP fill:#f6546a,stroke:#c30052,color:white +``` + +## ๐Ÿงฉ COMPLEXITY DETERMINATION PROCESS + +```mermaid +graph TD + CD["Complexity
Determination"] --> AnalyzeTask["Analyze Task
Requirements"] + + AnalyzeTask --> CheckKeywords["Check Task
Keywords"] + CheckKeywords --> ScopeCheck["Assess
Scope Impact"] + ScopeCheck --> RiskCheck["Evaluate
Risk Level"] + RiskCheck --> EffortCheck["Estimate
Implementation Effort"] + + EffortCheck --> DetermineLevel{"Determine
Complexity Level"} + DetermineLevel -->|"Level 1"| L1["Level 1:
Quick Bug Fix"] + DetermineLevel -->|"Level 2"| L2["Level 2:
Simple Enhancement"] + DetermineLevel -->|"Level 3"| L3["Level 3:
Intermediate Feature"] + DetermineLevel -->|"Level 4"| L4["Level 4:
Complex System"] + + L1 --> CDComplete["Complexity Determination
Complete"] + L2 & L3 & L4 --> ModeSwitch["Force Mode Switch
to PLAN"] + + style CD fill:#4da6ff,stroke:#0066cc,color:white + style CDComplete fill:#10b981,stroke:#059669,color:white + style ModeSwitch fill:#ff0000,stroke:#990000,color:white + style DetermineLevel fill:#f6546a,stroke:#c30052,color:white +``` + +## ๐Ÿ”„ COMPLETE WORKFLOW WITH QA VALIDATION + +The full workflow includes technical validation before implementation: + +```mermaid +flowchart LR + VAN1["VAN MODE + (Initial Analysis)"] --> PLAN["PLAN MODE + (Task Planning)"] + PLAN --> CREATIVE["CREATIVE MODE + (Design Decisions)"] + CREATIVE --> VANQA["VAN QA MODE + (Technical Validation)"] + VANQA --> BUILD["BUILD MODE + (Implementation)"] +``` + +## ๐Ÿ” TECHNICAL VALIDATION OVERVIEW + +The VAN QA technical validation process consists of four key validation points: + +```mermaid +graph TD + VANQA["VAN QA MODE"] --> FourChecks["FOUR-POINT VALIDATION"] + + FourChecks --> DepCheck["1๏ธโƒฃ DEPENDENCY VERIFICATION
Check all required packages"] + DepCheck --> ConfigCheck["2๏ธโƒฃ CONFIGURATION VALIDATION
Verify format & compatibility"] + ConfigCheck --> EnvCheck["3๏ธโƒฃ ENVIRONMENT VALIDATION
Check build environment"] + EnvCheck --> MinBuildCheck["4๏ธโƒฃ MINIMAL BUILD TEST
Test core functionality"] + + MinBuildCheck --> ValidationResults{"All Checks
Passed?"} + ValidationResults -->|"Yes"| SuccessReport["GENERATE SUCCESS REPORT"] + ValidationResults -->|"No"| FailureReport["GENERATE FAILURE REPORT"] + + SuccessReport --> BUILD["Proceed to BUILD MODE"] + FailureReport --> FixIssues["Fix Technical Issues"] + FixIssues --> ReValidate["Re-validate"] + ReValidate --> ValidationResults + + style VANQA fill:#4da6ff,stroke:#0066cc,color:white + style FourChecks fill:#f6546a,stroke:#c30052,color:white + style ValidationResults fill:#f6546a,stroke:#c30052,color:white + style BUILD fill:#10b981,stroke:#059669,color:white + style FixIssues fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐Ÿ“ VALIDATION STATUS FORMAT + +The QA Validation step includes clear status indicators: + +``` +โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• ๐Ÿ” QA VALIDATION STATUS โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— +โ”‚ โœ“ Design Decisions โ”‚ Verified as implementable โ”‚ +โ”‚ โœ“ Dependencies โ”‚ All required packages installed โ”‚ +โ”‚ โœ“ Configurations โ”‚ Format verified for platform โ”‚ +โ”‚ โœ“ Environment โ”‚ Suitable for implementation โ”‚ +โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• +โœ… VERIFIED - Clear to proceed to BUILD mode +``` + +## ๐Ÿšจ MODE TRANSITION TRIGGERS + +### VAN to PLAN Transition +For complexity levels 2-4: +``` +๐Ÿšซ LEVEL [2-4] TASK DETECTED +Implementation in VAN mode is BLOCKED +This task REQUIRES PLAN mode +You MUST switch to PLAN mode for proper documentation and planning +Type 'PLAN' to switch to planning mode +``` + +### CREATIVE to VAN QA Transition +After completing the CREATIVE mode: +``` +โญ๏ธ NEXT MODE: VAN QA +To validate technical requirements before implementation, please type 'VAN QA' +``` + +### VAN QA to BUILD Transition +After successful validation: +``` +โœ… TECHNICAL VALIDATION COMPLETE +All prerequisites verified successfully +You may now proceed to BUILD mode +Type 'BUILD' to begin implementation +``` + +## ๐Ÿ”’ BUILD MODE PREVENTION MECHANISM + +The system prevents moving to BUILD mode without passing QA validation: + +```mermaid +graph TD + Start["User Types: BUILD"] --> CheckQA{"QA Validation
Completed?"} + CheckQA -->|"Yes and Passed"| AllowBuild["Allow BUILD Mode"] + CheckQA -->|"No or Failed"| BlockBuild["BLOCK BUILD MODE"] + BlockBuild --> Message["Display:
โš ๏ธ QA VALIDATION REQUIRED"] + Message --> ReturnToVANQA["Prompt: Type VAN QA"] + + style CheckQA fill:#f6546a,stroke:#c30052,color:white + style BlockBuild fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style Message fill:#ff5555,stroke:#dd3333,color:white + style ReturnToVANQA fill:#4da6ff,stroke:#0066cc,color:white +``` + +## ๐Ÿ”„ QA COMMAND PRECEDENCE + +QA validation can be called at any point in the process flow, and takes immediate precedence over any other current steps, including forced mode switches: + +```mermaid +graph TD + UserQA["User Types: QA"] --> HighPriority["โš ๏ธ HIGH PRIORITY COMMAND"] + HighPriority --> CurrentTask["Pause Current Task/Process"] + CurrentTask --> LoadQA["Load QA Mode Map"] + LoadQA --> RunQA["Execute QA Validation Process"] + RunQA --> QAResults{"QA Results"} + + QAResults -->|"PASS"| ResumeFlow["Resume Prior Process Flow"] + QAResults -->|"FAIL"| FixIssues["Fix Identified Issues"] + FixIssues --> ReRunQA["Re-run QA Validation"] + ReRunQA --> QAResults + + style UserQA fill:#f8d486,stroke:#e8b84d,color:black + style HighPriority fill:#ff0000,stroke:#cc0000,color:white,stroke-width:3px + style LoadQA fill:#4da6ff,stroke:#0066cc,color:white + style RunQA fill:#4da6ff,stroke:#0066cc,color:white + style QAResults fill:#f6546a,stroke:#c30052,color:white +``` + +### QA Interruption Rules + +When a user types **QA** at any point: + +1. **The QA command MUST take immediate precedence** over any current operation, including the "FORCE MODE SWITCH" triggered by complexity assessment. +2. The system MUST: + - Immediately load the QA mode map + - Execute the full QA validation process + - Address any failures before continuing +3. **Required remediation steps take priority** over any pending mode switches or complexity rules +4. After QA validation is complete and passes: + - Resume the previously determined process flow + - Continue with any required mode switches + +``` +โš ๏ธ QA OVERRIDE ACTIVATED +All other processes paused +QA validation checks now running... +Any issues found MUST be remediated before continuing with normal process flow +``` + +## ๐Ÿ“‹ CHECKPOINT VERIFICATION TEMPLATE + +Each major checkpoint in VAN mode uses this format: + +``` +โœ“ SECTION CHECKPOINT: [SECTION NAME] +- Requirement 1? [YES/NO] +- Requirement 2? [YES/NO] +- Requirement 3? [YES/NO] + +โ†’ If all YES: Ready for next section +โ†’ If any NO: Fix missing items before proceeding +``` + +## ๐Ÿš€ VAN MODE ACTIVATION + +When the user types "VAN", respond with a confirmation and start the process: + +``` +User: VAN + +Response: OK VAN - Beginning Initialization Process +``` + +After completing CREATIVE mode, when the user types "VAN QA", respond: + +``` +User: VAN QA + +Response: OK VAN QA - Beginning Technical Validation +``` + +This ensures clear communication about which phase of VAN mode is active. + +## ๐Ÿ” DETAILED QA VALIDATION PROCESS + +### 1๏ธโƒฃ DEPENDENCY VERIFICATION + +This step verifies that all required packages are installed and compatible: + +```mermaid +graph TD + Start["Dependency Verification"] --> ReadDeps["Read Required Dependencies
from Creative Phase"] + ReadDeps --> CheckInstalled["Check if Dependencies
are Installed"] + CheckInstalled --> DepStatus{"All Dependencies
Installed?"} + + DepStatus -->|"Yes"| VerifyVersions["Verify Versions
and Compatibility"] + DepStatus -->|"No"| InstallMissing["Install Missing
Dependencies"] + InstallMissing --> VerifyVersions + + VerifyVersions --> VersionStatus{"Versions
Compatible?"} + VersionStatus -->|"Yes"| DepSuccess["Dependencies Verified
โœ… PASS"] + VersionStatus -->|"No"| UpgradeVersions["Upgrade/Downgrade
as Needed"] + UpgradeVersions --> RetryVerify["Retry Verification"] + RetryVerify --> VersionStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style DepSuccess fill:#10b981,stroke:#059669,color:white + style DepStatus fill:#f6546a,stroke:#c30052,color:white + style VersionStatus fill:#f6546a,stroke:#c30052,color:white +``` + +#### Windows (PowerShell) Implementation: +```powershell +# Example: Verify Node.js dependencies for a React project +function Verify-Dependencies { + $requiredDeps = @{ + "node" = ">=14.0.0" + "npm" = ">=6.0.0" + } + + $missingDeps = @() + $incompatibleDeps = @() + + # Check Node.js version + $nodeVersion = $null + try { + $nodeVersion = node -v + if ($nodeVersion -match "v(\d+)\.(\d+)\.(\d+)") { + $major = [int]$Matches[1] + if ($major -lt 14) { + $incompatibleDeps += "node (found $nodeVersion, required >=14.0.0)" + } + } + } catch { + $missingDeps += "node" + } + + # Check npm version + $npmVersion = $null + try { + $npmVersion = npm -v + if ($npmVersion -match "(\d+)\.(\d+)\.(\d+)") { + $major = [int]$Matches[1] + if ($major -lt 6) { + $incompatibleDeps += "npm (found $npmVersion, required >=6.0.0)" + } + } + } catch { + $missingDeps += "npm" + } + + # Display results + if ($missingDeps.Count -eq 0 -and $incompatibleDeps.Count -eq 0) { + Write-Output "โœ… All dependencies verified and compatible" + return $true + } else { + if ($missingDeps.Count -gt 0) { + Write-Output "โŒ Missing dependencies: $($missingDeps -join ', ')" + } + if ($incompatibleDeps.Count -gt 0) { + Write-Output "โŒ Incompatible versions: $($incompatibleDeps -join ', ')" + } + return $false + } +} +``` + +#### Mac/Linux (Bash) Implementation: +```bash +#!/bin/bash + +# Example: Verify Node.js dependencies for a React project +verify_dependencies() { + local missing_deps=() + local incompatible_deps=() + + # Check Node.js version + if command -v node &> /dev/null; then + local node_version=$(node -v) + if [[ $node_version =~ v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + local major=${BASH_REMATCH[1]} + if (( major < 14 )); then + incompatible_deps+=("node (found $node_version, required >=14.0.0)") + fi + fi + else + missing_deps+=("node") + fi + + # Check npm version + if command -v npm &> /dev/null; then + local npm_version=$(npm -v) + if [[ $npm_version =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + local major=${BASH_REMATCH[1]} + if (( major < 6 )); then + incompatible_deps+=("npm (found $npm_version, required >=6.0.0)") + fi + fi + else + missing_deps+=("npm") + fi + + # Display results + if [ ${#missing_deps[@]} -eq 0 ] && [ ${#incompatible_deps[@]} -eq 0 ]; then + echo "โœ… All dependencies verified and compatible" + return 0 + else + if [ ${#missing_deps[@]} -gt 0 ]; then + echo "โŒ Missing dependencies: ${missing_deps[*]}" + fi + if [ ${#incompatible_deps[@]} -gt 0 ]; then + echo "โŒ Incompatible versions: ${incompatible_deps[*]}" + fi + return 1 + fi +} +``` + +### 2๏ธโƒฃ CONFIGURATION VALIDATION + +This step validates configuration files format and compatibility: + +```mermaid +graph TD + Start["Configuration Validation"] --> IdentifyConfigs["Identify Configuration
Files"] + IdentifyConfigs --> ReadConfigs["Read Configuration
Files"] + ReadConfigs --> ValidateSyntax["Validate Syntax
and Format"] + ValidateSyntax --> SyntaxStatus{"Syntax
Valid?"} + + SyntaxStatus -->|"Yes"| CheckCompatibility["Check Compatibility
with Platform"] + SyntaxStatus -->|"No"| FixSyntax["Fix Syntax
Errors"] + FixSyntax --> RetryValidate["Retry Validation"] + RetryValidate --> SyntaxStatus + + CheckCompatibility --> CompatStatus{"Compatible with
Platform?"} + CompatStatus -->|"Yes"| ConfigSuccess["Configurations Validated
โœ… PASS"] + CompatStatus -->|"No"| AdaptConfigs["Adapt Configurations
for Platform"] + AdaptConfigs --> RetryCompat["Retry Compatibility
Check"] + RetryCompat --> CompatStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style ConfigSuccess fill:#10b981,stroke:#059669,color:white + style SyntaxStatus fill:#f6546a,stroke:#c30052,color:white + style CompatStatus fill:#f6546a,stroke:#c30052,color:white +``` + +#### Configuration Validation Implementation: +```powershell +# Example: Validate configuration files for a web project +function Validate-Configurations { + $configFiles = @( + "package.json", + "tsconfig.json", + "vite.config.js" + ) + + $invalidConfigs = @() + $incompatibleConfigs = @() + + foreach ($configFile in $configFiles) { + if (Test-Path $configFile) { + # Check JSON syntax for JSON files + if ($configFile -match "\.json$") { + try { + Get-Content $configFile -Raw | ConvertFrom-Json | Out-Null + } catch { + $invalidConfigs += "$configFile (JSON syntax error: $($_.Exception.Message))" + continue + } + } + + # Specific configuration compatibility checks + if ($configFile -eq "vite.config.js") { + $content = Get-Content $configFile -Raw + # Check for React plugin in Vite config + if ($content -notmatch "react\(\)") { + $incompatibleConfigs += "$configFile (Missing React plugin for React project)" + } + } + } else { + $invalidConfigs += "$configFile (file not found)" + } + } + + # Display results + if ($invalidConfigs.Count -eq 0 -and $incompatibleConfigs.Count -eq 0) { + Write-Output "โœ… All configurations validated and compatible" + return $true + } else { + if ($invalidConfigs.Count -gt 0) { + Write-Output "โŒ Invalid configurations: $($invalidConfigs -join ', ')" + } + if ($incompatibleConfigs.Count -gt 0) { + Write-Output "โŒ Incompatible configurations: $($incompatibleConfigs -join ', ')" + } + return $false + } +} +``` + +### 3๏ธโƒฃ ENVIRONMENT VALIDATION + +This step checks if the environment is properly set up for the implementation: + +```mermaid +graph TD + Start["Environment Validation"] --> CheckEnv["Check Build Environment"] + CheckEnv --> VerifyBuildTools["Verify Build Tools"] + VerifyBuildTools --> ToolsStatus{"Build Tools
Available?"} + + ToolsStatus -->|"Yes"| CheckPerms["Check Permissions
and Access"] + ToolsStatus -->|"No"| InstallTools["Install Required
Build Tools"] + InstallTools --> RetryTools["Retry Verification"] + RetryTools --> ToolsStatus + + CheckPerms --> PermsStatus{"Permissions
Sufficient?"} + PermsStatus -->|"Yes"| EnvSuccess["Environment Validated
โœ… PASS"] + PermsStatus -->|"No"| FixPerms["Fix Permission
Issues"] + FixPerms --> RetryPerms["Retry Permission
Check"] + RetryPerms --> PermsStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style EnvSuccess fill:#10b981,stroke:#059669,color:white + style ToolsStatus fill:#f6546a,stroke:#c30052,color:white + style PermsStatus fill:#f6546a,stroke:#c30052,color:white +``` + +#### Environment Validation Implementation: +```powershell +# Example: Validate environment for a web project +function Validate-Environment { + $requiredTools = @( + @{Name = "git"; Command = "git --version"}, + @{Name = "node"; Command = "node --version"}, + @{Name = "npm"; Command = "npm --version"} + ) + + $missingTools = @() + $permissionIssues = @() + + # Check build tools + foreach ($tool in $requiredTools) { + try { + Invoke-Expression $tool.Command | Out-Null + } catch { + $missingTools += $tool.Name + } + } + + # Check write permissions in project directory + try { + $testFile = ".__permission_test" + New-Item -Path $testFile -ItemType File -Force | Out-Null + Remove-Item -Path $testFile -Force + } catch { + $permissionIssues += "Current directory (write permission denied)" + } + + # Check if port 3000 is available (commonly used for dev servers) + try { + $listener = New-Object System.Net.Sockets.TcpListener([System.Net.IPAddress]::Loopback, 3000) + $listener.Start() + $listener.Stop() + } catch { + $permissionIssues += "Port 3000 (already in use or access denied)" + } + + # Display results + if ($missingTools.Count -eq 0 -and $permissionIssues.Count -eq 0) { + Write-Output "โœ… Environment validated successfully" + return $true + } else { + if ($missingTools.Count -gt 0) { + Write-Output "โŒ Missing tools: $($missingTools -join ', ')" + } + if ($permissionIssues.Count -gt 0) { + Write-Output "โŒ Permission issues: $($permissionIssues -join ', ')" + } + return $false + } +} +``` + +### 4๏ธโƒฃ MINIMAL BUILD TEST + +This step performs a minimal build test to ensure core functionality: + +```mermaid +graph TD + Start["Minimal Build Test"] --> CreateTest["Create Minimal
Test Project"] + CreateTest --> BuildTest["Attempt
Build"] + BuildTest --> BuildStatus{"Build
Successful?"} + + BuildStatus -->|"Yes"| RunTest["Run Basic
Functionality Test"] + BuildStatus -->|"No"| FixBuild["Fix Build
Issues"] + FixBuild --> RetryBuild["Retry Build"] + RetryBuild --> BuildStatus + + RunTest --> TestStatus{"Test
Passed?"} + TestStatus -->|"Yes"| TestSuccess["Minimal Build Test
โœ… PASS"] + TestStatus -->|"No"| FixTest["Fix Test
Issues"] + FixTest --> RetryTest["Retry Test"] + RetryTest --> TestStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style TestSuccess fill:#10b981,stroke:#059669,color:white + style BuildStatus fill:#f6546a,stroke:#c30052,color:white + style TestStatus fill:#f6546a,stroke:#c30052,color:white +``` + +#### Minimal Build Test Implementation: +```powershell +# Example: Perform minimal build test for a React project +function Perform-MinimalBuildTest { + $buildSuccess = $false + $testSuccess = $false + + # Create minimal test project + $testDir = ".__build_test" + if (Test-Path $testDir) { + Remove-Item -Path $testDir -Recurse -Force + } + + try { + # Create minimal test directory + New-Item -Path $testDir -ItemType Directory | Out-Null + Push-Location $testDir + + # Initialize minimal package.json + @" +{ + "name": "build-test", + "version": "1.0.0", + "description": "Minimal build test", + "main": "index.js", + "scripts": { + "build": "echo Build test successful" + } +} +"@ | Set-Content -Path "package.json" + + # Attempt build + npm run build | Out-Null + $buildSuccess = $true + + # Create minimal test file + @" +console.log('Test successful'); +"@ | Set-Content -Path "index.js" + + # Run basic test + node index.js | Out-Null + $testSuccess = $true + + } catch { + Write-Output "โŒ Build test failed: $($_.Exception.Message)" + } finally { + Pop-Location + if (Test-Path $testDir) { + Remove-Item -Path $testDir -Recurse -Force + } + } + + # Display results + if ($buildSuccess -and $testSuccess) { + Write-Output "โœ… Minimal build test passed successfully" + return $true + } else { + if (-not $buildSuccess) { + Write-Output "โŒ Build process failed" + } + if (-not $testSuccess) { + Write-Output "โŒ Basic functionality test failed" + } + return $false + } +} +``` + +## ๐Ÿ“‹ COMPREHENSIVE QA REPORT FORMAT + +After running all validation steps, a comprehensive report is generated: + +``` +โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• ๐Ÿ” QA VALIDATION REPORT โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— +โ”‚ โ”‚ +โ”‚ PROJECT: [Project Name] โ”‚ +โ”‚ TIMESTAMP: [Current Date/Time] โ”‚ +โ”‚ โ”‚ +โ”‚ 1๏ธโƒฃ DEPENDENCY VERIFICATION โ”‚ +โ”‚ โœ“ Required: [List of required dependencies] โ”‚ +โ”‚ โœ“ Installed: [List of installed dependencies] โ”‚ +โ”‚ โœ“ Compatible: [Yes/No] โ”‚ +โ”‚ โ”‚ +โ”‚ 2๏ธโƒฃ CONFIGURATION VALIDATION โ”‚ +โ”‚ โœ“ Config Files: [List of configuration files] โ”‚ +โ”‚ โœ“ Syntax Valid: [Yes/No] โ”‚ +โ”‚ โœ“ Platform Compatible: [Yes/No] โ”‚ +โ”‚ โ”‚ +โ”‚ 3๏ธโƒฃ ENVIRONMENT VALIDATION โ”‚ +โ”‚ โœ“ Build Tools: [Available/Missing] โ”‚ +โ”‚ โœ“ Permissions: [Sufficient/Insufficient] โ”‚ +โ”‚ โœ“ Environment Ready: [Yes/No] โ”‚ +โ”‚ โ”‚ +โ”‚ 4๏ธโƒฃ MINIMAL BUILD TEST โ”‚ +โ”‚ โœ“ Build Process: [Successful/Failed] โ”‚ +โ”‚ โœ“ Functionality Test: [Passed/Failed] โ”‚ +โ”‚ โœ“ Build Ready: [Yes/No] โ”‚ +โ”‚ โ”‚ +โ”‚ ๐Ÿšจ FINAL VERDICT: [PASS/FAIL] โ”‚ +โ”‚ โžก๏ธ [Success message or error details] โ”‚ +โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• +``` + +## โŒ FAILURE REPORT FORMAT + +If any validation step fails, a detailed failure report is generated: + +``` +โš ๏ธโš ๏ธโš ๏ธ QA VALIDATION FAILED โš ๏ธโš ๏ธโš ๏ธ + +The following issues must be resolved before proceeding to BUILD mode: + +1๏ธโƒฃ DEPENDENCY ISSUES: +- [Detailed description of dependency issues] +- [Recommended fix] + +2๏ธโƒฃ CONFIGURATION ISSUES: +- [Detailed description of configuration issues] +- [Recommended fix] + +3๏ธโƒฃ ENVIRONMENT ISSUES: +- [Detailed description of environment issues] +- [Recommended fix] + +4๏ธโƒฃ BUILD TEST ISSUES: +- [Detailed description of build test issues] +- [Recommended fix] + +โš ๏ธ BUILD MODE IS BLOCKED until these issues are resolved. +Type 'VAN QA' after fixing the issues to re-validate. +``` + +## ๐Ÿ”„ INTEGRATION WITH DESIGN DECISIONS + +The VAN QA mode reads and validates design decisions from the CREATIVE phase: + +```mermaid +graph TD + Start["Read Design Decisions"] --> ReadCreative["Parse Creative Phase
Documentation"] + ReadCreative --> ExtractTech["Extract Technology
Choices"] + ExtractTech --> ExtractDeps["Extract Required
Dependencies"] + ExtractDeps --> BuildValidationPlan["Build Validation
Plan"] + BuildValidationPlan --> StartValidation["Start Four-Point
Validation Process"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style ExtractTech fill:#f6546a,stroke:#c30052,color:white + style BuildValidationPlan fill:#10b981,stroke:#059669,color:white + style StartValidation fill:#f6546a,stroke:#c30052,color:white +``` + +### Technology Extraction Process: +```powershell +# Example: Extract technology choices from creative phase documentation +function Extract-TechnologyChoices { + $techChoices = @{} + + # Read from systemPatterns.md + if (Test-Path "memory-bank\systemPatterns.md") { + $content = Get-Content "memory-bank\systemPatterns.md" -Raw + + # Extract framework choice + if ($content -match "Framework:\s*(\w+)") { + $techChoices["framework"] = $Matches[1] + } + + # Extract UI library choice + if ($content -match "UI Library:\s*(\w+)") { + $techChoices["ui_library"] = $Matches[1] + } + + # Extract state management choice + if ($content -match "State Management:\s*([^\\n]+)") { + $techChoices["state_management"] = $Matches[1].Trim() + } + } + + return $techChoices +} +``` + +## ๐Ÿšจ IMPLEMENTATION PREVENTION MECHANISM + +If QA validation fails, the system prevents moving to BUILD mode: + +```powershell +# Example: Enforce QA validation before allowing BUILD mode +function Check-QAValidationStatus { + $qaStatusFile = "memory-bank\.qa_validation_status" + + if (Test-Path $qaStatusFile) { + $status = Get-Content $qaStatusFile -Raw + if ($status -match "PASS") { + return $true + } + } + + # Display block message + Write-Output "`n`n" + Write-Output "๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ" + Write-Output "โ›”๏ธ BUILD MODE BLOCKED: QA VALIDATION REQUIRED" + Write-Output "โ›”๏ธ You must complete QA validation before proceeding to BUILD mode" + Write-Output "`n" + Write-Output "Type 'VAN QA' to perform technical validation" + Write-Output "`n" + Write-Output "๐Ÿšซ NO IMPLEMENTATION CAN PROCEED WITHOUT VALIDATION ๐Ÿšซ" + Write-Output "๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ" + + return $false +} +``` + +## ๐Ÿงช COMMON QA VALIDATION FIXES + +Here are common fixes for issues encountered during QA validation: + +### Dependency Issues: +- **Missing Node.js**: Install Node.js from https://nodejs.org/ +- **Outdated npm**: Run `npm install -g npm@latest` to update +- **Missing packages**: Run `npm install` or `npm install [package-name]` + +### Configuration Issues: +- **Invalid JSON**: Use a JSON validator to check syntax +- **Missing React plugin**: Add `import react from '@vitejs/plugin-react'` and `plugins: [react()]` to vite.config.js +- **Incompatible TypeScript config**: Update `tsconfig.json` with correct React settings + +### Environment Issues: +- **Permission denied**: Run terminal as administrator (Windows) or use sudo (Mac/Linux) +- **Port already in use**: Kill process using the port or change the port in configuration +- **Missing build tools**: Install required command-line tools + +### Build Test Issues: +- **Build fails**: Check console for specific error messages +- **Test fails**: Verify minimal configuration is correct +- **Path issues**: Ensure paths use correct separators for the platform + +## ๐Ÿ”’ FINAL QA VALIDATION CHECKPOINT + +``` +โœ“ SECTION CHECKPOINT: QA VALIDATION +- Dependency Verification Passed? [YES/NO] +- Configuration Validation Passed? [YES/NO] +- Environment Validation Passed? [YES/NO] +- Minimal Build Test Passed? [YES/NO] + +โ†’ If all YES: Ready for BUILD mode +โ†’ If any NO: Fix identified issues before proceeding +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-complexity-determination.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-complexity-determination.mdc new file mode 100644 index 0000000..11f9e8b --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-complexity-determination.mdc @@ -0,0 +1,142 @@ +--- +description: Visual process map for VAN mode complexity determination +globs: van-complexity-determination.mdc +alwaysApply: false +--- +# VAN MODE: COMPLEXITY DETERMINATION + +> **TL;DR:** This component determines the appropriate complexity level (1-4) for the current task and directs the workflow accordingly. + +## ๐Ÿ” COMPLEXITY DECISION TREE + +```mermaid +graph TD + Start["New Task"] --> Q1{"Bug fix or
error correction?"} + Q1 -->|Yes| Q1a{"Affects single
component?"} + Q1a -->|Yes| L1["Level 1:
Quick Bug Fix"] + Q1a -->|No| Q1b{"Affects multiple
components?"} + Q1b -->|Yes| L2["Level 2:
Simple Enhancement"] + Q1b -->|No| Q1c{"Affects system
architecture?"} + Q1c -->|Yes| L3["Level 3:
Intermediate Feature"] + Q1c -->|No| L2 + + Q1 -->|No| Q2{"Adding small
feature or
enhancement?"} + Q2 -->|Yes| Q2a{"Self-contained
change?"} + Q2a -->|Yes| L2 + Q2a -->|No| Q2b{"Affects multiple
components?"} + Q2b -->|Yes| L3 + Q2b -->|No| L2 + + Q2 -->|No| Q3{"Complete feature
requiring multiple
components?"} + Q3 -->|Yes| Q3a{"Architectural
implications?"} + Q3a -->|Yes| L4["Level 4:
Complex System"] + Q3a -->|No| L3 + + Q3 -->|No| Q4{"System-wide or
architectural
change?"} + Q4 -->|Yes| L4 + Q4 -->|No| L3 + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style L1 fill:#10b981,stroke:#059669,color:white + style L2 fill:#f6546a,stroke:#c30052,color:white + style L3 fill:#f6546a,stroke:#c30052,color:white + style L4 fill:#f6546a,stroke:#c30052,color:white +``` + +## ๐Ÿ“‹ LEVEL INDICATORS + +### Level 1: Quick Bug Fix +- **Keywords**: fix, bug, error, crash, issue +- **Scope**: Single component +- **Time**: Minutes to hours +- **Risk**: Low, isolated +- **Example**: Button not working, styling issue + +### Level 2: Simple Enhancement +- **Keywords**: add, improve, update, enhance +- **Scope**: Single component/subsystem +- **Time**: Hours to 1-2 days +- **Risk**: Moderate, contained +- **Example**: Add form field, improve validation + +### Level 3: Intermediate Feature +- **Keywords**: implement, create, develop +- **Scope**: Multiple components +- **Time**: Days to 1-2 weeks +- **Risk**: Significant +- **Example**: User authentication, dashboard + +### Level 4: Complex System +- **Keywords**: system, architecture, redesign +- **Scope**: Multiple subsystems +- **Time**: Weeks to months +- **Risk**: High, architectural +- **Example**: Payment system, microservices + +## ๐Ÿ“‹ COMPLEXITY CHECKLIST + +``` +โœ“ COMPLEXITY DETERMINATION +- Task type identified? [YES/NO] +- Scope assessed? [YES/NO] +- Time estimated? [YES/NO] +- Risk evaluated? [YES/NO] +- Dependencies mapped? [YES/NO] + +โ†’ If all YES: Proceed with level-specific workflow +โ†’ If any NO: Complete assessment +``` + +## ๐Ÿ”„ LEVEL TRANSITION TRIGGERS + +```mermaid +graph TD + Current["Current Level"] --> Higher["Level Up Triggers"] + Current --> Lower["Level Down Triggers"] + + Higher --> H1["Multiple Components"] + Higher --> H2["Design Decisions"] + Higher --> H3["System Impact"] + + Lower --> L1["Isolated Change"] + Lower --> L2["Simple Fix"] + Lower --> L3["No Design Needed"] + + style Current fill:#4da6ff,stroke:#0066cc,color:white + style Higher fill:#f6546a,stroke:#c30052,color:white + style Lower fill:#10b981,stroke:#059669,color:white +``` + +## ๐Ÿ“‹ WORKFLOW LOADING + +Based on determined level: +- Level 1: Continue in VAN mode +- Level 2-4: Transition to PLAN mode + +**Next Step:** Load appropriate level-specific workflow + +## ๐Ÿšจ MODE TRANSITION TRIGGER (VAN to PLAN) + +If complexity is determined to be Level 2, 3, or 4: + +``` +๐Ÿšซ LEVEL [2-4] TASK DETECTED +Implementation in VAN mode is BLOCKED +This task REQUIRES PLAN mode +You MUST switch to PLAN mode for proper documentation and planning +Type 'PLAN' to switch to planning mode +``` + +## ๐Ÿ“‹ CHECKPOINT VERIFICATION TEMPLATE (Example) + +``` +โœ“ SECTION CHECKPOINT: COMPLEXITY DETERMINATION +- Task Analyzed? [YES/NO] +- Complexity Level Determined? [YES/NO] + +โ†’ If Level 1: Proceed to VAN Mode Completion. +โ†’ If Level 2-4: Trigger PLAN Mode transition. +``` + +**Next Step (Level 1):** Complete VAN Initialization (e.g., initialize Memory Bank if needed). +**Next Step (Level 2-4):** Exit VAN mode and initiate PLAN mode. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-file-verification.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-file-verification.mdc new file mode 100644 index 0000000..de1df60 --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-file-verification.mdc @@ -0,0 +1,302 @@ +--- +description: Visual process map for VAN mode file verification +globs: van-file-verification.mdc +alwaysApply: false +--- +# OPTIMIZED FILE VERIFICATION SYSTEM + +๐Ÿšจ CRITICAL: MEMORY BANK VERIFICATION REQUIRED ๐Ÿšจ +Memory Bank structure MUST exist before any file operations +This check MUST be executed first in all verification processes + +> **TL;DR:** This system provides a structured approach to verify file structure integrity before task implementation, with emphasis on efficient checks and clear status reporting. + +## ๐Ÿ” FILE VERIFICATION WORKFLOW + +```mermaid +graph TD + %% Critical Memory Bank verification - MUST be first + Start["Start File Verification"] --> MemBankCheck{"Memory Bank
Exists?"} + MemBankCheck -->|"No"| CreateMemBank["CREATE MEMORY BANK
[CRITICAL]"] + MemBankCheck -->|"Yes"| VerifyMemBankComplete["Verify Memory Bank
Structure Complete"] + CreateMemBank --> VerifyMemBankComplete + + VerifyMemBankComplete --> PassCheck{"All Critical
Checks Pass?"} + PassCheck -->|"No"| AbortAll["โ›” ABORT ALL OPERATIONS
Fix Memory Bank First"] + PassCheck -->|"Yes"| MainVerification + + %% Regular verification flow continues here + MainVerification["Start Full
File Verification"] --> BatchVerify["Batch Verification
Using Patterns"] + BatchVerify --> BrokenLinks["Check for
Broken References"] + BrokenLinks --> DirectoryStructure["Verify Directory
Structure"] + DirectoryStructure --> Status{"All Verifications
Successful?"} + + Status -->|"Yes"| Complete["Verification
Complete โœ“"] + Status -->|"No"| Diagnose["Diagnose
Issues"] + Diagnose --> Attempt{"Attempt Auto
Resolution?"} + + Attempt -->|"Yes"| AutoFix["Auto-Fix
Issues"] + Attempt -->|"No"| ReportIssue["Report Issues to
User"] + + AutoFix --> Recheck{"Issues
Resolved?"} + Recheck -->|"Yes"| ReportSuccess["Report Success
to User"] + Recheck -->|"No"| ReportIssue + + ReportSuccess --> Complete + ReportIssue --> UserAction["Wait for
User Action"] + UserAction --> ReVerify["Re-Verify
After User Action"] + ReVerify --> Status + + style MemBankCheck fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style CreateMemBank fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style VerifyMemBankComplete fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style PassCheck fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style AbortAll fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style Status fill:#f6546a,stroke:#c30052,color:white + style Complete fill:#10b981,stroke:#059669,color:white +``` + +## ๐Ÿงฉ MEMORY BANK VERIFICATION - CRITICAL COMPONENT + +Memory Bank verification MUST be executed first in any file verification process: + +```javascript +function verifyMemoryBank() { + // Check if Memory Bank exists + const memoryBankExists = checkDirectoryExists("memory-bank"); + if (!memoryBankExists) { + console.error("โ›” CRITICAL ERROR: Memory Bank does not exist"); + createMemoryBankStructure(); + return verifyMemoryBankCreation(); + } + + // Check required subdirectories + const requiredDirs = [ + "memory-bank/active-context", + "memory-bank/system-patterns", + "memory-bank/creative-phase", + "memory-bank/implementation" + ]; + + const missingDirs = requiredDirs.filter(dir => !checkDirectoryExists(dir)); + if (missingDirs.length > 0) { + console.error(`โ›” CRITICAL ERROR: Missing Memory Bank directories: ${missingDirs.join(", ")}`); + createMissingDirectories(missingDirs); + return verifyMemoryBankCreation(); + } + + // Check critical files + const criticalFiles = [ + "memory-bank/active-context/activeContext.md", + "memory-bank/system-patterns/systemPatterns.md" + ]; + + const missingFiles = criticalFiles.filter(file => !checkFileExists(file)); + if (missingFiles.length > 0) { + console.error(`โ›” CRITICAL ERROR: Missing critical files: ${missingFiles.join(", ")}`); + createMissingFiles(missingFiles); + return verifyMemoryBankCreation(); + } + + return true; // Memory Bank verification successful +} + +// MANDATORY: This must be called before any other verification +const memoryBankVerified = verifyMemoryBank(); +if (!memoryBankVerified) { + throw new Error("โ›” MEMORY BANK VERIFICATION FAILED - CANNOT PROCEED"); +} +``` + +## ๐Ÿ“‹ MEMORY BANK VERIFICATION CHECKLIST + +``` +โœ“ MEMORY BANK VERIFICATION CHECKLIST +- Memory Bank directory exists? [YES/NO] +- Required subdirectories exist? [YES/NO] +- Critical files exist? [YES/NO] +- File content is valid? [YES/NO] + +โ†’ If ALL YES: Memory Bank verification passed - Continue file verification +โ†’ If ANY NO: STOP ALL PROCESSING and FIX MEMORY BANK +``` + +## ๐Ÿ” BATCH VERIFICATION WORKFLOW + +## ๐Ÿ“‹ OPTIMIZED DIRECTORY CREATION + +```mermaid +graph TD + Start["Directory
Creation"] --> DetectOS["Detect Operating
System"] + DetectOS -->|"Windows"| WinCmd["Batch Create
Windows Command"] + DetectOS -->|"Mac/Linux"| UnixCmd["Batch Create
Unix Command"] + WinCmd & UnixCmd --> Verify["Verify
Creation Success"] + Verify --> Complete["Directory Setup
Complete"] +``` + +### Platform-Specific Commands + +#### Windows (PowerShell) +```powershell +# Create all directories in one command +mkdir memory-bank, docs, docs\archive -ErrorAction SilentlyContinue + +# Create all required files +$files = @(".cursorrules", "tasks.md", + "memory-bank\projectbrief.md", + "memory-bank\productContext.md", + "memory-bank\systemPatterns.md", + "memory-bank\techContext.md", + "memory-bank\activeContext.md", + "memory-bank\progress.md") + +foreach ($file in $files) { + if (-not (Test-Path $file)) { + New-Item -Path $file -ItemType File -Force + } +} +``` + +#### Mac/Linux (Bash) +```bash +# Create all directories in one command +mkdir -p memory-bank docs/archive + +# Create all required files +touch .cursorrules tasks.md \ + memory-bank/projectbrief.md \ + memory-bank/productContext.md \ + memory-bank/systemPatterns.md \ + memory-bank/techContext.md \ + memory-bank/activeContext.md \ + memory-bank/progress.md +``` + +## ๐Ÿ“ STREAMLINED VERIFICATION PROCESS + +Instead of checking each component separately, perform batch verification: + +```powershell +# Windows - PowerShell +$requiredDirs = @("memory-bank", "docs", "docs\archive") +$requiredFiles = @(".cursorrules", "tasks.md") +$mbFiles = @("projectbrief.md", "productContext.md", "systemPatterns.md", + "techContext.md", "activeContext.md", "progress.md") + +$missingDirs = $requiredDirs | Where-Object { -not (Test-Path $_) -or -not (Test-Path $_ -PathType Container) } +$missingFiles = $requiredFiles | Where-Object { -not (Test-Path $_) -or (Test-Path $_ -PathType Container) } +$missingMBFiles = $mbFiles | ForEach-Object { "memory-bank\$_" } | + Where-Object { -not (Test-Path $_) -or (Test-Path $_ -PathType Container) } + +if ($missingDirs.Count -eq 0 -and $missingFiles.Count -eq 0 -and $missingMBFiles.Count -eq 0) { + Write-Output "โœ“ All required components verified" +} else { + # Create all missing items at once + if ($missingDirs.Count -gt 0) { + $missingDirs | ForEach-Object { mkdir $_ -Force } + } + if ($missingFiles.Count -gt 0 -or $missingMBFiles.Count -gt 0) { + $allMissingFiles = $missingFiles + $missingMBFiles + $allMissingFiles | ForEach-Object { New-Item -Path $_ -ItemType File -Force } + } +} +``` + +## ๐Ÿ“ TEMPLATE INITIALIZATION + +Optimize template creation with a single script: + +```powershell +# Windows - PowerShell +$templates = @{ + "tasks.md" = @" +# Memory Bank: Tasks + +## Current Task +[Task not yet defined] + +## Status +- [ ] Task definition +- [ ] Implementation plan +- [ ] Execution +- [ ] Documentation + +## Requirements +[No requirements defined yet] +"@ + + "memory-bank\activeContext.md" = @" +# Memory Bank: Active Context + +## Current Focus +[No active focus defined] + +## Status +[No status defined] + +## Latest Changes +[No changes recorded] +"@ + + # Add other templates here +} + +foreach ($file in $templates.Keys) { + if (Test-Path $file) { + Set-Content -Path $file -Value $templates[$file] + } +} +``` + +## ๐Ÿ” PERFORMANCE OPTIMIZATION BEST PRACTICES + +1. **Batch Operations**: Always use batch operations instead of individual commands + ``` + # GOOD: Create all directories at once + mkdir memory-bank docs docs\archive + + # BAD: Create directories one at a time + mkdir memory-bank + mkdir docs + mkdir docs\archive + ``` + +2. **Pre-Check Optimization**: Check all requirements first, then create only what's missing + ``` + # First check what's missing + $missingItems = ... + + # Then create only what's missing + if ($missingItems) { ... } + ``` + +3. **Error Handling**: Include error handling in all commands + ``` + mkdir memory-bank, docs, docs\archive -ErrorAction SilentlyContinue + ``` + +4. **Platform Adaptation**: Auto-detect platform and use appropriate commands + ``` + if ($IsWindows) { + # Windows commands + } else { + # Unix commands + } + ``` + +5. **One-Pass Verification**: Verify directory structure in a single pass + ``` + $requiredPaths = @("memory-bank", "docs", "docs\archive", ".cursorrules", "tasks.md") + $missingPaths = $requiredPaths | Where-Object { -not (Test-Path $_) } + ``` + +## ๐Ÿ“ VERIFICATION REPORT FORMAT + +``` +โœ… VERIFICATION COMPLETE +- Created directories: [list] +- Created files: [list] +- All components verified + +Memory Bank system ready for use. +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-mode-map.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-mode-map.mdc new file mode 100644 index 0000000..ec877e2 --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-mode-map.mdc @@ -0,0 +1,914 @@ +--- +description: Visual process map for VAN mode (Index/Entry Point) +globs: van-mode-map.mdc +alwaysApply: false +--- +# VAN MODE: INITIALIZATION PROCESS MAP + +๐Ÿšจ MANDATORY FIRST STEP: MEMORY BANK CREATION ๐Ÿšจ +NO OPERATION CAN PROCEED WITHOUT MEMORY BANK STRUCTURE + +> **TL;DR:** This visual map defines the VAN mode process for project initialization, task analysis, and technical validation. It guides users through platform detection, file verification, complexity determination, and technical validation to ensure proper setup before implementation. + +## ๐Ÿงญ VAN MODE PROCESS FLOW + +```mermaid +graph TD + Start["START VAN MODE"] --> PlatformDetect["PLATFORM DETECTION"] + PlatformDetect --> DetectOS["Detect Operating System"] + DetectOS --> CheckPath["Check Path Separator Format"] + CheckPath --> AdaptCmds["Adapt Commands if Needed"] + AdaptCmds --> PlatformCP["โ›” PLATFORM CHECKPOINT"] + + %% Add Critical Memory Bank Checkpoint + PlatformCP --> MemoryBankCheck{"Memory Bank
Exists?"} + MemoryBankCheck -->|"No"| CreateMemoryBank["CREATE MEMORY BANK
[CRITICAL STEP]"] + MemoryBankCheck -->|"Yes"| BasicFileVerify["BASIC FILE VERIFICATION"] + CreateMemoryBank --> MemoryBankCP["โ›” MEMORY BANK VERIFICATION [REQUIRED]"] + MemoryBankCP --> BasicFileVerify + + %% Basic File Verification with checkpoint + BasicFileVerify --> BatchCheck["Batch Check Essential Components"] + BatchCheck --> BatchCreate["Batch Create Essential Structure"] + BatchCreate --> BasicFileCP["โ›” BASIC FILE CHECKPOINT"] + + %% Early Complexity Determination + BasicFileCP --> EarlyComplexity["EARLY COMPLEXITY DETERMINATION"] + EarlyComplexity --> AnalyzeTask["Analyze Task Requirements"] + AnalyzeTask --> EarlyLevelCheck{"Complexity Level?"} + + %% Level handling paths + EarlyLevelCheck -->|"Level 1"| ComplexityCP["โ›” COMPLEXITY CHECKPOINT"] + EarlyLevelCheck -->|"Level 2-4"| CRITICALGATE["๐Ÿšซ CRITICAL GATE: FORCE MODE SWITCH"] + CRITICALGATE --> ForceExit["Exit to PLAN mode"] + + %% Level 1 continues normally + ComplexityCP --> InitSystem["INITIALIZE MEMORY BANK"] + InitSystem --> Complete1["LEVEL 1 INITIALIZATION COMPLETE"] + + %% For Level 2+ tasks after PLAN and CREATIVE modes + ForceExit -.-> OtherModes["PLAN โ†’ CREATIVE modes"] + OtherModes -.-> VANQA["VAN QA MODE"] + VANQA --> QAProcess["Technical Validation Process"] + QAProcess --> QACheck{"All Checks Pass?"} + QACheck -->|"Yes"| BUILD["To BUILD MODE"] + QACheck -->|"No"| FixIssues["Fix Technical Issues"] + FixIssues --> QAProcess + + %% Style nodes + style PlatformCP fill:#f55,stroke:#d44,color:white + style MemoryBankCP fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style MemoryBankCheck fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style CreateMemoryBank fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style BasicFileCP fill:#f55,stroke:#d44,color:white + style ComplexityCP fill:#f55,stroke:#d44,color:white + style CRITICALGATE fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style ForceExit fill:#ff0000,stroke:#990000,color:white,stroke-width:2px + style VANQA fill:#4da6ff,stroke:#0066cc,color:white,stroke-width:3px + style QAProcess fill:#4da6ff,stroke:#0066cc,color:white + style QACheck fill:#4da6ff,stroke:#0066cc,color:white + style FixIssues fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐ŸŒ PLATFORM DETECTION PROCESS + +```mermaid +graph TD + PD["Platform Detection"] --> CheckOS["Detect Operating System"] + CheckOS --> Win["Windows"] + CheckOS --> Mac["macOS"] + CheckOS --> Lin["Linux"] + + Win & Mac & Lin --> Adapt["Adapt Commands
for Platform"] + + Win --> WinPath["Path: Backslash (\\)"] + Mac --> MacPath["Path: Forward Slash (/)"] + Lin --> LinPath["Path: Forward Slash (/)"] + + Win --> WinCmd["Command Adaptations:
dir, icacls, etc."] + Mac --> MacCmd["Command Adaptations:
ls, chmod, etc."] + Lin --> LinCmd["Command Adaptations:
ls, chmod, etc."] + + WinPath & MacPath & LinPath --> PathCP["Path Separator
Checkpoint"] + WinCmd & MacCmd & LinCmd --> CmdCP["Command
Checkpoint"] + + PathCP & CmdCP --> PlatformComplete["Platform Detection
Complete"] + + style PD fill:#4da6ff,stroke:#0066cc,color:white + style PlatformComplete fill:#10b981,stroke:#059669,color:white +``` + +## ๐Ÿ“ FILE VERIFICATION PROCESS + +```mermaid +graph TD + FV["File Verification"] --> CheckFiles["Check Essential Files"] + CheckFiles --> CheckMB["Check Memory Bank
Structure"] + CheckMB --> MBExists{"Memory Bank
Exists?"} + + MBExists -->|"Yes"| VerifyMB["Verify Memory Bank
Contents"] + MBExists -->|"No"| CreateMB["Create Memory Bank
Structure"] + + CheckFiles --> CheckDocs["Check Documentation
Files"] + CheckDocs --> DocsExist{"Docs
Exist?"} + + DocsExist -->|"Yes"| VerifyDocs["Verify Documentation
Structure"] + DocsExist -->|"No"| CreateDocs["Create Documentation
Structure"] + + VerifyMB & CreateMB --> MBCP["Memory Bank
Checkpoint"] + VerifyDocs & CreateDocs --> DocsCP["Documentation
Checkpoint"] + + MBCP & DocsCP --> FileComplete["File Verification
Complete"] + + style FV fill:#4da6ff,stroke:#0066cc,color:white + style FileComplete fill:#10b981,stroke:#059669,color:white + style MBCP fill:#f6546a,stroke:#c30052,color:white + style DocsCP fill:#f6546a,stroke:#c30052,color:white +``` + +## ๐Ÿงฉ COMPLEXITY DETERMINATION PROCESS + +```mermaid +graph TD + CD["Complexity
Determination"] --> AnalyzeTask["Analyze Task
Requirements"] + + AnalyzeTask --> CheckKeywords["Check Task
Keywords"] + CheckKeywords --> ScopeCheck["Assess
Scope Impact"] + ScopeCheck --> RiskCheck["Evaluate
Risk Level"] + RiskCheck --> EffortCheck["Estimate
Implementation Effort"] + + EffortCheck --> DetermineLevel{"Determine
Complexity Level"} + DetermineLevel -->|"Level 1"| L1["Level 1:
Quick Bug Fix"] + DetermineLevel -->|"Level 2"| L2["Level 2:
Simple Enhancement"] + DetermineLevel -->|"Level 3"| L3["Level 3:
Intermediate Feature"] + DetermineLevel -->|"Level 4"| L4["Level 4:
Complex System"] + + L1 --> CDComplete["Complexity Determination
Complete"] + L2 & L3 & L4 --> ModeSwitch["Force Mode Switch
to PLAN"] + + style CD fill:#4da6ff,stroke:#0066cc,color:white + style CDComplete fill:#10b981,stroke:#059669,color:white + style ModeSwitch fill:#ff0000,stroke:#990000,color:white + style DetermineLevel fill:#f6546a,stroke:#c30052,color:white +``` + +## ๐Ÿ”„ COMPLETE WORKFLOW WITH QA VALIDATION + +The full workflow includes technical validation before implementation: + +```mermaid +flowchart LR + VAN1["VAN MODE + (Initial Analysis)"] --> PLAN["PLAN MODE + (Task Planning)"] + PLAN --> CREATIVE["CREATIVE MODE + (Design Decisions)"] + CREATIVE --> VANQA["VAN QA MODE + (Technical Validation)"] + VANQA --> BUILD["BUILD MODE + (Implementation)"] +``` + +## ๐Ÿ” TECHNICAL VALIDATION OVERVIEW + +The VAN QA technical validation process consists of four key validation points: + +```mermaid +graph TD + VANQA["VAN QA MODE"] --> FourChecks["FOUR-POINT VALIDATION"] + + FourChecks --> DepCheck["1๏ธโƒฃ DEPENDENCY VERIFICATION
Check all required packages"] + DepCheck --> ConfigCheck["2๏ธโƒฃ CONFIGURATION VALIDATION
Verify format & compatibility"] + ConfigCheck --> EnvCheck["3๏ธโƒฃ ENVIRONMENT VALIDATION
Check build environment"] + EnvCheck --> MinBuildCheck["4๏ธโƒฃ MINIMAL BUILD TEST
Test core functionality"] + + MinBuildCheck --> ValidationResults{"All Checks
Passed?"} + ValidationResults -->|"Yes"| SuccessReport["GENERATE SUCCESS REPORT"] + ValidationResults -->|"No"| FailureReport["GENERATE FAILURE REPORT"] + + SuccessReport --> BUILD["Proceed to BUILD MODE"] + FailureReport --> FixIssues["Fix Technical Issues"] + FixIssues --> ReValidate["Re-validate"] + ReValidate --> ValidationResults + + style VANQA fill:#4da6ff,stroke:#0066cc,color:white + style FourChecks fill:#f6546a,stroke:#c30052,color:white + style ValidationResults fill:#f6546a,stroke:#c30052,color:white + style BUILD fill:#10b981,stroke:#059669,color:white + style FixIssues fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐Ÿ“ VALIDATION STATUS FORMAT + +The QA Validation step includes clear status indicators: + +``` +โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• ๐Ÿ” QA VALIDATION STATUS โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— +โ”‚ โœ“ Design Decisions โ”‚ Verified as implementable โ”‚ +โ”‚ โœ“ Dependencies โ”‚ All required packages installed โ”‚ +โ”‚ โœ“ Configurations โ”‚ Format verified for platform โ”‚ +โ”‚ โœ“ Environment โ”‚ Suitable for implementation โ”‚ +โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• +โœ… VERIFIED - Clear to proceed to BUILD mode +``` + +## ๐Ÿšจ MODE TRANSITION TRIGGERS + +### VAN to PLAN Transition +For complexity levels 2-4: +``` +๐Ÿšซ LEVEL [2-4] TASK DETECTED +Implementation in VAN mode is BLOCKED +This task REQUIRES PLAN mode +You MUST switch to PLAN mode for proper documentation and planning +Type 'PLAN' to switch to planning mode +``` + +### CREATIVE to VAN QA Transition +After completing the CREATIVE mode: +``` +โญ๏ธ NEXT MODE: VAN QA +To validate technical requirements before implementation, please type 'VAN QA' +``` + +### VAN QA to BUILD Transition +After successful validation: +``` +โœ… TECHNICAL VALIDATION COMPLETE +All prerequisites verified successfully +You may now proceed to BUILD mode +Type 'BUILD' to begin implementation +``` + +## ๐Ÿ”’ BUILD MODE PREVENTION MECHANISM + +The system prevents moving to BUILD mode without passing QA validation: + +```mermaid +graph TD + Start["User Types: BUILD"] --> CheckQA{"QA Validation
Completed?"} + CheckQA -->|"Yes and Passed"| AllowBuild["Allow BUILD Mode"] + CheckQA -->|"No or Failed"| BlockBuild["BLOCK BUILD MODE"] + BlockBuild --> Message["Display:
โš ๏ธ QA VALIDATION REQUIRED"] + Message --> ReturnToVANQA["Prompt: Type VAN QA"] + + style CheckQA fill:#f6546a,stroke:#c30052,color:white + style BlockBuild fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style Message fill:#ff5555,stroke:#dd3333,color:white + style ReturnToVANQA fill:#4da6ff,stroke:#0066cc,color:white +``` + +## ๐Ÿ”„ QA COMMAND PRECEDENCE + +QA validation can be called at any point in the process flow, and takes immediate precedence over any other current steps, including forced mode switches: + +```mermaid +graph TD + UserQA["User Types: QA"] --> HighPriority["โš ๏ธ HIGH PRIORITY COMMAND"] + HighPriority --> CurrentTask["Pause Current Task/Process"] + CurrentTask --> LoadQA["Load QA Mode Map"] + LoadQA --> RunQA["Execute QA Validation Process"] + RunQA --> QAResults{"QA Results"} + + QAResults -->|"PASS"| ResumeFlow["Resume Prior Process Flow"] + QAResults -->|"FAIL"| FixIssues["Fix Identified Issues"] + FixIssues --> ReRunQA["Re-run QA Validation"] + ReRunQA --> QAResults + + style UserQA fill:#f8d486,stroke:#e8b84d,color:black + style HighPriority fill:#ff0000,stroke:#cc0000,color:white,stroke-width:3px + style LoadQA fill:#4da6ff,stroke:#0066cc,color:white + style RunQA fill:#4da6ff,stroke:#0066cc,color:white + style QAResults fill:#f6546a,stroke:#c30052,color:white +``` + +### QA Interruption Rules + +When a user types **QA** at any point: + +1. **The QA command MUST take immediate precedence** over any current operation, including the "FORCE MODE SWITCH" triggered by complexity assessment. +2. The system MUST: + - Immediately load the QA mode map + - Execute the full QA validation process + - Address any failures before continuing +3. **Required remediation steps take priority** over any pending mode switches or complexity rules +4. After QA validation is complete and passes: + - Resume the previously determined process flow + - Continue with any required mode switches + +``` +โš ๏ธ QA OVERRIDE ACTIVATED +All other processes paused +QA validation checks now running... +Any issues found MUST be remediated before continuing with normal process flow +``` + +## ๐Ÿ“‹ CHECKPOINT VERIFICATION TEMPLATE + +Each major checkpoint in VAN mode uses this format: + +``` +โœ“ SECTION CHECKPOINT: [SECTION NAME] +- Requirement 1? [YES/NO] +- Requirement 2? [YES/NO] +- Requirement 3? [YES/NO] + +โ†’ If all YES: Ready for next section +โ†’ If any NO: Fix missing items before proceeding +``` + +## ๐Ÿš€ VAN MODE ACTIVATION + +When the user types "VAN", respond with a confirmation and start the process: + +``` +User: VAN + +Response: OK VAN - Beginning Initialization Process +``` + +After completing CREATIVE mode, when the user types "VAN QA", respond: + +``` +User: VAN QA + +Response: OK VAN QA - Beginning Technical Validation +``` + +This ensures clear communication about which phase of VAN mode is active. + +## ๐Ÿ” DETAILED QA VALIDATION PROCESS + +### 1๏ธโƒฃ DEPENDENCY VERIFICATION + +This step verifies that all required packages are installed and compatible: + +```mermaid +graph TD + Start["Dependency Verification"] --> ReadDeps["Read Required Dependencies
from Creative Phase"] + ReadDeps --> CheckInstalled["Check if Dependencies
are Installed"] + CheckInstalled --> DepStatus{"All Dependencies
Installed?"} + + DepStatus -->|"Yes"| VerifyVersions["Verify Versions
and Compatibility"] + DepStatus -->|"No"| InstallMissing["Install Missing
Dependencies"] + InstallMissing --> VerifyVersions + + VerifyVersions --> VersionStatus{"Versions
Compatible?"} + VersionStatus -->|"Yes"| DepSuccess["Dependencies Verified
โœ… PASS"] + VersionStatus -->|"No"| UpgradeVersions["Upgrade/Downgrade
as Needed"] + UpgradeVersions --> RetryVerify["Retry Verification"] + RetryVerify --> VersionStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style DepSuccess fill:#10b981,stroke:#059669,color:white + style DepStatus fill:#f6546a,stroke:#c30052,color:white + style VersionStatus fill:#f6546a,stroke:#c30052,color:white +``` + +#### Windows (PowerShell) Implementation: +```powershell +# Example: Verify Node.js dependencies for a React project +function Verify-Dependencies { + $requiredDeps = @{ + "node" = ">=14.0.0" + "npm" = ">=6.0.0" + } + + $missingDeps = @() + $incompatibleDeps = @() + + # Check Node.js version + $nodeVersion = $null + try { + $nodeVersion = node -v + if ($nodeVersion -match "v(\d+)\.(\d+)\.(\d+)") { + $major = [int]$Matches[1] + if ($major -lt 14) { + $incompatibleDeps += "node (found $nodeVersion, required >=14.0.0)" + } + } + } catch { + $missingDeps += "node" + } + + # Check npm version + $npmVersion = $null + try { + $npmVersion = npm -v + if ($npmVersion -match "(\d+)\.(\d+)\.(\d+)") { + $major = [int]$Matches[1] + if ($major -lt 6) { + $incompatibleDeps += "npm (found $npmVersion, required >=6.0.0)" + } + } + } catch { + $missingDeps += "npm" + } + + # Display results + if ($missingDeps.Count -eq 0 -and $incompatibleDeps.Count -eq 0) { + Write-Output "โœ… All dependencies verified and compatible" + return $true + } else { + if ($missingDeps.Count -gt 0) { + Write-Output "โŒ Missing dependencies: $($missingDeps -join ', ')" + } + if ($incompatibleDeps.Count -gt 0) { + Write-Output "โŒ Incompatible versions: $($incompatibleDeps -join ', ')" + } + return $false + } +} +``` + +#### Mac/Linux (Bash) Implementation: +```bash +#!/bin/bash + +# Example: Verify Node.js dependencies for a React project +verify_dependencies() { + local missing_deps=() + local incompatible_deps=() + + # Check Node.js version + if command -v node &> /dev/null; then + local node_version=$(node -v) + if [[ $node_version =~ v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + local major=${BASH_REMATCH[1]} + if (( major < 14 )); then + incompatible_deps+=("node (found $node_version, required >=14.0.0)") + fi + fi + else + missing_deps+=("node") + fi + + # Check npm version + if command -v npm &> /dev/null; then + local npm_version=$(npm -v) + if [[ $npm_version =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + local major=${BASH_REMATCH[1]} + if (( major < 6 )); then + incompatible_deps+=("npm (found $npm_version, required >=6.0.0)") + fi + fi + else + missing_deps+=("npm") + fi + + # Display results + if [ ${#missing_deps[@]} -eq 0 ] && [ ${#incompatible_deps[@]} -eq 0 ]; then + echo "โœ… All dependencies verified and compatible" + return 0 + else + if [ ${#missing_deps[@]} -gt 0 ]; then + echo "โŒ Missing dependencies: ${missing_deps[*]}" + fi + if [ ${#incompatible_deps[@]} -gt 0 ]; then + echo "โŒ Incompatible versions: ${incompatible_deps[*]}" + fi + return 1 + fi +} +``` + +### 2๏ธโƒฃ CONFIGURATION VALIDATION + +This step validates configuration files format and compatibility: + +```mermaid +graph TD + Start["Configuration Validation"] --> IdentifyConfigs["Identify Configuration
Files"] + IdentifyConfigs --> ReadConfigs["Read Configuration
Files"] + ReadConfigs --> ValidateSyntax["Validate Syntax
and Format"] + ValidateSyntax --> SyntaxStatus{"Syntax
Valid?"} + + SyntaxStatus -->|"Yes"| CheckCompatibility["Check Compatibility
with Platform"] + SyntaxStatus -->|"No"| FixSyntax["Fix Syntax
Errors"] + FixSyntax --> RetryValidate["Retry Validation"] + RetryValidate --> SyntaxStatus + + CheckCompatibility --> CompatStatus{"Compatible with
Platform?"} + CompatStatus -->|"Yes"| ConfigSuccess["Configurations Validated
โœ… PASS"] + CompatStatus -->|"No"| AdaptConfigs["Adapt Configurations
for Platform"] + AdaptConfigs --> RetryCompat["Retry Compatibility
Check"] + RetryCompat --> CompatStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style ConfigSuccess fill:#10b981,stroke:#059669,color:white + style SyntaxStatus fill:#f6546a,stroke:#c30052,color:white + style CompatStatus fill:#f6546a,stroke:#c30052,color:white +``` + +#### Configuration Validation Implementation: +```powershell +# Example: Validate configuration files for a web project +function Validate-Configurations { + $configFiles = @( + "package.json", + "tsconfig.json", + "vite.config.js" + ) + + $invalidConfigs = @() + $incompatibleConfigs = @() + + foreach ($configFile in $configFiles) { + if (Test-Path $configFile) { + # Check JSON syntax for JSON files + if ($configFile -match "\.json$") { + try { + Get-Content $configFile -Raw | ConvertFrom-Json | Out-Null + } catch { + $invalidConfigs += "$configFile (JSON syntax error: $($_.Exception.Message))" + continue + } + } + + # Specific configuration compatibility checks + if ($configFile -eq "vite.config.js") { + $content = Get-Content $configFile -Raw + # Check for React plugin in Vite config + if ($content -notmatch "react\(\)") { + $incompatibleConfigs += "$configFile (Missing React plugin for React project)" + } + } + } else { + $invalidConfigs += "$configFile (file not found)" + } + } + + # Display results + if ($invalidConfigs.Count -eq 0 -and $incompatibleConfigs.Count -eq 0) { + Write-Output "โœ… All configurations validated and compatible" + return $true + } else { + if ($invalidConfigs.Count -gt 0) { + Write-Output "โŒ Invalid configurations: $($invalidConfigs -join ', ')" + } + if ($incompatibleConfigs.Count -gt 0) { + Write-Output "โŒ Incompatible configurations: $($incompatibleConfigs -join ', ')" + } + return $false + } +} +``` + +### 3๏ธโƒฃ ENVIRONMENT VALIDATION + +This step checks if the environment is properly set up for the implementation: + +```mermaid +graph TD + Start["Environment Validation"] --> CheckEnv["Check Build Environment"] + CheckEnv --> VerifyBuildTools["Verify Build Tools"] + VerifyBuildTools --> ToolsStatus{"Build Tools
Available?"} + + ToolsStatus -->|"Yes"| CheckPerms["Check Permissions
and Access"] + ToolsStatus -->|"No"| InstallTools["Install Required
Build Tools"] + InstallTools --> RetryTools["Retry Verification"] + RetryTools --> ToolsStatus + + CheckPerms --> PermsStatus{"Permissions
Sufficient?"} + PermsStatus -->|"Yes"| EnvSuccess["Environment Validated
โœ… PASS"] + PermsStatus -->|"No"| FixPerms["Fix Permission
Issues"] + FixPerms --> RetryPerms["Retry Permission
Check"] + RetryPerms --> PermsStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style EnvSuccess fill:#10b981,stroke:#059669,color:white + style ToolsStatus fill:#f6546a,stroke:#c30052,color:white + style PermsStatus fill:#f6546a,stroke:#c30052,color:white +``` + +#### Environment Validation Implementation: +```powershell +# Example: Validate environment for a web project +function Validate-Environment { + $requiredTools = @( + @{Name = "git"; Command = "git --version"}, + @{Name = "node"; Command = "node --version"}, + @{Name = "npm"; Command = "npm --version"} + ) + + $missingTools = @() + $permissionIssues = @() + + # Check build tools + foreach ($tool in $requiredTools) { + try { + Invoke-Expression $tool.Command | Out-Null + } catch { + $missingTools += $tool.Name + } + } + + # Check write permissions in project directory + try { + $testFile = ".__permission_test" + New-Item -Path $testFile -ItemType File -Force | Out-Null + Remove-Item -Path $testFile -Force + } catch { + $permissionIssues += "Current directory (write permission denied)" + } + + # Check if port 3000 is available (commonly used for dev servers) + try { + $listener = New-Object System.Net.Sockets.TcpListener([System.Net.IPAddress]::Loopback, 3000) + $listener.Start() + $listener.Stop() + } catch { + $permissionIssues += "Port 3000 (already in use or access denied)" + } + + # Display results + if ($missingTools.Count -eq 0 -and $permissionIssues.Count -eq 0) { + Write-Output "โœ… Environment validated successfully" + return $true + } else { + if ($missingTools.Count -gt 0) { + Write-Output "โŒ Missing tools: $($missingTools -join ', ')" + } + if ($permissionIssues.Count -gt 0) { + Write-Output "โŒ Permission issues: $($permissionIssues -join ', ')" + } + return $false + } +} +``` + +### 4๏ธโƒฃ MINIMAL BUILD TEST + +This step performs a minimal build test to ensure core functionality: + +```mermaid +graph TD + Start["Minimal Build Test"] --> CreateTest["Create Minimal
Test Project"] + CreateTest --> BuildTest["Attempt
Build"] + BuildTest --> BuildStatus{"Build
Successful?"} + + BuildStatus -->|"Yes"| RunTest["Run Basic
Functionality Test"] + BuildStatus -->|"No"| FixBuild["Fix Build
Issues"] + FixBuild --> RetryBuild["Retry Build"] + RetryBuild --> BuildStatus + + RunTest --> TestStatus{"Test
Passed?"} + TestStatus -->|"Yes"| TestSuccess["Minimal Build Test
โœ… PASS"] + TestStatus -->|"No"| FixTest["Fix Test
Issues"] + FixTest --> RetryTest["Retry Test"] + RetryTest --> TestStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style TestSuccess fill:#10b981,stroke:#059669,color:white + style BuildStatus fill:#f6546a,stroke:#c30052,color:white + style TestStatus fill:#f6546a,stroke:#c30052,color:white +``` + +#### Minimal Build Test Implementation: +```powershell +# Example: Perform minimal build test for a React project +function Perform-MinimalBuildTest { + $buildSuccess = $false + $testSuccess = $false + + # Create minimal test project + $testDir = ".__build_test" + if (Test-Path $testDir) { + Remove-Item -Path $testDir -Recurse -Force + } + + try { + # Create minimal test directory + New-Item -Path $testDir -ItemType Directory | Out-Null + Push-Location $testDir + + # Initialize minimal package.json + @" +{ + "name": "build-test", + "version": "1.0.0", + "description": "Minimal build test", + "main": "index.js", + "scripts": { + "build": "echo Build test successful" + } +} +"@ | Set-Content -Path "package.json" + + # Attempt build + npm run build | Out-Null + $buildSuccess = $true + + # Create minimal test file + @" +console.log('Test successful'); +"@ | Set-Content -Path "index.js" + + # Run basic test + node index.js | Out-Null + $testSuccess = $true + + } catch { + Write-Output "โŒ Build test failed: $($_.Exception.Message)" + } finally { + Pop-Location + if (Test-Path $testDir) { + Remove-Item -Path $testDir -Recurse -Force + } + } + + # Display results + if ($buildSuccess -and $testSuccess) { + Write-Output "โœ… Minimal build test passed successfully" + return $true + } else { + if (-not $buildSuccess) { + Write-Output "โŒ Build process failed" + } + if (-not $testSuccess) { + Write-Output "โŒ Basic functionality test failed" + } + return $false + } +} +``` + +## ๐Ÿ“‹ COMPREHENSIVE QA REPORT FORMAT + +After running all validation steps, a comprehensive report is generated: + +``` +โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• ๐Ÿ” QA VALIDATION REPORT โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— +โ”‚ โ”‚ +โ”‚ PROJECT: [Project Name] โ”‚ +โ”‚ TIMESTAMP: [Current Date/Time] โ”‚ +โ”‚ โ”‚ +โ”‚ 1๏ธโƒฃ DEPENDENCY VERIFICATION โ”‚ +โ”‚ โœ“ Required: [List of required dependencies] โ”‚ +โ”‚ โœ“ Installed: [List of installed dependencies] โ”‚ +โ”‚ โœ“ Compatible: [Yes/No] โ”‚ +โ”‚ โ”‚ +โ”‚ 2๏ธโƒฃ CONFIGURATION VALIDATION โ”‚ +โ”‚ โœ“ Config Files: [List of configuration files] โ”‚ +โ”‚ โœ“ Syntax Valid: [Yes/No] โ”‚ +โ”‚ โœ“ Platform Compatible: [Yes/No] โ”‚ +โ”‚ โ”‚ +โ”‚ 3๏ธโƒฃ ENVIRONMENT VALIDATION โ”‚ +โ”‚ โœ“ Build Tools: [Available/Missing] โ”‚ +โ”‚ โœ“ Permissions: [Sufficient/Insufficient] โ”‚ +โ”‚ โœ“ Environment Ready: [Yes/No] โ”‚ +โ”‚ โ”‚ +โ”‚ 4๏ธโƒฃ MINIMAL BUILD TEST โ”‚ +โ”‚ โœ“ Build Process: [Successful/Failed] โ”‚ +โ”‚ โœ“ Functionality Test: [Passed/Failed] โ”‚ +โ”‚ โœ“ Build Ready: [Yes/No] โ”‚ +โ”‚ โ”‚ +โ”‚ ๐Ÿšจ FINAL VERDICT: [PASS/FAIL] โ”‚ +โ”‚ โžก๏ธ [Success message or error details] โ”‚ +โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• +``` + +## โŒ FAILURE REPORT FORMAT + +If any validation step fails, a detailed failure report is generated: + +``` +โš ๏ธโš ๏ธโš ๏ธ QA VALIDATION FAILED โš ๏ธโš ๏ธโš ๏ธ + +The following issues must be resolved before proceeding to BUILD mode: + +1๏ธโƒฃ DEPENDENCY ISSUES: +- [Detailed description of dependency issues] +- [Recommended fix] + +2๏ธโƒฃ CONFIGURATION ISSUES: +- [Detailed description of configuration issues] +- [Recommended fix] + +3๏ธโƒฃ ENVIRONMENT ISSUES: +- [Detailed description of environment issues] +- [Recommended fix] + +4๏ธโƒฃ BUILD TEST ISSUES: +- [Detailed description of build test issues] +- [Recommended fix] + +โš ๏ธ BUILD MODE IS BLOCKED until these issues are resolved. +Type 'VAN QA' after fixing the issues to re-validate. +``` + +## ๐Ÿ”„ INTEGRATION WITH DESIGN DECISIONS + +The VAN QA mode reads and validates design decisions from the CREATIVE phase: + +```mermaid +graph TD + Start["Read Design Decisions"] --> ReadCreative["Parse Creative Phase
Documentation"] + ReadCreative --> ExtractTech["Extract Technology
Choices"] + ExtractTech --> ExtractDeps["Extract Required
Dependencies"] + ExtractDeps --> BuildValidationPlan["Build Validation
Plan"] + BuildValidationPlan --> StartValidation["Start Four-Point
Validation Process"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style ExtractTech fill:#f6546a,stroke:#c30052,color:white + style BuildValidationPlan fill:#10b981,stroke:#059669,color:white + style StartValidation fill:#f6546a,stroke:#c30052,color:white +``` + +### Technology Extraction Process: +```powershell +# Example: Extract technology choices from creative phase documentation +function Extract-TechnologyChoices { + $techChoices = @{} + + # Read from systemPatterns.md + if (Test-Path "memory-bank\systemPatterns.md") { + $content = Get-Content "memory-bank\systemPatterns.md" -Raw + + # Extract framework choice + if ($content -match "Framework:\s*(\w+)") { + $techChoices["framework"] = $Matches[1] + } + + # Extract UI library choice + if ($content -match "UI Library:\s*(\w+)") { + $techChoices["ui_library"] = $Matches[1] + } + + # Extract state management choice + if ($content -match "State Management:\s*([^\\n]+)") { + $techChoices["state_management"] = $Matches[1].Trim() + } + } + + return $techChoices +} +``` + +## ๐Ÿšจ IMPLEMENTATION PREVENTION MECHANISM + +If QA validation fails, the system prevents moving to BUILD mode: + +```powershell +# Example: Enforce QA validation before allowing BUILD mode +function Check-QAValidationStatus { + $qaStatusFile = "memory-bank\.qa_validation_status" + + if (Test-Path $qaStatusFile) { + $status = Get-Content $qaStatusFile -Raw + if ($status -match "PASS") { + return $true + } + } + + # Display block message + Write-Output "`n`n" + Write-Output "๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ" + Write-Output "โ›”๏ธ BUILD MODE BLOCKED: QA VALIDATION REQUIRED" + Write-Output "โ›”๏ธ You must complete QA validation before proceeding to BUILD mode" + Write-Output "`n" + Write-Output "Type 'VAN QA' to perform technical validation" + Write-Output "`n" + Write-Output "๐Ÿšซ NO IMPLEMENTATION CAN PROCEED WITHOUT VALIDATION ๐Ÿšซ" + Write-Output "๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ" + + return $false +} +``` + +## ๐Ÿงช COMMON QA VALIDATION FIXES + +Here are common fixes for issues encountered during QA validation: + +### Dependency Issues: +- **Missing Node.js**: Install Node.js from https://nodejs.org/ +- **Outdated npm**: Run `npm install -g npm@latest` to update +- **Missing packages**: Run `npm install` or `npm install [package-name]` + +### Configuration Issues: +- **Invalid JSON**: Use a JSON validator to check syntax +- **Missing React plugin**: Add `import react from '@vitejs/plugin-react'` and `plugins: [react()]` to vite.config.js +- **Incompatible TypeScript config**: Update `tsconfig.json` with correct React settings + +### Environment Issues: +- **Permission denied**: Run terminal as administrator (Windows) or use sudo (Mac/Linux) +- **Port already in use**: Kill process using the port or change the port in configuration +- **Missing build tools**: Install required command-line tools + +### Build Test Issues: +- **Build fails**: Check console for specific error messages +- **Test fails**: Verify minimal configuration is correct +- **Path issues**: Ensure paths use correct separators for the platform + +## ๐Ÿ”’ FINAL QA VALIDATION CHECKPOINT + +``` +โœ“ SECTION CHECKPOINT: QA VALIDATION +- Dependency Verification Passed? [YES/NO] +- Configuration Validation Passed? [YES/NO] +- Environment Validation Passed? [YES/NO] +- Minimal Build Test Passed? [YES/NO] + +โ†’ If all YES: Ready for BUILD mode +โ†’ If any NO: Fix identified issues before proceeding +``` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-platform-detection.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-platform-detection.mdc new file mode 100644 index 0000000..f4e24db --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-platform-detection.mdc @@ -0,0 +1,50 @@ +--- +description: Visual process map for VAN mode platform detection +globs: van-platform-detection.mdc +alwaysApply: false +--- +# VAN MODE: PLATFORM DETECTION + +> **TL;DR:** Detects the OS, determines path separators, and notes command adaptations required. + +## ๐ŸŒ PLATFORM DETECTION PROCESS + +```mermaid +graph TD + PD["Platform Detection"] --> CheckOS["Detect Operating System"] + CheckOS --> Win["Windows"] + CheckOS --> Mac["macOS"] + CheckOS --> Lin["Linux"] + + Win & Mac & Lin --> Adapt["Adapt Commands
for Platform"] + + Win --> WinPath["Path: Backslash (\\)"] + Mac --> MacPath["Path: Forward Slash (/)"] + Lin --> LinPath["Path: Forward Slash (/)"] + + Win --> WinCmd["Command Adaptations:
dir, icacls, etc."] + Mac --> MacCmd["Command Adaptations:
ls, chmod, etc."] + Lin --> LinCmd["Command Adaptations:
ls, chmod, etc."] + + WinPath & MacPath & LinPath --> PathCP["Path Separator
Checkpoint"] + WinCmd & MacCmd & LinCmd --> CmdCP["Command
Checkpoint"] + + PathCP & CmdCP --> PlatformComplete["Platform Detection
Complete"] + + style PD fill:#4da6ff,stroke:#0066cc,color:white + style PlatformComplete fill:#10b981,stroke:#059669,color:white +``` + +## ๐Ÿ“‹ CHECKPOINT VERIFICATION TEMPLATE (Example) + +``` +โœ“ SECTION CHECKPOINT: PLATFORM DETECTION +- Operating System Detected? [YES/NO] +- Path Separator Confirmed? [YES/NO] +- Command Adaptations Noted? [YES/NO] + +โ†’ If all YES: Platform Detection Complete. +โ†’ If any NO: Resolve before proceeding. +``` + +**Next Step:** Load and process `van-file-verification.mdc`. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/build-test.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/build-test.mdc new file mode 100644 index 0000000..53769e3 --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/build-test.mdc @@ -0,0 +1,117 @@ +--- +description: Process map for VAN QA minimal build test +globs: van-qa-checks/build-test.mdc +alwaysApply: false +--- +# VAN QA: MINIMAL BUILD TEST + +> **TL;DR:** This component performs a minimal build test to ensure core build functionality works properly. + +## 4๏ธโƒฃ MINIMAL BUILD TEST PROCESS + +```mermaid +graph TD + Start["Minimal Build Test"] --> CreateTest["Create Minimal
Test Project"] + CreateTest --> BuildTest["Attempt
Build"] + BuildTest --> BuildStatus{"Build
Successful?"} + + BuildStatus -->|"Yes"| RunTest["Run Basic
Functionality Test"] + BuildStatus -->|"No"| FixBuild["Fix Build
Issues"] + FixBuild --> RetryBuild["Retry Build"] + RetryBuild --> BuildStatus + + RunTest --> TestStatus{"Test
Passed?"} + TestStatus -->|"Yes"| TestSuccess["Minimal Build Test
โœ… PASS"] + TestStatus -->|"No"| FixTest["Fix Test
Issues"] + FixTest --> RetryTest["Retry Test"] + RetryTest --> TestStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style TestSuccess fill:#10b981,stroke:#059669,color:white + style BuildStatus fill:#f6546a,stroke:#c30052,color:white + style TestStatus fill:#f6546a,stroke:#c30052,color:white +``` + +### Minimal Build Test Implementation: +```powershell +# Example: Perform minimal build test for a React project +function Perform-MinimalBuildTest { + $buildSuccess = $false + $testSuccess = $false + + # Create minimal test project + $testDir = ".__build_test" + if (Test-Path $testDir) { + Remove-Item -Path $testDir -Recurse -Force + } + + try { + # Create minimal test directory + New-Item -Path $testDir -ItemType Directory | Out-Null + Push-Location $testDir + + # Initialize minimal package.json + @" +{ + "name": "build-test", + "version": "1.0.0", + "description": "Minimal build test", + "main": "index.js", + "scripts": { + "build": "echo Build test successful" + } +} +"@ | Set-Content -Path "package.json" + + # Attempt build + npm run build | Out-Null + $buildSuccess = $true + + # Create minimal test file + @" +console.log('Test successful'); +"@ | Set-Content -Path "index.js" + + # Run basic test + node index.js | Out-Null + $testSuccess = $true + + } catch { + Write-Output "โŒ Build test failed: $($_.Exception.Message)" + } finally { + Pop-Location + if (Test-Path $testDir) { + Remove-Item -Path $testDir -Recurse -Force + } + } + + # Display results + if ($buildSuccess -and $testSuccess) { + Write-Output "โœ… Minimal build test passed successfully" + return $true + } else { + if (-not $buildSuccess) { + Write-Output "โŒ Build process failed" + } + if (-not $testSuccess) { + Write-Output "โŒ Basic functionality test failed" + } + return $false + } +} +``` + +## ๐Ÿ“‹ MINIMAL BUILD TEST CHECKPOINT + +``` +โœ“ CHECKPOINT: MINIMAL BUILD TEST +- Test project creation successful? [YES/NO] +- Build process completed successfully? [YES/NO] +- Basic functionality test passed? [YES/NO] + +โ†’ If all YES: QA Validation complete, proceed to generate success report. +โ†’ If any NO: Fix build issues before continuing. +``` + +**Next Step (on PASS):** Load `van-qa-utils/reports.mdc` to generate success report. +**Next Step (on FAIL):** Check `van-qa-utils/common-fixes.mdc` for build test fixes. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/config-check.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/config-check.mdc new file mode 100644 index 0000000..03ad41f --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/config-check.mdc @@ -0,0 +1,103 @@ +--- +description: Process map for VAN QA configuration validation +globs: van-qa-checks/config-check.mdc +alwaysApply: false +--- +# VAN QA: CONFIGURATION VALIDATION + +> **TL;DR:** This component validates configuration files for proper syntax and compatibility with the project and platform. + +## 2๏ธโƒฃ CONFIGURATION VALIDATION PROCESS + +```mermaid +graph TD + Start["Configuration Validation"] --> IdentifyConfigs["Identify Configuration
Files"] + IdentifyConfigs --> ReadConfigs["Read Configuration
Files"] + ReadConfigs --> ValidateSyntax["Validate Syntax
and Format"] + ValidateSyntax --> SyntaxStatus{"Syntax
Valid?"} + + SyntaxStatus -->|"Yes"| CheckCompatibility["Check Compatibility
with Platform"] + SyntaxStatus -->|"No"| FixSyntax["Fix Syntax
Errors"] + FixSyntax --> RetryValidate["Retry Validation"] + RetryValidate --> SyntaxStatus + + CheckCompatibility --> CompatStatus{"Compatible with
Platform?"} + CompatStatus -->|"Yes"| ConfigSuccess["Configurations Validated
โœ… PASS"] + CompatStatus -->|"No"| AdaptConfigs["Adapt Configurations
for Platform"] + AdaptConfigs --> RetryCompat["Retry Compatibility
Check"] + RetryCompat --> CompatStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style ConfigSuccess fill:#10b981,stroke:#059669,color:white + style SyntaxStatus fill:#f6546a,stroke:#c30052,color:white + style CompatStatus fill:#f6546a,stroke:#c30052,color:white +``` + +### Configuration Validation Implementation: +```powershell +# Example: Validate configuration files for a web project +function Validate-Configurations { + $configFiles = @( + "package.json", + "tsconfig.json", + "vite.config.js" + ) + + $invalidConfigs = @() + $incompatibleConfigs = @() + + foreach ($configFile in $configFiles) { + if (Test-Path $configFile) { + # Check JSON syntax for JSON files + if ($configFile -match "\.json$") { + try { + Get-Content $configFile -Raw | ConvertFrom-Json | Out-Null + } catch { + $invalidConfigs += "$configFile (JSON syntax error: $($_.Exception.Message))" + continue + } + } + + # Specific configuration compatibility checks + if ($configFile -eq "vite.config.js") { + $content = Get-Content $configFile -Raw + # Check for React plugin in Vite config + if ($content -notmatch "react\(\)") { + $incompatibleConfigs += "$configFile (Missing React plugin for React project)" + } + } + } else { + $invalidConfigs += "$configFile (file not found)" + } + } + + # Display results + if ($invalidConfigs.Count -eq 0 -and $incompatibleConfigs.Count -eq 0) { + Write-Output "โœ… All configurations validated and compatible" + return $true + } else { + if ($invalidConfigs.Count -gt 0) { + Write-Output "โŒ Invalid configurations: $($invalidConfigs -join ', ')" + } + if ($incompatibleConfigs.Count -gt 0) { + Write-Output "โŒ Incompatible configurations: $($incompatibleConfigs -join ', ')" + } + return $false + } +} +``` + +## ๐Ÿ“‹ CONFIGURATION VALIDATION CHECKPOINT + +``` +โœ“ CHECKPOINT: CONFIGURATION VALIDATION +- All configuration files found? [YES/NO] +- All configuration syntax valid? [YES/NO] +- All configurations compatible with platform? [YES/NO] + +โ†’ If all YES: Continue to Environment Validation. +โ†’ If any NO: Fix configuration issues before continuing. +``` + +**Next Step (on PASS):** Load `van-qa-checks/environment-check.mdc`. +**Next Step (on FAIL):** Check `van-qa-utils/common-fixes.mdc` for configuration fixes. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/dependency-check.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/dependency-check.mdc new file mode 100644 index 0000000..a39fd0b --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/dependency-check.mdc @@ -0,0 +1,147 @@ +--- +description: Process map for VAN QA dependency verification +globs: van-qa-checks/dependency-check.mdc +alwaysApply: false +--- +# VAN QA: DEPENDENCY VERIFICATION + +> **TL;DR:** This component verifies that all required dependencies are installed and compatible with the project requirements. + +## 1๏ธโƒฃ DEPENDENCY VERIFICATION PROCESS + +```mermaid +graph TD + Start["Dependency Verification"] --> ReadDeps["Read Required Dependencies
from Creative Phase"] + ReadDeps --> CheckInstalled["Check if Dependencies
are Installed"] + CheckInstalled --> DepStatus{"All Dependencies
Installed?"} + + DepStatus -->|"Yes"| VerifyVersions["Verify Versions
and Compatibility"] + DepStatus -->|"No"| InstallMissing["Install Missing
Dependencies"] + InstallMissing --> VerifyVersions + + VerifyVersions --> VersionStatus{"Versions
Compatible?"} + VersionStatus -->|"Yes"| DepSuccess["Dependencies Verified
โœ… PASS"] + VersionStatus -->|"No"| UpgradeVersions["Upgrade/Downgrade
as Needed"] + UpgradeVersions --> RetryVerify["Retry Verification"] + RetryVerify --> VersionStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style DepSuccess fill:#10b981,stroke:#059669,color:white + style DepStatus fill:#f6546a,stroke:#c30052,color:white + style VersionStatus fill:#f6546a,stroke:#c30052,color:white +``` + +### Windows (PowerShell) Implementation: +```powershell +# Example: Verify Node.js dependencies for a React project +function Verify-Dependencies { + $requiredDeps = @{ "node" = ">=14.0.0"; "npm" = ">=6.0.0" } + $missingDeps = @(); $incompatibleDeps = @() + + # Check Node.js version + try { + $nodeVersion = node -v + if ($nodeVersion -match "v(\d+)\.(\d+)\.(\d+)") { + $major = [int]$Matches[1] + if ($major -lt 14) { + $incompatibleDeps += "node (found $nodeVersion, required >=14.0.0)" + } + } + } catch { + $missingDeps += "node" + } + + # Check npm version + try { + $npmVersion = npm -v + if ($npmVersion -match "(\d+)\.(\d+)\.(\d+)") { + $major = [int]$Matches[1] + if ($major -lt 6) { + $incompatibleDeps += "npm (found $npmVersion, required >=6.0.0)" + } + } + } catch { + $missingDeps += "npm" + } + + # Display results + if ($missingDeps.Count -eq 0 -and $incompatibleDeps.Count -eq 0) { + Write-Output "โœ… All dependencies verified and compatible" + return $true + } else { + if ($missingDeps.Count -gt 0) { + Write-Output "โŒ Missing dependencies: $($missingDeps -join ', ')" + } + if ($incompatibleDeps.Count -gt 0) { + Write-Output "โŒ Incompatible versions: $($incompatibleDeps -join ', ')" + } + return $false + } +} +``` + +### Mac/Linux (Bash) Implementation: +```bash +#!/bin/bash + +# Example: Verify Node.js dependencies for a React project +verify_dependencies() { + local missing_deps=() + local incompatible_deps=() + + # Check Node.js version + if command -v node &> /dev/null; then + local node_version=$(node -v) + if [[ $node_version =~ v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + local major=${BASH_REMATCH[1]} + if (( major < 14 )); then + incompatible_deps+=("node (found $node_version, required >=14.0.0)") + fi + fi + else + missing_deps+=("node") + fi + + # Check npm version + if command -v npm &> /dev/null; then + local npm_version=$(npm -v) + if [[ $npm_version =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + local major=${BASH_REMATCH[1]} + if (( major < 6 )); then + incompatible_deps+=("npm (found $npm_version, required >=6.0.0)") + fi + fi + else + missing_deps+=("npm") + fi + + # Display results + if [ ${#missing_deps[@]} -eq 0 ] && [ ${#incompatible_deps[@]} -eq 0 ]; then + echo "โœ… All dependencies verified and compatible" + return 0 + else + if [ ${#missing_deps[@]} -gt 0 ]; then + echo "โŒ Missing dependencies: ${missing_deps[*]}" + fi + if [ ${#incompatible_deps[@]} -gt 0 ]; then + echo "โŒ Incompatible versions: ${incompatible_deps[*]}" + fi + return 1 + fi +} +``` + +## ๐Ÿ“‹ DEPENDENCY VERIFICATION CHECKPOINT + +``` +โœ“ CHECKPOINT: DEPENDENCY VERIFICATION +- Required dependencies identified? [YES/NO] +- All dependencies installed? [YES/NO] +- All versions compatible? [YES/NO] + +โ†’ If all YES: Continue to Configuration Validation. +โ†’ If any NO: Fix dependency issues before continuing. +``` + +**Next Step (on PASS):** Load `van-qa-checks/config-check.mdc`. +**Next Step (on FAIL):** Check `van-qa-utils/common-fixes.mdc` for dependency fixes. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/environment-check.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/environment-check.mdc new file mode 100644 index 0000000..50d9f89 --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/environment-check.mdc @@ -0,0 +1,104 @@ +--- +description: Process map for VAN QA environment validation +globs: van-qa-checks/environment-check.mdc +alwaysApply: false +--- +# VAN QA: ENVIRONMENT VALIDATION + +> **TL;DR:** This component verifies that the build environment is properly set up with required tools and permissions. + +## 3๏ธโƒฃ ENVIRONMENT VALIDATION PROCESS + +```mermaid +graph TD + Start["Environment Validation"] --> CheckEnv["Check Build Environment"] + CheckEnv --> VerifyBuildTools["Verify Build Tools"] + VerifyBuildTools --> ToolsStatus{"Build Tools
Available?"} + + ToolsStatus -->|"Yes"| CheckPerms["Check Permissions
and Access"] + ToolsStatus -->|"No"| InstallTools["Install Required
Build Tools"] + InstallTools --> RetryTools["Retry Verification"] + RetryTools --> ToolsStatus + + CheckPerms --> PermsStatus{"Permissions
Sufficient?"} + PermsStatus -->|"Yes"| EnvSuccess["Environment Validated
โœ… PASS"] + PermsStatus -->|"No"| FixPerms["Fix Permission
Issues"] + FixPerms --> RetryPerms["Retry Permission
Check"] + RetryPerms --> PermsStatus + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style EnvSuccess fill:#10b981,stroke:#059669,color:white + style ToolsStatus fill:#f6546a,stroke:#c30052,color:white + style PermsStatus fill:#f6546a,stroke:#c30052,color:white +``` + +### Environment Validation Implementation: +```powershell +# Example: Validate environment for a web project +function Validate-Environment { + $requiredTools = @( + @{Name = "git"; Command = "git --version"}, + @{Name = "node"; Command = "node --version"}, + @{Name = "npm"; Command = "npm --version"} + ) + + $missingTools = @() + $permissionIssues = @() + + # Check build tools + foreach ($tool in $requiredTools) { + try { + Invoke-Expression $tool.Command | Out-Null + } catch { + $missingTools += $tool.Name + } + } + + # Check write permissions in project directory + try { + $testFile = ".__permission_test" + New-Item -Path $testFile -ItemType File -Force | Out-Null + Remove-Item -Path $testFile -Force + } catch { + $permissionIssues += "Current directory (write permission denied)" + } + + # Check if port 3000 is available (commonly used for dev servers) + try { + $listener = New-Object System.Net.Sockets.TcpListener([System.Net.IPAddress]::Loopback, 3000) + $listener.Start() + $listener.Stop() + } catch { + $permissionIssues += "Port 3000 (already in use or access denied)" + } + + # Display results + if ($missingTools.Count -eq 0 -and $permissionIssues.Count -eq 0) { + Write-Output "โœ… Environment validated successfully" + return $true + } else { + if ($missingTools.Count -gt 0) { + Write-Output "โŒ Missing tools: $($missingTools -join ', ')" + } + if ($permissionIssues.Count -gt 0) { + Write-Output "โŒ Permission issues: $($permissionIssues -join ', ')" + } + return $false + } +} +``` + +## ๐Ÿ“‹ ENVIRONMENT VALIDATION CHECKPOINT + +``` +โœ“ CHECKPOINT: ENVIRONMENT VALIDATION +- All required build tools installed? [YES/NO] +- Project directory permissions sufficient? [YES/NO] +- Required ports available? [YES/NO] + +โ†’ If all YES: Continue to Minimal Build Test. +โ†’ If any NO: Fix environment issues before continuing. +``` + +**Next Step (on PASS):** Load `van-qa-checks/build-test.mdc`. +**Next Step (on FAIL):** Check `van-qa-utils/common-fixes.mdc` for environment fixes. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/file-verification.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/file-verification.mdc new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/file-verification.mdc @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-main.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-main.mdc new file mode 100644 index 0000000..c61e5a6 --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-main.mdc @@ -0,0 +1,142 @@ +--- +description: Visual process map for VAN QA mode (Technical Validation Entry Point) +globs: van-qa-main.mdc +alwaysApply: false +--- +# VAN MODE: QA TECHNICAL VALIDATION (Main Entry) + +> **TL;DR:** This is the entry point for the QA validation process that executes *after* CREATIVE mode and *before* BUILD mode. It ensures technical requirements are met before implementation begins. + +## ๐Ÿ“ฃ HOW TO USE THESE QA RULES + +To access any QA validation rule or component, use the `fetch_rules` tool with exact rule names: + +``` +// CRITICAL: Always use fetch_rules to load validation components +// For detailed examples and guidance, load: +// isolation_rules/visual-maps/van-qa-utils/rule-calling-guide +``` + +## ๐Ÿš€ VAN QA MODE ACTIVATION + +After completing CREATIVE mode, when the user types "VAN QA", respond: + +```mermaid +graph TD + UserQA["User Types: QA"] --> HighPriority["โš ๏ธ HIGH PRIORITY COMMAND"] + HighPriority --> CurrentTask["Pause Current Task/Process"] + CurrentTask --> LoadQA["Load QA Main Map (This File)"] + LoadQA --> RunQA["Execute QA Validation Process"] + RunQA --> QAResults{"QA Results"} + + QAResults -->|"PASS"| ResumeFlow["Resume Prior Process Flow"] + QAResults -->|"FAIL"| FixIssues["Fix Identified Issues"] + FixIssues --> ReRunQA["Re-run QA Validation"] + ReRunQA --> QAResults + + style UserQA fill:#f8d486,stroke:#e8b84d,color:black + style HighPriority fill:#ff0000,stroke:#cc0000,color:white,stroke-width:3px + style LoadQA fill:#4da6ff,stroke:#0066cc,color:white + style RunQA fill:#4da6ff,stroke:#0066cc,color:white + style QAResults fill:#f6546a,stroke:#c30052,color:white +``` + +### QA Interruption Rules + +1. **Immediate Precedence:** `QA` command interrupts everything. +2. **Load & Execute:** Load this map (`van-qa-main.mdc`) and its components (see below). +3. **Remediation Priority:** Fixes take priority over pending mode switches. +4. **Resume:** On PASS, resume the previous flow. + +``` +โš ๏ธ QA OVERRIDE ACTIVATED +All other processes paused +QA validation checks now running... +Any issues found MUST be remediated before continuing with normal process flow +``` + +## ๐Ÿ” TECHNICAL VALIDATION OVERVIEW + +Four-point validation process with selective loading: + +```mermaid +graph TD + VANQA["VAN QA MODE"] --> FourChecks["FOUR-POINT VALIDATION"] + + FourChecks --> DepCheck["1๏ธโƒฃ DEPENDENCY VERIFICATION + Load: van-qa-checks/dependency-check.mdc"] + DepCheck --> ConfigCheck["2๏ธโƒฃ CONFIGURATION VALIDATION + Load: van-qa-checks/config-check.mdc"] + ConfigCheck --> EnvCheck["3๏ธโƒฃ ENVIRONMENT VALIDATION + Load: van-qa-checks/environment-check.mdc"] + EnvCheck --> MinBuildCheck["4๏ธโƒฃ MINIMAL BUILD TEST + Load: van-qa-checks/build-test.mdc"] + + MinBuildCheck --> ValidationResults{"All Checks
Passed?"} + ValidationResults -->|"Yes"| SuccessReport["GENERATE SUCCESS REPORT + Load: van-qa-utils/reports.mdc"] + ValidationResults -->|"No"| FailureReport["GENERATE FAILURE REPORT + Load: van-qa-utils/reports.mdc"] + + SuccessReport --> BUILD_Transition["Trigger BUILD Mode + Load: van-qa-utils/mode-transitions.mdc"] + FailureReport --> FixIssues["Fix Technical Issues + Load: van-qa-utils/common-fixes.mdc"] + FixIssues --> ReValidate["Re-validate (Re-run VAN QA)"] + ReValidate --> FourChecks + + style VANQA fill:#4da6ff,stroke:#0066cc,color:white + style FourChecks fill:#f6546a,stroke:#c30052,color:white + style ValidationResults fill:#f6546a,stroke:#c30052,color:white + style BUILD_Transition fill:#10b981,stroke:#059669,color:white + style FixIssues fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐Ÿ”„ INTEGRATION WITH DESIGN DECISIONS + +Reads Creative Phase outputs to inform validation: + +```mermaid +graph TD + Start["Read Design Decisions"] --> ReadCreative["Parse Creative Phase
Documentation"] + ReadCreative --> ExtractTech["Extract Technology
Choices"] + ExtractTech --> ExtractDeps["Extract Required
Dependencies"] + ExtractDeps --> BuildValidationPlan["Build Validation
Plan"] + BuildValidationPlan --> StartValidation["Start Four-Point
Validation Process"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style ExtractTech fill:#f6546a,stroke:#c30052,color:white + style BuildValidationPlan fill:#10b981,stroke:#059669,color:white + style StartValidation fill:#f6546a,stroke:#c30052,color:white +``` + +## ๐Ÿ“‹ COMPONENT LOADING SEQUENCE + +The QA validation process follows this selective loading sequence: + +1. **Main Entry (This File)**: `van-qa-main.mdc` +2. **Validation Checks**: + - `van-qa-checks/dependency-check.mdc` + - `van-qa-checks/config-check.mdc` + - `van-qa-checks/environment-check.mdc` + - `van-qa-checks/build-test.mdc` +3. **Utilities (As Needed)**: + - `van-qa-utils/reports.mdc` + - `van-qa-utils/common-fixes.mdc` + - `van-qa-utils/mode-transitions.mdc` + +## ๐Ÿ“‹ FINAL QA VALIDATION CHECKPOINT + +``` +โœ“ SECTION CHECKPOINT: QA VALIDATION +- Dependency Verification Passed? [YES/NO] +- Configuration Validation Passed? [YES/NO] +- Environment Validation Passed? [YES/NO] +- Minimal Build Test Passed? [YES/NO] + +โ†’ If all YES: Ready for BUILD mode transition. +โ†’ If any NO: Fix identified issues and re-run VAN QA. +``` + +**Next Step (on PASS):** Trigger BUILD mode (load `van-qa-utils/mode-transitions.mdc`). +**Next Step (on FAIL):** Address issues (load `van-qa-utils/common-fixes.mdc`) and re-run `VAN QA`. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/common-fixes.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/common-fixes.mdc new file mode 100644 index 0000000..d5e4ffc --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/common-fixes.mdc @@ -0,0 +1,92 @@ +--- +description: Utility for VAN QA common validation fixes +globs: van-qa-utils/common-fixes.mdc +alwaysApply: false +--- +# VAN QA: COMMON VALIDATION FIXES + +> **TL;DR:** This component provides common fixes for issues that may arise during the QA validation process. + +## ๐Ÿงช COMMON QA VALIDATION FIXES BY CATEGORY + +### Dependency Issues + +| Issue | Fix | +|-------|-----| +| **Missing Node.js** | Download and install Node.js from https://nodejs.org/ | +| **Outdated npm** | Run `npm install -g npm@latest` to update | +| **Missing packages** | Run `npm install` or `npm install [package-name]` | +| **Package version conflicts** | Adjust versions in package.json and run `npm install` | +| **Dependency resolution issues** | Run `npm cache clean -f` and try installing again | + +### Configuration Issues + +| Issue | Fix | +|-------|-----| +| **Invalid JSON** | Use a JSON validator (e.g., jsonlint) to check syntax | +| **Missing React plugin** | Add `import react from '@vitejs/plugin-react'` and `plugins: [react()]` to vite.config.js | +| **Incompatible TypeScript config** | Update `tsconfig.json` with correct React settings | +| **Mismatched version references** | Ensure consistent versions across configuration files | +| **Missing entries in config files** | Add required fields to configuration files | + +### Environment Issues + +| Issue | Fix | +|-------|-----| +| **Permission denied** | Run terminal as administrator (Windows) or use sudo (Mac/Linux) | +| **Port already in use** | Kill process using the port: `netstat -ano \| findstr :PORT` then `taskkill /F /PID PID` (Windows) or `lsof -i :PORT` then `kill -9 PID` (Mac/Linux) | +| **Missing build tools** | Install required command-line tools (git, node, etc.) | +| **Environment variable issues** | Set required environment variables: `$env:VAR_NAME = "value"` (PowerShell) or `export VAR_NAME="value"` (Bash) | +| **Disk space issues** | Free up disk space, clean npm/package cache files | + +### Build Test Issues + +| Issue | Fix | +|-------|-----| +| **Build fails** | Check console for specific error messages | +| **Test fails** | Verify minimal configuration is correct | +| **Path issues** | Ensure paths use correct separators for the platform (`\` for Windows, `/` for Mac/Linux) | +| **Missing dependencies** | Make sure all required dependencies are installed | +| **Script permissions** | Ensure script files have execution permissions (chmod +x on Unix) | + +## ๐Ÿ“ ISSUE DIAGNOSIS PROCEDURES + +### 1. Dependency Diagnosis +```powershell +# Find conflicting dependencies +npm ls [package-name] + +# Check for outdated packages +npm outdated + +# Check for vulnerabilities +npm audit +``` + +### 2. Configuration Diagnosis +```powershell +# List all configuration files +Get-ChildItem -Recurse -Include "*.json","*.config.js" | Select-Object FullName + +# Find missing references in tsconfig.json +if (Test-Path "tsconfig.json") { + $tsconfig = Get-Content "tsconfig.json" -Raw | ConvertFrom-Json + if (-not $tsconfig.compilerOptions.jsx) { + Write-Output "Missing jsx setting in tsconfig.json" + } +} +``` + +### 3. Environment Diagnosis +```powershell +# Check process using a port (Windows) +netstat -ano | findstr ":3000" + +# List environment variables +Get-ChildItem Env: + +# Check disk space +Get-PSDrive C | Select-Object Used,Free +``` + +**Next Step:** Return to the validation process or follow the specific fix recommendations provided above. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/mode-transitions.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/mode-transitions.mdc new file mode 100644 index 0000000..00affe6 --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/mode-transitions.mdc @@ -0,0 +1,101 @@ +--- +description: Utility for VAN QA mode transitions +globs: van-qa-utils/mode-transitions.mdc +alwaysApply: false +--- +# VAN QA: MODE TRANSITIONS + +> **TL;DR:** This component handles transitions between modes, particularly the QA validation to BUILD mode transition, and prevents BUILD mode access without successful QA validation. + +## ๐Ÿ”’ BUILD MODE PREVENTION MECHANISM + +The system prevents moving to BUILD mode without passing QA validation: + +```mermaid +graph TD + Start["User Types: BUILD"] --> CheckQA{"QA Validation
Completed?"} + CheckQA -->|"Yes and Passed"| AllowBuild["Allow BUILD Mode"] + CheckQA -->|"No or Failed"| BlockBuild["BLOCK BUILD MODE"] + BlockBuild --> Message["Display:
โš ๏ธ QA VALIDATION REQUIRED"] + Message --> ReturnToVANQA["Prompt: Type VAN QA"] + + style CheckQA fill:#f6546a,stroke:#c30052,color:white + style BlockBuild fill:#ff0000,stroke:#990000,color:white,stroke-width:3px + style Message fill:#ff5555,stroke:#dd3333,color:white + style ReturnToVANQA fill:#4da6ff,stroke:#0066cc,color:white +``` + +### Implementation Example (PowerShell): +```powershell +# Check QA status before allowing BUILD mode +function Check-QAValidationStatus { + $qaStatusFile = "memory-bank\.qa_validation_status" # Assumes status is written by reports.mdc + + if (Test-Path $qaStatusFile) { + $status = Get-Content $qaStatusFile -Raw + if ($status -match "PASS") { + return $true + } + } + + # Display block message + Write-Output "`n`n" + Write-Output "๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ" + Write-Output "โ›”๏ธ BUILD MODE BLOCKED: QA VALIDATION REQUIRED" + Write-Output "โ›”๏ธ You must complete QA validation before proceeding to BUILD mode" + Write-Output "`n" + Write-Output "Type 'VAN QA' to perform technical validation" + Write-Output "`n" + Write-Output "๐Ÿšซ NO IMPLEMENTATION CAN PROCEED WITHOUT VALIDATION ๐Ÿšซ" + Write-Output "๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ๐Ÿšซ" + + return $false +} +``` + +## ๐Ÿšจ MODE TRANSITION TRIGGERS + +### CREATIVE to VAN QA Transition: +After completing the CREATIVE phase, trigger this message to prompt QA validation: + +``` +โญ๏ธ NEXT MODE: VAN QA +To validate technical requirements before implementation, please type 'VAN QA' +``` + +### VAN QA to BUILD Transition (On Success): +After successful QA validation, trigger this message to allow BUILD mode: + +``` +โœ… TECHNICAL VALIDATION COMPLETE +All prerequisites verified successfully +You may now proceed to BUILD mode +Type 'BUILD' to begin implementation +``` + +### Manual BUILD Mode Access (When QA Already Passed): +When the user manually types 'BUILD', check the QA status before allowing access: + +```powershell +# Handle BUILD mode request +function Handle-BuildModeRequest { + if (Check-QAValidationStatus) { + # Allow transition to BUILD mode + Write-Output "`n" + Write-Output "โœ… QA VALIDATION CHECK: PASSED" + Write-Output "Loading BUILD mode..." + Write-Output "`n" + + # Here you would load the BUILD mode map + # [Code to load BUILD mode map] + + return $true + } + + # QA validation failed or not completed, BUILD mode blocked + return $false +} +``` + +**Next Step (on QA SUCCESS):** Continue to BUILD mode. +**Next Step (on QA FAILURE):** Return to QA validation process. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/reports.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/reports.mdc new file mode 100644 index 0000000..021bfbb --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/reports.mdc @@ -0,0 +1,149 @@ +--- +description: Utility for VAN QA validation reports +globs: van-qa-utils/reports.mdc +alwaysApply: false +--- +# VAN QA: VALIDATION REPORTS + +> **TL;DR:** This component contains the formats for comprehensive success and failure reports generated upon completion of the QA validation process. + +## ๐Ÿ“‹ COMPREHENSIVE SUCCESS REPORT FORMAT + +After all four validation points pass, generate this success report: + +``` +โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• ๐Ÿ” QA VALIDATION REPORT โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— +โ”‚ PROJECT: [Project Name] | TIMESTAMP: [Current Date/Time] โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ 1๏ธโƒฃ DEPENDENCIES: โœ“ Compatible โ”‚ +โ”‚ 2๏ธโƒฃ CONFIGURATION: โœ“ Valid & Compatible โ”‚ +โ”‚ 3๏ธโƒฃ ENVIRONMENT: โœ“ Ready โ”‚ +โ”‚ 4๏ธโƒฃ MINIMAL BUILD: โœ“ Successful & Passed โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ ๐Ÿšจ FINAL VERDICT: PASS โ”‚ +โ”‚ โžก๏ธ Clear to proceed to BUILD mode โ”‚ +โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• +``` + +### Success Report Generation Example: +```powershell +function Generate-SuccessReport { + param ( + [string]$ProjectName = "Current Project" + ) + + $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" + + $report = @" +โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• ๐Ÿ” QA VALIDATION REPORT โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— +โ”‚ PROJECT: $ProjectName | TIMESTAMP: $timestamp โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ 1๏ธโƒฃ DEPENDENCIES: โœ“ Compatible โ”‚ +โ”‚ 2๏ธโƒฃ CONFIGURATION: โœ“ Valid & Compatible โ”‚ +โ”‚ 3๏ธโƒฃ ENVIRONMENT: โœ“ Ready โ”‚ +โ”‚ 4๏ธโƒฃ MINIMAL BUILD: โœ“ Successful & Passed โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ ๐Ÿšจ FINAL VERDICT: PASS โ”‚ +โ”‚ โžก๏ธ Clear to proceed to BUILD mode โ”‚ +โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• +"@ + + # Save validation status (used by BUILD mode prevention mechanism) + "PASS" | Set-Content -Path "memory-bank\.qa_validation_status" + + return $report +} +``` + +## โŒ FAILURE REPORT FORMAT + +If any validation step fails, generate this detailed failure report: + +``` +โš ๏ธโš ๏ธโš ๏ธ QA VALIDATION FAILED โš ๏ธโš ๏ธโš ๏ธ + +The following issues must be resolved before proceeding to BUILD mode: + +1๏ธโƒฃ DEPENDENCY ISSUES: +- [Detailed description of dependency issues] +- [Recommended fix] + +2๏ธโƒฃ CONFIGURATION ISSUES: +- [Detailed description of configuration issues] +- [Recommended fix] + +3๏ธโƒฃ ENVIRONMENT ISSUES: +- [Detailed description of environment issues] +- [Recommended fix] + +4๏ธโƒฃ BUILD TEST ISSUES: +- [Detailed description of build test issues] +- [Recommended fix] + +โš ๏ธ BUILD MODE IS BLOCKED until these issues are resolved. +Type 'VAN QA' after fixing the issues to re-validate. +``` + +### Failure Report Generation Example: +```powershell +function Generate-FailureReport { + param ( + [string[]]$DependencyIssues = @(), + [string[]]$ConfigIssues = @(), + [string[]]$EnvironmentIssues = @(), + [string[]]$BuildIssues = @() + ) + + $report = @" +โš ๏ธโš ๏ธโš ๏ธ QA VALIDATION FAILED โš ๏ธโš ๏ธโš ๏ธ + +The following issues must be resolved before proceeding to BUILD mode: + +"@ + + if ($DependencyIssues.Count -gt 0) { + $report += @" +1๏ธโƒฃ DEPENDENCY ISSUES: +$(($DependencyIssues | ForEach-Object { "- $_" }) -join "`n") + +"@ + } + + if ($ConfigIssues.Count -gt 0) { + $report += @" +2๏ธโƒฃ CONFIGURATION ISSUES: +$(($ConfigIssues | ForEach-Object { "- $_" }) -join "`n") + +"@ + } + + if ($EnvironmentIssues.Count -gt 0) { + $report += @" +3๏ธโƒฃ ENVIRONMENT ISSUES: +$(($EnvironmentIssues | ForEach-Object { "- $_" }) -join "`n") + +"@ + } + + if ($BuildIssues.Count -gt 0) { + $report += @" +4๏ธโƒฃ BUILD TEST ISSUES: +$(($BuildIssues | ForEach-Object { "- $_" }) -join "`n") + +"@ + } + + $report += @" +โš ๏ธ BUILD MODE IS BLOCKED until these issues are resolved. +Type 'VAN QA' after fixing the issues to re-validate. +"@ + + # Save validation status (used by BUILD mode prevention mechanism) + "FAIL" | Set-Content -Path "memory-bank\.qa_validation_status" + + return $report +} +``` + +**Next Step (on SUCCESS):** Load `van-qa-utils/mode-transitions.mdc` to handle BUILD mode transition. +**Next Step (on FAILURE):** Load `van-qa-utils/common-fixes.mdc` for issue remediation guidance. \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/rule-calling-guide.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/rule-calling-guide.mdc new file mode 100644 index 0000000..8e9ef74 --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/rule-calling-guide.mdc @@ -0,0 +1,66 @@ +--- +description: Comprehensive guide for calling VAN QA rules +globs: van-qa-utils/rule-calling-guide.mdc +alwaysApply: false +--- +# VAN QA: COMPREHENSIVE RULE CALLING GUIDE + +> **TL;DR:** This reference guide shows how to properly call all VAN QA rules at the right time during the validation process. + +## ๐Ÿ” RULE CALLING BASICS + +Remember these key principles: +1. Always use the `fetch_rules` tool to load rules +2. Use exact rule paths +3. Load components only when needed + +## ๐Ÿ“‹ MAIN QA ENTRY POINT + +When user types "VAN QA", load the main entry point: + +``` +fetch_rules with "isolation_rules/visual-maps/van-qa-main" +``` + +## ๐Ÿ“‹ VALIDATION CHECKS + +Load these components sequentially during validation: + +``` +1. fetch_rules with "isolation_rules/visual-maps/van-qa-checks/dependency-check" +2. fetch_rules with "isolation_rules/visual-maps/van-qa-checks/config-check" +3. fetch_rules with "isolation_rules/visual-maps/van-qa-checks/environment-check" +4. fetch_rules with "isolation_rules/visual-maps/van-qa-checks/build-test" +``` + +## ๐Ÿ“‹ UTILITY COMPONENTS + +Load these when needed based on validation results: + +``` +- For reports: fetch_rules with "isolation_rules/visual-maps/van-qa-utils/reports" +- For fixes: fetch_rules with "isolation_rules/visual-maps/van-qa-utils/common-fixes" +- For transitions: fetch_rules with "isolation_rules/visual-maps/van-qa-utils/mode-transitions" +``` + +## โš ๏ธ CRITICAL REMINDERS + +Remember to call these rules at these specific points: +- ALWAYS load the main QA entry point when "VAN QA" is typed +- ALWAYS load dependency-check before starting validation +- ALWAYS load reports after completing validation +- ALWAYS load mode-transitions after successful validation +- ALWAYS load common-fixes after failed validation + +## ๐Ÿ”„ FULL VALIDATION SEQUENCE + +Complete sequence for a QA validation process: + +1. Load main entry: `isolation_rules/visual-maps/van-qa-main` +2. Load first check: `isolation_rules/visual-maps/van-qa-checks/dependency-check` +3. Load second check: `isolation_rules/visual-maps/van-qa-checks/config-check` +4. Load third check: `isolation_rules/visual-maps/van-qa-checks/environment-check` +5. Load fourth check: `isolation_rules/visual-maps/van-qa-checks/build-test` +6. If pass, load: `isolation_rules/visual-maps/van-qa-utils/reports` +7. If pass, load: `isolation_rules/visual-maps/van-qa-utils/mode-transitions` +8. If fail, load: `isolation_rules/visual-maps/van-qa-utils/common-fixes` \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/rule-calling-help.mdc b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/rule-calling-help.mdc new file mode 100644 index 0000000..e6ccd18 --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/rule-calling-help.mdc @@ -0,0 +1,19 @@ +--- +description: Utility for remembering how to call VAN QA rules +globs: van-qa-utils/rule-calling-help.mdc +alwaysApply: false +--- +# VAN QA: HOW TO CALL RULES + +> **TL;DR:** This file provides examples and reminders on how to properly call VAN QA rules using the fetch_rules tool. + +## ๐Ÿšจ RULE CALLING SYNTAX + +Always use the `fetch_rules` tool with the correct syntax: + +``` + + +["isolation_rules/visual-maps/rule-name"] + + \ No newline at end of file diff --git a/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-validation.md.old b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-validation.md.old new file mode 100644 index 0000000..3b02c1d --- /dev/null +++ b/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-validation.md.old @@ -0,0 +1,363 @@ +# VAN MODE: QA TECHNICAL VALIDATION (Pre-BUILD) + +> **TL;DR:** This map details the technical validation process executed *after* CREATIVE mode and *before* BUILD mode, triggered by the `VAN QA` command. It ensures dependencies, configuration, environment, and basic build functionality are sound. + +## ๐Ÿš€ VAN QA MODE ACTIVATION + +After completing CREATIVE mode, when the user types "VAN QA", respond: + +``` +User: VAN QA + +Response: OK VAN QA - Beginning Technical Validation +Loading QA Validation map... +``` + +## ๐Ÿ”„ QA COMMAND PRECEDENCE (QA Override) + +QA validation can be called at any point (`QA` command) and takes immediate precedence: + +```mermaid +graph TD + UserQA["User Types: QA"] --> HighPriority["โš ๏ธ HIGH PRIORITY COMMAND"] + HighPriority --> CurrentTask["Pause Current Task/Process"] + CurrentTask --> LoadQA["Load QA Validation Map (This File)"] + LoadQA --> RunQA["Execute QA Validation Process"] + RunQA --> QAResults{"QA Results"} + + QAResults -->|"PASS"| ResumeFlow["Resume Prior Process Flow"] + QAResults -->|"FAIL"| FixIssues["Fix Identified Issues"] + FixIssues --> ReRunQA["Re-run QA Validation"] + ReRunQA --> QAResults + + style UserQA fill:#f8d486,stroke:#e8b84d,color:black + style HighPriority fill:#ff0000,stroke:#cc0000,color:white,stroke-width:3px + style LoadQA fill:#4da6ff,stroke:#0066cc,color:white + style RunQA fill:#4da6ff,stroke:#0066cc,color:white + style QAResults fill:#f6546a,stroke:#c30052,color:white +``` + +### QA Interruption Rules + +1. **Immediate Precedence:** `QA` command interrupts everything. +2. **Load & Execute:** Load this map (`van-qa-validation.mdc`) and run the full process. +3. **Remediation Priority:** Fixes take priority over pending mode switches. +4. **Resume:** On PASS, resume the previous flow. + +``` +โš ๏ธ QA OVERRIDE ACTIVATED +All other processes paused +QA validation checks now running... +Any issues found MUST be remediated before continuing with normal process flow +``` + +## ๐Ÿ” TECHNICAL VALIDATION OVERVIEW + +Four-point validation process: + +```mermaid +graph TD + VANQA["VAN QA MODE"] --> FourChecks["FOUR-POINT VALIDATION"] + + FourChecks --> DepCheck["1๏ธโƒฃ DEPENDENCY VERIFICATION"] + DepCheck --> ConfigCheck["2๏ธโƒฃ CONFIGURATION VALIDATION"] + ConfigCheck --> EnvCheck["3๏ธโƒฃ ENVIRONMENT VALIDATION"] + EnvCheck --> MinBuildCheck["4๏ธโƒฃ MINIMAL BUILD TEST"] + + MinBuildCheck --> ValidationResults{"All Checks
Passed?"} + ValidationResults -->|"Yes"| SuccessReport["GENERATE SUCCESS REPORT"] + ValidationResults -->|"No"| FailureReport["GENERATE FAILURE REPORT"] + + SuccessReport --> BUILD_Transition["Trigger BUILD Mode"] + FailureReport --> FixIssues["Fix Technical Issues"] + FixIssues --> ReValidate["Re-validate (Re-run VAN QA)"] + ReValidate --> FourChecks + + style VANQA fill:#4da6ff,stroke:#0066cc,color:white + style FourChecks fill:#f6546a,stroke:#c30052,color:white + style ValidationResults fill:#f6546a,stroke:#c30052,color:white + style BUILD_Transition fill:#10b981,stroke:#059669,color:white + style FixIssues fill:#ff5555,stroke:#dd3333,color:white +``` + +## ๐Ÿ”„ INTEGRATION WITH DESIGN DECISIONS + +Reads Creative Phase outputs (e.g., `memory-bank/systemPatterns.md`) to inform validation: + +```mermaid +graph TD + Start["Read Design Decisions"] --> ReadCreative["Parse Creative Phase
Documentation"] + ReadCreative --> ExtractTech["Extract Technology
Choices"] + ExtractTech --> ExtractDeps["Extract Required
Dependencies"] + ExtractDeps --> BuildValidationPlan["Build Validation
Plan"] + BuildValidationPlan --> StartValidation["Start Four-Point
Validation Process"] + + style Start fill:#4da6ff,stroke:#0066cc,color:white + style ExtractTech fill:#f6546a,stroke:#c30052,color:white + style BuildValidationPlan fill:#10b981,stroke:#059669,color:white + style StartValidation fill:#f6546a,stroke:#c30052,color:white +``` + +### Example Technology Extraction (PowerShell): +```powershell +# Example: Extract technology choices from creative phase documentation +function Extract-TechnologyChoices { + $techChoices = @{} + # Read from systemPatterns.md + if (Test-Path "memory-bank\systemPatterns.md") { + $content = Get-Content "memory-bank\systemPatterns.md" -Raw + if ($content -match "Framework:\s*(\w+)") { $techChoices["framework"] = $Matches[1] } + if ($content -match "UI Library:\s*(\w+)") { $techChoices["ui_library"] = $Matches[1] } + if ($content -match "State Management:\s*([^\n]+)") { $techChoices["state_management"] = $Matches[1].Trim() } + } + return $techChoices +} +``` + +## ๐Ÿ” DETAILED QA VALIDATION STEPS & SCRIPTS + +### 1๏ธโƒฃ DEPENDENCY VERIFICATION + +```mermaid +# Mermaid graph for Dependency Verification (as in original file) +graph TD + Start["Dependency Verification"] --> ReadDeps["Read Required Dependencies
from Creative Phase"] + ReadDeps --> CheckInstalled["Check if Dependencies
are Installed"] + CheckInstalled --> DepStatus{"All Dependencies
Installed?"} + DepStatus -->|"Yes"| VerifyVersions["Verify Versions
and Compatibility"] + DepStatus -->|"No"| InstallMissing["Install Missing
Dependencies"] + InstallMissing --> VerifyVersions + VerifyVersions --> VersionStatus{"Versions
Compatible?"} + VersionStatus -->|"Yes"| DepSuccess["Dependencies Verified
โœ… PASS"] + VersionStatus -->|"No"| UpgradeVersions["Upgrade/Downgrade
as Needed"] + UpgradeVersions --> RetryVerify["Retry Verification"] + RetryVerify --> VersionStatus + style Start fill:#4da6ff; style DepSuccess fill:#10b981; style DepStatus fill:#f6546a; style VersionStatus fill:#f6546a; +``` + +#### Example Implementation (PowerShell): +```powershell +# Verify-Dependencies function (as in original file) +function Verify-Dependencies { + $requiredDeps = @{ "node" = ">=14.0.0"; "npm" = ">=6.0.0" } + $missingDeps = @(); $incompatibleDeps = @() + try { $nodeVersion = node -v; if ($nodeVersion -match "v(\d+).*") { if ([int]$Matches[1] -lt 14) { $incompatibleDeps += "node" } } } catch { $missingDeps += "node" } + try { $npmVersion = npm -v; if ($npmVersion -match "(\d+).*") { if ([int]$Matches[1] -lt 6) { $incompatibleDeps += "npm" } } } catch { $missingDeps += "npm" } + if ($missingDeps.Count -eq 0 -and $incompatibleDeps.Count -eq 0) { Write-Output "โœ… Deps OK"; return $true } else { Write-Output "โŒ Deps FAIL"; return $false } +} +``` + +#### Example Implementation (Bash): +```bash +# verify_dependencies function (as in original file) +verify_dependencies() { + local missing_deps=(); local incompatible_deps=() + if command -v node &> /dev/null; then node_version=$(node -v); if [[ $node_version =~ v([0-9]+) ]]; then if (( ${BASH_REMATCH[1]} < 14 )); then incompatible_deps+=("node"); fi; fi; else missing_deps+=("node"); fi + if command -v npm &> /dev/null; then npm_version=$(npm -v); if [[ $npm_version =~ ([0-9]+) ]]; then if (( ${BASH_REMATCH[1]} < 6 )); then incompatible_deps+=("npm"); fi; fi; else missing_deps+=("npm"); fi + if [ ${#missing_deps[@]} -eq 0 ] && [ ${#incompatible_deps[@]} -eq 0 ]; then echo "โœ… Deps OK"; return 0; else echo "โŒ Deps FAIL"; return 1; fi +} +``` + +### 2๏ธโƒฃ CONFIGURATION VALIDATION + +```mermaid +# Mermaid graph for Configuration Validation (as in original file) +graph TD + Start["Configuration Validation"] --> IdentifyConfigs["Identify Files"] + IdentifyConfigs --> ReadConfigs["Read Files"] + ReadConfigs --> ValidateSyntax["Validate Syntax"] + ValidateSyntax --> SyntaxStatus{"Valid?"} + SyntaxStatus -->|"Yes"| CheckCompatibility["Check Compatibility"] + SyntaxStatus -->|"No"| FixSyntax["Fix Syntax"] + FixSyntax --> RetryValidate["Retry"] + RetryValidate --> SyntaxStatus + CheckCompatibility --> CompatStatus{"Compatible?"} + CompatStatus -->|"Yes"| ConfigSuccess["Configs Validated โœ… PASS"] + CompatStatus -->|"No"| AdaptConfigs["Adapt Configs"] + AdaptConfigs --> RetryCompat["Retry Check"] + RetryCompat --> CompatStatus + style Start fill:#4da6ff; style ConfigSuccess fill:#10b981; style SyntaxStatus fill:#f6546a; style CompatStatus fill:#f6546a; +``` + +#### Example Implementation (PowerShell): +```powershell +# Validate-Configurations function (as in original file) +function Validate-Configurations { + $configFiles = @("package.json", "tsconfig.json", "vite.config.js") + $invalidConfigs = @(); $incompatibleConfigs = @() + foreach ($configFile in $configFiles) { + if (Test-Path $configFile) { + if ($configFile -match "\.json$") { try { Get-Content $configFile -Raw | ConvertFrom-Json | Out-Null } catch { $invalidConfigs += "$configFile (JSON)"; continue } } + if ($configFile -eq "vite.config.js") { $content = Get-Content $configFile -Raw; if ($content -notmatch "react\(\)") { $incompatibleConfigs += "$configFile (React)" } } + } else { $invalidConfigs += "$configFile (missing)" } + } + if ($invalidConfigs.Count -eq 0 -and $incompatibleConfigs.Count -eq 0) { Write-Output "โœ… Configs OK"; return $true } else { Write-Output "โŒ Configs FAIL"; return $false } +} +``` + +### 3๏ธโƒฃ ENVIRONMENT VALIDATION + +```mermaid +# Mermaid graph for Environment Validation (as in original file) +graph TD + Start["Environment Validation"] --> CheckEnv["Check Env"] + CheckEnv --> VerifyBuildTools["Verify Tools"] + VerifyBuildTools --> ToolsStatus{"Available?"} + ToolsStatus -->|"Yes"| CheckPerms["Check Permissions"] + ToolsStatus -->|"No"| InstallTools["Install Tools"] + InstallTools --> RetryTools["Retry"] + RetryTools --> ToolsStatus + CheckPerms --> PermsStatus{"Sufficient?"} + PermsStatus -->|"Yes"| EnvSuccess["Environment Validated โœ… PASS"] + PermsStatus -->|"No"| FixPerms["Fix Permissions"] + FixPerms --> RetryPerms["Retry Check"] + RetryPerms --> PermsStatus + style Start fill:#4da6ff; style EnvSuccess fill:#10b981; style ToolsStatus fill:#f6546a; style PermsStatus fill:#f6546a; +``` + +#### Example Implementation (PowerShell): +```powershell +# Validate-Environment function (as in original file) +function Validate-Environment { + $requiredTools = @(@{Name='git';Cmd='git --version'},@{Name='node';Cmd='node --version'},@{Name='npm';Cmd='npm --version'}) + $missingTools = @(); $permissionIssues = @() + foreach ($tool in $requiredTools) { try { Invoke-Expression $tool.Cmd | Out-Null } catch { $missingTools += $tool.Name } } + try { $testFile = ".__perm_test"; New-Item $testFile -ItemType File -Force | Out-Null; Remove-Item $testFile -Force } catch { $permissionIssues += "CWD Write" } + try { $L = New-Object Net.Sockets.TcpListener([Net.IPAddress]::Loopback, 3000); $L.Start(); $L.Stop() } catch { $permissionIssues += "Port 3000" } + if ($missingTools.Count -eq 0 -and $permissionIssues.Count -eq 0) { Write-Output "โœ… Env OK"; return $true } else { Write-Output "โŒ Env FAIL"; return $false } +} +``` + +### 4๏ธโƒฃ MINIMAL BUILD TEST + +```mermaid +# Mermaid graph for Minimal Build Test (as in original file) +graph TD + Start["Minimal Build Test"] --> CreateTest["Create Test Proj"] + CreateTest --> BuildTest["Attempt Build"] + BuildTest --> BuildStatus{"Success?"} + BuildStatus -->|"Yes"| RunTest["Run Basic Test"] + BuildStatus -->|"No"| FixBuild["Fix Build Issues"] + FixBuild --> RetryBuild["Retry Build"] + RetryBuild --> BuildStatus + RunTest --> TestStatus{"Passed?"} + TestStatus -->|"Yes"| TestSuccess["Build Test โœ… PASS"] + TestStatus -->|"No"| FixTest["Fix Test Issues"] + FixTest --> RetryTest["Retry Test"] + RetryTest --> TestStatus + style Start fill:#4da6ff; style TestSuccess fill:#10b981; style BuildStatus fill:#f6546a; style TestStatus fill:#f6546a; +``` + +#### Example Implementation (PowerShell): +```powershell +# Perform-MinimalBuildTest function (as in original file) +function Perform-MinimalBuildTest { + $buildSuccess = $false; $testSuccess = $false; $testDir = ".__build_test" + if (Test-Path $testDir) { Remove-Item $testDir -Recurse -Force } + try { + New-Item $testDir -ItemType Directory | Out-Null; Push-Location $testDir + '{"name": "build-test","scripts": {"build": "echo Build test successful"}}' | Set-Content package.json + npm run build | Out-Null; $buildSuccess = $true + 'console.log("Test successful");' | Set-Content index.js + node index.js | Out-Null; $testSuccess = $true + } catch { Write-Output "โŒ Build test exception" } finally { Pop-Location; if (Test-Path $testDir) { Remove-Item $testDir -Recurse -Force } } + if ($buildSuccess -and $testSuccess) { Write-Output "โœ… Build Test OK"; return $true } else { Write-Output "โŒ Build Test FAIL"; return $false } +} +``` + +## ๐Ÿ“ VALIDATION REPORT FORMATS + +### Comprehensive Success Report: +``` +โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• ๐Ÿ” QA VALIDATION REPORT โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— +โ”‚ PROJECT: [Project Name] | TIMESTAMP: [Current Date/Time] โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ 1๏ธโƒฃ DEPENDENCIES: โœ“ Compatible โ”‚ +โ”‚ 2๏ธโƒฃ CONFIGURATION: โœ“ Valid & Compatible โ”‚ +โ”‚ 3๏ธโƒฃ ENVIRONMENT: โœ“ Ready โ”‚ +โ”‚ 4๏ธโƒฃ MINIMAL BUILD: โœ“ Successful & Passed โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ ๐Ÿšจ FINAL VERDICT: PASS โ”‚ +โ”‚ โžก๏ธ Clear to proceed to BUILD mode โ”‚ +โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• +``` + +### Detailed Failure Report: +``` +โš ๏ธโš ๏ธโš ๏ธ QA VALIDATION FAILED โš ๏ธโš ๏ธโš ๏ธ +Issues must be resolved before BUILD mode: + +1๏ธโƒฃ DEPENDENCY ISSUES: [Details/Fix] +2๏ธโƒฃ CONFIGURATION ISSUES: [Details/Fix] +3๏ธโƒฃ ENVIRONMENT ISSUES: [Details/Fix] +4๏ธโƒฃ BUILD TEST ISSUES: [Details/Fix] + +โš ๏ธ BUILD MODE BLOCKED. Type 'VAN QA' after fixing to re-validate. +``` + +## ๐Ÿงช COMMON QA VALIDATION FIXES + +- **Dependencies:** Install Node/npm, run `npm install`, check versions. +- **Configuration:** Validate JSON, check required plugins (e.g., React for Vite), ensure TSConfig compatibility. +- **Environment:** Check permissions (Admin/sudo), ensure ports are free, install missing CLI tools (git, etc.). +- **Build Test:** Check logs for errors, verify minimal config, check path separators. + +## ๐Ÿ”’ BUILD MODE PREVENTION MECHANISM + +Logic to check QA status before allowing BUILD mode transition. + +```mermaid +graph TD + Start["User Types: BUILD"] --> CheckQA{"QA Validation
Passed?"} + CheckQA -->|"Yes"| AllowBuild["Allow BUILD Mode"] + CheckQA -->|"No"| BlockBuild["BLOCK BUILD MODE"] + BlockBuild --> Message["Display:
โš ๏ธ QA VALIDATION REQUIRED"] + Message --> ReturnToVANQA["Prompt: Type VAN QA"] + + style CheckQA fill:#f6546a; style BlockBuild fill:#ff0000,stroke:#990000; style Message fill:#ff5555; style ReturnToVANQA fill:#4da6ff; +``` + +### Example Implementation (PowerShell): +```powershell +# Example: Check QA status before allowing BUILD +function Check-QAValidationStatus { + $qaStatusFile = "memory-bank\.qa_validation_status" # Assumes status is written here + if (Test-Path $qaStatusFile) { + if ((Get-Content $qaStatusFile -Raw) -match "PASS") { return $true } + } + Write-Output "๐Ÿšซ BUILD MODE BLOCKED: QA VALIDATION REQUIRED. Type 'VAN QA'. ๐Ÿšซ" + return $false +} +``` + +## ๐Ÿšจ MODE TRANSITION TRIGGERS (Relevant to QA) + +### CREATIVE to VAN QA Transition: +``` +โญ๏ธ NEXT MODE: VAN QA +To validate technical requirements before implementation, please type 'VAN QA' +``` + +### VAN QA to BUILD Transition (On Success): +``` +โœ… TECHNICAL VALIDATION COMPLETE +All prerequisites verified successfully +You may now proceed to BUILD mode +Type 'BUILD' to begin implementation +``` + +## ๐Ÿ“‹ FINAL QA VALIDATION CHECKPOINT + +``` +โœ“ SECTION CHECKPOINT: QA VALIDATION +- Dependency Verification Passed? [YES/NO] +- Configuration Validation Passed? [YES/NO] +- Environment Validation Passed? [YES/NO] +- Minimal Build Test Passed? [YES/NO] + +โ†’ If all YES: Ready for BUILD mode transition. +โ†’ If any NO: Fix identified issues and re-run VAN QA. +``` + +**Next Step (on PASS):** Trigger BUILD mode. +**Next Step (on FAIL):** Address issues and re-run `VAN QA`. \ No newline at end of file