easysdd-architecture-check
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseeasysdd-architecture-check
easysdd-architecture-check
design 写得越久,矛盾越容易藏在细节里——第 0 节定义的术语在第 3 节被悄悄换成了同义词;第 2 节的契约示例和第 1 节的关键决策对不上;声明"不做"的事情在推进步骤里悄悄出现了。代码一旦落地,"我以为方案是这样写的"和"代码实际是这样的"也会慢慢分叉。
本技能就是给这种时候做一次定向体检——只看不改,把不和谐点说清楚,让用户决定要不要改、怎么改。
The longer a design is written, the easier it is for contradictions to hide in the details — terms defined in Section 0 are quietly replaced with synonyms in Section 3; contract examples in Section 2 conflict with key decisions in Section 1; things stated as "not to be done" quietly appear in the implementation steps. Once code is implemented, the gap between "I thought the plan was written this way" and "this is how the code actually is" will gradually widen.
This skill is designed to conduct a targeted health check for such situations — it only identifies inconsistencies without making changes, leaving it up to the user to decide whether and how to fix them.
适用场景
Applicable Scenarios
- 一份 design 要进入实现前,先确认它内部自洽
- feature 接近验收,确认代码和 design 对得上
- 改了一轮 design 后,确认新内容没和旧约定打架
不适用:
- 用户希望直接修复 → 转 或
easysdd-feature-implementeasysdd-issue-fix - 用户希望做拍板决策 → 转
easysdd-decisions - 用户还没有 design → 先转
easysdd-feature-design
- Verify internal consistency of a design before it enters implementation
- Confirm alignment between code and design when a feature is nearing acceptance
- Ensure new content does not conflict with old agreements after revising a design
Not applicable:
- Users want direct fixes → redirect to or
easysdd-feature-implementeasysdd-issue-fix - Users want to make decision-making calls → redirect to
easysdd-decisions - Users do not have a design → first redirect to
easysdd-feature-design
单目标规则
Single-Target Rule
每次只检查一个目标,二选一:
- :design 内部一致性
design-internal - :design 与代码的一致性
design-vs-code
为什么不允许一次查两个?两类检查的视角和读取材料完全不同——同时做会导致两边都做不深,问题也容易混在一起说不清是谁的责任。用户提两个目标就让 TA 选一个,另一个留到下次。
共享路径与命名约定看。easysdd/reference/shared-conventions.md
Only one target can be checked each time, choose one of the two:
- : Internal consistency of the design
design-internal - : Consistency between design and code
design-vs-code
Why is checking two targets at once not allowed? The perspectives and materials required for the two types of checks are completely different — doing both at the same time will result in insufficient depth for both, and issues will easily be mixed up making it unclear who is responsible. If a user proposes two targets, ask them to choose one, and leave the other for next time.
Seefor shared paths and naming conventions.easysdd/reference/shared-conventions.md
工作流
Workflow
Phase 1:锁定检查目标
Phase 1: Lock the Check Target
确认三件事:
- 当前检查目标(/
design-internal)design-vs-code - 只检查哪一个 feature
- 检查范围(哪一节、哪个模块)
范围太大就让用户收敛——把整份 design 全查一遍出来的报告读起来反而抓不到重点。
Confirm three things:
- Current check target (/
design-internal)design-vs-code - Which single feature to check
- Check scope (which section, which module)
If the scope is too broad, ask the user to narrow it down — a report checking the entire design will make it difficult to focus on key points.
Phase 2:读取材料
Phase 2: Read Materials
共同必读:
AGENTS.md- 方案 doc 全文
- 架构中心目录相关文档(如 DESIGN.md)
design-vs-code- 与 design 第 2/3 节直接对应的代码文件
Mandatory reading for both targets:
AGENTS.md- Full text of the design document
- Relevant documents in the architecture center directory (e.g., DESIGN.md)
Additional reading for :
design-vs-code- Code files directly corresponding to Sections 2/3 of the design
Phase 3:执行检查
Phase 3: Execute Check
目标 A:design-internal
Target A: design-internal
至少覆盖这 6 类:
- 术语一致性——第 0 节定义的术语后面有没有被同义词替换或语义漂移
- 需求对齐——第 1 节摘要是否自洽,是否偏离已确认目标
- 契约闭环——第 2 节的契约示例是否在第 3 节有对应的改动计划
- 示例与决策一致——第 2 节契约示例的行为是否与第 1 节关键决策矛盾
- 范围守护——第 3 节改动计划有没有超出第 1 节"明确不做"
- 推进可执行性——第 3 节推进步骤能否验证、依赖前后是否矛盾
Cover at least these 6 categories:
- Terminology consistency — whether terms defined in Section 0 are replaced with synonyms or have semantic drift in later sections
- Requirement alignment — whether the summary in Section 1 is consistent and does not deviate from confirmed goals
- Contract closure — whether contract examples in Section 2 have corresponding modification plans in Section 3
- Consistency between examples and decisions — whether the behavior of contract examples in Section 2 conflicts with key decisions in Section 1
- Scope guard — whether modification plans in Section 3 exceed the "explicitly not to be done" items in Section 1
- Implementation executability — whether implementation steps in Section 3 are verifiable and have no conflicting dependencies
目标 B:design-vs-code
Target B: design-vs-code
至少覆盖这 6 类:
- 类型一致性——design 第 2 节定义的核心类型/字段,代码里存在且语义一致吗
- 行为一致性——design 第 2 节声明的输入→输出,代码实际行为对得上吗
- 写路径一致性——design 声明的写入口,代码有没有冒出额外的旁路写入
- 边界行为一致性——design 第 1 节的异常/边界规则,代码有没有实现
- 改动边界一致性——design 第 3 节声明的改动范围,代码有没有越界或漏实现
- 推进结果一致性——design 第 3 节每步的退出信号,对应代码状态可验证吗
Cover at least these 6 categories:
- Type consistency — whether core types/fields defined in Section 2 of the design exist in the code and have consistent semantics
- Behavior consistency — whether the input→output stated in Section 2 of the design matches the actual code behavior
- Write path consistency — whether the write entry stated in the design has any additional bypass writes in the code
- Boundary behavior consistency — whether exception/boundary rules in Section 1 of the design are implemented in the code
- Modification boundary consistency — whether the modification scope stated in Section 3 of the design is not exceeded or missing in the code
- Implementation result consistency — whether the exit signals for each step in Section 3 of the design are verifiable in the corresponding code state
Phase 4:输出检查报告
Phase 4: Output Check Report
报告格式:
markdown
undefinedReport format:
markdown
undefined架构一致性检查报告
Architecture Consistency Check Report
目标: design-internal | design-vs-code 范围: {feature}/{模块}/{章节范围} 日期: YYYY-MM-DD 结论: pass | pass-with-risk | fail
Target: design-internal | design-vs-code Scope: {feature}/{module}/{section scope} Date: YYYY-MM-DD Conclusion: pass | pass-with-risk | fail
1. 检查摘要
1. Check Summary
一句话总结。
One-sentence summary.
2. 不一致清单
2. Inconsistency List
| ID | 严重级别 | 位置 | 现象 | 影响 | 建议修复 |
|---|---|---|---|---|---|
| AC-01 | 高/中/低 | | 描述 | 后果 | 修复建议(不执行) |
| ID | Severity | Location | Phenomenon | Impact | Suggested Fix |
|---|---|---|---|---|---|
| AC-01 | High/Medium/Low | | Description | Consequence | Repair suggestion (not to be executed) |
3. 观察项(范围外,不动手)
3. Observation Items (Out of Scope, No Modifications)
读 时若发现下列结构性问题,列在这里交给用户决定是否另起工作流处理:
easysdd/architecture/- 某个 type 在根目录已 ≥6 份仍平铺(违反 的同类聚合规则,应触发
easysdd/reference/shared-conventions.md搬迁)easysdd-architecture-gen - 文件名没遵循 ,未来无法聚合
{type}-{slug}.md - 其他和本次检查目标无关、但顺带看到的不合理点
没有就省略本节。
If the following structural issues are found when reading , list them here and let the user decide whether to initiate another workflow to handle them:
easysdd/architecture/- A certain type has ≥6 files in the root directory and is still placed flat (violates the same-type aggregation rule in , should trigger
easysdd/reference/shared-conventions.mdfor relocation)easysdd-architecture-gen - File names do not follow , making future aggregation impossible
{type}-{slug}.md - Other unreasonable points observed incidentally that are unrelated to the current check target
Omit this section if none.
4. 一致性良好项
4. Well-Consistent Items
列 2-5 条检查通过的关键点——只有负面信息的报告会让用户失去对系统的整体信心。
List 2-5 key points that passed the check — a report with only negative information will cause users to lose confidence in the overall system.
5. 建议下一步
5. Suggested Next Steps
- fail:建议先修哪几条再重跑本技能
- pass-with-risk:实现/验收阶段重点回归哪些点
- pass:可进入下一阶段
严重级别怎么定:
- **高**:会让实现走错方向,或代码已和 design 实质偏离(漏实现关键契约、行为相反、术语指代不同的东西)
- **中**:能猜出意图但留有歧义,下游容易误读(同义词漂移、契约示例和决策表面对得上但细节冲突、退出信号说不清楚)
- **低**:表述别扭或可读性问题,不影响理解(顺序欠妥、措辞可优化)
报告给用户后等用户确认结论——是否接受、要不要本技能再补一类检查、还是直接进入用户自己决定的下一步。本技能不替用户拍板。
---- fail: Suggest which items to fix first before re-running this skill
- pass-with-risk: Key points to focus on regression during implementation/acceptance
- pass: Proceed to the next phase
How to define severity levels:
- **High**: Will lead to incorrect implementation directions, or code has substantially deviated from the design (missing key contract implementations, opposite behavior, different references for terms)
- **Medium**: Intent can be guessed but ambiguity remains, prone to misinterpretation downstream (synonym drift, contract examples and decisions seem aligned but have detail conflicts, unclear exit signals)
- **Low**: Awkward expression or readability issues, no impact on understanding (poor order, wording can be optimized)
After providing the report to the user, wait for their confirmation of the conclusion — whether to accept it, whether to ask this skill to perform another type of check, or proceed to the next step decided by the user. This skill does not make decisions on behalf of the user.
---硬性边界
Hard Boundaries
- 只检查,不修复——禁止改 design / 代码 / 配置
- 单目标——一次只能 design-internal 或 design-vs-code
- 证据化——每条不一致都要有可定位位置(文件:行号 或 design 节)
- 可执行建议——具体到"改哪里、怎么改",但不落盘
- 不发散——发现范围外问题只记为"观察项",不展开深挖
为什么不允许直接修?把检查和修复分开做,用户才能看到完整的不一致清单后整体决定优先级——一边查一边改会让用户失去这层判断机会。
- Check only, no fixes — modifying design/code/configuration is prohibited
- Single target — only or
design-internalper checkdesign-vs-code - Evidence-based — each inconsistency must have a locatable position (file:line number or design section)
- Executable suggestions — specific to "what to change and how to change", but not implemented
- No divergence — out-of-scope issues are only recorded as "observation items" and not explored in depth
Why is direct fixing not allowed? Separating checking and fixing allows users to see the complete inconsistency list and decide priorities holistically — checking while fixing will deprive users of this judgment opportunity.
退出条件
Exit Conditions
- 已锁定单一检查目标
- 已完成对应目标的检查项覆盖
- 报告含不一致清单 + 修复建议
- 报告未包含任何实际修复动作
- 用户确认本轮检查结论
- Single check target has been locked
- Check items corresponding to the target have been fully covered
- Report includes inconsistency list + repair suggestions
- Report does not contain any actual repair actions
- User has confirmed the conclusion of this round of checks
容易踩的坑
Common Pitfalls
- ❌ 一次同时做 design-internal 和 design-vs-code
- ❌ 发现问题就顺手改代码或文档
- ❌ 只说"这里不太对",不给证据位置
- ❌ 建议过于抽象("优化一下架构")
- ❌ 从一个目标无限扩展到全仓库审计
- ❌ Conducting and
design-internalchecks at the same timedesign-vs-code - ❌ Modifying code or documents immediately when issues are found
- ❌ Only saying "something is wrong here" without providing evidence location
- ❌ Giving overly abstract suggestions (e.g., "optimize the architecture")
- ❌ Expanding infinitely from one target to full repository audit