SKYHAVEN — ONBOARDING STARTER

Requirements: Python 3.10 or later. Standard library only; no packages or credentials.
Run commands from this extracted folder. The program uses only local files.

1. python3 -m unittest -v
2. python3 onboarding.py check cases/blocked.json
3. python3 onboarding.py run cases/approved.json --state my-state.json
4. Repeat step 3: the same customer and draft IDs must be returned.

Recovery test (use a separate state file):
5. python3 onboarding.py run cases/approved.json --state recovery.json --interrupt-after-customer
6. python3 onboarding.py run cases/approved.json --state recovery.json

The blocked case contains a legal-entity mismatch and pending approval.
The approved case is a separate prepared test fixture. It is not approval for any
real customer or communication. All IDs starting LOCAL- identify local objects.
The welcome message remains a draft. No messages, payments or API calls are made.

The checker uses deterministic rules. An agent can invoke it, explain its findings,
and coordinate the workflow. These tests validate the local rules and recovery;
they do not evaluate an LLM's extraction quality or certify a live integration.

cases/approved.json intentionally includes editable approval data so you can
inspect how the contract works. Production approval must come from a trusted,
authenticated service, be bound to the exact record and be revalidated at execution.

The local store is designed for sequential teaching runs. It is not a database,
distributed lock, secure approval system or production ERP adapter. Production
needs transactional state, reconciliation and source-system access controls.
Unexpected malformed inputs may raise a Python error; live adapters must validate
schemas and route such errors to the case owner.

Results from an actual local run are in results/. They are workflow-test outputs,
not customer deployment results. See the article for the mapping to real systems:
https://www.skyhavengroup.com/five-business-agents-worth-building/
