@aiready/doc-drift 0.1.3 → 0.1.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.1.3 build /Users/pengcao/projects/aiready/packages/doc-drift
3
+ > @aiready/doc-drift@0.1.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
@@ -10,7 +10,7 @@
10
10
  CJS Build start
11
11
  ESM Build start
12
12
 
13
- [10:33:19 PM]  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
13
+ [1:03:47 PM]  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
14
14
 
15
15
  package.json:33:6:
16
16
   33 │ "types": "./dist/index.d.ts"
@@ -31,7 +31,7 @@
31
31
 
32
32
 
33
33
 
34
- [10:33:19 PM]  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
34
+ [1:03:47 PM]  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
35
35
 
36
36
  package.json:33:6:
37
37
   33 │ "types": "./dist/index.d.ts"
@@ -53,13 +53,13 @@
53
53
 
54
54
  CJS dist/cli.js 8.49 KB
55
55
  CJS dist/index.js 6.50 KB
56
- CJS ⚡️ Build success in 382ms
56
+ CJS ⚡️ Build success in 269ms
57
57
  ESM dist/index.mjs 88.00 B
58
- ESM dist/cli.mjs 1.36 KB
59
58
  ESM dist/chunk-TSLAGWBV.mjs 5.71 KB
60
- ESM ⚡️ Build success in 382ms
59
+ ESM dist/cli.mjs 1.36 KB
60
+ ESM ⚡️ Build success in 276ms
61
61
  DTS Build start
62
- DTS ⚡️ Build success in 11215ms
62
+ DTS ⚡️ Build success in 7943ms
63
63
  DTS dist/cli.d.ts 108.00 B
64
64
  DTS dist/index.d.ts 950.00 B
65
65
  DTS dist/cli.d.mts 108.00 B
@@ -1,16 +1,16 @@
1
1
 
2
2
  
3
- > @aiready/doc-drift@0.1.3 test /Users/pengcao/projects/aiready/packages/doc-drift
3
+ > @aiready/doc-drift@0.1.4 test /Users/pengcao/projects/aiready/packages/doc-drift
4
4
  > vitest run
5
5
 
6
6
 
7
7
   RUN  v1.6.1 /Users/pengcao/projects/aiready/packages/doc-drift
8
8
 
9
- ✓ src/__tests__/analyzer.test.ts  (1 test) 15ms
9
+ ✓ src/__tests__/analyzer.test.ts  (1 test) 26ms
10
10
 
11
11
   Test Files  1 passed (1)
12
12
   Tests  1 passed (1)
13
-  Start at  22:33:59
14
-  Duration  2.26s (transform 255ms, setup 0ms, collect 1.44s, tests 15ms, environment 0ms, prepare 210ms)
13
+  Start at  13:04:26
14
+  Duration  4.00s (transform 403ms, setup 0ms, collect 1.87s, tests 26ms, environment 0ms, prepare 660ms)
15
15
 
16
16
  [?25h
package/README.md CHANGED
@@ -1,44 +1,55 @@
1
1
  # @aiready/doc-drift
2
2
 
3
- > AIReady Spoke: Tracks documentation freshness versus code churn to pinpoint outdated comments that confuse AI models.
3
+ > AIReady Spoke: Tracks documentation freshness versus code churn.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@aiready/doc-drift.svg)](https://npmjs.com/package/@aiready/doc-drift)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
8
  ## Overview
9
9
 
10
- AI models rely heavily on inline documentation and function signatures. When code changes but comments don't, AI models often hallucinate based on the stale documentation. The **Documentation Drift** analyzer combines AST parsing with git log traversal to identify instances where comments are likely lagging behind actual implementation logic.
10
+ The **Documentation Drift** analyzer combines AST parsing with git log traversal to identify instances where comments are likely lagging behind actual implementation logic.
11
+
12
+ ## 🏛️ Architecture
13
+
14
+ ```
15
+ 🎯 USER
16
+
17
+
18
+ 🎛️ @aiready/cli (orchestrator)
19
+ │ │ │ │ │ │ │ │ │
20
+ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼
21
+ [PAT] [CTX] [CON] [AMP] [DEP] [DOC] [SIG] [AGT] [TST]
22
+ │ │ │ │ │ │ │ │ │
23
+ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
24
+
25
+
26
+ 🏢 @aiready/core
27
+
28
+ Legend:
29
+ PAT = pattern-detect CTX = context-analyzer
30
+ CON = consistency AMP = change-amplification
31
+ DEP = deps-health DOC = doc-drift ★
32
+ SIG = ai-signal-clarity AGT = agent-grounding
33
+ TST = testability ★ = YOU ARE HERE
34
+ ```
11
35
 
12
36
  ## Features
13
37
 
14
38
  - **Drift Detection**: Detects documentation older than the code it describes based on git history timestamps.
15
- - **Signature Mismatches**: Finds missing documented `@param` tags when new arguments are added to functions.
16
- - **Complexity Guardrails**: Identifies long or complex functions that completely lack documentation.
39
+ - **Signature Mismatches**: Finds missing documented `@param` tags when new arguments are added.
17
40
 
18
41
  ## Installation
19
42
 
20
43
  ```bash
21
- npm install -g @aiready/cli @aiready/doc-drift
44
+ pnpm add @aiready/doc-drift
22
45
  ```
23
46
 
24
47
  ## Usage
25
48
 
26
- This tool is designed to be run through the unified AIReady CLI.
27
-
28
49
  ```bash
29
- # Scan a codebase for documentation drift
30
50
  aiready scan . --tools doc-drift
31
-
32
- # Output detailed JSON report
33
- aiready scan . --tools doc-drift --output json
34
51
  ```
35
52
 
36
- ## How It Works
37
-
38
- 1. Parses your codebase into an Abstract Syntax Tree (AST).
39
- 2. Uses `git log` to find the last modified timestamp for the code body limits vs the associated comment block.
40
- 3. Calculates a freshness ratio. If the comment trails the code body by several months (`--stale-months`), it flags the function as having a high risk of documentary drift.
41
-
42
53
  ## License
43
54
 
44
55
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/doc-drift",
3
- "version": "0.1.3",
3
+ "version": "0.1.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": "^12.0.0",
11
11
  "glob": "^10.3.12",
12
12
  "picocolors": "^1.0.0",
13
- "@aiready/core": "0.9.30"
13
+ "@aiready/core": "0.9.31"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/node": "^20.12.7",