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.
- package/CHANGELOG.md +84 -1
- package/CONTRIBUTING.md +15 -4
- package/README.de.md +187 -11
- package/README.es.md +187 -11
- package/README.fr.md +187 -11
- package/README.hi.md +187 -11
- package/README.ja.md +186 -10
- package/README.ko.md +331 -364
- package/README.md +200 -11
- package/README.ru.md +187 -11
- package/README.vi.md +188 -12
- package/README.zh-CN.md +186 -10
- package/bin/cli.js +183 -61
- package/bootstrap.sh +128 -21
- package/content-validator/index.js +131 -60
- package/health-checker/index.js +29 -23
- package/import-linter/index.js +14 -8
- package/manifest-generator/index.js +26 -20
- package/package.json +84 -75
- package/pass-json-validator/index.js +92 -70
- package/pass-prompts/templates/common/header.md +4 -4
- package/pass-prompts/templates/common/lang-instructions.json +27 -0
- package/pass-prompts/templates/common/pass3-footer.md +2 -3
- package/pass-prompts/templates/java-spring/pass1.md +84 -81
- package/pass-prompts/templates/java-spring/pass2.md +66 -66
- package/pass-prompts/templates/java-spring/pass3.md +60 -60
- package/pass-prompts/templates/kotlin-spring/pass1.md +172 -0
- package/pass-prompts/templates/kotlin-spring/pass2.md +109 -0
- package/pass-prompts/templates/kotlin-spring/pass3.md +98 -0
- package/pass-prompts/templates/node-express/pass1.md +73 -73
- package/pass-prompts/templates/node-express/pass2.md +66 -66
- package/pass-prompts/templates/node-express/pass3.md +53 -53
- package/pass-prompts/templates/node-nextjs/pass1.md +68 -68
- package/pass-prompts/templates/node-nextjs/pass2.md +61 -61
- package/pass-prompts/templates/node-nextjs/pass3.md +48 -48
- package/pass-prompts/templates/python-django/pass1.md +78 -78
- package/pass-prompts/templates/python-django/pass2.md +69 -69
- package/pass-prompts/templates/python-django/pass3.md +45 -45
- package/pass-prompts/templates/python-fastapi/pass1.md +76 -76
- package/pass-prompts/templates/python-fastapi/pass2.md +67 -67
- package/pass-prompts/templates/python-fastapi/pass3.md +45 -45
- package/plan-installer/index.js +623 -97
- package/plan-validator/index.js +54 -23
- package/sync-checker/index.js +25 -14
package/health-checker/index.js
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* ClaudeOS-Core — Health Checker
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* [0] manifest-generator ←
|
|
9
|
-
* [1] import-linter ← @import
|
|
10
|
-
* [2] plan-validator ← Plan ↔
|
|
11
|
-
* [3] sync-checker ← sync-map.json
|
|
12
|
-
* [4] content-validator ←
|
|
13
|
-
* [5] pass-json-validator ← Pass 1
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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 = {
|
package/import-linter/index.js
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* ClaudeOS-Core — Import Linter
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - BROKEN:
|
|
9
|
-
* - DUPLICATE:
|
|
10
|
-
* - CIRCULAR: @import
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - rule-manifest.json : rules/standard/skills/guide
|
|
9
|
-
* - import-graph.json : @import
|
|
10
|
-
* - sync-map.json : plan/ <file>
|
|
11
|
-
* - plan-manifest.json : plan/
|
|
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> block → file 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
|
-
*
|
|
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
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
140
|
-
|
|
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
|
|
4
|
-
"description": "Auto-generate Claude Code documentation from your actual source code — Standards, Rules, Skills, and Guides tailored to your project",
|
|
5
|
-
"main": "
|
|
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
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
+
}
|