From 26d0b831139a0f44e446fe8fa253ae2c38c314ab Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Fri, 15 May 2026 17:11:26 +0300 Subject: [PATCH 1/2] docs(code-reviews): add REVIEW.md guide --- .../app/(app)/code-reviews/review-md/page.tsx | 13 ++ apps/web/src/app/(app)/learn/page.tsx | 44 ++++- .../[id]/code-reviews/review-md/page.tsx | 22 +++ .../code-reviews/ReviewConfigForm.tsx | 10 + .../code-reviews/ReviewMdGuideContent.tsx | 186 ++++++++++++++++++ 5 files changed, 274 insertions(+), 1 deletion(-) create mode 100644 apps/web/src/app/(app)/code-reviews/review-md/page.tsx create mode 100644 apps/web/src/app/(app)/organizations/[id]/code-reviews/review-md/page.tsx create mode 100644 apps/web/src/components/code-reviews/ReviewMdGuideContent.tsx diff --git a/apps/web/src/app/(app)/code-reviews/review-md/page.tsx b/apps/web/src/app/(app)/code-reviews/review-md/page.tsx new file mode 100644 index 0000000000..ebed2ff428 --- /dev/null +++ b/apps/web/src/app/(app)/code-reviews/review-md/page.tsx @@ -0,0 +1,13 @@ +import { PageContainer } from '@/components/layouts/PageContainer'; +import { ReviewMdGuideContent } from '@/components/code-reviews/ReviewMdGuideContent'; +import { getUserFromAuthOrRedirect } from '@/lib/user.server'; + +export default async function PersonalReviewMdGuidePage() { + await getUserFromAuthOrRedirect('/users/sign_in?callbackPath=/code-reviews/review-md'); + + return ( + + + + ); +} diff --git a/apps/web/src/app/(app)/learn/page.tsx b/apps/web/src/app/(app)/learn/page.tsx index 6bfb9b4064..56e0d07794 100644 --- a/apps/web/src/app/(app)/learn/page.tsx +++ b/apps/web/src/app/(app)/learn/page.tsx @@ -38,10 +38,31 @@ function VideoIcon({ className }: { className?: string }) { ); } +function FileTextIcon({ className }: { className?: string }) { + return ( + + + + + + + + ); +} + export default function LearnPage() { return ( -
+
@@ -65,6 +86,27 @@ export default function LearnPage() { + +
+ +
+ +
+ Code Reviewer guidance + + Use REVIEW.md to keep repository-specific review policy with your codebase. + +
+ + + + +
diff --git a/apps/web/src/app/(app)/organizations/[id]/code-reviews/review-md/page.tsx b/apps/web/src/app/(app)/organizations/[id]/code-reviews/review-md/page.tsx new file mode 100644 index 0000000000..c1aafb3ff3 --- /dev/null +++ b/apps/web/src/app/(app)/organizations/[id]/code-reviews/review-md/page.tsx @@ -0,0 +1,22 @@ +import { ReviewMdGuideContent } from '@/components/code-reviews/ReviewMdGuideContent'; +import { OrganizationByPageLayout } from '@/components/organizations/OrganizationByPageLayout'; + +type OrganizationReviewMdGuidePageProps = { + params: Promise<{ id: string }>; +}; + +export default async function OrganizationReviewMdGuidePage({ + params, +}: OrganizationReviewMdGuidePageProps) { + return ( + ( + + )} + /> + ); +} diff --git a/apps/web/src/components/code-reviews/ReviewConfigForm.tsx b/apps/web/src/components/code-reviews/ReviewConfigForm.tsx index 430aa132d6..17fab1ebac 100644 --- a/apps/web/src/components/code-reviews/ReviewConfigForm.tsx +++ b/apps/web/src/components/code-reviews/ReviewConfigForm.tsx @@ -24,6 +24,7 @@ import { useTRPC, useRawTRPCClient } from '@/lib/trpc/utils'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { toast } from 'sonner'; import { useState, useEffect, useCallback, useMemo } from 'react'; +import Link from 'next/link'; import { useRefreshRepositories } from '@/hooks/useRefreshRepositories'; import { useOrganizationModels } from '@/components/cloud-agent/hooks/useOrganizationModels'; @@ -105,6 +106,9 @@ export function ReviewConfigForm({ const isGitLab = platform === 'gitlab'; const platformLabel = isGitLab ? 'GitLab' : 'GitHub'; const prLabel = isGitLab ? 'merge requests' : 'pull requests'; + const reviewMdGuideHref = organizationId + ? `/organizations/${organizationId}/code-reviews/review-md` + : '/code-reviews/review-md'; // Fetch current config const { @@ -632,6 +636,12 @@ export function ReviewConfigForm({ Load REVIEW.md from the base branch when present and use it for repository-specific review guidance.

+ + Learn about REVIEW.md +
+ + +
+ + +
+ + + Code Reviewer guidance + +
+

+ Use REVIEW.md for repository review guidance +

+

+ Add a root REVIEW.md file so Kilo applies repository-specific standards during + automated reviews. This keeps review policy with the codebase and gives teams a single + place to document what matters. +

+
+
+
+ +
+
+ + + + + Set it up + + + +
    + {setupSteps.map((step, index) => ( +
  1. + + {index + 1} + + {step} +
  2. + ))} +
+
+
+ + + + + + How Kilo uses it + + + +

+ Kilo reads REVIEW.md from the pull request or merge request base branch, not from + the feature branch. This prevents an unreviewed change from rewriting the review + policy that evaluates it. +

+

+ REVIEW.md works for GitHub and GitLab. If the file is disabled, missing, empty, or + unreadable, Kilo falls back to built-in review guidance. +

+

+ When REVIEW.md is used, Kilo adds a footer to the review summary. The footer notes + that guidance came from the base branch and indicates whether the file was truncated. +

+
+
+ + + + Example REVIEW.md + + +
+                {exampleReviewMd}
+              
+
+
+
+ +
+ + + What to include + + +
    + {guidanceItems.map(item => ( +
  • + + {item} +
  • + ))} +
+
+
+ + + + + + Limits and precedence + + + +
    + {limits.map(limit => ( +
  • + + {limit} +
  • + ))} +
+
+
+
+
+ + ); +} From d74296311bde491c0f74282a558e823f57ba54d8 Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Fri, 15 May 2026 17:12:53 +0300 Subject: [PATCH 2/2] style(code-reviews): format REVIEW.md guide --- apps/web/src/components/code-reviews/ReviewMdGuideContent.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/code-reviews/ReviewMdGuideContent.tsx b/apps/web/src/components/code-reviews/ReviewMdGuideContent.tsx index 7c47a07083..f22926fab5 100644 --- a/apps/web/src/components/code-reviews/ReviewMdGuideContent.tsx +++ b/apps/web/src/components/code-reviews/ReviewMdGuideContent.tsx @@ -127,7 +127,8 @@ export function ReviewMdGuideContent({

When REVIEW.md is used, Kilo adds a footer to the review summary. The footer notes - that guidance came from the base branch and indicates whether the file was truncated. + that guidance came from the base branch and indicates whether the file was + truncated.