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.
@@ -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
- if (lower.includes(needle))
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.6.1",
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
- "lint": "tsc -p tsconfig.json --noEmit",
42
- "test:enrich": "npm run build && node scripts/smoke-enrichment.mjs",
43
- "prepublishOnly": "npm run lint && npm test && npm run build"
44
- },
45
- "dependencies": {
46
- "@clack/prompts": "^0.9.1",
47
- "yaml": "^2.9.0"
48
- },
49
- "devDependencies": {
50
- "@types/node": "^18.19.130",
51
- "typescript": "^5.6.0",
52
- "vitest": "^2.1.0"
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
+ }