pub struct GCCWorkspace { /* private fields */ }Expand description
Manages the .GCC/ directory structure for one agent project.
Implements the four GCC commands from arXiv:2508.00031v2:
- COMMIT (§3.2): milestone checkpointing
- BRANCH (§3.3): isolated reasoning workspace
- MERGE (§3.4): synthesise divergent paths
- CONTEXT (§3.5): hierarchical memory retrieval
Implementations§
Source§impl GCCWorkspace
impl GCCWorkspace
pub fn new(project_root: impl AsRef<Path>) -> Self
Sourcepub fn log_ota(
&self,
observation: &str,
thought: &str,
action: &str,
) -> Result<OTARecord>
pub fn log_ota( &self, observation: &str, thought: &str, action: &str, ) -> Result<OTARecord>
Append an OTA step to the current branch’s log.md.
The paper logs continuous Observation–Thought–Action cycles.
Sourcepub fn commit(
&self,
contribution: &str,
previous_summary: Option<&str>,
update_roadmap: Option<&str>,
) -> Result<CommitRecord>
pub fn commit( &self, contribution: &str, previous_summary: Option<&str>, update_roadmap: Option<&str>, ) -> Result<CommitRecord>
COMMIT command (paper §3.2).
Persists a milestone checkpoint to commit.md with fields:
Branch Purpose, Previous Progress Summary, This Commit’s Contribution.
Sourcepub fn branch(&mut self, name: &str, purpose: &str) -> Result<()>
pub fn branch(&mut self, name: &str, purpose: &str) -> Result<()>
BRANCH command (paper §3.3).
Creates isolated workspace: B_t^(name) = BRANCH(M_{t-1}). Initialises empty OTA trace and commit.md; metadata records intent.
Sourcepub fn merge(
&mut self,
branch_name: &str,
summary: Option<&str>,
target: &str,
) -> Result<CommitRecord>
pub fn merge( &mut self, branch_name: &str, summary: Option<&str>, target: &str, ) -> Result<CommitRecord>
MERGE command (paper §3.4).
Integrates a completed branch back into target (default: main),
merging summaries and execution traces into a unified state.
Sourcepub fn context(&self, branch: Option<&str>, k: usize) -> Result<ContextResult>
pub fn context(&self, branch: Option<&str>, k: usize) -> Result<ContextResult>
CONTEXT command (paper §3.5).
Retrieves historical context at K-commit resolution. Paper experiments use K=1 (only most recent commit revealed).