Use this skill when prototype comments exist on the page, or when /editor-todo requires handling the current project's comments.
Terminology boundaries:
- Comment / comment: prototype revision feedback in Commentary; this skill only handles this type of content.
- Annotation / annotation: the prototype description layer of AnnotationViewer, such as
annotation-source.jsonand@axhub/annotation; it is not within the scope of this skill.
Default reading order
- First locate the target prototype directory:
src/prototypes/<prototype-id>/。 - Read local files:
src/prototypes/<prototype-id>/.spec/prototype-comments.json。 - If the file does not exist, determine the target based on user context and the current code; do not call CLI/API, and do not depend on the page running in the browser.
Local file structure
Comment records are fixed at .spec/prototype-comments.json; the core fields are comments/tasks/images:
comments: comments and modification records, including locator, comment, marker, and the before/after of text/style/tweak modifications.tasks: byelementKeystore pending task information.images: only records metadata andimages[].assetPath. Image files are located in.spec/prototype-comment-assets/。
When reading images, use only the local images[].assetPath, based on .spec/prototype-comment-assets/ to find files. Do not write new base64 image content back to JSON; when new image assets are needed, place them in the assets directory and reference them in images[].assetPath .
Handling process
- Read
.spec/prototype-comments.json, bycommentsunderstand the modification intent and locator information. - If there are comment images, by
images[].assetPathread local files to assist understanding. - Modify
src/prototypes/<prototype-id>/the implementation files under it, keeping the scope of changes focused. - After completing one comment task, only clean up the local comment document: delete the corresponding comment record and task record, and do not write task progress fields.
- Complete preview verification according to project rules; if verification is not possible, explain the reason.
Deletion rules
- Use
comments[].elementKeyas the primary key to delete completed comments. - Delete the
tasks[elementKey]。 - Delete
elementKeymatchingimages[]records that are no longer referenced by other remaining comments. - For
.spec/prototype-comment-assets/, only delete files that correspond to the removedimages[].assetPathand are no longer referenced by JSON. - If a comment has no
elementKey, uselocator/labelto assist manual matching; when matching is uncertain, keep it and do not delete by mistake.
Cleanup rule example: after completing elementKey=hero , remove comments the hero comment, remove tasks.hero, remove the hero that belongs only to images records and hero-only.png; if shared.png is still referenced by other remaining comments, keep that image record and local file.
Completion reply
Explain to the user in natural language:
- Which UI modifications corresponding to which comments have been completed.
- Whether there are still unprocessed or abnormal comments.
- What verification was done.
Do not write the reply as a CLI log; only briefly explain technical details when they truly affect user understanding.