Docs Concepts

How a reading is represented.

Six digits describe a whole reading. This page explains the digits, how lines change, how to cast them, and the three things that make a result checkable: releases, citations and refusals.

PreviewThese pages show how the documentation will read. The dataset and the MCP server arrive with the first release. The two example readings are verified. {release} is a placeholder for a release ID, and the licence and sources values are illustrative until then.

Line values

A hexagram has six lines. Each is yang (solid) or yin (broken), and each is either stable or changing. Four digits cover the four cases.

DigitLinePrimaryResulting
6Old yin, changingYinYang
7Young yangYangYang
8Young yinYinYin
9Old yang, changingYangYin

Lines are always written bottom line first. In 977777 the 9 is the first line, at the bottom of the figure.

Changing lines

A reading is a primary hexagram, the lines that change, and the hexagram those changes produce. Four values across six lines give 4,096 readings, and the dataset contains every one.

Inside data, changing lists the changing positions, numbered 1 to 6 from the bottom line. When no line changes it is [], and resulting is null.

Response · 777777
{
  "release": "{release}",
  "licence": "CC BY 4.0",
  "sources": { "…": "one per field" },
  "data": {
    "lines": "777777",
    "primary": {
      "number": 1,
      "name": "乾",
      "pinyin": "Qián"
    },
    "changing": [],
    "resulting": null
  }
}

Casting

The dataset is static files, so it has no cast endpoint. To cast a reading yourself, draw six line values, bottom line first, then read the matching file. The two traditional methods give the four values with different probabilities.

DigitLineCoin methodYarrow method
6Old yin, changing1/81/16
7Young yang3/85/16
8Young yin3/87/16
9Old yang, changing1/83/16

Each line is drawn independently. Agents do not need the tables: the iching_cast tool on the MCP server casts the six lines for them.

Releases

Every path sits under an immutable release, /v1/releases/{release}/, so an answer can be found again for as long as its release is kept: twelve months. /v1/current.json names the current release. Pin the release you build against; corrections arrive as a new release. Each release has a manifest.json listing every file with its SHA-256, licences and citations.

Citations

Each file’s sources holds a citation for every field in data, and licence states the terms. Keep citations with the values when you store or display them; they are how your own users can check you.

Refusals

If a method is not released, or the sources do not settle a question, the engine returns a refusal with a reason. Treat a refusal as a valid result and show it as one. Do not retry it into an answer.

A refusal · illustrative
{
  "status": "refused",
  "method": "bazi",
  "reason": "method_not_released",
  "detail": "Not released. Nothing was computed."
}