Add /project and /unproject commands for project-specific context

- Add Project struct in crates/g3-cli/src/project.rs with file loading logic
- Load brief.md, contacts.yaml, status.md from project path
- Load projects.md from workspace root for cross-project context
- Project content appended to system message (survives compaction/dehydration)
- /project <path> loads project and auto-submits prompt asking about state
- /unproject clears project content and resets context
- Add set_project_content(), clear_project_content(), has_project_content() to Agent
- Add new_for_test_with_readme() for testing with custom README content
- Add 6 unit tests for Project struct
- Add 9 integration tests for project context behavior
This commit is contained in:
Dhanji R. Prasanna
2026-01-21 14:53:30 +05:30
parent a34a3b08e9
commit feb7c3e40d
6 changed files with 709 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ mod utils;
mod g3_status;
mod template;
mod completion;
mod project;
use anyhow::Result;
use std::path::PathBuf;