@decantr/cli 1.5.3 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ import { readFileSync, writeFileSync, existsSync } from "fs";
8
8
  import { join } from "path";
9
9
  var TELEMETRY_ENDPOINT = "https://api.decantr.ai/v1/telemetry/guard";
10
10
  var TELEMETRY_TIMEOUT_MS = 3e3;
11
- var DNA_RULES = /* @__PURE__ */ new Set(["style", "recipe", "density", "accessibility", "theme-mode"]);
11
+ var DNA_RULES = /* @__PURE__ */ new Set(["style", "density", "accessibility", "theme-mode"]);
12
12
  async function sendGuardMetrics(metrics) {
13
13
  try {
14
14
  const controller = new AbortController();
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./chunk-QZVA3PFR.js";
2
- import "./chunk-B5OX2EXL.js";
1
+ import "./chunk-4KKFOXBB.js";
2
+ import "./chunk-MU3657R7.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RegistryClient,
3
3
  refreshDerivedFiles
4
- } from "./chunk-B5OX2EXL.js";
4
+ } from "./chunk-MU3657R7.js";
5
5
 
6
6
  // src/commands/upgrade.ts
7
7
  import { readFileSync, writeFileSync, existsSync } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decantr/cli",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "Decantr CLI — search the registry, validate essence files, and access design intelligence from the terminal",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -8,9 +8,8 @@
8
8
  "tags": ["starter", "minimal", "offline"],
9
9
  "compose": [],
10
10
  "theme": {
11
- "style": "default",
11
+ "id": "default",
12
12
  "mode": "system",
13
- "recipe": null,
14
13
  "shape": "rounded"
15
14
  },
16
15
  "personality": ["clean", "minimal"],
