simplify
Simplify recently changed Open Document implementation code while preserving requested behavior. Use to remove duplicate ownership, redundant conversions, forwarding layers, and superseded implementations in MoonBit and TypeScript.
来源信息
- 仓库
- elliothux/open-document
- 最近来源活动
- 2026年10月14日 07:41
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 0
- Forks
- 0
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
文件资源管理器
2 个文件正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- simplify
- description
- Simplify recently changed Open Document implementation code while preserving requested behavior. Use to remove duplicate ownership, redundant conversions, forwarding layers, and superseded implementations in MoonBit and TypeScript.
# Simplify
Follow the root [AGENTS.md](../../../AGENTS.md) for scope, authorization, and validation. Review requests produce findings; change requests authorize local edits within the requested scope.
## Inspect the affected path
Start with the requested diff and trace its producers, consumers, and existing equivalents. Look for duplicated state, repeated conversions, pass-through modules, and workarounds near a symptom. Expand only far enough to fix the shared cause and remove superseded wiring.
## Preserve the project boundaries
- Keep document state, editing, layout, and serialization in MoonBit. Keep platform events, Worker communication, and rendering in TypeScript. See the [SDK contract](../../../docs/references/sdk.md).
- Derive host views from core results. Remove independently editable copies of the document model.
- Preserve necessary Worker and Wasm ABI boundaries. Simplify redundant forwarding within a layer without removing ordering, revision checks, cancellation, or disposal behavior.
- Convert data once at its owning boundary. Reuse source types and existing APIs where they fit.
- Replace symptom-level compensation with the shared rule. Preserve format compatibility, error reporting, resource limits, and document recovery.
- Update affected callers and remove replaced APIs and implementations together. Root rules govern compatibility and test selection.
## Finish
Review the diff for the requested behavior and orphaned callers. Use the smallest sufficient checks from the root rules and [testing guide](../../../docs/references/testing.md). Leave code unchanged when simplification would add complexity or lacks a demonstrated benefit.
在 GitHub 查看