aioengine 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/README.md +36 -15
- package/package.json +1 -1
- package/src/index.js +49 -14
package/README.md
CHANGED
|
@@ -4,14 +4,35 @@ AI change control for developers using Claude Code, Cursor, Codex, Copilot, and
|
|
|
4
4
|
|
|
5
5
|
aioengine helps you review AI-generated code before you trust it. It scans your repo for missing guardrails, checks changed files for risky edits, and flags when AI may have wandered outside the requested task.
|
|
6
6
|
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
Run aioengine in any JavaScript or TypeScript project:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx aioengine check
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Then set up AI coding guardrails:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx aioengine init
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
After your AI coding tool makes changes, review them before committing:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx aioengine scope "update landing page headline"
|
|
25
|
+
npx aioengine review
|
|
26
|
+
```
|
|
27
|
+
|
|
7
28
|
## Commands
|
|
8
29
|
|
|
9
30
|
```bash
|
|
10
|
-
aioengine init
|
|
11
|
-
aioengine check
|
|
12
|
-
aioengine scope "add init command"
|
|
13
|
-
aioengine review
|
|
14
|
-
aioengine rules
|
|
31
|
+
npx aioengine init
|
|
32
|
+
npx aioengine check
|
|
33
|
+
npx aioengine scope "add init command"
|
|
34
|
+
npx aioengine review
|
|
35
|
+
npx aioengine rules
|
|
15
36
|
```
|
|
16
37
|
|
|
17
38
|
## Why aioengine exists
|
|
@@ -43,7 +64,7 @@ CLAUDE.md
|
|
|
43
64
|
Run:
|
|
44
65
|
|
|
45
66
|
```bash
|
|
46
|
-
aioengine init
|
|
67
|
+
npx aioengine init
|
|
47
68
|
```
|
|
48
69
|
|
|
49
70
|
## `aioengine check`
|
|
@@ -66,7 +87,7 @@ Checks for:
|
|
|
66
87
|
Run:
|
|
67
88
|
|
|
68
89
|
```bash
|
|
69
|
-
aioengine check
|
|
90
|
+
npx aioengine check
|
|
70
91
|
```
|
|
71
92
|
|
|
72
93
|
## `aioengine scope`
|
|
@@ -76,10 +97,10 @@ Checks whether changed files match the task you gave your AI coding tool.
|
|
|
76
97
|
Example:
|
|
77
98
|
|
|
78
99
|
```bash
|
|
79
|
-
aioengine scope "update landing page headline"
|
|
100
|
+
npx aioengine scope "update landing page headline"
|
|
80
101
|
```
|
|
81
102
|
|
|
82
|
-
If the task sounds like a UI change but AI modified billing, database, env, dependency, or deployment files, aioengine will flag possible scope drift.
|
|
103
|
+
If the task sounds like a UI change but AI modified billing, database, env, dependency, CLI, or deployment files, aioengine will flag possible scope drift.
|
|
83
104
|
|
|
84
105
|
## `aioengine review`
|
|
85
106
|
|
|
@@ -88,7 +109,7 @@ Reviews current uncommitted changes for risky files.
|
|
|
88
109
|
Run:
|
|
89
110
|
|
|
90
111
|
```bash
|
|
91
|
-
aioengine review
|
|
112
|
+
npx aioengine review
|
|
92
113
|
```
|
|
93
114
|
|
|
94
115
|
aioengine will flag changes to files that often deserve extra review, such as:
|
|
@@ -108,7 +129,7 @@ Generates starter AI coding rules for Claude Code and Cursor.
|
|
|
108
129
|
Run:
|
|
109
130
|
|
|
110
131
|
```bash
|
|
111
|
-
aioengine rules
|
|
132
|
+
npx aioengine rules
|
|
112
133
|
```
|
|
113
134
|
|
|
114
135
|
This creates or skips:
|
|
@@ -121,13 +142,13 @@ CLAUDE.md
|
|
|
121
142
|
## Example workflow
|
|
122
143
|
|
|
123
144
|
```bash
|
|
124
|
-
aioengine init
|
|
125
|
-
aioengine check
|
|
145
|
+
npx aioengine init
|
|
146
|
+
npx aioengine check
|
|
126
147
|
|
|
127
148
|
# Ask Claude, Cursor, Codex, or another AI coding tool to make a change.
|
|
128
149
|
|
|
129
|
-
aioengine scope "update landing page headline"
|
|
130
|
-
aioengine review
|
|
150
|
+
npx aioengine scope "update landing page headline"
|
|
151
|
+
npx aioengine review
|
|
131
152
|
```
|
|
132
153
|
|
|
133
154
|
## Current status
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -62,7 +62,6 @@ function runInit() {
|
|
|
62
62
|
|
|
63
63
|
const aioengineDir = ".aioengine";
|
|
64
64
|
const configPath = path.join(aioengineDir, "config.json");
|
|
65
|
-
const claudePath = "CLAUDE.md";
|
|
66
65
|
const cursorDir = ".cursor/rules";
|
|
67
66
|
const cursorPath = path.join(cursorDir, "aioengine.mdc");
|
|
68
67
|
|
|
@@ -92,12 +91,7 @@ function runInit() {
|
|
|
92
91
|
skipped.push(configPath);
|
|
93
92
|
}
|
|
94
93
|
|
|
95
|
-
|
|
96
|
-
fs.writeFileSync(path.join(root, claudePath), getClaudeRules());
|
|
97
|
-
created.push(claudePath);
|
|
98
|
-
} else {
|
|
99
|
-
skipped.push(claudePath);
|
|
100
|
-
}
|
|
94
|
+
createClaudeRulesSafely(root, created, skipped);
|
|
101
95
|
|
|
102
96
|
if (!exists(cursorDir, root)) {
|
|
103
97
|
fs.mkdirSync(path.join(root, cursorDir), { recursive: true });
|
|
@@ -113,6 +107,14 @@ function runInit() {
|
|
|
113
107
|
printSection("Created", created, "green");
|
|
114
108
|
printSection("Skipped", skipped, "yellow");
|
|
115
109
|
|
|
110
|
+
if (skipped.includes("CLAUDE.md already exists")) {
|
|
111
|
+
console.log(
|
|
112
|
+
`\n${pc.dim(
|
|
113
|
+
"aioengine did not modify your existing CLAUDE.md. Suggested Claude rules were saved to .aioengine/suggested-claude-rules.md if that file did not already exist."
|
|
114
|
+
)}`
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
116
118
|
console.log(pc.bold("Next steps:"));
|
|
117
119
|
console.log(` 1. Run ${pc.cyan("aioengine check")}`);
|
|
118
120
|
console.log(` 2. Make or review AI-generated changes`);
|
|
@@ -382,19 +384,13 @@ function runRules() {
|
|
|
382
384
|
|
|
383
385
|
const root = getProjectRoot();
|
|
384
386
|
|
|
385
|
-
const claudePath = "CLAUDE.md";
|
|
386
387
|
const cursorDir = ".cursor/rules";
|
|
387
388
|
const cursorPath = path.join(cursorDir, "aioengine.mdc");
|
|
388
389
|
|
|
389
390
|
const created = [];
|
|
390
391
|
const skipped = [];
|
|
391
392
|
|
|
392
|
-
|
|
393
|
-
fs.writeFileSync(path.join(root, claudePath), getClaudeRules());
|
|
394
|
-
created.push(claudePath);
|
|
395
|
-
} else {
|
|
396
|
-
skipped.push(claudePath);
|
|
397
|
-
}
|
|
393
|
+
createClaudeRulesSafely(root, created, skipped);
|
|
398
394
|
|
|
399
395
|
if (!exists(cursorDir, root)) {
|
|
400
396
|
fs.mkdirSync(path.join(root, cursorDir), { recursive: true });
|
|
@@ -410,6 +406,14 @@ function runRules() {
|
|
|
410
406
|
printSection("Created", created, "green");
|
|
411
407
|
printSection("Skipped", skipped, "yellow");
|
|
412
408
|
|
|
409
|
+
if (skipped.includes("CLAUDE.md already exists")) {
|
|
410
|
+
console.log(
|
|
411
|
+
`\n${pc.dim(
|
|
412
|
+
"aioengine did not modify your existing CLAUDE.md. Suggested Claude rules were saved to .aioengine/suggested-claude-rules.md if that file did not already exist."
|
|
413
|
+
)}`
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
|
|
413
417
|
console.log(pc.bold("Next step:"));
|
|
414
418
|
console.log(` Run ${pc.cyan("aioengine check")} again.`);
|
|
415
419
|
}
|
|
@@ -839,6 +843,37 @@ function getDefaultConfig() {
|
|
|
839
843
|
};
|
|
840
844
|
}
|
|
841
845
|
|
|
846
|
+
function createClaudeRulesSafely(root, created, skipped) {
|
|
847
|
+
const claudePath = path.join(root, "CLAUDE.md");
|
|
848
|
+
const aioengineDir = path.join(root, ".aioengine");
|
|
849
|
+
const suggestedPath = path.join(
|
|
850
|
+
root,
|
|
851
|
+
".aioengine",
|
|
852
|
+
"suggested-claude-rules.md"
|
|
853
|
+
);
|
|
854
|
+
|
|
855
|
+
if (!fs.existsSync(aioengineDir)) {
|
|
856
|
+
fs.mkdirSync(aioengineDir, { recursive: true });
|
|
857
|
+
created.push(".aioengine");
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
if (!fs.existsSync(claudePath)) {
|
|
861
|
+
fs.writeFileSync(claudePath, getClaudeRules(), "utf8");
|
|
862
|
+
created.push("CLAUDE.md");
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
skipped.push("CLAUDE.md already exists");
|
|
867
|
+
|
|
868
|
+
if (!fs.existsSync(suggestedPath)) {
|
|
869
|
+
fs.writeFileSync(suggestedPath, getClaudeRules(), "utf8");
|
|
870
|
+
created.push(".aioengine/suggested-claude-rules.md");
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
skipped.push(".aioengine/suggested-claude-rules.md already exists");
|
|
875
|
+
}
|
|
876
|
+
|
|
842
877
|
function getClaudeRules() {
|
|
843
878
|
return `# AI Coding Rules
|
|
844
879
|
|