create-auto-app 1.148.0 → 1.149.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.
package/README.md CHANGED
@@ -1,210 +1,226 @@
1
1
  # create-auto-app
2
2
 
3
- CLI scaffolding tool for creating new Auto Engineer applications.
4
-
5
- ---
3
+ Create Auto Engineer apps with no configuration.
6
4
 
7
5
  ## Purpose
8
6
 
9
- This tool generates complete project structures with templates, dependencies, and configuration. It provides both interactive prompts and command-line options for quick project scaffolding.
10
-
11
- ---
7
+ `create-auto-app` is a CLI scaffolding tool that generates complete Auto Engineer project structures. It copies a selected template, resolves the latest `@auto-engineer/*` package versions from npm, generates a unique project `fileId`, and optionally installs dependencies. It supports both interactive prompts and non-interactive flags.
12
8
 
13
9
  ## Installation
14
10
 
15
11
  ```bash
16
- # Global
12
+ # Global install
17
13
  npm install -g create-auto-app
18
14
 
19
- # Or via npx
15
+ # Or run directly with npx (no install needed)
20
16
  npx create-auto-app
21
17
  ```
22
18
 
19
+ **Requires Node.js >= 18.0.0.**
20
+
23
21
  ## Quick Start
24
22
 
25
23
  ```bash
26
- # Step 1: Create a project
24
+ # 1. Scaffold a new project (interactive mode)
25
+ npx create-auto-app
26
+
27
+ # 2. Or pass a project name directly (uses the "typical" template by default)
27
28
  npx create-auto-app my-app
28
29
 
29
- # Step 2: Navigate and install
30
+ # 3. Enter the project directory
30
31
  cd my-app
31
- pnpm install
32
32
 
33
- # Step 3: Run
34
- pnpm dev
33
+ # 4. Run Auto Engineer
34
+ auto
35
35
  ```
36
36
 
37
- ---
37
+ When run without arguments, the CLI prompts for:
38
+
39
+ 1. **Project name** (default: `my-auto-app`)
40
+ 2. **Template** (if multiple templates are available)
41
+ 3. **Install dependencies?** (default: yes)
38
42
 
39
43
  ## How-to Guides
40
44
 
41
- ### Create with Template
45
+ ### Scaffold in the current directory
42
46
 
43
47
  ```bash
44
- create-auto-app my-shop --template=kanban-todo
48
+ npx create-auto-app .
45
49
  ```
46
50
 
47
- ### Create Minimal Project
51
+ The project name is inferred from the current directory name.
48
52
 
49
- ```bash
50
- create-auto-app my-app --preset=minimal
51
- ```
52
-
53
- ### Scaffold in Current Directory
53
+ ### Use a specific template
54
54
 
55
55
  ```bash
56
- create-auto-app . --preset=full
56
+ npx create-auto-app my-app --template minimal
57
57
  ```
58
58
 
59
- ### Use Specific Package Manager
59
+ ### Choose a package manager
60
+
61
+ The CLI auto-detects your package manager (checks pnpm, then yarn, then falls back to npm). To override:
60
62
 
61
63
  ```bash
62
- create-auto-app my-app --use-pnpm
63
- create-auto-app my-app --use-yarn
64
- create-auto-app my-app --use-npm
64
+ npx create-auto-app my-app --use-pnpm
65
+ npx create-auto-app my-app --use-yarn
66
+ npx create-auto-app my-app --use-npm
65
67
  ```
66
68
 
67
- ### Skip Dependency Installation
69
+ ### Skip dependency installation
68
70
 
69
71
  ```bash
70
- create-auto-app my-app --no-install
72
+ npx create-auto-app my-app --no-install
71
73
  ```
72
74
 
73
- ### Configure for CI/CD
75
+ ### CI/CD usage
76
+
77
+ Combine flags to avoid interactive prompts:
74
78
 
75
79
  ```bash
76
- create-auto-app my-app --preset=full --no-install --use-pnpm
80
+ npx create-auto-app my-app --template typical --no-install --use-pnpm
77
81
  ```
78
82
 
79
- ---
83
+ All required values are provided via flags, so no TTY is needed.
80
84
 
81
85
  ## CLI Reference
82
86
 
83
- ### Commands
84
-
85
- #### `create-auto-app [project-name]`
86
-
87
- Create a new Auto Engineer project.
88
-
89
- ```bash
87
+ ```
90
88
  create-auto-app [project-name] [options]
