This file defines repository-wide agent guidance for contributors working in this codebase.
- Use this file for shared workflow rules and contributor expectations.
- Use .github/copilot-instructions.md for architecture details, data-flow patterns, and domain-specific constraints.
- If guidance conflicts, prioritize repository reality in this order:
- Executable code in src/ai_agent/
- Runtime/config files (pyproject.toml, config.yaml, .devcontainer/devcontainer.json)
- Documentation pages
Assume work is done inside the dev container unless a task says otherwise.
- Base environment: Debian Bookworm dev container
- Python: 3.12 (from dev container image)
- Package workflow: uv-managed virtual environment in .venv
- Default interpreter: .venv/bin/python
Preferred setup and install commands:
uv venv
uv pip install -e .
uv pip install -e ".[dev]"Use these commands as the current baseline:
ai_agent chat
ai_agent sync
pytest tests/Notes:
- The CLI modes are defined in src/ai_agent/cli.py.
- If helper scripts (for example justfile) disagree with CLI behavior, align docs to real CLI behavior and then fix scripts in a follow-up change.
- Confirm behavior from code before updating docs.
- Keep module boundaries clear:
- retrieval logic in
retriever/ - selection schemas/prompts in
generator/ - orchestration in
api/ - chat/tool orchestration in
agent/ - UI code in
ui/
- retrieval logic in
- Prefer small, reviewable changes.
- For user-facing changes, update CHANGELOG.md.
- For docs changes, keep README.md, docs/index.md, and docs/guide.md in sync.
When adding or changing functionality:
- Update architectural context if module boundaries change.
- Update environment/command docs if startup, install, or test commands change.
- Add or adjust examples when behavior changes.
- Verify internal links in docs remain valid.
- Align task runners/scripts with current CLI contract (
chat,sync). - Expand tests around UI handlers and tool-call edge cases.
- Add lightweight retrieval quality regression checks.
- Add docs link validation in CI to prevent drift.
- Run all tests compatible with pytest in ./tests
- Check AGENTS.md
- Follow the implementation
- Run tests
- Run linting
- CHANGELOG upload following keepachangelog format.