cognitive-task-reflector

cognitive-task-reflector is an agent for Claude Code, Cursor from TashanGKD/cognitive-os. It costs 118 tokens per session (1,982 once invoked), scanned A, a copy of cognitive-task-reflector, MIT.

An automated reviewer that extracts reusable lessons from logs of tasks involving a cognitive knowledge system.

In plain words
What is it for?
Use it after cognitive or knowledge-structure work to find new ideas, principles, contradictions, or reusable fragments; it normally stays quiet for unrelated tasks.
Why use it?
It separates broad lessons from the task's step-by-step details and routes those lessons into the appropriate knowledge records.

Agent for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions subagents.

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 agents/tashangkd/cognitive-os/cognitive-task-reflector
Clone the repo
git clone --depth 1 https://github.com/TashanGKD/cognitive-os

Made for: Claude Code, 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-task-reflector

README.md
[![agentmods](https://agentmods.dev/badge/agents/tashangkd/cognitive-os/cognitive-task-reflector.svg)](https://agentmods.dev/agents/tashangkd/cognitive-os/cognitive-task-reflector)
Your own site
<a href="https://agentmods.dev/agents/tashangkd/cognitive-os/cognitive-task-reflector"><img src="https://agentmods.dev/badge/agents/tashangkd/cognitive-os/cognitive-task-reflector.svg" alt="Measured on agentmods" height="20"></a>
Per session 118 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,982 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00118 $0.01982
Opus 5 $0.00059 $0.00991
Sonnet 5 $0.00024 $0.00396
Haiku 4.5 $0.00012 $0.00198

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

Security

Grade A, and why

cognitive-task-reflector 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 6d 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.

Origin

This is a copy

100% identical to cognitive-task-reflector — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/agents/cognitive-task-reflector.md · 161 lines

How it starts

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

任务认知萃取器(cognitive-task-reflector)

关系类型:invokes → cognitive-capture-fragment / cognitive-extract-principle 设计依据:CS-013 Gap 修复;三大闭环架构蓝图「Loop 3→Loop 2 反馈:⚠️部分」修复 ⚠️ 本 Subagent 完成后不触发 session-bootstrap 序列B(属于认知子任务,见排除清单)


运行模式

  • 类型:前台,非只读(最终调用 cognitive-capture-fragment 写入 L2)
  • 模型:inherit
  • 独立 context 价值:主 context 在任务执行后充满操作细节(文件路径/工具调用/Step执行记录),这些细节会让分析聚焦在「发生了什么」而非「这意味着什么认知更新」。独立 context 只读任务日志 + L0/L1.5,以「认知体系维护者」而非「任务执行者」的视角分析。

触发作用域(关键:仅认知类任务后自动触发)

触发条件(满足任一即自动触发):
  ① 任务日志条目(### 完成的工作)包含以下关键词之一:
     cognitive- / L1 / L1.5 / L2 / L3 / 认知结构 / 碎片 / 整合 / 原则 / 矛盾 / 自洽
  ② 任务涉及的 Skill 属于:
     cognitive-* / skill-designer / project-retrospective / skill-system-health-check /
     skill-evolution-planner-meta / research-output / 系统调研

不满足以上条件(前端开发/Bug修复/DevOps部署/文章写作等):
  → 默认跳过,静默完成,不询问用户(减少干扰)
  → 用户可手动触发:「帮我萃取这次任务的认知价值」

输入规格

input:
  task_log_entry: string      # TASK-YYYYMMDD-NN 的完整条目内容(由 write-task-log 传入)
  task_type_hint: string?     # 可选:任务类型提示(如"认知结构操作"/"Skill体系管理")

固定读取路径

context_reads:
  - cognitive/L0_brain_map.md(了解现有认知结构全貌)
  - cognitive/L1.5_principles/principles.md(判断是否已有对应原则)

执行流程

Step 1  读取输入和上下文
        Read: L0_大脑总地图.md
        Read: 底层原则库.md
        解析 task_log_entry(提取:完成的工作、关键决策、修改的文件)

Step 2  扫描认知价值(三类信号)
        
        信号一:新洞见 / 方法论发现
        问题:「这次任务中,有没有让人更新了对某个问题的理解?」
        判断:是否与现有 L1 文档有实质差异(而非重复已知内容)
        → 有 → category="洞见" 或 "方法论发现"
        
        信号二:认知盲区暴露
        问题:「这次任务暴露了哪个之前未意识到的认知空白?」
        判断:L0 中是否有对应文档/章节缺失
        → 有 → category="认知盲区暴露"
        
        信号三:L1.5 候选
        问题:「这次任务是否发现了一个跨领域通用的底层规律(非任务特定)?」
        判断:是否满足 cognitive-extract-principle 的「3个独立领域」判据(初步估计)
        → 可能满足 → category="L1.5候选",route 到 cognitive-extract-principle
        
        对每个候选,必须回答 reason_for_inclusion:
        「这值得沉淀的理由是:[具体说明,不是泛泛而谈]」
        
        被排除的内容记录到 excluded_items(证明有筛选,非全量输出):
        格式:「[任务内容摘要] 被排除原因:[是已有原则的重复/是操作细节非认知规律/置信度低]」

Step 3  输出候选列表(格式固定)

Read the full file on GitHub · 161 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. 6d ago First seen · 161 lines · 118 tokens per session scan A f2aaad32708e

Subscribe to this mod's changes

cognitive-task-reflector is an agent published in the GitHub repository TashanGKD/cognitive-os (8 stars, last pushed 5mo ago), licensed MIT. It adds 118 tokens to every session and 1,982 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to cognitive-task-reflector, differing in 4 lines, and is treated as a copy.

Related

Other agents, from other repositories

diffusion-specialist

Diffusion process specialist bridging cognitive drift-diffusion models and generative AI diffusion models for parameter estimation and implementation.

pjt222/agent-almanac · 27 tokens

fixer

代码修复子智能体。与开发上下文完全隔离,从干净上下文接收 Bug 描述,执行完整的 TDD 修复协议(先复现→先写失败测试→修代码→CI通过→更新追踪台)。支持三种模式:①单Bug内联修复(被测试agent spawn)②全自动修复循环(读追踪台P0→P1→P2循环至收敛)③紧急P0热修复。所有修复信息通过文档传递。拥有完整终端权限:可执行测试、重启服务、运行 CI。由 bug-fix-loop-coordinator 或测试agent调用,或用户说「spawn fixer」「修复这个Bug」「全自动修复」时使用。.

TashanGKD/tashan-cursor-skills · 168 tokens

cognitive-cascade-notifier

认知级联通知器(后台异步)。当 L1.5 新原则被确认或 L1 文档发生重大更新时,后台分析五域工作节点,将需要重新对齐检查的待办条目写入待完成总清单,修复 Loop 2→Loop 3 级联触发❌缺失问题。.

TashanGKD/tashan-cursor-skills · 82 tokens

cognitive-fragment-integrator

碎片批量整合器。当待整合碎片≥5条时,在独立 context 中以「L1文档内部居民」视角分析碎片,输出精确整合方案(含章节锚点/措辞草稿/自洽检查),还原小人机制的纯粹性,避免主 context 中碎片捕捉历史对整合视角的污染。.

TashanGKD/tashan-cursor-skills · 96 tokens

cognitive-task-reflector

任务认知萃取器。在认知类任务完成后(任务日志包含 cognitive- / L1/L1.5/L2/L3 等关键词时),在独立 context 中从高抽象层次分析任务日志,主动萃取认知价值,生成候选 L2 碎片并提供正确路由(L2碎片→capture-fragment / L1.5候选→extract-principle)。修复 Loop 3→Loop 2 认知反馈非系统性问题。.

TashanGKD/tashan-cursor-skills · 118 tokens

cognitive-verifier

认知自洽验证器。在独立 context 中验证 L1 文档更新的自洽性(CV-1 L0一致性 / CV-2 L1.5原则校验 / CV-3 邻域矛盾检测),输出通过/警告/不通过报告。被 cognitive-update-knowledge 和 cognitive-integrate-fragments 调用,在创作操作完成后提供独立视角验证。.

TashanGKD/tashan-cursor-skills · 95 tokens