Thank you for your interest in contributing to Mnemonic! This document provides guidelines and instructions for contributing.
Be respectful, inclusive, and constructive in all interactions.
- Claude Code CLI
- Git
- Python 3.8+ (for hooks)
- ripgrep (recommended for search operations)
# Clone the repository
git clone https://github.com/zircote/mnemonic.git
cd mnemonic
# Set up development environment
make setup
# Validate the plugin
make lint
# Run tests
make testmnemonic/
├── .claude-plugin/ # Plugin manifest
├── agents/ # Agent definitions
├── commands/ # Slash commands
├── docs/ # Documentation
│ ├── adrs/ # Architecture Decision Records
│ └── integrations/ # Multi-tool integration guides
├── hooks/ # Python hook implementations
├── skills/ # Self-contained skills
├── templates/ # Integration templates
├── tools/ # Utility scripts (validation, etc.)
└── tests/ # Tests and fixtures
Commands and skills are markdown files with YAML frontmatter:
---
description: Brief description
argument-hint: "<args>"
allowed-tools:
- Bash
- Read
- Write
---
# Command/Skill Name
Full documentation...Hooks are Python scripts in hooks/:
- Must output valid JSON
- Must handle errors gracefully
- Must respect timeouts
- Should be idempotent
#!/usr/bin/env python3
import json
import sys
def main():
result = {"continue": True}
print(json.dumps(result))
return 0
if __name__ == "__main__":
sys.exit(main())- Follow PEP 8
- Use type hints where practical
- Run
make formatbefore committing - Ensure
make lintpasses
- Use ATX-style headers (
#) - Code blocks must have language tags
- Tables should be properly aligned
- Maximum line length: 120 characters
# Run all tests
make test
# Validate plugin structure
make lint
# Check formatting
make format-check
# Validate memory files
make validate-memories
# Validate memory files (JSON output for CI)
make validate-memories-ci- Fork the repository
- Create a feature branch from
maingit checkout -b feature/my-feature
- Make your changes with tests
- Format and lint
make format make lint
- Commit with conventional commit messages
- Push to your fork
- Open a Pull Request
- Plugin validates (
make lint) - Commands/skills have proper frontmatter
- Python code passes linting
- Memory files validate (
make validate-memories) - Documentation updated if needed
- CHANGELOG.md updated for user-facing changes
- No breaking changes (or clearly documented)
Follow Conventional Commits:
feat: add memory export command
fix: correct namespace path in recall
docs: update architecture diagram
test: add hook unit tests
refactor: simplify capture workflow
chore: update dependencies
- Update README.md for user-facing changes
- Update docs/architecture.md for structural changes
- Add ADRs for significant architectural decisions
- Include examples in command/skill definitions
All memories must follow MIF Level 3 specification:
---
id: UUID
type: semantic|episodic|procedural
namespace: category/scope
created: ISO-8601
modified: ISO-8601
title: "Title"
tags: []
temporal:
valid_from: ISO-8601
recorded_at: ISO-8601
provenance:
source_type: conversation|user_explicit|inferred
agent: model-identifier
confidence: 0.0-1.0
---Open an issue for discussion or clarification.