claudeos-core 2.3.1 → 2.4.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 (43) hide show
  1. package/CHANGELOG.md +1460 -73
  2. package/CODE_OF_CONDUCT.md +15 -0
  3. package/README.de.md +321 -883
  4. package/README.es.md +322 -883
  5. package/README.fr.md +322 -883
  6. package/README.hi.md +322 -883
  7. package/README.ja.md +322 -883
  8. package/README.ko.md +322 -882
  9. package/README.md +321 -883
  10. package/README.ru.md +322 -885
  11. package/README.vi.md +322 -883
  12. package/README.zh-CN.md +321 -881
  13. package/SECURITY.md +51 -0
  14. package/bin/commands/init.js +570 -264
  15. package/content-validator/index.js +185 -12
  16. package/health-checker/index.js +44 -10
  17. package/package.json +92 -90
  18. package/pass-json-validator/index.js +58 -7
  19. package/pass-prompts/templates/angular/pass3.md +15 -14
  20. package/pass-prompts/templates/common/claude-md-scaffold.md +203 -20
  21. package/pass-prompts/templates/common/pass3-footer.md +297 -56
  22. package/pass-prompts/templates/common/pass3a-facts.md +48 -3
  23. package/pass-prompts/templates/common/pass4.md +78 -40
  24. package/pass-prompts/templates/java-spring/pass1.md +54 -0
  25. package/pass-prompts/templates/java-spring/pass3.md +20 -19
  26. package/pass-prompts/templates/kotlin-spring/pass1.md +45 -0
  27. package/pass-prompts/templates/kotlin-spring/pass3.md +24 -23
  28. package/pass-prompts/templates/node-express/pass3.md +18 -17
  29. package/pass-prompts/templates/node-fastify/pass3.md +11 -10
  30. package/pass-prompts/templates/node-nestjs/pass3.md +11 -10
  31. package/pass-prompts/templates/node-nextjs/pass3.md +18 -17
  32. package/pass-prompts/templates/node-vite/pass3.md +11 -10
  33. package/pass-prompts/templates/python-django/pass3.md +18 -17
  34. package/pass-prompts/templates/python-fastapi/pass3.md +18 -17
  35. package/pass-prompts/templates/python-flask/pass3.md +9 -8
  36. package/pass-prompts/templates/vue-nuxt/pass3.md +9 -8
  37. package/plan-installer/domain-grouper.js +45 -5
  38. package/plan-installer/index.js +34 -1
  39. package/plan-installer/pass3-context-builder.js +14 -0
  40. package/plan-installer/scanners/scan-frontend.js +2 -1
  41. package/plan-installer/scanners/scan-java.js +98 -2
  42. package/plan-installer/source-paths.js +242 -0
  43. package/plan-installer/stack-detector.js +522 -42
@@ -1,6 +1,60 @@
1
1
  Read claudeos-core/generated/project-analysis.json and
2
2
  perform a deep analysis of the following domains only: {{DOMAIN_GROUP}}
3
3
 
4
+ ## MANDATORY: Configuration file verification (read before analysis)
5
+
6
+ Before analyzing domain source code, read the following configuration
7
+ files if they exist in the project root. The stack metadata in
8
+ `project-analysis.json` is produced by a regex-based static analyzer
9
+ and may be incomplete for modern Gradle/Maven projects. Reading these
10
+ files directly gives you the ground truth for Java version, server
11
+ port, active profile, datasource configuration, and logging setup.
12
+
13
+ Required reads (if the file exists):
14
+
15
+ 1. **`build.gradle` or `build.gradle.kts`** (or **`pom.xml`** for Maven).
16
+ Specifically check:
17
+ - Java version: look inside `java { ... }`, `java { toolchain { ... } }`,
18
+ `sourceCompatibility`, `targetCompatibility`, or `<java.version>` /
19
+ `<maven.compiler.source>` in pom.xml. If the value is a variable
20
+ reference (e.g., `sourceCompatibility = "${javaVersion}"`), resolve
21
+ the variable inside `ext { ... }` or `<properties>`. Record the
22
+ ACTUAL Java version — do NOT infer "Java 17+" from the Spring
23
+ Boot version.
24
+ - Spring Boot version: verify it matches `project-analysis.json`'s
25
+ frameworkVersion field; if they disagree, trust the build file.
26
+ - Dependencies that indicate specific patterns (MyBatis/iBatis/JPA,
27
+ multiple DB drivers, Jasypt, JWT library, Logback extras).
28
+
29
+ 2. **`application.yml` / `application.yaml` / `application.properties`
30
+ and their profile variants** (`application-{profile}.{yml,yaml,properties}`).
31
+ Specifically check:
32
+ - Server port: look for `server.port`. Spring Boot accepts property
33
+ placeholders with defaults like `port: ${G_PORT:8090}` — extract the
34
+ default value (the post-colon number) as the ACTUAL port. Do NOT
35
+ assume "port 8080" from the Spring Boot framework default.
36
+ - Active profile(s): `spring.profiles.active` and `spring.profiles.group`.
37
+ - Datasource: every `spring.datasource.*` block (multi-dialect projects
38
+ declare more than one; a `group` profile block like
39
+ `"local": "local,postgres"` reveals which DB is active per profile).
40
+ - Logging configuration file reference: `logging.config` points to
41
+ the real log setup (e.g., `classpath:logback-app.xml`). Read that
42
+ file too to understand appenders, levels, and JDBC logging
43
+ adapters like `log4jdbc`.
44
+
45
+ 3. **Any referenced logging configuration files**: `logback*.xml`,
46
+ `logback*.groovy`, `log4j*.xml`, `log4j*.properties`,
47
+ `log4jdbc*.properties`. These reveal the actual logging framework
48
+ in use (Logback is the Spring Boot default but legacy projects may
49
+ use Log4j2 or mix with JDBC adapters).
50
+
51
+ When `project-analysis.json` and the configuration files disagree,
52
+ record the configuration-file value as the truth and note the
53
+ discrepancy in your analysis output. This is the path to eliminate
54
+ "Java 17+" / "port 8080" hallucinations observed in pre-v2.3.2 runs.
55
+
56
+ ## Domain analysis
57
+
4
58
  For each domain, select one representative file per layer, read its code, and analyze it.
5
59
  Prioritize files with the richest patterns.
6
60
 
@@ -79,21 +79,21 @@ Generation targets:
79
79
  - 00.core/01.project-overview.md — Stack, modules, API server info
80
80
  - 00.core/02.architecture.md — Layer structure, request flow, package structure
81
81
  - 00.core/03.naming-conventions.md — Class/DTO/Entity/table naming conventions
