Enforce Required Comment Format in AI Code Reviewer
Strategy
Expensify's automated code review reduces engineering time spent on manual reviews, directly improving FCF by reducing the cost per review. For this automation to scale effectively, the output format must be consistent and machine-parsable - irregular formats break tooling integrations, create UI inconsistencies, and require manual intervention to parse or correct.
Background
The current instruction set of inline code reviewer contains the necessary information but suffers from structural issues:
- Critical output restrictions are scattered across multiple points (
#7, #10, #11)
- The comment format template uses ambiguous placeholder syntax:
<Rule ID transformed into a URL hash parameter>
- Prohibitions use vague language ("summary, explanations, extra content") without concrete examples
- The format specification appears after all instructions, making it easy to overlook
- Terminology is inconsistent ("inline comment" vs "comment" vs "output" vs "prose")
- An EXCEPTION clause at line 262 creates ambiguity about when exceptions apply
The agent is provided with two tools:
mcp__github_inline_comment__create_inline_comment for creating inline comments on specific lines
.github/scripts/addPrReaction.sh for adding a 👍 reaction when no violations are found
Problem
When the AI reviewer processes PRs, if it creates output that doesn't match the required format (such as summary comments without inline locations or inline comments using incorrect markdown syntax), then the review output becomes inconsistent and breaks expected formatting conventions.
Solution
TBD
Enforce Required Comment Format in AI Code Reviewer
Strategy
Expensify's automated code review reduces engineering time spent on manual reviews, directly improving FCF by reducing the cost per review. For this automation to scale effectively, the output format must be consistent and machine-parsable - irregular formats break tooling integrations, create UI inconsistencies, and require manual intervention to parse or correct.
Background
The current instruction set of inline code reviewer contains the necessary information but suffers from structural issues:
#7, #10, #11)<Rule ID transformed into a URL hash parameter>The agent is provided with two tools:
mcp__github_inline_comment__create_inline_commentfor creating inline comments on specific lines.github/scripts/addPrReaction.shfor adding a 👍 reaction when no violations are foundProblem
When the AI reviewer processes PRs, if it creates output that doesn't match the required format (such as summary comments without inline locations or inline comments using incorrect markdown syntax), then the review output becomes inconsistent and breaks expected formatting conventions.
Solution
TBD