Skip to content

feat(tsforge): add scaffold manifest as config-surface source of truth#224

Merged
agjs merged 2 commits into
mainfrom
feat/tsforge-scaffold-manifest
Jun 24, 2026
Merged

feat(tsforge): add scaffold manifest as config-surface source of truth#224
agjs merged 2 commits into
mainfrom
feat/tsforge-scaffold-manifest

Conversation

@agjs

@agjs agjs commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What

Adds .tsforge/scaffold-manifest.json — a declarative description of BoringStack's entire configurable surface — and documents the contract in AGENTS.md.

The tsforge setup wizard clones BoringStack and reads this file to drive a greenfield scaffold: the questions it asks, the container-topology preview (5 vs ~20 services depending on toggles), the required-secrets checklist, and the .env it writes. tsforge holds no stack knowledge of its own — it all lives here, next to the code it describes.

The manifest models, per field

  • kind (toggle / one-of / multi / secret / text), group, per-STACK defaults
  • addsServices — which containers a toggle spawns (e.g. WITH_OBSERVABILITY → prometheus/grafana/loki/tempo/alertmanager)
  • requiresSecrets (+ requiresSecretsWhen to gate on an enabling toggle, e.g. AI provider keys; requiresSecretsProdOnly for dev-autogenerated infra secrets)
  • crossRulesimplies / excludes (OAuth ⇒ Valkey; EMAIL_PROVIDER=smtpWITH_MAILPIT; OTel vs Sentry "don't double-instrument")
  • envFileByGroup / envFile — which .env each value is written to (infra/identity → infra/compose/compose/.env, app features → apps/api/.env)

Validated against the current .env.example files: parses cleanly, zero coverage gaps, dev defaults resolve to the full 14-service topology.

Keep-in-sync contract (AI-first repo)

AGENTS.md gains a "Scaffold manifest — keep it in sync" section: agents must update this file in the same change that alters any env toggle / provider / secret / service mapping. This is enforced — tsforge's scaffold suite runs a completeness alarm that fails the build if a watched WITH_*/*_ENABLED toggle in .env.example is neither modelled here nor waived via watchIgnore. A drifted manifest is a red build, not a silent gap.

Notes

  • defaultRef: "main" — tsforge records the resolved SHA per-scaffold for replay.
  • No code changes to the apps/infra; this is additive (one JSON file + docs).

agjs and others added 2 commits June 24, 2026 10:30
The tsforge setup wizard reads .tsforge/scaffold-manifest.json to drive a
greenfield scaffold of BoringStack: it generates the wizard questions, the
container-topology preview, the required-secrets checklist, and the .env from
this declarative file. tsforge holds no stack knowledge of its own.

Document the contract in AGENTS.md (AI-first repo): agents must update the
manifest in the same change that alters the env/toggle/provider/secret surface;
tsforge's completeness alarm fails the build on drift.
@agjs agjs merged commit c643a0e into main Jun 24, 2026
27 checks passed
@agjs agjs deleted the feat/tsforge-scaffold-manifest branch June 24, 2026 08:34
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