refactor: extract identity/context assembly into identity.rs

Move file discovery (CLAUDE.md/POC.md, memory files, people/ glob),
prompt assembly, and context_file_info from config.rs into identity.rs.

All extracted functions are pure — they take paths and return strings,
with no dependency on AppConfig. config.rs calls into identity.rs
(one-way dependency).

config.rs: 663 → 440 lines (-223)
identity.rs: 232 lines (new)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kent Overstreet 2026-03-21 16:10:29 -04:00
parent db48d57917
commit 29db4ff409
3 changed files with 240 additions and 230 deletions

View file

@ -39,6 +39,7 @@ mod cli;
mod config;
mod context;
mod dmn;
mod identity;
mod journal;
mod log;
mod observe;
@ -844,7 +845,7 @@ impl Session {
/// Send context loading info to the TUI debug screen.
fn send_context_info(&self) {
let (instruction_files, memory_files) = config::context_file_info(
let (instruction_files, memory_files) = identity::context_file_info(
&self.config.prompt_file,
self.config.app.memory_project.as_deref(),
);