@decantr/cli 1.5.4 → 1.5.6

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.
package/dist/bin.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-D3W3MYKT.js";
3
- import "./chunk-T7CQSJGV.js";
2
+ import "./chunk-G77ADKWE.js";
3
+ import "./chunk-VKWRNLHR.js";
@@ -9,7 +9,7 @@ import {
9
9
  scaffoldMinimal,
10
10
  scaffoldProject,
11
11
  syncRegistry
12
- } from "./chunk-T7CQSJGV.js";
12
+ } from "./chunk-VKWRNLHR.js";
13
13
 
14
14
  // src/index.ts
15
15
  import { readFileSync as readFileSync15, existsSync as existsSync23, readdirSync as readdirSync6 } from "fs";
@@ -4256,7 +4256,7 @@ async function main() {
4256
4256
  break;
4257
4257
  }
4258
4258
  case "upgrade": {
4259
- const { cmdUpgrade } = await import("./upgrade-TXVD2WIN.js");
4259
+ const { cmdUpgrade } = await import("./upgrade-6MKC6EDQ.js");
4260
4260
  const applyFlag = args.includes("--apply");
4261
4261
  await cmdUpgrade(process.cwd(), { apply: applyFlag });
4262
4262
  break;
@@ -93,6 +93,9 @@ function generateTreatmentCSS(spatialTokens, treatmentOverrides, themeDecorators
93
93
  ["box-shadow", "var(--d-shadow-lg)"],
94
94
  ["z-index", "50"]
95
95
  ]);
