feat(web): implement schedule editor in MaintenancePoliciesTab
CI / changes (push) Successful in 8s
CI / commitlint (push) Has been skipped
CI / openapi (push) Has been skipped
CI / web (push) Successful in 31s
CI / go (push) Successful in 51s
CI / bird2 (push) Successful in 15s
CI / release (push) Successful in 3m48s

Enhanced the MaintenancePoliciesTab by integrating a schedule editor for maintenance policies. Users can now select schedule modes, input custom cron expressions, and dynamically update the schedule preview. This update improves the user interface and experience for managing maintenance schedules.
This commit is contained in:
Denozordec
2026-06-12 18:40:22 +07:00
parent 132559cb8e
commit de64374c91
71 changed files with 15643 additions and 4 deletions
@@ -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<br>Check `tasks.md` & `reflection-[feature_id].md`"] -->
GatherDocs["2. Gather All Feature Documents<br>(Plan, Creative outputs, Reflection, Code links)"] -->
CreateArchiveFile["3. Create Feature Archive File<br>e.g., `memory-bank/archive/feature-[FeatureNameOrID]_YYYYMMDD.md`"] -->
PopulateArchive["4. Populate Archive File<br>(Using L3 Archive Template below)"] -->
VerifyLinks["5. Verify All Internal Links<br>in Archive File are Correct"] -->
FinalUpdateTasks["6. Final Update to `tasks.md`<br>(Mark Feature FULLY COMPLETED & ARCHIVED, link to archive file)"] -->
UpdateProgressFile["7. Add Final Entry to `progress.md`<br>(Note archiving & link to archive file)"] -->
ClearActiveCtx["8. Clear `activeContext.md`<br>Reset for Next Task/Project"] -->
ArchiveDone["L3 Archiving Complete<br>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.
@@ -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<br>(Tasks, Creative Docs, Style Guide)"] -->
SetupEnv["2. Setup/Verify Dev Environment<br>(Branch, Tools, Dependencies)"] -->
ModuleBreakdown["3. Break Down Feature into Modules/Major Components<br>(Based on plan in `tasks.md`)"] -->
BuildIterate["4. Implement Modules/Components Iteratively"]
BuildIterate --> ImplementModule["4a. Select Next Module/Component"]
ImplementModule --> CodeModule["4b. Code Module<br>(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<br>for this Feature?"}
MoreModules -- Yes --> ImplementModule
MoreModules -- No --> IntegrateModules["5. Integrate All Feature Modules/Components"]
IntegrateModules --> IntegrationTesting["6. Perform Integration Testing<br>(Feature modules + existing system parts)"]
IntegrationTesting --> E2EFeatureTesting["7. End-to-End Feature Testing<br>(Validate against user stories & requirements)"]
E2EFeatureTesting --> AccessibilityCheck["8. Accessibility & Responsiveness Check<br>(If UI is involved)"]
AccessibilityCheck --> CodeCleanup["9. Code Cleanup & Refinement"]
CodeCleanup --> UpdateMB["10. Update Memory Bank<br>(`tasks.md` sub-tasks, `progress.md` details)"]
UpdateMB --> FinalFeatureReview["11. Final Feature Review (Conceptual Peer Review if possible)"]
FinalFeatureReview --> ImplementationDone["L3 Implementation Complete<br>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.
@@ -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<br>Analysis"]
Req --> Comp["🔍 Component<br>Analysis"]
Comp --> Design["🎨 Design<br>Decisions"]
Design --> Impl["⚙️ Implementation<br>Strategy"]
Impl --> Test["🧪 Testing<br>Strategy"]
Test --> Doc["📚 Documentation<br>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<br>Assessment"]
Assess --> Down["Downgrade to<br>Level 1/2"]
Assess --> Up["Upgrade to<br>Level 4"]
Down --> L12Trigger["Triggers:<br>- Simpler than expected<br>- Limited scope<br>- Few components"]
Up --> L4Trigger["Triggers:<br>- System-wide impact<br>- Architectural changes<br>- High complexity"]
L12Trigger --> L12Switch["Switch to<br>Level 1/2 Workflow"]
L4Trigger --> L4Switch["Switch to<br>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<br>Required: Yes/No"]
Arch["🏗️ Architecture Design<br>Required: Yes/No"]
Algo["⚙️ Algorithm Design<br>Required: Yes/No"]
end
UI --> UITrig["Triggers:<br>- New UI Component<br>- UX Flow Change"]
Arch --> ArchTrig["Triggers:<br>- System Structure Change<br>- New Integration"]
Algo --> AlgoTrig["Triggers:<br>- Performance Critical<br>- 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<br>Complete"]
C["Components<br>Identified"]
D["Design Decisions<br>Made"]
I["Implementation<br>Plan Ready"]
T["Testing Strategy<br>Defined"]
Doc["Documentation<br>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<br>Implementation"]
Core --> UI["🎨 UI<br>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<br>Task"] --> PB["Comprehensive<br>projectbrief.md"]
L3 --> AC["Detailed<br>activeContext.md"]
L3 --> TM["Structured<br>tasks.md"]
L3 --> PM["Detailed<br>progress.md"]
PB & AC & TM & PM --> MB["Memory Bank<br>Integration"]
MB --> NextPhase["Proceed to<br>Implementation"]
```
## 🚨 PLANNING EFFICIENCY PRINCIPLE
Remember:
```
┌─────────────────────────────────────────────────────┐
│ Level 3 planning requires COMPREHENSIVE DESIGN but │
│ should avoid OVER-ENGINEERING. Focus on delivering │
│ maintainable, well-documented features. │
└─────────────────────────────────────────────────────┘
```
@@ -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<br>Did it meet all requirements from tasks.md? Was it successful?"] -->
AnalyzePlan["3. Analyze Planning Phase Effectiveness<br>Was planning-comprehensive.mdc guidance effective? Was the plan accurate? Scope creep?"] -->
AnalyzeCreative["4. Analyze Creative Phase(s) Effectiveness<br>Were design decisions sound? Did they translate well to implementation? Issues?"] -->
AnalyzeImpl["5. Analyze Implementation Phase<br>What went well? Challenges? Bottlenecks? Adherence to design/style guide?"] -->
AnalyzeTesting["6. Analyze Testing Phase<br>Were tests adequate? Bugs found post-release (if applicable)? Test coverage feel right?"] -->
IdentifyLessons["7. Identify Key Lessons Learned<br>(Technical, Process, Teamwork, Estimation)"] -->
ProposeImprovements["8. Propose Actionable Improvements<br>For future L3 feature development"] -->
DraftReflectionDoc["9. Draft `reflection-[feature_id].md`<br>Using structured template"] -->
FinalizeReflection["10. Finalize & Save Reflection Document"] -->
UpdateTasksStatus["11. Update `tasks.md`<br>Mark L3 Reflection Complete"] -->
ReflectionDone["L3 Reflection Complete<br>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.
@@ -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<br>Task Entry"]
Init --> Struct["🏗️ Create Task<br>Structure"]
Struct --> Track["📊 Progress<br>Tracking"]
Track --> Update["🔄 Regular<br>Updates"]
Update --> Complete["✅ Task<br>Completion"]
Struct --> Components["Components:"]
Components --> Req["Requirements"]
Components --> Steps["Implementation<br>Steps"]
Components --> Creative["Creative Phase<br>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<br>Defined"]
P2["✓ Components<br>Identified"]
P3["→ Creative Phase<br>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:<br>- task-tracking-intermediate.md<br>- planning-comprehensive.md"]
Current --> Required["Required Next:<br>- creative-phase-enforcement.md<br>- 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
```
@@ -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<br>(VAN Mode Output)"] -->
DocSetup["2. DOCUMENTATION SETUP"] -->
Plan["3. FEATURE PLANNING (PLAN Mode)"] -->
Creative["4. CREATIVE PHASES (CREATIVE Mode)"] -->
Impl["5. IMPLEMENTATION (BUILD 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<br>During PLAN or early BUILD"]
Assess --> Up["Upgrade to<br>Level 4?"]
Assess --> Down["Downgrade to<br>Level 2?"]
Assess --> MaintainL3["Maintain<br>Level 3"]
Up --> L4Trigger["Triggers:<br>- Unforeseen system-wide impact<br>- Requires deep architectural changes<br>- Scope significantly larger than planned"]
Down --> L2Trigger["Triggers:<br>- Feature simpler than anticipated<br>- Very limited component interaction<br>- No complex design decisions emerge"]
L4Trigger --> L4Switch["Stop L3 Workflow.<br>Re-initialize task as Level 4 (VAN).<br>Preserve existing docs as input."]
L2Trigger --> L2Switch["Adapt L3 Workflow:<br>Simplify remaining phases,<br>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`, `main.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<br>Setup"] --> LoadL3PlanTrack["Load L3 Planning & Tracking Rules<br>Level3/planning-comprehensive.mdc<br>Level3/task-tracking-intermediate.mdc"]
LoadL3PlanTrack --> UpdateBrief["Review/Update `projectbrief.md`<br>Ensure feature aligns with overall project goals"]
UpdateBrief --> UpdateActiveCtx["Update `activeContext.md`<br>Set focus to L3 Feature Planning"]
UpdateActiveCtx --> PrepTaskFile["Prepare `tasks.md` for<br>Comprehensive Feature Plan sections"]
PrepTaskFile --> DocSetupComplete["L3 Documentation<br>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<br>Planning"] --> ReqDef["Define Detailed<br>Requirements (Functional & Non-Functional)"]
ReqDef --> CompAnalysis["Component Analysis<br>(New & Affected Components, Interactions)"]
CompAnalysis --> ImplStrategy["Develop Implementation<br>Strategy & High-Level Steps"]
ImplStrategy --> DepRiskMgmt["Identify Dependencies,<br>Risks, & Mitigations"]
DepRiskMgmt --> CreativeFlag["Flag Aspects for<br>CREATIVE Mode (UI, Arch, Algo)"]
CreativeFlag --> UpdateTasks["Update `tasks.md` with<br>Full L3 Feature Plan"]
UpdateTasks --> PlanComplete["L3 Feature Planning<br>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<br>Phases (If Needed)"] --> SelectAspect["Select Flagged Aspect<br>from `tasks.md`"]
SelectAspect --> DesignExplore["Explore Design/Arch Options<br>(Use relevant creative-phase-*.mdc rules)"]
DesignExplore --> DecideDocument["Make & Document Decision<br>in `creative-[aspect_name].md`"]
DecideDocument --> UpdateTasksCreative["Update `tasks.md` with<br>Decision Summary & Link"]
UpdateTasksCreative --> MoreAspects{"More Flagged<br>Aspects?"}
MoreAspects -- Yes --> SelectAspect
MoreAspects -- No --> CreativeComplete["L3 Creative Phases<br>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 (BUILD Mode)
Guided by `visual-maps/build-mode-map.mdc` and `Level3/implementation-L3.mdc`.
```mermaid
graph TD
StartImpl["Begin L3 Feature<br>Implementation"] --> ReviewPlanDesign["Review Plan (`tasks.md`)<br>& Creative Docs (`creative-*.md`)"]
ReviewPlanDesign --> SetupDevEnv["Setup Dev Environment<br>(Branch, Dependencies, Tools)"]
SetupDevEnv --> BuildModules["Implement Feature Modules/Components<br>Iteratively or Sequentially"]
BuildModules --> UnitIntegrationTests["Conduct Unit & Integration Tests<br>for Each Module/Feature Part"]
UnitIntegrationTests --> StyleAdherence["Ensure Adherence to<br>`memory-bank/style-guide.md`"]
StyleAdherence --> UpdateProgressDocs["Regularly Update `tasks.md` (sub-tasks)<br>& `progress.md` (milestones)"]
UpdateProgressDocs --> E2EFeatureTest["End-to-End Feature Testing<br>Against Requirements"]
E2EFeatureTest --> ImplComplete["L3 Feature Implementation<br>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<br>Reflection"] --> ReviewCompleted["Review Completed Feature<br>(Code, Plan, Design Docs, Test Results)"]
ReviewCompleted --> AnalyzeProcess["Analyze Development Process<br>(Successes, Challenges, Deviations)"]
AnalyzeProcess --> DocumentLessons["Document Key Lessons Learned<br>(Technical & Process)"]
DocumentLessons --> AssessDesignChoices["Assess Effectiveness of<br>Creative Phase Decisions"]
AssessDesignChoices --> CreateReflectDoc["Create `reflection-[feature_id].md`"]
CreateReflectDoc --> UpdateTasksReflect["Update `tasks.md` (Reflection Complete)"]
UpdateTasksReflect --> ReflectComplete["L3 Feature Reflection<br>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<br>Archiving"] --> ConsolidateDocs["Consolidate All Feature Docs<br>(Plan, Creative, Reflection, Key Progress Notes)"]
ConsolidateDocs --> CreateArchiveSummary["Create Archive Summary Document<br>`archive/feature-[feature_id]_YYYYMMDD.md`"]
CreateArchiveSummary --> LinkDocs["Link to Detailed Docs<br>within Archive Summary"]
LinkDocs --> FinalUpdateTasks["Final Update to `tasks.md`<br>(Mark Feature COMPLETED & ARCHIVED)"]
FinalUpdateTasks --> ResetActiveCtx["Clear `activeContext.md`<br>Prepare for Next Task"]
ResetActiveCtx --> ArchiveComplete["L3 Feature Archiving<br>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.
```
```