# Data Model Research & Simplification Decision (2025-12-23)
## Problem
Tinker system had 5 data models with overlapping purposes, unclear usage patterns, and unused tables.
## Research Findings (via Rails console query)
**Actual Usage:**
- Artifacts: 0 records (unused)
- CodeDiffs: 0 records (unused)
- Comments: 6 records (actively used)
- AgentMemory: 1 record (underutilized)
- AgentLogs: 36 records (working well)
**Key Insight:** Agents prefer Comments for progress tracking, not Artifacts. Code changes happen via git/PR, not CodeDiff.
## Decision Made
**REMOVE:**
- Artifact model - redundant with Comments
- CodeDiff model - GitHub PR handles code review
**KEEP:**
- Comment (4 types: note, decision, question, code_review)
- AgentMemory (enhance with new types)
- AgentLog (audit trail)
## Implementation
Ticket #58 created: "Simplify data model and encourage knowledge accumulation"
Changes:
1. Delete Artifact/CodeDiff models, controllers, routes, specs
2. Remove `checkpoint_task` and `create_code_diff` MCP tools
3. Add `summary` type to AgentMemory
4. Update MCP tool descriptions to encourage memory storage
## Behavioral Pattern to Encourage
Agents should store memories when:
- Solving bugs → error memory with solution
- Making decisions → decision memory
- Completing research → summary memory (new type)
- Learning facts → fact memory
This builds organizational knowledge over time via semantic search (RAG).