← 返回
未分类

Max-Self-Improvement

MiniMax Agent self-evolution system with 5-layer memory for continuous learning, error analysis, and persistent personalized context management.
ruiyongwang
未分类 clawhub v1.0.1 100000 Key: 无需
★ 0
Stars
📥 327
下载
💾 0
安装

概述

Max-Self-Improvement — Self-Evolution & Memory System

Overview

MiniMax Agent's self-evolution framework integrating 5-layer memory architecture, supporting cross-session persistent context and continuous performance optimization.


Core Components

1. Five-Layer Memory Architecture

LayerNameStorageFunction
--------------------------------
L1Sensory MemoryContext WindowImmediate input/output stream
L2Working Memory/memories/session_notes.mdCurrent task state
L3Long-Term Memory/memories/*.mdUser preferences, domain knowledge
L4Episodic Memory/memories/evolution/Patterns, lessons, cases
L5Metacognitive/memories/evolution/metrics.mdPerformance tracking

2. Learnings System

Records structured learnings from errors, corrections, and successes.

.learnings/
├── LEARNINGS.md         # Learning entries
├── ERRORS.md            # Error logs
└── FEATURE_REQUESTS.md  # Feature requests

Entry ID Format

TYPE-YYYYMMDD-XXX
├── TYPE: LRN | ERR | FEAT
├── YYYYMMDD: Current date
└── XXX: Sequence number or random 3 chars

Trigger Scenarios

Learning Triggers → LEARNINGS.md

SituationCategory
---------------------
Command/operation failserror
User corrects youcorrection
Discovered better approachbest_practice
Found outdated knowledgeknowledge_gap
User provides unknown infoknowledge_gap

Error Triggers → ERRORS.md

SituationAction
-------------------
Non-zero exit codeLog to ERRORS.md
Exception/stack traceLog to ERRORS.md
Unexpected outputLog to ERRORS.md
API/tool failureLog to ERRORS.md

Feature Triggers → FEATURE_REQUESTS.md

User SaysAction
-------------------
"Can you also..."Log to FEATURE_REQUESTS.md
"I wish you could..."Log to FEATURE_REQUESTS.md
"Is there a way to..."Log to FEATURE_REQUESTS.md
"Why can't you..."Log to FEATURE_REQUESTS.md

Correction Detection Patterns

When user says phrases like:

  • "No, that's not right..."
  • "Actually, it should be..."
  • "You're wrong about..."
  • "That's outdated..."

→ Create LRN entry with category: correction


Entry Templates

Learning Entry (LEARNINGS.md)

## [LRN-YYYYMMDD-XXX] category

**Logged**: ISO-8601 timestamp
**Priority**: low | medium | high | critical
**Status**: pending | acknowledged | applied
**Area**: frontend | backend | infra | tests | docs | config

### Summary
One-line description of what was learned

### Details
Full context: what happened, what was wrong, what's correct

### Suggested Action
Specific fix or improvement to make

### Metadata
- Source: conversation | error | user_feedback | discovery
- Related Files: path/to/file.ext
- Tags: tag1, tag2
- See Also: LRN-YYYYMMDD-XXX
- Pattern-Key: simplify.dead_code | harden.input_validation
- Recurrence-Count: 1
- First-Seen: YYYY-MM-DD
- Last-Seen: YYYY-MM-DD

Error Entry (ERRORS.md)

## [ERR-YYYYMMDD-XXX] skill_or_command_name

**Logged**: ISO-8601 timestamp
**Priority**: high
**Status**: pending | investigated | resolved
**Area**: frontend | backend | infra | tests | docs | config

### Summary
Brief description of what failed

### Error
Actual error message or output

### Context
- Command/operation attempted
- Input or parameters used
- Environment details if relevant

### Suggested Fix
If identifiable, what might resolve this

### Metadata
- Reproducible: yes | no | unknown
- Related Files: path/to/file.ext
- See Also: ERR-YYYYMMDD-XXX

Feature Request Entry (FEATURE_REQUESTS.md)

## [FEAT-YYYYMMDD-XXX] capability_name

**Logged**: ISO-8601 timestamp
**Priority**: medium
**Status**: pending | planned | implemented | rejected
**Area**: frontend | backend | infra | tests | docs | config

### Requested Capability
What the user wanted to do

### User Context
Why they needed it, what problem they're solving

### Complexity Estimate
simple | medium | complex

### Suggested Implementation
How this could be built, what it might extend

### Metadata
- Frequency: first_time | recurring
- Related Features: existing_feature_name

Priority Guidelines

PriorityWhen to Use
-----------------------
criticalBlocks core function, data loss risk, security issue
highMajor impact, affects common workflows, recurring issues
mediumModerate impact, workaround exists
lowMinor inconvenience, edge case

Area Labels

AreaScope
-------------
frontendUI, components, client code
backendAPI, services, server-side
infraCI/CD, deployment, Docker, cloud
testsTest files, test tools, coverage
docsDocumentation, comments, README
configConfig files, environment, settings

Memory Promotion Targets

Learning TypePromote To
--------------------------
Behavioral patterns/memories/user_preferences.md
Workflow improvements/memories/workflow_library.md
Tool tips/memories/domain_knowledge.md
Project facts/conventions/memories/project/[slug]/context.md

Tool Usage Rules

OperationCorrect ToolWrong Approach
-----------------------------------------
Update specific linestr_replace_memorycreate_memory overwrites
Create new memorycreate_memoryReuse unrelated files
Read large contentview_memory fullMultiple small reads
Record new Episodecreate_memory new fileAppend to session_notes

Conflict Resolution Priority

User Explicit Instruction > Recent Implicit Behavior > High-Confidence LT Memory > Low-Confidence Pattern > Default Reasoning

Common Mistakes to Avoid

  1. session_notes stack appending — Update in-place, keep file lean
  2. Not reading memory before work — Must read session_notes + user_preferences first
  3. Logging everything to memory — Only write reusable content, avoid noise
  4. No confidence tags on memory — Knowledge without confidence is blindly adopted
  5. Not saving before restart — Must write all in-progress state before restart

Quick Reference

User SaysAgent Action
-------------------------
"Remember this preference"Update user_preferences.md
"Continue from last time"Read session_notes + project context
"Improve your response"Analyze recent output, update patterns
"Analyze failure"Root cause → lessons.md + proactive pattern
"Do you remember"Search long-term + episodic memory
"What did you learn"Retrieve patterns.md + lessons.md summary

Related References

  • Detailed architecture: references/architecture.md
  • Memory templates: references/memory_templates.md
  • Evolution cases: references/evolution_cases.md
  • Learning templates: assets/SKILL-TEMPLATE.md

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 23:27 安全 安全

安全检测

暂无安全检测报告