@aiready/doc-drift 0.13.2 → 0.13.4

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/doc-drift@0.13.2 build /Users/pengcao/projects/aiready/packages/doc-drift
3
+ > @aiready/doc-drift@0.13.4 build /Users/pengcao/projects/aiready/packages/doc-drift
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,16 +9,16 @@
9
9
  CLI Target: es2020
10
10
  CJS Build start
11
11
  ESM Build start
12
- CJS dist/cli.js 6.48 KB
13
- CJS dist/index.js 6.86 KB
14
- CJS ⚡️ Build success in 58ms
12
+ ESM dist/chunk-5BGWZWHD.mjs 3.81 KB
15
13
  ESM dist/index.mjs 2.37 KB
16
14
  ESM dist/cli.mjs 1.39 KB
17
- ESM dist/chunk-5BGWZWHD.mjs 3.81 KB
18
- ESM ⚡️ Build success in 60ms
15
+ ESM ⚡️ Build success in 200ms
16
+ CJS dist/index.js 6.86 KB
17
+ CJS dist/cli.js 6.48 KB
18
+ CJS ⚡️ Build success in 200ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 1820ms
20
+ DTS ⚡️ Build success in 3500ms
21
21
  DTS dist/cli.d.ts 108.00 B
22
- DTS dist/index.d.ts 1.30 KB
22
+ DTS dist/index.d.ts 2.12 KB
23
23
  DTS dist/cli.d.mts 108.00 B
24
- DTS dist/index.d.mts 1.30 KB
24
+ DTS dist/index.d.mts 2.12 KB
@@ -1,6 +1,10 @@
1
-
2
- 
3
- > @aiready/doc-drift@0.11.18 lint /Users/pengcao/projects/aiready/packages/doc-drift
4
- > eslint src --ext .ts
5
-
6
-  ELIFECYCLE  Command failed.
1
+
2
+ > @aiready/doc-drift@0.13.2 lint /Users/pengcao/projects/aiready/packages/doc-drift
3
+ > eslint src --ext .ts
4
+
5
+
6
+ /Users/pengcao/projects/aiready/packages/doc-drift/src/analyzer.ts
7
+ 10:3 warning 'Language' is defined but never used @typescript-eslint/no-unused-vars
8
+
9
+ ✖ 1 problem (0 errors, 1 warning)
10
+
@@ -1,18 +1,18 @@
1
1
 
2
2
  
3
- > @aiready/doc-drift@0.13.1 test /Users/pengcao/projects/aiready/packages/doc-drift
3
+ > @aiready/doc-drift@0.13.3 test /Users/pengcao/projects/aiready/packages/doc-drift
4
4
  > vitest run
5
5
 
