Skip to content

Repository Contracts

A repository contract tells MAC how to bootstrap, test, and validate work in a project. It records supported platforms, required commands, the canonical remote, and the evidence expected from an executor. The contract belongs in .mac/project.yaml.

The MAC checkout contains its own production contract. Registering it in a disposable authority demonstrates the binding between project and hub-visible checkout.

mac --db "$DOCS_DB" admin init
test -f "$DOCS_ROOT/.mac/project.yaml"
mac --db "$DOCS_DB" project create mac --active
mac --db "$DOCS_DB" admin bridge repository register mac "$DOCS_ROOT" \
  --project mac --source docs-book
mac --db "$DOCS_DB" admin bridge repository repos

For a new Git-backed project, run mac project register from its checkout or use mac project register GIT_URL[#BRANCH] for remote-first onboarding. Its contract-authoring task should inspect the real build rather than guessing from filenames. Register the checkout only after the contract exists.

Code executors must run the repository's mandatory tests before pushing. A missing test command is a review condition, not permission to skip verification.