openpress-apply-comments
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseopen-press Apply Comments
open-press 应用评论
This is the workflow skill for turning pending markers into source edits. A comment is resolved only when the requested source change has been made and the marker has been removed.
@openpress-commentopenpress-collaborate.openpress/review/current.jsonopenpress-collaborate这是一项工作流技能,用于将待处理的标记转换为源文件编辑操作。只有当请求的源文件修改完成且标记已被移除时,评论才算解决。
@openpress-commentopenpress-collaborate.openpress/review/current.jsonopenpress-collaborateResponsibilities
职责
- List pending markers.
@openpress-comment - Read the decoded comment note, hint, source path, and nearby source.
- Apply the requested edit as a small source change.
- Remove the marker after the edit is complete.
- Leave ambiguous or failed comments in place.
- Verify before reporting completion.
- 列出待处理的标记。
@openpress-comment - 读取解码后的评论说明、提示、源文件路径及附近的源代码。
- 将请求的编辑操作作为小型源文件修改应用。
- 编辑完成后移除标记。
- 保留模糊或处理失败的评论标记。
- 报告完成前进行验证。
Boundary
边界
- Use for the canonical source/generated path table when unsure.
openpress - Edit source, not generated output.
- Default to editing the source file that contains the marker.
- Route domain-heavy work to the owning skill:
- for page prose, hierarchy, captions, claims, tone, narrative, page theme, and page components.
openpress-create-pages - for deck narrative, slide density, direct slide sources, active theme tokens, core Object API composition, Tailwind semantic styling, and reusable UI primitives.
openpress-create-slide - for external diagramming, visual tools, and writing helpers.
openpress-plugins
- Do not rewrite unrelated sections while resolving one comment.
- 当不确定时,使用获取标准的源文件/生成文件路径表。
openpress - 编辑源文件,而非生成的输出文件。
- 默认编辑包含标记的源文件。
- 将领域相关的工作路由至对应的专属技能:
- :负责页面文案、层级结构、说明文字、声明、语气、叙事、页面主题及页面组件。
openpress-create-pages - :负责演示文稿叙事、幻灯片密度、幻灯片源文件、活动主题令牌、核心Object API组合、Tailwind语义样式及可复用UI基础组件。
openpress-create-slide - :负责外部图表工具、可视化工具及写作辅助工具。
openpress-plugins
- 解决单个评论时,请勿重写无关内容。
Workflow
工作流
-
Discover comments.bash
rg "@openpress-comment" press -nIf decoded notes are needed and the framework helper exists, use it:bashnode --input-type=module -e 'import { listCommentMarkers } from "./packages/core/engine/react/comment-marker.mjs"; console.log(JSON.stringify(await listCommentMarkers({ root: process.cwd() }), null, 2));' -
Pick the requested scope.
- If the user names one comment, resolve only that comment.
- If the user says apply comments without an id, process pending comments in source order.
- Handle comments one at a time; do not batch unrelated rewrites under one marker.
-
Inspect the target.
- Read the source file that contains the marker.
- Inspect nearby lines before editing.
- Use the marker hint and rendered-object metadata when present, but verify against source.
-
Apply the edit.
- Make the smallest source change that satisfies the comment.
- Preserve local style, component APIs, and MDX structure.
- If the request is ambiguous, ask for clarification and leave the marker in place.
-
Remove the resolved marker.
- Delete the marker only after the source edit is complete.
@openpress-comment - Do not clear a marker just because it was read.
- Clear a marker without applying only when the user explicitly asks.
- Delete the
-
Verify.bash
npm run buildvalidates structure and renders the full output. When iterating fast on the inner steps:buildbashnode engine/cli.mjs validate . # structural checks only, no render node engine/cli.mjs export . # rewrite document.json only, no Vite bundle
-
发现评论。bash
rg "@openpress-comment" press -n如果需要解码后的说明且框架辅助工具存在,请使用以下命令:bashnode --input-type=module -e 'import { listCommentMarkers } from "./packages/core/engine/react/comment-marker.mjs"; console.log(JSON.stringify(await listCommentMarkers({ root: process.cwd() }), null, 2));' -
选择请求的范围。
- 如果用户指定了某条评论,仅解决该评论。
- 如果用户未指定ID就要求应用评论,按源文件顺序处理待处理评论。
- 一次处理一条评论;请勿在一个标记下批量处理无关的重写操作。
-
检查目标文件。
- 读取包含标记的源文件。
- 编辑前检查附近的代码行。
- 若存在标记提示和渲染对象元数据,可参考但需与源文件进行验证。
-
应用编辑操作。
- 做出满足评论要求的最小源文件修改。
- 保留本地样式、组件API及MDX结构。
- 如果请求模糊不清,请询问用户澄清并保留标记。
-
移除已解决的标记。
- 仅在源文件编辑完成后删除标记。
@openpress-comment - 请勿仅因读取了标记就清除它。
- 仅当用户明确要求时,才在未应用编辑的情况下清除标记。
- 仅在源文件编辑完成后删除
-
验证。bash
npm run build命令会验证结构并渲染完整输出。当快速迭代内部步骤时,可使用:buildbashnode engine/cli.mjs validate . # 仅进行结构检查,不渲染 node engine/cli.mjs export . # 仅重写document.json,不进行Vite打包
Completion Report
完成报告
Report:
- which comment ids were resolved,
- which files changed,
- which comments remain because they were ambiguous or failed,
- which verification commands ran and whether they passed.
报告内容需包含:
- 已解决的评论ID,
- 已修改的文件,
- 因模糊或处理失败而保留的评论,
- 运行的验证命令及结果是否通过。
Common Mistakes
常见错误
- Do not edit ,
public/openpress/,dist-react/, or.deploy/. The separate.openpress/workflow alone ownsopenpress-collaborate..openpress/review/current.json - Do not remove unresolved comments.
- Do not rewrite broad sections unless the comment explicitly asks for that.
- Do not claim the browser changed until the source has been exported when export is required.
- 请勿编辑、
public/openpress/、dist-react/或.deploy/目录下的文件。只有独立的.openpress/工作流有权处理openpress-collaborate。.openpress/review/current.json - 请勿移除未解决的评论标记。
- 除非评论明确要求,否则请勿重写大范围内容。
- 当需要导出时,请勿声称浏览器内容已更改,直到源文件完成导出操作。