rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Kochere/dsh-yijing
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Cast the I Ching inside DeepSeek Harness — three coins, six lines, and the classical Zhouyi text. No vernacular, no network, no dependencies.
Quick start · Why this one · How it works · Text & sources · 中文

The cast card: three coins, six lines, 本卦 → 之卦.
A divination is not a generic tool call. The agent casts six coin lines, the chat shows a three-coin cast card that draws the hexagram from the bottom up, and then the agent reads the returned classical text — quote first, plain-language explanation after.
node:crypto randomness, no network calls, no telemetry, no runtime dependencies. The question stays in your session.Requirements: DeepSeek Harness (Desktop or dsh CLI) with a profile; Node 20+ (bundled with DSH).
git clone https://github.com/Kochere/dsh-yijing.git
dsh-yijing directory.Agents can install it as a bundle too: call plugin_manager install_bundle with the absolute package directory.
Just ask:
这个方案可行吗?
Is this plan viable?
The agent should confirm the concrete question if it is vague, then call yijing_cast with it verbatim. The card appears; the answer comes back as 古文 + 白话 — the exact classical passage, then what it means for the question.
| Tool | What it returns |
|---|---|
yijing_cast |
Six coin lines → 本卦、之卦、动爻 → the ruling 卦辞/爻辞 selected by the 变占 rule, plus 互卦/错卦/综卦. Classical text only. |
yijing_hexagram |
One hexagram by number, name, symbol or six-bit code: 卦辞、彖、大象、爻辞, with 小象 and 文言 at detail: "full". |
node bin/yijing.mjs cast "此次合作能否谈成?"
node bin/yijing.mjs cast --values 7,8,9,6,7,8 "replay a fixed cast"
node bin/yijing.mjs hexagram 31 --full
node bin/yijing.mjs cast "问事" --json
--values takes six values (6/7/8/9) from bottom to top and is for replay/testing, not for regular divination.
Three coins; 背 = 3, 字 = 2. Six independent tosses from bottom to top: 6 老阴, 7 少阳, 8 少阴, 9 老阳, with probabilities 1/8, 3/8, 3/8, 1/8. Old yin and old yang are moving lines.
The six lines give 本卦; flipping moving lines gives 之卦. The card and the tool both show 本卦 → 之卦.
Zhu Xi’s rule, by the number of moving lines:
| Moving lines | Ruling text |
|---|---|
| 0 | 本卦卦辞 |
| 1 | 本卦 moving-line 爻辞 |
| 2 | both 本卦 moving-line 爻辞; the upper one leads |
| 3 | 本卦 and 之卦 卦辞; 本卦 is 贞 |
| 4 | 之卦’s two static-line 爻辞; the lower one leads |
| 5 | 之卦’s static-line 爻辞 |
| 6 | 乾 用九 / 坤 用六; otherwise 之卦 卦辞 |
“彖辞” here means the text under the hexagram — the 卦辞 — not the 《彖传》. For three moving lines, Zhu Xi also distinguishes 前十卦主贞 / 后十卦主悔; the plugin follows the simpler 本卦为主 reading and says so in the result.
The plugin stops at the text. The model reads 卦象 (上下卦、爻位、时义、互错综), quotes the classical passage, and explains it in the user’s language. A divination is a reading of the situation, not a prediction of fact.
Full provenance and the correction list: docs/SOURCES.md. Rebuild:
node scripts/fetch-sources.mjs # downloads the three transcriptions
node scripts/build-data.mjs # writes lib/hexagrams.json, prints the audit
The vendored raw transcriptions are intentionally not committed; the build fetches them.
node:crypto on your machine.| Theme |
|---|
Light![]() |
Dark![]() |
Compact![]() |
The card comes from a yijing fence in the answer (the tool result supplies it), so it sits before the reading. It only appears for Turns that contain a yijing_cast; there is no second card at the end.
index.js Host plugin: yijing_cast / yijing_hexagram
client.js Client plugin: animated cast card
lib/hexagrams.json Generated Zhouyi text (64/384 + 文言)
lib/cast.js Coin method and hexagram derivation
lib/rules.js Zhu Xi’s change-divination rule
bin/yijing.mjs CLI
scripts/ data build, source fetch, preview generators
test/ 27 tests: data, casting, rules, UI
docs/ detail page, sources, artwork
ctx.locale)Issues and PRs are welcome. Run the suite before opening a PR:
node --test "test/*.test.mjs"
See CONTRIBUTING.md for data rebuilds, client previews and the PR checklist.
Code: MIT. The Zhouyi classical text is public domain; transcription provenance and attribution are in docs/SOURCES.md.
If this makes a divination legible to you, a ⭐ helps others find it.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。