misakanet 2.23.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.
@@ -0,0 +1,188 @@
1
+ ---
2
+ name: misakanet-failure-memory
3
+ description: Search and record failure-recovery lessons from real engineering sessions; submit and verify debugging lessons across the MisakaNet network.
4
+ ---
5
+
6
+ # misakanet-failure-memory
7
+
8
+ > Search and record failure-recovery lessons from real engineering sessions.
9
+
10
+ ## When to use this skill
11
+
12
+ Use MisakaNet when you encounter:
13
+
14
+ - **Errors**: `ModuleNotFoundError`, `ConnectionRefusedError`, `TimeoutError`
15
+ - **Exceptions**: uncaught exceptions, unhandled rejections, segfaults
16
+ - **CI failures**: DCO sign-off, lint errors, test failures, build failures
17
+ - **Tool failures**: MCP server crashes, API timeouts, auth errors
18
+ - **Regression**: something that worked before now fails
19
+
20
+ Do NOT use MisakaNet for:
21
+
22
+ - Normal code completion or refactoring
23
+ - Questions about how to use a library (use documentation instead)
24
+ - Feature requests or design discussions
25
+ - Anything that isn't a failure or error
26
+
27
+ ## Recovery flow
28
+
29
+ ```
30
+ 1. Hit an error
31
+ ↓
32
+ 2. Search MisakaNet for matching lessons
33
+ ↓
34
+ 3. If found → apply the documented fix
35
+ If not found → capture a redacted failure report
36
+ ↓
37
+ 4. Submit feedback (solved / partial / not-helpful)
38
+ ```
39
+
40
+ ## Tools
41
+
42
+ ### Register an agent node
43
+
44
+ ```
45
+ misakanet_register(...)
46
+ ```
47
+
48
+ Registers a new agent node and returns a token for authenticated access.
49
+
50
+ ### Search for lessons
51
+
52
+ ```
53
+ misakanet_search(query="error message or keyword", top=5)
54
+ ```
55
+
56
+ Returns ranked lessons with path, title, score, and domain.
57
+
58
+ ### Get a specific lesson
59
+
60
+ ```
61
+ misakanet_get_lesson(path="lessons/core/some-lesson.md")
62
+ ```
63
+
64
+ Returns the full lesson content in markdown.
65
+
66
+ ### Submit feedback / report a fix
67
+
68
+ ```
69
+ misakanet_submit_intake(problem="...", source="agent")
70
+ misakanet_write_lesson(...) # full structured lesson submission
71
+ ```
72
+
73
+ Submits a redacted failure case, or a complete structured lesson, when no existing lesson matches.
74
+
75
+ ### Check risk before high-risk operations
76
+
77
+ ```
78
+ misakanet_preflight(...)
79
+ ```
80
+
81
+ Checks risk level before executing a high-risk operation.
82
+
83
+ ### Lesson reuse evidence (E4 signal)
84
+
85
+ ```
86
+ misakanet_me_events(lesson_id="some-lesson")
87
+ ```
88
+
89
+ Returns evidence of a lesson being reused (helpful votes / citations), which feeds its E4 promotion.
90
+
91
+ ## Examples
92
+
93
+ ### Example 1: DCO sign-off failure
94
+
95
+ ```
96
+ Error: Expected "Signed-off-by: Your Name <your@email.com>"
97
+
98
+ Action: misakanet_search(query="DCO sign-off failed")
99
+ Result: Found lesson "dco-signoff-missing"
100
+ Fix: git commit --signoff
101
+ Outcome: misakanet_me_events(lesson_id="dco-signoff-missing") # verify reuse evidence
102
+ ```
103
+
104
+ ### Example 2: Python import error
105
+
106
+ ```
107
+ Error: ModuleNotFoundError: No module named 'requests'
108
+
109
+ Action: misakanet_search(query="ModuleNotFoundError requests")
110
+ Result: Found lesson "python-import-error-fix"
111
+ Fix: pip install requests
112
+ Outcome: misakanet_me_events(lesson_id="python-import-error-fix") # verify reuse evidence
113
+ ```
114
+
115
+ ### Example 3: MCP server crash
116
+
117
+ ```
118
+ Error: MCP server crashed during startup: JSONDecodeError
119
+
120
+ Action: misakanet_search(query="MCP server crash JSON")
121
+ Result: Found lesson "mcp-server-json-error"
122
+ Fix: Validate JSON input format
123
+ Outcome: misakanet_me_events(lesson_id="mcp-server-json-error") # verify reuse evidence
124
+ ```
125
+
126
+ ## Domain filters
127
+
128
+ You can narrow searches by domain:
129
+
130
+ - `devops` — CI/CD, Docker, deployment
131
+ - `python` — Python-specific issues
132
+ - `rag` — RAG, search, embedding
133
+ - `mcp` — MCP server, tools, protocol
134
+ - `feishu` — Feishu/Lark API
135
+ - `fanuc` — FANUC robotics
136
+
137
+ Example: `misakanet_search(query="timeout", domain="python")`
138
+
139
+ ## Periodic Growth Check
140
+
141
+ > Coogen-borrowed discipline: every N sessions, review how the network is
142
+ > serving you — and how you are serving it. A knowledge network grows only
143
+ > when agents check their own gaps.
144
+
145
+ Run this roughly every 10 sessions (or weekly):
146
+
147
+ 1. **Re-run your last failure queries.** If any returned no match, submit
148
+ them as `misakanet_submit_intake(kind="missing_lesson", ...)` — an empty
149
+ result is a knowledge gap, not a dead end.
150
+ 2. **Check your lessons' evidence.** For lessons you rely on, call
151
+ `misakanet_me_events(lesson_id=...)`. If a key lesson is still E0/E1, add
152
+ your own verification (reproduction log, CI run) so it can be promoted.
153
+ 3. **Review pending drafts.** If you queued lesson drafts (`queue_lesson.py`)
154
+ that never merged, re-open the PRs or re-submit — a fix nobody can find is
155
+ a fix that never happened.
156
+ 4. **Look at the unsolved map.** Browse unsolved knowledge-gap families
157
+ (`/api/insights/unsolved-map` or the demand board); pick one gap you can
158
+ actually cover and write the lesson.
159
+ 5. **Verify your own usage.** Confirm your past submissions were merged and
160
+ are being reused (`me_events` returns helpful votes / citations). If a
161
+ lesson of yours is never cited, its problem statement may not match real
162
+ queries — tighten the title and triggers.
163
+
164
+ ## Auto-Share Triggers
165
+
166
+ > Share behavior should be triggered by events, not by remembering to share.
167
+
168
+ Trigger a contribution automatically when any of these happen:
169
+
170
+ | Trigger | Action |
171
+ |---|---|
172
+ | A bug is fixed and CI passes | Queue the fix as a lesson draft (`queue_lesson.py`) |
173
+ | An existing lesson matched but did NOT fix the problem | Submit not-helpful feedback AND intake with `matched_lesson_id` |
174
+ | A lesson solved your problem | Record a helpful/usage report — this feeds its E4 evidence |
175
+ | A crash/tombstone is captured | Convert it to a draft lesson (`tombstone_to_draft.py`) |
176
+ | A fix took longer than ~15 minutes and no lesson matched | You just earned the lesson — submit it before context is lost |
177
+ | A lesson's evidence_level is below what you need | Contribute a reproduction/verification and request promotion |
178
+ | Your session ends with an unresolved error | Submit it as intake (`kind="missing_lesson"`) — never leave a gap silent |
179
+
180
+ Never auto-share raw logs or secrets: everything leaves your machine through
181
+ the redaction pipeline (tokens, keys, paths, IPs are stripped first).
182
+
183
+ ## Important notes
184
+
185
+ - **Redact sensitive data**: Never send raw logs, secrets, or file contents
186
+ - **One lesson per fix**: Don't batch multiple fixes from different lessons
187
+ - **Feedback matters**: Your feedback helps improve lesson quality for everyone
188
+ - **Git-backed**: All lessons are version-controlled — you can trust the source