dsh-rewind AGENTS.md

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

Project instructions for dsh-rewind, a plugin that moves a conversation back to an earlier user message and can restore workspace files. They describe the plugin's principles, layout, conventions, and development commands.

In plain words
What is it for?
Use them when developing, testing, building, or reviewing the dsh-rewind plugin.
Why use it?
They give developers and coding agents a shared set of rules for changing and checking the project. They also clarify that conversations are kept and file restoration stays inside the plugin's backup area.

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/sirilee/dsh-rewind/agents-md
Clone the repo
git clone --depth 1 https://github.com/SiriLee/dsh-rewind

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-rewind AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sirilee/dsh-rewind/agents-md.svg)](https://agentmods.dev/instructions/sirilee/dsh-rewind/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/sirilee/dsh-rewind/agents-md"><img src="https://agentmods.dev/badge/instructions/sirilee/dsh-rewind/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 734 This file is loaded in full into every session.
When invoked 734 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.00734 $0.00734
Opus 5 $0.00367 $0.00367
Sonnet 5 $0.00147 $0.00147
Haiku 4.5 $0.00073 $0.00073

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

Security

Grade A, and why

dsh-rewind 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 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.

AGENTS.md · 50 lines

How it starts

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

AGENTS.md

dsh-rewind — a DeepSeek Harness (DSH) plugin that rewinds a conversation in place to any earlier user message, optionally restoring workspace files along with it. This is the shared spec for every developer and agent working on this repo; it is intentionally minimal. Machine-specific local details live in AGENTS.override.md (git-ignored — do not commit).

Positioning & principles

  • Focused on purpose: it does exactly one thing — rewind to any earlier user message in the same window, never forking a session or switching windows.
  • Security first: session logs are append-only and conversations are never deleted; file restores are confined to the plugin's own backup directory.
  • Minimal: avoid over-abstraction; keep the plugin light and maintainable.

Common commands

Command Purpose
npm run check one-shot full gate: typecheck + test + build + verify:host + npm pack --dry-run
npm run build esbuild → lib/ (index.js host ESM, client.js client closure, types/ declarations)
npm run typecheck tsc --noEmit (host / client / client-test configs)
npm test vitest
npm run verify:host end-to-end host verification (full check suite)

@deepseek-ai/* dependencies stay external at build time — the DSH host resolves them at runtime, so the published tarball does not carry them.

Layout at a glance

  • src/index.ts — host plugin: /rewind command + checkpoint pipeline (tools/execute | post-execute)
  • src/rewind.ts — pure planning: target resolution, surface range, candidate listing
  • src/snapshot.ts — checkpoint store (on-disk before-backups, restore/preview, bounded prune)
  • src/session-cwd.ts — session working-directory resolution (fs-tools rule)
  • src/client/ — client plugin: per-message ↶ button, mode popover, hidden-span computation
  • scripts/build.mjs (artifacts), verify-host.mjs (host verification)
  • docs/ — organized: contract/ (client contract), compat/ (audit + troubleshooting), release/, plus harness-reference.md, format.md, architecture.md; repo root holds SECURITY.md and CONTRIBUTING.md
  • tests/ — vitest suites (rewind / snapshot / hidden / session-cwd / integration)

Read the full file on GitHub · 50 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 · 50 lines · 734 tokens per session scan A 48cf2355c8d1

Subscribe to this mod's changes

dsh-rewind AGENTS.md is an instructions file published in the GitHub repository SiriLee/dsh-rewind (35 stars, last pushed yesterday), licensed MIT. It adds 734 tokens to every session, about $0.0037 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-30.

Related

Other instructions, from other repositories

dsh-checkpoint-rewind AGENTS.md

AGENTS.md instructions for PerryLink/dsh-checkpoint-rewind, covering agents.md, 仓库布局:发布面 / 本地工程面, 命令, 提交纪律 and dsh 插件约束(红线).

PerryLink/dsh-checkpoint-rewind · 2,211 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

awesome-dsh-plugin AGENTS.md

Instructions for beancookie/awesome-dsh-plugin, covering agents.md, 内容来源(source of truth), 目录结构(每个文件夹的作用), 添加插件 and 整理流程(分类与数量).

beancookie/awesome-dsh-plugin · 2,209 tokens

dsh-config-manager AGENTS.md

Instructions for xiajiajun516/dsh-config-manager, covering agents.md — dsh config manager 仓库协作指南, 🗣️ 语言与交流, 📦 项目概览, 🗂️ 仓库结构与职责 and ui 分层(改动前必读,避免放错层).

xiajiajun516/dsh-config-manager · 7,380 tokens

causal-memory CLAUDE.md

Claude Code instructions for JingxuanC/causal-memory, covering causal memory mcp integration, causal memory integration, after acting on a decision and observing the result, when something fails unexpectedly and when a recorded lesson turns out to be wrong.

JingxuanC/causal-memory · 680 tokens

dsh-industry-research AGENTS.md

AGENTS.md instructions for PerryLink/dsh-industry-research, covering agents.md, layout, hard rules applied here, checks and release.

PerryLink/dsh-industry-research · 1,386 tokens