Metadata-Version: 2.4
Name: mneme-code
Version: 3.2.0
Summary: Deterministic Python code-failure memory layer for mneme: redact-before-store, provenance-labelled FailureMemory, vault-ready markdown output.
Author: Onour Impram
License: Apache-2.0
Keywords: code-failure,memory,mneme,redaction,traceback
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: mneme-core<4,>=3.0.0
Requires-Dist: mneme-graph>=0.1.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.2; extra == 'dev'
Requires-Dist: ruff>=0.4.7; extra == 'dev'
Description-Content-Type: text/markdown

# mneme-code

Deterministic Python code-failure memory for mneme. Parses CPython tracebacks
into structured failures, renders them as vault-ground-truth markdown memories,
and resolves stack frames to [mneme-graph](../mneme-graph) function nodes.

Part of the [mneme](https://github.com/TheGoatPsy/mneme) memory engine.

## What it does (v1)

- **Traceback parsing.** `parse_traceback` turns a standard CPython traceback
  into a `ParsedTraceback` (exception type, message, frames). It never raises;
  unrecognised input returns `None`.
- **Failure memories.** `failure_from_traceback` + `failure_to_markdown` produce
  a markdown note the user owns, with provenance (`content_hash`, `observed_at`,
  `trust`) and a confidence label.
- **Frame resolution.** `resolve_frames` pairs each frame with a mneme-graph
  `function` node when one matches, with a clean fallback to `None`.

Redaction (`mneme_core.privacy.redact`) is applied to every user-derived string
(exception message, code context, file path) before it is stored or rendered.
No LLM, no network; library functions are pure (the caller injects timestamps).

## Scope and deferrals (v1)

The following are **not** implemented yet and are documented here for honesty:

- Live test-runner integration.
- Branch-aware failure tracking.
- `AGENTS.md` procedural-memory parsing and repo runbook generation.
- Fix-trajectory wiring: a *fix* is modelled as a `mneme-temporal` claim that
  **supersedes** the failure memory. That lifecycle lives in `mneme-temporal`
  and is reused, not reinvented here.
- Non-Python tracebacks.
