---
typeId: req
recordId: benac-author-002
fields:
  title: Package build semantics
  statement: >-
    Benac shall define package build semantics that convert an authoring workspace into
    a Package Bundle.

    Build semantics shall compute raw blob CIDs over exact artifact bytes, produce
    artifact references, validate schema documents, produce package interface
    declarations, produce invocation contract snapshots where derivable, compute
    invocation contract snapshot CIDs where derivable, produce the package document
    logical object, compute the package CID over the DRISL-encoded package document,
    include selected schemas, artifacts, fixtures, and documentation references, and
    emit a build report.

    Authoring-only metadata shall not be included in the package document used to
    compute the package CID unless the metadata is declared as package content.

    Build semantics shall avoid package-CID cycles.

    When fixture records bind to the final package CID, build shall first produce the
    package document logical object and package CID, then assemble fixture records that
    reference that package CID, then assemble the Package Bundle context, and then run
    validation over the resulting distribution context.

    The build report shall reflect validation of the actual distributable Package
    Bundle, including fixture discovery, fixture schema status, artifact availability,
    operation-phase requirements, invocation contract snapshot status where derivable,
    and any context-required checks that were not evaluated.

    Build reports shall not classify packages.

    Build reports shall not classify how package work is performed.
  rationale: >-
    Independent build tools must produce the same package CID, artifact CIDs, schema
    CIDs, and invocation contract snapshot CIDs from the same logical package.
  verification: >-
    Two independent build tools build the same authoring workspace and produce the same
    artifact CIDs, schema CIDs, package CID, validation result, invocation contract
    snapshot CIDs where derivable, and Package Bundle Manifest. Build verification
    includes a package whose fixtures reference the final package CID.
  testable: true
  status: draft
  area: BENAC-AUTHOR
  sourceDocument: user-requested schema-first requirements cleanup
  sourceVersion: 2026-05-06
  sourceSections:
    - Package authoring
  order: 87.1
---
