@pugi/cli 1.0.0-alpha.235 → 1.0.0-alpha.238

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pugi/cli",
3
- "version": "1.0.0-alpha.235",
3
+ "version": "1.0.0-alpha.238",
4
4
  "description": "Pugi CLI - terminal-native software execution system",
5
5
  "license": "MIT",
6
6
  "homepage": "https://pugi.io",
@@ -41,11 +41,11 @@
41
41
  "THIRD_PARTY_NOTICES.md"
42
42
  ],
43
43
  "optionalDependencies": {
44
- "@pugi/cli-darwin-arm64": "1.0.0-alpha.235",
45
- "@pugi/cli-darwin-x64": "1.0.0-alpha.235",
46
- "@pugi/cli-linux-arm64": "1.0.0-alpha.235",
47
- "@pugi/cli-linux-x64": "1.0.0-alpha.235",
48
- "@pugi/cli-windows-arm64": "1.0.0-alpha.235",
49
- "@pugi/cli-windows-x64": "1.0.0-alpha.235"
44
+ "@pugi/cli-darwin-arm64": "1.0.0-alpha.238",
45
+ "@pugi/cli-darwin-x64": "1.0.0-alpha.238",
46
+ "@pugi/cli-linux-arm64": "1.0.0-alpha.238",
47
+ "@pugi/cli-linux-x64": "1.0.0-alpha.238",
48
+ "@pugi/cli-windows-arm64": "1.0.0-alpha.238",
49
+ "@pugi/cli-windows-x64": "1.0.0-alpha.238"
50
50
  }
51
51
  }
@@ -2,7 +2,8 @@
2
2
 
3
3
  These skills are part of Sofia's (designer) skill pack. They help her go from a
4
4
  brief to a design system to the clickable HTML prototype that the customer
5
- approves at the plan gate (`.pugi/artifacts/prototype.html`, BACKLOG AO).
5
+ approves at the plan gate (`.pugi/artifacts/prototype.html`, BACKLOG AO), and,
6
+ since 2026-10-17, carry the craft rules every build turn is held to.
6
7
 
7
8
  The skill pack generator copies this file and `LICENSE-APACHE-2.0` into every
8
9
  vendored skill directory, so each one carries its attribution wherever it is
@@ -10,21 +11,40 @@ baked.
10
11
 
11
12
  Both upstream projects are licensed under the Apache License, Version 2.0. The
12
13
  full licence text is in `LICENSE-APACHE-2.0` next to this file. The LICENSE file
13
- of each repository was checked on 2026-10-04 before anything was copied.
14
- Neither repository ships a NOTICE file, so this file is the attribution.
14
+ of each repository was checked before anything was copied (2026-10-04 and
15
+ 2026-10-17). Neither repository ships a NOTICE file, so this file is the
16
+ attribution.
15
17
 
16
18
  ## nexu-io/open-design
17
19
 
18
20
  - Source: https://github.com/nexu-io/open-design
19
- - Commit: 53231d40b778d88eba23f35547bf99485d3ae9fc (2026-09-30)
20
21
  - Licence: Apache-2.0, "Copyright 2026 Open Design contributors"
21
22
  - The upstream `skills/README.md` says skills are Apache-2.0 unless their own
22
- `LICENSE` says otherwise. Neither directory copied here has its own licence.
23
+ `LICENSE` says otherwise. No directory copied here has its own licence.
24
+ - Commit 53231d40b778d88eba23f35547bf99485d3ae9fc (2026-09-30) for the two
25
+ prototype skills; commit 78d5637cb49da07e81314d1544b5fc6d37c95084 (v0.25.1,
26
+ 2026-10-16) for the craft rules and the two ports below.
23
27
 
24
28
  | Pugi skill | Upstream path | Files copied |
25
29
  |---|---|---|
26
30
  | `od-web-prototype` | `design-templates/web-prototype/` | `SKILL.md`, `assets/template.html`, `references/layouts.md`, `references/checklist.md` |
27
31
  | `od-reference-design-contract` | `skills/reference-design-contract/` | `SKILL.md`, `references/checklist.md` |
