Skip to main content

Module scaffold

Module scaffold 

Source
Expand description

upskill new <kind> <name> — scaffold a starter SSOT item.

Author command per ADR-0004 — runs only inside a source-registry tree. Writes one file at <cwd>/<name>/<KIND>.md (per format-spec §2.1 and ADR-0006) with the minimum frontmatter the spec requires plus kind-specific defaults: mode: subagent / model: sonnet for agents.

When <cwd>/<name>/ already exists with a different kind’s entrypoint, the command adds the requested kind as a co-located sibling (format-spec §2.1) provided every existing entrypoint’s name: already matches <name>. The user keeps a single item directory expressing one capability across multiple kinds.

Refuses if:

  • cwd/.upskill-lock.json exists (consumer project, not a source registry).
  • The target entrypoint file (<name>/<KIND>.md) already exists.
  • <cwd>/<name>/ exists but is not an item directory (no recognised entrypoints), or its existing entrypoints’ name: fields do not match <name>.
  • <name> does not satisfy format-spec §2.1 ([a-z0-9-]{1,64}, no leading/trailing hyphen).

Structs§

ScaffoldReport
Outcome of one scaffold call — the path written, for the CLI to echo back.

Enums§

NewKind
Item kind to scaffold. Maps 1:1 to format-spec entrypoint files.

Functions§

scaffold
Scaffold a new item under root. root is typically std::env::current_dir(); it is also the consumer-project guard boundary.