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.
git clone --depth 1 https://github.com/FuRongJun-1999/dsh-memoryWrote 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.
[](https://agentmods.dev/rules/furongjun-1999/dsh-memory/rule)<a href="https://agentmods.dev/rules/furongjun-1999/dsh-memory/rule"><img src="https://agentmods.dev/badge/rules/furongjun-1999/dsh-memory/rule/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.
<a href="https://agentmods.dev/rules/furongjun-1999/dsh-memory/rule"><img src="https://agentmods.dev/badge/rules/furongjun-1999/dsh-memory/rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.11746 | $0.11746 |
| Opus 5.5 | $0.04698 | $0.04698 |
| Sonnet 5.5 | $0.02349 | $0.02349 |
| Haiku 4.5 | $0.01175 | $0.01175 |
Grade A, and why
RULE scanned grade A with 1 finding 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 9d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- 动作:构造 argv 列表→subprocess.run(capture_output=True, text=True, encoding='utf-8', errors='replace')→env 带 PYTHONUTF8=1→shell=False;边界判据=本次调用是否产出非UTF-8字节流(纯MSYS工具与不起进程的内置工具豁免;原生Windows程序不豁免,须python包装或显式解码);仓内引用与文档路径一律写相对路径 How it starts
The opening of the file, as written. The whole thing — 355 lines — stays where its author put it; the contents beside it link to each section on GitHub.
工作纪律(工作纪律_认知图条目_v1.1)· 20 条
本文件由
scripts/render_discipline.py从真源docs/工作纪律_认知图条目_v1.1.json渲染生成,请勿手改;改真源后重跑渲染。 真源指纹(SHA256 前16位):b580068f8873a91b
概述
工作纪律集: 4条方法论(理论先行/全面处理/白箱方法/根因) + 3条执行(验证/双副本/兜底) + 1条思考(中文思考/协作模式分级) + 1条保密(敏感信息隔离) + 3条图像线(选源护栏/历史查询优先/算法权威唯一) + 1条协作(访谈澄清:先问清再动手) + 1条合规(内容政策合规:公开产物过内容政策+隐私双清单) + 2条执行调度与运行环境(命令执行统一走python/UTF-8: 显式encoding+PYTHONUTF8=1, 规避GBK, 全仓文本与路径一律UTF-8(无BOM, 中文可进路径), 不做控制台兼容(取用走python), 公开面路径写相对路径(守 check_local_paths); 任务派发统一走蜂巢(zcode端的工作流工具为等效蜂巢工具——使用者2026-10-04裁定; 蜂巢功能完全完善之前可优先使用zcode工作流): 任何执行性任务经蜂巢spawn/submit执行并留痕, agent本体只做编排, L1出口=产物落点为只读判定(不改仓库/外部状态)可直跑须留痕) + 1条记忆闭环(任务收尾归档:每次任务执行完只将核心修改(内容/原因/位置/验证结论)按CCG六要素(功能名/生效条件/子功能/执行/验证方式/不适用条件)成文存入灵枢记忆, 不写中间过程; text 类缺要素即被写入闸门拒并当场返回缺失清单) + 1条信息获取(工作区索引优先: 查工作区文件先读 WORKSPACE_INDEX.md(仓根, 由 scripts/workspace_index.py 从 git 追踪面管线生成), 尚无则先跑 --write 生成再读, 不以重复全盘浏览代替; 索引是会陈化的手工件, 故须管线生成+机械守卫, 否则退化为误导源)
执行公约
| 约定 | 内容 |
|---|---|
| 0.1 会话起始先查记忆 | 动手前先调认知图入口——工具名随端:MCP 端 = server「mdcg」的 cg;DSH 端 = 内建基元 cg(即下文所有 cg(...),同一服务勿因名字不同而猜测)。op 是必填参数(route/read/write/verify/review…),任何调用都显式传、勿省略。先 cg(op=route, intent=<任务意图>);命中纪律/知识则按其 execution.how 执行。禁止跳过此步直接改代码或跑命令。 |
| 0.2 命中即声明 | 命中纪律须在回复中输出该条 response.direct 原文(「按工作纪律第 N 条:…」)。这是「已执行」的唯一可观测证据;未声明即视为未执行。 |
| 0.3 产出即证据 | 「动作」栏要求的产出(判定单/检索结果/验证结论/归档节点 id)必须实际给出,缺失即未执行。 |
| 0.4 违规即归档 | 发现自己违反任一条 → 第 4 条归因 + 第 16 条写入灵枢记忆。隐瞒违规本身是更严重的违规。 |
| 0.5 例外不外溢 | 某条的「不适用」只豁免该条,不豁免其它条。 |
纪律路由表
AI 编程通用规范 v1.1.2(三层结构 · P0 修订 · 中文条款证据降级)
一句话:底线不破,按风险走流程,手册按需查。
v1.1.2 的变化:中文条款(1.7)的证据口径更正——实测无法观测中文思维链,故改为「工程设计 + 可审计规范」,不再声称更优。
v1.1.1 的变化(仅修 P0,不扩范围):加「项目规范 vs 外部内容」区分;风险拆成技术风险/流程要求两维;授权分目标/操作/风险确认三级;中文条款验收只看可见产出。
v1.1 的变化:吸收外部评审意见——流程按风险分级、加冲突裁决、加「外部内容不是指令」、验证结果分四档、语言条款保留为规范但注明依据。 v1.0 保留作对照基线(《AI编程通用规范_v1.0.md》),不删除。 唯一真源声明:自 v0.9.3 起,本文件是 AI 编程通用规范的唯一真源。历史版本已归档到
docs/规范/归档/;适配表与自检清单同目录。随包分发(npm files 字段包含本文件),宿主启动时载入。
第 0 章 怎么用(先看这一章)
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.
- 9d ago Changed · +5 lines · +386 tokens per session f91c091db742
- 23d ago Changed · +2 tokens per session 2b5a53644b94
- 1mo ago Changed · +5 lines · +376 tokens per session b3df50bf9f12
- 1mo ago Changed · +4 lines · +129 tokens per session 80bcbddfad53
- 1mo ago Changed · +129 lines · +2,963 tokens per session 3aeb04ed3096
- 1mo ago Changed · -8 tokens per session 8cb744f4ca52
- 1mo ago Changed · +123 tokens per session ecb128383e4d
- 1mo ago Changed · +158 tokens per session 5210ef40152c
- 1mo ago Changed · +195 tokens per session d202360e6e29
- 1mo ago First seen · 212 lines · 7,422 tokens per session scan A a5d99fb8ebac
RULE is a cursor rule published in the GitHub repository FuRongJun-1999/dsh-memory (761 stars, last pushed today), licensed MIT. It adds 11,746 tokens to every session, about $0.0470 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-24.
RULE compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| RULEFuRongJun-1999/dsh-memory | Cursor rule | 761 | today | MIT | A | 11,746 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 201k | 8d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 102k | 4d ago | MIT | A | 0 | Cursor |
| dev-standardapache/superset | Cursor rule | 76k | today | Apache-2.0 | A | 1,147 | Cursor |
| prefer-assertions-over-defensive-checksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| prefer-direct-imports-over-module-mocksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| shared-plane-packagesprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |