@gitmaxd/ai-mem
v0.5.0
Published
GitMaxd's AI-optimized memory and documentation system for Claude Code and other AI coding assistants
Maintainers
Readme
AI Memory 🧠
A comprehensive AI-optimized memory and documentation system designed for Claude Code and other AI coding assistants. Create a structured memory-bank directory that helps AI assistants understand your project's architecture, patterns, and current state.
Created by @GitMaxd for personal productivity and AI-assisted development.
Quick Start
Global Installation
npm install -g @gitmaxd/ai-memOne-time Use (Recommended)
npx ai-mem initThis creates a memory-bank directory in your current project with a complete documentation structure optimized for AI assistants.
Features
✅ AI-Optimized Structure - Documents organized for optimal AI comprehension
✅ Plug & Play - Works immediately with Claude Code and other AI assistants
✅ Comprehensive Templates - Pre-built templates for all common documentation needs
✅ Maintenance Automation - Built-in prompts for keeping documentation current
✅ Cross-Platform - Works on Windows, macOS, and Linux
Usage
Initialize Memory Bank
# Create memory-bank directory (default)
npx ai-mem init
# Custom directory name
npx ai-mem init -d my-memory-bank
# Force overwrite existing directory
npx ai-mem init --forceUpdate Existing Memory Bank
# Update templates and structure
npx ai-mem updateProgrammatic API
const MemoryBank = require('@gitmaxd/ai-mem');
const memoryBank = new MemoryBank({ directory: 'memory-bank' });
// Initialize
await memoryBank.init();
// Update
await memoryBank.update();
// Check if exists
const exists = await memoryBank.exists();Directory Structure Created
memory-bank/
├── README.md # Navigation guide
├── INITIALIZATION_GUIDE.md # Setup instructions
├── MAINTENANCE_GUIDE.md # Ongoing maintenance
├── QUICK_START.md # 1-minute setup guide
├── prompts/ # AI prompts for various tasks
│ ├── PROJECT_ANALYSIS_PROMPT.md
│ ├── UPDATE_PROMPT.md
│ └── MAINTENANCE_PROMPT.md
├── templates/ # Document templates
│ ├── metadata-header.yaml
│ ├── core/ # Project fundamentals
│ ├── active/ # Current development
│ ├── patterns/ # Implementation patterns
│ ├── features/ # Feature documentation
│ └── technical/ # Technical learnings
├── active/ # Current development state
├── core/ # Fundamental project docs
├── patterns/ # Implementation patterns
├── features/ # Feature documentation
├── technical/ # Technical learnings
└── archive/ # Historical documentationAI Assistant Integration
With Claude Code
After initializing, tell Claude Code:
Please initialize the memory bank for this project by:
1. Reading memory-bank/prompts/PROJECT_ANALYSIS_PROMPT.md
2. Analyzing the codebase following its instructions
3. Creating initial documentation in the appropriate directoriesDaily Workflow
- Start of session:
"What's the current development context from the memory bank?" - During work: AI references patterns and architecture from memory bank
- End of session:
"Please update the memory bank using memory-bank/prompts/UPDATE_PROMPT.md"
Weekly Maintenance
Please perform weekly memory bank maintenance using memory-bank/prompts/MAINTENANCE_PROMPT.mdBenefits
For AI Assistants
- Rapid Context Loading - Structured navigation reduces search time
- Consistent Understanding - Standardized formats across projects
- Accurate Code Generation - Current state and patterns always documented
- Efficient Collaboration - Clear handoff between sessions
For Development Teams
- Faster Onboarding - New team members get complete project context
- Better Documentation - Living docs that evolve with code
- Consistent Patterns - Documented approaches across the codebase
- Knowledge Retention - Captures decisions and learnings over time
CLI Commands
# Show help
ai-mem --help
# Initialize with options
ai-mem init --help
# Update with options
ai-mem update --helpOptions
init command
-d, --directory <dir>- Target directory name (default: 'memory-bank')--force- Overwrite existing directory
update command
-d, --directory <dir>- Memory bank directory name (default: 'memory-bank')
Requirements
- Node.js >= 14.0.0
- npm or yarn
Author
GitMaxd - @GitMaxd
License
MIT © GitMaxd
Support
Made by @GitMaxd for AI-assisted development 🤖❤️
