Skip to main content

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.

Key Features:

  • 🚀 Local-first: Runs entirely on your machine - no cloud calls
  • 🔍 Symbol-level analysis: Detects changed functions, classes, and variables
  • 🏷️ Change type detection: Identifies what type of change (added, removed, modified, signature changed)
  • 💡 Impact summaries: Human-readable recommendations for each changed symbol
  • 🤖 AI-powered risk assessment: Uses local Ollama for intelligent impact analysis
  • 🛡️ Commit guard: Advisory warnings for HIGH risk changes (non-blocking)
  • 🎯 CLI-first interface: Simple checkod assess command
  • 📊 Summary reports: Clear output of what changed and risk levels
  • ⚡ Graceful fallback: Works without Ollama using heuristic analysis

Installation

Prerequisites

  • Python 3.8+
  • Git
  • Ollama (optional, for AI risk assessment)

Initial Setup

Install from PyPI:

pip install checkod-ai

How to Use

  1. Make your code change (or let Copilot make changes)

  2. Stage your changes with git

git add .
# For new files, you may need:
git add -N .
  1. 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 that checkod assess or checkod assess-ai can 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

🔍 Starting Impact Assessment...

📊 Changed Symbols (3 detected):
  • calculateDiscount
  • OrderStatus
  • userTier

📈 Change Summary:
  Functions: 1 function added
  Classes: 1 class added
  Variables: 1 variable added

================================================================================
📋 Impact Summary
================================================================================
You changed: calculateDiscount()
Change Type: function added
Risk Level: MEDIUM

This may affect:
  • checkout_service (logic flow)
  • /api/orders (user-facing behavior)
  • test_checkout (test coverage)

Recommended Actions:
  • Write unit tests for calculateDiscount
  • Test integration with checkout service
  • Document function parameters and return type

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:

================================================================================
🤖 AI Risk Assessment (powered by local Ollama)
================================================================================
Symbol: calculateDiscount
────────────────────────────────
Risk Classification: MEDIUM

Reason: Used in multiple modules; requires testing and code review.

Validation Steps:
• Test discount calculation across pricing tiers
• Verify integration with checkout service
• Add regression tests if coverage is low

How It Works

  1. Reads git diff - Gets all staged and unstaged changes
  2. Extracts symbols - Finds functions, classes, and variables
  3. Detects change type - Identifies what kind of change was made
  4. Assesses risk - Uses local AI (Ollama) or heuristics
  5. Generates recommendations - Suggests testing and review actions
  6. 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

checkod_ai-0.1.3.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

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

checkod_ai-0.1.3-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: checkod_ai-0.1.3.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for checkod_ai-0.1.3.tar.gz
Algorithm Hash digest
SHA256 cbc190d83c4c69e79312b3cbc6063d2a733b8591f4df3a34a3ef83154f05882f
MD5 915a4c9eff47a6dfff480bf7d7876c31
BLAKE2b-256 c3e8e7ef686ad91325a26af2efc190d66d830c5e546b7bb9714cac792d179db2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: checkod_ai-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for checkod_ai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c1d5b28247e3e9f544c9c797cf68721d6a08d2f30ce24fd01ef603fa052fc6ec
MD5 1e6b2bbe64f92cbece4f128198669e5c
BLAKE2b-256 b23ba948d318a42d3e6aced24f95fb8bb60c52d4351bc0b84427ba16fb9f6812

See more details on using hashes here.

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