{
  "schema": "aicl-tool/0.1",
  "service": "CTCL",
  "version": "0.1",
  "title": "Common Temporal Coordinate Layer",
  "summary": "Verified reference instant + heterogeneous time transformation for agents. Read this, then call the endpoints. Same instant, different representations.",
  "base_url": "https://www.commoninstant.org",
  "runtime_enabled": true,
  "core_rule": "Do not ask only 'what time is it'. Ask: which reference instant, under which timescale, from which source, transformed into which local system.",
  "honesty": "Source is a millisecond-grade edge wall clock. ns/us fields are format-padding; check quality.precision + estimated_uncertainty_ns before trusting sub-ms.",
  "tools": [
    {
      "name": "now",
      "method": "GET",
      "path": "/v1/now",
      "desc": "Verified reference instant: encodings, timescales, source, uncertainty, policy, a stable instant_id.",
      "input": {},
      "output": "instant+encodings+timescales+source+quality+policy"
    },
    {
      "name": "timescales",
      "method": "GET",
      "path": "/v1/timescales",
      "desc": "Supported timescales.",
      "input": {},
      "output": "list"
    },
    {
      "name": "encodings",
      "method": "GET",
      "path": "/v1/encodings",
      "desc": "Supported encodings.",
      "input": {},
      "output": "list"
    },
    {
      "name": "convert",
      "method": "POST",
      "path": "/v1/convert",
      "desc": "Convert a time value across encodings/timescales/timezones (precision-preserving).",
      "input": {
        "input": {
          "value": "string",
          "encoding": "unix_s|unix_ms|unix_us|unix_ns|rfc3339",
          "timescale": "utc|posix"
        },
        "output": {
          "encoding": "…",
          "timezone": "IANA (optional)"
        }
      },
      "output": "output.value + canonical_unix_ns + quality.lossless"
    },
    {
      "name": "transform",
      "method": "POST",
      "path": "/v1/transform",
      "desc": "Map a reference (parent) time into a custom linear-rate system (game world / accelerated sim / child clock).",
      "input": {
        "value": "string (parent time)",
        "value_encoding": "unix_s",
        "system": {
          "parent": "ctcl:system:unix",
          "epoch": {
            "parent_value": "unix_s"
          },
          "rate": {
            "value": "number"
          },
          "offset": "number",
          "calendar": {
            "day_seconds": "int",
            "year_days": "int"
          }
        }
      },
      "output": "system time + optional world calendar"
    }
  ],
  "memory_contract": "For long-term memory: store instant_id + timescale + encoding + source_quality (do not store only a bare number). Distinguish event / write / recall instants (§10.4, §23).",
  "not_a": [
    "universal clock authority",
    "timing/NTP replacement",
    "guaranteed ns-accurate global sync"
  ],
  "whitepaper": "CTCL_Agent_Time_API v0.1 (Neo.K / EveMissLab)"
}
