Skip to content

[PR Genius] Rule layers: split into repo-agnostic and repo-specific rules #1036

Description

@Ikalus1988

Goal

Split PR Genius rules into two layers: repo-agnostic (portable) and repo-specific (customizable).

Context

PR Genius currently has hardcoded rules. Different repos need different rules:

  • MisakaNet: DCO, lesson lint, MCP server changes
  • Other repos: CI, lockfile, workflow, security, docs-only

The core logic should be portable; repo-specific rules should be configurable.

Scope

Repo-agnostic rules (core, portable)

  • PR size (small/medium/large)
  • Test coverage (has tests?)
  • Documentation (has docs update?)
  • Issue reference (links to issue?)
  • DCO sign-off
  • Draft status
  • Review staleness

Repo-specific rules (configurable)

  • pr-genius.yaml in repo root:

Implementation

  • Create scripts/pr_genius_rules.py:
    • Loads repo-agnostic rules (built-in)
    • Loads repo-specific rules from pr-genius.yaml
    • Merges and deduplicates
    • Returns ordered rule list
  • Update scripts/pr_genius_report.py:
    • Use rule engine instead of hardcoded checks
    • Support rule enable/disable
    • Support path-based rule triggers
  • Add pr-genius.yaml to MisakaNet repo
  • Document rule format in docs/pr-genius-rules.md

Deliverable

  • Rule engine loads from config
  • MisakaNet has pr-genius.yaml with current rules
  • Other repos can create their own config
  • Core logic is portable (no repo-specific hardcoding)

Labels

ready, agent-friendly, zero-bounty


This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting /reward 100 (replace 100 with the amount).
🕵️‍♂️ If someone starts working on this issue to earn the rewards, they can comment /try to let everyone know!
🙌 And when they open the PR, they can comment /claim #1036 either in the PR description or in a PR's comment.

🪙 Also, everyone can tip any user commenting /tip 20 @Ikalus1988 (replace 20 with the amount, and @Ikalus1988 with the user to tip).

📖 If you want to learn more, check out our documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-friendlyIssue has clear file path, commands, and expected outputneeds-acreadyzero-bountyZero monetary reward — merge credit + leaderboard only

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions