class ArchSpec::Facts::Builder

Framework-neutral facts, established by source semantics or by reflection. Locations retain the original evidence, even when it lives in a different file from the owner.

Owners, sources, and targets can be graph ConstantNodes, constant names, or the runtime classes and modules themselves. Locations can be SourceLocations, [path, line] pairs such as Module#const_source_location returns, backtrace locations a macro recorded with caller_locations, or anything with a source_location:

facts.reference(source: Invoice, target: Customer, location: ["app/models/invoice.rb", 3])
facts.methods(owner: "Invoice", names: %w[customer customer=], location: declaration_site)

Use apply for an in-memory semantic pass, or to_document and Facts.write for an explicit external producer. Both routes use the same validation and application code. Building facts never mutates the graph.