91
89
  ```
92
90
 
93
- | Option | Alias | Type | Default | Description |
94
- |--------|-------|------|---------|-------------|
95
- | `--template` | `-t` | string | - | Use a specific template |
96
- | `--preset` | `-p` | string | full | Package preset (minimal, full) |
97
- | `--no-install` | - | boolean | false | Skip dependency installation |
98
- | `--use-npm` | - | boolean | false | Force npm |
99
- | `--use-yarn` | - | boolean | false | Force yarn |
100
- | `--use-pnpm` | - | boolean | false | Force pnpm |
91
+ If `project-name` is omitted, the CLI enters interactive mode.
101
92
 
102
- ### Available Templates
93
+ ### Options
103
94
 
104
- | Template | Description |
105
- |----------|-------------|
106
- | `questionnaires` | Survey and questionnaire management system |
107
- | `kanban-todo` | Kanban-style todo list with drag-and-drop |
95
+ | Option | Alias | Default | Description |
96
+ |---|---|---|---|
97
+ | `--template <name>` | `-t` | `typical` | Project template to use |
98
+ | `--no-install` | | | Skip dependency installation |
99
+ | `--use-npm` | | | Force npm as the package manager |
100
+ | `--use-yarn` | | | Force yarn as the package manager |
101
+ | `--use-pnpm` | | | Force pnpm as the package manager |
102
+ | `--version` | `-V` | | Print version number |
103
+ | `--help` | `-h` | | Show help |
108
104
 
109
- ### Presets
105
+ ### Available templates
110
106
 
111
- | Preset | Description |
112
- |--------|-------------|
113
- | `minimal` | Narrative and server generator only |
114
- | `full` | All Auto Engineer packages |
107
+ | Template | Description |
108
+ |---|---|
109
+ | `typical` | A handpicked set of builders curated by the Auto team (default) |
110
+ | `minimal` | Minimal template with a single plugin for testing |
115
111
 
116
- ---
112
+ Templates are discovered dynamically from the `templates/` directory via `template.json` metadata files.
117
113
 
118
- ## Troubleshooting
114
+ ### Generated project structure
119
115
 
120
- ### Directory Already Exists
116
+ ```
117
+ my-app/
118
+ ├── .context/ # Design system context files
119
+ ├── narratives/ # Narrative-driven development files
120
+ ├── server/ # Server-side code
121
+ ├── auto.config.ts # Auto Engineer pipeline configuration
122
+ ├── package.json
123
+ ├── pnpm-workspace.yaml
124
+ └── .env.example
125
+ ```
121
126
 
122
- **Symptom:** Error about existing directory
127
+ The generated `auto.config.ts` receives a unique `fileId` (via `@auto-engineer/id`) so each project is independently identifiable.
123
128
 
124
- **Cause:** Project directory already exists with files
129
+ ## Troubleshooting
125
130
 
126
- **Solution:**
131
+ ### Debug logging
127
132
 
128
- ```bash
129
- # Overwrite existing directory
130
- create-auto-app my-app --force
131
- # Or choose a different name
132
- create-auto-app my-new-app
133
- ```
133
+ The CLI uses `ora` spinners and `chalk` colored output. Errors are printed to stderr with red highlighting. To see full stack traces, check the terminal output directly -- the CLI does not swallow errors silently.
134
134
 
135
- ### Template Not Found
135
+ ### Directory already exists
136
136
 
137
- **Symptom:** Template not recognized
137
+ **Symptom:** Prompted "Directory X already exists. Overwrite?"
138
138
 
139
- **Cause:** Invalid template name
139
+ **Fix:** Confirm the overwrite prompt, or choose a different project name. There is no `--force` flag; the CLI always asks for confirmation before deleting an existing directory.
140
140
 
141
- **Solution:**
141
+ ### Template not found
142
142
 
143
- ```bash
144
- # List available templates
145
- create-auto-app --help
146
- # Use valid template name
147
- create-auto-app my-app --template=kanban-todo
148
- ```
143
+ **Symptom:** `Template "foo" not found at ...`
149
144
 
150
- ### Package Manager Not Found
145
+ **Fix:** Run `create-auto-app --help` to see the template names listed in the `--template` option description. Use one of the listed names.
151
146
 
152
- **Symptom:** Installation fails
147
+ ### Package manager not found
153
148
 
154
- **Cause:** Specified package manager not installed
149
+ **Symptom:** Dependency installation fails.
155
150
 
156
- **Solution:**
151
+ **Fix:** Install the desired package manager globally, or use a different one:
157
152
 
158
153
  ```bash