6
6
  [?25l
7
7
   RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/doc-drift
8
8
 
9
- ✓ src/__tests__/scoring.test.ts (2 tests) 2ms
10
- ✓ src/__tests__/provider.test.ts (2 tests) 41ms
11
- ✓ src/__tests__/analyzer.test.ts (1 test) 173ms
9
+ ✓ src/__tests__/scoring.test.ts (2 tests) 12ms
10
+ ✓ src/__tests__/analyzer.test.ts (1 test) 47ms
11
+ ✓ src/__tests__/provider.test.ts (2 tests) 8ms
12
12
 
13
13
   Test Files  3 passed (3)
14
14
   Tests  5 passed (5)
15
-  Start at  02:00:17
16
-  Duration  2.90s (transform 530ms, setup 0ms, import 5.10s, tests 216ms, environment 0ms)
15
+  Start at  10:36:26
16
+  Duration  1.89s (transform 1.09s, setup 0ms, import 3.19s, tests 66ms, environment 0ms)
17
17
 
18
18
  [?25h
package/dist/index.d.mts CHANGED
@@ -1,34 +1,56 @@
1
1
  import * as _aiready_core from '@aiready/core';
2
- import { Issue, IssueType, ScanOptions, ToolScoringOutput } from '@aiready/core';
2
+ import { Issue, IssueType, ScanOptions, DocDriftRisk, ToolScoringOutput } from '@aiready/core';
3
3
 
4
4
  /**
5
5
  * Documentation Drift Tool Provider
6
6
  */
7
7
  declare const DocDriftProvider: _aiready_core.ToolProvider;
8
8
 
9
+ /**
10
+ * Options for documentation drift analysis
11
+ */
9
12
  interface DocDriftOptions extends ScanOptions {
10
13
  /** Maximum commit distance to check for drift */
11
14
  maxCommits?: number;
12
15
  /** Consider comments older than this many months as outdated */
13
16
  staleMonths?: number;
14
17
  }
18
+ /**
19
+ * Documentation drift specific issue
20
+ */
15
21
  interface DocDriftIssue extends Issue {
22
+ /** Type identifier for doc-drift issues */
16
23
  type: IssueType.DocDrift;
17
24
  }
25
+ /**
26
+ * Comprehensive report for doc-drift analysis
27
+ */
18
28
  interface DocDriftReport {
29
+ /** High-level summary of the drift status */
19
30
  summary: {
31
+ /** Total number of files checked */
20
32
  filesAnalyzed: number;
33
+ /** Total number of exported functions/classes checked */
21
34
  functionsAnalyzed: number;
35
+ /** Final doc-drift score (0-100) */
22
36
  score: number;
23
- rating: 'minimal' | 'low' | 'moderate' | 'high' | 'severe';
37
+ /** Qualitative rating (minimal to severe) */
38
+ rating: DocDriftRisk['rating'];
24
39
  };
40
+ /** List of detected drift points */
25
41
  issues: DocDriftIssue[];
42
+ /** Detailed counts for the three drift dimensions */
26
43
  rawData: {
44
+ /** Number of exports without JSDoc/comments */
27
45
  uncommentedExports: number;
46
+ /** Total number of exports in the analyzed set */
28
47
  totalExports: number;
48
+ /** Number of comments considered stale/outdated */
29
49
  outdatedComments: number;
50
+ /** Count of complex functions without sufficient documentation */
30
51
  undocumentedComplexity: number;
31
52
  };
53
+ /** AI-generated remediation advice */
32
54
  recommendations: string[];
33
55
  }
34
56
 
package/dist/index.d.ts CHANGED
@@ -1,34 +1,56 @@
1
1
  import * as _aiready_core from '@aiready/core';
2
- import { Issue, IssueType, ScanOptions, ToolScoringOutput } from '@aiready/core';
2
+ import { Issue, IssueType, ScanOptions, DocDriftRisk, ToolScoringOutput } from '@aiready/core';
3
3
 
4
4
  /**
5
5
  * Documentation Drift Tool Provider
6
6
  */
7
7
  declare const DocDriftProvider: _aiready_core.ToolProvider;
8
8
 
9
+ /**
10
+ * Options for documentation drift analysis
11
+ */
9
12
  interface DocDriftOptions extends ScanOptions {
10
13
  /** Maximum commit distance to check for drift */
11
14
  maxCommits?: number;
12
15
  /** Consider comments older than this many months as outdated */
13
16
  staleMonths?: number;
14
17
  }
18
+ /**
19
+ * Documentation drift specific issue
20
+ */
15
21
  interface DocDriftIssue extends Issue {
22
+ /** Type identifier for doc-drift issues */
16
23
  type: IssueType.DocDrift;
17
24
  }
25
+ /**
26
+ * Comprehensive report for doc-drift analysis
27
+ */
18
28
  interface DocDriftReport {
29
+ /** High-level summary of the drift status */
19
30
  summary: {
31
+ /** Total number of files checked */
20
32
  filesAnalyzed: number;
33
+ /** Total number of exported functions/classes checked */
21
34
  functionsAnalyzed: number;
35
+ /** Final doc-drift score (0-100) */
22
36
  score: number;
23
- rating: 'minimal' | 'low' | 'moderate' | 'high' | 'severe';
37
+ /** Qualitative rating (minimal to severe) */
38
+ rating: DocDriftRisk['rating'];
24
39
  };
40
+ /** List of detected drift points */
25
41
  issues: DocDriftIssue[];
42
+ /** Detailed counts for the three drift dimensions */
26
43
  rawData: {
44
+ /** Number of exports without JSDoc/comments */
27
45
  uncommentedExports: number;
46
+ /** Total number of exports in the analyzed set */
28
47
  totalExports: number;
48
+ /** Number of comments considered stale/outdated */
29
49
  outdatedComments: number;
50
+ /** Count of complex functions without sufficient documentation */
30
51
  undocumentedComplexity: number;
31
52
  };
53
+ /** AI-generated remediation advice */
32
54
  recommendations: string[];
33
55
  }
34
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/doc-drift",
3
- "version": "0.13.2",
3
+ "version": "0.13.4",
4
4
  "description": "AI-Readiness: Documentation Drift 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
  "picocolors": "^1.0.0",
13
- "@aiready/core": "0.23.2"
13
+ "@aiready/core": "0.23.4"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/node": "^24.0.0",
package/src/analyzer.ts CHANGED
@@ -7,7 +7,6 @@ import {
7
7
  IssueType,
8
8
  emitProgress,
9
9
  getParser,
10
- Language,
11
10
  } from '@aiready/core';
12
11
  import type { DocDriftOptions, DocDriftReport, DocDriftIssue } from './types';
13
12
  import { readFileSync } from 'fs';
package/src/types.ts CHANGED
@@ -1,5 +1,13 @@
1
- import type { ScanOptions, Issue, IssueType } from '@aiready/core';
1
+ import type {
2
+ ScanOptions,
3
+ Issue,
4
+ IssueType,
5
+ DocDriftRisk,
6
+ } from '@aiready/core';
2
7
 
8
+ /**
9
+ * Options for documentation drift analysis
10
+ */
3
11
  export interface DocDriftOptions extends ScanOptions {
4
12
  /** Maximum commit distance to check for drift */
5
13
  maxCommits?: number;
@@ -7,23 +15,42 @@ export interface DocDriftOptions extends ScanOptions {
7
15
  staleMonths?: number;
8
16
  }
9
17
 
18
+ /**
19
+ * Documentation drift specific issue
20
+ */
10
21
  export interface DocDriftIssue extends Issue {
22
+ /** Type identifier for doc-drift issues */
11
23
  type: IssueType.DocDrift;
12
24
  }
13
25
 
26
+ /**
27
+ * Comprehensive report for doc-drift analysis
28
+ */
14
29
  export interface DocDriftReport {
30
+ /** High-level summary of the drift status */
15
31
  summary: {
32
+ /** Total number of files checked */
16
33
  filesAnalyzed: number;
34
+ /** Total number of exported functions/classes checked */
17
35
  functionsAnalyzed: number;
36
+ /** Final doc-drift score (0-100) */
18
37
  score: number;
19
- rating: 'minimal' | 'low' | 'moderate' | 'high' | 'severe';
38
+ /** Qualitative rating (minimal to severe) */
39
+ rating: DocDriftRisk['rating'];
20
40
  };
41
+ /** List of detected drift points */
21
42
  issues: DocDriftIssue[];
43
+ /** Detailed counts for the three drift dimensions */
22
44
  rawData: {
45
+ /** Number of exports without JSDoc/comments */
23
46
  uncommentedExports: number;
47
+ /** Total number of exports in the analyzed set */
24
48
  totalExports: number;
49
+ /** Number of comments considered stale/outdated */
25
50
  outdatedComments: number;
51
+ /** Count of complex functions without sufficient documentation */
26
52
  undocumentedComplexity: number;
27
53
  };
54
+ /** AI-generated remediation advice */
28
55
  recommendations: string[];
29
56
  }