82
- - 10.backend-api/01.controller-patterns.md — Controller writing rules + examples
83
- - 10.backend-api/02.service-patterns.md — Transactions, DI, business logic patterns
84
- - 10.backend-api/03.data-access-patterns.md — ORM patterns (tailored to detected MyBatis/JPA/QueryDSL)
85
- - 10.backend-api/04.response-exception.md — Response/error handling patterns
86
- - 10.backend-api/05.dto-validation.md — DTO writing rules, Validation
87
- - 10.backend-api/06.interceptor-filter-aop.md — Middleware, AOP, logging interceptors
88
- - 20.frontend-ui/* — (generate only if frontend detected)
82
+ - 10.backend/01.controller-patterns.md — Controller writing rules + examples
83
+ - 10.backend/02.service-patterns.md — Transactions, DI, business logic patterns
84
+ - 10.backend/03.data-access-patterns.md — ORM patterns (tailored to detected MyBatis/JPA/QueryDSL)
85
+ - 10.backend/04.response-exception.md — Response/error handling patterns
86
+ - 10.backend/05.dto-validation.md — DTO writing rules, Validation
87
+ - 10.backend/06.interceptor-filter-aop.md — Middleware, AOP, logging interceptors
88
+ - 20.frontend/* — (generate only if frontend detected)
89
89
  - 30.security-db/01.security-auth.md — Authentication, authorization, CORS
90
90
  - 30.security-db/02.database-schema.md — DDL, migrations, audit columns
91
91
  - 30.security-db/03.common-utilities.md — Common utilities, constants, Base classes
92
92
  - 40.infra/01.environment-config.md — Profiles, environment variables, configuration management
93
93
  - 40.infra/02.logging-monitoring.md — Logging standards, monitoring, alerts
94
94
  - 40.infra/03.cicd-deployment.md — CI/CD pipeline, deployment strategy
95
- - 50.verification/01.development-verification.md — Build, startup, API testing
96
- - 50.verification/02.testing-strategy.md — Testing strategy, mocking, coverage
95
+ - 80.verification/01.development-verification.md — Build, startup, API testing
96
+ - 80.verification/02.testing-strategy.md — Testing strategy, mocking, coverage
97
97
 
98
98
  Each file MUST include:
99
99
  - Correct examples (✅ code blocks)
@@ -107,17 +107,18 @@ Generation targets:
107
107
  - Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
108
108
  ```
109
109
  ## Reference
110
- > For detailed patterns and examples, Read: claudeos-core/standard/10.backend-api/01.controller-patterns.md
110
+ > For detailed patterns and examples, Read: claudeos-core/standard/10.backend/01.controller-patterns.md
111
111
  ```
112
112
  - `paths:` frontmatter per rule category:
113
113
  - `00.core/*` rules: `paths: ["**/*"]` — always loaded (architecture, naming are universally needed)
114
114
  - `10.backend/*` rules: `paths: ["**/*"]` — always loaded (backend rules needed for any source editing)
115
115
  - `30.security-db/*` rules: `paths: ["**/*"]` — always loaded (cross-cutting concerns)
116
116
  - `40.infra/01.environment-config-rules.md` paths: `["**/*.properties", "**/*.yml", "**/*.yaml", "**/.env*", "**/config/**", "**/application*.properties"]` — Spring config files
117
- - `40.infra/02.logging-monitoring-rules.md` paths: `["**/*.java", "**/logback*.xml", "**/log4j*.xml"]` — source code where logs live + log config
117
+ - `40.infra/02.logging-monitoring-rules.md` paths: `["**/*.java", "**/logback*.xml", "**/logback*.groovy", "**/log4j*.xml", "**/log4j*.properties", "**/log4jdbc*.properties"]` — source code where logs live + log config (covers Logback XML/Groovy DSL, Log4j/Log4j2 XML/properties, and log4jdbc JDBC-logging adapter properties)
118
118
  - `40.infra/03.cicd-deployment-rules.md` paths: `["**/*.yml", "**/*.yaml", "**/Dockerfile*", "**/*.gradle*", "**/pom.xml", "**/*.java"]` — CI / build config + source