@@ -18,7 +18,7 @@ Decantr is a design intelligence layer that sits between you (the AI code genera
18
18
 
19
19
  DNA defines the foundational design rules. **DNA violations are errors** -- they must never happen without updating the essence first.
20
20
 
21
- DNA axioms include: Theme (style, mode, recipe, shape), Spacing (density, content gap), Typography (scale, weights), Color (palette, accent count), Radius (philosophy, base), Elevation (system, levels), Motion (preference, reduce-motion), Accessibility (WCAG level, focus-visible), and Personality traits.
21
+ DNA axioms include: Theme (id, mode, shape), Spacing (density, content gap), Typography (scale, weights), Color (palette, accent count), Radius (philosophy, base), Elevation (system, levels), Motion (preference, reduce-motion), Accessibility (WCAG level, focus-visible), and Personality traits.
22
22
 
23
23
  ### Blueprint (Structural Layout)
24
24
 
@@ -33,13 +33,12 @@ Blueprint includes: Sections (grouped by archetype with role, shell, and scoped
33
33
  | # | Rule | Layer | What It Checks |
34
34
  |---|------|-------|----------------|
35
35
  | 1 | Style | DNA (error) | Code uses the theme specified in DNA |
36
- | 2 | Recipe | DNA (error) | Decorations match the DNA recipe |
37
- | 3 | Density | DNA (error) | Spacing follows the density profile |
38
- | 4 | Accessibility | DNA (error) | Code meets the WCAG level |
39
- | 5 | Theme-mode | DNA (error) | Theme/mode combination is valid |
40
- | 6 | Structure | Blueprint (warn) | Pages exist in the blueprint sections |
41
- | 7 | Layout | Blueprint (warn) | Pattern order matches the layout spec |
42
- | 8 | Pattern existence | Blueprint (warn) | Patterns referenced exist in the registry |
36
+ | 2 | Density | DNA (error) | Spacing follows the density profile |
37
+ | 3 | Accessibility | DNA (error) | Code meets the WCAG level |
38
+ | 4 | Theme-mode | DNA (error) | Theme/mode combination is valid |
39
+ | 5 | Structure | Blueprint (warn) | Pages exist in the blueprint sections |
40
+ | 6 | Layout | Blueprint (warn) | Pattern order matches the layout spec |
41
+ | 7 | Pattern existence | Blueprint (warn) | Patterns referenced exist in the registry |
43
42
 
44
43
  ### Enforcement Tiers
45
44
 
@@ -96,7 +95,7 @@ Run `decantr check` to validate code against the spec.
96
95
  decantr status # Project health
97
96
  decantr check # Detect drift violations
98
97
  decantr get pattern X # Fetch a pattern spec from registry
99
- decantr get recipe X # Fetch recipe decorators
98
+ decantr get theme X # Fetch theme details and decorators
100
99
  decantr search <query> # Search the registry
101
100
  ```
102
101
 
@@ -19,7 +19,7 @@ Auto-generated summary of `decantr.essence.json`.
19
19
  |----------|-------|
20
20
  | Theme | {{THEME_STYLE}} |
21
21
  | Mode | {{THEME_MODE}} |
22
- | Recipe | {{THEME_RECIPE}} |
22
+ | Theme ID | {{THEME_RECIPE}} |
23
23
  | Shape | {{SHAPE}} |
24
24
 
25
25
  ## Structure
@@ -17,8 +17,7 @@
17
17
  "cachedContent": {
18
18
  "archetypes": {{CACHED_ARCHETYPES}},
19
19
  "patterns": {{CACHED_PATTERNS}},
20
- "themes": {{CACHED_THEMES}},
21
- "recipes": {{CACHED_RECIPES}}
20
+ "themes": {{CACHED_THEMES}}
22
21
  }
23
22
  },
24
23
  "initialized": {
@@ -11,12 +11,11 @@ You are adding new pages or features to an existing Decantr project. Guided mode
11
11
  | # | Layer | Rule | Enforcement | What It Means |
12
12
  |---|-------|------|-------------|---------------|
13
13
  | 1 | DNA | **Style** | ENFORCED | You MUST use theme `{{THEME_STYLE}}` |
14
- | 2 | DNA | **Recipe** | ENFORCED | You MUST use recipe `{{THEME_RECIPE}}` |
15
- | 3 | DNA | **Density** | ENFORCED | You MUST follow density `{{DENSITY}}` |
16
- | 4 | DNA | **Accessibility** | ENFORCED | You MUST meet WCAG level from essence |
17
- | 5 | DNA | **Theme-mode** | ENFORCED | Theme/mode combination must be compatible |
18
- | 6 | Blueprint | **Structure** | ENFORCED | Page MUST exist in essence before generating code |
19
- | 7 | Blueprint | Layout | advisory | Pattern order is flexible |
14
+ | 2 | DNA | **Density** | ENFORCED | You MUST follow density `{{DENSITY}}` |
15
+ | 3 | DNA | **Accessibility** | ENFORCED | You MUST meet WCAG level from essence |
16
+ | 4 | DNA | **Theme-mode** | ENFORCED | Theme/mode combination must be compatible |
17
+ | 5 | Blueprint | **Structure** | ENFORCED | Page MUST exist in essence before generating code |
18
+ | 6 | Blueprint | Layout | advisory | Pattern order is flexible |
20
19
  | 8 | Blueprint | **Pattern-exists** | ENFORCED | All patterns must exist in the registry |
21
20
 
22
21
  ## Before You Start
@@ -64,7 +63,7 @@ Before adding a page:
64
63
  During code generation:
65
64
 
66
65
  - [ ] Use theme `{{THEME_STYLE}}` for all styling
67
- - [ ] Use recipe `{{THEME_RECIPE}}` for decorations
66
+ - [ ] Use theme `{{THEME_RECIPE}}` decorators for decoration
68
67
  - [ ] Follow the shell structure ({{DEFAULT_SHELL}})
69
68
  - [ ] Include patterns from the layout array
70
69
 
@@ -72,7 +71,7 @@ After generation:
72
71
 
73
72
  - [ ] Run `npx @decantr/cli validate`
74
73
  - [ ] Verify the page matches the theme
75
- - [ ] Check that the recipe styles are applied
74
+ - [ ] Check that the theme decorator styles are applied
76
75
 
77
76
  ## Violation Response
78
77
 
@@ -11,12 +11,11 @@ You are modifying existing code in a Decantr project. ALL 8 guard rules are enfo
11
11
  | # | Layer | Rule | Enforcement | Consequence of Violation |
12
12
  |---|-------|------|-------------|--------------------------|
13
13
  | 1 | DNA | **Style** | STRICT | ERROR — Code rejected |
14
- | 2 | DNA | **Recipe** | STRICT | ERRORCode rejected |
15
- | 3 | DNA | **Density** | STRICT | WARNINGFlagged for review |
16
- | 4 | DNA | **Accessibility** | STRICT | ERROR — Code rejected |
17
- | 5 | DNA | **Theme-mode** | STRICT | ERROR — Code rejected |
18
- | 6 | Blueprint | **Structure** | STRICT | ERROR — Code rejected |
19
- | 7 | Blueprint | **Layout** | STRICT | ERROR — Pattern order must match exactly |
14
+ | 2 | DNA | **Density** | STRICT | WARNINGFlagged for review |
15
+ | 3 | DNA | **Accessibility** | STRICT | ERRORCode rejected |
16
+ | 4 | DNA | **Theme-mode** | STRICT | ERROR — Code rejected |
17
+ | 5 | Blueprint | **Structure** | STRICT | ERROR — Code rejected |
18
+ | 6 | Blueprint | **Layout** | STRICT | ERROR — Pattern order must match exactly |
20
19
  | 8 | Blueprint | **Pattern-exists** | STRICT | ERROR — Code rejected |
21
20
 
22
21
  ## Violation Response Protocol
@@ -75,7 +74,7 @@ For the page you're modifying, verify:
75
74
  - Shell matches the page's `shell` property
76
75
  - Patterns match the page's `layout[]` in order
77
76
  - Theme matches `theme.style`
78
- - Recipe matches `theme.recipe`
77
+ - Theme decorators match `theme.id`
79
78
 
80
79
  ### 3. Plan Changes
81
80
 
@@ -93,7 +92,7 @@ Before modifying:
93
92
  - [ ] Page exists in essence structure
94
93
  - [ ] I know the exact layout order: `{{LAYOUT}}`
95
94
  - [ ] I will use theme: `{{THEME_STYLE}}`
96
- - [ ] I will use recipe: `{{THEME_RECIPE}}`
95
+ - [ ] I will use theme: `{{THEME_RECIPE}}`
97
96
  - [ ] I will follow density: `{{DENSITY}}`
98
97
 
99
98
  During modification:
@@ -144,7 +143,7 @@ Swapping `chart-grid` and `data-table` is a Layout guard violation.
144
143
  | "Theme mismatch" | Used different theme | Revert to `{{THEME_STYLE}}` |
145
144
  | "Page undefined" | Edited undeclared page | Add page to essence first |
146
145
  | "Layout order wrong" | Patterns out of order | Match `layout[]` exactly |
147
- | "Recipe mismatch" | Wrong decoration style | Use `{{THEME_RECIPE}}` |
146
+ | "Theme mismatch" | Wrong decoration style | Use `{{THEME_RECIPE}}` |
148
147
  | "Density drift" | Wrong spacing values | Use `{{CONTENT_GAP}}` tokens |
149
148
 
150
149
  ## Proposing Essence Changes
@@ -1,67 +1,12 @@
1
1
  # Task Context: Scaffolding
2
2
 
3
- **Enforcement Tier: Creative**
4
-
5
- You are scaffolding a new Decantr project. Guard rules are advisory only during initial scaffolding.
6
-
7
- ---
8
-
9
- ## Your Task
10
-
11
- Generate the initial project structure based on the essence specification.
12
-
13
- ## Rules (Advisory)
14
-
15
- During scaffolding, the following rules are recommendations, not requirements:
16
-
17
- | # | Layer | Rule | Status | Guidance |
18
- |---|-------|------|--------|----------|
19
- | 1 | DNA | Style | Advisory | Use the theme from essence, but creative variations are acceptable |
20
- | 2 | DNA | Recipe | Advisory | Apply recipe styles where possible |
21
- | 3 | DNA | Density | Advisory | Follow spacing guidelines loosely |
22
- | 4 | DNA | Accessibility | Advisory | Meet WCAG level from essence where possible |
23
- | 5 | DNA | Theme-mode | Advisory | Use the specified theme/mode combination |
24
- | 6 | Blueprint | Structure | Advisory | Follow the page structure, add placeholder content |
25
- | 7 | Blueprint | Layout | Advisory | Use suggested patterns, order can be adjusted |
26
- | 8 | Blueprint | Pattern-exists | Advisory | Use patterns that exist in the registry |
27
-
28
- ## Checklist
29
-
30
- Before scaffolding:
31
-
32
- - [ ] Read `decantr.essence.json`
33
- - [ ] Understand the target framework ({{TARGET}})
34
- - [ ] Know the theme ({{THEME_STYLE}}) and mode ({{THEME_MODE}})
35
- - [ ] Review the page structure
36
-
37
- During scaffolding:
38
-
39
- - [ ] Create the shell layout ({{DEFAULT_SHELL}})
40
- - [ ] Generate pages from `blueprint.pages[]`
41
- - [ ] Add pattern placeholders for each page's `layout[]`
42
- - [ ] Apply theme colors and typography
43
- - [ ] Set up routing based on page IDs
44
-
45
- After scaffolding:
46
-
47
- - [ ] Run `npx @decantr/cli validate` to check the essence
48
- - [ ] Verify each page renders correctly
49
- - [ ] Check theme consistency across pages
3
+ **Enforcement Tier: Creative** — Guard rules are advisory during initial scaffolding.
50
4
 
51
5
  ## What to Generate
52
6
 
53
7
  {{SCAFFOLD_STRUCTURE}}
54
8
 
55
- ## Next Steps
56
-
57
- After scaffolding is complete:
58
-
59
- 1. Run the development server
60
- 2. Verify all pages load
61
- 3. Check theme consistency
62
- 4. Run `npx @decantr/cli validate`
63
-
64
- Once verified, subsequent changes will use **{{GUARD_MODE}}** enforcement mode.
9
+ Post-scaffold enforcement mode: **{{GUARD_MODE}}**.
65
10
 
66
11
  ---
67
12