Skill

/apply-comments

Resolve pending @openpress-comment markers. For each marker: read the surrounding prose, decide on an edit, apply it, delete the marker. Reports which were handled vs which need a human.

Command Impl

# /apply-comments

Comment resolution workflow. A comment is resolved only when the requested edit is in source AND the marker has been removed. Ambiguous markers are left in place — never silently cleared.

/apply-comments

Lives at skills/openpress-apply-comments/. The marker format and authoring side are documented at Comment markers.

Workflow

  1. Discover — list pending markers:
    Find every marker
    rg "@openpress-comment" press -n
    If decoded notes are needed, call the framework helper:
    Decoded JSON output
    node --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));'
  2. Scope — if the user named one marker (by id), resolve only that one. If the user said "apply comments" without an id, process pending markers in source order. One marker per pass — never batch unrelated rewrites under one resolution.
  3. Inspect — read the source file containing the marker. Read the surrounding lines before editing. Use the marker hint + rendered object metadata, but verify against source.
  4. Apply — 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.
  5. Remove the marker — only after the source edit is in place. Do not clear a marker just because it was read.
  6. Verify
    Verify
    npm run build              # validates + renders
  7. Report — resolved ids, files changed, markers left because they were ambiguous, verification status.

Boundary

  • Edits source, not generated output. Never touches public/openpress/, dist-react/, .deploy/, or .openpress/.
  • Default edit target is the source file containing the marker.
  • Routes domain-heavy work to its owning skill:
    • openpress-writing for prose, hierarchy, captions, claims, tone, narrative.
    • openpress-design for theme, layout, visual rhythm, components.
    • openpress-diagram-drawing for diagram semantics.
  • Does not rewrite unrelated sections while resolving one marker.
  • Does not silently clear markers without applying the requested edit.

Common mistakes

  • Removing a marker without applying its edit.
  • Rewriting broad sections when the marker only asked for a small change.
  • Claiming the browser reflects the change without verifying the build.

Source