119
119
  - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]` — loaded only when editing claudeos-core files
120
120
  - `60.memory/*` rules: forward reference — Pass 4 will generate 4 files (01.decision-log, 02.failure-patterns, 03.compaction, 04.auto-rule-update), each with file-specific `paths`. Pass 3 must STILL list ```.claude/rules/60.memory/*``` as a row in CLAUDE.md Section 6 Rules table so developers/Claude see the category exists.
121
+ - `70.domains/*` rules (multi-domain projects only): per-domain rules at `.claude/rules/70.domains/{type}/{domain}-rules.md` (where `{type}` is `backend` or `frontend`, ALWAYS present even in single-stack projects for uniform layout + zero-migration future-proofing), each with a `paths:` glob scoped to that domain's source directories so the rule auto-loads only when editing files within the relevant domain. Folder name is PLURAL (`domains/`) — collection of N per-domain files — and each file inside uses the SINGULAR domain name (`{domain}-rules.md`). DO NOT use `60.domains/` (collides with `60.memory/`) and DO NOT skip the `{type}/` sub-folder. See pass3-footer.md "Per-domain folder convention" for the full rationale.
121
122
  - MUST generate `.claude/rules/00.core/00.standard-reference.md` — a directory of all standard files. This is NOT a "read all" instruction. Claude should Read ONLY the standards relevant to the current task. Structure it as:
122
123
  ```
123
124
  ---
@@ -134,12 +135,12 @@ Generation targets:
134
135
  - claudeos-core/standard/00.core/03.naming-conventions.md
135
136
  - claudeos-core/standard/00.core/04.doc-writing-guide.md
136
137
  ## Backend API
137
- - claudeos-core/standard/10.backend-api/01.controller-patterns.md
138
- - claudeos-core/standard/10.backend-api/02.service-patterns.md
139
- - claudeos-core/standard/10.backend-api/03.data-access-patterns.md
140
- - claudeos-core/standard/10.backend-api/04.response-exception.md
141
- - claudeos-core/standard/10.backend-api/05.dto-validation.md
142
- - claudeos-core/standard/10.backend-api/06.interceptor-filter-aop.md
138
+ - claudeos-core/standard/10.backend/01.controller-patterns.md
139
+ - claudeos-core/standard/10.backend/02.service-patterns.md
140
+ - claudeos-core/standard/10.backend/03.data-access-patterns.md
141
+ - claudeos-core/standard/10.backend/04.response-exception.md
142
+ - claudeos-core/standard/10.backend/05.dto-validation.md
143
+ - claudeos-core/standard/10.backend/06.interceptor-filter-aop.md
143
144
  ## Security & DB
144
145
  - claudeos-core/standard/30.security-db/01.security-auth.md
145
146
  - claudeos-core/standard/30.security-db/02.database-schema.md
@@ -148,8 +149,8 @@ Generation targets:
148
149
  - claudeos-core/standard/40.infra/01.environment-config.md
149
150
  - claudeos-core/standard/40.infra/02.logging-monitoring.md
150
151
  - claudeos-core/standard/40.infra/03.cicd-deployment.md
151
- - claudeos-core/standard/50.verification/01.development-verification.md
152
- - claudeos-core/standard/50.verification/02.testing-strategy.md
152
+ - claudeos-core/standard/80.verification/01.development-verification.md
153
+ - claudeos-core/standard/80.verification/02.testing-strategy.md
153
154
  ```
154
155
  List only the standard files that were actually generated above. Include frontend standards only if frontend was detected. NOTE: `00.core/04.doc-writing-guide.md` is a FORWARD REFERENCE — Pass 4 will generate it; include it anyway. Do NOT add a "DO NOT Read" section here — that information lives in CLAUDE.md Section 7 (the single source of truth).
155
156
 
@@ -1,6 +1,51 @@
1
1
  Read claudeos-core/generated/project-analysis.json and
2
2
  perform a deep analysis of the following domains only: {{DOMAIN_GROUP}}
3
3
 
4
+ ## MANDATORY: Configuration file verification (read before analysis)
5
+
6
+ Before analyzing domain source code, read the following configuration
7
+ files if they exist in the project root. The stack metadata in
8
+ `project-analysis.json` is produced by a regex-based static analyzer
9
+ and may be incomplete for modern Gradle/Maven projects. Reading these
10
+ files directly gives you the ground truth for Kotlin/Java version,
11
+ server port, active profile, datasource configuration, and logging.
12
+
13
+ Required reads (if the file exists):
14
+
15
+ 1. **`build.gradle.kts` or `build.gradle`** (or **`pom.xml`** for Maven).
16
+ Specifically check:
17
+ - Kotlin version: look inside `plugins { kotlin("jvm") version "..." }`
18
+ or `libs.versions.toml`. If it's a variable reference, resolve it.
19
+ - Java target: look inside `kotlin { jvmToolchain(N) }`,
20
+ `tasks.withType<KotlinCompile> { kotlinOptions.jvmTarget = "..." }`,
21
+ or `java { toolchain { languageVersion = JavaLanguageVersion.of(N) } }`.
22
+ Record the ACTUAL target — do NOT infer from the Spring Boot version.
23
+ - Spring Boot version: verify it matches `project-analysis.json`'s
24
+ frameworkVersion field; if they disagree, trust the build file.
25
+ - Dependencies that indicate specific patterns (Exposed/JPA/jOOQ/R2DBC,
26
+ multiple DB drivers, Koin/Kodein, coroutines extensions).
27
+
28
+ 2. **`application.yml` / `application.yaml` / `application.properties`
29
+ and their profile variants** (`application-{profile}.{yml,yaml,properties}`).
30
+ Specifically check:
31
+ - Server port: look for `server.port`. Spring Boot accepts property
32
+ placeholders with defaults like `port: ${PORT:8080}` — extract the
33
+ default value (the post-colon number) as the ACTUAL port. Do NOT
34
+ assume "port 8080" from the Spring Boot framework default.
35
+ - Active profile(s): `spring.profiles.active` and `spring.profiles.group`.
36
+ - Datasource: every `spring.datasource.*` block.
37
+ - Logging configuration file reference: `logging.config` points to
38
+ the real log setup. Read that file too.
39
+
40
+ 3. **Any referenced logging configuration files**: `logback*.xml`,
41
+ `logback*.groovy`, `log4j*.xml`, `log4j*.properties`.
42
+
43
+ When `project-analysis.json` and the configuration files disagree,
44
+ record the configuration-file value as the truth and note the
45
+ discrepancy in your analysis output.
46
+
47
+ ## Domain analysis
48
+
4
49
  For each domain, select one representative file per layer, read its code, and analyze it.
5
50
  Prioritize files with the richest patterns.
6
51
  For multi-module domains, analyze files from EACH module (command, query, bff) separately.
@@ -81,23 +81,23 @@ Generation targets:
81
81
  - 00.core/01.project-overview.md — Stack (Kotlin version, Spring Boot version), module list, server ports
82
82
  - 00.core/02.architecture.md — CQRS architecture, BFF layer, request flow (Client → BFF → Feign → Command/Query → DB), module dependency diagram
83
83
  - 00.core/03.naming-conventions.md — Kotlin class/file/package naming, DTO naming (Command vs Query DTOs), module naming
84
- - 10.backend-api/01.controller-patterns.md — Command controller vs Query controller rules + examples
85
- - 10.backend-api/02.service-patterns.md — Transactions, DI, Kotlin idioms, command/query service separation
86
- - 10.backend-api/03.data-access-patterns.md — ORM patterns (tailored to detected JPA/MyBatis/Exposed), read/write DB config
87
- - 10.backend-api/04.response-exception.md — Response/error handling patterns, sealed class exceptions
88
- - 10.backend-api/05.dto-vo-validation.md — Kotlin data class DTO rules, VO patterns (value class, immutability, equality by value), DTO vs VO usage guide, validation, nullable rules
89
- - 10.backend-api/06.aggregate-patterns.md — Aggregate boundary definition, Aggregate Root rules, repository-per-aggregate, inter-aggregate references (by ID only), domain event publishing, Aggregator service patterns (SKIP if no DDD/Aggregate patterns detected in pass2-merged.json)
90
- - 10.backend-api/07.bff-feign-patterns.md — BFF controller patterns, Feign Client conventions, response composition, error propagation (SKIP if project-analysis.json shows no BFF/CQRS architecture)
91
- - 10.backend-api/08.inter-module-communication.md — Feign contracts, Pub/Sub events, shared library usage rules (SKIP if single-module project without multi-module in project-analysis.json)
92
- - 20.frontend-ui/* — (generate only if frontend detected)
84
+ - 10.backend/01.controller-patterns.md — Command controller vs Query controller rules + examples
85
+ - 10.backend/02.service-patterns.md — Transactions, DI, Kotlin idioms, command/query service separation
86
+ - 10.backend/03.data-access-patterns.md — ORM patterns (tailored to detected JPA/MyBatis/Exposed), read/write DB config
87
+ - 10.backend/04.response-exception.md — Response/error handling patterns, sealed class exceptions
88
+ - 10.backend/05.dto-vo-validation.md — Kotlin data class DTO rules, VO patterns (value class, immutability, equality by value), DTO vs VO usage guide, validation, nullable rules
89
+ - 10.backend/06.aggregate-patterns.md — Aggregate boundary definition, Aggregate Root rules, repository-per-aggregate, inter-aggregate references (by ID only), domain event publishing, Aggregator service patterns (SKIP if no DDD/Aggregate patterns detected in pass2-merged.json)
90
+ - 10.backend/07.bff-feign-patterns.md — BFF controller patterns, Feign Client conventions, response composition, error propagation (SKIP if project-analysis.json shows no BFF/CQRS architecture)
91
+ - 10.backend/08.inter-module-communication.md — Feign contracts, Pub/Sub events, shared library usage rules (SKIP if single-module project without multi-module in project-analysis.json)
92
+ - 20.frontend/* — (generate only if frontend detected)
93
93
  - 30.security-db/01.security-auth.md — Authentication, authorization, CORS, inter-module auth
94
94
  - 30.security-db/02.database-schema.md — DDL, migrations, audit columns, read/write DB separation
95
95
  - 30.security-db/03.common-utilities.md — Shared-lib utilities, extension functions, constants, Base classes
96
96
  - 40.infra/01.environment-config.md — Profiles, multi-module config, Gradle Kotlin DSL, environment variables
97
97
  - 40.infra/02.logging-monitoring.md — kotlin-logging standards, structured logging, distributed tracing
98
98
  - 40.infra/03.cicd-deployment.md — CI/CD pipeline, Docker/K8s per module, deployment strategy
99
- - 50.verification/01.development-verification.md — Build, startup (per module), API testing
100
- - 50.verification/02.testing-strategy.md — Testing strategy (MockK, Kotest), per-module test approach
99
+ - 80.verification/01.development-verification.md — Build, startup (per module), API testing
100
+ - 80.verification/02.testing-strategy.md — Testing strategy (MockK, Kotest), per-module test approach
101
101
 
102
102
  Each file MUST include:
103
103
  - Correct examples (✅ code blocks in Kotlin)
@@ -112,17 +112,18 @@ Generation targets:
112
112
  - Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
113
113
  ```
114
114
  ## Reference
115
- > For detailed patterns and examples, Read: claudeos-core/standard/10.backend-api/01.controller-patterns.md
115
+ > For detailed patterns and examples, Read: claudeos-core/standard/10.backend/01.controller-patterns.md
116
116
  ```
117
117
  - `paths:` frontmatter per rule category:
118
118
  - `00.core/*` rules: `paths: ["**/*"]` — always loaded (architecture, naming are universally needed)
