Skip to content

Semantic Pack Reference

This page lists every part of the semantic-model pack format and the tools that work with it. For an explanation of how packs are authored, activated, and used, read Semantic-Model Packs.

The sources of truth are the Rust types that the JSON schema is generated from, the pack validator, the embedded pack registry, and the command-line parsers. You can print some of these lists from a binary:

CommandPrints
bifrost pack-engine-profileThe pack schema versions this build reads and writes, as JSON.
bifrost-semantic-pack with no argumentsThe usage text for every authoring subcommand.
bifrost-semantic-pack list CATALOG --format jsonEvery pack installed in a catalog.

Every authored pack declares schema_version. This build reads versions 2 through 16, inclusive. It writes version 16. Version 1 and any other value fail with schema.unsupported_version. The field is required; there is no default.

A field is accepted only in a pack whose schema_version is at least the version that introduced it. A pack that declares an earlier version and uses the field fails validation with the code in the table. This rule lets a reader of an older version parse every pack that it accepts by number.

VersionAddsValidation code when used below this version
2The base format: envelope, shards, and the three payload kinds. Every field not listed below.None
3ambient_use on TypeFact and MemberFact.schema.ambient_use_requires_version
4The runtime_contracts shard companion (CSMI runtime-values 0.2).runtime_contracts.schema_version
5result_use_obligations on procedure summaries.summary.result_use_obligations_schema
6callable_surface_complete: true on TypeFact.schema.callable_surface_version
7no_concurrency_effects: true on procedure summaries.summary.no_concurrency_effects_schema_version
8Removes compatibility.bifrost. A version-8 pack must omit it. See Compatibility.Not a field gate. compatibility.bifrost is required below version 8 and forbidden at version 8 (compatibility.schema_shape).
9kind: unknown for a parameter or result type port whose type is unavailable. The port remains present with an unresolved type.schema.unknown_type_version
10Native callable-values facts and scoped coverage on authored shards.schema.callable_values_version
11Structured procedure-formal names, passing modes, and default-presence facts for call binding; channel-close effects and returned-callable models.summary.formals_schema_version, summary.channel_close_schema_version
12, 13Merged contract revisions. No additional field-version gate.None
14Directional variadic kinds on structured procedure formals.summary.formals_schema_version, summary.variadic_formals_schema_version
15Typed module values (value_type, proxied_type) and callable parameter roles.declaration.module_value_type_schema_version, parameter.role_schema_version
16Non-empty exact_return_classes on members.declaration.exact_return_classes_schema_version

The generated JSON schema is schemas/semantic-model-pack-v10.schema.json. cargo run --example generate_semantic_model_schema writes it from the Rust type AuthoredSemanticModelPack, and a repository test requires the checked-in file to match the generated schema exactly. The file describes every field of every supported version, and it accepts schema_version from 2 through 11. It requires compatibility.bifrost for versions 2 through 7 and forbids it for versions 8 and newer. It does not express the other per-field version gates in the table above; the validator enforces them.

The version-two through version-eight schema files remain checked in. The v8 file accepts versions 2 through 8, requires compatibility.bifrost through version 7, and forbids it for version 8.

An authored pack is one YAML or JSON document. Every object rejects unknown fields. Every variant is tagged by a kind (or op) field.

FieldTypeRequiredMeaning
schema_versioninteger, 2 to 11yesThe pack format version. See Schema versions.
pack_idstable IDyesThe pack identity.
versionSemVer versionyesThe pack version.
producer{name, version}yesThe tool that produced the pack. name is non-empty text; version is a SemVer version.
languagestable IDyesThe language the pack describes, for example java, go, or python. Activation evidence must name the same language.
ecosystemstable IDyesThe ecosystem label, for example maven, npm, pypi, go, go-module, or jdk. Activation evidence must name the same ecosystem.
compatibilityobjectyesSee Compatibility.
provenance{source, revision?}yesWhere the facts came from. Both are non-empty text. revision is optional.
licensetextyesAn SPDX license expression. An invalid expression fails with license.invalid_spdx.
completenesspartial or completeyesWhether the pack claims to cover its whole scope. A partial pack cannot contain a complete procedure summary.
safetyobjectyesSee Safety.
carried_sourceslist of relative pathsno (default empty)The source paths the producer read and parsed from a sources artifact. Paths must be unique and sorted in ascending order (carried_sources.unsorted). A consumer uses this list to tell a source path that the pack carries from an upstream path that it only names.
cpp_portabilityobjectnoExact C and C++ resolver evidence imported from CSMI. See C++ portability evidence.
python_correspondenceobjectnoPython declaration-to-runtime correspondence imported from CSMI. See Python correspondence evidence.
shardslist of shardsyesAt least one shard (pack.no_shards), at most 4,096. See Shards.

A stable ID is 1 to 256 bytes of lowercase ASCII letters, digits, ., -, and _. It must start and end with a letter or digit. Pack IDs, shard IDs, and fact IDs use this grammar. Language-facing names such as type and member names keep their ordinary spelling.

FieldTypeRequiredMeaning
bifrostSemVer requirementRequired in versions 2 to 7. Forbidden in version 8 and newer.The engine versions that may activate a version 2 to 7 pack. An engine outside the range reports the pack as incompatible. A missing or blank value in versions 2 to 7, or any value in version 8 and newer, fails with compatibility.schema_shape. A value that is not a SemVer requirement fails with version.invalid_requirement. A null value fails to parse.
toolchainslist of {name, requirement}no (default empty)Toolchains the pack is compatible with. name is a stable ID. requirement is a SemVer requirement. A shard selector may name a toolchain only if this list declares it (selector.incompatible).

validate accepts an open requirement such as >=21.0.0 in an authored pack. Only pinned release specs require an upper bound; see Pinned pack specs.

FieldTypeDefaultMeaning
generated_code_onlybooleanfalseThe pack describes only code that a generator produces, such as accessors.
review_requiredbooleanfalseThe pack stays inactive until an activation control with action enable names its pack_id. The enable list in .bifrost/packs.json supplies such controls.

A shard is the unit of activation and loading.

FieldTypeRequiredMeaning
idstable IDyesThe shard identity.
activationlist of activation selectorsyes, at least oneThe shard is eligible when any selector matches one activation evidence row. See Activation selectors.
payloadobjectyesOne payload, tagged by kind. See Payload kinds.
runtime_valuesobjectnoCSMI runtime-values 0.1 companion. See Shard companions.
runtime_contractsobjectno, version 4 or laterCSMI runtime-values 0.2 companion.
collection_flowsobjectnoCSMI collection-flow 0.1 companion.
deferred_yieldsobjectnoCSMI deferred-yield 0.1 companion.
conditional_type_refinementsobjectnoCSMI conditional-type-refinement companion.

A shard must contain at least one record across its payload and companions (shard.empty_payload). A shard may hold at most 250,000 records and a pack at most 2,000,000.

FieldTypeDefaultMeaning
package{name, version?}absentRequires an evidence row with a package of this exact name. When version is present, it is a SemVer requirement that the evidence version must satisfy.
module{name, version?}absentThe same rule for a module coordinate, such as a Go module path.
toolchain{name, version?}absentThe same rule for a toolchain, such as jdk. The name must appear in compatibility.toolchains.
targetslist of stable IDs[]When not empty, the evidence target must equal one entry.
configurationslist of text[]When not empty, the evidence configuration must equal one entry. Entries are stable IDs, except that entries starting with typescript-lib: may be any non-empty text.
artifact_sha25664 lowercase hex charactersabsentRequires an evidence row with exactly this artifact digest (selector.invalid_digest for a bad value).

A selector with no coordinates is a language selector. It matches any evidence row with the pack’s language and ecosystem. Missing evidence never satisfies a populated field. All populated fields must match the same evidence row.

Each selector has a rank: an artifact_sha256 selector is an exact-artifact match; otherwise a selector with any coordinate version is a versioned coordinate; otherwise a selector with any coordinate is a named coordinate; otherwise it is a language selector. See Discovery and precedence.

