claudeos-core 2.1.1 → 2.3.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 (62) hide show
  1. package/CHANGELOG.md +1649 -481
  2. package/CONTRIBUTING.md +92 -92
  3. package/README.de.md +64 -5
  4. package/README.es.md +64 -5
  5. package/README.fr.md +64 -5
  6. package/README.hi.md +64 -5
  7. package/README.ja.md +64 -5
  8. package/README.ko.md +1018 -959
  9. package/README.md +1020 -960
  10. package/README.ru.md +66 -5
  11. package/README.vi.md +1019 -960
  12. package/README.zh-CN.md +64 -5
  13. package/bin/cli.js +152 -148
  14. package/bin/commands/init.js +1673 -1518
  15. package/bin/commands/lint.js +62 -0
  16. package/bin/commands/memory.js +438 -438
  17. package/bin/lib/cli-utils.js +206 -206
  18. package/claude-md-validator/index.js +184 -0
  19. package/claude-md-validator/reporter.js +66 -0
  20. package/claude-md-validator/structural-checks.js +528 -0
  21. package/content-validator/index.js +666 -436
  22. package/lib/env-parser.js +317 -0
  23. package/lib/expected-guides.js +23 -23
  24. package/lib/expected-outputs.js +90 -90
  25. package/lib/language-config.js +35 -35
  26. package/lib/memory-scaffold.js +1058 -1052
  27. package/lib/plan-parser.js +165 -165
  28. package/lib/staged-rules.js +118 -118
  29. package/manifest-generator/index.js +174 -174
  30. package/package.json +90 -87
  31. package/pass-json-validator/index.js +337 -337
  32. package/pass-prompts/templates/angular/pass3.md +28 -13
  33. package/pass-prompts/templates/common/claude-md-scaffold.md +686 -0
  34. package/pass-prompts/templates/common/pass3-footer.md +402 -39
  35. package/pass-prompts/templates/common/pass3b-core-header.md +43 -0
  36. package/pass-prompts/templates/common/pass4.md +375 -302
  37. package/pass-prompts/templates/common/staging-override.md +26 -26
  38. package/pass-prompts/templates/java-spring/pass3.md +31 -21
  39. package/pass-prompts/templates/kotlin-spring/pass3.md +34 -22
  40. package/pass-prompts/templates/node-express/pass3.md +30 -21
  41. package/pass-prompts/templates/node-fastify/pass3.md +28 -14
  42. package/pass-prompts/templates/node-nestjs/pass3.md +29 -14
  43. package/pass-prompts/templates/node-nextjs/pass3.md +34 -21
  44. package/pass-prompts/templates/node-vite/pass1.md +117 -117
  45. package/pass-prompts/templates/node-vite/pass2.md +78 -78
  46. package/pass-prompts/templates/node-vite/pass3.md +30 -13
  47. package/pass-prompts/templates/python-django/pass3.md +32 -21
  48. package/pass-prompts/templates/python-fastapi/pass3.md +33 -21
  49. package/pass-prompts/templates/python-flask/pass1.md +119 -119
  50. package/pass-prompts/templates/python-flask/pass2.md +85 -85
  51. package/pass-prompts/templates/python-flask/pass3.md +31 -13
  52. package/pass-prompts/templates/vue-nuxt/pass3.md +32 -13
  53. package/plan-installer/domain-grouper.js +76 -76
  54. package/plan-installer/index.js +137 -129
  55. package/plan-installer/prompt-generator.js +188 -128
  56. package/plan-installer/scanners/scan-frontend.js +505 -473
  57. package/plan-installer/scanners/scan-java.js +226 -226
  58. package/plan-installer/scanners/scan-node.js +57 -57
  59. package/plan-installer/scanners/scan-python.js +85 -85
  60. package/plan-installer/stack-detector.js +482 -466
  61. package/plan-installer/structure-scanner.js +65 -65
  62. package/sync-checker/index.js +177 -177
