claudeos-core 2.2.0 → 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 (49) hide show
  1. package/CHANGELOG.md +1649 -907
  2. package/CONTRIBUTING.md +92 -92
  3. package/README.de.md +32 -0
  4. package/README.es.md +32 -0
  5. package/README.fr.md +32 -0
  6. package/README.hi.md +32 -0
  7. package/README.ja.md +32 -0
  8. package/README.ko.md +1018 -986
  9. package/README.md +1020 -987
  10. package/README.ru.md +32 -0
  11. package/README.vi.md +1019 -987
  12. package/README.zh-CN.md +32 -0
  13. package/bin/cli.js +152 -148
  14. package/bin/commands/init.js +1673 -1554
  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 -441
  22. package/lib/expected-guides.js +23 -23
  23. package/lib/expected-outputs.js +90 -90
  24. package/lib/language-config.js +35 -35
  25. package/lib/memory-scaffold.js +1058 -1054
  26. package/lib/plan-parser.js +165 -165
  27. package/lib/staged-rules.js +118 -118
  28. package/manifest-generator/index.js +174 -174
  29. package/package.json +90 -87
  30. package/pass-json-validator/index.js +337 -337
  31. package/pass-prompts/templates/common/claude-md-scaffold.md +52 -10
  32. package/pass-prompts/templates/common/pass3-footer.md +402 -224
  33. package/pass-prompts/templates/common/pass3b-core-header.md +43 -0
  34. package/pass-prompts/templates/common/pass4.md +375 -305
  35. package/pass-prompts/templates/common/staging-override.md +26 -26
  36. package/pass-prompts/templates/node-vite/pass1.md +117 -117
  37. package/pass-prompts/templates/node-vite/pass2.md +78 -78
  38. package/pass-prompts/templates/python-flask/pass1.md +119 -119
  39. package/pass-prompts/templates/python-flask/pass2.md +85 -85
  40. package/plan-installer/domain-grouper.js +76 -76
  41. package/plan-installer/index.js +137 -137
  42. package/plan-installer/prompt-generator.js +188 -145
  43. package/plan-installer/scanners/scan-frontend.js +505 -473
  44. package/plan-installer/scanners/scan-java.js +226 -226
  45. package/plan-installer/scanners/scan-node.js +57 -57
  46. package/plan-installer/scanners/scan-python.js +85 -85
  47. package/plan-installer/stack-detector.js +482 -482
  48. package/plan-installer/structure-scanner.js +65 -65
  49. package/sync-checker/index.js +177 -177
