AGENTS.md@src/host/storageA

AGENTS.md@src/host/storage from gzx2211/dsh-visual-workflow is an AGENTS.md file: the standing instructions coding agents read in that repo.

Install it, pinned
mdr add gzx2211/dsh-visual-workflow/src/host/storage/AGENTS.md@git:20260928.0bc633c

Pins git:20260928.0bc633c in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
AGENTS.md file
Repository
gzx2211/dsh-visual-workflow
Path
src/host/storage/AGENTS.md
Versions recorded
3
Latest version
git:20260928.0bc633c, committed Sep 28, 2026
First version recorded
Sep 22, 2026
Size
2,706 bytes
Repository stars
65
License
MIT

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Storage Module Rules

## 范围与职责

适用于 `src/host/storage/`。

以「单文件即单资源 + 原子发布 + 进程内/跨进程锁」保存与读取 Host 的持久化文档,并对外提供可复用的原子文件原语与崩溃恢复能力。

判断归属:该修改是否改变「什么被持久化、以什么形状持久化、并发写入如何被串行化」?只改变业务语义判断应放到对应领域模块。

## 状态所有权

- 调用方不得绕过 storage 直接写同一数据文件;需要新资源类型时在 storage 增加明确入口,而不是在别处拼路径。
- 只读方只能拿到值副本(如映射读取返回新对象),不得让调用方持有内部可变结构。
- storage 回答「存了什么」,不回答「是否该存在」。

## 读取语义

- 单资源读取遇损坏 JSON **必须抛出带路径的可诊断错误**,不得伪装成「不存在」。
- 列表读取跳过损坏项以保证可用性,但不得吞掉权限等其他错误(避免把权限问题伪装成空列表)。
- 新增读取入口必须明确选边(单资源 / 列表),并在注释与测试中固化该选择。

## 原子性与锁

- 所有写入必须经组合锁原语(磁盘锁在外、进程内锁在内),不得裸写文件。
- **读改写必须在同一临界区内完成**。
- 新增写路径必须复用既有原子原语,新增公共写方法必须能说明:其读改写位于同一临界区,且失败路径不残留临时文件或锁。

## 时间戳与版本

- `createdAt = 调用方值 ?? 既有值 ?? now`;`updatedAt` 与 `revision` 恒由 storage 生成,调用方传入值不得覆盖。
- 乐观锁只在调用方显式传入 `expectedRevision` 时生效(不得用文档内的 revision 隐式当作冲突期望)。

## 兼容与退役字段

- 旧字段只保留读取兼容语义,重新保存后被剥除;禁止新增已退役字段的写入;
- 前端临时标记与仅服务端拥有的字段必须在写入路径统一处理,不得依赖调用方自觉清理。

## 验证补充

- 并发写同一资源无丢更新(读改写仍在同一临界区);
- 失败路径无临时文件与锁残留;
- 单资源读对损坏 JSON 仍抛可诊断错误、列表读仍保持可用;
- 无旧路径残留、磁盘形状与公共错误码未被意外改变。

## 核心原则

1. 持久化事实由 storage 单独拥有。
2. 读改写不出临界区,锁顺序固定。
3. 单资源读可诊断,列表读可用。原子原语可复用。
4. 时间戳与版本由 storage 记账。
5. 跨文件一致性由调用方保证并写明不变式。
6. 磁盘形状与公共错误码属对外契约。

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add gzx2211/dsh-visual-workflow/src/host/storage/AGENTS.md@sha256:21f2fcc904430e0e

The line at the top of this page pins the label git:20260928.0bc633c, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_wt4z2sv2e2fy2dhx.svg)](https://markdownregistry.com/a/art_wt4z2sv2e2fy2dhx)

0 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 3 versions of this file, between Sep 22, 2026 and Sep 28, 2026, about one every 3 days.

versioncommittedcommitsizeaudit
git:20260928.0bc633c latest2026-09-28 0bc633c 2,706 BA view · diff
git:20260923.4575b132026-09-23 4575b13 3,418 BA view · diff
git:20260922.3481b252026-09-22 3481b25 5,607 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (2706 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

gzx2211/dsh-visual-workflow · 65 stars · license MIT · pushed 2026-10-29 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_wt4z2sv2e2fy2dhx
GET https://markdownregistry.com/api/v1/resolve?ref=gzx2211/dsh-visual-workflow/src/host/storage/AGENTS.md
GET https://markdownregistry.com/api/v1/blob/21f2fcc904430e0e56e3b03abac878ff03455264ca7129bf306b51f65f9e3fe9

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: how to write a good AGENTS.md · AGENTS.md vs CLAUDE.md · which agent file does what.

More from gzx2211/dsh-visual-workflow

AGENTS.md AGENTS.md file
gzx2211/dsh-visual-workflow · AGENTS.md
git:20261029.890e702 · audit A · 65 stars
dsh-plugin-development SKILL.md skill
gzx2211/dsh-visual-workflow · prompt/SKILL.md · 开发、维护、分发和验证 DeepSeek Harness (DSH) 插件的执行型 Skill。覆盖 host/client 形态判断、bundle/profile 契约、Service…
v3.1.0 · audit A · 65 stars
AGENTS.md@src/client AGENTS.md file
gzx2211/dsh-visual-workflow · src/client/AGENTS.md
git:20260924.2e6ce57 · audit A · 65 stars
AGENTS.md@src/host AGENTS.md file
gzx2211/dsh-visual-workflow · src/host/AGENTS.md
git:20260928.0bc633c · audit A · 65 stars
AGENTS.md@src/host/agent AGENTS.md file
gzx2211/dsh-visual-workflow · src/host/agent/AGENTS.md
git:20260928.0bc633c · audit A · 65 stars
AGENTS.md@src/host/api AGENTS.md file
gzx2211/dsh-visual-workflow · src/host/api/AGENTS.md
git:20260928.0bc633c · audit A · 65 stars
AGENTS.md@src/host/assets AGENTS.md file
gzx2211/dsh-visual-workflow · src/host/assets/AGENTS.md
git:20261019.cae5b07 · audit A · 65 stars
AGENTS.md@src/host/graph AGENTS.md file
gzx2211/dsh-visual-workflow · src/host/graph/AGENTS.md
git:20260928.0bc633c · audit A · 65 stars
AGENTS.md@src/host/orchestrator AGENTS.md file
gzx2211/dsh-visual-workflow · src/host/orchestrator/AGENTS.md
git:20260928.0bc633c · audit A · 65 stars
AGENTS.md@src/host/prompts AGENTS.md file
gzx2211/dsh-visual-workflow · src/host/prompts/AGENTS.md
git:20261017.3538eb1 · audit A · 65 stars
AGENTS.md@src/host/scheduler AGENTS.md file
gzx2211/dsh-visual-workflow · src/host/scheduler/AGENTS.md
git:20260928.0bc633c · audit A · 65 stars
AGENTS.md@src/host/service AGENTS.md file
gzx2211/dsh-visual-workflow · src/host/service/AGENTS.md
git:20260928.0bc633c · audit A · 65 stars

Every file in gzx2211/dsh-visual-workflow

Browse by kind, by grade A, or by owner.