dsh-plugin-dev-kb 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +186 -178
- package/README.en.md +172 -172
- package/README.md +183 -183
- package/kb/INDEX.md +236 -234
- package/kb/README.md +88 -88
- package/kb/extra/AGENTS.md +77 -77
- package/kb/extra/deepseek-llm-api-wire-extensions.md +162 -162
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +162 -162
- package/kb/extra/defensive-patterns/package-surface.md +233 -232
- package/kb/extra/defensive-patterns/package-surface.zh.md +233 -232
- package/kb/extra/defensive-patterns/remote-and-api.md +117 -117
- package/kb/extra/defensive-patterns/remote-and-api.zh.md +117 -117
- package/kb/extra/development.md +221 -221
- package/kb/extra/development.zh.md +228 -228
- package/kb/extra/event-producer-consumer.md +133 -123
- package/kb/extra/event-producer-consumer.zh.md +135 -125
- package/kb/extra/module-graph.md +1961 -1888
- package/kb/extra/module-graph.zh.md +1963 -1890
- package/kb/extra/persistence-changes/2026-11-05-timeline-priority-notice.md +60 -0
- package/kb/extra/persistence-changes/2026-11-05-timeline-priority-notice.zh.md +60 -0
- package/kb/extra/persistence-changes/README.md +92 -92
- package/kb/extra/persistence-changes/README.zh.md +92 -92
- package/kb/extra/persistence-changes/historical-formats/README.md +75 -75
- package/kb/extra/persistence-changes/historical-formats/README.zh.md +75 -75
- package/kb/extra/persistence-changes/releases/README.md +103 -103
- package/kb/extra/persistence-changes/releases/README.zh.md +103 -103
- package/kb/extra/rescope.md +55 -55
- package/kb/extra/rescope.zh.md +55 -55
- package/kb/extra/subsystems/boot.md +631 -621
- package/kb/extra/subsystems/boot.zh.md +631 -621
- package/kb/extra/subsystems/computer-use.md +179 -137
- package/kb/extra/subsystems/computer-use.zh.md +179 -137
- package/kb/extra/subsystems/extensions.md +387 -384
- package/kb/extra/subsystems/extensions.zh.md +387 -384
- package/kb/extra/subsystems/feedback.md +418 -400
- package/kb/extra/subsystems/feedback.zh.md +418 -400
- package/kb/extra/subsystems/forge.md +2169 -1226
- package/kb/extra/subsystems/forge.zh.md +2171 -1226
- package/kb/extra/subsystems/liveshare.md +167 -158
- package/kb/extra/subsystems/liveshare.zh.md +167 -158
- package/kb/extra/subsystems/mcp.md +237 -234
- package/kb/extra/subsystems/mcp.zh.md +237 -234
- package/kb/extra/subsystems/office-kit.md +122 -0
- package/kb/extra/subsystems/office-kit.zh.md +122 -0
- package/kb/extra/subsystems/working-directory.md +95 -64
- package/kb/extra/subsystems/working-directory.zh.md +95 -64
- package/kb/extra/subsystems/worktrees.md +187 -127
- package/kb/extra/subsystems/worktrees.zh.md +187 -127
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.md +21 -21
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.zh.md +21 -21
- package/kb/extra/upgrade-guide/v0.2.1-rc.4/sandbox-unsupported-policy-error/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.4/sandbox-unsupported-policy-error/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-error-builtin-codes/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-error-builtin-codes/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-kit-package/guide.md +34 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-kit-package/guide.zh.md +34 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-operation-tools/guide.md +49 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-operation-tools/guide.zh.md +49 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-skill-resources/guide.md +36 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-skill-resources/guide.zh.md +36 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/account-notification-fields/guide.md +26 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/account-notification-fields/guide.zh.md +26 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/account-remote-provider/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/account-remote-provider/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/archive-worktrees/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/archive-worktrees/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/attachment-error-codes/guide.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/attachment-error-codes/guide.zh.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-ax-read-limits/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-ax-read-limits/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-hover-ax-only/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-hover-ax-only/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-native-platform/guide.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-native-platform/guide.zh.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/dsh-doc-skill/guide.md +35 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/dsh-doc-skill/guide.zh.md +35 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-change-request-overview/guide.md +26 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-change-request-overview/guide.zh.md +26 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-pinned-diff/guide.md +26 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-pinned-diff/guide.zh.md +26 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-review-reads/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-review-reads/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/package-export-cleanup/guide.md +26 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/package-export-cleanup/guide.zh.md +26 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/plugin-update-method/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/plugin-update-method/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-bootstrap-protocol/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-bootstrap-protocol/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-inspect-output/guide.md +48 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-inspect-output/guide.zh.md +48 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-scoped-repl-default/guide.md +45 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-scoped-repl-default/guide.zh.md +45 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/runtime-context-reminders/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/runtime-context-reminders/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/session-append-overloads/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/session-append-overloads/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/subagent-interrupt-default/guide.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/subagent-interrupt-default/guide.zh.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/terminal-backend-cleanup-error/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/terminal-backend-cleanup-error/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/terminal-bundle-sidebar-backend/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/terminal-bundle-sidebar-backend/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/web-fetch-transport-error-codes/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/web-fetch-transport-error-codes/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/web-search-billing/guide.md +41 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/web-search-billing/guide.zh.md +41 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/window-drag-regions/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.1/window-drag-regions/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/client-module-metadata/guide.md +29 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/client-module-metadata/guide.zh.md +29 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/connection-page-peer/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/connection-page-peer/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.md +31 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.zh.md +31 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-agents-without-preset/guide.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-agents-without-preset/guide.zh.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-macos-provider/guide.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-macos-provider/guide.zh.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/deepseek-files-timeout/guide.md +15 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/deepseek-files-timeout/guide.zh.md +15 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/experimental-tool-error-codes/guide.md +28 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/experimental-tool-error-codes/guide.zh.md +28 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.md +36 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.zh.md +36 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/python-ptc-removal/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/python-ptc-removal/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/session-status-package/guide.md +31 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/session-status-package/guide.zh.md +31 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/shared-search-filter/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/shared-search-filter/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/shell-fs-tool-error-codes/guide.md +30 -0
- package/kb/extra/upgrade-guide/v0.2.2-rc.2/shell-fs-tool-error-codes/guide.zh.md +30 -0
- package/kb/extra/web-styling.md +57 -57
- package/kb/extra/web-styling.zh.md +57 -57
- package/kb/meta/search-index.json +4508 -3980
- package/kb/meta/source.json +18 -18
- package/kb/site/develop/practice/llm-adapter.md +192 -192
- package/kb/site/en/develop/practice/llm-adapter.md +192 -192
- package/kb/site/en/guide/desktop-uninstall-cleanup.md +63 -0
- package/kb/site/en/guide/plugin-market.md +153 -151
- package/kb/site/en/guide/providers.md +234 -234
- package/kb/site/en/guide/quickstart.md +35 -34
- package/kb/site/en/reference/capability-seams.md +789 -767
- package/kb/site/en/reference/config-catalog.md +5432 -5128
- package/kb/site/en/reference/cookbook/adding-a-package.md +175 -175
- package/kb/site/en/reference/cookbook/adding-a-tool.md +105 -104
- package/kb/site/en/reference/cookbook/extension-cookbook.md +178 -135
- package/kb/site/en/reference/cordis-api/context.md +373 -369
- package/kb/site/en/reference/cordis-api/fiber.md +457 -433
- package/kb/site/en/reference/cordis-api/inherited.md +44 -44
- package/kb/site/en/reference/cordis-api/service.md +118 -107
- package/kb/site/en/reference/experimental-persistence-catalog.md +36 -23
- package/kb/site/en/reference/index.md +174 -174
- package/kb/site/en/reference/persistence-catalog.md +9453 -9432
- package/kb/site/en/reference/subsystems/compaction.md +288 -288
- package/kb/site/en/reference/subsystems/core.md +1172 -1171
- package/kb/site/en/reference/subsystems/credentials.md +526 -497
- package/kb/site/en/reference/subsystems/filesystem.md +708 -708
- package/kb/site/en/reference/subsystems/index.md +82 -82
- package/kb/site/en/reference/subsystems/llm-streaming.md +1290 -1288
- package/kb/site/en/reference/subsystems/lsp.md +230 -206
- package/kb/site/en/reference/subsystems/persistence.md +451 -432
- package/kb/site/en/reference/subsystems/plan.md +91 -91
- package/kb/site/en/reference/subsystems/ptc-runtime.md +295 -261
- package/kb/site/en/reference/subsystems/sandbox.md +250 -232
- package/kb/site/en/reference/subsystems/session-query.md +525 -515
- package/kb/site/en/reference/subsystems/session-reference.md +231 -229
- package/kb/site/en/reference/subsystems/session.md +1478 -1431
- package/kb/site/en/reference/subsystems/sidebar-right.md +165 -165
- package/kb/site/en/reference/subsystems/skills.md +356 -356
- package/kb/site/en/reference/subsystems/slots.md +235 -231
- package/kb/site/en/reference/subsystems/terminal.md +188 -188
- package/kb/site/en/reference/subsystems/tools.md +902 -891
- package/kb/site/en/reference/subsystems/user-questions.md +330 -327
- package/kb/site/en/reference/subsystems/web-client.md +161 -104
- package/kb/site/en/reference/subsystems/web-server.md +434 -351
- package/kb/site/en/reference/subsystems/web.md +268 -268
- package/kb/site/en/reference/subsystems/workflow.md +287 -282
- package/kb/site/en/reference/subsystems/workspace.md +743 -651
- package/kb/site/en/reference/tool-catalog.md +2867 -2704
- package/kb/site/guide/desktop-uninstall-cleanup.md +63 -0
- package/kb/site/guide/plugin-market.md +153 -151
- package/kb/site/guide/providers.md +234 -234
- package/kb/site/guide/quickstart.md +35 -34
- package/kb/site/reference/capability-seams.md +789 -767
- package/kb/site/reference/config-catalog.md +5432 -5128
- package/kb/site/reference/cookbook/adding-a-package.md +175 -175
- package/kb/site/reference/cookbook/adding-a-tool.md +107 -106
- package/kb/site/reference/cookbook/extension-cookbook.md +182 -139
- package/kb/site/reference/cordis-api/context.md +373 -369
- package/kb/site/reference/cordis-api/fiber.md +459 -435
- package/kb/site/reference/cordis-api/inherited.md +44 -44
- package/kb/site/reference/cordis-api/service.md +118 -107
- package/kb/site/reference/experimental-persistence-catalog.md +36 -23
- package/kb/site/reference/index.md +178 -178
- package/kb/site/reference/persistence-catalog.md +9453 -9432
- package/kb/site/reference/subsystems/compaction.md +288 -288
- package/kb/site/reference/subsystems/core.md +1184 -1183
- package/kb/site/reference/subsystems/credentials.md +526 -497
- package/kb/site/reference/subsystems/filesystem.md +708 -708
- package/kb/site/reference/subsystems/index.md +82 -82
- package/kb/site/reference/subsystems/llm-streaming.md +1296 -1294
- package/kb/site/reference/subsystems/lsp.md +230 -206
- package/kb/site/reference/subsystems/persistence.md +451 -432
- package/kb/site/reference/subsystems/plan.md +91 -91
- package/kb/site/reference/subsystems/ptc-runtime.md +295 -261
- package/kb/site/reference/subsystems/sandbox.md +250 -232
- package/kb/site/reference/subsystems/session-query.md +525 -515
- package/kb/site/reference/subsystems/session-reference.md +231 -229
- package/kb/site/reference/subsystems/session.md +1482 -1435
- package/kb/site/reference/subsystems/sidebar-right.md +165 -165
- package/kb/site/reference/subsystems/skills.md +356 -356
- package/kb/site/reference/subsystems/slots.md +239 -235
- package/kb/site/reference/subsystems/terminal.md +188 -188
- package/kb/site/reference/subsystems/tools.md +902 -891
- package/kb/site/reference/subsystems/user-questions.md +330 -327
- package/kb/site/reference/subsystems/web-client.md +161 -104
- package/kb/site/reference/subsystems/web-server.md +434 -351
- package/kb/site/reference/subsystems/web.md +268 -268
- package/kb/site/reference/subsystems/workflow.md +287 -282
- package/kb/site/reference/subsystems/workspace.md +743 -651
- package/kb/site/reference/tool-catalog.md +2872 -2709
- package/lib/index.js +359 -359
- package/package.json +68 -68
- package/skills/dsh-plugin-dev-kb.md +71 -70
- package/kb/extra/subsystems/office-to-pdf.md +0 -87
- package/kb/extra/subsystems/office-to-pdf.zh.md +0 -87
package/kb/README.md
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
# DeepSeek Harness 文档知识库
|
|
2
|
-
|
|
3
|
-
本地镜像的 DeepSeek Harness 官方文档知识库,用于辅助 Harness **插件开发**。内容抓取自官方文档站点
|
|
4
|
-
<https://deepseek-harness.github.io/deepseek-harness/>,并以**仓库内原始 Markdown**(`deepseek-ai/deepseek-harness` 的 `docs/` 目录)重建,比抓取渲染后的 HTML 保真度更高、链接与代码块完整。
|
|
5
|
-
|
|
6
|
-
## 目录结构
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
knowledge/deepseek-harness/
|
|
10
|
-
├── README.md 本文件:总览与使用指南
|
|
11
|
-
├── INDEX.md 全部页面的 站点 URL ↔ 本地文件 对照索引(自动生成)
|
|
12
|
-
├── site/ 线上站点的完整镜像(中英双语,链接已按站点路由重写)
|
|
13
|
-
│ ├── index.md 中文首页(/deepseek-harness/)
|
|
14
|
-
│ ├── guide/ 入门:quickstart / providers / python-sdk / github-review /
|
|
15
|
-
│ │ schedule / mcp-memory
|
|
16
|
-
│ ├── develop/ 开发:basic(第一个插件/tool/config/publish)、
|
|
17
|
-
│ │ framework(生命周期/service/事件)、practice、cordis-tutorial(7 章)
|
|
18
|
-
│ ├── reference/ 参考:架构、capability-seams、config-catalog、tool-catalog、
|
|
19
|
-
│ │ api-gateway、cordis-api、cookbook、subsystems(46 个子系统页)…
|
|
20
|
-
│ └── en/ 英文站镜像(/deepseek-harness/en/...),结构同上
|
|
21
|
-
├── extra/ 仓库 docs/ 中未发布到站点的补充文档(开发参考)
|
|
22
|
-
│ ├── glossary.md 术语表(capability seam 等核心概念)
|
|
23
|
-
│ ├── defensive-patterns.md / testing.md / development.md / rescope.md …
|
|
24
|
-
│ ├── module-graph.md 模块依赖全景图(125KB)
|
|
25
|
-
│ ├── cookbook/ adding-a-vendored-package 等仓库内 cookbook
|
|
26
|
-
│ ├── upgrade-guide/ 各版本升级指南(0.1.7-rc.2 / 0.2.0-rc.2 …)
|
|
27
|
-
│ ├── persistence-changes/ 持久化格式变更记录(releases/、historical-formats/)
|
|
28
|
-
│ ├── subsystems/ 未发布进站点的子系统文档(boot / browser-use / ssh / otel …)
|
|
29
|
-
│ ├── postmortem/ 事故复盘
|
|
30
|
-
│ └── i18n/ 文档双语规范与术语
|
|
31
|
-
└── meta/
|
|
32
|
-
├── source.json 来源信息:仓库 commit、抓取时间、统计
|
|
33
|
-
└── site-pages.txt 线上站点页面清单(由投影结果生成,188 页)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## 插件开发学习路径(从 `site/` 开始)
|
|
37
|
-
|
|
38
|
-
1. **第一个插件** — `site/develop/basic/index.md`(插件 = 导出 `apply(ctx)` 的模块,`ctx.effect()` 自动清理)
|
|
39
|
-
2. **开发一个 Tool** — `site/develop/basic/tool.md`(工具定义 DSL)
|
|
40
|
-
3. **插件配置** — `site/develop/basic/config.md`;**打包安装** — `site/develop/basic/publish.md`
|
|
41
|
-
4. **框架能力** — `site/develop/framework/index.md`(生命周期)、`service.md`(服务与依赖注入)、`events.md`(事件系统)
|
|
42
|
-
5. **Cordis 框架教程** — `site/develop/cordis-tutorial/`(7 章:插件/生命周期/服务/事件/配置/组合与热重载/进入 Harness)
|
|
43
|
-
6. **实战** — `site/develop/practice/index.md`(能力三层拆分)、`llm-adapter.md`、`dynamic-cordis.md`(运行时动态装配 Cordis)
|
|
44
|
-
7. **按需查阅** — `site/reference/`:
|
|
45
|
-
- 架构总览 `reference/index.md`;能力服务 `reference/capability-seams.md`;Agent 生命周期 `reference/agent-lifecycle.md`
|
|
46
|
-
- 插件配置目录 `reference/config-catalog.md`;Tool Schema 目录 `reference/tool-catalog.md`;持久化事件 `reference/persistence-catalog.md`;API Gateway `reference/api-gateway.md`(Typert Remote 方法/RPC 约定)
|
|
47
|
-
- Cordis API `reference/cordis-api/`(Context / Events / Fiber / Registry / Service / 继承接口面)
|
|
48
|
-
- Cookbook `reference/cookbook/`(新增 package / tool / LLM adapter / 设置卡片 / 扩展模式)
|
|
49
|
-
- 子系统 `reference/subsystems/`(core / scope / session / tools / shell / filesystem / subagent / sandbox / approval / conversation / slots / web-client … 共 46 页)
|
|
50
|
-
|
|
51
|
-
## 更新方法
|
|
52
|
-
|
|
53
|
-
**一键刷新(推荐)**:`npm run refresh-kb`(克隆上游 → 投影 → 覆盖 site/extra → 重建索引与元数据),
|
|
54
|
-
完成后 `npm run selfcheck` 自检。GitHub Action(`.github/workflows/refresh-kb.yml`)每周一自动执行同一
|
|
55
|
-
脚本,有变更即自动提交;README 顶部「kb sync」badge 数据来自 `meta/source.json`。
|
|
56
|
-
|
|
57
|
-
以下为手动步骤(理解流程 / 非 Windows 环境参考)。知识库与仓库 `master` 分支对齐
|
|
58
|
-
(见 `meta/source.json` 的 commit)。需要刷新时:
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
# 1. 重新克隆仓库
|
|
62
|
-
git clone --depth 1 https://github.com/deepseek-ai/deepseek-harness.git <tmp>
|
|
63
|
-
|
|
64
|
-
# 2. 安装投影依赖(mdast 三个包)。仓库本身是 pnpm workspace(package.json 含
|
|
65
|
-
# workspace: 协议),npm 无法直接在其内安装;装到克隆目录的上级,Node 的 ESM
|
|
66
|
-
# 解析沿 node_modules 向上查找时即可命中。
|
|
67
|
-
cd <tmp>/.. && npm install --no-save --no-package-lock mdast-util-from-markdown mdast-util-gfm micromark-extension-gfm
|
|
68
|
-
|
|
69
|
-
# 3. 运行站点投影器(Node ≥ 22.19;24 默认启用 type stripping)。
|
|
70
|
-
# 上游已无 run-projector.ts,改为调用 scripts/project-doc-site.ts 的 projectDocs():
|
|
71
|
-
cd <tmp> && node --input-type=module -e "import('./scripts/project-doc-site.ts').then(m => { m.projectDocs(); console.log('projected') })"
|
|
72
|
-
# 输出到 website/.generated/
|
|
73
|
-
|
|
74
|
-
# 4. 用 website/.generated/ 覆盖本插件的 kb/site/;
|
|
75
|
-
# 用 <tmp>/docs/ 中未发布的 Markdown 刷新 kb/extra/(对照 website/docs.ts 的
|
|
76
|
-
# docsPages source/sourceAliases 集合求差集)
|
|
77
|
-
|
|
78
|
-
# 5. 在本插件根目录重新生成索引与 INDEX.md,并更新 meta/source.json 与统计
|
|
79
|
-
node scripts/rebuild-index.mjs
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
站点投影逻辑为仓库内 `website/docs.ts`(发布清单)+ `scripts/project-doc-site.ts`(链接重写/图片复制,由 `website/.vitepress/config.ts` 在构建时调用)。
|
|
83
|
-
|
|
84
|
-
## 统计
|
|
85
|
-
|
|
86
|
-
- 站点页面:192 个 Markdown,4 张图片
|
|
87
|
-
- 补充文档:
|
|
88
|
-
- 来源 commit:`
|
|
1
|
+
# DeepSeek Harness 文档知识库
|
|
2
|
+
|
|
3
|
+
本地镜像的 DeepSeek Harness 官方文档知识库,用于辅助 Harness **插件开发**。内容抓取自官方文档站点
|
|
4
|
+
<https://deepseek-harness.github.io/deepseek-harness/>,并以**仓库内原始 Markdown**(`deepseek-ai/deepseek-harness` 的 `docs/` 目录)重建,比抓取渲染后的 HTML 保真度更高、链接与代码块完整。
|
|
5
|
+
|
|
6
|
+
## 目录结构
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
knowledge/deepseek-harness/
|
|
10
|
+
├── README.md 本文件:总览与使用指南
|
|
11
|
+
├── INDEX.md 全部页面的 站点 URL ↔ 本地文件 对照索引(自动生成)
|
|
12
|
+
├── site/ 线上站点的完整镜像(中英双语,链接已按站点路由重写)
|
|
13
|
+
│ ├── index.md 中文首页(/deepseek-harness/)
|
|
14
|
+
│ ├── guide/ 入门:quickstart / providers / python-sdk / github-review /
|
|
15
|
+
│ │ schedule / mcp-memory
|
|
16
|
+
│ ├── develop/ 开发:basic(第一个插件/tool/config/publish)、
|
|
17
|
+
│ │ framework(生命周期/service/事件)、practice、cordis-tutorial(7 章)
|
|
18
|
+
│ ├── reference/ 参考:架构、capability-seams、config-catalog、tool-catalog、
|
|
19
|
+
│ │ api-gateway、cordis-api、cookbook、subsystems(46 个子系统页)…
|
|
20
|
+
│ └── en/ 英文站镜像(/deepseek-harness/en/...),结构同上
|
|
21
|
+
├── extra/ 仓库 docs/ 中未发布到站点的补充文档(开发参考)
|
|
22
|
+
│ ├── glossary.md 术语表(capability seam 等核心概念)
|
|
23
|
+
│ ├── defensive-patterns.md / testing.md / development.md / rescope.md …
|
|
24
|
+
│ ├── module-graph.md 模块依赖全景图(125KB)
|
|
25
|
+
│ ├── cookbook/ adding-a-vendored-package 等仓库内 cookbook
|
|
26
|
+
│ ├── upgrade-guide/ 各版本升级指南(0.1.7-rc.2 / 0.2.0-rc.2 …)
|
|
27
|
+
│ ├── persistence-changes/ 持久化格式变更记录(releases/、historical-formats/)
|
|
28
|
+
│ ├── subsystems/ 未发布进站点的子系统文档(boot / browser-use / ssh / otel …)
|
|
29
|
+
│ ├── postmortem/ 事故复盘
|
|
30
|
+
│ └── i18n/ 文档双语规范与术语
|
|
31
|
+
└── meta/
|
|
32
|
+
├── source.json 来源信息:仓库 commit、抓取时间、统计
|
|
33
|
+
└── site-pages.txt 线上站点页面清单(由投影结果生成,188 页)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 插件开发学习路径(从 `site/` 开始)
|
|
37
|
+
|
|
38
|
+
1. **第一个插件** — `site/develop/basic/index.md`(插件 = 导出 `apply(ctx)` 的模块,`ctx.effect()` 自动清理)
|
|
39
|
+
2. **开发一个 Tool** — `site/develop/basic/tool.md`(工具定义 DSL)
|
|
40
|
+
3. **插件配置** — `site/develop/basic/config.md`;**打包安装** — `site/develop/basic/publish.md`
|
|
41
|
+
4. **框架能力** — `site/develop/framework/index.md`(生命周期)、`service.md`(服务与依赖注入)、`events.md`(事件系统)
|
|
42
|
+
5. **Cordis 框架教程** — `site/develop/cordis-tutorial/`(7 章:插件/生命周期/服务/事件/配置/组合与热重载/进入 Harness)
|
|
43
|
+
6. **实战** — `site/develop/practice/index.md`(能力三层拆分)、`llm-adapter.md`、`dynamic-cordis.md`(运行时动态装配 Cordis)
|
|
44
|
+
7. **按需查阅** — `site/reference/`:
|
|
45
|
+
- 架构总览 `reference/index.md`;能力服务 `reference/capability-seams.md`;Agent 生命周期 `reference/agent-lifecycle.md`
|
|
46
|
+
- 插件配置目录 `reference/config-catalog.md`;Tool Schema 目录 `reference/tool-catalog.md`;持久化事件 `reference/persistence-catalog.md`;API Gateway `reference/api-gateway.md`(Typert Remote 方法/RPC 约定)
|
|
47
|
+
- Cordis API `reference/cordis-api/`(Context / Events / Fiber / Registry / Service / 继承接口面)
|
|
48
|
+
- Cookbook `reference/cookbook/`(新增 package / tool / LLM adapter / 设置卡片 / 扩展模式)
|
|
49
|
+
- 子系统 `reference/subsystems/`(core / scope / session / tools / shell / filesystem / subagent / sandbox / approval / conversation / slots / web-client … 共 46 页)
|
|
50
|
+
|
|
51
|
+
## 更新方法
|
|
52
|
+
|
|
53
|
+
**一键刷新(推荐)**:`npm run refresh-kb`(克隆上游 → 投影 → 覆盖 site/extra → 重建索引与元数据),
|
|
54
|
+
完成后 `npm run selfcheck` 自检。GitHub Action(`.github/workflows/refresh-kb.yml`)每周一自动执行同一
|
|
55
|
+
脚本,有变更即自动提交;README 顶部「kb sync」badge 数据来自 `meta/source.json`。
|
|
56
|
+
|
|
57
|
+
以下为手动步骤(理解流程 / 非 Windows 环境参考)。知识库与仓库 `master` 分支对齐
|
|
58
|
+
(见 `meta/source.json` 的 commit)。需要刷新时:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
# 1. 重新克隆仓库
|
|
62
|
+
git clone --depth 1 https://github.com/deepseek-ai/deepseek-harness.git <tmp>
|
|
63
|
+
|
|
64
|
+
# 2. 安装投影依赖(mdast 三个包)。仓库本身是 pnpm workspace(package.json 含
|
|
65
|
+
# workspace: 协议),npm 无法直接在其内安装;装到克隆目录的上级,Node 的 ESM
|
|
66
|
+
# 解析沿 node_modules 向上查找时即可命中。
|
|
67
|
+
cd <tmp>/.. && npm install --no-save --no-package-lock mdast-util-from-markdown mdast-util-gfm micromark-extension-gfm
|
|
68
|
+
|
|
69
|
+
# 3. 运行站点投影器(Node ≥ 22.19;24 默认启用 type stripping)。
|
|
70
|
+
# 上游已无 run-projector.ts,改为调用 scripts/project-doc-site.ts 的 projectDocs():
|
|
71
|
+
cd <tmp> && node --input-type=module -e "import('./scripts/project-doc-site.ts').then(m => { m.projectDocs(); console.log('projected') })"
|
|
72
|
+
# 输出到 website/.generated/
|
|
73
|
+
|
|
74
|
+
# 4. 用 website/.generated/ 覆盖本插件的 kb/site/;
|
|
75
|
+
# 用 <tmp>/docs/ 中未发布的 Markdown 刷新 kb/extra/(对照 website/docs.ts 的
|
|
76
|
+
# docsPages source/sourceAliases 集合求差集)
|
|
77
|
+
|
|
78
|
+
# 5. 在本插件根目录重新生成索引与 INDEX.md,并更新 meta/source.json 与统计
|
|
79
|
+
node scripts/rebuild-index.mjs
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
站点投影逻辑为仓库内 `website/docs.ts`(发布清单)+ `scripts/project-doc-site.ts`(链接重写/图片复制,由 `website/.vitepress/config.ts` 在构建时调用)。
|
|
83
|
+
|
|
84
|
+
## 统计
|
|
85
|
+
|
|
86
|
+
- 站点页面:192 个 Markdown,4 张图片
|
|
87
|
+
- 补充文档:554 个 Markdown(`extra/`)
|
|
88
|
+
- 来源 commit:`39163dd30f703a79079e2d2446545cff3c453738`(master,2026-11-14 同步)
|
package/kb/extra/AGENTS.md
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
# AGENTS.md — The documentation standard
|
|
2
|
-
|
|
3
|
-
This file defines document structure, Markdown tiers, writing rules, and `verify-doc-budgets` ceilings. Use [dsh-doc](../.agents/skills/dsh-doc/SKILL.md) for placement and validation, and [dsh-prose-standard](../.agents/skills/dsh-prose-standard/SKILL.md) for required coverage and editorial judgment; the [archived doc-tiers Agent Note](../.agents/notes/archived/process/2026-07-04-doc-tiers-and-budgets.md) records the historical rationale.
|
|
4
|
-
|
|
5
|
-
## Document structure
|
|
6
|
-
|
|
7
|
-
These rules apply to human-facing documentation; [Agent Notes](../.agents/notes/README.md) remain outside their scope. A [postmortem](postmortem/README.md) is an incident-scoped reference; chronology records evidence, not a teaching sequence. A document's subject and tree position fix its scope: describe its own subject at appropriate detail and direct children only by purpose, responsibility, and high-level behavior; link to the owning descendant for lower-level detail. Document type does not widen that scope. A reference may be exhaustive only about its own subject. Testing mechanisms, fixtures, and harnesses belong at the lowest owning level; higher documents link there.
|
|
8
|
-
|
|
9
|
-
Classify every in-scope document as a tutorial or reference. Tutorials follow an ordered path to an outcome and introduce only what each step needs. References define a lookup scope and current behavior without a teaching sequence. Separate substantial tutorial and reference content; label a section when either part is small.
|
|
10
|
-
|
|
11
|
-
Before writing a tutorial, privately classify the reader's starting knowledge and each concept as beginner, intermediate, or advanced. Establish prerequisites before dependent concepts, increase difficulty gradually, and move unnecessary advanced material to a later tutorial or reference.
|
|
12
|
-
|
|
13
|
-
Author in this order: locate the document in the tree; set its permitted detail; choose tutorial or reference; for a tutorial, order concepts by prerequisite and difficulty; relocate descendant-owned detail; replace lower-level explanations with links to their owners.
|
|
14
|
-
|
|
15
|
-
## The tier taxonomy: one home per fact
|
|
16
|
-
|
|
17
|
-
Each fact has one home: the tier whose job it is; elsewhere, link there.
|
|
18
|
-
|
|
19
|
-
| Tier | Job | Does NOT belong there |
|
|
20
|
-
|---|---|---|
|
|
21
|
-
| Root `AGENTS.md` | Standing orders: rules an agent needs in context in every session, one to three lines each, linking its home | Stories, worked examples, situational procedures, anything restated from a linked home |
|
|
22
|
-
| Subtree `AGENTS.md` (`packages/`, `docs/`, `.agents/notes/`) | Orders specific to that subtree | Repo-wide rules the root file already carries |
|
|
23
|
-
| [architecture.md](architecture.md) | Ordered map: composition, core packages, loop, seams, extension points; read before changing `packages/` | Type definitions (→ subsystems), per-package detail (→ package READMEs), decision rationale (→ Agent Notes), implementation-status annotations |
|
|
24
|
-
| [subsystems/](subsystems/README.md) | One reference page per subsystem: type definitions, semantics, and the generated Cordis API | Behavior narration (→ architecture.md) |
|
|
25
|
-
| [Agent Notes](../.agents/notes/README.md) | Active decision records: the why, what-was-given-up, and required verification; `implemented/` notes describe shipped reality in present tense | Migration plans, acceptance-task checklists, fixture walkthroughs, and spec-speak ("should…") once the decision has shipped; archived notes are frozen history, never current authority |
|
|
26
|
-
| [defensive-patterns/](defensive-patterns/README.md) | Rules this repository enforces in review, split by artifact: one general bug-class page plus per-domain pages | Type definitions and semantics (→ subsystems), decision rationale (→ Agent Notes) |
|
|
27
|
-
| [postmortem/](postmortem/README.md) | Incident stories — the only tier where war-story narrative belongs | — |
|
|
28
|
-
| [Persistence history](persistence-changes/README.md) and [format references](persistence-changes/historical-formats/README.md) | Type-change acknowledgements, release comparisons, and complete historical format schemas | Behavior-only changes; current runtime contracts |
|
|
29
|
-
| [cookbook/](cookbook/adding-a-package.md) | Step-by-step how-tos with numbered verify steps | Design rationale (→ the Agent Note each guide links) |
|
|
30
|
-
| [user/](user/index.md) | Product-facing guides published by the documentation website | Generated reference tables, contributor procedures, decision history |
|
|
31
|
-
| Package README | The per-package contract: config, semantics, limitations, extension points, and [Model Experience](cookbook/adding-a-package.md#4-write-the-package-readme) | JSDoc restatement, generated-catalog restatement (event/tool tables), other packages' concerns |
|
|
32
|
-
| [development.md](development.md) | Contributor setup, daily workflow, and a summary of CI; a bilingual pair under the [i18n contract](i18n/README.md) | Runtime/version rationale (→ Agent Notes), check-by-check lists that drift from `package.json` scripts |
|
|
33
|
-
| Generated reference: the per-page `cordis-surface` regions in [subsystems/](subsystems/README.md), the [Cordis core API + inherited tier](cordis-api/context.md), [tool-catalog](tool-catalog.md), [config-catalog](config-catalog.md), [persistence-catalog](persistence-catalog.md), [module-graph.md](module-graph.md), [cli-help](cli-help.md) | Exhaustive English sources regenerated from source and freshness-gated; reviewed Chinese counterparts follow the [pairing workflow](i18n/README.md#scope-and-exclusions) | Hand edits to generated English sources or regions; Chinese counterparts update through pairing only |
|
|
34
|
-
| Skills (`.agents/skills/`) | Reusable workflows and specialized decision standards | Product and runtime contracts (→ docs or source) |
|
|
35
|
-
|
|
36
|
-
Placement: bugs → postmortems; rationale → Agent Notes; procedures → cookbooks; type definitions → subsystems; package contracts → READMEs; standing orders → root `AGENTS.md` with a rationale link; review-enforced rules → `defensive-patterns/`.
|
|
37
|
-
|
|
38
|
-
## Writing rules
|
|
39
|
-
|
|
40
|
-
- **Document current state.** Keep history in commits, PRs, Agent Notes, postmortems, or scoped persistence records. Other prose names live mechanisms, not changes or stack positions. General Session-format prose links [version/status authority](session-format-status.md); retain numbers for version-specific contracts, examples, or evidence.
|
|
41
|
-
- **Apply the Agent Note creation criteria.** Mechanical/local edits are exempt, including local UI changes; keep existing owning notes accurate ([scope](../.agents/notes/README.md#when-to-write-one)).
|
|
42
|
-
- **One physical line per paragraph** (`verify-md-wrap`): use editor soft-wrap. Code blocks, tables, and list structure keep their formatting; code comments stay under the linter's column limit.
|
|
43
|
-
- **Fenced `ts` blocks must compile** (`doc-typecheck`); a pasted type declaration and its original JSDoc use ` ```ts type-equiv `, while a body-stripped public class declaration uses ` ```ts public-api `; register either in the manifest so neither can drift ([mechanics](development.md#documenting-types-verbatim-ts-type-equiv)).
|
|
44
|
-
- **The owning [subsystems page](subsystems/README.md) updates in the same change** that reshapes a documented type. `verify-type-equiv` catches drifted pastes, not never-documented new types; a type is documented on its declaring package group's page ([page scoping](../scripts/verify-subsystem-pages.ts)).
|
|
45
|
-
- **Pairs update together**: [Terminology-guided](i18n/terminology.md), single-pass active-agent work repositions first-use annotations, preserves untouched prose, and re-records; `dsh-translate-docs` remains user-invoked ([contract](i18n/README.md)).
|
|
46
|
-
- **Comments and JSDoc state complete contracts, not reasoning transcripts.** Preserve behavior, failure, timing, ownership, modality, exceptions, consequences, and non-obvious orientation; delete narration, test walkthroughs, review analysis, and code restatement. Keep the local contract and link its rationale. Use [dsh-prose-standard](../.agents/skills/dsh-prose-standard/SKILL.md) for details.
|
|
47
|
-
- Write directly: name actors and facts ([reference](../.agents/skills/dsh-prose-standard/SKILL.md)). Reserve `seam` for the defined capability. Name the exact check, type, API, operation, or behavior instead of metaphorical "gate", "vocabulary", or "surface".
|
|
48
|
-
|
|
49
|
-
## Wordcount Budgets
|
|
50
|
-
|
|
51
|
-
[scripts/doc-budgets.manifest.json](../scripts/doc-budgets.manifest.json) sets standing-doc ceilings; `pnpm run verify-doc-budgets` rejects excess or missing files.
|
|
52
|
-
|
|
53
|
-
When the gate goes red:
|
|
54
|
-
|
|
55
|
-
1. **Relocate** content that belongs in another tier; leave a one-line link if needed.
|
|
56
|
-
2. **Condense** content that belongs here but can be shorter.
|
|
57
|
-
3. **Raise** the ceiling only when the words need the space; justify the manifest diff in the PR. A too-low ceiling is a budget bug.
|
|
58
|
-
|
|
59
|
-
Ceilings are guardrails, not reduction targets. At or below target, retain at least 5% headroom; above target, freeze the ceiling until relocation or condensation brings the document under target. Lower a ceiling only when the document still has room. Targets: root `AGENTS.md` ≤ 2,080; `architecture.md` ≤ 2,400; subtree `AGENTS.md` ≤ 600, except `packages/AGENTS.md` ≤ 810 and this file ≤ 1,430; `packages/README.md` ≤
|
|
60
|
-
|
|
61
|
-
## The slop checklist
|
|
62
|
-
|
|
63
|
-
Hunt these in any doc; [dsh-doc](../.agents/skills/dsh-doc/SKILL.md) runs this list as an audit:
|
|
64
|
-
|
|
65
|
-
- Duplicated rules: search a distinctive phrase; keep one home and link the rest.
|
|
66
|
-
- History outside its permitted tier: state current facts and link the historical owner.
|
|
67
|
-
- Implementation-status annotations in prose or diagrams ("implemented!", "future: …"). Status rots; the repo layout and package manifests carry it.
|
|
68
|
-
- Hand-restated catalogs, JSDoc, or inventories of tests, packages, and status when source or a generator is authoritative.
|
|
69
|
-
- Reasoning transcripts: step-by-step implementation narration, proof of obvious branches, test walkthroughs, or rejected local alternatives. Keep the resulting contract or durable rationale; delete the path used to derive it.
|
|
70
|
-
- Rationale repeated beside sibling methods instead of once at the owning capability or helper.
|
|
71
|
-
- Paragraph walls: one paragraph carrying several rules and parenthetical asides. Split it or demote the detail to its home.
|
|
72
|
-
- Emphasis inflation: bold, CAPS, or "critically" everywhere means nothing stands out. Reserve emphasis for the clause that changes behavior.
|
|
73
|
-
- Spec-speak in `implemented/` Agent Notes: "should", migration plans, acceptance checklists. An implemented Agent Note describes what is, per the [implemented-note instructions](../.agents/notes/implemented/AGENTS.md).
|
|
74
|
-
|
|
75
|
-
## Repository references
|
|
76
|
-
|
|
77
|
-
Use relative Markdown links for current files and tags or PR numbers for historical references. `verify-md-links` checks local targets. [Reference validation](../scripts/verify-repository-references.ts) rejects commit identifiers containing a hexadecimal letter and disallowed organization URLs in maintained files. Decimal-only tokens are ignored to avoid collisions with numeric data, even when they identify commits.
|
|
1
|
+
# AGENTS.md — The documentation standard
|
|
2
|
+
|
|
3
|
+
This file defines document structure, Markdown tiers, writing rules, and `verify-doc-budgets` ceilings. Use [dsh-doc-writing](../.agents/skills/dsh-doc-writing/SKILL.md) for placement and validation, and [dsh-prose-standard](../.agents/skills/dsh-prose-standard/SKILL.md) for required coverage and editorial judgment; the [archived doc-tiers Agent Note](../.agents/notes/archived/process/2026-07-04-doc-tiers-and-budgets.md) records the historical rationale.
|
|
4
|
+
|
|
5
|
+
## Document structure
|
|
6
|
+
|
|
7
|
+
These rules apply to human-facing documentation; [Agent Notes](../.agents/notes/README.md) remain outside their scope. A [postmortem](postmortem/README.md) is an incident-scoped reference; chronology records evidence, not a teaching sequence. A document's subject and tree position fix its scope: describe its own subject at appropriate detail and direct children only by purpose, responsibility, and high-level behavior; link to the owning descendant for lower-level detail. Document type does not widen that scope. A reference may be exhaustive only about its own subject. Testing mechanisms, fixtures, and harnesses belong at the lowest owning level; higher documents link there.
|
|
8
|
+
|
|
9
|
+
Classify every in-scope document as a tutorial or reference. Tutorials follow an ordered path to an outcome and introduce only what each step needs. References define a lookup scope and current behavior without a teaching sequence. Separate substantial tutorial and reference content; label a section when either part is small.
|
|
10
|
+
|
|
11
|
+
Before writing a tutorial, privately classify the reader's starting knowledge and each concept as beginner, intermediate, or advanced. Establish prerequisites before dependent concepts, increase difficulty gradually, and move unnecessary advanced material to a later tutorial or reference.
|
|
12
|
+
|
|
13
|
+
Author in this order: locate the document in the tree; set its permitted detail; choose tutorial or reference; for a tutorial, order concepts by prerequisite and difficulty; relocate descendant-owned detail; replace lower-level explanations with links to their owners.
|
|
14
|
+
|
|
15
|
+
## The tier taxonomy: one home per fact
|
|
16
|
+
|
|
17
|
+
Each fact has one home: the tier whose job it is; elsewhere, link there.
|
|
18
|
+
|
|
19
|
+
| Tier | Job | Does NOT belong there |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Root `AGENTS.md` | Standing orders: rules an agent needs in context in every session, one to three lines each, linking its home | Stories, worked examples, situational procedures, anything restated from a linked home |
|
|
22
|
+
| Subtree `AGENTS.md` (`packages/`, `docs/`, `.agents/notes/`) | Orders specific to that subtree | Repo-wide rules the root file already carries |
|
|
23
|
+
| [architecture.md](architecture.md) | Ordered map: composition, core packages, loop, seams, extension points; read before changing `packages/` | Type definitions (→ subsystems), per-package detail (→ package READMEs), decision rationale (→ Agent Notes), implementation-status annotations |
|
|
24
|
+
| [subsystems/](subsystems/README.md) | One reference page per subsystem: type definitions, semantics, and the generated Cordis API | Behavior narration (→ architecture.md) |
|
|
25
|
+
| [Agent Notes](../.agents/notes/README.md) | Active decision records: the why, what-was-given-up, and required verification; `implemented/` notes describe shipped reality in present tense | Migration plans, acceptance-task checklists, fixture walkthroughs, and spec-speak ("should…") once the decision has shipped; archived notes are frozen history, never current authority |
|
|
26
|
+
| [defensive-patterns/](defensive-patterns/README.md) | Rules this repository enforces in review, split by artifact: one general bug-class page plus per-domain pages | Type definitions and semantics (→ subsystems), decision rationale (→ Agent Notes) |
|
|
27
|
+
| [postmortem/](postmortem/README.md) | Incident stories — the only tier where war-story narrative belongs | — |
|
|
28
|
+
| [Persistence history](persistence-changes/README.md) and [format references](persistence-changes/historical-formats/README.md) | Type-change acknowledgements, release comparisons, and complete historical format schemas | Behavior-only changes; current runtime contracts |
|
|
29
|
+
| [cookbook/](cookbook/adding-a-package.md) | Step-by-step how-tos with numbered verify steps | Design rationale (→ the Agent Note each guide links) |
|
|
30
|
+
| [user/](user/index.md) | Product-facing guides published by the documentation website | Generated reference tables, contributor procedures, decision history |
|
|
31
|
+
| Package README | The per-package contract: config, semantics, limitations, extension points, and [Model Experience](cookbook/adding-a-package.md#4-write-the-package-readme) | JSDoc restatement, generated-catalog restatement (event/tool tables), other packages' concerns |
|
|
32
|
+
| [development.md](development.md) | Contributor setup, daily workflow, and a summary of CI; a bilingual pair under the [i18n contract](i18n/README.md) | Runtime/version rationale (→ Agent Notes), check-by-check lists that drift from `package.json` scripts |
|
|
33
|
+
| Generated reference: the per-page `cordis-surface` regions in [subsystems/](subsystems/README.md), the [Cordis core API + inherited tier](cordis-api/context.md), [tool-catalog](tool-catalog.md), [config-catalog](config-catalog.md), [persistence-catalog](persistence-catalog.md), [module-graph.md](module-graph.md), [cli-help](cli-help.md) | Exhaustive English sources regenerated from source and freshness-gated; reviewed Chinese counterparts follow the [pairing workflow](i18n/README.md#scope-and-exclusions) | Hand edits to generated English sources or regions; Chinese counterparts update through pairing only |
|
|
34
|
+
| Skills (`.agents/skills/`) | Reusable workflows and specialized decision standards | Product and runtime contracts (→ docs or source) |
|
|
35
|
+
|
|
36
|
+
Placement: bugs → postmortems; rationale → Agent Notes; procedures → cookbooks; type definitions → subsystems; package contracts → READMEs; standing orders → root `AGENTS.md` with a rationale link; review-enforced rules → `defensive-patterns/`.
|
|
37
|
+
|
|
38
|
+
## Writing rules
|
|
39
|
+
|
|
40
|
+
- **Document current state.** Keep history in commits, PRs, Agent Notes, postmortems, or scoped persistence records. Other prose names live mechanisms, not changes or stack positions. General Session-format prose links [version/status authority](session-format-status.md); retain numbers for version-specific contracts, examples, or evidence.
|
|
41
|
+
- **Apply the Agent Note creation criteria.** Mechanical/local edits are exempt, including local UI changes; keep existing owning notes accurate ([scope](../.agents/notes/README.md#when-to-write-one)).
|
|
42
|
+
- **One physical line per paragraph** (`verify-md-wrap`): use editor soft-wrap. Code blocks, tables, and list structure keep their formatting; code comments stay under the linter's column limit.
|
|
43
|
+
- **Fenced `ts` blocks must compile** (`doc-typecheck`); a pasted type declaration and its original JSDoc use ` ```ts type-equiv `, while a body-stripped public class declaration uses ` ```ts public-api `; register either in the manifest so neither can drift ([mechanics](development.md#documenting-types-verbatim-ts-type-equiv)).
|
|
44
|
+
- **The owning [subsystems page](subsystems/README.md) updates in the same change** that reshapes a documented type. `verify-type-equiv` catches drifted pastes, not never-documented new types; a type is documented on its declaring package group's page ([page scoping](../scripts/verify-subsystem-pages.ts)).
|
|
45
|
+
- **Pairs update together**: [Terminology-guided](i18n/terminology.md), single-pass active-agent work repositions first-use annotations, preserves untouched prose, and re-records; `dsh-translate-docs` remains user-invoked ([contract](i18n/README.md)).
|
|
46
|
+
- **Comments and JSDoc state complete contracts, not reasoning transcripts.** Preserve behavior, failure, timing, ownership, modality, exceptions, consequences, and non-obvious orientation; delete narration, test walkthroughs, review analysis, and code restatement. Keep the local contract and link its rationale. Use [dsh-prose-standard](../.agents/skills/dsh-prose-standard/SKILL.md) for details.
|
|
47
|
+
- Write directly: name actors and facts ([reference](../.agents/skills/dsh-prose-standard/SKILL.md)). Reserve `seam` for the defined capability. Name the exact check, type, API, operation, or behavior instead of metaphorical "gate", "vocabulary", or "surface".
|
|
48
|
+
|
|
49
|
+
## Wordcount Budgets
|
|
50
|
+
|
|
51
|
+
[scripts/doc-budgets.manifest.json](../scripts/doc-budgets.manifest.json) sets standing-doc ceilings; `pnpm run verify-doc-budgets` rejects excess or missing files.
|
|
52
|
+
|
|
53
|
+
When the gate goes red:
|
|
54
|
+
|
|
55
|
+
1. **Relocate** content that belongs in another tier; leave a one-line link if needed.
|
|
56
|
+
2. **Condense** content that belongs here but can be shorter.
|
|
57
|
+
3. **Raise** the ceiling only when the words need the space; justify the manifest diff in the PR. A too-low ceiling is a budget bug.
|
|
58
|
+
|
|
59
|
+
Ceilings are guardrails, not reduction targets. At or below target, retain at least 5% headroom; above target, freeze the ceiling until relocation or condensation brings the document under target. Lower a ceiling only when the document still has room. Targets: root `AGENTS.md` ≤ 2,080; `architecture.md` ≤ 2,400; subtree `AGENTS.md` ≤ 600, except `packages/AGENTS.md` ≤ 810 and this file ≤ 1,430; `packages/README.md` ≤ 1,100; plus `cordis-primer.md` 600, `testing.md` 1,300, `examples/AGENTS.md` 310. Review governs unbudgeted tiers.
|
|
60
|
+
|
|
61
|
+
## The slop checklist
|
|
62
|
+
|
|
63
|
+
Hunt these in any doc; [dsh-doc-writing](../.agents/skills/dsh-doc-writing/SKILL.md) runs this list as an audit:
|
|
64
|
+
|
|
65
|
+
- Duplicated rules: search a distinctive phrase; keep one home and link the rest.
|
|
66
|
+
- History outside its permitted tier: state current facts and link the historical owner.
|
|
67
|
+
- Implementation-status annotations in prose or diagrams ("implemented!", "future: …"). Status rots; the repo layout and package manifests carry it.
|
|
68
|
+
- Hand-restated catalogs, JSDoc, or inventories of tests, packages, and status when source or a generator is authoritative.
|
|
69
|
+
- Reasoning transcripts: step-by-step implementation narration, proof of obvious branches, test walkthroughs, or rejected local alternatives. Keep the resulting contract or durable rationale; delete the path used to derive it.
|
|
70
|
+
- Rationale repeated beside sibling methods instead of once at the owning capability or helper.
|
|
71
|
+
- Paragraph walls: one paragraph carrying several rules and parenthetical asides. Split it or demote the detail to its home.
|
|
72
|
+
- Emphasis inflation: bold, CAPS, or "critically" everywhere means nothing stands out. Reserve emphasis for the clause that changes behavior.
|
|
73
|
+
- Spec-speak in `implemented/` Agent Notes: "should", migration plans, acceptance checklists. An implemented Agent Note describes what is, per the [implemented-note instructions](../.agents/notes/implemented/AGENTS.md).
|
|
74
|
+
|
|
75
|
+
## Repository references
|
|
76
|
+
|
|
77
|
+
Use relative Markdown links for current files and tags or PR numbers for historical references. `verify-md-links` checks local targets. [Reference validation](../scripts/verify-repository-references.ts) rejects commit identifiers containing a hexadecimal letter and disallowed organization URLs in maintained files. Decimal-only tokens are ignored to avoid collisions with numeric data, even when they identify commits.
|