Change Risk Analysis CLI - Find impacted files and notify owners
Project description
Blame Router
Two CLI tools that reduce the social friction of asking questions about code.
The Problem
The pain isn't finding "Dave." The pain is that Dave is busy, the code is old, and you—the new engineer—don't know what to ask. These tools automate the transaction cost of context.
Tools
ask.py - The Blame Router
Point at a confusing line of code. Get a smart question auto-generated and routed to the author.
python ask.py <file_path> <line_number>
Example:
python ask.py src/billing.py 42
Output:
📧 Author: dave@company.com
💬 Commit: "tax rate update"
✨ Magic Question:
"Hey, I'm reviewing `billing.py`. I see a 5% tax rate hardcoded on line 42.
Is this derived from the 2023 CA Regulatory update, or is it a placeholder?"
📨 SLACK MESSAGE (simulated)
TO: dave@company.com
crisk.py - Change Risk Checker
Before you push, find files semantically related to your changes and identify their owners.
python crisk.py check [--draft]
Example:
git add src/client.py
python crisk.py check --draft
Output:
⚠️ Your changes may impact:
1. __init__.py (relevance: 0.82)
→ Owner: jonathan@company.com
2. auth.py (relevance: 0.78)
→ Owner: jonathan@company.com
DRAFT MESSAGE:
"Hey, I'm updating client.py to support new API key formats.
This might impact auth.py and __init__.py. Any concerns?"
📬 Recipients:
• jonathan@company.com (8 files)
Quick Start (Cloud Version)
Install
pip install git+https://github.com/rohankatakam/fasho.ski.git
Or with uv:
uv pip install git+https://github.com/rohankatakam/fasho.ski.git
Login
crisk login
This opens your browser to authenticate with coderisk.dev. Once logged in, you're ready to go.
Use
git add src/client.py
crisk check --draft
Local Setup (Self-hosted)
If you want to run everything locally with your own API keys:
1. Install dependencies
pip install google-genai python-dotenv requests
2. Create .env file
cp .env.example .env
Add your API keys:
GEMINI_API_KEY=your_gemini_api_key
RELACE_API_KEY=your_relace_api_key
3. Run from a git repository
Both tools require being run from within a git repository.
How It Works
ask.py
- Archaeologist: Runs
git blameto find who wrote the line and their commit message - Investigator: Sends context to Gemini to generate a hypothesis-driven question
- Router: Outputs the message (Slack integration simulated)
crisk.py
- Gets your staged diff (
git diff --cached) - Sends codebase to Relace semantic search API
- Finds files semantically related to your changes
- Runs
git blameto identify owners of related files - Uses Gemini to draft a notification message
The Pitch
"Everyone else is building tools to search code. I built a tool that talks to the people who wrote it. It turns a 30-minute 'Zoom?' interruption into a 30-second Slack reply."
License
MIT
Project details
Release history Release notifications | RSS feed
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 crisk-0.1.0.tar.gz.
File metadata
- Download URL: crisk-0.1.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb12ddf560ce516f81be8155fba6db00e5b33381301ca38dba0222b34b432628
|
|
| MD5 |
17c10dacc4d96ca4b047ffd7ca40ae29
|
|
| BLAKE2b-256 |
6fc6b84d414f041b504f4bbc8198b101a9e8371feb7f297555c589c6695e8257
|
File details
Details for the file crisk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crisk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47b8e06fb790fa5034dc2e4d26b30dd7c2a8861bdd7b804bbb640271b6705b0f
|
|
| MD5 |
275a5432ecd9cd08758ce7312a718a3e
|
|
| BLAKE2b-256 |
a82f05820464e88cadf4b6b0200829f1eef628b8acdb33f10c3da556a92b6995
|