Skip to content

usm/cli-scaffold-project

The usm scaffold-project command generates a starter .usm/ directory for single-app, monorepo-sub, or monorepo-root projects.

Intent

New projects need an initial .usm/ structure with system, service, and a starter feature. Scaffold-project creates the directory tree and template files based on the project type (single-app, monorepo-sub, or monorepo-root).

Flows

Scaffold single-app project (scaffold-single-app)

User creates .usm/ for a single application

  1. setup → project name, org prefix, output directory
  2. generate → .usm/system.usm with identity block
  3. generate → .usm/services/<name>.usm with web-app template
  4. generate → .usm/features/auth/login.usm starter

Contracts

scaffold-project-creates-structure

Scaffold-project must create all directories and files without overwriting existing ones

Acceptance criteria:

  • [ ] Creates .usm/ directory tree
  • [ ] Skips existing files (reports ⊘)
  • [ ] Produces valid YAML for each file

Tests

scaffold-project-single

Given:

  • empty_directory: true
  • type: "single-app"

Then:

  • assertion: system.usm, service .usm, and login feature created
  • assertion: all files validate

scaffold-project-mono-root

Given:

  • empty_directory: true
  • type: "monorepo-root"

Then:

  • assertion: system.usm plus app service files created

Implementation

  • Primary: src/cli/index.ts (scaffold-project command)
  • Test code status: none

See Also

  • usm/cli-scaffold