Skip to content
Prompt

context-keeper — Cursor Rules

by redleaves

AI Summary

Context-Keeper is a Cursor rules booster that implements an intelligent memory and context management system with a structured coding execution framework emphasizing thinking before coding, user confirmation, and iterative quality assurance. It benefits developers who need better workflow discipline and context awareness when using Cursor AI.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "context-keeper — Cursor Rules" prompt rules to my project.
Repository: https://github.com/redleaves/context-keeper

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

🧠 LLM-Driven Intelligent Memory & Context Management System (AI记忆管理与智能上下文感知平台) AI记忆管理平台 | 智能上下文感知 | RAG检索增强生成 | 向量检索引擎

🎯 编程执行金字塔原则(执行编码之前一定要用户确认!!!)

` 🔧 执行编码 / \ ✅ 用户确认 🧪 完整验证 / \ 📋 详细设计 📊 质量保障 / \ 🤔 理清思路 🚀 高效迭代 / \ 🗂️ 业务逻辑链路 / 📈 依赖关系分析 ` 正确的执行顺序: ` 📈 依赖关系分析 → 🗂️ 业务逻辑链路 → 🤔 理清思路 → 📋 详细设计 → ✅ 用户确认 → 🔧 执行编码 → 🧪 完整验证 → 📊 质量保障 → 🚀 高效迭代 `

🌟 **核心原则 - MANDATORY**

• 🧠 思考先行 - THINK FIRST, CODE LATER • 任何编码前必须完整理清思路 • 分析业务逻辑链路、依赖关系、层次脉络 • 一次性设计完整,避免反复修改删除 • 🤝 用户确认 - USER AUTHORIZATION REQUIRED • 关键时机:详细设计完成后,执行编码前(必须!) • 确认内容:技术方案、修改范围、风险评估、执行计划 • 沟通原则:用户反馈问题时先定位分析,达成一致得到用户授权后再编码 • 严禁行为:未经用户授权直接修改任何代码或配置 • 🎯 质量优先 - QUALITY & EFFICIENCY • 完整验证流程确保代码质量 • 避免编译错误导致的冲动乱改 • 系统性思考,通篇考虑,精准修改 ---

🧩 **阶段1:问题分析与思路梳理 - ANALYSIS PHASE**

🔍 当用户提出问题/需求时,必须先完成: • 问题定位分析 ` 📌 具体问题是什么? 📌 涉及哪些代码模块? 📌 影响范围有多大? 📌 根本原因是什么? ` • 依赖关系梳理 ` 🔗 上游依赖:哪些模块会影响当前问题? 🔗 下游影响:修改会影响哪些功能? 🔗 横向关联:同层级有哪些相关组件? 🔗 配置依赖:需要哪些配置支持? ` • 业务逻辑链路分析 ` ➡️ 数据流向:从输入到输出的完整路径 ➡️ 调用链路:函数/服务间的调用关系 ➡️ 状态变化:系统状态如何流转 ➡️ 错误处理:异常情况的处理路径 `

📋 **阶段2:详细设计方案 - DESIGN PHASE**

🎨 输出完整的技术设计方案: • 修改范围说明 ` 📁 涉及文件:明确列出所有需要修改的文件 🔧 修改类型:新增/修改/删除/重构 ⏱️ 预估工作量:每个修改点的复杂度评估 ` • 技术实现方案 ` 🏗️ 架构调整:如何调整现有架构 💡 算法逻辑:核心算法的详细描述 🔌 接口设计:API/接口的变更说明 📊 数据结构:数据模型的变化 ` • 风险评估 ` ⚠️ 潜在风险:可能出现的问题 🛡️ 风险缓解:如何避免/处理风险 🔄 回滚方案:出现问题时的回退策略 `

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 3mo ago
Stale
Adoption100+ stars on GitHub
134 ★ · Growing
DocsREADME + description
Well-documented

GitHub Signals

Stars134
Forks5
Issues0
Updated3mo ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more