# Contract checklist

Use this after the authoring brief is agreed and before every readiness handoff.

## Durable authoring state

- `chasing-mastery.authoring.json` validates as schema version 3.
- The brief describes one Experience Suite promise and journey, a declared
  featured Practice Mode, and an exact complete display order.
- Every Practice Mode describes one unambiguous Attempt boundary, input source,
  metrics, primary result, progression decision, correction policy,
  presentation, and acceptance cases.
- Every coordination and narration contribution is declared in the brief with
  its owning activity, participant/fact policy, presets or roles, behavior, and
  acceptance scenarios. Empty arrays explicitly mean the Suite has neither.
- The brief contains no transcript, secrets, provider IDs, or absolute paths.
- `chasing-mastery.package.json` maps every declared Practice Mode and release
  artifact exactly once, in the Suite's declared order; undeclared activities
  are not allowed.
- Every activity contribution has one stable default-preset ID, matching
  configuration version, concise instructions, and complete configuration.
  Its keys and values exactly match the activity form defaults, and the real
  engine's `describe` operation accepts it deterministically.
- Every activity declares a stable result-contract ID and positive revision.
  Its identity describes comparable scoring and Measurement semantics, not
  presentation or artifact bytes.

## Public boundary

- Authored source imports only `@chasingmastery/sdk` and exact Domain Kits
  declared in the workspace.
- Every Domain Kit is an exact ordinary dependency, passes local integrity and
  purity checks, and names only JavaScript artifacts whose bundle actually
  contains it. The packed manifest records the same provenance.
- The package owns every mode's rules, scoring, progression, UI, overlay, and
  semantic Story Events. Modes may share pure code but never share runtime
  Attempt state.
- The contribution's display name and default preset define the ordinary
  member experience. Do not require members to rename a mode or choose
  ranking-affecting configuration after adding the Suite.
- The host retains identity, authorization, trusted time, persistence, package
  pins, Station/OBS access, networking, and retry authority.
- Portable UI communicates only through the public host bridge and requests no
  network or native capabilities.

## Attempt behavior

- Initialization is deterministic and replayable.
- Every accepted command or observation has a clear revision and idempotency
  outcome.
- Interactive Workbench commands execute the real reducer; invalid actions and
  stale revisions fail without advancing the live preview.
- If manual commands and connector observations represent the same action,
  tests prove equivalent final state, measurements, completion, and Story
  Events for both routes.
- Every declared observation protocol used by the package has a package-owned
  self-contained JSON Schema and has been exercised with Workbench's
  automatic-input simulator or an equivalent reducer test, including an
  invalid-payload case.
- Completion emits measurements and exactly one `attempt.complete` effect.
- Abort is available only when product intent allows it.
- Corrections preserve history and use declared retraction/superseding behavior.
- The manifest's correction support and terminal policy exactly match the
  authoring brief.
- A completed Attempt never requires an enclosing session-ending action.

## Creator behavior

- Story Events are semantic and sparse enough to matter in editing.
- Event keys are stable and significance/window values are intentional.
- The overlay renders only verified host-provided state mapped by the package
  into the strict bounded Activity Presentation contract.
- Activity Presentation contains explicit lifecycle, connection, goal, and
  primary-result semantics; any change, stakes, or next milestone is real
  domain state rather than invented shared-kit logic.
- Dynamic copy is assigned as text, unavailable and stale states are explicit,
  status does not depend on color alone, and reduced motion is honored.
- Compact and 16:9 Workbench previews are readable without horizontal or
  vertical clipping.
- The package never talks to OBS or media storage directly.
- Coordination directives are deterministic, retain atomic Attempt truth, and
  cover promised topology, participant, round/team, reconnect, and correction
  behavior through fixtures.
- Narration consumes only committed declared facts, preserves stable cue/cancel
  identity, handles expiry and correction, treats silence as intentional, and
  leaves synthesis/provider failure non-authoritative.

## Verification

- Every declared mode has scenarios covering its happy path and every material
  acceptance edge case.
- Every declared coordination and narration policy has at least as many
  deterministic fixtures as the brief promises, and Workbench reports no
  undeclared advanced contribution.
- `npm test` passes from a clean package workspace using its local toolchain.
- `npm run status` reports a valid brief and workspace as JSON.
- The real Workbench has been inspected at relevant desktop, phone, tablet,
  portrait, landscape, compact-overlay, and 16:9 broadcast sizes, including
  ready, live, terminal, disconnected, unavailable, and reduced-motion states
  when those surfaces exist.
- `npm run ready` creates an immutable canonical `.cmpkg` and a
  `ready_for_review` handoff whose submission state remains `not_submitted`.
- Removing the author workspace or Domain Kit cannot affect an already packed
  release; runtime and portable UI resolve only embedded artifact bytes.

## Existing-release evolution

- The previous immutable `.cmpkg` is retained and the candidate uses a later
  semantic version; an existing archive is never overwritten or republished.
- The package-local `evolution` command compares the exact previous and
  candidate archives, including deterministic differential execution of their
  shared fixtures.
- A compatible report preserves scoring, units, metric meaning, aggregation,
  package defaults, configuration semantics, progression rules, and canonical
  terminal results.
- A scoring, metric, default/configuration, or result-semantics change has a new
  result-contract revision. A threshold or progression-evidence change has a
  new progression definition version and an explicit historical lane.
- No blocked finding is suppressed or replaced by an author-authored
  compatibility claim.
