30 lines
568 B
JavaScript
30 lines
568 B
JavaScript
import fs from "fs";
|
|
|
|
const MUST = [
|
|
"docs/coding-instructions.md",
|
|
"docs/project-instructions.md",
|
|
"docs/architecture.md",
|
|
"docs/testing.md",
|
|
"docs/roadmap.md",
|
|
];
|
|
|
|
let ok = true;
|
|
for (const p of MUST) {
|
|
if (!fs.existsSync(p)) {
|
|
console.error(`[docs-audit] MISSING: ${p}`);
|
|
ok = false;
|
|
continue;
|
|
}
|
|
const txt = fs.readFileSync(p, "utf-8").trim();
|
|
if (txt.length < 50) {
|
|
console.error(`[docs-audit] TOO SHORT: ${p}`);
|
|
ok = false;
|
|
}
|
|
}
|
|
if (ok) {
|
|
console.log("[docs-audit] PASS");
|
|
process.exit(0);
|
|
} else {
|
|
process.exit(1);
|
|
}
|