Skip to main content

Module archetype

Module archetype 

Source
Expand description

Archetype detection (Ontology phase — the COMPILER-gap attack).

Deterministic evidence scoring over the reality graph + raw import table classifies a repository into one of eight archetypes (plus the honest Unknown fallback). Every signal contributes +1..+3; the highest total wins; score ties are broken by the fixed precedence order in scc_core::Archetype::PRECEDENCE.

Provenance discipline: all signals are counts/shape facts over EXTRACTED entities and relationships — no heuristics are promoted to facts, this function only classifies.

Enums§

ClusterPrior
Archetype emphasis (semantic clustering): for each archetype the clustering priors change — one region trait coheres (+PRIOR_WEIGHT) when the repository matches that archetype.

Constants§

PRIOR_WEIGHT
Extra weight applied between two regions sharing the prior trait.

Functions§

cluster_prior
The clustering prior for an archetype, or None when the archetype adds no region-trait prior (LibrarySdk’s emphasis is the doubled public-surface cohesion weight in the clustering signal itself; Unknown/Monorepo/Infra/ Plugin rely on the base signal set).
detect_archetype
Deterministic evidence scores per archetype. Pure function of graph + import-table shape; every signal is an integer count comparison.
is_phase_symbol
True when a symbol name matches the compiler/language-tool phase vocabulary (parse/analyze/transform/generate/…). Shared with archetype detection so the clustering prior uses the same vocabulary.