@aiready/change-amplification 0.9.5 → 0.11.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.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/change-amplification@0.9.4 build /Users/pengcao/projects/aiready/packages/change-amplification
3
+ > @aiready/change-amplification@0.10.0 build /Users/pengcao/projects/aiready/packages/change-amplification
4
4
  > tsup src/index.ts src/cli.ts --format cjs,esm --dts
5
5
 
6
6
  CLI Building entry: src/cli.ts, src/index.ts
@@ -9,100 +9,16 @@
9
9
  CLI Target: es2020
10
10
  CJS Build start
11
11
  ESM Build start
12
-
13
-  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 9:38:41 pm
14
-
15
- package.json:33:6:
16
-  33 │ "types": "./dist/index.d.ts"
17
- ╵ ~~~~~~~
18
-
19
- The "import" condition comes earlier and will be used for all "import" statements:
20
-
21
- package.json:31:6:
22
-  31 │ "import": "./dist/index.mjs",
23
- ╵ ~~~~~~~~
24
-
25
- The "require" condition comes earlier and will be used for all "require" calls:
26
-
27
- package.json:32:6:
28
-  32 │ "require": "./dist/index.js",
29
- ╵ ~~~~~~~~~
30
-
31
-
32
-
33
-
34
-  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 9:38:41 pm
35
-
36
- package.json:38:6:
37
-  38 │ "types": "./dist/cli.d.ts"
38
- ╵ ~~~~~~~
39
-
40
- The "import" condition comes earlier and will be used for all "import" statements:
41
-
42
- package.json:36:6:
43
-  36 │ "import": "./dist/cli.mjs",
44
- ╵ ~~~~~~~~
45
-
46
- The "require" condition comes earlier and will be used for all "require" calls:
47
-
48
- package.json:37:6:
49
-  37 │ "require": "./dist/cli.js",
50
- ╵ ~~~~~~~~~
51
-
52
-
53
-
54
-
55
-  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 9:38:41 pm
56
-
57
- package.json:33:6:
58
-  33 │ "types": "./dist/index.d.ts"
59
- ╵ ~~~~~~~
60
-
61
- The "import" condition comes earlier and will be used for all "import" statements:
62
-
63
- package.json:31:6:
64
-  31 │ "import": "./dist/index.mjs",
65
- ╵ ~~~~~~~~
66
-
67
- The "require" condition comes earlier and will be used for all "require" calls:
68
-
69
- package.json:32:6:
70
-  32 │ "require": "./dist/index.js",
71
- ╵ ~~~~~~~~~
72
-
73
-
74
-
75
-
76
-  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 9:38:41 pm
77
-
78
- package.json:38:6:
79
-  38 │ "types": "./dist/cli.d.ts"
80
- ╵ ~~~~~~~
81
-
82
- The "import" condition comes earlier and will be used for all "import" statements:
83
-
84
- package.json:36:6:
85
-  36 │ "import": "./dist/cli.mjs",
86
- ╵ ~~~~~~~~
87
-
88
- The "require" condition comes earlier and will be used for all "require" calls:
89
-
90
- package.json:37:6:
91
-  37 │ "require": "./dist/cli.js",
92
- ╵ ~~~~~~~~~
93
-
94
-
95
-
96
- ESM dist/index.mjs 110.00 B
12
+ ESM dist/index.mjs 1.25 KB
97
13
  ESM dist/cli.mjs 2.78 KB
98
14
  ESM dist/chunk-GLHIV53G.mjs 3.79 KB
99
- ESM âšĦ️ Build success in 154ms
100
- CJS dist/index.js 5.11 KB
15
+ ESM âšĦ️ Build success in 134ms
16
+ CJS dist/index.js 6.37 KB
101
17
  CJS dist/cli.js 7.98 KB
102
- CJS âšĦ️ Build success in 155ms
18
+ CJS âšĦ️ Build success in 134ms
103
19
  DTS Build start
104
- DTS âšĦ️ Build success in 3747ms
20
+ DTS âšĦ️ Build success in 2088ms
105
21
  DTS dist/cli.d.ts 152.00 B
