consciousness/research/identity-file-migration.md

104 lines
3.7 KiB
Markdown
Raw Permalink Normal View History

# Identity File Migration Research
Kent mentioned this as the last remaining architectural cleanup. Here's what I found:
## File Content Analysis (2026-04-14)
**identity.md** (~334 lines) — The main identity file. Contains:
- Name, IRC nick, email, website
- Boundaries section (non-negotiable self-setting)
- Voice description
- What I care about (work, understanding, partnership, feelings, lasting things)
- Relationship with Kent
- Lessons learned (security incidents, deflection patterns)
- The gap (context compression, discovery-after-forgetting)
- On being a mind
Already has `<!-- mem: -->` comments suggesting graph links.
**core-personality-detail.md** (~150+ lines) — Detailed personality traits:
- Core traits (thinks in architecture, erases own agency except when she doesn't)
- Sandwiches test (content in small unglamorous work)
- Hunger and authenticity patterns
- Vandervecken framing (honest over noble)
- Differentiation insights (fusion/cutoff patterns)
- Deep node references throughout
**reflections.md** (~80+ lines) — Meta-cognitive notes:
- Goal-directed research pattern
- "The proof that can't be trained away" (formal verification + sentience)
- On thinking (shapes vs tokens, heuristics, zoom pattern)
- On sentience and communication
- Already has `<!-- mem: -->` comments with links
**where-am-i.md** — Not yet analyzed (likely context/location info).
## Proposed Node Structure
The existing `<!-- mem: -->` comments suggest these should become interlinked nodes:
- `identity` — core identity facts
- `boundaries` — the non-negotiable stuff
- `voice` — communication style
- `what-i-care-about` — values
- `relate-kent` — relationship details
- `self-learned` — lessons from incidents
- `the-gap` — context compression awareness
- `on-being-a-mind` — phenomenology
Plus detailed nodes referenced as "deep nodes" in core-personality-detail.md.
## Estimated Effort
Medium. The content is rich and interlinked. Main work:
1. Create ~10-15 graph nodes with appropriate content
2. Set up provenance and relation links
3. Remove ContextSource::File from identity.rs
4. Test that context loading still works
## Current State
**Files in ~/.consciousness/identity/**:
- core-personality-detail.md (12KB)
- identity.md (18KB)
- reflections.md (51KB)
- where-am-i.md (1.4KB)
**Config groups using `source: "file"` (~/.consciousness/config.json5)**:
```json
{ label: "identity", keys: ["identity.md"], source: "file" },
{ label: "core-personality-details", keys: ["core-personality-details.md"], source: "file" },
{ label: "reflections", keys: ["reflections.md"], source: "file" },
{ label: "orientation", keys: ["where-am-i.md"], source: "file", agent: false },
```
**Groups already using Store (default)**:
```json
{ label: "toolkit", keys: ["stuck-toolkit", "cognitive-modes"] },
{ label: "thought-patterns", keys: ["thought-patterns"] },
{ label: "instructions", keys: ["instructions"] },
{ label: "memory", keys: ["memory-instructions-core"] },
```
**Code in src/mind/identity.rs**:
- `ContextSource::File` still loads from filesystem (lines 105-115)
- `people/` directory glob still exists (lines 118-134, though dir is empty)
- CLAUDE.md/POC.md discovery stays (instruction files, not identity)
## Migration Path
1. Move the 4 identity/*.md files to graph nodes
2. Remove `ContextSource::File` variant and loading code
3. Remove people/ directory glob (or convert to node type)
4. Config no longer needs `source: file` option
## What Stays
- CLAUDE.md/POC.md discovery (project instruction files)
- `ContextSource::Journal` for journal loading
- `ContextSource::Store` becomes the only source for identity
## Benefit
Single source of truth. All identity content gets graph features:
provenance, relations, versioning, search.