Project Overview
MiniClaw is a minimal implementation of the viral open-source project OpenClaw — a universal "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
Three-Layer Model
| 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 for scheduling
- Short-term:
memory/YYYY-MM-DD.mddaily logs - Long-term:
MEMORY.mddistilled knowledge - Entry count > 20
- Log budget usage > 40%
- Oldest entry > 8 hours and entries > 5
- Log size > 8KB
- Heartbeat interval: every 30 minutes
- Automatic evolution: updates SOUL.md, USER.md, etc., based on user feedback
- File health checks: detects stale files and prompts maintenance
- Allowed: ls, git, cat, find, grep, npm, node, python, etc.
- Blocked: rm, sudo, chown and other dangerous commands
- Limits: 10s timeout, 1MB output truncation
- 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
- Templates: 9 Markdown files
- Architecture: micro-kernel + MCP protocol
- GitHub: https://github.com/8421bit/miniclaw
- Upstream project: OpenClaw
- License: MIT
ACE Adaptive Context Engine
Time-Mode System
| Mode | Time | 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): SOUL.md, USER.md personality preferences 3. Tail (recency effect): today's logs and tasksMemory System
Two-Tier Memory
Memory Distillation Triggers
Entity Knowledge Graph
Supports entity types: person, project, tool, concept, place, other.Core Tools
| Tool | Function |
|-----|----------|
| miniclaw_update | Update core files, self-evolution |
| miniclaw_note | Quick log notes |
| miniclaw_read | Read 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 config | Medium | | MEMORY.md | Long-term memory | Medium | | HEARTBEAT.md | Periodic checks | Low | | BOOTSTRAP.md | First-run guidance | One-time | | SUBAGENT.md | Sub-agent context | – |
Heartbeat and Evolution
Security
Command Execution Whitelist
Data Security
Project Stats
Links
*This outline serves as the framework for a subsequent multi-chapter detailed analysis report, and as a reference for studying MiniClaw/OpenClaw architecture design. The full outline spans 20 chapters covering overview, architecture, core modules, the DNA template system, ACE, memory, skills, heartbeat/evolution, security, MCP implementation, configuration/deployment, testing, tech stack, code quality, performance, extensibility, relation to OpenClaw, best practices, outlook, and appendices.*