v0.23.0 — SDK-aware project detection, per-file incremental reindex
Overview
This release fundamentally reworks how fw-context determines project vs. vendor/SDK code. Instead of filtering files at index time (source_roots/exclude_paths), all files from compile_commands.json are now indexed, and is_project is computed after indexing via automatic SDK pattern detection. The reindex flow has been rebuilt for per-file incremental updates, making fw-context index --build as fast as a plain index. Config keys have changed — see breaking changes below.
IMPORTANT: This release requires a full reindex. Run fw-context index --build --force after upgrading.
Changes
Features
- SDK-aware project detection —
is_projectis now determined by automatic SDK pattern matching (Mbed OS, Zephyr, PlatformIO, ESP-IDF, STM32Cube, NRF, etc.) with user overrides viavendor_paths/project_pathsconfig keys. All files from compile_commands.json are indexed; filtering happens only at query time. - Per-file incremental reindex —
fw-context index --buildnow only re-parses files that actually changed, using git-aware file-level tracking inmanifest.json. Previously every--buildre-parsed all files. - Centralized SDK filtering — new
sdk_detect.pyandmcp/shared/filtering.pymodules ensure the same exclusion logic is used by both the indexer and MCP tools. - Redesigned
fw-context list— aligned column table with thousand-separated symbol counts, adaptive terminal-width-aware path truncation, and a*stale marker next to the project name. analyze_vendorcolumn — stored inbuild_configsat index time, reported byget_active_buildso agents know whether vendor analysis ran.- Git-aware staleness detection — new
git_context.pycaptures the git commit hash in the manifest, enablinggit diff --name-onlyfor content-based staleness checks.
Fixes
- Removed config_hash dependency — the per-TU structural hash approach was replaced by file-level mtime + git tracking, eliminating stale cache issues.
Files changed
| File | Change |
|---|---|
src/fw_context_mcp/cli.py |
Add --vendor-paths/--project-paths, git context integration, list redesign |
src/fw_context_mcp/config/settings.py |
Replace source_roots/exclude_paths with vendor_paths/project_paths |
src/fw_context_mcp/indexer/db.py |
Schema migrations: analyze_vendor, is_project, description, first_indexed_at |
src/fw_context_mcp/indexer/manifest.py |
Restructure for per-file git-aware tracking |
src/fw_context_mcp/indexer/runner.py |
Per-file incremental reindex, centralized SDK filtering |
src/fw_context_mcp/indexer/symbols.py |
is_project computed via SDK detection |
src/fw_context_mcp/indexer/ops.py |
Remove config_hash, add per-file migration helpers |
src/fw_context_mcp/indexer/sdk_detect.py |
New — automatic SDK/vendor pattern detection |
src/fw_context_mcp/indexer/git_context.py |
New — git commit hash capture for staleness detection |
src/fw_context_mcp/mcp/shared/filtering.py |
Centralized compute_exclude_like / detect_sdk_exclude_like |
src/fw_context_mcp/mcp/handlers/callgraph.py |
Use centralized filtering, is_project column |
src/fw_context_mcp/mcp/handlers/maintenance.py |
New manifest structure, analyze_vendor reporting |
src/fw_context_mcp/mcp/handlers/search.py |
Use is_project for project-only filtering |
src/fw_context_mcp/mcp/handlers/source.py |
Use is_project column |
src/fw_context_mcp/search/scoring.py |
Remove _is_project_local, use is_project column |
tests/ |
New tests: test_sdk_detect.py; updated: test_config.py, test_db.py, test_filtering.py, test_manifest.py, test_scoring.py |
Breaking changes
- Config keys renamed:
source_rootsandexclude_pathsin[index]are removed. Usevendor_paths(additional vendor/SDK patterns, additive to auto-detection) andproject_paths(manual project directory overrides). Update your.fw-context/config.tomlorlocal.toml. - Schema changed: The index database has new columns (
is_project,analyze_vendor,description,first_indexed_at). Existing indexes are incompatible — a full reindex is required:fw-context index --build --force - manifest.json format changed: The manifest now uses per-file tracking instead of per-TU structural hashes. The first
fw-context index --buildafter upgrade will regenerate it automatically.