Pipeline.Codebase.Context (pipeline v0.0.1)
View SourceCodebase discovery and context analysis system.
Automatically analyzes project structure and provides intelligent context to pipeline steps including project type detection, file structure analysis, dependency parsing, and git information integration.
Summary
Functions
Discover and analyze codebase context for a given workspace directory.
Find files related to a given file path using various heuristics.
Get a summary of the codebase for use in prompts.
Query files by various criteria.
Convert context to template variables for use in pipeline steps.
Types
@type file_info() :: %{ type: String.t(), size: non_neg_integer(), modified: DateTime.t(), language: String.t() | nil }
@type project_type() :: :elixir | :javascript | :python | :rust | :go | :unknown
@type t() :: %Pipeline.Codebase.Context{ dependencies: map(), files: %{required(String.t()) => file_info()}, git_info: git_info(), metadata: map(), project_type: project_type(), root_path: String.t(), structure: structure_info() }
Functions
Discover and analyze codebase context for a given workspace directory.
Examples
iex> context = Pipeline.Codebase.Context.discover("/path/to/project")
%Pipeline.Codebase.Context{
project_type: :elixir,
root_path: "/path/to/project",
...
}
Get a summary of the codebase for use in prompts.
Query files by various criteria.
Convert context to template variables for use in pipeline steps.
Examples
iex> context |> Pipeline.Codebase.Context.to_template_vars()
%{
"codebase.project_type" => "elixir",
"codebase.structure.main_files" => ["lib/my_app.ex"],
...
}