Date: 2026-08-03 Version: v2.14.0 Related issue: #757
MisakaNet provides four runtime entry points for failure-memory suggestions:
| Entry point | File | Trigger |
|---|---|---|
| Cursor rule | .cursor/rules/misakanet-failure-memory.mdc |
IDE auto-detects terminal failures |
| Claude Code playbook | docs/integrations/claude-code-failure-memory.md |
Manual or prompted failure analysis |
misaka run wrapper |
scripts/misaka_run.py |
CLI: wrap any command |
| Shell helper | scripts/misaka-search.sh |
CLI: misaka-search "query" or mk "query" |
- Confirm
.cursor/rules/misakanet-failure-memory.mdcexists in your project root (already present in this repo). - Open the project in Cursor IDE.
- The rule activates automatically — no manual config needed.
Run a failing command in Cursor's integrated terminal:
npm run nonexistent-script
# or
python -c "import nonexistent_module"Cursor should detect the non-zero exit and surface the failure-memory rule. The rule instructs Cursor to search MisakaNet for matching failure-recovery lessons.
- Cursor IDE only (not VS Code, not JetBrains).
- Rule must be in
.cursor/rules/— not.cursorrules(deprecated format). - Depends on Cursor's rule execution model, which may change.
- First-time failures with no matching lessons will return empty.
- Review
docs/integrations/claude-code-failure-memory.md. - The playbook is a prompt/workflow document — it tells Claude Code how to invoke MisakaNet MCP tools on failure.
After a failure in Claude Code's terminal, ask:
Check MisakaNet for this error.
Claude Code should call misakanet_search via MCP.
Claude Code calls misakanet_search with the error text and returns matching lessons with titles, scores, and paths.
- Requires Claude Code with MCP support configured.
- MCP server must be running (
python scripts/mcp_server.py). - Depends on Claude Code's willingness to call MCP tools.
- Not fully automatic — user or playbook must trigger the search.
# No install needed — run directly from repo
python scripts/misaka_run.py --helppython scripts/misaka_run.py npm test
python scripts/misaka_run.py python failing_script.py
python scripts/misaka_run.py --capture cargo build # auto-submit intake on failureOn non-zero exit:
- Captures stdout/stderr from the failed command.
- Searches MisakaNet lessons for matching failure patterns.
- Displays top matches with title, score, and path.
Options:
--capture— auto-submit redacted failure report as intake (opt-in).--top N— number of lessons to show (default: 3).
- Adds overhead (subprocess + search).
- Interactive commands may behave differently when wrapped.
- Search quality depends on error message clarity.
--capturesends data to/api/intake— only use if you understand the privacy model.
source scripts/misaka-search.shThis defines two functions: misaka-search and mk.
misaka-search "database locked"
mk "pip install timeout"Calls search_knowledge.py with the query and displays matching lessons.
- Bash/Zsh only.
- Must be sourced (not executed) —
bash misaka-search.shwon't work. - Calls Python internally, so Python must be in PATH.
- No color output on Windows CMD.
Run each entry point and verify:
| # | Entry point | Command | Pass criteria |
|---|---|---|---|
| 1 | Cursor rule | Open project in Cursor, run python -c "import nonexistent" |
Rule triggers, Cursor shows suggestion or search prompt |
| 2 | Claude Code | After a failure, ask "check MisakaNet" | MCP misakanet_search returns results |
| 3 | misaka run |
python scripts/misaka_run.py false |
Shows "Command failed" + lesson matches |
| 4 | Shell helper | source scripts/misaka-search.sh && misaka-search "database locked" |
Returns lesson results |
- Cursor integration:
docs/integrations/cursor-failure-memory.md - Claude Code integration:
docs/integrations/claude-code-failure-memory.md - MCP smoke report:
docs/integrations/mcp-smoke-report.md - Glama analytics:
docs/integrations/glama-analytics.md