Rename Project Memory to Workspace Memory
Rename all references from "Project Memory" to "Workspace Memory" to avoid future conflation if a "project" concept is introduced later. Changes: - Rename read_project_memory() -> read_workspace_memory() - Update all prompts, tool descriptions, and comments - Update header parsing in memory.rs to use "# Workspace Memory" - Update display detection for "=== Workspace Memory ===" - Update documentation and analysis/memory.md 11 files changed, ~36 occurrences updated.
This commit is contained in:
@@ -7,7 +7,7 @@ use tracing::debug;
|
||||
use g3_core::ui_writer::UiWriter;
|
||||
use g3_core::Agent;
|
||||
|
||||
use crate::project_files::{combine_project_content, read_agents_config, read_include_prompt, read_project_memory, read_project_readme};
|
||||
use crate::project_files::{combine_project_content, read_agents_config, read_include_prompt, read_workspace_memory, read_project_readme};
|
||||
use crate::display::{LoadedContent, print_loaded_status, print_workspace_path};
|
||||
use crate::language_prompts::{get_language_prompts_for_workspace, get_agent_language_prompts_for_workspace_with_langs};
|
||||
use crate::simple_output::SimpleOutput;
|
||||
@@ -130,7 +130,7 @@ pub async fn run_agent_mode(
|
||||
// Load AGENTS.md, README, and memory - same as normal mode
|
||||
let agents_content_opt = read_agents_config(&workspace_dir);
|
||||
let readme_content_opt = read_project_readme(&workspace_dir);
|
||||
let memory_content_opt = read_project_memory(&workspace_dir);
|
||||
let memory_content_opt = read_workspace_memory(&workspace_dir);
|
||||
|
||||
// Read include prompt early so we can show it in the status line
|
||||
let include_prompt = read_include_prompt(include_prompt_path.as_deref());
|
||||
@@ -194,7 +194,7 @@ pub async fn run_agent_mode(
|
||||
agent.set_agent_mode(agent_name);
|
||||
|
||||
// Auto-memory is enabled by default in agent mode (unless --no-auto-memory is set)
|
||||
// This prompts the LLM to save discoveries to project memory after each turn
|
||||
// This prompts the LLM to save discoveries to workspace memory after each turn
|
||||
agent.set_auto_memory(!no_auto_memory);
|
||||
|
||||
// Enable ACD (Aggressive Context Dehydration) if requested
|
||||
|
||||
@@ -54,7 +54,7 @@ impl LoadedContent {
|
||||
Self {
|
||||
has_readme: content.contains("Project README"),
|
||||
has_agents: content.contains("Agent Configuration"),
|
||||
has_memory: content.contains("=== Project Memory"),
|
||||
has_memory: content.contains("=== Workspace Memory"),
|
||||
include_prompt_filename: if content.contains("Included Prompt") {
|
||||
Some("prompt".to_string()) // Default name when we can't determine the actual filename
|
||||
} else {
|
||||
@@ -155,7 +155,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_loaded_content_from_combined() {
|
||||
let content = "Project README\nAgent Configuration\n=== Project Memory";
|
||||
let content = "Project README\nAgent Configuration\n=== Workspace Memory";
|
||||
let loaded = LoadedContent::from_combined_content(content);
|
||||
assert!(loaded.has_readme);
|
||||
assert!(loaded.has_agents);
|
||||
|
||||
@@ -38,7 +38,7 @@ use accumulative::run_accumulative_mode;
|
||||
use agent_mode::run_agent_mode;
|
||||
use autonomous::run_autonomous;
|
||||
use interactive::run_interactive;
|
||||
use project_files::{combine_project_content, read_agents_config, read_include_prompt, read_project_memory, read_project_readme};
|
||||
use project_files::{combine_project_content, read_agents_config, read_include_prompt, read_workspace_memory, read_project_readme};
|
||||
use simple_output::SimpleOutput;
|
||||
use ui_writer_impl::ConsoleUiWriter;
|
||||
use utils::{initialize_logging, load_config_with_cli_overrides, setup_workspace_directory};
|
||||
@@ -108,7 +108,7 @@ pub async fn run() -> Result<()> {
|
||||
// Load project context files
|
||||
let agents_content = read_agents_config(&workspace_dir);
|
||||
let readme_content = read_project_readme(&workspace_dir);
|
||||
let memory_content = read_project_memory(&workspace_dir);
|
||||
let memory_content = read_workspace_memory(&workspace_dir);
|
||||
let language_content = language_prompts::get_language_prompts_for_workspace(&workspace_dir);
|
||||
let include_prompt = read_include_prompt(cli.include_prompt.as_deref());
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Project file reading utilities.
|
||||
//!
|
||||
//! Reads AGENTS.md, README.md, and project memory files from the workspace.
|
||||
//! Reads AGENTS.md, README.md, and workspace memory files from the workspace.
|
||||
|
||||
use std::path::Path;
|
||||
use tracing::error;
|
||||
@@ -66,9 +66,9 @@ pub fn read_project_readme(workspace_dir: &Path) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Read project memory from analysis/memory.md in the workspace directory.
|
||||
/// Read workspace memory from analysis/memory.md in the workspace directory.
|
||||
/// Returns formatted content with emoji prefix and size info, or None if not found.
|
||||
pub fn read_project_memory(workspace_dir: &Path) -> Option<String> {
|
||||
pub fn read_workspace_memory(workspace_dir: &Path) -> Option<String> {
|
||||
let memory_path = workspace_dir.join("analysis").join("memory.md");
|
||||
|
||||
if !memory_path.exists() {
|
||||
@@ -79,7 +79,7 @@ pub fn read_project_memory(workspace_dir: &Path) -> Option<String> {
|
||||
Ok(content) => {
|
||||
let size = format_size(content.len());
|
||||
Some(format!(
|
||||
"=== Project Memory (read from analysis/memory.md, {}) ===\n{}\n=== End Project Memory ===",
|
||||
"=== Workspace Memory (read from analysis/memory.md, {}) ===\n{}\n=== End Workspace Memory ===",
|
||||
size,
|
||||
content
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user