Python Package Ownership

July 30, 2026 ยท View on GitHub

Base keeps Python code in focused packages under cli/python/ and shared runtime helpers under lib/python/. The reusable base_cli framework is maintained in the standalone base-cli repository; Base owns only its provider selection and command integration. Package boundaries should follow product responsibility, not file size.

Current Boundaries

PackagePrimary responsibilityNotes
base_setupSetup reconciliation, manifest parsing, project diagnostics, project routing, and compatibility facades for older imports.Keep setup/check/doctor behavior here. Do not add adapter-specific schema generation here when a focused package can own it.
base_devcontainerDev Containers export from Base manifests.Owns generated devcontainer.json shape, unsupported/ambiguous field reporting, guarded writes, and text/JSON export rendering through base_devcontainer.export.
base_devenvNix/devenv compatibility reporting from Base manifests.Owns supported/unsupported/lossy/project-owned classification, summary counts, and text/JSON report rendering through base_devenv.report.

Extraction Rules

  • Preserve public basectl command behavior while moving implementation ownership.
  • Keep compatibility facades in base_setup when existing internal callers may still import historical module names.
  • Keep shared manifest models and loaders in base_setup until there is a broader manifest package boundary.
  • Add structure tests when a package becomes the primary owner for a surface.