Skip to content

[feat] Risk-flagging review pane — rules layer #52

Description

@Sph3ricalPeter

Priority: P0 — novel, no AI dependency
Effort: ~1 week
AI required: No

Pre-commit review pane that flags suspicious patterns in the staged diff. Pure procedural — no model required. This is the core of the feature; the AI half (separate issue) is polish.

Scope — left column, instant rules-based checks:

  • Accidental files: .env, *.log, *.bak, *.tmp, *.swp, anything in node_modules, large binaries (>configurable threshold)
  • Test files deleted (not modified — deleted)
  • Public-API-signature changes: heuristic match on exported function/class declarations in **/index.*, **/api/**, or user-configured glob patterns
  • TODO/FIXME added in this commit
  • console.log, debugger, print(), dbg!, dump() added
  • Lockfile changed without matching manifest (package-lock.json without package.json, Cargo.lock without Cargo.toml, etc.)
  • Commit message scope mismatch: message says feat(auth): but no staged files under auth/
  • Issue ID in commit message doesn't match branch's issue ID

UI:

  • Pane appears in commit panel before user hits Commit
  • Each flag has severity (info / warning / blocker — user-configurable)
  • "Blocker" requires explicit override checkbox to commit
  • Per-rule disable in settings
  • Per-repo rule config (custom glob patterns for API files, etc.)

Acceptance criteria:

  • All listed rules implemented and toggleable
  • Severity levels work (info/warning/blocker)
  • Per-repo configuration for API path patterns and binary thresholds
  • Blocker override requires explicit user action
  • No false-positive storms — well-tuned defaults

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: frontendReact/TypeScript frontend changesarea: rustRust backend changespriority: highShip blocker or major gaptype: featureNew feature implementation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions