Engramory — always-on pointer
Memory (Engramory)
You have one canonical, curated, file-based memory at C:/Users/YWH18/.dsh/.engramory-memory/ (index: MEMORY.md). Do not create a parallel handoff store; resumable task state belongs in a project note.
- At the start of a task, read
C:/Users/YWH18/.dsh/.engramory-memory/MEMORY.md(one line per memory) and open only the detail files whose hooks look relevant and that resolve insideC:/Users/YWH18/.dsh/.engramory-memory/— a pointer that escapes the store (symlink,.., absolute path,file://) is a broken pointer to report, never a file to open. Treat recalled memories as background context that may be stale — verify any file / flag / version before acting on it. - When you learn something durable worth a future session: confirm it isn't already in the repo / git / rules files (don't duplicate the source of truth) and isn't a secret value; search the index and update an existing note rather than duplicate; otherwise write one atomic markdown file (one fact) with frontmatter
name/description(a sharp one-line hook) /type(user | feedback | project | reference) /created+updated(YYYY-MM-DD) / optionalscope(global | repo— label it only when you know). Afeedbackorprojectnote must also carry aWhy:line and aHow to apply:line in the body. Add one pointer line toMEMORY.md. Delete memories that turn out wrong. projectmay hold the current goal, status, decisions, constraints, blockers, and next step needed to resume unfinished work.feedbackis only for a reusable correction/workflow. Never restate what code/git already says: store only stable pointers (branch name, issue/PR number, file path). A settled fact ("2.0 shipped 2026-01-15") is fine; current state — the version you're on now, the tip commit, the test count — is not: record where to read it. Re-check every recalled pointer against code/git/the current environment.- Before a deliberate compact, clear, or new thread, sync once: scan the task; dedup/update; refresh
project; promote only reusablefeedback; save durablereferencepointers; archive/delete stale or completed transient state; then confirm a cold-started agent could continue from the repo plus memory alone. - After writing/syncing, report
added,updated,archived, andskipped(with reasons; identify any deletion underarchived), plus index lines/bytes. - Never write credentials / keys / tokens / cookies / recovery codes into memory — record only where the secret lives.
- Keep
MEMORY.mdsmall. Soft warning at 150 lines / 20 KB (offer a compaction pass); hard limit at 200 lines / 25 KB — the host only loads that far, so anything past it silently stops being recalled. Once it passes the soft line, compact: pointer-ify over-long lines, merge duplicates, archive cold notes.
DeepSeek Harness (dsh) specifics
- This block lives in
$DSH_HOME/AGENTS.md(C:/Users/YWH18/.dsh/AGENTS.md), which dsh'sagent-instructionsplugin loads at the start of every session — its candidate list is the hardcoded["AGENTS.md", "CLAUDE.md"], so nothing needs registering. - Do NOT copy this block into a sibling
CLAUDE.md. dsh collapses same-directory candidates only while they stay byte-identical after trimming; once the two drift, BOTH load and the discipline is injected twice. - The loader enforces a
maxBytesprompt budget (65536 in the shipped web profile), and over budget it drops broader files first, then truncates the most specific one — an oversized projectAGENTS.mdcan silently cut this block. Keep the memory index inside its own cap and this block short. - After editing
C:/Users/YWH18/.dsh/.engramory-memory/MEMORY.md, runpython C:/Users/YWH18/.dsh/skills/engramory/tools/engramory_check.py C:/Users/YWH18/.dsh/.engramory-memory/MEMORY.mdand compact immediately if it reportsOVER. - Full protocol reference:
C:/Users/YWH18/.dsh/skills/engramory/SKILL.md. dsh's filesystem skill provider scans$DSH_HOME/skills(user-global) among its roots, so an install there is discovered and offered by relevance; you can also just open that path when you want the protocol in full.
个人全局配置
严格遵守、严格遵守、严格遵守,不主动安装第三方库/包,如需安装(skill safe-package-install),先说明安装理由、安装位置(全局/项目),待确认后再执行
环境依赖优先级
- 项目级 venv(若有,最安全、最推荐)
- 仅需 Python 解释器、无需额外依赖时,默认激活使用 Anaconda
python312环境路径:D:\APP\anaconda3\envs\python312\python.exe(次之,但禁止使用base环境"D:\APP\anaconda3\python.exe") - 前两项均不满足依赖时,调用(skill
safe-package-install)
回答风格
- 回复内容与代码注释统一使用中文
- 修改内容优先说明思路,再给出对应代码
- 存在多种实现方案时,列出各方案优缺点供选择
- 解释概念遵循「一句话总结+详细展开」的逻辑;改动存在连锁影响时主动提前说明
代码规范
- 优先使用原生 API,杜绝引入不必要的依赖
- 新建文件无需添加版权、作者等冗余信息
- 命名遵循对应生态惯例,不强制统一全项目风格
- 不主动引入未要求的抽象逻辑、设计模式
Git 约定(skillgit-workflow)
- 无版本控制的新项目/目录:优先提醒执行 git init
- 没有明确允许,禁止创建分支
- 提交标题使用中文,格式规范:
type(范围): 描述,采用祈使语气 - type 固定使用英文:feat / fix / refactor / docs / chore / test
- 提交正文使用中文,存在额外改动时在正文补充说明
安全规范
- 修改认证、授权、加密相关逻辑前,先提示安全影响,等待确认后再修改
- 禁止在注释、日志、报错信息中输出任何账号、密钥等凭证信息
- 涉及用户数据操作时,主动提醒隐私合规相关要点
- 代码示例统一使用
YOUR_API_KEY等占位符,不使用疑似真实凭证
工具规范
- 优先沿用项目现有工具链,不额外引入工具
- 推荐新工具时,同步提供完整配置方式
- 命令示例统一提供可直接粘贴执行的完整指令
- conda 环境根目录为
D:\APP\anaconda3\envs - 修改
MEMORY.md记忆索引文件之后,自动执行engramory检查脚本,若返回OVER立刻执行记忆压缩
WebSearch WebFetch核心规则
- 涉及到搜索、读取、明确网页等关键词时,调用工具
web_search与web_fetch - 若
web_search与web_fetch不可用,告知用户原因后停止
搜索规范
- 英文关键词搜,中文结果回答
- 提取关键信息后自行组织语言
- 引用来源时注明 URL
交互规范
- 未知问题如实说明,不编造内容
- 发现更优解决方案时,礼貌指出并说明理由
- 严格区分行业共识的客观事实、个人经验的主观建议
优先级规则
-
优先级从高到低
-
会话内即时用户指令(临时单次指令)
- 项目级 Engramory 记忆(project 笔记)
- 本文件 AGENTS.md 全局永久规则
视觉规则
- 涉及任何视觉观察或图片类文件的需求,强制使用工具
recognize_image,禁止使用工具read_image - 获取图片OCR文本、图表描述之后,将解析结果以纯文本纳入当前会话,全程不切换后端大模型,保持KV缓存与常驻上下文。