Files
EverOS/.claude/rules/imports.md
Elliot Chen 518b8eca85 chore: initialize EverOS 1.0.0
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.
2026-06-06 07:33:17 +08:00

847 B

paths
paths
src/**/*.py
tests/**/*.py

Imports rule

  • from __future__ import annotations is the first import in every module.
  • Import order (ruff I enforces, make format fixes): stdlib → third-party → first-party (everalgo, then everos). One group per blank-line-separated block.
  • Absolute imports for cross-package references (from everos.memory import ...). Relative imports (from .models import ...) only within a package, typically in its __init__.py.
  • TYPE_CHECKING guard for import cycles and type-only imports:
    from typing import TYPE_CHECKING
    if TYPE_CHECKING:
        from everos.config import Settings
    
  • Never import a private internal across a package boundary — respect the import-linter contracts (see architecture.md).