beaver-build 1.0.7 → 2.0.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.
Files changed (3) hide show
  1. package/README.md +389 -237
  2. package/dist/index.js +1354 -63
  3. package/package.json +55 -57
package/README.md CHANGED
@@ -1,237 +1,389 @@
1
- <div align="center"><img width="400" height="225" alt="Beaver CLI" src="https://raw.githubusercontent.com/hd1008-lang/beaver/main/media/beaver.gif" /></div>
2
-
3
- # Beaver
4
-
5
- An interactive CLI tool for scaffolding modern web projects. Select your project type, configure your stack through a guided menu, and get a production-ready project generated on disk with pinned library versions.
6
-
7
- ## Getting Started
8
-
9
- ### Prerequisites
10
-
11
- - Node.js 18+
12
- - npm
13
-
14
- ### Installation
15
-
16
- **Option 1: Install globally** (recommended for frequent use)
17
-
18
- ```bash
19
- npm install -g beaver-build
20
- beaver
21
- ```
22
-
23
- **Option 2: Use directly with npx** (no installation needed)
24
-
25
- ```bash
26
- npx beaver
27
- ```
28
-
29
- ### Usage
30
-
31
- Simply run the command and follow the interactive prompts:
32
-
33
- ```bash
34
- beaver
35
- ```
36
-
37
- The CLI will guide you through:
38
-
39
- 1. **Project Type** — Choose React + Vite or Chrome Extension
40
- 2. **Project Name** — Enter your project directory name
41
- 3. **Configuration** — Select your preferred stack (layout, router, state management, styling, linter)
42
-
43
- After answering all prompts, your production-ready project will be generated in the specified directory with:
44
-
45
- - All dependencies pinned to stable versions
46
- - GitHub Copilot custom instructions for your chosen stack
47
- - Ready to run with `npm install && npm run dev`
48
-
49
- ---
50
-
51
- ## Development (Contributing)
52
-
53
- To contribute or develop locally:
54
-
55
- ```bash
56
- npm install
57
- npm run dev # Run CLI in development mode
58
- npm run build # Compile for distribution
59
- ```
60
-
61
- ---
62
-
63
- ## Project Types
64
-
65
- | Type | Status |
66
- |---|---|
67
- | React + Vite | Available |
68
- | Chrome Extension | Available |
69
- | Next.js | Upcoming |
70
- | Nuxt | Upcoming |
71
-
72
- ---
73
-
74
- ## React + Vite
75
-
76
- The CLI walks you through the following choices:
77
-
78
- ### 1. Project Name
79
-
80
- Validated to allow only letters, numbers, hyphens, and underscores (`[a-zA-Z0-9_-]`).
81
-
82
- ### 2. Layout
83
-
84
- | Option | Description |
85
- |---|---|
86
- | FSD | Feature Slice Design |
87
- | BPR | Bulletproof React |
88
-
89
- ### 3. Router
90
-
91
- | Option | Version |
92
- |---|---|
93
- | Not Using | — |
94
- | TanStack Router | v1.144.0 |
95
-
96
- ### 4. State Management
97
-
98
- | Option | Version |
99
- |---|---|
100
- | Not Using | — |
101
- | Zustand | v5.0.5 |
102
-
103
- ### 5. Data Fetching
104
-
105
- | Option | Version |
106
- |---|---|
107
- | Not Using | — |
108
- | TanStack Query | v5.74.4 |
109
-
110
- ### 6. CSS / Styling
111
-
112
- | Option | Version |
113
- |---|---|
114
- | Not Using | — |
115
- | Tailwind CSS | v4.1.3 |
116
-
117
- ### 7. Linter / Formatter
118
-
119
- | Option | Version | Notes |
120
- |---|---|---|
121
- | Not Using | | — |
122
- | Biome | v1.9.4 | All-in-one lint + format |
123
- | ESLint | v9.39.4 | Flat config + typescript-eslint |
124
-
125
- ---
126
-
127
- ## Generated Project — Copilot Instructions
128
-
129
- Every scaffolded project includes a set of GitHub Copilot custom instructions so that AI-assisted coding inside the project follows the conventions of the chosen stack. The files are layout-aware — the `applyTo` glob patterns and placement rules change between FSD and BPR.
130
-
131
- Files emitted in the generated project:
132
-
133
- | File | Scope | Emitted when |
134
- |---|---|---|
135
- | `.github/copilot-instructions.md` | Repo-wide overview stack, naming, architecture | Always |
136
- | `.github/instructions/components.instructions.md` | Component file paths per layout | Always |
137
- | `.github/instructions/hooks.instructions.md` | Hook file paths per layout | Always |
138
- | `.github/instructions/tanstack-router.instructions.md` | `src/routes/**/*.tsx` | Router = TanStack Router |
139
- | `.github/instructions/zustand.instructions.md` | Store file paths per layout | State = Zustand |
140
- | `.github/instructions/tanstack-query.instructions.md` | API/query file paths per layout | Query = TanStack Query |
141
- | `.github/instructions/biome.instructions.md` or `eslint.instructions.md` | `**` | Linter ≠ none |
142
-
143
- The format follows GitHub's [path-specific custom instructions](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions#creating-path-specific-custom-instructions) spec (`applyTo` frontmatter).
144
-
145
- **Rule for contributors:** every new option added to the CLI (new router, new state library, new UI framework, etc.) must ship with its own instruction template in `src/scaffold/react-vite/templates/copilot-instructions.ts`. See [Adding a New Option to React + Vite](#adding-a-new-option-to-react--vite) below.
146
-
147
- ---
148
-
149
- ## Generated ProjectPinned Dependencies
150
-
151
- | Package | Version |
152
- |---|---|
153
- | react | 19.1.0 |
154
- | react-dom | 19.1.0 |
155
- | vite | 6.4.3 |
156
- | @vitejs/plugin-react | 4.4.1 |
157
- | typescript | 5.8.3 |
158
- | @types/react | 19.1.1 |
159
- | @types/react-dom | 19.1.1 |
160
- | @tanstack/react-router | 1.144.0 |
161
- | @tanstack/router-devtools | 1.144.0 |
162
- | @tanstack/router-vite-plugin | 1.144.0 |
163
- | zustand | 5.0.5 |
164
- | @tanstack/react-query | 5.74.4 |
165
- | @tanstack/react-query-devtools | 5.74.4 |
166
- | @biomejs/biome | 1.9.4 |
167
- | eslint | 9.39.4 |
168
- | @eslint/js | 9.39.4 |
169
- | typescript-eslint | 8.26.0 |
170
- | eslint-plugin-react-hooks | 5.2.0 |
171
- | eslint-plugin-react-refresh | 0.4.19 |
172
- | globals | 15.15.0 |
173
-
174
- ---
175
-
176
- ## Project Structure
177
-
178
- ```
179
- src/
180
- index.ts Entry point — greeting, menu, error handling
181
- types/index.ts Cart, ProjectType, ReactViteCore, NextJSCore
182
- constants/index.ts Top-level menu options
183
- options/
184
- index.ts Top-level project type selection
185
- react-vite/
186
- index.ts React + Vite menu flow
187
- constants/index.ts Menu option definitions
188
- types/index.ts MenuOptions type
189
- scaffold/
190
- errors.ts ScaffoldError, isNodeError
191
- utils.ts FileMap, dirExists(), writeProjectFile()
192
- react-vite/
193
- index.ts Scaffold orchestrator
194
- templates/
195
- package-json.ts packageJsonTemplate(cart)
196
- vite-config.ts viteConfigTemplate(cart)
197
- tsconfig.ts tsconfigTemplate(), tsconfigNodeTemplate()
198
- index-html.ts indexHtmlTemplate(projectName)
199
- main-tsx.ts mainTsxTemplate(layout)
200
- app-tsx.ts appTsxFsdTemplate(), appTsxBprTemplate()
201
- router.ts rootRouteTemplate(), indexRouteTemplate()
202
- zustand.ts zustandStoreTemplate()
203
- query.ts queryProviderBprTemplate()
204
- linter.ts biomeConfigTemplate(), eslintConfigTemplate()
205
- gitignore.ts gitignoreTemplate()
206
- copilot-instructions.ts getCopilotInstructionFiles(cart) — Copilot instruction set
207
- fsd-layout.ts getFsdFileMap(cart)
208
- bpr-layout.ts getBprFileMap(cart)
209
- utils/
210
- animation.ts typeWriter effect
211
- user.ts getUserName() from git config
212
- index.ts sleep()
213
- ```
214
-
215
- ---
216
-
217
- ## Adding a New Project Type
218
-
219
- 1. Set `disabled: false` in `src/constants/index.ts`
220
- 2. Create `src/options/<project-name>/` with constants, types, and flow functions
221
- 3. Handle the new type in `src/options/index.ts`
222
- 4. Add the interface to `src/types/index.ts` and include it in the `Cart` union
223
- 5. Create `src/scaffold/<project-name>/` with templates and an orchestrator
224
-
225
- ## Adding a New Option to React + Vite
226
-
227
- 1. Add the constant to `src/options/react-vite/constants/index.ts`
228
- 2. Export the value type from `src/types/index.ts` and add the field to `ReactViteCore`
229
- 3. Add a `menu<OptionName>` function in `src/options/react-vite/index.ts`
230
- 4. Call it in `flowReactVite`
231
- 5. Update `getFsdFileMap` and `getBprFileMap` to handle the new option
232
- 6. **Add a Copilot instruction template** in `src/scaffold/react-vite/templates/copilot-instructions.ts`:
233
- - Write a new template function (e.g. `newOptionTemplate(cart)`) returning a markdown string that starts with an `applyTo` frontmatter block scoped to the right paths for both FSD and BPR (use `FSD_PATHS` / `BPR_PATHS`)
234
- - Register it inside `getCopilotInstructionFiles` under a conditional block keyed by the new cart field
235
- - If the new option introduces a new kind of file path, extend the `Paths` type and both `FSD_PATHS` / `BPR_PATHS` maps so every path-specific rule stays layout-aware
236
-
237
- This step is mandatory — any user who scaffolds a project with the new option must get a matching Copilot instruction file automatically.
1
+ <div align="center"><img width="400" height="225" alt="Beaver CLI" src="https://raw.githubusercontent.com/hd1008-lang/beaver/main/media/beaver.gif" /></div>
2
+
3
+ # Beaver
4
+
5
+ An interactive CLI tool for scaffolding modern web projects and applying AI development harness. Select your project type, configure your stack through a guided menu, and get a production-ready project generated on disk with pinned library versions.
6
+
7
+ **Current Version:** 2.0.0
8
+
9
+ ## Getting Started
10
+
11
+ ### Prerequisites
12
+
13
+ - Node.js >= 20.0.0
14
+ - npm
15
+
16
+ ### Installation
17
+
18
+ **Option 1: Install globally** (recommended for frequent use)
19
+
20
+ ```bash
21
+ npm install -g beaver-build
22
+ beaver
23
+ ```
24
+
25
+ **Option 2: Use directly with npx** (no installation needed)
26
+
27
+ ```bash
28
+ npx beaver-build
29
+ ```
30
+
31
+ ### Commands & Options
32
+
33
+ **Main command:**
34
+
35
+ ```bash
36
+ beaver # Interactive project scaffolding
37
+ ```
38
+
39
+ **Options:**
40
+
41
+ ```bash
42
+ beaver -v, --version # Show current version
43
+ beaver -h, --help # Show help and available commands
44
+ beaver update # Update beaver to the latest version from npm
45
+ ```
46
+
47
+ ### Usage
48
+
49
+ Simply run the command and follow the interactive prompts:
50
+
51
+ ```bash
52
+ beaver
53
+ ```
54
+
55
+ The CLI will guide you through:
56
+
57
+ 1. **Project Type** Choose React + Vite, Chrome Extension, or Next.js (upcoming)
58
+ 2. **Project Name** Enter your project directory name
59
+ 3. **Configuration** — Select your preferred stack (layout, router, state management, styling, linter, AI setup, testing)
60
+
61
+ After answering all prompts, your production-ready project will be generated in the specified directory with:
62
+
63
+ - All dependencies pinned to stable versions
64
+ - Claude Code harness (CLAUDE.md, agents, docs) when Claude AI setup is selected
65
+ - Ready to run with `npm install && npm run dev`
66
+
67
+ ---
68
+
69
+ ## Development (Contributing)
70
+
71
+ To contribute or develop locally:
72
+
73
+ ```bash
74
+ npm install
75
+
76
+ # Development & Building
77
+ npm run dev # Run CLI directly in development mode (using tsx)
78
+ npm run dev:build # Compile TypeScript, resolve aliases, then run
79
+ npm run build # Compile TypeScript for distribution (outputs to dist/)
80
+
81
+ # Documentation
82
+ node .claude/scripts/build-docs-index.mjs # Regenerate docs/INDEX.md
83
+ node .claude/scripts/lint-docs-frontmatter.mjs # Validate frontmatter in docs/
84
+ ```
85
+
86
+ **Publishing:**
87
+
88
+ When ready to publish a new version:
89
+
90
+ ```bash
91
+ npm version patch|minor|major # Update version in package.json
92
+ npm publish # Publishes to npm (runs build automatically)
93
+ ```
94
+
95
+ ---
96
+
97
+ ## Project Types
98
+
99
+ | Type | Description | Status |
100
+ |---|---|---|
101
+ | React + Vite | React 19 + Vite with comprehensive tooling options | ✅ Available |
102
+ | Chrome Extension | React 19 + Vite for Chrome Manifest v3 extensions | ✅ Available |
103
+ | Apply AI Harness | Add Claude Code harness to an existing project | ✅ Available |
104
+ | Next.js | Next 15 with app router and modern features | 🔄 Upcoming |
105
+ | Nuxt | Nuxt 4 with Vue 3 composition API | 🔄 Upcoming |
106
+
107
+ ---
108
+
109
+ ## React + Vite
110
+
111
+ The CLI walks you through the following choices:
112
+
113
+ ### 1. Project Name
114
+
115
+ Validated to allow only letters, numbers, hyphens, and underscores (`[a-zA-Z0-9_-]`).
116
+
117
+ ### 2. Layout
118
+
119
+ | Option | Description |
120
+ |---|---|
121
+ | FSD | Feature Slice Design modular file structure |
122
+ | BPR | Bulletproof React scalable architecture |
123
+
124
+ ### 3. Router
125
+
126
+ | Option | Version |
127
+ |---|---|
128
+ | Not Using | — |
129
+ | TanStack Router | v1.144.0 |
130
+
131
+ ### 4. State Management
132
+
133
+ | Option | Version |
134
+ |---|---|
135
+ | Not Using | — |
136
+ | Zustand | v5.0.5 |
137
+
138
+ ### 5. Data Fetching
139
+
140
+ | Option | Version |
141
+ |---|---|
142
+ | Not Using | — |
143
+ | TanStack Query | v5.74.4 |
144
+
145
+ ### 6. CSS / Styling
146
+
147
+ | Option | Version |
148
+ |---|---|
149
+ | Not Using | |
150
+ | Tailwind CSS | v4.1.3 |
151
+
152
+ ### 7. AI Setup
153
+
154
+ | Option | Description |
155
+ |---|---|
156
+ | Not Using | |
157
+ | Claude (Claude Code) | CLAUDE.md + .claude/ agents + feature docs |
158
+
159
+ ### 8. Testing
160
+
161
+ | Option | Description |
162
+ |---|---|
163
+ | Not Using | |
164
+ | Setup Testing Base | Vitest + React Testing Library configuration |
165
+
166
+ ### 9. Linter / Formatter
167
+
168
+ | Option | Version | Notes |
169
+ |---|---|---|
170
+ | Not Using | | — |
171
+ | Biome | v1.9.4 | All-in-one lint + format |
172
+ | ESLint | v9.39.4 | Flat config + typescript-eslint |
173
+
174
+ ---
175
+
176
+ ## Chrome Extension
177
+
178
+ Build Chrome Manifest v3 extensions with React 19 and Vite. The CLI guides you through:
179
+
180
+ ### 1. Project Name
181
+
182
+ Validated to allow only letters, numbers, hyphens, and underscores (`[a-zA-Z0-9_-]`).
183
+
184
+ ### 2. State Management
185
+
186
+ | Option | Version |
187
+ |---|---|
188
+ | Not Using | — |
189
+ | Zustand | v5.0.5 |
190
+
191
+ ### 3. Data Fetching
192
+
193
+ | Option | Version |
194
+ |---|---|
195
+ | Not Using | — |
196
+ | TanStack Query | v5.74.4 |
197
+
198
+ ### 4. CSS / Styling
199
+
200
+ | Option | Version |
201
+ |---|---|
202
+ | Not Using | — |
203
+ | Tailwind CSS | v4.1.3 |
204
+
205
+ ### 5. AI Setup
206
+
207
+ | Option | Description |
208
+ |---|---|
209
+ | Not Using | — |
210
+ | Claude (Claude Code) | CLAUDE.md + .claude/ agents + feature docs |
211
+
212
+ ### 6. Linter / Formatter
213
+
214
+ | Option | Version | Notes |
215
+ |---|---|---|
216
+ | Not Using | — | — |
217
+ | Biome | v1.9.4 | All-in-one lint + format |
218
+ | ESLint | v9.39.4 | Flat config + typescript-eslint |
219
+
220
+ ---
221
+
222
+ ## Apply AI Harness
223
+
224
+ Add Claude Code harness setup to an existing project. This creates CLAUDE.md, .claude/ agents, and feature documentation for AI-assisted development.
225
+
226
+ The CLI guides you through:
227
+
228
+ ### 1. Project Type
229
+
230
+ | Option | Description |
231
+ |---|---|
232
+ | React + Vite | For React + Vite projects |
233
+ | Chrome Extension | For Chrome Manifest v3 extensions |
234
+ | Generic Project | For any other project type |
235
+
236
+ This generates appropriate skeleton files and agent setup based on your project type.
237
+
238
+ ---
239
+
240
+ ## Generated Project — Pinned Dependencies
241
+
242
+ | Package | Version |
243
+ |---|---|
244
+ | react | 19.1.0 |
245
+ | react-dom | 19.1.0 |
246
+ | vite | 6.4.3 |
247
+ | @vitejs/plugin-react | 4.4.1 |
248
+ | typescript | 5.8.3 |
249
+ | @types/react | 19.1.1 |
250
+ | @types/react-dom | 19.1.1 |
251
+ | @tanstack/react-router | 1.144.0 |
252
+ | @tanstack/router-devtools | 1.144.0 |
253
+ | @tanstack/router-vite-plugin | 1.144.0 |
254
+ | zustand | 5.0.5 |
255
+ | @tanstack/react-query | 5.74.4 |
256
+ | @tanstack/react-query-devtools | 5.74.4 |
257
+ | @biomejs/biome | 1.9.4 |
258
+ | eslint | 9.39.4 |
259
+ | @eslint/js | 9.39.4 |
260
+ | typescript-eslint | 8.26.0 |
261
+ | eslint-plugin-react-hooks | 5.2.0 |
262
+ | eslint-plugin-react-refresh | 0.4.19 |
263
+ | globals | 15.15.0 |
264
+ | vitest | Latest (when testing enabled) |
265
+ | @testing-library/react | Latest (when testing enabled) |
266
+ | @testing-library/jest-dom | Latest (when testing enabled) |
267
+
268
+ ---
269
+
270
+ ## Project Structure
271
+
272
+ ```
273
+ src/
274
+ index.ts Entry point — greeting, menu, error handling
275
+ types/index.ts Cart, ProjectType, ReactViteCore, ChromeExtensionCore, HarnessOnlyCore
276
+ constants/index.ts Top-level menu options (React+Vite, Chrome Extension, Apply AI Harness, Next.js, Nuxt)
277
+ commands/
278
+ update.ts runUpdate() — check and install latest version from npm
279
+ options/
280
+ index.ts Top-level project type selection
281
+ react-vite/
282
+ index.ts React + Vite menu flow
283
+ constants/index.ts Menu option definitions (layout, router, state, query, CSS, AI, testing, linter)
284
+ types/index.ts MenuOptions type
285
+ chrome-extension/
286
+ index.ts Chrome Extension menu flow
287
+ constants/index.ts Menu option definitions (state, query, CSS, AI, linter)
288
+ harness-only/
289
+ index.ts Apply AI Harness menu flow
290
+ constants/index.ts Menu option definitions (project type selection)
291
+ scaffold/
292
+ errors.ts ScaffoldError, isNodeError
293
+ utils.ts FileMap, dirExists(), writeProjectFile()
294
+ shared/
295
+ claude-setup.ts Shared Claude Code setup templates
296
+ react-vite/
297
+ index.ts Scaffold orchestrator
298
+ templates/
299
+ package-json.ts packageJsonTemplate(cart)
300
+ vite-config.ts viteConfigTemplate(cart)
301
+ tsconfig.ts tsconfigTemplate(), tsconfigNodeTemplate()
302
+ index-html.ts indexHtmlTemplate(projectName)
303
+ main-tsx.ts mainTsxTemplate(layout)
304
+ app-tsx.ts appTsxFsdTemplate(), appTsxBprTemplate()
305
+ router.ts rootRouteTemplate(), indexRouteTemplate()
306
+ zustand.ts zustandStoreTemplate()
307
+ query.ts queryProviderBprTemplate()
308
+ linter.ts biomeConfigTemplate(), eslintConfigTemplate()
309
+ testing-setup.ts vitestConfigTemplate(), testingSetupTemplate()
310
+ styles.ts stylesCssTemplate()
311
+ gitignore.ts gitignoreTemplate()
312
+ claude-setup.ts claudeSetupTemplate()
313
+ home-page.ts homePageTemplate()
314
+ vite-env-d-ts.ts viteEnvDtsTemplate()
315
+ fsd-layout.ts getFsdFileMap(cart)
316
+ bpr-layout.ts getBprFileMap(cart)
317
+ chrome-extension/
318
+ index.ts Scaffold orchestrator for Chrome extensions
319
+ templates/
320
+ package-json.ts packageJsonTemplate(cart)
321
+ vite-config.ts viteConfigTemplate(cart)
322
+ manifest-json.ts manifestJsonTemplate(cart)
323
+ tsconfig.ts tsconfigTemplate()
324
+ main-tsx.ts mainTsxTemplate()
325
+ app-tsx.ts appTsxTemplate()
326
+ layout.ts layoutTemplate()
327
+ linter.ts biomeConfigTemplate(), eslintConfigTemplate()
328
+ query.ts queryProviderTemplate()
329
+ gitignore.ts gitignoreTemplate()
330
+ claude-setup.ts claudeSetupTemplate()
331
+ build-extension-script.ts buildExtensionScriptTemplate()
332
+ harness-only/
333
+ index.ts Scaffold orchestrator for AI harness setup
334
+ templates/
335
+ generic-skeleton.ts Generic project skeleton
336
+ react-vite-skeleton.ts React + Vite skeleton
337
+ chrome-extension-skeleton.ts Chrome Extension skeleton
338
+ utils/
339
+ animation.ts typeWriter effect
340
+ user.ts getUserName() from git config
341
+ check-node-version.ts checkNodeVersion() — verify Node.js >= 20.0.0
342
+ index.ts sleep()
343
+ ```
344
+
345
+ ---
346
+
347
+ ## Adding a New Project Type
348
+
349
+ To enable a new project type (e.g., enable Next.js):
350
+
351
+ 1. Set `disabled: false` in `src/constants/index.ts`
352
+ 2. Create `src/options/<project-name>/` directory with:
353
+ - `index.ts` — menu flow function (e.g. `flowNextJS()`)
354
+ - `constants/index.ts` — menu option definitions
355
+ 3. Handle the new type in `src/options/index.ts` — import and call the flow function
356
+ 4. Add the interface to `src/types/index.ts` and include it in the `Cart` union (e.g. `NextJSCore`)
357
+ 5. Create `src/scaffold/<project-name>/` with:
358
+ - `index.ts` — scaffold orchestrator (spinner, file writing, cleanup on error)
359
+ - `templates/` — all template functions (package.json, config files, source templates)
360
+
361
+ ## Adding a New Option to React + Vite
362
+
363
+ To add a new menu option (e.g., a new UI library):
364
+
365
+ 1. Add the constant to `src/options/react-vite/constants/index.ts`
366
+ - Define `REACT_MENU_<OPTION_NAME>` with display, value, description, disabled fields
367
+ 2. Export the value type from `src/types/index.ts` and add the field to `ReactViteCore`
368
+ 3. Add a `menu<OptionName>` function in `src/options/react-vite/index.ts` using `selectFromMenu`
369
+ 4. Call it in `flowReactVite` in the right order (before scaffold step)
370
+ 5. Update `getFsdFileMap` and `getBprFileMap` in `src/scaffold/react-vite/templates/` to handle the new option
371
+
372
+ ## Adding a New Option to Chrome Extension
373
+
374
+ Same process as React + Vite:
375
+
376
+ 1. Add the constant to `src/options/chrome-extension/constants/index.ts`
377
+ 2. Export the value type from `src/types/index.ts` and add the field to `ChromeExtensionCore`
378
+ 3. Add a `menu<OptionName>` function in `src/options/chrome-extension/index.ts`
379
+ 4. Call it in `flowChromeExtension`
380
+ 5. Update templates in `src/scaffold/chrome-extension/templates/` to handle the new option
381
+
382
+ ## Adding Support for New Project Types in Apply AI Harness
383
+
384
+ To add support for a new project type in Apply AI Harness:
385
+
386
+ 1. Create a new skeleton template in `src/scaffold/harness-only/templates/<project-type>-skeleton.ts`
387
+ 2. Update `src/options/harness-only/constants/index.ts` to include the new project type
388
+ 3. Update `src/options/harness-only/index.ts` to handle the new type in the menu flow
389
+ 4. Add the skeleton template to the harness scaffold orchestrator