Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ADR-26026: Dedicated Research Monorepo for Volatile Experimental Projects


title: Dedicated Research Monorepo for Volatile Experimental Projects date: 2026-02-15 tags:


ADR-26026: Dedicated Research Monorepo for Volatile Experimental Projects

Date

2026-02-15

Status

accepted

Context

The repository contains volatile research subprojects under misc/research/ (e.g., ai_code_generation_engineer, slm_from_scratch). These projects exhibit characteristics fundamentally incompatible with the stable architecture documentation system:

The current co-location pattern violates SVA principle C2 (separation of concerns between stable architecture and experimental work) and creates maintenance friction during routine operations like dependency updates or security scans.

Decision

Move all volatile research subprojects to a dedicated research monorepo with the following characteristics:

  1. Single research repository: All experimental projects reside under one repository (github.com/main/research) rather than fragmented per-project repos.

  2. Per-project dependency isolation: Each research subproject maintains its own pyproject.toml and .venv directory. Projects are not declared as uv workspace members to prevent transitive dependency resolution—each project is treated as an independent environment:

     # Initialize isolated project
     cd research/slm-from-scratch
     uv init --name slm-from-scratch    # Creates pyproject.toml with project metadata
    
     # Add dependencies (uv auto-creates .venv if missing)
     uv add torch transformers datasets  # Installs into ./slm-from-scratch/.venv
    
     # Verify isolation
     uv pip list --env  # Shows only this project's deps in its local .venv
  3. Knowledge distillation pattern: The main architecture repo retains only distilled insights in different sections of the documentation with cross-references to specific research projects. Raw experimental code never resides in the architecture repo.

  4. Migration protocol:

    • Research code moved via git filter-repo to preserve commit history

    • Original directories replaced with MOVED_TO_RESEARCH.md stubs containing repo URLs and key findings

Consequences

Positive

Negative / Risks

Alternatives

  1. Keep research subprojects in main repository with nested .venv directories. Rejection Reason: Nested environments create false sense of isolation; tooling operations at repo root still traverse entire directory tree unless explicitly excluded, violating principle of least surprise.

  2. Create separate repository per research project (e.g., slm-from-scratch, ai-code-generation-engineer as independent repos). Rejection Reason: This may create “zombie repo” maintenance burden. A unified research monorepo reduces governance surface area while still enabling per-project isolation through directory-level boundaries. Micro-repos also fragment discovery—researchers cannot easily browse related experiments across repositories without manual navigation.

  3. Hybrid approach: Maintain research code in main repo but exclude from RAG indexing via .ragignore. Rejection Reason: While this solves RAG contamination, it fails to address dependency pollution and lifecycle mismatch. Tooling operations (e.g., uv pip list --all) still traverse research directories, and contributors remain exposed to volatile code during routine navigation. Exclusion mechanisms create hidden state that new contributors cannot discover without reading obscure configuration files, increasing onboarding friction.

References

Participants

  1. Vadim Rudakov

  2. Qwen3-Max