96
+ emitRule(".d-surface[data-interactive]", [
97
+ ["cursor", "pointer"]
98
+ ]);
96
99
  emitRule(".d-surface[data-interactive]:hover", [
97
100
  ["border-color", "var(--d-primary-hover, var(--d-border))"],
98
101
  ["box-shadow", "var(--d-shadow-md)"],
@@ -154,7 +157,13 @@ function generateTreatmentCSS(spatialTokens, treatmentOverrides, themeDecorators
154
157
  ["padding", "var(--d-section-py) 0"]
155
158
  ]);
156
159
  lines.push(".d-section + .d-section {");
157
- lines.push(" border-top: 1px solid var(--d-border);");
160
+ lines.push(" border-top: 1px solid transparent;");
161
+ lines.push(" border-image: linear-gradient(to right, transparent, var(--d-border), transparent) 1;");
162
+ lines.push(" margin-top: var(--d-gap-2);");
163
+ lines.push("}");
164
+ lines.push("");
165
+ lines.push('.d-section[data-density="compact"] {');
166
+ lines.push(" padding: calc(var(--d-section-py) * 0.5) 0;");
158
167
  lines.push("}");
159
168
  lines.push("");
160
169
  emitRule(".d-annotation", [
@@ -185,6 +194,14 @@ function generateTreatmentCSS(spatialTokens, treatmentOverrides, themeDecorators
185
194
  ["background", "color-mix(in srgb, var(--d-info) 15%, transparent)"],
186
195
  ["color", "var(--d-info)"]
187
196
  ]);
197
+ emitRule(".d-label", [
198
+ ["font-size", "0.7rem"],
199
+ ["font-weight", "600"],
200
+ ["text-transform", "uppercase"],
201
+ ["letter-spacing", "0.08em"],
202
+ ["color", "var(--d-text-muted)"],
203
+ ["font-family", "var(--d-font-mono, ui-monospace, monospace)"]
204
+ ]);
188
205
  if (themeDecorators && Object.keys(themeDecorators).length > 0) {
189
206
  const label = themeName ? ` (${themeName})` : "";
190
207
  lines.push(`/* \u2500\u2500 Layer 3: Theme Decorators${label} \u2500\u2500 */`);
@@ -208,6 +225,35 @@ function generateTreatmentCSS(spatialTokens, treatmentOverrides, themeDecorators
208
225
  lines.push("}");
209
226
  return lines.join("\n");
210
227
  }
228
+ function generatePersonalityCSS(personality, themeData) {
229
+ const text = personality.join(" ").toLowerCase();
230
+ const rules = [];
231
+ if (text.includes("neon") || text.includes("glow")) {
232
+ const glowColor = "var(--d-accent-glow, rgba(0, 212, 255, 0.3))";
233
+ rules.push(`.neon-glow { box-shadow: 0 0 20px ${glowColor}; }`);
234
+ rules.push(`.neon-glow-hover:hover { box-shadow: 0 0 24px ${glowColor}; transition: box-shadow var(--d-duration-hover, 0.15s) var(--d-easing, ease); }`);
235
+ rules.push(`.neon-text-glow { text-shadow: 0 0 12px ${glowColor}; }`);
236
+ rules.push(`.neon-border-glow { border-color: var(--d-accent); box-shadow: 0 0 8px ${glowColor}; }`);
237
+ }
238
+ if (text.includes("monospace") || text.includes("mono")) {
239
+ rules.push(`.mono-data { font-family: var(--d-font-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }`);
240
+ }
241
+ if (text.includes("pulse") || text.includes("ring") || text.includes("status")) {
242
+ rules.push(`.status-ring { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--d-border); display: flex; align-items: center; justify-content: center; position: relative; transition: border-color 0.2s ease, box-shadow 0.2s ease; }`);
243
+ rules.push(`.status-ring[data-status="active"] { border-color: var(--d-success); }`);
244
+ rules.push(`.status-ring[data-status="error"] { border-color: var(--d-error); box-shadow: 0 0 12px color-mix(in srgb, var(--d-error) 25%, transparent); }`);
245
+ rules.push(`.status-ring[data-status="warning"] { border-color: var(--d-warning); }`);
246
+ rules.push(`.status-ring[data-status="idle"] { border-color: var(--d-text-muted); }`);
247
+ rules.push(`@keyframes pulse-ring { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }`);
248
+ rules.push(`.status-ring[data-status="active"]::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--d-success); opacity: 0; animation: pulse-ring 2s ease-out infinite; }`);
249
+ }
250
+ if (themeData.motion?.entrance) {
251
+ rules.push(`.entrance-fade { animation: decantr-entrance var(--d-duration-entrance, 0.2s) var(--d-easing, ease-out); }`);
252
+ rules.push(`@keyframes decantr-entrance { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }`);
253
+ }
254
+ if (rules.length === 0) return "";
255
+ return "\n/* \u2500\u2500 Personality-Derived Utilities \u2500\u2500 */\n\n" + rules.join("\n\n") + "\n";
256
+ }
211
257
 
212
258
  // src/scaffold.ts
213
259
  var __dirname = dirname(fileURLToPath(import.meta.url));
@@ -627,35 +673,6 @@ input, button, textarea, select {
627
673
  }
628
674
  `;
629
675
  }
630
- function generateTreatmentsContext(themeData, themeName) {
631
- const lines = [];
632
- lines.push(`# Visual Treatments: ${themeName}`);
633
- lines.push("");
634
- lines.push("## Base Treatments");
635
- lines.push("");
636
- lines.push("d-interactive, d-surface, d-data, d-control, d-section, d-annotation \u2014 see DECANTR.md for usage.");
637
- lines.push("");
638
- if (themeData?.decorators && Object.keys(themeData.decorators).length > 0) {
639
- lines.push(`## Theme Decorators (${themeName}-specific)`);
640
- lines.push("");
641
- lines.push("| Class | Use for |");
642
- lines.push("|-------|---------|");
643
- for (const [name, description] of Object.entries(themeData.decorators)) {
644
- const useFor = description.split(".")[0].trim();
645
- lines.push(`| ${name} | ${useFor} |`);
646
- }
647
- lines.push("");
648
- }
649
- lines.push("## Composition");
650
- lines.push("");
651
- lines.push("Atoms + treatment + theme decorator:");
652
- lines.push("```tsx");
653
- lines.push(`css('_flex _col _gap4') + ' d-surface'`);
654
- lines.push("```");
655
- lines.push("");
656
- lines.push("Atoms use `css()` function. Treatments and theme decorators are plain class strings.");
657
- return lines.join("\n");
658
- }
659
676
  function generateDecoratorRule(name, description) {
660
677
  const rules = [];
661
678
  const descLower = description.toLowerCase();
@@ -1064,21 +1081,191 @@ Atoms + treatment + theme decorator:
1064
1081
  - **Theme decorators:** \`carbon-glass\`, \`carbon-code\` \u2014 theme-specific decoration from treatments.css
1065
1082
  - **Combined:** \`css('_flex _col') + ' d-surface carbon-card'\`
1066
1083
 
1067
- ### Atoms Quick Reference
1084
+ ### Atom Reference
1085
+
1086
+ #### Display
1087
+ | Atom | CSS |
1088
+ |------|-----|
1089
+ | \`_flex\` | \`display:flex\` |
1090
+ | \`_grid\` | \`display:grid\` |
1091
+ | \`_block\` | \`display:block\` |
1092
+ | \`_inline\` | \`display:inline\` |
1093
+ | \`_inlineflex\` | \`display:inline-flex\` |
1094
+ | \`_none\` | \`display:none\` |
1095
+ | \`_contents\` | \`display:contents\` |
1096
+
1097
+ #### Flexbox
1098
+ | Atom | CSS |
1099
+ |------|-----|
1100
+ | \`_col\` | \`flex-direction:column\` |
1101
+ | \`_row\` | \`flex-direction:row\` |
1102
+ | \`_colrev\` | \`flex-direction:column-reverse\` |
1103
+ | \`_wrap\` | \`flex-wrap:wrap\` |
1104
+ | \`_nowrap\` | \`flex-wrap:nowrap\` |
1105
+ | \`_flex1\` | \`flex:1\` |
1106
+ | \`_flex0\` | \`flex:none\` |
1107
+ | \`_flexauto\` | \`flex:auto\` |
1108
+ | \`_grow\` | \`flex-grow:1\` |
1109
+ | \`_grow0\` | \`flex-grow:0\` |
1110
+ | \`_shrink0\` | \`flex-shrink:0\` |
1111
+
1112
+ #### Alignment
1113
+ | Atom | CSS |
1114
+ |------|-----|
1115
+ | \`_aic\` | \`align-items:center\` |
1116
+ | \`_aifs\` | \`align-items:flex-start\` |
1117
+ | \`_aife\` | \`align-items:flex-end\` |
1118
+ | \`_aist\` | \`align-items:stretch\` |
1119
+ | \`_aibl\` | \`align-items:baseline\` |
1120
+ | \`_jcc\` | \`justify-content:center\` |
1121
+ | \`_jcfs\` | \`justify-content:flex-start\` |
1122
+ | \`_jcfe\` | \`justify-content:flex-end\` |
1123
+ | \`_jcsb\` | \`justify-content:space-between\` |
1124
+ | \`_jcsa\` | \`justify-content:space-around\` |
1125
+ | \`_jcse\` | \`justify-content:space-evenly\` |
1126
+ | \`_pic\` | \`place-items:center\` |
1127
+ | \`_pcc\` | \`place-content:center\` |
1128
+
1129
+ #### Spacing (scale: 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, ...)
1130
+ | Atom | CSS | Notes |
1131
+ |------|-----|-------|
1132
+ | \`_gap{n}\` | \`gap:{scale}\` | e.g. \`_gap4\` = \`gap:1rem\` |
1133
+ | \`_gx{n}\` | \`column-gap:{scale}\` | horizontal gap |
1134
+ | \`_gy{n}\` | \`row-gap:{scale}\` | vertical gap |
1135
+ | \`_p{n}\` | \`padding:{scale}\` | all sides |
1136
+ | \`_pt{n}\`, \`_pr{n}\`, \`_pb{n}\`, \`_pl{n}\` | directional padding | top/right/bottom/left |
1137
+ | \`_px{n}\` | \`padding-inline:{scale}\` | horizontal |
1138
+ | \`_py{n}\` | \`padding-block:{scale}\` | vertical |
1139
+ | \`_m{n}\` | \`margin:{scale}\` | same as padding variants |
1140
+ | \`_mx{n}\`, \`_my{n}\` | inline/block margin | horizontal/vertical |
1141
+
1142
+ #### Sizing
1143
+ | Atom | CSS |
1144
+ |------|-----|
1145
+ | \`_wfull\` / \`_w100\` | \`width:100%\` |
1146
+ | \`_hfull\` / \`_h100\` | \`height:100%\` |
1147
+ | \`_wscreen\` | \`width:100vw\` |
1148
+ | \`_hscreen\` | \`height:100vh\` |
1149
+ | \`_wfit\` | \`width:fit-content\` |
1150
+ | \`_hfit\` | \`height:fit-content\` |
1151
+ | \`_wauto\` | \`width:auto\` |
1152
+ | \`_minw0\` | \`min-width:0\` |
1153
+ | \`_minh0\` | \`min-height:0\` |
1154
+ | \`_w{n}\`, \`_h{n}\` | width/height from spacing scale |
1155
+ | \`_minw{n}\`, \`_maxw{n}\` | min/max width from scale |
1068
1156
 
1069
- | Category | Examples | Purpose |
1070
- |----------|----------|---------|
1071
- | Layout | \`_flex\`, \`_col\`, \`_row\`, \`_wrap\`, \`_grid\` | Flex/grid containers |
1072
- | Spacing | \`_gap4\`, \`_p4\`, \`_px4\`, \`_py2\`, \`_m0\` | Gaps, padding, margin |
1073
- | Sizing | \`_w100\`, \`_h100\`, \`_minw0\`, \`_maxwfull\` | Width, height |
1074
- | Text | \`_textlg\`, \`_text2xl\`, \`_fontbold\`, \`_textc\` | Typography |
1075
- | Alignment | \`_aic\`, \`_jcc\`, \`_jcsb\`, \`_pic\` | Flex/grid alignment |
1076
- | Position | \`_rel\`, \`_abs\`, \`_sticky\`, \`_z10\` | Positioning |
1077
- | Visual | \`_rounded\`, \`_shadow\`, \`_trans\`, \`_op50\` | Decoration |
1078
- | Color | \`_bgprimary\`, \`_fgtext\`, \`_fgmuted\`, \`_bcborder\` | Theme colors |
1079
- | Responsive | \`_md:gc2\`, \`_lg:gc4\`, \`_sm:flex\` | Breakpoint prefixes |
1157
+ #### Text Size
1158
+ | Atom | Size | Line-height |
1159
+ |------|------|-------------|
1160
+ | \`_textxs\` | 0.75rem | 1rem |
1161
+ | \`_textsm\` | 0.875rem | 1.25rem |
1162
+ | \`_textbase\` | 1rem | 1.5rem |
1163
+ | \`_textlg\` | 1.125rem | 1.75rem |
1164
+ | \`_textxl\` | 1.25rem | 1.75rem |
1165
+ | \`_text2xl\` | 1.5rem | 2rem |
1166
+ | \`_text3xl\` | 1.875rem | 2.25rem |
1167
+ | \`_heading1\`-\`_heading6\` | Heading presets (size + weight) |
1080
1168
 
1081
- Scale: 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24. Example: \`_gap4\` = \`gap:1rem\`.
1169
+ #### Text Style
1170
+ | Atom | CSS |
1171
+ |------|-----|
1172
+ | \`_fontbold\` | \`font-weight:700\` |
1173
+ | \`_fontsemi\` | \`font-weight:600\` |
1174
+ | \`_fontmedium\` | \`font-weight:500\` |
1175
+ | \`_fontlight\` | \`font-weight:300\` |
1176
+ | \`_italic\` | \`font-style:italic\` |
1177
+ | \`_underline\` | \`text-decoration:underline\` |
1178
+ | \`_uppercase\` | \`text-transform:uppercase\` |
1179
+ | \`_truncate\` | overflow ellipsis + nowrap |
1180
+ | \`_textl\`, \`_textc\`, \`_textr\` | text-align left/center/right |
1181
+
1182
+ #### Color (theme variable based)
1183
+ | Atom | CSS |
1184
+ |------|-----|
1185
+ | \`_bgprimary\` | \`background:var(--d-primary)\` |
1186
+ | \`_bgsurface\` | \`background:var(--d-surface)\` |
1187
+ | \`_bgsurface0\`-\`_bgsurface2\` | surface elevation layers |
1188
+ | \`_bgmuted\` | \`background:var(--d-muted)\` |
1189
+ | \`_bgbg\` | \`background:var(--d-bg)\` |
1190
+ | \`_bgsuccess\`, \`_bgerror\`, \`_bgwarning\`, \`_bginfo\` | status backgrounds |
1191
+ | \`_fgprimary\` | \`color:var(--d-primary)\` |
1192
+ | \`_fgtext\` | \`color:var(--d-text)\` |
1193
+ | \`_fgmuted\` | \`color:var(--d-text-muted)\` |
1194
+ | \`_fgsuccess\`, \`_fgerror\`, \`_fgwarning\`, \`_fginfo\` | status text |
1195
+ | \`_bcborder\` | \`border-color:var(--d-border)\` |
1196
+
1197
+ #### Overflow & Whitespace
1198
+ | Atom | CSS |
1199
+ |------|-----|
1200
+ | \`_overhidden\` | \`overflow:hidden\` |
1201
+ | \`_overauto\` | \`overflow:auto\` |
1202
+ | \`_overscroll\` | \`overflow:scroll\` |
1203
+ | \`_overxauto\`, \`_overyauto\` | axis-specific overflow |
1204
+ | \`_nowraptext\` | \`white-space:nowrap\` |
1205
+ | \`_prewrap\` | \`white-space:pre-wrap\` |
1206
+ | \`_breakword\` | \`overflow-wrap:break-word\` |
1207
+
1208
+ #### Cursor & Interaction
1209
+ | Atom | CSS |
1210
+ |------|-----|
1211
+ | \`_pointer\` | \`cursor:pointer\` |
1212
+ | \`_cursordefault\` | \`cursor:default\` |
1213
+ | \`_notallowed\` | \`cursor:not-allowed\` |
1214
+ | \`_grab\` | \`cursor:grab\` |
1215
+ | \`_selectnone\` | \`user-select:none\` |
1216
+ | \`_ptrnone\` | \`pointer-events:none\` |
1217
+
1218
+ #### Position & Layout
1219
+ | Atom | CSS |
1220
+ |------|-----|
1221
+ | \`_rel\` | \`position:relative\` |
1222
+ | \`_abs\` | \`position:absolute\` |
1223
+ | \`_fixed\` | \`position:fixed\` |
1224
+ | \`_sticky\` | \`position:sticky\` |
1225
+ | \`_inset0\` | \`inset:0\` |
1226
+ | \`_top0\`, \`_right0\`, \`_bottom0\`, \`_left0\` | edge positioning |
1227
+ | \`_z10\`-\`_z50\` | z-index scale |
1228
+
1229
+ #### Grid
1230
+ | Atom | CSS |
1231
+ |------|-----|
1232
+ | \`_gc1\`-\`_gc12\` | \`grid-template-columns:repeat(N,...)\` |
1233
+ | \`_gr1\`-\`_gr6\` | \`grid-template-rows:repeat(N,...)\` |
1234
+ | \`_span1\`-\`_span12\`, \`_spanfull\` | column span |
1235
+ | \`_rowspan1\`-\`_rowspan6\` | row span |
1236
+
1237
+ #### Visual
1238
+ | Atom | CSS |
1239
+ |------|-----|
1240
+ | \`_rounded\` | \`border-radius:var(--d-radius)\` |
1241
+ | \`_roundedfull\` | \`border-radius:9999px\` |
1242
+ | \`_roundedsm\`, \`_roundedlg\`, \`_roundedxl\` | radius variants |
1243
+ | \`_shadow\`, \`_shadowmd\`, \`_shadowlg\` | box-shadow presets |
1244
+ | \`_bordernone\` | \`border:none\` |
1245
+ | \`_bw{n}\` | \`border-width:{n}px\` |
1246
+ | \`_op0\`-\`_op100\` | opacity (0, 25, 50, 75, 100) |
1247
+ | \`_trans\` | \`transition:all 0.15s ease\` |
1248
+ | \`_visible\`, \`_invisible\` | visibility |
1249
+
1250
+ Responsive prefixes: \`_sm:\`, \`_md:\`, \`_lg:\` (e.g. \`_md:gc2\`, \`_lg:gc4\`, \`_sm:flex\`).
1251
+
1252
+ ### Section Labels
1253
+
1254
+ Use the d-label class for uppercase section headings.
1255
+ Anchor with a left accent border: \`border-left: 2px solid var(--d-accent); padding-left: 0.5rem\`.
1256
+
1257
+ ### Empty States
1258
+
1259
+ Every data-driven section should handle zero-data gracefully.
1260
+ Pattern: centered 48px muted icon + descriptive message + optional CTA button.
1261
+
1262
+ ### Page Transitions
1263
+
1264
+ If the theme provides motion tokens, apply the \`entrance-fade\` class to page content containers for smooth page-to-page transitions.
1265
+
1266
+ ### Navigation Shortcuts
1267
+
1268
+ If the essence defines hotkeys or command_palette, implement as keyboard event listeners (useEffect + keydown) \u2014 not as visible UI text.
1082
1269
 
1083
1270
  ### Design Tokens
1084
1271
 
@@ -1583,23 +1770,24 @@ async function refreshDerivedFiles(projectRoot, essence, registry, prefetchedThe
1583
1770
  writeFileSync(tokensPath, generateTokensCSS(themeData, mode, spatialTokens));
1584
1771
  }
1585
1772
  const treatmentsPath = join(stylesDir, "treatments.css");
1586
- writeFileSync(treatmentsPath, generateTreatmentCSS(
1773
+ let treatmentCSS = generateTreatmentCSS(
1587
1774
  spatialTokens,
1588
1775
  themeData?.treatments,
1589
1776
  themeData?.decorators,
1590
1777
  themeName
1591
- ));
1778
+ );
1779
+ const personalityCSS = generatePersonalityCSS(personality || [], themeData || {});
1780
+ treatmentCSS += personalityCSS;
1781
+ writeFileSync(treatmentsPath, treatmentCSS);
1592
1782
  const globalPath = join(stylesDir, "global.css");
1593
1783
  if (!existsSync(globalPath)) {
1594
1784
  writeFileSync(globalPath, generateGlobalCSS(personality));
1595
1785
  }
1596
1786
  const cssFiles = [tokensPath, treatmentsPath, globalPath];
1597
- const treatmentsMdPath = join(contextDir, "treatments.md");
1598
- writeFileSync(treatmentsMdPath, generateTreatmentsContext(themeData, themeName));
1599
1787
  const decantrMdPath = join(projectRoot, "DECANTR.md");
1600
1788
  writeFileSync(decantrMdPath, generateDecantrMdV31(guardMode, CSS_APPROACH_CONTENT));
1601
1789
  const hasSections = essence.blueprint.sections && essence.blueprint.sections.length > 0;
1602
- const contextFiles = [treatmentsMdPath];
1790
+ const contextFiles = [];
1603
1791
  if (!hasSections) {
1604
1792
  const summaryPath = join(contextDir, "essence-summary.md");
1605
1793
  writeFileSync(summaryPath, generateEssenceSummaryV3(essence));
@@ -1648,7 +1836,8 @@ async function refreshDerivedFiles(projectRoot, essence, registry, prefetchedThe
1648
1836
  const spec = {
1649
1837
  description: inner.description || "",
1650
1838
  components: inner.components || [],
1651
- slots
1839
+ slots,
1840
+ layout_hints: inner.layout_hints
1652
1841
  };
1653
1842
  if (!spec.components || spec.components.length === 0) {
1654
1843
  const syntheticComps = generateSyntheticComponents(name, spec.description);
@@ -1729,7 +1918,8 @@ async function refreshDerivedFiles(projectRoot, essence, registry, prefetchedThe
1729
1918
  shellInfoCache[shellId] = {
1730
1919
  description: inner.description || "",
1731
1920
  regions: inner.config?.regions || [],
1732
- layout: inner.layout || void 0
1921
+ layout: inner.layout || void 0,
1922
+ guidance: inner.guidance || void 0
1733
1923
  };
1734
1924
  }
1735
1925
  } catch {
@@ -1827,7 +2017,8 @@ async function refreshDerivedFiles(projectRoot, essence, registry, prefetchedThe
1827
2017
  const spec = {
1828
2018
  description: inner.description || "",
1829
2019
  components: inner.components || [],
1830
- slots
2020
+ slots,
2021
+ layout_hints: inner.layout_hints
1831
2022
  };
1832
2023
  if (!spec.components || spec.components.length === 0) {
1833
2024
  const syntheticComps = generateSyntheticComponents(name, spec.description);
@@ -1881,7 +2072,8 @@ async function refreshDerivedFiles(projectRoot, essence, registry, prefetchedThe
1881
2072
  v30ShellInfo = {
1882
2073
  description: inner.description || "",
1883
2074
  regions: inner.config?.regions || [],
1884
- layout: inner.layout || void 0
2075
+ layout: inner.layout || void 0,
2076
+ guidance: inner.guidance || void 0
1885
2077
  };
1886
2078
  }
1887
2079
  } catch {
@@ -2015,6 +2207,15 @@ function generateSectionContext(input) {
2015
2207
  }
2016
2208
  }
2017
2209
  lines.push("");
2210
+ if (shellInfo?.guidance && Object.keys(shellInfo.guidance).length > 0) {
2211
+ lines.push(`## Shell Notes (${section.shell})`);
2212
+ lines.push("");
2213
+ for (const [key, value] of Object.entries(shellInfo.guidance)) {
2214
+ const label = key.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
2215
+ lines.push(`- **${label}:** ${value}`);
2216
+ }
2217
+ lines.push("");
2218
+ }
2018
2219
  lines.push("---");
2019
2220
  lines.push("");
2020
2221
  lines.push(`**Guard:** ${guardConfig.mode} mode | DNA violations = ${guardConfig.dna_enforcement} | Blueprint violations = ${guardConfig.blueprint_enforcement}`);
@@ -2039,6 +2240,10 @@ function generateSectionContext(input) {
2039
2240
  }
2040
2241
  lines.push("");
2041
2242
  }
2243
+ const themePrefix = themeName.split("-")[0] || themeName;
2244
+ lines.push("");
2245
+ lines.push(`Usage: \`className={css('_flex _col _gap4') + ' d-surface ${themePrefix}-glass'}\` \u2014 atoms via css(), treatments and theme decorators as plain class strings.`);
2246
+ lines.push("");
2042
2247
  lines.push("---");
2043
2248
  lines.push("");
2044
2249
  if (zoneContext) {
@@ -2091,6 +2296,12 @@ function generateSectionContext(input) {
2091
2296
  for (const [slot, desc] of Object.entries(spec.slots)) {
2092
2297
  lines.push(`- \`${slot}\`: ${desc}`);
2093
2298
  }
2299
+ if (spec.layout_hints && Object.keys(spec.layout_hints).length > 0) {
2300
+ lines.push(` **Layout guidance:**`);
2301
+ for (const [key, value] of Object.entries(spec.layout_hints)) {
2302
+ lines.push(` - ${key}: ${value}`);
2303
+ }
2304
+ }
2094
2305
  lines.push("");
2095
2306
  }
2096
2307
  lines.push("---");
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./chunk-D3W3MYKT.js";
2
- import "./chunk-T7CQSJGV.js";
1
+ import "./chunk-G77ADKWE.js";
2
+ import "./chunk-VKWRNLHR.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RegistryClient,
3
3
  refreshDerivedFiles
4
- } from "./chunk-T7CQSJGV.js";
4
+ } from "./chunk-VKWRNLHR.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.4",
3
+ "version": "1.5.6",
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": {
@@ -1,66 +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 | Density | Advisory | Follow spacing guidelines loosely |
21
- | 4 | DNA | Accessibility | Advisory | Meet WCAG level from essence where possible |
22
- | 5 | DNA | Theme-mode | Advisory | Use the specified theme/mode combination |
23
- | 6 | Blueprint | Structure | Advisory | Follow the page structure, add placeholder content |
24
- | 7 | Blueprint | Layout | Advisory | Use suggested patterns, order can be adjusted |
25
- | 8 | Blueprint | Pattern-exists | Advisory | Use patterns that exist in the registry |
26
-
27
- ## Checklist
28
-
29
- Before scaffolding:
30
-
31
- - [ ] Read `decantr.essence.json`
32
- - [ ] Understand the target framework ({{TARGET}})
33
- - [ ] Know the theme ({{THEME_STYLE}}) and mode ({{THEME_MODE}})
34
- - [ ] Review the page structure
35
-
36
- During scaffolding:
37
-
38
- - [ ] Create the shell layout ({{DEFAULT_SHELL}})
39
- - [ ] Generate pages from `blueprint.pages[]`
40
- - [ ] Add pattern placeholders for each page's `layout[]`
41
- - [ ] Apply theme colors and typography
42
- - [ ] Set up routing based on page IDs
43
-
44
- After scaffolding:
45
-
46
- - [ ] Run `npx @decantr/cli validate` to check the essence
47
- - [ ] Verify each page renders correctly
48
- - [ ] Check theme consistency across pages
3
+ **Enforcement Tier: Creative** — Guard rules are advisory during initial scaffolding.
49
4
 
50
5
  ## What to Generate
51
6
 
52
7
  {{SCAFFOLD_STRUCTURE}}
53
8
 
54
- ## Next Steps
55
-
56
- After scaffolding is complete:
57
-
58
- 1. Run the development server
59
- 2. Verify all pages load
60
- 3. Check theme consistency
61
- 4. Run `npx @decantr/cli validate`
62
-
63
- Once verified, subsequent changes will use **{{GUARD_MODE}}** enforcement mode.
9
+ Post-scaffold enforcement mode: **{{GUARD_MODE}}**.
64
10
 
65
11
  ---
66
12