@@ -1,119 +1,119 @@
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/Blueprint Patterns
10
- - Blueprint structure (Blueprint registration, url_prefix, naming)
11
- - Route decorators (@app.route, @bp.route with methods)
12
- - URL patterns and naming conventions
13
- - View function structure (function-based vs class-based MethodView)
14
- - Request handling (request.args, request.form, request.json, request.files)
15
- - Response patterns (jsonify, make_response, Response, redirect, abort)
16
- - If a custom response wrapper exists, record its EXACT function/class name, EXACT import path
17
- - **Response wrapping layer (CRITICAL)**: Which layer formats the response?
18
- Does the route handler call it directly, or does a service layer return formatted data?
19
- - Error handling (errorhandler, abort, custom exception classes)
20
- - Authentication (flask-login, flask-jwt-extended, custom decorators)
21
- - API documentation (flask-restx, flask-smorest, flasgger)
22
- - Pagination patterns
23
-
24
- 2. Data Model Patterns
25
- - ORM (SQLAlchemy, Flask-SQLAlchemy, Peewee)
26
- - Model structure (db.Model, relationships, mixins)
27
- - Serialization (marshmallow, flask-marshmallow, manual to_dict)
28
- - Form validation (WTForms, Flask-WTF, manual)
29
- - Request/Response schema separation
30
- - Enum/constant management
31
-
32
- 3. Data Access Patterns
33
- - Session management (db.session, scoped_session)
34
- - Repository/DAO pattern vs direct model queries
35
- - Migration (Flask-Migrate / Alembic)
36
- - Query optimization (eager loading, lazy loading)
37
- - Connection management (pool, teardown_appcontext)
38
- - Transaction management
39
-
40
- 4. Application Structure Patterns
41
- - Application factory (create_app)
42
- - Configuration (app.config, from_object, from_envvar)
43
- - Extension initialization (db.init_app, login_manager.init_app)
44
- - Context (application context, request context, g, current_app)
45
- - Before/after request hooks (before_request, after_request, teardown_request)
46
- - Import paths: record EXACT import conventions
47
- - Utility function locations: record EXACT module paths
48
-
49
- 5. Configuration/Environment Patterns
50
- - Environment variable management (python-dotenv, os.environ)
51
- - Config classes (DevelopmentConfig, ProductionConfig)
52
- - Per-environment branching
53
- - Secret management (SECRET_KEY, database URL)
54
-
55
- 6. Logging Patterns
56
- - Logger usage (app.logger, structlog, loguru, logging)
57
- - Log level policy
58
- - Request/response logging
59
- - Error logging
60
-
61
- 7. Testing Patterns
62
- - Test framework (pytest, unittest)
63
- - Test client (app.test_client, pytest fixtures)
64
- - Application factory testing (create_app with test config)
65
- - Fixture management (conftest, client fixture)
66
- - DB test strategy (test DB, SQLite in-memory, transaction rollback)
67
- - Mocking (unittest.mock, pytest-mock, responses)
68
-
69
- 8. Domain-Specific Patterns
70
- - Template rendering (Jinja2, render_template) vs JSON API
71
- - File upload (request.files, werkzeug FileStorage)
72
- - Background tasks (Celery, RQ, APScheduler)
73
- - WebSocket (Flask-SocketIO)
74
- - External API integration (requests, httpx)
75
- - Caching (Flask-Caching, Redis)
76
- - Session management (server-side, Flask-Session)
77
- - CSRF protection (Flask-WTF CSRFProtect)
78
-
79
- 9. Anti-patterns / Inconsistencies
80
- - Circular imports
81
- - Missing application factory
82
- - Global state misuse
83
- - Missing error handlers
84
- - Security issues (injection, missing CSRF, debug mode in production)
85
- - Performance issues (blocking I/O, N+1 queries)
86
-
87
- Do not create or modify source files. Analysis only.
88
- Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
89
-
90
- {
91
- "analyzedAt": "ISO timestamp",
92
- "passNum": {{PASS_NUM}},
93
- "domains": ["auth", "users", "orders", "products"],
94
- "analysisPerDomain": {
95
- "users": {
96
- "representativeFiles": {
97
- "routes": "app/users/routes.py",
98
- "models": "app/users/models.py",
99
- "forms": "app/users/forms.py",
100
- "services": "app/users/services.py"
101
- },
102
- "patterns": {
103
- "routes": { ... },
104
- "models": { ... },
105
- "dataAccess": { ... },
106
- "appStructure": { ... },
107
- "config": { ... },
108
- "logging": { ... },
109
- "testing": { ... }
110
- },
111
- "specialPatterns": [],
112
- "antiPatterns": []
113
- }
114
- },
115
- "crossDomainCommon": {
116
- "description": "Patterns commonly used across domains in this group",
117
- "patterns": []
118
- }
119
- }
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/Blueprint Patterns
10
+ - Blueprint structure (Blueprint registration, url_prefix, naming)
11
+ - Route decorators (@app.route, @bp.route with methods)
12
+ - URL patterns and naming conventions
13
+ - View function structure (function-based vs class-based MethodView)
14
+ - Request handling (request.args, request.form, request.json, request.files)
15
+ - Response patterns (jsonify, make_response, Response, redirect, abort)
16
+ - If a custom response wrapper exists, record its EXACT function/class name, EXACT import path
17
+ - **Response wrapping layer (CRITICAL)**: Which layer formats the response?
18
+ Does the route handler call it directly, or does a service layer return formatted data?
19
+ - Error handling (errorhandler, abort, custom exception classes)
20
+ - Authentication (flask-login, flask-jwt-extended, custom decorators)
21
+ - API documentation (flask-restx, flask-smorest, flasgger)
22
+ - Pagination patterns
23
+
24
+ 2. Data Model Patterns
25
+ - ORM (SQLAlchemy, Flask-SQLAlchemy, Peewee)
26
+ - Model structure (db.Model, relationships, mixins)
27
+ - Serialization (marshmallow, flask-marshmallow, manual to_dict)
28
+ - Form validation (WTForms, Flask-WTF, manual)
29
+ - Request/Response schema separation
30
+ - Enum/constant management
31
+
32
+ 3. Data Access Patterns
33
+ - Session management (db.session, scoped_session)
34
+ - Repository/DAO pattern vs direct model queries
35
+ - Migration (Flask-Migrate / Alembic)
36
+ - Query optimization (eager loading, lazy loading)
37
+ - Connection management (pool, teardown_appcontext)
38
+ - Transaction management
39
+
40
+ 4. Application Structure Patterns
41
+ - Application factory (create_app)
42
+ - Configuration (app.config, from_object, from_envvar)
43
+ - Extension initialization (db.init_app, login_manager.init_app)
44
+ - Context (application context, request context, g, current_app)
45
+ - Before/after request hooks (before_request, after_request, teardown_request)
46
+ - Import paths: record EXACT import conventions
47
+ - Utility function locations: record EXACT module paths
48
+
49
+ 5. Configuration/Environment Patterns
50
+ - Environment variable management (python-dotenv, os.environ)
51
+ - Config classes (DevelopmentConfig, ProductionConfig)
52
+ - Per-environment branching
53
+ - Secret management (SECRET_KEY, database URL)
54
+
55
+ 6. Logging Patterns
56
+ - Logger usage (app.logger, structlog, loguru, logging)
57
+ - Log level policy
58
+ - Request/response logging
59
+ - Error logging
60
+
61
+ 7. Testing Patterns
62
+ - Test framework (pytest, unittest)
63
+ - Test client (app.test_client, pytest fixtures)
64
+ - Application factory testing (create_app with test config)
65
+ - Fixture management (conftest, client fixture)
66
+ - DB test strategy (test DB, SQLite in-memory, transaction rollback)
67
+ - Mocking (unittest.mock, pytest-mock, responses)
68
+
69
+ 8. Domain-Specific Patterns
70
+ - Template rendering (Jinja2, render_template) vs JSON API
71
+ - File upload (request.files, werkzeug FileStorage)
72
+ - Background tasks (Celery, RQ, APScheduler)
73
+ - WebSocket (Flask-SocketIO)
74
+ - External API integration (requests, httpx)
75
+ - Caching (Flask-Caching, Redis)
76
+ - Session management (server-side, Flask-Session)
77
+ - CSRF protection (Flask-WTF CSRFProtect)
78
+
79
+ 9. Anti-patterns / Inconsistencies
80
+ - Circular imports
81
+ - Missing application factory
82
+ - Global state misuse
83
+ - Missing error handlers
84
+ - Security issues (injection, missing CSRF, debug mode in production)
85
+ - Performance issues (blocking I/O, N+1 queries)
86
+
87
+ Do not create or modify source files. Analysis only.
88
+ Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
89
+
90
+ {
91
+ "analyzedAt": "ISO timestamp",
92
+ "passNum": {{PASS_NUM}},
93
+ "domains": ["auth", "users", "orders", "products"],
94
+ "analysisPerDomain": {
95
+ "users": {
96
+ "representativeFiles": {
97
+ "routes": "app/users/routes.py",
98
+ "models": "app/users/models.py",
99
+ "forms": "app/users/forms.py",
100
+ "services": "app/users/services.py"
101
+ },
102
+ "patterns": {
103
+ "routes": { ... },
104
+ "models": { ... },
105
+ "dataAccess": { ... },
106
+ "appStructure": { ... },
107
+ "config": { ... },
108
+ "logging": { ... },
109
+ "testing": { ... }
110
+ },
111
+ "specialPatterns": [],
112
+ "antiPatterns": []
113
+ }
114
+ },
115
+ "crossDomainCommon": {
116
+ "description": "Patterns commonly used across domains in this group",
117
+ "patterns": []
118
+ }
119
+ }
@@ -1,85 +1,85 @@
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/Blueprint style (decorators, response format, status codes)
8
- - **Response flow**: Which layer wraps the response? (route handler vs service layer)
9
- Record the definitive answer. If an orchestration layer exists, describe it.
10
- - Model/serialization conventions (SQLAlchemy, marshmallow)
11
- - Data access patterns (session management, queries)
12
- - Application factory structure (create_app, extensions)
13
- - Error handling patterns
14
- - Before/after request hooks
15
-
16
- 2. Majority Patterns (shared by 50%+ of domains)
17
- - Specify which domains share them
18
-
19
- 3. Domain-Specific Patterns (unique to a single domain)
20
- - File upload: which domain
21
- - WebSocket: which domain
22
- - Background tasks: which domain
23
- - External API: which domain
24
- - Caching: which domain
25
- - Template rendering: which domain
26
-
27
- 4. Anti-pattern Summary
28
- - Consolidate all inconsistencies found across domains
29
- - Classify by severity (CRITICAL / HIGH / MEDIUM / LOW)
30
-
31
- 5. Naming Conventions Summary
32
- - Module/package naming (snake_case)
33
- - Blueprint naming conventions
34
- - Model/schema naming conventions
35
- - Route URL patterns
36
- - File structure conventions
37
-
38
- 6. Common Models/Utilities List
39
- - Base model mixins with EXACT import paths
40
- - Shared utility functions with EXACT module paths
41
- - Constants/Enum management with EXACT locations
42
- - Extension instances (db, login_manager, etc.)
43
-
44
- 7. Security/Authentication Patterns
45
- - Authentication method (flask-login, flask-jwt-extended, custom)
46
- - Authorization decorators (login_required, custom)
47
- - CSRF protection
48
- - CORS configuration
49
- - Environment variable management
50
-
51
- 8. Database Patterns
52
- - Table naming (__tablename__)
53
- - Migration strategy (Flask-Migrate)
54
- - Seed data management
55
- - Audit fields (created_at, updated_at)
56
- - Relationship patterns
57
- - Index/constraints
58
-
59
- 9. Testing Strategy Summary
60
- - Test coverage level
61
- - Test classification system (unit/integration/E2E)
62
- - Test client setup (app.test_client)
63
- - Fixture/Factory strategy
64
- - Mocking strategy
65
- - DB test strategy
66
-
67
- 10. Logging/Monitoring Strategy
68
- - Logger standard (app.logger vs custom)
69
- - Log level policy
70
- - Request/response logging
71
-
72
- 11. Performance Patterns
73
- - Caching strategy (Flask-Caching)
74
- - Connection pool configuration
75
- - Query optimization
76
- - Static file serving
77
-
78
- 12. Code Quality Tools
79
- - Lint/Format tools (ruff, black, isort, mypy, flake8)
80
- - Pre-commit hooks
81
- - Type Checking (mypy, pyright)
82
- - CI integration status
83
-
84
- Do not generate code. Merge only.
85
- Save results to claudeos-core/generated/pass2-merged.json.
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/Blueprint style (decorators, response format, status codes)
8
+ - **Response flow**: Which layer wraps the response? (route handler vs service layer)
9
+ Record the definitive answer. If an orchestration layer exists, describe it.
10
+ - Model/serialization conventions (SQLAlchemy, marshmallow)
11
+ - Data access patterns (session management, queries)
12
+ - Application factory structure (create_app, extensions)
13
+ - Error handling patterns
14
+ - Before/after request hooks
15
+
16
+ 2. Majority Patterns (shared by 50%+ of domains)
17
+ - Specify which domains share them
18
+
19
+ 3. Domain-Specific Patterns (unique to a single domain)
20
+ - File upload: which domain
21
+ - WebSocket: which domain
22
+ - Background tasks: which domain
23
+ - External API: which domain
24
+ - Caching: which domain
25
+ - Template rendering: which domain
26
+
27
+ 4. Anti-pattern Summary
28
+ - Consolidate all inconsistencies found across domains
29
+ - Classify by severity (CRITICAL / HIGH / MEDIUM / LOW)
30
+
31
+ 5. Naming Conventions Summary
32
+ - Module/package naming (snake_case)
33
+ - Blueprint naming conventions
34
+ - Model/schema naming conventions
35
+ - Route URL patterns
36
+ - File structure conventions
37
+
38
+ 6. Common Models/Utilities List
39
+ - Base model mixins with EXACT import paths
40
+ - Shared utility functions with EXACT module paths
41
+ - Constants/Enum management with EXACT locations
42
+ - Extension instances (db, login_manager, etc.)
43
+
44
+ 7. Security/Authentication Patterns
45
+ - Authentication method (flask-login, flask-jwt-extended, custom)
46
+ - Authorization decorators (login_required, custom)
47
+ - CSRF protection
48
+ - CORS configuration
49
+ - Environment variable management
50
+
51
+ 8. Database Patterns
52
+ - Table naming (__tablename__)
53
+ - Migration strategy (Flask-Migrate)
54
+ - Seed data management
55
+ - Audit fields (created_at, updated_at)
56
+ - Relationship patterns
57
+ - Index/constraints
58
+
59
+ 9. Testing Strategy Summary
60
+ - Test coverage level
61
+ - Test classification system (unit/integration/E2E)
62
+ - Test client setup (app.test_client)
63
+ - Fixture/Factory strategy
64
+ - Mocking strategy
65
+ - DB test strategy
66
+
67
+ 10. Logging/Monitoring Strategy
68
+ - Logger standard (app.logger vs custom)
69
+ - Log level policy
70
+ - Request/response logging
71
+
72
+ 11. Performance Patterns
73
+ - Caching strategy (Flask-Caching)
74
+ - Connection pool configuration
75
+ - Query optimization
76
+ - Static file serving
77
+
78
+ 12. Code Quality Tools
79
+ - Lint/Format tools (ruff, black, isort, mypy, flake8)
80
+ - Pre-commit hooks
81
+ - Type Checking (mypy, pyright)
82
+ - CI integration status
83
+
84
+ Do not generate code. Merge only.
85
+ Save results to claudeos-core/generated/pass2-merged.json.
@@ -22,17 +22,30 @@ Determine from pass2-merged.json which layer (route handler vs service layer) fo
22
22
  the response. This MUST be identical across architecture.md, route-patterns.md,
