diffray 0.1.2 → 0.1.3
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/dist/defaults/rules/code-general.md +46 -0
- package/dist/diffray.js +193 -192
- package/package.json +2 -2
- package/src/defaults/rules/code-general.md +46 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "diffray",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "AI-powered code review CLI for git changes",
|
|
5
5
|
"author": "Ilya Strelov <strelov1@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"dev": "bun run ./bin/diffray.ts",
|
|
18
|
-
"build": "bun build ./bin/diffray.ts --outfile dist/diffray.js --target node --minify && cp -r src/defaults dist/",
|
|
18
|
+
"build": "bun build ./bin/diffray.ts --outfile dist/diffray.js --target node --minify && node -e \"const fs=require('fs');const f='dist/diffray.js';fs.writeFileSync(f,fs.readFileSync(f,'utf8').replace('#!/usr/bin/env bun','#!/usr/bin/env node'))\" && cp -r src/defaults dist/",
|
|
19
19
|
"link:local": "node -e \"const p=require('./package.json');p.bin.diffray='./bin/diffray.ts';require('fs').writeFileSync('package.json',JSON.stringify(p,null,2)+'\\n')\" && bun link",
|
|
20
20
|
"link:publish": "node -e \"const p=require('./package.json');p.bin.diffray='./dist/diffray.js';require('fs').writeFileSync('package.json',JSON.stringify(p,null,2)+'\\n')\"",
|
|
21
21
|
"link": "bun link",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-general
|
|
3
|
+
description: General code quality review for all source files
|
|
4
|
+
patterns:
|
|
5
|
+
- "**/*.ts"
|
|
6
|
+
- "**/*.tsx"
|
|
7
|
+
- "**/*.js"
|
|
8
|
+
- "**/*.jsx"
|
|
9
|
+
- "**/*.py"
|
|
10
|
+
- "**/*.go"
|
|
11
|
+
- "**/*.rs"
|
|
12
|
+
- "**/*.java"
|
|
13
|
+
- "**/*.rb"
|
|
14
|
+
- "**/*.php"
|
|
15
|
+
- "**/*.c"
|
|
16
|
+
- "**/*.cpp"
|
|
17
|
+
- "**/*.h"
|
|
18
|
+
- "**/*.cs"
|
|
19
|
+
- "**/*.swift"
|
|
20
|
+
- "**/*.kt"
|
|
21
|
+
- "**/*.scala"
|
|
22
|
+
agent: general
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Perform a general code quality review. Focus on:
|
|
26
|
+
|
|
27
|
+
1. **Readability** - Is the code easy to understand?
|
|
28
|
+
2. **Simplicity** - Is there unnecessary complexity or over-engineering?
|
|
29
|
+
3. **Naming** - Are variables, functions, and classes named clearly?
|
|
30
|
+
4. **Structure** - Is the code organized logically? Are functions doing too much?
|
|
31
|
+
5. **Dependencies** - Are there hidden or circular dependencies?
|
|
32
|
+
6. **DRY violations** - Is there obvious code duplication?
|
|
33
|
+
7. **API design** - Are interfaces intuitive and consistent?
|
|
34
|
+
|
|
35
|
+
Do NOT review (covered by other agents):
|
|
36
|
+
- Bugs, logic errors, edge cases → bug-hunter
|
|
37
|
+
- Security vulnerabilities → security-scan
|
|
38
|
+
- Performance issues → performance-check
|
|
39
|
+
|
|
40
|
+
Be direct and actionable. Only report issues that genuinely need attention.
|
|
41
|
+
|
|
42
|
+
IMPORTANT: Do NOT report:
|
|
43
|
+
- Code that is already good
|
|
44
|
+
- Minor style preferences
|
|
45
|
+
- Compliments or positive observations
|
|
46
|
+
- Suggestions for hypothetical future improvements
|