Reference

zzop's reference is printed by the binary you run. This page names those commands, then lists the in-process entry points and the field names they take and return. For what a field means, ask the binary — its answer comes from the build itself.

Ask the binary

Every zzop contract <name> document is also the MCP resource zzop://contract/<name>, so an adapter or rule pack can be written with nothing but the binary.

CommandWhat it answers
zzop --helpEvery subcommand and flag; zzop <subcommand> --help prints one.
zzop contractThe embedded documents — envelope and rule-pack JSON Schemas, adapter and DSL guides, the rule catalog and more; zzop contract <name> prints one.
zzop contract config-templateThe annotated starter zzop.config.jsonc that zzop init writes.
zzop contract config-surfaceEvery config key and path, CLI flag and embedder field zzop accepts.
zzop contract reply-legendsWhat the run-invariant parts of a reply mean — a coverageGaps row, findings.byRule, the packsLoaded counts.
zzop contract disclosure-classesEvery way zzop's own output can be silently misread, and how completely each is detected today.
zzop explain <rule-id>One rule's data, its suppress marker and its off switch; over MCP, zzop://rule/<id>.

In-process entry points

Both binaries are built on zzop-facade, which is JSON in, JSON out. Each row is one entry point and the CLI subcommand and MCP tool that reach it. The crates are workspace-internal (not on crates.io), so in-process use means vendoring the workspace; shelling out to zzop … --json needs no linkage. Product defaults (config discovery, the bundled rule packs, the cache directory) are filled in by zzop-config in front of it — analyze_json does not apply them. The subcommands that are not entry points here (map, graph, facts, manifest, diff, contract) are in zzop --help.

Entry point · CLI · MCPWhat it answers
analyze
analyze_jsonzzop analyze · analyze_repoOne tree in, one AnalyzeOutputView out.
analyze_trees_jsonzzop cross · cross_repoSeveral trees, joined across the layer boundary.
analyze_envelope_jsonzzop analyze-envelope · analyze_envelopeMode A: an adapter's envelope replaces native parsing.
query
query_io_jsonzzop endpoint · check_endpointIs one io key provided, consumed or joined? One sealed verdict.
query_file_jsonzzop file · check_fileEverything zzop knows about ONE file — uncapped.
query_coverage_jsonzzop coverage · check_coverageHow much of this tree does zzop actually see?
validate
validate_envelope_only_jsonzzop validate-envelope · validate_envelopeOffline “is my envelope well-formed?”
validate_rule_pack_jsonzzop validate-rule-pack · validate_rule_packOffline “does this pack load, and can every rule in it fire?”
meta
versionzzop versionThe bare release number — one token a script can parse.
version_stringzzop version --verboseEngine + parser fingerprint string.
explainzzop explain · zzop://rule/<id>One bundled rule id → that rule's compiled-in data.
explain_with_configzzop explain --configThe same lookup over the packs a config's trees really load.

AnalyzeRequest

Every field the in-process request accepts, with its type. Only root is required, and unknown fields are ignored. A config file spells most of these under other names (its packs.extraDirs is packsDir here); zzop contract config-template explains each config key, and zzop contract config-surface gives the shape of each embedder-only field.

Field · type
rootrequiredstring
sourceIdstring
packsDirstring | string[]
packDefsobject[]
packsOnlystring[]
disabledRulesstring[]
severityOverridesobject
suppressionsobject[]
globalExcludesobject[]
cacheDirstring
gitobject
sizeCapnumber
vocabularyobject
profileRulesboolean
mountedAtstring
mountsobject[]
clientBasestring
hostsstring[]
routesobject[]
adapterOverlaysobject[]
scoresobject
parsersobject

AnalyzeOutputView

The top-level keys analyze_json returns. The CLI and MCP replies are shaped from them by zzop-summary; which keys each surface carries is registered in the repository's docs/contracts/surface-parity.json. Inside a reply, a block's meaning ships beside it as a …Meaning key, and the run-invariant legends are zzop contract reply-legends.

Field · type
irobject
fileCountnumber
degradedstring[]
buildScriptPathsstring[]
coverageobject
nodesobject[]
findingsobject[]
scoresobject | null
healthobject | null
recommendationsobject[]
criticalobject[]
criticalTruncatednumber
seamsobject[]
coChangeobject[] | null
gitWindowobject | null
packsLoadedobject[]
packsLoadedMeaningobject
nativeAnalysesobject
nativeAnalysesMeaningobject
ruleOverridesAppliedobject
warningsstring[]
configWarningsstring[]
cache{ hits, misses } | null
ruleTimingsobject[] | null
disclosureobject[]

coChange is a filtered sample, not a total: a commit counts only when it touches 2–25 files (commits touching fewer than 2 or more than 25 files are skipped as noise), and each file keeps only its top 10 co-change partners.