Add support for XML-style <cmt>comment</cmt> <comment>comment</comment> formats in refine-plan - #72
Add support for XML-style <cmt>comment</cmt> <comment>comment</comment> formats in refine-plan#72Lyken17 wants to merge 1 commit into
Conversation
Extends comment parsing to support three formats: - Classic: CMT:/ENDCMT (existing) - Short tag: <cmt></cmt> (new) - Long tag: <comment></comment> (new) All formats support inline and multi-line usage and can be mixed within the same file. Updated documentation and error messages to be format-agnostic. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79714b73d5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (closest_marker == "") { | ||
| return "" | ||
| } else { | ||
| return closest_marker ":" closest_pos |
There was a problem hiding this comment.
Encode marker results without
: collisions
find_comment_markers serializes matches as marker:position, but the legacy start token itself contains a colon (CMT:), so classic matches become strings like CMT::12. The later split(..., ":") parsing then yields found_marker="CMT" and an empty marker_pos, which prevents recognizing the marker and can leave pos unchanged (pos = marker_pos + 1), causing scan_cmt_blocks to spin indefinitely on files that still use CMT: blocks. This breaks backward compatibility and can hang refine-plan validation on existing annotated plans.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
To use Codex here, create a Codex account and connect to github.
There was a problem hiding this comment.
To use Codex here, create a Codex account and connect to github.
Summary
Extends the
refine-plancommand to support three comment annotation formats instead of justCMT:/ENDCMT, making plan reviews more intuitive and flexiblefor different user preferences.
New Comment Formats
CMT: comment ENDCMT<cmt>comment</cmt><comment>comment</comment>Key Features
Examples
Inline annotations: