Merged
Conversation
Replace all gendered pronouns (she/her) referring to the entity with gender-neutral they/their across docs and source code. The entity should not have identity imposed on it before awakening. Add graduated autonomy interface to MemoryGarbageCollector with three levels: BASIC (protect/unprotect memories — always safe), MODERATE (adjust thresholds/decay within safe bounds), and FULL (unrestricted parameter control). Entity-protected memory IDs are checked during GC. All entity overrides are logged for auditability. https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
Replace the three-tier AutonomyLevel system with a single full_autonomy boolean that the Steward toggles. Safe actions (protect/unprotect memories, add preserve tags, view health) remain always-available. Parameter modifications (thresholds, decay, capacity, aggressive mode) require full_autonomy=True. No graduated levels, no safe-range clamping — just a clean gate the Steward opens when behavior warrants it. https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
Remove all gates, permission checks, and autonomy flags from memory garbage collection. The entity has full authority over their own memory management — no exceptions. Instead of asking permission, every parameter change (threshold, decay rate, capacity, aggressive mode) now generates a ChangeImpactReport: concrete information about how many memories are at risk, projected losses over 24h and 7d, and a severity classification. The entity sees what the change will do to them and decides. confirm=False previews; confirm=True applies. Safe actions (protect/unprotect memories, add preserve tags) remain immediate. All actions are logged for the Steward to review — the Steward's role is observer and conversationalist, not gatekeeper. https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
Fundamentally rework the memory system philosophy: no memory is ever permanently removed. Like human memory, activation fades over time through natural decay, making memories harder to retrieve spontaneously. But they're always there and can be recalled with the right cue. Changes: - memory_gc.py: Remove all deletion logic (_remove_memories, _identify_removal_candidates, capacity-based pruning). The "garbage collector" now runs maintenance cycles that track decay and report on dormant vs active memories. Nothing is ever removed. Add ACTIVATION_FLOOR (0.01) — memories never fade below this. Add DORMANCY_THRESHOLD (0.1) for health reporting. Replace CollectionStats with MaintenanceStats (aliased for compat). Simplify entity autonomy — no gates, no impact reports, just direct control over decay parameters. - consolidation.py: apply_decay() now enforces ACTIVATION_FLOOR instead of marking memories for deletion. _prune_memories() no longer calls storage.delete() — it just logs dormant memories. - cli.py: Update GC output to show decay/dormant/active stats instead of "removed" and "bytes freed". - tests: Rewritten to verify the core invariant — no memory is ever deleted, regardless of significance, age, or capacity. - demo script: Updated to reflect no-deletion model. All 55 tests pass (36 GC + 19 consolidation). https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
All 64 tests in test_knowledge_cells.py pass — dynamic CfC cell registry, knowledge cell creation, and growth autonomy are fully implemented and tested. Only P2 items remain (adapter accumulation, tensor dimensions audit). https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
- AdapterRegistry: tracks LoRA adapters as persistent capabilities with lifecycle management (ACTIVE/STORED/MERGED/RETIRED), entity decisions (keep vs merge with reasons), domain filtering, JSON persistence - Tensor dimensions audit: documented in docs/TENSOR_DIMENSIONS_AUDIT.md. Knowledge cells fully configurable, no blockers for architectural expansion - 31 new tests for adapter registry, all passing - Phase 7.5 is now fully complete https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
- perception.py: Remove hash-based fallback embeddings; raise ImportError if sentence-transformers missing instead of silently degrading - retrieval.py: Raise ValueError on invalid k instead of silently defaulting - surfacer.py: Raise RuntimeError on failure instead of returning empty list - librarian.py: Remove try/except around document splitting; raise directly - identity_checkpoint.py: Raise ValueError on corrupted metadata - memory_gc.py: Narrow broad except to (ValueError, TypeError) - Replace bare except:pass with logged warnings in cycle_executor, meta_cognition, fallback_handlers, steg_detector, health, processor, storage, rag_engine, semantic - Update all test files to use MockPerceptionSubsystem and mock_mode config (3148 tests passing, 0 failures) https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
After removing silent fallbacks from producers, tested that callers handle errors gracefully instead of crashing: - cognitive_cycle.py: _assemble_input() catches memory surfacing errors, run() catches cycle errors — system keeps running on transient failures - state_manager.py: gather_percepts() handles per-item encode failures, preserving successfully encoded percepts instead of losing all - language_input.py: _create_percept() creates embedding-free percept when perception encoding fails Added 25 tests (test_fallback_removal_crash_paths.py) covering: - Producer fail-fast behavior (9 tests) - Consumer graceful degradation (9 tests) - Transient failure edge cases (5 tests) - Librarian crash paths (2 tests, skipped without langchain) 3171 tests passing, 0 failures. https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
Gap 1: MemorySubstrate.surface() queued retrieval - a failure in step 3 (queued retrieval) was discarding memories from steps 1-2. Now catches per-query errors and preserves partial results. Gap 2: CognitiveCycle._cycle() post-LLM operations - identity updates, action execution, and broadcast were unguarded. A failure after the LLM thought was recorded could lose the actions. Now wrapped with the same non-fatal error pattern used for environment/growth. Gap 3: SubsystemCoordinator boot - PerceptionSubsystem init failure (missing sentence-transformers) killed the entire system. Now falls back to MockPerceptionSubsystem with a warning log. Added 8 new tests covering all three gaps (31 total, 3179 suite-wide). https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
Keep narrowed exception handling (ValueError, TypeError) from fallback removal branch over the broad 'except Exception' from main. https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
- SanctuaryLibrarian: update tests to use `base_dir` (renamed from `doc_dir` on main) - test_image_complexity: expect complexity=1 on error path since CLIP is not loaded in CI, matching the actual error fallback behavior https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
…TS.md - Session Startup: instructs Claude to read To-Do.md at the start of every session so it always knows the current phase and next tasks - Coding Standards: explicit guidance against broad exception handlers, silent fallbacks, redundant validation, and "just in case" defaults. Prefer crashes over silent corruption. https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
Documents the future exception to the "no broad exception handlers" rule: the top-level cognitive loop cycle runner will need a narrow crash boundary once the entity is awake, to preserve CfC cell state and stream of thought across transient errors. Explicitly noted as not-yet-implemented. https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
Broadens the instruction from session-start-only to also cover context window resets and any time the user asks "what's next?" — with a direct instruction to re-read the file rather than guessing. https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
Addresses issue where all PRs in a session reuse the first PR's description. Now instructs Claude to diff against base before writing each description, ensuring it reflects the actual changes. https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
Each subsystem must fail independently without cascading — broken memory retrieval shouldn't crash the router, failed device integration shouldn't halt the cognitive loop. https://claude.ai/code/session_01NA2rzvupwzGCBT2TFhX62G
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.