spl:add-constraints
Interactive wizard to add missing UVL constraints based on code analysis.
Usage
splent spl:add-constraints
Description
Cross-checks feature imports against existing UVL constraints and offers to add the missing ones interactively.
For each feature in the product, it:
- Scans source code for imports of other
splent_feature_*packages. - Compares detected dependencies against constraints already declared in the
.uvlfile. - For each missing constraint (e.g.
profile => auth), prompts the developer to add it.
This ensures the UVL model stays in sync with the actual code dependencies without manual editing.
Example
splent spl:add-constraints
Scanning feature imports...
splent_feature_profile imports splent_feature_auth
→ constraint "profile => auth" not in UVL
Add it? [Y/n]: y
✅ Added: profile => auth
splent_feature_confirmemail imports splent_feature_auth
→ constraint "confirmemail => auth" already exists
✔ OK
1 constraint(s) added.
Requirements
- A product must be selected (
SPLENT_APPset). - A UVL file must exist for the product.
See also
product:validate— validate UVL model syntaxspl:deps— show dependency tree from UVLproduct:validate(phase 3) — validate code imports match UVL constraints