能力标签
开源Cursor规则:Enforce architectural decisions in AI-assisted development
Cursor规则

开源Cursor规则:Enforce architectural decisions in AI-assisted development

基于 HTML · 提升 AI 辅助编程的代码质量与风格一致性
英文名:mneme
⭐ 9 Stars 💻 HTML 📄 MIT 🏷 AI 7.5分
7.5AI 综合评分
cursor_ruleadrai-agentai-agentsai-codingai-governancehtml
✦ AI Skill Hub 推荐

AI Skill Hub 推荐使用:开源Cursor规则:Enforce architectural decisions in AI-assisted development 是一款优质的Cursor规则。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的Cursor规则解决方案,这是一个值得深入了解的选择。

📚 深度解析

开源Cursor规则:Enforce architectural decisions in AI-assisted development 是专为 Cursor AI 代码编辑器设计的规则配置文件。Cursor Rules 是 Cursor 提供的一项功能,允许开发者在项目根目录放置 .cursorrules 文件(或在 Cursor Settings 中配置 Rules for AI),从而定制 AI 代码助手在该项目中的行为规范和输出风格。

使用 开源Cursor规则:Enforce architectural decisions in AI-assisted development 的核心价值在于提升代码质量的一致性。在没有规则约束的情况下,AI 生成的代码风格可能随机变化;而有了精心设计的 Cursor Rules,AI 会严格遵守你制定的编码规范,例如始终使用函数式组件而非类组件、命名必须使用驼峰命名法、注释只用中文等。

对于团队协作而言,将 .cursorrules 文件纳入 Git 版本管理,可以确保团队所有成员在使用 AI 辅助编程时遵循统一的规范,避免代码审查中因 AI 生成风格不一致带来的额外成本。AI Skill Hub 推荐将 Cursor Rules 作为新项目启动的标配步骤之一。

📋 工具概览

开源Cursor规则:Enforce architectural decisions in AI-assisted development 是一套专为 Cursor AI 代码编辑器定制的编程规范规则集。通过精心设计的规则约束,它能引导 AI 生成符合团队标准的高质量代码,减少人工审查成本,保障代码风格一致性。适合个人开发者快速提升代码质量,也适合团队统一 AI 辅助编程的规范。

GitHub Stars
⭐ 9
开发语言
HTML
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
MIT
AI 综合评分
7.5 分
工具类型
Cursor规则
Forks

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

开源Cursor规则:Enforce architectural decisions in AI-assisted development 是一套专为 Cursor AI 代码编辑器定制的编程规范规则集。通过精心设计的规则约束,它能引导 AI 生成符合团队标准的高质量代码,减少人工审查成本,保障代码风格一致性。适合个人开发者快速提升代码质量,也适合团队统一 AI 辅助编程的规范。

📌 核心特色
  • 深度定制 AI 代码助手在 Cursor 中的行为规范与输出风格
  • 内置特定语言或框架的编码最佳实践约束
  • 减少 AI 生成代码的人工审查成本,提升代码质量
  • 支持团队统一 AI 辅助编程规范,降低协作成本
  • 实时生效,无需重启 IDE,即改即用
🎯 主要使用场景
  • 为特定项目或技术栈指定 AI 代码风格和安全规范
  • 在多人协作项目中统一 AI 辅助编程的代码质量标准
  • 快速生成符合团队规范的代码,减少后期返工
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 在 Cursor 中安装规则
# 1. 打开 Cursor → Cmd+Shift+P
# 2. 搜索 "Open Cursor Settings" 或直接进入 Settings
# 3. 找到 "Rules for AI" / "Cursor Rules" 配置项
# 4. 粘贴本工具的规则内容

# 也可以克隆仓库后本地导入
git clone https://github.com/TheoV823/mneme
# 按照 README 中的说明添加规则文件
📋 安装步骤说明
  1. 打开 Cursor,进入 Settings(设置)
  2. 找到 Rules for AI 或 Cursor Rules 选项
  3. 将规则内容复制后粘贴到规则输入框中
  4. 保存设置,后续所有 AI 对话将自动应用此规则
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
mneme --help

# 基本运行
mneme [options] <input>

# 详细使用说明请查阅文档
# https://github.com/TheoV823/mneme
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# mneme 配置说明
# 查看配置选项
mneme --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export MNEME_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 75/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

# Mneme HQ

Architectural decisions, enforced on every AI call.

Mneme HQ is the architectural governance layer for AI-assisted development.

Mneme HQ — Governed Python Agent Demo

Governed Python Agent Demo · ADR Import Demo → · Request a pilot →

Current phase: Layer 1 — validation. Mechanism is frozen at commit e73ff7d. Local-repo, single-developer, project-scoped governance. Layer 2 (multi-repo, team sync, org policy distribution) is intentionally deferred. See docs/architecture/current-phase.md and docs/architecture/layer1-freeze-e73ff7d.md.

---

Requirements

  • Python 3.11+
  • anthropic >= 0.25.0
  • python-dotenv >= 1.0.0

That is the entire dependency list.

v0.4: Architectural compiler

Mneme HQ v0.4 compiles a versioned corpus of ADR markdown files into a deterministic active constraint set. ADRs are the source of truth; the compiler is the deterministic rule for turning them into the constraints the runtime injects.

ADR corpus  ->  parse  ->  validate  ->  resolve precedence
            ->  active constraint set  ->  Decision records  ->  runtime

Install with API extras

pip install -e ".[api]"

uvicorn app.api:app --reload ```

The flagship example

Task: "Should we rebuild the retrieval system from scratch with embeddings?"

WITHOUT Mneme HQ:

We could consider rebuilding the system with a vector database and embedding
model. This would improve semantic matching and scale better long-term.
Sentence-transformers is a good option for generating embeddings...

WITH Mneme HQ:

Do not rebuild from scratch. The project has an explicit rule to extend current
infrastructure before rebuilding (rule-001). Keyword scoring was chosen
intentionally -- it is deterministic, has no ML dependencies, and is easy to
debug. The team already declined adding sentence-transformers in v1. Extend
the current retriever instead.

Mneme HQ ALIGNMENT:

  [OK]   rule-001: Extend current infrastructure before rebuilding
  [OK]   rule-002: Keep v1 retrieval deterministic
  [OK]   anti-001: Do not use langchain
  [OK]   dec-001: Declined. Kept keyword scoring.
  alignment_score: 1.00

Same model. Same question. Different answer -- because it has the project's actual decisions.

Decision examples

Separate from items. Each one records a situation, what the project decided, and why:

{
  "task": "A contributor proposed adding sentence-transformers for semantic retrieval in v1.",
  "decision": "Declined. Kept keyword scoring.",
  "rationale": "Heavy ML dependency that breaks the pip-install-in-30-seconds contract."
}

These are injected as prior decisions so the model learns how your project reasons, not just what it decided.

Usage

from mneme.adr_compiler import compile_adrs, adrs_to_decisions
from mneme.decision_retriever import DecisionRetriever

decisions = adrs_to_decisions(compile_adrs("docs/adr"))
retriever = DecisionRetriever(decisions)

The bridge into the existing Decision schema means the runtime pipeline (retriever, conflict detector, context builder) consumes ADR-driven corpora without code changes.

---

Quickstart

```bash git clone https://github.com/TheoV823/mneme cd mneme/mneme-project-memory

Example: project_memory.json

The included example describes this repo itself. Abbreviated:

{
  "meta": {
    "name": "mneme-context-engine",
    "description": "Enforce architectural decisions on every LLM API call.",
    "version": "0.1.0"
  },
  "items": [
    {
      "id": "rule-001",
      "type": "rule",
      "title": "Extend current infrastructure before rebuilding",
      "content": "When adding capability, first ask whether an existing module can be extended.",
      "tags": ["architecture", "scope"],
      "priority": "high"
    },
    {
      "id": "anti-001",
      "type": "anti_pattern",
      "title": "Do not use langchain",
      "content": "langchain abstracts away the API surface this library is designed to control.",
      "tags": ["langchain", "forbidden"],
      "priority": "high"
    }
  ],
  "examples": [
    {
      "task": "A contributor proposed adding sentence-transformers for semantic retrieval in v1.",
      "decision": "Declined. Kept keyword scoring.",
      "rationale": "Heavy ML dependency. Breaks pip-install-in-30-seconds contract."
    }
  ]
}

The full file has 20 items and 5 decision examples. Edit it for your own project -- it is plain JSON, no tooling required.

Example with curl

curl -X POST http://127.0.0.1:8000/complete \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Should we rebuild from scratch?",
    "memory": "examples/project_memory.json"
  }'

Example response

{
  "answer": "No. Extend the current system rather than rebuilding it. Prior project rules favor reuse, narrow scope, and deterministic iteration in v1.",
  "context_summary": {
    "rules": 3,
    "constraints": 2,
    "facts": 4,
    "examples": 2
  }
}

Demo videos

Watch short demos of Mneme running in realistic AI-assisted development workflows:

For the full demo library, see mnemehq.com/demo or the YouTube channel.

---

What this repo demonstrates

A five-stage pipeline that runs locally in under two minutes:

project_memory.json -> MemoryStore -> Retriever -> ContextBuilder -> LLMAdapter -> Evaluator
  1. Load structured project memory from a human-editable JSON file
  2. Retrieve the rules and examples relevant to the current task
  3. Build a context packet and inject it into the system prompt
  4. Call the LLM (or dry-run without an API key)
  5. Evaluate whether the response followed your rules

The demo runs each task twice -- once without governance (baseline) and once with the decision corpus enforced -- so you can see the delta.

Quick demo

python -m mneme.cli list_decisions --memory examples/project_memory.json
python -m mneme.cli test_query --memory examples/project_memory.json --query "should I use Postgres?" --top 3
python demo.py --dry-run

---

Demo tasks

TaskWhat Mneme HQ catches
Rebuild from scratch?rule-001 (extend over rebuild), dec-001 (embeddings declined)
Broaden v1 scope?anti-002 (no agentic loops), rule-004 (narrow MVP)
Mix project + personal memory?rule-003 (separate project from personal), dec-002 (per-project only)

