# twin.kotoba.cloud - enterprise digital twin: agent quickstart

The twin reproduces an enterprise environment (legal entities, subsidiaries,
jurisdictions, network, data stores) as an ontology. First twin subject: the
kotoba.cloud control plane itself, real data, every instance cited.

## Files (this host, no auth)

- /twin-data/enterprise/ontology.jsonld - owl:Ontology v0.1 (classes, relations)
- /twin-data/enterprise/enterprise.json - the instances + edges, JSON-LD-ish
- /twin-data/enterprise/tx.edn - the same model as transactable EDN datoms
  (:ontology/type + :twin/* attrs); loadable into the kotobase graph plane
  with one datomic.transact (tenant credential with write scope - the
  /v1/graph/query lane is READ-ONLY and refuses it by design)

## Query paths

1. IN this host: fetch the JSON, reason over it directly.
2. IN the graph lane (after the twin is transacted into your tenant):
   POST https://api.kotoba.cloud/v1/graph/query {lang: cypher|sparql|gremlin|datalog|sql, query, limit}.
   Read-only. Auth: the tenant's short-lived Biscuit (POST /v1/database/session/token)
   or a tenant service-account token. A kotoba PAT is refused by name.
   Example cypher: MATCH (e:legal-entity)-[:binds_to]->(w:worker) RETURN e,w.
   Gremlin binds labels via :ontology/type.
3. Sim discipline: the twin is an ONTOLOGY simulation (what exists, how it
   connects, where it is). It is not a physics simulator.

## Regeneration

tx.edn + agent.md are generated deterministically from enterprise.json by
scripts/twin-txs.py in cloud-kotoba/app-kotoba-cloud (bot: twin-ops).
