Files
EverOS/src/everos/infra/persistence/markdown/mds/__init__.py
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

41 lines
1.8 KiB
Python

"""Business markdown frontmatter schemas (mds = "markdown schemas").
Each business record kind that is stored as markdown gets a concrete
frontmatter class here, subclassing one of the chassis classes from
:mod:`everos.core.persistence.markdown`:
* :class:`UserScopedFrontmatter` for user-track records
* :class:`AgentScopedFrontmatter` for agent-track records
* :class:`BaseFrontmatter` for scope-agnostic records (rare)
Schemas drive path resolution via ClassVars; each storage strategy has
its own conventions:
- **Daily-log** schemas declare ``ENTRY_ID_PREFIX`` (token in
``<prefix>_<date>_<seq>``), ``DIR_NAME`` (sub-directory under
``<scope>/<id>/``) and ``FILE_PREFIX`` (leading token of the daily
filename joined with ``-<YYYY-MM-DD>.md``).
- **Skill** schemas (:class:`AgentSkillFrontmatter`) pin the directory
layout via five ``SKILL_*`` ClassVars (container / dir prefix /
main filename / references / scripts).
- **Profile** schemas declare ``PROFILE_FILENAME`` (``"user.md"`` /
``"agent.md"`` / …) and inherit ``SCOPE_DIR`` from a scope mixin; no
profile base class — the writer/reader pair is duck-typed.
"""
from .agent_case import AgentCaseDailyFrontmatter as AgentCaseDailyFrontmatter
from .agent_skill import AgentSkillFrontmatter as AgentSkillFrontmatter
from .atomic_fact import AtomicFactDailyFrontmatter as AtomicFactDailyFrontmatter
from .episode import EpisodeDailyFrontmatter as EpisodeDailyFrontmatter
from .foresight import ForesightDailyFrontmatter as ForesightDailyFrontmatter
from .profile import UserProfileFrontmatter as UserProfileFrontmatter
__all__ = [
"AgentCaseDailyFrontmatter",
"AgentSkillFrontmatter",
"AtomicFactDailyFrontmatter",
"EpisodeDailyFrontmatter",
"ForesightDailyFrontmatter",
"UserProfileFrontmatter",
]