119
119
  - `10.backend/*` rules: `paths: ["**/*"]` — always loaded (backend rules needed for any source editing)
120
120
  - `30.security-db/*` rules: `paths: ["**/*"]` — always loaded (cross-cutting concerns)
121
121
  - `40.infra/01.environment-config-rules.md` paths: `["**/*.properties", "**/*.yml", "**/*.yaml", "**/.env*", "**/config/**", "**/application*.properties"]` — Spring config files
122
- - `40.infra/02.logging-monitoring-rules.md` paths: `["**/*.kt", "**/*.kts", "**/logback*.xml"]` — source code where logs live + log config
122
+ - `40.infra/02.logging-monitoring-rules.md` paths: `["**/*.kt", "**/*.kts", "**/logback*.xml", "**/logback*.groovy", "**/log4j*.xml", "**/log4j*.properties", "**/log4jdbc*.properties"]` — source code where logs live + log config (covers Logback XML/Groovy DSL, Log4j/Log4j2 XML/properties, and log4jdbc JDBC-logging adapter properties)
123
123
  - `40.infra/03.cicd-deployment-rules.md` paths: `["**/*.yml", "**/*.yaml", "**/Dockerfile*", "**/*.gradle*", "**/*.kt", "**/*.kts"]` — CI / build config + source
124
124
  - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]` — loaded only when editing claudeos-core files
125
125
  - `60.memory/*` rules: forward reference — Pass 4 will generate 4 files (01.decision-log, 02.failure-patterns, 03.compaction, 04.auto-rule-update), each with file-specific `paths`. Pass 3 must STILL list ```.claude/rules/60.memory/*``` as a row in CLAUDE.md Section 6 Rules table so developers/Claude see the category exists.
126
+ - `70.domains/*` rules (multi-domain projects only): per-domain rules at `.claude/rules/70.domains/{type}/{domain}-rules.md` (where `{type}` is `backend` or `frontend`, ALWAYS present even in single-stack projects for uniform layout + zero-migration future-proofing), each with a `paths:` glob scoped to that domain's source directories so the rule auto-loads only when editing files within the relevant domain. Folder name is PLURAL (`domains/`) — collection of N per-domain files — and each file inside uses the SINGULAR domain name (`{domain}-rules.md`). DO NOT use `60.domains/` (collides with `60.memory/`) and DO NOT skip the `{type}/` sub-folder. See pass3-footer.md "Per-domain folder convention" for the full rationale.
126
127
  - MUST generate `.claude/rules/00.core/00.standard-reference.md` — a directory of all standard files. This is NOT a "read all" instruction. Claude should Read ONLY the standards relevant to the current task. Structure it as:
127
128
  ```
128
129
  ---
@@ -139,14 +140,14 @@ Generation targets:
139
140
  - claudeos-core/standard/00.core/03.naming-conventions.md
140
141
  - claudeos-core/standard/00.core/04.doc-writing-guide.md
141
142
  ## Backend API
142
- - claudeos-core/standard/10.backend-api/01.controller-patterns.md
143
- - claudeos-core/standard/10.backend-api/02.service-patterns.md
144
- - claudeos-core/standard/10.backend-api/03.data-access-patterns.md
145
- - claudeos-core/standard/10.backend-api/04.response-exception.md
146
- - claudeos-core/standard/10.backend-api/05.dto-vo-validation.md
147
- - claudeos-core/standard/10.backend-api/06.aggregate-patterns.md (if generated)
148
- - claudeos-core/standard/10.backend-api/07.bff-feign-patterns.md (if generated)
149
- - claudeos-core/standard/10.backend-api/08.inter-module-communication.md (if generated)
143
+ - claudeos-core/standard/10.backend/01.controller-patterns.md
144
+ - claudeos-core/standard/10.backend/02.service-patterns.md
145
+ - claudeos-core/standard/10.backend/03.data-access-patterns.md
146
+ - claudeos-core/standard/10.backend/04.response-exception.md
147
+ - claudeos-core/standard/10.backend/05.dto-vo-validation.md
148
+ - claudeos-core/standard/10.backend/06.aggregate-patterns.md (if generated)
149
+ - claudeos-core/standard/10.backend/07.bff-feign-patterns.md (if generated)
150
+ - claudeos-core/standard/10.backend/08.inter-module-communication.md (if generated)
150
151
  ## Security & DB
151
152
  - claudeos-core/standard/30.security-db/01.security-auth.md
152
153
  - claudeos-core/standard/30.security-db/02.database-schema.md
@@ -155,8 +156,8 @@ Generation targets:
155
156
  - claudeos-core/standard/40.infra/01.environment-config.md
156
157
  - claudeos-core/standard/40.infra/02.logging-monitoring.md
157
158
  - claudeos-core/standard/40.infra/03.cicd-deployment.md
158
- - claudeos-core/standard/50.verification/01.development-verification.md
159
- - claudeos-core/standard/50.verification/02.testing-strategy.md
159
+ - claudeos-core/standard/80.verification/01.development-verification.md
160
+ - claudeos-core/standard/80.verification/02.testing-strategy.md
160
161
  ```
161
162
  List only the standard files that were actually generated above. Include frontend standards only if frontend was detected. NOTE: `00.core/04.doc-writing-guide.md` is a FORWARD REFERENCE — Pass 4 will generate it; include it anyway. Do NOT add a "DO NOT Read" section here — that information lives in CLAUDE.md Section 7 (the single source of truth).
162
163
 
@@ -55,20 +55,20 @@ Generation targets:
55
55
  - 00.core/01.project-overview.md — Stack, modules, API server info
56
56
  - 00.core/02.architecture.md — Layer structure, request flow, directory structure
57
57
  - 00.core/03.naming-conventions.md — File/variable/type naming conventions
58
- - 10.backend-api/01.router-controller-patterns.md — Routing patterns + middleware
59
- - 10.backend-api/02.service-patterns.md — DI, transactions, business logic
60
- - 10.backend-api/03.data-access-patterns.md — ORM patterns, query optimization
61
- - 10.backend-api/04.response-exception.md — Response/error handling patterns
62
- - 10.backend-api/05.validation-dto.md — Validation, DTO patterns
63
- - 10.backend-api/06.middleware-interceptor.md — Middleware, Guard, Interceptor
58
+ - 10.backend/01.router-controller-patterns.md — Routing patterns + middleware
59
+ - 10.backend/02.service-patterns.md — DI, transactions, business logic
60
+ - 10.backend/03.data-access-patterns.md — ORM patterns, query optimization
61
+ - 10.backend/04.response-exception.md — Response/error handling patterns
62
+ - 10.backend/05.validation-dto.md — Validation, DTO patterns
63
+ - 10.backend/06.middleware-interceptor.md — Middleware, Guard, Interceptor
64
64
  - 30.security-db/01.security-auth.md — JWT, Guard, CORS, Rate Limit
65
65
  - 30.security-db/02.database-schema.md — Migrations, seeds, schema conventions
66
66
  - 30.security-db/03.common-utilities.md — Common utils, helpers, constants
67
67
  - 40.infra/01.environment-config.md — Environment variables, config management
68
68
  - 40.infra/02.logging-monitoring.md — Logging standards, monitoring, alerts
69
69
  - 40.infra/03.cicd-deployment.md — CI/CD pipeline, deployment strategy
70
- - 50.verification/01.development-verification.md — Build, startup, API testing
71
- - 50.verification/02.testing-strategy.md — Testing strategy, mocking, coverage
70
+ - 80.verification/01.development-verification.md — Build, startup, API testing
71
+ - 80.verification/02.testing-strategy.md — Testing strategy, mocking, coverage
72
72
 
73
73
  Each file MUST include:
74
74
  - Correct examples (✅ code blocks)
@@ -82,7 +82,7 @@ Generation targets:
82
82
  - Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
83
83
  ```
84
84
  ## Reference
85
- > For detailed patterns and examples, Read: claudeos-core/standard/10.backend-api/01.router-controller-patterns.md
85
+ > For detailed patterns and examples, Read: claudeos-core/standard/10.backend/01.router-controller-patterns.md
86
86
  ```
87
87
  - `paths:` frontmatter per rule category:
88
88
  - `00.core/*` rules: `paths: ["**/*"]` — always loaded (architecture, naming are universally needed)
