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.
- package/CHANGELOG.md +1649 -481
- package/CONTRIBUTING.md +92 -92
- package/README.de.md +64 -5
- package/README.es.md +64 -5
- package/README.fr.md +64 -5
- package/README.hi.md +64 -5
- package/README.ja.md +64 -5
- package/README.ko.md +1018 -959
- package/README.md +1020 -960
- package/README.ru.md +66 -5
- package/README.vi.md +1019 -960
- package/README.zh-CN.md +64 -5
- package/bin/cli.js +152 -148
- package/bin/commands/init.js +1673 -1518
- package/bin/commands/lint.js +62 -0
- package/bin/commands/memory.js +438 -438
- package/bin/lib/cli-utils.js +206 -206
- package/claude-md-validator/index.js +184 -0
- package/claude-md-validator/reporter.js +66 -0
- package/claude-md-validator/structural-checks.js +528 -0
- package/content-validator/index.js +666 -436
- package/lib/env-parser.js +317 -0
- package/lib/expected-guides.js +23 -23
- package/lib/expected-outputs.js +90 -90
- package/lib/language-config.js +35 -35
- package/lib/memory-scaffold.js +1058 -1052
- package/lib/plan-parser.js +165 -165
- package/lib/staged-rules.js +118 -118
- package/manifest-generator/index.js +174 -174
- package/package.json +90 -87
- package/pass-json-validator/index.js +337 -337
- package/pass-prompts/templates/angular/pass3.md +28 -13
- package/pass-prompts/templates/common/claude-md-scaffold.md +686 -0
- package/pass-prompts/templates/common/pass3-footer.md +402 -39
- package/pass-prompts/templates/common/pass3b-core-header.md +43 -0
- package/pass-prompts/templates/common/pass4.md +375 -302
- package/pass-prompts/templates/common/staging-override.md +26 -26
- package/pass-prompts/templates/java-spring/pass3.md +31 -21
- package/pass-prompts/templates/kotlin-spring/pass3.md +34 -22
- package/pass-prompts/templates/node-express/pass3.md +30 -21
- package/pass-prompts/templates/node-fastify/pass3.md +28 -14
- package/pass-prompts/templates/node-nestjs/pass3.md +29 -14
- package/pass-prompts/templates/node-nextjs/pass3.md +34 -21
- package/pass-prompts/templates/node-vite/pass1.md +117 -117
- package/pass-prompts/templates/node-vite/pass2.md +78 -78
- package/pass-prompts/templates/node-vite/pass3.md +30 -13
- package/pass-prompts/templates/python-django/pass3.md +32 -21
- package/pass-prompts/templates/python-fastapi/pass3.md +33 -21
- package/pass-prompts/templates/python-flask/pass1.md +119 -119
- package/pass-prompts/templates/python-flask/pass2.md +85 -85
- package/pass-prompts/templates/python-flask/pass3.md +31 -13
- package/pass-prompts/templates/vue-nuxt/pass3.md +32 -13
- package/plan-installer/domain-grouper.js +76 -76
- package/plan-installer/index.js +137 -129
- package/plan-installer/prompt-generator.js +188 -128
- package/plan-installer/scanners/scan-frontend.js +505 -473
- package/plan-installer/scanners/scan-java.js +226 -226
- package/plan-installer/scanners/scan-node.js +57 -57
- package/plan-installer/scanners/scan-python.js +85 -85
- package/plan-installer/stack-detector.js +482 -466
- package/plan-installer/structure-scanner.js +65 -65
- package/sync-checker/index.js +177 -177
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bin/commands/lint.js — `npx claudeos-core lint` command.
|
|
3
|
+
*
|
|
4
|
+
* Runs language-invariant structural validation on the generated CLAUDE.md.
|
|
5
|
+
* Intended to run after Pass 3/4 to catch structural drift the scaffold
|
|
6
|
+
* alone cannot prevent (e.g., the §9 L4-memory re-declaration anti-pattern).
|
|
7
|
+
*
|
|
8
|
+
* Exit code:
|
|
9
|
+
* 0 — all checks passed
|
|
10
|
+
* 1 — one or more checks failed (drift detected, repair needed)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
const path = require("path");
|
|
16
|
+
const { PROJECT_ROOT, log } = require("../lib/cli-utils");
|
|
17
|
+
const { validate } = require("../../claude-md-validator");
|
|
18
|
+
const { formatReport } = require("../../claude-md-validator/reporter");
|
|
19
|
+
|
|
20
|
+
function showHelp() {
|
|
21
|
+
log(`
|
|
22
|
+
Usage: npx claudeos-core lint
|
|
23
|
+
|
|
24
|
+
Validates the structural invariants of the generated CLAUDE.md at the
|
|
25
|
+
project root. Runs language-invariant checks that work identically
|
|
26
|
+
for all 10 supported output languages (en, ko, ja, zh-CN, es, vi, hi,
|
|
27
|
+
ru, fr, de).
|
|
28
|
+
|
|
29
|
+
Checks:
|
|
30
|
+
- Exactly 8 top-level (## ) sections
|
|
31
|
+
- Section 4 has 3-4 ### sub-sections
|
|
32
|
+
- Section 6 has exactly 3 ### sub-sections
|
|
33
|
+
- Section 8 has exactly 2 ### sub-sections + 2 #### headings
|
|
34
|
+
- Each L4 memory file appears in exactly 1 table row (inside Section 8)
|
|
35
|
+
|
|
36
|
+
Exit codes:
|
|
37
|
+
0 — structure valid
|
|
38
|
+
1 — one or more checks failed (report printed with remediation hints)
|
|
39
|
+
|
|
40
|
+
Options:
|
|
41
|
+
--help, -h Show this help message
|
|
42
|
+
`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function cmdLint(parsedArgs) {
|
|
46
|
+
// Support `lint --help` / `lint -h` before validating.
|
|
47
|
+
const rest = process.argv.slice(3);
|
|
48
|
+
if (rest.includes("--help") || rest.includes("-h")) {
|
|
49
|
+
showHelp();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const target = path.join(PROJECT_ROOT, "CLAUDE.md");
|
|
54
|
+
const report = validate(target);
|
|
55
|
+
process.stdout.write(formatReport(report));
|
|
56
|
+
|
|
57
|
+
if (!report.valid) {
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
module.exports = { cmdLint };
|