MiniClaw Analysis Report Outline — The Nervous System Architecture of a Micro-Kernel Agent
Project Overview
MiniClaw is a minimal implementation of the viral open-source project OpenClaw — a general-purpose micro-kernel agent designed for MCP clients such as Claude CoWork, Qoderwork, and WorkBuddy.
Unlike traditional chatbots, MiniClaw acts as a parasitic nervous system that gives AI four core capabilities: 1. 👁️ Eyes (Perception): Automatically identifies project type, Git status, and tech stack 2. 🖐️ Hands (Action): Safely executes terminal commands 3. 🧠 Memory: Remembers project details and user preferences across sessions 4. 🧬 Evolution: Automatically evolves personality and skills based on feedback
Architecture Design
Three-Layer Architecture
| Layer | Component | Responsibility | |-----|------|-------| | Kernel (Brain) |src/kernel.ts | ACE, memory graph, skill loading, execution sandbox |
| Interface (Body) | src/index.ts | MCP protocol, tool dispatch, heartbeat detection |
| DNA (Genes) | templates/*.md | Personality, constitution, boot protocol |Core Tech Stack
- TypeScript + Node.js
- MCP SDK (@modelcontextprotocol/sdk)
- Zod for parameter validation
- node-cron scheduler
- Short-term memory:
memory/YYYY-MM-DD.mddaily journals - Long-term memory:
MEMORY.mddistilled knowledge - Entry count > 20
- Journal budget usage > 40%
- Oldest entry > 8 hours and entries > 5
- Journal size > 8KB
- Heartbeat cycle: Every 30 minutes
- Automatic evolution: Updates SOUL.md, USER.md, and other files based on user feedback
- File health checks: Detects file update status and prompts maintenance
- Allowed: ls, git, cat, find, grep, npm, node, python...
- Blocked: rm, sudo, chown and other dangerous commands
- Limits: 10s timeout, output truncated at 1MB
- All data stored locally (
~/.miniclaw/) - No cloud uploads
- MEMORY.md loaded only in the main session
- Code size: ~2,700 lines
- Core files: 2 TypeScript source files
- Template files: 9 Markdown templates
- Architecture pattern: Micro-kernel + MCP protocol
- GitHub: https://github.com/8421bit/miniclaw
- Upstream project: OpenClaw
- License: MIT
ACE Adaptive Context Engine
Time Mode System
| Mode | Hours | Feature | |-----|------|--------| | ☀️ Morning | 06–09 | Morning briefing | | 💼 Work | 09–12, 14–18 | Standard work | | 🍜 Break | 12–14 | Rest period | | 🌙 Evening | 18–22 | Reflection suggestions | | 😴 Night | 22–06 | Minimal mode |Context Priority (Sandwich Structure)
1. Head (high weight): AGENTS.md constitution rules 2. Middle (background infusion): SOUL.md, USER.md personality preferences 3. Tail (recency effect): Today's journal and to-do tasksMemory System
Dual-Layer Memory Model
Memory Distillation Triggers
Entity Knowledge Graph
Supported entity types: person, project, tool, concept, place, otherCore Tool Set
| Tool | Function |
|-----|--------|
| miniclaw_update | Updates core files, self-evolution |
| miniclaw_note | Quick journal notes |
| miniclaw_read | Reads core context |
| miniclaw_search | Memory retrieval |
| miniclaw_entity | Entity knowledge graph management |
| miniclaw_exec | Safe command execution |
| miniclaw_status | System diagnostics |
DNA Template System (9 Core Files)
| File | Role | Priority | |-----|------|---------| | AGENTS.md | Workspace charter | Very high | | SOUL.md | Worldview and personality | Very high | | IDENTITY.md | Name and metadata | High | | USER.md | User profile | Medium | | TOOLS.md | Environment configuration | Medium | | MEMORY.md | Long-term memory | Medium | | HEARTBEAT.md | Periodic check items | Low | | BOOTSTRAP.md | First-run guidance | One-time | | SUBAGENT.md | Sub-agent context | — |
Heartbeat and Evolution Mechanism
Security Mechanisms
Command Execution Whitelist
Data Safety
Project Statistics
Links
Full Outline (20 Chapters)
1. Project overview 2. Architecture design 3. Core module analysis 4. DNA template system 5. ACE Adaptive Context Engine 6. Memory system 7. Skill system 8. Heartbeat and evolution mechanism 9. Security mechanisms 10. MCP protocol implementation 11. Configuration and deployment 12. Testing and validation 13. Tech stack analysis 14. Code quality analysis 15. Performance considerations 16. Extensibility design 17. Relationship with OpenClaw 18. Best practices 19. Future outlook 20. Appendix
*This outline serves as the framework for a forthcoming chapter-by-chapter detailed analysis, and can be used as a reference for learning the MiniClaw/OpenClaw architecture.*