cognitive-l3-auto-log

cognitive-l3-auto-log is a cursor rule for Cursor from TashanGKD/cognitive-os. It costs 1,210 tokens per session, scanned A, original, MIT.

A rule that automatically adds a record to a system log after important changes to a cognitive-structure document or after a cognitive skill finishes.

In plain words
What is it for?
Recording fragment captures, document updates, detected or resolved contradictions, confirmed principles, reflections, and daily reviews in `cognitive/L3_logs/system_log.md`.
Why use it?
It keeps a trace of changes without relying on someone to remember to log them. The records can later support daily reports and reviews.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Recording fragment captures, document updates, detected or resolved contradictions, confirmed principles, reflections, and daily reviews in cognitive/L3_logs/system_log.md.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/tashangkd/cognitive-os/cognitive-l3-auto-log
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.

Clone the repo
git clone --depth 1 https://github.com/TashanGKD/cognitive-os

Made for: Cursor.

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 cognitive-l3-auto-log

README.md
[![agentmods](https://agentmods.dev/badge/rules/tashangkd/cognitive-os/cognitive-l3-auto-log/github.svg)](https://agentmods.dev/rules/tashangkd/cognitive-os/cognitive-l3-auto-log)
Your own site
<a href="https://agentmods.dev/rules/tashangkd/cognitive-os/cognitive-l3-auto-log"><img src="https://agentmods.dev/badge/rules/tashangkd/cognitive-os/cognitive-l3-auto-log/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cognitive-l3-auto-log

Your own site · 80×15
<a href="https://agentmods.dev/rules/tashangkd/cognitive-os/cognitive-l3-auto-log"><img src="https://agentmods.dev/badge/rules/tashangkd/cognitive-os/cognitive-l3-auto-log.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,210 This file is loaded in full into every session.
When invoked 1,210 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01210 $0.01210
Opus 5 $0.00605 $0.00605
Sonnet 5 $0.00242 $0.00242
Haiku 4.5 $0.00121 $0.00121

Measured 8d ago against content hash 741138b1febd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

cognitive-l3-auto-log 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 8d 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/cognitive-l3-auto-log.mdc · 114 lines

How it starts

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

自动日志规则(L3 Auto Log)

核心原则

任何对认知结构的重要操作,都必须在系统日志中留下记录。

这不是"可以做",而是"必须做"——日志是认知结构可追溯性的基础,是未来「每日汇报」和「复盘」的数据来源。


触发条件

以下情况发生后,自动追加系统日志(无需用户提示):

  1. 任何 cognitive-* Skill 执行完毕
  2. 向 L1 或 L1.5 文档写入内容
  3. 新建 L2 碎片或更新碎片整合索引
  4. 矛盾被检测到或消解
  5. L1.5 新原则被确认

日志追加格式

文件路径cognitive/L3_logs/system_log.md 写入模式:追加(append),不覆盖已有内容

格式

[LOG-YYYYMMDD-NN] {操作类型} | {内容摘要} | {涉及文档/碎片}

NN = 当日第N条日志(从01开始,依次递增,读取文件中当日最后一条确认编号)


各类操作的日志模板

碎片捕捉:
[LOG-20260317-01] cognitive-capture-fragment | 记录碎片F-013「...标题...」 | L2产品思考碎片.md

碎片整合:
[LOG-20260317-02] cognitive-integrate-fragments | F-012整合进[A]第X章第Y节 | AI时代产品问题全景框架.md

文档更新:
[LOG-20260317-03] cognitive-update-knowledge | 更新[文档名]第X章:[一句话摘要] | [文档名].md

矛盾检测:
[LOG-20260317-04] cognitive-detect-contradiction | 检测[文档A]vs[文档B],发现N个矛盾,已消解M个 | 一致性检查记录.md

原则提炼:
[LOG-20260317-05] cognitive-extract-principle | 确认新原则P3「...表述...」 | 底层原则库.md

自我反思:
[LOG-20260317-06] cognitive-self-reflect | 记录反思R-XXX「...标题...」 | 自我反思记录.md

大脑地图复盘:
[LOG-20260317-07] cognitive-review-brain-map | 生成认知快照 | 无文档变更

每日汇报:
[LOG-20260317-08] cognitive-daily-briefing | 生成每日汇报 | 无文档变更

日志追加的时机

  • 碎片类Skill:写入碎片文件后立即追加
  • 文档修改类Skill:所有级联操作(变更记录+L0更新)完成后,最后追加
  • 只读类Skill(review-brain-map, daily-briefing):Skill 执行结束时追加

不需要写日志的情况

  • 用户只是查看文件内容,没有写入操作
  • AI 在读取文件做内部分析(没有输出结果给用户)
  • 对非认知结构目录的操作

示例对(2026-03-25 补充)

✅ 正确行为: cognitive-capture-fragment 执行完毕 → 自动追加到系统日志.md:[LOG-20260325-01] cognitive-capture-fragment | 记录碎片F-067「AI系统不需要时间盒约束」| L2碎片整合索引.md

❌ 错误行为: cognitive-capture-fragment 执行完毕 → 只告知用户「碎片已写入」,未追加任何系统日志记录,导致每日汇报无法追踪今日认知操作


变更记录

2026-03-21 — alwaysApply: false → true(GAP-E4A 修复)

根因:GAP-E4 分析(认知体系改进规划 v1.2,TASK-20260321-13)确认:alwaysApply:false 导致日志追踪依赖 AI 自我报告,系统日志完整性无法保证,影响 daily-briefing、一致性检查等所有依赖日志的功能。

修改内容

  • 修改:frontmatter alwaysApply: falsealwaysApply: true

验证结果

  • 正向验证:触发 cognitive-capture-fragment 后,系统日志应有对应条目(待真实场景验证)
  • 负向验证:普通开发任务中,Rule 虽被注入但触发条件(cognitive-* Skill 完成后)不误触发

Read the full file on GitHub · 114 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. 8d ago First seen · 114 lines · 1,210 tokens per session scan A 741138b1febd

Subscribe to this mod's changes

cognitive-l3-auto-log is a cursor rule published in the GitHub repository TashanGKD/cognitive-os (8 stars, last pushed 5mo ago), licensed MIT. It adds 1,210 tokens to every session, about $0.0060 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-31.