RICE-prioritise your Sentry issues, with AI scoring that traces each issue into your codebase (via Claude Code).
Project description
sentry-rice
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] tokenin~/.sentryclirc). Read scope is enough for syncing; resolving issues from the UI needs write scope. - Claude Code — only 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.)
Since it isn't published to a package index, install from a local clone:
git clone <this repo> ~/Server/side/sentry-rice
# in YOUR project repo:
python -m venv .venv && source .venv/bin/activate
pip install -e ~/Server/side/sentry-rice # editable: engine updates as you pull
Once you host it on a private remote, pip install "git+ssh://…/sentry-rice.git"
works too.
Quickstart
# 1. Configure
cp ~/Server/side/sentry-rice/config.example.yaml config.yaml
cp ~/Server/side/sentry-rice/rubric.example.md rubric.md
$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.yamlonce and drop the--configflag.
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 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sentry_rice-0.1.0.tar.gz.
File metadata
- Download URL: sentry_rice-0.1.0.tar.gz
- Upload date:
- Size: 47.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc090dde1a64bbd16df1084d7d34d4bc7c6ebb2aa736a560760f609aa4c92d04
|
|
| MD5 |
3b16caed6a5911d494ac897149706556
|
|
| BLAKE2b-256 |
25995990f398a4f608598c4f886448dc819bad742a0cac2b27a7b35c75ec6c85
|
Provenance
The following attestation bundles were made for sentry_rice-0.1.0.tar.gz:
Publisher:
publish.yml on tomasz-tomczyk/sentry-rice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sentry_rice-0.1.0.tar.gz -
Subject digest:
bc090dde1a64bbd16df1084d7d34d4bc7c6ebb2aa736a560760f609aa4c92d04 - Sigstore transparency entry: 1732996362
- Sigstore integration time:
-
Permalink:
tomasz-tomczyk/sentry-rice@8713e2aacc7e003e40a481b44f88bc32736186e0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tomasz-tomczyk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8713e2aacc7e003e40a481b44f88bc32736186e0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sentry_rice-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sentry_rice-0.1.0-py3-none-any.whl
- Upload date:
- Size: 50.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c52e0ec3f2912e245abbb2aacd374365d897014df490bd16bada39ea3c93a66f
|
|
| MD5 |
1dc5bd55612e33e1f7c8f9dab2e23076
|
|
| BLAKE2b-256 |
64815ef82a639b2cf4539fd64d865bddf68cfa6ee56d748d8c90a5c04953a5d0
|
Provenance
The following attestation bundles were made for sentry_rice-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on tomasz-tomczyk/sentry-rice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sentry_rice-0.1.0-py3-none-any.whl -
Subject digest:
c52e0ec3f2912e245abbb2aacd374365d897014df490bd16bada39ea3c93a66f - Sigstore transparency entry: 1732996420
- Sigstore integration time:
-
Permalink:
tomasz-tomczyk/sentry-rice@8713e2aacc7e003e40a481b44f88bc32736186e0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tomasz-tomczyk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8713e2aacc7e003e40a481b44f88bc32736186e0 -
Trigger Event:
push
-
Statement type: