Commit Graph

6 Commits

Author SHA1 Message Date
Claude
2579312029 Add Layer 4 caching to reduce AI load
Implemented 5-minute short-term caching for relationship inference:

**store.rs**:
- Added relationship_cache SQLite table
- save_relationship_cache(), get_cached_relationship()
- save_all_relationships_cache(), get_cached_all_relationships()
- clear_relationship_cache() - called on memory create/update/delete
- Cache duration: 5 minutes (configurable constant)

**relationship.rs**:
- Modified infer_all_relationships() to use cache
- Added get_relationship() function with caching support
- Cache hit: return immediately
- Cache miss: compute, save to cache, return

**base.rs**:
- Updated tool_get_relationship() to use cached version
- Reduced load from O(n) scan to O(1) cache lookup

**Benefits**:
- Reduces AI load when frequently querying relationships
- Automatic cache invalidation on data changes
- Scales better with growing memory count
- No user-facing changes

**Documentation**:
- Updated ARCHITECTURE.md with caching strategy details

This addresses scalability concerns for Layer 4 as memory data grows.
2025-11-06 09:33:42 +00:00
Claude
8037477104 Design Layer 5: Knowledge Sharing platform
Layer 5 focuses on sharing AI interactions as "information + personality":
- SharedInteraction: Problem, approach, result with author profile
- ShareableProfile: User essence from Layer 3.5 + Layer 4
- Privacy-first: Share patterns, not raw data
- Use cases: AI-era GitHub Gist, knowledge SNS, persona showcase

Philosophy: People seek both useful information and authentic personality.
Like SNS/streaming, the combination creates value. Information alone is
sterile; personality alone is hollow.

Updated:
- docs/ARCHITECTURE.md: Comprehensive Layer 5 design with data models
- README.md: Added Layer 5 feature overview
- Layer overview diagram updated
2025-11-06 09:03:24 +00:00
Claude
6906012c26 Update documentation: reflect Layer 4 completion
- Update README.md with Layer 4 relationship inference features
- Add comprehensive Layer 4 section to ARCHITECTURE.md
- Update implementation strategy to show Phase 4 complete
- Add CLI control flag documentation (--enable-layer4)
- Update version to 0.3.0
- Document personality-aware bond strength calculation
- Add relationship type classification details
2025-11-06 08:00:38 +00:00
Claude
427943800e Update documentation: reflect Layer 3.5 completion
Updated README.md and ARCHITECTURE.md to document Layer 3.5
(Integrated Profile) implementation.

README.md changes:
- Updated header to reflect Layers 1-3.5 complete
- Added Layer 3.5 feature section
- Added get_profile to MCP tools list
- Added Layer 3.5 usage examples with sample output
- Updated architecture overview with Layer 3.5
- Added design philosophy explanation

ARCHITECTURE.md changes:
- Updated layer overview diagram with Layer 3.5
- Added comprehensive Layer 3.5 section:
  - Purpose and problem solved
  - Data model (UserProfile, TraitScore)
  - Integration logic (5 extraction methods)
  - Caching strategy with update triggers
  - Usage patterns for AI
  - Design philosophy
- Updated implementation strategy (Phase 3.5)
- Updated code organization to reflect current structure
- Updated version metadata

Layer 3.5 provides unified user profile by integrating
Layers 1-3 data, implementing "internal complexity,
external simplicity" design philosophy.
2025-11-06 06:58:58 +00:00
Claude
2aac138185 Update documentation: reflect Layers 1-3 completion
Updated README.md and ARCHITECTURE.md to reflect current implementation
status. All three layers are now complete and functional.

Changes:
- README.md: Added Layer 2 (AI Memory) and Layer 3 (Big Five) features
- README.md: Added MCP tools list and usage examples
- README.md: Added Big Five personality traits explanation
- ARCHITECTURE.md: Updated Layer 2 and 3 status to Complete
- ARCHITECTURE.md: Updated implementation strategy phases
- Archived old documentation in docs/archive/old-versions/

Current status:
- Layer 1  Complete: Pure memory storage
- Layer 2  Complete: AI interpretation + priority scoring
- Layer 3  Complete: Big Five personality analysis
- Layer 4 🔵 Planned: Game systems and companion features
- Layer 5 🔵 Future: Distribution and sharing
2025-11-06 06:11:01 +00:00
Claude
f2a02abf3e Organize repository structure: clean up root directory
Major reorganization to improve clarity and maintainability:

## Documentation
- Created new simple README.md focused on Layer 1
- Added docs/ARCHITECTURE.md explaining multi-layer design
- Moved LAYER1_REBUILD.md -> docs/LAYER1.md
- Archived old documentation to docs/archive/:
  - CHANGELOG.md, QUICKSTART.md, STATUS.md, USAGE.md
  - DESIGN.md, README_CONFIG.md, ROADMAP.md, TECHNICAL_REVIEW.md
  - claude.md, test-mcp.sh

## Source Code
- Moved unused .rs files to src/tmp/:
  - ai_interpreter.rs (Layer 2 - future)
  - companion.rs (Layer 4b - future)
  - game_formatter.rs (Layer 4a - future)
  - memory.rs (old implementation)
  - extended.rs (old MCP server)

## Result
Clean root directory with only essential files:
- README.md (simple, Layer 1 focused)
- Cargo.toml
- .gitignore
- docs/ (organized documentation)
- src/ (active code only)

All Layer 1 functionality remains intact and tested.
2025-11-05 18:24:38 +00:00