v0.9.6 β Estimate/Scan unification, RAG hardening & OSS hygiene
Β· v0.9.6
## Highlights A consolidation release on top of v0.9.5: the `scan` command is now folded into `estimate`, the `estimate` forecast was recalibrated against real runs, RAG / local-embeddings handling was hardened, LLM cost bookkeeping was centralised, and the project gained a full open-source hygiene layer (SECURITY, CONTRIBUTING, CoC, CI). --- ## π Estimate / Scan unification The standalone `anatoly scan` command is gone β its capabilities (new / modified / cached file accounting) now live inside `estimate`, which is the single entry point for forecasting. - `anatoly scan` removed; new/modified/cached are surfaced directly in the `estimate` view. - New `--no-cache` flag for a from-scratch forecast that ignores prior cache state. - Cached files now excluded from the token + cost forecast (no more double-counting). - Stale tasks pointing to deleted/missing source files are pruned from the estimator. - Deliberation shard count derived from distinct directories rather than a flat `files / 20` heuristic. - Bootstrap and coherence per-page token constants recalibrated from real runs. - Estimate user-guide added under `docs/`. ## π§ Scan / config schema cleanup - Glob include/exclude detection runs at wizard time, with a new `respect_gitignore` knob. - `auto_detect` removed β `include` / `exclude` are now strictly authoritative. - TypeScript-specific defaults dropped from the scan config schema (the project is multi-language). - Language detection delegated to [`linguist-js`](https://www.npmjs.com/package/linguist-js) for accurate per-language stats. ## π§ RAG & local embeddings - LanceDB tables auto-rebuild on embedding-dimension drift, so swapping providers no longer corrupts the index. - System-local providers are now identified by name (`local-advanced`), not by URL heuristics β fixes routing when users override `base_url`. - The local sidecar is unified under the canonical `local-advanced` name, with per-axis URLs routed through the slot map. - `ANATOLY_LOCAL_DUMMY_KEY` footgun removed: local providers declare `auth: none` and skip API-key plumbing entirely. - `local-embeddings` gained `init`, `cleanup`, and `downgrade` subcommands; YAML formatting is preserved across config edits. ## π Metrics & telemetry - Centralised LLM cost bookkeeping behind a single `recordLlmCost` helper β every code path (tier3, phase, refinement) now goes through one accounting hook. - Refinement tokens propagate correctly through tier3 β phase β `recordLlmCost` (previously dropped on the floor). - `llm_call` events are now emitted for the coherence-review and content-review passes too, so the cost ndjson covers the full pipeline. - `runDocContentReview` is wrapped in `runWithContext` so its events carry the right ndjson phase tag. ## βοΈ Output concision discipline - New "output concision discipline" prompt block added to every axis and to non-RAG services. - Empirical study (`docs/concision-discipline-study.md`) documents the calibration methodology behind the new prompts. ## π Docs pipeline - The `content-review` pass is now merged into the updater loop, removing one full pipeline phase and the round-trip it cost. ## π οΈ CLI, build & Makefile - `anatoly --version` now prints the git commit SHA alongside the package version. - `make update` supports a `BRANCH=` variable to refresh from a non-`main` branch. - `make update` supports a `COMMIT=` variable to pin a specific revision. - `sync-motd` build step is idempotent (no spurious diffs on repeated builds). ## π Open-source hygiene - New `SECURITY.md` with endpoint inventory and threat model. - New `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, plus a CI workflow. - `README.md` got a TL;DR section. ## π‘οΈ Security & dependencies - `protobufjs` and `ip-address` pinned via `overrides` to clear critical CVEs. - Stale `hasInstallScript` flag dropped from the lockfile. ## π§ Refactoring - `RunConfig` type and builder extracted into a dedicated core module (`run.ts` is no longer the source of truth for config assembly). --- ## Full changelog `git log v0.9.5..v0.9.6` β 34 commits. **Compare:** https://github.com/r-via/anatoly/compare/v0.9.5...v0.9.6