@aiready/testability 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 +7 -7
- package/.turbo/turbo-test.log +6 -4
- package/README.md +60 -0
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/testability@0.1.
|
|
3
|
+
> @aiready/testability@0.1.5 build /Users/pengcao/projects/aiready/packages/testability
|
|
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
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
[34mCLI[39m Target: es2020
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[
|
|
12
|
+
[32mCJS[39m [1mdist/cli.js [22m[32m19.50 KB[39m
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m12.85 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 379ms
|
|
13
15
|
[32mESM[39m [1mdist/index.mjs [22m[32m152.00 B[39m
|
|
16
|
+
[32mESM[39m [1mdist/chunk-CYZ7DTWN.mjs [22m[32m11.64 KB[39m
|
|
14
17
|
[32mESM[39m [1mdist/cli.mjs [22m[32m6.24 KB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
-
[32mCJS[39m [1mdist/index.js [22m[32m12.85 KB[39m
|
|
17
|
-
[32mCJS[39m [1mdist/cli.js [22m[32m19.50 KB[39m
|
|
18
|
-
[32mCJS[39m ⚡️ Build success in 289ms
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 402ms
|
|
19
19
|
DTS Build start
|
|
20
|
-
DTS ⚡️ Build success in
|
|
20
|
+
DTS ⚡️ Build success in 23828ms
|
|
21
21
|
DTS dist/cli.d.ts 20.00 B
|
|
22
22
|
DTS dist/index.d.ts 2.54 KB
|
|
23
23
|
DTS dist/cli.d.mts 20.00 B
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/testability@0.1.
|
|
3
|
+
> @aiready/testability@0.1.5 test /Users/pengcao/projects/aiready/packages/testability
|
|
4
4
|
> vitest run
|
|
5
5
|
|
|
6
6
|
[?25l
|
|
7
7
|
[1m[46m RUN [49m[22m [36mv4.0.18 [39m[90m/Users/pengcao/projects/aiready/packages/testability[39m
|
|
8
8
|
|
|
9
|
-
[32m✓[39m src/__tests__/analyzer.test.ts [2m([22m[2m3 tests[22m[2m)[22m[
|
|
9
|
+
[32m✓[39m src/__tests__/analyzer.test.ts [2m([22m[2m3 tests[22m[2m)[22m[33m 1236[2mms[22m[39m
|
|
10
|
+
[33m[2m✓[22m[39m should calculate ratio of test files to source files [33m 732[2mms[22m[39m
|
|
11
|
+
[33m[2m✓[22m[39m should detect interfaces with too many methods [33m 473[2mms[22m[39m
|
|
10
12
|
|
|
11
13
|
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
12
14
|
[2m Tests [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
13
|
-
[2m Start at [22m
|
|
14
|
-
[2m Duration [22m
|
|
15
|
+
[2m Start at [22m 14:38:43
|
|
16
|
+
[2m Duration [22m 21.61s[2m (transform 5.52s, setup 0ms, import 17.77s, tests 1.24s, environment 1ms)[22m
|
|
15
17
|
|
|
16
18
|
[?25h
|
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# @aiready/testability
|
|
2
|
+
|
|
3
|
+
> AIReady Spoke: Measures the "Verify" score of the codebase—how easily an AI agent can write tests and verify its own changes autonomously.
|
|
4
|
+
|
|
5
|
+
[](https://npmjs.com/package/@aiready/testability)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
The "Verify" loop is the most expensive part of the AI agent workflow. Codebases with high global state, missing dependency injection, or poor test coverage force agents into long, expensive retry loops. The **Testability Index** quantifies these frictions.
|
|
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
|
+
```
|
|
35
|
+
|
|
36
|
+
## Features
|
|
37
|
+
|
|
38
|
+
- **Purity analysis**: Detects usage of global state and side effects that make unit testing difficult for agents.
|
|
39
|
+
- **Dependency Map**: Evaluates the usage of DI (Dependency Injection) patterns that allow agents to mock boundaries easily.
|
|
40
|
+
- **Verification Ratio**: Measures the presence and quality of existing tests relative to source files.
|
|
41
|
+
- **Retry Risk**: Specifically flags patterns that cause AI agents to enter infinite "fix-test-fail" loops.
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pnpm add @aiready/testability
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
This tool is designed to be run through the unified AIReady CLI.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Scan for testability and verification risk
|
|
55
|
+
aiready scan . --tools testability
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/testability",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Measures how safely and verifiably AI-generated changes can be made to your codebase",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"chalk": "^5.3.0",
|
|
41
41
|
"commander": "^14.0.0",
|
|
42
42
|
"glob": "^11.0.0",
|
|
43
|
-
"@aiready/core": "0.9.
|
|
43
|
+
"@aiready/core": "0.9.32"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^24.0.0",
|