@@ -1,26 +1,26 @@
1
- ## CRITICAL — Write path redirect for `.claude/rules/` (tool-access workaround)
2
-
3
- Claude Code's sensitive-path policy blocks direct writes under `.claude/` from this subprocess, even with `--dangerously-skip-permissions`. To work around this safely, all rule files must be written to a staging directory and the Node.js orchestrator will move them after you finish.
4
-
5
- **Rule (overrides every instruction below):**
6
-
7
- > Whenever the instructions below tell you to WRITE a file whose path starts with `.claude/rules/`, write it to `claudeos-core/generated/.staged-rules/` instead, **preserving the subpath exactly**.
8
-
9
- Examples (write-target redirect, **subpath preserved**):
10
-
11
- | Instruction says to write | You MUST write to |
12
- |---|---|
13
- | `.claude/rules/00.core/00.standard-reference.md` | `claudeos-core/generated/.staged-rules/00.core/00.standard-reference.md` |
14
- | `.claude/rules/10.backend/01.controller-rules.md` | `claudeos-core/generated/.staged-rules/10.backend/01.controller-rules.md` |
15
- | `.claude/rules/50.sync/01.doc-sync.md` | `claudeos-core/generated/.staged-rules/50.sync/01.doc-sync.md` |
16
- | `.claude/rules/60.memory/01.decision-log.md` | `claudeos-core/generated/.staged-rules/60.memory/01.decision-log.md` |
17
-
18
- **Important clarifications:**
19
-
20
- 1. **Prose references stay as-is.** When the instructions or the file content you generate describe `.claude/rules/` as a concept ("Rules (.claude/rules/) and Standards...", "Each rule file in .claude/rules/ links to..."), keep that text literal. Only the **write-target file paths** are redirected. Generated file bodies will eventually live under `.claude/rules/`, so in-body references should point to the final location, not the staging location.
21
- 2. **Frontmatter `paths:` values stay as-is.** These are glob patterns scoped to project files (`"**/*"`, `"**/*.yml"`, etc.), not self-references.
22
- 3. **Do NOT attempt to write to `.claude/rules/` directly** — those writes will be refused by the tool.
23
- 4. **Create missing staging subdirectories as needed.** `claudeos-core/generated/` exists, but subpaths under `.staged-rules/` do not yet.
24
- 5. **This redirect applies to THIS Pass only.** Files written anywhere else (e.g. `claudeos-core/standard/`, `CLAUDE.md`, `claudeos-core/memory/`) are unaffected — write those to their intended paths as stated in the instructions below.
25
-
26
- ---
1
+ ## CRITICAL — Write path redirect for `.claude/rules/` (tool-access workaround)
2
+
3
+ Claude Code's sensitive-path policy blocks direct writes under `.claude/` from this subprocess, even with `--dangerously-skip-permissions`. To work around this safely, all rule files must be written to a staging directory and the Node.js orchestrator will move them after you finish.
4
+
5
+ **Rule (overrides every instruction below):**
6
+
7
+ > Whenever the instructions below tell you to WRITE a file whose path starts with `.claude/rules/`, write it to `claudeos-core/generated/.staged-rules/` instead, **preserving the subpath exactly**.
8
+
9
+ Examples (write-target redirect, **subpath preserved**):
10
+
11
+ | Instruction says to write | You MUST write to |
12
+ |---|---|
13
+ | `.claude/rules/00.core/00.standard-reference.md` | `claudeos-core/generated/.staged-rules/00.core/00.standard-reference.md` |
14
+ | `.claude/rules/10.backend/01.controller-rules.md` | `claudeos-core/generated/.staged-rules/10.backend/01.controller-rules.md` |
15
+ | `.claude/rules/50.sync/01.doc-sync.md` | `claudeos-core/generated/.staged-rules/50.sync/01.doc-sync.md` |
16
+ | `.claude/rules/60.memory/01.decision-log.md` | `claudeos-core/generated/.staged-rules/60.memory/01.decision-log.md` |
17
+
18
+ **Important clarifications:**
19
+
20
+ 1. **Prose references stay as-is.** When the instructions or the file content you generate describe `.claude/rules/` as a concept ("Rules (.claude/rules/) and Standards...", "Each rule file in .claude/rules/ links to..."), keep that text literal. Only the **write-target file paths** are redirected. Generated file bodies will eventually live under `.claude/rules/`, so in-body references should point to the final location, not the staging location.
21
+ 2. **Frontmatter `paths:` values stay as-is.** These are glob patterns scoped to project files (`"**/*"`, `"**/*.yml"`, etc.), not self-references.
22
+ 3. **Do NOT attempt to write to `.claude/rules/` directly** — those writes will be refused by the tool.
23
+ 4. **Create missing staging subdirectories as needed.** `claudeos-core/generated/` exists, but subpaths under `.staged-rules/` do not yet.
24
+ 5. **This redirect applies to THIS Pass only.** Files written anywhere else (e.g. `claudeos-core/standard/`, `CLAUDE.md`, `claudeos-core/memory/`) are unaffected — write those to their intended paths as stated in the instructions below.
25
+
26
+ ---
@@ -1,117 +1,117 @@
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. Page/Routing Patterns
10
- - Client-side routing (React Router, TanStack Router, custom)
11
- - Route definition approach (file-based, config-based, lazy loading)
12
- - Layout structure (nested layouts, outlet, wrapper components)
13
- - Dynamic routes and route parameters
14
- - Route guards and authentication redirects
15
- - Error/404 handling
16
-
17
- 2. Component Patterns
18
- - Component structure (functional, forwardRef, memo)
19
- - Props type definition (interface vs type, Generic usage)
20
- - State management (useState, useReducer, external libraries)
21
- - Styling approach and exact import paths (e.g., `import styles from './index.module.scss'`, `import { cn } from '@/lib/utils'`)
22
- - Styling utility functions: record the EXACT import path used in source code
23
- - UI library and exact package names (e.g., `@mui/material`, `antd`, `@shadcn/ui`)
24
- - Component classification (UI, Feature, Layout, Page)
25
- - Component entry file pattern: is the main file `index.tsx` or `ComponentName.tsx`? Record exactly.
26
- - Directory structure pattern: record exact convention
27
- - export pattern: default export vs named export in component files
28
- - Reuse patterns (composition, compound components, render props)
29
- - Accessibility (ARIA, semantic HTML, keyboard navigation)
30
-
31
- 3. Data Fetching Patterns
32
- - Client-side data fetching (TanStack Query, SWR, useEffect, axios)
33
- - API client configuration (base URL, interceptors, error handling)
34
- - Request/response typing
35
- - Caching strategy (query keys, stale time, refetch)
36
- - Error/loading state handling
37
- - Optimistic updates
38
- - Pagination/infinite scroll patterns
39
-
40
- 4. State Management Patterns
41
- - Global state (Zustand, Redux Toolkit, Jotai, Recoil, Context)
42
- - Server state (TanStack Query, SWR)
43
- - URL state (searchParams, useNavigate)
44
- - Form state (React Hook Form, Formik)
45
- - Local component state patterns
46
-
47
- 5. Configuration/Environment Patterns
48
- - Environment variable management (VITE_ prefix convention, .env separation)
49
- - vite.config settings (proxy, aliases, plugins)
50
- - Build optimization (chunk splitting, dynamic imports)
51
- - Path aliases (@/, src/)
52
-
53
- 6. Logging/Monitoring Patterns
54
- - Client error tracking (Sentry, DataDog RUM)
55
- - Performance monitoring
56
- - Analytics tools (Google Analytics, PostHog, Mixpanel)
57
-
58
- 7. Testing Patterns
59
- - Test framework (Vitest, Jest, Playwright, Cypress)
60
- - Component testing (React Testing Library, Storybook)
61
- - E2E testing strategy
62
- - Mocking strategy (MSW, vi.mock)
63
- - Test naming conventions
64
-
65
- 8. Domain-Specific Patterns
66
- - Authentication/authorization (session, token, OAuth)
67
- - Internationalization (i18next, react-intl)
68
- - File upload patterns
69
- - Real-time features (WebSocket, SSE)
70
- - API versioning strategy
71
-
72
- 9. Anti-patterns / Inconsistencies
73
- - Patterns inconsistent with other domains
74
- - Performance issues (unnecessary re-renders, bundle size)
75
- - Type safety issues
76
- - Accessibility issues
77
- - Security issues (XSS, CSRF)
78
-
79
- Do not create or modify source files. Analysis only.
80
- Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
81
-
82
- {
83
- "analyzedAt": "ISO timestamp",
84
- "passNum": {{PASS_NUM}},
85
- "domains": ["auth", "dashboard", "settings", "shared"],
86
- "analysisPerDomain": {
87
- "dashboard": {
88
- "representativeFiles": {
89
- "page": "src/pages/dashboard/index.tsx",
90
- "component": "src/components/dashboard/StatsCard.tsx",
91
- "hook": "src/hooks/useDashboardData.ts",
92
- "api": "src/api/dashboard.ts"
93
- },
94
- "patterns": {
95
- "page": { ... },
96
- "component": {
97
- "entryFilePattern": "index.tsx or ComponentName.tsx",
98
- "exportPattern": "default export or named export",
99
- "stylingImport": "exact import statement used for styling utility",
100
- "uiLibraryImport": "exact import statement for UI components",
101
- ...
102
- },
103
- "dataFetching": { ... },
104
- "stateManagement": { ... },
105
- "config": { ... },
106
- "logging": { ... },
107
- "testing": { ... }
108
- },
109
- "specialPatterns": [],
110
- "antiPatterns": []
111
- }
112
- },
113
- "crossDomainCommon": {
114
- "description": "Patterns commonly used across domains in this group",
115
- "patterns": []
116
- }
117
- }
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. Page/Routing Patterns
10
+ - Client-side routing (React Router, TanStack Router, custom)
11
+ - Route definition approach (file-based, config-based, lazy loading)
12
+ - Layout structure (nested layouts, outlet, wrapper components)
13
+ - Dynamic routes and route parameters
14
+ - Route guards and authentication redirects
15
+ - Error/404 handling
16
+
17
+ 2. Component Patterns
18
+ - Component structure (functional, forwardRef, memo)
19
+ - Props type definition (interface vs type, Generic usage)
20
+ - State management (useState, useReducer, external libraries)
21
+ - Styling approach and exact import paths (e.g., `import styles from './index.module.scss'`, `import { cn } from '@/lib/utils'`)
22
+ - Styling utility functions: record the EXACT import path used in source code
23
+ - UI library and exact package names (e.g., `@mui/material`, `antd`, `@shadcn/ui`)
24
+ - Component classification (UI, Feature, Layout, Page)
25
+ - Component entry file pattern: is the main file `index.tsx` or `ComponentName.tsx`? Record exactly.
26
+ - Directory structure pattern: record exact convention
27
+ - export pattern: default export vs named export in component files
28
+ - Reuse patterns (composition, compound components, render props)
29
+ - Accessibility (ARIA, semantic HTML, keyboard navigation)
30
+
31
+ 3. Data Fetching Patterns
32
+ - Client-side data fetching (TanStack Query, SWR, useEffect, axios)
33
+ - API client configuration (base URL, interceptors, error handling)
34
+ - Request/response typing
35
+ - Caching strategy (query keys, stale time, refetch)
36
+ - Error/loading state handling
37
+ - Optimistic updates
38
+ - Pagination/infinite scroll patterns
39
+
40
+ 4. State Management Patterns
41
+ - Global state (Zustand, Redux Toolkit, Jotai, Recoil, Context)
42
+ - Server state (TanStack Query, SWR)
43
+ - URL state (searchParams, useNavigate)
44
+ - Form state (React Hook Form, Formik)
45
+ - Local component state patterns
46
+
47
+ 5. Configuration/Environment Patterns
48
+ - Environment variable management (VITE_ prefix convention, .env separation)
49
+ - vite.config settings (proxy, aliases, plugins)
50
+ - Build optimization (chunk splitting, dynamic imports)
51
+ - Path aliases (@/, src/)
52
+
53
+ 6. Logging/Monitoring Patterns
54
+ - Client error tracking (Sentry, DataDog RUM)
55
+ - Performance monitoring
56
+ - Analytics tools (Google Analytics, PostHog, Mixpanel)
57
+
58
+ 7. Testing Patterns
59
+ - Test framework (Vitest, Jest, Playwright, Cypress)
60
+ - Component testing (React Testing Library, Storybook)
61
+ - E2E testing strategy
62
+ - Mocking strategy (MSW, vi.mock)
63
+ - Test naming conventions
64
+
65
+ 8. Domain-Specific Patterns
66
+ - Authentication/authorization (session, token, OAuth)
67
+ - Internationalization (i18next, react-intl)
68
+ - File upload patterns
69
+ - Real-time features (WebSocket, SSE)
70
+ - API versioning strategy
71
+
72
+ 9. Anti-patterns / Inconsistencies
73
+ - Patterns inconsistent with other domains
74
+ - Performance issues (unnecessary re-renders, bundle size)
75
+ - Type safety issues
76
+ - Accessibility issues
77
+ - Security issues (XSS, CSRF)
78
+
79
+ Do not create or modify source files. Analysis only.
80
+ Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
81
+
82
+ {
83
+ "analyzedAt": "ISO timestamp",
84
+ "passNum": {{PASS_NUM}},
85
+ "domains": ["auth", "dashboard", "settings", "shared"],
86
+ "analysisPerDomain": {
87
+ "dashboard": {
88
+ "representativeFiles": {
89
+ "page": "src/pages/dashboard/index.tsx",
90
+ "component": "src/components/dashboard/StatsCard.tsx",
91
+ "hook": "src/hooks/useDashboardData.ts",
92
+ "api": "src/api/dashboard.ts"
93
+ },
94
+ "patterns": {
95
+ "page": { ... },
96
+ "component": {
97
+ "entryFilePattern": "index.tsx or ComponentName.tsx",
98
+ "exportPattern": "default export or named export",
99
+ "stylingImport": "exact import statement used for styling utility",
100
+ "uiLibraryImport": "exact import statement for UI components",
101
+ ...
102
+ },
103
+ "dataFetching": { ... },
104
+ "stateManagement": { ... },
105
+ "config": { ... },
106
+ "logging": { ... },
107
+ "testing": { ... }
108
+ },
109
+ "specialPatterns": [],
110
+ "antiPatterns": []
111
+ }
112
+ },
113
+ "crossDomainCommon": {
114
+ "description": "Patterns commonly used across domains in this group",
115
+ "patterns": []
116
+ }
117
+ }
@@ -1,78 +1,78 @@
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
- - Page/routing structure (React Router / TanStack Router / custom)
8
- - Component writing conventions (functional, Props types, styling)
9
- - Data fetching strategy (TanStack Query, SWR, axios patterns)
10
- - State management approach
11
- - Error/loading handling patterns
12
- - Route guard/protection 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
- - Auth: which domain
19
- - Real-time features: which domain
20
- - File upload: which domain
21
- - i18n: which domain
22
-
23
- 4. Anti-pattern Summary
24
- - Consolidate all inconsistencies found across domains
25
- - Classify by severity (CRITICAL / HIGH / MEDIUM / LOW)
26
-
27
- 5. Naming Conventions Summary
28
- - File/directory naming (kebab-case, PascalCase)
29
- - Component entry file pattern (index.tsx vs ComponentName.tsx — pick ONE that the project actually uses)
30
- - Component export pattern (default export vs named export)
31
- - Hook naming (use* prefix)
32
- - API function patterns
33
-
34
- 6. Shared Types/Components List
35
- - Common UI components with EXACT import paths
36
- - Shared hooks with exact import paths
37
- - Utility functions with EXACT import paths
38
- - Path aliases used in the project (e.g., `@/` -> `src/`)
39
- - Environment variable types
40
- - Constants/Enum management
41
-
42
- 7. Security/Authentication Patterns
43
- - Authentication approach (JWT, session, OAuth)
44
- - Route protection strategy
45
- - CSRF/XSS prevention
46
- - Environment variable management (VITE_ convention)
47
-
48
- 8. Database Patterns
49
- - API endpoint conventions
50
- - Request/response format
51
- - Error response handling
52
-
53
- 9. Testing Strategy Summary
54
- - Test coverage level
55
- - Test classification system (unit/component/E2E)
56
- - Mocking strategy (MSW, vi.mock)
57
- - Storybook usage
58
- - Test naming conventions
59
-
60
- 10. Logging/Monitoring Strategy
61
- - Error tracking approach (Sentry, DataDog)
62
- - Analytics tools
63
- - Performance monitoring
64
-
65
- 11. Performance Patterns
66
- - Code splitting strategy (lazy, Suspense)
67
- - Bundle optimization (chunk splitting, tree shaking)
68
- - Image optimization
69
- - Caching strategy
70
-
71
- 12. Code Quality Tools
72
- - Lint/Format tools (ESLint, Prettier, Biome)
73
- - Pre-commit hooks (husky, lint-staged)
74
- - TypeScript strict mode
75
- - CI integration status
76
-
77
- Do not generate code. Merge only.
78
- 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
+ - Page/routing structure (React Router / TanStack Router / custom)
8
+ - Component writing conventions (functional, Props types, styling)
9
+ - Data fetching strategy (TanStack Query, SWR, axios patterns)
10
+ - State management approach
11
+ - Error/loading handling patterns
12
+ - Route guard/protection 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
+ - Auth: which domain
19
+ - Real-time features: which domain
20
+ - File upload: which domain
21
+ - i18n: which domain
22
+
23
+ 4. Anti-pattern Summary
24
+ - Consolidate all inconsistencies found across domains
25
+ - Classify by severity (CRITICAL / HIGH / MEDIUM / LOW)
26
+
27
+ 5. Naming Conventions Summary
28
+ - File/directory naming (kebab-case, PascalCase)
29
+ - Component entry file pattern (index.tsx vs ComponentName.tsx — pick ONE that the project actually uses)
30
+ - Component export pattern (default export vs named export)
31
+ - Hook naming (use* prefix)
32
+ - API function patterns
33
+
34
+ 6. Shared Types/Components List
35
+ - Common UI components with EXACT import paths
36
+ - Shared hooks with exact import paths
37
+ - Utility functions with EXACT import paths
38
+ - Path aliases used in the project (e.g., `@/` -> `src/`)
39
+ - Environment variable types
40
+ - Constants/Enum management
41
+
42
+ 7. Security/Authentication Patterns
43
+ - Authentication approach (JWT, session, OAuth)
44
+ - Route protection strategy
45
+ - CSRF/XSS prevention
46
+ - Environment variable management (VITE_ convention)
47
+
48
+ 8. Database Patterns
49
+ - API endpoint conventions
50
+ - Request/response format
51
+ - Error response handling
52
+
53
+ 9. Testing Strategy Summary
54
+ - Test coverage level
55
+ - Test classification system (unit/component/E2E)
56
+ - Mocking strategy (MSW, vi.mock)
57
+ - Storybook usage
58
+ - Test naming conventions
59
+
60
+ 10. Logging/Monitoring Strategy
61
+ - Error tracking approach (Sentry, DataDog)
62
+ - Analytics tools
63
+ - Performance monitoring
64
+
65
+ 11. Performance Patterns
66
+ - Code splitting strategy (lazy, Suspense)
67
+ - Bundle optimization (chunk splitting, tree shaking)
68
+ - Image optimization
69
+ - Caching strategy
70
+
71
+ 12. Code Quality Tools
72
+ - Lint/Format tools (ESLint, Prettier, Biome)
73
+ - Pre-commit hooks (husky, lint-staged)
74
+ - TypeScript strict mode
75
+ - CI integration status
76
+
77
+ Do not generate code. Merge only.
78
+ Save results to claudeos-core/generated/pass2-merged.json.