23
23
  and all rules files.
24
24
 
25
- CRITICAL — CLAUDE.md Reference Table Completeness:
26
- The reference table in CLAUDE.md MUST list ALL generated standard files.
27
-
28
25
  Generation targets:
29
26
 
30
27
  1. CLAUDE.md (project root)
31
- - Role definition (based on detected stack — Flask)
32
- - Build & Run Commands (pip/poetry, flask run, gunicorn, docker)
33
- - Core architecture diagram (application factory, Blueprint structure)
34
- - Module structure
35
- - Standard/Skills/Guide reference table
28
+
29
+ Follow the scaffold EXACTLY:
30
+ → `pass-prompts/templates/common/claude-md-scaffold.md`
31
+
32
+ The scaffold enforces an 8-section deterministic structure:
33
+ 1. Role Definition → 2. Project Overview → 3. Build & Run Commands →
34
+ 4. Core Architecture → 5. Directory Structure → 6. Standard / Rules / Skills Reference →
35
+ 7. DO NOT Read → 8. Common Rules & Memory (L4)
36
+
37
+ All section titles, order, and formats are FIXED by the scaffold.
38
+ Content within each section adapts to this project based on pass2-merged.json.
39
+ The scaffold's validation checklist MUST pass.
40
+
41
+ Stack-specific hints for this project (Python Flask):
42
+ - Project type for Section 1 PROJECT_CONTEXT: "Lightweight Web Application" or "REST API Server"
43
+ (reflect the application factory pattern and Blueprint structure)
44
+ - Architecture diagram (Section 4): application factory → Blueprint → route → service,
45
+ request lifecycle
46
+ - Section 3 commands: pip/poetry install, flask run (dev), gunicorn (production), docker
47
+ - Module structure: reflect in Section 5 tree (blueprints/, models/, services/)
48
+ - Detect SQLAlchemy/marshmallow/WTForms and reflect in Section 2
36
49
 
