You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CLAUDE.md file calls this out specifically: "The cognitive_synergy/__init__.py uses explicit imports — when adding new public symbols, you must add corresponding import lines there." Most other modules I've poked at (consciousness, knowledge_graph, safety) seem to either re-export from a curated __all__ or rely on the package being installed and submodules being imported lazily.
A couple of things I'm curious about:
Was this a deliberate decision (e.g., to avoid circular imports between synergy_metrics, cognitive_engine etc.), or is it a vestige of an earlier layout?
If deliberate — would it be worth adding a short comment at the top of cognitive_synergy/__init__.py so future contributors don't "fix" it by switching to wildcard re-exports and then break tests?
Is there a documented rule of thumb for which modules should use explicit imports vs which shouldn't? It looks like the boundary right now is "modules that have heavy submodule interdependence" but I'm guessing.
Mostly asking because I almost added a re-export the wrong way and got bitten before re-reading CLAUDE.md.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The CLAUDE.md file calls this out specifically: "The
cognitive_synergy/__init__.pyuses explicit imports — when adding new public symbols, you must add corresponding import lines there." Most other modules I've poked at (consciousness,knowledge_graph,safety) seem to either re-export from a curated__all__or rely on the package being installed and submodules being imported lazily.A couple of things I'm curious about:
synergy_metrics,cognitive_engineetc.), or is it a vestige of an earlier layout?cognitive_synergy/__init__.pyso future contributors don't "fix" it by switching to wildcard re-exports and then break tests?Mostly asking because I almost added a re-export the wrong way and got bitten before re-reading CLAUDE.md.
Beta Was this translation helpful? Give feedback.
All reactions