Configure related repositories Greptile should read during reviews (e.g., shared libraries or SDKs) under the context namespace.
Field
Type
Description
context
object
Namespace for context-related settings.
context.repos
string[]
Related repositories Greptile should read during reviews. Each entry must be in owner/repo format, on the same SCM host as the primary repository, and accessible with the same credentials.
Stable identifier. Required if a child config needs to disable this rule via disabledRules.
scope
string[]
No
Glob patterns for files this rule applies to, relative to the .greptile/ directory. Avoid ../ patterns — rules should apply within their own directory tree.
{ "strictness": 2, "commentTypes": ["logic", "syntax"], "triggerOnUpdates": true, "ignorePatterns": "**/*.generated.*\ndist/**\nnode_modules/**", "summarySection": { "included": true, "collapsible": true, "defaultOpen": false }, "context": { "repos": ["acme/shared-types", "acme/payment-sdk"] }, "instructions": "This is a TypeScript monorepo using pnpm workspaces. We use Prisma for database access and zod for validation.", "rules": [ { "id": "no-console", "rule": "Do not use console.log in production code. Use the logger service instead.", "scope": ["src/**"], "severity": "medium" }, { "rule": "All async functions must have error handling.", "severity": "high" } ], "disabledRules": []}
The first rule has an id so it can be disabled by child configs. The second rule has no id — it applies everywhere and can’t be selectively turned off.
Plain markdown passed to the reviewer as context. The entire file is scoped to the directory containing the .greptile/ folder — it applies to all files reviewed within that directory tree.There is no special syntax or parsing. Write standard markdown with headings, lists, code blocks, and any other formatting that helps communicate your rules clearly.
# Code Review Rules## Error HandlingAll async functions must use try-catch blocks. Never swallow errors silently.At minimum, log the error with context:```typescripttry { await operation();} catch (error) { logger.error('Operation failed', { error, context }); throw error;}```## SQL Injection PreventionAlways use parameterized queries. Never interpolate user input into SQL strings.- Use prepared statements- Validate input types before queries- Use Prisma's query builder instead of raw SQL where possible## API Input ValidationValidate all API inputs using zod schemas before processing. Define the schemanext to the route handler.
Points the reviewer to existing files in your repository that it should read for context — database schemas, API specs, architecture docs, or anything that helps the reviewer understand your codebase.
Path to the file, relative to the directory containing the .greptile/ folder (the same directory the config governs). For a root .greptile/, this is the repo root; for nested configs (e.g., packages/db/.greptile/), schema.prisma resolves to packages/db/schema.prisma.
description
string
No
What the file contains and why it’s relevant to reviews
scope
string[]
No
Glob patterns — only include this file when reviewing files matching these patterns. Patterns are relative to the .greptile/ directory; avoid ../ patterns.
{ "files": [ { "path": "prisma/schema.prisma", "description": "Database schema — reference for model relationships and field types" }, { "path": "docs/api-contracts.yaml", "description": "OpenAPI specification for all public endpoints", "scope": ["src/api/**"] }, { "path": "docs/auth-flow.md", "description": "Authentication and authorization flow documentation", "scope": ["src/auth/**", "src/middleware/auth*"] } ]}
Files without a scope are included in every review within the directory tree. Files with a scope are only included when the file being reviewed matches one of the glob patterns.File references are accumulated from all parent configs — a child config doesn’t replace the parent’s file list, it adds to it.