Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Contracts and edge cases

Platform spec article

Contracts and edge cases

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Testable rules for template resolution, instantiation, registry interaction, and diagnostics (E1901–E1999).

IDRule
T-R01beskid new must accept exactly one template selector: shortName, --package <id>[@version], --path <dir>, or --git <url> (with optional --git-ref, --git-subpath).
T-R02Registry resolution must require packageKind: template on the resolved package.json.
T-R03First-party ids under beskid.templates.* must be preferred when shortName is ambiguous and registry is configured.
T-R04On every template use, tooling must compare cached install (if any) to latest non-yanked registry version and must print an informational message when a newer version exists.
T-R05When the resolved version is yanked, tooling must print a warning naming the package and version; exit code 0 if the user proceeds via --allow-yanked or interactive confirmation.
IDRule
T-I01Project templates must create the output directory when missing; must error when non-empty without --force.
T-I02Workspace templates must emit Workspace.proj at the workspace root and member Project.proj files at declared member paths.
T-I03Item templates must require -o / --output pointing at a file or directory under a folder containing Project.proj (or pass --project to disambiguate).
T-I04After substitution, no {{ }} placeholder tokens may remain in output files.
T-I05All guids entries must be replaced in output; leftover source guids must fail with E1906.
T-I06Instantiated host projects must receive corelib per design model; templates must not emit opt-out flags.
T-I07Templates may scaffold Mod, multi-target, or FFI-heavy projects without restriction.
IDRule
T-U01When stdin is a TTY and preferInteractive is true or any required symbol lacks a value, the CLI must prompt.
T-U02When --no-interactive is set, only flags and defaults may be used; missing required symbols must fail with E1903.
T-U03--symbol (repeatable) and -n / --name for the primary name symbol must be supported.
IDRule
T-P01postActions is an ordered array of { "actionId": string, "args": object }.
T-P02There is no platform whitelist; hosts must document supported actionId values.
T-P03Unknown actionId should log a warning and continue unless --strict-post-actions.
T-P04Built-in actions must include at minimum: runCommand, beskidLock, beskidFetch, openReadme.
Form idInputOutput
identitystringunchanged
lowerCasestringlowercase
upperCasestringuppercase
safeNamestringfilesystem-safe identifier
namespacestringdotted namespace from path-like name
  • Git shallow clone failureE1907 with remediation (network, auth, ref).
  • Template package contains packageKind: libraryE1902 reject for beskid new install.
  • Item template overwrites existing file → require --force or interactive confirm.
  • Workspace template with duplicate member idsE1908 at validation time (before write).
CodeMeaning
E1901Template manifest missing or invalid schema
E1902Package kind is not template
E1903Required symbol not provided
E1904Output path conflict
E1905Item template outside project root
E1906GUID replacement incomplete
E1907Git template source failed
E1908Workspace template invalid member graph
E1999Reserved internal template engine error