jam-lite + optional jam-full

JAM

JHL Architecture Metrics scans codebases without building them. The default jam-lite score covers static maintainability signals; jam-full adds external test-cli and security-cli evidence when you need production gates.

37 jam-lite metrics jam-full = lite + test + security Markdown · CSV · JSON · SARIF
curl -fsSL https://jhl-labs.github.io/jam/install.sh | sudo bash
Build-free scanUses source text and lightweight syntax signals to produce debt evidence.
Auditable outputWrites Markdown, CSV, JSON, SARIF and stable finding IDs for diffing.
Composable full scoreJAM orchestrates external test and security CLIs without merging their concerns.
jam-full.log
$ jam lite . --json --sarif --strict --out reports/jam
jam-lite: score 92/100 (Grade A) · 18 findings · reports/jam/jam-report.md

$ jam full . --component security --out reports/jam-security
JAM Full Score: 95 / 100 (Grade A)
  jam-lite    92/100  weight 0.67  ok
  security   100/100  weight 0.33  ok
JAM Full Score lite 0.50 + test 0.25 + security 0.25
jam-lite92 test-cli96 security-cli100

Official distribution

Public binaries are published in jhl-labs/dist.

The install script downloads the matching Linux/macOS binary and verifies it with SHA256SUMS.

Install latestInstalls to /usr/local/bin/jam by default.
curl -fsSL https://jhl-labs.github.io/jam/install.sh | sudo bash
Pin versionUse this in reproducible CI bootstrap scripts.
curl -fsSL https://jhl-labs.github.io/jam/install.sh | sudo env VERSION=v0.46.0 bash

Quickstart

Run jam-lite by default, then add jam-full evidence when needed.

Static code-health scan

Write report artifacts--strict turns parse failures into exit code 3.
jam lite . --json --sarif --strict --out reports/jam

Full production gate

Compose lite + test + securityRuns external CLIs and writes jam-full.json.
jam full . --out reports/jam-full

Security-only full gate

Compose security evidenceUseful before test evidence is available.
jam full . --component security --out reports/jam-security

Metrics v14.5.0

jam-lite implements all 37 static metrics this CLI can measure alone.

Metrics need a coverage boundary. jam-lite is strong for maintainability signals, but it does not prove correctness, runtime behavior, or production readiness by itself.

What jam-lite can and cannot say

A jam-lite score answers whether the code is structurally healthy enough to keep building on. It does not prove that the code is correct. See Coverage and limitations for the full boundary.

