Metadata-Version: 2.4
Name: ildan-memforge
Version: 1.0.0
Summary: MemForge: portable, agent-neutral persistent memory for coding agents (ILDAN).
Author: ILDAN
License: Apache-2.0
Project-URL: Homepage, https://github.com/ildan-ai/memforge
Project-URL: Issues, https://github.com/ildan-ai/memforge/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyYAML<7,>=6.0
Requires-Dist: watchdog<7,>=4.0
Provides-Extra: dlp
Requires-Dist: detect-secrets>=1.5; extra == "dlp"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pip-audit>=2.7; extra == "dev"
Dynamic: license-file

# MemForge

**Typed, git-native, dynamic memory for coding agents.** A markdown folder + a small spec + reference tooling. Works across Claude Code, Cursor, Aider, Codex, and GitHub Copilot Chat through thin adapters. As of 1.0, a shared store is protected by the signed git commits you already use: `memforge sync` checks every commit against a signer list the store commits, and MemForge holds no keys. The reference CLI ships under a single `memforge` dispatcher with cross-platform support (macOS, Linux, native Windows). Query-triggered recall surfaces the memories matching a prompt on demand instead of bulk-loading the whole index.

[![CI](https://github.com/ildan-ai/memforge/actions/workflows/ci.yml/badge.svg)](https://github.com/ildan-ai/memforge/actions/workflows/ci.yml) [![PyPI version](https://img.shields.io/pypi/v/ildan-memforge)](https://pypi.org/project/ildan-memforge/) [![Python versions](https://img.shields.io/pypi/pyversions/ildan-memforge)](https://pypi.org/project/ildan-memforge/) [![License: Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](./LICENSE) [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.20113963-blue)](https://doi.org/10.5281/zenodo.20113963)

Docs: [PyPI](https://pypi.org/project/ildan-memforge/) | [CHANGELOG](./CHANGELOG.md) | [spec](./spec/SPEC.md) | [examples](./examples/) | [architecture](./docs/architecture/overview.md) | [diagrams](./docs/architecture/diagrams.md)

> **Status: 1.0; contributions welcome.** Issues and pull requests are open. Every commit needs a DCO sign-off (`git commit -s`). See [CONTRIBUTING.md](./CONTRIBUTING.md). Security reports go through the private channel in [SECURITY.md](./SECURITY.md).

## Quickstart (~3 minutes)

```bash
pip install ildan-memforge
memforge --version                  # prints the installed package version
cd /path/to/memory-root
memforge init-store                 # creates the .memforge/ layout
memory-index-gen --path .           # writes MEMORY.md, which the audit requires
memory-audit --strict --path .      # check this store (no --path checks the default folders)
```

For a store shared by several people or agents, add commit trust: every writer signs commits, the store commits a signer list, and everyone takes in new history with `memforge sync`. Run these at the top level of the store's git repository, with signing set up in git (see [`docs/team-bootstrap.md`](./docs/team-bootstrap.md)).

```bash
memforge init-store --mode ssh      # writes .memforge/allowed_signers
# commit the list signed, then push with an upstream: git push -u origin <branch>
memforge sync --adopt-local         # the creator, first time
memforge sync --trust-head <commit> # everyone else, first time
memforge sync                       # every time after
```

Full quickstart at [`docs/quickstart.md`](./docs/quickstart.md). Shared-store setup for two people, a company with single sign-on, and keyless signing is at [`docs/team-bootstrap.md`](./docs/team-bootstrap.md). Coming from an older version? See [`docs/migrating-to-1.0.md`](./docs/migrating-to-1.0.md).

**What the package does today.** `memforge sync` fetches the shared branch, checks every first-parent commit against the committed signer list, fast-forwards, and records where it stopped. The `ssh` mode is available. The `gpg` and `keyless` modes are refused until their proofs pass. Only `memforge sync` checks anything: plain `git pull` and edits in your work tree are not checked, and no other command is gated on verified state. MemForge does not sign or verify individual memory files and does not manage keys, rotation, revocation or a registry. The limits are in [`spec/known-limitations.md`](./spec/known-limitations.md).

## Cite this work

If you use MemForge in research or publications, please cite:

> Hiltz, Mike. *MemForge: Portable, agent-neutral persistent memory format for AI coding agents (v0.10.0)*. Zenodo, 2026. DOI: [10.5281/zenodo.20113963](https://doi.org/10.5281/zenodo.20113963)

The DOI above is the version-agnostic concept DOI; it always resolves to the latest archived release.

## The gap MemForge fills

Coding agents have static instruction surfaces (AGENTS.md, `.cursorrules`, `CONVENTIONS.md`, `.github/copilot-instructions.md`, Claude Code's auto-memory) for things you want the agent to read at the start of every session. They handle the "always-true" half well.

What they don't handle: the **changing** half. The fact that you decided to use `bun` not `npm` last Tuesday. The reason you rejected the obvious database schema. The post-incident rule about not mocking the staging API. The seven things you've told four different agents the same way and are tired of repeating.

That state belongs in *memory*: typed entries that the agent can read, write, audit, and version-control alongside the code. MemForge is the format for that memory and a small set of tools that keep it healthy.

## What you get

- **A folder of markdown files** with YAML frontmatter. Hand-editable, diffable, code-reviewable.
- **Four memory types:** `user` (facts about the developer), `feedback` (rules they have given), `project` (state about ongoing work), `reference` (pointers to external systems).
- **A `MEMORY.md` index** any agent loads at session start.
- **Rollup subfolders** for topic clusters of five or more memories, so the index stays scannable.
- **Audit + integrity tooling** that runs in CI: schema checks, link integrity, DLP scan, hash-chained audit log.
- **Adapters** for Claude Code, Cursor, Aider, OpenAI Codex, and GitHub Copilot Chat (VS Code).

## 60-second install

```bash
pip install ildan-memforge
```

The PyPI distribution is published under `ildan-memforge` because the
shorter `memforge` name is held by an unrelated project. The Python
import path is still `memforge`, and the CLI commands install with
the same names (`memory-audit`, `memory-watch`, `memory-dlp-scan`,
`memforge-resolve`, etc.).
You can also install straight from source:

```bash
pip install git+https://github.com/ildan-ai/memforge.git
```

### macOS / Homebrew Python (PEP 668)

On macOS with Homebrew Python, `pip install` against the system
interpreter is blocked by [PEP 668](https://peps.python.org/pep-0668/)
(`error: externally-managed-environment`). Use one of:

```bash
# Option A: pipx (recommended; isolates the install)
brew install pipx
pipx install ildan-memforge

# Option B: dedicated venv
python3 -m venv ~/.local/share/memforge/.venv
~/.local/share/memforge/.venv/bin/pip install ildan-memforge
# then symlink the binaries into a directory on $PATH

# Option C: --user --break-system-packages (last resort; pollutes brew Python)
python3 -m pip install --user --break-system-packages ildan-memforge
```

The same caveat applies on most Linux distributions that mark their
system Python `EXTERNALLY-MANAGED` (Debian 12+, Ubuntu 23.04+, Fedora
38+, etc.).

Pick a folder for your memory. The IDE-neutral default the tooling resolves to:

```
~/.memforge/global-memory/   # cross-project rules
~/.memforge/memory/          # per-cwd state
```

Resolution order is: the `MEMFORGE_MEMORY_PATH` environment override, then a
grandfathered Claude Code layout (`~/.claude/global-memory/` plus
`~/.claude/projects/<project>/memory/`) **if it already exists**, then the
`~/.memforge` default above. So an existing Claude Code store keeps working
untouched, and a fresh install lands under `~/.memforge`.

`<project>` is the git root of the current folder: the nearest folder up the
tree that holds a `.git` entry (a directory, or the `.git` file a linked
worktree has). Outside a repository it is the current folder. Its absolute
path is then named the way Claude Code names it, with every character other
than an ASCII letter or digit replaced by `-`. So running a tool from a
subfolder of a repository finds the same store as running it from the root.
For a linked worktree this uses the worktree's own folder; whether Claude Code
does the same or uses the main checkout is unconfirmed, so set
`MEMFORGE_MEMORY_PATH` if your worktree's store is not found.

Other layouts work too; the tooling takes a `--path` argument everywhere.

## A memory file, end-to-end

```markdown
---
name: Use bun, not npm
description: Bun is the package manager for this monorepo
type: feedback
uid: mem-2026-04-12-use-bun-not-npm
tier: index
tags: [topic:tooling]
owner: web-platform
status: active
created: 2026-04-12
---

When installing or running scripts in this repo, use `bun` and `bunx`. Lockfile is `bun.lockb`.

**Why:** the workspace setup at `apps/web/package.json` relies on bun's workspace resolver; npm pulls a slightly different dependency tree and the build fails downstream.

**How to apply:** any time you reach for `npm install`, `npx`, or a `package-lock.json`, stop and use bun instead. If a script in the README still says `npm run`, treat that as a docs bug, not a directive.
```

That file is the unit. Every tool, every adapter, every check operates on files of exactly this shape.

## When MemForge is the right tool

- You move between coding agents and want them to share the same notes.
- You want memory entries reviewable in pull requests, like code.
- You want the operator to *see* what the agent has written about them and edit it freely.
- You want CI gates on memory hygiene (broken links, secret leakage, schema drift).

## When it is not

- **Not a vector database.** No embeddings, no similarity search at runtime. Use `mem0` or `letta` if that is the shape you need.
- **Not a secrets store.** The DLP scanner refuses files that look like they leak credentials, but the format is human-readable plain text. Keep secrets in a vault.
- **Not a runtime memory layer.** MemForge is the *file format and the discipline*, not a service. Adapters load files into agent context at session start; nothing runs continuously.
- **Not a replacement for AGENTS.md.** AGENTS.md is the README for agents (static, repo-level, project setup). MemForge is the working notebook (dynamic, evolving, often per-developer). They coexist.

## How it compares

| | **MemForge** | mem0 | letta | `.cursorrules` / `AGENTS.md` |
| --- | --- | --- | --- | --- |
| Storage | Markdown files in git | Hosted vector store | Hosted agent state | Single text file |
| Typed entries | Yes (4 types + status) | No | Partial | No |
| Cross-agent | Yes (adapters) | Per-SDK | Per-SDK | Per-agent |
| Reviewable in PRs | Yes (diff = the file) | No (opaque store) | No | Yes |
| Runtime cost | Zero (load at session start) | Per-query embedding cost | Per-query | Zero |
| Best for | Long-lived rules + decisions | Conversational recall | Stateful agent loops | Project-level setup |

The honest summary: if your agent is a long-running service that needs to remember a thousand things from yesterday's chat, you want a vector store. If your agent is a coding session that needs to remember the rules and decisions a human cares about across sessions, you want MemForge.

## Architecture

```mermaid
flowchart LR
    Dev[Developer] -->|edits| Folder[Memory folder<br/>markdown + YAML]
    Folder -->|read at session start| AdapterCC[Claude Code adapter]
    Folder -->|read at session start| AdapterCursor[Cursor adapter]
    Folder -->|read at session start| AdapterAider[Aider adapter]
    Folder -->|read at session start| AdapterCodex[Codex adapter]
    Folder -->|read at session start| AdapterCopilot[Copilot Chat adapter]
    AdapterCC --> Agent1[Claude Code]
    AdapterCursor --> Agent2[Cursor]
    AdapterAider --> Agent3[Aider]
    AdapterCodex --> Agent4[OpenAI Codex]
    AdapterCopilot --> Agent5[GitHub Copilot Chat]
    Folder -->|CI gate| Tools[memory-audit<br/>memory-dlp-scan<br/>memory-link-rewriter<br/>memory-audit-log]
    Tools -->|fail PR on violation| GH[GitHub Actions]
    Folder -->|append-only| ChainLog[(.memforge-audit-log.jsonl<br/>hash chain)]
```

Adapters are thin: they translate "load this folder at session start" into the agent's native rules surface. Adding an agent means writing a new adapter, not changing the format.

The diagrams with a description of each are in [docs/architecture/diagrams.md](./docs/architecture/diagrams.md). Each release also attaches the full document as a PDF, built by the release workflow and covered by a build provenance attestation.

## Key tools

Run `--help` on any of them.

### Commit trust and store folders (under the `memforge` dispatcher)

| Subcommand | What it does |
| --- | --- |
| `memforge sync` | Fetch the upstream branch, verify every first-parent commit against the committed signer list, fast-forward, record where verification stopped. Flags: `--check` (verify, change nothing local), `--trust-head <commit>` and `--adopt-local` (first-sync pins). Exit 0 verified, 2 refused by verification or history rules, 1 any other error. |
| `memforge init-store` | Create the `.memforge/` layout. With `--mode ssh\|gpg\|keyless`, also write the signer list for that mode. Never overwrites. |
| `memforge paths` | Print the default memory folders, one per line, in the order every memforge tool searches them, and nothing else on stdout. Prints each folder whether or not it exists; the caller tests each one. For scripts and adapters that cannot import the package. Exit 0; 1 if a folder name holds a newline. |

The 13 key-system commands from 0.5.x (`init-operator`, `operator-registry`, `rotate-key`, `revoke`, `revocation-snapshot`, `revoke-cache-refresh`, `memories-by-key`, `revoke-memories`, `upgrade-v04-memories`, `recovery-init`, `recovery-backup-confirm`, `attest-agent`, `messaging-doctor`) are removed. Each prints a removal notice and exits non-zero. See [`docs/migrating-to-1.0.md`](./docs/migrating-to-1.0.md).

### Memory-format surface (per-tool console scripts)

| Tool | What it does |
| --- | --- |
| `memory-audit` | Schema + integrity check. Pass `--strict` in CI. Honors `.memforge/audit-waivers.yaml` (v0.7.0): an explicit, reported allowlist for immutable migration-era commit-log findings (fail-closed when absent). |
| `memory-validate` | Syntax-aware write-boundary gate (v0.7.0). Fast single-file subset of audit: HARD-fails a frontmatter block that does not parse as a YAML mapping (the unquoted-colon break, invariant 27); SOFT-flags caps / required fields / enums. Read-only. Wire it as a git pre-commit hook (any IDE) or a Claude Code PreToolUse shim. |
| `memory-audit-deep` | Recursive audit: UID uniqueness, taxonomy membership, supersedes resolution, link integrity. |
| `memory-index-gen` | Build `MEMORY.md` from frontmatter as a CI artifact. RBAC-aware filtering for shared folders. The `_memforge.yaml` preamble is copied as literal text in a code block. `--with-recall-index` also emits the recall inverted index (a local cache, never committed). |
| `memory-cluster-suggest` | Suggest rollup subfolders when a topic accumulates five or more memories. |
| `memory-dlp-scan` | Pre-commit scanner for secrets, credentials, and PII in memory bodies. |
| `memory-link-rewriter` | UID-based cross-folder link integrity (`check`, `rename`, `rename-batch`, `upgrade`). `rename`/`rename-batch` also rewrite `[[wikilinks]]` (including `[[token\|display]]`) so a rename does not orphan inbound wikilinks. |
| `memory-audit-log` | Append-only hash chain. `verify` detects accidental corruption and an edit that does not recompute the chain. It does not detect a rewrite or truncation by someone who can write the file; keep the log in the signed store or ship it off the machine for that. JSONL on disk, exports CEF for SIEM. |
| `memory-dedup` | LLM-backed near-duplicate detection. Local-only by default; reports candidates, never writes. |
| `memory-rollup` | Bulk-move primitive: create / undo / list. Maintains an undo ledger. |
| `memory-query` | Filter memories by topic, type, tag, status, owner, date range, or text. |
| `memory-recall` | Query-triggered recall (v0.6.0): inject the descriptions of memories whose triggers match a query. Reads the recall index, a local cache it rebuilds when the memory files changed; fail-open-empty. |
| `memory-lint` | Recall-readiness + token-cost quality analysis (v0.6.1). Collision-based recall scoring, always-set / description-length / body-length findings. Read-only; local-only by default, optional model-assisted suggestions behind explicit opt-in. |
| `memory-watch` | Filesystem watcher (Linux + macOS via watchdog). |
| `memory-promote` | Move a memory between folders with index fixup. |
| `memory-frontmatter-backfill` | Populate v0.3.0 frontmatter on existing memory files (migration helper). |
| `memory-preamble-extract` | Extract the `MEMORY.md` preamble into `_memforge.yaml` (Phase 1 migration helper). Reads back a preamble that `memory-index-gen` wrote inside a code block and unwraps it. |
| `agents-md-gen` | Generate an `AGENTS.md` surface from memory frontmatter and the repo's own `CLAUDE.md`, filtered by a sensitivity ceiling + byte budget. Nothing else is read: no file in the home folder, such as `~/.claude/CLAUDE.md`, is opened. Reads every store folder, in order, that `memforge paths` prints when run in the repo named by `--cwd`; a `MEMFORGE_MEMORY_PATH` folder with no memories is named on stderr. Inlines the body of a memory marked `pinned: true` (public ones only, unless `--inline-above-public`) as literal text in a code block, so nothing in it (a heading, a fence, HTML) changes the generated file around it; every other memory is a description-only entry on one line. A memory with a non-text `sensitivity`, or a name, description or topic it cannot place on one line, is left out and named on stderr. Writes nothing and exits 2 if the rendered file holds a BLOCKER or MAJOR secret finding. |

### Competing-claim consolidation (standalone console scripts)

These ship as standalone console scripts today, not as `memforge` dispatcher subcommands (dispatcher integration is tracked in [`spec/known-limitations.md`](./spec/known-limitations.md) §"Reference CLI status").

| Tool | What it does |
| --- | --- |
| `memforge-resolve <topic> [--memory-root <store>]` | Resolve a competing-claim group on a `decision_topic`: pick a winner, apply the superseded / superseded_by / ever_multi_member invariants, and emit a scope-locked `memforge: resolve <topic>` commit. Without `--memory-root` it searches the folders `memforge paths` prints, not the current folder. |
| `memforge-migrate-claim-block [--memory-root <store>]` | Rewrite legacy `status:` to the canonical `state:` key inside the competing-claim fenced block of `MEMORY.md`. Without `--memory-root` it searches the folders `memforge paths` prints, not the current folder. |

`memforge <subcommand> --help` (dispatcher subcommands), `<tool> --help` (standalone console scripts), and `tools/README.md` have the long-form references.

## Spec

Format invariants are in [`spec/SPEC.md`](./spec/SPEC.md). Topic taxonomy is in [`spec/taxonomy.yaml`](./spec/taxonomy.yaml). The current package version is in `pyproject.toml`; the on-disk format version is in [`spec/VERSION`](./spec/VERSION). They track separately on purpose: a tooling release does not always shift the format, and a format bump is a deliberate event.

## Status

| Version | Date | Headline |
| --- | --- | --- |
| v0.1.0 | 2026-04-19 | First spec release. |
| v0.2.0 | (unreleased) | Sensitivity classification (4 levels) + consumer obligations. |
| v0.3.0 | 2026-05-07 | Schema expansion (uid, tier, tags, owner, last_reviewed, status), rollup-with-subfolder formalization, access labels, controlled topic taxonomy, full Phase 1 tooling, audit log, DLP scan. |
| v0.4.0 | 2026-05-08 | Required-field expansion: `uid`, `tier`, `tags`, `owner`, `status`, `created` required (was optional in v0.3.x). v0.3.x files load in degraded mode. Multi-agent concurrency: five new frontmatter keys, snooze record, config file, resolve operation, canonical competing-claim block, layered Tier 1 + Tier 2 audit rule set, status enumeration BLOCKER, secure-mode adapter conformance. Sensitivity enforcement: default-on export-tier gate (`memory-audit --export-tier`), DLP label/content cross-check, conformance fixture set; hard floor protects `privileged` tier from config-disable. Closes the v0.3.x multi-user concurrency deferral. |
| v0.5.0 | 2026-05-10 | Multi-identity + cryptographic attribution + WebSocket messaging adapter, as spec (the package has no per-memory signing and no WebSocket client or relay). Operator + agent identity as first-class peers with GPG signing. Sender-uid + sender-sequence + signed checkpoints (helper functions only; no write path calls them). Signing-time-aware revocation verification + clock-skew guard. 24-hour cool-down on key rotation, recorded in the registry (no read path enforces it yet). Recovery-secret filesystem mode + SHA256 anchor in the registry (the integrity check is not called yet). |
| v0.5.1 | 2026-05-10 | Reference CLI ships (14 subcommands under `memforge` dispatcher). Closes v0.5.0 agent-session-attestation content-scope MAJOR with normative `nonce` + `expires_at` + `capability_scope`. Cross-cutting fail-closed posture (29-item operator reference). Privacy considerations (7 boundary statements). |
| v0.5.2 | 2026-05-10 | Closes 2 BLOCKERs + 1 MAJOR from retrospective code panel. Canonical-form Unicode NFC normalization MUST on signed envelopes (closes repudiation via normalization drift). Atomic O_CREAT\|O_EXCL + fsync + os.replace on `write_secure_yaml` + `write_secure_bytes` (closes TOCTOU on file create). Seen-nonce set bounding MAY -> SHOULD with explicit GC contract (closes unbounded-set DoS). Cross-platform secure-file abstraction (`src/memforge/_security.py`): POSIX mode bits on macOS/Linux + NTFS ACLs (via `icacls`) on native Windows. CI matrix extends to Ubuntu + macOS + Windows. |
| v0.6.0 | 2026-06-07 | Query-triggered recall. Three optional frontmatter fields (`triggers`, `always`, `do_not_inject`) + the §"Recall operation" spec contract (UI-neutral; descriptions only, never bodies; fail-open-empty). New `memory-recall` reader + `memory-index-gen --with-recall-index`. All fields optional, so pre-v0.6.0 folders stay well-formed and older tools ignore the new keys. |
| v0.6.1 (package) | 2026-06-07 | Docs + packaging patch. PyPI trove classifiers added (fixes the Python-versions badge); README Status table, CLI count, and tool tables corrected; DOI badge + citation switched to the version-agnostic concept DOI. No spec change; no code change at the tag. |
| v0.7.0 | 2026-06-15 | `memory-lint` quality CLI (recall-readiness + token-cost scoring; local-only-by-default cloud safety with sensitivity/access filtering) + `memory-audit` recall-field / always-set budget WARNs (spec/VERSION 0.6.0 -> 0.6.1; new §"Recall-readiness lint"). Broad security + correctness hardening: path-traversal containment (resolve/rollup/index-gen), recall/lint/dedup RBAC fail-closed, cryptographic-attribution trust root + RSA-4096 subkey verify + superseded-key refusal, revocation-snapshot floor disabled, broadened DLP coverage. Portability: IDE/OS-neutral default paths. Signed release tags + CycloneDX SBOM + a `pip-audit` supply-chain gate. Additive and backward-compatible. |
| v0.8.0 | 2026-06-27 | `memory-link-rewriter rename`/`rename-batch` now rewrite `[[wikilinks]]` (`[[token]]` and `[[token\|display]]`) so a rename no longer orphans inbound wikilinks: an alias-set guard (stem/name/uid) prevents false rewrites of prose or code tokens, cross-root ambiguity is skipped and listed, every rewrite is logged, and the pass is idempotent. `memory-audit` now warns on non-spec `tier` values (`index`/`detail` only; such files were previously dropped from the index with no diagnostic). Pointer-line and MEMORY.md caps raised 150 -> 180 so descriptive filename slugs leave room for the hook text (spec/VERSION 0.6.1 -> 0.6.2). Additive and backward-compatible; upgrade with `pip install --upgrade ildan-memforge`, no data migration required. |
| v0.8.1 | 2026-06-28 | `memory-index-gen` now keeps every generated `MEMORY.md` pointer line within the 180-byte cap by truncating the hook on a UTF-8 boundary (`...`); the full `description` stays in frontmatter + the recall index, so truncation is lossless for recall. Reconciles the generator with the existing 180-byte audit check (spec/VERSION 0.6.2 -> 0.6.3). Backward-compatible; regenerate indexes with `memory-index-gen --write`. |
| v0.9.0 | 2026-06-28 | Write-boundary hardening. New `memory-validate` operation: the agent-neutral pre-write gate that HARD-rejects a frontmatter block which does not parse as a YAML mapping (the recurring unquoted-colon break, new integrity invariant 27) at the write boundary instead of at the next audit, plus SOFT caps / required-field / enum checks. New `memory-audit` waiver mechanism (`.memforge/audit-waivers.yaml`): an explicit, reported, fail-closed allowlist that drives a clean corpus's commit-log floor to zero. `memforge-detect` hygiene orchestrator + audit convention-drift health check. `MEMORY.md` caps single-sourced (audit + validate + index-gen can no longer drift). Adapter guide documents the write-boundary gate per IDE (git pre-commit = universal; Claude Code PreToolUse shim = pre-write). spec/VERSION 0.6.3 -> 0.7.0; additive and backward-compatible. |
| v0.9.1 | 2026-07-29 | Closes a class of SILENT memory loss. `memory-audit` now FAILS a rollup subfolder that has files but no `README.md` parent: such files contribute nothing to the pointer comparison, so every memory in them was unreachable from `MEMORY.md` while the audit reported clean. Also stops the audit fabricating an accounted-for status it had not verified. spec/VERSION unchanged at 0.7.0. Breaking for `--strict` on a store that already has a parentless rollup subfolder, deliberately: the condition it now fails on was previously passing while memories were lost. |
| v0.9.2 | 2026-07-30 | Closes the SECOND class of the same loss. `memory-audit` now detects an INCOMPLETE rollup `README.md`, not just a missing one: a README that EXISTS but omits a sibling leaves that memory exactly as unreachable, and 0.9.1's check could not see it. Reports both gap directions (unreachable siblings, dangling pointers) plus a fail-closed violation when a README cannot be read at all. Set-based comparison, never count-based, because a duplicate pointer alongside an omission yields equal counts while a memory is still lost. New integrity invariant 28; the pointer set is CLOSED to wikilink + markdown-inline-link and read from prose only (fenced blocks, code spans, HTML comments excluded) so the check is deterministic across adapters. spec/VERSION 0.7.0 -> 0.8.0. Breaking for `--strict` on a store whose rollup README omits a sibling. |
| v0.10.0 | 2026-08-02 | Ships the pre-write half of the 0.9.0 write-boundary gate, which had been described but never written. New `validate_required_fields` primitive: required-field conformance, kept SEPARATE from `validate_frontmatter` because that one's contract is parse-only and adapters depend on it. A block can be perfectly valid YAML and still be missing a field no tool can derive, so a parse gate cannot see it and no backfill can repair it. Ships the Claude Code `PreToolUse` shim that calls both checks, validating the reconstructed file on an `Edit` so a removal is caught, and failing open on every error path. `memory-frontmatter-backfill` now hoists an existing nested `metadata.type` to the required top-level `type` (lossless; still refuses to invent one). spec/VERSION unchanged at 0.8.0; additive and backward-compatible. |
| v0.11.0 | 2026-08-05 | Two signal-quality fixes to the diagnostic surface, both from a full audit of an 834-memory corpus. `memory-dedup --description-warn-threshold` now defaults to `0` (disabled): the old default of `50` flagged 101 of 101 top-level files, and `description` is the authoritative recall text that is SUPPOSED to be descriptive, so the check was noise that trained operators to skip output also carrying cloud-egress and sensitivity warnings. `memory-audit` now warns when a `MEMORY.md` pointer carries no hook text because the title+path prefix exhausted the byte cap: `memory-index-gen` always degraded gracefully there, but silently, so the one line with no relevance cue was the one line nothing reported. Hard-failing the generator was considered and rejected (zero occurrences; would trade a cosmetic loss for an availability one). spec/VERSION unchanged at 0.8.0; no format change, no migration. |
| v0.12.0 | 2026-08-05 | Two new `memory-audit` checks for defect classes that accumulated silently, both from auditing an 842-memory corpus. Reports a memory with no `topic:` tag: `tags` feeds the recall trigger set AND the `MEMORY.md` topic section, and `memory-frontmatter-backfill` infers a topic only from a named subfolder or a filename matching its inline `KNOWN_TOPICS`, so a top-level file with an unrecognized name gets nothing and no tool objects (59 files had accumulated that way, putting 46 of 87 per-cwd pointers into `(no topic)`). Reports top-level frontmatter disagreeing with a nested `metadata:` block, naming each field and both values: some agent harnesses nest the prior frontmatter and synthesize fresh top-level fields, and since every tool reads only the top level, the nested copy becomes invisible truth (460 of 842 files carried the block; 74 diverged; `--strict` exited 0 throughout). Both are HEALTH, never violations, because the files are well-formed and a harness-shaped corpus would otherwise make `--strict` something operators disable. Neither repairs: picking a topic and picking the authoritative level are both semantic calls. Fire rates measured before shipping (1.8% and 8.8%). spec/VERSION unchanged at 0.8.0. |
| v0.12.1 | 2026-11-13 | `memforge-detect` now resolves stale findings. A re-run used to only add queue items, so a finding stayed open after its condition was fixed and the open count only grew. An open item in a category the run checked, and did not find again, is now marked `resolved` with a `resolved_by` note. Categories the run skipped (duplicates with no local dispatcher, lessons under `--no-lessons` or with no lessons file) are never auto-resolved, because absence there means "not checked", not "fixed". Done items stay done; a resolved item found again is re-opened. spec/VERSION unchanged at 0.8.0; no format change, no migration. |
| v1.0.0 | 2026-11-20 | Commit trust replaces the in-repo trust model (spec 0.8.0 -> 1.0.0, a major revision). New `memforge sync`: verifies the signed first-parent history of the shared branch against a committed signer list (`ssh` mode available; `gpg` and `keyless` refused until their proofs pass). Removed: per-memory signatures, the operator registry, key rotation, revocation, agent attestation, the messaging adapter contract and the `examples/websocket/` scaffold, plus the 13 commands that implemented them (each is now a stub that prints a removal notice). `init-store` creates the layout and, with `--mode`, a signer list. Legacy `identity` and `signature` frontmatter is preserved and ignored. Nothing to migrate; see `docs/migrating-to-1.0.md`. |

The v0.5.x rows above describe the in-repo signing model that 1.0 removed. For what the package implements today for team use, and what it does not, see [`docs/team-bootstrap.md`](./docs/team-bootstrap.md) "Implementation status".

The reference implementation is running in production. External pull requests are welcome under Apache-2.0 with a DCO sign-off; see [CONTRIBUTING.md](./CONTRIBUTING.md).

## License

Apache-2.0. See [`LICENSE`](./LICENSE).

The "MemForge" name and logo are subject to pending trademark filings; the Apache-2.0 grant does not cover the marks.

## Contributing

Pull requests are open. Contributions come in under Apache-2.0 with a DCO sign-off on every commit. See [CONTRIBUTING.md](./CONTRIBUTING.md).
