Carrier
Part Five · Delivery and Governance
Chapter 191 min read

Carrier Development Lifecycle

Carrier is not only a language for describing services. It is also a delivery workflow. The toolchain helps teams format source, check correctness, build runtime output, generate API descriptions, and produce schema migrations. For enterprise architects, this matters because delivery discipline is architecture in motion.

The Core Commands

Each command serves a different governance purpose:

excerpt
carrier fmt
carrier check
carrier build --target node
carrier openapi > openapi.json
carrier migrate generate

carrier fmt

Formatting is the lowest-friction consistency mechanism. It removes arguments about layout from code review and makes source easier to scan across teams and services. In enterprise settings, consistent formatting has practical value — architects and reviewers may need to inspect many services quickly.

carrier check

carrier check verifies that Carrier source is coherent before a full runtime build. It should be run after meaningful changes, especially changes to models, types, actions, routes, policies, imports, or healthcare questionnaires. *A failing check should be fixed in Carrier source under src/, not in generated output under .carrier/.*

carrier build --target node

During normal development, the Node target should be used because it is fast. Enterprise teams should make target choice explicit in local workflows and CI. Before handoff, carrier build --target node is the standard end-to-end compile check for the service.

carrier openapi

OpenAPI generation produces the service's API contract. It matters whenever route or contract shape changes. The generated file can feed documentation, API catalogs, compatibility checks, client generation, and security review. In an enterprise environment, it is evidence of the service boundary.

carrier migrate generate

Migration generation connects model and schema-related source changes to database evolution. Generated migrations should be reviewed before production use. The tool can help produce the migration, but humans still need to evaluate operational risk: table locks, data volume, required fields, indexes, backfills, rollback behavior, and deployment ordering.

Contents