bazi-chart
根据某人确切的出生日期、分钟与出生地,排出一份可复用的八字命盘,写出规范的 JSON 与纯数据的 Markdown,随后自动开始原局解读。适用于八字排盘、生辰八字、四柱,或非正式给出的单人出生信息。不适用于双人合婚、解读已有命盘、大运、流年或事件预测。
- 分组
- 命理
- 版本
- 0.8.4
- 许可证
- MIT
安装
/plugin install chinese-metaphysics@misoto22然后这样调用:
/chinese-metaphysics:bazi-chart这个技能把排盘和解读分开:它只产出数据,不下判断。输入是精确到分钟的出生时间和出生地,输出是一份规范化的 JSON 命盘(四柱、十神、藏干、五行分布)以及一份只有数据、没有结论的 Markdown。分钟精度是硬要求,因为时柱会因此改变;出生地则用于真太阳时校正。排完之后它自动把文件交给解读技能——命盘可以复用,同一份数据可以被反复解读而不必重算。
什么时候会触发
CI 实际用来评测这个技能的 prompt——所以它们不会和技能的真实行为脱节。
会触发
- 帮我排八字:林青,1990-03-14 07:42,上海出生。
- Make my Four Pillars chart. Name A, born 1988-11-02 at 21:05 in New York City.
- 按农历给陈明排盘:农历 2020-04-01 12:30,普通四月,不是闰月,成都。
- 我 1992-06-08 早上七点多在深圳出生,看看生辰八字。
不会触发
- 看看我和对象的八字合不合。
- 解读一下刚才生成的 bazi_A.json。
- 按八字预测我明年什么时候升职。
BaZi Chart
Calculate one static natal chart, write bazi_<name>.json and bazi_<name>.md, then hand the verified JSON to bazi-reading automatically. The artifacts contain calculation data only; never interpret the chart here.
Route before calculating
- If the user supplied two people and wants to know whether they match, route to
bazi-compatibility. - If the user supplied an existing chart and wants meaning, route to
bazi-readingwithout recalculating. - If they ask for Da Yun, annual luck, event dates, or forecasts, state that this first release is natal-only and do not improvise those calculations.
Require one resolved birth record
Collect these fields without guessing:
name: display identity for the artifact.birth_place: unambiguous city/region/country.birth_date: exactYYYY-MM-DDin the declared calendar.birth_time: exactHH:MMin 24-hour form. Refuse an hour-only or approximate time.calendar:gregorianorlunar. A lunar date also requires explicitleap_month: true|false.timezone: historical IANA zone such asAsia/Shanghai.latitudeandlongitude: decimal degrees for the birthplace.utc_offset_minutesonly when an authoritative historical source must override IANA data.fold: 0|1only to resolve a repeated DST wall time.genderis optional. Never infer it from a name, relationship, or pronoun.
Resolve a place through an available geocoder or map source. If multiple places match, stop for a location choice. Do not select the largest or most famous city silently. Preserve the user's stated place in birth_place and add the resolved coordinates and IANA zone to the request.
Calculation contract
The shared calculator applies these declared rules:
- Convert lunar input under GB/T 33661-2017 rules in Beijing civil time.
- Resolve the historical civil instant through IANA data or the explicit offset.
- Calculate equation of time and longitude correction separately, then derive true solar time.
- Change the year at the exact 315° Li Chun instant and the month at each exact 12-
jieboundary. - Use a 23:00 true-solar day boundary. For 23:00-23:59, also emit a 00:00-boundary alternate; never average the two.
- Derive fixed structural facts from
bazi-chart-rules-v1and numeric outputs frombazi-score-v1.
Five-element percentages and day-master strength are transparent heuristic-model outputs. They are not probabilities, measurements, or results endorsed by a calendar authority or ephemeris provider.
Run the calculator
Work from this skill directory. Put the resolved object in a UTF-8 JSON file and run:
python3 scripts/compute_chart.py --request REQUEST.json --out OUTPUT_DIRECTORY --language zh
Inline JSON is also accepted:
python3 scripts/compute_chart.py --json '{...}' --out OUTPUT_DIRECTORY --language en
The runtime requires pyswisseph. If it reports the dependency missing, surface that exact installation error; do not replace astronomical boundaries with approximate dates. An optional Swiss data directory may be supplied with --ephemeris-path.
The command prints exactly two absolute paths on success: canonical JSON first, data-only Markdown second. Exit code 2 means no valid pair was created. Never create or repair one artifact manually after a calculation failure.
Validate and hand off
Read the JSON back and verify:
- schema is
chinese-metaphysics.bazi-chart, version 1; - checksum matches canonical content;
- all four primary pillars, facts, scores, time corrections, and model ids exist;
- an alternate is complete when
alternate_day_boundaryis true; - Markdown names the same checksum and contains no interpretation.
After validation, automatically invoke bazi-reading with the exact JSON path. Do not wait for a second user request. Do not invoke it when calculation or validation failed. After the reading completes, report the chart JSON, chart Markdown, reader-report Markdown, and separate evidence-artifact Markdown paths.
Privacy and limits
Birth details are sensitive personal data. Write only to the user-selected output directory, do not send them elsewhere, and do not add unrelated identity details. This skill calculates static natal structure only: no Da Yun, annual or monthly luck, event timing, medical or psychological diagnosis, deterministic claims, or compatibility verdicts.
See references/request.example.json for the request shape and references/examples.md for boundary and failure examples.