Create, restructure, review, audit, or migrate DeepSeek Harness Markdown documentation, package READMEs, and the documentation website using audience-first hier
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-dsh-doc-afbc892d302b ,按照其中的说明把「dsh-doc」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
The DeepSeek Harness documentation standard: make every page searchable, newcomer-readable, and exact enough for agents and maintainers, and keep the documentation website a tested projection of repository Markdown. Apply repository AGENTS.md files and executed gates first, then this workflow for kind-mapped metadata, progressive detail, line-aligned bilingual pages, corpus audits, and website publication. Preserve one owner per fact: source, tests, generated catalogs, package READMEs, guides, Agent Notes, and scratch each keep their own kind of truth. The session-persistence-jsonl README pair is the reference example of the format.
Follow this sequence for each requested scope. Keep the common reader path brief, but do not delete failures, ownership, limitations, or other required contracts merely to reduce words.
AGENTS.md, the documentation standard, the target page, its source/tests, navigation owner, and bilingual record.docs/ for cross-package learning, user, developer, architecture, discussion, and expiring scratch material.kind that maps to the template for this document's job — then write Summary, Table of Contents, user-facing content, developer-facing content, optional Further Exploration, and final Dev Note in that order where the document type permits.pnpm run test:docs, pnpm run doc-sync, pnpm run lint, and git diff --check; re-read the complete diff for correctness and then for brevity and repository fit.Documentation states how the product behaves today, and the only admissible evidence for an operation claim is having run it. This procedure is mandatory for every new document and every new paragraph that claims an operation, command, default, error, or platform difference.
package.json for a dsh.bundle.patch declaration, and the entry file for the plugin shape (apply export or a default service export is a plugin; a plain module API is a library). A bundle installs with dsh plugin --profile <name> add <package> and is the only package shape for which that command activates a profile layer; a plugin mounts as a cordis.yml row; a library is a dependency with no install path of its own. Packages with special status (libraries, bundles) get their own README template — never a plugin README with install guidance that does not apply.git fetch origin and compare the section against origin/master; the pairing sidecar recovers the last-confirmed text of either side. A stale statement on master is still wrong: correct it against the code, not against the old prose.pnpm run verify-translation-pairing --write <pair> so the sidecar tracks the confirmed pair.The kind frontmatter field selects exactly one README template. Every kind in the metadata reference maps to one template file in templates/, and every template backs exactly one kind; the documentation check derives the expected kind from the same mechanical facts.
package-group → templates/package-group.md: group maps (packages/README.md, packages/<group>/README.md) — orient the family, map its direct packages, link package-owned details.package-reference → templates/package-reference.md: a Cordis plugin or service package — mount configuration, the config table, folded implementation, Model Experience and Known Limitations in the gate-owned forms.package-library → templates/package-library.md: a package with no plugin surface — consumer entry points, no profile-install path, no mount configuration.package-bundle → templates/package-bundle.md: a package declaring dsh.bundle.patch — the verified dsh plugin install path, layer semantics, patch document.persistence-change → templates/persistence-change.md: a dated record in docs/persistence-changes/ — acknowledge a detected type transition with per-root predecessors and generated after schemas.persistence-release → templates/persistence-release.md: a pinned tag in docs/persistence-changes/releases/ — compare reconstructed historical types without claiming compatibility acknowledgement.persistence-format → templates/persistence-format.md: a historical Session format checkpoint in docs/persistence-changes/historical-formats/, with complete schemas; the current writer uses the existing catalog.Open the template before writing and follow its skeleton and rules; it states what the kind is, how the page is structured, and the fact checks each section owes. Add a new kind only together with a distinct template file, a documented repository position or declared owner, and a focused check that maps documents to it.
These rules decide what a section may say. They apply to every authored human-facing page, and to package READMEs with particular force.
Summary and the user-facing sections describe what a user or agent can DO with the subject — outcomes, benefits, when to choose it, main cost — never its role, type, or internal identity. In a package Summary, “what it is” means only its reader-visible capability, not its Cordis role, registrations, or internal components. Omit source identifiers unless the reader directly uses them in configuration, a command, or a public API. "The seam registers ctx.x and appends x/event records" is identity narration; "you can save a note per message and it survives restarts" is what it does.persistence-change, persistence-release, and persistence-format records retain historical type evidence; release comparisons and format checkpoints describe observed history without asserting compatibility. Agent Notes and postmortems retain their own historical scope.Use these definitions in review. Each section opens with a short orienting paragraph before subsections or exhaustive detail.
Do not apply a universal word limit to exhaustive references. Measure entry-path length, unrelated material scanned for one lookup, largest section, heading count, and page size; split by an existing domain owner when retrieval cost is high.
Read, do not re-summarize, the owning contracts: docs/AGENTS.md for hierarchy, tutorial/reference forms, taxonomy, budgets, and the slop checklist; .agents/notes/README.md for Agent Note lifecycle; docs/i18n/README.md for the bilingual pairing rules; and root AGENTS.md for standing orders. Exclude .agents/notes/archived/ from audits and edits — archived notes are frozen history.
Apply the standard's authoring order to every human-facing document in scope (not to Agent Notes): locate the document and state its own subject; set the permitted detail level and move deeper explanations to owning descendants with links; classify tutorial or reference from intended use, not path; for a tutorial, order concepts by prerequisite and difficulty; split substantial mixed forms. Then check placement constraints: paired docs cost a counterpart update and a --write re-record on every edit; generated catalogs are never hand-edited; a move is atomic with every inbound link repaired in the same change.
After the structural pass, hunt the slop checklist with the cheapest probes first. Use dsh-trim-cot-leakage for reasoning-transcript leakage, grep distinctive phrases to find duplicated rules, replace hand-written catalogs and status inventories with their authoritative owners, and remove migration plans and future-tense spec language from implemented Agent Notes. Measure outliers with pnpm run verify-doc-budgets --list and a word-count scan; if removing prose changes a promised behavior rather than its explanation, propose the behavior change first (follow dsh-find-simplifications). Keep every load-bearing rule, preferably as one to three lines plus a link to its rationale; do not create a new explanation merely to relocate disposable reasoning.
pnpm run verify-doc-budgets compares standing documents against ceilings in scripts/doc-budgets.manifest.json; a red gate follows the ordered relocate-condense-raise policy in docs/AGENTS.md. Ceilings are guardrails, not reduction targets: at or below target, retain at least 5% headroom; raise a ceiling only when the words need the space, and justify the manifest diff in the PR.
The website is a tested projection, never a second copy: website/docs.ts is the explicit public allowlist mapping canonical docs/ sources into route trees, scripts/project-doc-site.ts rewrites them into the disposable website/.generated/ tree, and VitePress builds that tree. Repository Markdown stays the only editable content source; translations stay sibling pairs (foo.md, foo.zh.md, foo.i18n.yaml), never locale directories. Edit an already published page in its canonical source only; add one manifest entry for a new page; update source, manifest entry, and inbound links atomically for a move or removal; never edit website/.generated/, website/.cache/, or website/.dist/. Set every DocsPage field deliberately and honor the projector's link rules; see references/website-sync.md for the fields, sidebar collections, and preview commands. Synchronizing content into the build does not publish it: deployment stays a separate, explicitly requested step.
Load only the reference needed for the task. Each reference links directly from this file so the skill has no deep reference chain.
----- section separators, foldable content sections, and emphasis discipline.The templates in templates/ provide one working skeleton per kind; open the one your document's kind names before writing.
Use dsh-prose-standard for sentence-level contract coverage and editorial judgment. The session-persistence-jsonl README pair (English, Chinese) is the reference example: searchable YAML, Summary and Table of Contents, user-to-developer progression with a folded developer section, Further Exploration, canonical Model Experience and Known Limitations sections, and a final Dev Note.
Validate the affected format, not merely Markdown syntax. A strong promise needs a focused valid fixture and an invalid fixture that proves the top-level gate can fail.
kind to its template and document standard, reject name, audience, ungoverned tags, and README-local i18n metadata, and reject missing or advertisement-style descriptions.wc -w-style words and directs failures back to this skill and the kind template; run model-experience and limitation checks, then package-focused tests when behavior claims changed; re-run every command the README instructs before merging a claim about it.Run pnpm run test:docs for the quick comprehensive documentation checks (pairing, wrap, links, README gates, budgets, skill metadata, Agent Note gates) before the full pnpm run doc-sync.
None.