--- pretty_name: RepoFactory-200 language: - en size_categories: - n<1K task_categories: - text-generation tags: - sft-environment - pre-evolution - harbor - code - software-engineering - repository-generation - long-horizon - python - docker viewer: false --- # RepoFactory **200 verifiable environments for full-repository generation.** RepoFactory constructs training environments for long-horizon coding agents from real-world software projects. Each task asks an agent to reconstruct a complete, working repository from a natural language specification and API guide. The agent works in a fresh workspace with dependencies installed, and its implementation is evaluated through executable tests. This release provides **200 environments before applying RepoFactory's Environment Evolution Loop**, together with their corresponding Docker images. The broader RepoFactory collection described in the paper contains 10,159 environments. The released tasks primarily cover Python projects and can be used to collect coding trajectories, train agents with executable feedback, and study repository reconstruction. The environments use the [Harbor task format](https://github.com/harbor-framework/harbor). Each package includes the task specification, runtime configuration, oracle implementation, and verifier. Oracle implementations and reference tests are included for reproduction and validation and must remain separate from the solving agent's workspace. ## Release contents | Item | Contents | | --- | --- | | Environments | 200 | | Task packages | `instances//instance.tar.gz` | | Runtime images | `images/.tar` | | Image tags | `repofactory/task:` | | Agent workspace | `/workspace` | Each instance can be downloaded and used independently. Start with one task before downloading the complete image collection. Additional disk space is needed for extracted task files, imported Docker layers, and trial workspaces. ```text . ├── README.md ├── assets/ │ └── ledgerlens_example.png ├── instances/ │ ├── 000001/ │ │ └── instance.tar.gz │ ├── 000002/ │ │ └── instance.tar.gz │ └── ... └── images/ ├── 000001.tar ├── 000002.tar └── ... ``` The files under `images/` are Docker image archives exported for `docker load`. ## Quickstart The example below runs instance `000001` locally. It requires Docker with Linux/amd64 container support and a Python environment compatible with Harbor. See the [Harbor installation guide](https://docs.harborframework.com/getting-started/installation) for host requirements. ### 1. Install the tools ```bash python -m pip install --upgrade huggingface_hub harbor ``` ### 2. Download one instance and its image Download an instance and its image from [IQuestLab/RepoFactory](https://huggingface.co/IQuestLab/RepoFactory). ```bash export HF_DATASET_REPO="IQuestLab/RepoFactory" hf download "$HF_DATASET_REPO" \ instances/000001/instance.tar.gz \ images/000001.tar \ --repo-type dataset \ --local-dir ./repofactory cd repofactory ``` The [Hugging Face download CLI](https://huggingface.co/docs/huggingface_hub/guides/cli#hf-download) supports downloading individual files without fetching the complete release. ### 3. Extract the task and load the image ```bash mkdir -p tasks tar -xzf instances/000001/instance.tar.gz -C tasks docker load --input images/000001.tar docker image inspect repofactory/task:000001 ``` The extracted task is located at `tasks/000001/`. Its `task.toml` refers to the image loaded above. Harbor can use this prebuilt image directly. Rebuilding `environment/Dockerfile` instead requires its separately referenced `repofactory/base:000001` image. ### 4. Check the oracle and initial workspace ```bash harbor run --path tasks/000001 --agent oracle --env docker harbor run --path tasks/000001 --agent nop --env docker ``` The oracle agent copies the reference implementation into the workspace. The `nop` agent leaves the initial workspace unchanged. The intended validity criterion is full reward for the oracle and zero reward for the unchanged workspace; inspect both trial results and verifier logs when validating a local setup. ### 5. Run a coding agent For example, run an agent through the Claude Code harness: ```bash harbor run \ --path tasks/000001 \ --agent claude-code \ --model "YOUR_MODEL_ID" \ --env docker ``` Replace `YOUR_MODEL_ID` and configure credentials for the selected agent and model provider. Agent selection, model configuration, and parallel execution are described in the [Harbor CLI documentation](https://github.com/harbor-framework/docs/blob/main/cli/run.mdx). ## Instance format Every task archive expands into a directory named after its six-digit instance ID: ```text 000001/ ├── task.toml ├── instruction.md ├── start.sh ├── environment/ │ ├── Dockerfile │ └── start.md ├── solution/ │ ├── solve.sh │ └── oracle/ └── tests/ ├── test.sh ├── config.json └── reference/ ``` | Path | Purpose | | --- | --- | | `task.toml` | Task metadata, timeouts, resource limits, and prebuilt image tag | | `instruction.md` | Agent-facing instructions for reconstructing the project | | `environment/start.md` | Functional specification, repository structure, public interfaces, and usage examples; copied to `/workspace/start.md` | | `environment/Dockerfile` | Runtime image recipe and initial workspace setup | | `start.sh` | Startup configuration, including restrictions on common code-hosting domains | | `solution/oracle/` | Reference implementation for oracle validation | | `solution/solve.sh` | Oracle entrypoint that copies the implementation to `/workspace` | | `tests/config.json` | Reference test paths, test commands, fixtures, package files, and configured test count | | `tests/test.sh` | Verifier entrypoint that restores evaluation resources and runs the configured tests | | `tests/reference/` | Reference tests and supporting evaluation files | Resource limits and timeouts are specified in each task's `task.toml`. For instance `000001`, the configuration allows 2 CPUs, 8 GiB of memory, and 20 GiB of storage, with timeouts of 60 minutes for the agent, 20 minutes for verification, and 30 minutes for environment construction.