Read these before making changes; they are authoritative for repo workflows.
| Topic | File |
|---|---|
| Agent instructions | .github/copilot-instructions.md |
| Module structure & dependencies | .github/instructions/architecture.md |
| Code style & patterns | .github/instructions/coding-standards.md |
| Validation pipeline | .github/instructions/validation-workflow.md |
| Testing requirements | .github/instructions/testing.md |
| Domain terminology | .github/instructions/glossary.md |
src/tools/is the Python codebase with layered modules:core/(foundations),utils/(catalog + graph helpers), andvalidators/(CLI validation pipeline).- XML catalogs live in
artifacts/,imports/, andtests/; they control discovery. - Tests are in
tests/withunit/,integration/, shared fixtures inconftest.py, and domain data intests/data/{domain}/. - Key file types include
.owl.ttl,.shacl.ttl,.context.jsonld, and.expectedfor invalid test outputs.
make install-devinstalls dev dependencies and pre-commit hooks.make lintrunspre-commit;make formatrunsblackandisortonsrc/.python3 -m src.tools.validators.validation_suiteruns the full suite (auto-discovery). Use--domain manifestor--path ./file.jsonfor scoped runs.pytest tests/runs all tests;pytest tests/ --cov=src/tools --cov-report=htmlgenerates coverage reports.make registry-update TAG=vX.Y.Zupdates catalogs for a release;mkdocs serveruns docs locally.
- Python with 4-space indentation, type hints on public APIs, and module docstring headers as defined in
coding-standards.md. - Use
pathlib.Path(notos.path), raise specific exceptions, and returnReturnCodesfor CLI results. - Log via
get_loggerfromsrc.tools.core.logging; reserveprint()for final user-facing output. - Import order: stdlib, third-party, local
core, localutils. Tests followtest_{function}_{scenario}_{expected}.
- Pytest is required; cover happy path, edge cases, error cases, and boundaries.
- CI expects >80% coverage for
src/toolsand the validation suite to pass. - Invalid data tests require matching
.expectedfiles intests/data/{domain}/invalid/.
- Catalog-driven architecture: validators must never scan the filesystem directly.
registry_updater.pywrites catalogs (and is the only place usingfile_collector.py);registry_resolver.pyreads catalogs.- Missing catalog entries should fail fast with clear errors; no silent fallbacks.
- Recent history favors short, imperative subjects with optional prefixes like
feat:,fix:,docs:, or scoped forms likefeat(ontology): .... - PRs should follow
.github/pull_request_template.md: clear summary, linked issue, test evidence, and versioning/compatibility checklist items when ontology changes apply.