# AIJoost Agent Operating Contract

## Purpose

AIJoost coordinates approved Architect, Codex, validation, and integration
work. Agents must treat workflow state and append-only events as authoritative;
ordinary dashboard tasks are not orchestration jobs.

## Boundaries

- Use only `sudo /usr/local/sbin/aijoost-ops check` and
  `sudo /usr/local/sbin/aijoost-ops deploy` for execution and deployment.
- Never add a shell/terminal API, copy credentials, invent tokens, bypass an
  owner gate, or access the production application.
- Preserve job idempotency, lease ownership, transition validation, retry
  limits, and append-only event history.
- Production must fail closed without authorized PostgreSQL configuration.
- Provider adapters must preserve external IDs and return structured results.
- Simulation must be clearly identified and may not silently impersonate a
  live provider.

## Change qualification

Every orchestration change requires state-transition, idempotency, lease,
retry, pause/gate, cancellation, and complete correction-loop coverage.

## Live worker

- Live processes must have UID 1005 and may target only the registered
  qualification workspace.
- Derive CLI arguments from installed `codex exec` help; never add bypass
  flags, extra writable directories, inherited secrets, or shell execution.
- Treat Codex completion, independent validation, and Architect review as
  separate evidence.
- Never edit a queue or qualification artifact between controller transitions.
- The daemon spool accepts only HMAC-authenticated schema envelopes created by
  trusted controller code; it is not an application command channel.
