A tool to analyze codebases for AI-Agent Friendliness
Project description
🤖 Agent Readiness Scorecard
Is your codebase ready for the AI workforce?
agent-readiness-scorecard is a CLI tool that analyzes your Python project to determine how "friendly" it is for AI Agents (like Jules, Copilot, Gemini, or Devin).
AI Agents struggle with:
- Massive Contexts: Large files confuse models and waste token limits.
- Ambiguity: Missing type hints lead to hallucinated parameters.
- Hidden Logic: Complex code flows (high cyclomatic complexity) make it hard for agents to reason about changes.
This tool scores your repo and helps you fix it.
📦 Installation
pip install agent-readiness-scorecard
🚀 Usage
1. Check your Score
Run the scorecard on your current directory:
agent-score .
2. Select an Agent Profile
Different agents have different strengths. Optimize for specific workflows:
--agent=generic(Default): Balanced checks for readability and types.--agent=jules: Strict typing and high documentation requirements (expectsagents.md).--agent=copilot: Focuses on small file sizes for autocomplete efficiency.
3. Auto-Fix Issues
Bootstrap your repository with the necessary context files and skeleton docstrings:
agent-score . --fix
4. Generate a Markdown Report
Generate a detailed report for your team or CI/CD logs. Control the level of detail with --report-style:
agent-score . --report scorecard.md --report-style actionable
--report-style=full: Includes all sections and a complete breakdown of every file.--report-style=actionable(Default): Focuses on issues; hides passing files and high-coverage type safety rows.--report-style=collapsed: (Minimal) Only includes the Executive Summary.
⚙️ Configuration
agent-readiness-scorecard can be configured via pyproject.toml, .agent-readiness-scorecard.json, or CLI flags.
Priority
Settings are resolved in the following order (highest to lowest):
- CLI Flags (e.g.,
--agent,--verbosity) - Configuration File (
pyproject.tomlor.agent-readiness-scorecard.json) - Defaults
Customizing Output Verbosity
You can control how much visual noise the scorecard generates by adding the verbosity or report_style keys to your pyproject.toml.
Noise-Reduction Configuration
[tool.agent-readiness-scorecard]
# Control CLI output (quiet, summary, detailed)
verbosity = "summary"
# Control Markdown report detail (collapsed, actionable, full)
report_style = "actionable"
[tool.agent-readiness-scorecard.thresholds]
acl_yellow = 10
acl_red = 15
type_safety = 90
# Language-specific overrides
[tool.agent-readiness-scorecard.javascript.thresholds]
acl_yellow = 12
acl_red = 18
[tool.agent-readiness-scorecard.markdown.thresholds]
token_limit = 64000
Verbosity Levels (CLI Output)
| Level | Description |
|---|---|
quiet |
Suppresses tables; only prints the Final Score and Project-Wide Issues. Ideal for CI/CD. |
summary |
(Default) Displays Environment Health and actionable files with issues. Perfect scores (100) are hidden to reduce noise. |
detailed |
Deep-dive mode. Provides a full breakdown of every file, using progressive disclosure for passing metrics. |
Report Styles (Markdown Report)
Used when generating a report via the --report flag.
| Style | Description |
|---|---|
collapsed |
(Minimal) Only includes the Executive Summary. |
actionable |
(Default) Focuses on issues: hides passing files and high-coverage type safety rows from tables. |
full |
Includes all sections and a complete breakdown of every file and metric. |
📊 The Scoring System
Your codebase starts at 100 points. Penalties are applied for:
| Metric | Penalty | Why? |
|---|---|---|
| Bloated Files | -1 pt per 10 lines > 200 | Agents lose focus in large files. |
| High ACL | -15 (Red) / -5 (Yellow) | Agent Cognitive Load: (Depth*2) + (Complexity*1.5) + (LOC/50). Target <= 10. |
| Missing Types | -20 pts if coverage < 90% | Agents need types to call functions correctly. |
| Missing Context | -15 pts per missing file | agents.md acts as the System Prompt for your repo. |
| God Modules | -10 pts per module | Modules with > 50 inbound imports overload context. |
| High Entropy | -5 pts per directory | Folders with > 50 files confuse retrieval tools. |
| Circular Deps | -5 pts per cycle | Causes infinite recursion in agent planning. |
🛠 Project Structure
To get a perfect score, your project should look like this:
my-project/
├── agents.md # High-level architecture map for the Agent
├── instructions.md # Testing/Linting commands for the Agent
└── src/ # Your source code (Typed & Docstringed)
🚀 Beta Features
The beta branch includes upcoming capabilities for enhanced agent-readiness:
pyproject.tomlConfiguration: Centralize settings alongside your other tools.- Prompt Linter (
check-prompts): Validate your system prompts against LLM best practices (Role Definition, Few-Shot, etc.). - Verbosity Control (
--verbosity): Choose betweenquiet,summary(default), ordetailedoutput. - Enhanced Metrics: Track "Average ACL" and "Average Type Safety" in the summary report.
- CI/CD Automation: Automated badge updates and GitHub Actions workflows for continuous agent-readiness.
🛡 Badges
Show off your Agent-Readiness! Run agent-score --badge to generate an agent_score.svg for your repo.
⚡ CI/CD & Diff Mode
Optimize your CI/CD pipeline by scoring only the files changed in a Pull Request.
Diff-Aware CI Reporting
The provided GitHub Action defaults to Diff-Aware Reporting. This means that in a Pull Request, the scorecard will automatically detect and only score the files you've modified.
Benefits:
- Noise Reduction: Developers only see scores and issues for the code they are actually touching.
- Speed: Analysis is significantly faster on large repositories.
- Project Integrity: While focusing on specific files for scoring, the tool still validates project-wide issues like circular dependencies and global context health.
Local Incremental Analysis
You can use the --diff flag to analyze only the files that have changed compared to a base reference (default: origin/main). This is useful for quickly checking your work before committing.
# Check only changed files (compared to origin/main)
agent-score --diff
# Check changes compared to a specific branch or commit
agent-score --diff --diff-base HEAD^
Manual File Limitation
You can also manually use the --limit-to flag to restrict analysis to a subset of files. You can provide the flag multiple times. If used with --diff, it will analyze the intersection of changed files and the specified files.
# Score only specific files
agent-score score . --limit-to src/core.py --limit-to src/utils.py
📝 Prompt Engineering Linter
Static analysis for your LLM prompts. Ensure your system prompts follow best practices before deploying them to production.
agent-score check-prompts prompts/system_v1.txt
Heuristics Checked:
- Role Definition: Does the prompt establish a persona?
- Cognitive Scaffolding: Are there "Think step-by-step" instructions?
- Delimiter Hygiene: Are instructions separated from data using XML/Markdown tags?
- Few-Shot Examples: Does it include 1-3 examples?
- Negative Constraints: Identifies "Don't" statements and suggests positive alternatives.
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 agent_readiness_scorecard-0.91.0.tar.gz.
File metadata
- Download URL: agent_readiness_scorecard-0.91.0.tar.gz
- Upload date:
- Size: 279.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef783e2d1e3da5dd163952530af95df8f2159f4702615b7a1660250b0a756bd5
|
|
| MD5 |
6b53de3197224a24a215b562e969528a
|
|
| BLAKE2b-256 |
cba5185f7d54a07825e46ddc74be5bd3afcf009a5323317580774940e21d33ec
|
Provenance
The following attestation bundles were made for agent_readiness_scorecard-0.91.0.tar.gz:
Publisher:
publish.yml on brewmarsh/agent-readiness-scorecard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_readiness_scorecard-0.91.0.tar.gz -
Subject digest:
ef783e2d1e3da5dd163952530af95df8f2159f4702615b7a1660250b0a756bd5 - Sigstore transparency entry: 1021688775
- Sigstore integration time:
-
Permalink:
brewmarsh/agent-readiness-scorecard@da6bc18d8b59dcf9eaf4a1118a7048579c9853d6 -
Branch / Tag:
refs/tags/v0.91.0 - Owner: https://github.com/brewmarsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@da6bc18d8b59dcf9eaf4a1118a7048579c9853d6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agent_readiness_scorecard-0.91.0-py3-none-any.whl.
File metadata
- Download URL: agent_readiness_scorecard-0.91.0-py3-none-any.whl
- Upload date:
- Size: 54.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80edf89cbd4645564d02b36bd289c542ffe5fadb02017ecd5acc00f1cd4d3319
|
|
| MD5 |
9d9d531308d005757e72a875a61aa99b
|
|
| BLAKE2b-256 |
eadd312d89d6270b3e2a9ea64e05eb1d522073b1677bceb59c9db36d20770a6c
|
Provenance
The following attestation bundles were made for agent_readiness_scorecard-0.91.0-py3-none-any.whl:
Publisher:
publish.yml on brewmarsh/agent-readiness-scorecard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_readiness_scorecard-0.91.0-py3-none-any.whl -
Subject digest:
80edf89cbd4645564d02b36bd289c542ffe5fadb02017ecd5acc00f1cd4d3319 - Sigstore transparency entry: 1021688839
- Sigstore integration time:
-
Permalink:
brewmarsh/agent-readiness-scorecard@da6bc18d8b59dcf9eaf4a1118a7048579c9853d6 -
Branch / Tag:
refs/tags/v0.91.0 - Owner: https://github.com/brewmarsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@da6bc18d8b59dcf9eaf4a1118a7048579c9853d6 -
Trigger Event:
push
-
Statement type: