## Decision

A project holds several **named program files**. One program is active at a time and is what Run/Upload targets. Simulation environments are permanently removed and are not part of this issue.

## Acceptance

- [ ] Model programs as named entries in the project document, with one active per project/session.
- [ ] Migrate every existing project to a single program using its current source; existing projects open unchanged.
- [ ] Update the project document, D1 schema, API, MCP tools, backup format and editor UI together.
- [ ] Add create, rename, delete and select program UI. Permissions follow the project role.
- [x] Decision: version history is **project-wide**, not per-program.
- [ ] Coordinate with #117 (native versioning and snapshots); version history is project-wide across all named programs.
- [ ] Tests cover migration, collaboration, MCP editing of a non-active program, and selecting/running each program.


<sub>Generated on _MrBeast_ using _opencode/deepseek-v4.1-flash_ in _ses_e8326e581ffeJviTmSkomwnKES_</sub>


