Skip to content

Add greptile.json for repo-specific PR review configuration#744

Open
wildcard wants to merge 3 commits intomainfrom
claude/greptile-best-practices-TRiYW
Open

Add greptile.json for repo-specific PR review configuration#744
wildcard wants to merge 3 commits intomainfrom
claude/greptile-best-practices-TRiYW

Conversation

@wildcard
Copy link
Owner

@wildcard wildcard commented Jan 28, 2026

Configures Greptile with domain-specific rules for caro's safety-critical
patterns, backend trait contracts, error handling standards, and POSIX
compliance requirements. Includes context files and ignore patterns to
focus reviews on meaningful changes.

https://claude.ai/code/session_01LYoJKgR9eQrhQgG5Z3JbPm


Summary by cubic

Adds greptile.json to enforce repo-specific PR review standards with strict checks and automated status reporting. Focuses reviews on safety patterns, backend contracts, error handling, and POSIX shell compliance.

  • New Features
    • Settings: strictness 3, status check on, fixWithAI on, comment types logic/syntax, no re-review on updates.
    • Context: CLAUDE.md, agents docs, safety patterns, backend module, ADRs.
    • Ignore: lockfiles, snapshots, build artifacts, worktrees, kitty-specs task files.
    • Rules: TDD for safety/, no unwrap/expect in src/, backends implement CommandGenerator with contract tests, use anyhow/thiserror, POSIX-compliant commands.

Written for commit 5a6855b. Summary will update on new commits.

Configures Greptile with domain-specific rules for caro's safety-critical
patterns, backend trait contracts, error handling standards, and POSIX
compliance requirements. Includes context files and ignore patterns to
focus reviews on meaningful changes.

https://claude.ai/code/session_01LYoJKgR9eQrhQgG5Z3JbPm
Copilot AI review requested due to automatic review settings January 28, 2026 07:45
@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
caro-docs Ready Ready Preview, Comment Jan 28, 2026 8:17am
caro-foss-website Error Error Jan 28, 2026 8:17am
caro-slides Ready Ready Preview, Comment Jan 28, 2026 8:17am
caro-storybook Ready Ready Preview, Comment Jan 28, 2026 8:17am
cmdai Error Error Jan 28, 2026 8:17am
cmdai-saas Ready Ready Preview, Comment Jan 28, 2026 8:17am

Request Review

@github-actions
Copy link
Contributor

Welcome to caro! 🎉

Thank you for your first pull request, @wildcard! We're thrilled to have you as a contributor.

Review Process:

  • Automated checks will run (tests, linting, formatting)
  • A maintainer will review your changes within 48-72 hours
  • We may request changes - this is normal and helps ensure code quality
  • Once approved, your PR will be merged

Helpful Resources:

Tips for a smooth review:

  • Ensure all CI checks pass
  • Respond to feedback promptly
  • Keep changes focused and well-documented

We appreciate your contribution! ❤️

@github-actions github-actions bot added enhancement New feature or request size/M Medium PR (50-200 lines) labels Jan 28, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Greptile configuration file (greptile.json) to enable automated PR review with domain-specific rules for caro's safety-critical patterns, backend trait contracts, error handling standards, and POSIX compliance requirements.

Changes:

  • Adds greptile.json with review settings, context files, ignore patterns, and custom coding rules for automated PR reviews

greptile.json Outdated
Comment on lines +23 to +24
"i18n/**",
"vendor/**"
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ignorePattern "vendor/**" references a directory that does not exist in the repository. This pattern should be removed as there is no vendor directory in the codebase.

Suggested change
"i18n/**",
"vendor/**"
"i18n/**"

Copilot uses AI. Check for mistakes.
greptile.json Outdated
Comment on lines +38 to +40
"id": "backend-trait-contract",
"description": "All inference backends must implement the InferenceBackend trait defined in src/inference/mod.rs. New backends require contract tests in tests/backend_trait_contract.rs.",
"paths": ["src/inference/**"]
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule references "src/inference/" which does not exist in the repository. The actual directory is "src/backends/". The paths should be updated to ["src/backends/"] to match the actual codebase structure. Additionally, the description mentions "InferenceBackend trait" but the actual trait is named "CommandGenerator" as defined in src/backends/mod.rs.

