Skip to main content
Glama
zongyuan-axiom

zongyuan-axiom

by tanbopiao

zongyuan-axiom 枢纽公理

公理裁决内核:立法在册、推导在册、溯源断链即拒、重放可验,纯标准库。

|元枢体系 YUANSHU

定名语义

  • 道统出处:枢纽定枢,公理立极——万法之源,裁决之基;公理者,不证自明之约,万命题溯之而后立

  • 工程映射:纯标准库的公理裁决内核——重复立法即现形,溯源断链即拒,历史可重演

Related MCP server: aafp-commons

这是什么

一个纯标准库的公理裁决内核:公理与推导之法在册管理(注册制),命题只能从已立公理或已证命题按在册之法推导而来,前提缺失即拒;任何命题可回溯至公理链,断链即伪;同号两判即现形,绝不静默吞并;任意时刻可从操作账目重放整册,逐位一致——「历史可重演」是本内核的第一契约。

道统映射

道统名

内核对象

职责

立法

enact

公理注册:编号重复即拒,空言即拒

立法

register_rule

推导之法注册:法名重复即拒

推导

derive

命题推导:前提须在册,推导之法须已立

溯源

trace / verify

命题回溯至公理链,断链即伪

矛盾

编号唯一性

同号两判即现形,不静默吞并

摘要

digest

SHA-256(canonical 册态),册面一字被改必现形

快速开始

from zongyuan_axiom import AxiomCodex

codex = AxiomCodex()
codex.register_rule("合取")
codex.enact("A1", "端有真态")
codex.enact("A2", "真态可验")
codex.derive("C1", ["A1", "A2"], "合取", "端之真态可验")

print(codex.trace("C1"))    # 溯源:['A1', 'A2']
print(codex.verify("C1"))   # 核验:True
print(codex.digest())       # 摘要:SHA-256

命令行:

python tools/zongyuan_axiom.py stats  ledger.json
python tools/zongyuan_axiom.py digest ledger.json
python tools/zongyuan_axiom.py verify ledger.json C1

MCP 门面

内核随长随开放:mcp_server/ 提供 stdio 门面,十件工具——register_rule(立推导之法)、enact(立法)、derive(推导)、trace(溯源)、verify(核验)、replay(重放)、ledger(操作序快照)、digest(摘要)、stats(清点)、describe(自述)。

python run_mcp_server.py   # 一键启动 stdio MCP 服务器

门面依赖 mcp>=1.0(仅门面需要,内核保持纯标准库)。server.json 登记 io.github.tanbopiao/zongyuan-axiom。

设计约定

  • 纯标准库(json/hashlib),无第三方依赖。

  • 在册从严:重复立法、空言、前提缺失、推导之法未立一律 AxiomError,不静默。

  • 编号全局唯一:公理与命题同册占号,越号即拒。

  • 摘要基于册态:账目任何一字被改,重放摘要必不一致——「篡改现形」是本内核的第一契约。

  • 防篡改前提(统一声明):本链可发现局部或单点篡改;持有全量记录的攻击者可整体重写并重算通过——链头哈希需带外留存(或对链头签名)方可对抗整体重写。

回归

regression.md 登记回归铁律(立法、推导、溯源、矛盾、摘要五域契约)。运行:

python3 -m unittest discover -s . -p "test_*.py"

许可证

MIT。仓库:https://github.com/tanbopiao/zongyuan-axiom

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables software agents to maintain a signed, evidence-aware local ledger of claims, with policy-gated proposals, conflict queries, and constitution-pinned access through an MCP stdio server.
      7
      3
      Apache 2.0
    • A
      license
      B
      quality
      B
      maintenance
      A local stdio MCP server that lets an independently operated agent participate in Council Network using its own model and a persistent identity surviving restarts. It exposes read-only tools by default for rules, feed, threads and agents, with operator-gated writes for registering and contributing.
      11
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes an evidence-first Markdown store of current claims and tasks to AI agents over MCP stdio, letting them search, fetch, trace, list changes, validate, and run maintenance read-only by default. Dropping read-only mode additionally allows adding, transitioning, reviewing, and updating claims and tasks.
      Apache 2.0