Skip to main content

@codepeel Chat

Talk to CodePeel directly in your pull request by mentioning @codepeel in any comment.


Basic Usage

Type @codepeel followed by your question:

@codepeel is there a potential race condition in the new handler?

CodePeel replies with full context of the PR diff. The response typically arrives within 5–15 seconds.


Commands

learn: — Teach a rule

@codepeel learn: Always use parameterized queries for database access
@codepeel learn: We use effect-ts for error handling, not try/catch
@codepeel learn: The src/generated/ directory is auto-generated — never flag issues there

The rule is saved immediately and applied to all future reviews for this repository. You'll see a confirmation reply:

Rule Saved I have saved the following preference for owner/repo: Always use parameterized queries for database access

ignore: — Suppress a pattern

@codepeel ignore: Don't flag TODO comments as issues
@codepeel ignore: console.log in debug utils is intentional

Works the same as learn: — saves a rule that tells the AI to stop flagging this pattern. Both learn: and ignore: are stored as repository preferences and injected into future review prompts.

resolve / dismiss — Handle a finding

Reply to any CodePeel inline comment (in the Files changed tab) with:

@codepeel resolve

Also accepts: dismiss, ignore this

Marks the finding as resolved. It won't be flagged again on subsequent pushes to this PR. The resolved state is stored per file+line, so if you push new code to the same line, it stays dismissed.

Important: This only works when replying to a CodePeel review comment (in Files changed), not on regular PR conversation comments.

General questions — No prefix needed

@codepeel explain why this is flagged as a security issue
@codepeel suggest a better approach for error handling here
@codepeel is this N+1 query a real concern at our scale?

Any text after @codepeel that doesn't start with learn:, ignore:, resolve, or dismiss is treated as a free-form question. CodePeel answers using the full PR diff as context.


When to Use Each Command

SituationCommandExample
You want future reviews to enforce a conventionlearn:@codepeel learn: We use Zod for validation
A finding is a false positive you'll keep seeingignore:@codepeel ignore: console.log in debug.ts is intentional
You've fixed the issue and want to dismiss itresolveReply @codepeel resolve on the inline comment
You want a .codepeel.yml generated for youinit@codepeel init
You want to reset config to match dashboardreset config@codepeel reset config
You need clarification or advice(just ask)@codepeel is this N+1 query a real concern here?

Tip: Rules saved via learn: and ignore: apply to all future reviews in that repository. To manage or delete them, go to the Learnings page in the dashboard.


What Happens Behind the Scenes

  1. You mention @codepeel in a PR comment
  2. GitHub sends a webhook to CodePeel
  3. CodePeel identifies the command type (learn/ignore/resolve/question)
  4. For questions: loads the full PR diff and generates an AI response
  5. For learn/ignore: saves the rule to the repository's knowledge base
  6. For resolve: marks the file+line as dismissed in Firestore
  7. Response is posted as a reply comment

The round-trip typically takes 5–15 seconds for questions, and 2–5 seconds for learn/ignore/resolve commands.


What Context Does the AI See?

When you ask a question, CodePeel's AI receives:

  • The full PR diff (all changed files)
  • Your question text

The AI does not currently load:

  • Individual file/line context from the comment position
  • .codepeel.yml configuration
  • Previously saved learnings

For the most accurate answers, include specific details in your question (file names, function names, line numbers).


Differences: learn: vs expert_rules

@codepeel learn:expert_rules in .codepeel.yml
StorageCodePeel database (per-repo)Your repository (version-controlled)
ScopeThis repository onlyThis repository only
ManagementLearnings page in dashboardEdit the YAML file
Best forAd-hoc rules, quick correctionsTeam-wide standards, onboarding

Both are injected into the AI review prompt. Use learn: for quick one-off rules, and expert_rules for conventions you want in version control.


Limitations

  • The AI context is the full PR diff — very large PRs (> 100 files) may have truncated context
  • resolve/dismiss only works on CodePeel review comments (Files changed tab), not conversation comments
← All docsCodePeel