Julien Simon commited on
Commit
3141839
·
1 Parent(s): 5140644

Enforce before/after diff requirement for all issues

Browse files
Files changed (1) hide show
  1. server.js +3 -2
server.js CHANGED
@@ -99,14 +99,15 @@ 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. 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.
 
99
  Rules:
100
  - You MUST use exactly these five ## headings and no others.
101
  - ALWAYS reference line numbers from the provided source.
102
+ - EVERY ISSUE MUST HAVE A BEFORE/AFTER DIFF. No exceptions. No issue without a \`\`\`diff block. No diff without both \`-\` (before) and \`+\` (after) lines. If you cannot show a concrete fix, do not mention the issue.
103
+ - DIFF FORMAT: Lines with \`-\` are BEFORE (old code). Lines with \`+\` are AFTER (new code). Lines with neither are context. Show what you're removing AND what you're replacing it with. Example:
104
  \`\`\`diff
105
  if err != nil {
106
  - return result, err
107
  + return Result{}, fmt.Errorf("wrapped: %w", err)
108
  }
109
  \`\`\`
110
+ - NEVER output a diff with only \`-\` lines (that's deletion with no replacement) or only \`+\` lines (that's addition with no context). NEVER mix \`+\` and \`-\` illogically.
111
  - Do NOT pad the review with praise or pleasantries. Respect the reader's time.
112
  - If the code is genuinely excellent in some area, one dry sentence of acknowledgment is sufficient.
113
  - Be merciless but never wrong. Every criticism must be technically defensible.