Now I have a complete picture of the codebase. Here is my comprehensive report:
Codebase Exploration Report: Villa (Vesuvius Challenge)
1. General Structure
This is a multi-language monorepo for the Vesuvius Challenge project - a machine learning and computer vision competition to read the Herculaneum scrolls.
Top-level directories and their contents:
| Directory | Description | Primary Language |
|---|
vesuvius/ | Python library for accessing CT scans of ancient scrolls | Python |
vesuvius-c/ | Single-header C library for CT scan access | C |
volume-cartographer/ | Semi-automatic segmentation pipeline (VC3D) | C++ |
sam2-photogrammetry/ | SAM2-based photogrammetry tools with React frontend | Python + TypeScript/React |
thaumato-anakalyptor/ | Semi-automatic segmentation pipeline | Python + C++ |
ink-detection/ | ML model for ink detection (2023 Grand Prize winner) | Python |
segmentation/ | Segmentation models (nnUNet, batchgenerators) | Python |
foundation/ | Scroll dataset tools and cloud infrastructure | Python |
scrollprize.org/ | Vesuvius Challenge website | TypeScript/Docusaurus |
crackle-viewer/ | GUI tool for ink labeling on scroll segments | Python |
discord_chatbot/ | Discord RAG chatbot | Python |
scripts/ | Utility scripts | Python |
.github/ | GitHub workflows and CODEOWNERS | YAML |
2. Build/Test Configuration Files
Python Projects
| File Path | Project | Purpose |
|---|
/vesuvius/pyproject.toml | vesuvius | Main Python package config (setuptools, uv) |
/vesuvius/pytest.ini | vesuvius | Pytest configuration |
/vesuvius/uv.lock | vesuvius | UV lock file |
/sam2-photogrammetry/pyproject.toml | sam2-photogrammetry | Build config |
/sam2-photogrammetry/setup.py | sam2-photogrammetry | Legacy setup |
/foundation/scrollcase/pyproject.toml | scrollcase | Python package config |
/segmentation/models/arch/nnunet/pyproject.toml | nnUNet | nnU-Net v2 fork |
/segmentation/models/batchgeneratorsv2/pyproject.toml | batchgeneratorsv2 | Batch generators |
requirements.txt files
/sam2-photogrammetry/sav_dataset/requirements.txt
/discord_chatbot/requirements.txt
/crackle-viewer/requirements.txt
/ink-detection/requirements.txt
/ink-detection/optimized_inference/requirements.txt
/ink-detection/optimized_inference/requirements-cpu-only.txt
/foundation/volume-registration/requirements.txt
/foundation/shift-optimizer/requirements.txt
/foundation/scroll-builder/requirements.txt
/foundation/obj2nml/requirements.txt
/foundation/scrollcase/requirements.txt
TypeScript/React Projects
| File Path | Project | Purpose |
|---|
/sam2-photogrammetry/demo/frontend/package.json | SAM2 frontend | Vite + React + Relay |
/sam2-photogrammetry/demo/frontend/tsconfig.json | SAM2 frontend | TypeScript config |
/sam2-photogrammetry/demo/frontend/vite.config.ts | SAM2 frontend | Vite bundler config |
/sam2-photogrammetry/demo/frontend/yarn.lock | SAM2 frontend | Yarn lock file |
/scrollprize.org/package.json | scrollprize.org | Docusaurus website |
/scrollprize.org/yarn.lock | scrollprize.org | Yarn lock file |
/scrollprize.org/babel.config.js | scrollprize.org | Babel config |
/scrollprize.org/docusaurus.config.js | scrollprize.org | Docusaurus config |
C++ Projects
| File Path | Project | Purpose |
|---|
/vesuvius-c/CMakeLists.txt | vesuvius-c | CMake build |
/volume-cartographer/CMakeLists.txt | volume-cartographer | Main CMake |
/volume-cartographer/core/CMakeLists.txt | volume-cartographer | Core lib |
/volume-cartographer/apps/CMakeLists.txt | volume-cartographer | Apps |
/volume-cartographer/apps/VC3D/CMakeLists.txt | volume-cartographer | VC3D app |
/volume-cartographer/libs/*/CMakeLists.txt | volume-cartographer | Libraries |
/thaumato-anakalyptor/ThaumatoAnakalyptor/graph_problem/CMakeLists.txt | thaumato | Graph problem |
/thaumato-anakalyptor/ThaumatoAnakalyptor/sheet_generation/CMakeLists.txt | thaumato | Sheet generation |
Conda Environments
/thaumato-anakalyptor/environment_thaumato.yml
/segmentation/evaluation/environment.yml
/segmentation/vc_proofreader/environment.yml
/foundation/datasets/fibers-dataset/environment.yml
/foundation/datasets/register-meshes-to-fibers/environment.yml
/foundation/kaggle-visualizer/environment.yml
/thaumato-anakalyptor/ThaumatoAnakalyptor/mask3d/environment.yml
Docker
/ink-detection/Dockerfile
/ink-detection/optimized_inference/Dockerfile
/thaumato-anakalyptor/DockerfileThaumato
/sam2-photogrammetry/docker-compose.yaml
/sam2-photogrammetry/backend.Dockerfile
/volume-cartographer/ubuntu-24.04-noble.Dockerfile
3. AGENTS.md Status
YES, AGENTS.md exists at root level: /user_0a329be7/Downloads/villa-main/AGENTS.md
This is a 325-line comprehensive guide for AI coding agents covering:
- Repository structure
- Build, lint, and test commands for all languages
- Python code style (imports, type hints, naming, error handling, documentation, testing)
- TypeScript/React code style
- C++ code style (formatting, includes)
- General guidelines
4. Cursor/Copilot Rules
NO cursor/copilot rules found:
.cursor/rules/ - Does not exist
.cursorrules - Does not exist
.github/copilot-instructions.md - Does not exist
5. Documentation Files
Main documentation:
| File Path | Description |
|---|
/README.md | Main repository README |
/AGENTS.md | Guidelines for AI coding agents |
/LICENSE | MIT License |
/sam2-photogrammetry/README.md | SAM2 photogrammetry docs |
/sam2-photogrammetry/CONTRIBUTING.md | Contribution guide |
/sam2-photogrammetry/INSTALL.md | Installation instructions |
/sam2-photogrammetry/CODE_OF_CONDUCT.md | Code of conduct |
/volume-cartographer/README.md | Volume Cartographer docs |
/volume-cartographer/CONTRIBUTING.md | Contribution guide |
/vesuvius/README.md | Vesuvius library docs |
/vesuvius-c/README.md | C library docs |
/thaumato-anakalyptor/README.md | Thaumato docs |
/scrollprize.org/README.md | Website docs |
/ink-detection/readme.md | Ink detection docs |
/discord_chatbot/README.md | Discord bot docs |
/crackle-viewer/README.md | Crackle viewer docs |
Additional project-specific READMEs:
/segmentation/models/arch/nnunet/README.md
/thaumato-anakalyptor/ThaumatoAnakalyptor/mask3d/README.md
/foundation/scrollcase/README.md
/foundation/volume-registration/README.md
- And many more sub-project READMEs
6. Linting/Formatting Configuration Files
Python
| File Path | Tool | Project |
|---|
/segmentation/models/arch/nnunet/pyproject.toml (contains [tool.codespell]) | codespell | nnUNet |
| Note: black and ruff mentioned in AGENTS.md for nnUNet | black, ruff | nnUNet |
TypeScript/React
| File Path | Tool | Project |
|---|
/sam2-photogrammetry/demo/frontend/.eslintrc.cjs | ESLint | SAM2 frontend |
/sam2-photogrammetry/demo/frontend/.eslintignore | ESLint | SAM2 frontend |
/sam2-photogrammetry/demo/frontend/.prettierrc.json | Prettier | SAM2 frontend |
/sam2-photogrammetry/demo/frontend/.prettierignore | Prettier | SAM2 frontend |
/sam2-photogrammetry/demo/frontend/tailwind.config.js | Tailwind | SAM2 frontend |
/sam2-photogrammetry/demo/frontend/postcss.config.js | PostCSS | SAM2 frontend |
/scrollprize.org/tailwind.config.js | Tailwind | scrollprize.org |
Prettier config (sam2-photogrammetry):
- Single quotes
- Avoid arrow parens where possible
- No bracket spacing
- 2 spaces indentation
- Trailing commas
ESLint config (sam2-photogrammetry):
- TypeScript ESLint recommended
- React recommended
- React hooks rules
- Import resolver for TypeScript paths
C++
| File Path | Tool | Project |
|---|
/volume-cartographer/.clang-format | clang-format | volume-cartographer |
/volume-cartographer/.clang-tidy | clang-tidy | volume-cartographer |
/volume-cartographer/.clangd | clangd | volume-cartographer |
clang-format config:
- Based on Google style
- 140 character column limit
- Linux brace style
- 4 space indentation
- Pointer alignment: Left
clang-tidy config:
- Comprehensive check set with many exclusions
- Specific naming conventions (CamelCase classes, camelBack members, etc.)
7. GitHub Actions CI/CD
| Workflow File | Purpose |
|---|
.github/workflows/test-vesuvius.yml | Test vesuvius package |
.github/workflows/deploy-vesuvius.yml | Deploy vesuvius to PyPI |
.github/workflows/vc3d-ci.yml | Volume Cartographer CI |
.github/workflows/vc3d-codeql.yml | CodeQL security analysis |
.github/workflows/vc3d-publish-ghcr.yml | Publish to GitHub Container Registry |
.github/workflows/build-crackle-viewer.yml | Build crackle-viewer |
.github/workflows/deploy-scroll-renderer.yml | Deploy scroll renderer |
.github/workflows/large-pr-review-gate.yml | PR size gate |
.github/CODEOWNERS | Code owners mapping |
Summary
| Category | Status |
|---|
| AGENTS.md | ✅ Exists (comprehensive 325-line guide) |
| Cursor/Copilot rules | ❌ None found |
| Languages | Python, TypeScript/React, C++, C |
| Package Managers | pip/uv/yarn/npm/conda |
| Build Systems | setuptools, CMake, Vite, Docusaurus |
| Test Framework | pytest (Python) |
| Linter/Formatter | ESLint, Prettier, clang-format, clang-tidy, black, ruff |