Metadata-Version: 2.4
Name: codemap-aimemory
Version: 0.4.6
Summary: Emit the four-layer memory model's L1 (.ai-memory/) from a CodeMap index
Project-URL: Homepage, https://github.com/qxbyte/codemap
Author: CodeMap Contributors
License: MIT
Keywords: ai-memory,codemap,emitter
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development
Requires-Python: >=3.11
Requires-Dist: codemap-core<0.4,>=0.3.0
Requires-Dist: httpx[socks]>=0.27
Requires-Dist: pyyaml>=6.0
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Provides-Extra: llm
Requires-Dist: anthropic>=0.39; extra == 'llm'
Description-Content-Type: text/markdown

# codemap-aimemory

Emits the [four-layer memory model](https://github.com/qxbyte/codemap)'s
L1 (`.ai-memory/`) output from a CodeMap index.

## What it writes

```
.ai-memory/
├── entities/
│   ├── functions.yml       fn-* / cls-* entities, with calls / called_by /
│   │                       related_tables / signature / line_range
│   ├── tables.yml          tbl-* entities
│   └── files.yml           file-* entities
├── relations/
│   ├── call-graph.yml      from / to / type=calls / confidence
│   ├── table-relations.yml from / to / type=accesses_table / confidence
│   └── rule-constraints.yml (empty; managed by L2)
└── enrichment/             optional LLM overlay (one file per enriched
                            symbol, loaded by the emitter to fill
                            business_meaning / related_rules)
```

All writes are atomic per file (tmp + rename), so an Agent reading
`.ai-memory/` never sees a half-written tree.

## Two-layer separation

The core L1 output (above) is purely deterministic — no LLM. The optional
`enrich` CLI fills `business_meaning` / `related_rules` into separate
`enrichment/*.yml` files. The emitter merges enrichment values when it
re-emits, but the core JSON-store index never carries explanation text.
