Layered loading and token optimization strategies
Significantly reduce token consumption through document hierarchies and smart loading mechanisms:
- Layered loading rules:Automatically selects documents based on the current mode:
- PLAN/REFLECT mode → Load
projectbrief.md
+progress.md
- IMPLEMENT mode → Load
techContext.md
+ documentation for related modules - VAN mode → Load only
projectbrief.md
- PLAN/REFLECT mode → Load
- Document compression tips:
- Using Markdown heading hierarchy (H2/H3) instead of long paragraphs
- Conversion of technical parameter tables into code block format
- exist
activeContext.md
Only the current mission-critical information is retained in the
- Regular maintenance recommendations:
- Monthly cleaning
progress.md
Obsolete records in - Move technical documents that are no longer changing into
archive/
subdirectories - utilization
#deprecated
Flagging Discarded Content
- Monthly cleaning
Empirical tests show that the use of hierarchical loading can reduce token consumption by 40-60%, which is especially suitable for complex projects running for a long time.
This answer comes from the articleCursor Memories: Provides persistent context memory for Cursors.The