AI Impact Assessment for Code Changes
Project description
CheckodAI
AI Impact Assessment for code changes - understand what Copilot changed before you commit it.
Overview
CheckodAI is a Python CLI tool that helps developers understand the scope and implications of their code changes by analyzing git diffs and extracting modified symbols (functions, classes, variables). It can optionally use a local LLM (Ollama) to assess the risk of each change.
Privacy
CheckodAI runs entirely locally.
- No code is uploaded
- No cloud calls required
- No telemetry
- Works offline with local LLM (Ollama)
All analysis happens on your machine.
Features (Simple):
- Local-first: Runs entirely on your machine with no cloud calls or telemetry.
- Impact Assessment: Detects specific changes to functions, classes, and variables and provides human-readable recommendations for each modified symbol.
- AI-powered risk assessment: Utilizes local Ollama for intelligent impact analysis and scoring.
- CLI-first:
checkod assessandcheckod assess-ai - Works offline, no telemetry
Installation
Prerequisites
- Python 3.8+
- Git
- Ollama (optional, for AI risk assessment)
Initial Setup
Install from PyPI:
pip install checkod-ai
How to Use
-
Make your code change (or let Copilot make changes)
-
Stage your changes with git
git add .
# For new files, you may need:
git add -N .
- Run the assessment (no AI)
checkod assess
Or, to use AI-powered risk assessment (requires Ollama):
checkod assess-ai
Note: For newly created files, you must run
git add -N .(intent-to-add) so thatcheckod assessorcheckod assess-aican detect them. This is a git limitation for diff tools.
Usage
Basic Commands
Analyze changes in the current repository:
checkod assess
Analyze a specific repository:
checkod assess --repo /path/to/repo
Example Output
==============================
📊 File Change Assessment
==============================
File +Lines -Lines
------------------------------------------------
README.md 9 2
checkod/main.py 42 8
--------------------------------
================================================================================
📋 Impact Summary
================================================================================
Symbol Change Type Risk
--------------------------------------------------------
assess_ai function added LOW
exit_code variable added LOW
repo_path variable added LOW
enable_risk_assessment variable added LOW
diff_range variable added LOW
include_untracked variable added LOW
help variable added LOW
This may affect:
• diff_range_service (logic flow)
• enable_risk_assessment_service (logic flow)
• exit_code_service (logic flow)
• help_service (logic flow)
• include_untracked_service (logic flow)
• repo_path_service (logic flow)
• /api/diff_range (user-facing behavior)
• /api/enable_risk_assessment (user-facing behavior)
• /api/exit_code (user-facing behavior)
• test_repo_path (test coverage)
✅ Assessment complete!
Optional: Install Ollama for AI Risk Assessment
Ollama enables intelligent risk scoring. Install and configure:
# macOS / Linux
curl -fsSL https://ollama.ai/install.sh | sh
# Or use Homebrew (macOS)
brew install ollama
# Pull the model
ollama pull llama3
# Start the server (runs on localhost:11434)
ollama serve
With Ollama running, you'll also get AI-powered risk assessment:
================================================================================
Risk Assessment
================================================================================
Details
File: src/payment.py - Symbol: process_payment
Risk: MEDIUM
Summary: This function was modified to add new logic for payment retries. Review for edge cases and ensure all payment gateways are supported. Add integration and regression tests.
File: src/payment.py - Symbol: PaymentGateway
Risk: LOW
Summary: This class was refactored for clarity. Confirm that all gateway subclasses are compatible and update documentation as needed.
File: src/user.py - Symbol: userTier
Risk: LOW
Summary: Variable added to support new user segmentation. Validate tier assignment logic and update user onboarding tests.
File: src/user.py - Symbol: upgrade_account
Risk: HIGH
Summary: Function signature changed. This affects account upgrade flow. Review downstream services, update API docs, and run full test suite for upgrade scenarios.
File: src/api/orders.py - Symbol: OrderStatus
Risk: LOW
Summary: Enum values updated. Ensure all order states are handled in frontend and backend. Add tests for new states.
File: src/api/orders.py - Symbol: calculateDiscount
Risk: MEDIUM
Summary: Function logic changed. Test discount calculation across pricing tiers and verify integration with checkout service.
✅ Assessment complete!
How It Works
- Reads git diff - Gets all staged and unstaged changes
- Extracts symbols - Finds functions, classes, and variables
- Detects change type - Identifies what kind of change was made
- Assesses risk - Uses local AI (Ollama) or heuristics
- Generates recommendations - Suggests testing and review actions
- Advisory warnings - HIGH risk changes trigger warnings
Note: This is an early-stage project. The API and behavior are subject to change.
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 checkod_ai-0.1.4.tar.gz.
File metadata
- Download URL: checkod_ai-0.1.4.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2797202d9c18e12d775147a64a42871a9aea12d6b3d45d8985f8d7c9fde2209
|
|
| MD5 |
a4d60821a0efe9d4fced1317dfcf8c18
|
|
| BLAKE2b-256 |
e0d8403d33094160ddba11d19b2001f82c45f5629bc2926563aa4d899c4f3f4a
|
File details
Details for the file checkod_ai-0.1.4-py3-none-any.whl.
File metadata
- Download URL: checkod_ai-0.1.4-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a86eff33f0020cd057ad45fd9731a419e0b29a0c2e6df989afd366d023b0e793
|
|
| MD5 |
6099347f120709c2998ec6cfeae45eb9
|
|
| BLAKE2b-256 |
7152155d2e9247aa126ef4e7c886eda0e1b90bb4e6f54c7ee649f5a81fb077df
|