iterate.com / kernel

git clone https://git.iterate.com/repos/kernel

A new mind's config is cloned from the template

Every repo of a new mind was cloned from the repo of its own name at
the source mind. That mind's config is private, and its own: a new mind
could not clone it, and should not start as it. A new mind's
/repos/config is now cloned from /repos/config-template there, the
config that every mind starts with.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

Misha Kaletsky, 2026-11-24 23:21 UTC · 29b5a9266f880701dd11d6b90532492557829af4 · parent 8ad1447

2 files changed

M core/lib/src/cli/deploy.test.ts
@@ -148,11 +148,16 @@
   expect(() => deployConfigOf({ ...answers, owner: undefined })).toThrow(/is an email address/);
 });
 
-test("a new mind's repos are cloned from the address that --repos-from names, or start empty with none; anything else is refused", () => {
+test("a new mind's repos are cloned from the address that --repos-from names, its config from the template there, or start empty with none; anything else is refused", () => {
   const reposOf = (reposFrom: string) => deployConfigOf({ ...answers, reposFrom }).repos;
   expect(reposOf("https://git.ada-labs.com/repos/")).toContainEqual({
     path: "/repos/stdlib",
     origin: "https://git.ada-labs.com/repos/stdlib",
+  });
+  // a mind's config is its own: the new one starts as the template, never as that mind's config
+  expect(reposOf("https://git.ada-labs.com/repos/")).toContainEqual({
+    path: "/repos/config",
+    origin: "https://git.ada-labs.com/repos/config-template",
   });
   // the mind that hosts the source has nowhere to clone from: its repos get their code by pushes
   expect(reposOf("none")).toContainEqual({ path: "/repos/stdlib", origin: null });
M core/lib/src/cli/deploy.ts
@@ -155,18 +155,24 @@
 const SOURCE_OF_REPOS = "https://git.mindlew.com/repos";
 
 /** THE REPOS A NEW MIND IS BORN WITH: the wiring that is the mind's code (`config`), the code it
- *  imports (`stdlib` and the apps), and `kernel` and `home` to read. Each is cloned from
- *  `reposFrom`, the address under which a mind serves its repos. `none` gives each no origin:
- *  the mind starts with empty repos, which get their code by pushes. That is how the mind that
- *  hosts iterate's own source began, since it had nowhere to clone from. */
+ *  imports (`stdlib` and the apps), and `kernel` and `home` to read. Each is cloned from the repo
+ *  of its own name under `reposFrom`, the address under which a mind serves its repos. But
+ *  `config` is cloned from `config-template`: a mind's config is its own and private, so the mind
+ *  that hosts the source serves beside its own the one that every mind starts with.
+ *
+ *  `none` gives each repo no origin: the mind starts with empty repos, which get their code by
+ *  pushes. That is how the mind that hosts iterate's own source began, since it had nowhere to
+ *  clone from. */
 function startingRepos(reposFrom: string) {
   if (reposFrom !== "none" && !z.url().safeParse(reposFrom).success)
     throw new Error(
       `--repos-from ${reposFrom} is no address: give the one under which a mind serves its repos (https://git.<its domain>/repos), or none.`,
     );
+  const source = reposFrom.replace(/\/$/, "");
   return ["home", "kernel", "stdlib", "dash", "tasks", "git", "config"].map((name) => ({
     path: `/repos/${name}`,
-    origin: reposFrom === "none" ? null : `${reposFrom.replace(/\/$/, "")}/${name}`,
+    origin:
+      reposFrom === "none" ? null : `${source}/${name === "config" ? "config-template" : name}`,
   }));
 }
 const STARTING_ENTRY = { repo: "/repos/config", module: "worker.ts" };