@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
| Situation | Command | Example |
|---|---|---|
| You want future reviews to enforce a convention | learn: | @codepeel learn: We use Zod for validation |
| A finding is a false positive you'll keep seeing | ignore: | @codepeel ignore: console.log in debug.ts is intentional |
| You've fixed the issue and want to dismiss it | resolve | Reply @codepeel resolve on the inline comment |
You want a .codepeel.yml generated for you | init | @codepeel init |
| You want to reset config to match dashboard | reset 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:andignore: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
- You mention
@codepeelin a PR comment - GitHub sends a webhook to CodePeel
- CodePeel identifies the command type (learn/ignore/resolve/question)
- For questions: loads the full PR diff and generates an AI response
- For learn/ignore: saves the rule to the repository's knowledge base
- For resolve: marks the file+line as dismissed in Firestore
- 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.ymlconfiguration- 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 | |
|---|---|---|
| Storage | CodePeel database (per-repo) | Your repository (version-controlled) |
| Scope | This repository only | This repository only |
| Management | Learnings page in dashboard | Edit the YAML file |
| Best for | Ad-hoc rules, quick corrections | Team-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/dismissonly works on CodePeel review comments (Files changed tab), not conversation comments