create-claude-workspace 1.1.63 → 1.1.65

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.
@@ -84,7 +84,7 @@ Always prefer `@cibule/*` packages over custom implementations:
84
84
  - `moduleResolution: "bundler"` — NEVER add `.js` extensions to imports (write `'./foo'`, not `'./foo.js'`)
85
85
  - `readonly` on all fields that don't need reassignment
86
86
  - Custom error classes for domain-specific errors
87
- - Input validation at system boundaries (Zod or TypeBox)
87
+ - Input validation at system boundaries — **TypeBox** preferred (compile-time types + runtime validation from one schema, no duplication). Use `@sinclair/typebox` and `@sinclair/typebox/compiler` for `TypeCompiler`.
88
88
  - Async/await patterns (no callback hell)
89
89
  - Separation of concerns (routes, services, repositories)
90
90
  - File size limit: MAX 200 lines per TypeScript file
@@ -75,7 +75,7 @@ Read `.claude/profiles/frontend.md` for the framework-specific review checklist.
75
75
  - **Backend API security** (for API routes / endpoints):
76
76
  - Authentication check on protected routes (middleware or per-route guard)
77
77
  - Authorization: does the user have permission for this resource?
78
- - Input validation at API boundary (Zod/TypeBox schema, not manual checks)
78
+ - Input validation at API boundary (TypeBox schema, not manual checks)
79
79
  - No SQL injection — all queries use parameterized statements (never string interpolation)
80
80
  - Rate limiting on sensitive endpoints (login, registration, password reset)
81
81
  - CORS configuration — no wildcard `*` in production
@@ -245,50 +245,12 @@ Framework-specific best practices, component architecture, state management, SSR
245
245
 
246
246
  ### Test Coverage
247
247
 
248
- **Thresholds (enforced in CI — 80% minimum):**
249
- | Metric | Threshold |
250
- |--------|-----------|
251
- | Statements | 80% |
252
- | Branches | 80% |
253
- | Functions | 80% |
254
- | Lines | 80% |
255
-
256
- **Vitest coverage** (configured per project in `vite.config.ts` or `vitest.config.ts`):
257
- ```typescript
258
- test: {
259
- coverage: {
260
- provider: 'v8',
261
- reporter: ['text', 'text-summary', 'cobertura', 'html'],
262
- reportsDirectory: '../../coverage/[PROJECT_NAME]',
263
- thresholds: {
264
- statements: 80,
265
- branches: 80,
266
- functions: 80,
267
- lines: 80,
268
- },
269
- include: ['src/**/*.ts'],
270
- exclude: [
271
- 'src/**/*.spec.ts',
272
- 'src/**/index.ts',
273
- 'src/main.ts',
274
- 'src/**/*.config*.ts',
275
- 'src/**/*.routes.ts',
276
- ],
277
- },
278
- }
279
- ```
280
-
281
- **Key points:**
282
- - `cobertura` reporter generates XML for GitLab/GitHub coverage visualization
283
- - `html` reporter generates browsable reports in `coverage/[PROJECT]/`
284
- - Coverage reports are aggregated at workspace root under `coverage/`
285
- - Add `coverage/` to `.gitignore`
248
+ 80% minimum for statements, branches, functions, lines (enforced in CI).
286
249
 
287
- **Running:**
288
- ```bash
289
- nx test [PROJECT] --coverage # single project
290
- nx affected --target=test -- --coverage # all affected
291
- ```
250
+ - **Config template**: `.claude/templates/vitest.coverage.ts` — merge into each project's `vite.config.ts` or `vitest.config.ts` during scaffolding. Replace `[PROJECT_NAME]` with actual name.
251
+ - Reporters: `cobertura` (GitLab/GitHub MR coverage), `html` (browsable), `text-summary`
252
+ - Coverage aggregated at workspace root under `coverage/` (add to `.gitignore`)
253
+ - Run: `nx test [PROJECT] --coverage` or `nx affected --target=test -- --coverage`
292
254
 
293
255
  ### Code Quality & Linting
294
256
 
@@ -319,7 +281,7 @@ Key rules enforced (do NOT weaken):
319
281
 
320
282
  [Include only if the project has a backend]
321
283
 
322
- - Hono routes with validation (Zod or TypeBox)
284
+ - Hono routes with validation (**TypeBox** `@sinclair/typebox` for schema + type inference, `TypeCompiler` for runtime validation)
323
285
  - `@cibule/di` for dependency injection (see @cibule/* Ecosystem section above)
324
286
  - `@cibule/db` + driver for database access, UnitOfWork for atomic writes
325
287
  - `@cibule/storage` + driver for file storage, `@cibule/image` + driver for image processing
@@ -0,0 +1,25 @@
1
+ // Vitest coverage config — add to each project's vite.config.ts or vitest.config.ts
2
+ // Replace [PROJECT_NAME] with the actual project name.
3
+ export default {
4
+ test: {
5
+ coverage: {
6
+ provider: 'v8',
7
+ reporter: ['text', 'text-summary', 'cobertura', 'html'],
8
+ reportsDirectory: '../../coverage/[PROJECT_NAME]',
9
+ thresholds: {
10
+ statements: 80,
11
+ branches: 80,
12
+ functions: 80,
13
+ lines: 80,
14
+ },
15
+ include: ['src/**/*.ts'],
16
+ exclude: [
17
+ 'src/**/*.spec.ts',
18
+ 'src/**/index.ts',
19
+ 'src/main.ts',
20
+ 'src/**/*.config*.ts',
21
+ 'src/**/*.routes.ts',
22
+ ],
23
+ },
24
+ },
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "1.1.63",
3
+ "version": "1.1.65",
4
4
  "description": "Scaffold a project with Claude Code agents for autonomous AI-driven development",
5
5
  "type": "module",
6
6
  "bin": {