cognitive-update-knowledge

cognitive-update-knowledge is a skill for Cursor from TashanGKD/cognitive-os. It costs 84 tokens per session (4,127 once invoked), scanned A, original, MIT.

A controlled workflow for updating a core knowledge document, including impact analysis, backups, consistency checks, and related record updates.

In plain words
What is it for?
Use it to modify a specified section of a core document while reviewing dependencies, creating a backup, checking contradictions, and synchronising related records.
Why use it?
It helps prevent an important document change from conflicting with existing principles or leaving dependent records out of date. A cascade means updating connected documents and logs as well.

Skill for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to modify a specified section of a core document while reviewing dependencies, creating a backup, checking contradictions, and synchronising related records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tashangkd/cognitive-os/cognitive-update-knowledge
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.

Any agent
npx skills add TashanGKD/cognitive-os --skill cognitive-update-knowledge
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-update-knowledge

README.md
[![agentmods](https://agentmods.dev/badge/skills/tashangkd/cognitive-os/cognitive-update-knowledge.svg)](https://agentmods.dev/skills/tashangkd/cognitive-os/cognitive-update-knowledge)
Your own site
<a href="https://agentmods.dev/skills/tashangkd/cognitive-os/cognitive-update-knowledge"><img src="https://agentmods.dev/badge/skills/tashangkd/cognitive-os/cognitive-update-knowledge.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,127 The whole file, excluding the scripts and references it only reads on demand.
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.00084 $0.04127
Opus 5 $0.00042 $0.02063
Sonnet 5 $0.00017 $0.00825
Haiku 4.5 $0.00008 $0.00413

Measured 7d ago against content hash bba62e498869, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

cognitive-update-knowledge 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 7d 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/skills/cognitive-update-knowledge/SKILL.md · 274 lines

How it starts

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

知识库更新 Skill(Update Knowledge)

受控的L1文档直接修改流程:影响分析 → 备份 → 修改 → 矛盾检测 → 强制级联写入。


知识导航表(执行前必须理解的概念根)

层级 文档 需要理解的概念
D0 认知根(必读) cognitive/L1_knowledge/系统架构思维维度/自进化智能体系统形式规范_v1.0.md 层5:ceremony(K)完整协议 = 备份+版本+修改+日志+级联;层3:C2(K1变化必须通知依赖它的所有B-objects)
D3 规范参考 cognitive/maintenance_protocol.md K1文档完整修改规范;矛盾检测要求(不可跳过)
D4 运行时数据 cognitive/L1.5_principles/principles.md + L0_大脑总地图.md + 目标L1文档 现有原则(避免修改与原则矛盾)+ 文档关系图 + 目标文档当前版本

核心概念速查: ① ceremony(K1) = 最高风险的K-object操作:错误更新会通过C2级联传播到所有依赖此K1的B-objects ② 矛盾检测是必要步骤:新内容必须与L1.5原则库和同维度已有文档做一致性检查 ③ 级联写入不可跳过:修改L1后必须更新变更记录+L0总地图+系统日志(三处同步)


激活后立即执行

Step 1  确认目标文档和修改意图
        → 明确:要修改哪个文档?修改哪个部分?修改成什么?
        → 如果用户没有说清楚,追问:「修改的是哪个章节?新的内容是什么?」
        → 确认后继续

Step 2  [影响范围预分析](<10秒快速完成)
        Read: cognitive/L0_brain_map.md(了解文档依赖关系)
        Read: cognitive/L2_fragments/碎片整合索引.md(找关联碎片)

        输出影响报告(含 3 个选项,需用户做出选择):
        「━━ 影响范围分析 ━━
          目标文档:[文档名] > [章节]
          直接依赖(依赖此文档的文档):
          · [文档B](会受影响:此文档为[B]的理论基础)
          · ...(无 → 「无直接依赖」)
          关联碎片:[F-XXX](可能需要重新整合状态)
          风险级别:[🔴 高 | 🟡 中 | 🟢 低]
          建议前置动作:□ 先备份 □ 修改后运行矛盾检测
          ─────────────────────────
          [确认继续修改]【γ】 [先备份再修改]【γ】 [取消]【γ】」
        → 须等用户明确选择后才能继续,不得自行假设用户选择了「确认」

Step 3【α】 创建历史版本备份(AI 直接执行,无需再次授权——Step 2 用户已选择继续)
        → 将当前文档复制到历史版本目录:
          `cognitive/L1_knowledge/[维度目录]/历史版本/[文档名]_YYYYMMDD.md`
        → 告知用户:「✅ 已创建备份:[历史版本路径]」

Step 3.5  【F-022 全节点挑战者反思】备份完成后、正式写入前执行
          以「L1体系完整性守护者」视角执行3条挑战:
          
          1. 必要性:这次修改是基于新的碎片证据或用户明确输入,还是 AI 觉得「这里应该更完整」
             的主动补充?若是后者,置信度必须标注为「🟡 AI生成」,而非「🔵 用户原始思考」。
          2. 上游冲突:这次修改的内容,与同维度其他 L1 文档或 L1.5 原则,有没有
             任何命题级别的冲突(不是词语差异,而是「如果A成立,B就不成立」的关系)?
          3. 下游遗漏:修改之后,依赖这个文档的其他 L1 文档中,有哪段内容应该
             同步修改但当前计划里没有包含?(这些应该加入 Step 6 的级联写入任务)
          
          若发现问题 → 修改计划或提醒用户后再执行
          若确实无重大问题 → 继续 Step 4

Step 4【α】 执行用户指定的修改(用户已在 Step 2 授权,AI 直接写入)
        → Write: 精确修改目标文档的指定位置
        → 修改内容必须标注归因:
          - 用户直接输入的观点 → 🔵 用户原始思考
          - AI基于用户意图整理的 → 🟢 AI整理
          - AI推导的新内容 → 🟡 AI生成(需用户额外注意)

Step 5  [矛盾检测](修改完成后自动执行)
        → 针对刚才修改的内容,快速检测是否与以下产生矛盾:
          · 同文档其他章节
          · 直接依赖此文档的其他L1文档
          · L1.5原则(P1/P2)
        → 如有矛盾 → 立即报告,按用户指令处理(可选:现在消解/记录待后续处理)
        → 无矛盾 → 继续

Step 6  [强制级联写入](不可跳过,无需用户再次确认)
        a. 追加 [文档名]_变更记录.md(若不存在则新建)
           格式:[日期] [修改类型] [内容摘要] | 触发:用户直接修改 | 备份路径 | 联动文档
        b. 更新 L0_大脑总地图.md(该文档最后更新时间,如有新Gap则追加)
        c. 追加 cognitive/L3_logs/system_log.md(一行记录)
        d. 如有关联碎片,更新碎片整合索引(相关碎片状态改为「⚠️ 需重新评估」)
        e. 【语义记忆组织更新】知识图谱版本号检查(仅当本次修改新增或移动了L1节点时执行):
           → 若本次修改使 知识图谱_正式文档.md 新增节点 → 更新文档第一行版本号递增 + 节点统计行
           → 若本次修改只更新内容、无节点增减 → 跳过此步
           认知科学依据:Tulving 语义记忆组织——知识分类账(图谱版本头)等价于语义
           记忆的「当前分类状态摘要」,节点结构变化后必须同步,否则分类账与实际知识不一致

Step 7  收尾反馈(E1B 修复:🔴高风险更新强制触发矛盾检测)
        「━━ 更新完成 ━━
          ✅ [文档名] 第[X]章已更新
          📋 历史版本已备份:[路径]
          🔍 矛盾检测(Step 5):[通过 / 发现N个,已处理/记录]
          📝 变更记录已追加」
        
        [强制条件] Step 2 影响分析中,本次更新的风险级别是什么?
        → 🔴 高(核心论点变更/跨文档强依赖):
          【强制执行】自动触发 cognitive-detect-contradiction
          → 检查范围:本次更新的文档 + 其直接依赖文档
          → 检测结果汇总到本步骤输出中
          → 完成后继续 Step 8
        → 🟡 中 / 🟢 低:
          「建议:本次为增量修改,可选运行全量一致性检查。」
          → 继续 Step 8

Step 8  调用 cognitive-verifier 子智能体(CS-010 修复)
        
        ⚠️ B4 任务日志写入在本步骤之后执行(非在 Step 7 之后),
           以确保任务状态反映验证结论而非仅反映写入完成。
        
        输入:{
          target_doc_path: [本次更新的 L1 文档完整路径],
          update_summary:  [Step 4 修改内容的一句话摘要],
          related_docs:    [Step 2 影响分析中识别的相关 L1 文档路径列表],
          call_context:    "update"
        }
        
        处理验证报告:
        → verdict = "通过":
          告知用户「✅ 认知自洽验证通过(CV-1/CV-2/CV-3)」
          → B4 任务日志写入(状态:完成)
          → 继续 Step 9

        → verdict = "警告":
          向用户展示 ⚠️ 具体警告内容,询问「是否接受并继续?」
          IF 用户接受:
            → B4 任务日志写入(状态:完成,注明"含警告:[摘要]")
            → 继续 Step 9
          IF 用户拒绝:
            → 返回 Step 4 重新修改
        
        → verdict = "不通过":
          向用户展示 ❌ 具体问题 + action_required 建议行动
          「请修复上述问题后重新触发 cognitive-update-knowledge」
          → B4 任务日志写入(状态:⚠️挂起待修复,问题:[CV-?失败摘要])
          → 当前任务挂起,不继续 Step 9

Step 9  重大更新级联通知(仅当满足触发条件时执行)
        
        触发条件(调用方在此判断,满足任一即触发):
        □ 本次修改字符变化量 > 目标文档总字符数 × 30%(默认阈值,可调)
        □ 本次修改涉及文档的核心命题、定义或框架性内容
        
        IF 满足触发条件:
          后台触发 cognitive-cascade-notifier(不阻断)
          输入:{
            change_type:    "major_l1_update",
            change_summary: [本次更新摘要],
            is_major_update: true,
            doc_name:       [目标文档名]
          }
          → 主流程继续,不等待后台执行完成
        
        IF 不满足:
          跳过本步骤,静默完成

Read the full file on GitHub · 274 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. 7d ago First seen · 274 lines · 84 tokens per session scan A bba62e498869

Subscribe to this mod's changes

cognitive-update-knowledge is a skill published in the GitHub repository TashanGKD/cognitive-os (8 stars, last pushed 5mo ago), licensed MIT. It adds 84 tokens to every session and 4,127 once invoked, about $0.0004 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.