32
+ | `od-craft` | `craft/` | all twelve documents, as `references/<name>.md`: `README.md`, `accessibility-baseline.md`, `animation-discipline.md`, `anti-ai-slop.md`, `color.md`, `form-validation.md`, `laws-of-ux.md`, `rtl-and-bidi.md`, `state-coverage.md`, `typography-hierarchy-editorial.md`, `typography-hierarchy.md`, `typography.md` |
33
+
34
+ Upstream attributions kept inside those files: `craft/` is adapted from
35
+ referodesign/refero_skill (MIT, © Refero Design); the "Adapted from" lines
36
+ stay where upstream put them.
37
+
38
+ ### Ports (derivative works, Apache-2.0 §4), not copies
39
+
40
+ | Pugi file | Upstream source | What changed |
41
+ |---|---|---|
42
+ | `packages/opencode/src/session/design-lint.ts` | `apps/daemon/src/lint-artifact.ts` | The seven P0 checks and the external-image advisory are kept; the finding shape is local; it runs over a workspace (source and `dist/`) rather than one artifact body; Tailwind utility-class forms of each sin are added; the deck, `data-od-id`, all-caps tracking and raw-hex checks are dropped; the sans-display check fires only when a serif display token is bound. The daemon's analytics were never in this file. |
43
+ | `packages/opencode/src/scaffold/design-direction.ts` | `apps/daemon/src/prompts/directions.ts` | The five schools are kept as postures; labels no longer name other brands; palettes are hex; faces are the Google fonts the starters link; two directions added; no question form (the direction is decided by the model, never asked of the customer). |
44
+ | `packages/plugin-pugi-personas/src/craft-digest.ts` | `craft/*.md` | A condensed summary written by Pugi from the twelve documents. |
45
+
46
+ Nothing ported touches the network: open-design's PostHog / Langfuse telemetry
47
+ lives in its apps, none of which were taken.
28
48
 
29
49
  ## nexu-io/html-anything
30
50
 
@@ -45,6 +65,12 @@ Neither repository ships a NOTICE file, so this file is the attribution.
45
65
  `web-prototype` would collide across the two sources.
46
66
  - One HTML comment was added under each frontmatter block. It names the source,
47
67
  the commit and these changes.
68
+ - `od-craft/SKILL.md` is written by Pugi (upstream has no skill wrapper for
69
+ `craft/`; its daemon injects the files per `od.craft.requires`). Each
70
+ `references/*.md` begins with one added HTML comment naming the source
71
+ commit and stating that the rest is verbatim; the text below it is
72
+ unchanged, including upstream's references to its own paths
73
+ (`apps/daemon/src/lint-artifact.ts`, `pnpm lint:craft`).
48
74
  - Example files (`example.html`, `example.md`) were not copied.
49
75
  - Every other byte of the copied files is unchanged.
50
76
 
@@ -54,3 +80,6 @@ Two upstream rules conflict on purpose. The output file is
54
80
  `.pugi/artifacts/prototype.html`, not `index.html`. Photos are Pexels CDN URLs
55
81
  taken from Anvil `/v1/images`, not copies in the project, because the console
56
82
  renders the prototype from a single document.
