by stanGSA
事实可核验的多 Agent 命理咨询与 MCP Server|无 LangChain 手写 Harness,确定性排盘 + 逐项事实校验。Framework-free Python multi-agent harness & MCP server with deterministic verification (Bazi, Astrology, Tarot).
# Add to your Claude Code skills
git clone https://github.com/stanGSA/ZhiMingLast scanned: 12/4/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-12-04T05:30:38.394Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}ZhiMing is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by stanGSA. 事实可核验的多 Agent 命理咨询与 MCP Server|无 LangChain 手写 Harness,确定性排盘 + 逐项事实校验。Framework-free Python multi-agent harness & MCP server with deterministic verification (Bazi, Astrology, Tarot). It has 103 GitHub stars.
Yes. ZhiMing passed AgentsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/stanGSA/ZhiMing" and add it to your Claude Code skills directory (see the Installation section above).
ZhiMing is primarily written in Python. It is open-source under stanGSA on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh ZhiMing against similar tools.
No comments yet. Be the first to share your thoughts!
Live Demo (zero install — real-time BaZi & Natal Chart calculation + offline Tarot demo): https://zhiming.mom Want to self-host a zero-API-key offline sandbox via Docker (local, Render/Koyeb, or HF Spaces PRO)? See
deploy/hf-space/.
ZhiMing is a framework-free LLM agent harness written from scratch in Python (no LangChain, no LangGraph), built around six deterministic domain plugins: Tarot, Western Astrology, BaZi (Chinese Four Pillars), Chinese Onomancy (Wuge), Dream Interpretation, and Daily Fortune.
Every symbolic fact—ephemeris longitudes, house cusps, solar terms, stems/branches, and drawn cards—is computed by deterministic code. The LLM only synthesizes the reading, and every fact and ref_id cited in its answer is verified item-by-item by code; hallucinations are rejected and rewritten.
Divination puts two hard LLM challenges side-by-side:
| Tarot: Interactive Deck, Flip & Verifiable Reading | BaZi: Four Pillars, Ten Gods, Hidden Stems & WuXing |
|---|---|
![]() |
![]() |
| Western Astrology: Natal Wheel, Houses & Aspects | Entry Portal (East & West Celestial Atlas) |
![]() |
![]() |
Captured in local offline demo mode using synthetic birth data. Charts and pillars are computed deterministically; offline tarot prose comes from a rule-based demo model rather than a live LLM.
flowchart TB
U["User: CLI / Local Web UI / zhiming.mom"] --> RT["Runtime (app.py)<br/>Crisis Check · Calendar Baseline · Session"]
RT --> O
subgraph AG["Agent Layer"]
O["Orchestrator (multi) / Single Agent (single)"]
S["5 Domain Specialists<br/>Isolated Sub-Sessions"]
R["Lenient Reviewer"]
O -- "consult_specialist (parallel)" --> S
O -- "submit_reading" --> R
end
AG --> H["Domain-Agnostic Harness<br/>run_turn Loop · Guard-before-Cache · Hierarchical Budget & Deadlines · Call Tree Trace"]
H --> P["Deterministic Plugins<br/>Tarot · Astrology · BaZi · Name · Dream · Daily"]
P --> KB[("Read-Only Knowledge Base<br/>Versioned SQLite + FTS5")]
P --> M["Cross-System Merge<br/>Resonance / Tension"]
H --> DB[("App Database (SQLite WAL)<br/>Profiles · Readings · Caches")]
Both execution modes share the exact same harness and plugins:
single (default): One agent calls all tools directly — serves as the control baseline.multi: An orchestrator with zero direct calculation tools understands the question, asks follow-ups, dispatches up to 5 isolated domain specialists in parallel (consult_specialist), merges cross-system resonance/tension in code, and passes the draft reading through a lenient reviewer before delivery.harness/loop.py): Executes parallelizable tool calls within a turn concurrently via asyncio.TaskGroup, then commits results to session state in original call order. Calls after a terminal tool are skipped while still emitting protocol-complete tool responses; cancelled turns also backfill pending tool responses so OpenAI/Anthropic/DeepSeek message histories stay valid.harness/guard.py): Every tool call runs through JSON parsing, tool registry, role permissions, system partition checks, schema validation, required profile fields, prerequisites, and custom validators before consulting the idempotent cache — cache hits never bypass authorization. Errors return as structured payloads for model self-correction (with targeted partial self-repair and 3-strike identical-failure circuit breaking).harness/budget.py): One request-level budget with per-specialist sub-budgets. Before each model call in multi mode, estimated tokens are reserved up front so concurrent specialists cannot overspend the parent budget or eat into the orchestrator's reserve, then settled against actual usage. Wall-clock deadlines stop tool execution once expired.plugins/*/validation.py, common/validation.py, common/output_policy.py): Every card name, orientation, pillar, planet sign/house, aspect date, and ref_id must trace to the current turn's tool outputs — mismatches are rejected by code. Formatting issues (disclaimers, <br> tags) are auto-normalized instead of forcing rewrite loops.agents/consult.py): Specialists only see tools, KB partitions, and profile fields for their own system. Successful reports atomically replace signals/citations; failed retries preserve the last valid report; tarot draws are immutable per reading. Child sub-session traces attach to their parent tool call via ContextVar to reconstruct full call trees.signals/merge.py): Signals across systems are aligned by time horizon to compute resonance and tension deterministically. In multi mode, the final answer must disclose every tension — user-preferred system weights shift synthesis emphasis without hiding disagreements.common/safety.py): Crisis expressions immediately halt divination and surface region-matched emergency hotlines until the user explicitly confirms safety. Deterministic predictions on health, legal, financial investment, or mortality are disallowed.See docs/design.md for full invariants, calculation conventions, and architectural notes.
mcp_server/ exposes 10 deterministic calculation and lookup tools over standard Model Context Protocol (MCP) stdio transport — zero LLM calls inside the server, identical inputs yield identical outputs (with explicit seed for Tarot), and every meaning carries a ref_id and audit level (review.confidence_cap).
uv sync --locked --extra mcp
uv run python -m scripts.fetch_data # SHA256-verified Swiss Ephemeris, JPL DE440s, GeoNames, Unihan (~70 MB)
uv run python -m knowledge.build # Build versioned read-only SQLite knowledge base
claude_desktop_config.jsonmacOS / Linux (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"zhiming": {
"command": "/Users/<your-user>/.local/bin/uv",
"args": [
"--directory",
"/Users/<your-user>/ZhiMing",
"run",
"--extra",
"mcp",
"python",
"-m",
"mcp_server"
]
}
}
}
Windows (%APPDATA%\Claude\claude_desktop_config.json, using setup.ps1's .bootstrap\Scripts\uv.exe or where.exe uv):
{
"mcpServers": {
"zhiming": {
"command": "C:\\Users\\<your-user>\\ZhiMing\\.bootstrap\\Scripts\\uv.exe",
"args": ["--directory", "C:\\Users\\<your-user>\\ZhiMing", "run", "--extra", "mcp", "python", "-m", "mcp_server"],
"env": { "PYTHONUTF8": "1" }
}
}
}
| Tool | Description |
|---|---|
resolve_location |
Resolve birthplace to location_id, lat/lon & IANA timezone (returns candidates on ambiguity) |
compute_natal_chart |
Western natal chart: planetary signs/houses, four angles, exact aspects (Swiss Ephemeris) |
compute_transits |
Exact transit-to-natal aspects across a consultation date range and timezone |
compute_bazi |
Four Pillars (BaZi), Ten Gods, hidden stems, NaYin, WuXing counts, and 10-year Dayun |
compute_bazi_period |
Annual, solar-term monthly, or daily pillars with natal interactions |
draw_tarot |
Reproducible SHA256-shuffled draws (single, three_card, decision) with seed / picks |
analyze_name |
Unicode Unihan 18.0 Kangxi stroke counts, Wuge numerology, and Sancai five elements |
lookup_dream_symbols |
Match dream symbols against the curated KB (unmatched symbols are explicitly reported) |
daily_fortune |
Daily transits, day pillar & Ten Gods, and deterministic daily card |
lookup_meaning |
Exact KB entry lookup b |