Class: OllamaAgent::Topology::Linker

Inherits:
Object
  • Object
show all
Defined in:
lib/ollama_agent/topology/linker.rb,
lib/ollama_agent/topology/linker/link.rb,
lib/ollama_agent/topology/linker/extract.rb,
lib/ollama_agent/topology/linker/resolve.rb,
lib/ollama_agent/topology/linker/validate.rb,
lib/ollama_agent/topology/linker/aggregate.rb,
lib/ollama_agent/topology/linker/discovery.rb

Overview

Orchestrates discovery → extract → stage → aggregate → resolve → link → validate → promote.

Defined Under Namespace

Classes: Aggregate, Discovery, Extract, Link, LinkConflictError, Resolve, Validate

Instance Method Summary collapse

Constructor Details

#initialize(workspace_root:, staged_graph:, extractor: nil, inflector: OllamaAgent::Topology::ZeitwerkInflector) ⇒ Linker

Returns a new instance of Linker.



11
12
13
14
15
16
# File 'lib/ollama_agent/topology/linker.rb', line 11

def initialize(workspace_root:, staged_graph:, extractor: nil, inflector: OllamaAgent::Topology::ZeitwerkInflector)
  @workspace_root = File.expand_path(workspace_root.to_s)
  @staged_graph = staged_graph
  @extractor = extractor || Extractors::RubySemanticExtractor.new
  @inflector = inflector
end

Instance Method Details

#run(roots:) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/ollama_agent/topology/linker.rb', line 18

def run(roots:)
  extracted = extract_from_roots(roots)
  stage_extract_results(extracted)
  analysis = analyze_graph(extracted)
  apply_promotions(extracted, analysis[:validation])
  build_result(extracted, analysis)
end