Skip to content

feat(create): take the template from the kit repo's template/ folder - #458

Merged
vreshch merged 3 commits into
masterfrom
feature/k2-create-from-kit
Nov 22, 2026
Merged

vreshch merged 3 commits into
masterfrom
feature/k2-create-from-kit

Conversation

@vreshch

@vreshch vreshch commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Problem

The extension template now lives in the kit repo (agentage/platform, folder template/, agentage/kit#207). extension create still clones agentage/extension-template at its root.

Change

  • Default --from is agentage/platform:template. With a :folder, create makes a shallow clone beside the new folder (.extension-<id>.clone, a rename across disks fails), moves only that folder to ./extension-<id> (dot files and dot folders included) and removes the clone on every path. No kit files, no history.
  • --from forms: owner/repo, owner/repo#branch (a template at the repo root, as before; agentage/extension-template still works), and either with :folder. A folder with .., a leading / or -, a missing folder or a link on its path is refused.
  • No notice for agentage/platform:template and agentage/extension-template.
  • Clone code moved to create-source.ts (create.ts was at 200 lines). Docs: a new extension create section in docs/reference.md, docs/extensions.md, help text.

How verified

  • npm run verify green; create-source.ts 100% covered.
  • create-kit.test.ts: a local bare repo shaped like the kit (template/ plus kit files outside): only template/ copied with dot files, no .git, no clone left; repository/bugs become agentage/extension-market, no directory, private: true kept; branch plus folder; missing folder and link refused. create.test.ts keeps the old root form.
  • Manual: extension create demo-ext from the real agentage/platform (daemon off): npm ci && npm run verify green in the new tree; --from agentage/extension-template still works.

Reviewer must check

  • The agentage/e2e create test (@p0 @network) is not in this repo's cli tier (@smoke); it runs with the new default after this cli is released.
  • AGENTAGE_E2E_TEMPLATE_FROM in agentage/e2e does not accept :folder yet.

https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212

The default --from is agentage/platform:template: a shallow clone of the
kit repo beside the new folder, then only template/ (dot files included)
becomes ./extension-<id>, with no history. --from owner/repo[#branch]
still takes a template at a repo's root (agentage/extension-template
stays reachable) and gains the :folder form.

Claude-Session: https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

🎉 PR Validation ✅ PASSED

Commit: 917201a9cf84bca6dc25d9b48dcc06cd89c69229
Branch: feature/k2-create-from-kit

Checks:

  • ✅ Release guard (no version change)
  • ✅ Dependencies installed
  • ✅ Type check passed
  • ✅ Linting passed
  • ✅ Format check passed
  • ✅ Tests + coverage passed
  • ✅ Build successful

Ready to merge! ✨


🔗 View workflow run
⏰ Generated at: 2026-11-22T08:09:33.508Z

@vreshch
vreshch marked this pull request as ready for review November 22, 2026 07:56
The clone goes to a fresh mkdtemp folder, so a folder of the user's with
the old fixed name is never removed. A template with any symbolic link
is refused (walked without following links). SIGINT and SIGTERM during
the clone remove only this run's folders, then end as the signal would.
repository.directory of a monorepo template is dropped.

Claude-Session: https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212
@vreshch
vreshch merged commit ee30219 into master Nov 22, 2026
8 checks passed
@vreshch
vreshch deleted the feature/k2-create-from-kit branch November 22, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant