ring/default/lib/artifact-index/__init__.py
Fred Amaral f497ac1a28
refactor(artifact-index): extract shared utilities to DRY module
Create utils.py with commonly used functions that were duplicated
across artifact_index.py, artifact_query.py, and artifact_mark.py:

- get_project_root(): Find project root by locating .ring or .git
- get_db_path(): Get database path with directory creation
- validate_limit(): Validate argparse limit argument (1-100)

This addresses the code review finding of 3x duplication that
increased maintenance burden and risk of inconsistent fixes.
2025-12-28 00:15:40 -03:00

13 lines
492 B
Python

"""Artifact Index - SQLite-based indexing and search for Ring artifacts.
This package provides:
- artifact_index.py: Index markdown files into SQLite with FTS5
- artifact_query.py: Search artifacts with BM25 ranking
- artifact_mark.py: Mark handoff outcomes
- utils.py: Shared utilities (get_project_root, get_db_path, validate_limit)
"""
from utils import get_project_root, get_db_path, validate_limit
__version__ = "1.0.0"
__all__ = ["get_project_root", "get_db_path", "validate_limit"]