159
- # Install pnpm
160
154
  npm install -g pnpm
161
- # Then create project
162
- create-auto-app my-app --use-pnpm
155
+ npx create-auto-app my-app --use-pnpm
163
156
  ```
164
157
 
165
- ### Enable Debug Logging
158
+ ### Dependencies fail to install
166
159
 
167
- ```bash
168
- DEBUG=create-auto-app:* create-auto-app my-app
160
+ **Symptom:** `Failed to install dependencies` message.
161
+
162
+ **Fix:** The spinner will show the failure. Common causes:
163
+ - Network issues reaching the npm registry.
164
+ - Conflicting lockfiles. Delete `node_modules` and the lockfile, then run the install command manually.
165
+ - Missing `pnpm-workspace.yaml`. The CLI creates one automatically if absent, but if something interrupts the process, create it manually:
166
+
167
+ ```yaml
168
+ packages:
169
+ - '*'
169
170
  ```
170
171
 
171
- ---
172
+ ### Version resolution fails
173
+
174
+ **Symptom:** `@auto-engineer/*` packages show as `latest` instead of a pinned version.
175
+
176
+ **Cause:** `npm view <package> version` failed (network issue or package not yet published).
177
+
178
+ **Fix:** After scaffolding, manually set the versions in `package.json` and re-run `pnpm install`.
172
179
 
173
180
  ## Architecture
174
181
 
182
+ ```mermaid
183
+ graph TD
184
+ A[create-auto-app CLI] --> B[commander: parse args]
185
+ B --> C{project-name provided?}
186
+ C -->|No| D[inquirer: interactive prompts]
187
+ C -->|Yes| E[resolve options from flags]
188
+ D --> F[createProject]
189
+ E --> F
190
+ F --> G[prepareTargetDirectory]
191
+ G --> H[createFromTemplate]
192
+ H --> I[fs-extra: copy template files]
193
+ I --> J[collectAllAutoEngineerPackages]
194
+ J --> K[npm view: fetch latest versions]
195
+ K --> L[updatePackageVersions]
196
+ L --> M["replaceTemplateFileId (@auto-engineer/id)"]
197
+ M --> N{--no-install?}
198
+ N -->|No| O[execa: run package manager install]
199
+ N -->|Yes| P[print success message]
200
+ O --> P
201
+ ```
202
+
203
+ ### Source layout
204
+
175
205
  ```
176
206
  src/
177
- ├── index.ts
178
- ├── templates.ts
179
- ├── project.ts
180
- └── utils.ts
207
+ └── index.ts # CLI entry point, all scaffolding logic
208
+ scripts/
209
+ └── copy-templates.ts # Build script: copies examples/ into templates/
181
210
  templates/
182
- ├── kanban-todo/
183
- └── questionnaires/
184
- ```
185
-
186
- ### Generated Project Structure
187
-
188
- ```
189
- my-app/
190
- ├── narratives/
191
- ├── .context/
192
- ├── server/
193
- ├── client/
194
- ├── auto.config.ts
195
- ├── package.json
196
- ├── pnpm-workspace.yaml
197
- └── .gitignore
211
+ ├── typical/ # Full-featured template
212
+ └── minimal/ # Single-plugin template
198
213
  ```
199
214
 
200
215
  ### Dependencies
201
216
 
202
- | Package | Usage |
203
- |---------|-------|
204
- | `@auto-engineer/id` | Generate unique project IDs |
205
- | `commander` | CLI argument parsing |
206
- | `inquirer` | Interactive prompts |
207
- | `chalk` | Terminal styling |
208
- | `ora` | Loading spinners |
209
- | `execa` | Execute shell commands |
210
- | `fs-extra` | File system operations |
217
+ | Package | Purpose |
218
+ |---|---|
219
+ | `@auto-engineer/id` | Generate unique 9-character fileId for each project |
220
+ | `commander` | CLI argument parsing and help text |
221
+ | `inquirer` | Interactive terminal prompts |
222
+ | `chalk` | Colored terminal output |
223
+ | `ora` | Loading spinners for async operations |
224
+ | `execa` | Execute shell commands (package manager detection, installs, npm view) |
225
+ | `fs-extra` | File system operations (copy, readJson, ensureDir) |
226
+ | `@scarf/scarf` | Anonymous install analytics |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-auto-app",
3
- "version": "1.148.0",
3
+ "version": "1.149.0",
4
4
  "description": "Create Auto Engineer apps with no configuration",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,7 +33,7 @@
