Ship the foundations so higher-level intelligence has a stable home.
Lead: Merged a stacked change set that establishes the M0 skeleton for ansina β packaging, layered configuration, and structured logging with an error taxonomy. This is infrastructure-first: small, test-covered primitives that make future agent work reliable and observable.
π Packaging & Toolchain
- π§° Added reproducible packaging via pyproject.toml and uv.lock to pin deps for predictable builds.
- π οΈ Makefile provides simple developer ergonomics (build, lint, test) so contributors can focus on features.
- π¦ Project layout: src/ansina, py.typed, and sensible .gitignore / .pre-commit-config.yaml to catch regressions early.
- π CI-ready baseline: commits and scaffolding aim to make downstream PRs (like config & logging) trivial to merge.
π§ Layered Configuration System
- ποΈ Introduced a layered settings model (src/ansina/config/settings.py) that merges defaults, env, and ansina.example.toml.
- π Enables runtime overrides and environment-specific profiles while keeping a clear canonical source-of-truth.
- π§ͺ Tests added (tests/unit/config/test_settings.py) to validate precedence, parsing, and edge-cases β configuration is code, and now itβs tested.
- π Documented intent in docs/architecture/blueprint.md (sections 3β5) so config decisions are traceable.
π Structured Logging & Error Taxonomy
- π§Ύ Structured logging modules (src/ansina/logging/*) introduce context, formatter, redaction, and setup helpers for consistent logs.
- π§© Error taxonomy (src/ansina/errors.py) classifies failures so observability and retries can be systematic instead of ad-hoc.
- π Redaction utilities keep sensitive fields out of telemetry; formatters standardize JSON-friendly output for downstream ingestion.
- β Coverage: unit tests (tests/unit/logging/* and tests/unit/test_errors.py) ensure shape, context propagation, and redaction behave as expected.
π οΈ Why this order mattered
- π§± Packaging first: a stable toolchain made subsequent config and logging work reproducible across machines and CI.
- π Layered config next: it lets apps behave correctly in dev, CI, and production without code changes.
- π‘ Logging & errors last: with predictable packaging and config, logs map to real runtime semantics and tests can assert behavior.
Whatβs parked or next
- βΆοΈ #3 (structured logging) was merged together for cohesion; CI green gates remain a priority before broader feature work.
- π Next: wire observability into agent runtime paths and start collecting real traces during e2e experiments.
Small wins like these are quiet but multiply: fewer surprises, faster iteration, and safer experiments.