kindFieldsContents
declaration_factstypes, members, relations (each default [])Declarations of external types and members.
generator_rulesrules (required)Rules that add declarations for generated code at matching source sites.
procedure_summariessummaries (required)Reviewed behavior of external procedures.
FieldTypeDefaultVersionMeaning
idstable IDrequired2The fact identity. Unique across the pack.
namequalified namerequired2The language spelling, for example com.acme.Widget. No whitespace.
type_kindTypeKindrequired2The kind of type.
visibilityVisibilityrequired2Declared visibility.
locatorLocatorrequired2Where the declaration lives.
is_abstractbooleanfalse2The type is abstract.
is_sealedbooleanfalse2The type is sealed or final.
callable_surface_completebooleanfalse6Every directly declared, externally visible callable and every direct hierarchy edge of this type is in the pack. It does not cover inherited members, fields, effects, or overload applicability. false means not reviewed.
has_explicit_type_termsbooleanfalse2The type is a Go interface that lists explicit type terms (a type-set constraint).
type_parameterslist of names[]2Generic parameter names, in order. Names must be unique.
type_parameter_constraintslist of TypeParameterConstraint[]2Constraints on the type parameters. One per parameter at most.
underlying_typeStructuredTypeExpressionabsent2The underlying type of a defined type, such as a Go named type.
value_semanticsTypeValueSemanticsabsent2Reviewed copy and move behavior. Absence means not reviewed, not “no operations”.
ambient_usenot_ambient, implicit, or givenabsent3See Ambient use.
embedded_typeslist of EmbeddedTypeFact[]2Embedded types, such as Go struct embedding.
hierarchylist of HierarchyFact[]2Direct supertypes and mixins.
aliaseslist of names[]2Other names for the same type.
extension_surfaceslist of names[]2Names of declarations that add extension members to this type.
guardDeclarationGuardabsent2The toolchain and target condition under which the type exists.
FieldTypeDefaultVersionMeaning
idstable IDrequired2The fact identity.
ownerstable IDrequired2The id of the owning TypeFact. The owner must exist (reference.missing_owner).
namelanguage namerequired2The member name. No whitespace or control characters, except inside Scala backticks.
member_kindMemberKindrequired2The kind of member.
visibilityVisibilityrequired2Declared visibility.
locatorLocatorrequired2Where the declaration lives.
is_staticbooleanfalse2The member is static.
is_abstractbooleanfalse2The member is abstract.
is_virtualbooleanfalse2The member is virtual. false is not evidence that the member cannot be overridden.
non_overridablejava_final_methodabsent2Evidence that the member cannot be overridden. A producer sets it only after it reads an exact Java final method.
implicit_operationImplicitOperationabsent2The member’s role in an implicit value operation.
explicit_operationExplicitValueOperationabsent2The member’s role in a value operation that the call site writes out.
ambient_usenot_ambient, implicit, or givenabsent3See Ambient use.
callable_family_completebooleanfalse2The pack contains every callable with this member’s exact owner, name, receiver form, and declared arity; variadic signatures retain their fixed prefix and repeated final parameter. Rejected on a non-callable or on a member without a signature.
value_typeTypeRefabsent15Declared class of a modeled field value; requires a non-null nominal type without type arguments.
proxied_typeTypeRefabsent15Class used for member dispatch on a proxy field value. Requires value_type and the same nominal type shape.
exact_return_classeslist of TypeRef[]16Exhaustive runtime classes returned by this member. Requires a signature and a constructor, method, function, static, or property member. Entries must be unique, non-null named or declared type references; declared IDs must name a type in this pack.
signatureSignatureabsent2Parameters, return type, and generic parameters.
receiver{pointer}absent2Receiver form. pointer (default false) marks a pointer receiver, as in Go.
extension_receiverTypeRefabsent2The receiver type of an extension member.
extension_receiver_constraintslist of TypeRef[]2Constraints on the extension receiver.
aliaseslist of names[]2Other names for the same member.
guardDeclarationGuardabsent2The toolchain and target condition under which the member exists.

exact_return_classes records a stronger claim than signature.returns: it names every runtime class the callable can return. The schema-16 gate applies to non-empty lists. An absent or empty list makes no exhaustive runtime-class claim. CSMI callable returnClasses imports into this field. Return-class identity does not describe the callable’s runtime effects; those require separate behavior evidence.

FieldTypeMeaning
idstable IDThe relation identity.
relation_kindnavigates_to or referencesnavigates_to makes definition and declaration navigation follow from to to. references records that from refers to to.
fromstable IDA declared type or member ID.
tostable IDA declared type or member ID.

Signature:

FieldTypeDefaultMeaning
parameterslist of Parameter[]Formal parameters, in order. Order is significant.
returnsTypeRefabsentThe return type. Absent means no return type is recorded.
type_parameterslist of names[]Generic parameters of the member.

Parameter:

FieldTypeDefaultMeaning
namelanguage nameabsentThe parameter name. Producers omit it when the artifact does not record it.
typeTypeRefrequiredThe parameter type.
optionalbooleanfalseThe argument may be omitted.
variadicbooleanfalseThe parameter accepts zero or more arguments.
passing_modepositional_only, positional_or_named, or named_onlypositional_or_namedWhich argument forms may bind the parameter. Python stub producers set the other values from /, *, *args, and **kwargs.

A TypeRef is tagged by kind. Type nesting is limited to depth 64.

kindFieldsMeaning
unknownnoneThe type is not known. This preserves a present parameter or result port without asserting a concrete type or that every type is allowed. Added in schema version 9.
namedname, arguments (default []), nullable (default false)A type named by its qualified spelling.
declaredid, arguments (default []), nullable (default false)A type declared in this pack, by stable ID.
type_parameternameA generic parameter in scope. Unknown names fail with type.unknown_parameter.
arrayelementAn array of element.
by_refelement, reference_kind (lvalue or rvalue, default lvalue)A by-reference type.
pointerelementA pointer to element.
sliceelementA slice of element, as in Go.
fixed_arrayelement, length (text)A fixed-length array.
mapkey, valueA map type.
channelelement, direction (bidirectional, receive, or send)A Go channel.
wildcardvariance (any, extends, or super), boundA wildcard. extends and super require bound; any forbids it.
tupleelements (at least one)A tuple type.
functionparameters (list of Parameter), result (optional TypeRef)A function type.

A Locator is tagged by kind. Paths are canonical relative paths with / separators.

kindFieldsMeaning
sourcepath, symbol (optional)A source file path and, optionally, the symbol in it.
artifactpath, symbolAn entry in a binary or packaged artifact, such as com/acme/Widget.class.
interchangepath, symbol, identity, callable_shape_evidence (optional), profile_evidence (optional)A declaration imported from CSMI. identity is a CSMI portable symbol identity. The two evidence fields carry validated CSMI core and Python profile data for the exact imported artifact.

Each recorded constraint is a necessary condition for the record to exist.

FieldTypeDefaultMeaning
min_toolchain_version{major, minor, patch}absentThe lowest toolchain version that declares the record, inclusive.
max_toolchain_version_exclusive{major, minor, patch}absentThe lowest toolchain version that no longer declares the record.
required_targetslist of text[]Activation targets that declare the record. Empty places no requirement.
excluded_targetslist of text[]Activation targets that do not declare the record.
uninterpretedbooleanfalseThe producer read part of the condition that it could not express. Such a record is never dropped for lack of a constraint.

Guard versions compare only the three release components. A shorter source version such as (3, 14) is padded with zeros. Activation drops a guarded record only when the pinned toolchain version or target provably fails a recorded constraint.

TypeValueSemantics on a type:

FieldValuesMeaning
copy{kind: trivial} or {kind: via_member, member}How the type copies. member is the stable ID of the copy operation.
move_semanticsinvalidatingA move leaves the source invalid.

The validator rejects an empty value_semantics object (declaration.empty_value_semantics).

ImplicitOperation on a member (tagged by kind):

kindFieldsAllowed onMeaning
copy_constructornoneconstructorImplicit copy construction.
move_constructornoneconstructorImplicit move construction.
value_preserving_constructornoneconstructorConstruction that preserves the logical value of one source argument.
copy_assignmentnonemethodImplicit copy assignment.
move_assignmentnonemethodImplicit move assignment.
conversion_operatortarget (TypeRef)methodImplicit conversion to target.

ExplicitValueOperation on a member (tagged by kind). The member must be a method with a signature:

kindMeaning
receiver_assignThe receiver’s value becomes the first argument’s value. The receiver keeps its storage identity.
receiver_extendThe first argument’s value is added to the receiver’s value.
receiver_projectionThe normal result is a view of the receiver’s storage. Writing through it writes the receiver.
argument_expiring_castThe normal result is the single argument’s own object, as an expiring value. No operation runs.

ambient_use states whether importing the declaration can make it usable without the importing file spelling its name.

ValueMeaning
not_ambientEvery use spells the imported name. This is the only value that proves a negative.
implicitA Scala 2 implicit definition, selected by type from the imported scope.
givenA Scala 3 given definition, selected by type from the imported scope.

Absence means the producer did not review the declaration. A consumer must treat it as unknown.

TypeFieldsMeaning
HierarchyFacthierarchy_kind, target (TypeRef), declaration_ordinal (optional integer)One supertype or mixin edge. declaration_ordinal keeps source order where order matters.
EmbeddedTypeFacttarget (TypeRef), pointer (default false)One embedded type. pointer marks an embedded pointer.
TypeParameterConstraintparameter (name), constraint (StructuredTypeExpression)A constraint on one type parameter.
StructuredTypeExpressiondisplay (non-empty text), referenced_types (list of TypeRef, default [])A type expression kept as display text plus the structured types it references.
EnumerationValues
TypeKindclass, annotation, delegate, interface, trait, struct, union, enum, record, module, type_alias
MemberKindconstructor, method, function, field, property, constant, static, macro, event
Visibilitypublic, protected, internal, protected_internal, package, private
HierarchyKindextends, implements, uses_trait, mixin_include, mixin_prepend, mixin_extend
RelationKindnavigates_to, references
ParameterPassingModepositional_only, positional_or_named, named_only
ChannelDirectionbidirectional, receive, send
WildcardVarianceany, extends, super
FieldTypeDefaultMeaning
idstable IDrequiredThe rule identity.
triggerRuleTriggerrequiredThe source site that the rule matches.
captureslist of CaptureDeclaration[]Values read from the matched site. Names must be unique.
emissionslist of RuleEmissionrequired, at least oneWhat the rule adds (rule.no_emissions).

A trigger is tagged by kind. Two kinds are accepted by the schema but never match in this build.

