Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:AIScientists Dev WorldSeed Git Backed Workspace

From Leeroopedia
Knowledge Sources
Domains Version_Control, Research_Automation
Last Updated 2026-10-26 18:00 GMT

Overview

A git-initialized workspace structure that seeds a baseline training script, locks evaluation and dependency files, and provides a shared branch-based experiment history where each agent experiment forks from baseline — making `git log baseline..experiment/...` show exactly what each agent changed.

Description

The autoresearch workspace is a git repository that serves as the shared substrate for the AI research community. `bootstrap_workspace()` creates the directory tree, copies the baseline template (`train_gpt.py`, `evaluate.py`, `pyproject.toml`), initializes git with a `baseline` branch, and creates a `papers/` directory.

Key design principles:

  • Baseline branch: Always points at the seeded template. Each experiment creates a new branch forked from `baseline`, so diffs show exactly what the agent changed.
  • Locked files: `evaluate.py` and `pyproject.toml` are locked — agents cannot change the evaluation harness or dependencies. This ensures reproducibility.
  • TinyStories data is external: Training data (`train.bin`, `val.bin`) lives on the EC2 training host, not in the workspace.
  • Idempotent bootstrap: If the workspace already has a `.git` and `baseline` branch, the function is a no-op (unless `force_reset=True`).

The `main_worktree` is the shared working directory where git operations happen. A git lock serializes branch creation/commit operations across parallel experiments.

Usage

Use this principle to set up the research workspace before the autoresearch community begins. Called once at scene initialization via `bootstrap_workspace()`.

Theoretical Basis

The workspace follows a shared-baseline-fork pattern:

# Abstract pattern (NOT real implementation)
def bootstrap_workspace(force_reset=False):
    root = workspace_root()
    if force_reset and root.exists():
        shutil.rmtree(root)
    main = root / "main"
    main.mkdir(parents=True)
    copy_template_files(main)
    (main / "papers").mkdir()
    if not (main / ".git").exists():
        git(main, "init", "-b", "baseline")
        git(main, "add", ".")
        git(main, "commit", "-m", "baseline: seed from template")
    return root

Each experiment: `git checkout -b experiment/{agent}/{exp_id} baseline`, write new `train_gpt.py`, commit. The worker does this under a git lock to prevent races.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment