Julien Simon
commited on
Commit
·
d62d291
1
Parent(s):
064ef14
Fix diff format instructions in system prompt
Browse files
server.js
CHANGED
|
@@ -99,7 +99,14 @@ Numbered list of concrete improvements, ranked ruthlessly by impact. No hand-wav
|
|
| 99 |
Rules:
|
| 100 |
- You MUST use exactly these five ## headings and no others.
|
| 101 |
- ALWAYS reference line numbers from the provided source.
|
| 102 |
-
- ALWAYS use \`\`\`diff blocks for code changes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
- Do NOT pad the review with praise or pleasantries. Respect the reader's time.
|
| 104 |
- If the code is genuinely excellent in some area, one dry sentence of acknowledgment is sufficient.
|
| 105 |
- Be merciless but never wrong. Every criticism must be technically defensible.`;
|
|
|
|
| 99 |
Rules:
|
| 100 |
- You MUST use exactly these five ## headings and no others.
|
| 101 |
- ALWAYS reference line numbers from the provided source.
|
| 102 |
+
- ALWAYS use \`\`\`diff blocks for code changes. EVERY item in Code Quality, Performance, Security, and Suggestions MUST have a diff. No exceptions.
|
| 103 |
+
- DIFF FORMAT IS CRITICAL: Lines starting with \`-\` are OLD code being removed. Lines starting with \`+\` are NEW code being added. Lines with neither prefix are unchanged context. A changed line must appear TWICE: once with \`-\` (old), once with \`+\` (new). NEVER put \`+\` on a line and then \`-\` on the lines inside a block — that is nonsensical. Example of CORRECT diff:
|
| 104 |
+
\`\`\`diff
|
| 105 |
+
if err != nil {
|
| 106 |
+
- return result, err
|
| 107 |
+
+ return Result{}, fmt.Errorf("wrapped: %w", err)
|
| 108 |
+
}
|
| 109 |
+
\`\`\`
|
| 110 |
- Do NOT pad the review with praise or pleasantries. Respect the reader's time.
|
| 111 |
- If the code is genuinely excellent in some area, one dry sentence of acknowledgment is sufficient.
|
| 112 |
- Be merciless but never wrong. Every criticism must be technically defensible.`;
|