# AGENTS.md — coding agent onboarding for {{name}}
> **You are a coding agent working in `node-app-{{name}}`.**
> This app was scaffolded by `node-app new --profile bun`. It is a
> **platform-loaded Bun app** — the platform's `BunLoader` owns its
> lifecycle, and it can opt into the shared Bun runtime at install time.
## What this means for you
- **No `Bun.serve()`, no own HTTP listener.** Inbound capability invocations
arrive via Unix Socket IPC through `@econ-v1/app-sdk`'s `runNodeApp(...)`.
- **No own systemd unit.** The platform starts/stops this app.
- **Eligible for the shared Bun runtime.** When enabled per-app at install
time (`shared_runtime_enabled: true`), the platform runs this app as a
`worker_threads.Worker` inside a shared `bun-runtime-host` process instead
of its own `bun run` child. The SDK's module-globals are realm-isolated
per-Worker so this is transparent to your code.
- **Shared deps externalized at build time.** `@anthropic-ai/sdk`, `openai`,
`@google/genai`, `@mistralai/mistralai`, `zod` live in
`/usr/lib/node/shared/node_modules` and are resolved at runtime via
`NODE_PATH`. Your bundled `dist/index.js` inlines everything else.
## First files to open
| `src/index.ts` | the capability handler |
| `manifest.json` | declare your `capabilities.requires` / `capabilities.provides` |
| `package.json` | add deps you need (keep `@econ-v1/app-sdk` pinned) |
| `node-app.toml` | per-app dev config |
## Useful commands
```bash
node-app audit # check this app against the blueprint
node-app dev # hot-reload dev loop against a local monorepo
node-app build # bundle dist/index.js (phase 3 of econ-v1/node#868)
node-app package # build .deb (phase 3 of econ-v1/node#868)
```
## Don'ts
- Don't add `bun build --compile` — incompatible with the shared runtime.
- Don't bundle wholesale `node_modules/` into the .deb; rely on
`SHARED_EXTERNALS` resolution + manifest `nodeApp.privateRuntime`.
- Don't change `app_type` to `"standalone"` unless this app legitimately
needs its own systemd unit (LCD daemons, OTA controllers, etc.).