cursus.step_catalog.builder_discovery

Builder class discovery via registry-interface synthesis.

Design B “Phase E”: file-based (package/workspace) builder discovery has been removed. Builders are SYNTHESIZED from the registry interface — for each registry step that has a .step.yaml interface and routes, a per-step TemplateStepBuilder subclass is fabricated at runtime. There is no longer any AST scan of builder_*.py files, no descriptors, and no per-workspace precedence.

class BuilderAutoDiscovery(package_root, workspace_dirs=None)[source]

Bases: object

Builder class discovery via registry-interface synthesis.

Builders are synthesized from the registry interface rather than discovered from files.

discover_builder_classes(project_id=None)[source]

Discover all builder classes by synthesizing them from the registry interface.

Parameters:

project_id (str | None) – Optional project ID (retained for signature compatibility; synthesis is registry-wide and has no per-workspace filtering)

Returns:

Dictionary mapping step names to builder class types

Return type:

Dict[str, Type]

load_builder_class(step_name)[source]

Load builder class for a specific step by synthesizing from the registry interface.

Parameters:

step_name (str) – Name of the step to load builder for

Returns:

Builder class type or None if not found

Return type:

Type | None

get_builder_info(step_name)[source]

Get information about a builder.

Parameters:

step_name (str) – Name of the step

Returns:

Dictionary with builder information or None if not found

Return type:

Dict[str, Any] | None

list_available_builders()[source]

List all available builder step names.

Returns:

List of step names that have (synthesizable) builders

Return type:

List[str]

get_discovery_stats()[source]

Get discovery statistics.

Returns:

Dictionary with discovery statistics

Return type:

Dict[str, Any]