context-recorder-system

context-recorder-system is a cursor rule for coding agents from Mr-chen-05/rules-2.1-optimized. It costs 2,318 tokens per session, scanned A, original, MIT.

A modular system for recording project context, decisions, requirements, and lessons in structured files. It divides the recorder into core, template, advanced, and edge-case modules.

In plain words
What is it for?
Use it to capture project summaries, classify information, archive older context, track relationships, protect sensitive details, and manage large context files.
Why use it?
It helps preserve important project knowledge between tasks and reduces repeated work or lost decisions.

Cursor rule

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/mr-chen-05/rules-2.1-optimized/context-recorder-system
Clone the repo
git clone --depth 1 https://github.com/Mr-chen-05/rules-2.1-optimized

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-recorder-system

README.md
[![agentmods](https://agentmods.dev/badge/rules/mr-chen-05/rules-2.1-optimized/context-recorder-system.svg)](https://agentmods.dev/rules/mr-chen-05/rules-2.1-optimized/context-recorder-system)
Your own site
<a href="https://agentmods.dev/rules/mr-chen-05/rules-2.1-optimized/context-recorder-system"><img src="https://agentmods.dev/badge/rules/mr-chen-05/rules-2.1-optimized/context-recorder-system.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,318 This file is loaded in full into every session.
When invoked 2,318 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.02318 $0.02318
Opus 5 $0.01159 $0.01159
Sonnet 5 $0.00464 $0.00464
Haiku 4.5 $0.00232 $0.00232

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

Security

Grade A, and why

context-recorder-system 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 4d 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.

global-rules/context-recorder-system.mdc · 316 lines

How it starts

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

📝 Context Recorder System (记录员系统)

模块化架构: 为解决单文件过大问题 (原50k字符),系统已拆分为4个独立模块

🎯 系统概述

Context Recorder System (记录员系统) 是一个智能化的AI上下文管理系统,通过结构化记录确保:

  • 项目需求和决策的完整记录
  • 问题解决过程的经验积累
  • 重要信息的持续可访问性
  • 避免重复犯错和重复工作

📚 模块结构

系统采用模块化设计,分为以下4个核心模块:

1️⃣ 核心模块 (Core)

文件: context-recorder-core.mdc
优先级: 920 (最高)
字符数: ~15k

包含内容:

  • 角色定义和核心使命
  • 任务原子化(增量合并、快照归档)
  • 核心技能矩阵(语义抽取、高置信判定、稳健合并)
  • 数据保护规则和ID管理机制
  • 文件创建和指令路由
  • 触发条件矩阵
  • 与超级大脑系统集成

关键功能:

  • ✅ 自动语义抽取和信息分类
  • ✅ 高置信度判定机制
  • ✅ 增量合并和数据保护
  • ✅ Memory工具协同(可选,Recorder优先)

2️⃣ 模板模块 (Templates)

文件: context-recorder-templates.mdc
优先级: 918
字符数: ~12k

包含内容:

  • project.context.md 标准模板
  • context.archive*.md 标准模板(带编号的多归档系统)
  • 归档文件管理规则
  • 多归档文件管理机制(archive0, archive1, archive2...)
  • 归档生命周期管理
  • 文档元数据标准
  • 输出格式规范

关键功能:

  • ✅ 标准化项目上下文模板
  • ✅ 智能归档配置
  • ✅ 多文件归档管理
  • ✅ 归档索引和溯源

3️⃣ 高级功能模块 (Advanced)

文件: context-recorder-advanced.mdc
优先级: 917
字符数: ~12k

包含内容:

  • 智能化增强功能
  • 项目类型自动识别
  • 智能标签系统
  • 质量评分机制
  • 关联关系管理
  • 性能优化(大文件处理、缓存机制)
  • 并发安全机制
  • 错误恢复与回滚
  • 敏感信息保护
  • 监控和告警
  • 插件和扩展

关键功能:

  • ✅ 自动项目类型识别
  • ✅ 智能质量评分(0-100分)
  • ✅ 三级缓存策略
  • ✅ 并发安全和文件锁
  • ✅ 敏感信息脱敏

4️⃣ 边界情况模块 (Edge Cases)

文件: context-recorder-edge-cases.mdc
优先级: 916
字符数: ~11k

包含内容:

  • 字符编码处理
  • 时间戳精度管理
  • 特殊字符处理
  • 大文件处理策略
  • 并发访问处理
  • 备份和恢复机制
  • 日志记录完整性
  • 缓存管理
  • 数据验证框架
  • 完整性检查
  • 异常场景处理

关键功能:

  • ✅ 多编码格式支持
  • ✅ 特殊字符转义
  • ✅ 大文件分块处理
  • ✅ 自动备份和恢复
  • ✅ 异常场景优雅降级

🚀 快速使用

系统激活

记录员系统通过超级大脑系统自动激活,不提供独立激活入口:

用户: "启动超级大脑系统"
AI: 自动激活记录员系统并创建项目上下文文件

常用命令

/record         - 手动触发增量合并
/archive        - 手动触发快照归档
/record-status  - 查看当前记录状态
/rollback       - 回滚最后一次操作
/init-project   - 强制重新创建项目文件

自动触发

自动记录触发:
    - Git提交完成后
    - 重要决策确认后
    - 模块开发完成后
    - 问题解决完成后

自动归档触发:
  - 文件大小 > 2.9MB
  - 记录数 > 150条
  - 时间跨度 > 14天
  - 项目阶段切换

📋 核心特性

🎯 智能记录

  • 语义抽取: 自动识别Facts/Decisions/TODO/Done/Notes
  • 高置信判定: 弱化词自动降级,确保信息准确性
  • 触发词识别: 基于上下文的智能分类

Read the full file on GitHub · 316 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. 4d ago First seen · 316 lines · 2,318 tokens per session scan A 3c97c504f672

Subscribe to this mod's changes

context-recorder-system is a cursor rule published in the GitHub repository Mr-chen-05/rules-2.1-optimized (172 stars, last pushed 10mo ago), licensed MIT. It adds 2,318 tokens to every session, about $0.0116 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.