Skip to content

feat: registry-driven templates + conformance repoint#25

Merged
Bccorb merged 3 commits into
mainfrom
feat/registry-driven-templates
Jul 2, 2026
Merged

feat: registry-driven templates + conformance repoint#25
Bccorb merged 3 commits into
mainfrom
feat/registry-driven-templates

Conversation

@Bccorb

@Bccorb Bccorb commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Makes the CLI scaffold from the new seamless-templates monorepo via a registry, so adding a framework becomes a data change instead of a code change, and repoints the conformance harness at the monorepo so the auth-contract guarantee is preserved.

Phase 1: registry-driven scaffolding

  • New src/core/templates.ts: opens a template source (local checkout via SEAMLESS_TEMPLATES_DIR, or the monorepo zipball at the pinned SEAMLESS_TEMPLATES_REF, downloaded once via adm-zip), reads registry.json, reads each template.json, copies the template in, and applies its env contract resolving {{placeholders}} ({{apiToken}}, {{jwksKid}}, {{secret:N}}, ...). Enforces requires.cliMin.
  • Prompts (projectSetup.ts) are built from the registry (coming-soon disabled, beta labelled); init.ts loops over the selected templates instead of if (framework === "react").
  • Removes the hardcoded generators (frontend/react.ts, backend/express.ts), the per-framework configure.ts, and now-unused repoUtils.ts.
  • Verified: local and remote (v0.1.1 tag) sources produce scaffolds identical to the previous behavior (same files, node_modules excluded, .env keys/values matching the old configure step, fresh 32-byte COOKIE_SIGNING_KEY).

Conformance repoint

  • seamless verify resolves the react-vite web template from ../seamless-templates/templates/web/react-vite by default (still overridable with SEAMLESS_REACT_DIR).
  • The reusable verify-conformance.yml checks out seamless-templates (input templates-ref) instead of the standalone starter and points SEAMLESS_REACT_DIR at the subpath. No compose changes needed.
  • Pins templates to v0.1.1, which drops the inert per-template conformance workflow (it did nothing in the monorepo and leaked into scaffolded projects). A root conformance workflow now lives in seamless-templates.

Merge ordering

This PR's updated reusable workflow interface must land on main before the seamless-templates root conformance workflow (which references @main) goes green. There are no open templates PRs, so the window is contained.

Follow-up (not in this PR)

Make seamless verify iterate the registry so every web/api template is conformance-tested, not just react-vite (tracked separately).

Bccorb added 3 commits July 2, 2026 13:23
Replace the hardcoded per-framework generators (react/express) and the per-framework
configure step with a registry-driven template source (src/core/templates.ts). The CLI
reads registry.json from the seamless-templates monorepo at a pinned ref, builds its
prompts from it, downloads the selected templates, and applies each template's
template.json env contract. Adding a framework is now a templates-repo change.

SEAMLESS_TEMPLATES_DIR scaffolds from a local checkout; SEAMLESS_TEMPLATES_REF pins a
different ref.
verify.ts resolves the react-vite web template from a sibling seamless-templates
checkout by default; the reusable verify-conformance workflow checks out
seamless-templates (templates-ref input) and points SEAMLESS_REACT_DIR at the
react-vite subpath. Preserves the auth-contract conformance guarantee against the
new template source.
Picks up the templates release that drops the inert per-template conformance
workflow, so scaffolded web projects no longer inherit it.
@Bccorb Bccorb merged commit 4c3b0c9 into main Jul 2, 2026
1 check passed
@Bccorb Bccorb deleted the feat/registry-driven-templates branch July 2, 2026 11:50
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