"""Project bootstrap and repository-boundary contract.

Platform generation/deployment architecture — not a generated-app capability.
Legacy boilerplate remains compatibility-only; new generated projects assemble
from runtime substrate + archetype Starter + Feature Packs + App Blocks.
"""

from __future__ import annotations

BOOTSTRAP_MODE_STARTER_ASSEMBLY = "starter_assembly"
BOOTSTRAP_MODE_LEGACY_BOILERPLATE = "legacy_boilerplate"

# New P2HS-created apps use starter assembly. Imported/connected repos adopt
# and patch; they must not be overwritten with a canonical Starter tree.
NEW_PROJECT_BOOTSTRAP_MODE = BOOTSTRAP_MODE_STARTER_ASSEMBLY
CONNECTED_REPO_MODE = "adopt_and_patch"

FRONTEND_BFF_REFERENCE = "relative_same_origin"
BFF_ROUTE_OWNED_BY = "w4p_runtime"
BFF_PATH_PREFIX = "/api"

CLASS_A_PUBLISHABLE = "A"
CLASS_B_RUNTIME = "B"
CLASS_C_CONTROL = "C"
CLASS_D_SECRET = "D"

REPO_CONTRACT = (
    "P2HS may write application source into a connected repository. "
    "P2HS control-plane state, generation instructions, private service "
    "topology, credentials, and AI configuration are not repository artifacts."
)

# Framework substrate is the minimum toolchain to run a Starter. It is not a
# generic product. New projects assemble substrate + Starter + packs + blocks.
FRAMEWORK_SUBSTRATE_ROLE = "minimum_runtime_skeleton"
PRODUCT_BOILERPLATE_ROLE = "legacy_generic_product"
FRAMEWORK_SUBSTRATE_IS_NOT_PRODUCT_BOILERPLATE = True
INITIAL_APPLICATION_TREE = (
    "runtime_substrate+starter+feature_packs+app_blocks+codegen"
)
GIT_STAGING_MODE = "allowlist_then_sanitize"
CLIENT_BUNDLE_LEAK_SCAN = True