33
33
  "fs-extra": "^11.2.0",
34
34
  "inquirer": "^9.2.15",
35
35
  "ora": "^8.0.1",
36
- "@auto-engineer/id": "1.148.0"
36
+ "@auto-engineer/id": "1.149.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/fs-extra": "^11.0.4",
@@ -1,116 +1,56 @@
1
- # Support Files
1
+ # Support Files — Shared design system assets for Auto Engineer examples
2
2
 
3
- Shared design system assets for Auto Engineer examples.
3
+ ## Files
4
4
 
5
- ---
5
+ | File | Description | Size |
6
+ |------|-------------|------|
7
+ | `.env.example` | Environment variable template for AI provider keys and configuration | ~500B |
8
+ | `.context/design-system.md` | Component catalog listing 55+ shadcn/ui components by name and type | ~5KB |
9
+ | `.context/figma-file.json` | Raw Figma API export with Tailwind CSS design tokens (spacing, dimensions, scopes) | ~44MB |
10
+ | `.context/shadcn-filter.ts` | Filter function for processing Figma component imports (blacklist, dedup, kebab-case) | ~2KB |
6
11
 
7
- ## Purpose
8
-
9
- This directory provides pre-configured design system files that other examples copy into their `.context/` directories. These files are consumed by the `@auto-engineer/generate-react-client` package and frontend generation plugins.
10
-
11
- ---
12
-
13
- ## Directory Structure
14
-
15
- ```
16
- support-files/
17
- ├── .env.example # Environment variable template
18
- └── .context/
19
- ├── design-system.md # Component documentation
20
- ├── figma-file.json # Figma design tokens (~44MB)
21
- └── shadcn-filter.ts # Component filtering logic
22
- ```
23
-
24
- ---
25
-
26
- ## File Descriptions
12
+ ## Usage
27
13
 
28
- ### .env.example
14
+ ### Copying into a project
29
15
 
30
- Template for Auto Engineer environment variables:
16
+ From another example directory, copy the context files:
31
17
 
32
18
  ```bash
33
- # AI Provider Keys
34
- ANTHROPIC_API_KEY=
35
- OPENAI_API_KEY=
36
- GEMINI_API_KEY=
37
- XAI_API_KEY=
38
-
39
- # Defaults
40
- DEFAULT_AI_PROVIDER=anthropic
41
- DEFAULT_AI_MODEL=vertex_ai/gemini-3.1-pro-preview
42
-
43
- # Debug
44
- DEBUG=auto:*
19
+ rm -rf .context && mkdir .context && cp ../support-files/.context/* ./.context
45
20
  ```
46
21
 
47
- ### .context/design-system.md
48
-
49
- Generated markdown listing 55+ shadcn/ui components:
50
-
51
- | Category | Components |
52
- |----------|------------|
53
- | Form | button, checkbox, input, select, switch, textarea, slider |
54
- | Layout | accordion, card, dialog, drawer, sheet, tabs, separator |
55
- | Navigation | breadcrumb, menubar, navigation-menu, pagination |
56
- | Data | avatar, badge, calendar, data-table, table |
57
- | Feedback | alert, alert-dialog, progress, skeleton, toast, tooltip |
58
-
59
- ### .context/figma-file.json
60
-
61
- Raw Figma API export containing design tokens:
62
-
63
- - **Spacing**: `spacing/0`, `spacing/px`, `spacing/1`...`spacing/96`
64
- - **Dimensions**: `w-0`, `h-0`, `h-px`, `w-full`, `h-screen`
65
- - **Scopes**: GAP, WIDTH_HEIGHT configurations
66
-
67
- ### .context/shadcn-filter.ts
68
-
69
- Filter function for processing Figma components during import:
70
-
71
- **Excludes:**
72
- - Generic names: `image`, `slot`, `logo`, `icon`
73
- - Internal components: `toolbar`, `stepper`, `sidebar`
74
-
75
- **Includes:**
76
- - Valid component names (1-3 words, alphabetic)
77
- - `INSTANCE` type components
78
- - Hierarchy depth ≤ 3
79
-
80
- **Transforms:**
81
- - Converts to lowercase kebab-case
82
- - Deduplicates and sorts
83
-
84
- ---
85
-
86
- ## Usage
87
-
88
- ### Copying to a Project
22
+ ### Environment setup
89
23
 
90
- From another example directory:
24
+ Copy the env template and fill in your credentials:
91
25
 
92
26
  ```bash
93
- rm -rf .context && mkdir .context && cp ../support-files/.context/* ./.context
27
+ cp ../support-files/.env.example ./.env
94
28
  ```
95
29
 
96
- The `kanban-todo` example includes this in its clean script:
30
+ At minimum, set one AI provider key:
97
31
 
98
32
  ```bash
99
- pnpm clean # Runs the copy automatically
33
+ ANTHROPIC_API_KEY=your-key
34
+ # or
35
+ OPENAI_API_KEY=your-key
36
+ # or
37
+ GEMINI_API_KEY=your-key
38
+ # or
39
+ XAI_API_KEY=your-key
100
40
  ```
101
41
 
102
- ### Using with Design System Importer
42
+ Optional settings for custom OpenAI-compatible endpoints:
103
43
 
104
44
  ```bash
105
- auto import:design-system \
106
- --output-dir=./.context \
107
- --strategy=WITH_COMPONENT_SETS \
108
- --filter-path=./shadcn-filter.ts
45
+ CUSTOM_PROVIDER_NAME=litellm
46
+ CUSTOM_PROVIDER_BASE_URL=https://api.litellm.ai
47
+ CUSTOM_PROVIDER_API_KEY=your-custom-api-key
48
+ CUSTOM_PROVIDER_DEFAULT_MODEL=vertex_ai/gemini-3.1-pro-preview
109
49
  ```
110
50
 
111
- ### Pipeline Integration
51
+ ### Pipeline integration
112
52
 
113
- In `auto.config.ts`, reference these files:
53
+ Reference these files in `auto.config.ts`:
114
54
 
115
55
  ```typescript
116
56
  .on('IAGenerated')
@@ -123,25 +63,21 @@ In `auto.config.ts`, reference these files:
123
63
  }))
124
64
  ```
125
65
 
126
- ---
66
+ ### Regenerating from Figma
127
67
 
128
- ## Regenerating Files
129
-
130
- To regenerate from a Figma source:
68
+ To regenerate the design system files from a Figma source:
131
69
 
132
70
  ```bash
133
- # Set credentials
134
71
  export FIGMA_PERSONAL_TOKEN=your-token
135
72
  export FIGMA_FILE_ID=your-file-id
136
73
 
137
- # Run importer
138
74
  auto import:design-system \
139
75
  --output-dir=./.context \
140
- --strategy=WITH_ALL_FIGMA_INSTANCES \
76
+ --strategy=WITH_COMPONENT_SETS \
141
77
  --filter-path=./shadcn-filter.ts
142
78
  ```
143
79
 
144
- **Import Strategies:**
80
+ Import strategies:
145
81
 
146
82
  | Strategy | Description |
147
83
  |----------|-------------|
@@ -149,11 +85,31 @@ auto import:design-system \
149
85
  | `WITH_COMPONENT_SETS` | Component sets (default) |
150
86
  | `WITH_ALL_FIGMA_INSTANCES` | Full document traversal |
151
87
 
152
- ---
88
+ ## API Reference
89
+
90
+ ### `shadcn-filter.ts`
91
+
92
+ ```typescript
93
+ export function filter(components: Component[]): Component[]
94
+ ```
95
+
96
+ Filters and transforms a list of Figma components for import into the design system.
97
+
98
+ **Filtering rules:**
99
+
100
+ - Excludes names matching a blacklist: `image`, `slot`, `logo`, `sidebar`, `settings`, `stepper`, and others
101
+ - Excludes names containing substrings: `icon`, `diagram`, `toolbar`, `shortcut`, `script`
102
+ - Includes only components where the name is 1-3 alphabetic words, description is `INSTANCE`, and hierarchy depth is 3 or less
103
+ - Deduplicates by lowercase name
104
+
105
+ **Transforms:**
106
+
107
+ - Converts names to lowercase kebab-case
108
+ - Sorts alphabetically
153
109
 
154
- ## Related Packages
110
+ ### Consumed by
155
111
 
