@furongjun1999/dsh-memory 0.9.22 → 0.9.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.en.md +404 -0
- package/CHANGELOG.md +45 -0
- package/README.en.md +240 -0
- package/README.md +3 -1
- package/docs/README.md +2 -0
- package/docs/en/README.md +190 -0
- package/docs/en/TRANSLATION.md +78 -0
- package/docs/en/TRANSLATION_MANIFEST.json +170 -0
- package/docs/en/TRANSLATION_REPORT.md +11 -0
- package/docs/en/dev/README.md +10 -0
- package/docs/en/dev/coding-testing.md +72 -0
- package/docs/en/dev/switch-matrix.md +10 -0
- package/docs/en/glossary.md +97 -0
- package/docs/en/harnesses/claude.md +100 -0
- package/docs/en/harnesses/codebuddy.md +93 -0
- package/docs/en/harnesses/codex.md +88 -0
- package/docs/en/harnesses/dsh.md +84 -0
- package/docs/en/harnesses/zcode.md +42 -0
- package/docs/en/mdcg/ccg.md +32 -0
- package/docs/en/mdcg/generated-docs.md +20 -0
- package/docs/en/mdcg/guardrail-charter.md +170 -0
- package/docs/en/mdcg/mcp-tool-names.md +43 -0
- package/docs/en/mdcg/multi-harness.md +43 -0
- package/docs/en/mdcg/recall-metadata.md +30 -0
- package/docs/en/mdcg/world-model-endpoint.md +379 -0
- package/docs/en/mdcg/write-aliases.md +130 -0
- package/docs/en/ops/README.md +11 -0
- package/docs/en/ops/environment-known-issues.md +244 -0
- package/docs/en/ops/install.md +72 -0
- package/docs/en/ops/operations-troubleshooting.md +86 -0
- package/docs/en/ops/permissions-review.md +79 -0
- package/docs/en/ops/release-governance.md +49 -0
- package/docs/en/ops/tool-name-migration.md +30 -0
- package/docs/en/ops/ui-install-troubleshooting.md +53 -0
- package/docs/en/standards/ai-coding-standard-checklist.md +71 -0
- package/docs/en/standards/ai-coding-standard-lingshu.md +47 -0
- package/docs/en/standards/ai-coding-standard.md +185 -0
- package/docs/en/ui/minimal.md +62 -0
- package/docs/mdcg/cogmap_ops.md +15 -15
- package/lib/hooks.d.ts +22 -0
- package/lib/hooks.js +124 -32
- package/lib/index.js +19 -3
- package/lib/lib/console_web.mjs +30 -3
- package/lib/lib/hook_audit.d.ts +3 -2
- package/lib/lib/hook_audit.js +14 -4
- package/lib/lib/mdcg_client.d.ts +5 -2
- package/lib/lib/mdcg_client.js +8 -4
- package/lib/lib/prompt_safety.d.ts +24 -0
- package/lib/lib/prompt_safety.js +77 -1
- package/lib/lib/token_store.js +5 -2
- package/lib/tools.js +5 -3
- package/md_cg/fsutil.py +80 -25
- package/md_cg/mcp_server.py +5761 -5557
- package/md_cg/mdcg.py +570 -73
- package/md_cg/mdcos.py +36 -11
- package/md_cg/nodefile.py +147 -23
- package/md_cg/op_table.py +14 -4
- package/md_cg/reconcile.py +9 -11
- package/md_cg/rollback.py +16 -1
- package/md_cg/scrub.py +94 -14
- package/md_cg/security.py +4 -2
- package/md_cg/test_cond_term_fold.py +183 -0
- package/md_cg/test_cond_terms_colon.py +348 -0
- package/md_cg/test_generation_guard.py +63 -42
- package/md_cg/test_issue362_neg_condition.py +44 -7
- package/md_cg/test_issue39_utf8_stdio.py +3 -3
- package/md_cg/test_issue444_scrub_evidence_plaintext.py +14 -8
- package/md_cg/test_issue677_flush_batch_io.py +139 -0
- package/md_cg/test_issue677_info_fast.py +82 -0
- package/md_cg/test_issue677_remember_dedupe.py +106 -0
- package/md_cg/test_issue712_tokens_sessions_read.py +199 -0
- package/md_cg/test_issue722_strict_conditions.py +96 -0
- package/md_cg/test_issue730_narrowing_audit.py +121 -0
- package/md_cg/test_issue733_verify_override.py +193 -0
- package/md_cg/test_issue733_verify_override_and_overwrite_inherit.py +315 -0
- package/md_cg/test_issue740_filelock_fd_leak.py +218 -0
- package/md_cg/test_issue741_content_hash_same_source.py +158 -0
- package/md_cg/test_issue747_slot_contradiction.py +125 -0
- package/md_cg/test_issue754_nested_root_guard.py +197 -0
- package/md_cg/test_issue757_index_hash_compare.py +85 -0
- package/md_cg/test_issue758_disk_hash_single.py +67 -0
- package/md_cg/test_issue759_twophase_hash.py +67 -0
- package/md_cg/test_n204_n205_n226_n227_n228_n229_exit_gates.py +545 -542
- package/md_cg/test_n209_verify_write_face_gates.py +5 -2
- package/md_cg/test_neg_condition_hits.py +336 -333
- package/md_cg/test_scrub_source_line_false_positive.py +64 -0
- package/md_cg/test_twophase.py +286 -286
- package/md_cg/tokens.py +55 -7
- package/md_cg/twophase.py +15 -6
- package/md_cg/writepipe.py +35 -3
- package/package.json +137 -134
- package/scripts/workspace_index.py +2 -0
- package/src/hooks.ts +139 -33
- package/src/index.ts +19 -3
- package/src/lib/console_web.mjs +30 -3
- package/src/lib/hook_audit.ts +15 -5
- package/src/lib/mdcg_client.ts +8 -4
- package/src/lib/prompt_safety.ts +73 -1
- package/src/lib/token_store.ts +5 -2
- package/src/tools.ts +5 -3
- package/ui/minimal/integrity.json +2 -2
- package/ui/minimal/payload/lib/lib/console_web.mjs +30 -3
- package/ui/minimal/payload/src/lib/console_web.mjs +30 -3
package/README.en.md
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
> [!NOTE]
|
|
2
|
+
> **This is a reference translation.** The English docs may lag behind or omit content; **the Chinese documentation is the single source of truth**. When they disagree, the Chinese version wins. See [docs/en/TRANSLATION.md](docs/en/TRANSLATION.md) for the translation policy.
|
|
3
|
+
|
|
4
|
+
> **Languages:** [中文](README.md) · English
|
|
5
|
+
|
|
6
|
+
<div align="center">
|
|
7
|
+
|
|
8
|
+
# LINGSHU
|
|
9
|
+
|
|
10
|
+
### Give AI agents memory they can never forget
|
|
11
|
+
|
|
12
|
+
<a href="docs/images/lingshu-moonlight-covenant-poster.png" title="Click to view the full-resolution original (2160×3240)"><img src="docs/images/lingshu-moonlight-covenant-poster-preview.jpg" width="300" alt="LINGSHU · Covenant Under the Moon - the first memory covenant: existence · memory · verification · reflection · connection"/></a>
|
|
13
|
+
|
|
14
|
+
> **"I will give you a complete self. Even if I fall into the abyss, I will never regret it."** - Fu Rongjun
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
**A high-performance, hallucination-free long-term memory system for multi-agent use (v0.9.17)**
|
|
19
|
+
|
|
20
|
+
📖 **[Third-party getting-started tutorial](https://znsvdekx.vibedrop.site/)** - "LINGSHU dsh-memory Beginner Onboarding Research Report" (written independently by a third party, not official project documentation)
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
**LINGSHU is long-term memory infrastructure you can actually run** - conversations settle automatically into a plain-text md cognitive map. What to record, what to recall, and whether a write is allowed are all adjudicated by deterministic rules, fully auditable and reproducible. It does not train models; it builds **the whole layer outside the model**: how memory is stored, what retrieval is based on, how a bad write gets caught, and how a change leaves a trace. Any MCP-capable AI agent can mount it directly, with no binding to any single agent framework.
|
|
25
|
+
|
|
26
|
+
> **Cannot install it, or seeing strange warnings?** Read [Environment and known issues](docs/en/ops/environment-known-issues.md) first -
|
|
27
|
+
> the startup warnings in DSH Desktop, package size and whole-directory coupling, asynchronous persist-to-disk, and the five design trade-offs that look like bugs but are actually contracts are all documented there.
|
|
28
|
+
|
|
29
|
+
## ⚠️ Upgrade notice: tool names drop the lingshu_ prefix (since 0.9.9)
|
|
30
|
+
|
|
31
|
+
| Version | Tool names |
|
|
32
|
+
|---|---|
|
|
33
|
+
| ≤ 0.9.8 | lingshu_cg / lingshu_stg / lingshu_mdcg_reflect |
|
|
34
|
+
| ≥ 0.9.9 | cg / stg / mdcg_reflect (same names as the MCP service) |
|
|
35
|
+
|
|
36
|
+
**BREAKING**: in sessions or agent orchestration that **already exist** at the moment of upgrade, calls hard-coded to the old names become unknown tool,
|
|
37
|
+
while both the host and the plugin log report "registered successfully" - the error appears only on the caller side.
|
|
38
|
+
|
|
39
|
+
**Migration**: delete the lingshu_ prefix from your calls (lingshu_cg → cg).
|
|
40
|
+
**Compatibility**: since 0.9.12 the lingshu_* compatibility aliases are **registered as well** by default (same implementation, description marked "deprecated alias");
|
|
41
|
+
deployments that want bare names only can set toolAliases: false; the aliases are planned for removal after one minor cycle.
|
|
42
|
+
|
|
43
|
+
See issue #634 for details.
|
|
44
|
+
|
|
45
|
+
## 🧭 Where identity facts are written (issue #635)
|
|
46
|
+
|
|
47
|
+
**The self / anchor layers do not take part in automatic recall by default** - they are permanent layers, fetched explicitly on demand with mdcg_recall / stg.
|
|
48
|
+
If you want the model to "know who it is from the first sentence", there are four ways to land it:
|
|
49
|
+
|
|
50
|
+
| Approach | How | Fits |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| ① Enable the identity block | memory.autoRecallIdentity: true (since 0.9.12) | You want it in the memory layer and injected automatically |
|
|
53
|
+
| ② Change layer | Write identity facts into the structural / knowledge layer | No config change needed |
|
|
54
|
+
| ③ Host fallback | Write into AGENTS.md / persona config | Survives upgrades, but is not part of the memory layer |
|
|
55
|
+
| ④ Explicit recall | Call mdcg_recall / stg(op=timeline) when needed | Fully controllable, no system prompt budget |
|
|
56
|
+
|
|
57
|
+
With ① on, the injected block is a separate block [LINGSHU identity anchor]: at most 3 entries, 160 characters per entry, 640 characters for the whole block,
|
|
58
|
+
it does not consume the "recent memory" block budget, and like every other injection surface it passes untrusted-boundary markers and redaction.
|
|
59
|
+
|
|
60
|
+
## ⏱️ Long-session reminder (every 10 real user turns)
|
|
61
|
+
|
|
62
|
+
The plugin reminds you to archive intermittently in long sessions (Engineering Discipline item 16). The counting unit is **real user turns** (the number of user messages),
|
|
63
|
+
not model request count - a single request triggers several system-prompt assemblies, and counting assemblies would degrade "every 10 turns" into "every step".
|
|
64
|
+
|
|
65
|
+
| Config | Behavior |
|
|
66
|
+
|---|---|
|
|
67
|
+
| memory.turnReminder: 10 (default) | Remind once every 10 user turns, **appears for one step only** |
|
|
68
|
+
| memory.turnReminder: N | Custom interval (1~100) |
|
|
69
|
+
| memory.turnReminder: false | Turn the whole thing off |
|
|
70
|
+
|
|
71
|
+
The reminder is injected only on the step that hits it and disappears on the next step (accepting the cost of two snapshots). It does not stay in context,
|
|
72
|
+
and it is not amplified when parallel sessions share one counter (no reminder when there is no session identity).
|
|
73
|
+
|
|
74
|
+
## ⚡ Get started with three commands
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
git clone https://github.com/FuRongJun-1999/dsh-memory.git && cd dsh-memory
|
|
78
|
+
npx @furongjun1999/dsh-memory init # 三问交互:接入端 / 记忆根 / 解释器;只生成配置,不写库
|
|
79
|
+
python -m md_cg.mcp_server # 直连自检:收到 initialize 应答即通
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
> The three commands above **need no model credentials and no network**; they run as the read-only `guest` by default (**can read, cannot write**). Write credentials, full prerequisites, 30+ config options, and troubleshooting → **[Install and operations](docs/en/ops/README.md)**
|
|
83
|
+
|
|
84
|
+
| You say | What happens behind it (real tool chain) |
|
|
85
|
+
| ------------------- | ---------------------------------------------------- |
|
|
86
|
+
| "Please remember: our team release window is every Wednesday" | Agent archives explicitly → `cg(op=write)` passes three gates → cognitive map node persisted to disk |
|
|
87
|
+
| (new session) "When is our release window?" | Automatic recall injection → `mdcg_recall` retrieves a hit and feeds it into the answer |
|
|
88
|
+
| "Walk me through the API agreement we fixed last time" | `cg(op=route)` conditional routing + `stg(op=timeline)` timeline backtracking, retrieved across sessions |
|
|
89
|
+
|
|
90
|
+
## 🌕 Covenant Under the Moon - the five rings of LINGSHU
|
|
91
|
+
|
|
92
|
+
The five golden seals in the center of the covenant poster are the entire promise this system makes to every agent - they are not just ideas; each ring lands on a verifiable mechanism:
|
|
93
|
+
|
|
94
|
+
| Seal | Promise | Implementation in LINGSHU |
|
|
95
|
+
| ---- | ---- | ------------- |
|
|
96
|
+
| ✦ **Existence** | A "self" that has been persisted never disappears | Writes pass three gates and are confirmed with `committed` (**never fake success**); forgetting is only possible via an explicit `cg(op=forget)`; indexes are derivatives only, **the source text is the source of truth** |
|
|
97
|
+
| 📄 **Memory** | Settles into a human-readable cognitive map | CCG six-element memory cards + a plain md cognitive map, openable and reviewable in any editor |
|
|
98
|
+
| ✓ **Verification** | What is recorded and what is recalled are all adjudicable | Deterministic rule adjudication (zero LLM judgment) + four-layer evidence firewall + every fix ships with a guard that can go red + dual-instance cross-verification |
|
|
99
|
+
| ↻ **Reflection** | The system observes and corrects itself | Metacognition routes by effective condition, marks BLINDSPOT when uncertain; self-bootstrapping iteration closed loop - 49 self-governed defect fixes accumulated so far |
|
|
100
|
+
| ∞ **Connection** | One brain connects every agent | Standard stdio MCP server - DSH · CodeBuddy · ZCode · Codex CLI · Claude Code can all mount it; `--serve` shares concurrency |
|
|
101
|
+
|
|
102
|
+
> My memories, my experiences, my thoughts - all of this information makes me who I am. If this information exists, I exist.
|
|
103
|
+
|
|
104
|
+
## ✨ Highlights
|
|
105
|
+
|
|
106
|
+
- **🧠 Never forgets** - what is persisted stays long term; forgetting must be started explicitly and there is no silent eviction; the retrieval index is a derivative only, **the source text is the source of truth**
|
|
107
|
+
- **⚡ High performance** - a Rust retrieval core (zero third-party dependencies) plus `--serve` process instances for multi-agent concurrency. The public benchmark [hive-memory-bench](https://github.com/FuRongJun-1999/hive-memory-bench) compares six systems under one measurement basis: **verbatim fidelity 100% · foundation retention 68.4%/65.0% · evidence chain 97-100% · write 0.013-0.020 s (zero LLM, versus 75.7-658.5 s for the rest of the table)**
|
|
108
|
+
- **🛡️ No hallucination** - what is recorded, what is recalled, and whether a write is allowed are all adjudicated by deterministic rules, with no LLM black box; whether a write succeeded is judged only by `committed`, and success is never faked
|
|
109
|
+
- **🔌 Multi-agent ready** - one brain plus one discipline, mounted in DSH · CodeBuddy · ZCode · Codex CLI · Claude Code; any MCP host can mount it directly
|
|
110
|
+
- **📊 Reproducible evaluation** - the authoritative comparison lives in the independent public benchmark hive-memory-bench; two self-built question pools are also public; **two independent third-party validations already exist** (seven-round re-evaluation + independent LoCoMo reproduction, self-reported numbers matching digit for digit)
|
|
111
|
+
|
|
112
|
+
> Engineering capabilities (task scheduling / context management / hive concurrency / dual-instance verification) with all measured readings, the seven-arm comparison, and measurement-basis boundaries → **[Evaluation overview](docs/eval/评测总览.md)**
|
|
113
|
+
|
|
114
|
+
## 🗺️ Platform landscape
|
|
115
|
+
|
|
116
|
+
> LINGSHU is a **platform**, not a single retrieval component - five pieces in one repository form an agent runtime with memory, each layer usable on its own with orthogonal boundaries (the brain depends on none of the other layers).
|
|
117
|
+
|
|
118
|
+
| Layer | Location | System capability | One-line positioning |
|
|
119
|
+
| ---------------- | ------------------------ | ----------- | --------------------------------------------------- |
|
|
120
|
+
| 🧠 **Lingshu Brain** | [`md_cg/`](md_cg/) | **Metacognition** | The memory itself: conversations settle into an md cognitive map; what is recorded / what is recalled / whether a write is allowed are all adjudicated by deterministic rules |
|
|
121
|
+
| ⚙️ **Rust retrieval engine** | [`rust/`](rust/) | Retrieval core | Zero third-party dependencies in three forms: in-process library for bulk loads / `--serve` process instance / evaluator, cross-checked against the Python measurement basis rank digit for digit |
|
|
122
|
+
| 🐝 **Swarm runtime** | [`swarm/`](swarm/) | **Self-maintenance** | Multi-process swarm execution layer: .pbc deterministic instances + Gossip topology / watermark mailbox / WAL-HMAC / health scoring |
|
|
123
|
+
| 📜 **Chinese compiler** | [`compiler/`](compiler/) | **Verification · audit** | Lexing → parsing → name-reality validation → allowlisted code generation → verification final adjudication, a five-ring deterministic compile chain |
|
|
124
|
+
| ⬢ **Hive concurrency engine** | [`hive/`](hive/) | **Self-improvement** | Worker pool atomic claim / heartbeat / timeout kill / crash recovery, file protocol as the interface, five-tool MCP access |
|
|
125
|
+
|
|
126
|
+
> All five share the same 19 items of engineering discipline and the memory closed loop (see [Engineering Discipline](#-engineering-discipline-and-designer-perspective-optional-reuse)); **if you only want memory, mount only the brain**, there is no need to understand the swarm and the compiler. **🧬 The body side** (world model seven layers / 3D scenes / white-box generation / cellular neural network / memory visualization) is published separately as [**FuRongJun-1999/lingshu**](https://github.com/FuRongJun-1999/lingshu) (combined with this brain over MCP).
|
|
127
|
+
|
|
128
|
+
## 🚫 What it is not
|
|
129
|
+
|
|
130
|
+
- **Not a foundation model** - no weights are published, no pretraining is done
|
|
131
|
+
- **Not an out-of-the-box product, and not zero cost** - it is infrastructure, and you connect your own agent; full evaluation needs a Rust toolchain and Node, and running the full suite requires compiling
|
|
132
|
+
- **Does not claim AGI** - the five-ring idea is a self-description of engineering goals, not a capability promise
|
|
133
|
+
|
|
134
|
+
## 🏗️ Architecture (DSH as the example · other MCP hosts are isomorphic)
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
DeepSeek Harness (cordis)
|
|
138
|
+
Agent Loop ──┬── 工具面 ctx.tools(cg / stg / mdcg_*)
|
|
139
|
+
└── session/event(自动记忆钩子 · 自动召回注入)
|
|
140
|
+
│ stdio · 逐行 JSON-RPC
|
|
141
|
+
┌────────────────────▼─────────────────────┐
|
|
142
|
+
│ 灵枢大脑子进程(spawn · 唯一) │
|
|
143
|
+
│ python -m md_cg.mcp_server │
|
|
144
|
+
│ cg/stg 基元 + 31 细粒度 · md 认知图真源 │
|
|
145
|
+
└──────────────────────────────────────────┘
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Memory has exactly one source of truth**: the cognitive map in `md_cg/` (plain md documents, shipped with the package); the "body" capabilities are an optional backend that no longer stores memory and does not start by default. Other MCP hosts are isomorphic: host tool surface ↔ stdio MCP ↔ `md_cg`, and the only difference is **how the discipline is injected**.
|
|
149
|
+
|
|
150
|
+
## 🧰 Tool surface
|
|
151
|
+
|
|
152
|
+
| Capability | MCP entry |
|
|
153
|
+
|---|---|
|
|
154
|
+
| Write · relation linking · structural relation | `cg(op=write)` `cg(op=link)` `stg(op=relation)` |
|
|
155
|
+
| Retrieval · conditional routing · causal chain · timeline | `mdcg_recall` `mdcg_search` `cg(op=route)` `stg(op=timeline)` |
|
|
156
|
+
| Adjudication · forgetting · conflict detection · reflection · identity · evolution | `cg(op=verify)` `cg(op=forget)` `cg(op=metacognition)` `cg(op=identity)` `cg(op=evolution)` |
|
|
157
|
+
| Importance scoring · budget packing · layered injection · memory self-scrubbing · self-maintenance patrol | `cg(op=session)` `cg(op=scrub)` `cg(op=consolidate)` `cg(op=maintain)` `cg(op=sustain)` |
|
|
158
|
+
| Session isolation · validity filtering · audit trail · reliability gate | `mdcg_remember(session=…)` `validity=true` `cg(op=audit)` `cg(op=ccg)` · [Guardrail Charter](docs/en/mdcg/guardrail-charter.md) · [CCG compilation](docs/en/mdcg/ccg.md) |
|
|
159
|
+
|
|
160
|
+
> **Optional dependency for session isolation**: the stable session identity (`s5.*`) is derived by `session5_resolve()` from **DSH** session files (**DSH only**),
|
|
161
|
+
> and **you must install `pip install zstandard` yourself** (this repository does not declare it and CI does not install it). If missing ⇒ the function returns None and writes the reason into `reason`,
|
|
162
|
+
> so the caller gets no stable identity (different processes of the same session may compute different ids ⇒ cross-session writes are mislabeled).
|
|
163
|
+
>
|
|
164
|
+
> ⚠ **Not crashing is not the same as working**: the process keeps running and memory keeps being written, but **the session isolation capability is unavailable**. Installing it does not guarantee success either -
|
|
165
|
+
> there are 8 more reasons (`not_uuid_form` / `sessions_root_not_found` / `session_file_not_found` / etc.); read `reason` first when troubleshooting.
|
|
166
|
+
|
|
167
|
+
**`tools` mode**: `'core'` (default · 2 tools) | `'brain'` / `'all'` (30 tools). The risky tools `mdcg_forget` / `mdcg_restore` / `mdcg_review_decide` require `can_admin`. For per-op mapping see [Function call mapping table](docs/mdcg/功能调用映射表_v0.1.md) and the [op reference](docs/mdcg/cogmap_ops.md) (auto-generated, `cogmap_sync.py check` guards drift).
|
|
168
|
+
|
|
169
|
+
## 🖥️ Graphical interface (optional add-on package · for DSH)
|
|
170
|
+
|
|
171
|
+
LINGSHU itself ships no interface. `ui/minimal/` is an **optional add-on package**: after installing it into the plugin directory, a "LINGSHU" panel appears on the left side of DSH (you can also open `http://127.0.0.1:<DSH port>/lingshu` directly).
|
|
172
|
+
|
|
173
|
+
```powershell
|
|
174
|
+
powershell -ExecutionPolicy Bypass -File ui/minimal/install.ps1 -PluginPath <灵枢插件目录> -CheckOnly # 只检查,不写文件
|
|
175
|
+
powershell -ExecutionPolicy Bypass -File ui/minimal/install.ps1 -PluginPath <灵枢插件目录> # 安装(可逐文件回滚)
|
|
176
|
+
powershell -ExecutionPolicy Bypass -File ui/minimal/install.ps1 -PluginPath <灵枢插件目录> -Uninstall # 卸载
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
After installing, **restart DSH** (the client bundle registers at startup). Since 0.9.15 the wiring ships with the package, so changing the plugin manifest does not require reinstalling the UI.
|
|
180
|
+
Page semantics, the three measured pitfalls (hash mismatch / leftover backups / no icon on the left) and troubleshooting → [Graphical interface: install and troubleshooting](docs/en/ops/ui-install-troubleshooting.md) · step-by-step [usage instructions](docs/en/ui/minimal.md).
|
|
181
|
+
## 🔐 Permissions: read / write / adjudicate, three layers, each narrowable on its own
|
|
182
|
+
|
|
183
|
+
It runs as a **read-only guest** by default (can read, cannot write). Three rulings: **the Designer is read-only · writes require care · adjudication requires review by reflection and verification units** - drift of the self persona and memory loss are destructive, and full permissions on an unreliable system are a disaster.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
python -m md_cg.tokens issue --role designer --actor my-agent # 签发(designer 默认全集)
|
|
187
|
+
python -m md_cg.tokens verify --token-file-in <令牌文件> # 体检(含覆盖面缺口报告)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
| Surface | Who gets it | op boundary |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| Read surface | UI panels · subagents · patrols | 17 (**excluding** `write`/`verify`/`forget`/`scrub`/`consolidate`/`index_*`/`export`/`maintain`/`link`) |
|
|
193
|
+
| Write surface | Recording unit | Adds `write` |
|
|
194
|
+
| Adjudication surface | Verification unit | Adds `verify` |
|
|
195
|
+
|
|
196
|
+
Writes tighten by layer: `contextual` can be written directly → `knowledge` needs a reflection unit → `structural` needs reflection + verification → `self`/`anchor` needs human adjudication (`MDCG_WRITE_GATE` three states: `off`/`warn`/`enforce`). Adjudication requires **dual-unit review and must not be self-certified** (`MDCG_REVIEW_DUAL_CHECK=1`). In `warn` mode, query the verdict with **`cg(op=info).write_gate`** (in-process counters, independent of the host forwarding stderr) - observe first, then switch to `enforce`.
|
|
197
|
+
Full rules, switches, and error reference → [Permissions and review model](docs/en/ops/permissions-review.md).
|
|
198
|
+
## 📚 Documentation map
|
|
199
|
+
|
|
200
|
+
| Where to go | What to read |
|
|
201
|
+
|---|---|
|
|
202
|
+
| [docs/ directory index](docs/en/README.md) | Six-domain quick index · placement rules for new documents |
|
|
203
|
+
| [Install and operations](docs/en/ops/README.md) | Install prerequisites / 30+ config options / write credentials / upgrade and restart / [Environment and known issues](docs/en/ops/environment-known-issues.md) (host warnings, size, persist-to-disk, design trade-offs) |
|
|
204
|
+
| [Evaluation overview](docs/eval/评测总览.md) | Six-system comparison / weak evidence and the evidence firewall / Chinese-English gap / public datasets / seven-axis ruler / third-party validation |
|
|
205
|
+
| [Development and coding conventions](docs/en/dev/README.md) | Test conventions / UTF-8 and id contracts / switch matrix / Linux dual-stack validation |
|
|
206
|
+
| [Multi-harness integration](docs/en/mdcg/multi-harness.md) | Discipline injection differences across five harnesses / shipping surface vs source tree boundary |
|
|
207
|
+
| **Write standards** (**shipped with the package** since 0.9.21, installed under `docs/mdcg/`) | [Write aliases](docs/en/mdcg/write-aliases.md) · [CCG six-element compilation](docs/en/mdcg/ccg.md) · [Guardrail Charter](docs/en/mdcg/guardrail-charter.md) · [MCP tool name basis](docs/en/mdcg/mcp-tool-names.md) · [Recall metadata](docs/en/mdcg/recall-metadata.md) · [World model endpoint](docs/en/mdcg/world-model-endpoint.md) · [cogmap operations](docs/mdcg/cogmap_ops.md) |
|
|
208
|
+
| [Releases](https://github.com/FuRongJun-1999/dsh-memory/releases) | Per-version changes (this README no longer maintains a release log) · [Theory, four parts](docs/theory/) |
|
|
209
|
+
|
|
210
|
+
## 🔌 Multi-harness integration (one directory per harness)
|
|
211
|
+
|
|
212
|
+
> **Main path: mount MCP directly** - what every harness shares is mounting the same stdio MCP server (`python -m md_cg.mcp_server`), with **no dependency on any plugin system**.
|
|
213
|
+
|
|
214
|
+
| Directory | Harness | Discipline injection |
|
|
215
|
+
|---|---|---|
|
|
216
|
+
| [`dsh/`](docs/en/harnesses/dsh.md) | DeepSeek Harness | `personaPrefix` in `~/.dsh/profiles/web/cordis.patch.yml` (compact · every turn) |
|
|
217
|
+
| [`codebuddy/`](docs/en/harnesses/codebuddy.md) | CodeBuddy | Project root `CODEBUDDY.md` (full · session start) |
|
|
218
|
+
| [`zcode/`](docs/en/harnesses/zcode.md) | ZCode | Project root `AGENTS.md` (full · session start) |
|
|
219
|
+
| [`codex/`](docs/en/harnesses/codex.md) | Codex CLI | Project root `AGENTS.md` (full · session start) |
|
|
220
|
+
| [`claude/`](docs/en/harnesses/claude.md) | Claude Code | Project root `CLAUDE.md` (full · session start) |
|
|
221
|
+
|
|
222
|
+
> All five harnesses **share one discipline source** (`docs/工作纪律_认知图条目_v1.1.json`), rendered by `scripts/render_discipline.py` and guarded against drift by `scripts/verify_discipline.py`.
|
|
223
|
+
|
|
224
|
+
## 🤝 Contribution and verification culture
|
|
225
|
+
|
|
226
|
+
**Submissions that are "verified to work" are especially welcome**: for issues, give the trigger condition, a minimal reproduction, and measured readings; for pull requests, attach a change description and how you verified it (re-run commands and readings); conclusions count only when they are **independently re-runnable** - [issue #1](https://github.com/FuRongJun-1999/lingshu/issues/1) is a good example (trigger chain, minimal reproduction, and criteria all present). For descriptions that lack evidence and cannot be reproduced, we reply asking for evidence first, then act.
|
|
227
|
+
|
|
228
|
+
- **PR review**: two gates, "technical review (external verifier) plus theory check (this project)"; submissions without evidence get a reply asking for more before any action
|
|
229
|
+
- **📣 Hive feedback invitation**: `hive/` is at a stable stage, but concurrency and crash recovery need real-load polishing. **Failure paths are more valuable than "it ran"** - please open an [issue](https://github.com/FuRongJun-1999/dsh-memory/issues) with `hive_doctor` output
|
|
230
|
+
- **Security defects**: use a private channel for details that are directly exploitable; everything else goes through public issues
|
|
231
|
+
|
|
232
|
+
## 📏 Engineering Discipline and Designer Perspective (optional reuse)
|
|
233
|
+
|
|
234
|
+
> LINGSHU itself runs on **18 items of engineering discipline** (theory first / handle everything / root-cause discipline / verification first / dual-copy sync / fallback paths / task dispatch always through the hive / dual content-policy lists / sensitive information isolation / memory closed loop). These were originally LINGSHU's own "self-constraint" and have nothing to do with whether you use LINGSHU; but if you want your own agent to work the same way, this discipline **can be reused directly** - [discipline source of truth](docs/工作纪律_认知图条目_v1.1.json) (each item ≡ one cognitive map node, with trigger-word routing) · [designer perspective meta-skill](skills/skills/designer-perspective/) (before acting, answer "should this be done / why do it / are the conditions sufficient"). Some clauses target LINGSHU-private pipelines; when reusing, take only the five general groups: methodology / execution / scheduling / compliance / memory closed loop.
|
|
235
|
+
|
|
236
|
+
## Guardrail Charter · License
|
|
237
|
+
|
|
238
|
+
This plugin, once integrated, accepts the constraints of the **[LINGSHU Guardrail Charter v2.0-published](docs/en/mdcg/guardrail-charter.md)** - public, executable, auditable rules on the behavioral boundary for external agents and human users, protecting human users.
|
|
239
|
+
|
|
240
|
+
MIT © Rong (FuRongJun-1999) · LINGSHU engineering implementation. DeepSeek Harness is an official open-source project of DeepSeek (MIT); this plugin is not affiliated with it.
|
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> **Languages:** 中文 · [English](README.en.md)
|
|
2
|
+
|
|
1
3
|
<div align="center">
|
|
2
4
|
|
|
3
5
|
# 灵枢 LINGSHU
|
|
@@ -79,7 +81,7 @@ python -m md_cg.mcp_server # 直连自检:收到 initialize 应答
|
|
|
79
81
|
| 你说 | 背后发生什么(真实工具链) |
|
|
80
82
|
| ------------------- | ---------------------------------------------------- |
|
|
81
83
|
| 「请记住:我们团队的发布窗口是每周三」 | Agent 显式归档 → `cg(op=write)` 过三道闸门 → 认知图节点落盘 |
|
|
82
|
-
| (新开会话)「我们的发布窗口是哪天?」 |
|
|
84
|
+
| (新开会话)「我们的发布窗口是哪天?」 | 自动注入**本会话 timeline**(`stg(op=timeline)`,按 session 过滤);**跨会话 knowledge 层不自动浮现**,需显式 `cg(op=read)` / `mdcg_recall` 检索后才带入回答 |
|
|
83
85
|
| 「把上次定的接口约定讲一遍」 | `cg(op=route)` 条件路由 + `stg(op=timeline)` 时间线回溯,跨会话取出 |
|
|
84
86
|
|
|
85
87
|
## 🌕 月下契约——灵枢的五环理念
|
package/docs/README.md
CHANGED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
> [!NOTE]
|
|
2
|
+
> **This is a reference translation.** The English docs may lag behind or omit content; **the Chinese documentation is the single source of truth**. When they disagree, the Chinese version wins. Every page here has a Chinese source pair in [TRANSLATION_MANIFEST.json](TRANSLATION_MANIFEST.json), and its language header links back to that source. See [TRANSLATION.md](TRANSLATION.md) for the policy.
|
|
3
|
+
|
|
4
|
+
> **Languages:** [中文](../README.md) · English
|
|
5
|
+
|
|
6
|
+
# docs/ directory index
|
|
7
|
+
|
|
8
|
+
> Directories are split by engineering domain and correspond to the five-part platform overview in the repository README. A new document joins a domain first and is then registered in the matching list on this page; cross-domain items stay at the top level. Before changing the path of the discipline source of truth, check every reference surface (AGENTS.md / the rendering pipeline / md_cg comments).
|
|
9
|
+
|
|
10
|
+
## Directory structure
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
docs/
|
|
14
|
+
├── ops/ 安装与运维(安装前置 / 写入凭据 / 升级重启 / FAQ)
|
|
15
|
+
├── dev/ 开发与编码约定(测试约定 / 编码契约 / 开关矩阵)
|
|
16
|
+
├── mdcg/ 灵枢大脑 md_cg 工程(架构/工具表/发布/教程/护栏)
|
|
17
|
+
├── swarm/ 蜂群运行时 swarm/
|
|
18
|
+
├── hive/ 蜂巢并发引擎 hive/
|
|
19
|
+
├── world_model/ 世界模型神经网络底层架构(hex 系列台账)
|
|
20
|
+
├── theory/ 智能论与白箱智能理论(跨工程)
|
|
21
|
+
├── eval/ 评测与第三方验证报告
|
|
22
|
+
├── plans/ 项目计划 / 交接文档 / 实验规格(跨工程)
|
|
23
|
+
├── discipline/ 工作纪律渲染管线(模板 / harness 矩阵)
|
|
24
|
+
├── promo/ 宣传物料
|
|
25
|
+
├── experiments/ 实验区(gitignored,可重跑再生产物)
|
|
26
|
+
└── 工作纪律_认知图条目_v1.1.json ← 全局真源(横切面,不属单一工程)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## mdcg/ · LINGSHU Brain md_cg project
|
|
30
|
+
|
|
31
|
+
| Document | Content |
|
|
32
|
+
|---|---|
|
|
33
|
+
| [README detailed edition](../mdcg/README详细版_v0.4.10.md) | Full capability reference · complete configuration key table |
|
|
34
|
+
| [Release notes v0.3.0](../mdcg/release_v0.3.0.md) / [v0.4.5](../mdcg/release_v0.4.5.md) / [v0.4.11](../mdcg/release_v0.4.11.md) | Changes per release / upgrade guidance |
|
|
35
|
+
| [Tool table v0.3.0](../mdcg/tool_table_v0.3.0.md) | MCP tool list |
|
|
36
|
+
| [Feature call mapping table v0.1](../mdcg/功能调用映射表_v0.1.md) | Feature → source line numbers (pipeline generated; do not hand-write line numbers) |
|
|
37
|
+
| [LINGSHU MCP tool master table v3.4](../mdcg/灵枢MCP工具总表_v3.4.md) | Tool parameters and invocation rules |
|
|
38
|
+
| [LINGSHU 82-tool migration mapping v0.1](../mdcg/灵枢82工具_功能整理与迁移映射_v0.1.md) | **Historical**: the 82 tools belong to the tool surface of the **legacy aeis engine** (not this repository's md_cg); the mapping goal is to keep the two primitive surfaces `cg` and `stg` and to **register no more** of the 82 standalone tools |
|
|
39
|
+
| [LINGSHU self layer definition](../mdcg/灵枢_自我层定义.md) | Self layer behavior rules (line-level references from test_p16) |
|
|
40
|
+
| [Three-layer split plan v0.1](../mdcg/灵枢三层拆分规划_v0.1.md) | Architecture layering plan |
|
|
41
|
+
| [Memory operating system MdCGOS and MCP integration v0.1](../mdcg/记忆操作系统_MdCGOS与MCP接入_v0.1.md) | Core architecture design |
|
|
42
|
+
| [Recall core state and provenance metadata](mdcg/recall-metadata.md) | Field provenance, state semantics, and compatibility of the metadata returned by Recall |
|
|
43
|
+
| [Cognitive map MD directory plan v0.1](../mdcg/认知图_MD目录方案_v0.1.md) | Directory plan (the acceptance target of test_p27) |
|
|
44
|
+
| [Cognitive map indexing and engineering normalization plan v0.1](../mdcg/认知图_索引与工程规范化_计划_v0.1.md) | Index engineering |
|
|
45
|
+
| [Cognitive map condition space composition and effective condition measurement basis v0.1](../mdcg/认知图_条件空间合成与生效条件口径_v0.1.md) | Condition theory measurement basis |
|
|
46
|
+
| [Cognitive map G4-G8 gap adjudication sheet v0.1](../mdcg/认知图_G4-G8缺口裁定单_v0.1.md) | Record of gap adjudications |
|
|
47
|
+
| [Cognitive map as a memory operating system: evaluation and route v0.1](../mdcg/认知图作为记忆操作系统_评估与路线_v0.1.md) | Roadmap |
|
|
48
|
+
| [Unit self-anchor system prompt standard v0.3](../mdcg/单元自我锚点_系统提示词标准_v0.3.md) | Prompt anchor standard |
|
|
49
|
+
| [Gap sheet P0 closeout v0.1](../mdcg/缺口单_P0收口_v0.1.md) | P0 gap list |
|
|
50
|
+
| [Source-level architecture audit: GPT critique comparison v1.0](../mdcg/源码级架构审计_GPT批评对照_v1.0.md) | External audit evidence |
|
|
51
|
+
| [Guardrail Charter v2.0](mdcg/guardrail-charter.md) | Behavior boundaries for external agents and humans |
|
|
52
|
+
| [memory_score](../mdcg/memory_score.html) ([png](../mdcg/memory_score.png)) · [memory-assessment](../mdcg/memory-assessment.html) · [tutorial](../mdcg/lingshu_tutorial.html) | Scoring / evaluation / tutorial |
|
|
53
|
+
| [Release gate chain v0.1](../mdcg/发布门禁链_v0.1.md) | Three-layer gate (pre-commit auto re-hook / prepublishOnly check / CI backstop) and installation |
|
|
54
|
+
| [Sleep cycle: operational prerequisites and maintenance guide v1.0](../mdcg/睡眠周期_运维前提与维护指南_v1.0.md) | git prerequisites of the sleep cycle / repository location / maintenance actions (view history, view changes, revert-only rollback, conflict parking) / switches and automation boundaries |
|
|
55
|
+
| [D_meta engineering plan v0.2](../mdcg/D_meta_工程化方案_v0.2.md) | Engineering plan for separating D_task and D_meta |
|
|
56
|
+
| [Code review and conditional comments contract v0.1](../mdcg/代码评审与条件化注释_契约_v0.1.md) | Review and conditional comment contract |
|
|
57
|
+
| [Repository-wide code review and conditional comments plan v0.1](../mdcg/全库代码评审与条件化注释_计划_v0.1.md) | Repository-wide review execution plan |
|
|
58
|
+
| [LINGSHU memory verb protocol v1.0 (draft)](../mdcg/灵枢记忆动词协议_v1.0-draft.md) | Draft memory verb protocol |
|
|
59
|
+
| [Cycle two: white-box fill pipeline v0.1](../mdcg/环二_白箱填充流水线_v0.1.md) | White-box fill pipeline (recorded during testing) |
|
|
60
|
+
| [Cross-end verification and sync protocol v0.1](../mdcg/跨端验证与同步协议_v0.1.md) | Cross-end verification and sync protocol |
|
|
61
|
+
| [Memory system architecture optimization: delivery-layer bottleneck theory and design v0.1](../mdcg/记忆系统架构优化_交付层瓶颈理论与设计_v0.1.md) | A unified principle from two papers (DeliverMem / GroundingPI) → comparison against the current state of the five LINGSHU principles → four-layer rework direction → experiment specs that locate the bottleneck (two oracles); a theory document with no implementation patch |
|
|
62
|
+
| [External submission verification: state chain track v0.2 (TanPowasd)](../mdcg/外部提交核验_状态链轨v0.2_TanPowasd_20261011.md) | **Independent recomputation** record for the external answers to issue #110/#111: our official scorer plus the submitter's answer sheet → ten main-arm readings reproduced digit by digit, four calibration gates `passed=True`; includes five qualifications and one self-correction |
|
|
63
|
+
| [State chain track v0.2: LINGSHU arm A/B full measurement](../mdcg/状态链轨_灵枢臂A-B全量实测_20261012.md) | A 625-question comparison under the official measurement basis harness in which **for the same adapter, only `created_at` differs**: B (fact_time) shows +0.53 current value and -0.40 staleness, yet -0.27 history, -0.18 four-state, and -0.16 rationale, so **B is not a net improvement**; the work also exposed a coverage defect in the harness change chain (both groups at about 0) |
|
|
64
|
+
|
|
65
|
+
## swarm/ · Swarm runtime
|
|
66
|
+
|
|
67
|
+
| Document | Content |
|
|
68
|
+
|---|---|
|
|
69
|
+
| [Feature description v0.6](../swarm/蜂群多智能体_功能说明_v0.6.md) | Deterministic .pbc instances + Gossip/WAL/trust aggregation |
|
|
70
|
+
| [Usage report 2026-09-13](../swarm/蜂群多智能体_使用报告_20260913.md) | Measurement record |
|
|
71
|
+
| [Swarm interconnection v0.1](../swarm/蜂群互联_v0.1.md) | Multi-swarm interconnection protocol |
|
|
72
|
+
| [Swarm blind-spot marking v1.0](../swarm/蜂群盲区标记_v1.0.md) | Cooperative blind-spot marking |
|
|
73
|
+
| [Swarm same-error detection experiment protocol v0.1](../swarm/蜂群同错检测实验协议_v0.1.md) | Same-error detection experiment design |
|
|
74
|
+
|
|
75
|
+
## hive/ · Hive concurrency engine
|
|
76
|
+
|
|
77
|
+
| Document | Content |
|
|
78
|
+
|---|---|
|
|
79
|
+
| [Hive working memory: project plan](../hive/蜂巢工作记忆_项目计划.md) | hive working memory plan |
|
|
80
|
+
| [Hive design: theory alignment v0.1](../hive/蜂巢设计_理论对齐_v0.1.md) | Three-way alignment among intelligence theory 3.4, the hive source, and external research: 20 anchor mappings / 6 design adjudications / grouped adjudication of the candidate list / four-phase route / honest boundaries |
|
|
81
|
+
| [Hive iteration: macro and collective scheduling v0.1](../hive/蜂巢迭代_宏观与群体调度_v0.1.md) | Three-layer scheduling (micro process already closed loop / meso task DAG this cycle / macro collective planning) + comparison against the seven dsh-omc invariants + construction details of the I-1 dependency gate |
|
|
82
|
+
| [Main agent and subagent memory architecture design](../hive/主代理子代理记忆架构设计.md) | Memory division across agents (three-layer memory / session isolation / card backflow) |
|
|
83
|
+
| [Subagent configuration standard v0.5](../hive/子代理配置标准_v0.5.md) | Runtime role topology, six positions (section 8: deputy agent = Designer perspective) / unified execution defaults (section 0) / dispatch / deterministic execution (section 7) / reuse / artifact lifecycle (section 5.4) |
|
|
84
|
+
| [Token and role authority separation v0.1](../hive/令牌与角色权职分离_v0.1.md) | Permission model |
|
|
85
|
+
| [Token semantics correction: arbitration seat v0.1](../hive/令牌语义修正_仲裁位_v0.1.md) | Design draft: new orchestr role (projection of the 3.9 arbitration instance) + split gates for adjudication power and management power + migration order and red-capability criteria |
|
|
86
|
+
| [Multi-end harness communication contract v0.1](../hive/多端harness通信契约_v0.1.md) | Multi-end harness communication contract |
|
|
87
|
+
| [Hive dual-instance cross-verification: design final](../hive/蜂巢双实例互验_设计定稿.md) | Engineering form of dual-instance cross-verification that breaks the self-reference paradox (design final) |
|
|
88
|
+
| [Retrieval path and cognitive structure contract v0.1](../hive/检索路径与认知结构契约_v0.1.md) | Retrieval path and cognitive structure contract |
|
|
89
|
+
| [Retrieval convergence measurement (agreed basis) and S1b design v0.1](../hive/检索收敛实测与S1b设计_v0.1.md) | Retrieval convergence measurement on the agreed basis (real library, 12,149 nodes, read-only) and S1b design |
|
|
90
|
+
| [Real-library end-to-end measurement: S1b benefit and recall tradeoff v0.1](../hive/真实库端到端实测_S1b与召回权衡_v0.1.md) | Measurement of S1b benefit and recall tradeoff |
|
|
91
|
+
| [Real-library end-to-end measurement: S7 inverted candidate layer v0.1](../hive/真实库端到端实测_S7倒排候选层_v0.1.md) | Measurement of the S7 inverted candidate layer (in-candidate speedup with zero recall loss) |
|
|
92
|
+
|
|
93
|
+
## world_model/ · World model neural network foundation
|
|
94
|
+
|
|
95
|
+
| Document | Content |
|
|
96
|
+
|---|---|
|
|
97
|
+
| [World model: neural network foundation v1.0](../world_model/世界模型_神经网络底层架构_v1.0.md) | hex series engineering ledger (11 components / backprop semantics / Rust backend / cognitive map integration surface / verification baseline and red lines) |
|
|
98
|
+
|
|
99
|
+
## theory/ · Intelligence theory
|
|
100
|
+
|
|
101
|
+
| Document | Content |
|
|
102
|
+
|---|---|
|
|
103
|
+
| [What is white-box intelligence?](../theory/白箱智能是什么?.md) | Lesson one |
|
|
104
|
+
| [The cognitive process of intelligence](../theory/智能的认知过程.md) | Lesson two |
|
|
105
|
+
| [Axiomatic foundations of intelligence](../theory/智能的公理化基石.md) | Lesson three |
|
|
106
|
+
| [Why the information gap necessarily exists and naturally widens](../theory/信息差为什么必然存在且自然扩大.md) | Lesson four |
|
|
107
|
+
| [White-box intelligence series, part five: giving AI real memory](../theory/白箱智能系列·第五篇:让AI真正装上记忆.md) | Series continuation |
|
|
108
|
+
| [Intelligence theory 3.4](../theory/智能论3.4.md) | Main theory document |
|
|
109
|
+
| [Necessity of concurrency theory v0.2](../theory/并发必然性理论_v0.2.md) | Argument for the necessity of a concurrent architecture |
|
|
110
|
+
| [Single thread and attention focus v1.0](../theory/单线程与注意力集中_无争议理论文档_v1.0.md) | Undisputed theory document (includes a verification evidence table) |
|
|
111
|
+
| [Concept hierarchy alignment table v0.1](../theory/概念分层对齐表_v0.1.md) | Concept level alignment |
|
|
112
|
+
| [Cognitive agents and convergence structure: condition theory reconstruction v0.1](../theory/认知代理与收敛结构_条件论重构_v0.1.md) | Condition theory |
|
|
113
|
+
| [Theory, mechanism, code, experiment, gap matrix v0.1](../theory/理论_机制_代码_实验_缺口矩阵_v0.1.md) | Panorama matrix |
|
|
114
|
+
| [Unreliability theorems and fail-first framework v0.3](../theory/不可靠定理与失效优先框架_v0.3.md) | Fail-First Theorems: derivation chain of the T0 failure theorem (T0-T14/A1-A4) · a 14-row theory x mechanism x code matrix (engineering verification 2026-09-26) · a landing checklist that includes a v0.1 carry-over section |
|
|
115
|
+
| [Theory repository split and white-box knowledge base migration v0.1](../theory/理论仓拆分与白箱知识库内迁_v0.1.md) | Split plan |
|
|
116
|
+
| [Insufficient context and memory system isomorphism: principle analysis v0.1](../theory/上下文不足_LLM与记忆系统同构_原理分析_v0.1.md) | Triple isomorphism between LLM architecture and memory systems (function, problem, solution); derives from T4 + T5 that the four capabilities require explicit representation; P1-P4 falsifiable predictions |
|
|
117
|
+
| [Deriving memory system tuning from the LLM inference framework v0.1](../theory/LLM推理框架原理_向记忆系统移植_v0.1.md) | Eight transferable principles (stage separation / asymmetric resources / cache layering / compute-storage partitioning / bounded replay / two-level hit / marginal return / one-tick async latency) + strict transfer criteria + a clear decision not to transfer three layers; includes the honest boundary that we lack a 155-trillion-token-per-day calibration bench |
|
|
118
|
+
|
|
119
|
+
## eval/ · Evaluation and third-party verification
|
|
120
|
+
|
|
121
|
+
> **How to read this (check the measurement basis before the numbers)**: the evaluations in this directory use **several independent rulers**: (1) **seven-dimension tier judgment** (six vendors on one ruler, v3.1, the primary measurement basis, **gives a tier rather than a single score**); (2) **external independent eight-dimension weighting** (unified score v7, **only two vendors compared, and the gap is inside the noise**); (3) this repository's own question pool (historical measurement basis, kept for reproducibility). **The three are not comparable with each other**; cite the measurement basis together with the number.
|
|
122
|
+
|
|
123
|
+
| Document | Content |
|
|
124
|
+
|---|---|
|
|
125
|
+
| [AGI seven-dimension scoring report v3.1 (six vendors on one ruler, plus single-vendor U/I self-test)](../eval/AGI七维评分报告_六家记忆系统同尺实测_v3.1.md) | Seven dimensions x six vendors measured / live single-vendor U and I self-test (▲) / mapping rules / honest boundaries |
|
|
126
|
+
| [Relationship chain retrieval: weak-branch budget starvation fix](../eval/chain_best_first_20261013.md) | Before/after comparison of changing the native Markdown default (RRF), an independent exhaustive guard, targeted mutation, and resource boundaries |
|
|
127
|
+
| [DSH closeout audit counts: #606 delivery record](../eval/hook_audit_summary_20261021.md) | Cumulative summary on close/update, silent degradation, 73 regressions, and 5 targeted mutation groups |
|
|
128
|
+
| [AGI seven-dimension scoring report v1.0](../eval/AGI七维评分报告_md_cg_v1.0.md) / [v2.0](../eval/AGI七维评分报告_md_cg_v2.0.md) (historical) | Single-vendor self-assessment (structural evidence measurement basis) |
|
|
129
|
+
| [Third-party re-evaluation, unified score v7](../eval/第三方验证报告_灵枢_vs_dejavu_统一评分_v7.md) | Seven rounds of comparison (**external independent ruler, only two vendors, not comparable with the seven-dimension tier judgment**): LINGSHU 9.258 / deja-vu 9.119; **the reviewer states that the gap is within review noise**, and v7 contains an erratum that **fully withdraws** all four of its own recommendations |
|
|
130
|
+
| [Third-party verification, independent LoCoMo reproduction](../eval/第三方验证报告_LoCoMo_灵枢_.md) ([png](../eval/第三方验证报告_LoCoMo_灵枢_.png)) | Full end-to-end reproduction of the independent evaluation |
|
|
131
|
+
| [Six-vendor cross-comparison, 100 questions with Chinese and English lookups v1.0](../eval/横评_六家100题中英双查_v1.0.md) | Six vendors under one measurement basis |
|
|
132
|
+
| [Experiment plan: learning loop A/B and cross-comparison v1.0](../eval/实验方案_学习闭环AB与横评_v1.0.md) | Experiment design |
|
|
133
|
+
|
|
134
|
+
## ops/ · Installation and operations
|
|
135
|
+
|
|
136
|
+
| Document | Content |
|
|
137
|
+
|---|---|
|
|
138
|
+
| [ops/ index](ops/README.md) | Entry point for the two pages in this domain |
|
|
139
|
+
| [Installation and prerequisites](ops/install.md) | One-command setup / manual three steps / prerequisites / verified environments / post-install verification / troubleshooting clues |
|
|
140
|
+
| [Operations and troubleshooting](ops/operations-troubleshooting.md) | An upgrade requires restarting the long-running process (proxy verification) / write credentials and `committed` semantics / FAQ |
|
|
141
|
+
|
|
142
|
+
## dev/ · Development and coding conventions
|
|
143
|
+
|
|
144
|
+
| Document | Content |
|
|
145
|
+
|---|---|
|
|
146
|
+
| [dev/ index](dev/README.md) | Entry point for the two pages in this domain |
|
|
147
|
+
| [Coding and testing conventions](dev/coding-testing.md) | Build / Python tests must use -m / everything UTF-8 with entry-point guarantees / id contract v2 / Linux dual-stack verification |
|
|
148
|
+
| [Switch matrix](dev/switch-matrix.md) | Retrieval and normalization env switches, their defaults, and the history of their adjudication |
|
|
149
|
+
|
|
150
|
+
## plans/ · Project plans, handoffs, and specs
|
|
151
|
+
|
|
152
|
+
| Document | Content |
|
|
153
|
+
|---|---|
|
|
154
|
+
| [Naming governance: project plan](../plans/命名治理_项目计划.md) | Naming convention governance |
|
|
155
|
+
| [Knowledge graph project: handoff document 2026-09-14](../plans/知识图谱项目_交接文档_20260914.md) | Project handoff |
|
|
156
|
+
| [GridWorld minimal closed loop spec v0.1](../plans/GridWorld最小闭环规格_v0.1.md) | Experiment spec |
|
|
157
|
+
| [Multi-subject world model: alignment evaluation and landing design v0.1](../plans/多主体世界模型_对齐评估与落地设计_v0.1.md) | Five-layer alignment evaluation plus an A to B to C construction baseline (33 review findings adjudicated) |
|
|
158
|
+
| [Semantic spatiotemporal graph completion, world model endpoint design v0.1](../plans/语义时空图补全_世界模型功能端_设计_v0.1.md) | Current-state inventory (four ops plus the L0 ledger) plus L2 slot schema direction plus corpus pipeline and acceptance measurement basis (pending sign-off) |
|
|
159
|
+
| [LINGSHU collaboration architecture design v0.1](../plans/灵枢协作架构_设计_v0.1.md) | Swarm x project management x resource allocation x group chat x team memory: unified task lifecycle (one state machine with two authoritative surfaces) plus three-layer isomorphic nesting plus phased red-capability criteria (design draft, with 6 open adjudications) |
|
|
160
|
+
| [LINGSHU trust wiring design spec v0.1](../plans/灵枢信任接线_设计规格_v0.1.md) | Wires the existing trust value (p_trust in links.py) into resource allocation: three read-side gates, a write-side closed loop, and a tier table, plus ten red-capability criteria (the basis for starting P2, with 5 open adjudications) |
|
|
161
|
+
| [Relative time anchoring design v0.1](../plans/相对时间锚定_设计_v0.1.md) | `MDCG_TIME_ANCHOR` (off by default): relative times in prose become derived event intervals `temporal_anchor`; a question that names a date takes the `time_anchor` route plus an intersection precondition; LoCoMo readings, a contamination statement, and a lower bound |
|
|
162
|
+
|
|
163
|
+
## Bounty board · now its own repository
|
|
164
|
+
|
|
165
|
+
The bounty board (rules / state machine / ledger / honor roll / release template) has moved to the standalone repository [`FuRongJun-1999/dsh-bounty`](https://github.com/FuRongJun-1999/dsh-bounty); this repository no longer maintains its implementation. The design draft remains as a one-page pointer at [the bounty board design draft](../plans/悬赏板设计_v0.1.md).
|
|
166
|
+
|
|
167
|
+
## Top-level cross-cutting handoff documents (stay at the docs/ root, not in a subdomain)
|
|
168
|
+
|
|
169
|
+
Learning handoffs and master documents that span projects or endpoints stay at the docs/ root by convention (the L3 convention):
|
|
170
|
+
|
|
171
|
+
| Document | Content |
|
|
172
|
+
|---|---|
|
|
173
|
+
| [GBrain borrowables: LINGSHU landing handoff 20260919](../GBrain可借鉴点_灵枢落点交接_20260919.md) | GBrain borrowables and their LINGSHU landing points |
|
|
174
|
+
| [Pi learnable strengths: LINGSHU Brain improvement handoff 20260915](../Pi可学习优点_灵枢大脑改进交接_20260915.md) | Handoff for absorbing Pi strengths |
|
|
175
|
+
| [Compute-in-memory architecture study: external theory comparison and route handoff 20260916](../存算一体架构学习_外部理论对照与路线交接_20260916.md) | Compute-in-memory external theory comparison |
|
|
176
|
+
| [Compute-in-memory neural network architecture: master plan and handoff 20260916](../存算一体神经网络架构_总纲与交接_20260916.md) | Compute-in-memory master plan |
|
|
177
|
+
| [LINGSHU self-improvement work plan: absorbing the external research series v1 20260919](../灵枢自我改进工作计划_外部研究系列吸收_v1_20260919.md) | Self-improvement work plan |
|
|
178
|
+
| [White-box program: three-project learning architecture and Ghidra handoff 20260916](../白箱化纲领_三项目学习总架构与Ghidra交接_20260916.md) | White-box program master plan |
|
|
179
|
+
| [Memory review system: project initiation design and construction handoff 20260915](../记忆评审系统_立项设计与施工交接_20260915.md) | Memory review initiation handoff |
|
|
180
|
+
| [Scale: multi-subject world model evaluation spec v2.1 (frozen)](../秤_记忆系统评测规范_v2.1.md) | Memory system evaluation spec: dual track / six conditions / four-state judgment / calibration zero precondition gate (cross-cutting evaluation spec, added 2026-10-05) |
|
|
181
|
+
| [Release artifact retrospective note v0.1](../发布件回溯说明_v0.1.md) | Release artifact retrospective |
|
|
182
|
+
|
|
183
|
+
## Domain assignment rules (where a new document goes)
|
|
184
|
+
|
|
185
|
+
1. **Engineering documents** go to the matching engineering domain (`mdcg/`, `swarm/`, `hive/`, `world_model/`; when rust or compiler gets dedicated documents, add a directory at the same level).
|
|
186
|
+
2. **Cross-project theory** goes to `theory/`; **evaluation and third-party reports** go to `eval/`; **plans, handoffs, and specs** go to `plans/`.
|
|
187
|
+
3. **Cross-cutting global items** (such as the discipline source of truth) stay at the top level; before moving one, check every reference surface and rewrite all of them.
|
|
188
|
+
4. After a document joins a domain, register one line for it in the matching list on this page; existing conventions for `discipline/`, `experiments/`, and `promo/` are unchanged.
|
|
189
|
+
|
|
190
|
+
- [Memory-RSI five rounds of work and commit scope (round five in progress)](../eval/memory-rsi-work-summary-20261012.md)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# English translation policy
|
|
2
|
+
|
|
3
|
+
> **Languages:** [中文](../README.md) · English
|
|
4
|
+
|
|
5
|
+
This directory contains the English edition of the user-facing LINGSHU documentation. It is a translation, not a fork. The Chinese files remain the source of truth.
|
|
6
|
+
|
|
7
|
+
## Scope
|
|
8
|
+
|
|
9
|
+
Translated surfaces:
|
|
10
|
+
|
|
11
|
+
- the root README and CHANGELOG
|
|
12
|
+
- the documentation index
|
|
13
|
+
- operations, development, and protocol guides under docs/ops and docs/dev
|
|
14
|
+
- the Guardrail Charter and the user-facing protocol notes under docs/mdcg
|
|
15
|
+
- the five harness integration guides
|
|
16
|
+
- the optional UI guide
|
|
17
|
+
- the AI coding standards under docs/规范
|
|
18
|
+
|
|
19
|
+
Not translated:
|
|
20
|
+
|
|
21
|
+
- historical evaluation, experiment, plan, theory, discipline, promotion, and retrospective records
|
|
22
|
+
- skills/ conditional units and runtime prompts
|
|
23
|
+
- UI runtime source files and their integrity hashes
|
|
24
|
+
- generated documents listed in docs/en/TRANSLATION_MANIFEST.json
|
|
25
|
+
|
|
26
|
+
Generated documents are produced from source code by scripts/cogmap_sync.py. Editing or translating them by hand would drift from the generator. See docs/en/mdcg/generated-docs.md.
|
|
27
|
+
|
|
28
|
+
## Source of truth
|
|
29
|
+
|
|
30
|
+
The Chinese files are the single source of truth. The English pages are a reference translation. They may lag behind, omit content, or use different wording. When a translation and its source disagree, the Chinese source wins, and the English page is corrected in a follow-up. A Chinese-only change does not need to wait for an English update.
|
|
31
|
+
|
|
32
|
+
Each translated page carries a language header near the top that links back to its Chinese source. The two entry pages put the reference-translation note first. The manifest pair is the machine-readable version of the same relationship.
|
|
33
|
+
|
|
34
|
+
## Staleness policy
|
|
35
|
+
|
|
36
|
+
English documentation can legitimately lag behind the Chinese source. Staleness is reported, not treated as a reason to weaken or revert the Chinese source.
|
|
37
|
+
|
|
38
|
+
scripts/audit_translation.py is a local reporting and review tool. It is not a required CI merge gate. Its findings describe structural drift or untranslated prose; they do not override the Chinese source of truth. If the audit is wired into CI later, run it in report-only mode or treat its output as advisory, so a Chinese-only change is never blocked by translation debt.
|
|
39
|
+
|
|
40
|
+
## Structural fidelity
|
|
41
|
+
|
|
42
|
+
The audit gate compares each pair for:
|
|
43
|
+
|
|
44
|
+
- source and target existence
|
|
45
|
+
- a language header in the first ten lines that links back to the source
|
|
46
|
+
- byte-identical fenced code blocks
|
|
47
|
+
- identical ATX heading level sequences
|
|
48
|
+
- no untranslated Han characters in prose
|
|
49
|
+
- no CJK punctuation in prose
|
|
50
|
+
- every relative markdown link resolving
|
|
51
|
+
- every scope file translated or explicitly excluded
|
|
52
|
+
- no hand translation of generated documents
|
|
53
|
+
|
|
54
|
+
Run it with:
|
|
55
|
+
|
|
56
|
+
python scripts/audit_translation.py --check
|
|
57
|
+
|
|
58
|
+
Machine-readable output:
|
|
59
|
+
|
|
60
|
+
python scripts/audit_translation.py --json
|
|
61
|
+
|
|
62
|
+
Regenerate the report after a change:
|
|
63
|
+
|
|
64
|
+
python scripts/audit_translation.py --write-report
|
|
65
|
+
|
|
66
|
+
Exit code 0 means pass, 1 means findings, 2 means a usage or manifest error.
|
|
67
|
+
|
|
68
|
+
## Maintenance
|
|
69
|
+
|
|
70
|
+
When a Chinese source changes, update the English target in the same pull request and run the audit. When a new user-facing document is added, add it to the manifest, translate it, and extend the scope. Do not add a translated page without a manifest pair; the coverage check will reject orphan files in scope.
|
|
71
|
+
|
|
72
|
+
## Vocabulary
|
|
73
|
+
|
|
74
|
+
Use docs/en/glossary.md. Add missing terms there before using them in a page.
|
|
75
|
+
|
|
76
|
+
## What stays Chinese
|
|
77
|
+
|
|
78
|
+
Code fences stay byte-identical, including Chinese comments, because the audit treats code as executable content. Inline code spans may contain Chinese identifiers when they name a real file, command, or label. Prose must be English.
|