v0.2.0 — compare, REPL, freshness, validator, tests, CI
·
50 commits
to main
since this release
[0.2.0] — 2026-04-22
Added
- Compare mode —
backendpro compare "<A>" "<B>" [...] [--domain <d>]outputs a side-by-side markdown table for tradeoff decisions / ADRs. Programmatic API:core.compare(). - Interactive REPL —
backendpro --interactive(-i) with slash commands:/d,/s,/all,/cmp,/stale,/list,/help,/quit. - Synonym / hybrid search — query expansion bridges keyword gaps (e.g.
"partial failure"→compensation, saga, fault). Disable with--no-expand. - Confidence scores — every result now carries a
_scorefield (BM25). Markdown output adds a(score: 7.69, confidence: high)label per result. Hide with--no-scores. - Freshness tracking — optional
Last Updatedcolumn convention (YYYY-MM-DD). New flags:--max-age-months N(filter),--stale --domain <d> --max-age-months N(audit). New API:core.find_stale(). - In-memory index cache — lazy, mtime-invalidated. No more BM25 recompute per query. New API:
core.clear_cache(). - CSV validator —
backendpro-validateconsole script (also wired into CI). Validates every CSV against its declared schema (columns, ragged rows, date formats). - Test suite — 37 pytest cases covering BM25 ranking quality, edge cases (empty CSV, missing columns), domain detection, cache behavior, compare, stale filtering, and CSV validation.
- GitHub Actions CI —
.github/workflows/ci.ymlruns ruff lint + CSV validator + pytest + CLI smoke tests on Python 3.9 / 3.11 / 3.12. CONTRIBUTING.md— content & schema rules, severity definitions, ranking-quality test contract, synonym guidance.- Landing page (
index.html) with new "Power Tools" section, refreshed terminal demo, and CI/test stats. [project.optional-dependencies] dev—pytest,pytest-cov,ruff. Plus[tool.pytest.ini_options]and[tool.ruff]config inpyproject.toml.
Changed
core.search(),core.search_stack(),core.search_all()accept new keyword-only args (min_score,max_age_months,expand). Existing positional signatures are unchanged → fully backwards compatible.- Pattern domain rows now include a
Last Updatedcolumn (set to2026-01-15for the initial 22 rows).
Fixed
- 9 pre-existing CSV data-corruption bugs (caught by the new validator): unquoted commas mis-aligned fields in
api.csv,architecture.csv,cache.csv,iac.csv,messaging.csv(×3),observability.csv, pluscsharp-aspnet,elixir-phoenix,nodejs-express,php-laravel,rust-axumstack files. Search was silently degraded for these rows. architecturedomain'ssearch_colsreferenced a non-existentUse Casecolumn → corrected toWhen to Use.- Replaced deprecated
datetime.utcnow()withdatetime.now()(Python 3.13+ deprecation).