dsh-json-schema-driven-dev

August 13, 2026 · View on GitHub

DeepSeek Harness 个人适配声明(Personal Adaptation Notice)

本项目是 DeepSeek Harness个人适配产物(personal adaptation)并非 DeepSeek Harness 官方文件(not an official DeepSeek Harness file),随附功能、使用说明与个人产物(bundled with features, documentation, and personal artifacts),可与 DeepSeek Harness 搭配使用,也可独立使用。

This project is a personal adaptation for DeepSeek Harness, and is NOT an official DeepSeek Harness file, bundled with features, documentation, and personal artifacts. It can be used alongside DeepSeek Harness or standalone.

作者 / Author: h565656445

合作 / Collaboration: 如有项目可以一起合作,欢迎联系。微信:wohaishihenshuaide。If you have projects, let's collaborate. WeChat: wohaishihenshuaide.


用途 / What this is for

JSON Schema 驱动开发方法论:契约先行、registry 分层、版本演进与校验门禁的落地指南。

JSON Schema-driven development methodology: contract-first, layered registry, version evolution and validation gates.


JSON Schema-Driven Development Methodology / JSON Schema 驱动开发方法论

本项目是从 Hermes Harness 源架构 schemas/ 目录提炼的 JSON Schema 驱动开发方法论(纯文档仓库)。内容覆盖:契约先行(先定义 Schema 再写实现)、schema registry 分层(registry 元 Schema + 版本分层目录)、版本演进(revision 编号、legacy 兼容 Schema、禁止降级)、以及校验门禁(同一份字节解析/校验/哈希、失败关闭)。方法论与具体 Schema 内容解耦,可迁移到任何 JSON Schema 工程。

This repository distills a JSON Schema-driven development methodology from the Hermes Harness source schemas/ directory (pure documentation). It covers: contract-first (define schemas before implementation), layered schema registries (registry meta-schema plus versioned layers), version evolution (revision numbering, legacy-compatible schemas, no downgrades), and validation gates (parse/validate/hash on the same bytes, fail closed). The methodology is decoupled from any concrete schema content and transfers to any JSON Schema project.

Features / 功能

  • 契约先行:Schema 是生产者与消费者之间的契约,先定契约再写实现 Contract-first: schemas are contracts between producers and consumers, defined before implementation
  • Registry 分层:registry.schema.json 约束注册表本身,v0.2/ 分层承载具体契约 Layered registry: registry.schema.json governs the registry itself; versioned layers hold concrete contracts
  • 身份绑定:每个契约带 schema_id + version + sha256 三元组,字节级可追溯 Identity binding: every contract carries a schema_id + version + sha256 triple, traceable at byte level
  • 版本演进:registry_revision 编号、compatible_with 声明、legacy 兼容 Schema、禁止降级 Version evolution: registry_revision numbering, compatible_with declarations, legacy-compatible schemas, no downgrades
  • 校验门禁:写盘前同一份字节完成解析/校验/哈希,漂移即失败关闭 Validation gates: parse/validate/hash the same bytes before persisting; any drift fails closed
  • 严格风格:additionalProperties:false、enum/const/pattern 与 defs复用,拒绝未知字段Strictstyle:additionalProperties:false,enum/const/patternanddefs 复用,拒绝未知字段 Strict style: additionalProperties:false, enum/const/pattern and defs reuse; unknown fields rejected

What's inside / 目录结构

dsh-json-schema-driven-dev/
├── README.md                          # 双语说明 + DSH 衍生声明
├── LICENSE                            # MIT
├── docs/
│   └── json-schema-driven-dev.md      # 双语 JSON Schema 驱动开发方法论(核心文档)
└── .dsh/                              # DeepSeek Harness 衍生包
    ├── preset.yml
    ├── agent.cordis.yml
    ├── README.md
    └── skills/dsh-json-schema-driven-dev/SKILL.md

Quick start / 快速开始

# 1. 阅读方法论文档
$repo = "E:\path\to\dsh-json-schema-driven-dev"
Get-Content (Join-Path $repo "docs\json-schema-driven-dev.md")

# 2. 用清单核对你的 Schema 工程
#    - 是否有 registry 元 Schema 约束注册表本身
#    - 每个契约是否带 schema_id/version/sha256
#    - 是否 additionalProperties:false
Get-Content (Join-Path $repo "docs\json-schema-driven-dev.md") | Select-String "落地步骤"

# 3. 安装 DSH 预设(可选)
$dst = Join-Path $env:DSH_HOME ".agent-presets\hermes-json-schema-driven-dev"
Copy-Item -Recurse -Force (Join-Path $repo ".dsh") $dst

DeepSeek Harness 衍生 / DSH Derivative

本项目附带 DeepSeek Harness 衍生包,位于 .dsh/ 目录:

  • preset.yml — Agent 预设元数据
  • agent.cordis.yml — Cordis 组装(基于 standard 预设,persona 已定制)
  • skills/dsh-json-schema-driven-dev/SKILL.md — 项目专属技能(skill)

安装与接入方式见 .dsh/README.md(双语)。

License / 许可证

MIT



这是 DeepSeek Harness 个人适配系列(共 31 个仓库)的完整导航。 / This is the complete navigation for the DeepSeek Harness personal-adaptation series (31 repos).

Agent OS 内核 / Kernel

dsh-agent-os-runtime · dsh-agent-os-planning · dsh-agent-os-scheduler · dsh-agent-os-worker-protocol · dsh-agent-os-observability · dsh-agent-os-specs

Harness 基础设施 / Infrastructure

dsh-harness-core · dsh-graph-entry · dsh-async-job · dsh-file-identity · dsh-json-projection · dsh-manual-approval · dsh-observation-writer · dsh-provider-control · dsh-schema-negotiator · dsh-upgrade-governance

规格与文档 / Specs & Docs

dsh-harness-specs · dsh-novel-specs · dsh-architecture-guide · dsh-powershell-patterns · dsh-json-schema-driven-dev(本仓库 / this repo) · dsh-llm-agent-harness-guide

适配器 / Adapters

dsh-short-story-engine · dsh-tutorial-video-state-machine · dsh-governance-kernel · dsh-sports-pipeline · dsh-motion-grammar

DSH 总集成 / Integration

dsh-integration · dsh-presets-pack · dsh-skills-pack · dsh-starter-kit