Merge pull request #8820 from deepseek-harness/turtle/core-guidelines-scope/dsh-core-guidelines-83ad6c5e5a01

docs: state the status and scope of DSH Core Guidelines
This commit is contained in:
Turtle authored and GitHub committed 2026-11-19 17:12:15 +08:00
commit 6e2fa257f0
4 files changed
+24 -5

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ Each fact has one home: the tier whose job it is; elsewhere, link there.
| [subsystems/](subsystems/README.md) | One reference page per subsystem: type definitions, semantics, and the generated Cordis API | Behavior narration (→ architecture.md) |
| [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 |
| [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), design rules for writing code (→ core-guidelines/) |
| [core-guidelines/](core-guidelines/README.md) | Numbered design rules for writing code, one file per area (general, frontend, backend, data exchange), in the format its rule G.1 defines | Review checks for one artifact's known bug classes (→ defensive-patterns/) |
| [core-guidelines/](core-guidelines/README.md) | Numbered design rules for writing code, one file per area (general, frontend, backend, data exchange), in the format its rule G.1 defines | Business-domain rules (→ package READMEs, subsystems/, Agent Notes); artifact bug-class checks (→ defensive-patterns/) |
| [postmortem/](postmortem/README.md) | Incident stories — the only tier where war-story narrative belongs | — |
| [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 |
| [cookbook/](cookbook/adding-a-package.md) | Step-by-step how-tos with numbered verify steps | Design rationale (→ the Agent Note each guide links) |
+5 -2
View File
@@ -11,6 +11,9 @@
/dsh-core-guidelines/sections:
en: d01356208379d52c
zh: 5db9008bd7fd339f
/dsh-core-guidelines/status-and-scope:
en: d44105d88f9dc6a1
zh: 60d770cd66f23e37
/dsh-core-guidelines/introduction:
en: 820be59958fa40a7
zh: c7eaf1b6174a7662
en: 5b8a82e7c85129d1
zh: 05f02b6a5a94afd2
+9 -1
View File
@@ -15,8 +15,16 @@ Rules for writing DeepSeek Harness code, in the style of the [C++ Core Guideline
- [B: Backend](backend.md)
- [D: Data exchange](data-exchange.md)
## Status and scope
These guidelines are to DeepSeek Harness what the C++ Core Guidelines are to C++: the repository's coding standard for how to write code, independent of what the code does.
A rule belongs here when it would still apply if the code implemented a different feature. Examples are rules about interfaces, types, errors, resource ownership, concurrency, state, component structure, and data formats.
Business-domain rules do not belong here. A rule that describes what one feature, subsystem, or product decision must do lives with its owner: the package README, the [subsystem page](../subsystems/README.md), or an [Agent Note](../../.agents/notes/README.md). Review checks for one artifact's known bug classes live in [defensive patterns](../defensive-patterns/README.md).
## Introduction
Before you finish a change, review the code it adds or modifies against every rule in these guidelines. Fix each violation, or state in the change why the rule does not apply. A change does not have to migrate existing code it does not otherwise touch.
Cite a rule by its ID, for example "violates G.2". Artifact-specific review rules live in [defensive patterns](../defensive-patterns/README.md); read them as well.
Cite a rule by its ID, for example "violates G.2". Read the [defensive patterns](../defensive-patterns/README.md) for the artifacts you change as well.
+9 -1
View File
@@ -15,8 +15,16 @@
- [B:后端](backend.zh.md)
- [D:数据交换](data-exchange.zh.md)
## 地位与范围
本准则之于 DeepSeek Harness,相当于 C++ Core Guidelines 之于 C++:它是本仓库关于“如何写代码”的编码标准,与代码实现什么功能无关。
一条规则若在代码实现其他功能时依然适用,就属于本准则。例如关于接口、类型、错误、资源所有权、并发、状态、组件结构和数据格式的规则。
业务领域规则不属于本准则。规定某个功能、子系统或产品决策必须如何运作的规则,放在拥有这条规则的文档里:包 README、[子系统页面](../subsystems/README.zh.md)或 [Agent Note](../../.agents/notes/README.zh.md)。针对某类产物已知缺陷的审查规则见[防御性模式](../defensive-patterns/README.zh.md)。
## 引言
完成变更之前,对照本准则的每条规则审查该变更新增或修改的代码。修复每处违规,或在变更中说明该规则为何不适用。变更不必迁移它本来不改动的已有代码。
按编号引用规则,例如“违反 G.2”。针对具体产物的审查规则见[防御性模式](../defensive-patterns/README.zh.md),同样需要阅读。
按编号引用规则,例如“违反 G.2”。同样需要阅读所修改产物对应的[防御性模式](../defensive-patterns/README.zh.md)。