156
- | Package | Relationship |
157
- |---------|--------------|
158
- | `@auto-engineer/generate-react-client` | Uses design system files for client generation |
159
- | `@auto-engineer/information-architect` | References component list for IA |
112
+ | Package | How it uses these files |
113
+ |---------|----------------------|
114
+ | `@auto-engineer/react-gen` | Reads `design-system.md` and `figma-file.json` during client generation |
115
+ | `@auto-engineer/information-architect` | References the component list for information architecture decisions |
@@ -1,116 +1,56 @@
1
- # Support Files
1
+ # Support Files — Shared design system assets for Auto Engineer examples
2
2
 
3
- Shared design system assets for Auto Engineer examples.
3
+ ## Files
4
4
 
5
- ---
5
+ | File | Description | Size |
6
+ |------|-------------|------|
7
+ | `.env.example` | Environment variable template for AI provider keys and configuration | ~500B |
8
+ | `.context/design-system.md` | Component catalog listing 55+ shadcn/ui components by name and type | ~5KB |
9
+ | `.context/figma-file.json` | Raw Figma API export with Tailwind CSS design tokens (spacing, dimensions, scopes) | ~44MB |
10
+ | `.context/shadcn-filter.ts` | Filter function for processing Figma component imports (blacklist, dedup, kebab-case) | ~2KB |
6
11
 
7
- ## Purpose
8
-
9
- This directory provides pre-configured design system files that other examples copy into their `.context/` directories. These files are consumed by the `@auto-engineer/generate-react-client` package and frontend generation plugins.
10
-
11
- ---
12
-
13
- ## Directory Structure
14
-
15
- ```
16
- support-files/
17
- ├── .env.example # Environment variable template
18
- └── .context/
19
- ├── design-system.md # Component documentation
20
- ├── figma-file.json # Figma design tokens (~44MB)
21
- └── shadcn-filter.ts # Component filtering logic
22
- ```
23
-
24
- ---
25
-
26
- ## File Descriptions
12
+ ## Usage
27
13
 
28
- ### .env.example
14
+ ### Copying into a project
29
15
 
30
- Template for Auto Engineer environment variables:
16
+ From another example directory, copy the context files:
31
17
 
32
18
  ```bash
33
- # AI Provider Keys
34
- ANTHROPIC_API_KEY=
35
- OPENAI_API_KEY=
36
- GEMINI_API_KEY=
37
- XAI_API_KEY=
38
-
39
- # Defaults
40
- DEFAULT_AI_PROVIDER=anthropic
41
- DEFAULT_AI_MODEL=vertex_ai/gemini-3.1-pro-preview
42
-
43
- # Debug
44
- DEBUG=auto:*
19
+ rm -rf .context && mkdir .context && cp ../support-files/.context/* ./.context
45
20
  ```
46
21
 
47
- ### .context/design-system.md
48
-
49
- Generated markdown listing 55+ shadcn/ui components:
50
-
51
- | Category | Components |
52
- |----------|------------|
53
- | Form | button, checkbox, input, select, switch, textarea, slider |
54
- | Layout | accordion, card, dialog, drawer, sheet, tabs, separator |
55
- | Navigation | breadcrumb, menubar, navigation-menu, pagination |
56
- | Data | avatar, badge, calendar, data-table, table |
57
- | Feedback | alert, alert-dialog, progress, skeleton, toast, tooltip |
58
-
59
- ### .context/figma-file.json
60
-
61
- Raw Figma API export containing design tokens:
62
-
63
- - **Spacing**: `spacing/0`, `spacing/px`, `spacing/1`...`spacing/96`
64
- - **Dimensions**: `w-0`, `h-0`, `h-px`, `w-full`, `h-screen`
65
- - **Scopes**: GAP, WIDTH_HEIGHT configurations
66
-
67
- ### .context/shadcn-filter.ts
68
-
69
- Filter function for processing Figma components during import:
70
-
71
- **Excludes:**
72
- - Generic names: `image`, `slot`, `logo`, `icon`
73
- - Internal components: `toolbar`, `stepper`, `sidebar`
74
-
75
- **Includes:**
76
- - Valid component names (1-3 words, alphabetic)
77
- - `INSTANCE` type components
78
- - Hierarchy depth ≤ 3
79
-
80
- **Transforms:**
81
- - Converts to lowercase kebab-case
82
- - Deduplicates and sorts
83
-
84
- ---
85
-
86
- ## Usage
87
-
88
- ### Copying to a Project
22
+ ### Environment setup
89
23
 
90
- From another example directory:
24
+ Copy the env template and fill in your credentials:
91
25
 
