module_manager

A Chinese-language rule-management system for Cursor, an AI coding editor. It organizes rule dependencies, controls when rules are active, loads modules, routes commands, and manages configuration.

In plain words
What is it for?
Managing Cursor rule modules, resolving their dependencies, activating rules based on context, routing module commands, and monitoring module status.
Why use it?
It helps coordinate a large collection of editor rules so they can be discovered, combined, activated, and kept from conflicting with one another.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/wangqiqi/cursor-ai-rules/module_manager
Clone the repo
git clone --depth 1 https://github.com/wangqiqi/cursor-ai-rules

Made for: Cursor.

Per session 3,445 This file is loaded in full into every session.
When invoked 3,445 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03445 $0.03445
Opus 5 $0.01723 $0.01723
Sonnet 5 $0.00689 $0.00689
Haiku 4.5 $0.00345 $0.00345

Measured 2d ago against content hash 5a967fee751a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

module_manager scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/system/module_manager.mdc · 453 lines

How it starts

The opening of the file, as written. The whole thing — 453 lines — stays where its author put it; the contents beside it link to each section on GitHub.

📋 规则管理系统 (Rule Management System)

版本: v4.3.0 | 最后更新: {{GENERATION_TIME}} | 作者: wangqiqi (https://github.com/wangqiqi)

🎯 核心使命 (Core Mission)

规则管理系统是.cursor规则体系的管理和协调中心,负责:

  • 智能规则编排:基于上下文自动组合和编排规则集
  • 规则依赖管理:维护规则间的引用关系和依赖层次
  • 激活控制机制:管理规则的启用、停用和条件激活
  • 系统协调功能:确保规则间的协作和冲突避免
  • 扩展机制支持:提供规则创建、集成和扩展的标准方法
  • 文档化管理:维护规则系统的完整文档和使用指南

🏛️ 系统架构 (System Architecture)

管理器组件 (Manager Components)

统一模块管理器 (Module Manager)
├── 🧠 智能编排器 (Smart Orchestrator)    # 智能规则组合和编排 ⭐ 新增
│   ├── 🎯 意图驱动编排 (Intent-Driven Orchestration) ⭐ 新增
│   ├── 📊 上下文感知编排 (Context-Aware Orchestration) ⭐ 新增
│   └── 🤖 自适应规则组合 (Adaptive Rule Composition) ⭐ 新增
├── 📦 模块注册表 (Module Registry)      # 模块元数据和状态管理
├── 🔍 模块发现器 (Module Discoverer)    # 自动发现可用模块
├── ⚖️ 依赖解析器 (Dependency Resolver)  # 解决模块依赖关系
├── 🚀 模块加载器 (Module Loader)        # 动态加载和初始化模块
├── 🎮 命令调度器 (Command Dispatcher)   # 路由和执行模块命令
├── 📊 性能监控器 (Performance Monitor)  # 监控模块性能指标
├── 🔧 配置管理器 (Configuration Manager)# 统一配置管理
└── 👤 用户界面 (User Interface)         # 配置和控制界面

数据流 (Data Flow)

graph TD
    A[用户请求] --> B[智能编排器]
    B --> C{意图检测?}
    C -->|是| D[意图驱动编排]
    C -->|否| E[上下文分析]
    D --> F[对话意图规则激活]
    E --> G[规则组合计算]
    F --> G
    G --> H[依赖解析]
    H --> I{依赖满足?}
    I -->|是| J[编排规则集]
    I -->|否| K[依赖优化]
    J --> L[命令调度器]

    M[conversation_intent_analyzer] --> F
    N[intelligent_evolution] --> E

意图驱动编排 (Intent-Driven Orchestration) ⭐ 新增

意图检测和规则激活 (Intent Detection & Rule Activation)
interface IntentDrivenOrchestrator {
  // 意图识别
  detectIntent(userInput: string): IntentAnalysis

  // 规则映射
  mapIntentToRules(intent: IntentAnalysis): RuleActivation[]

  // 优先级排序
  prioritizeRules(activations: RuleActivation[]): RuleActivation[]

  // 冲突解决
  resolveConflicts(activations: RuleActivation[]): RuleActivation[]
}
意图规则映射表 (Intent-Rule Mapping Table)
意图类型 置信度阈值 激活规则 优先级
creation + frontend >0.7 conversation_intent_analyzer, generator
creation + backend >0.7 conversation_intent_analyzer, templates
creation + ai_ml >0.8 conversation_intent_analyzer, intelligent_evolution
optimization >0.6 eslint, intelligent_evolution
analysis >0.6 system_info, intelligent_evolution
learning >0.5 i18n, conversation_intent_analyzer

Read the full file on GitHub · 453 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 453 lines · 3,445 tokens per session scan A 5a967fee751a

Subscribe to this mod's changes

module_manager is a cursor rule published in the GitHub repository wangqiqi/cursor-ai-rules (15 stars, last pushed 3mo ago), licensed MIT. It adds 3,445 tokens to every session, about $0.0172 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.