Run a scan first
You do not need a global install. Pass a target repository path to generate the default PNG report; omit the path to scan the current directory.
npx @merico-ai/maturity-scanner ./my-repoDocs
AI Maturity Scanner is a standalone Node.js CLI. It requires Node 22+ and git on PATH.
You do not need a global install. Pass a target repository path to generate the default PNG report; omit the path to scan the current directory.
npx @merico-ai/maturity-scanner ./my-repoChoose the command by report destination: image for sharing, Markdown for docs and PRs, JSON for automation.
# Scan the current directory and write ./ai-maturity-report.png
ai-maturity-scanner# Scan ./my-repo and write the default PNG image report
ai-maturity-scanner ./my-repo# Useful for docs, issues, or PR comments
ai-maturity-scanner ./my-repo --format md --out report.md# Useful for CI, dashboards, or threshold checks
ai-maturity-scanner ./my-repo --format json --out report.json# Render report text in English
ai-maturity-scanner ./my-repo --lang enBy default the scanner treats Markdown files under the repo's specs/ directory as spec documents. If your specs live elsewhere (e.g. docs/specs/, design/), customize the match with a config file at the repo root or the --spec-glob flag. Precedence: --spec-glob flag > config file > default.
Place .ai-maturity-scanner.json at the repository root with a specGlobs array:
{
"specGlobs": [
"docs/specs/**/*.md",
"design/**/*.md"
]
}Or pass --spec-glob on the command line (repeatable; overrides the config file):
# Treat only Markdown under docs/specs as specs
ai-maturity-scanner ./my-repo --spec-glob 'docs/specs/**/*.md'With no configuration the default glob **/specs/**/*.md is used (specs/ at any depth, Markdown only: .md/.mdx/.mdc).
MCP configuration does not have one repository-level format across coding assistants, so current detection is intentionally incomplete. For now, only Claude Code project .mcp.json / mcp.json files and Codex project .codex/config.toml are treated as explicitly supported MCP configuration sources.
Other tools may also support MCP, but their paths, fields, precedence rules, and public documentation vary. To avoid false positives, the scanner does not treat those formats as stable supported inputs.
This section keeps the algorithm details available for implementation and threshold checks. For report interpretation, start with the Metrics page.
Each raw metric is mapped to a 0–100 score by linear saturation: it grows proportionally until the cap, then stays at 100.
score = min(raw, cap) / cap × 100skill_count30skill_line_count15000advanced_skill_count10skill_resource_count30agent_count10agent_line_count2000command_count10command_line_count2000mcp_count3ai_instruction_files1specs_file_count50specs_line_count5000subproject_coverage5instruction_max_line_countScored piecewise (non-linear): 0 lines→10, 0–20→10–30, 20–50→30–100, 50–400→100 (sweet spot), 400–1000→100–30, above 1000→10.
skill_engineering_raterate = advanced_skill_count / skill_count (0 when skill_count is 0); the rate reaches 100 at 0.50.
Normalized metrics roll up into three dimensions, which are then weighted into the 0–100 AMI score (rounded to two decimals).
configuration_depth60%Mean of the skill, agent, command, and mcp subscores.
context_richness30%Mean of ai_instruction_files, instruction_max_line_count, specs_file_count, and specs_line_count.
integration_breadth10%Normalized subproject_coverage.
skill subscore = Mean of skill_count, skill_line_count, advanced_skill_count, skill_engineering_rate, and skill_resource_countagent subscore = Mean of agent_count and agent_line_countcommand subscore = Mean of command_count and command_line_countmcp subscore = mcp_countAMI = configuration_depth × 0.6 + context_richness × 0.3 + integration_breadth × 0.1These five metrics feed the L0–L4 cascade. ability_applied and skill_engineering_rate are derived from other raw metrics and computed separately; the remaining three are raw counts gathered directly during the scan.
ability_applied= skill + skill_resource + agent + command + mcpTotal applied capability assets; config and hook files are excluded.
Example: skill=3, skill_resource=2, agent=1, command=1, mcp=0 → ability_applied = 3+2+1+1+0 = 7
skill_engineering_rate= advanced_skill_count / skill_countShare of advanced skills among all skills; 0 when skill_count is 0.
Example: advanced_skill=3, skill=10 → skill_engineering_rate = 3/10 = 0.30
advanced_skillNumber of skills whose directory contains scripts.
specs_filesNumber of Markdown files recognized as specs.
ai_instruction_filesNumber of AI instruction files in the repository.
The maturity level is a threshold cascade: an L0 gate is checked first, then conditions are evaluated top-down from L4; the first level whose conditions are all met is returned, defaulting to L1. See Threshold metrics above for what each metric means.
ai_instruction_files<1ability_applied≥25andskill_engineering_rate≥0.40andspecs_files≥20ability_applied≥15andadvanced_skill≥2andskill_engineering_rate≥0.15andspecs_files≥10ability_applied≥8andadvanced_skill≥1Repository profile
A repository profile describes the most visible shape of AI collaboration assets. It is not another maturity grade and makes no claim about developer proficiency, actual adoption, or code quality.
Every report has exactly one primary profile: the strongest collaboration pattern visible in the repository.
unstartedA neutral state: no AI instruction file was found.
ai_instruction_files = 0
early-collaborationBasic collaboration signals exist, without a more distinctive asset pattern yet.
An AI instruction file exists, but no specialized primary is eligible
ai-operating-systemA broad and balanced collaboration system.
configuration_depth, context_richness, and integration_breadth are each ≥ 60, with at least three non-zero capability classes
skill-workshopReusable, engineered skills are the dominant visible asset.
skill_score ≥ 50 and skill_engineering_rate ≥ 0.15
agent-troupeDistinct agent roles form a defining collaboration pattern.
agent_count ≥ 3 and agent_type_distinct ≥ 3
command-centerReusable commands are the defining interaction surface.
command_score ≥ 40 and command_count ≥ 3
knowledge-librarySpecifications and substantive written AI context are the dominant visible asset.
specs_file_count ≥ 20, context_richness ≥ 65, instruction_max_line_count ≥ 50, and spec_library_score ≥ 50
Each trait gets a 0–100 degree from existing normalized metrics, bucketed into high, medium, or low by uniform 40/70 bars; the report shows the three highest-degree traits, suppressing any trait already expressed by the primary. A trait with no relevant assets is rated low.
engineered-skillsSuppressed when skill-workshop is already the primary.
degree = mean(advanced_skill_count, skill_engineering_rate)
multi-agentSuppressed when agent-troupe is already the primary.
degree = mean(agent_count, agent_role_score)
tool-connectedMCP remains a trait and never becomes a primary.
degree = mcp_count
structured-contextSuppressed when knowledge-library is already the primary.
degree = mean(instruction_max_line_count, specs_file_count)
cross-projectCross-project coverage remains a trait and never becomes a primary.
degree = subproject_coverage
AMI and L0–L4 continue to answer how much AI collaboration infrastructure is present and which maturity threshold it reaches. The profile answers which collaboration shape is most visible. It is additive: it does not change raw metrics, normalized metrics, dimensions, the AMI score, or the L0–L4 result.
Formats, output paths, language, privacy mode, and spec matching are covered here in one place.
[path]repository path.Git repository path to scan; omitted path means the current directory.-f, --format <format>png | terminal | md | jsonpngSelect the report format: image, terminal text, Markdown, or JSON.-o, --out <file>file pathai-maturity-report.png for PNG; stdout for textWrite the report to a file. Text formats write to stdout when --out is omitted.-l, --lang <lang>zh | enzhSelect report language.-V, --versionbooleanfalsePrint the current package version and exit without scanning.--redactedbooleanfalsePrivacy mode: hide the repository address display field in PNG output.--verbosebooleanfalseWhen primary output is written to a file, also print a terminal report to stdout.-g, --spec-glob <glob>glob (repeatable)**/specs/**/*.mdCustomize spec file matching; repeatable and higher priority than the config file.verify-image <file>Verify hidden fingerprint metadata in a generated PNG report.