@@ -93,6 +93,7 @@ Generation targets:
93
93
  - `40.infra/03.cicd-deployment-rules.md` paths: `["**/*.yml", "**/*.yaml", "**/Dockerfile*", "**/*.ts", "**/*.js"]` — CI config + source
94
94
  - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]` — loaded only when editing claudeos-core files
95
95
  - `60.memory/*` rules: forward reference — Pass 4 will generate 4 files (01.decision-log, 02.failure-patterns, 03.compaction, 04.auto-rule-update), each with file-specific `paths`. Pass 3 must STILL list ```.claude/rules/60.memory/*``` as a row in CLAUDE.md Section 6 Rules table so developers/Claude see the category exists.
96
+ - `70.domains/*` rules (multi-domain projects only): per-domain rules at `.claude/rules/70.domains/{type}/{domain}-rules.md` (where `{type}` is `backend` or `frontend`, ALWAYS present even in single-stack projects for uniform layout + zero-migration future-proofing), each with a `paths:` glob scoped to that domain's source directories so the rule auto-loads only when editing files within the relevant domain. Folder name is PLURAL (`domains/`) — collection of N per-domain files — and each file inside uses the SINGULAR domain name (`{domain}-rules.md`). DO NOT use `60.domains/` (collides with `60.memory/`) and DO NOT skip the `{type}/` sub-folder. See pass3-footer.md "Per-domain folder convention" for the full rationale.
96
97
  - MUST generate `.claude/rules/00.core/00.standard-reference.md` — a directory of all standard files. This is NOT a "read all" instruction. Claude should Read ONLY the standards relevant to the current task. Structure it as:
97
98
  ```
98
99
  ---
@@ -109,12 +110,12 @@ Generation targets:
109
110
  - claudeos-core/standard/00.core/03.naming-conventions.md
110
111
  - claudeos-core/standard/00.core/04.doc-writing-guide.md
111
112
  ## Backend API
112
- - claudeos-core/standard/10.backend-api/01.router-controller-patterns.md
113
- - claudeos-core/standard/10.backend-api/02.service-patterns.md
114
- - claudeos-core/standard/10.backend-api/03.data-access-patterns.md
115
- - claudeos-core/standard/10.backend-api/04.response-exception.md
116
- - claudeos-core/standard/10.backend-api/05.validation-dto.md
117
- - claudeos-core/standard/10.backend-api/06.middleware-interceptor.md
113
+ - claudeos-core/standard/10.backend/01.router-controller-patterns.md
114
+ - claudeos-core/standard/10.backend/02.service-patterns.md
115
+ - claudeos-core/standard/10.backend/03.data-access-patterns.md
116
+ - claudeos-core/standard/10.backend/04.response-exception.md
117
+ - claudeos-core/standard/10.backend/05.validation-dto.md
118
+ - claudeos-core/standard/10.backend/06.middleware-interceptor.md
118
119
  ## Security & DB
119
120
  - claudeos-core/standard/30.security-db/01.security-auth.md
120
121
  - claudeos-core/standard/30.security-db/02.database-schema.md
@@ -123,8 +124,8 @@ Generation targets:
123
124
  - claudeos-core/standard/40.infra/01.environment-config.md
124
125
  - claudeos-core/standard/40.infra/02.logging-monitoring.md
125
126
  - claudeos-core/standard/40.infra/03.cicd-deployment.md
126
- - claudeos-core/standard/50.verification/01.development-verification.md
127
- - claudeos-core/standard/50.verification/02.testing-strategy.md
127
+ - claudeos-core/standard/80.verification/01.development-verification.md
128
+ - claudeos-core/standard/80.verification/02.testing-strategy.md
128
129
  ```
129
130
  List only the standard files that were actually generated above. NOTE: `00.core/04.doc-writing-guide.md` is a FORWARD REFERENCE — Pass 4 will generate it; include it anyway. Do NOT add a "DO NOT Read" section here — that information lives in CLAUDE.md Section 7 (the single source of truth).
130
131
 
@@ -53,24 +53,24 @@ Generation targets:
53
53
  - 00.core/01.project-overview.md — Stack, modules, server info
54
54
  - 00.core/02.architecture.md — Plugin architecture, request lifecycle, hooks flow
55
55
  - 00.core/03.naming-conventions.md — File/route/schema/plugin naming conventions
56
- - 10.backend-api/01.route-plugin-patterns.md — Route registration, plugin encapsulation, prefix
57
- - 10.backend-api/02.service-patterns.md — DI (decorators/awilix), business logic
58
- - 10.backend-api/03.data-access-patterns.md — ORM patterns, DB plugin lifecycle
59
- - 10.backend-api/04.response-exception.md — Response format, error handling, setErrorHandler
60
- - 10.backend-api/05.schema-validation.md — JSON Schema, TypeBox, shared schemas, serialization
61
- - 10.backend-api/06.hooks-lifecycle.md — Hook order, scope, authentication hooks
56
+ - 10.backend/01.route-plugin-patterns.md — Route registration, plugin encapsulation, prefix
57
+ - 10.backend/02.service-patterns.md — DI (decorators/awilix), business logic
58
+ - 10.backend/03.data-access-patterns.md — ORM patterns, DB plugin lifecycle
59
+ - 10.backend/04.response-exception.md — Response format, error handling, setErrorHandler
60
+ - 10.backend/05.schema-validation.md — JSON Schema, TypeBox, shared schemas, serialization
61
+ - 10.backend/06.hooks-lifecycle.md — Hook order, scope, authentication hooks
62
62
  - 30.security-db/01.security-auth.md — JWT, @fastify/auth, CORS, Rate Limit
63
63
  - 30.security-db/02.database-schema.md — Migrations, seeds, schema conventions
64
64
  - 30.security-db/03.common-utilities.md — Common utils, decorators, constants
65
65
  - 40.infra/01.environment-config.md — @fastify/env, configuration management
66
66
  - 40.infra/02.logging-monitoring.md — Pino config, serializers, monitoring
67
67
  - 40.infra/03.cicd-deployment.md — CI/CD pipeline, deployment strategy
68
- - 50.verification/01.development-verification.md — Build, startup, API testing
69
- - 50.verification/02.testing-strategy.md — fastify.inject(), plugin testing, mocking
68
+ - 80.verification/01.development-verification.md — Build, startup, API testing
69
+ - 80.verification/02.testing-strategy.md — fastify.inject(), plugin testing, mocking
70
70
 
71
71
  Each file MUST include:
72
- - Correct examples (code blocks)
73
- - Incorrect examples (code blocks)
72
+ - Correct examples (code blocks)
73
+ - Incorrect examples (code blocks)
74
74
  - Key rules summary table
75
75
 
76
76
  3. .claude/rules/ (active domains only)
@@ -87,6 +87,7 @@ Generation targets:
87
87
  - `40.infra/03.cicd-deployment-rules.md` paths: `["**/*.yml", "**/*.yaml", "**/Dockerfile*", "**/*.ts", "**/*.js"]` — CI config + source
