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.

Good fit Use it after cognitive or knowledge-structure work to find new ideas, principles, contradictions, or reusable fragments; it normally stays quiet for unrelated tasks.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/tashangkd/cognitive-os/cognitive-task-reflector
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: 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/github.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/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-task-reflector

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.5 $0.00047 $0.00793
Sonnet 5.5 $0.00024 $0.00396
Haiku 4.5 $0.00012 $0.00198

Measured 1mo ago against content hash f2aaad32708e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (11 stars, last pushed 7mo ago), licensed MIT. It adds 118 tokens to every session and 1,982 once invoked, about $0.0005 per session on Opus 5.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

A coding agent that fixes reported bugs using test-driven development, or TDD: reproduce the problem, write a failing test, change the code, and confirm the tests pass. It first checks what the affected feature is meant to do.

TashanGKD/tashan-cursor-skills · 168 tokens

cognitive-cascade-notifier

A background agent that watches for newly confirmed principles or major updates to a foundational document. It analyzes which work areas may need review and adds follow-up tasks to a master checklist.

TashanGKD/tashan-cursor-skills · 82 tokens

cognitive-fragment-integrator

A tool that combines five or more separate notes or fragments into an existing higher-level document. It reads the document and fragments together, then proposes where each fragment belongs and drafts matching text.

TashanGKD/tashan-cursor-skills · 96 tokens

cognitive-task-reflector

An agent that extracts reusable lessons from completed work involving a structured knowledge system. It turns task details into candidate knowledge fragments or deeper guiding principles.

TashanGKD/tashan-cursor-skills · 118 tokens

cognitive-verifier

A consistency checker for a knowledge system’s documents and guiding principles. It independently compares an updated document with the system’s map, principles, and related documents.

TashanGKD/tashan-cursor-skills · 95 tokens