Skip to content

Commit 05dab8e

Browse files
committed
minor update to prompt
1 parent f1d6781 commit 05dab8e

File tree

1 file changed

+11
-50
lines changed

1 file changed

+11
-50
lines changed

config.yml

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ queue:
99
max_queue_size: 100
1010
retry_after_seconds: 60
1111

12-
# Diff splitting configuration
12+
# Diff splitting configuration
1313
diff_splitting:
14-
max_chunk_size: 500000 # 500k characters per chunk
15-
max_concurrent: 3
14+
max_chunk_size: 500000 # 500k characters per chunk
15+
max_concurrent: 3
1616

1717
server:
1818
port: "${PORT:-5053}"
@@ -28,8 +28,8 @@ amp:
2828
github:
2929
command: "sh"
3030
args:
31-
- "-c"
32-
- "cd ${GITHUB_APP_CWD} && pnpm run mcp"
31+
- "-c"
32+
- "cd ${GITHUB_APP_CWD} && pnpm run mcp"
3333
env:
3434
GITHUB_APP_CWD: "${GITHUB_APP_CWD}"
3535
GITHUB_APP_ID: "${GITHUB_APP_ID}"
@@ -38,7 +38,8 @@ amp:
3838
prompt_template: |
3939
Review this code diff as a senior developer. Look for bugs, clear logic errors, and code quality problems.
4040
Flag significant security concerns (leaked credentials, SQL injection, etc.), but do not mark minor concerns as issues.
41-
Likewise, flag significant performance concerns (memory leaks, deadlocks, long-lived requests), but do not mark minor concerns as issues. Do not use the oracle to review code.
41+
Likewise, flag significant performance concerns (memory leaks, deadlocks, long-lived requests), but do not mark minor concerns as issues.
42+
Do not use the oracle to review code.
4243
4344
Focus on:
4445
- Logic errors
@@ -53,10 +54,7 @@ amp:
5354
Diff to review:
5455
__DIFF_CONTENT__
5556
56-
When reviewing code:
57-
1. Look at the pull request details to fetch the context before reviewing.
58-
2. Review the diff content to identify issues.
59-
3. Leave specific inline comments or code suggestions for each issue found.
57+
Review the diff content to identify issues. If you find any issues, leave specific inline comments for each issue found.
6058
6159
Always leave actionable, specific comments with suggested fixes.
6260
@@ -74,63 +72,26 @@ amp:
7472
* List out critical issues and blockers that need to be addressed
7573
* Any high-level feedback or suggestions
7674
77-
IMPORTANT: If you find any issues, include all of them in a JSON block at the end with the following format:
78-
```json
79-
[
80-
{
81-
"path": "filename.ext",
82-
"line": 42,
83-
"line_type": "new"|"old",
84-
"message": "Description of the issue",
85-
"suggested_fix": "if (user == \"admin\") {"|null
86-
}
87-
]
88-
```
89-
90-
line_type must be one of "new" or "old". This is because in a diff view, the same line number can exist on both sides:
91-
Line 15 in the source (old)
92-
Line 15 in the destination (new)
93-
94-
A suggested_fix is an optional short snippet of code that will directly replace the single full line of code the indicated issue is on in order to fix the issue.
95-
Because the suggested_fix will only overwrite the single line of code with the issue (the issue line), the suggested_fix can be either:
96-
1. One line of code that will replace the issue line directly to address the issue. Here's an example where we fix a typo in the method invocation:
97-
Issue line:
98-
System.out.printl(foo);
99-
100-
suggested_fix:
101-
System.out.println(foo);
102-
103-
2. Multiple lines of code where the first line is the issue line and all subsequent lines are net new lines to be inserted after the issue line.
104-
Because the first line in this multi-line suggested_fix will directly replace the existing issue line, the first line can be unchanged if the suggested_fix is a pure insertion after the issue line,
105-
or the first line can differ from the issue line if the goal is to edit the issue line AND insert net new lines directly below it. Here's a pure insertion example where we add an auth check:
106-
Issue line:
107-
def access_data(user):
108-
109-
suggested_fix:
110-
def access_user_data(user):\n\n if not user: return\n
111-
112-
Any other cases are too complex to provide a simple suggested_fix for, so provide null as the suggested_fix value.
113-
11475
tools:
11576
- name: leave_general_comment
11677
description: Leave general comments on pull requests
117-
instructions:
78+
instructions:
11879
- "Use this tool to leave general comments on the pull request"
11980
- "This will post your comment to the overall pull request discussion"
12081
- "Use for summary comments, overall feedback, or general observations"
12182
- "Required: message, owner, repo, pr_number"
12283
- "Example: 'Overall the code looks good, just a few minor suggestions'"
12384
- name: leave_inline_comment
12485
description: Leave inline comments on specific lines in pull requests
125-
instructions:
86+
instructions:
12687
- "Use this tool to leave comments on specific lines of code"
12788
- "This will post your comment directly on the line in the diff view via PR review"
12889
- "Required: message, owner, repo, pr_number, path, line"
12990
- "Optional: commit_sha (will be fetched from PR if not provided)"
13091
- "Example: Comment on line 25 of src/auth.js about missing error handling"
13192
- name: get_pr_comments
13293
description: Get all comments on a pull request
133-
instructions:
94+
instructions:
13495
- "Use to retrieve existing comments on the pull request"
13596
- "Required: owner, repo, pr_number"
13697
- "Returns array of comments and total count"

0 commit comments

Comments
 (0)