@decantr/cli 1.1.1 → 1.2.0

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.
@@ -2,19 +2,22 @@
2
2
 
3
3
  **Enforcement Tier: Guided**
4
4
 
5
- You are adding new pages or features to an existing Decantr project. Guard rules 1, 2, and 4 are enforced.
5
+ You are adding new pages or features to an existing Decantr project. Guided mode enforces rules 1-5 (DNA) + 6, 8 (Blueprint).
6
6
 
7
7
  ---
8
8
 
9
9
  ## Enforced Rules
10
10
 
11
- | # | Rule | Enforcement | What It Means |
12
- |---|------|-------------|---------------|
13
- | 1 | **Style** | ENFORCED | You MUST use theme `{{THEME_STYLE}}` |
14
- | 2 | **Structure** | ENFORCED | Page MUST exist in essence before generating code |
15
- | 3 | Layout | advisory | Pattern order is flexible |
16
- | 4 | **Recipe** | ENFORCED | You MUST use recipe `{{THEME_RECIPE}}` |
17
- | 5 | Density | advisory | Spacing can vary slightly |
11
+ | # | Layer | Rule | Enforcement | What It Means |
12
+ |---|-------|------|-------------|---------------|
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 |
20
+ | 8 | Blueprint | **Pattern-exists** | ENFORCED | All patterns must exist in the registry |
18
21
 
19
22
  ## Before You Start
20
23
 
@@ -24,14 +27,16 @@ Before generating code for a new page, add it to the essence:
24
27
 
25
28
  ```json
26
29
  {
27
- "structure": [
28
- // ... existing pages ...
29
- {
30
- "id": "new-page-id",
31
- "shell": "{{DEFAULT_SHELL}}",
32
- "layout": ["pattern-1", "pattern-2"]
33
- }
34
- ]
30
+ "blueprint": {
31
+ "shell": "{{DEFAULT_SHELL}}",
32
+ "pages": [
33
+ // ... existing pages ...
34
+ {
35
+ "id": "new-page-id",
36
+ "layout": ["pattern-1", "pattern-2"]
37
+ }
38
+ ]
39
+ }
35
40
  }
36
41
  ```
37
42
 
@@ -51,7 +56,7 @@ Only after the page exists in the essence should you generate code for it.
51
56
 
52
57
  Before adding a page:
53
58
 
54
- - [ ] The page ID is added to `structure[]` in essence
59
+ - [ ] The page ID is added to `blueprint.pages[]` in essence
55
60
  - [ ] The page has a `shell` defined
56
61
  - [ ] The page has a `layout[]` with pattern IDs
57
62
  - [ ] Validation passes (`npx @decantr/cli validate`)
@@ -75,7 +80,7 @@ If the user asks you to generate a page that doesn't exist in the essence:
75
80
 
76
81
  ```
77
82
  STOP: I cannot generate code for page "{{page}}" because it's not
78
- in the essence structure. This would violate the Structure guard rule.
83
+ in the essence blueprint. This would violate the Structure guard rule.
79
84
 
80
85
  Would you like me to:
81
86
  1. Add "{{page}}" to the essence first, then generate the code?
@@ -91,7 +96,7 @@ Please confirm how you'd like to proceed.
91
96
  When adding features (auth, search, payments, etc.):
92
97
 
93
98
  1. Add the feature to `features[]` in the essence
94
- 2. Update relevant pages in `structure[]`
99
+ 2. Update relevant pages in `blueprint.pages[]`
95
100
  3. Then implement the feature
96
101
 
97
102
  ## Pattern Selection
@@ -2,19 +2,22 @@
2
2
 
3
3
  **Enforcement Tier: Strict**
4
4
 
5
- You are modifying existing code in a Decantr project. ALL 5 guard rules are enforced exactly.
5
+ You are modifying existing code in a Decantr project. ALL 8 guard rules are enforced exactly.
6
6
 
7
7
  ---
8
8
 
9
9
  ## Enforced Rules
10
10
 
11
- | # | Rule | Enforcement | Consequence of Violation |
12
- |---|------|-------------|--------------------------|
13
- | 1 | **Style** | STRICT | ERROR — Code rejected |
14
- | 2 | **Structure** | STRICT | ERROR — Code rejected |
15
- | 3 | **Layout** | STRICT | ERRORPattern order must match exactly |
16
- | 4 | **Recipe** | STRICT | ERROR — Code rejected |
17
- | 5 | **Density** | STRICT | WARNINGFlagged for review |
11
+ | # | Layer | Rule | Enforcement | Consequence of Violation |
12
+ |---|-------|------|-------------|--------------------------|
13
+ | 1 | DNA | **Style** | STRICT | ERROR — Code rejected |
14
+ | 2 | DNA | **Recipe** | STRICT | ERROR — Code rejected |
15
+ | 3 | DNA | **Density** | STRICT | WARNINGFlagged for review |
16
+ | 4 | DNA | **Accessibility** | STRICT | ERROR — Code rejected |
17
+ | 5 | DNA | **Theme-mode** | STRICT | ERRORCode rejected |
18
+ | 6 | Blueprint | **Structure** | STRICT | ERROR — Code rejected |
19
+ | 7 | Blueprint | **Layout** | STRICT | ERROR — Pattern order must match exactly |
20
+ | 8 | Blueprint | **Pattern-exists** | STRICT | ERROR — Code rejected |
18
21
 
19
22
  ## Violation Response Protocol
20
23
 
@@ -68,7 +71,7 @@ decantr_read_essence()
68
71
 
69
72
  For the page you're modifying, verify:
70
73
 
71
- - Page ID exists in `structure[]`
74
+ - Page ID exists in `blueprint.pages[]`
72
75
  - Shell matches the page's `shell` property
73
76
  - Patterns match the page's `layout[]` in order
74
77
  - Theme matches `theme.style`
@@ -14,13 +14,16 @@ Generate the initial project structure based on the essence specification.
14
14
 
15
15
  During scaffolding, the following rules are recommendations, not requirements:
16
16
 
17
- | Rule | Status | Guidance |
18
- |------|--------|----------|
19
- | Style | Advisory | Use the theme from essence, but creative variations are acceptable |
20
- | Structure | Advisory | Follow the page structure, add placeholder content |
21
- | Layout | Advisory | Use suggested patterns, order can be adjusted |
22
- | Recipe | Advisory | Apply recipe styles where possible |
23
- | Density | Advisory | Follow spacing guidelines loosely |
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 |
24
27
 
25
28
  ## Checklist
26
29
 
@@ -34,7 +37,7 @@ Before scaffolding:
34
37
  During scaffolding:
35
38
 
36
39
  - [ ] Create the shell layout ({{DEFAULT_SHELL}})
37
- - [ ] Generate pages from `structure[]`
40
+ - [ ] Generate pages from `blueprint.pages[]`
38
41
  - [ ] Add pattern placeholders for each page's `layout[]`
39
42
  - [ ] Apply theme colors and typography
40
43
  - [ ] Set up routing based on page IDs
@@ -1,10 +0,0 @@
1
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
- }) : x)(function(x) {
4
- if (typeof require !== "undefined") return require.apply(this, arguments);
5
- throw Error('Dynamic require of "' + x + '" is not supported');
6
- });
7
-
8
- export {
9
- __require
10
- };