@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.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/testability@0.1.3 build /Users/pengcao/projects/aiready/packages/testability
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
  CLI Building entry: src/cli.ts, src/index.ts
@@ -9,15 +9,15 @@
9
9
  CLI Target: es2020
10
10
  CJS Build start
11
11
  ESM Build start
12
- ESM dist/chunk-CYZ7DTWN.mjs 11.64 KB
12
+ CJS dist/cli.js 19.50 KB
13
+ CJS dist/index.js 12.85 KB
14
+ CJS ⚡️ Build success in 379ms
13
15
  ESM dist/index.mjs 152.00 B
16
+ ESM dist/chunk-CYZ7DTWN.mjs 11.64 KB
14
17
  ESM dist/cli.mjs 6.24 KB
15
- ESM ⚡️ Build success in 282ms
16
- CJS dist/index.js 12.85 KB
17
- CJS dist/cli.js 19.50 KB
18
- CJS ⚡️ Build success in 289ms
18
+ ESM ⚡️ Build success in 402ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 12730ms
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
@@ -1,16 +1,18 @@
1
1
 
2
2
  
3
- > @aiready/testability@0.1.3 test /Users/pengcao/projects/aiready/packages/testability
3
+ > @aiready/testability@0.1.5 test /Users/pengcao/projects/aiready/packages/testability
4
4
  > vitest run
5
5
 
6
6
  [?25l
7
7
   RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/testability
8
8
 
9
- ✓ src/__tests__/analyzer.test.ts (3 tests) 102ms
9
+ ✓ src/__tests__/analyzer.test.ts (3 tests) 1236ms
10
+ ✓ should calculate ratio of test files to source files  732ms
11
+ ✓ should detect interfaces with too many methods  473ms
10
12
 
11
13
   Test Files  1 passed (1)
12
14
   Tests  3 passed (3)
13
-  Start at  22:33:59
14
-  Duration  2.00s (transform 305ms, setup 0ms, import 1.16s, tests 102ms, environment 0ms)
15
+  Start at  14:38:43
16
+  Duration  21.61s (transform 5.52s, setup 0ms, import 17.77s, tests 1.24s, environment 1ms)
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
+ [![npm version](https://img.shields.io/npm/v/@aiready/testability.svg)](https://npmjs.com/package/@aiready/testability)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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",
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.30"
43
+ "@aiready/core": "0.9.32"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "^24.0.0",