@prontiq/ariscan-engine
v0.57.0
Published
> Scoring engine for the [ARI (Agent Readiness Index)](https://github.com/jbejenar/prontiq-ariscan) — scan repositories programmatically and get structured readiness scores.
Downloads
2,616
Readme
@prontiq/ariscan-engine
Scoring engine for the ARI (Agent Readiness Index) — scan repositories programmatically and get structured readiness scores.
Use this package to embed ARI scanning in your own tooling, CI pipelines, or reporting systems.
Install
npm install @prontiq/ariscan-engineQuick Start
import { scan } from "@prontiq/ariscan-engine";
const result = await scan("/path/to/repo");
console.log(result.score); // 0-100
console.log(result.level); // "L1" .. "L5"
console.log(result.pillars); // Per-pillar scores and findingsAPI
scan(repoPath, config?, onProgress?)
The primary entry point. Scans a repository and returns a full ScanResult.
import { scan } from "@prontiq/ariscan-engine";
import type { ScanResult, ScanConfig, OnProgress } from "@prontiq/ariscan-engine";
const config: Partial<ScanConfig> = {
pillars: {
P4: { enabled: false }, // skip Dev Environment pillar
},
};
// Optional: receive per-pillar progress updates
const onProgress: OnProgress = (event) => {
if (event.status === "done") {
console.log(`✓ ${event.pillar} completed (${event.elapsed}ms)`);
}
};
const result: ScanResult = await scan(".", config, onProgress);createRepoContext(repoPath)
Creates a read-only filesystem abstraction used by analyzers. Useful for testing or building custom analysis pipelines.
import { createRepoContext } from "@prontiq/ariscan-engine";
const ctx = await createRepoContext("/path/to/repo");
const content = await ctx.readFile("package.json");
const exists = await ctx.fileExists("tsconfig.json");Scoring Utilities
import {
calculateCompositeScore, // Weighted sum across pillar scores
classifyMaturityLevel, // Score -> L1..L5
applySecurityGate, // Enforce security gate cap
aggregateResults, // PillarResult[] -> ScanResult
} from "@prontiq/ariscan-engine";Detection
import { detect, detectLanguages, detectFrameworks, detectMonorepo } from "@prontiq/ariscan-engine";
const ctx = await createRepoContext(".");
const detection = await detect(ctx);
// { languages: [...], frameworks: [...], monorepo: { tool, packages } }Analyzer Interface
For building custom analyzers or plugins:
import type { PillarAnalyzer, RepoContext } from "@prontiq/ariscan-engine";A PillarAnalyzer must implement:
pillar— whichPillarIdit scoresname— human-readable nameversion— semver stringsupports(context)— whether it can run on the given repoanalyze(context)— returns aPillarResult
Built-in Analyzers
import { ANALYZERS, getAnalyzer } from "@prontiq/ariscan-engine";
// All 8 built-in analyzers
console.log(ANALYZERS.map(a => a.name));
// Get a specific analyzer by pillar ID
const analyzer = getAnalyzer("P1"); // Agent Context QualityRelated Packages
@prontiq/ariscan— CLI tool@prontiq/ariscan-schema— Type definitions and Zod schemas
License
Elastic License 2.0 (ELv2)