88
88
  - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]`
89
89
  - `60.memory/*` rules: forward reference — Pass 4 will generate 4 files (01.decision-log, 02.failure-patterns, 03.compaction, 04.auto-rule-update), each with file-specific `paths`. Pass 3 must STILL list ```.claude/rules/60.memory/*``` as a row in CLAUDE.md Section 6 Rules table so developers/Claude see the category exists.
90
+ - `70.domains/*` rules (multi-domain projects only): per-domain rules at `.claude/rules/70.domains/{type}/{domain}-rules.md` (where `{type}` is `backend` or `frontend`, ALWAYS present even in single-stack projects for uniform layout + zero-migration future-proofing), each with a `paths:` glob scoped to that domain's source directories so the rule auto-loads only when editing files within the relevant domain. Folder name is PLURAL (`domains/`) — collection of N per-domain files — and each file inside uses the SINGULAR domain name (`{domain}-rules.md`). DO NOT use `60.domains/` (collides with `60.memory/`) and DO NOT skip the `{type}/` sub-folder. See pass3-footer.md "Per-domain folder convention" for the full rationale.
90
91
  - MUST generate `.claude/rules/00.core/00.standard-reference.md` as a directory of all standard files
91
92
 
92
93
  4. .claude/rules/50.sync/ (2 sync rules)
@@ -56,21 +56,21 @@ Generation targets:
56
56
  - 00.core/01.project-overview.md — Stack, modules, API server info
57
57
  - 00.core/02.architecture.md — NestJS module structure, DI container, request lifecycle (middleware → guard → interceptor → pipe → handler → interceptor → filter)
58
58
  - 00.core/03.naming-conventions.md — File/variable/type/decorator naming conventions
59
- - 10.backend-api/01.controller-patterns.md — @Controller, decorators, parameter binding, response handling
60
- - 10.backend-api/02.service-patterns.md — @Injectable, DI, transactions, business logic
61
- - 10.backend-api/03.data-access-patterns.md — ORM patterns, repository injection, query optimization
62
- - 10.backend-api/04.response-exception.md — Response interceptor, HttpException hierarchy, ExceptionFilter
63
- - 10.backend-api/05.validation-dto.md — class-validator, class-transformer, mapped types, ValidationPipe
64
- - 10.backend-api/06.guard-interceptor-pipe.md — Guards (auth/role), Interceptors (logging/cache/transform), Pipes (validation/parse)
65
- - 10.backend-api/07.module-provider-patterns.md — @Module structure, dynamic modules (forRoot/forFeature), custom providers, global modules
59
+ - 10.backend/01.controller-patterns.md — @Controller, decorators, parameter binding, response handling
60
+ - 10.backend/02.service-patterns.md — @Injectable, DI, transactions, business logic
61
+ - 10.backend/03.data-access-patterns.md — ORM patterns, repository injection, query optimization
62
+ - 10.backend/04.response-exception.md — Response interceptor, HttpException hierarchy, ExceptionFilter
63
+ - 10.backend/05.validation-dto.md — class-validator, class-transformer, mapped types, ValidationPipe
64
+ - 10.backend/06.guard-interceptor-pipe.md — Guards (auth/role), Interceptors (logging/cache/transform), Pipes (validation/parse)
65
+ - 10.backend/07.module-provider-patterns.md — @Module structure, dynamic modules (forRoot/forFeature), custom providers, global modules
66
66
  - 30.security-db/01.security-auth.md — JWT, Passport, Guards, CORS, @nestjs/throttler
67
67
  - 30.security-db/02.database-schema.md — Migrations, seeds, schema conventions
68
68
  - 30.security-db/03.common-utilities.md — Custom decorators, shared providers, constants
69
69
  - 40.infra/01.environment-config.md — @nestjs/config, ConfigModule, environment validation
70
70
  - 40.infra/02.logging-monitoring.md — NestJS Logger/pino, LoggingInterceptor, health checks
71
71
  - 40.infra/03.cicd-deployment.md — CI/CD pipeline, deployment strategy
72
- - 50.verification/01.development-verification.md — Build, startup, API testing
73
- - 50.verification/02.testing-strategy.md — Test.createTestingModule, mocking, E2E
72
+ - 80.verification/01.development-verification.md — Build, startup, API testing
73
+ - 80.verification/02.testing-strategy.md — Test.createTestingModule, mocking, E2E
74
74
 
75
75
  Each file MUST include:
76
76
  - Correct examples (✅ code blocks)
@@ -84,7 +84,7 @@ Generation targets:
84
84
  - Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
85
85
  ```
86
86
  ## Reference
87
- > For detailed patterns and examples, Read: claudeos-core/standard/10.backend-api/01.controller-patterns.md
87
+ > For detailed patterns and examples, Read: claudeos-core/standard/10.backend/01.controller-patterns.md
88
88
  ```
89
89
  - `paths:` frontmatter per rule category:
90
90
  - `00.core/*` rules: `paths: ["**/*"]`
