Skip to main content

GCCWorkspace

Struct GCCWorkspace 

Source
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

Source

pub fn new(project_root: impl AsRef<Path>) -> Self

Source

pub fn init(&mut self, project_roadmap: &str) -> Result<()>

Initialise a new GCC workspace.

Source

pub fn load(&mut self) -> Result<()>

Load an existing GCC workspace.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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).

Source

pub fn current_branch(&self) -> &str

Source

pub fn switch_branch(&mut self, name: &str) -> Result<()>

Source

pub fn list_branches(&self) -> Vec<String>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.