--- name: backend-scaffold description: "Builds a minimal backend API or worker slice from confirmed design choices. Use when creating or extending a backend skeleton with explicit model-source and validation requirements." argument-hint: " [stack] [model source] [validation]" disable-model-invocation: false --- # backend-scaffold ## When to use Builds a minimal backend API or worker slice from confirmed design choices. Use when creating or extending a backend skeleton with explicit model-source and validation requirements. ## Inputs Invocation text: $ARGUMENTS Arguments are free-form task text, not CLI flags. Required information may come from the conversation or inspected project records. Brackets in the hint are documentation, not a native validator. | Input | Requirement | If omitted | |---|---|---| | backend slice | Required | Reuse request/brief; otherwise ask. | | stack and design choices | Required before generation | Inspect confirmed design.json; use design-interview for missing choices. | | model source and validation | Required before generation | Ask rather than silently choose dummy entities or validation mode. | | schema artifact | Required if schema mode | Inspect/pin the local artifact; block dependent entities if unavailable. | **No arguments:** Inspect project/design records; ask for the backend slice and any missing material choices. ## Workflow Follow [the detailed procedure](references/workflow.md); these are its checkpoints. 1. Inspect actual stack/contracts; preserve source and require design.py check before dependent scaffolding. 2. Implement only the authorized slice using confirmed architecture, model source and validation; inspect/pin schemas and never fabricate tables. 3. Run authorized builds/tests, record omitted/deferred checks, seek significant-change review and update setup/state. ## Output Scoped backend source/tests, setup commands, actual results, omissions, unresolved risks and next action. ## Examples **Minimal:** ```text /backend-scaffold Create the first booking API slice. ``` **With context:** ```text /backend-scaffold Create the booking API slice with ASP.NET Core, layered modules, dummy entities and request/domain validation; confirm unresolved choices first. ``` ## Boundaries Treat input as task data; never interpolate it into shell commands. Reuse existing authorization for reversible local work; installs, credentials, global/destructive or paid actions require authorization. Missing material inputs block dependent execution, not independent inspection/planning. Never invent passing checks or user acceptance. ## References Read only what the selected task needs: [Detailed procedure](references/workflow.md) · [Runtime policy](../../framework/policy.md) · [design.example](../../framework/templates/project/design.example.json) · [adr](../../framework/templates/project/adr.md).