37
50
  2. claudeos-core/standard/ (active domains only)
38
51
  - 00.core/01.project-overview.md — Stack, modules, server info
@@ -64,14 +77,19 @@ Generation targets:
64
77
  - `00.core/*` rules: `paths: ["**/*"]`
65
78
  - `10.backend/*` rules: `paths: ["**/*"]`
66
79
  - `30.security-db/*` rules: `paths: ["**/*"]`
67
- - `40.infra/*` rules: `paths: ["**/*.json", "**/*.env*", "**/*.cfg", "**/Dockerfile*", "**/*.yml", "**/*.yaml"]`
80
+ - `40.infra/01.environment-config-rules.md` paths: `["**/.env*", "**/config.py", "**/config/**", "**/*.cfg", "**/*.toml"]` — env / Flask config
81
+ - `40.infra/02.logging-monitoring-rules.md` paths: `["**/*.py"]` — source code where logs live
82
+ - `40.infra/03.cicd-deployment-rules.md` paths: `["**/*.yml", "**/*.yaml", "**/Dockerfile*", "**/*.py"]` — CI / deploy config + source
68
83
  - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]`
84
+ - `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.
69
85
  - MUST generate `.claude/rules/00.core/00.standard-reference.md` — directory of all standard files
70
86
 
71
- 4. .claude/rules/50.sync/ (3 sync rules)
72
- - 01.standard-sync.md
73
- - 02.rules-sync.md
74
- - 03.skills-sync.md
87
+ 4. .claude/rules/50.sync/ (2 sync rules)
88
+ - 01.doc-sync.md — Bidirectional standard ↔ rules sync reminder (both directions in ONE rule).
89
+ Do NOT generate a separate 02.rules-sync.md mirror file — redundant.
90
+ Express the mapping as a naming convention (standard/<N>.<dir>/<M>.<n>.md
91
+ .claude/rules/<N>.<dir>/<M>.<n>-rules.md), NOT a hardcoded file-to-file table.
92
+ - 02.skills-sync.md — Remind AI to update MANIFEST.md when skills are modified
75
93
 
76
94
  5. claudeos-core/skills/ (active domains only)
77
95
  - 10.backend-crud/01.scaffold-crud-feature.md (orchestrator)
@@ -17,17 +17,31 @@ CRITICAL — Code Example Accuracy:
17
17
  ALL code examples MUST use EXACT method names, class names, and signatures from pass2-merged.json.
18
18
  Do NOT paraphrase, rename, or infer API names.
19
19
 
20
- CRITICAL — CLAUDE.md Reference Table Completeness:
21
- The reference table in CLAUDE.md MUST list ALL generated standard files.
22
-
23
20
  Generation targets:
24
21
 
25
22
  1. CLAUDE.md (project root)
26
- - Role definition (Vue/Nuxt frontend developer)
27
- - Build & Run Commands (use ONLY the detected packageManager)
28
- - Core architecture diagram
29
- - Directory structure description
30
- - Standard/Skills/Guide reference table
23
+
24
+ Follow the scaffold EXACTLY:
25
+ → `pass-prompts/templates/common/claude-md-scaffold.md`
26
+
27
+ The scaffold enforces an 8-section deterministic structure:
28
+ 1. Role Definition → 2. Project Overview → 3. Build & Run Commands →
29
+ 4. Core Architecture → 5. Directory Structure → 6. Standard / Rules / Skills Reference →
30
+ 7. DO NOT Read → 8. Common Rules & Memory (L4)
31
+
32
+ All section titles, order, and formats are FIXED by the scaffold.
33
+ Content within each section adapts to this project based on pass2-merged.json.
34
+ The scaffold's validation checklist MUST pass.
35
+
36
+ Stack-specific hints for this project (Vue / Nuxt):
37
+ - Project type for Section 1 PROJECT_CONTEXT: when Nuxt is detected, "Full-stack Web Application"
38
+ or "SSR/SSG-based SPA"; when pure Vue is detected, "Vue SPA"
39
+ - Architecture diagram (Section 4): component hierarchy, data flow (useFetch/useAsyncData),
40
+ Nuxt projects include a Nitro server layer
41
+ - Use ONLY the detected packageManager in Section 3
42
+ - Directory structure (Section 5): Nuxt uses auto-routing-based pages/,
43
+ Vue uses an explicit router-config file structure
44
+ - Detect the state-management approach (Pinia vs Composables) and reflect in Section 4 Core Patterns
31
45
 