@@ -95,6 +95,7 @@ Generation targets:
95
95
  - `40.infra/03.cicd-deployment-rules.md` paths: `["**/*.yml", "**/*.yaml", "**/Dockerfile*", "**/*.ts"]` — CI config + source
96
96
  - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]`
97
97
  - `60.memory/*` rules: forward reference — Pass 4 will generate 4 files (01.decision-log, 02.failure-patterns, 03.compaction, 04.auto-rule-update), each with file-specific `paths`. Pass 3 must STILL list ```.claude/rules/60.memory/*``` as a row in CLAUDE.md Section 6 Rules table so developers/Claude see the category exists.
98
+ - `70.domains/*` rules (multi-domain projects only): per-domain rules at `.claude/rules/70.domains/{type}/{domain}-rules.md` (where `{type}` is `backend` or `frontend`, ALWAYS present even in single-stack projects for uniform layout + zero-migration future-proofing), each with a `paths:` glob scoped to that domain's source directories so the rule auto-loads only when editing files within the relevant domain. Folder name is PLURAL (`domains/`) — collection of N per-domain files — and each file inside uses the SINGULAR domain name (`{domain}-rules.md`). DO NOT use `60.domains/` (collides with `60.memory/`) and DO NOT skip the `{type}/` sub-folder. See pass3-footer.md "Per-domain folder convention" for the full rationale.
98
99
  - MUST generate `.claude/rules/00.core/00.standard-reference.md` — directory of all standard files.
99
100
  List only the standard files that were actually generated above.
100
101
 
@@ -59,18 +59,18 @@ Generation targets:
59
59
  - 00.core/01.project-overview.md — Stack, routing approach, deployment environment
60
60
  - 00.core/02.architecture.md — App Router structure, component hierarchy, data flow
61
61
  - 00.core/03.naming-conventions.md — File/component/hook/type naming conventions
62
- - 20.frontend-ui/01.component-patterns.md — Component writing rules, Props patterns, reuse
63
- - 20.frontend-ui/02.page-routing-patterns.md — Pages/layouts/dynamic routes/middleware
64
- - 20.frontend-ui/03.data-fetching.md — RSC, Server Actions, TanStack Query, caching
65
- - 20.frontend-ui/04.state-management.md — Global/server/URL/form state management
66
- - 20.frontend-ui/05.styling-patterns.md — Styling rules, theming, responsive, accessibility
67
- - 10.backend-api/01.api-routes.md — Route Handlers, Server Actions patterns
62
+ - 20.frontend/01.component-patterns.md — Component writing rules, Props patterns, reuse
63
+ - 20.frontend/02.page-routing-patterns.md — Pages/layouts/dynamic routes/middleware
64
+ - 20.frontend/03.data-fetching.md — RSC, Server Actions, TanStack Query, caching
65
+ - 20.frontend/04.state-management.md — Global/server/URL/form state management
66
+ - 20.frontend/05.styling-patterns.md — Styling rules, theming, responsive, accessibility
67
+ - 10.backend/01.api-routes.md — Route Handlers, Server Actions patterns
68
68
  - 30.security-db/01.security-auth.md — NextAuth, middleware, environment variables, CSP
69
69
  - 40.infra/01.environment-config.md — Environment variables, next.config, build optimization
70
70
  - 40.infra/02.logging-monitoring.md — Error tracking, analytics tools, Web Vitals
71
71
  - 40.infra/03.cicd-deployment.md — CI/CD, Vercel/Docker deployment, preview
72
- - 50.verification/01.development-verification.md — Build, startup, Lighthouse
73
- - 50.verification/02.testing-strategy.md — Testing strategy, RTL, E2E, Storybook
72
+ - 80.verification/01.development-verification.md — Build, startup, Lighthouse
73
+ - 80.verification/02.testing-strategy.md — Testing strategy, RTL, E2E, Storybook
74
74
 
75
75
  Each file MUST include:
76
76
  - Correct examples (✅ code blocks)
@@ -84,7 +84,7 @@ Generation targets:
84
84
  - Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
85
85
  ```
86
86
  ## Reference
87
- > For detailed patterns and examples, Read: claudeos-core/standard/20.frontend-ui/01.component-patterns.md
87
+ > For detailed patterns and examples, Read: claudeos-core/standard/20.frontend/01.component-patterns.md
88
88
  ```
89
89
  - `paths:` frontmatter per rule category:
90
90
  - `00.core/*` rules: `paths: ["**/*"]` — always loaded (architecture, naming are universally needed)
@@ -96,6 +96,7 @@ Generation targets:
96
96
  - `40.infra/03.cicd-deployment-rules.md` paths: `["**/*.yml", "**/*.yaml", "**/Dockerfile*", "**/*.ts", "**/*.tsx"]` — CI config + source
