Ownership and upgrades
Every generated file has a recorded owner. The framework changes the files it manages when you upgrade, and leaves the rest, including your dependencies, alone.
Three kinds of file
| Kind | Who changes it | Examples |
|---|---|---|
| Managed | The framework, through an upgrade. Do not edit these by hand. | The two workflows, sst.config.ts, infra/product.ts. |
| Seeded | You. The file is a generated starting point. | api/health.ts, data/records.ts, contracts/index.ts, pnpm-workspace.yaml. |
| Yours | You. The file is not in the record at all. | Anything you add. |
The record is .ebk/ownership.json, one at the workspace root and one in each generated package. pnpm nx run <workspace>:workspace-health checks the record, and runs as part of pnpm verify.
package.json is mostly yours
In a package.json, ownership stops at individual keys. The framework manages only the ones it needs to keep the workspace coherent.
| File | Managed keys |
|---|---|
Slice package.json | name, version, private, type, the @empire-builder-kit/runtime dependency and the ./contracts export. |
Root package.json | engines.node, engines.pnpm, packageManager, the @empire-builder-kit/runtime dependency and the @empire-builder-kit/nx dev dependency. |
Every other key is yours: next, react, react-dom, vitest, the AWS SDK clients, your own dependencies and your scripts. When a library publishes a security fix, update it the way you would in any repository. You do not need a framework release, and workspace-health stays green.
An upgrade changes only what the framework owns.
Choose Detail to inspect the labels. Download the SVG to keep or share this diagram.
Managed files are regenerated. Seeded files and your own files are kept. In package.json, ownership stops at the listed keys.
What an upgrade does
The upgrade generator brings one project to the framework version you installed. Run without --apply, it reports the plan and writes nothing. Run with --apply, it regenerates the managed files and updates the managed keys. Seeded files, your own files and unmanaged keys are kept.
See Upgrade the framework for the steps.
Continue building