92
26
  ```bash
93
- rm -rf .context && mkdir .context && cp ../support-files/.context/* ./.context
27
+ cp ../support-files/.env.example ./.env
94
28
  ```
95
29
 
96
- The `kanban-todo` example includes this in its clean script:
30
+ At minimum, set one AI provider key:
97
31
 
98
32
  ```bash
99
- pnpm clean # Runs the copy automatically
33
+ ANTHROPIC_API_KEY=your-key
34
+ # or
35
+ OPENAI_API_KEY=your-key
36
+ # or
37
+ GEMINI_API_KEY=your-key
38
+ # or
39
+ XAI_API_KEY=your-key
100
40
  ```
101
41
 
102
- ### Using with Design System Importer
42
+ Optional settings for custom OpenAI-compatible endpoints:
103
43
 
104
44
  ```bash
105
- auto import:design-system \
106
- --output-dir=./.context \
107
- --strategy=WITH_COMPONENT_SETS \
108
- --filter-path=./shadcn-filter.ts
45
+ CUSTOM_PROVIDER_NAME=litellm
46
+ CUSTOM_PROVIDER_BASE_URL=https://api.litellm.ai
47
+ CUSTOM_PROVIDER_API_KEY=your-custom-api-key
48
+ CUSTOM_PROVIDER_DEFAULT_MODEL=vertex_ai/gemini-3.1-pro-preview
109
49
  ```
110
50
 
111
- ### Pipeline Integration
51
+ ### Pipeline integration
112
52
 
113
- In `auto.config.ts`, reference these files:
53
+ Reference these files in `auto.config.ts`:
114
54
 
115
55
  ```typescript
116
56
  .on('IAGenerated')
@@ -123,25 +63,21 @@ In `auto.config.ts`, reference these files:
123
63
  }))
124
64
  ```
125
65
 
126
- ---
66
+ ### Regenerating from Figma
127
67
 
128
- ## Regenerating Files
129
-
130
- To regenerate from a Figma source:
68
+ To regenerate the design system files from a Figma source:
131
69
 
132
70
  ```bash
133
- # Set credentials
134
71
  export FIGMA_PERSONAL_TOKEN=your-token
135
72
  export FIGMA_FILE_ID=your-file-id
136
73
 
137
- # Run importer
138
74
  auto import:design-system \
139
75
  --output-dir=./.context \
140
- --strategy=WITH_ALL_FIGMA_INSTANCES \
76
+ --strategy=WITH_COMPONENT_SETS \
141
77
  --filter-path=./shadcn-filter.ts
142
78
  ```
143
79
 
144
- **Import Strategies:**
80
+ Import strategies:
145
81
 
146
82
  | Strategy | Description |
147
83
  |----------|-------------|
@@ -149,11 +85,31 @@ auto import:design-system \
149
85
  | `WITH_COMPONENT_SETS` | Component sets (default) |
150
86
  | `WITH_ALL_FIGMA_INSTANCES` | Full document traversal |
151
87
 
152
- ---
88
+ ## API Reference
89
+
90
+ ### `shadcn-filter.ts`
91
+
92
+ ```typescript
93
+ export function filter(components: Component[]): Component[]
94
+ ```
95
+
96
+ Filters and transforms a list of Figma components for import into the design system.
97
+
98
+ **Filtering rules:**
99
+
100
+ - Excludes names matching a blacklist: `image`, `slot`, `logo`, `sidebar`, `settings`, `stepper`, and others
101
+ - Excludes names containing substrings: `icon`, `diagram`, `toolbar`, `shortcut`, `script`
102
+ - Includes only components where the name is 1-3 alphabetic words, description is `INSTANCE`, and hierarchy depth is 3 or less
103
+ - Deduplicates by lowercase name
104
+
105
+ **Transforms:**
106
+
107
+ - Converts names to lowercase kebab-case
108
+ - Sorts alphabetically
153
109
 
154
- ## Related Packages
110
+ ### Consumed by
155
111
 
156
- | Package | Relationship |
157
- |---------|--------------|
158
- | `@auto-engineer/generate-react-client` | Uses design system files for client generation |
159
- | `@auto-engineer/information-architect` | References component list for IA |
112
+ | Package | How it uses these files |
113
+ |---------|----------------------|
114
+ | `@auto-engineer/react-gen` | Reads `design-system.md` and `figma-file.json` during client generation |
115
+ | `@auto-engineer/information-architect` | References the component list for information architecture decisions |