kindFieldsMatchesEvaluated
language_constructconstructA normalized source node whose construct label or normalized kind label equals construct. Construct labels are java_method_reference, java_object_creation, scala_case_class, and rust_macro_invocation. Normalized kind labels are the structural kinds listed in the CodeQuery reference.yes
annotationnameA decorator or annotation node. See Annotation name matching.yes
annotated_fieldannotation, value (optional), excluded_annotations (default []), owner_annotation_path (at least one entry)A named field declaration that carries annotation (with argument value, if given), carries none of excluded_annotations, and whose owning class carries the annotations in owner_annotation_path.yes
macro_invocationnameA call node with a matching name. In Rust files the call must be a macro invocation.yes
generator_invocationnameA call node with a matching name.yes
resolved_ownerownerNever matches. Bifrost does not yet supply the resolver evidence.no
resolved_callowner, nameNever matches, for the same reason.no
  • A trigger name with no . or :: matches the last segment of the node’s name. A trailing ! on the node’s name is ignored.
  • A qualified trigger name such as com.acme.GenerateBuilder matches a node whose name is exactly that string, or whose decorator source is that string followed by nothing or by (.
  • A qualified trigger name also matches an unqualified annotation, such as @GenerateBuilder, when exactly one non-wildcard import in scope at that site binds the local name to the qualified name.

CaptureDeclaration:

FieldTypeMeaning
nametextThe capture name used by templates.
binding{source, projection}Where the value comes from and which part of it to read.
value_kindidentifier, stable_id, type, string, or pathThe declared value kind. It must equal the kind that the projection produces.
cardinalityone, optional, many, or groupHow many values the capture produces. It must equal the cardinality that the source requires.

Capture sources (binding.source, tagged by kind):

kindFieldsRequired cardinalityValid triggersValue
matched_nodenoneoneallThe matched node.
enclosing_declarationnoneoneallThe declaration that encloses the matched node.
owning_typenoneoneallThe type that owns the matched declaration.
owned_fieldsnonemanyallThe direct fields that supply generated members. A field-level annotation yields that field; a type-level annotation yields the type’s direct fields.
owned_mutable_fieldsnonemanyallThe same fields as owned_fields, without final fields.
owned_uninitialized_final_fieldsnonegroupallThe same fields as owned_fields, limited to non-static final fields without an initializer, in declaration order.
resolved_ownernoneoneresolved_owner, resolved_callThe resolved owner. These triggers never match in this build.
argumentindexoptionallanguage_construct, macro_invocation, generator_invocation, resolved_callOne argument by zero-based index.
argumentsfrommanylanguage_construct, macro_invocation, generator_invocation, resolved_callThe arguments from index from to the end.
annotation_argumentnameoptionalannotationOne named annotation argument.

Projections (binding.projection) and the value kind each one produces:

ProjectionValue kind
nameidentifier
stable_idstable_id
typetype
textstring
pathpath

Cardinalities:

CardinalityEffect at a match
oneExactly one value. No value fails the match with capture.unbound.
optionalZero or one value. A template cannot reference an optional capture (capture.cardinality).
manyOne emission row per value. Zero values produce no emissions. When a rule has several many captures, they must produce the same number of values, or the match fails with capture.repeated_length.
groupAll values stay together in one emission. TemplateSignature.repeated_parameters renders once per value.

Templates build text from literals and captures. A TemplateExpression is tagged by op. Nesting is limited to depth 64.

opFieldsResult
literalvalueThe literal text.
capturenameThe capture’s value. The capture must exist and must not be optional.
concatvalues (at least one)The values joined in order.
transformtransform, valuevalue with an ASCII case transform applied.
conditionalcondition, then, elsethen when the condition holds, otherwise else.

Conditions (TemplateCondition, tagged by op):

opFieldsHolds when
equalsleft, rightThe two expressions produce equal text.
starts_withvalue, prefixvalue starts with prefix.

Transforms: lowercase, uppercase, snake_case, kebab_case, pascal_case, camel_case. In a stable-ID position, uppercase, pascal_case, and camel_case are rejected (template.unsupported_transform).

Position rules:

  • A stable-ID position (an emitted id, an alias or relation endpoint, a member owner) accepts only stable_id captures. Literal fragments may contain only lowercase letters, digits, ., -, and _.
  • A language-name position (a name, a parameter name, a type parameter) accepts identifier or stable_id captures. Literal fragments must be printable and contain no whitespace.
  • A type position accepts only type captures.

RuleEmission is tagged by kind.

kindFieldsAdds
declarationid, name, declaration, anchor (optional)One declaration. anchor must be a capture expression; it names an authored location. Without an exact anchor, the declaration gets a bifrost-model:// location.
aliasid, from, toAn alias from one ID to another.
relationid, from, to, relation_kindA relation, as in RelationFact.

EmittedDeclaration (the declaration field) is tagged by kind:

kindFields
typetype_kind, visibility, is_abstract (default false), is_sealed (default false), type_parameters (templates, default []), hierarchy (list of {hierarchy_kind, target} with a template type, default []), extension_surfaces (templates, default [])
membermember_kind, visibility, owner (optional template), signature (optional TemplateSignature), is_static, is_abstract, is_virtual (each default false)

TemplateSignature:

FieldTypeDefaultMeaning
type_parameterslist of templates[]Generic parameters.
parameterslist of TemplateParameter[]Fixed parameters.
repeated_parameterslist of TemplateParameter[]Parameters rendered once for each value of the rule’s group capture.
returnsTemplateTypeRefabsentThe return type.

TemplateParameter has name (template), type (TemplateTypeRef), optional (default false), and variadic (default false).

TemplateTypeRef is tagged by kind: named (name template, arguments default [], nullable default false), capture (name of a type capture), array (element), and by_ref (element).

Omitted list fields default to empty. “Version” is the lowest schema_version that accepts the field.

FieldTypeVersionMeaning
idstable ID2The summary identity. pack_id, one byte, and id together may not exceed 512 bytes.
targetAuthoredProcedureTarget2The exact procedure. Two summaries in a pack may not share path and symbol (summary.duplicate_target).
completenesspartial or complete2Whether the summary covers the procedure’s whole transfer scope.
locationslist of {id, location_kind}2Declared locations. location_kind is capture or heap. At most 65,536.
transferslist of transfers2Value flows. Required field; may be an empty list. At most 65,536.
effectslist of effects2Allocations, calls, escapes, unknown calls, and sanitizers. At most 65,536.
concurrency_effectslist of concurrency effects2Synchronization behavior at the call. At most 65,536.
no_concurrency_effectsboolean, default false7The procedure neither synchronizes with caller-visible memory nor retains it for concurrent work. Requires completeness: complete and an empty concurrency_effects.
ordinary_heap_unchangedboolean, default false2The procedure and its transitive behavior do not write, publish, or escape ordinary program storage, and do not call an unaccounted callback. Requires completeness: complete. Conflicts with allocations, calls, escapes, unknown or ambiguous calls, conditional indirect writes, and transfers into heap or capture locations.
declared_effectslist of declared effects2Namespaced effect identifiers. At most 64.
normal_continuation_absentboolean2The procedure never returns normally. Omitted or false makes no claim.
normal_result_countinteger, at most 65,5362The number of normal results. Required when result_contracts, result_use_obligations, conditional_result_refinements, or an indexed_normal_return output is present.
preconditionslist of operation preconditions, or absent2Absent: not reviewed. Empty list: reviewed, none required. Populated: the predicates required at the call.
result_contractslist of result contracts2When a normal result is valid to use. At most 64.
result_use_obligationslist of result-use obligations5Whether a discarded result matters. At most 64.
conditional_result_refinementslist2What a boolean result outcome proves about a parameter. At most 64.
conditional_indirect_writeslist2Writes through a pointer parameter that depend on a boolean result. At most 64.
normal_return_refinementslist2Predicates that hold for parameters whenever the procedure returns normally. At most 64.
normal_return_type_refinementslist2Class assertions that hold for a parameter whenever the procedure returns normally. At most 64.
transfer_partitionslist of transfer partitions2Coverage of one input universe into one normal result.
covers_overridesboolean2Every implementation of this member outside the workspace conforms to this summary. Requires completeness: complete and target.has_receiver: true.
class_decorator_identityclass decorator identity2The decorator preserves class identity.

A partial summary must contain at least one of: a transfer, a complete transfer partition, an effect, a concurrency effect, a preconditions value (even an empty list), a result contract, a result-use obligation, a conditional result refinement, a conditional indirect write, a normal-return refinement, a normal-return type refinement, a class decorator identity, or normal_continuation_absent: true. Otherwise it fails with summary.empty. declared_effects alone do not count. A complete summary may be empty; it then claims that the procedure has no transfers.

When normal_continuation_absent is true, the summary cannot contain a normal transfer, an allocation or sanitize effect whose output is a normal return, result contracts, result-use obligations, conditional result refinements, conditional indirect writes, normal-return refinements, normal-return type refinements, or a class decorator identity (summary.normal_continuation_conflict).

FieldTypeDefaultMeaning
pathrelative pathrequiredThe artifact-relative path. For a qualified symbol it is provenance; for a bare symbol it names the owning module.
symboltextrequiredThe declaration’s symbol. A qualified symbol such as Acme.run names its owner. A bare symbol names a module-level declaration whose owner is the module at path without its extension.
has_receiverbooleanfalseThe call has a semantic receiver. A static call through a type qualifier has no receiver.
parameter_countinteger, at most 65,536requiredThe number of declared formals, including any rest formals.
variadicbooleanfalseThe target declares one or more rest formals and can accept varying actual counts. Requires at least one formal. Claims may reference only fixed parameters (summary.unsupported_variadic_tail_reference).
formalslist of structured formalsemptySchema 11 for fixed signatures; schema 14 adds directional rest formals. When present, describes every formal in declaration order. Exact applicability binds each direct actual by position or keyword; omitted fixed formals are accepted only when optional: true, and an unfilled rest formal denotes an empty collection. Empty retains legacy behavior.

Each structured formal has a unique name, an optional passing_mode (positional_only, positional_or_named, or named_only, default positional_or_named), and an optional boolean (default false) that records whether the declaration has a default value. Schema 14 adds optional variadic_kind values positional, keyword, and both. A signature may have one rest formal for each argument domain. Call-site spreads and unmatched keywords without a keyword-rest formal do not bind exactly. Summary claims cannot reference a rest formal itself.

AuthoredSummaryInput (tagged by kind):

kindFieldsMeaning
receivernoneThe receiver. The target must have has_receiver: true.
parameterordinal (0 to 65,535)A zero-based parameter. The ordinal must be less than parameter_count.

AuthoredSummaryOutput (tagged by kind):

kindFieldsMeaning
normal_returnnoneThe normal return value.
indexed_normal_returnordinalOne normal result of a multi-result procedure. Requires normal_result_count, and ordinal must be less than it.
receivernoneThe receiver.
capturelocationA declared capture location.
heaplocationA declared heap location.
exceptional_returnnoneThe exceptional exit.
FieldTypeMeaning
inputinput portThe source of the value.
exit_kindnormal or exceptionalThe exit on which the flow happens. Must agree with the output port.
outputoutput portWhere the value goes.
value_transfer{kind, operation}Optional. Classifies how value and identity relate. Absent means not reviewed.

value_transfer.kind (tagged by kind): copy, aggregate_copy, move (with invalidation: invalidated or unknown), conversion (with preservation: identity, preserving, changing, or unknown), boxing, unboxing.

value_transfer.operation (tagged by kind): none; implicit with member (the stable ID of a declared member); or unknown with limitation {kind, message?}. Limitation kinds are budget_exhausted, cancelled, unsupported, unresolved_identity, ambiguous_identity, incomplete_input, and other. other requires message.

Each effect is tagged by kind. event is a stable ID that names the effect.

kindFieldsMeaning
allocationevent, outputThe procedure allocates a new object into output.
callevent, calleeThe procedure calls another summary in the same pack. callee is that summary’s id (summary.unbound_callee).
escapeevent, inputThe input escapes to storage that the summary does not model.
unknown_callevent, inputThe procedure passes the input to code that the summary does not model.
unknown_call_boundaryeventThe procedure calls code that the summary does not model.
ambiguous_callevent, input, candidatesThe procedure calls one of the named summaries. At least one, at most 4,096 candidates.
sanitizeinput, output, removesThe named taint labels are removed on a declared transfer from input to output. removes has 1 to 64 unique labels. A matching transfer must exist (summary.sanitize_without_transfer).

The total number of callee references across call and ambiguous_call effects is at most 65,536.

Concurrency effects are tagged by kind. They name receiver or parameter ports and do not add value-flow edges.

kindFieldsMeaning
unsupportedprotocolThe call takes part in a concurrency protocol that Bifrost does not model.
task_spawncallable, group (optional), condition (optional call_result_true), timer (optional output)Starts callable as a task. With condition: call_result_true, the task starts only when the call returns true. timer names the returned timer for a cancellable callback.
task_joingroupWaits for the tasks in group.
once_doonce, callableRuns callable at most once per once object.
lock_acquirelock, mode (shared or exclusive), condition (optional call_result_true)Acquires lock. With condition, the lock is held only when the call returns true.
lock_releaselock, modeReleases lock.
wait_group_addgroup, deltaAdds delta to a wait group.
wait_group_donegroupMarks one wait-group task done.
wait_group_waitgroupWaits for a wait group.
atomiclocation, operation (load, store, or read_modify_write)An atomic access.
cond_bindcondition (output), lockBinds a new condition variable to its locker.
cond_waitconditionReleases the bound locker, waits, and re-acquires it.
cond_notifycondition, waiters (one or all)Wakes one or every waiter.
sync_mapmap, operation, key (optional)One sync.Map entry operation. key is absent only for clear.
timer_stoptimerStops a timer. A true result proves that the timer’s callback did not and will not run.
timer_resettimerRe-arms a timer. It voids an earlier stop.
subtest_runcallable, groupRuns a subtest callback under the parent test group.
subtest_parallelreceiverMarks the test node as parallel.
subtest_cleanupcallable, groupRegisters a cleanup that runs after the test and its subtests.

sync_map operations: store, delete, clear, load, range, load_or_store, load_and_delete, swap, compare_and_swap, compare_and_delete.

FieldTypeMeaning
idstable ID with at least one .A namespaced effect name, such as acme.network_io (summary.effect_namespace). Unique within one summary.
timingimmediate, deferred, or unknownBefore the call returns, scheduled by the call, or not stated.
certaintydefinite or possibleEvery execution, or some execution.

Result predicates are null, non_null, true, and false.

RecordFieldsMeaning
Operation preconditioninput, predicateThe predicate must hold for the input at the call. One predicate per input.
conditional_result_refinements[]result_ordinal, outcome (boolean), parameter_ordinal, predicate, proof_effect (establishes or does_not_establish)When the boolean result equals outcome, the parameter predicate is established, or explicitly not established.
conditional_indirect_writes[]result_ordinal, outcome (boolean), parameter_ordinal, target (pointee)When the boolean result equals outcome, the procedure writes through the pointer parameter.
normal_return_refinements[]parameter_ordinal, predicateThe predicate holds for the parameter after a normal return.
normal_return_type_refinements[]parameter_ordinal, class_parameter_ordinal, required_receiver_members (default [], at most 64)After a normal return, the subject parameter is an instance of the class passed at class_parameter_ordinal. required_receiver_members names receiver members that must stay bound to the modeled owner. The two ordinals must differ.
FieldTypeMeaning
result_ordinalintegerThe protected normal result.
condition_result_ordinalinteger, optionalA separate result whose predicate makes the protected result valid, as in a Go (value, error) pair. Present together with predicate. Must differ from result_ordinal.
predicateresult predicate, optionalThe predicate required of the condition result.
result_success_predicateresult predicate, optionalThe predicate that makes the protected result valid. Required when there is no condition result.
member_contractslist, at most 64Operations on the protected result.

A member contract has member (name), parameter_count, completeness, declared_effects (default []), and preconditions (absent, empty, or populated, with the same three meanings as on the summary).

FieldTypeMeaning
result_ordinalintegerThe normal result. One obligation per result.
kindpure_transformation_value or fallible_statusA pure value has no effect when discarded. A status reports a fallible outcome that needs inspection.
failure_predicateresult predicateRequired for fallible_status; forbidden for pure_transformation_value.

A pure_transformation_value obligation requires ordinary_heap_unchanged: true on the summary.

FieldTypeMeaning
normal_resultintegerThe normal result covered.
sourceall_inputs, input_receiver, input_parameter (ordinal), or input_capture (symbol)The input universe, tagged by kind.
statusunknown, partial, or completeCoverage. complete forbids limitations; partial requires at least one.
limitationslist of {kind, diagnostic_code?, diagnostic_message?}Why coverage is not complete.
provenancelist of textProvenance references.

A partition never closes effects, exceptions, heap state, or the whole procedure.

FieldTypeMeaning
directbooleanThe decorator, applied directly to a class, returns the same class. The target must accept exactly the class argument.
factory_keywordslist of {name, allowed_values}, optionalThe decorator factory preserves class identity when called with only these keyword arguments, each with a literal boolean from allowed_values. At most 64 keywords.

The claim requires a complete summary, a target without a receiver, and no covers_overrides. At least one of direct: true or factory_keywords must be present.

Companions carry facts from CSMI vocabularies. Their field names follow the CSMI specification, including its camel-case spelling. Bifrost validates them against the profile schema and its own semantic checks.

CompanionCSMI vocabularyLowest versionContents
runtime_valuescsmi.runtime-values 0.1.02Runtime global exposures and keyed-read behaviors, such as process.env.
runtime_contractscsmi.runtime-values 0.24Portable runtime contracts in five fact families.
collection_flowscsmi.collection-flow 0.1.02Flows through collection operations.
deferred_yieldscsmi.deferred-yield 0.1.02Values that a factory yields later through a resume operation.
conditional_type_refinementscsmi.conditional-type-refinement2Type refinements that a predicate call establishes, such as Python TypeIs and TypeGuard.

RuntimeValuesPayload has four lists, each default empty: exposures, behaviors, binding_evidence, and observations. The schema accepts the last two for CSMI round trips. The production evaluator does not read them; it derives binding and observation facts from the analyzed workspace.

exposures[] (RuntimeGlobalExposure):

FieldMeaning
exposureIdThe exposure identity.
bindingNameThe global name, such as process.
membersThe exposed members, such as env and argv.
languagesLanguages the exposure applies to.
rootIdentity{scheme, schemeVersion, descriptors: [{name, role}]}. role is runtime or global.
runtimeApplicability: runtimeFamily, realm, initializationBoundary, and optional platform, architecture, moduleMode, runtimeArtifact, runtimeArtifactDigest, hostAssumptions.
runtimeProfileDigestThe reviewed runtime profile digest.
activationenabled, disabled, or review-required. enabled does not bypass pack activation or safety.review_required.
coverage{status, limitations}.
evidence{producer, method, inputsDigest}.
provenance, extensionsOptional lists. An extension is {vocabulary, version, payload}.

behaviors[] (KeyedReadBehavior):

FieldValues
behaviorId, exposureId, containerMemberIdentities. containerMember must be one of the exposure’s members.
acceptedKeysstatic-property or static-index
normalResultvalue-or-undefined or value
exceptionBehaviornonthrowing, may-throw, or unknown
materializationeager, lazy, host-defined, or unknown
mutationModelpristine-input-until-write, ordinary-mutable, or unknown
coverage, evidence, provenance, extensionsAs for exposures.

binding_evidence[] (RuntimeGlobalBindingEvidence) has bindingEvidenceId, exposureId, language, dialect, scopeIdentity, rootOccurrence, lexicalBinding (absent, present, indeterminate), rebinding (excluded, present, indeterminate), activation (activationSource, activeExposureIds, activeSetDigest, exposureId, modelDigest, runtimeProfileDigest, outcome: matched, not-matched, indeterminate, conflict, unsupported), coverage, evidence, provenance, and extensions.

observations[] (KeyedReadObservation) has observationId, behaviorId, bindingEvidenceId, expression, baseValue, loadOperation, observationPoint, resultValue, key (property with text or index with an integer), sourceForm (dot, bracket-string, bracket-number), phase (before-effects, after-effects, exceptional), sourceOrigin (pristine-runtime-input, mutated, indeterminate, not-applicable), normalOutcome (exact, partial, unsupported, indeterminate), exceptionOutcome (excluded, possible, unsupported, indeterminate), coverage, evidence, provenance, and extensions.

Shared shapes: a scoped identity is {kind, ownerDigest, locatorDigest} with kind one of scope, value, operation, point. A source range is {resource, resourceDigest, startByte, endByte}. Coverage status is complete, partial, or unknown. Coverage limitations are activation-missing, activation-conflict, activation-unsupported, lexical-binding-indeterminate, rebinding-indeterminate, mutation-incomplete, accessor-or-proxy-incomplete, materialization-incomplete, exception-behavior-indeterminate, dynamic-key, unsupported-index, cancelled, budget-exhausted, stale-evidence, ambiguous-owner, and coverage-limited. Incomplete coverage requires at least one limitation.

runtime_contracts has a required payload and an optional envelope. The envelope keeps the original CSMI document envelope for lossless re-export. The payload has five lists, each default empty, in this order:

ListRecord fields
targetstargetId, targetDigest, definition (basis: declared-target, deployment-observation, unknown; context: exact realm, platform, architecture, moduleMode, launchMode, initializationBoundary, scheme; partition; resources: [{resource, resourceDigest}]; runtime: optional selector; assumptions; coverage; evidence)
contractscontractId, contractDigest, evidence, definition (identifier, version, languages, surface {root, container}, applicability (basis: portable or artifact-specific; selectors), context (sets per dimension plus scheme), assumptions, behavior)
activationsactivationId, activationDigest, targetId, surface, candidateIds, selectedIds, disabledIds, candidateCoverage, policy (identifier, version, purpose, inputsDigest, trustedReviewers), reviews (contractDigest, targetDigest, reviewer, purpose, decision: approved, denied, unknown; evidence), outcome (matched, not-matched, indeterminate, conflict, unsupported, review-required, disabled)
bindingsbindingId, activationId, activationDigest, contractId, language, source, scope, root, container, lexicalBinding, rebinding, outcome (exact, excluded, indeterminate, unsupported), coverage, evidence
observationsobservationId, bindingId, source, sourceForm (dot, bracket-string, bracket-number, mapping, unsupported), key, storageKey (optional), baseValue, loadOperation, point, resultValue, phase, origin (initial-if-present, written, deleted, absent, unknown), store, proof, coverage

behavior fields: keyDomain (static-property, static-index), keyEquality (scheme), lookup (own-value, mapping-entry), presentValue (string), absent (undefined, exception), read (materialization; exceptions: nonthrowing, may-throw, unknown), write (normal: store-converted-value, unknown; exceptional: unchanged, may-mutate, unknown; conversion: identity, string-conversion, requires-contract, unknown), delete (normal: remove-entry, unknown; exceptional: unchanged, may-mutate, unknown), initialOrigins ([{origin, keys}]; origin is external-environment, application-argument, executable-path, entry-path, or unknown; keys is all-properties or index-range with minimum and maximum), and coverage.

store fields: realm, invocation, container, backing, relationship (isolated, copied, shared, unknown), copiedFrom, copyPoint, and evidence.

proof fields: closureDigest, initialization and dependencies (closed, open, unknown), keyNormalization (exact, unknown), lookup (own-present, absent-no-fallback, mapping-present, mapping-absent, inherited, accessor, proxy, unknown), materialization (resolved, unresolved), mutation (pristine, written, deleted, unknown), normal (exact, indeterminate, unreachable), exceptional (excluded, modeled, unknown), and evidence.

Shared shapes: an identity is {kind, scheme, ownerDigest, locatorDigest} with kind one of scope, value, operation, point, invocation, realm, store. A scheme is {identifier, version}. A range is {resource, resourceDigest, startByte, endByte}. A key is property (text), index (integer), dynamic, or unsupported. A selector is {purl, versionRange?, digests?}; a digest is {algorithm, value, coverage, canonicalization?} with algorithm sha-256, sha-384, or sha-512. Coverage limitations add target-unknown, review-missing, inventory-incomplete, lookup-incomplete, initialization-incomplete, unsupported-key, equality-unknown, and sharing-unknown to the 0.1 list, and drop accessor-or-proxy-incomplete, unsupported-index, and ambiguous-owner.

collection_flows, deferred_yields, conditional_type_refinements

Section titled “collection_flows, deferred_yields, conditional_type_refinements”
CompanionListRecord fields
collection_flowsflowscallable (a declared member ID), payload (CSMI collection-flow fact), coverage (partial or complete, optional), provenance
deferred_yieldsyieldsfactory, resume, handleType (declared IDs), payload (CSMI deferred-yield fact), coverage (optional), provenance
conditional_type_refinementsrefinementspayload (CSMI conditional-type-refinement fact), coverage (unknown, partial, or complete, optional), provenance

cpp_portability must contain at least one resolution context and one symbol.

ListRecord fields
resolution_contextscontext_digest (lowercase SHA-256 of the RFC 8785 context), compile_arguments_digest, language (c or cpp), translation_unit, direct_headers ([{include_name, artifact}], at least one), header_closure (complete)
symbolsnative_id (a declared fact ID), key (scheme, scheme_version, stability: portable, artifact_selectors, descriptors: [{name, role, disambiguator}] with role namespace, type, or callable)
type_aliasesalias (a declared ID), target (a C++ canonical type), resolution_context
special_membersowner, member, member_disambiguator, operation (copy_constructor, copy_assignment, move_constructor), signature, resolution_context

A C++ artifact selector is {purl, digests: [{algorithm: sha256, value, coverage, canonicalization?}]}. A resolution-context reference is {vocabulary, version, context_digest, language, header_closure}. A callable signature is {callable_kind (constructor or method), owner, parameters, receiver?, result?}. A C++ canonical type is tagged by kind: fundamental (name: char), declared (symbol), template_specialization (primary, arguments), qualified (qualifiers: const, volatile; type), or reference (reference_kind: lvalue, rvalue; referent).

FieldMeaning
native_sha256SHA-256 of the normalized full pack, with this field blanked.
declaration_artifactThe CSMI artifact selector of the declaration artifact.
symbols[{local_id, identity, provenance}].
mappings[{declaration, runtime, relation, conditions?}]. relation is describes, augments, or replaces-for-type-checking.
vocabulary_uses, extension_facts, completeness_statements, core_completeness_statements, provenance_recordsCSMI records kept as JSON for re-export.
default_provenanceOptional local provenance ID.

A CSMI portable symbol identity is {scheme, schemeVersion, artifactSelectors, descriptors}. An artifact selector is {purl, versionRange?, digests?}. A digest is {algorithm (sha-256, sha-384, sha-512), value, coverage, canonicalization?}. A descriptor is {role, name?, disambiguator?} with role namespace, type, term, callable, type-parameter, value-parameter, or meta.

Compilation and decoding use the same defaults. A caller can lower them.

LimitDefaultValidation code
Source document64 MiBlimit.source_bytes
Readable manifest16 MiB
Each raw shard64 MiB
Each stored shard64 MiB
Total raw pack1 GiB
Shards per pack4,096limit.shards
Records per shard250,000limit.shard_records
Records per pack2,000,000limit.pack_records
Text value16 KiBlimit.text_bytes
Type and template nesting64limit.type_depth, limit.template_depth, limit.template_type_depth

YAML input allows one document and rejects duplicate keys, aliases, anchors, merge keys, includes, legacy boolean spellings, and excessive nesting.

compile writes manifest.json and one file per shard in shards/, named <shard_id>.json (raw) or <shard_id>.deflate (raw DEFLATE). The manifest repeats the envelope fields and adds:

FieldMeaning
semantic_sha256Digest of the ordered shard semantic identities.
content_sha256SHA-256 of the manifest view without this field.
shards[].shard_id, payload_kindThe shard and its payload kind.
shards[].routing_keysSorted keys derived from selectors and triggers, such as trigger:language_construct.
shards[].encodingraw or deflate.
shards[].raw_size, stored_size, record_countSizes and count.
shards[].defined_ids, referenced_idsDeclaration IDs that the shard defines and references.
shards[].semantic_sha256, content_sha256, stored_sha256The three shard digests.

The digest definitions are in Canonical artifacts and digests.

.bifrost/packs.json is optional. When present it must be valid JSON of at most 256 KiB. Every object rejects unknown fields. The machine-readable schema is schemas/workspace-packs-v1.schema.json.

FieldTypeRequiredMeaning
schema_versionintegeryesMust be 1.
ecosystemslist of labelsyesThe dependency ecosystems to discover. Labels must be unique and from the ecosystem table. An unknown or duplicate label is an error. [] turns off dependency-pack discovery.
catalogtext, 1 to 1,024 bytesnoA workspace-relative catalog directory. Absolute paths, .. components, and platform prefixes are rejected. When omitted, see Catalog location.
enablelist of pack IDsnoPack IDs that satisfy safety.review_required. Each becomes a workspace enable control. It cannot bypass compatibility.
python_runtime_environmentslistnoExplicit bindings from a source tree to installed Python wheels. See below.

When the document is absent, hosts select every ecosystem that serves a language present in the workspace.

Each entry binds one workspace source tree to installed wheel contents. Bifrost verifies each installed tree against its original wheel without running Python. Entries are added to the Python runtime-environment configuration for activation. All paths are workspace-relative and are validated the same way as catalog.

FieldTypeRequiredMeaning
source_rootpathyesThe source tree bound to this environment. . binds the whole workspace.
artifactslist of {archive_path, installed_root}yesarchive_path is the original wheel. installed_root is the directory that holds its installed contents.
declared_environmentobject or nullnoA declared filesystem-import environment. It describes the declared launch configuration, not a running interpreter.

declared_environment fields, all required:

FieldTypeMeaning
producer_versiontextVersion of the producer that wrote the descriptor.
resolver_versiontextVersion of the declared resolver semantics.
interpreterobjectpath (workspace-relative interpreter file), sha256, implementation, python_version, abi, platform.
launchobjectisolation (isolated, environment_sensitive), site_startup (disabled, enabled), environment (cleared, explicit_inputs, ambient), import_path (declared_roots_only, environment_augmented), finder (standard_filesystem, custom_hooks), editable_installs (disabled, enabled), native_extensions (disabled, enabled).
entry_pointobjectmode (script, module, command_string), root_slot_id, relative_path, working_directory_root_slot_id, working_directory. Paths are relative to their root slot.
extraslist of textEnabled extras, in order.
config_inputslist[{ordinal, input_id, role, path, sha256}]. role is resolver_configuration, startup_configuration, environment_configuration, extras_configuration, or entry_configuration.
root_slotslist[{ordinal, slot_id, role, path, artifact_index?}] in resolver order. role is source, standard_library, or installed_distribution. artifact_index points into artifacts.
SituationCatalog
catalog is setThat directory under the workspace root, opened read-write.
catalog is omitted, and the analyzer is persisted or BIFROST_SEMANTIC_PACK_CACHE_ROOT, BIFROST_CACHE_DIR, or BIFROST_CACHE_ROOT is setsemantic-pack-catalog.v11 under BIFROST_SEMANTIC_PACK_CACHE_ROOT if set, otherwise under the repository’s Bifrost cache directory.
catalog is omitted, and the analyzer uses ephemeral storage with none of those variables setAn in-memory catalog that is deleted when the session ends.

When BIFROST_SEMANTIC_PACK_CACHE_ROOT is not set, the default catalog also reuses exact generated packs through generated-semantic-packs.v10 in the machine cache. See the environment reference for the cache variables.

.bifrost/semantic-models/ holds reviewed models that a repository checks in. Each file is one pack source, the same input that bifrost-semantic-pack validate and compile read.

RuleValue
Files readDirect children with the extension .json, .yaml, or .yml. Discovery does not recurse. Other files are ignored without a diagnostic.
Rejected entriesSymbolic links, entries that are not files, and paths outside the canonical workspace.
Directory entriesAt most 1,024 (limit.workspace_files).
File sizeAt most 64 MiB per file (limit.source_bytes).
Source kindephemeral_workspace. Workspace models outrank installed and shipped packs.
ReviewA model with safety.review_required: true stays inert until .bifrost/packs.json enable names its pack ID.
Checkbifrost-semantic-pack workspace-check WORKSPACE reports each file’s source SHA-256 and compiled semantic digest.

A CLI policy run without --sources loads this directory whenever it exists. A SearchToolsService session loads it only when BIFROST_WORKSPACE_SEMANTIC_MODELS is on. See Semantic-Model Packs for the failure behavior of each host.

.bifrost/jvm-toolchains.json binds workspace source roots to JDK installations. Reviewed JDK models apply to a call only when its source root has a binding. JAVA_HOME alone does not create a binding.

FieldTypeRequiredMeaning
schema_versionintegeryesMust be 1.
source_toolchainslist of {source_root, jdk_home}yesAt most 128 bindings.
source_roottextyesA workspace-relative path. . binds the whole workspace.
jdk_homepathyesThe JDK installation. Absolute or relative to the workspace. Must not be empty.

The document is at most 256 KiB, and every object rejects unknown fields. The deepest matching source root wins. Two equally specific bindings to different JDK homes are ambiguous, and the reviewed obligations stay incomplete. Bifrost reads the document when it builds the workspace, so restart a running host after a change. An invalid document makes the workspace build fail.

Activation matches shard selectors against evidence rows. A row has language, ecosystem, and optional package, module, and toolchain ({name, version?} with an exact SemVer version), target, configuration, and artifact_sha256.

Hosts mint these rows for a workspace:

RowWhenFields
Intrinsic language rowOne per language presentlanguage and the intrinsic ecosystem below. No other fields.
Node runtime rowOne per present JavaScript or TypeScript language, when the root package.json (engines.node or volta.node), .nvmrc, or .node-version names exactly 22.11.0 (an optional leading v is allowed)package pkg:generic/nodejs.org/node@22.11.0, the reviewed Node archive digest as artifact_sha256, and the reviewed profile digest as configuration.
Python process-input rowWhen Python is presentEcosystem pypi and the reviewed process-input profile digest as configuration.
Dependency rowsFor each selected ecosystemRows from the ecosystem’s dependency discovery.
Workspace model rowsFor each model in .bifrost/semantic-models/Rows returned by registration.

Intrinsic ecosystems:

LanguageEcosystem
Java, Scala, Kotlinmaven
Rustcargo
Gogo
Pythonpypi
Rubyrubygems
JavaScript, TypeScriptnpm
C#nuget
C++, PHPlanguage

The bifrost-semantic-pack list command reads evidence from an activation file. See Activation input file.

These are the labels accepted in .bifrost/packs.json ecosystems. Each label selects one dependency resolver and one pack adapter. The input files are the files whose change makes a host invalidate the ecosystem’s packs.

LabelLanguagesInput filesWhat discovery reads
jvmJava, Kotlin, Scalapom.xml, settings.xml, build.gradle, build.gradle.kts, settings.gradle, settings.gradle.kts, gradle.properties, gradle.lockfile, libs.versions.toml, gradle-wrapper.propertiesExact Maven coordinates from reports, repositories, Gradle caches, and explicit paths. The default mode, Metadata, reads files only. Maven or Gradle runs only when a library host sets JvmDependencyDiscoveryMode::OfflineBuildTools.
dotnetC#project.assets.jsonNuGet package, version, target framework, and asset role.
npmJavaScript, TypeScriptpackage.json, package-lock.json, npm-shrinkwrap.jsonLockfiles and locally installed package manifests, to find declaration entry points. Lockfiles are limited to 32 MiB and package manifests to 1 MiB.
pythonPythonMETADATA, RECORD, top_level.txt, pyproject.toml, .python-versionA host-declared environment (standard library, bundled stubs, distributions), or the workspace-declared toolchain for standard-library packs. Never starts Python.
goGogo.mod, go.sum, go.work, go.work.sum, modules.txtgo env and go list metadata from the configured go executable, offline. A CLI policy run turns this on to select installed packs. Other hosts leave it off unless a library host sets AnalyzerConfig.go.dependency_discovery.mode.
cargoRustCargo.toml, Cargo.lock, rust-toolchain.tomlA host-supplied bundle of Cargo metadata and rustdoc JSON. Never runs Cargo.
rubyRubyGemfile, Gemfile.lock, gems.lockedA host-supplied lockfile and .gem archives. Never runs Ruby or Bundler.
composerPHPcomposer.json, composer.lock, installed.jsoncomposer.lock, vendor/composer/installed.json, and installed package trees under approved vendor roots. At most 64 autoload rules per package and 8,192 directories per package walk. Never runs Composer.
cppC++compile_commands.jsonCompile commands and the headers reachable from include roots outside the workspace. At most 10,000 headers and 32 MiB per header closure.

None of these resolvers downloads anything.

Source kindStorageOrigin
ephemeral_workspaceSession memoryModels registered from .bifrost/semantic-models/ for one session.
workspace_producedDurable catalogPacks produced by the workspace.
generatedDurable catalogPacks generated locally from exact dependency artifacts.
installedDurable catalogPacks installed from a release bundle.
pre_shippedDurable catalogPacks that a host image installs in advance.
embeddedSession memoryThe packs compiled into the engine. See Shipped packs.
  1. Discovery narrows candidates by language, ecosystem, and the populated package, module, toolchain, or artifact index, without reading payloads.
  2. Each candidate must be compatible. For a version 2 to 7 pack, compatibility.bifrost must match the engine version. A version 8 or 9 pack has no engine range; this build accepts them because it reads those versions. Each populated selector field must match one evidence row.
  3. Controls apply. A workspace control outranks a user control. Within a scope, a control that names manifest_digest outranks one that names version, which outranks one that names only pack_id. Equally ranked controls with different actions are an error. A review_required pack needs an enable control. A control cannot make an incompatible pack active.
  4. When candidates overlap, the higher evidence rank wins: exact artifact, then versioned coordinate, then named coordinate, then language. Ties go to the higher source kind: ephemeral workspace, workspace-produced, generated, installed, pre-shipped, then embedded.
  5. Equal-rank candidates with different facts stay a conflict.

Activation statuses are active, disabled, incompatible, review_required, shadowed, conflict, and unavailable.

Authored workspace source and exact navigable artifact declarations outrank model-only facts after activation.

The engine embeds these packs. Hosts register them when they bootstrap the catalog. When BIFROST_OPEN_SEMANTIC_PACK_BUNDLE is set, the bundle replaces this whole set; the two are not merged.

“Review” means the pack sets safety.review_required, so it also needs an enable entry. “Ver.” is the pack schema_version.

Pack IDVersionLanguage / ecosystemVer.PayloadCompletenessReviewModelsActivation requires
bifrost.scala.case-class1.0.0scala / maven2generator rulespartialnoGenerated copy and parameter accessors of case classes.Scala present.
bifrost.java.lombok1.0.0java / maven2generator rulespartialnoAccessors and constructors generated by Lombok 1.18.42 @Data, @Getter, @Setter, @Value, @NoArgsConstructor, @RequiredArgsConstructor.Package org.projectlombok:lombok =1.18.42.
bifrost.rust.getset1.0.0rust / cargo2generator rulespartialnoGetters generated by getset 0.1.7 #[get = "pub"].Package getset =0.1.7.
bifrost.jdk21.result-use-obligations1.0.0java / jdk5summariescompletenoString.trim() as a pure value; Files.deleteIfExists(Path) as a status result.Toolchain jdk >=21.0.0, <22.0.0, target jvm.
bifrost.node-runtime-values-javascript0.1.0javascript / npm4runtime_values companionpartialyesprocess.env and process.argv keyed reads.The Node runtime row for 22.11.0.
bifrost.node-runtime-values-typescript0.1.0typescript / npm4runtime_values companionpartialyesThe same, for TypeScript.The Node runtime row for 22.11.0.
bifrost.node-child-process-javascript-declarations0.2.0javascript / npm2declarationspartialyesThe child_process module and execSync.JavaScript present.
bifrost.node-child-process-typescript-declarations0.2.0typescript / npm2declarationspartialyesThe same, for TypeScript.TypeScript present.
bifrost.node-child-process-javascript-summaries0.1.0javascript / npm4summariescompleteyeschild_process.execSync.JavaScript present.
bifrost.node-child-process-typescript-summaries0.1.0typescript / npm4summariescompleteyesThe same, for TypeScript.TypeScript present.
bifrost.node-buffer-javascript-declarations0.1.0javascript / npm2declarationspartialyesThe Buffer type and four members.JavaScript present.
bifrost.node-buffer-typescript-declarations0.1.0typescript / npm2declarationspartialyesThe same, for TypeScript.TypeScript present.
bifrost.python-process-inputs0.1.0python / pypi4runtime_values companionpartialnoos.environ and sys.argv keyed reads.The Python process-input row.
bifrost.python-os-command-declarations0.2.0python / pypi2declarationspartialnoThe os module and os.system/chmod/open/mkdir/makedirs.Python present.
bifrost.python-os-command-summaries0.1.0python / pypi4summariescompletenoos.system(command).Python present.
bifrost.python-security-sink-declarations0.1.0python / python2declarationspartialnosocket.socket.bind and three XML parser entry points.CPython 3.13.5.
bifrost.python-security-sink-summaries0.2.0python / python14summariescompletenoSocket bind, XML parser, and regex execution input flows.CPython 3.13.5.
bifrost.python-stdlib-api-declarations0.2.0python / python2declarationspartialnohmac.new, hashlib.md5/sha1/sha256, re execution APIs and Pattern.search, textwrap.shorten, pathlib.Path.chmod, and legacy ssl.wrap_socket.CPython >=3.10, <3.15; SSL shard >=3.10, <3.12.
bifrost.go.stdlib.os1.0.0go / go2summariescompletenoResult contracts for os.Open, os.Create, os.CreateTemp, os.OpenFile, os.Stat, os.Lstat, os.File.Stat, os.IsNotExist, os.Exit, and os/exec.ExitError.ExitCode.Go present.
bifrost.go.stdlib.os-declarations1.0.0go / go2declarationspartialnoDeclarations for the os summaries.Go present.
bifrost.go.stdlib.errors1.1.0go / go7summariescompletenoerrors.Is, errors.As, errors.New.Go present.
bifrost.go.stdlib.errors-declarations1.0.0go / go2declarationspartialnoDeclarations for errors.Go present.
bifrost.go.stdlib.log1.0.0go / go2summariespartialnoNo normal return for log.Fatal*, log.Panic*, and the log.Logger methods of the same names.Go present.
bifrost.go.stdlib.log-declarations1.0.0go / go2declarationspartialnoDeclarations for log.Go present.
bifrost.go.stdlib.net1.1.0go / go2summariescompletenoResult contracts for net.Dial, net.DialTimeout, net.Listen.Go present.
bifrost.go.stdlib.net-declarations1.1.0go / go2declarationspartialnonet, net.Conn, net.Listener, net.Addr.Go present.
bifrost.go.stdlib.net-url1.0.0go / go2summariescompletenoResult contracts for url.Parse and url.ParseRequestURI.Go present.
bifrost.go.stdlib.net-url-declarations1.0.0go / go2declarationspartialnonet/url and url.URL.Go present.
bifrost.go.stdlib.net-http1.2.0go / go2summariescompletenoHandler registration and serving: http.Handle, HandleFunc, Serve, ListenAndServe, NewServeMux, ServeMux.Handle, ServeMux.HandleFunc, and http.Get.Go present.
bifrost.go.stdlib.net-http-declarations1.2.0go / go2declarationspartialnonet/http, Handler, HandlerFunc, ServeMux.Go present.
bifrost.go.stdlib.bytes-declarations1.0.0go / go2declarationspartialnoThe bytes package and one member.Go present.
bifrost.go.stdlib.encoding-pem1.0.0go / go2summariescompletenoResult contract for pem.Decode.Go present.
bifrost.go.stdlib.encoding-pem-declarations1.0.0go / go2declarationspartialnoencoding/pem and pem.Block.Go present.
bifrost.go.stdlib.crypto-x5091.0.0go / go2summariescompletenoParameter preconditions for x509.IsEncryptedPEMBlock.Go present.
bifrost.go.stdlib.crypto-x509-declarations1.0.0go / go2declarationspartialnocrypto/x509 and one member.Go present.
bifrost.go.stdlib.path-filepath1.0.0go / go2declarationspartialnoThe path/filepath module and the variadic Join(...string) string.Go present.
bifrost.go.stdlib.testing1.1.0go / go2declarations, summariespartialnotesting.T, testing.B, testing.F receivers, and no normal return for their FailNow, Fatal*, and Skip* methods.Go present.
bifrost.go.stdlib.sync-atomic1.0.0go / go2summariescompletenoConcurrency effects of the sync/atomic functions and typed atomics.Go present.
bifrost.go.stdlib.sync-atomic-declarations1.0.0go / go2declarationspartialnoDeclarations for sync/atomic.Go present.
bifrost.go.concurrency1.6.0go / go12summariescompletenoConcurrency effects for sync (mutexes, Once, WaitGroup, Cond, Map), context.Context.Done and cancellation, time timers and tickers, testing.T.Run, Parallel, Cleanup, and errgroup.Go present. The errgroup shard also requires module golang.org/x/sync >=0.1.0, <1.0.0 in ecosystem go.
bifrost.go.concurrency-declarations1.2.0go / go2declarationspartialnoDeclarations for the concurrency summaries.Go present. The errgroup shard has the same module requirement.
bifrost.go.testify.require1.0.0go / go-module2summariescompletenoNormal-return refinement for require.NoError.Module github.com/stretchr/testify =1.11.1.
bifrost.go.testify.require-declarations1.0.0go / go-module2declarationspartialnorequire and require.TestingT.The same module.
bifrost.go.testify.assert1.0.0go / go-module2summariescompletenoConditional result refinement for assert.NoError.The same module.
bifrost.go.testify.assert-declarations1.0.0go / go-module2declarationspartialnoassert and assert.TestingT.The same module.

“Present” means that the workspace contains files of that language, which mints the intrinsic language row. The source files for open packs and their release recipes are published in Bifrost-packs.

The bifrost-semantic-pack binary is in the brokk-bifrost-semantic-packs crate. Build it with the release-tooling feature:

Terminal window
cargo run -p brokk-bifrost-semantic-packs --features release-tooling \
--bin bifrost-semantic-pack -- validate model.yaml

--format human (default) or --format json may appear anywhere in the arguments. Source files must end in .json, .yaml, or .yml.

CommandArguments--format jsonPurpose
validateSOURCEyesParse, validate, and compile one source with the production compiler.
lintSOURCEyesvalidate, plus authoring warnings: duplicate IDs, unreachable or shadowed rules, ambiguous selectors, unused captures, broad wildcard selectors, and conflicting emissions.
csmi-checkFILEyesValidate a CSMI semantic document or pack manifest. A manifest (documentType: pack-manifest) also has its resources checked, relative to the manifest’s directory.
compileSOURCE OUTPUTyesWrite manifest.json and shards/ to OUTPUT. Identical existing files are accepted; different existing files are an error.
listCATALOG [ACTIVATION.json]yesOpen a catalog read-only and list installed packs. With an activation file, also resolve and list active packs and explanations.
workspace-checkWORKSPACEyesDiscover and lint the files in WORKSPACE/.bifrost/semantic-models/.
generateOUTPUT SPEC ARTIFACT [SPEC ARTIFACT ...]noBuild a release bundle from pinned specs and their artifacts.
mergeOUTPUT INPUT...noMerge release bundles into OUTPUT.
verifyOUTPUTnoVerify a release bundle.
installBUNDLE CATALOGnoInstall a release bundle into the catalog directory CATALOG.
summary-corpus-joinPINS CODEQL_MODELS JOERN_SOURCE REPORT.json [JVM_SOURCES]noTranslate two pinned third-party summary corpora, round-trip them through the pack format, join them, and write the report to REPORT.json.
sanitizer-packCANDIDATES_DIR OUTPUT_ROOTnoConvert sanitizer candidates into procedure-summary packs and an audit report.
framework-decl-packCANDIDATES_DIR OUTPUT_ROOTnoConvert framework declaration candidates into declaration packs and an audit report.
golden-summary-packCANDIDATES_DIR OUTPUT_ROOT REALMnoConvert one realm’s flow-through candidates into a procedure-summary pack. REALM is jdk, python, rust, javascript, or typescript.

The last nine commands are release tooling. They print human-readable text only, and --format json makes them fail with status 2.

Command012
validate, lintValid, with no diagnostics.Invalid, or lint reported a warning.Bad arguments or unreadable input.
csmi-checkValid.Invalid.Bad arguments or unreadable input.
compileWritten.The source is invalid; the validation report is printed.Bad arguments, unreadable input, or a write conflict.
listComplete inventory.Incomplete inventory, activation that did not produce a complete active set, bad activation file, or catalog error.
workspace-checkComplete and every file valid.A file is invalid.Discovery is incomplete (limits, links, unreadable entries) while every discovered file is valid.
summary-corpus-joinRound trip clean.Round trip not clean.Error.
Other release commandsSuccess.Error.

Any command fails with status 2 for an unknown command, a missing argument, or an unknown --format value. With --format json, a failure prints {"format": "bifrost_semantic_model_cli_error/v1", "code": "command.failed", "exit_status": N, "error": "..."} on standard output.

Commandformat valueFields
validatebifrost_semantic_model_validate/v1source_sha256, valid, pack_id, pack_version, manifest_content_sha256, manifest_semantic_sha256, diagnostics
lintbifrost_semantic_model_lint/v1The same fields as validate.
compilebifrost_semantic_model_write/v1manifest_path, manifest_content_sha256, shard_paths
listbifrost_semantic_model_inventory/v1complete, installed, active, activation_explanations
workspace-checkbifrost_semantic_model_workspace/v1directory, enabled, complete, files (path, source_sha256, source_format, valid, pack_id, manifest_semantic_sha256, diagnostics), diagnostics
csmi-checkbifrost_csmi_check/v2input_kind (pack or document), structural_valid, semantic_valid, integrity_valid (null for a document), interpretable, valid, profiles (identifier, version, schema, schema_recognized, structural_valid, semantically_supported), diagnostics

A diagnostic has severity (error or warning), code, path, and message. Fields with no value are omitted.

workspace-check reads direct children of .bifrost/semantic-models/ with the extension .json, .yaml, or .yml. It ignores other files without a diagnostic. It allows at most 1,024 directory entries (limit.workspace_files) and 64 MiB per file (limit.source_bytes). It rejects symbolic links, non-files, and paths that resolve outside the workspace.

The optional ACTIVATION.json argument of list:

FieldTypeRequiredMeaning
schema_versionintegeryesMust be 1.
bifrost_versionSemVer versionyesThe engine version to check against compatibility.bifrost in version 2 to 7 packs.
evidencelistyesEvidence rows: language, ecosystem, and optional package, module, toolchain ({name, version?}), target, configuration, artifact_sha256.
controlslistno[{scope, action, pack_id, version?, manifest_digest?}]. scope is user or workspace. action is enable or disable. version is a SemVer requirement.

generate reads one pinned spec per artifact. A spec is JSON with schema_version 1 or 2 and rejects unknown fields. Version 1 is the legacy pinned input schema. Version 2 adds optional per-shard activation pins for authored semantic models.

FieldMeaning
schema_versionMust be 1 or 2. Version 1 does not accept shard_activation_pins.
pack_id, pack_version, ecosystemThe pack identity.
kindThe producer family, tagged by artifact_kind (table below).
artifact{file_name, sha256, url?, container?}. container is {file_name, sha256, url, artifact_path} when the artifact is inside another archive.
compatibilityAs in the pack envelope. Generated packs use schema version 14, so every spec except authored_semantic_model must omit bifrost. generate rejects a generated spec that sets it.
activationRequired, bounded activation selectors. Generated shards use these selectors. Authored shards without per-shard pins must repeat this selector vector exactly. When pins are present, they state the authored shards’ exact selectors.
provenance, license, safetyAs in the pack envelope.
noticesNotice files to include.
measurement_activationOne activation selector used for measurement.
measurement_queriesLookups used to measure the result: type (name), member (owner, name), or procedure (language, owner, name, has_receiver, parameter_count).

Every version requirement in compatibility.toolchains and in activation selector coordinates must have an upper bound. generate rejects an open requirement such as >=21.0.0. This check applies only to pinned specs. It does not apply to authored packs checked with validate.

Version 2 authored specs may add kind.shard_activation_pins, a nonempty array of closed {shard_id, activation} entries. The IDs must be nonempty, unique, and cover the authored pack’s complete shard set exactly. Each entry must have at least one selector, and each shard’s selector vector must equal its pin exactly, including selector order, coordinates, targets, configurations, and artifact digest. Every version requirement in these selectors must also have an upper bound. A missing field keeps the legacy rule: every authored shard repeats the spec’s global activation vector exactly. A null or empty pin array is invalid; pins in a version 1 spec are rejected. The global activation remains required for version 2 specs. The exact pin comparison checks the authored input before compilation. The compiler then applies its existing canonical ordering of selectors, targets and configurations to the compiled output; this does not relax input matching.

artifact_kindExtra fieldsInput
jdk_source_ziplayout (module_prefixed or flat)A JDK src.zip.
kotlin_source_jarnoneA Kotlin source JAR.
scala_source_jarnoneA Scala source JAR.
java_source_jarnoneA Java source JAR.
java_class_jarnoneA Java class JAR.
type_script_declaration_filenoneOne .d.ts file.
type_script_library_setmanifest, libraries ([{name, path}])A set of TypeScript library files.
dot_net_assemblynoneA .NET assembly.
rustdoc_jsonnoneOne rustdoc JSON file.
rustdoc_json_setcrates ([{name, path}])Several rustdoc JSON files.
python_stubstubs (relative seed .pyi paths)A pinned stub tree; local imports determine the loaded closure.
authored_semantic_modelshard_activation_pins (optional in spec version 2; exact complete per-shard selector list)An authored pack source, compiled directly.
npm_packagemanifest, declarations ([{module, path}])An npm package manifest and its declaration files.
go_modulepackages ([{import_path, name, files}])A Go module source set.
ruby_gem_archivenoneA .gem archive.
composer_packagerules (tagged by rule: psr4 with namespace_prefix and files; classmap with files; files with files)A Composer package source set.
php_declaration_stubstubs (relative .php paths)A tree of PHP declaration stubs.

For python_stub, the artifact directory is an import root, such as a pinned typeshed stdlib tree. Generation follows AST imports, including module aliases, relative imports, package initializers and available imported child modules, until no new stubs remain. Seeds are order independent and duplicates are ignored. Resolution reads only this local tree; absent modules remain unresolved. The existing source-file, path-depth, byte and symlink bounds apply to the full closure. No Python code executes.

artifact.sha256 pins the canonical exact source set over the computed closure, including every relative path and its exact bytes. The compiled manifest’s source_inputs records that digest and the sorted loaded files, each with path, sha256 and bytes. A transitive input edit changes the input identity even if it leaves the declarations unchanged. This inventory records generation provenance; it does not claim that those files are available for navigation.

A release bundle has index.json (bundle index schema version 3), rejects.json, measurements.json, SHA256SUMS, and the pack assets. verify, install, and bifrost install-semantic-packs reject a bundle whose index names a different generator than the running build (brokk-bifrost-semantic-packs at the same version). Installation does not install a generated production whose cache version is not current for this build.

The main bifrost binary has two pack commands. They run before any analyzer starts. The full CLI is in the CLI reference.

Takes no arguments. Prints one JSON object that describes the pack formats this build supports. A host passes it to pack selection tools.

FieldMeaning
engine_versionThe bifrost package version.
build_identityThe exact source revision of this build.
model_set_sha256SHA-256 over the embedded pack registry: each pack’s source ID and manifest bytes, length-prefixed.
capability_contract_version1.
schemas.policy_documentSupported policy document versions.
schemas.rqlSupported RQL schema versions.
schemas.builtin_catalogSupported built-in policy catalog versions.
schemas.semantic_model_read[2, 3, 4, 5, 6, 7, 8, 9].
schemas.semantic_model_write[9].
schemas.release_index[3], the release bundle index version.
schemas.policy_bundle, schemas.semantic_spec, schemas.runtimeEmpty lists.
capabilitiesAlways an empty list. This build advertises no pack capability requirements.

Exit status is 0 on success and 1 when arguments are given.

Terminal window
bifrost install-semantic-packs BUNDLE_DIR CACHE_ROOT

Verifies an extracted release bundle and installs it into CACHE_ROOT/semantic-pack-catalog.v11. A relative CACHE_ROOT is resolved against the current directory. This is the catalog that BIFROST_SEMANTIC_PACK_CACHE_ROOT=CACHE_ROOT selects. On success it prints {"catalog_root": ..., "installed": [{"pack_id", "pack_version", "manifest_digest"}]} and exits 0. It exits 1 on a usage error, a catalog or bundle error, or when the bundle installs no compatible pack.

bifrost-semantic-pack install differs: it installs into the CATALOG directory exactly as given, without adding the versioned subdirectory.

These variables change pack behavior. The environment reference lists every variable.

VariableEffect
BIFROST_SEMANTIC_PACK_CACHE_ROOTRoot of the default catalog and of the shared generated-pack cache.
BIFROST_OPEN_SEMANTIC_PACK_BUNDLEAn extracted release bundle that replaces the embedded packs. Bifrost installs it when it opens a catalog for activation. An empty value, a malformed bundle, or a bundle with no compatible pack makes that activation fail. A policy report then carries pack-activation-failed and the run exits 2.
BIFROST_POLICY_PACK_ROOTAn extracted policy rules directory that replaces the embedded policy catalog. See the policy reference.
BIFROST_WORKSPACE_SEMANTIC_MODELSRead by every SearchToolsService session: the MCP server, one-shot --tool and --query-file runs, a policy run with --sources, and the Rust and Python libraries. on, 1, or enabled registers .bifrost/semantic-models/ when the session activates packs; off, 0, or disabled (the default) does not. Any other value is an error. A CLI policy run without --sources reads the directory whether or not this variable is set.
BIFROST_SEMANTIC_PACK_CATALOG, BIFROST_SEMANTIC_PACK_EVIDENCELegacy. Read by every SearchToolsService session. Set both or neither. The catalog is opened read-only. The evidence is a non-empty JSON array of rows with language, ecosystem, and optional package, module, toolchain ({name, version?}), target, configuration, and artifactSha256. This route supplies no enable controls, and it fails when .bifrost/packs.json exists.