@aiready/doc-drift 0.1.3 → 0.1.5
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/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-test.log +4 -4
- package/README.md +28 -17
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/doc-drift@0.1.
|
|
3
|
+
> @aiready/doc-drift@0.1.5 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
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
|
|
13
|
-
[90m[[
|
|
13
|
+
[90m[[90m2:33:41 PM[90m][39m [43m[30m WARN [39m[49m [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mThe condition "types" here will never be used as it comes after both "import" and "require"[0m [package.json]
|
|
14
14
|
|
|
15
15
|
package.json:33:6:
|
|
16
16
|
[37m 33 │ [32m"types"[37m: "./dist/index.d.ts"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
[90m[[
|
|
34
|
+
[90m[[90m2:33:42 PM[90m][39m [43m[30m WARN [39m[49m [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mThe condition "types" here will never be used as it comes after both "import" and "require"[0m [package.json]
|
|
35
35
|
|
|
36
36
|
package.json:33:6:
|
|
37
37
|
[37m 33 │ [32m"types"[37m: "./dist/index.d.ts"
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
[32mCJS[39m [1mdist/cli.js [22m[32m8.49 KB[39m
|
|
55
54
|
[32mCJS[39m [1mdist/index.js [22m[32m6.50 KB[39m
|
|
56
|
-
[32mCJS[39m
|
|
57
|
-
[
|
|
55
|
+
[32mCJS[39m [1mdist/cli.js [22m[32m8.49 KB[39m
|
|
56
|
+
[32mCJS[39m ⚡️ Build success in 2383ms
|
|
58
57
|
[32mESM[39m [1mdist/cli.mjs [22m[32m1.36 KB[39m
|
|
58
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m88.00 B[39m
|
|
59
59
|
[32mESM[39m [1mdist/chunk-TSLAGWBV.mjs [22m[32m5.71 KB[39m
|
|
60
|
-
[32mESM[39m ⚡️ Build success in
|
|
60
|
+
[32mESM[39m ⚡️ Build success in 2526ms
|
|
61
61
|
DTS Build start
|
|
62
|
-
DTS ⚡️ Build success in
|
|
62
|
+
DTS ⚡️ Build success in 72201ms
|
|
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
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/doc-drift@0.1.
|
|
3
|
+
> @aiready/doc-drift@0.1.5 test /Users/pengcao/projects/aiready/packages/doc-drift
|
|
4
4
|
> vitest run
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
[7m[1m[36m RUN [39m[22m[27m [36mv1.6.1[39m [90m/Users/pengcao/projects/aiready/packages/doc-drift[39m
|
|
8
8
|
|
|
9
|
-
[32m✓[39m src/__tests__/analyzer.test.ts [2m ([22m[2m1 test[22m[2m)[22m[
|
|
9
|
+
[32m✓[39m src/__tests__/analyzer.test.ts [2m ([22m[2m1 test[22m[2m)[22m[33m 777[2mms[22m[39m
|
|
10
10
|
|
|
11
11
|
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
12
12
|
[2m Tests [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
13
|
-
[2m Start at [22m
|
|
14
|
-
[2m Duration [22m
|
|
13
|
+
[2m Start at [22m 14:38:44
|
|
14
|
+
[2m Duration [22m 33.39s[2m (transform 5.68s, setup 0ms, collect 23.73s, tests 777ms, environment 0ms, prepare 4.26s)[22m
|
|
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
|
|
3
|
+
> AIReady Spoke: Tracks documentation freshness versus code churn.
|
|
4
4
|
|
|
5
5
|
[](https://npmjs.com/package/@aiready/doc-drift)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
|
|
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
|
|
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
|
-
|
|
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
|
+
"version": "0.1.5",
|
|
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.
|
|
13
|
+
"@aiready/core": "0.9.32"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/node": "^20.12.7",
|