Add a Stack or an Extension
A LiteSpec maintainer adds a stack or an extension so the release can name it in litespec.manifest.yaml and apply its pages. This guide moves the add-a-stack and add-an-extension procedures into the Maintain section. It adds no rule of its own.
On this page
Prerequisites#
Start with:
- The LiteSpec repository and the release manifest that lists every stack and extension the release ships.
- The manifest schema at
schemas/litespec-manifest.schema.yamland the authoring checks the maintainer tool runs. - The stacks page for how a selection applies, and the extensions index for how an extension is declared.
Procedure#
1. Add a Stack#
A stack is added in three steps:
- Add the stack folder under
docs/backend/ordocs/frontend/with astack.mdpage that states what the stack adds: its rules, its version pins, and its checks. - Add the manifest entry with the stack id and its
folder, plusrequireswhen a project also selects another stack with this one andpairsWithwhen a frontend stack works beside only some backend stacks. - Run
litespec-maintain validateand fix what it reports: a folder outside the two areas, a missing folder, a missingstack.md, an unknownrequiresorpairsWithname, and any backend or frontend page no selection reaches.
2. Add an Extension#
An extension is added in three steps:
- Write the extension page at
docs/ext/<id>.md, or at<stack folder>/ext/<id>.mdwhen it supports one stack only. The page uses the extension style withActivation,Baseline Relationship, andDependenciessections, and the Activation states the scope and the criterion. - Add the manifest entry with the extension id and its
path,activationScope,applicableKindswhere the extension applies to specific record kinds,replaceswhere it replaces baseline provisions, andswitchesOnwhere selecting it requires record types. - Run
litespec-maintain validateand fix what it reports: a path that does not exist, a path outside the two allowed shapes, a scope the page does not state, kinds the page does not match, a missing criterion, and a replacement id that names no active provision.
Check#
Confirm the addition with these checks:
litespec-maintain validatereports no defect for the new stack folder or extension page.- The manifest entry names the folder or path the new page uses, and the stack folder holds a
stack.mdfile. litespec-maintain provisionsrebuilds the provision index so any new provisions on the added pages appear in the index.