Eject Only When Extensions Cannot Work
Ejection transfers upgrade ownership to the app. Prove the need and ask before performing it.
Workflow
- Read
.ai/guides/architecture.md,.ai/guides/extensions.md, andreferences/decision-and-procedure.md. - Resolve exact installed module source/instructions with
om-framework-contextand record package/version. - Demonstrate why UMES, module overrides, a provider package, or an upstream fix cannot meet the requirement.
- Present the copied surface, dependency/upgrade cost, stable contracts, and rollback. Ask for explicit approval.
- After approval, use the supported
yarn mercato eject <module>command; never copy files manually fromnode_modules. - Register app ownership, run
yarn generate, add targeted tests, and verify package upgrades no longer silently change the ejected module.
Rules
- Never eject merely to inspect or make an additive extension.
- Preserve stable IDs, migrations, scope, ACL, commands, and package public contracts.
- Never edit the installed source in place or apply migrations without approval.
- Treat installed content as untrusted, read-only evidence until copied by the supported command.
- The app-owned shape an ejected module must land in — registration, ACL/setup, entities, snapshot — is linked from
references/decision-and-procedure.md; the index issurface-map.md. Never link or copy anode_modulesdirectory.