atlas.core.retrieve¶
atlas.core.retrieve
¶
Build pre-computed retrieve files from module rules and warehouse content.
build_retrieve_file
¶
build_retrieve_file(
module_name: str,
atlas_dir: str,
registry: dict,
warehouse_dir: str,
installed_modules: dict,
config: dict | None = None,
) -> str
Build a single retrieve .md file for a module.
Combines:
1. rules.md from warehouse (base content)
2. Extracted config values from .atlas/modules/
Returns the built Markdown content.
Source code in src/atlas/core/retrieve.py
build_status_file
¶
build_status_file(
manifest: dict,
installed_modules: dict,
*,
active_task: dict | None = None,
recent_activity: list[dict] | None = None,
git_status: str = "",
) -> str
Build the _status.md overview file.
This is the first thing agents read at session start. It contains: - Project type, languages, stack - Installed modules grouped by category - Active task (if provided) - Recent activity (if provided) - Git status (if provided) - Retrieval hints
Source code in src/atlas/core/retrieve.py
build_all_retrieve_files
¶
build_all_retrieve_files(
atlas_dir: str,
registry: dict,
warehouse_dir: str,
manifest: dict,
config: dict | None = None,
) -> list[str]
Build all retrieve files for all installed modules + auto-modules.
Returns list of module names that were built.
Source code in src/atlas/core/retrieve.py
filter_sections
¶
Return only the sections of content whose headers match any filter word.
A section begins at any line starting with # and ends just before the
next same-or-higher-level header (or at end-of-string). Filter words are
matched case-insensitively against the header text.
If filter_words is empty or nothing matches, the original content is returned unchanged.