@decantr/cli 1.7.22 → 1.7.23

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,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-BWUEX3IA.js";
2
+ import "./chunk-2WQLERIZ.js";
3
3
  import "./chunk-SN7C63TF.js";
4
4
  import "./chunk-QRQCPD3C.js";
@@ -4013,19 +4013,19 @@ function generateGreenfieldPrompt(ctx) {
4013
4013
  lines.push("");
4014
4014
  lines.push("Read in this order:");
4015
4015
  lines.push(
4016
- "1. DECANTR.md for the design spec, treatment catalog, motion/typography/elevation tables, and the Interaction Requirements canonical-implementation table."
4016
+ '1. DECANTR.md for the design spec, "Atoms in 5 minutes" walkthrough, treatment catalog, motion/typography/elevation tables, and the Interaction Requirements canonical-implementation table.'
4017
4017
  );
4018
4018
  lines.push(
4019
- "2. .decantr/context/scaffold-pack.md for the compact compiled shell, theme, feature, and route contract."
4019
+ '2. .decantr/context/scaffold-pack.md \u2014 the canonical compiled contract. Contains the route plan, shell layouts, navigation, AND the project-wide "Required Theme Decorators" table (class | intent | apply-to). This table is the authoritative decorator contract; section packs reference it.'
4020
4020
  );
4021
4021
  lines.push(
4022
4022
  "3. .decantr/context/scaffold.md for the broader app overview, topology, route map, and voice guidance."
4023
4023
  );
4024
4024
  lines.push(
4025
- "4. Before working on any section, read its matching .decantr/context/section-*-pack.md and then .decantr/context/section-*.md files."
4025
+ '4. Before working on any section, read its matching .decantr/context/section-*-pack.md (compact contract \u2014 pay close attention to the "Section Directives" block; those are non-negotiable execution rules) and then .decantr/context/section-*.md (long-form context with shell internal_layout + slot guidance).'
4026
4026
  );
4027
4027
  lines.push(
4028
- "5. Before working on any route/page, read its matching .decantr/context/page-*-pack.md file."
4028
+ '5. Before working on any route/page, read its matching .decantr/context/page-*-pack.md file. The "Interactions (MUST implement each)" checklist per pattern is contract \u2014 see the next section.'
4029
4029
  );
4030
4030
  lines.push("");
4031
4031
  lines.push("\u2550\u2550\u2550 INTERACTIONS ARE CONTRACT, NOT GUIDANCE \u2550\u2550\u2550");
@@ -4063,22 +4063,67 @@ function generateGreenfieldPrompt(ctx) {
4063
4063
  "`decantr check --strict` FAILS the build when a declared interaction has no matching implementation. The full canonical-implementation table is in DECANTR.md."
4064
4064
  );
4065
4065
  lines.push("");
4066
+ lines.push("\u2550\u2550\u2550 ATOMS-FIRST FOR LAYOUT \u2014 DO NOT INLINE-STYLE \u2550\u2550\u2550");
4067
+ lines.push("");
4068
+ lines.push(
4069
+ 'Decantr ships @decantr/css as a runtime atom system (already in package.json). Use atoms via `css(...)` for ALL layout, spacing, sizing, flex/grid, position, and typography sizing \u2014 wherever you would otherwise reach for `style={{ display: "flex", gap: "1rem", padding: "1rem", ... }}`.'
4070
+ );
4071
+ lines.push("");
4072
+ lines.push("Mandatory translation (NOT optional):");
4073
+ lines.push(
4074
+ ' \u274C style={{ display: "flex", gap: "1rem" }} \u2192 \u2705 className={css("_flex _gap4")}'
4075
+ );
4076
+ lines.push(
4077
+ ' \u274C style={{ flexDirection: "column" }} \u2192 \u2705 className={css("_col")}'
4078
+ );
4079
+ lines.push(
4080
+ ' \u274C style={{ padding: "1rem 1.5rem" }} \u2192 \u2705 className={css("_py4 _px6")}'
4081
+ );
4082
+ lines.push(
4083
+ ' \u274C style={{ gridTemplateColumns: "repeat(3, 1fr)" }} \u2192 \u2705 className={css("_grid _gc3")}'
4084
+ );
4085
+ lines.push(
4086
+ ' \u274C style={{ position: "sticky", top: 0 }} \u2192 \u2705 className={css("_sticky _t0")}'
4087
+ );
4088
+ lines.push(
4089
+ ' \u274C style={{ width: "100%", maxWidth: "40rem" }} \u2192 \u2705 className={css("_w-full _maxw[40rem]")}'
4090
+ );
4091
+ lines.push("");
4092
+ lines.push(
4093
+ 'Combine atoms with treatment / decorator strings: `className={css("_flex _col _gap4") + " d-card clean-card"}`.'
4094
+ );
4095
+ lines.push("");
4096
+ lines.push("Inline `style={{...}}` is ONLY acceptable for:");
4097
+ lines.push(
4098
+ ' 1. CSS custom-property writes the contract REQUIRES (`style={{ "--d-stagger-index": i }}`, `style={{ "--lum-card-color": accent }}`, etc.)'
4099
+ );
4100
+ lines.push(
4101
+ " 2. Truly dynamic geometry no atom can express (computed pan/zoom transforms, draggable-node positions calculated from data, real-time gradient hue interpolation)."
4102
+ );
4103
+ lines.push("");
4104
+ lines.push(
4105
+ 'If you find yourself writing >5 inline styles in a component for static visual values, STOP and migrate to atoms. The full atom reference is in DECANTR.md ("Atoms in 5 minutes" + "Atom Reference"). `decantr check` flags inline-style attributes as a contract violation.'
4106
+ );
4107
+ lines.push("");
4066
4108
  lines.push("\u2550\u2550\u2550 TREATMENT SURFACE \u2014 USE WHAT EXISTS \u2550\u2550\u2550");
4067
4109
  lines.push("");
4068
4110
  lines.push(
4069
- "40+ treatment classes ship in src/styles/treatments.css. Reach for these BEFORE inventing equivalent CSS. Eight families to know:"
4111
+ "60+ treatment classes ship in src/styles/treatments.css. Reach for these BEFORE inventing equivalent CSS. Families:"
4070
4112
  );
4071
4113
  lines.push(
4072
4114
  "- Core surfaces: d-interactive (data-variant + data-size), d-surface, d-data + d-data-row/cell/header, d-control, d-section, d-annotation, d-label"
4073
4115
  );
4074
4116
  lines.push(
4075
- "- Common UI: d-link, d-icon-btn (data-size + data-variant), d-nav-link, d-step-chip, d-divider-{top,bottom,left,right}"
4117
+ '- Common UI: d-link, d-icon-btn (data-size + data-variant), d-nav-link, d-step-chip (data-step-state="pending|active|done"), d-divider-{top,bottom,left,right}'
4118
+ );
4119
+ lines.push(
4120
+ "- Utility primitives (1.7.21): d-tooltip (data-position), d-empty-state, d-breadcrumb + d-breadcrumb-item (data-current) + d-breadcrumb-separator, d-avatar (data-size), d-icon-well (data-size), d-toggle (data-on), d-toc + d-toc-item (data-current), d-popover"
4076
4121
  );
4077
4122
  lines.push(
4078
4123
  '- Spatial / graph: d-agent-node, d-port (data-side, data-active); d-cta-banner; d-interactive[data-variant="dark"]'
4079
4124
  );
4080
4125
  lines.push(
4081
- '- Shells: d-shell + data-layout="sidebar-main|centered|top-nav-footer|sidebar-aside", d-shell-sidebar, d-shell-main, d-shell-aside, d-shell-header, d-shell-body, d-shell-footer, d-shell-centered-card'
4126
+ '- Shells (14 layouts shipped): d-shell + data-layout="sidebar-main | centered | top-nav-footer | sidebar-aside | top-nav-main | minimal-header | full-bleed | recipefork-top-nav | canvas-overlay | chat-portal | copilot-overlay | terminal-split | three-column-browser | workspace-aside". Child regions: d-shell-sidebar, d-shell-main, d-shell-aside, d-shell-header, d-shell-body, d-shell-footer, d-shell-centered-card, d-shell-list (three-column-browser), d-shell-copilot (copilot-overlay), d-shell-status-bar + d-shell-hotkey-bar (terminal-split), d-shell-overlay (canvas-overlay, with data-corner). d-shell-mobile-trigger + d-shell-mobile-backdrop close the mobile drawer loop.'
4082
4127
  );
4083
4128
  lines.push(
4084
4129
  '- Modal / palette: d-modal (data-align="top"), d-modal-backdrop, d-modal-panel (data-size="sm|lg"), d-palette + d-palette-input/list/row/section, d-kbd, d-hotkey-indicator'
@@ -4099,6 +4144,15 @@ function generateGreenfieldPrompt(ctx) {
4099
4144
  "Token scales are tunable via CSS vars: --d-motion-{instant,fast,base,slow,slower}, --d-text-{xs..6xl}, --d-elevation-{1..5}, --d-tracking-*, --d-leading-*, --d-weight-*. Themes override per-blueprint."
4100
4145
  );
4101
4146
  lines.push("");
4147
+ lines.push("\u2550\u2550\u2550 THEME DECORATOR CONTRACT \u2014 APPLY OR THE THEME DOES NOT LAND \u2550\u2550\u2550");
4148
+ lines.push("");
4149
+ lines.push(
4150
+ 'Each theme ships 5-15 namespaced decorator classes (`clean-card`, `lum-glass`, `carbon-canvas`, `paper-card`, etc.). The full Class | Intent | Apply-to contract for the active theme is in scaffold-pack.md under "Required Theme Decorators". Apply them as additive classes alongside d-* treatments \u2014 that is what makes the theme look like the theme rather than "themed colors only."'
4151
+ );
4152
+ lines.push(
4153
+ 'Section packs ship a one-line pointer to the scaffold-pack table; the canonical contract is in scaffold-pack.md (also mirrored in DECANTR.md "Decorator Quick Reference" with intent + apply-to + key CSS).'
4154
+ );
4155
+ lines.push("");
4102
4156
  lines.push("\u2550\u2550\u2550 HARD RULES (NON-NEGOTIABLE) \u2550\u2550\u2550");
4103
4157
  lines.push("");
4104
4158
  lines.push(
@@ -4110,6 +4164,12 @@ function generateGreenfieldPrompt(ctx) {
4110
4164
  lines.push(
4111
4165
  "- Use lucide-react for ALL iconography (already in package.json). Pick semantic icons (Bot, Activity, Database, Search) over generic ones. Do NOT inline SVGs for icons that have Lucide equivalents."
4112
4166
  );
4167
+ lines.push(
4168
+ "- Section Directives (when present in section-*-pack.md) are non-negotiable execution rules. They define layout proportions, treatment stacks (e.g., card-grid uses d-card + d-elevate[1] + d-lift-hover + theme card decorator + d-stagger-children), copy conventions, and pattern-fitness rules per section. Honor them exactly \u2014 they encode product-quality decisions the registry author made for this archetype."
4169
+ );
4170
+ lines.push(
4171
+ "- Filter chip rows / tab strips MUST use d-step-chip with data-step-state, NOT bare d-interactive. d-step-chip ships proper active-fill, hover-tint, and chip-row sizing. Bare buttons make filter rows look like generic SaaS form controls."
4172
+ );
4113
4173
  lines.push("");
4114
4174
  lines.push("\u2550\u2550\u2550 IMPLEMENTATION RULES \u2550\u2550\u2550");
4115
4175
  lines.push(
@@ -4153,7 +4213,7 @@ function generateGreenfieldPrompt(ctx) {
4153
4213
  lines.push("- Build the shell and shared layout first.");
4154
4214
  lines.push("- Then implement each section's pages using the matching section and page packs.");
4155
4215
  lines.push(
4156
- "- After implementation, run `decantr check`. It runs 8 guard rules including the experiential interactions guard (8th rule, v2.1 C5). It fails strict-mode builds when declared interactions[] are not implemented; the suggestions point at the canonical implementation. `decantr audit` is deprecated \u2014 `decantr check` is the unified entry point."
4216
+ "- After implementation, run `decantr check` (primary gate \u2014 8 guard rules including the experiential interactions guard). It fails strict-mode builds when declared interactions[] are not implemented; the suggestions point at the canonical implementation. Run `decantr audit` (supplementary \u2014 surfaces inline-style counts, security hygiene findings, accessibility / auth-flow advisories) for deeper diagnostics."
4157
4217
  );
4158
4218
  lines.push("- Fix all violations until `decantr check` exits 0.");
4159
4219
  lines.push(
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import "./chunk-BWUEX3IA.js";
1
+ import "./chunk-2WQLERIZ.js";
2
2
  import "./chunk-SN7C63TF.js";
3
3
  import "./chunk-QRQCPD3C.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decantr/cli",
3
- "version": "1.7.22",
3
+ "version": "1.7.23",
4
4
  "description": "Decantr CLI — scaffold, audit, and maintain Decantr projects from the terminal",
5
5
  "author": "Decantr AI",
6
6
  "license": "MIT",
@@ -27,10 +27,10 @@
27
27
  "access": "public"
28
28
  },
29
29
  "dependencies": {
30
- "@decantr/core": "1.0.4",
31
30
  "@decantr/essence-spec": "1.0.5",
32
- "@decantr/registry": "1.0.2",
33
- "@decantr/verifier": "1.0.3"
31
+ "@decantr/core": "1.0.4",
32
+ "@decantr/verifier": "1.0.3",
33
+ "@decantr/registry": "1.0.2"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "tsup",