dsh-from-scratch AGENTS.md

dsh-from-scratch AGENTS.md is an instructions file for Codex, OpenCode from tsrigo/dsh-from-scratch. It costs 526 tokens per session, scanned A, original, MIT.

Project instructions for maintaining the DSH, a TypeScript implementation of a DeepSeek harness built from scratch.

In plain words
What is it for?
They guide work on the agent loop, context and cache reuse, plugins, execution records, runtime self-improvement, and continuation of long-running tasks.
Why use it?
They keep the documentation organized around fixed chapters and shared writing rules, including explanations of unfamiliar abbreviations.

Instructions file for CodexOpenCode

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 instructions/tsrigo/dsh-from-scratch/agents-md
Clone the repo
git clone --depth 1 https://github.com/tsrigo/dsh-from-scratch

Made for: Codex, OpenCode.

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 dsh-from-scratch AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tsrigo/dsh-from-scratch/agents-md.svg)](https://agentmods.dev/instructions/tsrigo/dsh-from-scratch/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/tsrigo/dsh-from-scratch/agents-md"><img src="https://agentmods.dev/badge/instructions/tsrigo/dsh-from-scratch/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 526 This file is loaded in full into every session.
When invoked 526 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00526 $0.00526
Opus 5 $0.00263 $0.00263
Sonnet 5 $0.00105 $0.00105
Haiku 4.5 $0.00053 $0.00053

Measured 4d ago against content hash 460931608f9c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dsh-from-scratch AGENTS.md 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 4d 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.

AGENTS.md · 42 lines

What it actually says

DSH 维护约定

固定章节名称

教程的六个章节名称必须保持以下写法,不得改写、替换成概括性标题或自行重命名:

  1. 第一章·Agent Loop
    • DSH 的 Agent Loop 是什么样的?
  2. 第二章·上下文与缓存复用
    • 上下文是怎样组织的,为缓存复用做了什么优化?
  3. 第三章·一切皆插件
    • 如何实现“一切皆插件”?
  4. 第四章·让运行有迹可循
    • DSH 怎么记录和保存 Agent 执行过程?
  5. 第五章·运行时自进化
    • DSH 是如何持续自进化的?
  6. 第六章·长程任务续行
    • DSH 是如何持续完成长程任务的?

关于 deepseek-harness-from-scratch 的更多信息,请参见 ./deepseek-harness-from-scratch/README.md 和 ./deepseek-harness-from-scratch/AGENTS.md 。

先专注 ts 版本,python 先不管

关于文本风格:

https://github.com/oil-oil/oil-tone 润色一遍。

此外:

  1. 尽量少用不是...而是...的句型,很多时候它被用来“硬凑”对仗和高级感,前后的 A 和 B 并没有提供真正的干货或深刻洞察。 也不使用“是 X,不是 Y”的对比句式。
  2. 少用引号、破折号。缺乏具体肉身记忆与在地情感的装腔格式,缺乏人味。
  3. 不常见的缩写,需要给出全称与解释。
  4. 尽量不要使用比喻。如果一个说法需要读者推断其指代对象,改为直接说明。
  5. 也不使用拟人表述。
  6. 自包含,不要突然冒出来一个概念

追求:简明,有逻辑,coherent ,自包含,有层次,逻辑通顺

注意,不要通过降低信息量的方式来换取简洁。

不能修改章节标题和问句,这是我钦定的。

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. 4d ago First seen · 42 lines · 526 tokens per session scan A 460931608f9c

Subscribe to this mod's changes

dsh-from-scratch AGENTS.md is an instructions file published in the GitHub repository tsrigo/dsh-from-scratch (10 stars, last pushed 18d ago), licensed MIT. It adds 526 tokens to every session, about $0.0026 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

dsh-TUI AGENTS.md

AGENTS.md instructions for ccch1mneyyy/dsh-TUI, covering agents.md, 仓库布局, 命令, 上游边界与契约 and 约定与红线.

ccch1mneyyy/dsh-TUI · 2,093 tokens

DSH-better-sidebar AGENTS.md

AGENTS.md instructions for omdsh-dev/DSH-better-sidebar, covering dsh-better-sidebar 仓库规则(agents), 1. 仓库硬约束(必须遵守), 2. ci 挂载冒烟(plugin-mount job / pnpm test:mount), 3. dsh 0.1.2 适配要点(0.1.2-rc.1+ 基线) and 4. npm 发版(github release → npm publish).

omdsh-dev/DSH-better-sidebar · 3,543 tokens

dsh-worktable AGENTS.md

Instructions for Aisland-SJL/dsh-worktable, covering dsh-worktable 项目规则, 协作方式(用户定案,最高优先级), 边界, 构建与验证 and 领域约定(会话中必须遵守).

Aisland-SJL/dsh-worktable · 4,863 tokens

modsearch AGENTS.md

AGENTS.md instructions for liustack/modsearch, covering project overview (for ai agent), goal, technical approach, code organization and skills directory.

liustack/modsearch · 1,878 tokens

DeepSeek-Harness-Desktop AGENTS.md

Instructions for web-casa/DeepSeek-Harness-Desktop, covering agents.md — dsh desktop, 项目本质, 不可违背的安全不变量, 版本单一事实源(改动版本时必须同时改全部) and harness 升级启动契约(bump pin 前必读).

web-casa/DeepSeek-Harness-Desktop · 2,781 tokens

deepseek-harness-handbook AGENTS.md

AGENTS.md instructions for sandbaseai/deepseek-harness-handbook, covering contributor instructions, product boundary, content workflow, safety and project handoff and promotion playbook.

sandbaseai/deepseek-harness-handbook · 1,999 tokens