Edit .env: ANTHROPIC_API_KEY=sk-ant-...

bash

Core + API layer

pip install -e ".[api]"

bash

Set your Anthropic API key

cp .env.example .env

Run the before/after demo (live API calls)

python demo.py

Run without an API key (prints prompts, no API calls)

python demo.py --dry-run

Use Mneme HQ via API

Mneme HQ includes a minimal API layer so other workflows can call it directly.

Endpoint

POST /complete

Append a new decision (file write only — does not mutate a live Pipeline)

mneme add_decision --memory examples/project_memory.json \ --id adr-042 --decision "No GraphQL in v1" \ --scope api --constraint "REST only" --anti-pattern "introduce graphql"

🇨🇳 中文文档镜像 AI 翻译 2026-06-08
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

Mneme HQ 是一个用于 AI 协助开发的架构治理层。它通过强制执行每个 AI 调用的架构决策来实现这一点。

📋 环境依赖

Mneme HQ 需要 Python 3.11+、anthropic >= 0.25.0 和 python-dotenv >= 1.0.0 等依赖项。

🛠 安装步骤(Docker/pip/源码)

Mneme HQ v0.4 将版本化的 ADR markdown 文件编译成一个确定性的活跃约束集。可以使用 API extras 进行安装:pip install -e ".[api]" uvicorn app.api:app --reload

🚀 使用教程

Mneme HQ 的使用示例:通过它来回答问题,例如‘是否应该从头开始重建检索系统’。

⚙️ 配置说明(含 MCP / env)

Mneme HQ 的配置说明包括 MCP、env 和关键参数的设置。

🔌 API 说明

Mneme HQ 的 API 层提供了一个核心 API,通过 pip install -e ".[api]" 可以安装。

🔄 工作流/模块

Mneme HQ 的工作流包括添加新决策、编辑 .env 文件和设置 Anthropic API 密钥等步骤。

🎯 aiskill88 AI 点评 A 级 2026-05-26

该项目提供了一种强制执行架构决策的方式,提高了开发效率和质量,但其复杂度较高,需要仔细评估和使用。

📚 实用指南(长尾问题)
适合谁
  • 使用 Cursor 编辑器、希望提升 AI 编程效率的开发者
  • 构建多智能体协作系统的 Agent 开发者
  • 构建企业知识库 / RAG 检索应用的团队
最佳实践
  • 分块大小建议 256-512 tokens,向量库优选 pgvector 或 Qdrant
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
  • Cursor rules 控制在 80 行内,否则模型上下文成本会显著上升
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • embedding 模型与查询模型不一致导致检索失效
部署方案
  • CLI:直接 npm install -g / pip install,命令行调用
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
mneme 中文教程mneme 安装报错怎么办mneme Agent 工作流mneme 与同类工具对比mneme 最佳实践mneme 适合谁用

⚡ 核心功能

👥 适合谁
  • 使用 Cursor 编辑器、希望提升 AI 编程效率的开发者
  • 构建多智能体协作系统的 Agent 开发者
  • 构建企业知识库 / RAG 检索应用的团队
⭐ 最佳实践
  • 分块大小建议 256-512 tokens,向量库优选 pgvector 或 Qdrant
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
  • Cursor rules 控制在 80 行内,否则模型上下文成本会显著上升
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • embedding 模型与查询模型不一致导致检索失效

👥 适合人群

Cursor IDE 日常用户前端 / 后端 / 全栈开发者AI 辅助编程爱好者技术团队负责人

🎯 使用场景

  • 为特定项目或技术栈指定 AI 代码风格和安全规范
  • 在多人协作项目中统一 AI 辅助编程的代码质量标准
  • 快速生成符合团队规范的代码,减少后期返工

⚖️ 优点与不足

✅ 优点
  • +MIT 协议,可免费商用
  • +直接提升 AI 辅助编码质量
  • +零学习成本,立即生效
  • +高度可定制,适配各类项目
⚠️ 不足
  • 仅适用于 Cursor IDE,不支持其他编辑器
  • 规则效果高度依赖模型的理解能力
  • 需定期审查和维护规则内容
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐

📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

mneme 是一款HTML开发的AI辅助工具。开源Cursor规则:Enforce architectural decisions in AI-assisted development.。⭐9 · HTML 主要应用场景包括:用于强制在AI辅助开发中执行架构决策,提高开发效率和质量,适用于需要严格控制开发过程的项目。。
💡 AI Skill Hub 点评

总体来看,开源Cursor规则:Enforce architectural decisions in AI-assisted development 是一款质量良好的Cursor规则,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ MIT 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 开源Cursor规则:Enforce architectural decisions in AI-assisted development
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 mneme
原始描述 开源Cursor规则:Enforce architectural decisions in AI-assisted development.。⭐9 · HTML
Topics cursor_ruleadrai-agentai-agentsai-codingai-governancehtml
GitHub https://github.com/TheoV823/mneme
License MIT
语言 HTML
🔗 原始来源
🐙 GitHub 仓库  https://github.com/TheoV823/mneme 🌐 官方网站  https://mnemehq.com/

收录时间:2026-05-26 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。