"""RStack SDLC — Tau adapter entry point.

This is the stable file users point their Tau settings at
(extensions.list[].path). The implementation lives in the sibling
`rstack_sdlc_pkg/` per-feature package (#552) — see its __init__.py for the
full architecture notes (why upstream Tau's `tool_call`/`before_agent_start`
hooks are dead, the built-in-shadowing enforcement mechanism, observability,
context injection, quality gates, and the module map).

Why the sys.path bootstrap below: Tau loads extension FILES via
`importlib.util.spec_from_file_location` under a synthetic module name
(tau/extensions/loader.py), so this file is executed with no package context —
relative imports are impossible here. Inserting this file's own directory on
sys.path lets the absolute `rstack_sdlc_pkg` import resolve the sibling
package identically in every install shape: the repo tree, an npm-installed
node_modules/rstack-agents tree, and the pip package generated by
scripts/generate-tau-package.mjs (where this file is copied to __init__.py
with the package directory beside it).

owner: RStack developed by Richardson Gunde; Tau adapter contributed by Jeomon
"""
from __future__ import annotations

import sys
from pathlib import Path

_ADAPTER_DIR = str(Path(__file__).resolve().parent)
if _ADAPTER_DIR not in sys.path:
    sys.path.insert(0, _ADAPTER_DIR)

from rstack_sdlc_pkg import register  # noqa: E402,F401 — the extension entry point