Maintainability High · ARCH/CPLX/DUP/SIZE
Security patterns Partial · obvious risky patterns
Reliability/perf Low · RES/HYG proxy signals
Correctness/UX/compat None · requires runtime/domain evidence
IDPurposeOutputMeaning
SIZE-01Find files too large to review comfortablyCode lines per fileLarger files raise understanding and change cost
SIZE-02Find overly long functionsFunction line spanReview extraction and test boundaries
SIZE-03Find wide function interfacesParameter countPossible data clump or responsibility overload
SIZE-04Find files or types with concentrated responsibilityDeclaration count, reference concentration, methods/fieldsGod file/type candidate
CPLX-01Find functions with many test pathsCyclomatic complexityMore branches mean higher path risk
CPLX-02Find control flow that is hard to readCognitive complexityCaptures nesting and flow burden
CPLX-03Find deep indentationMaximum block depthPinpoints readability and review friction
CPLX-04Find high lexical volumeHalstead VolumeAuxiliary input for maintainability
CPLX-05Summarize file maintainabilityMaintainability IndexLower values mean harder maintenance
ARCH-01Find module dependency cyclesImport graph SCC and cycle pathRaises change propagation and build/test cost
ARCH-02Find tangled files inside one moduleFile-level symbol reference cycleCohesion and file-boundary review signal
ARCH-03Find over-coupling and unstable dependenciesCa, Ce, Instability, SDP violationCore modules may be too fragile
ARCH-04Find flat structure and orphan internal modulesDirectory file count, orphan moduleModule-boundary cleanup candidate
ARCH-05Find hub-like dependency (God Component)Ca and Ce both distribution outliers + absolute floorA central bottleneck depended-on and depending-on widely
ARCH-06Measure change propagation costDensity of the transitive-dependency (visibility) matrixHow far a small change reaches across the system
ARCH-07Find low cohesion (LCOM4)Connected components of state-sharing methods (tree-sitter)Unrelated responsibilities bundled into one type
ARCH-08Find deep inheritance (DIT)Project-internal inheritance chain depth (tree-sitter)Behavior spread across many ancestors, hard to change
DUP-01Find copy-paste duplicate blocksNormalized-token duplication ratioRisk of missed edits and defect propagation
DUP-02Find near-duplicate functionsFunction token similarityReview abstraction or intentional divergence
SEC-01Find hardcoded secretsHigh-entropy strings and known token formatsImmediate exposure risk
SEC-02Find injection-prone string constructionString assembly near risky sinksSQL/command/HTML injection possibility
SEC-03Find weak crypto and TLS settingsWeak crypto, random misuse, TLS verify offSecurity default violation signal
SEC-04Find unsafe deserialization and dynamic executioneval, unsafe YAML/pickle, shell exec sinksExecution or data-tampering risk
SEC-05Find sensitive data loggingpassword/token/secret identifiers in log argumentsOperational log exposure risk
SEC-06Find DOM XSSdangerouslySetInnerHTML/innerHTML= etc. with non-literals (JS/TS)Unsanitized value entering the DOM (XSS path)
SEC-07Find path traversalFile sink + user input, intra-procedural taint trackingDirectory escape to arbitrary file access
SEC-08Find SSRFHTTP client + user input, taint trackingServer coerced into requesting arbitrary internal hosts
RES-01Find missing resource releaseopen/malloc/new/acquire and close/free pairsFile, memory, or handle leak possibility
RES-02Find unbounded concurrencyLooped goroutine/thread/promise spawnRunaway work, queue growth, failure amplification
RES-03Find mutable global stateModule/package-level mutable globalsHurts test isolation and concurrency safety
HYG-01Find swallowed exceptions and ignored errorsempty catch/except, ignored errorFailure causes can be hidden
HYG-02Find dead codeUnreferenced private symbols, unreachable statementsMaintenance noise and stale paths
HYG-03Find abandoned TODO/FIXME markersSATD comment count and densityExplicit technical debt accumulation
HYG-04Find magic literal densityNumeric/string literals per KLOCUnexplained policy values and duplicated constants
HYG-05Find comment-density outlierscomment/CLOC, public API doc missing ratioDocumentation gap or comment overload
HYG-06Find test absence signalsTest file ratio, directories without testsNot coverage; test-cli should add evidence
HYG-07Find parse failures that reduce analysis trustparser error file:line:column--strict exits with code 3

JAM Full

jam-full is the production gate that calls test-cli and security-cli.

jam-lite measures static code health, test-cli supplies test and coverage evidence, and security-cli supplies SAST/SCA/secret evidence. JAM composes those results into one score and explicit failure reasons.

Composite score jam-full = weighted evidence
50% jam-lite 25% test 25% security

Partial runs renormalize the selected default weights to 1.0.

50%

jam-lite

Runs this CLI alone. Covers static debt, strict parse failures, SARIF, CSV, and JSON.

25%

test-cli

Separates test failures, low coverage, and missing test evidence as quality failures.

25%

security-cli

Composes critical/high findings, secrets, SCA, and policy failures into the security score.

partial fullcomponent orchestration
jam full . --out reports/jam-full
jam full . --component security --out reports/jam-security
jam full . --component test --out reports/jam-test

Security assurance

Keep scanner candidates, vulnerability decisions, and compliance evidence distinct.

A central policy and commit-bound review ledger produce a security verdict. A separate control plan links hash-pinned evidence to framework controls without claiming certification or legal compliance.

security verdict + control evidencepass · fail · incomplete
jam assurance verdict --input reports/jam --policy security-policy.json --review security-review.json --gate
jam assurance evidence --plan control-plan.json --out reports/audit --gate