This repo enforces single-responsibility PRs with mandatory tests and strict layer boundaries. Follow these steps for every change.
- Pick one documented use case (e.g.,
P-6,ST-2). Reference it in commit message and PR body. - Make changes scoped to that use case only.
- Add/adjust tests: unit + integration/e2e as appropriate.
- Run checks locally:
python scripts/check_layer_dependencies.pypython scripts/require_use_case_reference.py --base <base_sha>python scripts/require_tests_for_code_changes.py --base <base_sha>ruff check .ruff format --check .mypy packagespytest packages/data-layer --cov=packages/data-layerpytest packages/agents --cov=packages/agentspytest packages/cli --cov=packages/cli- To run integration/e2e:
RUN_INTEGRATION=1 pytest -m integration/RUN_E2E=1 pytest -m e2e
- Open PR using the template; ensure tests are included.
- CLI (Layer 3) imports only agents.
- Agents (Layer 2) import only data-layer.
- Data-layer (Layer 1) imports no MONITOR packages.
- CanonKeeper is the only Neo4j writer.
- Unit tests for all code changes.
- Integration/e2e tests for cross-layer flows (use markers
integration,e2e; skipped unlessRUN_INTEGRATION=1orRUN_E2E=1). - No code changes without test changes (enforced by CI).
- Use branch names with the use-case ID, e.g.,
feature/P-6-answer-question. - Mention the use-case ID in commit messages and PR body.
- PRs to
mainrun: layer check, use-case reference check, test-requirement check, ruff, mypy, pytest with coverage. Failing any gate blocks merge.
pre-commit installto run mypy pytest/mypy/pytest hook before commits.