Skip to main content

RICE-prioritise your Sentry issues, with AI scoring that traces each issue into your codebase (via Claude Code).

Project description

sentry-rice

PyPI Python License: MIT

RICE-prioritise your Sentry issues — with AI scoring that traces each issue into your codebase. Every issue gets one number, so the stuff actually worth fixing floats to the top. Browse it in a Sentry-styled web UI; override anything you disagree with; resolve straight through to Sentry.

RICE  =  (Reach × Impact × Confidence) / Effort
  • Reach and the final RICE are computed deterministically — recent event volume on a log curve, relative to the busiest issue in the same environment (so a spicy staging issue ranks alongside a spicy prod one), decayed by recency. Never AI-assigned.
  • Impact, Confidence, Effort come from an AI agent that reads the error and traces it into your actual code before judging. Impact is fixed per category; confidence/effort come from what the trace finds.

Everything opinionated — categories, thresholds, Sentry projects, the scoring rubric — lives in a single config.yaml. Nothing is baked to one org.


Requirements

  • Python 3.11+
  • A Sentry auth token (SENTRY_AUTH_TOKEN, or [auth] token in ~/.sentryclirc). Read scope is enough for syncing; resolving issues from the UI needs write scope.
  • Claude Codeonly for the AI scoring step. The deterministic engine, sync, web UI, overrides and resolve all work without it; AI scoring is the Claude-Code-native layer (see AI scoring).

How you consume it

This is a library you install + a config.yaml you own — not a repo you fork. Keep your own small repo with just your config, rubric, and .claude/ scoring commands; install the engine as a dependency and pull updates with a version bump instead of a fork-merge. (Fork only if you want to change the engine itself.)

Install it from PyPI:

python -m venv .venv && source .venv/bin/activate
pip install sentry-rice

Pull engine updates later with pip install -U sentry-rice — no fork to maintain.

Quickstart

# 1. Install + scaffold a starter config.yaml + rubric.md
pip install sentry-rice
sentry-rice init
$EDITOR config.yaml      # set sentry.org, projects, categories, codebase_path

# 2. Pull issues from Sentry (creates the DB, imports, scores reach/RICE)
export SENTRY_AUTH_TOKEN=...        # or rely on ~/.sentryclirc
sentry-rice --config config.yaml sync

# 3. Browse
sentry-rice --config config.yaml serve      # http://127.0.0.1:5001

At this point issues are imported and have a deterministic reach, but no AI judgment yet. To score them, set up the AI layer.

Tip: set SENTRY_RICE_CONFIG=config.yaml once and drop the --config flag.

AI scoring

Scoring is done by Claude Code sub-agents — one per issue — that read your rubric, trace the issue into project.codebase_path, decide impact/confidence/effort, and upsert the result. Reach is never sent by the agent; it's computed.

# Render the scoring commands into your repo's .claude/ (paths baked from config)
sentry-rice --config config.yaml init-claude .

This writes:

  • .claude/commands/reimport.md — sync the last N days + score the new issues
  • .claude/commands/reclassify.md — re-score everything against the current rubric
  • .claude/commands/score-issue.md — score a single issue
  • .claude/workflows/score-issues.js — the per-issue fan-out the commands launch

Then, inside Claude Code in your repo, run /reimport. It syncs, dumps the unscored issues, fans out one agent per issue, and recomputes. Edit rubric.md to change how everything is scored, then /reclassify.

No Claude Code? You can still use the tool: reach/RICE, the UI, overrides and resolve all work. Score impact_category/confidence/effort yourself by piping JSON to sentry-rice upsert, or via the override form in the UI.

Configuration

A single YAML file. See config.example.yaml for the full annotated schema. The shape:

Section What it sets
project name, codebase_path (where agents trace), rubric_file
sentry org, region_url, projects (id → app), environments, prod_environments
thresholds sync_days, per-env min_events floors, reference_floor, recency_decay, rice_bands
categories name → { score 0–10, icon (lucide), color } — impact is fixed per category
ui.fix_prompt_template the "copy fix prompt" body (optional; {sentry_id} etc. interpolated)
db.path SQLite path (default <config dir>/db/rice.db; or RICE_DB_PATH)

CLI

sentry-rice init [DEST]            scaffold a starter config.yaml + rubric.md
sentry-rice initdb                 create / migrate the database
sentry-rice sync [--days N]        pull Sentry, import new, prune stale, recompute
sentry-rice serve [--port 5001]    run the web UI
sentry-rice dump [--all] [PATH]    write issues to JSON for the scoring fan-out
sentry-rice recompute              re-derive reach + RICE for all issues
sentry-rice upsert [PATH]          upsert one scored issue (JSON; stdin if no PATH)
sentry-rice init-claude [DEST]     render the .claude scoring commands into DEST

A worked example

examples/acme/ is a complete configuration for a fictional B2B SaaS, "Acme Cloud" (all values made up) — 10 categories, three projects (backend/web/worker), prod+staging+dev, and a matching rubric.md. Copy it as a starting point.

Development

pip install -e ".[dev]"
pytest          # 41 tests: config, db, scoring, store, sentry (mocked), web, cli

Disclaimer

This is an independent, unofficial project. It is not affiliated with, endorsed by, or sponsored by Functional Software, Inc. or the Sentry project. "Sentry" is a trademark of its respective owner and is used here only to describe what this tool interoperates with.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sentry_rice-0.1.3.tar.gz (52.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sentry_rice-0.1.3-py3-none-any.whl (55.6 kB view details)

Uploaded Python 3

File details

Details for the file sentry_rice-0.1.3.tar.gz.

File metadata

  • Download URL: sentry_rice-0.1.3.tar.gz
  • Upload date:
  • Size: 52.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sentry_rice-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d47a7cf633a3e00bb5697c32f4178e8b1e62efe6429e1c55ad0683627a1af411
MD5 f40dd9dfe816e68323f015f7127d6f20
BLAKE2b-256 b8364ffe177c54be68dcafd4e5c87d4b19cb9e8fc5d132082aa99e453d676435

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentry_rice-0.1.3.tar.gz:

Publisher: publish.yml on tomasz-tomczyk/sentry-rice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sentry_rice-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sentry_rice-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 55.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sentry_rice-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 60b0772399bfb95e08f55445f73e014f879d660d1237d45a5b61726a32e15db8
MD5 6c677a0fe0e9ff9cd0aa1eb4bc69554f
BLAKE2b-256 8148170edac0ce9bbecfe8c766565b76643b9e852d0649024aecdff5ce704e1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentry_rice-0.1.3-py3-none-any.whl:

Publisher: publish.yml on tomasz-tomczyk/sentry-rice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page