md-first memory extraction framework for AI agents. Markdown is the single source of truth; SQLite holds state and LanceDB provides the rebuildable vector + BM25 + scalar index. The codebase follows a single-direction DDD layering (entrypoints -> service -> memory -> infra, with component / core / config cross-cutting) enforced by import-linter. Engineering surface: - Coding conventions in .claude/rules/ (path-scoped) and workflows in .claude/skills/ (/commit, /new-branch, /pr). - GitHub Actions CI runs make lint + test + integration; pre-commit mirrors the gates locally (ruff, hygiene hooks, gitlint commit-msg). - Commit messages follow Conventional Commits, enforced by gitlint. - make lint also enforces datetime two-zone discipline and OpenAPI drift.
1.1 KiB
1.1 KiB
paths
| paths | ||
|---|---|---|
|
__init__.py and re-export rule
A package's __init__.py is its public facade. Consumers import from the
package, never from its internal modules.
Pattern
"""One-paragraph module docstring: what this package is and how to use it."""
from .models import Episode as Episode
from .models import MemCell as MemCell
__all__ = [
"Episode",
"MemCell",
]
- Explicit
X as Xredundant-alias form on each re-export. This is intentional: it marks the name as a deliberate public re-export (ruffF401/PLC0414aware) rather than an accidental unused import. __all__lists every public name, alphabetically sorted, matching the re-exports. It is the contract; keep it in sync.- Internal modules stay private — don't re-export helpers that aren't part of the public API.
- New subpackage? Add an
__init__.pywith a docstring +__all__even if it starts small. Empty-but-documented beats missing.
This facade discipline is what lets import-linter forbid deep imports across
package boundaries (see architecture.md).