claudeos-core 1.0.7 → 1.2.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.

Files changed (44) hide show
  1. package/CHANGELOG.md +84 -1
  2. package/CONTRIBUTING.md +15 -4
  3. package/README.de.md +187 -11
  4. package/README.es.md +187 -11
  5. package/README.fr.md +187 -11
  6. package/README.hi.md +187 -11
  7. package/README.ja.md +186 -10
  8. package/README.ko.md +331 -364
  9. package/README.md +200 -11
  10. package/README.ru.md +187 -11
  11. package/README.vi.md +188 -12
  12. package/README.zh-CN.md +186 -10
  13. package/bin/cli.js +183 -61
  14. package/bootstrap.sh +128 -21
  15. package/content-validator/index.js +131 -60
  16. package/health-checker/index.js +29 -23
  17. package/import-linter/index.js +14 -8
  18. package/manifest-generator/index.js +26 -20
  19. package/package.json +84 -75
  20. package/pass-json-validator/index.js +92 -70
  21. package/pass-prompts/templates/common/header.md +4 -4
  22. package/pass-prompts/templates/common/lang-instructions.json +27 -0
  23. package/pass-prompts/templates/common/pass3-footer.md +2 -3
  24. package/pass-prompts/templates/java-spring/pass1.md +84 -81
  25. package/pass-prompts/templates/java-spring/pass2.md +66 -66
  26. package/pass-prompts/templates/java-spring/pass3.md +60 -60
  27. package/pass-prompts/templates/kotlin-spring/pass1.md +172 -0
  28. package/pass-prompts/templates/kotlin-spring/pass2.md +109 -0
  29. package/pass-prompts/templates/kotlin-spring/pass3.md +98 -0
  30. package/pass-prompts/templates/node-express/pass1.md +73 -73
  31. package/pass-prompts/templates/node-express/pass2.md +66 -66
  32. package/pass-prompts/templates/node-express/pass3.md +53 -53
  33. package/pass-prompts/templates/node-nextjs/pass1.md +68 -68
  34. package/pass-prompts/templates/node-nextjs/pass2.md +61 -61
  35. package/pass-prompts/templates/node-nextjs/pass3.md +48 -48
  36. package/pass-prompts/templates/python-django/pass1.md +78 -78
  37. package/pass-prompts/templates/python-django/pass2.md +69 -69
  38. package/pass-prompts/templates/python-django/pass3.md +45 -45
  39. package/pass-prompts/templates/python-fastapi/pass1.md +76 -76
  40. package/pass-prompts/templates/python-fastapi/pass2.md +67 -67
  41. package/pass-prompts/templates/python-fastapi/pass3.md +45 -45
  42. package/plan-installer/index.js +623 -97
  43. package/plan-validator/index.js +54 -23
  44. package/sync-checker/index.js +25 -14
@@ -3,16 +3,16 @@
3
3
  /**
4
4
  * ClaudeOS-Core — Health Checker
5
5
  *
6
- * 역할: 모든 검증 도구를 순서대로 실행하고 종합 결과를 출력
7
- * 실행 순서:
8
- * [0] manifest-generator ← 선행 필수: sync-map.json 등 메타데이터 생성
9
- * [1] import-linter ← @import 경로 검증
10
- * [2] plan-validator ← Plan ↔ 디스크 정합성
11
- * [3] sync-checker ← sync-map.json 기반 동기화 확인 (manifest 필요)
12
- * [4] content-validator ← 생성 파일 품질 검증
13
- * [5] pass-json-validator ← Pass 1~3 JSON 포맷 검증
6
+ * Role: Execute all verification tools sequentially and output consolidated results
7
+ * Execution order:
8
+ * [0] manifest-generator ← prerequisite: generates metadata like sync-map.json
9
+ * [1] import-linter ← @import path validation
10
+ * [2] plan-validator ← Plan ↔ disk consistency
11
+ * [3] sync-checker ← sync verification based on sync-map.json (requires manifest)
12
+ * [4] content-validator ← generated file quality validation
13
+ * [5] pass-json-validator ← Pass 1-3 JSON format validation
14
14
  *
15
- * 실행: npx claudeos-core <cmd> 또는 node claudeos-core-tools/health-checker/index.js
15
+ * Usage: npx claudeos-core <cmd> or node claudeos-core-tools/health-checker/index.js
16
16
  */
17
17
 
18
18
  const { execSync } = require("child_process");
@@ -41,30 +41,30 @@ function main() {
41
41
  console.log("║ ClaudeOS-Core — Health Checker ║");
42
42
  console.log("╚══════════════════════════════════════╝\n");
43
43
 
44
- // ─── [0] manifest-generator 선행 실행 ──────────────────
45
- // sync-checker sync-map.json을 읽으므로 반드시 먼저 실행해야 함
44
+ // ─── [0] Run manifest-generator first (prerequisite) ──────────────────
45
+ // Must run first because sync-checker reads sync-map.json
46
46
  const manifestScript = path.join(TOOLS, "manifest-generator/index.js");
47
47
  if (fs.existsSync(manifestScript)) {
48
- process.stdout.write(" ⏳ manifest-generator — 메타데이터 생성...");
48
+ process.stdout.write(" ⏳ manifest-generator — generating metadata...");
49
49
  const r = run("manifest-generator", manifestScript);
50
50
  if (r.ok) {
51
51
  console.log(" ✅");
52
52
  } else {
53
53
  console.log(" ❌");
54
- console.log(" ⚠️ manifest-generator 실패. 이후 sync-checker 결과가 부정확할 있음.");
54
+ console.log(" ⚠️ manifest-generator failed. Subsequent sync-checker results may be inaccurate.");
55
55
  }
56
56
  } else {
57
57
  console.log(" ⏭️ manifest-generator — not found");
58
58
  }
59
59
  console.log();
60
60
 
61
- // ─── [1~5] 검증 도구 순서대로 실행 ────────────────────
61
+ // ─── [1-5] Run verification tools sequentially ────────────────────
62
62
  const tools = [
63
- { name: "import-linter", script: path.join(TOOLS, "import-linter/index.js"), desc: "@import 검증" },
64
- { name: "plan-validator", script: path.join(TOOLS, "plan-validator/index.js"), desc: "Plan 정합성" },
65
- { name: "sync-checker", script: path.join(TOOLS, "sync-checker/index.js"), desc: "동기화 상태" },
66
- { name: "content-validator", script: path.join(TOOLS, "content-validator/index.js"), desc: "내용 품질" },
67
- { name: "pass-json-validator", script: path.join(TOOLS, "pass-json-validator/index.js"), desc: "JSON 포맷" },
63
+ { name: "import-linter", script: path.join(TOOLS, "import-linter/index.js"), desc: "@import validation" },
64
+ { name: "plan-validator", script: path.join(TOOLS, "plan-validator/index.js"), desc: "Plan consistency" },
65
+ { name: "sync-checker", script: path.join(TOOLS, "sync-checker/index.js"), desc: "Sync status" },
66
+ { name: "content-validator", script: path.join(TOOLS, "content-validator/index.js"), desc: "Content quality" },
67
+ { name: "pass-json-validator", script: path.join(TOOLS, "pass-json-validator/index.js"), desc: "JSON format", warnOnly: true },
68
68
  ];
69
69
 
70
70
  const results = [];
@@ -81,6 +81,9 @@ function main() {
81
81
  if (r.ok) {
82
82
  console.log(" ✅");
83
83
  results.push({ name: t.name, status: "pass" });
84
+ } else if (t.warnOnly) {
85
+ console.log(" ⚠️");
86
+ results.push({ name: t.name, status: "warn" });
84
87
  } else {
85
88
  console.log(" ❌");
86
89
  results.push({ name: t.name, status: "fail" });
@@ -88,10 +91,10 @@ function main() {
88
91
  }
89
92
  }
90
93
 
91
- // ─── 결과 요약 ──────────────────────────────────────────
94
+ // ─── Results summary ──────────────────────────────────────────
92
95
  console.log("\n ══════════════════════════════");
93
96
  results.forEach((r) => {
94
- const icon = r.status === "pass" ? "✅" : r.status === "fail" ? "❌" : "⏭️";
97
+ const icon = r.status === "pass" ? "✅" : r.status === "fail" ? "❌" : r.status === "warn" ? "⚠️" : "⏭️";
95
98
  console.log(` ${icon} ${r.name.padEnd(22)} ${r.status}`);
96
99
  });
97
100
  console.log(" ──────────────────────────────");
@@ -102,10 +105,13 @@ function main() {
102
105
  );
103
106
  console.log(" ══════════════════════════════\n");
104
107
 
105
- // ─── stale-report.json 갱신 ────────────────────────────
108
+ // ─── Update stale-report.json ────────────────────────────
106
109
  if (fs.existsSync(GEN)) {
107
110
  const rp = path.join(GEN, "stale-report.json");
108
- const ex = fs.existsSync(rp) ? JSON.parse(fs.readFileSync(rp, "utf-8")) : {};
111
+ let ex = {};
112
+ if (fs.existsSync(rp)) {
113
+ try { ex = JSON.parse(fs.readFileSync(rp, "utf-8")); } catch { ex = {}; }
114
+ }
109
115
  ex.generatedAt = new Date().toISOString();
110
116
  ex.healthCheck = { results, status: hasErr ? "fail" : "pass" };
111
117
  ex.summary = {
@@ -3,13 +3,13 @@
3
3
  /**
4
4
  * ClaudeOS-Core — Import Linter
5
5
  *
6
- * 역할: .claude/rules/, standard/, skills/, guide/ 내 @import 경로 검증
7
- * 검증 항목:
8
- * - BROKEN: 대상 파일이 존재하지 않는 @import
9
- * - DUPLICATE: 같은 파일에서 동일 경로를 중복 @import
10
- * - CIRCULAR: @import 체인이 순환하는 경우 (DFS 탐지)
6
+ * Role: Validate @import paths in .claude/rules/, standard/, skills/, guide/
7
+ * Validation items:
8
+ * - BROKEN: @import pointing to non-existent file
9
+ * - DUPLICATE: Same path imported multiple times in the same file
10
+ * - CIRCULAR: Circular @import chain detected (DFS)
11
11
  *
12
- * 실행: npx claudeos-core <cmd> 또는 node claudeos-core-tools/import-linter/index.js
12
+ * Usage: npx claudeos-core <cmd> or node claudeos-core-tools/import-linter/index.js
13
13
  */
14
14
 
15
15
  const fs = require("fs");
@@ -22,6 +22,8 @@ const SCAN = [
22
22
  "claudeos-core/standard",
23
23
  "claudeos-core/skills",
24
24
  "claudeos-core/guide",
25
+ "claudeos-core/database",
26
+ "claudeos-core/mcp-guide",
25
27
  ];
26
28
 
27
29
  function rel(p) {
@@ -31,8 +33,12 @@ function rel(p) {
31
33
  function extractImports(f) {
32
34
  const content = fs.readFileSync(f, "utf-8");
33
35
  const result = [];
36
+ let inCodeFence = false;
34
37
  content.split("\n").forEach((line, i) => {
35
- const m = line.match(/^@([^\s]+)/);
38
+ // Track code fence boundaries to skip @-lines inside code blocks
39
+ if (/^```/.test(line)) { inCodeFence = !inCodeFence; return; }
40
+ if (inCodeFence) return;
41
+ const m = line.match(/^@(\.\.?\/[^\s]+)/);
36
42
  if (m) {
37
43
  const target = path.resolve(path.dirname(f), m[1]);
38
44
  result.push({
@@ -133,7 +139,7 @@ async function main() {
133
139
  }
134
140
  }
135
141
 
136
- // 순환 참조 탐지
142
+ // Cycle detection
137
143
  for (const c of detectCycles(adj)) {
138
144
  errors.push({
139
145
  type: "CIRCULAR",
@@ -3,15 +3,15 @@
3
3
  /**
4
4
  * ClaudeOS-Core — Manifest Generator
5
5
  *
6
- * 역할: 생성된 파일들의 메타데이터 JSON 4종 + stale-report 초기화
7
- * 출력 (claudeos-core/generated/):
8
- * - rule-manifest.json : rules/standard/skills/guide 파일 목록 + frontmatter
9
- * - import-graph.json : @import 의존성 그래프 (노드 + 엣지)
10
- * - sync-map.json : plan/ <file> 블록파일 경로 매핑
11
- * - plan-manifest.json : plan/ 파일 목록 + <file> 블록
12
- * - stale-report.json : 초기화 (이후 검증 도구가 누적 기록)
6
+ * Role: Generate 4 types of metadata JSON + initialize stale-report
7
+ * Output (claudeos-core/generated/):
8
+ * - rule-manifest.json : rules/standard/skills/guide file list + frontmatter
9
+ * - import-graph.json : @import dependency graph (nodes + edges)
10
+ * - sync-map.json : plan/ <file> blockfile path mapping
11
+ * - plan-manifest.json : plan/ file list + <file> block count
12
+ * - stale-report.json : initialized (each verification tool appends results)
13
13
  *
14
- * 실행: npx claudeos-core <cmd> 또는 node claudeos-core-tools/manifest-generator/index.js
14
+ * Usage: npx claudeos-core <cmd> or node claudeos-core-tools/manifest-generator/index.js
15
15
  */
16
16
 
17
17
  const fs = require("fs");
@@ -57,15 +57,19 @@ function frontmatter(f) {
57
57
  function extractImports(f) {
58
58
  const content = fs.readFileSync(f, "utf-8");
59
59
  const result = [];
60
- let m;
61
- const re = /^@([^\s]+)/gm;
62
- while ((m = re.exec(content)) !== null) {
63
- const target = path.resolve(path.dirname(f), m[1]);
64
- result.push({
65
- raw: m[0],
66
- resolved: rel(target),
67
- exists: fs.existsSync(target),
68
- });
60
+ let inCodeFence = false;
61
+ for (const line of content.split("\n")) {
62
+ if (/^```/.test(line)) { inCodeFence = !inCodeFence; continue; }
63
+ if (inCodeFence) continue;
64
+ const m = line.match(/^@(\.\.?\/[^\s]+)/);
65
+ if (m) {
66
+ const target = path.resolve(path.dirname(f), m[1]);
67
+ result.push({
68
+ raw: m[0],
69
+ resolved: rel(target),
70
+ exists: fs.existsSync(target),
71
+ });
72
+ }
69
73
  }
70
74
  return result;
71
75
  }
@@ -136,8 +140,10 @@ async function main() {
136
140
  const gr = { generatedAt: new Date().toISOString(), nodes: [], edges: [], errors: [] };
137
141
  const ns = new Set();
138
142
 
139
- if (fs.existsSync(DIRS.rules)) {
140
- for (const f of await glob("**/*.md", { cwd: DIRS.rules, absolute: true })) {
143
+ const importScanDirs = [DIRS.rules, DIRS.standard, DIRS.skills, DIRS.guide, DIRS.database, DIRS.mcpGuide].filter(Boolean);
144
+ for (const scanDir of importScanDirs) {
145
+ if (!fs.existsSync(scanDir)) continue;
146
+ for (const f of await glob("**/*.md", { cwd: scanDir, absolute: true })) {
141
147
  const r = rel(f);
142
148
  ns.add(r);
143
149
  for (const i of extractImports(f)) {
@@ -183,7 +189,7 @@ async function main() {
183
189
  fs.writeFileSync(path.join(GEN, "plan-manifest.json"), JSON.stringify(pm, null, 2));
184
190
  console.log(` ✅ plan-manifest.json — ${pm.plans.length} plans`);
185
191
 
186
- // ─── stale-report.json 초기화 ──────────────────────────
192
+ // ─── Initialize stale-report.json ──────────────────────────
187
193
  fs.writeFileSync(
188
194
  path.join(GEN, "stale-report.json"),
189
195
  JSON.stringify({ generatedAt: new Date().toISOString(), summary: { totalIssues: 0, status: "initial" } }, null, 2)
package/package.json CHANGED
@@ -1,75 +1,84 @@
1
- {
2
- "name": "claudeos-core",
3
- "version": "1.0.7",
4
- "description": "Auto-generate Claude Code documentation from your actual source code — Standards, Rules, Skills, and Guides tailored to your project",
5
- "main": "health-checker/index.js",
6
- "bin": {
7
- "claudeos-core": "bin/cli.js"
8
- },
9
- "files": [
10
- "bin/",
11
- "content-validator/",
12
- "health-checker/",
13
- "import-linter/",
14
- "manifest-generator/",
15
- "pass-json-validator/",
16
- "pass-prompts/",
17
- "plan-installer/",
18
- "plan-validator/",
19
- "sync-checker/",
20
- "bootstrap.sh",
21
- "README.md",
22
- "README.ko.md",
23
- "LICENSE",
24
- "CHANGELOG.md",
25
- "CONTRIBUTING.md",
26
- "README.zh-CN.md",
27
- "README.ja.md",
28
- "README.es.md",
29
- "README.vi.md",
30
- "README.hi.md",
31
- "README.ru.md",
32
- "README.fr.md",
33
- "README.de.md"
34
- ],
35
- "scripts": {
36
- "init": "node bin/cli.js init",
37
- "health": "node bin/cli.js health",
38
- "validate": "node bin/cli.js validate",
39
- "refresh": "node bin/cli.js refresh",
40
- "restore": "node bin/cli.js restore",
41
- "test": "node health-checker/index.js"
42
- },
43
- "keywords": [
44
- "claude-code",
45
- "automation",
46
- "code-analysis",
47
- "CLAUDE.md",
48
- "standards",
49
- "rules",
50
- "skills",
51
- "scaffolding",
52
- "spring-boot",
53
- "nextjs",
54
- "express",
55
- "django",
56
- "fastapi"
57
- ],
58
- "author": "claudeos-core <claudeoscore@gmail.com> (https://github.com/claudeos-core)",
59
- "license": "ISC",
60
- "repository": {
61
- "type": "git",
62
- "url": "git+https://github.com/claudeos-core/claudeos-core.git"
63
- },
64
- "homepage": "https://github.com/claudeos-core/claudeos-core#readme",
65
- "bugs": {
66
- "url": "https://github.com/claudeos-core/claudeos-core/issues"
67
- },
68
- "engines": {
69
- "node": ">=18.0.0"
70
- },
71
- "dependencies": {
72
- "glob": "^13.0.6",
73
- "gray-matter": "^4.0.3"
74
- }
75
- }
1
+ {
2
+ "name": "claudeos-core",
3
+ "version": "1.2.0",
4
+ "description": "Auto-generate Claude Code documentation from your actual source code — Standards, Rules, Skills, and Guides tailored to your project",
5
+ "main": "bin/cli.js",
6
+ "bin": {
7
+ "claudeos-core": "bin/cli.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "content-validator/",
12
+ "health-checker/",
13
+ "import-linter/",
14
+ "manifest-generator/",
15
+ "pass-json-validator/",
16
+ "pass-prompts/",
17
+ "plan-installer/",
18
+ "plan-validator/",
19
+ "sync-checker/",
20
+ "bootstrap.sh",
21
+ "README.md",
22
+ "README.ko.md",
23
+ "LICENSE",
24
+ "CHANGELOG.md",
25
+ "CONTRIBUTING.md",
26
+ "README.zh-CN.md",
27
+ "README.ja.md",
28
+ "README.es.md",
29
+ "README.vi.md",
30
+ "README.hi.md",
31
+ "README.ru.md",
32
+ "README.fr.md",
33
+ "README.de.md"
34
+ ],
35
+ "scripts": {
36
+ "init": "node bin/cli.js init",
37
+ "health": "node bin/cli.js health",
38
+ "validate": "node bin/cli.js validate",
39
+ "refresh": "node bin/cli.js refresh",
40
+ "restore": "node bin/cli.js restore",
41
+ "test": "node health-checker/index.js"
42
+ },
43
+ "keywords": [
44
+ "claude-code",
45
+ "automation",
46
+ "code-analysis",
47
+ "CLAUDE.md",
48
+ "standards",
49
+ "rules",
50
+ "skills",
51
+ "scaffolding",
52
+ "i18n",
53
+ "multi-language",
54
+ "spring-boot",
55
+ "kotlin",
56
+ "exposed",
57
+ "jooq",
58
+ "cqrs",
59
+ "bff",
60
+ "multi-module",
61
+ "monorepo",
62
+ "nextjs",
63
+ "express",
64
+ "django",
65
+ "fastapi"
66
+ ],
67
+ "author": "claudeos-core <claudeoscore@gmail.com> (https://github.com/claudeos-core)",
68
+ "license": "ISC",
69
+ "repository": {
70
+ "type": "git",
71
+ "url": "git+https://github.com/claudeos-core/claudeos-core.git"
72
+ },
73
+ "homepage": "https://github.com/claudeos-core/claudeos-core#readme",
74
+ "bugs": {
75
+ "url": "https://github.com/claudeos-core/claudeos-core/issues"
76
+ },
77
+ "engines": {
78
+ "node": ">=18.0.0"
79
+ },
80
+ "dependencies": {
81
+ "glob": "^13.0.6",
82
+ "gray-matter": "^4.0.3"
83
+ }
84
+ }