kernel / core / AGENTS.mdmain at 949894f
# core What goes public as `iterate/core`: a mind's stack. - A mind is a stack of Workers, each in a folder named `<part>-worker`: `mind-worker/` (it hosts the mind's contexts), `boundary-worker/`, `secrets-worker/`, `auth-worker/` and `telemetry-worker/`. The boundary is one build for every topology: a mind that runs elsewhere hands itself in at the API's address (`boundary-worker/src/provided-mind.ts`). - `itx/` is the kernel library they share, and `alchemy/` deploys a stack. - `home-lab/` runs the mind Worker on your own machine. - `lib/` is npm `iterate`: the SDK, the agents app (`iterate/agents`) and the `iterate` CLI. - No code of a mind is here. A mind's code lives in its own repos, which sit side by side under `/repos`. The deploy's config lists the repos a mind is born with and names the module that is its code (`repos` and `entry`, [alchemy/src/config.ts](alchemy/src/config.ts)); the mind makes or clones each one at its first wake, and publishes them as one tree ([mind-worker/src/mind/tree.ts](mind-worker/src/mind/tree.ts)). - **Core builds from a clone of itself.** Nothing in `core/` imports outside `core/`; outside code may import core, never the reverse. `.oxlintrc.json` enforces it (`lint/oxlintrc-core-boundary.test.ts`). - **Internal tooling stays outside:** iterate's own deploys, tasks and CI. - **No ids or keys**, here or in `packages/`, tests included: no UUID, account id, key, or long hex, base64 or digit string (`lint/public-copies.test.ts`). An id goes in `envs.ts`, a secret in Doppler; a test uses an obvious fake (`aaaaabbbbbccccc111112222233333aaaaabbbbb`).