From 7269e35d60f720e035847f88bd3d9a7ba7b33813 Mon Sep 17 00:00:00 2001 From: Volodymyr Vreshch Date: Sun, 22 Nov 2026 11:31:04 +0100 Subject: [PATCH 1/2] feat(create): default template source is agentage/kit:template Claude-Session: https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212 --- docs/extensions.md | 2 +- docs/reference.md | 2 +- src/commands/extension/create-install.test.ts | 4 ++-- src/commands/extension/create-kit.test.ts | 16 +++++++--------- src/commands/extension/create-safety.test.ts | 2 +- src/commands/extension/create-source.ts | 8 ++++++-- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/docs/extensions.md b/docs/extensions.md index 36d4a93..3684b76 100644 --- a/docs/extensions.md +++ b/docs/extensions.md @@ -306,7 +306,7 @@ parts, `create` sets `MIN_EXECUTED` to 1. `MIN_EXECUTED` is the least number of must run. After the first green run, set it to the real count. When `create` cannot find that line, it says so and you set it by hand. -The template is the folder `template/` of the kit repo (`agentage/platform:template`); only that +The template is the folder `template/` of the kit repo (`agentage/kit:template`); only that folder is copied, with no history. `--from ` takes another template repo at its root (`agentage/extension-template` is the old template), `--from ` one of its branches, and `:folder` after either one folder of it. For any source other than the kit's diff --git a/docs/reference.md b/docs/reference.md index 856ae61..3f62620 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -448,7 +448,7 @@ Makes `./extension-` from a template, with no git history (the author guide, | `--from` | Takes | | ----------------------------------------------- | ------------------------------------------------------------------------------------------ | -| not given | `agentage/platform:template`, the folder `template/` of the kit repo | +| not given | `agentage/kit:template`, the folder `template/` of the kit repo | | `owner/repo` | the root of that repo's default branch (`agentage/extension-template` is the old template) | | `owner/repo#branch` | the root of that branch | | `owner/repo:folder`, `owner/repo#branch:folder` | only that folder (dot files included); a missing folder or a link is refused | diff --git a/src/commands/extension/create-install.test.ts b/src/commands/extension/create-install.test.ts index 70ff5e6..4dca606 100644 --- a/src/commands/extension/create-install.test.ts +++ b/src/commands/extension/create-install.test.ts @@ -136,7 +136,7 @@ describe('extension create --from another repo or a branch', () => { const NOTICE = (from: string) => `template ${from}: code from that repo will be built and run on this machine`; - test.for(['agentage/platform:template', 'agentage/extension-template'])( + test.for(['agentage/kit:template', 'agentage/platform:template', 'agentage/extension-template'])( 'the template itself asks nothing: %s', async (from) => { const quiet = await output(() => trustFrom(from, {}, io(false).io)); @@ -144,7 +144,7 @@ describe('extension create --from another repo or a branch', () => { } ); - test.for(['acme/ext', 'agentage/extension-template#feature/x', 'agentage/platform:packages'])( + test.for(['acme/ext', 'agentage/extension-template#feature/x', 'agentage/kit:packages'])( '%s with no terminal needs --yes, --no-install or not', async (from) => { const refused = await output(() => trustFrom(from, {}, io(false).io)); diff --git a/src/commands/extension/create-kit.test.ts b/src/commands/extension/create-kit.test.ts index 901823c..57a4f1c 100644 --- a/src/commands/extension/create-kit.test.ts +++ b/src/commands/extension/create-kit.test.ts @@ -57,14 +57,12 @@ const listed = (dir: string): string[] => ); describe('extension create from the kit repo', () => { - test('the default is the folder template/ of agentage/platform', async () => { - expect(TEMPLATE).toBe('agentage/platform:template'); + test('the default is the folder template/ of agentage/kit', async () => { + expect(TEMPLATE).toBe('agentage/kit:template'); const printed = await create(); expect(printed).toMatchObject({ error: null, stderr: '' }); - expect(asked.at(-1)).toBe('agentage/platform'); - expect(printed.lines[0]).toBe( - ' template agentage/platform:template (default branch, kit 0.21.0)' - ); + expect(asked.at(-1)).toBe('agentage/kit'); + expect(printed.lines[0]).toBe(' template agentage/kit:template (default branch, kit 0.21.0)'); }); test('only template/ is copied, dot files and modes kept, no kit history', async () => { @@ -96,14 +94,14 @@ describe('extension create from the kit repo', () => { git(join(root, 'kit-work'), 'checkout', '-q', '-b', 'feature/t'); put(join(root, 'kit-work', 'other'), { ...TEMPLATE_FILES, 'branch.txt': 'b\n' }); pushKit(root, 'feature/t'); - const printed = await create('agentage/platform#feature/t:other'); + const printed = await create('agentage/kit#feature/t:other'); expect(printed.lines[0]).toMatch(/^ template {2}agentage\/platform:other \(branch feature\/t,/); expect(read('branch.txt')).toBe('b\n'); }); test.for([ - ['a missing folder', 'agentage/platform:nope'], - ['a link', 'agentage/platform:link'], + ['a missing folder', 'agentage/kit:nope'], + ['a link', 'agentage/kit:link'], ])('refuses %s with one line, no folder and no clone left', async ([, from]) => { symlinkSync('template', join(root, 'kit-work', 'link')); pushKit(root); diff --git a/src/commands/extension/create-safety.test.ts b/src/commands/extension/create-safety.test.ts index b9479c3..15b7746 100644 --- a/src/commands/extension/create-safety.test.ts +++ b/src/commands/extension/create-safety.test.ts @@ -52,7 +52,7 @@ describe('extension create keeps to its own folders', () => { }); test.for([ - ['in the folder', 'template/src', 'agentage/platform:template'], + ['in the folder', 'template/src', 'agentage/kit:template'], ['at the root', 'src', 'agentage/extension-template'], ])('refuses a template with a symbolic link %s, nothing left', async ([, at = '', from]) => { mkdirSync(join(root, 'kit-work', at), { recursive: true }); diff --git a/src/commands/extension/create-source.ts b/src/commands/extension/create-source.ts index 061aa56..af64efe 100644 --- a/src/commands/extension/create-source.ts +++ b/src/commands/extension/create-source.ts @@ -6,8 +6,12 @@ import { holdSignals } from '../../core/loader/dispose.js'; const run = promisify(execFile); // The kit repo holds the template in its folder template/; the old repo held it at its root. -export const TEMPLATE = 'agentage/platform:template'; -export const OWN_TEMPLATES = [TEMPLATE, 'agentage/extension-template']; +export const TEMPLATE = 'agentage/kit:template'; +export const OWN_TEMPLATES = [ + TEMPLATE, + 'agentage/platform:template', + 'agentage/extension-template', +]; // owner/repo, then #branch and :folder, each optional: nothing that can pass for a flag or leave the repo. const FROM = /^[\w.-]+\/[\w.-]+(?:#\w[\w./-]*)?(?::\w[\w.-]*(?:\/\w[\w.-]*)*)?$/; From 6cf6eb37527884fed27458cbf612cee0c31231a1 Mon Sep 17 00:00:00 2001 From: Volodymyr Vreshch Date: Sun, 22 Nov 2026 11:32:27 +0100 Subject: [PATCH 2/2] test(create): match the kit name in regexes Claude-Session: https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212 --- src/commands/extension/create-kit.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/extension/create-kit.test.ts b/src/commands/extension/create-kit.test.ts index 57a4f1c..bcd4514 100644 --- a/src/commands/extension/create-kit.test.ts +++ b/src/commands/extension/create-kit.test.ts @@ -95,7 +95,7 @@ describe('extension create from the kit repo', () => { put(join(root, 'kit-work', 'other'), { ...TEMPLATE_FILES, 'branch.txt': 'b\n' }); pushKit(root, 'feature/t'); const printed = await create('agentage/kit#feature/t:other'); - expect(printed.lines[0]).toMatch(/^ template {2}agentage\/platform:other \(branch feature\/t,/); + expect(printed.lines[0]).toMatch(/^ template {2}agentage\/kit:other \(branch feature\/t,/); expect(read('branch.txt')).toBe('b\n'); }); @@ -114,7 +114,7 @@ describe('extension create from the kit repo', () => { test('a clone that fails leaves no clone folder', async () => { const printed = await create(undefined, () => `file://${root}/none`); - expect(printed.error).toMatch(/^cannot clone template agentage\/platform:template: fatal/); + expect(printed.error).toMatch(/^cannot clone template agentage\/kit:template: fatal/); expect(existsSync(join(root, made))).toBe(false); expect(readdirSync(root).sort()).toEqual(['kit-work', 'kit.git']); });