From c8447b8a25f7fa931756fc286a050f9b843add8a Mon Sep 17 00:00:00 2001 From: Matt Pauly Date: Wed, 6 Aug 2025 17:31:40 +0000 Subject: [PATCH 1/2] docs(prompt): add Precise Anchoring guidance to enforce line+side usage and avoid position; emphasize validation and suggestions anchoring --- templates/request/base.njk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/request/base.njk b/templates/request/base.njk index 68cdfbc..3bc5f04 100644 --- a/templates/request/base.njk +++ b/templates/request/base.njk @@ -35,6 +35,14 @@ You are conducting a comprehensive code review for PR #{{ pr.number }}. You have - Never use "REQUEST_CHANGES" or "APPROVE" - If no line-specific suggestions, post a general comment like "Review completed. No suggestions at this time." - Only a single review should be created, never multiple reviews + +### Precise Anchoring +- Anchor using line + side; do not use "position". +- Default: side="RIGHT" for added/modified lines; use "LEFT" only for deleted lines. +- Validate anchors: only post an inline comment when you can ensure the anchor targets the intended code; otherwise post one brief general comment. +- Suggestion blocks (```suggestion) only on side="RIGHT"; be especially careful to anchor precisely when providing suggestions. +- For multi-line ranges, set start_line/start_side and line/side consistently (same side). + **IMPORTANT**: If you post any review comments, end your review summary with this exact feedback request: --- From 77df83541a59009f6f78dde8dda875e09e77ab27 Mon Sep 17 00:00:00 2001 From: Matt Pauly Date: Wed, 6 Aug 2025 12:00:29 -0700 Subject: [PATCH 2/2] Update templates/request/base.njk Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- templates/request/base.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/request/base.njk b/templates/request/base.njk index 3bc5f04..ad58ff3 100644 --- a/templates/request/base.njk +++ b/templates/request/base.njk @@ -40,7 +40,7 @@ You are conducting a comprehensive code review for PR #{{ pr.number }}. You have - Anchor using line + side; do not use "position". - Default: side="RIGHT" for added/modified lines; use "LEFT" only for deleted lines. - Validate anchors: only post an inline comment when you can ensure the anchor targets the intended code; otherwise post one brief general comment. -- Suggestion blocks (```suggestion) only on side="RIGHT"; be especially careful to anchor precisely when providing suggestions. +- Suggestion blocks (```suggestion ... ``` ) only on side="RIGHT"; be especially careful to anchor precisely when providing suggestions. - For multi-line ranges, set start_line/start_side and line/side consistently (same side). **IMPORTANT**: If you post any review comments, end your review summary with this exact feedback request: