L0 · Trust Layer

Every rule is on the table.
Including our mistakes.

Most BaZi tools compute in secret and present output as oracles. We do the opposite: every convention that shapes your chart is declared below, every boundary case is covered by a permanent test suite, and every bug we have ever found is published in a corrections log. If a chart can't be audited, it can't be trusted.

The engine one paragraph

Charts are computed by the open-source lunar-javascript astronomical calendar library (maintained by 6tail), wrapped in our own convention layer — BaZi Engine v0.15.1 — which handles true solar time, time zones, daylight saving, the midnight rule, ten-god attribution, and the luck-pillar layer. The same engine code powers this website and our backend test rig, verified by an automated regression suite of 35 boundary cases that compares every pillar, hidden stem, ten god, and NaYin between the two implementations, plus a 100-combination parity check over every day master × stem pair, plus a 4,939-assertion suite for the luck-pillar arithmetic, plus an independent differential checker that re-derives all 35 cases by a different algorithmic path (Julian-day day pillar, five-tiger month stem), plus a three-layer compatibility suite (whole-domain relation scans, library reconciliation, golden chart pairs). When the two ever disagree, the site build fails. The engine is open source — the complete source, all 35 fixtures and the differential checker are published at github.com/bazi-atlas/bazi-engine (MIT), so every verification described on this page can be re-run on your own machine rather than taken on trust.

These conventions exist because most online readings get them wrong; the eight common mistakes page shows a computed counterexample for each.

The declared conventions

1 · Year pillar switches at Lìchūn

The year changes at the exact Lìchūn (Start of Spring) instant — not at Lunar New Year. A Feb 3 vs Feb 4 birth can be different years.

2 · Month pillar switches at the term instant

Month pillars change at each Jié solar term — a single global astronomical moment. We compare your birth instant (in UTC) against the term table, never by calendar date.

3 · Late Zi rolls the day (mainstream default)

Births at or after 23:00 roll the day pillar to the next day (Zi Ping mainstream, sect=1). The midnight rule is offered as a school option and your chart is labeled with the rule used.

4 · True solar time, v1 (longitude term)

Clock time is corrected by (birth longitude − timezone central meridian) × 4 min. The central meridian is always the timezone offset × 15 (UTC+8 → 120°E). The Equation of Time (±16 min) is not yet applied — planned for v2, and we will announce it here when it ships.

4b · Year & month by absolute instant

Solar-term boundaries are global moments, so the year and month pillars are determined by your birth instant converted to UTC — essential for far-longitude births near a term boundary. Day & hour pillars still use local true solar time, because the day rolls at local Zi hour.

4c · Ten gods relative to the true day master

Ten-god labels for the year and month stems are always computed against your actual day master — even when the absolute-instant chart has technically crossed into the next day (common for Americas births).

5 · China DST 1986–1991 handled

If you were born in mainland China during the 1986–1991 daylight-saving seasons (the official start/end dates of each year, e.g. 1986: May 4 – Sep 14; 1987: Apr 12 – Sep 13; 1988: Apr 10 – Sep 11), one hour is subtracted automatically, the correction is flagged on your result, and a clock time in the 00:00–01:00 window correctly rolls the date back.

6–7 · Unknown hour & three element counts

An unknown birth hour yields an explicit three-pillar chart — we never guess. Five-element counts are shown in three conventions (stems + branch main-qi / hidden stems half-weight / full), because counting is itself a school difference.

8 · Luck-pillar direction

Yang-stem year with male, or yin-stem year with female, runs forward; the other two combinations run backward. The direction is read from the year stem as bounded by Lìchūn, i.e. the same year pillar your chart shows. All twenty combinations are tabulated on the luck pillars page.

9 · Luck-pillar starting age

Measure the distance from your birth instant to the governing Jié — the next one if you run forward, the previous one if you run backward — in absolute time, the same reference frame as convention 4b. Then convert at 3 days = 1 year, 1 day = 4 months, 1 two-hour block = 10 days. The changeover date is your recorded birth date and time plus that offset.

10 · Two granularities, both published

We return the starting age under two conventions and show the gap: block-quantised (the remainder is rounded up to a whole two-hour block — the mainstream app convention) and minute-precise (the same 3-day ratio applied without block quantising). They differ by up to 10 luck-days. We do not silently pick one for you.

11 · Which clock counts the blocks

The two-hour blocks are counted on your recorded local clock (DST normalised back) — how a printed almanac is read, and therefore the historical convention. Counting on true solar time is offered instead, and both results plus the difference are shown, because this choice is the second-largest source of disagreement between calculators.

12 · A divergence from our calendar library, declared

lunar-javascript's own luck-pillar routine treats a 23:00 birth as the Hài hour, while its own hour-pillar routine treats the same moment as Zǐ. That inconsistency under-counts one two-hour block for births landing exactly on 23:00–23:59, and it propagates into the starting age. We do not inherit it: our block counter places a boundary at 23:00 like every other odd hour. Every resulting difference is logged by the test suite rather than papered over.

13–18 · Compatibility relations (R13–R18)

The compatibility tool applies fixed classical tables between two charts: the five stem combinations and four stem clashes; the six branch harmonies (with their transform elements — the Wǔ-Wèi transform is disputed and flagged); the six clashes, six harms and the punishment groups (any two of Yín-Sì-Shēn or Chǒu-Xū-Wèi, Zǐ-Mǎo, plus the four self-punishing branches); and trines, where two branches across the two charts are shown as a contested half-trine, never silently counted as a full one. No priority resolves harmony against clash — Sì-Shēn is both a harmony and a punishment, and both tags are printed.

19 · No invented weights (R19)

Cross-chart interaction is a modern synastry usage — no classical text makes two charts interact. The engine therefore only enumerates relations and never produces a match percentage: any weight or score would be invented, and this site does not invent.

20 · Strength is a published tally (R20)

The favorable element tool scores day-master strength with visible weights: every visible stem 1 point, every branch its main qi 1 plus 0.5 per hidden stem (the same half-weight convention as the element counts), and the whole month pillar doubled. The day stem itself scores nothing — it is the subject being measured. Practitioners who also weigh roots, combinations and clashes by hand may reach a different verdict; the weights are published so you can disagree with us point by point.

21 · Strength thresholds are declared (R21)

Support (peers + resource) at ≥ 55% of the total score is strong, at ≤ 45% is weak, in between is balanced. Other schools draw the line elsewhere. The 55/45 values are this engine's declared choice, printed on the result, not a default to hide behind.

22 · Two schools, both computed (R22)

Support-and-suppress (扶抑) is computed for strong and weak verdicts — drain/spend/discipline elements for strong, feed/reinforce for weak — and withholds its answer for balanced charts rather than inventing a direction. Climate adjustment (调候) is computed independently. When the schools disagree, both readings print with a flag; this site does not break the tie.

23 · Climate rule admits its limits (R23)

The simplified climate rule answers only where a one-line rule exists: high summer takes Water, deep winter takes Fire. For spring and autumn the classical school consults a per-day-stem, per-month table (Qiong Tong Bao Jian, 120 entries) that cannot be compressed into a season rule — so the tool returns no climate answer for those months instead of a fake complete one.

24 · Nayin is a copied table, not a derivation (R24)

The sixty-jiazi nayin (纳音) is a fixed table in which every two consecutive pillars share one value. It is copied from the tradition rather than derived, because no classical rule generates it — the engine stores thirty pairs and the test suite reconciles them against the calendar library over 120 consecutive days. The day-pillar pages print it as a citable property of a pillar, never as a reading.

25 · A day pillar is a structure, not a personality (R25)

