rafters 0.0.6 → 0.0.8

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +23 -28
  3. package/dist/index.js +3855 -3396
  4. package/package.json +4 -2
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ezmode Games
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,31 +2,28 @@
2
2
 
3
3
  Design Intelligence CLI. Scaffold tokens, add components, and serve an MCP server so AI agents build UIs with designer-level judgment instead of guessing.
4
4
 
5
- ## Install
5
+ ## Quick Start
6
6
 
7
7
  ```bash
8
- npx rafters init
8
+ pnpm dlx rafters init
9
9
  ```
10
10
 
11
- Or install globally:
12
-
13
- ```bash
14
- pnpm add -g rafters
15
- ```
11
+ This detects your framework, scaffolds `.rafters/` with a complete token system, and generates output files.
16
12
 
17
13
  ## Commands
18
14
 
19
15
  ### `rafters init`
20
16
 
21
- Initialize a project with design tokens. Detects your framework, scaffolds `.rafters/` with a complete token system, and generates output files.
17
+ Initialize a project with design tokens.
22
18
 
23
19
  ```bash
24
- rafters init # Interactive setup
25
- rafters init --force # Regenerate output from existing config
26
- rafters init --agent # JSON output for CI/machine consumption
20
+ pnpm dlx rafters init # Interactive setup
21
+ pnpm dlx rafters init --rebuild # Regenerate output files from existing tokens
22
+ pnpm dlx rafters init --reset # Re-run generators fresh, replacing persisted tokens
23
+ pnpm dlx rafters init --agent # JSON output for CI/machine consumption
27
24
  ```
28
25
 
29
- **Supported frameworks:** Next.js, Vite, Remix, React Router, Astro
26
+ **Detected frameworks:** Next.js, Vite, Remix, React Router, Astro
30
27
 
31
28
  **Export formats** (configured during init):
32
29
 
@@ -35,7 +32,7 @@ rafters init --agent # JSON output for CI/machine consumption
35
32
  | Tailwind CSS | `rafters.css` | Yes | CSS custom properties with `@theme` |
36
33
  | TypeScript | `rafters.ts` | Yes | Type-safe constants with JSDoc intelligence |
37
34
  | DTCG JSON | `rafters.json` | No | W3C Design Tokens standard format |
38
- | Compiled CSS | `rafters.compiled.css` | No | Pre-processed, no build step needed |
35
+ | Standalone CSS | `rafters.standalone.css` | No | Pre-built, no Tailwind required |
39
36
 
40
37
  Automatically detects and migrates existing shadcn/ui color values. Requires Tailwind v4.
41
38
 
@@ -44,29 +41,27 @@ Automatically detects and migrates existing shadcn/ui color values. Requires Tai
44
41
  Add components from the Rafters registry to your project.
45
42
 
46
43
  ```bash
47
- rafters add button dialog # Add specific components
48
- rafters add --list # List all available components
49
- rafters add --overwrite # Replace existing files
44
+ pnpm dlx rafters add button dialog # Add specific components
45
+ pnpm dlx rafters add --list # List all available components
46
+ pnpm dlx rafters add --overwrite # Replace existing files
50
47
  ```
51
48
 
52
49
  Components include embedded design intelligence: cognitive load ratings (1-7), accessibility requirements, do/never guidance, and trust-building patterns. Dependencies are resolved automatically.
53
50
 
54
- ### `rafters studio`
51
+ ### `rafters mcp`
55
52
 
56
- Launch Studio for visual token editing.
53
+ Start the MCP server for AI agent access via stdio transport.
57
54
 
58
55
  ```bash
59
- rafters studio
56
+ pnpm dlx rafters mcp
60
57
  ```
61
58
 
62
- Opens a Vite-powered UI where you design by doing: pick a primary color, explain why, watch the system paint your scale. Every decision is recorded with reasoning so AI agents read intent instead of guessing.
63
-
64
- ### `rafters mcp`
59
+ ### `rafters studio`
65
60
 
66
- Start the MCP server for AI agent access via stdio transport.
61
+ Launch Studio for visual token editing. Spawns a local Vite dev server from the `@rafters/studio` package.
67
62
 
68
63
  ```bash
69
- rafters mcp
64
+ pnpm dlx rafters studio
70
65
  ```
71
66
 
72
67
  ## MCP Tools
@@ -95,13 +90,13 @@ Token dependency graph, derivation rules, and human override context. Returns ho
95
90
 
96
91
  ## How It Works
97
92
 
98
- Rafters is a Design Intelligence Protocol. AI agents don't have taste - they guess at colors, spacing, hierarchy. Rafters encodes a designer's judgment into queryable data so AI reads decisions instead of guessing.
93
+ Rafters is a Design Intelligence Protocol. AI agents don't have taste -- they guess at colors, spacing, hierarchy. Rafters encodes a designer's judgment into queryable data so AI reads decisions instead of guessing.
99
94
 
100
95
  Three layers:
101
96
 
102
- - **What** (Components) - 55 React components with embedded intelligence metadata
103
- - **Where** (Tokens) - 240+ tokens with dependency graph and human override tracking
104
- - **Why** (Decisions) - Do/never patterns, cognitive load scores, trust patterns, accessibility requirements
97
+ - **What** (Components) -- 55 React components with embedded intelligence metadata
98
+ - **Where** (Tokens) -- 240+ tokens with dependency graph and human override tracking
99
+ - **Why** (Decisions) -- Do/never patterns, cognitive load scores, trust patterns, accessibility requirements
105
100
 
106
101
  The token system uses OKLCH color space, modular scales based on musical ratios, and a dependency engine that automatically derives related values. When a designer overrides a computed value, the system records the reason so AI agents respect the intent.
107
102