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.
18 lines
1.1 KiB
Markdown
18 lines
1.1 KiB
Markdown
# Code style rule (always loaded)
|
|
|
|
- **Formatter & linter**: `ruff` is the single tool (replaces black / isort / flake8).
|
|
Line length 88, target `py312`. Run `make format` to auto-fix; `make lint` checks.
|
|
- **Active ruff rule sets**: `E F I N UP B SIM ASYNC`. Don't disable a rule inline
|
|
unless there's a genuine reason — prefer fixing the code.
|
|
- **Type hints**: annotate every public function signature (params + return). The
|
|
codebase is ~100% typed; keep it that way.
|
|
- **`from __future__ import annotations`** at the top of every module — annotations
|
|
are strings, so forward refs and `X | None` unions are free.
|
|
- **Prefer `collections.abc`** (`Sequence`, `Mapping`) over concrete `list`/`dict`
|
|
in signatures; use `Protocol` for structural interfaces.
|
|
- **No dead code**: no commented-out blocks, no unused imports, no speculative
|
|
abstractions. Delete rather than comment out.
|
|
- **Naming**: `*Manager` (orchestrators), `*Provider` (injectable services),
|
|
`*Reader`/`*Writer` (persistence), `*Recaller` (search routes). Follow the
|
|
established suffix when adding a sibling.
|