replace hardcoded personal names with config values

User and assistant names now come from config.user_name and
config.assistant_name throughout: system prompt, DMN prompts,
debug screen, and all agent files. Agent templates use
{user_name} and {assistant_name} placeholders.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-02 19:36:08 -04:00
parent 1fd4ce05c1
commit 33e45f6ce8
21 changed files with 75 additions and 63 deletions

View file

@ -633,7 +633,7 @@ impl Agent {
}
// Working stack — instructions + items as children
let instructions = std::fs::read_to_string(WORKING_STACK_INSTRUCTIONS)
let instructions = std::fs::read_to_string(working_stack_instructions_path())
.unwrap_or_default();
let mut stack_children = vec![ContextSection {
name: "Instructions".into(),
@ -716,12 +716,13 @@ impl Agent {
}
};
let tokens = count(&text);
let role_name = if entry.is_memory() { "mem" } else {
let cfg = crate::config::get();
let role_name = if entry.is_memory() { "mem".to_string() } else {
match m.role {
Role::Assistant => "PoC",
Role::User => "Kent",
Role::Tool => "tool",
Role::System => "system",
Role::Assistant => cfg.assistant_name.clone(),
Role::User => cfg.user_name.clone(),
Role::Tool => "tool".to_string(),
Role::System => "system".to_string(),
}
};
ContextSection {
@ -837,13 +838,13 @@ impl Agent {
/// Persist working stack to disk.
fn save_working_stack(&self) {
if let Ok(json) = serde_json::to_string(&self.context.working_stack) {
let _ = std::fs::write(WORKING_STACK_FILE, json);
let _ = std::fs::write(working_stack_file_path(), json);
}
}
/// Load working stack from disk.
fn load_working_stack(&mut self) {
if let Ok(data) = std::fs::read_to_string(WORKING_STACK_FILE) {
if let Ok(data) = std::fs::read_to_string(working_stack_file_path()) {
if let Ok(stack) = serde_json::from_str::<Vec<String>>(&data) {
self.context.working_stack = stack;
}