claudeos-core 1.4.0 → 1.4.1

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/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ## [1.4.0] — 2026-04-04
3
+ ## [1.4.1] — 2026-04-04
4
+
5
+ ### Added
6
+ - **Node.js / Fastify stack support** — Dedicated `node-fastify` template (pass1/pass2/pass3) with Fastify-specific analysis: plugin architecture, JSON Schema validation (TypeBox, fluent-json-schema), lifecycle hooks (onRequest, preSerialization), Pino logging, fastify.inject() testing; 10 categories, ~62 sub-items
7
+ - **Angular stack support** — Dedicated `angular` template (pass1/pass2/pass3) with Angular-specific analysis: NgModule/standalone components, RxJS patterns, route guards/resolvers, Reactive Forms, state management (NgRx/NGXS/Signals), HttpClient interceptors, ViewEncapsulation, TestBed; 12 categories, ~78 sub-items
8
+ - **Angular domain detection** — `@angular/core` in package.json (priority over React), `angular.json` config file fallback; structure scanner detects `src/app/*/` feature modules with `*.component.ts`/`*.module.ts`/`*.service.ts` classification
9
+ - **Fastify detection** — `fastify` in package.json; priority: NestJS > Fastify > Express (all guarded by `!stack.framework`)
10
+ - **9 new tests** — Fastify detection (3), Angular detection (3), selectTemplates routing (3); total 57 → 66
4
11
 
5
12
  ### Fixed
6
13
  - **Arrow key compatibility** — Added application mode escape sequences (`\x1bOA`/`\x1bOB`) for terminals that use SS3 mode (Git Bash/mintty, tmux, screen); previously only normal mode (`\x1b[A`/`\x1b[B`) was handled
package/README.de.md CHANGED
@@ -69,6 +69,8 @@ Dieser Unterschied summiert sich. 10 Aufgaben/Tag × 20 Minuten gespart = **übe
69
69
  | **Next.js / React / Vue** | `package.json`, `next.config.*`, FSD-Unterstützung | 9 Kategorien, 55 Unterpunkte |
70
70
  | **Python / Django** | `requirements.txt`, `pyproject.toml` | 10 Kategorien, 55 Unterpunkte |
71
71
  | **Python / FastAPI** | `requirements.txt`, `pyproject.toml` | 10 Kategorien, 58 Unterpunkte |
72
+ | **Node.js / Fastify** | `package.json` | 10 Kategorien, 62 Unterpunkte |
73
+ | **Angular** | `package.json`, `angular.json` | 12 Kategorien, 78 Unterpunkte |
72
74
 
73
75
  Automatisch erkannt: Sprache und Version, Framework und Version, ORM (MyBatis, JPA, Exposed, Prisma, TypeORM, SQLAlchemy usw.), Datenbank (PostgreSQL, MySQL, Oracle, MongoDB, SQLite), Paketmanager (Gradle, Maven, npm, yarn, pnpm, pip, poetry), Architektur (CQRS, BFF — aus Modulnamen erkannt), Multi-Modul-Struktur (aus settings.gradle).
74
76
 
@@ -548,14 +550,13 @@ pass-prompts/templates/
548
550
  ├── node-express/ # Node.js / Express / NestJS
549
551
  ├── node-nextjs/ # Next.js / React / Vue
550
552
  ├── python-django/ # Python / Django (DRF)
553
+ ├── node-fastify/ # Node.js / Fastify
554
+ ├── angular/ # Angular
551
555
  └── python-fastapi/ # Python / FastAPI
552
556
  ```
553
557
 
554
558
  `plan-installer` erkennt automatisch Ihren Stack / Ihre Stacks und stellt typspezifische Prompts zusammen. Für Multi-Stack-Projekte werden `pass1-backend-prompt.md` und `pass1-frontend-prompt.md` separat generiert, während `pass3-prompt.md` die Generierungsziele beider Stacks kombiniert.
555
559
 
556
- ---
557
-
558
-
559
560
  ---
560
561
 
561
562
  ## Monorepo-Unterstützung
package/README.es.md CHANGED
@@ -69,6 +69,8 @@ Esta diferencia se acumula. 10 tareas/día × 20 minutos ahorrados = **más de 3
69
69
  | **Next.js / React / Vue** | `package.json`, `next.config.*`, soporte FSD | 9 categorías, 55 sub-ítems |
70
70
  | **Python / Django** | `requirements.txt`, `pyproject.toml` | 10 categorías, 55 sub-ítems |
71
71
  | **Python / FastAPI** | `requirements.txt`, `pyproject.toml` | 10 categorías, 58 sub-ítems |
72
+ | **Node.js / Fastify** | `package.json` | 10 categorías, 62 sub-ítems |
73
+ | **Angular** | `package.json`, `angular.json` | 12 categorías, 78 sub-ítems |
72
74
 
73
75
  Detección automática: lenguaje y versión, framework y versión, ORM (MyBatis, JPA, Exposed, Prisma, TypeORM, SQLAlchemy, etc.), base de datos (PostgreSQL, MySQL, Oracle, MongoDB, SQLite), gestor de paquetes (Gradle, Maven, npm, yarn, pnpm, pip, poetry), arquitectura (CQRS, BFF — detectado de nombres de módulos), estructura multi-módulo (desde settings.gradle).
74
76
 
@@ -549,14 +551,13 @@ pass-prompts/templates/
549
551
  ├── node-express/ # Node.js / Express / NestJS
550
552
  ├── node-nextjs/ # Next.js / React / Vue
551
553
  ├── python-django/ # Python / Django (DRF)
554
+ ├── node-fastify/ # Node.js / Fastify
555
+ ├── angular/ # Angular
552
556
  └── python-fastapi/ # Python / FastAPI
553
557
  ```
554
558
 
555
559
  `plan-installer` auto-detecta tu(s) stack(s) y ensambla prompts específicos por tipo. Para proyectos multi-stack, se generan `pass1-backend-prompt.md` y `pass1-frontend-prompt.md` por separado, mientras que `pass3-prompt.md` combina los objetivos de generación de ambos stacks.
556
560
 
557
- ---
558
-
559
-
560
561
  ---
561
562
 
562
563
  ## Soporte Monorepo
package/README.fr.md CHANGED
@@ -69,6 +69,8 @@ Cette différence s'accumule. 10 tâches/jour × 20 minutes économisées = **pl
69
69
  | **Next.js / React / Vue** | `package.json`, `next.config.*`, support FSD | 9 catégories, 55 sous-éléments |
70
70
  | **Python / Django** | `requirements.txt`, `pyproject.toml` | 10 catégories, 55 sous-éléments |
71
71
  | **Python / FastAPI** | `requirements.txt`, `pyproject.toml` | 10 catégories, 58 sous-éléments |
72
+ | **Node.js / Fastify** | `package.json` | 10 catégories, 62 sous-éléments |
73
+ | **Angular** | `package.json`, `angular.json` | 12 catégories, 78 sous-éléments |
72
74
 
73
75
  Détection automatique : langage et version, framework et version, ORM (MyBatis, JPA, Exposed, Prisma, TypeORM, SQLAlchemy, etc.), base de données (PostgreSQL, MySQL, Oracle, MongoDB, SQLite), gestionnaire de paquets (Gradle, Maven, npm, yarn, pnpm, pip, poetry), architecture (CQRS, BFF — détecté à partir des noms de modules), structure multi-module (depuis settings.gradle).
74
76
 
@@ -549,14 +551,13 @@ pass-prompts/templates/
549
551
  ├── node-express/ # Node.js / Express / NestJS
550
552
  ├── node-nextjs/ # Next.js / React / Vue
551
553
  ├── python-django/ # Python / Django (DRF)
554
+ ├── node-fastify/ # Node.js / Fastify
555
+ ├── angular/ # Angular
552
556
  └── python-fastapi/ # Python / FastAPI
553
557
  ```
554
558
 
555
559
  `plan-installer` auto-détecte votre/vos stack(s) puis assemble des prompts spécifiques au type. Pour les projets multi-stack, `pass1-backend-prompt.md` et `pass1-frontend-prompt.md` sont générés séparément, tandis que `pass3-prompt.md` combine les cibles de génération des deux stacks.
556
560
 
557
- ---
558
-
559
-
560
561
  ---
561
562
 
562
563
  ## Support Monorepo
package/README.hi.md CHANGED
@@ -69,6 +69,8 @@ ClaudeOS-Core ऐसा डॉक्यूमेंटेशन बनाता
69
69
  | **Next.js / React / Vue** | `package.json`, `next.config.*`, FSD सपोर्ट | 9 कैटेगरी, 55 सब-आइटम |
70
70
  | **Python / Django** | `requirements.txt`, `pyproject.toml` | 10 कैटेगरी, 55 सब-आइटम |
71
71
  | **Python / FastAPI** | `requirements.txt`, `pyproject.toml` | 10 कैटेगरी, 58 सब-आइटम |
72
+ | **Node.js / Fastify** | `package.json` | 10 कैटेगरी, 62 सब-आइटम |
73
+ | **Angular** | `package.json`, `angular.json` | 12 कैटेगरी, 78 सब-आइटम |
72
74
 
73
75
  ऑटो-डिटेक्ट: भाषा और वर्शन, फ्रेमवर्क और वर्शन, ORM (MyBatis, JPA, Exposed, Prisma, TypeORM, SQLAlchemy, आदि), डेटाबेस (PostgreSQL, MySQL, Oracle, MongoDB, SQLite), पैकेज मैनेजर (Gradle, Maven, npm, yarn, pnpm, pip, poetry), आर्किटेक्चर (CQRS, BFF — मॉड्यूल नामों से पता लगाया), मल्टी-मॉड्यूल संरचना (settings.gradle से पता लगाया)।
74
76
 
@@ -549,14 +551,13 @@ pass-prompts/templates/
549
551
  ├── node-express/ # Node.js / Express / NestJS
550
552
  ├── node-nextjs/ # Next.js / React / Vue
551
553
  ├── python-django/ # Python / Django (DRF)
554
+ ├── node-fastify/ # Node.js / Fastify
555
+ ├── angular/ # Angular
552
556
  └── python-fastapi/ # Python / FastAPI
553
557
  ```
554
558
 
555
559
  `plan-installer` ऑटोमैटिकली आपके स्टैक(स) डिटेक्ट करता है, फिर टाइप-स्पेसिफिक प्रॉम्प्ट्स असेंबल करता है। मल्टी-स्टैक प्रोजेक्ट्स के लिए, `pass1-backend-prompt.md` और `pass1-frontend-prompt.md` अलग-अलग जेनरेट होते हैं, जबकि `pass3-prompt.md` दोनों स्टैक्स के जेनरेशन टारगेट्स को कंबाइन करता है।
556
560
 
557
- ---
558
-
559
-
560
561
  ---
561
562
 
562
563
  ## Monorepo सपोर्ट
package/README.ja.md CHANGED
@@ -79,6 +79,8 @@ ClaudeOS-Core は、プロジェクトが `ApiResponse.ok()` を使用してい
79
79
  | **Next.js / React / Vue** | `package.json`(next、react、vue) | 9 大分類、55 小項目 |
80
80
  | **Python / Django** | `requirements.txt`、`pyproject.toml` | 10 大分類、55 小項目 |
81
81
  | **Python / FastAPI** | `requirements.txt`、`pyproject.toml` | 10 大分類、58 小項目 |
82
+ | **Node.js / Fastify** | `package.json` | 10 大分類、62 小項目 |
83
+ | **Angular** | `package.json`、`angular.json` | 12 大分類、78 小項目 |
82
84
 
83
85
  自動検出対象:言語とバージョン、フレームワークとバージョン、ORM(MyBatis、JPA、Exposed、Prisma、TypeORM、SQLAlchemy 等)、データベース(PostgreSQL、MySQL、Oracle、MongoDB、SQLite)、パッケージマネージャー(Gradle、Maven、npm、yarn、pnpm、pip、poetry)、アーキテクチャ(CQRS、BFF — モジュール名から検出)、マルチモジュール構造(settings.gradleから検出)。
84
86
 
@@ -568,14 +570,13 @@ pass-prompts/templates/
568
570
  ├── node-express/ # Node.js / Express / NestJS
569
571
  ├── node-nextjs/ # Next.js / React / Vue
570
572
  ├── python-django/ # Python / Django (DRF)
573
+ ├── node-fastify/ # Node.js / Fastify
574
+ ├── angular/ # Angular
571
575
  └── python-fastapi/ # Python / FastAPI
572
576
  ```
573
577
 
574
578
  `plan-installer` がスタックを自動検出し、タイプ固有のプロンプトを組み立てます。マルチスタックプロジェクトでは、`pass1-backend-prompt.md` と `pass1-frontend-prompt.md` が個別に生成され、`pass3-prompt.md` は両方のスタックの生成ターゲットを統合します。
575
579
 
576
- ---
577
-
578
-
579
580
  ---
580
581
 
581
582
  ## Monorepo サポート
package/README.ko.md CHANGED
@@ -80,6 +80,8 @@ ClaudeOS-Core는 프로젝트가 `ApiResponse.ok()`를 쓴다는 것, MyBatis XM
80
80
  | **Next.js / React / Vue** | `package.json`, `next.config.*`, FSD 지원 | 9개 대분류, 55개 소분류 |
81
81
  | **Python / Django** | `requirements.txt`, `pyproject.toml` | 10개 대분류, 55개 소분류 |
82
82
  | **Python / FastAPI** | `requirements.txt`, `pyproject.toml` | 10개 대분류, 58개 소분류 |
83
+ | **Node.js / Fastify** | `package.json` | 10개 대분류, 62개 소분류 |
84
+ | **Angular** | `package.json`, `angular.json` | 12개 대분류, 78개 소분류 |
83
85
 
84
86
  자동 감지 항목: 언어 & 버전, 프레임워크 & 버전, ORM (MyBatis, JPA, Exposed, Prisma, TypeORM, SQLAlchemy 등), 데이터베이스 (PostgreSQL, MySQL, Oracle, MongoDB, SQLite), 패키지 매니저 (Gradle, Maven, npm, yarn, pnpm, pip, poetry), 아키텍처 (CQRS, BFF — 모듈명에서 감지), 멀티모듈 구조 (settings.gradle에서 감지).
85
87
 
@@ -585,6 +587,8 @@ pass-prompts/templates/
585
587
  ├── node-express/ # Node.js / Express / NestJS
586
588
  ├── node-nextjs/ # Next.js / React / Vue
587
589
  ├── python-django/ # Python / Django (DRF)
590
+ ├── node-fastify/ # Node.js / Fastify
591
+ ├── angular/ # Angular
588
592
  └── python-fastapi/ # Python / FastAPI
589
593
  ```
590
594
 
package/README.md CHANGED
@@ -79,6 +79,8 @@ This difference compounds. 10 tasks/day × 20 minutes saved = **3+ hours/day**.
79
79
  | **Next.js / React / Vue** | `package.json`, `next.config.*`, FSD support | 9 categories, 55 sub-items |
80
80
  | **Python / Django** | `requirements.txt`, `pyproject.toml` | 10 categories, 55 sub-items |
81
81
  | **Python / FastAPI** | `requirements.txt`, `pyproject.toml` | 10 categories, 58 sub-items |
82
+ | **Node.js / Fastify** | `package.json` | 10 categories, 62 sub-items |
83
+ | **Angular** | `package.json`, `angular.json` | 12 categories, 78 sub-items |
82
84
 
83
85
  Auto-detected: language & version, framework & version, ORM (MyBatis, JPA, Exposed, Prisma, TypeORM, SQLAlchemy, etc.), database (PostgreSQL, MySQL, Oracle, MongoDB, SQLite), package manager (Gradle, Maven, npm, yarn, pnpm, pip, poetry), architecture (CQRS, BFF — from module names), multi-module structure (from settings.gradle).
84
86
 
@@ -603,16 +605,15 @@ pass-prompts/templates/
603
605
  ├── java-spring/ # Java / Spring Boot
604
606
  ├── kotlin-spring/ # Kotlin / Spring Boot (CQRS, BFF, multi-module)
605
607
  ├── node-express/ # Node.js / Express / NestJS
608
+ ├── node-fastify/ # Node.js / Fastify
606
609
  ├── node-nextjs/ # Next.js / React / Vue
610
+ ├── angular/ # Angular
607
611
  ├── python-django/ # Python / Django (DRF)
608
612
  └── python-fastapi/ # Python / FastAPI
