MIT License

Copyright (c) 2026 Samir Baladi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---

## Scope of This License

The MIT License above applies to:

- All source code in this repository (Python 3.11+).
- All core implementation modules (`core/`, `invariants/`, `sandbox/`).
- All configuration files (`.gitlab-ci.yml`, `.pre-commit-config.yaml`,
  `.readthedocs.yaml`, `Makefile`, `pyproject.toml`, `setup.py`, `setup.cfg`).
- All experiment scripts and their outputs, where outputs are regenerable
  from fixed seeds.
- All infrastructure files (`.gitignore`, `.coveragerc`, `VERSION`).

## Separate Licensing for Manuscript and Documentation

The following are licensed under **Creative Commons Attribution 4.0
International (CC-BY-4.0)**, not MIT:

- `RESEARCH_PAPER/` — the research manuscript.
- `README.md` — repository documentation.
- `AUTHORS.md`, `CONTRIBUTING.md`, `CHANGELOG.md` — project documentation.
- `docs/invariants_spec.md` — the formal invariant specification.
- `docs/experiment_protocol.md` — the pilot protocol.
- `docs/decision_rules.md` — the transition criteria.

This distinction reflects standard practice:

- **Code** is licensed permissively (MIT) to allow reuse, modification,
  and redistribution.
- **Written research artifacts** (specification, protocol, manuscript) are
  licensed under CC-BY-4.0 to allow sharing and adaptation with attribution.

## Attribution

For code use:

```

Baladi, S. (2026). Autopoietic Code Rewriting inside Isolated Execution
Environments (Version 0.1.0-research-draft) [Computer software].

```

For manuscript or specification citation:

```

Baladi, S. (2026). Autopoietic Code Rewriting inside Isolated Execution
Environments: Stability Conditions, Structural Invariants, and Controlled
Runtime Transformation [Working manuscript, research-draft stage].

```

## Data Licensing (Future)

No empirical pilot data exists in this repository at the research-draft stage.
When pilot data is collected, it will be stored according to the experiment
protocol and will not include personal or sensitive information (all workloads
are synthetic functions). Any future data sharing will follow:

- Explicit protocol documentation.
- Fixed random seeds for reproducibility.
- A separate data description if the scope expands.

## No Warranty on Research Claims

Nothing in this license constitutes a warranty about the scientific
validity, generalizability, or completeness of the model or experimental
protocol. This project is an initial research manuscript at
v0.1.0-research-draft. No pilot has been executed. No empirical validation
has been conducted. Users of the code should not represent the architecture
as empirically validated.

---

**Version:** 0.1.0-research-draft
**Date:** 2026-10-31
**Copyright:** 2026 Samir Baladi
