Skip to content

No CLI or scaffolding — the slice shape is five coordinated files, written by hand #59

Description

@btravers

From a gap analysis against NestJS and AdonisJS.

There is no CLI and no scaffolding: no create-btravstack, no generator for a module, a slice, a starter or a spec. nest g and ace make are how people learn the shape of those frameworks, and this repo's shape is less guessable than either, because it is expressed in types rather than in decorators — a reader cannot infer HttpController(name, fragment)([deps], { sync }) from a blank file.

The timing argument. PR #49 just landed the slice pattern across all three transports, and a slice is exactly what a generator should emit — it is five coordinated files that must agree:

  • a contract fragment,
  • the piece (HttpController / AmqpHandler / TemporalWorkflowActivities),
  • the slice Module that provides and exports it,
  • the root wiring (adding it to the composing array or keyed record),
  • a spec following the five Test Conventions.

Getting that by hand from the docs is the current onboarding path. Note the wiring step is the one with a runtime-only failure mode: di discovers providers through imports/provides, never through a provider's deps, so a slice that is generated but not imported fails at start with a WiringDefect rather than at compile time. A generator that writes both halves removes the one mistake the type system cannot catch.

Scope worth deciding rather than assuming: whether this is a real CLI binary, a create- initialiser, plain tsx scripts in the repo, or a documented set of copy-paste templates. The lightest thing that removes the five-file coordination problem probably wins.

Acceptance

  • A contributor can scaffold a working slice for each of the three transports without hand-copying from examples/.
  • The generated root wiring is included, not left as a documented follow-up step.
  • Generated specs follow the five Test Conventions, since the generated shape is what people will copy afterwards.
  • Whatever is built is exercised in CI, or it rots the first time a starter's signature changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Wanted, not urgentenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions