1---
2name: addressing-code-review-comments
3description: Finds 'CR:' comments in code, gathers feedback, and carries out requested changes. Use when scanning a repo for inline agent notes, code review from the user, or decision requests.
4user-invocable: true
5metadata:
6 source: https://github.com/ampcode/amp-contrib
7---
8
9Search for inline `CR:` comments, read the surrounding code, and follow through on the request.
10
11## When to use
12
13- You need to collect and resolve inline agent notes or change requests
14- A repo uses a tag like CR: to point at work items
15- You are asked to scan for inline feedback embedded in code
16
17## Search process
18
191. Identify the instruction tag for the repo. Default to `CR:` if none is provided.
202. Use ripgrep to find the tag with context:
21 ```bash
22 rg -n --fixed-strings "CR:" -C 3
23 ```
243. If multiple tags are used, repeat the search for each tag.
25
26## Review process
27
28- Read each comment with surrounding code to understand scope and intent, maybe the whole file is relevant
29- Make the change, address the concern, or answer the question where feasible
30- If a request is unclear, stop and ask the user to elaborate
31- Update or remove resolved CR: comments
32
33## Output format
34
35- Group findings by file path
36- Include line numbers and relevant context for each comment
37- Summarize key themes and action items at the end
38
39## Expected actions
40
41After finding CR: comments:
42
431. Analyze the request in each comment
442. Make the change or explain why you did not, or answer the question, or otherwise address the comment
453. Resolve or update the comment
464. Provide a brief summary of actions taken and any open questions