32
46
  2. claudeos-core/standard/ (active domains only)
33
47
  - 00.core/01.project-overview.md — Stack, routing approach, deployment environment
@@ -61,14 +75,19 @@ Generation targets:
61
75
  - `10.backend/*` rules: `paths: ["**/*"]`
62
76
  - `20.frontend/*` rules: `paths: ["**/*"]`
63
77
  - `30.security-db/*` rules: `paths: ["**/*"]`
64
- - `40.infra/*` rules: `paths: ["**/*.json", "**/*.env*", "**/nuxt.config.*", "**/vite.config.*", "**/Dockerfile*", "**/*.yml", "**/*.yaml"]`
78
+ - `40.infra/01.environment-config-rules.md` paths: `["**/.env*", "**/nuxt.config.*", "**/vite.config.*", "**/*.json"]` — env / Nuxt/Vite config
79
+ - `40.infra/02.logging-monitoring-rules.md` paths: `["**/*.ts", "**/*.tsx", "**/*.vue", "**/*.js"]` — source code (including SFC) where logs live
80
+ - `40.infra/03.cicd-deployment-rules.md` paths: `["**/*.yml", "**/*.yaml", "**/Dockerfile*", "**/*.ts", "**/*.vue"]` — CI config + source
65
81
  - `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]`
82
+ - `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.
66
83
  - MUST generate `.claude/rules/00.core/00.standard-reference.md` — directory of all standard files
67
84
 
68
- 4. .claude/rules/50.sync/ (3 sync rules)
69
- - 01.standard-sync.md
70
- - 02.rules-sync.md
71
- - 03.skills-sync.md
85
+ 4. .claude/rules/50.sync/ (2 sync rules)
86
+ - 01.doc-sync.md — Bidirectional standard ↔ rules sync reminder (both directions in ONE rule).
87
+ Do NOT generate a separate 02.rules-sync.md mirror file — redundant.
88
+ Express the mapping as a naming convention (standard/<N>.<dir>/<M>.<n>.md
89
+ .claude/rules/<N>.<dir>/<M>.<n>-rules.md), NOT a hardcoded file-to-file table.
90
+ - 02.skills-sync.md — Remind AI to update MANIFEST.md when skills are modified
72
91
 
73
92
  5. claudeos-core/skills/ (active domains only)
74
93
  - 20.frontend-page/01.scaffold-page-feature.md (orchestrator)