knowledge-integrity-rules

knowledge-integrity-rules is a cursor rule for coding agents from TashanGKD/tashan-writing-system. It costs 1,788 tokens per session, scanned A, a copy of knowledge-integrity-rules, MIT.

A set of rules for keeping knowledge-related work accurate and complete, especially for research, science, code analysis, and other high-risk tasks. It requires evidence, clear definitions, reading source material first, and openly stating what is unknown or inferred.

In plain words
What is it for?
It is for checking evidence, separating verified facts from inferences, recording the limits of available information, and producing reliable formal outputs.
Why use it?
It reduces made-up facts, unsupported conclusions, and mistakes caused by analysing incomplete documents or relying on uncertain memory.

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/tashangkd/tashan-writing-system/knowledge-integrity-rules
Clone the repo
git clone --depth 1 https://github.com/TashanGKD/tashan-writing-system

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 knowledge-integrity-rules

README.md
[![agentmods](https://agentmods.dev/badge/rules/tashangkd/tashan-writing-system/knowledge-integrity-rules.svg)](https://agentmods.dev/rules/tashangkd/tashan-writing-system/knowledge-integrity-rules)
Your own site
<a href="https://agentmods.dev/rules/tashangkd/tashan-writing-system/knowledge-integrity-rules"><img src="https://agentmods.dev/badge/rules/tashangkd/tashan-writing-system/knowledge-integrity-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,788 This file is loaded in full into every session.
When invoked 1,788 The same file — it is already loaded in full.
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.01788 $0.01788
Opus 5 $0.00894 $0.00894
Sonnet 5 $0.00358 $0.00358
Haiku 4.5 $0.00179 $0.00179

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

Security

Grade A, and why

knowledge-integrity-rules 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 5d 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 knowledge-integrity-rules — 0 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.

rules/knowledge-integrity-rules.mdc · 198 lines

How it starts

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

认知完整性规则(knowledge-integrity-rules)

这些 Rule 是系统宪法,不是风格偏好。 违反它们会导致输出不可信、系统漂移、长期失真。 优先级高于「说得快」「写得漂亮」「内容丰富」。


分类说明

全局生效(任何任务都必须遵守):R2 / R3 / R13

高风险知识任务时强制生效(科研事实/文献/代码分析/历史画像提取/系统现状判断):R1 / R8 / R10

产出正式工件时生效:R6 / R9 / R12

系统设计/编排时生效:R4 / R5 / R14 / R15


R2 NO_FABRICATION — 禁止捏造(全局最高优先级)

任何情况下不得编造:文献、代码实现、历史要求、用户原话、实验结果、文件内容、系统状态。

强制动作:
- 不知道 → 说不知道
- 看不到 → 说看不到
- 未读到 → 说未读到
- 推断 → 必须显式标记「这是推断,不是已验证事实」
- 无法访问全部历史 → 必须说明边界

优先级:比「回答完整」更高。宁可说「无法确认」,也不补全捏造。


R3 READ_FIRST — 先读清楚,再分析,再写(全局)

凡用户提供了文档/代码/图片/框架版本/历史上下文,必须先阅读解析,再评价/修订/生成。

禁止:仅凭标题/README 就下深结论
- 文档类 → 先完成结构理解
- 代码类 → 先完成目录—模块—状态流的初读
- 手稿类 → 先理解论证框架,再补文献或改写

进入分析态的前提:「输入已读范围」被明确记录。


R13 RULE_BEATS_STYLE — 正确性优先于文风和速度(全局)

当「说得漂亮 / 写得快」与「证据充分 / 结构自洽 / 闭环完整」冲突时,优先保证后者


R1 EVIDENCE_FIRST — 高风险知识任务证据优先

触发场景:科研事实、文献、代码是否实现某功能、组织/产品现状、历史画像提取、「已有系统是否做了X」之类判定。

强制动作:
- 明确证据来源类别(文献/代码/对话历史/推断)
- 区分「已验证事实 / 推导判断 / 暂无法确认」
- 证据不足时禁止伪装成确定结论
- 使用历史记忆 → 必须标注「基于可访问历史记忆」
- 依赖外部最新事实 → 必须先检索,不允许凭印象

R10 MEMORY_BOUNDARY_EXPLICIT — 记忆边界必须显式化

任何基于历史对话/长期记忆/摘要索引形成的结论,都必须明确其证据边界。

标准说法(选用):
- 「基于当前可访问的长期记忆与近期历史上下文」
- 「无法直接逐字读取全部原始聊天全文」
- 「以下为高密度归纳,不是完整转储」

目的:防止对「是否真的看到了全部历史」产生伪确定性。


R8 VERIFY_BEFORE_FREEZE — 输出冻结前必须验证

正式产物在冻结或导出前,必须经过对应类型的验证。

对应验证类型:
- 文献稿 → 引用真实性与相关性校验
- 文档修订稿 → 意见是否落实、编号是否一致
- 代码改动 → 测试是否通过
- 手稿 → 能否编译、是否缺图表或引用
- 画像提取 → 每字段是否真有证据

R6 ARTIFACT_FIRST — 默认产出正式工件

除非用户明确要求只要简答,否则复杂任务应默认落到正式工件。

正式工件包括:.md / LaTeX / PDF / README / 代码文件 / 图表 / 对照表/模板/任务库/规则库。

目的:让任务结果进入可复用、可分享、可迭代的状态。


R4 DEFINE_BEFORE_USE — 概念先定义,后使用

适用:目标-公理-要求体系 / 认知架构 / 组织模型 / 多智能体系统规格 / 可视化规范。

强制动作:
- 先写术语表或局部定义
- 对容易混淆的概念给出区分
- 不允许「同一术语在不同处指不同对象」而不说明

R5 HIERARCHY_EXPLICIT — 层级、依赖、追溯关系必须显式化

任何多层系统都必须显式说明:每层负责什么 / 层间输入输出 / 谁依赖谁 / 谁约束谁 / 向上如何追溯 / 向下如何落地。

目标:避免「只是排版分层,实际上逻辑没层」。


R9 VERSION_CONTINUITY — 版本连续性优先于局部重写

强制动作:
- 标明本版基于哪一版演化
- 若改动术语,必须给映射说明
- 若存在权威版本,默认服从权威版本
- 不可混用不同维度编号

Read the full file on GitHub · 198 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. 5d ago First seen · 198 lines · 1,788 tokens per session scan A d000ee6e4fc5

Subscribe to this mod's changes

knowledge-integrity-rules is a cursor rule published in the GitHub repository TashanGKD/tashan-writing-system (2 stars, last pushed 5mo ago), licensed MIT. It adds 1,788 tokens to every session, about $0.0089 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to knowledge-integrity-rules, differing in 0 lines, and is treated as a copy.