Skip to main content

Learnings & Knowledge Base

Teach CodePeel your codebase conventions. Learnings are rules that get injected into every review, so the AI checks for your team's specific patterns.

Adding a Learning

Via PR Comment (fastest)

Mention @codepeel with the learn: prefix in any PR comment:

@codepeel learn: Always use Zod schemas for API request validation
@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.

Via .codepeel.yml (version-controlled)

Add rules to your config file for team-wide conventions:

expert_rules:
  - "Use functional components with hooks, not class components"
  - "All database queries must use the repository pattern"
  - "API responses follow JSend specification"

The difference: learn: rules are stored in CodePeel's database per-repo. expert_rules live in your repo and are version-controlled.


Adding Ignore Rules

Suppress false positives with the ignore: prefix:

@codepeel ignore: Don't flag TODO comments as issues
@codepeel ignore: The console.log in src/lib/debug.ts is intentional

Viewing Your Learnings in the Webapp

Knowledge Base Page

Go to Knowledge Base in the sidebar. This shows:

  • Learning growth over time (chart)
  • Pattern category breakdown (pie chart)
  • Learnings per repository
  • Recent learnings list
Knowledge Base page showing learning growth chart, category breakdown, and recent learnings

Use the date range filter (7d / 30d / 90d) or filter by repository.

Learnings Page

Go to Learnings in the sidebar. This shows the per-repository list:

  1. Select a repository from the dropdown
  2. View all active learnings for that repo
  3. Use thumbs up/down to give feedback
  4. Delete learnings you no longer need
Learnings page showing per-repository rules with thumbs up/down feedback buttons

Managing Learnings (Thumbs Up / Down)

Each learning has feedback buttons:

ActionWhat it does
👍 Thumbs upConfirms the rule is correct. Keeps it active in future reviews.
👎 Thumbs downMarks the rule as incorrect. Tells the AI to stop enforcing this pattern.
🗑️ DeleteRemoves the rule entirely.

How Learnings Affect Reviews

When CodePeel reviews a PR:

  1. Loads all learnings for the repository
  2. Injects confirmed rules as "TEAM PREFERENCES" in the AI prompt
  3. Injects thumbs-down rules as "FALSE POSITIVE CORRECTIONS" (don't flag these)
  4. The AI considers these alongside its standard analysis

The more specific your learnings, the more relevant your reviews become.


Best Practices

  • Add learnings early — the sooner CodePeel knows your conventions, the better
  • Be specific — "Use parameterized queries" is better than "Be careful with databases"
  • Review periodically — remove outdated rules from the Learnings page
  • Use ignore rules on the spot — when you see a false positive, suppress it immediately
  • Combine both methodsexpert_rules for team standards, learn: for ad-hoc rules
← All docsCodePeel