Copilot uses AI. Check for mistakes.
greptile.json Outdated
{
"id": "posix-compliance",
"description": "Generated shell commands must be POSIX-compliant. Do not use bash-specific syntax (arrays, [[ ]], process substitution) unless the detected shell is bash.",
"paths": ["src/prompts/**", "src/inference/**"]
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule references "src/prompts/" and "src/inference/" in its paths. The "src/inference/" path does not exist in the repository - it should be "src/backends/" to match the actual directory structure.

Copilot uses AI. Check for mistakes.
greptile.json Outdated
"CLAUDE.md",
"docs/development/AGENTS.md",
"src/safety/patterns.rs",
"src/inference/mod.rs",
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contextFile "src/inference/mod.rs" does not exist in the repository. The actual directory is "src/backends/" with the trait defined in "src/backends/mod.rs". This should be updated to "src/backends/mod.rs" to reference the correct file containing the CommandGenerator trait definition.

Suggested change
"src/inference/mod.rs",
"src/backends/mod.rs",

Copilot uses AI. Check for mistakes.
greptile.json Outdated
"target/**",
".worktrees/**",
"kitty-specs/**/tasks/**",
"i18n/**",
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ignorePattern "i18n/**" references a directory that does not exist in the repository. This pattern should be removed unless there are plans to add i18n support in the near future.

Suggested change
"i18n/**",

Copilot uses AI. Check for mistakes.
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@greptile-apps
Copy link

greptile-apps bot commented Jan 28, 2026

Greptile Overview

Greptile Summary

Adds greptile.json configuration file to enable Greptile-powered PR reviews with safety-critical rules for the caro project. The configuration enforces 7 domain-specific rules covering TDD for safety patterns, error handling standards (anyhow::Result and thiserror), POSIX compliance for shell commands, and backend trait contracts.

Critical Issues Found:

  • Incorrect context file path: src/inference/mod.rs doesn't exist (should be src/backends/mod.rs)
  • Wrong trait name in backend-trait-contract rule: references InferenceBackend but actual trait is CommandGenerator
  • Wrong path pattern in backend-trait-contract rule: uses src/inference/** but should be src/backends/**

Configuration Quality:

  • Strong rule coverage aligning with CLAUDE.md development guide
  • Appropriate ignore patterns for lock files, snapshots, and i18n translations
  • Good context file selection (safety patterns, ADRs, agent documentation)
  • Reasonable maxComments: 15 limit to avoid review fatigue

Confidence Score: 2/5

  • This PR contains configuration errors that will cause the review bot to fail when loading context files and validating against incorrect paths
  • Score reflects critical path mismatches that break functionality: non-existent src/inference/mod.rs context file and incorrect trait/path references in rules. While the overall configuration structure is sound, these errors will prevent the bot from working correctly until fixed.
  • The greptile.json file requires immediate correction of path references before the configuration can function

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub PR
    participant Greptile as Greptile Bot
    participant Config as greptile.json
    participant Context as Context Files
    participant Rules as Review Rules
    
    Dev->>GH: Opens PR
    GH->>Greptile: Trigger PR review
    Greptile->>Config: Load configuration
    Config->>Greptile: reviewSettings (strictness: high)
    Config->>Greptile: ignorePatterns (*.lock, i18n/**)
    Greptile->>Context: Load CLAUDE.md
    Greptile->>Context: Load src/safety/patterns.rs
    Greptile->>Context: Load src/backends/mod.rs (ERROR: config has src/inference/mod.rs)
    Greptile->>Context: Load docs/development/AGENTS.md
    Greptile->>Context: Load docs/adr/README.md
    Greptile->>Rules: Apply 7 domain-specific rules
    Rules->>Greptile: safety-pattern-tdd
    Rules->>Greptile: no-panics-in-production
    Rules->>Greptile: backend-trait-contract (ERROR: wrong trait/path)
    Rules->>Greptile: no-direct-main-commits
    Rules->>Greptile: safety-zero-false-positives
    Rules->>Greptile: use-anyhow-for-errors
    Rules->>Greptile: posix-compliance
    Greptile->>GH: Post review (max 15 comments)
    GH->>Dev: Display review feedback
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

greptile.json Outdated
"CLAUDE.md",
"docs/development/AGENTS.md",
"src/safety/patterns.rs",
"src/inference/mod.rs",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/inference/mod.rs doesn't exist - should be src/backends/mod.rs

Suggested change
"src/inference/mod.rs",
"src/backends/mod.rs",
Prompt To Fix With AI
This is a comment left during a code review.
Path: greptile.json
Line: 14:14

Comment:
`src/inference/mod.rs` doesn't exist - should be `src/backends/mod.rs`

```suggestion
    "src/backends/mod.rs",
```

How can I resolve this? If you propose a fix, please make it concise.

greptile.json Outdated
{
"id": "backend-trait-contract",
"description": "All inference backends must implement the InferenceBackend trait defined in src/inference/mod.rs. New backends require contract tests in tests/backend_trait_contract.rs.",
"paths": ["src/inference/**"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule references InferenceBackend trait but actual trait is CommandGenerator (found in src/backends/mod.rs:17)

Suggested change
"paths": ["src/inference/**"]
"description": "All command generation backends must implement the CommandGenerator trait defined in src/backends/mod.rs. New backends require contract tests in tests/backend_trait_contract.rs.",
Prompt To Fix With AI
This is a comment left during a code review.
Path: greptile.json
Line: 40:40

Comment:
Rule references `InferenceBackend` trait but actual trait is `CommandGenerator` (found in `src/backends/mod.rs:17`)

```suggestion
      "description": "All command generation backends must implement the CommandGenerator trait defined in src/backends/mod.rs. New backends require contract tests in tests/backend_trait_contract.rs.",
```

How can I resolve this? If you propose a fix, please make it concise.

greptile.json Outdated
"id": "backend-trait-contract",
"description": "All inference backends must implement the InferenceBackend trait defined in src/inference/mod.rs. New backends require contract tests in tests/backend_trait_contract.rs.",
"paths": ["src/inference/**"]
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Path pattern should match actual directory structure (src/backends/ not src/inference/)

Suggested change
},
"paths": ["src/backends/**"]
Prompt To Fix With AI
This is a comment left during a code review.
Path: greptile.json
Line: 41:41

Comment:
Path pattern should match actual directory structure (`src/backends/` not `src/inference/`)

```suggestion
      "paths": ["src/backends/**"]
```

How can I resolve this? If you propose a fix, please make it concise.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2026

Website Claims Verification Report

Run ID: 21430462250
SHA: 70bf79a
Date: 2026-01-28

Platform Results

claims-report-macos-latest

{
  "suite": "website-claims",
  "platform": "macos-latest",
  "timestamp": "2026-01-28T08:30:39Z",
  "passed": 84,
  "skipped": 0,
  "warnings": 1,
  "run_id": "21430462250",
  "sha": "70bf79ad28bf37124c204f007e1fd4cabb2900b3"
}

claims-report-ubuntu-latest

{
  "suite": "website-claims",
  "platform": "ubuntu-latest",
  "timestamp": "2026-01-28T08:20:04Z",
  "passed": 84,
  "skipped": 0,
  "warnings": 1,
  "run_id": "21430462250",
  "sha": "70bf79ad28bf37124c204f007e1fd4cabb2900b3"
}

Documentation

Next Steps

  1. Review warnings and address any gaps
  2. Update website if claims are inaccurate
  3. Implement missing features if claims are aspirational

- src/inference/ → src/backends/ (correct directory)
- InferenceBackend → CommandGenerator (correct trait name)
- Remove non-existent i18n/** and vendor/** ignore patterns

https://claude.ai/code/session_01LYoJKgR9eQrhQgG5Z3JbPm
Previous config used invented keys (reviewSettings, contextFiles, rules
with id/paths). Rewritten to use the documented schema: strictness,
triggerOnUpdates, customContext with rules/files/scope, ignorePatterns
as newline-separated string, etc.

https://claude.ai/code/session_01LYoJKgR9eQrhQgG5Z3JbPm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size/M Medium PR (50-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants