AI Project Memory Framework (APMF) — Universal AI Project Memory & Context Framework
Project description
AI Project Memory Framework
Structured project memory and context management for AI coding agents.
APMF helps an AI agent understand the current state of a long-lived project without scanning the entire repository or replaying the full conversation history.
Project repository: github.com/MellojFront/APMF
Why APMF
- Keeps project identity, constraints, decisions, and tasks in a human-readable format.
- Compiles a small
MEMORY.mdsnapshot for fast session startup. - Exports focused context for one task instead of loading the whole project.
- Works with any coding agent that can read files.
- Keeps memory independent from a specific LLM or editor.
- Encourages Git versioning so project state can be reviewed and rolled back.
Install
Choose one of the following interfaces:
# Zero-install Node.js interface
npx @melloj/apmf init
# Global Node.js CLI
npm install --global @melloj/apmf
# Python CLI
python -m pip install apmf
Both packages provide the apmf and ai-memory commands. The npm package is scoped as @melloj/apmf because npm blocks the unscoped apmf name as too similar to existing packages.
Quick start
Interactive TUI Setup Wizard (Recommended)
Run the interactive setup wizard (similar to BMAD framework setup) to step through environment checks, project metadata, AI assistant selection (Antigravity, Cursor, Claude Code, Copilot), and automatic rule generation:
apmf wizard
# or
apmf init --interactive
# or zero-install
npx @melloj/apmf wizard
Direct initialization
ai-memory init
APMF creates an isolated .ai-memory/ directory containing the framework state, documentation, schemas, scripts, and task storage. It also generates lightweight bootstrap files for AI agents:
MEMORY.md— the current project snapshot;AGENTS.md— startup and collaboration instructions;.ai-memory/— the full, structured memory store.
If the project is not a Git repository, APMF warns you and offers to run git init. Use --init-git for non-interactive initialization:
ai-memory init --init-git
Agent Setup & Integration
To generate or update rules and skills for specific AI assistants anytime:
# Generate rules for all supported agents (Antigravity, Cursor, Claude Code, Copilot, Codex)
apmf setup-agent all
# Generate rules for a specific agent
apmf setup-agent codex
apmf setup-agent cursor
apmf setup-agent antigravity
apmf setup-agent claude
Everyday commands
# Refresh the project snapshot
ai-memory compile
# Validate memory units and graph relationships
ai-memory validate
# Create a structured task
ai-memory new-task "Add authentication"
# Export context for one task
ai-memory task task-001
The focused task export is useful when an AI agent needs the project boundaries and constraints for one piece of work, without receiving unrelated history.
Project layout after initialization
your-project/
├── .ai-memory/
│ ├── docs/
│ ├── schema/
│ ├── scripts/
│ ├── tasks/
│ ├── units/
│ ├── AGENTS.md
│ └── MEMORY.md
├── AGENTS.md
└── MEMORY.md
The generated .ai-memory/ directory belongs to the project that you initialize. It may contain private project context and should be reviewed before sharing or publishing that project.
Design principles
- Targeted context — load only the context required for the current task.
- State over transcript — preserve the project state, not every conversational turn.
- LLM independence — keep memory in portable files rather than provider-specific storage.
- Human readability — make every important memory unit inspectable and recoverable.
- Git hygiene — use version control for history, review, and rollback.
Development
Run the local test suite and inspect the distributable artifacts:
npm test
npm pack --dry-run
python -m pip install --upgrade build twine
python -m build
Publishing is intentionally a separate, explicit action:
npm publish
python -m twine upload dist/*
Review the generated files and confirm the release before running either publish command.
Automated releases
Public releases use GitHub Actions OIDC Trusted Publishing. No npm or PyPI write token is stored in the repository or GitHub Actions secrets.
Before the first release, configure both registries to trust:
- GitHub repository:
MellojFront/APMF; - workflow file:
.github/workflows/release.yml; - GitHub environment:
release; - npm package name:
@melloj/apmf; - PyPI package name:
apmf.
Then publish a GitHub Release from a version tag such as v0.1.0. The workflow verifies the tag, builds the Python distributions, and publishes to npm and PyPI using short-lived OIDC credentials.
See the official setup guides for npm Trusted Publishing and PyPI Trusted Publishers.
Privacy and public releases
APMF can store project-specific decisions, tasks, paths, and other context in .ai-memory/. Do not publish an initialized project directory without reviewing that data.
The framework packages contain only the reusable implementation, tests, and public documentation. They do not include a user's .ai-memory/ directory, task history, or generated MEMORY.md.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apmf-0.2.0.tar.gz.
File metadata
- Download URL: apmf-0.2.0.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b429ca143504a9432a34c7d52e2f69f5d3977adf30a22cb2f4c33d4e9feb7461
|
|
| MD5 |
24e74e5e979fe2d3d35611fe7f7b5d29
|
|
| BLAKE2b-256 |
7891a65a7fb66cfe02abffe87da5f2bb4d01226c19ef168e1651fb7deec3dd48
|
Provenance
The following attestation bundles were made for apmf-0.2.0.tar.gz:
Publisher:
release.yml on MellojFront/APMF
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apmf-0.2.0.tar.gz -
Subject digest:
b429ca143504a9432a34c7d52e2f69f5d3977adf30a22cb2f4c33d4e9feb7461 - Sigstore transparency entry: 2325787771
- Sigstore integration time:
-
Permalink:
MellojFront/APMF@3766cce8d0341867b62241d3aa0c777af64edb92 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/MellojFront
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3766cce8d0341867b62241d3aa0c777af64edb92 -
Trigger Event:
release
-
Statement type:
File details
Details for the file apmf-0.2.0-py3-none-any.whl.
File metadata
- Download URL: apmf-0.2.0-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f94df1a185120ae9f3f3aca96fbc7d31956e97515199b7a63fd01b9453ee7c46
|
|
| MD5 |
5dabbfd7ae3beaca526d712314322a1d
|
|
| BLAKE2b-256 |
e144097fd3716972efbb5a4b3f2a578da035ad90947a1fd4747a51945b598321
|
Provenance
The following attestation bundles were made for apmf-0.2.0-py3-none-any.whl:
Publisher:
release.yml on MellojFront/APMF
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apmf-0.2.0-py3-none-any.whl -
Subject digest:
f94df1a185120ae9f3f3aca96fbc7d31956e97515199b7a63fd01b9453ee7c46 - Sigstore transparency entry: 2325787913
- Sigstore integration time:
-
Permalink:
MellojFront/APMF@3766cce8d0341867b62241d3aa0c777af64edb92 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/MellojFront
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3766cce8d0341867b62241d3aa0c777af64edb92 -
Trigger Event:
release
-
Statement type: