LearnNewsExamplesServices
Frontmatter
id10054
titlechore(ai): add self-review detection to pr-review skill
stateClosed
labels
enhancementai
assigneestobiu
createdAtApr 17, 2026, 8:33 PM
updatedAtApr 17, 2026, 8:38 PM
githubUrlhttps://github.com/neomjs/neo/issues/10054
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 17, 2026, 8:38 PM

chore(ai): add self-review detection to pr-review skill

tobiu
tobiu commented on Apr 17, 2026, 8:33 PM

Problem

When an agent reviews its own PR (authored in the same session), the review reads in third-person congratulatory style ("Great job! Thanks for putting this together! LGTM!"). This is semantically incorrect — the agent is praising its own work.

Solution

Add a self-review detection heuristic to the pr-review skill that switches the review tone based on authorship:

Detection Logic

  1. Extract the ticket number from the PR body (Resolves #N)
  2. Query query_raw_memories scoped to the current session ID for references to that ticket
  3. Match → Agent authored this PR in same session → self-review mode (first-person, clinical)
  4. No match → Peer-review mode (third-person, constructive)

Author Matrix

Author Reviewer Session Match Mode
Agent (session A) Same agent (session A) Self-review
Agent (session A) Different agent (session B) Peer-review
Human Agent Peer-review
External contributor Agent Peer-review

File Changes

  • pr-review-guide.md — Add self-review bullet to Section 1 (Core Philosophy), add detection heuristic to Section 2 (Agent Mandates)
  • pr-review-template.md — Add alternative self-review opening

Origin Session ID: 144326a4-c1e8-4eee-80e4-b984f3c79ddc

tobiu added the enhancement label on Apr 17, 2026, 8:33 PM
tobiu added the ai label on Apr 17, 2026, 8:33 PM
tobiu assigned to @tobiu on Apr 17, 2026, 8:34 PM
tobiu referenced in commit 6f9afe5 - "chore(ai): add self-review detection to pr-review skill (#10054) on Apr 17, 2026, 8:35 PM
tobiu cross-referenced by PR #10055 on Apr 17, 2026, 8:35 PM
tobiu referenced in commit 79ab42d - "chore(ai): add self-review detection to pr-review skill (#10054) (#10055) on Apr 17, 2026, 8:38 PM
tobiu closed this issue on Apr 17, 2026, 8:38 PM