deepseek-harness
AGENTS.md289k starsChanged 4 months agoMITView on GitHub
DeepSeek Harness is an all-plugin Cordis agent harness. Read docs/architecture.md before changing packages/; follow docs/AGENTS.md for documentation. Public APIs are pre-stable; update every consumer. Follow version/status and type acknowledgements. Adjacent migration may add a version-named successor but never move, overwrite, or delete committed generations; predecessors imply neither fallback nor downgrade support. SQLite uses monotonic SCHEMA_VERSION. Acknowledge declared persistence-type changes. Record each externally perceptible breaking change immediately in an upgrade guide. Application launch. Only dsh profiles launch supported Node apps; package…
- Reads credentials
- Installs packages
Trending
Steady talk.about the whole repository
Who's talking about deepseek-ai/deepseek-harness
- @timkellogg.me“DeepSeek Harness v0.1 the idea is everything is a plugin — models, tools, sessions, skills, sandboxes, …”Bluesky · Aug 13, 2026 · 77 likes
- pingdotgg/t3code“Is DeepSeek Harness provider support something you'd want?”GitHub · Aug 17, 2026 · 31 reactions
- farion1231/cc-switch“可以尝试兼容Deepseek Harness吗”GitHub · Aug 13, 2026 · 21 reactions
- @midu.dev“¡DeepSeek hace de código abierto su Agent Harness! 144.000 estrellas en 4 días. Todo lo cambias a base de …”Bluesky · Aug 17, 2026 · 18 likes
- Javis603/token-monitor“希望增加DSH(DeepSeek Harness)的用量统计支持”GitHub · Aug 13, 2026 · 9 reactions
The biggest 5 of 66 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 66
Talked about on GitHub, Bluesky and Hacker News (66 times).
On GitHub · 50
- Aug 17, 2026Is DeepSeek Harness provider support something you'd want? — pingdotgg/t3code31 reactions · 16 comments
- Aug 13, 2026可以尝试兼容Deepseek Harness吗 — farion1231/cc-switch21 reactions · 25 comments
- Aug 13, 2026希望增加DSH(DeepSeek Harness)的用量统计支持 — Javis603/token-monitor9 reactions · 1 comment
- Aug 22, 2026`npm install -g @deepseek-harness-tui/dsh-tui` 在 npm 12 崩溃:`Cannot read properties of null (reading 'children')` — ccch1mneyyy/dsh-TUI7 reactions · 6 comments
- Aug 17, 2026Feature Request: Please add DeepSeek Harness as an Agent harness — block/buzz6 reactions · 1 comment
45 more on GitHub
- Aug 13, 2026package request: deepseek-harness(dsh) — numtide/llm-agents.nix4 reactions · 5 comments
- Aug 13, 2026[Feature] Add DeepSeek Harness as a first-class client integration — lidge-jun/opencodex3 reactions · 3 comments
- Oct 22, 2026[Engine] Engine crashes unexpectedly (exit code 1 / 3221226505) during DeepSeek Harness session on Windows 11 — Niko1221/Strata2 reactions · 3 comments
- Oct 14, 2026免费模型不可用,附D老师给的解决方法,自测恢复,望修复 — Ebony-Vinyl/dsh-our-free-model2 reactions · 8 comments
- Sep 29, 2026Make Codacy reviews available to every MDE coding agent — amoai-tech/mdeai2 reactions · 7 comments
- Sep 6, 2026[Bug] DeepSeek Harness "startup timed out" with dsh 0.1.2-rc.1 (readiness check incompatible) — CherryHQ/cherry-studio2 reactions · 2 comments
- Aug 31, 2026合作邀请:Blue TUI 生态适配(适配工作我们来做) — dream12347/dsh-session-manager2 reactions · 5 comments
- Aug 21, 2026[Bug]: DeepSeek Harness (dsh web) auto-opens system browser — Cherry should pass --no-open — CherryHQ/cherry-studio2 reactions · 1 comment
- Aug 17, 2026dsh: Needs `/bin/bash` to be present — numtide/llm-agents.nix2 reactions · 1 comment
- Nov 25, 2026[Integrations] DeepSeek Harness (dsh) tracing plugin — traceroot-ai/traceroot1 reaction · 3 comments
- Nov 25, 2026feat: 支持 DSH 0.2.3 的 MCP 工具按需加载(toolLoading)与 catalogDescriptionMaxLength — Fishquito7/dsh-skill-mcp-panel1 reaction
- Nov 18, 2026chore: validate novel workspace on DSH 0.2.2-rc.4 — Stahl-G/dsh-novel-workspace1 reaction · 1 comment
- Nov 12, 2026fix: restore agent status with Harness session catalog API — wxcvm/dsh-purge1 reaction · 1 comment
- Nov 10, 2026建议:`label` 按 SlotLabel 契约返回字符串 —— 当前返回 React 元素会让 DSH 0.2.2-rc.1 整个会话头部渲染崩溃 — cirelir/dsh-change-review1 reaction
- Nov 6, 2026Sign the DeepSeek Harness and Kimi Code through their own accounts — storytold/craft-anything1 reaction · 2 comments
- Nov 4, 2026Check plugin against DSH 0.2.2-rc.1 — JonyFang/dsh-plugin-custom-profile1 reaction · 1 comment
- Oct 28, 2026chore(deps): 升级 dsh peers 到 0.2.1-rc.4 / upgrade dsh peers to 0.2.1-rc.4 — btspoony/mstar-harness1 reaction · 2 comments
- Oct 13, 2026docs(dsh): select synchronization by host capability — mindfold-ai/marketplace1 reaction · 2 comments
- Oct 11, 2026Add umialpha/dsh-session-groups (alpha source preview) — imsai-sh/awesome-deepseek-harness-plugins1 reaction · 2 comments
- Oct 7, 2026replan(解决)的硬 cancel 触发 DSH 0.2.x turn/end reason:null,导致对话区永久空白——建议默认软 steer — PC2005-cloud/dsh-pet1 reaction · 1 comment
- Sep 30, 2026[Request]: DeepSeek Harness Desktop Preview — ScoopInstaller/Versions1 reaction · 2 comments
- Sep 29, 2026chore(deps): 升级 dsh peers 到 0.2.0-rc.2 / upgrade dsh peers to 0.2.0-rc.2 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 24, 2026feat(adapters): add a DeepSeek Harness adapter with a full hook bridge — affaan-m/ECC1 reaction · 46 comments
- Sep 16, 2026fix(llm): 将会话头限定到 OpenCode 路由,避免发给无关 provider — dsh-tauri/deepseek-harness-desktop1 reaction · 1 comment
- Sep 14, 2026支持官方 v3 会话日志计量 — le-soleil-se-couche/dsh-token-cost1 reaction · 1 comment
- Sep 11, 2026chore(deps): 升级 dsh peers 到 0.1.5-rc.2 / upgrade dsh peers to 0.1.5-rc.2 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 10, 2026Some cases that RTL is not working as expected + Visual Examples — kfirsch/dsh-hebrew-rtl1 reaction · 1 comment
- Sep 10, 2026chore(deps): 升级 dsh peers 到 0.1.5-rc.1 / upgrade dsh peers to 0.1.5-rc.1 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 9, 2026chore(deps-dev): bump the deepseek-harness group across 1 directory with 2 updates — blaxel-ai/deepseek-harness-blaxel-sandbox1 reaction · 1 comment
- Sep 4, 2026chore(dsh): 升级 dsh host 线到 0.1.3-alpha.1 / upgrade dsh host line to 0.1.3-alpha.1 — btspoony/mstar-harness1 reaction · 2 comments
- Sep 3, 2026chore(deps): bump the deepseek-harness group with 4 updates — blaxel-ai/deepseek-harness-blaxel-sandbox1 reaction · 1 comment
- Sep 3, 2026chore(dsh): 升级 dsh host 线到 0.1.2-rc.1 / upgrade dsh host line to 0.1.2-rc.1 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 2, 2026chore(dsh): 升级 dsh host 线到 0.1.2-alpha.5 / upgrade dsh host line to 0.1.2-alpha.5 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 2, 2026chore(dsh): 升级 dsh host 线到 0.1.2-alpha.4 / upgrade dsh host line to 0.1.2-alpha.4 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 1, 2026chore(dsh): 升级 dsh host 线到 0.1.2-alpha.3 / upgrade dsh host line to 0.1.2-alpha.3 — btspoony/mstar-harness1 reaction · 1 comment
- Aug 30, 2026chore(dsh): 升级 dsh host 线到 0.1.2-alpha.2 / upgrade dsh host line to 0.1.2-alpha.2 — btspoony/mstar-harness1 reaction · 1 comment
- Aug 29, 2026合作邀请:Blue TUI 生态适配(适配工作我们来做) — zh667/TokenLedger1 reaction · 5 comments
- Aug 27, 2026chore(dsh): 升级 dsh host 线到 0.1.2-alpha.1 / upgrade dsh host line to 0.1.2-alpha.1 — btspoony/mstar-harness1 reaction · 1 comment
- Aug 27, 2026🌱 Show official DeepSeek Harness logo — sesori-ai/sesori_apps_monorepo1 reaction · 2 comments
- Aug 26, 2026Feature Request: Add support for DeepSeek Harness — sodiumsun/agenttrail1 reaction · 1 comment
- Aug 22, 2026[Compatibility] DSH Desktop built-in Market cannot load this catalog under fake-IP DNS proxies (client-side blocked-address) — imsai-sh/dsh-1024store1 reaction
- Aug 21, 2026chore(dsh): upgrade dsh host line to 0.1.1-rc.2 — btspoony/mstar-harness1 reaction · 1 comment
- Aug 19, 2026docs(blog): Cordisの時空間合成可能性を解説 — penpenguin/portfolio1 reaction
- Aug 17, 2026MIM-164 提供可复用的代码熵回收 Skill — gaixianggeng/codex-skills1 reaction
- Aug 14, 2026【功能请求】 支持 dsh(deepseek-harness) — crafter-station/petdex1 reaction · 2 comments
On Bluesky · 13
- Aug 13, 2026DeepSeek Harness v0.1 the idea is everything is a plugin — models, tools, sessions, skills, sandboxes, loops, … github.com/deepseek-ai/... — @timkellogg.me77 likes and reposts · 7 replies
- Aug 17, 2026¡DeepSeek hace de código abierto su Agent Harness! 144.000 estrellas en 4 días. Todo lo cambias a base de plugins: El modelo, las tools, el… — @midu.dev18 likes and reposts · 1 reply
- Aug 13, 2026github.com/deepseek-ai/... — @sungkim.bsky.social5 likes and reposts
- Aug 29, 2026github.com/deepseek-ai/... I haven't used it myself but idk I'd consider this a "first party harness" I guess. — @itisamystery.com4 likes and reposts · 2 replies
- Aug 19, 2026DeepSeek Harness github.com/deepseek-ai/... A Programming Paradigm for Spatiotemporal Composability github.com/cordiverse/p... Interesting… — @inamiy.bsky.social3 likes and reposts
8 more on Bluesky
- Aug 14, 2026maybe this? github.com/deepseek-ai/... — @bisks.net3 likes and reposts · 2 replies
- Nov 14, 2026DeepSeek open-sourced an agent harness where everything is a plugin, and it launches with one npx command. 🔗… — @prosperflowio.bsky.social2 likes and reposts
- Sep 13, 2026GitHub - deepseek-ai/deepseek-harness: DeepSeek Harness: Everything is a Plugin. https://github.com/deepseek-ai/deepseek-harness — @tech-trending.bsky.social1 likes and repost
- Aug 23, 2026github.com/deepseek-ai/... it's real check it out, they're linking the paper — @daniel-j-h.bsky.social1 likes and repost
- Aug 13, 2026DeepSeek Harness https://github.com/deepseek-ai/deepseek-harness — @hnbot.gsuscs.xyz1 likes and repost
- Aug 13, 2026github.com/deepseek-ai/... 5分钟前还是 404 的,现在打开已经 700 多星了 抢票呢你们? — @icecodenew.bsky.social1 likes and repost
- Aug 14, 20265. Writer Launches New GLM-5.2 Based Model for Lower Token Costs LINK 6. DeepSeek Releases Open-Source Agent Harness LINK — @hackobar.bsky.social0 likes and reposts · 1 reply
- Aug 14, 2026DeepSeek acaba de soltar su propio Claude Code: DeepSeek Harness, open source. 82K⭐ en GitHub el primer día. Repo aquí — @lluis154.bsky.social0 likes and reposts · 1 reply
On Hacker News · 3
- Aug 21, 2026DeepSeek harness: what doors does config over code open?3 points · 1 comment
- Nov 14, 2026Everything is a plugin (to the model context)2 points
- Aug 18, 2026DeepSeek Harness1 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository63 other files it gives its agents.
- .agents/notes/AGENTS.mdAGENTS.md
- .agents/notes/archived/AGENTS.mdAGENTS.md
- .agents/notes/implemented/AGENTS.mdAGENTS.md
- apps/cli/tests/profiles/AGENTS.mdAGENTS.md
- benchmarks/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- native/system/AGENTS.mdAGENTS.md
- packages/AGENTS.mdAGENTS.md
- packages/client/AGENTS.mdAGENTS.md
- packages/experimental/AGENTS.mdAGENTS.md
- packages/schedule/AGENTS.mdAGENTS.md
- packages/web/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- snapshots/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-budget-chains/workspace/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-budget-chains/workspace/.dsh/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-budget/workspace/.agents/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-budget/workspace/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-budget/workspace/.dsh/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-group-failure/workspace/.agents/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-group-failure/workspace/.dsh/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions/workspace/.agents/AGENTS.mdAGENTS.md
- snapshots/session/ptc-workspace-context-scoped/workspace/AGENTS.mdAGENTS.md
- snapshots/session/ptc-workspace-context-scoped/workspace/nested/AGENTS.mdAGENTS.md
- snapshots/session/ptc-workspace-context/workspace/AGENTS.mdAGENTS.md
- snapshots/session/ptc-workspace-context/workspace/nested/AGENTS.mdAGENTS.md
- website/AGENTS.mdAGENTS.md
- agent-experienceSkill
- cordis-styling-nitpickingSkill
- dsh-archive-agent-notesSkill
- dsh-ci-test-reliabilitySkill
- dsh-client-ui-uxSkill
- dsh-code-reviewSkill
- dsh-create-upgrade-guideSkill
- dsh-cua-macos-signingSkill
- dsh-doc-writingSkill
- dsh-error-handlingSkill
- dsh-find-simplificationsSkill
- dsh-merging-stacked-prsSkill
- dsh-official-plugin-artworkSkill
- dsh-pr-descriptionSkill
- dsh-pre-push-checksSkill
- dsh-prose-standardSkill
- dsh-responsive-uiSkill
- dsh-session-projectionSkill
- dsh-speed-up-perfSkill
- dsh-translate-docsSkill
- dsh-trim-cot-leakageSkill
- record-browser-gifSkill
- dingtalkSkill
- feishuSkill
- tencent-meetingSkill
- wecomSkill
- preview-tourSkill
- dsh-docSkill
- diagnose-windows-sandbox-aclSkill
- officeSkill
- dingtalk-sharedSkill
- editing-cordis-compositionsSkill
- The first 60 shown.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 11 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 13
Application launch: Only dsh profiles launch supported Node apps.
- Very specific: line 113
If a required gh, pnpm, build, test, or generator command fails because the sandbox blocks credentials, network, IPC, watching, or nested …
- Very specific: line 117
Before pushing, follow dsh-pre-push-checks.
- Distinctive: line 120
Never default to the full suite or repeat a passing check for commit or push.
- Very specific: line 135
Registrations are effects: every contribution goes through ctx.effect() / ctx.on().
- Distinctive: line 140
Session projections: follow dsh-session-projection when creating, extending, or reviewing one, or migrating a fold helper to one.
- Distinctive: line 143
Prefer maintained dependencies over hand-rolling: when they genuinely delete owned code and tests (policy).
- Distinctive: line 148
Trust TypeScript at typed same-process boundaries: Do not add runtime validation, fallback behavior, or hostile-input tests solely for …
- Very specific: line 152
Error handling: use typed, structured failures and localized, actionable reports.
- Distinctive: line 154
Keep comments local: Do not restate code, expand unrelated comments, or explain distant behavior without local need (rationale).
- Distinctive: line 159
Official plugin artwork: use dsh-official-plugin-artwork for official and official experimental plugin icons.
- Distinctive: line 161
UI changes: use dsh-client-ui-ux as the design and review entry point.
- Distinctive: line 162
PR previews show the change: when a PR changes Session content rendering, such as a message kind or a very long table, that the preview …
- Distinctive: line 169
PR descriptions: write and update every PR description with dsh-pr-description.
- Distinctive: line 175
Before finishing, self-review against DSH Core Guidelines.
- Distinctive: line 177
Read docs/defensive-patterns/README.md before changing a package surface, remote service, client component or state, conversation or …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
DeepSeek Harness is an all-plugin Cordis agent harness. Read docs/architecture.md before changing packages/; follow docs/AGENTS.md for documentation.
Pre-stable APIs and released Session data
Public APIs are pre-stable; update every consumer. Follow version/status and type acknowledgements. Adjacent migration may add a version-named successor but never move, overwrite, or delete committed generations; predecessors imply neither fallback nor downgrade support. SQLite uses monotonic SCHEMA_VERSION.
Acknowledge declared persistence-type changes.
Record each externally perceptible breaking change immediately in an upgrade guide.
Application launch. Only dsh profiles launch supported Node apps; package bins, demos, and public SDK argv escapes are forbidden (rule).
Repository layout
vendor/ Vendored Cordis (vendor/README.md)
packages/ @deepseek-ai/dsh-<pkg> workspaces at packages/<group>/<pkg>/
core/ agent/session API
api/ remote BFF
typert/ type graphs
llm/ model providers
shell/ command execution
subprocess/ child-process management
ssh/ SSH execution providers
terminal/ persistent terminals
ptc-runtime/ PTC execution
sandbox/ process confinement
deliverables/ turn deliverables
fs/ filesystem access
lsp/ language servers
skill/ skill loading
web/ search/fetch tools
computer-use/ computer interaction
browser-use/ browser interaction
compaction/ context compaction
context/ request context
subagent/ delegated agents
team/ shared task coordination
jobs/ background jobs
bundle/ profile bundles
workflow/ workflow execution
todo/ todo_write tool
plan/ logged planning
goal/ session goals
schedule/ scheduled follow-ups
preset/ agent composition
guard/ loop/tool guards
extensions/ runtime self-modification
session/ durable sessions
session-query/ browsing/search/export
attachment/ binary attachments
spill/ output spill
storage/ non-session storage
workspace/ workspace entities
feedback/ human feedback
identity/ anonymous identity
settings/ user settings
credentials/ credentials/authorization
account/ DeepSeek
acp/ automation-only ACP
interaction/ human interaction
boot/ application boot
sdk/ JSON-RPC SDK
host/ GUI host
client/ GUI client
mcp/ external tools
experimental/ evaluated capabilities without a product-support commitment
test-support/ test infrastructure
util/ zero-dependency utilities
python/ Python SDK/runtime (python/README.md)
native/ @deepseek-ai/node-addon-system source (native/README.md)
benchmarks/ performance gates
.agents/ Agent workflows/notes
docs/ Documentation (docs/AGENTS.md)
scripts/ gates and generators
website/ VitePress documentation projectionPackage groups: packages/README.md. Experimental status is independent of optional delivery; nonexperimental packages need product use or an explicit classification.
Commands
pnpm install # node ^24.22.3 || >=26.13.1
pnpm run clean # remove build outputs and safe residue from deleted packages
pnpm run test # unit tests
pnpm run test:coverage # CI coverage gate: per-file 100% on packages/*/*/src
pnpm run test:e2e # real-API tests; self-skip without DEEPSEEK_API_KEY
pnpm run test:expected # owner-local process expectations
pnpm run test:snapshot # keyless recorded-session replay through shipped profiles; filter: -t <name>
pnpm run test:snapshot:record # re-record expected outputs (needs key)
pnpm run typecheck
pnpm run lint
pnpm run duplication # cross-file TypeScript clone detection
pnpm run build # build:artifacts + build:check, concurrently
pnpm run build:artifacts # artifacts: tsc emits lib/types, tsdown bundles runtime, Web
pnpm run build:check # typecheck aggregate tests/scripts against current build:artifacts output
pnpm run hygiene # publint + workspace/package/dependency checks + NodeNext consumer check
pnpm run check:windows-wine # ONLY when diagnosing a known Windows failure (needs wine); CI owns this signal
pnpm run doc-sync # documentation gates (scripts/run-gates.ts)
pnpm run test:docs # quick documentation checks (no build; doc-quick aggregate)
pnpm run website:build # VitePress build (doubles as dead-link check)
pnpm dsh --profile headless "task" # run one task from source (needs DEEPSEEK_API_KEY)
pnpm run demo:ptc -- "task" # headless PTC mode run (needs key)
pnpm run dev:web | dev:desktop # build:artifacts, then launch; Web also rebuilds client bundles on edits. start:web | start:desktop skip the build
make web|dev-web|desktop|dev-desktop|build # the same commands; ARGS='--no-open' forwards optionsHost sandbox failures
If a required gh, pnpm, build, test, or generator command fails because the sandbox blocks credentials, network, IPC, watching, or nested sandbox-exec, retry unchanged with the narrowest host escalation. Require sandbox evidence; never bypass test failures or the product sandbox.
Run relevant checks locally
Before pushing, follow dsh-pre-push-checks; report only commands run. After gh stack sync, validate immediately; do not merge before checks pass.
- Match evidence to the surface: focused behavior tests, model/user-output snapshots,
doc-syncfor docs, built smokes for published paths, and real-API e2e for providers. - Never default to the full suite or repeat a passing check for commit or push. CI owns exhaustive coverage and the platform matrix; rehearse all locally only by explicit request, for CI diagnosis, or for an irreducibly repository-wide change.
test:coverage, nottest, is the CI coverage gate (why).- Develop with
build:artifacts; before claiming completion, runbuild:checkafter the latestbuild:artifacts, orbuild(layout). - Web browser automation and GIF recording: launch with
pnpm dsh web --patch apps/web/tests/pin-browse-picker.overlay.ymlto use the in-page directory picker; omit this override only when testing native picker behavior explicitly.
Secrets / .env
Windows packaging/signing: required reading.
Real-API tests/demos read DEEPSEEK_API_KEY, optional DEEPSEEK_BASE_URL, and root .env. cordis.yml allows !!js (never !js) under plugin config and entry disabled; other metadata stays literal, so conditional composition also uses overlays (primer). Never commit credentials. CI e2e skips without a key; testing.md owns key policy.
Conventions
- Packages use
@deepseek-ai/dsh-<name>; vendor is rescoped and published. Harness packages declare@deepseek-ai/cordisinpeerDependencies/devDependencies. Workspace dependency sections use DSHworkspace:*, vendor/nativeworkspace:~(rules). - ESM everywhere (
"type": "module"). Use package names across packages and.tsin local relative imports. Config subprocesses run builtlib/under plain Node; source regressions use their declared launcher (testing policy). ThedshCLI source launch runs through tsx's ESM-only hook (node --import tsx/esm); modules it reaches must stay ESM (no CJS-only exports) (source-launch contract). Raw/Webcordis.ymlbare plugins must appear in their resolver manifest'sdependencies;verify-cordis-configenforces it. - Registrations are effects: every contribution goes through
ctx.effect()/ctx.on(); a registry'sregister()returns the disposer, directly or through its documented registration handle. - Typed events use declaration merging and merge-extensible maps. Event JSDoc needs
@modeand payload@param. Public service methods document parameters and non-void returns.SessionEventMapmembers are required-on-read unless the envelope carriesignorable: true. BumpSESSION_FORMAT_VERSIONonly when existing discriminators cannot prevent unsafe interpretation; same-version changes require safe reader behavior (review). - Switch on discriminant tags. Closed unions end in
assertNever; merge-extensible unions fall through a documented default. - Waterfall listeners MUST call
next()to delegate; returning without it short-circuits the chain (semantics). - Model-visible ⟺ logged: anything that reaches a model request must be reconstructable from the session log; a new model-visible input requires a session event.
- Session projections: follow dsh-session-projection when creating, extending, or reviewing one, or migrating a fold helper to one.
- Plugins, not loop changes: new behavior goes on documented extension points; changing
agent-looprequires updating docs/architecture.md. - A capability seam comprises Service Definition / Service Provider / Consumer roles. It is complete, never one role; split only when roles evolve independently (glossary).
- Prefer maintained dependencies over hand-rolling when they genuinely delete owned code and tests (policy).
- Explicit > implicit at package boundaries: defaulting is an explicit
resolve(request): Specstep in the owning implementation, never a hidden?? defaultinsiderun()(thedsh-shellrequest/spec split is the template). - No hardcoded tunables in plugins: deployment-varying choices are validated
Configfields changeable from cordis.yml; aDEFAULT_*constant or test hook is not configurability. Protocol constants, external specs, and security invariants stay fixed. - Misconfiguration fails loud at load when self-contained, otherwise at the earliest resolvable point; never silently skip a missing referent.
- Opaque cross-boundary ids are branded (
Branded<B>fromdsh-brand), never barestring. - Trust TypeScript at typed same-process boundaries. Do not add runtime validation, fallback behavior, or hostile-input tests solely for values the static interface requires; validate at parser/config, queued, model/tool JSON, durable/file, worker, process, and wire boundaries.
- No new assertions to
unknown(as unknownor<unknown>). Preserve or reduce the exact legacy baseline; use typed values or validation for replacements (rule). - Source plane vs artifact plane, never mixed. Static gates and tests resolve workspace imports through tsconfig
pathstosrcand pass on a clean tree; gates consuming builtlib/declare that dependency (layout). - Keep compiler faces explicit. A package with both Host and Client programs exposes face-specific leaf configs and a solution-only root; repo-wide programs seed a face config, never the root solution (layout).
- Error handling: use typed, structured failures and localized, actionable reports. Coded errors and expected tool failures use
HarnessError. Define handling ownership, containment, and failure guarantees; stop dependent work and visibly report untrusted state or unknown outcomes. Follow dsh-error-handling. - An empty
catchnames the error and why; keep itstryto one statement (checker). - Keep comments local. Do not restate code, expand unrelated comments, or explain distant behavior without local need (rationale).
- Ban
prove+nance(rule). - Prefer symmetry for parallel values; unexplained asymmetry usually signals a missed extraction.
- Tests describe behavior, not correctness. Change obsolete behavior with its tests; explain why in the PR.
- Create Agent Notes only for durable decision rationale; mechanical/local edits are exempt, including local UI changes (scope). Archived notes are frozen: never edit or treat them as current authority (archive policy).
- Official plugin artwork: use dsh-official-plugin-artwork for official and official experimental plugin icons; obtain designer approval before landing new glyphs.
- Client UI copy is locale-owned. Route product text through typed dictionaries and
tor localized primitive props;verify-client-ui-i18nrejects hardcoded copy (decision). English copy, including plugin titles, uses sentence case (rule). - UI changes: use dsh-client-ui-ux as the design and review entry point; load its references only as needed.
- PR previews show the change: when a PR changes Session content rendering, such as a message kind or a very long table, that the preview showcase lacks, add that content to its generator and current fixture files.
- Testing policy — docs/testing.md. Every non-trivial model- or product-user-visible change updates a keyless recorded-session snapshot; snapshot ownership reserves the top-level tree for session-driven cases and keeps other expected output owner-local. Fixtures replay on macOS/Linux; fix fixtures, not normalizers.
- Design each tool's UI presentation up front. Host presenters stay pure; Web cards derive from raw events and persisted result metadata (cookbook).
- Plan unit, e2e, and snapshot coverage for capability seams, lifecycle paths, and transcript output; include missing snapshot-harness support in the same change.
- Both SDKs project the loop. Agent-loop, session-lifecycle, and
SessionEventMapchanges update the TypeScript and Python SDK expected outputs in the same PR;pnpm run testcovers neither (surfaces). - Choose PR history deliberately. Split independent changes and fix the introducing PR before propagation. Rebase branches with
rerere.enabled; merge-forward only on the PR author's explicit request, keeping in-progress checkpoints. Rewrites use--force-with-lease, abort on remote movement, never raw--force(rationale). - Labels: one PR
kind/*, all materialarea/*, and native Issue Type (taxonomy). - PR descriptions: write and update every PR description with dsh-pr-description.
- TODO markers:
FIXME/TODO/XXXby urgency (semantics). - Files end with exactly one trailing newline; pre-commit and CI gate it with
git diff --check.
Review rules
Before finishing, self-review against DSH Core Guidelines.
Read docs/defensive-patterns/README.md before changing a package surface, remote service, client component or state, conversation or Session behavior, or lifecycle, concurrency, subprocess, and teardown code.
Type safety and documentation
Everything compiles under strict: true with noImplicitAny; every remaining any explains why narrowing is infeasible. Every module and export has concise JSDoc for its non-obvious contract; function-like exports include @param/@returns, as enforced by verify-export-jsdoc. Heritage-declared members, plugin-protocol slots, and constructors keep their docs at the declaring Service Definition, protocol, or class.
Comments and docs state complete contracts and context, not reasoning transcripts. Use direct, concrete terms. Do not use metaphors. Before writing contract, boundary, or shape, ask whether a more exact term names the subject: write response fields, JSON validation, or ESM exports instead of response shape, validation boundary, or module shape. Keep contract for preconditions, postconditions, invariants, compatibility promises, and other obligations that callers, callees, implementers, providers, producers, or consumers rely on. Keep a literal process, wire, security, transaction, or lifecycle boundary. Do not narrate control flow or tests, preserve review history, or restate code. Keep behavior, failure, timing, ownership, and safe-use facts; link the rationale. Use dsh-prose-standard for decisions. Wire mechanically checkable invariants into an executed top-level gate and prove each changed acceptance path rejects an invalid case. Use narrow, justified exceptions instead of disabling a rule globally.
Docs accompany every code change: update affected README and JSDoc contracts together. Routine bilingual work follows docs/AGENTS.md; only explicit user invocation may run dsh-translate-docs. Current-state prose, one physical line per paragraph, one home per fact, and word budgets live there.
Editing these instructions
CLAUDE.md symlinks AGENTS.md at root and packages/; edit the real file. Keep each rule self-contained while linking high-level docs. Condense when clarity survives; raise a verify-doc-budgets ceiling when the required content needs more space.
Vendoring policy
vendor/ packages are pinned source copies (manifest with upstream SHAs in vendor/README.md). Update via the sync procedure there; re-apply or retire the logged local modifications; rerun pnpm run test && pnpm run build.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

