Metadata-Version: 2.4
Name: cwmem
Version: 0.2.0
Summary: Repo-native institutional memory CLI for Enterprise Architecture work.
Project-URL: Homepage, https://github.com/ThomasRohde/cwmem
Project-URL: Repository, https://github.com/ThomasRohde/cwmem
Project-URL: Issues, https://github.com/ThomasRohde/cwmem/issues
Author-email: Thomas Klok Rohde <rohde.thomas@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Thomas Klok Rohde
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
License-File: LICENSE
Keywords: cli,enterprise-architecture,knowledge-graph,memory,sqlite
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: model2vec>=0.5.0
Requires-Dist: numpy>=2.1.0
Requires-Dist: orjson>=3.10.0
Requires-Dist: portalocker>=3.1.1
Requires-Dist: pydantic>=2.10.0
Requires-Dist: typer>=0.16.0
Description-Content-Type: text/markdown

# cwmem

`cwmem` is a repo-native institutional memory CLI for Enterprise Architecture work.

It keeps operational state in SQLite, exports deterministic reviewable artifacts under `memory/`, and exposes a machine-first CLI contract so humans and coding agents can use the same tool safely.

## Current feature set

- entry CRUD with automatic lifecycle events
- tags, formal events, and entity/edge graph workflows
- lexical, semantic, hybrid, and graph-expanded search
- deterministic `sync export` / `sync import`
- dry-run, idempotency keys, sidecar write locking, `plan`, `validate`, `apply`, and `verify`

## Local workflow

```bash
uv sync
uv run cwmem init
uv run cwmem add --title "Architecture decision" --type decision "Capture the rationale."
uv run cwmem search "architecture decision"
uv run cwmem sync export
uv run cwmem verify
```

## Safety contract

Every command writes exactly one JSON envelope to stdout.

Reads stay parallel-safe. Mutating commands serialize through `.cwmem/memory.sqlite.lock` and support the safety flags below where relevant:

- `--dry-run`
- `--idempotency-key`
- `--wait-lock`
- `--plan-out`

High-risk workflows follow:

```bash
uv run cwmem plan sync-export --plan-out .cwmem/plans/export-plan.json
uv run cwmem validate --plan .cwmem/plans/export-plan.json
uv run cwmem apply --plan .cwmem/plans/export-plan.json
uv run cwmem verify
```

## Deterministic sync surface

Tracked collaboration artifacts live under:

- `memory/entries/`
- `memory/events/`
- `memory/graph/`
- `memory/taxonomy/`
- `memory/manifests/`

Use `uv run cwmem sync export --check` in CI or before commit to confirm the checked-in export tree matches the runtime database.

## Local quality gate

```bash
uv run ruff check src tests
uv run pyright src
uv run pytest --tb=short
uv build
```

## Release automation

- CI workflow: `.github/workflows/ci.yml`
- Publish workflow: `.github/workflows/publish.yml`
- Contributor guide: `CONTRIBUTING.md`
- Agent expectations: `AGENTS.md`

The publish workflow is designed for GitHub OIDC + PyPI Trusted Publisher with the `pypi` environment and publishes automatically on pushes to `master`.