609
613
  ```
610
614
 
611
615
  `plan-installer` auto-detects your stack(s), then assembles type-specific prompts. For multi-stack projects, separate `pass1-backend-prompt.md` and `pass1-frontend-prompt.md` are generated, while `pass3-prompt.md` combines both stacks' generation targets.
612
616
 
613
- ---
614
-
615
-
616
617
  ---
617
618
 
618
619
  ## Monorepo Support
@@ -669,7 +670,7 @@ Contributions are welcome! Areas where help is most needed:
669
670
 
670
671
  - **New stack templates** — Ruby/Rails, Go/Gin, PHP/Laravel, Rust/Axum
671
672
  - **Monorepo deep support** — Separate sub-project roots, workspace detection
672
- - **Test coverage** — Expanding test suite (currently 57 tests covering stack detection, domain grouping, plan validation, and structure scanning)
673
+ - **Test coverage** — Expanding test suite (currently 66 tests covering stack detection, domain grouping, plan validation, and structure scanning)
673
674
 
674
675
  ---
675
676
 
package/README.ru.md CHANGED
@@ -69,6 +69,8 @@ ClaudeOS-Core создаёт документацию, которая знает
69
69
  | **Next.js / React / Vue** | `package.json`, `next.config.*`, поддержка FSD | 9 категорий, 55 подпунктов |
70
70
  | **Python / Django** | `requirements.txt`, `pyproject.toml` | 10 категорий, 55 подпунктов |
71
71
  | **Python / FastAPI** | `requirements.txt`, `pyproject.toml` | 10 категорий, 58 подпунктов |
72
+ | **Node.js / Fastify** | `package.json` | 10 категорий, 62 подпункта |
73
+ | **Angular** | `package.json`, `angular.json` | 12 категорий, 78 подпунктов |
72
74
 
73
75
  Автоматическое определение: язык и версия, фреймворк и версия, ORM (MyBatis, JPA, Exposed, Prisma, TypeORM, SQLAlchemy и др.), база данных (PostgreSQL, MySQL, Oracle, MongoDB, SQLite), пакетный менеджер (Gradle, Maven, npm, yarn, pnpm, pip, poetry), архитектура (CQRS, BFF — определяется из имён модулей), мультимодульная структура (из settings.gradle).
74
76
 
@@ -549,14 +551,13 @@ pass-prompts/templates/
549
551
  ├── node-express/ # Node.js / Express / NestJS
550
552
  ├── node-nextjs/ # Next.js / React / Vue
551
553
  ├── python-django/ # Python / Django (DRF)
554
+ ├── node-fastify/ # Node.js / Fastify
555
+ ├── angular/ # Angular
552
556
  └── python-fastapi/ # Python / FastAPI
553
557
  ```
554
558
 
555
559
  `plan-installer` автоматически определяет ваш стек(и) и собирает типо-специфичные промпты. Для мульти-стек проектов генерируются отдельные `pass1-backend-prompt.md` и `pass1-frontend-prompt.md`, а `pass3-prompt.md` объединяет цели генерации обоих стеков.
556
560
 
557
- ---
558
-
559
-
560
561
  ---
561
562
 
562
563
  ## Поддержка Monorepo
package/README.vi.md CHANGED
@@ -69,6 +69,8 @@ Sự khác biệt này tích lũy. 10 task/ngày × 20 phút tiết kiệm = **h
69
69
  | **Next.js / React / Vue** | `package.json`, `next.config.*`, hỗ trợ FSD | 9 danh mục, 55 mục con |
70
70
  | **Python / Django** | `requirements.txt`, `pyproject.toml` | 10 danh mục, 55 mục con |
71
71
  | **Python / FastAPI** | `requirements.txt`, `pyproject.toml` | 10 danh mục, 58 mục con |
72
+ | **Node.js / Fastify** | `package.json` | 10 danh mục, 62 mục con |
73
+ | **Angular** | `package.json`, `angular.json` | 12 danh mục, 78 mục con |
72
74
 
73
75
  Tự động phát hiện: ngôn ngữ & phiên bản, framework & phiên bản, ORM (MyBatis, JPA, Exposed, Prisma, TypeORM, SQLAlchemy, v.v.), database (PostgreSQL, MySQL, Oracle, MongoDB, SQLite), package manager (Gradle, Maven, npm, yarn, pnpm, pip, poetry), kiến trúc (CQRS, BFF — phát hiện từ tên module), cấu trúc multi-module (từ settings.gradle).
74
76
 
@@ -549,14 +551,13 @@ pass-prompts/templates/
549
551
  ├── node-express/ # Node.js / Express / NestJS
550
552
  ├── node-nextjs/ # Next.js / React / Vue
551
553
  ├── python-django/ # Python / Django (DRF)
554
+ ├── node-fastify/ # Node.js / Fastify
555
+ ├── angular/ # Angular
552
556
  └── python-fastapi/ # Python / FastAPI
553
557
  ```
554
558
 
555
559
  `plan-installer` tự phát hiện stack của bạn, sau đó lắp ráp prompt theo loại. Với dự án multi-stack, `pass1-backend-prompt.md` và `pass1-frontend-prompt.md` được tạo riêng, trong khi `pass3-prompt.md` kết hợp mục tiêu tạo file của cả hai stack.
556
560
 
557
- ---
558
-
559
-
560
561
  ---
561
562
 
562
563
  ## Hỗ Trợ Monorepo
package/README.zh-CN.md CHANGED
@@ -69,6 +69,8 @@ ClaudeOS-Core 生成的文档知道你的项目使用 `ApiResponse.ok()`(而
69
69
  | **Next.js / React / Vue** | `package.json`(next、react、vue) | 9 大类,55 小项 |
70
70
  | **Python / Django** | `requirements.txt`、`pyproject.toml` | 10 大类,55 小项 |
71
71
  | **Python / FastAPI** | `requirements.txt`、`pyproject.toml` | 10 大类,58 小项 |
72
+ | **Node.js / Fastify** | `package.json` | 10 大类,62 小项 |
73
+ | **Angular** | `package.json`、`angular.json` | 12 大类,78 小项 |
72
74
 
73
75
  自动检测:语言及版本、框架及版本、ORM(MyBatis、JPA、Exposed、Prisma、TypeORM、SQLAlchemy 等)、数据库(PostgreSQL、MySQL、Oracle、MongoDB、SQLite)、包管理器(Gradle、Maven、npm、yarn、pnpm、pip、poetry)、架构(CQRS、BFF — 从模块名检测)、多模块结构(从 settings.gradle 检测)。
74
76
 
@@ -549,14 +551,13 @@ pass-prompts/templates/
549
551
  ├── node-express/ # Node.js / Express / NestJS
550
552
  ├── node-nextjs/ # Next.js / React / Vue
551
553
  ├── python-django/ # Python / Django (DRF)
554
+ ├── node-fastify/ # Node.js / Fastify
555
+ ├── angular/ # Angular
552
556
  └── python-fastapi/ # Python / FastAPI
553
557
  ```
554
558
 
555
559
  `plan-installer` 自动检测你的技术栈,然后组装类型特定的提示。对于多栈项目,会分别生成 `pass1-backend-prompt.md` 和 `pass1-frontend-prompt.md`,而 `pass3-prompt.md` 则合并两个栈的生成目标。
556
560
 
557
- ---
558
-
559
-
560
561
  ---
561
562
 
562
563
  ## Monorepo 支持
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudeos-core",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Auto-generate Claude Code documentation from your actual source code — Standards, Rules, Skills, and Guides tailored to your project",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
@@ -62,6 +62,8 @@
62
62
  "monorepo",
63
63
  "nextjs",
64
64
  "express",
65
+ "fastify",
66
+ "angular",
65
67
  "django",
66
68
  "fastapi"
67
69
  ],
