Skip to content

Conversation

@jeff-hykin
Copy link
Member

No description provided.

@greptile-apps
Copy link

greptile-apps bot commented Jan 28, 2026

Greptile Overview

Greptile Summary

This PR performs a clean rename refactoring: ModuleBlueprintSetBlueprint, ModuleBlueprint_BlueprintAtom, and create_module_blueprint()Blueprint.create(). The changes are part of an RPC rework series and improve API clarity by making Blueprint the primary public interface while marking _BlueprintAtom as an internal implementation detail.

Key changes:

  • Renamed ModuleBlueprintSet class to Blueprint throughout the codebase
  • Renamed ModuleBlueprint to _BlueprintAtom (underscore prefix marks it as internal)
  • Moved _make_module_blueprint() logic into _BlueprintAtom.create() class method
  • Replaced create_module_blueprint() function with Blueprint.create() class method
  • Updated all type annotations, imports, docstrings, and documentation
  • Fixed tuple type hint: args: tuple[Any]args: tuple[Any, ...] to properly indicate variable-length tuple
  • All tests updated and passing with new names

Files requiring attention:

  • dimos/robot/test_all_blueprints_generation.py still references ModuleBlueprintSet in a comment (line 181) but was not included in this PR

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it's a straightforward rename refactoring with comprehensive test coverage
  • This is a clean, systematic rename refactoring across 11 files with no logical changes to functionality. All occurrences of the old names were consistently replaced with the new names in code, tests, and documentation. The change improves API clarity by making Blueprint the primary public class name and marking _BlueprintAtom as internal. Tests were updated and validate the refactoring. Only minor issue: one outdated comment in a file not included in the PR.
  • No files require special attention - one minor comment update needed in dimos/robot/test_all_blueprints_generation.py which wasn't included in this PR

Important Files Changed

Filename Overview
dimos/core/blueprints.py Renamed ModuleBlueprintSet to Blueprint, ModuleBlueprint to _BlueprintAtom, moved helper function logic into class methods
dimos/core/module.py Updated blueprint property to use Blueprint.create instead of create_module_blueprint
dimos/core/test_blueprints.py Updated imports and test assertions to use new Blueprint and _BlueprintAtom names
docs/concepts/blueprints.md Updated documentation and code examples from ModuleBlueprintSet to Blueprint, from create_module_blueprint to Blueprint.create

Sequence Diagram

sequenceDiagram
    participant User
    participant Module
    participant Blueprint
    participant _BlueprintAtom
    participant autoconnect

    Note over User,autoconnect: Before: ModuleBlueprintSet, ModuleBlueprint, create_module_blueprint
    Note over User,autoconnect: After: Blueprint, _BlueprintAtom, Blueprint.create

    User->>Module: Module.blueprint()
    Module->>Blueprint: Blueprint.create(Module, *args, **kwargs)
    Blueprint->>_BlueprintAtom: _BlueprintAtom.create(Module, args, kwargs)
    _BlueprintAtom->>_BlueprintAtom: Extract connections from In/Out annotations
    _BlueprintAtom-->>Blueprint: Return _BlueprintAtom instance
    Blueprint-->>Module: Return Blueprint(blueprints=(_BlueprintAtom,))
    Module-->>User: Return Blueprint instance

    User->>autoconnect: autoconnect(blueprint1, blueprint2, ...)
    autoconnect->>autoconnect: Merge all _BlueprintAtom instances
    autoconnect->>autoconnect: Combine transport_map, config_overrides, etc.
    autoconnect-->>User: Return combined Blueprint

    User->>Blueprint: .transports({...}) / .global_config(...) / .remappings(...)
    Blueprint-->>User: Return new Blueprint with updated configuration
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link

greptile-apps bot commented Jan 28, 2026

Additional Comments (1)

dimos/robot/test_all_blueprints_generation.py
comment references old name ModuleBlueprintSet

            # Check if it's a blueprint (Blueprint instance)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants