devbonzai 2.2.206 → 2.2.207
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/package.json
CHANGED
|
@@ -29,7 +29,7 @@ module.exports = async function scanStandards(req, res) {
|
|
|
29
29
|
console.log('🔵 [scan_standards] Sample files found:', sampleFiles.length);
|
|
30
30
|
sampleFiles.forEach(f => console.log(' 📄', f.path, `(${f.size} bytes)`));
|
|
31
31
|
|
|
32
|
-
const prompt = `
|
|
32
|
+
const prompt = `Analyze this codebase for architectural violations.
|
|
33
33
|
|
|
34
34
|
PROJECT STRUCTURE:
|
|
35
35
|
${fileTree}
|
|
@@ -37,22 +37,16 @@ ${fileTree}
|
|
|
37
37
|
SAMPLE FILES:
|
|
38
38
|
${sampleFiles.map(f => `=== ${f.path} ===\n${f.content.substring(0, 500)}...\n`).join('\n')}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
STANDARDS TO CHECK:
|
|
41
41
|
${Array.isArray(standards) ? standards.map((s, i) => `${i + 1}. ${s}`).join('\n') : standards}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
CRITICAL: Your response must be ONLY a valid JSON array. No markdown, no explanation, no summary text.
|
|
44
|
+
Start your response with [ and end with ]. Nothing else.
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
[
|
|
47
|
-
{
|
|
48
|
-
"rule": "Controllers should only handle HTTP requests",
|
|
49
|
-
"file": "src/controllers/UserController.ts",
|
|
50
|
-
"description": "Contains business logic and database queries",
|
|
51
|
-
"severity": "high"
|
|
52
|
-
}
|
|
53
|
-
]
|
|
46
|
+
Output format:
|
|
47
|
+
[{"rule":"rule name","file":"path/to/file","description":"what violates it","severity":"high|medium|low"}]
|
|
54
48
|
|
|
55
|
-
|
|
49
|
+
Empty if no violations: []`;
|
|
56
50
|
|
|
57
51
|
console.log('🔵 [scan_standards] Prompt length:', prompt.length, 'chars');
|
|
58
52
|
|