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

# EMEP Project Constitution: Scientific Rules

> The 20 non-negotiable scientific rules governing EMEP design, evaluation integrity, and reproducibility. Each rule includes a one-line rationale.

The Project Constitution defines the scientific and engineering constraints that govern EMEP. These rules are non-negotiable. Every design decision, experiment protocol, and implementation choice must satisfy them.

## The 20 Rules

| ID       | Rule                                                               | Rationale                                                        |
| -------- | ------------------------------------------------------------------ | ---------------------------------------------------------------- |
| CONST-01 | All merge operations are tensor-level, not architecture-level      | Guarantees mathematical correctness and reproducibility          |
| CONST-02 | Compatibility analysis precedes every merge                        | Prevents silent failures from mismatched shapes or tokenizers    |
| CONST-03 | Safetensors is the primary artifact format                         | Enables memory-mapped loading, fast I/O, and security scanning   |
| CONST-04 | Every artifact is signed with ed25519                              | Establishes non-repudiable provenance for supply chain integrity |
| CONST-05 | The Hidden Test Set is never used by EvolutionEngine               | Prevents overfitting the evolutionary search to test data        |
| CONST-06 | Benchmark splits are immutable after experiment creation           | Ensures reproducibility and prevents data leakage                |
| CONST-07 | Evaluation results are tagged with evidence levels                 | Distinguishes established research from experimental hypotheses  |
| CONST-08 | Multi-objective optimization uses Pareto dominance                 | Captures trade-offs between accuracy, size, latency, and safety  |
| CONST-09 | Population diversity is enforced at every generation               | Prevents premature convergence in evolutionary search            |
| CONST-10 | Candidate models pass regression tests before promotion            | Guarantees that merged models do not degrade base capabilities   |
| CONST-11 | Experiment state transitions are append-only logs                  | Provides complete audit trails for every experiment              |
| CONST-12 | Model lineage is tracked from import through deployment            | Enables rollback, attribution, and compliance reporting          |
| CONST-13 | Enterprise mode operates without external network access           | Satisfies air-gapped deployment requirements                     |
| CONST-14 | Semantic versioning applies to all Enterprise Models               | Communicates breaking changes and compatibility guarantees       |
| CONST-15 | Documentation precedes implementation for every component          | Enforces design clarity and reduces technical debt               |
| CONST-16 | All algorithms are specified with Mermaid flowcharts before coding | Ensures shared understanding between research and engineering    |
| CONST-17 | Python 3.11 is the reference runtime                               | Standardizes the development environment and dependency graph    |
| CONST-18 | PyTorch is the reference tensor engine                             | Provides the de facto standard for open-weight model operations  |
| CONST-19 | GPU orchestration is explicit, not implicit                        | Prevents resource contention and enables cost accounting         |
| CONST-20 | Failure modes are documented before mitigation code                | Ensures that safeguards address real, identified risks           |

## Primary Research Loop

```mermaid theme={null}
flowchart TB
    subgraph Primary["PRIMARY LOOP"]
        direction TB
        A["DISCOVERED / IMPORTED"] --> B["VALIDATED"]
        B --> C["REGISTERED"]
        C --> D["Compatibility Analysis"]
        D --> E["Tensor Merge"]
        E --> F["CANDIDATE"]
        F --> G["EVALUATED"]
        G --> H{"Pass?"}
        H -->|Yes| I["PROMOTED"]
        H -->|No| J["Mutate / Crossover"]
        J --> E
        I --> K["RELEASED / DEPLOYED"]
    end

    subgraph Optional1["OPTIONAL: Fine-Tuning"]
        L["LoRA / QLoRA"] -.-> F
    end

    subgraph Optional2["OPTIONAL: RAG"]
        M["Retrieval Index"] -.-> K
    end

    style Primary stroke:#000,stroke-width:3px
    style A fill:#e3f2fd
    style K fill:#e8f5e9
    style Optional1 stroke-dasharray: 5 5
    style Optional2 stroke-dasharray: 5 5
```

The primary loop (bold outline) is mandatory. Fine-tuning and RAG (dotted lines) are optional downstream additions.

## Evidence Tags

Every claim in this constitution is tagged:

* **Established research**: Supported by peer-reviewed literature
* **Engineering assumption**: Pragmatic choice without formal proof
* **Research hypothesis**: Predicted but not yet validated
* **Future goal**: Target state, not yet implemented

## Next Steps

See the [Glossary](/overview/glossary) for definitions of all terms used above, or [Decisions](/overview/decisions) for the architectural decision records that operationalize these rules.
