> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gulp.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Folder Structure

> Required repository structure for Osmosis Git Sync

# Required Folder Structure

Your repository must follow this structure for Osmosis to automatically discover your components:

An example repository can be found here: [https://github.com/Osmosis-AI/osmosis-git-sync-example](https://github.com/Osmosis-AI/osmosis-git-sync-example)

```mermaid theme={null}
graph TD
    A[your-repo/]
    A --> B[mcp/]
    B --> B1[main.py<br/>FastMCP server entry point]
    B --> B2[server/]
    B2 --> B2a[__init__.py]
    B2 --> B2b[mcp_server.py<br/>FastMCP server definition]
    B --> B3[tools/]
    B3 --> B3a[__init__.py]
    B3 --> B3b[math.py<br/>Example tool module]
    B3 --> B3c[...]
    A --> C[reward_fn/]
    C --> C1[compute_reward.py<br/>@osmosis_reward functions]
    A --> D[reward_rubric/]
    D --> D1[reward_rubric_openai.py<br/>@osmosis_rubric functions]
    D --> D2[reward_rubric_anthropic.py]
    D --> D3[...]
    A --> E[pyproject.toml<br/>Python dependencies]
```

## Directory Breakdown

### `mcp/` - MCP Tools Directory

Contains your Model Context Protocol tools that extend AI agent capabilities.

**Key files:**

* `main.py` - Entry point for the FastMCP server
* `server/mcp_server.py` - FastMCP server configuration
* `tools/` - Directory containing individual tool modules

### `reward_fn/` - Reward Functions Directory

Contains deterministic reward functions decorated with `@osmosis_reward`.

**Example:**

* `compute_reward.py` - Your reward function implementations

### `reward_rubric/` - Reward Rubrics Directory

Contains LLM-based evaluation functions decorated with `@osmosis_rubric`.

**Example:**

* `reward_rubric_openai.py` - Rubric using OpenAI models
* `reward_rubric_anthropic.py` - Rubric using Anthropic models

### `pyproject.toml` - Dependencies

Defines your Python package dependencies:

```toml theme={null}
[project]
name = "my-osmosis-repo"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
    "osmosis-ai>=0.1.0",
    "fastmcp>=0.1.0",
]

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
```

## What Gets Synced?

When you push changes to your repository, Osmosis automatically:

1. **Discovers MCP Tools** - Functions with `@mcp.tool()` in `mcp/tools/`
2. **Registers Reward Functions** - Functions with `@osmosis_reward` in `reward_fn/`
3. **Syncs Reward Rubrics** - Functions with `@osmosis_rubric` in `reward_rubric/`
4. **Updates Platform** - Changes reflect in Osmosis within minutes

## Optional Directories

You can also include:

* `tests/` - Unit tests for your components
* `.github/workflows/` - CI/CD automation
* `docs/` - Additional documentation

## Next Steps

<CardGroup cols={3}>
  <Card title="MCP Tools" icon="wrench" href="/git-sync/mcp-tools">
    Learn to create MCP tools
  </Card>

  <Card title="Reward Functions" icon="trophy" href="/git-sync/reward-functions">
    Build reward functions
  </Card>

  <Card title="Reward Rubrics" icon="list-check" href="/git-sync/reward-rubrics">
    Implement rubric scoring
  </Card>
</CardGroup>