97
97
  - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]` — loaded only when editing claudeos-core files
98
98
  - `60.memory/*` rules: forward reference — Pass 4 will generate 4 files (01.decision-log, 02.failure-patterns, 03.compaction, 04.auto-rule-update), each with file-specific `paths`. Pass 3 must STILL list ```.claude/rules/60.memory/*``` as a row in CLAUDE.md Section 6 Rules table so developers/Claude see the category exists.
99
+ - `70.domains/*` rules (multi-domain projects only): per-domain rules at `.claude/rules/70.domains/{type}/{domain}-rules.md` (where `{type}` is `backend` or `frontend`, ALWAYS present even in single-stack projects for uniform layout + zero-migration future-proofing), each with a `paths:` glob scoped to that domain's source directories so the rule auto-loads only when editing files within the relevant domain. Folder name is PLURAL (`domains/`) — collection of N per-domain files — and each file inside uses the SINGULAR domain name (`{domain}-rules.md`). DO NOT use `60.domains/` (collides with `60.memory/`) and DO NOT skip the `{type}/` sub-folder. See pass3-footer.md "Per-domain folder convention" for the full rationale.
99
100
  - MUST generate `.claude/rules/00.core/00.standard-reference.md` — a directory of all standard files. This is NOT a "read all" instruction. Claude should Read ONLY the standards relevant to the current task. Structure it as:
100
101
  ```
101
102
  ---
@@ -112,21 +113,21 @@ Generation targets:
112
113
  - claudeos-core/standard/00.core/03.naming-conventions.md
113
114
  - claudeos-core/standard/00.core/04.doc-writing-guide.md
114
115
  ## Frontend UI
115
- - claudeos-core/standard/20.frontend-ui/01.component-patterns.md
116
- - claudeos-core/standard/20.frontend-ui/02.page-routing-patterns.md
117
- - claudeos-core/standard/20.frontend-ui/03.data-fetching.md
118
- - claudeos-core/standard/20.frontend-ui/04.state-management.md
119
- - claudeos-core/standard/20.frontend-ui/05.styling-patterns.md
116
+ - claudeos-core/standard/20.frontend/01.component-patterns.md
117
+ - claudeos-core/standard/20.frontend/02.page-routing-patterns.md
118
+ - claudeos-core/standard/20.frontend/03.data-fetching.md
119
+ - claudeos-core/standard/20.frontend/04.state-management.md
120
+ - claudeos-core/standard/20.frontend/05.styling-patterns.md
120
121
  ## Backend API
121
- - claudeos-core/standard/10.backend-api/01.api-routes.md
122
+ - claudeos-core/standard/10.backend/01.api-routes.md
122
123
  ## Security & DB
123
124
  - claudeos-core/standard/30.security-db/01.security-auth.md
124
125
  ## Infra & Verification
125
126
  - claudeos-core/standard/40.infra/01.environment-config.md
126
127
  - claudeos-core/standard/40.infra/02.logging-monitoring.md
127
128
  - claudeos-core/standard/40.infra/03.cicd-deployment.md
128
- - claudeos-core/standard/50.verification/01.development-verification.md
129
- - claudeos-core/standard/50.verification/02.testing-strategy.md
129
+ - claudeos-core/standard/80.verification/01.development-verification.md
130
+ - claudeos-core/standard/80.verification/02.testing-strategy.md
130
131
  ```
131
132
  List only the standard files that were actually generated above. NOTE: `00.core/04.doc-writing-guide.md` is a FORWARD REFERENCE — Pass 4 will generate it; include it anyway. Do NOT add a "DO NOT Read" section here — that information lives in CLAUDE.md Section 7 (the single source of truth).
132
133
 
@@ -46,21 +46,21 @@ Generation targets:
46
46
  - 00.core/01.project-overview.md — Stack, routing approach, deployment environment
47
47
  - 00.core/02.architecture.md — SPA structure, component hierarchy, data flow
48
48
  - 00.core/03.naming-conventions.md — File/component/hook/type naming conventions
49
- - 20.frontend-ui/01.component-patterns.md — Component writing rules, Props patterns, reuse
50
- - 20.frontend-ui/02.page-routing-patterns.md — Client-side routing, layouts, route guards, lazy loading
51
- - 20.frontend-ui/03.data-fetching.md — API client, TanStack Query/SWR, caching, error handling
52
- - 20.frontend-ui/04.state-management.md — Global/server/URL/form state management
53
- - 20.frontend-ui/05.styling-patterns.md — Styling rules, theming, responsive, accessibility
49
+ - 20.frontend/01.component-patterns.md — Component writing rules, Props patterns, reuse
50
+ - 20.frontend/02.page-routing-patterns.md — Client-side routing, layouts, route guards, lazy loading
51
+ - 20.frontend/03.data-fetching.md — API client, TanStack Query/SWR, caching, error handling
52
+ - 20.frontend/04.state-management.md — Global/server/URL/form state management
53
+ - 20.frontend/05.styling-patterns.md — Styling rules, theming, responsive, accessibility
54
54
  - 30.security-db/01.security-auth.md — Auth patterns, token management, route protection, environment variables
55
55
  - 40.infra/01.environment-config.md — Environment variables (VITE_ prefix), vite.config, build optimization
56
56
  - 40.infra/02.logging-monitoring.md — Error tracking, analytics tools, performance monitoring
57
57
  - 40.infra/03.cicd-deployment.md — CI/CD, static hosting deployment (Nginx, S3, Vercel, Netlify)
58
- - 50.verification/01.development-verification.md — Build, startup, dev server
59
- - 50.verification/02.testing-strategy.md — Testing strategy (Vitest, RTL, E2E, Storybook)
58
+ - 80.verification/01.development-verification.md — Build, startup, dev server
59
+ - 80.verification/02.testing-strategy.md — Testing strategy (Vitest, RTL, E2E, Storybook)
60
60
 
61
61
  Each file MUST include:
62
- - Correct examples (code blocks)
63
- - Incorrect examples (code blocks)
62
+ - Correct examples (code blocks)
63
+ - Incorrect examples (code blocks)
64
64
  - Key rules summary table
65
65
 
66
66
  3. .claude/rules/ (active domains only)
@@ -70,7 +70,7 @@ Generation targets:
70
70
  - Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
71
71
  ```
72
72
  ## Reference
73
- > For detailed patterns and examples, Read: claudeos-core/standard/20.frontend-ui/01.component-patterns.md
73
+ > For detailed patterns and examples, Read: claudeos-core/standard/20.frontend/01.component-patterns.md
74
74
  ```
75
75
  - `paths:` frontmatter per rule category:
76
76
  - `00.core/*` rules: `paths: ["**/*"]`
@@ -81,6 +81,7 @@ Generation targets:
81
81
  - `40.infra/03.cicd-deployment-rules.md` paths: `["**/*.yml", "**/*.yaml", "**/Dockerfile*", "**/*.ts", "**/*.tsx"]` — CI config + source with API origin / codegen references
82
82
  - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]`
83
83
  - `60.memory/*` rules: forward reference — Pass 4 will generate 4 files (01.decision-log, 02.failure-patterns, 03.compaction, 04.auto-rule-update), each with file-specific `paths`. Pass 3 must STILL list ```.claude/rules/60.memory/*``` as a row in CLAUDE.md Section 6 Rules table so developers/Claude see the category exists.
84
+ - `70.domains/*` rules (multi-domain projects only): per-domain rules at `.claude/rules/70.domains/{type}/{domain}-rules.md` (where `{type}` is `backend` or `frontend`, ALWAYS present even in single-stack projects for uniform layout + zero-migration future-proofing), each with a `paths:` glob scoped to that domain's source directories so the rule auto-loads only when editing files within the relevant domain. Folder name is PLURAL (`domains/`) — collection of N per-domain files — and each file inside uses the SINGULAR domain name (`{domain}-rules.md`). DO NOT use `60.domains/` (collides with `60.memory/`) and DO NOT skip the `{type}/` sub-folder. See pass3-footer.md "Per-domain folder convention" for the full rationale.
84
85
  - MUST generate `.claude/rules/00.core/00.standard-reference.md` — directory of all standard files.
85
86
 
86
87
  4. .claude/rules/50.sync/ (2 sync rules)