Skip to content

workspace

workspace

Workspace and environment configuration models.

Defines models for isolation, workspace lifecycle, cross-sheet context, logging, AI review, and feedback.

Classes

IsolationMode

Bases: str, Enum

Isolation method for parallel job execution.

IsolationConfig

Bases: BaseModel

Configuration for execution isolation.

Worktree isolation creates a separate git working directory for each job, enabling safe parallel execution where multiple jobs can modify code without interfering with each other.

Example YAML

isolation: enabled: true mode: worktree branch_prefix: marianne cleanup_on_success: true

Functions
get_worktree_base
get_worktree_base(workspace)

Get the directory where worktrees are created.

Source code in src/marianne/core/config/workspace.py
def get_worktree_base(self, workspace: Path) -> Path:
    """Get the directory where worktrees are created."""
    if self.worktree_base:
        return self.worktree_base
    return workspace / ".worktrees"
get_branch_name
get_branch_name(job_id)

Generate branch name for a job.

Source code in src/marianne/core/config/workspace.py
def get_branch_name(self, job_id: str) -> str:
    """Generate branch name for a job."""
    return f"{self.branch_prefix}/{job_id}"

WorkspaceLifecycleConfig

Bases: BaseModel

Configuration for workspace lifecycle management.

Controls how workspace files are handled across job iterations, particularly for self-chaining jobs that reuse the same workspace.

When archive_on_fresh is True and --fresh is used, Marianne moves non-essential workspace files to a numbered archive subdirectory before clearing state. This prevents stale file_exists and command_succeeds validations from passing on previous iteration's artifacts.

Example YAML

workspace_lifecycle: archive_on_fresh: true archive_dir: archive max_archives: 10 preserve_patterns: - ".iteration" - ".marianne-" - ".coverage" - "archive/" - ".worktrees/*"

LogConfig

Bases: BaseModel

Configuration for structured logging.

Controls log level, output format, and file rotation settings.

AIReviewConfig

Bases: BaseModel

Configuration for AI-powered code review after batch execution.

Enables automated quality assessment of code changes with scoring.

CrossSheetConfig

Bases: BaseModel

Configuration for cross-sheet context passing.

Enables templates to access outputs from previous sheets, allowing later sheets to build on results from earlier ones without manual file reading. This is useful for multi-phase workflows where each sheet needs context from prior execution.

FeedbackConfig

Bases: BaseModel

Configuration for developer feedback collection (GH#15).

When enabled, Marianne extracts structured feedback from agent output after each sheet execution. Feedback is stored in SheetState.agent_feedback.

Example YAML

feedback: enabled: true pattern: '(?s)FEEDBACK_START(.+?)FEEDBACK_END' format: json