Add --project CLI flag for loading projects at startup

Adds a new --project <PATH> flag that loads project files (brief.md,
contacts.yaml, status.md) at startup, similar to the /project command
but WITHOUT auto-executing the project status prompt.

Changes:
- Add --project flag to cli_args.rs
- Add load_and_validate_project() helper in project.rs (shared by both
  --project flag and /project command)
- Modify run_interactive() to accept optional initial_project parameter
- Wire up --project in lib.rs to load project before interactive mode
- Refactor /project command to use shared helper (reduces duplication)
- Add 4 new tests for load_and_validate_project()
This commit is contained in:
Dhanji R. Prasanna
2026-01-29 11:06:08 +11:00
parent 05d253ee2a
commit 5ea43d7b39
7 changed files with 158 additions and 33 deletions

View File

@@ -122,4 +122,8 @@ pub struct Cli {
/// Disable automatic memory update reminder at end of agent mode
#[arg(long)]
pub no_auto_memory: bool,
/// Load a project from the given path at startup (like /project but without auto-prompt)
#[arg(long, value_name = "PATH")]
pub project: Option<PathBuf>,
}