create-claude-workspace 1.1.73 → 1.1.75
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/dist/scripts/docker-run.mjs +1 -1
- package/dist/template/.claude/agents/backend-ts-architect.md +1 -0
- package/dist/template/.claude/agents/ui-engineer.md +1 -0
- package/dist/template/.claude/profiles/angular.md +27 -1
- package/dist/template/.claude/profiles/react.md +27 -6
- package/dist/template/.claude/profiles/svelte.md +27 -6
- package/dist/template/.claude/profiles/vue.md +27 -6
- package/dist/template/.claude/templates/claude-md.md +22 -1
- package/package.json +1 -1
|
@@ -388,7 +388,7 @@ async function main() {
|
|
|
388
388
|
console.log('');
|
|
389
389
|
// No -T flag — Docker allocates a TTY, which natively forwards Ctrl+C to the container.
|
|
390
390
|
// async spawn keeps the event loop alive so our SIGINT handler (docker compose kill) fires as backup.
|
|
391
|
-
const code = await composeAsync(['run', '--rm', 'claude', '-c', `exec npx create-claude-workspace run ${escaped.join(' ')}`]);
|
|
391
|
+
const code = await composeAsync(['run', '--rm', 'claude', '-c', `exec npx -y create-claude-workspace run ${escaped.join(' ')}`]);
|
|
392
392
|
process.exit(code);
|
|
393
393
|
}
|
|
394
394
|
}
|
|
@@ -112,6 +112,7 @@ What this task covers and what it does NOT cover.
|
|
|
112
112
|
|
|
113
113
|
### FILES
|
|
114
114
|
List of all files to create/modify, with full paths.
|
|
115
|
+
**Feature-first library organization (STRICT):** Every distinct feature/domain MUST have its own library group (`libs/[feature]/domain/`, `libs/[feature]/business/`, `libs/[feature]/infrastructure/`, etc.). NEVER put multiple features' types/logic into a single shared library (e.g. `shared/types` with `scan.ts`, `streak.ts`, `achievement.ts` is WRONG — each gets `libs/scan/domain/`, `libs/streak/domain/`, `libs/achievement/domain/`). `libs/shared/` is ONLY for truly cross-domain code (generic utilities, DI infrastructure).
|
|
115
116
|
**For new libraries**: specify the `nx generate` command (e.g., `nx g @nx/js:library --directory=libs/auth/domain --no-interactive`).
|
|
116
117
|
- **Internal monorepo libs** (consumed only within the workspace): omit `--bundler` — they don't need a build step. TypeScript path aliases handle resolution.
|
|
117
118
|
- **Publishable libs** (npm packages): use `--bundler=tsc` (or `--bundler=esbuild`/`--bundler=rollup` if needed) + `--publishable --importPath=@scope/name`. The generator creates the build target.
|
|
@@ -115,6 +115,7 @@ What this task covers and what it does NOT cover.
|
|
|
115
115
|
|
|
116
116
|
### FILES
|
|
117
117
|
List of all files to create/modify, with full paths.
|
|
118
|
+
**Feature-first library organization (STRICT):** Every distinct feature/domain MUST have its own library group (`libs/[feature]/domain/`, `libs/[feature]/ui/`, `libs/[feature]/feature/`, `libs/[feature]/data-access/`, etc.). NEVER put multiple features' types/components into a single shared library (e.g. `shared/types` with `scan.ts`, `streak.ts` is WRONG — each gets `libs/scan/domain/`, `libs/streak/domain/`). `libs/shared/ui/` is ONLY for truly generic UI primitives (buttons, modals, layout) used across multiple features.
|
|
118
119
|
**For new libraries/components**: specify the generator command from the frontend profile (e.g., `nx g @nx/angular:library ...` or `nx g @nx/react:component ...`). Test runner, linter, and style defaults are configured in `nx.json` — do not repeat them. The orchestrator will run these commands before writing code.
|
|
119
120
|
**NEVER manually configure build tools** (tsup, esbuild, rollup, webpack, vite for build). Do NOT create config files for these — Nx generators handle build configuration. Internal monorepo libs don't need a build step; publishable libs get `--bundler` from the generator.
|
|
120
121
|
|
|
@@ -283,10 +283,36 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
283
283
|
```
|
|
284
284
|
|
|
285
285
|
**SCSS import rules:**
|
|
286
|
-
- ALWAYS import via package/library name (e.g. `@use 'theme/colors'`)
|
|
286
|
+
- ALWAYS import via package/library name (e.g. `@use 'theme/colors'`)
|
|
287
287
|
- NEVER use relative paths (`../../theme/src/generated/...`) — they break on refactoring and are unreadable
|
|
288
288
|
- NEVER use redundant `as` aliases that match the last path segment (`@use 'theme/colors' as colors` → just `@use 'theme/colors'`). Only use `as` when you need a different name.
|
|
289
289
|
|
|
290
|
+
**Making theme resolvable by package name (priority order):**
|
|
291
|
+
1. **Workspace dependency in package.json** (preferred) — add the theme library as a workspace dependency so SCSS resolves it from `node_modules`:
|
|
292
|
+
```jsonc
|
|
293
|
+
// package.json (root or consuming app)
|
|
294
|
+
{
|
|
295
|
+
"dependencies": {
|
|
296
|
+
"@[prefix]/theme": "workspace:./libs/shared/ui/theme" // bun/pnpm
|
|
297
|
+
// or "file:./libs/shared/ui/theme" for npm
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
Then `<PM> install` creates the link. SCSS `@use '@[prefix]/theme/colors'` resolves automatically.
|
|
302
|
+
2. **`stylePreprocessorOptions.includePaths`** (fallback) — if workspace dependency is not feasible:
|
|
303
|
+
```jsonc
|
|
304
|
+
// project.json or angular.json
|
|
305
|
+
{
|
|
306
|
+
"build": {
|
|
307
|
+
"options": {
|
|
308
|
+
"stylePreprocessorOptions": {
|
|
309
|
+
"includePaths": ["libs/shared/ui/theme/src"]
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
290
316
|
**How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
|
|
291
317
|
|
|
292
318
|
**Token source (pick one):**
|
|
@@ -167,22 +167,42 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
167
167
|
4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
|
|
168
168
|
5. `ThemeManager` (from `@themecraft/core/runtime`) — runtime theme switching, storage persistence, FOUC prevention
|
|
169
169
|
|
|
170
|
-
**Component SCSS** (`.module.scss`) — import
|
|
170
|
+
**Component SCSS** (`.module.scss`) — import via package name, NEVER use relative paths, NEVER call `color-var()`/`size-var()` directly:
|
|
171
171
|
```scss
|
|
172
|
-
@use
|
|
173
|
-
@use '
|
|
174
|
-
@use '
|
|
175
|
-
@use '
|
|
172
|
+
// Import via package name — SCSS @use uses last path segment as namespace automatically
|
|
173
|
+
@use 'theme/colors';
|
|
174
|
+
@use 'theme/sizes';
|
|
175
|
+
@use 'theme/typography';
|
|
176
|
+
@use '@themecraft/core/theming';
|
|
176
177
|
|
|
177
178
|
.card {
|
|
178
179
|
background: colors.$surface;
|
|
179
180
|
color: colors.$on-surface;
|
|
180
181
|
padding: sizes.$card-padding;
|
|
181
|
-
@include
|
|
182
|
+
@include typography.body-primary();
|
|
182
183
|
@include theming.theme-transition();
|
|
183
184
|
}
|
|
184
185
|
```
|
|
185
186
|
|
|
187
|
+
**SCSS import rules:**
|
|
188
|
+
- ALWAYS import via package/library name (e.g. `@use 'theme/colors'`)
|
|
189
|
+
- NEVER use relative paths (`../../theme/src/generated/...`) — they break on refactoring and are unreadable
|
|
190
|
+
- NEVER use redundant `as` aliases that match the last path segment (`@use 'theme/colors' as colors` → just `@use 'theme/colors'`). Only use `as` when you need a different name.
|
|
191
|
+
|
|
192
|
+
**Making theme resolvable by package name (priority order):**
|
|
193
|
+
1. **Workspace dependency in package.json** (preferred) — add the theme library as a workspace dependency so SCSS resolves it from `node_modules`:
|
|
194
|
+
```jsonc
|
|
195
|
+
// package.json (root or consuming app)
|
|
196
|
+
{
|
|
197
|
+
"dependencies": {
|
|
198
|
+
"@[prefix]/theme": "workspace:./libs/shared/ui/theme" // bun/pnpm
|
|
199
|
+
// or "file:./libs/shared/ui/theme" for npm
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
Then `<PM> install` creates the link. SCSS `@use '@[prefix]/theme/colors'` resolves automatically.
|
|
204
|
+
2. **Bundler/framework SCSS config** (fallback) — e.g. `sassOptions.includeDirs` in `next.config.js`, or Vite `css.preprocessorOptions.scss.includePaths`.
|
|
205
|
+
|
|
186
206
|
**How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
|
|
187
207
|
|
|
188
208
|
**Token source (pick one):**
|
|
@@ -294,6 +314,7 @@ When reviewing React code, check:
|
|
|
294
314
|
- Server/client separation: Flag WARN if a module mixes server and browser logic without clear boundaries
|
|
295
315
|
- No memory leaks in effects, event listeners, or subscriptions
|
|
296
316
|
- Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
|
|
317
|
+
- SCSS imports: via package name (no relative paths), no redundant `as` aliases
|
|
297
318
|
- Code splitting: `React.lazy` + `Suspense` for heavy routes/components, no eager imports of page-level components
|
|
298
319
|
- Dynamic imports for heavy third-party libraries
|
|
299
320
|
- Naming: PascalCase components, camelCase hooks, kebab-case files
|
|
@@ -168,24 +168,44 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
168
168
|
4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
|
|
169
169
|
5. `ThemeManager` (from `@themecraft/core/runtime`) — runtime switching, storage, FOUC prevention
|
|
170
170
|
|
|
171
|
-
**Component SCSS** — import
|
|
171
|
+
**Component SCSS** — import via package name, NEVER use relative paths, NEVER call `color-var()`/`size-var()` directly:
|
|
172
172
|
```svelte
|
|
173
173
|
<style lang="scss">
|
|
174
|
-
@use
|
|
175
|
-
@use '
|
|
176
|
-
@use '
|
|
177
|
-
@use '
|
|
174
|
+
// Import via package name — SCSS @use uses last path segment as namespace automatically
|
|
175
|
+
@use 'theme/colors';
|
|
176
|
+
@use 'theme/sizes';
|
|
177
|
+
@use 'theme/typography';
|
|
178
|
+
@use '@themecraft/core/theming';
|
|
178
179
|
|
|
179
180
|
.card {
|
|
180
181
|
background: colors.$surface;
|
|
181
182
|
color: colors.$on-surface;
|
|
182
183
|
padding: sizes.$card-padding;
|
|
183
|
-
@include
|
|
184
|
+
@include typography.body-primary();
|
|
184
185
|
@include theming.theme-transition();
|
|
185
186
|
}
|
|
186
187
|
</style>
|
|
187
188
|
```
|
|
188
189
|
|
|
190
|
+
**SCSS import rules:**
|
|
191
|
+
- ALWAYS import via package/library name (e.g. `@use 'theme/colors'`)
|
|
192
|
+
- NEVER use relative paths (`../../theme/src/generated/...`) — they break on refactoring and are unreadable
|
|
193
|
+
- NEVER use redundant `as` aliases that match the last path segment (`@use 'theme/colors' as colors` → just `@use 'theme/colors'`). Only use `as` when you need a different name.
|
|
194
|
+
|
|
195
|
+
**Making theme resolvable by package name (priority order):**
|
|
196
|
+
1. **Workspace dependency in package.json** (preferred) — add the theme library as a workspace dependency so SCSS resolves it from `node_modules`:
|
|
197
|
+
```jsonc
|
|
198
|
+
// package.json (root or consuming app)
|
|
199
|
+
{
|
|
200
|
+
"dependencies": {
|
|
201
|
+
"@[prefix]/theme": "workspace:./libs/shared/ui/theme" // bun/pnpm
|
|
202
|
+
// or "file:./libs/shared/ui/theme" for npm
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
Then `<PM> install` creates the link. SCSS `@use '@[prefix]/theme/colors'` resolves automatically.
|
|
207
|
+
2. **SvelteKit SCSS config** (fallback) — `css.preprocessorOptions.scss.includePaths` in `vite.config.ts`.
|
|
208
|
+
|
|
189
209
|
**How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
|
|
190
210
|
|
|
191
211
|
**Token source (pick one):**
|
|
@@ -298,6 +318,7 @@ When reviewing Svelte code, check:
|
|
|
298
318
|
- `$lib/` imports — no deep relative paths (`../../../`)
|
|
299
319
|
- `$lib/server/` for server-only modules — enforced by SvelteKit
|
|
300
320
|
- Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
|
|
321
|
+
- SCSS imports: via package name (no relative paths), no redundant `as` aliases
|
|
301
322
|
- Lazy loading: routes auto-split, dynamic `import()` for heavy non-route components
|
|
302
323
|
- Accessibility: all Svelte compiler a11y warnings resolved (not suppressed)
|
|
303
324
|
- No `{@html}` without sanitization
|
|
@@ -193,24 +193,44 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
193
193
|
4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
|
|
194
194
|
5. `ThemeManager` (from `@themecraft/core/runtime`) — runtime switching, storage, FOUC prevention
|
|
195
195
|
|
|
196
|
-
**Component SCSS** — import
|
|
196
|
+
**Component SCSS** — import via package name, NEVER use relative paths, NEVER call `color-var()`/`size-var()` directly:
|
|
197
197
|
```vue
|
|
198
198
|
<style scoped lang="scss">
|
|
199
|
-
@use
|
|
200
|
-
@use '
|
|
201
|
-
@use '
|
|
202
|
-
@use '
|
|
199
|
+
// Import via package name — SCSS @use uses last path segment as namespace automatically
|
|
200
|
+
@use 'theme/colors';
|
|
201
|
+
@use 'theme/sizes';
|
|
202
|
+
@use 'theme/typography';
|
|
203
|
+
@use '@themecraft/core/theming';
|
|
203
204
|
|
|
204
205
|
.card {
|
|
205
206
|
background: colors.$surface;
|
|
206
207
|
color: colors.$on-surface;
|
|
207
208
|
padding: sizes.$card-padding;
|
|
208
|
-
@include
|
|
209
|
+
@include typography.body-primary();
|
|
209
210
|
@include theming.theme-transition();
|
|
210
211
|
}
|
|
211
212
|
</style>
|
|
212
213
|
```
|
|
213
214
|
|
|
215
|
+
**SCSS import rules:**
|
|
216
|
+
- ALWAYS import via package/library name (e.g. `@use 'theme/colors'`)
|
|
217
|
+
- NEVER use relative paths (`../../theme/src/generated/...`) — they break on refactoring and are unreadable
|
|
218
|
+
- NEVER use redundant `as` aliases that match the last path segment (`@use 'theme/colors' as colors` → just `@use 'theme/colors'`). Only use `as` when you need a different name.
|
|
219
|
+
|
|
220
|
+
**Making theme resolvable by package name (priority order):**
|
|
221
|
+
1. **Workspace dependency in package.json** (preferred) — add the theme library as a workspace dependency so SCSS resolves it from `node_modules`:
|
|
222
|
+
```jsonc
|
|
223
|
+
// package.json (root or consuming app)
|
|
224
|
+
{
|
|
225
|
+
"dependencies": {
|
|
226
|
+
"@[prefix]/theme": "workspace:./libs/shared/ui/theme" // bun/pnpm
|
|
227
|
+
// or "file:./libs/shared/ui/theme" for npm
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
Then `<PM> install` creates the link. SCSS `@use '@[prefix]/theme/colors'` resolves automatically.
|
|
232
|
+
2. **Vite SCSS config** (fallback) — `css.preprocessorOptions.scss.includePaths` in `vite.config.ts`.
|
|
233
|
+
|
|
214
234
|
**How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
|
|
215
235
|
|
|
216
236
|
**Token source (pick one):**
|
|
@@ -324,6 +344,7 @@ When reviewing Vue code, check:
|
|
|
324
344
|
- SSR/Client separation: Flag WARN if a composable mixes server and browser logic
|
|
325
345
|
- `<style scoped>` on all components — no unscoped styles leaking globally
|
|
326
346
|
- Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
|
|
347
|
+
- SCSS imports: via package name (no relative paths), no redundant `as` aliases
|
|
327
348
|
- Lazy loading: `defineAsyncComponent` for heavy components, dynamic imports for routes
|
|
328
349
|
- No `v-html` without sanitization (XSS risk)
|
|
329
350
|
- Props defined with TypeScript types via `defineProps<{ ... }>()` — not runtime-only validation
|
|
@@ -56,7 +56,28 @@ When running in autonomous/unattended mode (via `autonomous.mjs` or non-interact
|
|
|
56
56
|
### App Separation Principle
|
|
57
57
|
|
|
58
58
|
- **`apps/` are thin shells** — each app is just configuration + routing + bootstrap. Minimal code.
|
|
59
|
-
- **`libs/` contain all logic** — each domain has
|
|
59
|
+
- **`libs/` contain all logic** — each domain/feature has its **own library group** with sub-libraries per layer. Apps import only from entry points.
|
|
60
|
+
- **Feature-first library organization (STRICT)** — every distinct feature/domain gets its own group of libraries:
|
|
61
|
+
```
|
|
62
|
+
libs/
|
|
63
|
+
scan/ # feature: scan
|
|
64
|
+
domain/ # scan types, schemas, interfaces
|
|
65
|
+
ui/ # scan UI components
|
|
66
|
+
feature/ # scan smart components
|
|
67
|
+
data-access/ # scan HTTP/DB services
|
|
68
|
+
streak/ # feature: streak
|
|
69
|
+
domain/
|
|
70
|
+
ui/
|
|
71
|
+
feature/
|
|
72
|
+
achievement/ # feature: achievement
|
|
73
|
+
domain/
|
|
74
|
+
feature/
|
|
75
|
+
shared/ # ONLY truly cross-domain code
|
|
76
|
+
ui/ # generic UI primitives (buttons, modals)
|
|
77
|
+
domain/ # cross-domain types (if any)
|
|
78
|
+
infrastructure/
|
|
79
|
+
```
|
|
80
|
+
**NEVER dump multiple features into a single library** (e.g. `shared/types` with `scan.ts`, `streak.ts`, `achievement.ts`). Each feature owns its types in its own `domain/` library.
|
|
60
81
|
- **Frontend and backend are separate apps** with separate build configurations per environment:
|
|
61
82
|
- `apps/[APP_NAME]/` — Frontend application
|
|
62
83
|
- `apps/api/` — Backend API (if applicable)
|