Skip to content

Ingester framework: LoreIngester ABC + adapters #16

Closed

Description

@itdove

Description

Auto-ingest knowledge from external tools at session end and on schedule.

LoreIngester ABC

class LoreIngester(ABC):
    trigger: Literal["hook", "scheduled", "manual"]
    review_policy: Literal["immediate", "pr_based"]
    
    @abstractmethod
    def detect(self, project_dir: Path) -> bool: ...
    
    @abstractmethod
    def extract_delta(self, since: datetime | None) -> list[KnowledgeEntry]: ...
    
    @abstractmethod
    def transform(self, entries: list[KnowledgeEntry]) -> list[KnowledgeEntry]: ...
    
    @abstractmethod
    def load(self, entries: list[KnowledgeEntry]) -> None: ...

Session-End Auto-Detection

session ends → hook fires → detect local sources:
  .wolf/ exists?      → OpenWolfIngester
  reasons.db exists?  → ReasonsDBIngester
  MEMORY.md exists?   → OpenClawIngester
→ ingest deltas, log summary

Adapters

Source Trigger Review Detect
ReasonsForge hook + manual Immediate (pre-verified) `reasons.db` exists
OpenWolf hook PR-based `.wolf/` exists
OpenClaw hook Immediate (personal) `MEMORY.md` exists
sdlc-mcp scheduled + manual Immediate (human-authored) MCP config found
context-server scheduled + manual Immediate DB path configured
Jira scheduled PR-based Jira project configured

CLI

`lore ingest --source [--since ]`

Provenance

Each ingested entry: `ingested_from` field + source-specific metadata.

Acceptance

  • LoreIngester ABC defined
  • Session-end hook auto-detects local sources
  • At least 2 adapters implemented (ReasonsForge + OpenWolf)
  • `lore ingest` CLI works
  • Provenance tracking on every ingested entry
  • Dedup via cosine distance on ingest

Dependencies

Activity

  1. self-assigned this
    on Jul 26, 2026
  2. itdove commented on Jul 26, 2026

    @itdove
    OwnerAuthor

    Pull request created: #81

  3. itdove commented on Jul 26, 2026

    @itdove
    OwnerAuthor

    ✅ Session Complete

    Project: lore
    Goal: #16: Ingester framework: LoreIngester ABC + adapters
    Time Spent:
    0h 28m total

    • dvernier: 0h 28m
    • unknown: 0h 0m
      Branch: 16

    Already done — implemented that while you were typing.

    Config added to src/lore/config/models.py:

    @dataclass
    class IngestConfig:
        enabled: bool = True              # master kill switch
        disabled_sources: list[str] = []  # e.g., ["openwolf", "reasonsforge"]

    Wired into:

    • detect_ingesters() in registry — skips names in disabled_sources
    • Session-end hook — checks cfg.ingest.enabled before running, passes disabled_sources
    • lore ingest --detect — respects config too

    Config example (in global or project lore.json):

    {
      "lore": {
        "ingest": {
          "enabled": true,
          "disabled_sources": ["reasonsforge"]
        }
      }
    }

    Set "enabled": false to turn off all auto-ingestion on session-end hooks. Or selectively disable specific sources via disabled_sources list.

    Generated by DevAIFlow

  4. added a commit that references this issue on Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

phase:4-ingestersPhase 4 — Ingester Frameworksize:LLarge — 2-3 days

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions