claudeos-core 1.2.3 → 1.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.
Potentially problematic release.
This version of claudeos-core might be problematic. Click here for more details.
- package/CHANGELOG.md +66 -1
- package/README.de.md +41 -6
- package/README.es.md +42 -6
- package/README.fr.md +42 -6
- package/README.hi.md +42 -6
- package/README.ja.md +43 -6
- package/README.ko.md +42 -6
- package/README.md +53 -11
- package/README.ru.md +42 -6
- package/README.vi.md +42 -6
- package/README.zh-CN.md +42 -6
- package/bin/cli.js +171 -36
- package/bootstrap.sh +72 -23
- package/content-validator/index.js +9 -4
- package/health-checker/index.js +4 -3
- package/lib/safe-fs.js +110 -0
- package/manifest-generator/index.js +16 -20
- package/package.json +4 -2
- package/pass-json-validator/index.js +3 -5
- package/pass-prompts/templates/java-spring/pass1.md +3 -0
- package/pass-prompts/templates/java-spring/pass2.md +3 -3
- package/pass-prompts/templates/java-spring/pass3.md +17 -0
- package/pass-prompts/templates/kotlin-spring/pass1.md +3 -0
- package/pass-prompts/templates/kotlin-spring/pass2.md +5 -5
- package/pass-prompts/templates/kotlin-spring/pass3.md +17 -0
- package/pass-prompts/templates/node-express/pass1.md +3 -0
- package/pass-prompts/templates/node-express/pass2.md +4 -1
- package/pass-prompts/templates/node-express/pass3.md +20 -1
- package/pass-prompts/templates/node-nextjs/pass1.md +13 -3
- package/pass-prompts/templates/node-nextjs/pass2.md +6 -4
- package/pass-prompts/templates/node-nextjs/pass3.md +20 -1
- package/pass-prompts/templates/python-django/pass1.md +3 -1
- package/pass-prompts/templates/python-django/pass2.md +4 -4
- package/pass-prompts/templates/python-django/pass3.md +18 -0
- package/pass-prompts/templates/python-fastapi/pass1.md +3 -0
- package/pass-prompts/templates/python-fastapi/pass2.md +4 -4
- package/pass-prompts/templates/python-fastapi/pass3.md +18 -0
- package/plan-installer/domain-grouper.js +74 -0
- package/plan-installer/index.js +43 -1303
- package/plan-installer/prompt-generator.js +99 -0
- package/plan-installer/stack-detector.js +326 -0
- package/plan-installer/structure-scanner.js +783 -0
- package/plan-validator/index.js +84 -20
- package/sync-checker/index.js +7 -3
|
@@ -4,11 +4,30 @@ generate all ClaudeOS-Core files based on the analysis results.
|
|
|
4
4
|
|
|
5
5
|
Do not read the original source code again. Reference only the analysis results.
|
|
6
6
|
|
|
7
|
+
CRITICAL — Package Manager Consistency:
|
|
8
|
+
Check `stack.packageManager` in project-analysis.json (e.g., "pnpm", "yarn", "npm").
|
|
9
|
+
ALL generated files MUST use ONLY that detected package manager's commands.
|
|
10
|
+
For example, if packageManager is "pnpm": use `pnpm run build`, `pnpm run dev`, `pnpm install`, etc.
|
|
11
|
+
NEVER mix npm/yarn/pnpm commands. Also check `scripts` field in the project's package.json
|
|
12
|
+
for actual script names (e.g., "eslint" not "lint", "typecheck" not "tsc --noEmit").
|
|
13
|
+
|
|
14
|
+
CRITICAL — Cross-file Consistency:
|
|
15
|
+
Rules (.claude/rules/) and Standards (claudeos-core/standard/) MUST NOT contradict each other.
|
|
16
|
+
If a standard defines a specific pattern (e.g., import path, file naming, API usage),
|
|
17
|
+
the corresponding rule MUST use the same pattern. Before generating each rule file,
|
|
18
|
+
verify it is consistent with the related standard file.
|
|
19
|
+
|
|
20
|
+
CRITICAL — CLAUDE.md Reference Table Completeness:
|
|
21
|
+
The reference table in CLAUDE.md MUST list ALL generated standard files, not just core.
|
|
22
|
+
Include all frontend-ui, backend-api, security-db, infra, and verification standards.
|
|
23
|
+
Alternatively, add a note directing readers to .claude/rules/00.core/00.standard-reference.md
|
|
24
|
+
for the complete list.
|
|
25
|
+
|
|
7
26
|
Generation targets:
|
|
8
27
|
|
|
9
28
|
1. CLAUDE.md (project root)
|
|
10
29
|
- Role definition (based on detected stack)
|
|
11
|
-
- Build & Run Commands (npm/yarn/pnpm)
|
|
30
|
+
- Build & Run Commands (use ONLY the detected packageManager — never hardcode npm/yarn/pnpm)
|
|
12
31
|
- Core architecture diagram
|
|
13
32
|
- DB table/collection naming
|
|
14
33
|
- Standard/Skills/Guide reference table
|
|
@@ -19,9 +19,13 @@ Analysis items (per domain):
|
|
|
19
19
|
- Component structure (functional, forwardRef, memo)
|
|
20
20
|
- Props type definition (interface vs type, Generic usage)
|
|
21
21
|
- State management (useState, useReducer, external libraries)
|
|
22
|
-
- Styling (
|
|
23
|
-
-
|
|
22
|
+
- Styling approach and exact import paths (e.g., `import styles from './index.module.scss'`, `import { cn } from '@/lib/utils'`)
|
|
23
|
+
- Styling utility functions: record the EXACT import path used in source code (e.g., `from '@lfos-poc-ui/utils'` NOT `from '@app/shared/lib/classNames'`)
|
|
24
|
+
- UI library and exact package names (e.g., `@lfos-poc-ui/ui`, `@shadcn/ui`, `@mui/material`)
|
|
24
25
|
- Component classification (UI, Feature, Layout, Page)
|
|
26
|
+
- Component entry file pattern: is the main file `index.tsx` or `ComponentName.tsx`? Record exactly which pattern the project uses.
|
|
27
|
+
- Directory structure pattern: record exact convention (e.g., `ComponentName/index.tsx` vs `ComponentName/ComponentName.tsx`)
|
|
28
|
+
- export pattern: default export vs named export in component files
|
|
25
29
|
- Reuse patterns (composition, compound components, render props)
|
|
26
30
|
- Accessibility (ARIA, semantic HTML, keyboard navigation)
|
|
27
31
|
|
|
@@ -97,7 +101,13 @@ Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following
|
|
|
97
101
|
},
|
|
98
102
|
"patterns": {
|
|
99
103
|
"page": { ... },
|
|
100
|
-
"component": {
|
|
104
|
+
"component": {
|
|
105
|
+
"entryFilePattern": "index.tsx or ComponentName.tsx",
|
|
106
|
+
"exportPattern": "default export or named export",
|
|
107
|
+
"stylingImport": "exact import statement used for styling utility",
|
|
108
|
+
"uiLibraryImport": "exact import statement for UI components",
|
|
109
|
+
...
|
|
110
|
+
},
|
|
101
111
|
"dataFetching": { ... },
|
|
102
112
|
"stateManagement": { ... },
|
|
103
113
|
"config": { ... },
|
|
@@ -27,14 +27,16 @@ Merge items:
|
|
|
27
27
|
|
|
28
28
|
5. Naming Conventions Summary
|
|
29
29
|
- File/directory naming (kebab-case, PascalCase)
|
|
30
|
-
- Component
|
|
30
|
+
- Component entry file pattern (index.tsx vs ComponentName.tsx — pick ONE that the project actually uses)
|
|
31
|
+
- Component export pattern (default export vs named export)
|
|
31
32
|
- Hook naming (use* prefix)
|
|
32
33
|
- API route patterns
|
|
33
34
|
|
|
34
35
|
6. Shared Types/Components List
|
|
35
|
-
- Common UI components
|
|
36
|
-
- Shared hooks
|
|
37
|
-
- Utility functions
|
|
36
|
+
- Common UI components with EXACT import paths (e.g., `from '@lfos-poc-ui/ui'`, NOT invented paths)
|
|
37
|
+
- Shared hooks with exact import paths
|
|
38
|
+
- Utility functions with EXACT import paths (e.g., `from '@lfos-poc-ui/utils'` for classNamesWithRoot)
|
|
39
|
+
- Path aliases used in the project (e.g., `@app/` → `src/`, `@/` → `src/`)
|
|
38
40
|
- Environment variable types
|
|
39
41
|
- Constants/Enum management
|
|
40
42
|
|
|
@@ -4,11 +4,30 @@ generate all ClaudeOS-Core files based on the analysis results.
|
|
|
4
4
|
|
|
5
5
|
Do not read the original source code again. Reference only the analysis results.
|
|
6
6
|
|
|
7
|
+
CRITICAL — Package Manager Consistency:
|
|
8
|
+
Check `stack.packageManager` in project-analysis.json (e.g., "pnpm", "yarn", "npm").
|
|
9
|
+
ALL generated files MUST use ONLY that detected package manager's commands.
|
|
10
|
+
For example, if packageManager is "pnpm": use `pnpm run build`, `pnpm run dev`, `pnpm install`, etc.
|
|
11
|
+
NEVER mix npm/yarn/pnpm commands. Also check `scripts` field in the project's package.json
|
|
12
|
+
for actual script names (e.g., "eslint" not "lint", "typecheck" not "tsc --noEmit").
|
|
13
|
+
|
|
14
|
+
CRITICAL — Cross-file Consistency:
|
|
15
|
+
Rules (.claude/rules/) and Standards (claudeos-core/standard/) MUST NOT contradict each other.
|
|
16
|
+
If a standard defines a specific pattern (e.g., import path, file naming, API usage),
|
|
17
|
+
the corresponding rule MUST use the same pattern. Before generating each rule file,
|
|
18
|
+
verify it is consistent with the related standard file.
|
|
19
|
+
|
|
20
|
+
CRITICAL — CLAUDE.md Reference Table Completeness:
|
|
21
|
+
The reference table in CLAUDE.md MUST list ALL generated standard files, not just core.
|
|
22
|
+
Include all frontend-ui, backend-api, security-db, infra, and verification standards.
|
|
23
|
+
Alternatively, add a note directing readers to .claude/rules/00.core/00.standard-reference.md
|
|
24
|
+
for the complete list.
|
|
25
|
+
|
|
7
26
|
Generation targets:
|
|
8
27
|
|
|
9
28
|
1. CLAUDE.md (project root)
|
|
10
29
|
- Role definition (based on detected stack)
|
|
11
|
-
- Build & Run Commands (npm/yarn/pnpm
|
|
30
|
+
- Build & Run Commands (use ONLY the detected packageManager — never hardcode npm/yarn/pnpm)
|
|
12
31
|
- Core architecture diagram
|
|
13
32
|
- Directory structure description
|
|
14
33
|
- Standard/Skills/Guide reference table
|
|
@@ -11,6 +11,7 @@ Analysis items (per domain):
|
|
|
11
11
|
- URL configuration (urlpatterns, Router registration, namespace)
|
|
12
12
|
- Parameter handling (request.data, serializer, query_params, kwargs)
|
|
13
13
|
- Response format (Response, JsonResponse, TemplateResponse)
|
|
14
|
+
- If a custom response wrapper/mixin exists, record its EXACT class name, EXACT method signatures, and EXACT import path. Do NOT guess — read the actual source.
|
|
14
15
|
- Error handling (exception_handler, DRF exceptions, custom exceptions)
|
|
15
16
|
- Authentication (permission_classes, authentication_classes)
|
|
16
17
|
- API documentation (drf-spectacular, drf-yasg, @extend_schema)
|
|
@@ -38,8 +39,9 @@ Analysis items (per domain):
|
|
|
38
39
|
- Architecture (Fat Model vs Service Layer vs Domain Service)
|
|
39
40
|
- Transactions (transaction.atomic, select_for_update, savepoint)
|
|
40
41
|
- Celery tasks (shared_task, retry, priority)
|
|
41
|
-
- Utility/helper functions
|
|
42
|
+
- Utility/helper functions with EXACT import paths (e.g., `from apps.common.utils import format_date`)
|
|
42
43
|
- Event handling (django-signals, custom event bus)
|
|
44
|
+
- Import paths: record EXACT import conventions used in the project (relative vs absolute, app prefix)
|
|
43
45
|
|
|
44
46
|
5. Configuration/Environment Patterns
|
|
45
47
|
- Settings separation (base/local/staging/production)
|
|
@@ -34,10 +34,10 @@ Merge items:
|
|
|
34
34
|
- Test file structure
|
|
35
35
|
|
|
36
36
|
6. Common Models/Utilities List
|
|
37
|
-
- Abstract model fields
|
|
38
|
-
- Shared Manager/QuerySet
|
|
39
|
-
- Utility functions
|
|
40
|
-
- Constants/Enum management
|
|
37
|
+
- Abstract model fields with EXACT import paths (e.g., `from apps.common.models import BaseModel`)
|
|
38
|
+
- Shared Manager/QuerySet with EXACT module locations
|
|
39
|
+
- Utility functions with EXACT import paths
|
|
40
|
+
- Constants/Enum management with EXACT locations
|
|
41
41
|
|
|
42
42
|
7. Security/Authentication Patterns
|
|
43
43
|
- Authentication method (JWT, Session, Token, OAuth2)
|
|
@@ -4,6 +4,24 @@ generate all ClaudeOS-Core files based on the analysis results.
|
|
|
4
4
|
|
|
5
5
|
Do not read the original source code again. Reference only the analysis results.
|
|
6
6
|
|
|
7
|
+
CRITICAL — Package Manager Consistency:
|
|
8
|
+
Check `stack.packageManager` in project-analysis.json (e.g., "poetry", "pipenv", "pip").
|
|
9
|
+
ALL generated files MUST use ONLY that detected package manager's commands.
|
|
10
|
+
For example, if packageManager is "poetry": use `poetry run`, `poetry add`, etc.
|
|
11
|
+
NEVER mix pip/poetry/pipenv commands. Also check actual script names in pyproject.toml or Makefile.
|
|
12
|
+
|
|
13
|
+
CRITICAL — Cross-file Consistency:
|
|
14
|
+
Rules (.claude/rules/) and Standards (claudeos-core/standard/) MUST NOT contradict each other.
|
|
15
|
+
If a standard defines a specific pattern (e.g., import path, file naming, API usage),
|
|
16
|
+
the corresponding rule MUST use the same pattern. Before generating each rule file,
|
|
17
|
+
verify it is consistent with the related standard file.
|
|
18
|
+
|
|
19
|
+
CRITICAL — CLAUDE.md Reference Table Completeness:
|
|
20
|
+
The reference table in CLAUDE.md MUST list ALL generated standard files, not just core.
|
|
21
|
+
Include all backend-api, security-db, infra, and verification standards.
|
|
22
|
+
Alternatively, add a note directing readers to .claude/rules/00.core/00.standard-reference.md
|
|
23
|
+
for the complete list.
|
|
24
|
+
|
|
7
25
|
Generation targets:
|
|
8
26
|
|
|
9
27
|
1. CLAUDE.md (project root)
|
|
@@ -11,6 +11,7 @@ Analysis items (per domain):
|
|
|
11
11
|
- Path decorators (@router.get, @router.post, @router.put, @router.delete)
|
|
12
12
|
- Parameter handling (Path, Query, Body, Header, Cookie, Depends)
|
|
13
13
|
- Response model (response_model, status_code, response_class)
|
|
14
|
+
- If a custom response wrapper/schema exists, record its EXACT class name, EXACT method signatures, and EXACT import path. Do NOT guess — read the actual source.
|
|
14
15
|
- Error handling (HTTPException, exception_handler, custom exceptions)
|
|
15
16
|
- Authentication (Depends-based JWT/OAuth2, Security schemes)
|
|
16
17
|
- API documentation (auto OpenAPI, tags, summary, description, deprecated)
|
|
@@ -40,6 +41,8 @@ Analysis items (per domain):
|
|
|
40
41
|
- Dependency hierarchy (nested Depends)
|
|
41
42
|
- Custom dependency functions/classes
|
|
42
43
|
- Lifecycle events (lifespan, startup/shutdown)
|
|
44
|
+
- Import paths: record EXACT import conventions (e.g., `from app.core.deps import get_db`, not invented paths)
|
|
45
|
+
- Utility function locations: record EXACT module paths for shared utilities
|
|
43
46
|
- Dependency overrides (for testing)
|
|
44
47
|
|
|
45
48
|
5. Configuration/Environment Patterns
|
|
@@ -33,10 +33,10 @@ Merge items:
|
|
|
33
33
|
- File structure conventions
|
|
34
34
|
|
|
35
35
|
6. Common Models/Utilities List
|
|
36
|
-
- Base model fields
|
|
37
|
-
- Shared dependency functions
|
|
38
|
-
- Utility functions
|
|
39
|
-
- Constants/Enum management
|
|
36
|
+
- Base model fields with EXACT import paths (e.g., `from app.core.base import BaseModel`)
|
|
37
|
+
- Shared dependency functions with EXACT module paths
|
|
38
|
+
- Utility functions with EXACT import paths
|
|
39
|
+
- Constants/Enum management with EXACT locations
|
|
40
40
|
|
|
41
41
|
7. Security/Authentication Patterns
|
|
42
42
|
- Authentication method (JWT Bearer, OAuth2PasswordBearer)
|
|
@@ -4,6 +4,24 @@ generate all ClaudeOS-Core files based on the analysis results.
|
|
|
4
4
|
|
|
5
5
|
Do not read the original source code again. Reference only the analysis results.
|
|
6
6
|
|
|
7
|
+
CRITICAL — Package Manager Consistency:
|
|
8
|
+
Check `stack.packageManager` in project-analysis.json (e.g., "poetry", "pipenv", "pip").
|
|
9
|
+
ALL generated files MUST use ONLY that detected package manager's commands.
|
|
10
|
+
For example, if packageManager is "poetry": use `poetry run`, `poetry add`, etc.
|
|
11
|
+
NEVER mix pip/poetry/pipenv commands. Also check actual script names in pyproject.toml or Makefile.
|
|
12
|
+
|
|
13
|
+
CRITICAL — Cross-file Consistency:
|
|
14
|
+
Rules (.claude/rules/) and Standards (claudeos-core/standard/) MUST NOT contradict each other.
|
|
15
|
+
If a standard defines a specific pattern (e.g., import path, file naming, API usage),
|
|
16
|
+
the corresponding rule MUST use the same pattern. Before generating each rule file,
|
|
17
|
+
verify it is consistent with the related standard file.
|
|
18
|
+
|
|
19
|
+
CRITICAL — CLAUDE.md Reference Table Completeness:
|
|
20
|
+
The reference table in CLAUDE.md MUST list ALL generated standard files, not just core.
|
|
21
|
+
Include all backend-api, security-db, infra, and verification standards.
|
|
22
|
+
Alternatively, add a note directing readers to .claude/rules/00.core/00.standard-reference.md
|
|
23
|
+
for the complete list.
|
|
24
|
+
|
|
7
25
|
Generation targets:
|
|
8
26
|
|
|
9
27
|
1. CLAUDE.md (project root)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ClaudeOS-Core — Domain Grouper
|
|
3
|
+
*
|
|
4
|
+
* Splits domains into analysis groups, determines active domains,
|
|
5
|
+
* and selects appropriate templates based on detected stack.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
function splitDomainGroups(domains, type, template) {
|
|
9
|
+
const MAX_FILES_PER_GROUP = 40;
|
|
10
|
+
const MAX_DOMAINS_PER_GROUP = 4;
|
|
11
|
+
const groups = [];
|
|
12
|
+
let current = [];
|
|
13
|
+
let fileCount = 0;
|
|
14
|
+
|
|
15
|
+
for (const d of domains) {
|
|
16
|
+
// Flush current group before adding if it would exceed limits
|
|
17
|
+
if (current.length > 0 && (fileCount + d.totalFiles >= MAX_FILES_PER_GROUP || current.length >= MAX_DOMAINS_PER_GROUP)) {
|
|
18
|
+
groups.push({ type, template, domains: [...current], estimatedFiles: fileCount });
|
|
19
|
+
current = [];
|
|
20
|
+
fileCount = 0;
|
|
21
|
+
}
|
|
22
|
+
current.push(d.name);
|
|
23
|
+
fileCount += d.totalFiles;
|
|
24
|
+
}
|
|
25
|
+
if (current.length > 0) {
|
|
26
|
+
groups.push({ type, template, domains: [...current], estimatedFiles: fileCount });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return groups;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ─── Determine active domains ───────────────────────────────────
|
|
33
|
+
function determineActiveDomains(stack) {
|
|
34
|
+
const isBackend = !!stack.framework;
|
|
35
|
+
return {
|
|
36
|
+
"00.core": true,
|
|
37
|
+
"10.backend": !!isBackend,
|
|
38
|
+
"20.frontend": !!stack.frontend,
|
|
39
|
+
"30.security-db": !!(stack.database || stack.framework),
|
|
40
|
+
"40.infra": true,
|
|
41
|
+
"50.verification": true,
|
|
42
|
+
"90.optional": true,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// ─── Template selection (multi-stack) ──────────────────────────────
|
|
47
|
+
function selectTemplates(stack) {
|
|
48
|
+
const templates = { backend: null, frontend: null };
|
|
49
|
+
|
|
50
|
+
// Backend template
|
|
51
|
+
if (stack.language === "kotlin") templates.backend = "kotlin-spring";
|
|
52
|
+
else if (stack.language === "java") templates.backend = "java-spring";
|
|
53
|
+
else if (stack.framework === "express" || stack.framework === "nestjs") templates.backend = "node-express";
|
|
54
|
+
else if (stack.framework === "django") templates.backend = "python-django";
|
|
55
|
+
else if (stack.framework === "fastapi" || stack.framework === "flask") templates.backend = "python-fastapi";
|
|
56
|
+
else if (stack.language === "typescript" || stack.language === "javascript") templates.backend = "node-express";
|
|
57
|
+
else if (stack.language === "python") templates.backend = "python-fastapi";
|
|
58
|
+
|
|
59
|
+
// Frontend template
|
|
60
|
+
if (stack.frontend === "nextjs" || stack.frontend === "react" || stack.frontend === "vue") {
|
|
61
|
+
templates.frontend = "node-nextjs";
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Pure frontend project with no backend
|
|
65
|
+
if (!templates.backend && templates.frontend) {
|
|
66
|
+
templates.backend = null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return templates;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// ─── Dynamic prompt generation (multi-stack) ──────────────────────
|
|
73
|
+
|
|
74
|
+
module.exports = { splitDomainGroups, determineActiveDomains, selectTemplates };
|