Skip to content

Commit 38a467f

Browse files
committed
docs(create-objectstack): the starter's AGENTS.md and README say a Studio change stays in its database and name os package export (WIP)
Claude-Session: https://claude.ai/code/session_01Utp6CbrroXG7sXSzmQs4uj Co-authored-by: Claude <noreply@anthropic.com>
1 parent 959c26b commit 38a467f

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

‎packages/create-objectstack/src/templates/AGENTS.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,30 @@ under `src/` is never loaded, and `{{PM}} run validate` neither counts nor check
8080
what it holds, until its `index.ts` barrel is imported in `objectstack.config.ts`
8181
and handed to its stack key there.
8282

83+
## Change the app in `src/` — a Studio change stays in its database
84+
85+
`src/` is what ships: `{{PM}} run build` and the `Dockerfile` compile it, and
86+
nothing else, into `dist/objectstack.json`. Studio, in the Console that
87+
`{{PM}} run dev` serves, never writes `src/`. A change saved there to an item
88+
this app ships (a view, a dashboard, a report) is an item of the package
89+
`<this app's package id>.custom`, stored in that environment's database —
90+
locally, `.objectstack/data/`. It is not in the build and does not reach a
91+
deployment.
92+
93+
- **Make every change to the app in `src/`**, never through Studio or the
94+
metadata API of a running server: `src/` is what is validated, reviewed and
95+
deployed. When a person tried something in Studio and wants it in the app,
96+
make the same change in `src/`.
97+
- **A customization that should stay one moves as a package.** With the dev
98+
server running, `npx os package export` writes every package the database
99+
holds that `src/` does not register, the `.custom` package among them, to
100+
`objectstack-export/NN-ID/objectstack.json`. Commit that directory. After
101+
the deployment is up, install each file into it, in the numbered order:
102+
`npx os package install objectstack-export/NN-ID/objectstack.json --runtime URL`.
103+
104+
`{{PM}} run build` prints a notice when the local dev database holds such a
105+
customization.
106+
83107
## AI Skills
84108

85109
This project uses the ObjectStack skills catalog from the `@objectstack/skills`

‎packages/create-objectstack/src/templates/blank/README.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,26 @@ curl -fsS http://localhost:8080/api/v1/health
153153
Bare Node, Kubernetes, reverse-proxy wiring, and the required secrets are
154154
covered in [Self-Hosted Deployment](https://objectstack.ai/docs/deployment/self-hosting).
155155

156+
### A Studio change is not in the image
157+
158+
The image carries what `src/` builds into, and nothing else. A change you save
159+
in Studio, in the Console `pnpm dev` serves, is stored in that environment's
160+
database (locally, `.objectstack/data/`) as an item of the package
161+
`<this app's package id>.custom`. It is never written to `src/`, so
162+
`pnpm build`, the `Dockerfile` and `docker compose` leave it behind.
163+
164+
- To make it part of the app, make the same change in `src/`: that is what is
165+
validated, reviewed and deployed. Ask your coding agent to do it in code, not
166+
in Studio.
167+
- To keep it as a customization, take it out as a package while `pnpm dev`
168+
runs: `npx os package export` writes every package the database holds that
169+
`src/` does not register, the `.custom` package among them, to
170+
`objectstack-export/NN-ID/objectstack.json`. Commit that directory, and once
171+
the deployment is up install each file into it in the numbered order with
172+
`npx os package install objectstack-export/NN-ID/objectstack.json --runtime URL`.
173+
174+
`pnpm build` prints a notice when your local dev database holds such a change.
175+
156176
## Next steps
157177

158178
- Add an object: see the `objectstack-data` skill.

0 commit comments

Comments
 (0)