Skip to content

Commit 30fffb0

Browse files
author
Test User
committed
docs: add behavioral integration guide + lesson learned
Critical fix: skill is a tool, NOT auto-triggering. Added integration guide explaining: - Skill must be explicitly called by agent - SOUL.md/AGENTS.md rules required for startup behavior - HEARTBEAT.md rules required for end-of-session behavior Lesson (2026-04-03): Even with skill installed, if agent doesn't call memory_search on wake, context loss continues.
1 parent 39c1264 commit 30fffb0

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

SKILL.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: context-optimizer
2+
name: agent-context-optimizer
33
description: "Keep AI agents from forgetting. Keep context small. Use when: (1) building multi-agent systems, (2) context window overflow, (3) agents forget between sessions, (4) need memory sync across agents. Hot layer (<500 tokens) + cold layer (vector search) + auto decisions. Zero memory loss."
44
---
55

@@ -167,3 +167,44 @@ const enhancedPrompt = hotContext + "\n\n" + newMessage;
167167
const stats = optimizer.getStats();
168168
console.log(stats.decisionsCount); // Number of decisions tracked
169169
```
170+
171+
---
172+
173+
## ⚠️ Important: Behavioral Integration Required
174+
175+
**This skill is a tool. It does NOT auto-trigger.**
176+
177+
The skill provides the engine (`ContextOptimizer`) and the startup helper (`onAgentStartup`), but the agent must be configured to actually CALL these functions.
178+
179+
### What YOU Must Do (Agent Configuration)
180+
181+
**1. Add to SOUL.md (or AGENTS.md) startup rules:**
182+
```markdown
183+
## 🔄 Memory Recovery (Mandatory on Every Wake)
184+
185+
On first message of each session:
186+
1. Call `memory_search()` to retrieve relevant memories
187+
2. Call `onAgentStartup('agent-name')` to build hot context
188+
3. Inject hot context into current session
189+
4. If context exists, use it; otherwise, start fresh
190+
```
191+
192+
**2. Add to HEARTBEAT.md (end-of-session rules):**
193+
```markdown
194+
## After Each Session
195+
- Call `optimizer.summarize(conversationHistory)`
196+
- Call `sidecarUpdater.onSessionComplete()`
197+
```
198+
199+
### Why This Matters
200+
201+
- **Without integration**: Agent reads the skill file but never calls it → context loss continues
202+
- **With integration**: Agent explicitly calls the tool → hot layer stays under 500 tokens
203+
204+
### Real-World Lesson (2026-04-03)
205+
206+
> Even with the skill installed and SOUL.md rules written, if the agent doesn't EXPLICITLY call `memory_search` on wake, the memory system fails. The tool + the rule + the execution = all three required.
207+
208+
### GitHub PR
209+
210+
This skill was submitted to [MiniMax-AI/skills PR #58](https://github.com/MiniMax-AI/skills/pull/58). The skill itself is complete; integration is the implementer's responsibility.

0 commit comments

Comments
 (0)