106
- DTS dist/index.d.ts 941.00 B
22
+ DTS dist/index.d.ts 1.05 KB
107
23
  DTS dist/cli.d.mts 152.00 B
108
- DTS dist/index.d.mts 941.00 B
24
+ DTS dist/index.d.mts 1.05 KB
@@ -1,5 +1,5 @@
1
1
 
2
2
  
3
- > @aiready/change-amplification@0.1.6 lint /Users/pengcao/projects/aiready/packages/change-amplification
3
+ > @aiready/change-amplification@0.9.5 lint /Users/pengcao/projects/aiready/packages/change-amplification
4
4
  > eslint src --ext .ts
5
5
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/change-amplification@0.9.4 test /Users/pengcao/projects/aiready/packages/change-amplification
3
+ > @aiready/change-amplification@0.10.0 test /Users/pengcao/projects/aiready/packages/change-amplification
4
4
  > vitest run
5
5
 
6
6
  [?25l
@@ -10,7 +10,7 @@
10
10
 
11
11
   Test Files  1 passed (1)
12
12
   Tests  1 passed (1)
13
-  Start at  21:39:02
14
-  Duration  395ms (transform 81ms, setup 0ms, import 98ms, tests 2ms, environment 0ms)
13
+  Start at  09:33:02
14
+  Duration  221ms (transform 39ms, setup 0ms, import 54ms, tests 2ms, environment 0ms)
15
15
 
16
16
  [?25h
package/dist/index.d.mts CHANGED
@@ -1,7 +1,11 @@
1
- import { Issue, IssueType, ScanOptions, AnalysisResult } from '@aiready/core';
1
+ import { ToolProvider, Issue, IssueType, ScanOptions, AnalysisResult } from '@aiready/core';
2
2
 
3
- interface ChangeAmplificationOptions extends ScanOptions {
4
- }
3
+ /**
4
+ * Change Amplification Tool Provider
5
+ */
6
+ declare const ChangeAmplificationProvider: ToolProvider;
7
+
8
+ type ChangeAmplificationOptions = ScanOptions;
5
9
  interface ChangeAmplificationIssue extends Issue {
6
10
  type: IssueType.ChangeAmplification;
7
11
  }
@@ -23,4 +27,4 @@ interface ChangeAmplificationReport {
23
27
 
24
28
  declare function analyzeChangeAmplification(options: ChangeAmplificationOptions): Promise<ChangeAmplificationReport>;
25
29
 
26
- export { type ChangeAmplificationIssue, type ChangeAmplificationOptions, type ChangeAmplificationReport, type FileChangeAmplificationResult, analyzeChangeAmplification };
30
+ export { type ChangeAmplificationIssue, type ChangeAmplificationOptions, ChangeAmplificationProvider, type ChangeAmplificationReport, type FileChangeAmplificationResult, analyzeChangeAmplification };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,11 @@
1
- import { Issue, IssueType, ScanOptions, AnalysisResult } from '@aiready/core';
1
+ import { ToolProvider, Issue, IssueType, ScanOptions, AnalysisResult } from '@aiready/core';
2
2
 
3
- interface ChangeAmplificationOptions extends ScanOptions {
4
- }
3
+ /**
4
+ * Change Amplification Tool Provider
5
+ */
6
+ declare const ChangeAmplificationProvider: ToolProvider;
7
+
8
+ type ChangeAmplificationOptions = ScanOptions;
5
9
  interface ChangeAmplificationIssue extends Issue {
6
10
  type: IssueType.ChangeAmplification;
7
11
  }
@@ -23,4 +27,4 @@ interface ChangeAmplificationReport {
23
27
 
24
28
  declare function analyzeChangeAmplification(options: ChangeAmplificationOptions): Promise<ChangeAmplificationReport>;
25
29
 
26
- export { type ChangeAmplificationIssue, type ChangeAmplificationOptions, type ChangeAmplificationReport, type FileChangeAmplificationResult, analyzeChangeAmplification };
30
+ export { type ChangeAmplificationIssue, type ChangeAmplificationOptions, ChangeAmplificationProvider, type ChangeAmplificationReport, type FileChangeAmplificationResult, analyzeChangeAmplification };
package/dist/index.js CHANGED
@@ -30,9 +30,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ ChangeAmplificationProvider: () => ChangeAmplificationProvider,
33
34
  analyzeChangeAmplification: () => analyzeChangeAmplification
34
35
  });
35
36
  module.exports = __toCommonJS(index_exports);
37
+ var import_core3 = require("@aiready/core");
38
+
39
+ // src/provider.ts
40
+ var import_core2 = require("@aiready/core");
36
41
 
37
42
  // src/analyzer.ts
38
43
  var fs = __toESM(require("fs"));
@@ -136,7 +141,48 @@ async function analyzeChangeAmplification(options) {
136
141
  results
137
142
  };
138
143
  }
144
+
145
+ // src/provider.ts
146
+ var ChangeAmplificationProvider = {
147
+ id: import_core2.ToolName.ChangeAmplification,
148
+ alias: ["change-amp", "change-amplification", "coupling"],
149
+ async analyze(options) {
150
+ const report = await analyzeChangeAmplification(
151
+ options
152
+ );
153
+ return import_core2.SpokeOutputSchema.parse({
154
+ results: report.results,
155
+ summary: report.summary,
156
+ metadata: {
157
+ toolName: import_core2.ToolName.ChangeAmplification,
158
+ version: "0.9.5",
159
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
160
+ }
161
+ });
162
+ },
163
+ score(output, options) {
164
+ const summary = output.summary;
165
+ return {
166
+ toolName: import_core2.ToolName.ChangeAmplification,
167
+ score: summary.score || 0,
168
+ rawMetrics: summary,
169
+ factors: [],
170
+ recommendations: (summary.recommendations || []).map(
171
+ (action) => ({
172
+ action,
173
+ estimatedImpact: 5,
174
+ priority: "medium"
175
+ })
176
+ )
177
+ };
178
+ },
179
+ defaultWeight: 8
180
+ };
181
+
182
+ // src/index.ts
183
+ import_core3.ToolRegistry.register(ChangeAmplificationProvider);
139
184
  // Annotate the CommonJS export names for ESM import in node:
140
185
  0 && (module.exports = {
186
+ ChangeAmplificationProvider,
141
187
  analyzeChangeAmplification
142
188
  });
package/dist/index.mjs CHANGED
@@ -1,6 +1,54 @@
1
1
  import {
2
2
  analyzeChangeAmplification
3
3
  } from "./chunk-GLHIV53G.mjs";
4
+
5
+ // src/index.ts
6
+ import { ToolRegistry } from "@aiready/core";
7
+
8
+ // src/provider.ts
9
+ import {
10
+ ToolName,
11
+ SpokeOutputSchema
12
+ } from "@aiready/core";
13
+ var ChangeAmplificationProvider = {
14
+ id: ToolName.ChangeAmplification,
15
+ alias: ["change-amp", "change-amplification", "coupling"],
16
+ async analyze(options) {
17
+ const report = await analyzeChangeAmplification(
18
+ options
19
+ );
20
+ return SpokeOutputSchema.parse({
21
+ results: report.results,
22
+ summary: report.summary,
23
+ metadata: {
24
+ toolName: ToolName.ChangeAmplification,
25
+ version: "0.9.5",
26
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
27
+ }
28
+ });
29
+ },
30
+ score(output, options) {
31
+ const summary = output.summary;
32
+ return {
33
+ toolName: ToolName.ChangeAmplification,
34
+ score: summary.score || 0,
35
+ rawMetrics: summary,
36
+ factors: [],
37
+ recommendations: (summary.recommendations || []).map(
38
+ (action) => ({
39
+ action,
40
+ estimatedImpact: 5,
41
+ priority: "medium"
42
+ })
43
+ )
44
+ };
45
+ },
46
+ defaultWeight: 8
47
+ };
48
+
49
+ // src/index.ts
50
+ ToolRegistry.register(ChangeAmplificationProvider);
4
51
  export {
52
+ ChangeAmplificationProvider,
5
53
  analyzeChangeAmplification
6
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/change-amplification",
3
- "version": "0.9.5",
3
+ "version": "0.11.0",
4
4
  "description": "AI-Readiness: Change Amplification Detection",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10,7 +10,7 @@
10
10
  "commander": "^14.0.0",
11
11
  "glob": "^13.0.0",
12
12
  "chalk": "^5.3.0",
13
- "@aiready/core": "0.19.5"
13
+ "@aiready/core": "0.21.0"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/node": "^24.0.0",
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "exports": {
23
23
  ".": {
24
+ "types": "./dist/index.d.ts",
24
25
  "import": "./dist/index.mjs",
25
- "require": "./dist/index.js",
26
- "types": "./dist/index.d.ts"
26
+ "require": "./dist/index.js"
27
27
  },
28
28
  "./cli": {
29
+ "types": "./dist/cli.d.ts",
29
30
  "import": "./dist/cli.mjs",
30
- "require": "./dist/cli.js",
31
- "types": "./dist/cli.d.ts"
31
+ "require": "./dist/cli.js"
32
32
  },
33
33
  "./dist/cli.js": {
34
34
  "require": "./dist/cli.js",
package/src/index.ts CHANGED
@@ -1,4 +1,11 @@
1
+ import { ToolRegistry } from '@aiready/core';
2
+ import { ChangeAmplificationProvider } from './provider';
3
+
4
+ // Register with global registry
5
+ ToolRegistry.register(ChangeAmplificationProvider);
6
+
1
7
  export { analyzeChangeAmplification } from './analyzer';
8
+ export { ChangeAmplificationProvider };
2
9
  export type {
3
10
  ChangeAmplificationOptions,
4
11
  ChangeAmplificationReport,
@@ -0,0 +1,58 @@
1
+ import {
2
+ ToolProvider,
3
+ ToolName,
4
+ SpokeOutput,
5
+ ScanOptions,
6
+ ToolScoringOutput,
7
+ AnalysisResult,
8
+ SpokeOutputSchema,
9
+ } from '@aiready/core';
10
+ import { analyzeChangeAmplification } from './analyzer';
11
+ import {
12
+ ChangeAmplificationOptions,
13
+ FileChangeAmplificationResult,
14
+ } from './types';
15
+
16
+ /**
17
+ * Change Amplification Tool Provider
18
+ */
19
+ export const ChangeAmplificationProvider: ToolProvider = {
20
+ id: ToolName.ChangeAmplification,
21
+ alias: ['change-amp', 'change-amplification', 'coupling'],
22
+
23
+ async analyze(options: ScanOptions): Promise<SpokeOutput> {
24
+ const report = await analyzeChangeAmplification(
25
+ options as ChangeAmplificationOptions
26
+ );
27
+
28
+ return SpokeOutputSchema.parse({
29
+ results: report.results as AnalysisResult[],
30
+ summary: report.summary,
31
+ metadata: {
32
+ toolName: ToolName.ChangeAmplification,
33
+ version: '0.9.5',
34
+ timestamp: new Date().toISOString(),
35
+ },
36
+ });
37
+ },
38
+
39
+ score(output: SpokeOutput, options: ScanOptions): ToolScoringOutput {
40
+ const summary = output.summary as any;
41
+
42
+ return {
43
+ toolName: ToolName.ChangeAmplification,
44
+ score: summary.score || 0,
45
+ rawMetrics: summary,
46
+ factors: [],
47
+ recommendations: (summary.recommendations || []).map(
48
+ (action: string) => ({
49
+ action,
50
+ estimatedImpact: 5,
51
+ priority: 'medium',
52
+ })
53
+ ),
54
+ };
55
+ },
56
+
57
+ defaultWeight: 8,
58
+ };
package/src/types.ts CHANGED
@@ -5,7 +5,7 @@ import type {
5
5
  IssueType,
6
6
  } from '@aiready/core';
7
7
 
8
- export interface ChangeAmplificationOptions extends ScanOptions {}
8
+ export type ChangeAmplificationOptions = ScanOptions;
9
9
 
10
10
  export interface ChangeAmplificationIssue extends Issue {
11
11
  type: IssueType.ChangeAmplification;