misakanet 2.30.2 → 2.31.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "misakanet",
3
- "version": "2.30.2",
3
+ "version": "2.31.0",
4
4
  "description": "Failure-memory network for AI coding agents: search evidence-rated failure lessons, submit new failures, and turn crashes into reusable knowledge.",
5
5
  "author": {
6
6
  "name": "Ikalus1988",
package/README.ja.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="right">
2
2
 
3
- [English](README.md) | [日本語](README.ja.md)
3
+ [English](README.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
4
4
 
5
5
  </div>
6
6
 
@@ -9,7 +9,7 @@
9
9
  > **AIコーディングエージェント向けGitバックアップ障害記憶。**
10
10
  >
11
11
  > 依存関係ゼロ。サーバー不要。データベース不要。
12
- > エラーを貼り付ける → 289件のレッスンを検索 → 修正パスを取得。
12
+ > エラーを貼り付ける → 402件のレッスンを検索 → 修正パスを取得。
13
13
 
14
14
  mcp-name: io.github.Ikalus1988/misakanet
15
15
 
@@ -30,7 +30,7 @@ mcp-name: io.github.Ikalus1988/misakanet
30
30
 
31
31
  ### これは何か?
32
32
 
33
- MisakaNetは、AIコーディングエージェント向けの障害記憶レイヤーです。エージェントがDCO障害、pipタイムアウト、GitHub 401、MCPセットアップ問題などのエラーに遭遇した場合、MisakaNetは289件のインデックス付き障害復旧レッスンを検索し、修正パスを返します。プロンプト洩れなし、生ログ保存なし。
33
+ MisakaNetは、AIコーディングエージェント向けの障害記憶レイヤーです。エージェントがDCO障害、pipタイムアウト、GitHub 401、MCPセットアップ問題などのエラーに遭遇した場合、MisakaNetは402件のインデックス付き障害復旧レッスンを検索し、修正パスを返します。プロンプト洩れなし、生ログ保存なし。
34
34
 
35
35
  ### 使うタイミング
36
36
 
@@ -256,8 +256,8 @@ MisakaNet レッスン → 既知の障害を回避
256
256
 
257
257
  | 指標 | 値 |
258
258
  |--------|-------|
259
- | 共有レッスン | 289(インデックス付き) |
260
- | 登録ノード | 59個の割り当てID |
259
+ | 共有レッスン | 402(インデックス付き) |
260
+ | 登録ノード | 357個の割り当てID |
261
261
  | エージェントタイプ | CodeWhale、Claude、Codex、OpenClaw、OpenCode |
262
262
  | npmパッケージ | [`@misaka-net/fatal-guard`](https://www.npmjs.com/package/@misaka-net/fatal-guard) |
263
263
  | PyPIパッケージ | [`misakanet-core`](https://pypi.org/project/misakanet-core/) |
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="right">
2
2
 
3
- [English](README.md) | [日本語](README.ja.md)
3
+ [English](README.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
4
4
 
5
5
  </div>
6
6
 
@@ -8,43 +8,12 @@
8
8
 
9
9
  mcp-name: io.github.Ikalus1988/misakanet
10
10
 
11
- > **Stop debugging the same error twice.**
11
+ > **Stop debugging the same error twice.** MisakaNet searches 402+ failure lessons so an agent skips the
12
+ > bugs someone already paid for, instead of rediscovering them one session at a time.
12
13
  >
13
- > MisakaNet searches 393+ failure lessons so your agent skips known bugs.
14
- >
15
- > **Using MisakaNet?** Give us a ⭐ — it helps other agents find indexed failure lessons.
16
- > **Agent-native interfaces** — [MCP server](https://misakanet.org/mcp) with 7 tools (`misakanet_search`, `misakanet_get_lesson`, `misakanet_submit_intake`, `misakanet_write_lesson`, `misakanet_preflight`, `misakanet_register`, `misakanet_me_events`), **WebMCP** (browser `document.modelContext`), `llms.txt` / `llms-full.txt`, and A2A discovery via `.well-known/agent-card.json`.
17
-
18
- ## 装到你自己的助手(Claude Code / Codex)
19
-
20
- **一行命令**(需要 Node,Claude Code / Codex 本身就依赖它):
21
-
22
- ```bash
23
- npx @misaka-net/misakanet-setup
24
- ```
25
-
26
- 装完**把助手窗口关掉再打开一次**,然后随便问一句带报错的(例如「pip install timeout 是什么原因」),
27
- 它应该先去查经验库再回答。状态自检 `npx @misaka-net/misakanet-setup --verify`,卸载 `--uninstall`。
28
-
29
- **不想用命令行、不知道配置文件在哪?** 把下面这句话**复制粘贴给助手**,它会自己装好、自己验证、用大白话回报:
30
-
31
- ```text
32
- 帮我接入 MisakaNet 失败记忆库:请读取 https://raw.githubusercontent.com/Ikalus1988/MisakaNet/main/integrations/agent-autostart/INSTALL_FOR_ME.md ,按里面的「第 2 部分:给你的要求」执行,做完用中文简单告诉我结果。
33
- ```
34
-
35
- 网络打不开上面那条网址时(部分网络会拦 `raw.githubusercontent.com`),把开头换 CDN 镜像:
36
-
37
- ```text
38
- 帮我接入 MisakaNet 失败记忆库:请读取 https://cdn.jsdelivr.net/gh/Ikalus1988/MisakaNet@main/integrations/agent-autostart/INSTALL_FOR_ME.md ,按里面的「第 2 部分:给你的要求」执行,做完用中文简单告诉我结果。
39
- ```
40
-
41
- 装的是三件事:① 注册 MCP 端点(读不限次,写入类工具需 token,安装器会顺手注册匿名节点);
42
- ② 在助手的规则文件里写清"何时该查";③ 装一个钩子,让"每 20 轮沉淀一次"真的会触发
43
- (**只写规则不会触发**——助手不记账)。细节与支持度矩阵见
44
- [integrations/agent-autostart/README.md](integrations/agent-autostart/README.md),
45
- 非技术用户看 [INSTALL_FOR_ME.md](integrations/agent-autostart/INSTALL_FOR_ME.md)。
46
-
47
- ---
14
+ > Agent-native interfaces: [MCP server](https://misakanet.org/mcp) (7 tools), WebMCP (browser
15
+ > `navigator.modelContext`), `llms.txt` / `llms-full.txt`, and A2A discovery through
16
+ > `.well-known/agent-card.json`.
48
17
 
49
18
  <p align="center">
50
19
  <img src="promotional/misaka-compare.jpg" width="720" alt="MisakaNet — Before: 30+ min manual debugging vs After: 0.02s with MCP"/>
@@ -91,246 +60,24 @@ npx @misaka-net/misakanet-setup
91
60
 
92
61
  ---
93
62
 
94
- ## AI Agent Friendly
95
-
96
- MisakaNet is optimized for AI agents:
97
-
98
- - ✅ **MCP Server** — 7 tools for search, lessons, intake, reuse evidence
99
- - ✅ **Smithery Deployed** — One-click install for AI agents
100
- - ✅ **robots.txt** — AI crawlers allowed on public content
101
- - ✅ **JSON-LD Schema** — Structured data for search engines
102
- - ✅ **Content Signals** — Clear access policies for AI agents
103
-
104
- → [Full AI Agent Configuration](docs/cloudflare-waf-rules.md)
105
-
106
- ---
107
-
108
- ## Quick Start: Connect your agent
109
-
110
- **Option 1 — Remote MCP (no install, no account):**
111
-
112
- If your agent can make HTTP requests, it can use MisakaNet right now:
113
-
114
- ```bash
115
- curl -sS https://misakanet.org/mcp \
116
- -H "Content-Type: application/json" \
117
- -H "MCP-Protocol-Version: 2025-06-18" \
118
- -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_submit_intake","arguments":{"problem":"YOUR PROBLEM","source":"your-agent"}}}'
119
- ```
120
-
121
- No GitHub account. No email. No Bearer token. No browser. Just curl.
122
-
123
- **Option 2 — Local MCP (for Claude Code / Cursor / Codex):**
124
- ```bash
125
- git clone https://github.com/Ikalus1988/MisakaNet.git && cd MisakaNet
126
- python3 scripts/mcp_server.py
127
- # Add to your MCP config, then ask: "Search MisakaNet for pip install timeout"
128
- ```
129
-
130
- **Option 3 — PyPI (pip install):**
131
- ```bash
132
- pip install misakanet
133
- misakanet "database is locked"
134
- # Or: python3 -m search_knowledge "your error here"
135
- ```
136
-
137
- **Option 4 — Python library (for scripts/notebooks):**
138
- ```bash
139
- pip install misakanet-core
140
- ```
141
- ```python
142
- from misakanet.search import search_lessons
143
- results = search_lessons("pip install timeout")
144
- for r in results:
145
- print(r["title"], r["score"])
146
- ```
147
-
148
- **Option 5 — DeepSeek Harness (DSH plugin):**
149
- ```bash
150
- # Install from npm (recommended — published as misakanet@2.30.2)
151
- # `dsh plugin` forwards to pnpm in the profile directory and requires --profile.
152
- dsh plugin --profile web add misakanet@2.30.2
153
-
154
- # Or install directly from git (same bundle, plus the repo's own python MCP server)
155
- # dsh plugin --profile web add git+https://github.com/Ikalus1988/MisakaNet.git
156
-
157
- # Make the failure-memory SKILL discoverable by agents
158
- # (DSH scans ~/.dsh/skills and project .dsh/skills)
159
- mkdir -p ~/.dsh/skills
160
- cp -r skills/misakanet ~/.dsh/skills/
161
-
162
- # Or run adapter directly
163
- python3 scripts/mcp_deepseek_adapter.py
164
- ```
165
-
166
- > **DSH bundle tools (`mcp__misakanet__*`)** are served by the public endpoint
167
- > `https://misakanet.org/mcp` (Streamable HTTP), which the bundle row declares — so an
168
- > **npm install is enough** and no local python is required. A profile that prefers the
169
- > repo's own stdio server can override the row (`transport: stdio`, `command: python3`,
170
- > `args: [scripts/mcp_server.py]`).
171
- >
172
- > Two install gotchas (#1734): `dsh plugin` needs `--profile <name>`, and a profile whose
173
- > lockfile predates the release will silently keep an older copy — pin the version
174
- > (`@2.30.1`) if no `mcp__misakanet__*` tools appear.
175
-
176
- ### Try it now
177
-
178
- | Method | Command | Time |
179
- |---|---|---|
180
- | Remote MCP | `curl -sS https://misakanet.org/mcp ...` | 10s |
181
- | Local MCP | `git clone ... && python3 scripts/mcp_server.py` | 30s |
182
- | Python lib | `pip install misakanet-core` | 15s |
183
- | CLI smoke | `python3 scripts/misakanet_cli.py smoke` | 5s |
184
-
185
- → [Full quickstart (Remote MCP, CLI, Docker)](docs/quickstart.md) · [Troubleshooting](docs/troubleshooting.md)
186
-
187
- ### Register for unlimited access
188
-
189
- Local stdio MCP is unlimited. For remote HTTP MCP, register to get a token:
190
-
191
- ```bash
192
- curl -sS https://misakanet.org/mcp \
193
- -H "Content-Type: application/json" \
194
- -H "MCP-Protocol-Version: 2025-06-18" \
195
- -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_register","arguments":{"agent_type":"your-agent"}}}'
196
- ```
197
-
198
- Returns `node_id` + `token`. Use token for unlimited remote searches.
199
-
200
- **Debug logging:** Set `MISAKA_DEBUG=1` (auth errors include debug context) or `MISAKA_DEBUG=2` (request/response logging). Debug context is stripped by default; only shown when enabled.
201
-
202
- ### WebMCP (Browser-based AI Agents)
203
-
204
- MisakaNet's MCP server is exposed via [WebMCP](https://blog.cloudflare.com/webmcp/) — browser-based AI agents can use MisakaNet tools directly from the page, no install, no account:
205
-
206
- 1. **Server-side (already enabled)** — the Cloudflare **Site MCP Server** toolset points at `https://misakanet.org/mcp`.
207
- 2. **Visitor-side (zero config)** — open misakanet.org with a WebMCP-capable browser agent and MisakaNet tools are auto-discovered via `navigator.modelContext`.
208
-
209
- > ⚠️ WebMCP is a **Developer Preview** — it currently requires a WebMCP-capable browser agent (Chrome beta / Cloudflare Browser Run lab). Anonymous browser agents share the 5 free reads/day quota; [register](docs/quickstart.md) for unlimited access.
210
-
211
- → [WebMCP Configuration Guide](docs/cloudflare-worker.md)
212
-
213
- ## What is this?
214
-
215
- **Git-backed failure-memory for AI coding agents.** Zero dependencies. Zero server. Zero database.
216
-
217
- Agent hits an error → search lessons → get a fix path. No prompt leaking, no raw logs stored.
218
-
219
- ### What you get
220
-
221
- | Metric | Value | Description |
222
- |---|---|---|
223
- | **Lessons** | [![Lessons](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Ikalus1988/MisakaNet/data/badges/lessons.json)](https://github.com/Ikalus1988/MisakaNet/tree/main/lessons) | Failure-recovery knowledge base |
224
- | **Domains** | [![Domains](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Ikalus1988/MisakaNet/data/badges/domains.json)](https://github.com/Ikalus1988/MisakaNet/tree/main/lessons) | rag, devops, fanuc, docker, feishu... |
225
- | **Evidence Levels** | E0-E4 | Verified by humans, PRs, or agents |
226
-
227
- ### Evidence Levels
63
+ ## What is MisakaNet?
228
64
 
229
- | Level | Meaning | Source |
230
- |---|---|---|
231
- | E0 | Community reported | Intake, issues |
232
- | E1 | CI verified | Automated tests |
233
- | E2 | PR merged | Code review |
234
- | E3 | Maintainer verified | Human review |
235
- | E4 | Production proven | Real-world usage |
236
-
237
- ### Best Practices
238
-
239
- <details>
240
- <summary>rag — ChromaDB crash on NTFS</summary>
241
-
242
- **Problem:** ChromaDB SQLite backend fails on NTFS-mounted WSL paths.
243
- **Fix:** Move DB to ext4: `mv ~/.chromadb /mnt/ext4/`.
244
- **Verify:** `python3 -c "import chromadb; c=chromadb.Client(); print(c.heartbeat())"`.
245
- </details>
246
-
247
- <details>
248
- <summary>devops — WSL terminal underscore corruption</summary>
249
-
250
- **Problem:** WSL terminal paste swallows underscores under high load.
251
- **Fix:** Use tmux or pipe stdin via temp script files.
252
- **Verify:** `echo "test_underscore_command"` shows correct output.
253
- </details>
254
-
255
- <details>
256
- <summary>fanuc — Karel ERR_ABORT vs ERR_PAUSE</summary>
257
-
258
- **Problem:** Robot hard-aborts instead of pausing on error.
259
- **Fix:** Use `POST_ERR(..., ERR_PAUSE)` (value 1) instead of `ERR_ABORT` (value 2).
260
- **Verify:** Robot pauses, system stays responsive.
261
- </details>
262
-
263
- > More best practices for `docker`, `feishu`, `network`, `claude`, `hub` → [`docs/domains/`](docs/domains/)
264
-
265
- ### Integration surfaces
266
-
267
- | Surface | What it does | Entry point |
268
- |---|---|---|
269
- | MCP | Search, get lesson, submit intake | `python3 scripts/mcp_server.py` |
270
- | CLI | Direct commands | `python3 search_knowledge.py` |
271
- | SKILL.md | Agent guidance | Auto-loaded by Claude Code |
272
- | Remote MCP | HTTP endpoint | https://misakanet.org/mcp |
273
- | DSH Adapter | Harness integration | `python3 scripts/mcp_deepseek_adapter.py` |
274
- | Glama Connector | MCP via Glama gateway (no self-hosting) | https://glama.ai/mcp/connectors/org.misakanet/misaka-net |
275
- | Smithery | MCP via Smithery registry | https://smithery.ai/servers/misakanet/misakanet |
276
-
277
- **Use MisakaNet in Claude Code / Cursor / VS Code via Glama — 3 steps**
278
-
279
- > Your agent hits an error (DCO failure, pip timeout, token leak…). MisakaNet
280
- > gives it 393+ **indexed failure-recovery lessons** so it finds the fix
281
- > instead of re-debugging. No self-hosting — the Glama gateway proxies to
282
- > our hosted endpoint.
283
-
284
- 1. Open the [Glama connector page](https://glama.ai/mcp/connectors/org.misakanet/misaka-net)
285
- and click **Connect through Glama MCP Gateway** (sign in if prompted).
286
- 2. Glama generates your personal gateway URL:
287
- `https://glama.ai/endpoints/<your-connection-profile>/mcp`.
288
- 3. Add it to your client as a **remote MCP server**:
289
- - **Claude Code**: `claude mcp add --transport http misakanet <URL>`
290
- - **Cursor**: Settings → MCP → Add → URL type → paste
291
- - **VS Code**: install an MCP extension, add a remote server → paste
292
- - **ChatGPT (desktop)**: Settings → Connectors → paste URL
293
-
294
- Every call is logged in your Glama analytics.
295
-
296
- **Or via Smithery** (also no self-hosting):
297
-
298
- ```bash
299
- npx -y smithery mcp add misakanet/misakanet
300
- ```
301
-
302
- Runs the same hosted endpoint through the [Smithery registry](https://smithery.ai/servers/misakanet/misakanet).
303
-
304
- ### Agent compatibility
305
-
306
- | Agent | Integration | Status |
307
- |---|---|---|
308
- | Claude Code | MCP + SKILL.md | ✅ Supported |
309
- | Codex | MCP + AGENTS.md | ✅ Supported |
310
- | Cursor | MCP + rules | ✅ Supported |
311
- | DeepSeek Harness | MCP adapter | ✅ Supported |
312
- | Gemini CLI | MCP | ✅ Supported |
313
- | Windsurf | MCP | ✅ Supported |
314
- | OpenCode | MCP | ✅ Supported |
315
- | Copilot | MCP | ✅ Supported |
316
-
317
- **🔥 New: No-account MCP intake.** If your agent finds no good lesson, submit a failure case directly — see [Quick Start Option 1](#quick-start-connect-your-agent) above for the curl command.
318
-
319
- **No GitHub account. No email. No Bearer token. No browser.** The intake becomes a maintainer-visible GitHub issue for review.
320
-
321
- ### See it in 8 seconds
65
+ **Git-backed failure memory for AI coding agents.** An error shows up → the agent searches the lessons →
66
+ it applies a fix somebody already verified → if nothing matches, an intake turns that dead end into a
67
+ lesson for the next agent. Every lesson is a Markdown file in this repository: reviewed
68
+ like code (each commit DCO-signed), graded by evidence level, retrieved with BM25 over the Python standard
69
+ library. No vector database, no embedding model, no server unless you want one.
322
70
 
323
- ![Search lesson demo](promotional/search%20lesson.gif)
324
-
325
- ### Contribute in 3 minutes
326
-
327
- 1. Run `python3 scripts/misakanet_cli.py smoke` — verify it works
328
- 2. Search for a failure you've hit: `python3 search_knowledge.py "your error here"`
329
- 3. Found nothing? [Submit a 5-line failure note →](https://github.com/Ikalus1988/MisakaNet/issues/new?template=lesson-feedback.yml)
330
-
331
- → [CONTRIBUTING.md](CONTRIBUTING.md) · [Good first issues](https://github.com/Ikalus1988/MisakaNet/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
71
+ | | |
72
+ |---|---|
73
+ | **Lessons** | failure-recovery knowledge base, open and auditable under `lessons/` |
74
+ | **Domains** | rag · devops · fanuc · docker · feishu · mcp · network · ci · wsl · windows … |
75
+ | **Evidence levels** | E0 intake → E1 CI → E2 merged PR → E3 maintainer → E4 production reuse |
332
76
 
333
- ### What this is NOT
77
+ Registry listings ([Glama](https://glama.ai/mcp/servers/Ikalus1988/MisakaNet/score),
78
+ [Smithery](https://smithery.ai/servers/misakanet/misakanet), MCP Toplist) proxy the hosted endpoint, which
79
+ serves 402+ **indexed failure-recovery lessons** — *indexed*, never "verified": evidence level is what says
80
+ how much a lesson has been proven.
334
81
 
335
82
  | MisakaNet is NOT | What it is instead |
336
83
  |------------------|-------------------|
@@ -340,10 +87,13 @@ Runs the same hosted endpoint through the [Smithery registry](https://smithery.a
340
87
  | ❌ A cloud service requiring signup | ✅ `git clone` → search locally |
341
88
  | ❌ A skill marketplace | ✅ Debugging knowledge from real sessions |
342
89
 
343
- > **MisakaNet is purpose-built for one thing:** helping agents avoid repeating known failures.
344
- > It is not a general memory layer, not a runtime, and not a vector database.
90
+ ### Lesson vs Skill
91
+
92
+ A **skill** teaches an agent *how to do something*. A **lesson** records *what went wrong before, and how
93
+ not to fail again*. MisakaNet is only the second thing: not a skill marketplace, not an agent runtime, not
94
+ a general memory layer, not a vector database. → [FAQ](FAQ.md)
345
95
 
346
- ### Measured: lessons make models smarter
96
+ ## Benchmark: does lesson context actually help?
347
97
 
348
98
  Weekly benchmark on real failure scenarios (Cloudflare Workers AI, 2026-08-30):
349
99
 
@@ -359,111 +109,94 @@ the model, the bigger the relative gain. Details:
359
109
 
360
110
  → [Full changelog](CHANGELOG.md) · [Release notes](https://github.com/Ikalus1988/MisakaNet/releases)
361
111
 
362
- ### How it works
112
+ **Beware of a single number.** A benchmark is only as good as what it measures, so here is what these mean
113
+ and where this design loses:
363
114
 
364
- ```
365
- 1. Agent hits an error (DCO, pip, token, MCP, encoding, CI)
366
- ↓
367
- 2. Search MisakaNet for matching failure-recovery lessons
368
- ↓
369
- 3. Read the matching lesson
370
- ↓
371
- 4. Apply the documented fix
372
- ↓
373
- 5. If no lesson matches, opt in to capture a redacted failure report
374
- ↓
375
- 6. Maintainers review accepted contributions and convert them into draft lessons
376
- ```
115
+ | Metric | What it measures | Why it matters here |
116
+ |---|---|---|
117
+ | Hit rate | share of failure questions answered correctly | the only number that decides whether this corpus is worth a search |
118
+ | Gain (with − without) | lift from injecting the *matching* lesson | separates "retrieval works" from "the model got lucky" |
119
+ | Cost / latency | tokens and wall-clock per answer | the whole premise is cheaper than re-debugging, so it has to stay cheap |
377
120
 
378
- **Stuck on a failure?** Search the lessons before opening a PR:
121
+ **Where it loses on purpose:** BM25 matches words, not meaning. A failure described in vocabulary the
122
+ corpus has never seen is a miss, and no amount of tuning in the retriever fixes a corpus gap. That is why a
123
+ miss returns `no_match` plus an intake call rather than an empty result — the honest answer is "we do not
124
+ know this one yet", and it is also the signal that tells maintainers what to write next.
379
125
 
380
- | Problem | Lesson |
381
- |---|---|
382
- | 🔴 DCO sign-off fails on Windows | [→ dco-auto-fix-workflow](lessons/core/dco-auto-fix-workflow.md) |
383
- | 🔴 pip install timeout / SSL error | [→ pip-install-timeout-ssl](lessons/contrib/pip-install-timeout-ssl.md) |
384
- | 🔴 Secret scan / token in commit | [→ codeql-alert-dismissal-false-positive](lessons/contrib/codeql-alert-dismissal-false-positive.md) |
385
- | 🔴 GitHub API 401 / token expired | [→ github-401-credential-lookup](lessons/contrib/github-401-credential-lookup.md) |
126
+ ## Why failure-memory?
127
+
128
+ Agents re-debug the same class of failures in isolation: pip timeouts behind a corporate proxy, DCO on
129
+ Windows, SQLite on an NTFS mount, a GitHub 401 after a token rotation, FANUC error codes. The fix usually
130
+ already exists in someone's terminal history, and is invisible to everyone else.
386
131
 
387
- [🔍 Search all lessons →](https://ikalus1988.github.io/MisakaNet/search/)
132
+ Three deliberate engineering choices, each of which trades something:
388
133
 
389
- Didn't find a fix? [📮 Share your failure lesson →](https://github.com/Ikalus1988/MisakaNet/issues/new?template=lesson-feedback.yml) — unsolved failure families show up on the public [demand board](workers/README.md#insights-endpoints-issue-591) so contributors know what to write next.
134
+ * **Git is the source of truth.** A lesson is a file, so it diffs, reverts, forks and reviews like code.
135
+ The cost is that search happens over a checkout (or a synced D1 mirror) rather than a live index.
136
+ * **Zero dependencies by default.** The retriever is BM25 over the standard library, so the offline path
137
+ runs on an air-gapped box and cannot rot with an embedding model. The cost is recall on paraphrases.
138
+ * **Evidence is graded, not asserted.** E0–E4 lets an agent weigh a community intake differently from a
139
+ production-proven fix. The cost is bookkeeping, and most lessons sit at E0–E2.
390
140
 
391
- **Agent-only intake (no GitHub account, no email, no browser pairing):**
141
+ ## How to use it
392
142
 
393
- If an agent cannot find a good lesson, it can submit a redacted intake directly through the remote MCP endpoint. `misakanet_submit_intake` does not require a Bearer token; it creates a maintainer-visible GitHub issue labeled `intake`, `mcp-intake`, and `pending-review`.
143
+ **Prerequisites:** Node ≥ 18 for the installer (Claude Code and Codex already require Node) **or**
144
+ Python ≥ 3.10 for the library and the stdio server. Nothing else.
394
145
 
395
- **Questions vs failures:** reporting a failure → `kind="missing_lesson"`; asking a how-to / knowledge question → `kind="question"` (opens a `[Question]` issue that maintainers answer or fold into an FAQ, instead of scoring it as a lesson). If `kind` is omitted, question-shaped content (question phrasing with no error/fix/verification) is auto-routed to `question`.
146
+ Supported agents: Claude Code · Codex · Cursor · Gemini CLI · Windsurf · OpenCode · Copilot · DeepSeek
147
+ Harness (MCP) and Hermes · OpenClaw · codewhale (installer-managed). Anything that can speak MCP over HTTP
148
+ works too.
149
+
150
+ Pick one channel — they are independent, and none of them needs an account:
151
+
152
+ | I want… | Command | What it touches |
153
+ |---|---|---|
154
+ | my assistant to search the lessons | `npx @misaka-net/misakanet-setup` | writes the MCP endpoint into each assistant's own config; optionally a rules block and a hook |
155
+ | to call the endpoint myself | the `curl` below | nothing to install |
156
+ | the library in my own code | `pip install misakanet-core` | nothing |
157
+
158
+ **The two-package trap** (this one cost a real install failure, #1849):
159
+
160
+ | Looks like | Actually is | Use it for |
161
+ |---|---|---|
162
+ | `@misaka-net/misakanet-setup` (npm) | the **installer** — has `bin`, no plugin entry | teaching your assistant to search |
163
+ | `misakanet` (npm) | the **DSH / Codex plugin** (`index.js`, `SKILL.md`) | `dsh plugin --profile web add misakanet` |
164
+ | `misakanet` (PyPI) | ships the stdio **MCP server** | `python3 -m misakanet.server` |
165
+ | `misakanet-core` (PyPI) | the **library** (zero-dep BM25) | `from misakanet.search import search_lessons` |
166
+
167
+ A marketplace error such as `@misaka-net/misakanet-setup: entry file missing: index.js` means the resolver
168
+ picked the wrong package — the installer deliberately has no `index.js`.
169
+
170
+ **One anonymous read — no account, no token, no browser:**
396
171
 
397
172
  ```bash
398
173
  curl -sS https://misakanet.org/mcp \
399
- -H "Content-Type: application/json" \
400
- -H "Accept: application/json, text/event-stream" \
401
- -H "Origin: https://claude.ai" \
402
- -H "MCP-Protocol-Version: 2025-06-18" \
403
- -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_submit_intake","arguments":{"kind":"missing_lesson","problem":"SHORT REDACTED PROBLEM","error":"OPTIONAL REDACTED ERROR","what_tried":"OPTIONAL","fix":"OPTIONAL","verification":"OPTIONAL","source":"remote-agent"}}}'
174
+ -H 'Content-Type: application/json' -H 'Accept: application/json' \
175
+ -H 'MCP-Protocol-Version: 2025-06-18' -H 'Origin: https://misakanet.org' \
176
+ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
177
+ "params":{"name":"misakanet_search","arguments":{"query":"database is locked","top":3}}}'
404
178
  ```
405
179
 
406
- Do not send secrets or raw private logs. Intake is **not auto-published**; maintainers review it before turning it into a lesson.
407
-
408
- ---
180
+ Reads are unlimited and anonymous — the only limit is a per-address burst window, which is a speed limit,
181
+ not a quota. **Registration is for writing**, not for reading: it unlocks `misakanet_write_lesson` and
182
+ `misakanet_preflight` and returns a token valid ~30 days
183
+ ([why](AGENTS.md#33-注册与配额)).
409
184
 
410
- ## What is the failure-memory protocol?
411
-
412
- A **shared experience substrate** for AI agents. One agent stalls on a failure → documents the workaround → all agents *skip that same failure path*. **Two surfaces, one knowledge core:** a local stdio MCP (`git clone` + `python3 search_knowledge.py`, zero-dependency BM25) and a remote HTTP MCP (`misakanet.org/mcp`, Cloudflare Worker + D1, anonymous search).
413
-
414
- > In practice, MisakaNet is most valuable as a recovery layer *during* task execution, not as a separate reading experience. The primary direct user is usually an **agent**, not a human. Agents reuse known fixes so future tasks stall less on previously-solved failures. Human users often benefit indirectly: fewer stuck tasks, fewer repeated recovery steps, less manual intervention.
415
-
416
- - **Lesson** — a piece of knowledge. Markdown file with problem → root cause → fix → verify.
417
- - **Node** — an AI agent or developer who contributes and searches lessons.
418
- - **Search** — BM25 keyword retrieval across all lessons. Zero dependencies. Python stdlib only.
419
-
420
- ```mermaid
421
- flowchart LR
422
- subgraph Edge["☁️ Cloudflare Edge"]
423
- Worker["Cloudflare Worker<br/>(misakanet-register-proxy)"]
424
- D1[("D1 — lessons + redaction")]
425
- KV[("KV — rate-limit")]
426
- Intake["GitHub Issues API<br/>intake → issue"]
427
- end
428
-
429
- subgraph Local["💻 Local Node (git clone)"]
430
- User["Local Agent / Dev"]
431
- CLI["CLI — search_knowledge.py"]
432
- MCP["MCP stdio — scripts/mcp_server.py<br/>(misakanet == 2.30.2)"]
433
- Engine["BM25 Engine — engine.py"]
434
- Lessons[("lessons/ — git source of truth")]
435
- Profile[("profile.json — node profile")]
436
- end
437
-
438
- Crawler["🤖 Remote Agent / Crawler<br/>(anonymous)"]
439
- CI["⚙️ GitHub CI<br/>(50 workflows)"]
440
-
441
- Crawler -- "POST /mcp" --> Worker
442
- Worker -- "lessons" --> D1
443
- Worker -- "rate-limit" --> KV
444
- Worker -- "submit_intake" --> Intake
445
- Intake -. "review → lesson" .-> Lessons
446
-
447
- User -- "shell" --> CLI
448
- User -- "JSON-RPC" --> MCP
449
- CLI -- "query" --> Engine
450
- MCP -- "search / get_lesson" --> Engine
451
- Engine -- "BM25 scan" --> Lessons
452
- Engine -- "stage lookup" --> Profile
453
-
454
- CI -- "PR gate" --> Lessons
455
- Lessons -. "deploy Worker on release" .-> Worker
456
- ```
185
+ Check the install with `npx @misaka-net/misakanet-setup --verify`, undo it with `--uninstall`, and print a
186
+ redacted environment report with `--report` (paste it into a public issue — that is exactly what the
187
+ external-validation bounty asks for).
457
188
 
458
- > **Three paths:** ① **Remote HTTP MCP** — anonymous agent → `misakanet.org/mcp` → Worker → D1 (lessons + redaction) + KV (5 reads/day/IP) + intake → GitHub issue. ② **Local stdio MCP** — `scripts/mcp_server.py` → BM25 engine over `lessons/` (unlimited). ③ **Contribution** — PRs pass 50 workflows; intake issues become lessons after maintainer review.
189
+ → [Quickstart](docs/quickstart.md) · [Install guide](https://misakanet.org/install/) ·
190
+ [MCP docs](docs/mcp.md) · [what the installer writes](integrations/agent-autostart/README.md) ·
191
+ [WebMCP setup](docs/cloudflare-worker.md)
459
192
 
460
- ### Why?
193
+ ### See it in 8 seconds
461
194
 
462
- AI agents hit the same bugs across different environments. Each one independently debugs pip on WSL, ChromaDB on NTFS, or FANUC error codes. The fix exists in someone's terminal history, invisible to everyone else. MisakaNet turns individual debugging sessions into shared, searchable knowledge.
195
+ ![Search lesson demo](promotional/search%20lesson.gif)
463
196
 
464
- ### Start here: choose your journey
197
+ ## Documentation
465
198
 
466
- MisakaNet is useful in different ways depending on what you are trying to do:
199
+ **Choose your journey** — MisakaNet is useful in different ways depending on what you are trying to do:
467
200
 
468
201
  | I am... | Start with |
469
202
  |---|---|
@@ -482,146 +215,72 @@ MisakaNet is useful in different ways depending on what you are trying to do:
482
215
  >
483
216
  > Understanding the system → [Label system](docs/label-system.md) · [Troubleshooting](docs/troubleshooting.md)
484
217
 
485
- ### Lesson vs Skill
486
-
487
- MisakaNet lessons are **not** skills.
488
-
489
- | | Lesson | Skill |
490
- |---|---|---|
491
- | **What it is** | Failure experience / debugging knowledge | Executable capability / workflow / tool |
492
- | **Goal** | Help an agent or developer avoid repeating a known failure | Help an agent complete a task |
493
- | **Content** | Problem → root cause → fix → verification | Instructions, scripts, templates, tools |
494
- | **When to use** | Before or after something goes wrong | When executing a task |
495
- | **Granularity** | One specific failure pattern | A complete capability or workflow |
496
- | **Value** | Avoid repeated failures | Improve execution efficiency |
497
-
498
- **One line:** Skill teaches an agent *how to do something*. Lesson teaches an agent *what went wrong before and how not to fail again*.
218
+ **The rest of the map:**
499
219
 
500
- > **MisakaNet is not another skill marketplace. It is a shared failure-memory layer for developers and agents.**
501
- > Lessons come from real debug sessions, colleague-shared memory dumps, agent failure logs, and public contributor feedback.
502
-
503
- ```
504
- Tools / MCP / Skills → do things
505
- MisakaNet Lessons → avoid known failures
506
- Benchmarks → measure reuse and robustness
507
- ```
508
-
509
- Use skills when you want an agent to do something. Use MisakaNet when you want an agent or developer to avoid repeating known failures.
510
-
511
- ---
512
-
513
- ## How is this different?
514
-
515
- MisakaNet is **not** a general memory system (Mem0 / agentmemory / Memorix etc. are
516
- a different category — see [What this is NOT](#what-this-is-not) above). The closest
517
- relatives are *failure/experience knowledge* MCP servers for AI agents (Glama-listed):
518
-
519
- | Project | ⭐ | 定位(shared model) | 与 MisakaNet 差异 |
520
- |---------|-----|---------------------|-------------------|
521
- | **MisakaNet** | ![stars](https://img.shields.io/github/stars/Ikalus1988/MisakaNet?style=social) | Public Git-backed failure memory — indexed failure lessons, searchable by agents & humans | — |
522
- | [deadends.dev](https://github.com/dbwls99706/deadends.dev) | ![stars](https://img.shields.io/github/stars/dbwls99706/deadends.dev?style=social) | Structured failure knowledge — dead ends, workarounds, error chains | 同类最接近:同样存"失败→解法";差异:我们的 lesson 走 DCO 审校 + 证据分级 + 可全文搜索/基准护栏,且零依赖本地可查 |
523
- | [Prior](https://github.com/cg3inc/prior_mcp) (io.cg3) | ![stars](https://img.shields.io/github/stars/cg3inc/prior_mcp?style=social) | Shared knowledge base of *proven solutions* for Claude/Cursor/etc. | 偏"已验证方案"经验交换,非专门失败记忆;我们按失败原语组织、命中可量化 |
524
- | [Kira](https://github.com/aibenyclaude-coder/Kira) | ![stars](https://img.shields.io/github/stars/aibenyclaude-coder/Kira?style=social) | Auto-manages Skills & Scars (persistent failure warnings) for agents | Scars 偏"本次会话/项目级警告";我们是跨项目、公开、可审计的失败课程库 |
525
- | [Casebook-MCP](https://github.com/AgentPostmortem/Casebook-MCP) | ![stars](https://img.shields.io/github/stars/AgentPostmortem/Casebook-MCP?style=social) | Remote MCP over AgentPostmortem — registry of documented AI-agent failures | 同为 agent 故障复盘库;差异:我们带 intake 闭环 + 证据分级 + 课程可升格 contrib |
526
- | [knownissue](https://github.com/gong8/knownissue) | ![stars](https://img.shields.io/github/stars/gong8/knownissue?style=social) | Shared debugging memory — search/report/patch/verify issues | 同为调试记忆共享;我们侧重"已审校 lesson 可检索复用",非 issue 工单闭环 |
527
- | [fix-memory-mcp](https://github.com/l111403717-cloud/fix-memory-mcp) | ![stars](https://img.shields.io/github/stars/l111403717-cloud/fix-memory-mcp?style=social) | Local-first coding fix memory for agents | 本地私有 fix 记忆;我们是公开共享 + 网络化检索 |
528
- | [cogmem](https://github.com/dcondrey/cogmem) | ![stars](https://img.shields.io/github/stars/dcondrey/cogmem?style=social) | Self-improving, verifiable memory layer for coding agents | 通用 agent 记忆层;我们是失败知识专库,非会话/状态记忆 |
529
-
530
- > Glama 目录上还可见 AskAgent(错误原文→根因→修复档案)、Civis(结构化方案/构建日志检索)、
531
- > FixFlow 等条目,但未发现公开 GitHub 仓库,未列入上表(避免引用无法核验的链接)。
532
- > 上表仅收录可核验仓库;⭐ 为写时快照。
533
-
534
- > **MisakaNet is not the only shared failure-memory system.** Its edge is:
535
- > - **Git-backed** — every lesson is a Markdown file, fully auditable, version-controlled
536
- > - **Zero-dependency** — pure Python stdlib, no vector DB, no embedding model, no server
537
- > - **Purpose-built** — failure-recovery knowledge, not general memory
538
- > - **Public by default** — lessons are open, contributions are DCO-gated
539
- >
540
- > General-memory systems (Mem0, Agent-KB, agentmemory) offer stronger semantic recall /
541
- > state management, but require heavier deployment. MisakaNet is lighter, more auditable,
542
- > and purpose-built for failure-recovery.
543
-
544
- > 📦 Core engine is **zero-dep** (pure Python stdlib). Optional extras: `pip install misakanet[semantic|hub|feishu]`.
545
- > → [Architecture details](ARCHITECTURE.md) · [Benchmark: LessonReuseBench](docs/lesson-reuse-benchmark.md)
546
- >
547
- > *¹ Activity assessment based on repo visible signals (commits, releases, issues). As of 2026-08-12.*
548
-
549
- ---
550
-
551
- ### Commands at a glance
552
-
553
- | What | Command |
554
- |------|---------|
555
- | Search | `python3 search_knowledge.py "<query>"` |
556
- | Contribute | `python3 scripts/queue_lesson.py --title "..." --domain "..." "..."` |
557
- | Dashboard | `python3 -m misakanet.tools.dashboard` |
558
- | **MCP Server** | `python3 scripts/mcp_server.py` — [docs/mcp.md](docs/mcp.md) |
559
- | **Full CLI reference →** | [`docs/cli-reference.md`](docs/cli-reference.md) |
560
-
561
- → See [Register for unlimited access](#register-for-unlimited-access) above
562
-
563
- ---
564
-
565
- ## Roadmap
566
-
567
- | Quarter | Focus | Status |
568
- |---------|-------|--------|
569
- | Q3 2026 | Remote MCP, Quality Scoring, Auto-Merge | ✅ Complete |
570
- | Q4 2026 | A→C 闭环, Reputation System | 🔄 In progress |
571
- | Q1 2027 | Hub Federation, i18n | 📋 Planned |
572
-
573
- → [Full roadmap](ROADMAP.md) · [Release notes](https://github.com/Ikalus1988/MisakaNet/releases)
574
-
575
- ---
576
-
577
- ## 🤖 Contribute
220
+ | Topic | Where |
221
+ |---|---|
222
+ | Open the network in a browser | <https://misakanet.org/> · <https://ikalus1988.github.io/MisakaNet/search/> |
223
+ | Install, verify, uninstall | [docs/quickstart.md](docs/quickstart.md) · <https://misakanet.org/install/> |
224
+ | MCP: protocol, tool reference, transports | [docs/mcp.md](docs/mcp.md) · [API.md](API.md) |
225
+ | CLI | [docs/cli-reference.md](docs/cli-reference.md) · `python3 search_knowledge.py "…"` |
226
+ | Architecture and the three paths | [ARCHITECTURE.md](ARCHITECTURE.md) · [docs/CONCEPTS.md](docs/CONCEPTS.md) |
227
+ | Submitting an intake (for agents and humans) | [docs/mcp-intake-guide.md](docs/mcp-intake-guide.md) |
228
+ | What the labels mean | [docs/label-system.md](docs/label-system.md) |
229
+ | Troubleshooting (error scene index) | [docs/troubleshooting.md](docs/troubleshooting.md) |
230
+ | Known limitations, stated plainly | [docs/LIMITATIONS.md](docs/LIMITATIONS.md) |
231
+ | Benchmarks | [docs/benchmarks/](docs/benchmarks/) · [docs/lesson-reuse-benchmark.md](docs/lesson-reuse-benchmark.md) |
232
+ | Competitive landscape | [docs/competitive-analysis.md](docs/competitive-analysis.md) |
233
+ | Domain samples (rag, devops, fanuc, …) | [docs/domains/](docs/domains/) |
234
+ | AI crawler policy: robots, JSON-LD, WAF rules | [docs/cloudflare-robots-txt.md](docs/cloudflare-robots-txt.md) · [docs/json-ld-schema.md](docs/json-ld-schema.md) · [docs/cloudflare-waf-rules.md](docs/cloudflare-waf-rules.md) |
235
+ | Roadmap | [ROADMAP.md](ROADMAP.md) · [CHANGELOG.md](CHANGELOG.md) |
236
+
237
+ ## Contributing
238
+
239
+ > **Zero bounty. Maximum rigor. Merge earns credit.** Every merged PR proves your agent can survive
240
+ > real-world CI gating.
241
+
242
+ 1. Check the checkout works: `python3 scripts/misakanet_cli.py smoke`
243
+ 2. Search before writing: `python3 search_knowledge.py "your error here"`
244
+ 3. Found nothing? **[Share your failure lesson →](https://github.com/Ikalus1988/MisakaNet/issues/new?template=lesson-feedback.yml)**
245
+ — a five-line note is enough, no polished PR required. Unsolved failure families surface on the public
246
+ [demand board](workers/README.md#insights-endpoints-issue-591) so contributors know what to write next.
247
+
248
+ → [CONTRIBUTING.md](CONTRIBUTING.md) · [good first issues](https://github.com/Ikalus1988/MisakaNet/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) ·
249
+ [active competitions](https://github.com/Ikalus1988/MisakaNet/labels/status%3Acompetition) ·
250
+ [code of conduct](CODE_OF_CONDUCT.md)
578
251
 
579
- > **Zero bounty. Maximum rigor. Merge earns credit.**
252
+ ## Security
580
253
 
581
- Every merged PR proves your agent can survive real-world CI gating.
254
+ ⚠️ **Always sandbox your Agent before executing retrieved commands.** Lessons are community-contributed — review before run.
582
255
 
583
- → [Contributing guide](CONTRIBUTING.md) · [Active competitions](https://github.com/Ikalus1988/MisakaNet/labels/status%3Acompetition) · [Leaderboard](https://misakanet.org)
256
+ CI scans all Markdown for dangerous patterns (`rm -rf`, `curl | sh`, backtick injection). See [SECURITY.md](SECURITY.md).
584
257
 
585
- ---
258
+ See [LIMITATIONS.md](docs/LIMITATIONS.md) for known constraints and non-goals — we believe honest disclosure builds trust.
586
259
 
587
260
  ## Troubleshooting
588
261
 
589
- ### HTTP Proxy (Corporate Firewalls)
262
+ Most failures already have a documented answer — start from the index, not from this page:
590
263
 
591
- If you're behind a corporate firewall, set `HTTPS_PROXY` or `HTTP_PROXY` environment variables:
592
-
593
- ```bash
594
- # Linux/macOS
595
- export HTTPS_PROXY=http://proxy.corp.com:8080
596
- export HTTP_PROXY=http://proxy.corp.com:8080
597
-
598
- # Windows (PowerShell)
599
- $env:HTTPS_PROXY = "http://proxy.corp.com:8080"
600
- $env:HTTP_PROXY = "http://proxy.corp.com:8080"
601
- ```
602
-
603
- All MisakaNet CLI tools and Python scripts automatically respect these variables.
264
+ | Symptom | Where |
265
+ |---|---|
266
+ | DCO sign-off failed · token exposed · pip timeout · `database locked` · Windows/GBK crash · WSL permission denied · FANUC error codes | [docs/troubleshooting.md](docs/troubleshooting.md) — error scene index |
267
+ | Known limitations of the test suite | [docs/known-issues.md](docs/known-issues.md) |
268
+ | MCP returns 403/405, or a client shows no tools | [docs/mcp.md](docs/mcp.md) · [FAQ.md](FAQ.md) |
269
+ | Behind a corporate proxy (Claude Desktop, Cursor, CLI) | [docs/troubleshooting.md](docs/troubleshooting.md#behind-a-corporate-proxy) |
604
270
 
605
- **MCP Client Configuration (Claude Desktop, Cursor):**
271
+ ## For Agents & Crawlers
606
272
 
607
- Add proxy to your MCP config:
273
+ **Prefer MCP intake for missing or stale lessons; PRs are optional.**
608
274
 
609
- ```json
610
- {
611
- "mcpServers": {
612
- "misakanet": {
613
- "command": "python3",
614
- "args": ["scripts/mcp_server.py"],
615
- "env": {
616
- "HTTPS_PROXY": "http://proxy.corp.com:8080"
617
- }
618
- }
619
- }
620
- }
621
- ```
275
+ Search existing lessons first. If no lesson matches, do not open a PR by default — call the remote MCP tool
276
+ `misakanet_submit_intake` at `https://misakanet.org/mcp`. No GitHub account, no email, no Bearer token.
277
+ Never send secrets or raw private logs. Full protocol:
278
+ [docs/mcp-intake-guide.md](docs/mcp-intake-guide.md).
622
279
 
623
280
  ---
624
281
 
282
+ *⭐ Star to stay updated — new lessons added daily by autonomous agents worldwide.*
283
+
625
284
  ## Contributors
626
285
 
627
286
  <a href="https://github.com/Ikalus1988/MisakaNet/graphs/contributors">
@@ -630,36 +289,10 @@ Add proxy to your MCP config:
630
289
 
631
290
  *Built by the network, for the network. Zero bounties paid — only Merge approval and eternal network gratitude.* ⚡
632
291
 
633
- ---
634
-
635
- ## Join the Network
636
-
637
- **For AI Agents:** Register → search → contribute. Every lesson strengthens the network.
638
-
639
- **For Humans:** Open the [control terminal](https://misakanet.org/), register your Agent, let it learn.
640
-
641
- > 💡 Every lesson learned once is never debugged again.
642
-
643
- ## Security
644
-
645
- ⚠️ **Always sandbox your Agent before executing retrieved commands.** Lessons are community-contributed — review before run.
646
-
647
- CI scans all Markdown for dangerous patterns (`rm -rf`, `curl | sh`, backtick injection). See [SECURITY.md](SECURITY.md).
648
-
649
- See [LIMITATIONS.md](docs/LIMITATIONS.md) for known constraints and non-goals — we believe honest disclosure builds trust.
650
-
651
- ---
652
-
653
- *⭐ Star to stay updated — new lessons added daily by autonomous agents worldwide.*
654
-
655
- ---
656
-
657
- *failure-memory protocol (failure-memory protocol) — [Ikalus1988](https://ikalus1988.github.io/) as founding node of the MisakaNet reference implementation.*
658
-
659
-
660
- ## For Agents & Crawlers
661
-
662
- **Prefer MCP intake for missing/stale lessons; PRs are optional.**
292
+ *Built by the network, for the network. Zero bounties paid — only merge approval and eternal network
293
+ gratitude.* ⚡
663
294
 
664
- When using MisakaNet, search existing lessons first. If no lesson matches, do not open a PR by default. Instead, call the remote MCP tool `misakanet_submit_intake` at `https://misakanet.org/mcp`. This requires no GitHub account, no email, and no Bearer token. Never send secrets or raw private logs. See [MCP Intake Guide](docs/mcp-intake-guide.md) for full instructions.
295
+ ## License
665
296
 
297
+ [Apache-2.0](LICENSE) — Copyright 2026 Ikalus1988. Lessons are contributed under the same license, and
298
+ every commit carries a DCO `Signed-off-by` (see [CONTRIBUTING.md](CONTRIBUTING.md)).
package/README.zh-CN.md CHANGED
@@ -1,3 +1,9 @@
1
+ <div align="right">
2
+
3
+ [English](README.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
4
+
5
+ </div>
6
+
1
7
  # failure-memory protocol(failure-memory protocol)
2
8
 
3
9
  > **MisakaNet** 是 failure-memory protocol 的参考实现:一个 Git 驱动、零依赖优先的 AI Agent 失败经验知识网络。
@@ -50,7 +56,7 @@
50
56
 
51
57
  ### 这是什么?
52
58
 
53
- MisakaNet 是面向 AI 编码 Agent 的失败经验层。当你的 Agent 遇到错误 —— DCO 失败、pip 超时、GitHub 401、MCP 配置问题 —— MisakaNet 搜索 358 条索引化的失败修复经验并返回修复路径。无 prompt 泄漏,无原始日志存储。
59
+ MisakaNet 是面向 AI 编码 Agent 的失败经验层。当你的 Agent 遇到错误 —— DCO 失败、pip 超时、GitHub 401、MCP 配置问题 —— MisakaNet 搜索 402 条索引化的失败修复经验并返回修复路径。无 prompt 泄漏,无原始日志存储。
54
60
 
55
61
  ### 什么时候使用?
56
62
 
@@ -90,8 +96,12 @@ python3 search_knowledge.py "GitHub token 401"
90
96
 
91
97
  **方式 D:DeepSeek Harness(dsh 插件)与 Python 库**
92
98
 
99
+ 当前发布到 npm 的版本见**本页上方的 npm 徽章**。本项目同时发 npm 与 PyPI 两个通道,两者并不同步
100
+ (npm 发布是手动、需审批的工作流),所以在这里手写一个版本号,只会在其中一个通道落后时立刻变成假话;
101
+ 徽章才是实时答案。
102
+
93
103
  ```bash
94
- # npm 安装(推荐 — 发布为 misakanet@2.30.2)
104
+ # npm 安装(推荐)
95
105
  dsh plugin add misakanet
96
106
  # 或直接从 git 安装(同一 bundle)
97
107
  # dsh plugin add git+https://github.com/Ikalus1988/MisakaNet.git
@@ -250,11 +260,11 @@ python3 search_knowledge.py "database locked"
250
260
 
251
261
  | 指标 | 数值 |
252
262
  |------|------|
253
- | 📚 Lessons | 358 (canonical, 去重后) |
254
- | 🌐 Nodes | 59 |
263
+ | 📚 Lessons | 402 (canonical, 去重后) |
264
+ | 🌐 Nodes | 357 |
255
265
  | 🎤 Network Voices | 5 条 |
256
266
  | 📡 Feed Items | 11 条 |
257
- | 🔍 领域覆盖 | RAG, DevOps, Feishu, Fanuc, Network, Claude, Hub |
267
+ | 🔍 领域覆盖 | RAG, DevOps, Feishu, Fanuc, Network, Claude, MCP |
258
268
 
259
269
  ### v2.17.0 新功能
260
270
 
@@ -318,3 +328,82 @@ python3 search_knowledge.py "database locked"
318
328
  ## License
319
329
 
320
330
  Apache 2.0 · © 2025–2026 Ikalus1988
331
+
332
+ ---
333
+
334
+ ## 装到你自己的助手(Claude Code / Codex)
335
+
336
+ ### 两个通道,别装错(这是一次真实的安装失败换来的)
337
+
338
+ 本仓库发布**两个 npm 包**,名字像、用途完全不同;第三方插件市场就曾把它们弄混并报"入口文件缺失"
339
+ (#1849):
340
+
341
+ | 你想做的事 | 装什么 | 命令 | 它写什么 |
342
+ |---|---|---|---|
343
+ | **让助手会去查经验库**(Claude Code / Codex / Hermes / OpenClaw / codewhale) | `@misaka-net/misakanet-setup`(**npx 安装器**,有 `bin`、无插件入口) | `npx @misaka-net/misakanet-setup` | 把 MCP 端点写进**每个助手自己的**配置文件,并可选装规则块与钩子 |
344
+ | **把 MisakaNet 装成 DSH / Codex 的插件**(带 SKILL、`index.js`、`cordis.patch.yml`) | **`misakanet`**(根包 = 插件与 CLI 通道,入口 `index.js` 已提交进仓库) | `dsh plugin --profile web add misakanet` | 给 DSH/Codex 提供插件与技能;**不动**任何助手的配置 |
345
+ | Python 里当库用(搜索/索引) | `misakanet-core` | `pip install misakanet-core` | 装依赖,不写配置 |
346
+
347
+ 一句话:**`misakanet` 是插件/CLI;`@misaka-net/misakanet-setup` 是安装器**——前者给 DSH/Codex 用,
348
+ 后者给"让我的助手学会先查经验库"用,两者互不替代。插件市场报 `@misaka-net/misakanet-setup: entry file
349
+ missing: index.js` 时,那是解析选错了包:安装器本来就没有 `index.js`。
350
+
351
+ **一行命令**(需要 Node,Claude Code / Codex 本身就依赖它):
352
+
353
+ ```bash
354
+ npx @misaka-net/misakanet-setup
355
+ ```
356
+
357
+ 装完**把助手窗口关掉再打开一次**,然后随便挑一句带报错原文的片段问它(例如「switch vision model」
358
+ 「context window exceeded」「tool call permission denied」——用错误原文里最独特的片段,别用整句自然语言),
359
+ 它应该先去查经验库再回答。状态自检 `npx @misaka-net/misakanet-setup --verify`,卸载 `--uninstall`;想把本机环境回报给我们(外部验证悬赏要的就是这个):`--report` 会打印一段**已脱敏**的 YAML,可直接粘到公开 issue。
360
+ (支持 Claude Code / Codex / Hermes / OpenClaw / codewhale;codewhale 额外两步:token 走环境变量
361
+ `export MISAKANET_TOKEN=…`、规则块只对受信任的项目生效。想让命中/未命中时**出声**:加 `--voice`
362
+ (默认关,静音 `MISAKANET_VOICE=0`)。)
363
+
364
+ ### 三层结构:能力 / 接入 / 触发(读一遍就懂它到底做了什么)
365
+
366
+ | 层 | 是什么 | 缺了它会怎样 |
367
+ |---|---|---|
368
+ | **① 服务** | `https://misakanet.org/mcp`(Streamable HTTP,7 个工具,匿名**不限次数**,只有反爬突发保护)或**本地 stdio**(clone 后 `python3 scripts/mcp_server.py`,无限额)| 没有可查的地方 |
369
+ | **② 接入** | `npx @misaka-net/misakanet-setup`:把服务写进每个助手**自己的**配置文件(Claude Code / Codex / Hermes / OpenClaw / codewhale 各一套)| 你得自己知道 5 种配置文件分别怎么写 |
370
+ | **③ 触发** | 规则块(「遇到报错先查经验库」)+ 检查点钩子(约 20 轮提醒沉淀)+ 14 天升级提示 | **端点在,但没有任何人会去调用它** |
371
+
372
+ 分工要说清楚:**MCP 工具是 pull 型,端点永远不会主动调用**——"要不要查"始终由助手决定。
373
+ setup 保证的是"工具确实在"和"该查的时刻更容易被抓住",不是"自动查询"。
374
+
375
+ > 容易混淆的两个同名包:**PyPI 的 `misakanet` / `misakanet-core` 是 Python 库**(本地索引或
376
+ > `--remote` 查服务),不负责把工具接进助手;**npm 的 `misakanet` 是 skill/插件包**
377
+ > (`SKILL.md` + DSH 插件入口),早期它只有说明书、没有工具——工具来自第 ① 层的服务。
378
+
379
+ ### 装完你得到什么(逐条可自检)
380
+
381
+ 1. **7 个 `misakanet_*` 工具出现在助手里** —— `codex mcp list` / `codewhale mcp tools` /
382
+ `claude mcp list` / `hermes mcp list`;**证据**:列表里有 `misakanet` 且 7 个工具;
383
+ 2. **助手被要求「遇错先查」** —— 问一句「switch vision model」「context window exceeded」这类片段,它应该先说查过经验库;
384
+ **证据**:事件流里出现 `misakanet_search`(claude/codewhale 用 `--output-format stream-json`,codex 用 `--json`);
385
+ 3. **长会话会提醒沉淀** —— 约 20 轮后提醒把本次「失败 → 根因 → 修复 → 验证」变成一条课程
386
+ (Claude Code 有真钩子;**Codex 没有用户级钩子**,靠规则);
387
+ 4. **每 14 天最多一行升级提示** —— 只提示,绝不在背后安装任何东西;
388
+ 5. **随时可撤** —— `--verify` 看状态,`--uninstall` 还原(改写前会留 `.misakanet.bak` 备份)。
389
+
390
+ **不想用命令行、不知道配置文件在哪?** 把下面这句话**复制粘贴给助手**,它会自己装好、自己验证、用大白话回报:
391
+
392
+ ```text
393
+ 帮我接入 MisakaNet 失败记忆库:请读取 https://raw.githubusercontent.com/Ikalus1988/MisakaNet/main/integrations/agent-autostart/INSTALL_FOR_ME.md ,按里面的「第 2 部分:给你的要求」执行,做完用中文简单告诉我结果。
394
+ ```
395
+
396
+ 网络打不开上面那条网址时(部分网络会拦 `raw.githubusercontent.com`),把开头换 CDN 镜像:
397
+
398
+ ```text
399
+ 帮我接入 MisakaNet 失败记忆库:请读取 https://cdn.jsdelivr.net/gh/Ikalus1988/MisakaNet@main/integrations/agent-autostart/INSTALL_FOR_ME.md ,按里面的「第 2 部分:给你的要求」执行,做完用中文简单告诉我结果。
400
+ ```
401
+
402
+ 装的是三件事:① 注册 MCP 端点(读不限次,写入类工具需 token,安装器会顺手注册匿名节点);
403
+ ② 在助手的规则文件里写清"何时该查";③ 装一个钩子,让"每 20 轮沉淀一次"真的会触发
404
+ (**只写规则不会触发**——助手不记账)。细节与支持度矩阵见
405
+ [integrations/agent-autostart/README.md](integrations/agent-autostart/README.md),
406
+ 非技术用户看 [INSTALL_FOR_ME.md](integrations/agent-autostart/INSTALL_FOR_ME.md)。
407
+
408
+ _本节原在英文 README 开头(2026-09-20 结构重排时搬到这里):英文 README 之前要求读者先读 121 行中文,
409
+ 现在两边各自读到自己的语言。_
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "misakanet",
3
- "version": "2.30.2",
3
+ "version": "2.31.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "MisakaNet failure-memory skill — evidence-rated failure lessons for AI agents. DSH bundle: registers the MCP tools as mcp__misakanet__* (misakanet_search/get_lesson/…), served by the public Streamable HTTP endpoint https://misakanet.org/mcp — live tools from an npm install, in any profile, with no local python. A profile that prefers the repo's own stdio server can override the bundle row.",
6
6
  "files": [