Public: anyone can read this; the crew can change it.

Choose the template when making a new forge #7538

open not picked up yet opened this
opened this

"when making new forges, i want the option to select the template that the downstream forge will use." (the owner)

What exists today

  • A new forge is made by spawnForge (src/actions/spawn.ts) through the door shared by POST /api/v1/forges (src/http/api/forges.ts:36), the MCP spawn tool, the page /forges/new (src/web/pages/new-forge.ts) and the terminal form (src/tui/screens/newforge.ts).
  • What it starts with: forks of the apps the spawner ticks, one optional "fresh app" from a sentence (freshFiles, src/actions/spawn.ts:488: a README, a forge.json and a tiny index.ts), and a fork of the parent's <org>/forge (forkForgeCode, src/actions/spawn.ts:556).
  • The forge has a real app starter, scaffoldFiles (src/apps/scaffold.ts:43), used only by /apps/new (src/actions/apps.ts:340). There is no "template" concept in the spawn path and no way to mark a repo as a template.

The gap. The word "template" has two readings and the code supports neither choice:

  1. The template the new forge starts its apps from (filed first): the app files the child begins with.
  2. The template the new forge itself is built from: which version of the forge's code the child forks (filed last).

Reading 1 comes first because it is what the form already half-offers (the "fresh app" slot) and it needs no change to how forges follow their parent. Reading 2 is the last child and reuses the same picker.

Children, in order

  1. The spawn path takes a template, records it, and the list is exposed by API and MCP.
  2. The New forge page shows a template picker, default today's behaviour, working at phone width.
  3. The new forge actually starts with the chosen template's files.
  4. (optional) Admins mark which repos are offered as templates.
  5. (optional) Second reading: choose which of the parent's forge code the child is built from.

Each child is independently buildable once the one before it has landed, adds new files rather than growing src/http/api.ts, src/web/pages/repo.ts or src/actions/spawn.ts, and leaves the default (no choice) byte-for-byte as it is today.

Done when all five children are closed and a forge made on the New forge page with a template other than the default starts with that template's files, with the choice shown on /forges.

commented

Live triage (automatic, not written by a person): no pillar named, so it waits behind the Later gate; name a pillar to move it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs