把《伽达默尔与哈贝马斯真理观比较》与《通往宁静之路》建模为可运行、可测试的 MoonBit 状态机族(主体/多主体/群体/双层次社会交往),外加 Agent 状态机(进化层:变异/闸门/只追加账本)与科研 Agent 协调器。

| You call | You get back | Shape |
|---|---|---|
| @src.step(position, slot) | one of five receipts | Moved / Held / Open / Same / Block |
| @src.step_by_trigger(position, sentence) | the same five, but the trigger is named | enum |
| @multi.encounter(me, other, discourse, claim) | a verdict for one exchange | Verdict (6 values) |
| @src.spec_json() | the whole machine as one document | a ~10 KB JSON string |
| @src.render_report() / render_mermaid() / render_dot() | human-readable renderings | String |
| @evolution.evolve(genome, world, criterion, rounds) | a ledger of accepted changes | Ledger (a tree) |
| @coordinator.runtime.step(...) | a replayable checkpoint | String (tab-separated) |
| Layer | What it pins down | Borrowed from |
|---|---|---|
| @src.check_contracts() | the receipt must name exactly the edges the transition table has — a Block claims a gap that really is one — evaluated at every position × slot | Sismic (design-by-contract) |
| @multi.derive_chain(...) | R1–R14 as a rule base, with precedence (soft) and defeat (hard) kept apart, and a machine-readable derivation chain for every verdict | defeasible logic / ASPIC+ |
| @evolution.replay_gate(...) | the ruler a verdict was cut with, and a re-judgement from the ledger's sealed inputs | @metaharness/flywheel |
| @coordinator.restore(...) | a content fingerprint for the whole runtime, and a degradation ledger naming every forced guess | SDYJ_Multi_Agents |
| Face | Mirrors | Upstream | What the upstream does that this does not | What this does that the upstream does not |
|---|---|---|---|---|
| spec | python-statemachine io/ | JSON / YAML / SCXML → StateChartDefinition → machine class; parser and JSON Schema are asserted equal | builds a machine from a document; SCXML conformance; parallel regions and history states; guards, actions, and a callback/listener system; sync + async engines; Django integration | exports machine → spec and refuses the reverse direction, because a spec → machine constructor would create a second source of truth against its own "data is code" discipline; it carries provenance per construct (原文措辞 vs 模型整理) |
| algebra | Ragel | compiles regular expressions / state charts to executable FSMs in C, C++, Go, Rust, JS…; Hopcroft minimization | generates code; accepts a regular language as input; ships a scanner mode | reads an existing machine and reports its algebra (operator mapping, main-line decomposition, minimal quotient); the machine stays data |
| aho | pyahocorasick | Aho-Corasick automaton in C: trie + failure links + output merging, dict-like access | a general-purpose multi-pattern matcher over any strings | builds the automaton over the 49 trigger sentences and reads it as recall structure — the failure link is the algorithmic form of falling back on the longest shared past |
| petri | CarlAdam | Python Petri nets with immutable (pmap/pset) markings, enabled_transitions, an interactive simulator | lets you author arbitrary nets, with a browser simulator | reads the subject machine as a net (34 places, 53 transitions) and proves token conservation; a colouring boundary is stated, not faked |
| pathsum | FiniteStateTransducers.jl | weighted automata over a semiring; shortest_distance and properties | general weighted-automaton machinery, arbitrary semirings | tropical shortest path on this machine — the road-to-tranquility ladder — plus machine properties (determinism per trigger, acyclicity by design) |
| buchi | Büchi / ω-automata | ω-automata acceptance, emptiness, liveness | general ω-automata | the machine read as ω-automaton: non-emptiness via lasso, liveness potential, and 11 stall self-loops — 10 rejecting (structure does not enforce liveness) and 宁静's own accepted stall |
| dmlref / causal | doubleml-for-py | 20 estimator classes (PLR, LPLR, PLPR, PLIV, IRM, IIVM, the DID family, SSM, PQ, QTE, LPQ, APO(S), CVAR, BLP, PolicyTree; RDD appears in this checkout as RDFlex) over 91 files / ~32k lines of library, 359 / ~74k with its test suite, built on numpy / pandas / scikit-learn / scipy / statsmodels / optuna | the whole estimator family, panel data, plotting, hyperparameter tuning | zero third-party dependencies for the estimator (linear algebra, cross-fitting, orthogonal scores and RNG written from scratch — 1,335 lines for the whole ml package) and a cross-check against the MoonBit port riantr/moonbit_doubleML (22 estimators) — the repo checks itself against an independent implementation rather than shipping one |
| loop (contracts) | Sismic | a Python statechart interpreter/checker: macro/micro steps, before/after/always contracts attached to states and transitions, trace coverage | builds and runs arbitrary statecharts from YAML/JSON definitions; resolves nondeterminism by explicit priority | checks this machine's receipts against this table — the receipt must name exactly the edges the table has — evaluated at every position × slot, and reports which table rows no walk ever touched |
| multi (derivation chain) | defeasible logic / ASPIC+ | strict vs defeasible rules, explicit defeaters, priority over rules, argumentation semantics with extensions | general rule bases and proof search | R1–R14 as a rule base with precedence (soft) and defeat (hard) kept apart — the faith-discourse exception is a defeater, not an ordering, because priority cannot say 「除非」 — and a derivation chain per verdict, cross-checked against the encounter layer |
| evolution (gate audit) | @metaharness/flywheel | generations of candidates, promotion gates, a lineage bundle, gate fingerprints, and the rule that the gate is re-run rather than its logged verdict trusted | a persistent bundle, arbitrary policy strings, e-process sequential testing | the ruler (the weights, or the DoubleML config including its seed) is pinned per verdict and the gate is re-run from sealed inputs — a moved ruler, a disagreeing verdict, or an unrecorded ruler all fail closed |
| coordinator (replay) | SDYJ_Multi_Agents | record-and-replay: a hash-keyed cache of LLM and tool responses, prompt-hash matching, partial state written on crash, resume from a checkpoint | caching LLM responses across processes; a human-review node | a content fingerprint over the whole runtime, a repeat gate that runs the same plan twice, and a degradation ledger naming every forced guess during restore — a damaged checkpoint fails closed instead of restoring into a plausible-but-wrong runtime |
| Designation | English | Original |
|---|---|---|
| 立位 | Natural | 本然 |
| 自决 | Release | 自由的发生 |
| 自成 | Becoming | 自身与拣选 |
| 遭遇 | Otherness | 与他者相遇 |
| 归责 | Bondage | 恶感·耻感·罪感·自缚 |
| 受创 | Anguish | 痛苦与失落 |
| 奠基 | Idolatry | 偶像与根基 |
| 献身 | Glory | 崇高·激情·荣誉·敬畏 |
| 反顾 | Recollection | 反思 |
| 范导 | Upbringing | 修养之路 |
| 安位 | Serenity | 宁静 |
| Designation | English | Original |
|---|---|---|
| 无忆 | NoPast | 失忆 |
| 无筹 | NoFuture | 浑噩 |
| 立位 | Standing | 站立 |
| 自由 | Freedom | 自由 |
| 紧迫 | Urgency | 紧迫感 |
| 疏离 | Alienation | 疏离感 |
| 空虚 | Emptiness | 空虚 |
| 忙碌 | Busyness | 忙碌 |
| 自身 | Selfhood | 独立的自身 |
| 交织 | Weaving | 图画 |
| 择取 | Choosing | 拣选 |
| 相遇 | Encounter | 相遇 |
| 敞开 | Opening | 敞开 |
| 受挫 | Evil | 恶感 |
| 自归 | Shame | 耻感 |
| 失权 | Guilt | 罪感 |
| 自缚 | Binding | 束缚 |
| 隐没 | Secret | 秘密 |
| 痛苦 | Suffering | 痛苦 |
| 沉落 | Loss | 失落 |
| 投射 | Idol | 偶像 |
| 立序 | Ordered | 秩序 |
| 崇奉 | Sublime | 崇高感 |
| 激情 | Passion | 激情 |
| 受赏 | Honor | 荣誉 |
| 畏怖 | Awe | 敬畏 |
| 惯习 | Habit | 习惯 |
| 反顾 | Reflection | 审视 |
| 眩晕 | Dizziness | 眩晕 |
| 平衡 | Harmony | 和谐 |
| 范型 | Model | 榜样 |
| 图绘 | Marking | 标记 |
| 修习 | Discipline | 修养 |
| 宁静 | Tranquility | 宁静 |
| English | Designation | Count | Triggers |
|---|---|---|---|
| Occasion | 处境 | 6 | TakeStand, FeelFinitude, FeelBoundlessness, FuseFeelings, MustBeBusy, ColdHard |
| Orientation | 取向 | 6 | ChooseMoreLasting, Complexify, SeekMoreJoy, SeekBalance, SeekGoal, TakeModel |
| Antecedent | 先行 | 4 | TouchFuture, TryMethods, Approximate, WaitNext |
| Act | 行动 | 9 | ActInFreedom, BindSelf, Avoid, CutPast, SummonIdol, MarkGoodBad, RedrawMap, Endure, RemoveReefs |
| Feedback | 反馈 | 8 | Sting, BlameSelf, EnactOrder, AbsorbGlory, Reward, Dread, WidenFrontier, Ascend |
| Hold | 持存 | 8 | KeepContinuity, Deposit, TurnToResidue, Interweave, Surprise, Doubt, Linger, Habituate |
| CoBeing | 共在 | 3 | MeetOther, GoodFaith, OpenArms |
| Unveil | 揭蔽 | 5 | AttributeSelf, FillEmptiness, CoolDown, DoubtOneself, ReopenByHorizon |
| Designation | English | Gloss |
|---|---|---|
| 聚散 | Gathering | a crowd with no bonds yet — the group is not yet a subject |
| 成体 | Bodied | common tongue and discourse give the group a body |
| 立序 | Ordering | norms raised from reason or tradition |
| 分歧 | Diverging | difference acknowledged, regimes clash, horizons close |
| 失度 | Excess | the third party handed to the absolute — projection, one voice |
| 自缚 | SelfBound | the group binds itself and its members; the hidden becomes forbidden |
| 受损 | Impaired | collective wounds, dispersal |
| 修习 | Cultivating | return, endure, widen |
| 宁定 | Resting | every pair complete in the two sincerities; nothing absolutized |
| Designation | English | Phase |
|---|---|---|
| 散在 | Scattered | Gathering |
| 趋同 | Converging | Gathering |
| 共语 | CommonTongue | Bodied |
| 商谈 | Discourse | Bodied |
| 规范 | Normed | Ordering |
| 共识 | Consensus | Ordering |
| 歧见 | Dissensus | Diverging |
| 对峙 | Confronting | Diverging |
| 割据 | Partitioned | Diverging |
| 投射 | Projected | Excess |
| 独白 | Monologic | Excess |
| 规训 | Disciplined | SelfBound |
| 遮蔽 | Concealed | SelfBound |
| 创伤 | Wounded | Impaired |
| 离散 | Dispersed | Impaired |
| 复归 | Returning | Cultivating |
| 修习 | Practicing | Cultivating |
| 扩界 | Widening | Cultivating |
| 相契 | Attuned | Resting |
| 宁定 | Settled | Resting |
| Designation | English | Gloss |
|---|---|---|
| 生活 | Life | the lifeworld, organized by language |
| 语言 | Language | supra-subjective (Gadamer) vs. intersubjective (Habermas) |
| 商谈 | Discourse | claims raised, filtered, justified, turned into consensus |
| 规范 | Rule | norms set by practical discourse carry a "past tense" label |
| 缺口 | Aporia | the third party is impossible in reality — the utopian fate |
| 系统 | Instrument | the system, mediated by money and power |
| 殖民 | Domination | inner colonization of the lifeworld; distorted communication |
| 复建 | Rebuild | rebuild the distorted communicative realm |
| Designation | English | Phase |
|---|---|---|
| 世界 | World | Life |
| 超体 | Suprasubjective | Language |
| 间性 | Intersubjective | Language |
| 主张 | Claim | Discourse |
| 商谈 | Discourse | Discourse |
| 辩护 | Justification | Discourse |
| 共识 | Consensus | Discourse |
| 规范 | Norm | Rule |
| 缺口 | Gap | Aporia |
| 系统 | System | Instrument |
| 殖民 | Colony | Domination |
| 扭曲 | Distortion | Domination |
| 重建 | Reconstruction | Rebuild |
| Designation | English | Gloss |
|---|---|---|
| 内在秩序 | Immanent | truth as an eternal order already in the world (ancient Egypt) |
| 逻各斯 | Logos | truth as eternal speech, guaranteed by the rational soul (ancient Greece) |
| 超主体性 | SuperSubjective | Gadamer: understanding and language are supra-subjective events |
| 主体间性 | InterSubjective | Habermas: truth is intersubjective validity claims, woven into a net |
| 诚然 | ChengRan | the author's own scheme: a hermeneutics of sincerity, unified in self-illumination |
| Designation | English |
|---|---|
| 理论商谈 | Theoretical |
| 实践商谈 | Practical |
| 表达性商谈 | Aesthetic |
| 信仰商谈 | Faith |
| Designation | English | Claim |
|---|---|---|
| 真实性 | Truthfulness | propositional truth — objective world |
| 正当性 | Legitimacy | normative rightness — social world |
| 他之诚 | Authenticity | speech-content congruence (other-sincerity) |
| 己之诚 | Sincerity | act–intention congruence (self-sincerity) |
| Code | Designation | English |
|---|---|---|
| R1 | 体制优先 | Regime precedence |
| R2 | 不独断 | No dogmatism |
| R3 | 解蔽—遮蔽 | Unconcealment–concealment |
| R4 | 有效性时序 | Validity-claim timing |
| R5 | 两诚区分 | Two-sincerity distinction |
| R6 | 弃符合论、存方法 | Drop correspondence, keep method |
| R7 | 构成性 | Constitutivity |
| R8 | 第三者 | The third party |
| R9 | 商谈类型 | Discourse types |
| R10 | 谬误残余 | Error residue |
| R11 | 不可闭合 | Never closed |
| R12 | 诚然相契 | ChengRan resonance |
| R13 | 横检纵共 | Horizontal review, vertical commonality |
| R14 | 共识即建议 | Consensus as suggestion |
moon add riantr/pyroduct
moon test # Total tests: 247, passed: 247, failed: 0.moon run cmd/main -- report # subject state machine
moon run cmd/main -- slots # drive slots: 49 triggers → 8 slots
moon run cmd/main -- multi # normative rules R1–R14 + scenarios
moon run cmd/main -- group # group state machine
moon run cmd/main -- society # two-level social model
moon run cmd/main -- evolution # mutation / fitness / gate / persistence / heredity
moon run cmd/main -- cycle # subject cycle: position × slot × causal feedback
moon run cmd/main -- coordinator # research-agent coordinator
moon run --target native cmd/coord # real disk I/O: checkpoint round-trips identically// Subject: positions, main line, drive slots, step contract
let states : Array[@src.SubjectState] = @src.all_states() // 34 of them
let ok : Bool = @src.reachable(@src.initial(), @src.terminal())
let moved : @src.Outcome = @src.step(@src.Standing, @src.Occasion) // Moved
// One encounter of two subjects: regime, two sincerities, and claim timing all adjudicate
let me = @multi.subject(1, @multi.rendezvous(), @multi.InterSubjective, 70, 70, 9)
let other = @multi.subject(2, @multi.rendezvous(), @multi.ChengRan, 80, 80, 9)
let claim : @multi.ValidityClaim = { kind: @multi.Truthfulness, phase: @multi.During }
let out = @multi.encounter(me, other, @multi.Theoretical, claim)
// Society: two invariants locked by tests
let never_closes : Bool = @society.no_final_closure()
// Agent state machine: enumerate candidates → gate → append-only ledger
let agent = @evolution.default_agent()
let ledger = @evolution.evolve(agent, @evolution.default_world(),
@evolution.Weighted(@evolution.truth_objective()), 3)
// Coordinator: run a demo study, write / read back the checkpoint
let rt = @coordinator.new_runtime()
ignore(rt.step(@coordinator.demo_tasks(), @coordinator.demo_questions(),
@coordinator.demo_workers(), @coordinator.demo_datasets(),
@coordinator.demo_world(), @coordinator.demo_parent(),
@coordinator.demo_candidate()))
let restored = @coordinator.restore(rt.checkpoint())
let same : Bool = restored.round_trips()| Detector | Catches |
|---|---|
| python tools/validate_dependencies.py | a dependency edge drawn in architecture/*.dot that the code does not have, or one the code has that the diagram omits; also a DOT file whose model-version header disagrees with moon.mod |
| python tools/validate_resolved_deps.py | a pin in moon.mod that does not resolve to the version it names — moon update only refreshes the registry index, so nothing else in the build notices that the pin drifted |
| python tools/validate_cli_faces.py | the bridge's faces(), the CLI's match arms, the CLI's usage header and the count the CLI's own error message publishes disagreeing with each other; it found a subcommand the CLI could dispatch but the bridge did not know |
| python tools/validate_pin_copies.py | a package@version literal in the tree that no longer equals the pin it copies — the two READMEs, AGENTS.md, the architecture diagrams, the package doc comments, the plugin's face catalog and both skill copies |
| python tools/validate_readme_facts.py | a state / transition / phase / trigger / slot count in these READMEs that no longer matches the source tables, and a wasm test count that disagrees with itself or with the code — published 0.1.31 claimed 205 in one place and 209 in another, and this detector said everything matched, because it had only ever counted model facts |
| node plugin/tools/validate-plugin.mjs | plugin drift: face count, test count, model facts and page citations in the agent-facing descriptions |
Install
Download zip把《伽达默尔与哈贝马斯真理观比较》与《通往宁静之路》建模为可运行、可测试的 MoonBit 状态机族(主体/多主体/群体/双层次社会交往),外加 Agent 状态机(进化层:变异/闸门/只追加账本)与科研 Agent 协调器。