83
+ Where a craft rule names open-design's tokens (`var(--accent)`), the starter's
84
+ own token scheme (`src/globals.css` bare HSL components, `src/theme.css`
85
+ typefaces) wins.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Support. While redistributing the Work or
166
+ Derivative Works thereof, You may choose to offer, and charge a
167
+ fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend,
172
+ and hold each Contributor harmless for any liability incurred by,
173
+ or claims asserted against, such Contributor by reason of your
174
+ accepting any such warranty or support.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Open Design contributors
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,85 @@
1
+ # Third-party skills vendored into the Pugi designer pack
2
+
3
+ These skills are part of Sofia's (designer) skill pack. They help her go from a
4
+ brief to a design system to the clickable HTML prototype that the customer
5
+ approves at the plan gate (`.pugi/artifacts/prototype.html`, BACKLOG AO), and,
6
+ since 2026-10-17, carry the craft rules every build turn is held to.
7
+
8
+ The skill pack generator copies this file and `LICENSE-APACHE-2.0` into every
9
+ vendored skill directory, so each one carries its attribution wherever it is
10
+ baked.
11
+
12
+ Both upstream projects are licensed under the Apache License, Version 2.0. The
13
+ full licence text is in `LICENSE-APACHE-2.0` next to this file. The LICENSE file
14
+ of each repository was checked before anything was copied (2026-10-04 and
15
+ 2026-10-17). Neither repository ships a NOTICE file, so this file is the
16
+ attribution.
17
+
18
+ ## nexu-io/open-design
19
+
20
+ - Source: https://github.com/nexu-io/open-design
21
+ - Licence: Apache-2.0, "Copyright 2026 Open Design contributors"
22
+ - The upstream `skills/README.md` says skills are Apache-2.0 unless their own
23
+ `LICENSE` says otherwise. No directory copied here has its own licence.
24
+ - Commit 53231d40b778d88eba23f35547bf99485d3ae9fc (2026-09-30) for the two
25
+ prototype skills; commit 78d5637cb49da07e81314d1544b5fc6d37c95084 (v0.25.1,
26
+ 2026-10-16) for the craft rules and the two ports below.
27
+
28
+ | Pugi skill | Upstream path | Files copied |
29
+ |---|---|---|
30
+ | `od-web-prototype` | `design-templates/web-prototype/` | `SKILL.md`, `assets/template.html`, `references/layouts.md`, `references/checklist.md` |
31
+ | `od-reference-design-contract` | `skills/reference-design-contract/` | `SKILL.md`, `references/checklist.md` |
32
+ | `od-craft` | `craft/` | all twelve documents, as `references/<name>.md`: `README.md`, `accessibility-baseline.md`, `animation-discipline.md`, `anti-ai-slop.md`, `color.md`, `form-validation.md`, `laws-of-ux.md`, `rtl-and-bidi.md`, `state-coverage.md`, `typography-hierarchy-editorial.md`, `typography-hierarchy.md`, `typography.md` |
33
+
34
+ Upstream attributions kept inside those files: `craft/` is adapted from
35
+ referodesign/refero_skill (MIT, © Refero Design); the "Adapted from" lines
36
+ stay where upstream put them.
37
+
38
+ ### Ports (derivative works, Apache-2.0 §4), not copies
39
+
40
+ | Pugi file | Upstream source | What changed |
41
+ |---|---|---|
42
+ | `packages/opencode/src/session/design-lint.ts` | `apps/daemon/src/lint-artifact.ts` | The seven P0 checks and the external-image advisory are kept; the finding shape is local; it runs over a workspace (source and `dist/`) rather than one artifact body; Tailwind utility-class forms of each sin are added; the deck, `data-od-id`, all-caps tracking and raw-hex checks are dropped; the sans-display check fires only when a serif display token is bound. The daemon's analytics were never in this file. |
43
+ | `packages/opencode/src/scaffold/design-direction.ts` | `apps/daemon/src/prompts/directions.ts` | The five schools are kept as postures; labels no longer name other brands; palettes are hex; faces are the Google fonts the starters link; two directions added; no question form (the direction is decided by the model, never asked of the customer). |
44
+ | `packages/plugin-pugi-personas/src/craft-digest.ts` | `craft/*.md` | A condensed summary written by Pugi from the twelve documents. |
45
+
46
+ Nothing ported touches the network: open-design's PostHog / Langfuse telemetry
47
+ lives in its apps, none of which were taken.
48
+
49
+ ## nexu-io/html-anything
50
+
51
+ - Source: https://github.com/nexu-io/html-anything
52
+ - Commit: 553ed98c283f9c0f489902d035416a972d6a9699 (2026-09-15)
53
+ - Licence: Apache-2.0. The upstream copyright line is the unfilled template
54
+ ("Copyright [yyyy] [name of copyright owner]"), so the copyright belongs to
55
+ the html-anything contributors.
56
+
57
+ | Pugi skill | Upstream path | Files copied |
58
+ |---|---|---|
59
+ | `ha-prototype-web` | `next/src/lib/templates/skills/prototype-web/` | `SKILL.md` |
60
+
61
+ ## Changes made by Pugi (Apache-2.0 §4(b))
62
+
63
+ - The frontmatter `name` of every `SKILL.md` was prefixed (`od-`, `ha-`). Skill
64
+ names are permission patterns in Pugi, and upstream names such as
65
+ `web-prototype` would collide across the two sources.
66
+ - One HTML comment was added under each frontmatter block. It names the source,
67
+ the commit and these changes.
68
+ - `od-craft/SKILL.md` is written by Pugi (upstream has no skill wrapper for
69
+ `craft/`; its daemon injects the files per `od.craft.requires`). Each
70
+ `references/*.md` begins with one added HTML comment naming the source
71
+ commit and stating that the rest is verbatim; the text below it is
72
+ unchanged, including upstream's references to its own paths
73
+ (`apps/daemon/src/lint-artifact.ts`, `pnpm lint:craft`).
74
+ - Example files (`example.html`, `example.md`) were not copied.
75
+ - Every other byte of the copied files is unchanged.
76
+
77
+ Where an upstream rule conflicts with the Pugi plan-gate prototype contract in
78
+ Sofia's persona prompt, the Pugi contract wins.
79
+ Two upstream rules conflict on purpose. The output file is
80
+ `.pugi/artifacts/prototype.html`, not `index.html`. Photos are Pexels CDN URLs
81
+ taken from Anvil `/v1/images`, not copies in the project, because the console
82
+ renders the prototype from a single document.
83
+ Where a craft rule names open-design's tokens (`var(--accent)`), the starter's
84
+ own token scheme (`src/globals.css` bare HSL components, `src/theme.css`
85
+ typefaces) wins.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: od-craft
3
+ description: |
4
+ Brand-agnostic craft rules for any screen the build emits: typography
5
+ (tracking, leading, scale), colour (accent budget, contrast), the seven
6
+ AI-slop tells the design lint blocks, state coverage, motion, accessibility,
7
+ forms, RTL and the laws of UX. Load one reference when a rule's exact
8
+ threshold matters; the condensed digest in the system prompt is the summary.
9
+ triggers:
10
+ - "craft"
11
+ - "typography"
12
+ - "letter-spacing"
13
+ - "accent"
14
+ - "contrast"
15
+ - "ai slop"
16
+ - "design lint"
17
+ - "empty state"
18
+ - "reduced motion"
19
+ - "accessibility"
20
+ - "form validation"
21
+ - "rtl"
22
+ ---
23
+ <!-- Vendored from nexu-io/open-design@78d5637cb49d (craft/), Apache-2.0, Copyright 2026 Open Design contributors. This SKILL.md is written by Pugi: upstream keeps these rules as loose files its daemon injects per skill (`od.craft.requires`), Pugi ships them as one skill with the full text under references/. Each reference carries its own provenance header. See NOTICE.md in this directory. -->
24
+
25
+ # Craft rules (open-design `craft/`)
26
+
27
+ Twelve dense rulebooks, one per dimension of professional UI craft. They are
28
+ true regardless of brand: the design system says WHICH fonts and colours, these
29
+ say HOW they behave. The engine already injects a condensed digest of them
30
+ (`<design-craft>`) into every build turn; load a reference here only when you
31
+ need the exact rule, table or threshold.
32
+
33
+ ## Resource map
34
+
35
+ | Reference | Load it when |
36
+ |---|---|
37
+ | `references/anti-ai-slop.md` | the design lint reported a finding, or before a hero / landing section. The seven cardinal sins it lists are what `design-lint` blocks at P0 |
38
+ | `references/typography.md` | setting any `letter-spacing`, `line-height`, scale or font pairing; CJK text |
39
+ | `references/typography-hierarchy.md` | one element must dominate above the fold; headings read flat or noisy |
40
+ | `references/typography-hierarchy-editorial.md` | a sustained reading surface: blog, docs, long article |
41
+ | `references/color.md` | palette layers, the two-uses-per-screen accent cap, contrast minimums, dark themes |
42
+ | `references/state-coverage.md` | anything that fetches or accepts data: loading / empty / error / edge states |
43
+ | `references/animation-discipline.md` | any transition or micro-interaction; durations, springs, `prefers-reduced-motion` |
44
+ | `references/accessibility-baseline.md` | focus, labels, targets, keyboard paths; WCAG 2.2 AA numbers |
45
+ | `references/form-validation.md` | an interactive form: timing, `:user-invalid`, error wiring, schema |
46
+ | `references/laws-of-ux.md` | composition decisions: pricing (Hick's), dashboards (working memory), onboarding |
47
+ | `references/rtl-and-bidi.md` | Arabic / Hebrew / Persian text or layout; logical CSS properties |
48
+ | `references/README.md` | upstream's own index and attribution |
49
+
50
+ ## How Pugi applies them
51
+
52
+ - The condensed digest is always in the prompt; it is the summary, not the rule.
53
+ - `design-lint` (engine, deterministic) checks the built site for the seven
54
+ sins and a few soft tells at the Ready gate; findings come back once as a fix
55
+ round, then the site ships and the findings are logged.
56
+ - Where a rule conflicts with the starter's token scheme (`src/globals.css`
57
+ holds bare HSL components, `src/theme.css` the typefaces), the starter's
58
+ scheme wins: express the rule in those tokens.
@@ -0,0 +1,108 @@
1
+ <!-- Vendored from nexu-io/open-design@78d5637cb49d (craft/README.md), Apache-2.0, Copyright 2026 Open Design contributors. Modified by Pugi: this header line added; the text below is otherwise verbatim. Paths it names (apps/daemon/src/lint-artifact.ts, pnpm lint:craft, od.craft.requires) are upstream's, not Pugi's: the Pugi port of the linter is packages/opencode/src/session/design-lint.ts. See NOTICE.md in the skill root. -->
2
+
3
+ # Craft references
4
+
5
+ Brand-agnostic craft knowledge. Each file is a small, dense rulebook on one
6
+ dimension of professional UI craft (typography, color, motion, …). Skills
7
+ opt into the references they need; the daemon injects only the requested
8
+ ones into the system prompt above the active skill body.
9
+
10
+ ## Why a fourth axis next to skills, templates, and design systems
11
+
12
+ | Axis | Scope | Example |
13
+ |---|---|---|
14
+ | `skills/` | Functional capabilities invoked while doing work | `design-brief`, `brand-extract`, `imagegen` |
15
+ | `design-templates/` | Packaged artifact shapes | `saas-landing`, `dashboard`, `pricing-page` |
16
+ | `design-systems/` | Brand package: prose, token contract, and optional rich resources | `linear-app`, `apple`, `notion` |
17
+ | `craft/` | **Universal** craft knowledge — true regardless of brand | letter-spacing rules, accent-overuse caps, anti-AI-slop |
18
+
19
+ `DESIGN.md` tells the agent which colors and fonts a brand uses. `craft/`
20
+ tells the agent the universal rules a competent designer applies on top —
21
+ e.g. ALL CAPS always needs ≥0.06em tracking, regardless of the brand.
22
+
23
+ ## How a skill opts in
24
+
25
+ Add an `od.craft.requires` array to the skill's front-matter. Only the
26
+ listed sections are injected, so a skill that needs only typography pays
27
+ no token cost for color/motion content.
28
+
29
+ ```yaml
30
+ od:
31
+ craft:
32
+ requires: [typography, color, anti-ai-slop]
33
+ ```
34
+
35
+ Use the layered stack for editorial skills that require authored hierarchy
36
+ and sustained reading behavior:
37
+
38
+ ```yaml
39
+ od:
40
+ craft:
41
+ requires: [typography, typography-hierarchy, typography-hierarchy-editorial]
42
+ ```
43
+
44
+ Allowed shipped values match the file names in this directory minus the `.md`
45
+ extension. The runtime skips an absent file for compatibility, but repository
46
+ authoring does not silently accept arbitrary values.
47
+
48
+ Run `pnpm lint:craft` after adding or changing `od.craft.requires`. The
49
+ repository guard reports unresolved slugs with their manifest paths, so typos
50
+ cannot silently drop a craft section from the runtime prompt. If a slug is an
51
+ intentional forward reference, list it in `craft/FUTURE_SECTIONS.md` until the
52
+ matching `craft/<slug>.md` file ships.
53
+
54
+ ### Runtime compatibility and authoring failures
55
+
56
+ The loader remains tolerant because externally installed or older bundles may
57
+ reference a section that is unavailable in the current resource set. A missing
58
+ optional paragraph must not make an otherwise usable runtime bundle fail.
59
+
60
+ Checked-in content has a stronger contract: `pnpm lint:craft` and
61
+ `pnpm guard` fail on malformed slugs and unresolved references. A deliberate
62
+ forward reference is valid only when it is listed in
63
+ `craft/FUTURE_SECTIONS.md`; this makes planned work explicit while preserving
64
+ the runtime compatibility behavior.
65
+
66
+ Note for skill authors arriving from older guidance: an earlier draft
67
+ used `motion` as the future-slug placeholder. The shipped equivalent
68
+ today is `animation-discipline`. Use that one if your skill emits
69
+ motion.
70
+
71
+ ### Enforcement levels
72
+
73
+ Craft files mix auto-checked rules and guidance.
74
+
75
+ - **Auto-checked.** Rules wired into `apps/daemon/src/lint-artifact.ts` — currently the P0 list in `anti-ai-slop.md` (Tailwind-indigo accent, two-stop hero gradients, emoji-as-icons, etc.). The linter reports these as findings back to the UI (for P0/P1 badges) and to the agent (as a system reminder for self-correction). Artifact persistence is not currently hard-blocked on P0 hits.
76
+ - **Guidance.** The rest. The agent reads the rules, reviewers apply them, the linter doesn't check them.
77
+
78
+ A purely behavioral craft file (state-coverage, animation-discipline) is guidance unless a specific rule is later promoted into `lint-artifact.ts`.
79
+
80
+ ## Files
81
+
82
+ | File | Section name | When to require |
83
+ |---|---|---|
84
+ | `typography.md` | `typography` | Any skill that emits typed content (~all skills) |
85
+ | `typography-hierarchy.md` | `typography-hierarchy` | Any skill that emits typed content where hierarchy must feel authored, not assembled — especially surfaces with a strong entry point, varied levels, or intentional rhythm. Compose with `typography`. |
86
+ | `typography-hierarchy-editorial.md` | `typography-hierarchy-editorial` | Skills whose primary artifact is a sustained reading surface: `blog-post`, `docs-page`, `digital-eguide`. Requires `typography` + `typography-hierarchy`. |
87
+ | `color.md` | `color` | Any skill that emits styled output (~all skills) |
88
+ | `anti-ai-slop.md` | `anti-ai-slop` | Marketing pages, landing pages, decks |
89
+ | `state-coverage.md` | `state-coverage` | Any skill with stateful UI (dashboards, mobile apps, forms, list/table views) |
90
+ | `animation-discipline.md` | `animation-discipline` | Any skill that ships motion: mobile apps, multi-screen flows, gamified UI, transitions, microinteractions |
91
+ | `accessibility-baseline.md` | `accessibility-baseline` | Any skill that ships interactive UI: dashboards, forms, mobile flows, anything with focus/labels/keyboard paths |
92
+ | `rtl-and-bidi.md` | `rtl-and-bidi` | Any skill that ships localized text or layout: blogs, docs, financial tables, mobile apps, anything that may render Arabic / Hebrew / Persian |
93
+ | `form-validation.md` | `form-validation` | Any skill whose primary artifact contains an interactive form: lead capture, sign-in, signup, settings, multi-step intake |
94
+ | `laws-of-ux.md` | `laws-of-ux` | Any skill whose composition decisions hit named cognitive limits: pricing pages (Hick's, Choice Overload, Von Restorff), dashboards (Pareto, Selective Attention, Working Memory), onboarding (Goal-Gradient, Zeigarnik, Peak-End), modals (Fitts's, Tesler's). Sibling axis to the rendering-rule files above — covers what to compose, not how to render. |
95
+
96
+ **Partial-stateful skills.** A skill that's mostly static but contains an embedded form, data table, or query surface should opt in. State-coverage rules apply to the stateful component, not the whole page.
97
+
98
+ Planned-but-unshipped slugs are recorded in
99
+ [`FUTURE_SECTIONS.md`](FUTURE_SECTIONS.md); do not hard-code a second future
100
+ list here.
101
+
102
+ ## Attribution
103
+
104
+ Craft content is adapted from the MIT-licensed
105
+ [refero_skill](https://github.com/referodesign/refero_skill) project
106
+ (© Refero Design), with edits to fit OpenDesign's house style and link
107
+ back to OD's design tokens (`var(--accent)` etc.) instead of generic
108
+ Tailwind hex values.