agent-rules-init 0.6.1 → 0.7.0
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 +30 -19
- package/dist/bin.js +1 -1
- package/dist/cli.d.ts +14 -33
- package/dist/cli.js +144 -158
- package/dist/core/cli-options.d.ts +43 -0
- package/dist/core/cli-options.js +70 -0
- package/dist/core/config.d.ts +12 -0
- package/dist/core/config.js +57 -4
- package/dist/core/enrichment-cache.d.ts +11 -0
- package/dist/core/enrichment-cache.js +93 -0
- package/dist/core/existing-docs.d.ts +2 -0
- package/dist/core/existing-docs.js +26 -0
- package/dist/core/generation-state.d.ts +8 -2
- package/dist/core/generation-state.js +15 -3
- package/dist/core/i18n.d.ts +9 -0
- package/dist/core/i18n.js +64 -48
- package/dist/core/llm-bridge.d.ts +11 -0
- package/dist/core/llm-bridge.js +162 -38
- package/dist/core/project-units.js +2 -1
- package/dist/core/prompt-engine.d.ts +4 -13
- package/dist/core/prompt-engine.js +0 -54
- package/dist/core/scanner-async.d.ts +4 -0
- package/dist/core/scanner-async.js +55 -0
- package/dist/core/scanner-worker.d.ts +1 -0
- package/dist/core/scanner-worker.js +17 -0
- package/dist/core/scanner.d.ts +5 -1
- package/dist/core/scanner.js +37 -10
- package/dist/core/types.d.ts +8 -0
- package/dist/packs/index.d.ts +3 -0
- package/dist/packs/index.js +25 -0
- package/dist/packs/java.js +1 -1
- package/dist/packs/python.js +5 -2
- package/package.json +60 -54
package/dist/packs/python.js
CHANGED
|
@@ -10,9 +10,12 @@ const TEST_RUNNERS = [
|
|
|
10
10
|
["unittest", "unittest"],
|
|
11
11
|
];
|
|
12
12
|
function findIn(haystack, table) {
|
|
13
|
-
const lower = haystack.toLowerCase();
|
|
14
13
|
for (const [needle, label] of table) {
|
|
15
|
-
|
|
14
|
+
const escaped = needle.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
15
|
+
// Match dependency identifiers, not substrings in project names such as
|
|
16
|
+
// `fastapi-utils` or prose mentioning "unittest-like" behavior.
|
|
17
|
+
const dependency = new RegExp(`(?:^|["'\\s])${escaped}(?=$|["'\\s,;<>=!~\\[])`, "im");
|
|
18
|
+
if (dependency.test(haystack))
|
|
16
19
|
return { value: label, confidence: "high" };
|
|
17
20
|
}
|
|
18
21
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,54 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "agent-rules-init",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Generates CLAUDE.md, AGENTS.md, copilot-instructions.md and prompt files from what your repo actually is.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "dist/cli.js",
|
|
8
|
-
"types": "dist/cli.d.ts",
|
|
9
|
-
"bin": {
|
|
10
|
-
"agent-rules-init": "dist/bin.js"
|
|
11
|
-
},
|
|
12
|
-
"files": [
|
|
13
|
-
"dist",
|
|
14
|
-
"README.md",
|
|
15
|
-
"LICENSE"
|
|
16
|
-
],
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/racama29/agent-rules-init.git",
|
|
20
|
-
"directory": "packages/cli"
|
|
21
|
-
},
|
|
22
|
-
"homepage": "https://github.com/racama29/agent-rules-init#readme",
|
|
23
|
-
"bugs": {
|
|
24
|
-
"url": "https://github.com/racama29/agent-rules-init/issues"
|
|
25
|
-
},
|
|
26
|
-
"keywords": [
|
|
27
|
-
"cli",
|
|
28
|
-
"claude",
|
|
29
|
-
"claude-code",
|
|
30
|
-
"codex",
|
|
31
|
-
"copilot",
|
|
32
|
-
"ai-agents",
|
|
33
|
-
"agent-rules"
|
|
34
|
-
],
|
|
35
|
-
"engines": {
|
|
36
|
-
"node": ">=18"
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"build": "tsc -p tsconfig.json",
|
|
40
|
-
"test": "vitest run",
|
|
41
|
-
"
|
|
42
|
-
"test:
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-rules-init",
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "Generates CLAUDE.md, AGENTS.md, copilot-instructions.md and prompt files from what your repo actually is.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/cli.js",
|
|
8
|
+
"types": "dist/cli.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"agent-rules-init": "dist/bin.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/racama29/agent-rules-init.git",
|
|
20
|
+
"directory": "packages/cli"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/racama29/agent-rules-init#readme",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/racama29/agent-rules-init/issues"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"cli",
|
|
28
|
+
"claude",
|
|
29
|
+
"claude-code",
|
|
30
|
+
"codex",
|
|
31
|
+
"copilot",
|
|
32
|
+
"ai-agents",
|
|
33
|
+
"agent-rules"
|
|
34
|
+
],
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=18"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc -p tsconfig.json",
|
|
40
|
+
"test": "vitest run",
|
|
41
|
+
"test:coverage": "vitest run --coverage",
|
|
42
|
+
"test:pack": "npm run build && node scripts/smoke-package.mjs",
|
|
43
|
+
"test:hardening": "vitest run test/hardening.test.ts test/quality-matrix.test.ts test/writer.test.ts test/scanner.test.ts",
|
|
44
|
+
"test:quality": "vitest run test/corpus.test.ts test/quality-matrix.test.ts",
|
|
45
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
46
|
+
"lint": "eslint src test scripts",
|
|
47
|
+
"check": "npm run typecheck && npm run lint && npm test && npm run test:pack",
|
|
48
|
+
"test:enrich": "npm run build && node scripts/smoke-enrichment.mjs",
|
|
49
|
+
"prepublishOnly": "npm run check"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@clack/prompts": "^0.9.1",
|
|
53
|
+
"yaml": "^2.9.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/node": "^18.19.130",
|
|
57
|
+
"typescript": "^5.6.0",
|
|
58
|
+
"vitest": "^3.2.7"
|
|
59
|
+
}
|
|
60
|
+
}
|