@@ -0,0 +1,146 @@
1
+ Read claudeos-core/generated/project-analysis.json and
2
+ perform a deep analysis of the following domains only: {{DOMAIN_GROUP}}
3
+
4
+ For each domain, select one representative file per layer, read its code, and analyze it.
5
+ Prioritize files with the richest patterns.
6
+
7
+ Analysis items (per domain):
8
+
9
+ 1. Module/Component Patterns
10
+ - Module structure (NgModule, standalone components, feature modules)
11
+ - Component type (@Component decorator, inline vs external templates)
12
+ - Component lifecycle hooks (OnInit, OnDestroy, OnChanges, AfterViewInit)
13
+ - Change detection strategy (Default vs OnPush, markForCheck, detectChanges)
14
+ - Signals usage (signal, computed, effect — Angular 16+)
15
+ - Input/Output decorators (@Input, @Output, input(), output() — signal-based)
16
+ - ViewChild/ContentChild usage
17
+ - Component communication patterns (parent-child, shared service, EventEmitter)
18
+
19
+ 2. Routing Patterns
20
+ - Route configuration (RouterModule.forRoot/forChild, standalone routes)
21
+ - Lazy loading (loadChildren, loadComponent)
22
+ - Route Guards (canActivate, canDeactivate, canLoad, resolve, functional guards)
23
+ - Route resolvers
24
+ - Nested routes and auxiliary routes
25
+ - URL parameter handling (ActivatedRoute, paramMap, queryParamMap)
26
+ - Navigation (Router.navigate, routerLink)
27
+
28
+ 3. Service/DI Patterns
29
+ - Service structure (@Injectable, providedIn: 'root' vs module-level)
30
+ - Injection tokens (InjectionToken, custom tokens)
31
+ - Factory providers (useFactory, useClass, useValue, useExisting)
32
+ - Hierarchical injection (component-level providers)
33
+ - inject() function (Angular 14+) vs constructor injection
34
+
35
+ 4. RxJS/Reactive Patterns
36
+ - Observable usage (HttpClient, Subject, BehaviorSubject, ReplaySubject)
37
+ - Operators (map, switchMap, mergeMap, catchError, tap, takeUntil, shareReplay)
38
+ - Subscription management (takeUntil, async pipe, DestroyRef, takeUntilDestroyed)
39
+ - Error handling in streams
40
+ - Custom operators
41
+ - Signals vs Observables migration status
42
+
43
+ 5. Template Patterns
44
+ - Structural directives (*ngIf, *ngFor, @if/@for — control flow Angular 17+)
45
+ - Attribute directives (ngClass, ngStyle, custom directives)
46
+ - Template reference variables (#ref)
47
+ - ng-content (content projection, multi-slot projection)
48
+ - ng-template and ngTemplateOutlet
49
+
50
+ 6. Form Patterns
51
+ - Reactive Forms (FormGroup, FormControl, FormBuilder, FormArray)
52
+ - Template-driven Forms (ngModel, NgForm)
53
+ - Validators (built-in, custom sync/async validators)
54
+ - Error display patterns
55
+ - Dynamic forms
56
+ - Form submission handling
57
+
58
+ 7. State Management Patterns
59
+ - NgRx (Store, Actions, Reducers, Effects, Selectors)
60
+ - NGXS (State, Action, Selector)
61
+ - Akita (Store, Query)
62
+ - Component Store (@ngrx/component-store)
63
+ - Signal Store (@ngrx/signals)
64
+ - Plain service-based state (BehaviorSubject)
65
+
66
+ 8. HTTP/API Patterns
67
+ - HttpClient usage (get, post, put, delete)
68
+ - Interceptors (HttpInterceptor, functional interceptors)
69
+ - Error handling (catchError, retry, HttpErrorResponse)
70
+ - Request/response transformation
71
+ - API service abstraction patterns
72
+ - Caching strategies (shareReplay, custom cache interceptor)
73
+ - Import paths: record EXACT path aliases and import patterns (e.g., `@app/`, `@core/`, `@shared/`)
74
+
75
+ 9. Testing Patterns
76
+ - Test framework (Jasmine/Karma, Jest, Web Test Runner)
77
+ - TestBed configuration (configureTestingModule, component harness)
78
+ - Component testing (ComponentFixture, DebugElement)
79
+ - Service testing (inject, HttpClientTestingModule)
80
+ - Mocking (spyOn, jasmine.createSpy, jest.mock)
81
+ - E2E testing (Protractor, Cypress, Playwright)
82
+ - Test naming conventions
83
+
84
+ 10. Styling Patterns
85
+ - ViewEncapsulation (Emulated, None, ShadowDom)
86
+ - CSS methodology (BEM, SCSS modules, Tailwind, Angular Material theming)
87
+ - :host, ::ng-deep usage
88
+ - Global vs component styles
89
+ - CSS/SCSS variables and theming
90
+
91
+ 11. Domain-Specific Patterns
92
+ - File upload
93
+ - WebSocket (RxJS WebSocket, Socket.io)
94
+ - Internationalization (@ngx-translate, Angular i18n)
95
+ - SSR/SSG (Angular Universal, @angular/ssr)
96
+ - PWA (@angular/pwa)
97
+ - Angular Material / CDK usage
98
+ - Animation (@angular/animations)
99
+
100
+ 12. Anti-patterns / Inconsistencies
101
+ - Memory leaks (unsubscribed Observables, missing takeUntil/DestroyRef)
102
+ - Excessive change detection (not using OnPush)
103
+ - Large modules (not lazy loaded)
104
+ - Subscribe inside subscribe (nested subscriptions)
105
+ - Direct DOM manipulation (instead of renderer)
106
+ - Type safety issues (any abuse)
107
+ - Inconsistent patterns across feature modules
108
+
109
+ Do not create or modify source files. Analysis only.
110
+ Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
111
+
112
+ {
113
+ "analyzedAt": "ISO timestamp",
114
+ "passNum": {{PASS_NUM}},
115
+ "domains": ["dashboard", "auth", "settings", "profile"],
116
+ "analysisPerDomain": {
117
+ "dashboard": {
118
+ "representativeFiles": {
119
+ "module": "dashboard/dashboard.module.ts",
120
+ "component": "dashboard/dashboard.component.ts",
121
+ "service": "dashboard/dashboard.service.ts",
122
+ "routing": "dashboard/dashboard-routing.module.ts",
123
+ "template": "dashboard/dashboard.component.html"
124
+ },
125
+ "patterns": {
126
+ "module": { ... },
127
+ "component": { ... },
128
+ "routing": { ... },
129
+ "service": { ... },
130
+ "rxjs": { ... },
131
+ "template": { ... },
132
+ "form": { ... },
133
+ "stateManagement": { ... },
134
+ "http": { ... },
135
+ "testing": { ... },
136
+ "styling": { ... }
137
+ },
138
+ "specialPatterns": [],
139
+ "antiPatterns": []
140
+ }
141
+ },
142
+ "crossDomainCommon": {
143
+ "description": "Patterns commonly used across domains in this group",
144
+ "patterns": []
145
+ }
146
+ }
@@ -0,0 +1,86 @@
1
+ Read all pass1-*.json files from the claudeos-core/generated/ directory and
2
+ merge all domain analysis results into a single unified report.
3
+
4
+ Merge items:
5
+
6
+ 1. Universal Patterns (shared by 100% of all domains)
7
+ - Module/Component structure (NgModule vs standalone, decorator conventions)
8
+ - Change detection strategy (Default vs OnPush)
9
+ - Service/DI approach (providedIn, injection patterns)
10
+ - RxJS operator conventions (subscription management, error handling)
11
+ - Routing conventions (lazy loading, guards)
12
+ - Template conventions (structural directives, control flow)
13
+ - Form approach (Reactive vs Template-driven)
14
+
15
+ 2. Majority Patterns (shared by 50%+ of domains)
16
+ - Specify which domains share them
17
+
18
+ 3. Domain-Specific Patterns (unique to a single domain)
19
+ - File upload: which domain
20
+ - WebSocket: which domain
21
+ - Animations: which domain
22
+ - i18n: which domain
23
+ - SSR: which domain
24
+
25
+ 4. Anti-pattern Summary
26
+ - Consolidate all inconsistencies found across domains
27
+ - Classify by severity (CRITICAL / HIGH / MEDIUM / LOW)
28
+
29
+ 5. Naming Conventions Summary
30
+ - File naming (*.component.ts, *.service.ts, *.module.ts, *.pipe.ts)
31
+ - Class naming (PascalCase + suffix: Component, Service, Module, Pipe, Directive, Guard)
32
+ - Selector naming (app-prefix, kebab-case)
33
+ - Module organization conventions
34
+ - Route URL patterns
35
+
36
+ 6. Shared Services/Components List
37
+ - Shared module exports with EXACT import paths
38
+ - Core services with EXACT import paths
39
+ - Common components (UI library) with EXACT import paths
40
+ - Path aliases used in the project (e.g., `@app/` -> `src/app/`, `@core/`, `@shared/`)
41
+ - Environment types
42
+ - Constants/Enum management
43
+
44
+ 7. Security/Authentication Patterns
45
+ - Authentication approach (JWT, session, OAuth2)
46
+ - Route guard strategy (canActivate, functional guards)
47
+ - HTTP interceptor auth patterns
48
+ - CORS configuration
49
+ - Content Security Policy
50
+
51
+ 8. State Management Patterns
52
+ - NgRx / NGXS / Signal Store — which is used
53
+ - State structure conventions
54
+ - Action/Effect patterns
55
+ - Selector conventions
56
+ - Component Store usage
57
+
58
+ 9. Testing Strategy Summary
59
+ - Test coverage level
60
+ - Test classification (unit/integration/E2E)
61
+ - TestBed configuration patterns
62
+ - Mocking strategy (spies, stubs, HttpClientTestingModule)
63
+ - Test naming conventions
64
+ - Component harness usage
65
+
66
+ 10. Styling Strategy
67
+ - CSS methodology
68
+ - ViewEncapsulation strategy
69
+ - Theming approach (CSS variables, Angular Material)
70
+ - Responsive patterns
71
+
72
+ 11. Performance Patterns
73
+ - OnPush change detection adoption
74
+ - Lazy loading coverage
75
+ - TrackBy usage in *ngFor
76
+ - Bundle optimization (tree shaking, code splitting)
77
+ - Preloading strategies
78
+
79
+ 12. Code Quality Tools
80
+ - Lint/Format (ESLint, angular-eslint, Prettier)
81
+ - Angular CLI schematics
82
+ - Strict mode (strict TypeScript, strict templates)
83
+ - CI integration status
84
+
85
+ Do not generate code. Merge only.
86
+ Save results to claudeos-core/generated/pass2-merged.json.
@@ -0,0 +1,102 @@
1
+ Read claudeos-core/generated/project-analysis.json and
2
+ claudeos-core/generated/pass2-merged.json, then
3
+ generate all ClaudeOS-Core files based on the analysis results.
4
+
5
+ Do not read the original source code again. Reference only the analysis results.
6
+
7
+ CRITICAL — Package Manager Consistency:
8
+ Check `stack.packageManager` in project-analysis.json (e.g., "npm", "yarn", "pnpm").
9
+ ALL generated files MUST use ONLY that detected package manager's commands.
10
+ Also check `angular.json` for actual CLI commands and project names.
11
+
12
+ CRITICAL — Cross-file Consistency:
13
+ Rules (.claude/rules/) and Standards (claudeos-core/standard/) MUST NOT contradict each other.
14
+
15
+ CRITICAL — Code Example Accuracy:
16
+ ALL code examples MUST use EXACT method names, class names, and signatures from pass2-merged.json.
17
+ Do NOT paraphrase, rename, or infer API names.
18
+
19
+ CRITICAL — CLAUDE.md Reference Table Completeness:
20
+ The reference table in CLAUDE.md MUST list ALL generated standard files.
21
+
22
+ Generation targets:
23
+
24
+ 1. CLAUDE.md (project root)
25
+ - Role definition (Angular frontend)
26
+ - Build & Run Commands (ng serve, ng build, ng test — using detected packageManager)
27
+ - Core architecture diagram (Module → Component → Service → HTTP)
28
+ - State management approach
29
+ - Standard/Skills/Guide reference table
30
+
31
+ 2. claudeos-core/standard/ (active domains only)
32
+ - 00.core/01.project-overview.md — Stack (Angular version, TypeScript version), project structure
33
+ - 00.core/02.architecture.md — Module hierarchy, DI tree, data flow, lazy loading map
34
+ - 00.core/03.naming-conventions.md — File/class/selector/module naming conventions
35
+ - 20.frontend-ui/01.component-patterns.md — Component structure, lifecycle, OnPush, Signals, I/O
36
+ - 20.frontend-ui/02.routing-patterns.md — Route config, lazy loading, guards, resolvers
37
+ - 20.frontend-ui/03.service-di-patterns.md — Injectable, providers, injection tokens, inject()
38
+ - 20.frontend-ui/04.rxjs-patterns.md — Observable management, operators, subscription cleanup
39
+ - 20.frontend-ui/05.template-patterns.md — Directives, content projection, control flow (@if/@for)
40
+ - 20.frontend-ui/06.form-patterns.md — Reactive/Template forms, validators, error handling
41
+ - 20.frontend-ui/07.state-management.md — NgRx/NGXS/Signal Store patterns
42
+ - 20.frontend-ui/08.http-patterns.md — HttpClient, interceptors, caching, error handling
43
+ - 20.frontend-ui/09.styling-patterns.md — ViewEncapsulation, theming, responsive
44
+ - 10.backend-api/01.api-integration.md — API service abstraction, interceptors (if backend exists)
45
+ - 30.security-db/01.security-auth.md — Auth guards, JWT interceptor, route protection
46
+ - 40.infra/01.environment-config.md — environment.ts, angular.json, build configuration
47
+ - 40.infra/02.logging-monitoring.md — Error tracking, performance monitoring
48
+ - 40.infra/03.cicd-deployment.md — CI/CD pipeline, ng build --configuration, Docker
49
+ - 50.verification/01.development-verification.md — ng serve, ng build, Lighthouse
50
+ - 50.verification/02.testing-strategy.md — TestBed, component harness, E2E strategy
51
+
52
+ Each file MUST include:
53
+ - Correct examples (code blocks in TypeScript)
54
+ - Incorrect examples (code blocks showing common Angular mistakes)
55
+ - Key rules summary table
56
+
57
+ 3. .claude/rules/ (active domains only)
58
+ - Write the full rule content directly in each file (self-contained)
59
+ - Include 5-15 lines of key rules with concrete Angular examples
60
+ - Do NOT use @import
61
+ - Each rule file MUST end with a `## Reference` section
62
+ - `paths:` frontmatter per rule category:
63
+ - `00.core/*` rules: `paths: ["**/*"]`
64
+ - `20.frontend/*` rules: `paths: ["**/*"]`
65
+ - `30.security-db/*` rules: `paths: ["**/*"]`
66
+ - `40.infra/*` rules: `paths: ["**/*.json", "**/*.env*", "**/angular.json", "**/Dockerfile*", "**/*.yml", "**/*.yaml"]`
67
+ - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]`
68
+ - MUST generate `.claude/rules/00.core/00.standard-reference.md` as a directory of all standard files
69
+
70
+ 4. .claude/rules/50.sync/ (3 sync rules)
71
+ - 01.standard-sync.md
72
+ - 02.rules-sync.md
73
+ - 03.skills-sync.md
74
+
75
+ 5. claudeos-core/skills/ (active domains only)
76
+ - 20.frontend-page/01.scaffold-feature-module.md (orchestrator — Angular feature module scaffolding)
77
+ - 20.frontend-page/scaffold-page-feature/01~08 (sub-skills: module, component, service, routing, template, test, style, index)
78
+ - 00.shared/MANIFEST.md (skill registry)
79
+
80
+ 6. claudeos-core/guide/ (all)
81
+ - 01.onboarding/01.overview.md
82
+ - 01.onboarding/02.quickstart.md
83
+ - 01.onboarding/03.glossary.md (include Angular-specific terms: NgModule, Directive, Pipe, Guard, Resolver, Interceptor, Signal)
84
+ - 02.usage/01.faq.md
85
+ - 02.usage/02.real-world-examples.md (include feature module creation example)
86
+ - 02.usage/03.do-and-dont.md (include Angular-specific anti-patterns)
87
+ - 03.troubleshooting/01.troubleshooting.md
88
+ - 04.architecture/01.file-map.md
89
+ - 04.architecture/02.pros-and-cons.md
90
+
91
+ 7. claudeos-core/plan/ (Master Plan)
92
+ - 10.standard-master.md
93
+ - 20.rules-master.md
94
+ - 21.sync-rules-master.md
95
+ - 30.frontend-skills-master.md
96
+ - 40.guides-master.md
97
+
98
+ 8. claudeos-core/database/
99
+ - 01.schema-overview.md — API schema description (if applicable)
100
+
101
+ 9. claudeos-core/mcp-guide/
102
+ - 01.mcp-overview.md
@@ -0,0 +1,123 @@
1
+ Read claudeos-core/generated/project-analysis.json and
2
+ perform a deep analysis of the following domains only: {{DOMAIN_GROUP}}
3
+
4
+ For each domain, select one representative file per layer, read its code, and analyze it.
5
+ Prioritize files with the richest patterns.
6
+
7
+ Analysis items (per domain):
8
+
9
+ 1. Route/Plugin Patterns
10
+ - Route registration (fastify.register, route shorthand get/post/put/delete/patch)
11
+ - Plugin architecture (fastify-plugin, encapsulation, prefix, decorators)
12
+ - URL patterns (RESTful conventions, naming, versioning, prefix)
13
+ - Parameter handling (request.params, request.query, request.body, request.headers)
14
+ - Response format (reply.send, reply.code, serialization, custom response wrappers)
15
+ - If a custom response wrapper/helper exists, record its EXACT function/class name, EXACT method signatures, and EXACT import path. Do NOT guess — read the actual source.
16
+ - Error handling (setErrorHandler, @fastify/sensible, custom error classes, onError hook)
17
+ - Authentication (fastify-jwt, @fastify/auth, @fastify/passport, custom preValidation hooks)
18
+ - API documentation (@fastify/swagger, @fastify/swagger-ui, route schema)
19
+ - Pagination (offset/limit, cursor, custom)
20
+
21
+ 2. Schema Validation Patterns
22
+ - JSON Schema usage (route-level schema: body, querystring, params, response)
23
+ - TypeBox (@sinclair/typebox) usage for type-safe schemas
24
+ - fluent-json-schema usage
25
+ - Shared schema definitions ($ref, addSchema)
26
+ - Serialization schemas (response schema for fast serialization)
27
+ - Ajv configuration and custom keywords
28
+
29
+ 3. Hook Patterns
30
+ - Lifecycle hooks (onRequest, preParsing, preValidation, preHandler, preSerialization, onSend, onResponse, onError)
31
+ - Hook scope (global vs route-level vs plugin-scoped)
32
+ - Authentication/authorization hooks
33
+ - Logging hooks
34
+ - Request decoration (fastify.decorateRequest)
35
+
36
+ 4. Service/Business Logic Patterns
37
+ - Dependency injection approach (plugin decorators, manual injection, awilix, @fastify/awilix)
38
+ - Transaction strategy (Prisma.$transaction, Knex transaction, etc.)
39
+ - Business exception handling (custom error classes, Boom-like errors, @fastify/sensible)
40
+ - Validation beyond schema (business rules)
41
+ - Event handling (EventEmitter, custom event bus)
42
+
43
+ 5. Data Access Patterns
44
+ - ORM/query builder (Prisma, TypeORM, Knex, Drizzle, Mongoose, MikroORM)
45
+ - Database plugin (@fastify/postgres, @fastify/mysql, @fastify/mongodb)
46
+ - Repository pattern usage
47
+ - Query optimization (N+1 prevention, eager loading)
48
+ - Migration tools (Prisma Migrate, Knex Migration)
49
+ - Connection management (plugin lifecycle, onClose hook)
50
+
51
+ 6. Configuration/Environment Patterns
52
+ - Environment variable management (@fastify/env, dotenv, env-schema)
53
+ - Configuration schema validation
54
+ - Per-environment branching (development/staging/production)
55
+ - Fastify server options (logger, trustProxy, bodyLimit)
56
+
57
+ 7. Logging Patterns
58
+ - Pino integration (built-in Fastify logger)
59
+ - Log level configuration
60
+ - Request/response logging (built-in request logging)
61
+ - Serializers (custom serializers for request/response/error)
62
+ - Child loggers (request.log)
63
+
64
+ 8. Testing Patterns
65
+ - Test framework (tap, Jest, Vitest, node:test)
66
+ - fastify.inject() for HTTP testing (light-my-request)
67
+ - Plugin testing strategy
68
+ - Test lifecycle (build/close app per test)
69
+ - Mocking strategy
70
+ - DB test strategy
71
+
72
+ 9. Domain-Specific Patterns
73
+ - File upload (@fastify/multipart, S3, presigned URL)
74
+ - WebSocket (@fastify/websocket)
75
+ - Rate limiting (@fastify/rate-limit)
76
+ - Caching (@fastify/caching, Redis)
77
+ - CORS (@fastify/cors)
78
+ - Static files (@fastify/static)
79
+ - Messaging (Kafka, RabbitMQ, BullMQ)
80
+ - Server-Sent Events
81
+
82
+ 10. Anti-patterns / Inconsistencies
83
+ - Blocking the event loop (sync operations in handlers)
84
+ - Not using schema validation (missing performance benefit)
85
+ - Plugin encapsulation violations
86
+ - Inconsistent error handling across routes
87
+ - Type safety issues (any abuse, missing types)
88
+ - Security issues (injection, missing authorization)
89
+
90
+ Do not create or modify source files. Analysis only.
91
+ Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
92
+
93
+ {
94
+ "analyzedAt": "ISO timestamp",
95
+ "passNum": {{PASS_NUM}},
96
+ "domains": ["users", "auth", "orders", "products"],
97
+ "analysisPerDomain": {
98
+ "users": {
99
+ "representativeFiles": {
100
+ "route": "routes/users.ts",
101
+ "schema": "schemas/users.ts",
102
+ "service": "services/users.service.ts",
103
+ "plugin": "plugins/db.ts"
104
+ },
105
+ "patterns": {
106
+ "route": { ... },
107
+ "schema": { ... },
108
+ "hooks": { ... },
109
+ "service": { ... },
110
+ "dataAccess": { ... },
111
+ "config": { ... },
112
+ "logging": { ... },
113
+ "testing": { ... }
114
+ },
115
+ "specialPatterns": [],
116
+ "antiPatterns": []
117
+ }
118
+ },
119
+ "crossDomainCommon": {
120
+ "description": "Patterns commonly used across domains in this group",
121
+ "patterns": []
122
+ }
123
+ }
@@ -0,0 +1,83 @@
1
+ Read all pass1-*.json files from the claudeos-core/generated/ directory and
2
+ merge all domain analysis results into a single unified report.
3
+
4
+ Merge items:
5
+
6
+ 1. Universal Patterns (shared by 100% of all domains)
7
+ - Route/Plugin registration style (shorthand vs full declaration, prefix conventions)
8
+ - Schema validation approach (JSON Schema, TypeBox, fluent-json-schema)
9
+ - Hook chain order and scope
10
+ - Service/DI approach
11
+ - Data access patterns (ORM, plugin-based DB access)
12
+ - Error handling patterns
13
+
14
+ 2. Majority Patterns (shared by 50%+ of domains)
15
+ - Specify which domains share them
16
+
17
+ 3. Domain-Specific Patterns (unique to a single domain)
18
+ - File upload: which domain
19
+ - WebSocket: which domain
20
+ - Rate limiting: which domain
21
+ - External API integration: which domain
22
+ - Caching: which domain
23
+ - Messaging: which domain
24
+
25
+ 4. Anti-pattern Summary
26
+ - Consolidate all inconsistencies found across domains
27
+ - Classify by severity (CRITICAL / HIGH / MEDIUM / LOW)
28
+
29
+ 5. Naming Conventions Summary
30
+ - File/directory naming (kebab-case, camelCase, PascalCase)
31
+ - Route file naming conventions
32
+ - Plugin naming conventions
33
+ - Schema naming conventions
34
+ - Module/package structure conventions
35
+
36
+ 6. Common Types/Utilities List
37
+ - Shared type definition files with EXACT import paths
38
+ - Shared schemas ($ref definitions) with EXACT locations
39
+ - Utility functions with EXACT import paths
40
+ - Path aliases used in the project
41
+ - Constants/Enum management
42
+
43
+ 7. Security/Authentication Patterns
44
+ - JWT/session approach (fastify-jwt, @fastify/auth)
45
+ - Hook-based authentication strategy
46
+ - CORS configuration (@fastify/cors)
47
+ - Rate Limiting (@fastify/rate-limit)
48
+ - Per-environment security settings
49
+
50
+ 8. Database Patterns
51
+ - Table/collection naming conventions
52
+ - Migration strategy
53
+ - Seed data management
54
+ - Audit columns (createdAt, updatedAt)
55
+ - Connection lifecycle (onClose hook)
56
+
57
+ 9. Testing Strategy Summary
58
+ - Test coverage level
59
+ - Test classification system (unit/integration/E2E)
60
+ - fastify.inject() usage patterns
61
+ - Mocking strategy
62
+ - DB test strategy
63
+ - Plugin test strategy
64
+
65
+ 10. Logging/Monitoring Strategy
66
+ - Pino configuration
67
+ - Log level policy
68
+ - Serializer customization
69
+ - Request/response logging
70
+
71
+ 11. Performance Patterns
72
+ - Schema-based serialization usage
73
+ - Caching strategy
74
+ - Connection pool configuration
75
+ - Async processing status
76
+
77
+ 12. Code Quality Tools
78
+ - Lint/Format tools (ESLint, Prettier, Biome)
79
+ - Pre-commit hooks (husky, lint-staged)
80
+ - CI integration status
81
+
82
+ Do not generate code. Merge only.
83
+ Save results to claudeos-core/generated/pass2-merged.json.
@@ -0,0 +1,108 @@
1
+ Read claudeos-core/generated/project-analysis.json and
2
+ claudeos-core/generated/pass2-merged.json, then
3
+ generate all ClaudeOS-Core files based on the analysis results.
4
+
5
+ Do not read the original source code again. Reference only the analysis results.
6
+
7
+ CRITICAL — Package Manager Consistency:
8
+ Check `stack.packageManager` in project-analysis.json (e.g., "pnpm", "yarn", "npm").
9
+ ALL generated files MUST use ONLY that detected package manager's commands.
10
+ NEVER mix npm/yarn/pnpm commands. Also check `scripts` field in the project's package.json
11
+ for actual script names.
12
+
13
+ CRITICAL — Cross-file Consistency:
14
+ Rules (.claude/rules/) and Standards (claudeos-core/standard/) MUST NOT contradict each other.
15
+ If a standard defines a specific pattern (e.g., import path, schema naming, hook usage),
16
+ the corresponding rule MUST use the same pattern.
17
+
18
+ CRITICAL — Code Example Accuracy:
19
+ ALL code examples in rules and standards MUST use EXACT method names, class names,
20
+ and signatures from pass2-merged.json analysis data.
21
+ Do NOT paraphrase, rename, or infer API names.
22
+ If a method signature is not captured in the analysis data,
23
+ write "See corresponding standard for exact API" instead of guessing.
24
+
25
+ CRITICAL — CLAUDE.md Reference Table Completeness:
26
+ The reference table in CLAUDE.md MUST list ALL generated standard files.
27
+ Alternatively, add a note directing readers to .claude/rules/00.core/00.standard-reference.md.
28
+
29
+ Generation targets:
30
+
31
+ 1. CLAUDE.md (project root)
32
+ - Role definition (Fastify backend)
33
+ - Build & Run Commands (use ONLY the detected packageManager)
34
+ - Core architecture diagram (plugin-based)
35
+ - DB table/collection naming
36
+ - Standard/Skills/Guide reference table
37
+
38
+ 2. claudeos-core/standard/ (active domains only)
39
+ - 00.core/01.project-overview.md — Stack, modules, server info
40
+ - 00.core/02.architecture.md — Plugin architecture, request lifecycle, hooks flow
41
+ - 00.core/03.naming-conventions.md — File/route/schema/plugin naming conventions
42
+ - 10.backend-api/01.route-plugin-patterns.md — Route registration, plugin encapsulation, prefix
43
+ - 10.backend-api/02.service-patterns.md — DI (decorators/awilix), business logic
44
+ - 10.backend-api/03.data-access-patterns.md — ORM patterns, DB plugin lifecycle
45
+ - 10.backend-api/04.response-exception.md — Response format, error handling, setErrorHandler
46
+ - 10.backend-api/05.schema-validation.md — JSON Schema, TypeBox, shared schemas, serialization
47
+ - 10.backend-api/06.hooks-lifecycle.md — Hook order, scope, authentication hooks
48
+ - 30.security-db/01.security-auth.md — JWT, @fastify/auth, CORS, Rate Limit
49
+ - 30.security-db/02.database-schema.md — Migrations, seeds, schema conventions
50
+ - 30.security-db/03.common-utilities.md — Common utils, decorators, constants
51
+ - 40.infra/01.environment-config.md — @fastify/env, configuration management
52
+ - 40.infra/02.logging-monitoring.md — Pino config, serializers, monitoring
53
+ - 40.infra/03.cicd-deployment.md — CI/CD pipeline, deployment strategy
54
+ - 50.verification/01.development-verification.md — Build, startup, API testing
55
+ - 50.verification/02.testing-strategy.md — fastify.inject(), plugin testing, mocking
56
+
57
+ Each file MUST include:
58
+ - Correct examples (code blocks)
59
+ - Incorrect examples (code blocks)
60
+ - Key rules summary table
61
+
62
+ 3. .claude/rules/ (active domains only)
63
+ - Write the full rule content directly in each file (self-contained)
64
+ - Include 5-15 lines of key rules with concrete examples
65
+ - Do NOT use @import
66
+ - Each rule file MUST end with a `## Reference` section linking to the corresponding standard
67
+ - `paths:` frontmatter per rule category:
68
+ - `00.core/*` rules: `paths: ["**/*"]`
69
+ - `10.backend/*` rules: `paths: ["**/*"]`
70
+ - `30.security-db/*` rules: `paths: ["**/*"]`
71
+ - `40.infra/*` rules: `paths: ["**/*.json", "**/*.env*", "**/config/**", "**/Dockerfile*", "**/*.yml", "**/*.yaml"]`
72
+ - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]`
73
+ - MUST generate `.claude/rules/00.core/00.standard-reference.md` as a directory of all standard files
74
+
75
+ 4. .claude/rules/50.sync/ (3 sync rules)
76
+ - 01.standard-sync.md
77
+ - 02.rules-sync.md
78
+ - 03.skills-sync.md
79
+
80
+ 5. claudeos-core/skills/ (active domains only)
81
+ - 10.backend-crud/01.scaffold-crud-feature.md (orchestrator)
82
+ - 10.backend-crud/scaffold-crud-feature/01~08 (sub-skills: route, schema, service, plugin, repository, migration, test, index)
83
+ - 00.shared/MANIFEST.md (skill registry)
84
+
85
+ 6. claudeos-core/guide/ (all)
86
+ - 01.onboarding/01.overview.md
87
+ - 01.onboarding/02.quickstart.md
88
+ - 01.onboarding/03.glossary.md
89
+ - 02.usage/01.faq.md
90
+ - 02.usage/02.real-world-examples.md
91
+ - 02.usage/03.do-and-dont.md
92
+ - 03.troubleshooting/01.troubleshooting.md
93
+ - 04.architecture/01.file-map.md
94
+ - 04.architecture/02.pros-and-cons.md
95
+
96
+ 7. claudeos-core/plan/ (Master Plan)
97
+ - 10.standard-master.md
98
+ - 20.rules-master.md
99
+ - 21.sync-rules-master.md
100
+ - 30.backend-skills-master.md
101
+ - 40.guides-master.md
102
+
103
+ 8. claudeos-core/database/
104
+ - 01.schema-overview.md
105
+ - 02.migration-guide.md
106
+
107
+ 9. claudeos-core/mcp-guide/
108
+ - 01.mcp-overview.md
@@ -51,6 +51,7 @@ function selectTemplates(stack) {
51
51
  if (stack.language === "kotlin") templates.backend = "kotlin-spring";
52
52
  else if (stack.language === "java") templates.backend = "java-spring";
53
53
  else if (stack.framework === "express" || stack.framework === "nestjs") templates.backend = "node-express";
54
+ else if (stack.framework === "fastify") templates.backend = "node-fastify";
54
55
  else if (stack.framework === "django") templates.backend = "python-django";
55
56
  else if (stack.framework === "fastapi" || stack.framework === "flask") templates.backend = "python-fastapi";
56
57
  else if ((stack.language === "typescript" || stack.language === "javascript") && stack.framework) templates.backend = "node-express";
@@ -59,6 +60,8 @@ function selectTemplates(stack) {
59
60
  // Frontend template
60
61
  if (stack.frontend === "nextjs" || stack.frontend === "react" || stack.frontend === "vue") {
61
62
  templates.frontend = "node-nextjs";
63
+ } else if (stack.frontend === "angular") {
64
+ templates.frontend = "angular";
62
65
  }
63
66
 
64
67
  return templates;
@@ -91,7 +91,8 @@ async function main() {
91
91
  console.log();
92
92
 
93
93
  // Save outputs
94
- const defaultPort = stack.framework === "fastapi" || stack.framework === "django" ? 8000 : 8080;
94
+ const defaultPort = (stack.framework === "fastapi" || stack.framework === "django") ? 8000
95
+ : (stack.framework === "express" || stack.framework === "nestjs" || stack.framework === "fastify") ? 3000 : 8080;
95
96
  const analysis = {
96
97
  analyzedAt: new Date().toISOString(), lang,
97
98
  stack: { ...stack, port: stack.port || defaultPort },
@@ -181,13 +181,15 @@ async function detectStack(ROOT) {
181
181
  if (!stack.language) stack.language = deps.typescript ? "typescript" : "javascript";
182
182
  if (deps.typescript) { stack.detected.push("typescript"); const tv = deps.typescript.match(/(\d+(?:\.\d+)*)/); if (tv) stack.languageVersion = tv[1]; }
183
183
 
184
- // Frontend
184
+ // Frontend (Angular checked before React — Angular projects may include react in devDependencies)
185
185
  if (deps.next) { stack.frontend = "nextjs"; stack.detected.push("next.js"); stack.frontendVersion = deps.next.replace(/[^0-9.]/g, ""); }
186
+ else if (deps["@angular/core"]) { stack.frontend = "angular"; stack.detected.push("angular"); stack.frontendVersion = deps["@angular/core"].replace(/[^0-9.]/g, ""); }
186
187
  else if (deps.react) { stack.frontend = "react"; stack.detected.push("react"); stack.frontendVersion = deps.react.replace(/[^0-9.]/g, ""); }
187
188
  else if (deps.vue) { stack.frontend = "vue"; stack.detected.push("vue"); stack.frontendVersion = deps.vue.replace(/[^0-9.]/g, ""); }
188
189
 
189
- // Backend framework (NestJS checked first — more specific than express, which NestJS includes as a dependency)
190
+ // Backend framework (NestJS > Fastify > Express — more specific first; NestJS includes express, Fastify is standalone)
190
191
  if (deps["@nestjs/core"] && !stack.framework) { stack.framework = "nestjs"; stack.detected.push("nestjs"); stack.frameworkVersion = deps["@nestjs/core"].replace(/[^0-9.]/g, ""); }
192
+ if (deps.fastify && !stack.framework) { stack.framework = "fastify"; stack.detected.push("fastify"); stack.frameworkVersion = deps.fastify.replace(/[^0-9.]/g, ""); }
191
193
  if (deps.express && !stack.framework) { stack.framework = "express"; stack.detected.push("express"); }
192
194
 
193
195
  // ORM
@@ -319,6 +321,12 @@ async function detectStack(ROOT) {
319
321
  if (!stack.language) stack.language = "typescript";
320
322
  }
321
323
  }
324
+ if (!stack.frontend) {
325
+ if (existsSafe(path.join(ROOT, "angular.json")) || existsSafe(path.join(ROOT, ".angular.json"))) {
326
+ stack.frontend = "angular"; stack.detected.push("angular.json (fallback)");
327
+ if (!stack.language) stack.language = "typescript";
328
+ }
329
+ }
322
330
 
323
331
  return stack;
324
332
  }
@@ -402,6 +402,42 @@ async function scanStructure(stack, ROOT) {
402
402
  }
403
403
  }
404
404
 
405
+ // ── Angular ──
406
+ if (stack.frontend === "angular") {
407
+ // Angular feature modules: src/app/*/ with *.component.ts or *.module.ts
408
+ const angularAppDirs = await glob("{src/app,app}/*/", { cwd: ROOT });
409
+ const skipAngularDirs = ["shared", "core", "common", "layout", "layouts", "environments", "assets", "styles", "testing", "utils"];
410
+ for (const dir of angularAppDirs) {
411
+ const name = path.basename(dir.replace(/\/$/, ""));
412
+ if (skipAngularDirs.includes(name) || name.startsWith("_") || name.startsWith(".")) continue;
413
+ const files = await glob(`${dir.replace(/\\/g, "/")}**/*.ts`, { cwd: ROOT, ignore: ["**/*.spec.ts", "**/*.test.ts"] });
414
+ if (files.length > 0) {
415
+ const components = files.filter(f => /\.component\.ts$/.test(f)).length;
416
+ const services = files.filter(f => /\.service\.ts$/.test(f)).length;
417
+ const modules = files.filter(f => /\.module\.ts$/.test(f)).length;
418
+ const pipes = files.filter(f => /\.pipe\.ts$/.test(f)).length;
419
+ const directives = files.filter(f => /\.directive\.ts$/.test(f)).length;
420
+ const guards = files.filter(f => /\.guard\.ts$/.test(f)).length;
421
+ frontendDomains.push({ name, type: "frontend", components, services, modules, pipes, directives, guards, totalFiles: files.length });
422
+ }
423
+ }
424
+
425
+ // Angular fallback: scan **/modules/*/ and **/features/*/ with *.component.ts detection
426
+ if (frontendDomains.length === 0) {
427
+ const deepAngularDirs = await glob("**/{modules,features,pages,views}/*/", { cwd: ROOT, ignore: ["**/node_modules/**", "**/dist/**", "**/.angular/**"] });
428
+ for (const dir of deepAngularDirs) {
429
+ const name = path.basename(dir.replace(/\/$/, ""));
430
+ if (skipAngularDirs.includes(name) || name.startsWith("_") || name.startsWith(".")) continue;
431
+ const files = await glob(`${dir.replace(/\\/g, "/")}**/*.ts`, { cwd: ROOT, ignore: ["**/*.spec.ts", "**/*.test.ts"] });
432
+ if (files.length >= 2) {
433
+ const components = files.filter(f => /\.component\.ts$/.test(f)).length;
434
+ const services = files.filter(f => /\.service\.ts$/.test(f)).length;
435
+ frontendDomains.push({ name, type: "frontend", components, services, totalFiles: files.length });
436
+ }
437
+ }
438
+ }
439
+ }
440
+
405
441
  // ── Next.js/React/Vue ──
406
442
  if (stack.frontend === "nextjs" || stack.frontend === "react" || stack.frontend === "vue") {
407
443
  // App Router / Pages Router domains
@@ -610,9 +646,15 @@ async function scanStructure(stack, ROOT) {
610
646
  const frontend = { exists: false, components: 0, pages: 0, hooks: 0 };
611
647
  if (stack.frontend) {
612
648
  frontend.exists = true;
613
- frontend.components = (await glob("{src/,}**/components/**/*.{tsx,jsx,vue}", { cwd: ROOT, ignore: ["**/node_modules/**"] })).length;
614
- frontend.pages = (await glob("{src/,}{app,pages}/**/{page,index}.{tsx,jsx,vue}", { cwd: ROOT, ignore: ["**/node_modules/**"] })).length;
615
- frontend.hooks = (await glob("{src/,}**/hooks/**/*.{ts,js}", { cwd: ROOT, ignore: ["**/node_modules/**"] })).length;
649
+ if (stack.frontend === "angular") {
650
+ frontend.components = (await glob("{src/,}**/*.component.ts", { cwd: ROOT, ignore: ["**/node_modules/**", "**/dist/**"] })).length;
651
+ frontend.pages = (await glob("{src/,}**/*.module.ts", { cwd: ROOT, ignore: ["**/node_modules/**", "**/dist/**"] })).length;
652
+ frontend.hooks = (await glob("{src/,}**/*.service.ts", { cwd: ROOT, ignore: ["**/node_modules/**", "**/dist/**"] })).length;
653
+ } else {
654
+ frontend.components = (await glob("{src/,}**/components/**/*.{tsx,jsx,vue}", { cwd: ROOT, ignore: ["**/node_modules/**"] })).length;
655
+ frontend.pages = (await glob("{src/,}{app,pages}/**/{page,index}.{tsx,jsx,vue}", { cwd: ROOT, ignore: ["**/node_modules/**"] })).length;
656
+ frontend.hooks = (await glob("{src/,}**/hooks/**/*.{ts,js}", { cwd: ROOT, ignore: ["**/node_modules/**"] })).length;
657
+ }
616
658
  }
617
659
 
618
660
  // App Router RSC/Client overall stats (for project-analysis.json)