Yi Jing divination skill - uses coin toss simulation to generate hexagrams, provides interpretation and AI analysis.
Use when user needs divination:
Method 1: User input directly Ask: "What would you like to ask about?"
Method 2: Provide templates If user unsure, offer common questions:
Call performDivination(question) from src/divination.js:
Call formatOutput(divinationResult):
Call generateAIPrompt(question, divinationResult), then use LLM for interpretation.
Requirements:
8 trigrams:
64 hexagrams:
| Function | Description |
|---|---|
| yaoGua() | Simulate coin toss, return old/young yin/yang |
| yaoLiuCi() | Toss 6 times for complete hexagram |
| calcGua(yaos) | Calculate trigram numbers from yao |
| getGuaName(yaos) | Get hexagram name and symbol |
| getZhuAndBianGua(yaos) | Get main and changing hexagram |
| getGuaData(guaInfo) | Get detailed hexagram data |
| performDivination(question) | Execute full divination |
| formatOutput(divinationResult) | Format output |
| generateAIPrompt(question, result) | Generate AI prompt |
═══════════════════════════════════════ YI JING DIVINATION ═══════════════════════════════════════
【Question】 "My career development?"
【Tossing Process】
Read, search, and create notes in the Obsidian vault.