This repository was archived by the owner on Apr 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnerviq.config.js
More file actions
46 lines (41 loc) · 1.52 KB
/
Copy pathnerviq.config.js
File metadata and controls
46 lines (41 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* Nerviq custom configuration — project-specific checks.
*
* This plugin adds a custom check that verifies experiment folders
* contain evidence.md files documenting their results.
*/
const fs = require('fs');
const path = require('path');
module.exports = {
plugins: [
{
name: 'experiments-have-evidence',
checks: {
'experiments-have-evidence': {
id: 'experiments-have-evidence',
name: 'Experiment folders contain evidence',
category: 'Quality',
impact: 'medium',
fix: 'Add an evidence.md file to each experiment folder documenting results, methodology, and conclusions.',
check: (ctx) => {
const researchDir = path.join(ctx.dir || '.', 'research', 'case-studies');
if (!fs.existsSync(researchDir)) return false;
try {
const entries = fs.readdirSync(researchDir, { withFileTypes: true });
const dirs = entries.filter(e => e.isDirectory());
if (dirs.length === 0) return true;
const withEvidence = dirs.filter(d => {
const evidencePath = path.join(researchDir, d.name, 'evidence.md');
const readmePath = path.join(researchDir, d.name, 'README.md');
return fs.existsSync(evidencePath) || fs.existsSync(readmePath);
});
return withEvidence.length >= Math.ceil(dirs.length * 0.5);
} catch {
return false;
}
},
},
},
},
],
};