Skip to content

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_VERSION to whatever para it 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_IMAGE became required for para image-build. image-build used to hardcode a Void base; it now refuses unless the Parafile names 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, so PARA_CONTRACT stayed at 1 rather than burning a version on a migration nobody had to perform.

Released under the MIT License.