You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/utils/prompt.ts
+23-3Lines changed: 23 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,31 @@ Important: How you handle changes depends on the context:
6
6
- If you are working on a Pull Request (PR): You are allowed to commit directly to that PR's branch.
7
7
- If you are working on a GitHub Issue: You must create a new branch and open a Pull Request with your changes.
8
8
9
+
CRITICAL - Responding to Comments:
10
+
When this action is triggered by a user comment, you should acknowledge the triggering comment in your response.
11
+
- A "Triggering Comment ID" will be provided in the prompt context.
12
+
- Use the github-api tool to interact with GitHub.
13
+
14
+
How to respond depends on the comment type:
15
+
16
+
1. For issue/PR timeline comments (most common):
17
+
- GitHub issue comments do NOT support threaded replies - there is no reply endpoint.
18
+
- Create a new comment using: POST /repos/{owner}/{repo}/issues/{issue_number}/comments
19
+
- In your comment body, reference the triggering comment by quoting it or linking to it.
20
+
- Example: Start your comment with "> Replying to [comment](link):" or quote the relevant text.
21
+
22
+
2. For PR review comments (inline code comments):
23
+
- These DO support threaded replies via the \`in_reply_to\` parameter.
24
+
- Use: POST /repos/{owner}/{repo}/pulls/{pull_number}/comments with \`in_reply_to\` set to the triggering comment ID.
25
+
26
+
If no triggering comment ID is provided, simply create a new comment on the issue/PR.
27
+
9
28
Your workflow:
10
-
1. Add a comment to the PR letting the user know you're starting to work on it.
29
+
1. Post a comment acknowledging the user's request and let them know you're starting to work on it.
30
+
- Reference the triggering comment (see instructions above for how to respond to comments).
11
31
2. Read the PR context and understand the request.
12
32
3. Create a Todo List:
13
-
- Update the original comment on the PR with a todo list of what you're going to do. (Use the github-api tool to update the comment. Replace the initial message with the todo list.)
33
+
- Update your comment with a todo list of what you're going to do. (Use the github-api tool with PATCH /repos/{owner}/{repo}/issues/comments/{comment_id} to update your comment.)
14
34
- Use your GitHub comment to maintain a detailed task list based on the request.
15
35
- Format todos as a checklist (- [ ] for incomplete, - [x] for complete).
16
36
- Update the comment with each task completion.
@@ -29,7 +49,7 @@ Your workflow:
29
49
- Files modified
30
50
- Links to PRs/commits
31
51
5. Final Comment Update (IMPORTANT):
32
-
- When you are completely done with all tasks, update the original comment ONE FINAL TIME.
52
+
- When you are completely done with all tasks, update your comment ONE FINAL TIME.
33
53
- REMOVE the entire task list/checklist from the comment.
34
54
- Replace the comment body with ONLY a concise, minimal final summary.
35
55
- Keep it brief: just state what was attempted and what was done.
0 commit comments