mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 20:28:04 +01:00
Remove dead directories the codebase has been carrying: - docs/archives/ — 41 historical audits and completed implementation plans, superseded by current code - .agents/locks/ — 2 stale Sept 2025 lock files from an abandoned ML-model project, unrelated to current work - .env-backups/ — 4 stale .env.local snapshots (not tracked, gitignored; removed from filesystem) - browser-screenshots/ — empty filesystem dir (gitignored) Also drop the now-dead `docs/archives/**` exclusion patterns from docs-frontmatter-check.js and docs-slop-scan.js. 12,043 lines removed. 0 runtime impact (no code references any deleted path; the two scripts only excluded archives as a scan-skip). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
53 lines
1.2 KiB
JavaScript
53 lines
1.2 KiB
JavaScript
#!/usr/bin/env node
|
|
/*
|
|
docs-slop-scan.js
|
|
Scans for sloppy placeholder phrases outside of tests
|
|
*/
|
|
|
|
const { glob } = require('glob');
|
|
const fs = require('fs');
|
|
|
|
const PHRASES = [/coming soon/i, /tbd/i, /todo/i, /wip/i, /work in progress/i, /placeholder/i, /lorem ipsum/i, /beta only/i];
|
|
|
|
async function main() {
|
|
const patterns = [
|
|
'docs/**/*.md',
|
|
'src/**/*.{ts,tsx,md}',
|
|
'app/**/*.{ts,tsx,md}',
|
|
];
|
|
|
|
const files = (await Promise.all(patterns.map(p => glob(p, { ignore: [
|
|
'**/node_modules/**',
|
|
'**/.next/**',
|
|
'**/__tests__/**',
|
|
'.claude/**',
|
|
] })))).flat();
|
|
|
|
let violations = [];
|
|
for (const file of files) {
|
|
const text = fs.readFileSync(file, 'utf8');
|
|
const lines = text.split(/\r?\n/);
|
|
lines.forEach((line, idx) => {
|
|
PHRASES.forEach(rx => {
|
|
if (rx.test(line)) {
|
|
violations.push({ file, line: idx + 1, text: line.trim() });
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
if (violations.length) {
|
|
console.log('Slop phrases found:');
|
|
violations.slice(0, 100).forEach(v => console.log(`- ${v.file}:${v.line} ${v.text}`));
|
|
process.exitCode = 1;
|
|
} else {
|
|
console.log('No slop phrases found.');
|
|
}
|
|
}
|
|
|
|
main().catch(err => {
|
|
console.error(err);
|
|
process.exitCode = 1;
|
|
});
|
|
|