# Structure

This document is the canonical map of how MixerSystem is organized in code.

## Package Layout

The source package lives at:

- `mixersystem/workflows/`: workflow implementations and feature agents
- `mixersystem/data/`: shared runtime/data layer (`repository.py`, `agent_sdk.py`)
- `mixersystem/SKILL.md`: canonical skill source
- `mixersystem/sync.py`: sync entrypoint

`sync` generates runtime outputs in a target project:

- `.mixer/settings.json`
- `.mixer/README.md`
- `.claude/skills/mixer/SKILL.md`

Inside `mixersystem/workflows/`:

- feature folders: `task/`, `plan/`, `module/`
- `refs/`: reference templates
- `_shared/`: shared workflow-level helpers

## Workflow-Based Organization

MixerSystem is organized by workflow feature, not by global agent pool.

Each feature folder contains:

- orchestrator files (control flow)
- an `agents/` folder (LLM workers)

## Two Execution Layers

1. Workflows (orchestrators)
- Coordinate steps, loops, retries, and branching.
- Pass named parameters between workflow/agent calls.

2. Agents (LLM workers)
- One file, one job.
- Own prompt text, context usage, provider/model choice, and `call_agent()` execution.

## Runtime Shape

- Every run is anchored to one `work_folder`.
- Primary artifacts per run:
  - `task.md` from task workflow
  - `plan.md` from plan workflow
  - `module.md` from module workflow
