v0.4.1 - Watch mode
π Watch mode
Added
Watch Mode (--watch, -w)
- Introduced watch mode to monitor codebases for file changes and automatically regenerate context bundles
- Incremental rebuilds β only affected bundles are regenerated
- Change detection highlights updates to:
- props
- hooks
- state
- events
- components
- functions
- Debouncing β waits 500ms after the last change before regenerating
- Style file watching when using
--include-style(.css,.scss) - Debug mode (
--debug) with detailed hash output - Status file written to
.logicstamp/context_watch-status.json - Graceful shutdown with clean cleanup on
Ctrl+C
Watch Logs
- New opt-in log file support via
--log-file - Structured change logs written to:
.logicstamp/context_watch-mode-logs.json
Watch Profiles
- Added
watch-fastprofile- Optimized for faster incremental rebuilds
- Lighter style extraction during watch mode
Programmatic API Exports
- New exports for tooling and integrations:
validateBundlesmultiFileValidatemultiFileCompareisWatchModeActivereadWatchStatusreadWatchLogs
Changed
Framework Detection Priority
- Fixed framework detection order to be consistent and correct:
Backend > Vue > React > TypeScript module - Backend frameworks (Express/NestJS) now correctly take precedence over frontend imports
- Files without framework patterns correctly default to
ts:module(not React)
Watch Mode Internals
- Extracted diffing logic into a dedicated module (
watchDiff.ts) - Simplified
watchModeby removing redundant comparison logic - Centralized diff computation for clearer separation of concerns
Change Detection API
- Simplified
getChangesfunction signature - Removed unnecessary explicit passing of comparison functions
- Updated internal call sites and tests accordingly
Fixed
- Backend framework detection now correctly overrides Vue and React imports
- Vue files correctly take priority over React when both are present
- Framework detection documentation now matches actual implementation behavior
- Reduced duplication in watch mode contract comparison logic
- Ensured consistent diff behavior during incremental watch updates
Improved
- Improved maintainability and readability of watch mode code paths
- Reduced coupling between file watching orchestration and diffing logic
- Cleaner internal APIs for future extensions and contributors
Docs & Maintenance
- Updated framework documentation to reflect correct detection priority:
- Express
- NestJS
- Vue
- Updated monorepo and framework docs for accuracy
- Updated README and CHANGELOG to reflect watch mode and internal refactors
π Related PRs
- #67 - Refactor watch mode diffing logic and simplify change detection APIs
- #66 - Add watch mode, logs, profiles, and framework detection fix
- #65 - Fix framework detection priority and documentation inconsistencies
Impact:
This release introduces watch mode for incremental context generation and corrects framework detection behavior across backend and frontend frameworks. Internal refactors improve maintainability without altering public behavior. All changes are backward compatible: watch mode is opt-in, no existing workflows are affected, framework detection is corrected (not changed in intent), and no schema or public API contracts were broken.
Changelog
π Full changelog