← Files ClaraARCHIVED FILE
modules/business-planning/scripts/run_business_plan.py
1.68 KB · Oct 5, 2026 · 00:02 UTC
#!/usr/bin/env python3
"""Run the shared Business Planning workflow with Vera as visible owner."""
from __future__ import annotations
# Direct CLI calls must select dependencies before importing workflow modules.
if __name__ == "__main__":
import runpy as _runpy
from pathlib import Path as _Path
for _parent in _Path(__file__).resolve().parents:
_launcher = _parent / "scripts" / "self_relaunch.py"
if not _launcher.is_file():
_launcher = _parent / "clara" / "scripts" / "self_relaunch.py"
if _launcher.is_file():
_runpy.run_path(str(_launcher))["ensure_running_in_managed_venv"](__file__)
break
else:
# Standalone components retain their host's dependency setup.
if any(
(_p / "components.json").is_file()
for _p in _Path(__file__).resolve().parents
):
raise SystemExit(
"Managed Python launcher is missing; rebuild the plugin package."
)
import logging
import sys
from pathlib import Path
SCRIPTS_DIR = Path(__file__).resolve().parent
PLUGIN_ROOT = SCRIPTS_DIR.parent
for _vendor_root in (
PLUGIN_ROOT / "vendor" / "modules",
PLUGIN_ROOT.parent / "_shared" / "vendor" / "modules",
):
if (_vendor_root / "vera_assurance").is_dir():
sys.path.insert(0, str(_vendor_root))
break
from planning_cli import run # noqa: E402
__all__ = ["main"]
def main(argv: list[str] | None = None) -> int:
"""Keep Vera's Studio Archive boundary and shared authoritative compiler."""
return run("Vera", argv)
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO, format="%(message)s")
raise SystemExit(main())
SHA-256: ce43cb335e342c74b5fe578d2b52558ccc2fef85678cc6ffdf07008a87c5d9c9