rafters 0.0.7 → 0.0.9

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/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,32 +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 --rebuild # Regenerate output files from existing tokens
26
- rafters init --reset # Re-run generators fresh, replacing persisted tokens
27
- 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
28
24
  ```
29
25
 
30
- **Supported frameworks:** Next.js, Vite, Remix, React Router, Astro
26
+ **Detected frameworks:** Next.js, Vite, Remix, React Router, Astro
31
27
 
32
28
  **Export formats** (configured during init):
33
29
 
@@ -45,29 +41,27 @@ Automatically detects and migrates existing shadcn/ui color values. Requires Tai
45
41
  Add components from the Rafters registry to your project.
46
42
 
47
43
  ```bash
48
- rafters add button dialog # Add specific components
49
- rafters add --list # List all available components
50
- 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
51
47
  ```
52
48
 
53
49
  Components include embedded design intelligence: cognitive load ratings (1-7), accessibility requirements, do/never guidance, and trust-building patterns. Dependencies are resolved automatically.
54
50
 
55
- ### `rafters studio`
51
+ ### `rafters mcp`
56
52
 
57
- Launch Studio for visual token editing.
53
+ Start the MCP server for AI agent access via stdio transport.
58
54
 
59
55
  ```bash
60
- rafters studio
56
+ pnpm dlx rafters mcp
61
57
  ```
62
58
 
63
- 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.
64
-
65
- ### `rafters mcp`
59
+ ### `rafters studio`
66
60
 
67
- 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.
68
62
 
69
63
  ```bash
70
- rafters mcp
64
+ pnpm dlx rafters studio
71
65
  ```
72
66
 
73
67
  ## MCP Tools
@@ -96,13 +90,13 @@ Token dependency graph, derivation rules, and human override context. Returns ho
96
90
 
97
91
  ## How It Works
98
92
 
99
- 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.
100
94
 
101
95
  Three layers:
102
96
 
103
- - **What** (Components) - 55 React components with embedded intelligence metadata
104
- - **Where** (Tokens) - 240+ tokens with dependency graph and human override tracking
105
- - **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
106
100
 
107
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.
108
102