91 lines
2.4 KiB
Markdown
91 lines
2.4 KiB
Markdown
# bazi_translation
|
|
|
|
Codex skill for BaZi translation and naming review. It keeps BaZi/Four Pillars terms consistent across Chinese source terms, English display labels, and code identifiers.
|
|
|
|
The skill is simplified-Chinese-first:
|
|
|
|
- `简体` is the concept key.
|
|
- `标准英文` is for UI/docs when an English label is needed.
|
|
- `代码名` is for identifiers, API fields, classes, schemas, and tests.
|
|
|
|
The source PDF is not included in this repository.
|
|
|
|
## Install
|
|
|
|
Clone the repository and copy it into Codex skills:
|
|
|
|
```bash
|
|
git clone git@git.aplexlogic.com:fireparty/bazi_translation.git
|
|
mkdir -p ~/.codex/skills
|
|
rsync -a --delete bazi_translation/ ~/.codex/skills/bazi-translation/
|
|
```
|
|
|
|
Validate the skill:
|
|
|
|
```bash
|
|
python ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py ~/.codex/skills/bazi-translation
|
|
```
|
|
|
|
## Use In Codex
|
|
|
|
Invoke the skill by name:
|
|
|
|
```text
|
|
Use $bazi-translation to review BaZi naming in src/bazi.
|
|
```
|
|
|
|
Typical requests:
|
|
|
|
```text
|
|
Use $bazi-translation to translate these terms into approved English and code names: 日主, 天干, 地支, 大运, 用神.
|
|
```
|
|
|
|
```text
|
|
Use $bazi-translation to review API field names in packages/bazi.
|
|
```
|
|
|
|
## Use The Checker
|
|
|
|
Run the local checker against files or directories:
|
|
|
|
```bash
|
|
python ~/.codex/skills/bazi-translation/scripts/check_bazi_names.py <path>
|
|
```
|
|
|
|
Exploratory review without failing the command:
|
|
|
|
```bash
|
|
python ~/.codex/skills/bazi-translation/scripts/check_bazi_names.py <path> --no-fail
|
|
```
|
|
|
|
List approved code names:
|
|
|
|
```bash
|
|
python ~/.codex/skills/bazi-translation/scripts/check_bazi_names.py --list-approved
|
|
```
|
|
|
|
Example output:
|
|
|
|
```text
|
|
src/chart.ts:42: dayOwner -> dayMaster
|
|
zh: 日主; standard_en: Day Master
|
|
line: const dayOwner = chart.dayOwner;
|
|
```
|
|
|
|
## Core Naming Rules
|
|
|
|
- Use `dayMaster`, not `dayOwner` or `dayLord`.
|
|
- Use `heavenlyStem`, not `skyStem`.
|
|
- Use `earthlyBranch`, not `groundBranch`.
|
|
- Use `luckPillar`, not `fortuneColumn`.
|
|
- Use `usefulGod`, not `useGod`.
|
|
- Use `favorableElement` in code by default; keep `Favourable Element` for book-style display text.
|
|
- Keep `Useful God` separate from `Favourable Element`.
|
|
## Files
|
|
|
|
- `SKILL.md`: Codex skill trigger and workflow.
|
|
- `references/terms.md`: simplified-Chinese-first dictionary.
|
|
- `references/naming-rules.md`: review rules and anti-patterns.
|
|
- `references/pending-terms.md`: staging area for terms needing domain review.
|
|
- `scripts/check_bazi_names.py`: source-code naming checker.
|