Each of the sixty day-pillar pages publishes only structural facts: the hidden stems and their ten-god roles, the stage the day stem occupies on its own branch, the nayin, and the five named seat relations between stem and branch (比和/得地/泄/盖头/截脚, this engine's naming). No page assigns a fixed character to a pillar — the popular "sixty personality types" framing is rejected on every one of them.

26 · Stem polarity comes from the index (R26)

A stem's yin/yang follows its index parity — 甲丙戊庚壬 yang, 乙丁己辛癸 yin. This is worth stating as a convention because it has already gone wrong once: the table was written as paired groups, which mislabelled five stems while every calculation stayed correct. The test suite therefore cross-checks the label against the English full-name table on all ten stems. See the corrections log.

27 · Branch attributes are derived, not typed in (R27)

Every attribute of the twelve earthly branches — yin/yang, element, animal, month, hour window, direction, hidden stems and all six relation types — is derived from the index or from a table already in the engine. Two consequences are asserted rather than assumed: branch polarity can be re-derived from the sixty jiazi, and the element of a directional meeting must equal the element of its season.

28 · The stage asymmetry is published (R28)

The twelve stages (十二长生) run forward for yang stems and backward for yin stems, so six of them hold six pillars each and six hold four — 60 in total, the whole cycle. Four stems can never reach Prosperity (帝旺): the branches that would seat 甲乙庚辛 there are 卯寅酉申, whose parity cannot pair with those stems, so the four combinations do not exist among the sixty. The gap is printed as a structural fact of the cycle rather than smoothed over.

29 · Ten gods: two steps and a stated bijection (R29)

Deriving a god takes exactly two steps — the element relation fixes the group, the polarity picks which member of the pair — and both steps are printed on every god page, so any row can be checked by hand. Because the ten stems land on the ten gods exactly once each, "this god on this pillar" resolves to one definite stem for each day master; that bijection is what makes these pages verifiable. Only the year, month and hour pillars are listed — the day pillar is the self palace and tangles with the definition, so it is deliberately left out.

30 · The zodiac switches at the lichun instant, not at new year (R30)

The zodiac and the year pillar are the same thing: both change over when the sun reaches 315° of ecliptic longitude — lichun — which is neither 1 January nor the lunar new year. Most zodiac sites use one of those two, and for a January or February birthday the answer differs by one animal. Because lichun is an astronomical instant and not a rule, the browser engine carries a verbatim 1900–2100 table, produced by generate-lichun.mjs and compared byte-for-byte against the Node engine, and every page prints the minute at which its year begins. Fan tai sui is read off five fixed tables — own year, clash, punishment, harm, break — and is published as a relation, never as a fortune: the 2027 page says so in its second sentence and sells nothing. Where the six-break table coincides with six-harmony, at 寅亥 and 巳申, the disagreement is printed rather than quietly resolved.

31 · The 64 hexagrams are 8 × 8 — and every value on them is derived (R31)

Three lines make a trigram; two trigrams make 64 hexagrams. That combinatorial fact is the whole spine of the hexagram family: King Wen's sequence and the binary (Fu Xi) numbering are both printed for every hexagram, the inner trigram is lines 1–3 and the outer is lines 4–6, and Jing Fang's eight palaces grow from the pure hexagrams by flipping one line at a time. Na jia pins each of the six lines to a stem-branch (Qian takes 甲 then 壬, Kun takes 乙 then 癸, the other six keep one stem; yang trigrams walk the branches forward, yin ones backward), and the six relations follow from each branch element against the palace element. Cuo, zong and hu are pure line arithmetic. What is deliberately not here: the six spirits, which are set by the day stem of the day you consult — the rule is published, the day is yours.

32 · Shen sha: every table is cross-checked against its own derivation (R32)

The 36 symbolic stars are the empirical label layer of BaZi. This site prints each star as a rule plus a lookup table and refuses to invent a second source: the Prosperity Star is exactly the Attiring-Post stage from the twelve-stage table, the blade is the Prosperity stage, the void pair follows from the day pillar’s ten-day xun, and the Ten Evils Great Defeat list falls out of the rule “salary stem in the xun’s void” — the derived ten pillars match the classical table, while the Yuan Hai Zi Ping variant (Yi Chou) fails the test, which is exactly why it is flagged as a school difference. Where schools disagree (Geng/Xin noblemen, yin-stem blades, Zou Ma as the Traveling Horse’s alias), both readings are printed. The shen sha index adds a scanner that reads a birth time and lists every hit with its anchor.

33 · The scenario layer is a composition convention, not new math (R33)

The 30 scenario pages (ten day stems × career, wealth, relationship) add no new engine code — that is the point of the convention. Every signal comes from an existing export: officer, wealth, resource and output branches from the main-qi ten-god verdict, Lu, blades, noblemen, the seal, the carriage and the fortune star from the R32 tables, the stem combine and clash from the published tables. Two structural facts fall out for free: Earth day masters take two wealth branches against four for everyone else (the wealth element is Earth, and Earth hides in four branches), and Wu/Ji have no heavenly clash. The spouse star is printed under both gender readings — wealth as the wife star (male reading), officer as the husband star (female reading) — with the divergence kept public. The pages publish landings and counts only; verdicts stay out, and whole-chart strength remains the favorable-element calculator's job. Entry: the scenario index scans a birth time into your three pages.

34 · The day-master profile is also a composition, with its cross-checks promoted to build assertions (R34)

The ten day-master pages recombine existing exports: the twelve-stage scan per branch (twelveStage), Lu, blades, noblemen and Wenchang from the R32 tables, main-qi ten gods, the stem combine and clash. Two of those cross-checks are promoted from documentation to build assertions: Lu must equal the Official-Post seat and the blade must equal the Prosperity seat for all ten stems, or the generator refuses to run. Two structural facts are computed live, never hardcoded: exactly four stems (Jia, Yi, Geng, Xin) can never sit on their own Prosperity branch in any of the sixty day pillars, because stem-branch parity blocks the combination; and the nobleman schools disagree on exactly Geng and Xin. Entry: the day-master index carries a ten-stem quick table and a scanner.

35 · The relation tables interlock by one derivation chain (R35)

The eight relation pages recombine existing constants, and the combine-clash-harm triangle is no longer three independent tables: the harm of a branch is the clash of its harmony partner, verified for all twelve branches as a build-time assertion, as are clash = +6 on the wheel, the trines sitting at equidistant seats 0, 4 and 8 with cardinal middles, the stem-combine elements forming a full permutation, and Earth taking no stem clash. The half-combination page derives its 12 two-branch picks on the spot and separates the 8 that hold the cardinal middle god from the 4 bow pairs — a school divergence printed openly. Punishment alone is a hand-verified truth table, because the calendar library carries none (its ZHI_XING constant is the twelve officers, a misleading name). Entry: the relation index with a twelve-branch quick table and a pairwise scanner.

36 · The kua number is a formula; its table is a structure (R36)

The Eight Mansions life gua joins the engine as R36. The kua number comes from the published century formulas under the lichun boundary — the same boundary as the year pillar — and both century pairs are asserted congruent to one unified mod-9 form for every year from 1900 to 2099 and both genders. The Da You Nian direction table is verified three ways: fully symmetric, each row a permutation of the eight stars, and the four favorable stars never leaving their own East/West group. The kua page shows the formula steps, the full 8 by 8 table and the school differences; it gives directions, not prescriptions. Entry: the kua number calculator.

37 · Today is just another query (R37)

The daily layer joins the engine as R37: any date and time returns the four pillars, the twelve-officer value of the day, the clash, the void branches and the nayin. The twelve officers derive from a single rule — start at the month branch, count to the day branch — and the rule is verified two ways: the full 144-combination table satisfies build-time structure assertions (seat 0 is the month branch itself, seat 6 clashes it), and the engine agrees with the calendar library day-officer field for 628 consecutive days. The day boundary at the zi hour and the month boundary at the term are stated school choices. Entry: the daily pillar page.

38 · Two colour systems, a 28-day mansion wheel, and a wedding picker that refuses to hide the gap (R38)

The wedding-date layer joins as R38. The ruling mansion of the 28 is derived, not looked up: one mansion per day in a 28-day wheel, index = (Julian day number + 11) mod 28, reconciled against the calendar library over 900 consecutive days with zero mismatches; the seven luminaries and the four beasts follow from the same index and are cross-checked character by character against an external per-mansion table. The twelve day spirits are a second colour system with its own mnemonic — Yin and Shen months start at Zi, Mao and You at Yin, Chen and Xu at Chen, Si and Hai at Wu, Zi and Wu at Shen, Chou and Wei at Xu — equivalent to (day branch + 4 - 2 × month branch) mod 12, also reconciled over 900 days. The two colour systems agree on only 72 of the 144 month-by-day combinations: exactly 50.0 percent, i.e. independent. The page computes both and flags the day. Five hard exclusions come first (month breaker, year breaker, clash with either partner’s natal day branch, clash with either birth-year branch, closing day); the rest is a weighted sum whose fifteen terms and their weights are printed on the page, so a reader can reject our weights and read the raw terms instead. The thirty-six mansion ratings agree with the library on 21 of 28, and the seven disagreements are exactly the seven we already mark as disputed. A full-year 2026 run over one sample couple excluded 166 of 365 days and scored 69 days at 70 or above; 28 of those 69 (40.6 percent) carry a marriage-favourable tag in the library, against a 34.2 percent baseline for the year — a mild tilt, published rather than smoothed over. The gap is published too: the four separations and four severances are not implemented, because they need all 24 solar-term instants and there is no astronomy library in the browser. Entry: the wedding date picker.

39 · Two ways to assign five elements to a character, agreeing on 15 of 72 (R39)

The name layer joins as R39: a 72-character table of common naming characters, each read by two published schools. The form school assigns the element from the radical through a printed radical-to-element map; the stroke school assigns it from the Kangxi stroke count (1-2 wood, 3-4 fire, 5-6 earth, 7-8 metal, 9-0 water by the final digit). The two schools agree on exactly 15 of the 72 characters — 20.8 percent, close to chance, published rather than smoothed over. Characters outside the table are reported as unknown, never guessed; simplified entries resolve to their traditional forms before entering the table. An element-relation function closes over all 25 pairs, and build-time assertions require every table conclusion to be re-derivable from its published rule — no second source of truth. Entry: the name analysis page.

School differences we surface never silently pick

Some questions have no single right answer — only schools. Where a convention choice changes your chart, we don't hide it behind a default:

Clock vs true solar time A 15:30 birth corrected to 14:29 crosses from Wei hour to Shen hour. We compute true solar time and show the applied correction; charts built on raw clock time may show the adjacent hour. 23:00 vs midnight Both day-pillar rules are available; yours is labeled. Element counting Three conventions, side by side. Block-quantised vs minute-precise start The mainstream convention rounds the leftover distance up to a whole two-hour block, which adds up to 10 days of luck; we publish both and the gap. Which clock counts the blocks Local recorded clock (almanac practice) or true solar time (consistent with our hour pillar) — both shown, difference quantified. Two branches of a trine A full trine needs three branches; whether two make a partial frame is a school difference — shown as contested, never scored. Harmony vs clash on one pair No priority resolves them (Snake–Monkey is both); every relation prints.

Balance school vs climate school The favorable element is the output of a school, not a fact; both schools are computed side by side and their disagreement is flagged, never adjudicated. Strong/weak thresholds The 55%/45% cutoffs are declared values — other schools cut elsewhere, and the exact support share is printed so you can apply your own.

Two colour systems The officer method and the twelve day spirits are two independent cycles (they agree on 72 of 144 month-by-day combinations, exactly 50.0 percent); the wedding page computes and prints both, and marks whether they agreed on the day you are reading.

Public corrections log the audit trail

Every defect found in this engine, how it was found, and what changed. This log starts on day one — including the bugs below — because a methodology page without corrections is a marketing page.

DateVersionDefect & fixHow it was found
2026-09-16v0.1 → v0.2True-solar baseline was hardcoded to 120°E (China's central meridian), breaking every overseas birth. Added explicit tzOffsetHours parameter (includes DST, e.g. London in July = UTC+1).Manual expert spot-check: 1991-03-23 11:00 New York — correct chart 辛未 辛卯 壬辰 丙午 (Xin Wei, Xin Mao, Ren Chen, Bing Wu).
2026-09-16v0.2 → v0.3Year/month pillars now determined by the absolute instant (UTC) against the solar-term table; v0.2 fed local time where Beijing time was expected, mis-dating far-longitude births near a term boundary.Manual expert spot-check: 1993-07-07 15:30 London. Xiǎoshǔ 1993 = Jul 7 10:32:02 Beijing (three independent sources agree); birth = 22:30 Beijing → after the term → month pillar Jǐ-Wèi (己未). A popular app showing Wù-Wǔ (戊午) switches months by date, not by instant.
2026-09-16v0.3 → v0.3.1Ten-god labels for year/month stems were computed against the absolute-instant chart's day master, which has changed by the time an Americas birth converts to Beijing time. Ten gods are now always relative to the true day master.Dual-engine regression suite (33 cases, pillar-by-pillar) built during the web port.
2026-09-16v0.3.1 → v0.3.2The longitude-rounding heuristic for the true-solar baseline (e.g. Chengdu 104°E → 105°) contradicted the engine's own ±2h documentation for Ürümqi. Baseline is now always UTC-offset × 15, matching the textbook definition.Dual-engine regression suite — the web port's first gate caught two convention-level defects before launch.
2026-09-20v0.8.0 → v0.9.0Added the year and zodiac layer (R30): the Chinese zodiac as a calendar object — which Gregorian years belong to each animal, the exact minute each of those years begins, the five fan-tai-sui relations, and the twelve month pillars of a year. 27 new pages per language (12 animal profiles, 12 animal-in-2027 pages, a zodiac calculator and two year-structure pages), plus the family hub in both languages. Two decisions carry the layer: the animal changes at the lichun instant, and the lichun table is generated, not typed — generate-lichun.mjs reads the solar-term table from the calendar library and the browser engine stores it verbatim. No existing calculation changed; the version bump is purely additive, and every prior fixture still passes.Ten new assertion blocks, both engines: the 201-entry lichun table byte-for-byte between implementations; the animal index re-derived from the sixty jiazi across 1900–2100; seven boundary golden values with probes one minute either side of the instant (and the instant itself counting as the new year); the conservation law of fan tai sui (exactly one own-year, one clash, one harm, one break per year) cross-checked against the branch table; the 2026 and 2027 offender lists; and the five-tiger month rule swept across 1900–2100 so every month pillar lands back inside the sixty jiazi.
2026-09-20v0.7.1 → v0.8.0Added three structural layers, all computed by the engine (R27/R28/R29): the twelve earthly branches (polarity, element, zodiac animal, month and solar term, the two-hour clock window, direction, season, hidden stems, and every relation it holds — harmony, clash, harm, punishment, trine, directional meeting); the twelve stages of growth (which of the ten stems sits in which stage, and in which of the sixty pillars that stage appears); and the ten gods by pillar position (for each of the ten day masters, which stem in the year, month or hour pillar produces a given god — with the reverse mapping printed on the page so any row can be checked by hand). Powers 54 new pages (12 branches + 12 stages + 30 god-positions), equally in both languages. No existing calculation changed — every prior fixture still passes; the version bump is purely additive. Convention R26, which the v0.7.1 entry cites, is now labelled in the engine source as well: it had been recorded only in this log, which made it untraceable from the code.Cross-table assertions: branch polarity is re-derived from the sixty jiazi; the element of each directional meeting must equal its season’s element; each trine must be exactly the yang stems’ growth, peak and tomb stages; and the ten-god-by-pillar mapping must round-trip back to the day master across all 30 combinations. 5 new assertion blocks, run on both engines.
2026-09-20v0.7.0 → v0.7.1Corrected the stem polarity table (R26). STEM_POLARITY had been written as paired groups — Yang, Yang, Yin, Yin, … — which mislabelled 乙 丙 己 庚 and 癸 (and 甲). No calculation changed: ten-god derivation has always read polarity from the stem's index parity, which is why every existing fixture still passes. But every place that printed the label was wrong, including the titles and descriptions of the sixty day-pillar pages. The table is now derived from the index, and the test suite cross-checks it against the English full-name table on all ten stems. This is exactly the class of error the corrections log exists for: a label that disagreed with the computation, not a computation that disagreed with tradition.Truth table: 10/10 stems asserted against both the English full-name table (甲 Yang … 癸 Yin) and index parity, on both engines — the assertion reproduces the original bug if the paired-group form is ever reintroduced.
2026-09-20v0.6.0 → v0.7.0Added the nayin (纳音) table and the day-pillar profile layer (R24/R25): sixty-jiazi nayin as a fixed pair table, hidden stems with their ten-god roles, the twelve stage of the stem seated on the branch, and the five stem-branch seat relations (比和/得地/泄/盖头/截脚). Powers the 60 day-pillar pages, which are generated from the engine rather than hand-written. Existing calculations are unchanged — all prior fixtures still pass. The site's stance on day pillars is declared on every page: structural facts only, no "one pillar = one personality" verdicts.Truth tables: 30 nayin pairs hard-coded as ground truth (independent of the engine's table), 6 golden pillars for seat/stage/hidden-god assertions, 60-pillar dual-engine field-by-field equality, and a 120-consecutive-day reconciliation against lunar-javascript's day nayin.
2026-09-17v0.5.0 → v0.6.0Added the favorable-element (喜用神) layer: day-master strength as a published weighted tally (visible stems 1, branch main qi 1, hidden stems 0.5, month pillar ×2, day stem excluded), declared strong/weak thresholds (0.55/0.45), the support-and-suppress school for strong and weak verdicts, and the simplified climate-adjustment rule (summer→Water, winter→Fire, other months get no answer). Computed birth charts, luck pillars and compatibility relations are unchanged — all prior fixtures still pass. No defect escaped to release in this layer; the three golden-chart gates (strong, weak, balanced-at-exactly-0.5) were locked before the web port, and the dual-engine field-by-field comparison covers 8 charts including an unknown-hour case and a 23:00 birth.Three layers: invariant scans over 168 charts (score sums re-add, verdicts re-derive from thresholds, favorable and unfavorable sets checked disjoint and complete, month-pillar doubling and day-stem exclusion re-verified entry by entry); golden full-tree values for six hand-checked charts covering every verdict path and both climate seasons; and dual-engine parity on all 8 inputs. The page's worked example (8 July 1988, Beijing) is one of the locked golden charts, so the arithmetic shown to users is the arithmetic under test.
2026-09-17v0.4.0 → v0.5.0Added the compatibility (合盘) layer: ten gods between the two day masters, all sixteen stem pairs and sixteen branch pairs checked against the classical combination, clash, harm, punishment and trine tables, the zodiac pair, and cross-chart trine frames. Computed birth charts and luck pillars are unchanged — all prior fixtures and the 4,939-assertion suite still pass. One defect was caught by our own truth-table gate before release: the transform-element lookup tables were keyed by the traditional pair spellings (子丑, 甲己) while the relation checker generates lookup keys in codepoint-sorted order (丑子, 己甲), which would have silently returned no transform element for the Zi-Chou harmony and the Jia-Ji combination. Both engines now key identically and a full 144-pair scan asserts every relation's presence and its element.Three layers: textbook enumeration with whole-domain scans (every one of the 144 branch pairs and 100 stem pairs classified, so over- and under-reporting both fail); reconciliation against lunar-javascript's HE_GAN_5 / HE_ZHI_6 / CHONG / SHENGXIAO tables (the library has no harm, punishment or trine tables — note its ZHI_XING is the twelve day-officers, not punishments, a referencing trap we document); and golden full-tree values for four hand-checked chart pairs. Both engines are additionally compared field-by-field across 8 chart pairs and all 244 stem/branch pair combinations.
2026-09-17v0.3.3 → v0.4.0Added the luck-pillar (大运) layer: direction rule, starting-age arithmetic under two published granularities, twelve-stage positions, and the full ten-decade sequence with exact changeover dates. Computed birth charts are unchanged in this release — the 33 boundary fixtures still pass byte-for-byte. Two defects were found and fixed inside the new layer while it was being built: (a) our first block counter treated 23:00 as the start of the Zi block rather than the boundary between Hài and Zǐ, which shifted the starting age by exactly one block for any interval crossing 23:00; (b) solar-term instants were being truncated to the minute, skewing the displayed distance by about 35 seconds. Both are covered by new assertions.Three independent gates, deliberately not the library's own answer: a mathematical bound (the block-quantised result may never differ from the exact linear ratio by more than half a block, i.e. 130 luck-days — the real maximum we measure is 9.83); an item-by-item reconciliation against lunar-javascript's getYun() across 48 charts, in which ten cases land in the 23:00 band and are recorded as declared divergences instead of being forced to agree; and hand-checkable truth tables for all twenty direction combinations and all twelve branches' hidden stems.
2026-09-17v0.3.2 → v0.3.3Ten-god derivation is now exposed as structured data (relation group, polarity, both variants) so the ten gods tool can show the rule behind every label instead of only the label. Also fixed a presentation defect: the day-pillar school was being printed on English pages as the internal Chinese string. Computed charts are unchanged in this release.Automated parity test: all 100 day-master × stem combinations compared field-by-field between the two engine implementations, plus 14 hand-verified known values that would catch both engines drifting identically.
2026-09-20v0.9.0 → v0.10.0Added the hexagram layer (R31): all 64 hexagrams as derived objects — King Wen and binary numbering, upper/lower trigrams, Jing Fang's eight palaces with shi/ying lines, the six na jia stem-branches with their six relations, and the cuo/zong/hu partners. 65 new pages per language (64 hexagram pages plus the /hexagrams hub with its 8×8 matrix and trigram lookup). The tables were produced by generate-hexagrams.py, which cross-checks eight independent sources (the Unicode U+4DC0 block, the 8×8 matrix, an explicit per-hexagram list and the sequence rhyme) before anything is copied into the engines. No existing calculation changed.R31 assertion block, both engines: Unicode code-point anchors for both blocks; the King Wen pairing rule verified for all 32 pairs; the eight palaces as an 8×8 bijection; na jia golden values for the eight pure hexagrams with the 12-branches-×-32 conservation law; the six relations substituted back into the classical formulas; and a field-by-field profile comparison of all 64 hexagrams.
2026-09-20v0.10.0 → v0.11.0Added the shen sha layer (R32): 36 symbolic stars as fixed tables cross-checked against external sources and against their own derivations — Lu = Attiring Post, blades = Prosperity stage, void = xun derivation, Ten Evils = salary-in-void. Each language adds 37 pages (36 star pages + the /shensha index with a 36-star scanner). School differences printed on-page: Geng/Xin nobleman rows, yin-stem blades, the Yi-Chou variant, the Zou-Ma alias. Declaration unchanged: tags stay tags — no verdicts.test-web-engine R32 section (double-engine byte equality + derivation cross-checks); generate-shensha.py 14 structural checks; visual-check [4f]/[5e] sampling and scanner golden value
2026-09-20v0.11.0 → v0.12.0Added the Eight Mansions life-gua layer (R36): the Da You Nian table as a fixed table verified against external sources and against its own structure — full symmetry, eight stars per row, favorable stars confined to same-group directions; the century formulas asserted congruent to the unified mod-9 form for all years 1900–2099; lichun year boundary shared with the year pillar. Each language adds 1 page (the kua calculator). Declared unchanged: nothing in R1–R35 was touched; all previously generated pages are byte-identical.test-web-engine R36 section (dual-engine byte equality + structure assertions + ten golden kua values + lichun boundary ±1 minute); golden values cross-checked against three independent published kua tables before implementation
2026-09-20v0.12.0 → v0.13.0Added the daily ganzhi layer (R37): the twelve day officers as a derived table — month-branch seat plus offset — verified against the calendar library for 628 consecutive days and against its own structure for all 144 month-day pairs (Jian equals the month branch, Po equals its clash); dailyProfile assembles the existing layers with no new source of truth. Each language adds 1 page (the daily pillar page). Declared unchanged: nothing in R1–R36 was touched; all previously generated pages are byte-identical.test-web-engine R37 section (dual-engine byte equality + 144-pair structure assertions + 628-day library cross-check + twelve golden profiles); the officer formula was probed against the calendar library for 628 days before any code was written
2026-09-20v0.13.0 → v0.15.1New R38 wedding-date layer: the 28-mansion wheel (Julian day + 11 mod 28) and the twelve day spirits ((day branch + 4 - 2 × month branch) mod 12) are derived rather than tabled, both reconciled against the calendar library over 900 consecutive days; five hard exclusions plus fifteen published weights replace any opaque auspicious-day verdict. Declared non-changes: the pillars, luck pillars, compatibility, favorable element and officer layers are untouched, and no prediction is added.Reconciliation against the calendar library (900 days, zero mismatches for both the mansion and the spirit), structural assertions (the two colour systems agree on exactly 72 of 144 combinations, i.e. 50.0 percent; mansion ratings differ from the library on exactly the seven disputed mansions 21/28), and dual-engine field-by-field equality on twelve sample dates plus a full month scan.
2026-09-20v0.15.1 → v0.15.1New R39 name five-element layer: a 72-character naming table read by two published schools — form (radical map) and stroke (Kangxi count bands) — agreeing on exactly 15 of 72 characters; unknown characters are reported as unknown, and an element-relation function closes over all 25 pairs. Declared non-changes: the pillars, luck pillars, compatibility, favorable element, officer and wedding layers are untouched, and no fortune prediction is added.Structural assertions (every form-school conclusion re-derivable from the radical map, every stroke-school conclusion from the Kangxi count; agreement exactly 15/72 = 20.8 percent), a closed 25-pair relation table, golden profiles (four probe-computed names), and dual-engine field-by-field equality on the table, the statistics and eight sample names.
2026-09-21v0.15.1 (same-version revision)Two DST fixes: (a) the window used a single May 4 – Sep 14 boundary for all of 1986–1991, but the official start dates of 1987–1991 fall in mid-April (1987: Apr 12; 1988: Apr 10), a 3–4 week error window per year — replaced by the official per-year start/end date table; (b) a recorded clock time in 00:00–01:00 during DST subtracts one hour across midnight, but the date was not rolled back — the same physical instant produced different charts depending on whether it was entered as clock time or standard time. Two boundary cases added (35 total); every fixture's expected is now stamped by an independent differential checker (Julian-day day pillar, five-tiger month stem, term-table month branch), not by hand. Also disclosed in this revision: the naming of the three punishments (Yin-Si-Shen / Chou-Xu-Wei) diverges within the classical literature itself; grouping unchanged, a divergence note added.Independent differential checker (re-derives every case by a different algorithmic path): its very first run caught the DST midnight-rollover defect — the same instant, entered as 1988-07-11 00:30 clock time vs standard time, yielded different day pillars.

How this page is verified

35-case boundary suite Permanent fixtures covering Lìchūn boundaries, term-day crossovers (before/after the instant, down to the minute), late-Zi under both schools, unknown hour, the 1986–91 China DST window (including clock times in the 00:00–01:00 roll-back zone, with official per-year start/end dates), extreme longitudes (Ürümqi −2h09m), cross-day overseas births, leap days, and full coverage of the ten day masters. Every case now carries a stamped expected filled by the independent differential checker, not by hand.

Favorable-element suite 6 golden charts locked field-by-field (strong, weak, balanced, balanced at exactly 0.50, a school-disagreement case, and an unknown-hour case), plus invariant scans over 168 charts: every score re-adds from its per-pillar breakdown, every verdict re-derives from the published thresholds, and the favorable/unfavorable sets are checked disjoint and complete. The worked example printed on the tool page is one of the locked charts.

Dual-engine regression The browser engine and the backend engine are one shared implementation, rerun against all fixtures on every change; any drift fails the build.

100-combination ten-gods parity Every day master × stem pair (10 × 10) is compared field-by-field across both engine implementations, on top of hand-verified reference values for a complete row — so the two implementations cannot drift apart, and cannot drift together.

4,939 luck-pillar assertions The starting-age arithmetic is verified without trusting any single source: a mathematical bound against the exact linear ratio, exact-multiple cases that must land on a known value, and a 48-chart reconciliation against the calendar library's own luck-pillar routine — with every disagreement in the 23:00 band recorded as a declared divergence and asserted to be exactly one block wide. Direction, the two-hour block map, and all twelve branches' hidden stems are checked against hand-built truth tables.

Site-consistency gate A script checks that every page carries the same engine version, the same navigation, a valid canonical URL, no dead internal links, and that the sitemap lists every page that should be public. It runs with the test suite, so a new page cannot ship half-wired.

Real-browser pass A headless Chrome run loads each page, submits a chart, and asserts the rendered output before taking screenshots — because a page that passes in a DOM stub can still be broken in a browser.

Human expert gate A domain expert spot-checks boundary charts against trusted references. Both defects caught by this gate are in the log above — which is exactly why the gate stays.

What this tool is not

BaZi is a traditional Chinese metaphysical framework for self-understanding and reflection — closer to a personality lens than a prediction machine. We make no claims about health, wealth, or the future, and nothing here is advice of any kind. Your birth data is used to compute your chart and nothing else.

Cast your chart → Derive your ten gods → Work out your luck pillars → Compare two charts → Score your favorable element →