Introduce status_emit_level to control status message verbosity, allowing
users to select Basic, Intermediate, or Detailed output; refactor all
status emission calls to respect this setting, improving clarity and
customizability of system feedback for different user needs.
The SKIP_CATEGORY_MARGIN constant is raised from 0.10 to 0.15 to make skip
category classification more selective, reducing false positives by requiring
a higher margin above personal similarity.
Removes redundant try/except blocks and input validation in several
methods to simplify logic and improve readability. Moves error handling
to higher levels where appropriate. Adds a skip state cache to track
when memory operations should be skipped, improving efficiency by
avoiding repeated skip checks. Cleans up batch operation execution and
cache clearing to include the new skip state. These changes reduce
unnecessary code complexity and improve maintainability, while also
optimizing memory operation flow and cache management.
refactor(skip-detection): condense and generalize personal category descriptions for maintainability and easier updates
fix(constants): lower SKIP_CATEGORY_MARGIN from 0.20 to 0.10 to reduce false positives in skip classification
refactor(skip-detection): clarify logging for skip/allow decisions and threshold calculation for better traceability
refactor: use consistent double-quote style for operator and code-ending character lists
fix(filter): ensure embeddings are normalized before use in skip detector to improve classification accuracy
Non-personal category descriptions are now more comprehensive and organized by topic, improving the classifier's ability to detect impersonal content. Personal category descriptions are condensed into broader, clearer categories, making them easier to maintain and update. The SKIP_CATEGORY_MARGIN is reduced to make the skip detector less aggressive, addressing previous false positives. Logging is improved for easier debugging and understanding of skip decisions. Embedding normalization is enforced to ensure consistent similarity calculations.
Expand and clarify the "Filter for Intent" rule to ensure only direct,
personally significant facts are stored, explicitly excluding messages
where the user's primary intent is instructional, technical, or
analytical. Update processing and decision frameworks to reinforce
selectivity based on user intent. Revise and annotate examples to
demonstrate correct application of the new rules, making it clear that
requests for advice, recommendations, or technical tasks are ignored.
These changes improve the precision and reliability of memory
consolidation, reducing the risk of storing irrelevant or transient
information.
- Unify skip detection to a binary classifier (personal vs non-personal)
for improved maintainability and clarity. Remove multiple technical/
instruction/translation/etc. categories and consolidate into
NON_PERSONAL and PERSONAL.
- Adjust skip detection margin for more precise classification.
- Add semantic deduplication for memory operations using embedding
similarity, preventing duplicate memory creation and updates.
- Normalize and validate embedding dimensions for robustness.
- Add per-user async locks to prevent race conditions during memory
consolidation.
- Refactor requirements.txt to remove version pinning for easier
dependency management.
- Improve logging and error handling for embedding and deduplication
operations.
These changes improve the reliability and accuracy of memory
classification and deduplication, reduce false positives in skip
detection, and prevent duplicate or conflicting memory operations in
concurrent environments. Dependency management is simplified for
compatibility.
- Reorder and group imports for clarity and PEP8 compliance.
- Standardize string quoting and whitespace for consistency.
- Refactor long function signatures and dictionary constructions for better readability.
- Use double quotes for all string literals and dictionary keys.
- Improve formatting of multiline statements and function calls.
- Add or adjust line breaks to keep lines within recommended length.
- Reformat class and method docstrings for clarity.
- Use consistent indentation and spacing throughout the file.
These changes improve code readability, maintainability, and consistency, making it easier for future contributors to understand and modify the codebase. No functional logic is changed.
Introduce a dev-check.sh script to automate code formatting and import
sorting using Black and isort. Add a pyproject.toml file to configure
Black and isort settings for consistent code style. Update
requirements.txt to include Black and isort as development dependencies
and remove version pinning for easier dependency management.
These changes streamline the development workflow, enforce code style
consistency, and make it easier for contributors to run formatting and
import checks locally.