Contract versioning
The para↔project interface — the injected environment, the ~/.para layout, the hook names and semantics, and the Parafile keys — is versioned.
para provides a contract version (PARA_CONTRACT, currently 1) and injects it into hooks. If your Parafile declares PARA_VERSION and it doesn't match, para refuses with a clear error instead of silently misbehaving — so updating a global para shared across projects can't quietly break yours.
The rules:
- A breaking change to the interface bumps
PARA_CONTRACT. - Additive changes (a new variable, a new optional key) don't.
- A project sets
PARA_VERSIONto whateverparait builds against, and bumps it when it migrates its hooks.
Decisions
Seam changes that were made without a bump, and why — so the constant staying at 1 stays explicable:
PARA_BASE_IMAGEbecame required forpara image-build.image-buildused to hardcode a Void base; it now refuses unless theParafilenames a base image. Under the rules above that is breaking — an existing Parafile without the key stops building — but it landed pre-launch, at zero external consumers, soPARA_CONTRACTstayed at 1 rather than burning a version on a migration nobody had to perform.