apply-correction

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Apply Correction

应用更正

Treat correction history as reasoning input and the materialized current state as the semantic authority for the artifact. Resolve what is true now, then render from that state rather than asking the renderer to suppress obsolete content from the correction dialogue.
将更正历史视为推理输入,将物化的当前状态视为产物的语义权威。先确定现在成立的事实,再基于该状态进行渲染,而不是要求渲染器从更正对话中屏蔽过时内容。

Workflow

工作流

  1. Resolve the current state. Determine the facts, behavior, interfaces, invariants, requirements, relationships, or intended wording that are authoritative now. When rendering will remain in the same model context, avoid restating discarded values more than necessary to resolve the correction. If an already-available isolated context will be used for rendering, scratch resolution may be more explicit because that scratch history will not cross the boundary.
  2. Materialize an authoritative state. Convert the resolution into the smallest representation that preserves the semantics needed by the artifact. Represent the resulting state, not the conversation that produced it. Use a fact set, interface contract, behavior table, compact object, or other structured form when that reduces accidental carry-over.
  3. Switch generation authority. Treat the materialized state as the semantic source of truth for the affected artifact. The correction dialogue may remain available as reasoning history, but it is no longer authoritative for generation. If the harness already provides a fresh model call, child agent, or equivalent isolated context, pass the materialized state plus only the source context needed to place the edit; isolation strengthens the boundary but is not required for the Skill to work.
  4. Render the artifact from the current state. Write for a reader encountering the present system or fact directly. For implementation comments, preserve useful non-obvious constraints, intent, invariants, or rationale without narrating operations obvious from the code. For API documentation comments, docstrings, documentation, and prose, state the current contracts, facts, and relationships. Preserve unrelated surrounding material when editing an existing artifact.
  5. Review for correction residue. Read the result as a reader who never saw the correction. Any remaining contrast, rejected alternative, previous interpretation, or conversational aside must contribute information that the artifact itself needs. When it exists only because of the editing history, reconstruct that passage from the authoritative current state and review again.
  1. 确定当前状态。 确定目前具有权威性的事实、行为、接口、不变量、需求、关系或预期措辞。如果渲染仍将在同一个模型上下文中进行,应避免为了解析更正而过多复述被废弃的值。如果渲染将使用已有的隔离上下文,临时解析过程可以更加明确,因为该临时历史不会跨越边界。
  2. 物化权威状态。 将解析结果转换为能够保留产物所需语义的最小表示。呈现最终状态,而非产生该状态的对话。当使用事实集合、接口契约、行为表、紧凑对象或其他结构化形式可以减少意外残留时,应采用这些形式。
  3. 切换生成权威来源。 将物化状态视为受影响产物的语义事实来源。更正对话仍可作为推理历史保留,但不再是生成的权威依据。如果 harness 已提供全新的模型调用、子 Agent 或等效的隔离上下文,则应传入物化状态,以及仅够定位编辑位置的源上下文;隔离可以强化边界,但不是此 Skill 生效的必要条件。
  4. 基于当前状态渲染产物。 面向直接接触当前系统或事实的读者进行编写。对于实现注释,应保留有用的非显性约束、意图、不变量或设计理由,而不叙述从代码显而易见的操作。对于 API 文档注释、docstring、文档和文章,应陈述当前的契约、事实和关系。编辑现有产物时,保留与其无关的周边内容。
  5. 审阅更正残留。 以从未看过更正过程的读者视角审阅结果。任何残留的对比、被否决方案、先前解释或对话式旁白,都必须提供产物本身所需的信息。如果这些内容仅因编辑历史而存在,则根据权威当前状态重写相应段落,并再次审阅。

Materializing current state

物化当前状态

Treat the correction history like an event log and the authoritative state like a materialized view. The event log explains how the current state was reached; the artifact should normally be generated from the materialized view.
A useful test is: would this representation make complete sense to someone who never saw the correction? If so, it is suitable renderer input.
Do not over-compress the state. Preserve rationale, uncertainty, constraints, and other nuance when they are required to render the artifact faithfully. The goal is to remove obsolete authority, not useful semantics.
将更正历史视为事件日志,将权威状态视为物化视图。事件日志解释了当前状态是如何形成的;产物通常应基于物化视图生成。
一个有用的检验是:对于从未看过更正过程的人来说,这个表示是否能够完整理解? 如果可以,它就适合作为渲染器的输入。
不要过度压缩状态。当忠实呈现产物需要保留设计理由、不确定性、约束及其他细微信息时,应将其保留下来。目标是移除失效的权威依据,而不是有用的语义。

Same-context and isolated rendering

同上下文与隔离渲染

Same-context rendering is a normal supported path. In that path, keep discarded content minimally stated during resolution, make the authoritative state explicit, then render from it and perform the residue review.
When an isolated renderer is already available, use it to strengthen the separation: resolve the correction, materialize the current state, cross the boundary, then render from only that state and the minimum source context. Do not require new runtime machinery solely for this Skill.
同一上下文渲染是正常且受支持的路径。在该路径中,应在解析阶段尽量少提被废弃的内容,明确权威状态,然后基于该状态进行渲染并执行残留审阅。
当已有可用的隔离渲染器时,应利用它强化隔离:解析更正、物化当前状态、跨越边界,然后仅依据该状态和最少量的源上下文进行渲染。不要仅为此 Skill 引入新的运行时机制。

History-sensitive artifacts

对历史敏感的产物

Some artifacts are specifically about change or contrast. Changelogs, migration guides, compatibility notes, comparisons, deprecation notices, and design rationales may need previous states or rejected alternatives because those facts are part of the subject.
In those cases, retain the history required by the reader and still apply the workflow to incidental correction residue. The criterion is whether the contrast describes the domain or merely records how the agent was corrected.
某些产物本身就以变化或对比为主题。变更日志、迁移指南、兼容性说明、比较、弃用通知和设计理由可能需要保留先前状态或被否决方案,因为这些事实属于其主题范围。
在这些情况下,应保留读者所需的历史信息,同时仍对偶然残留的更正痕迹应用上述工作流。判断标准是:对比内容是在描述主题本身,还是仅记录 Agent 被更正的过程。

Completion criteria

完成标准

Finish when all of the following hold:
  • The artifact agrees with the authoritative current state.
  • A reader can understand the affected passage without access to the correction conversation.
  • Remaining historical or contrastive language serves the artifact's subject.
  • The renderer relies on the materialized current state rather than obsolete conversational state.
  • Meaningful rationale, uncertainty, constraints, and terminology needed by the artifact are preserved.
满足以下所有条件后即可完成:
  • 产物与权威当前状态一致。
  • 读者无需接触更正对话即可理解受影响的段落。
  • 剩余的历史或对比性语言服务于产物的主题。
  • 渲染器依赖物化的当前状态,而非过时的对话状态。
  • 产物所需的重要设计理由、不确定性、约束和术语均得到保留。