@aiready/cli 0.14.14 → 0.14.16
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/CONTRIBUTING.md +86 -1
- package/LICENSE +21 -0
- package/README.md +152 -52
- package/dist/cli.js +73 -12
- package/dist/cli.mjs +73 -12
- package/package.json +44 -14
- package/.aiready/aiready-report-20260227-133806.json +0 -7805
- package/.aiready/aiready-report-20260227-133938.json +0 -7951
- package/.aiready/aiready-report-20260228-003433.json +0 -7939
- package/.aiready/aiready-report-20260228-003613.json +0 -771
- package/.aiready/aiready-report-20260314-164626.json +0 -59
- package/.aiready/aiready-report-20260314-164741.json +0 -59
- package/.aiready/aiready-report-20260319-201106.json +0 -5566
- package/.aiready/aiready-report-20260319-201511.json +0 -5566
- package/.aiready/aiready-report-20260319-202017.json +0 -5708
- package/.github/FUNDING.yml +0 -5
- package/.turbo/turbo-build.log +0 -29
- package/.turbo/turbo-lint.log +0 -0
- package/.turbo/turbo-test.log +0 -76
- package/aiready-report.json +0 -30703
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/clover.xml +0 -865
- package/coverage/coverage-final.json +0 -15
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -146
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -210
- package/coverage/src/commands/agent-grounding.ts.html +0 -271
- package/coverage/src/commands/ai-signal-clarity.ts.html +0 -253
- package/coverage/src/commands/change-amplification.ts.html +0 -94
- package/coverage/src/commands/consistency.ts.html +0 -781
- package/coverage/src/commands/context.ts.html +0 -871
- package/coverage/src/commands/deps-health.ts.html +0 -280
- package/coverage/src/commands/doc-drift.ts.html +0 -271
- package/coverage/src/commands/index.html +0 -281
- package/coverage/src/commands/patterns.ts.html +0 -745
- package/coverage/src/commands/scan.ts.html +0 -1393
- package/coverage/src/commands/testability.ts.html +0 -304
- package/coverage/src/commands/upload.ts.html +0 -466
- package/coverage/src/commands/visualize.ts.html +0 -1027
- package/coverage/src/index.html +0 -116
- package/coverage/src/index.ts.html +0 -1372
- package/coverage/src/utils/helpers.ts.html +0 -559
- package/coverage/src/utils/index.html +0 -116
- package/docs/SPOKE_GUIDE.md +0 -184
- package/packages/core/src/.aiready/aiready-report-20260314-161145.json +0 -224
- package/packages/core/src/.aiready/aiready-report-20260314-161152.json +0 -235
- package/packages/pattern-detect/src/.aiready/aiready-report-20260314-161139.json +0 -224
- package/src/.aiready/aiready-report-20260312-103623.json +0 -32574
- package/src/.aiready/aiready-report-20260312-110843.json +0 -28740
- package/src/.aiready/aiready-report-20260312-110955.json +0 -28740
- package/src/.aiready/aiready-report-20260314-203209.json +0 -30713
- package/src/.aiready/aiready-report-20260314-203736.json +0 -30713
- package/src/.aiready/aiready-report-20260314-203857.json +0 -30713
- package/src/.aiready/aiready-report-20260314-204047.json +0 -30713
- package/src/.aiready/aiready-report-20260318-002110.json +0 -28782
- package/src/__tests__/cli.test.ts +0 -85
- package/src/__tests__/config-shape.test.ts +0 -105
- package/src/__tests__/unified.test.ts +0 -95
- package/src/cli.ts +0 -333
- package/src/commands/__tests__/agent-grounding.test.ts +0 -24
- package/src/commands/__tests__/ai-signal-clarity.test.ts +0 -32
- package/src/commands/__tests__/consistency.test.ts +0 -100
- package/src/commands/__tests__/deps-health.test.ts +0 -26
- package/src/commands/__tests__/doc-drift.test.ts +0 -26
- package/src/commands/__tests__/extra-commands.test.ts +0 -168
- package/src/commands/__tests__/init.test.ts +0 -51
- package/src/commands/__tests__/scan.test.ts +0 -153
- package/src/commands/__tests__/testability.test.ts +0 -36
- package/src/commands/__tests__/upload.test.ts +0 -50
- package/src/commands/__tests__/visualize.test.ts +0 -78
- package/src/commands/agent-grounding.ts +0 -62
- package/src/commands/ai-signal-clarity.ts +0 -1
- package/src/commands/bug.ts +0 -99
- package/src/commands/change-amplification.ts +0 -3
- package/src/commands/consistency.ts +0 -232
- package/src/commands/context.ts +0 -262
- package/src/commands/deps-health.ts +0 -1
- package/src/commands/doc-drift.ts +0 -1
- package/src/commands/index.ts +0 -20
- package/src/commands/init.ts +0 -199
- package/src/commands/patterns.ts +0 -222
- package/src/commands/report-formatter.ts +0 -267
- package/src/commands/scan.ts +0 -432
- package/src/commands/shared/configured-tool-action.ts +0 -35
- package/src/commands/shared/standard-tool-actions.ts +0 -126
- package/src/commands/testability.ts +0 -73
- package/src/commands/upload.ts +0 -129
- package/src/commands/visualize.ts +0 -321
- package/src/index.ts +0 -465
- package/src/utils/__tests__/helpers.test.ts +0 -35
- package/src/utils/helpers.ts +0 -234
- package/tsconfig.json +0 -11
- package/tsconfig.tsbuildinfo +0 -1
- package/vitest.config.ts +0 -13
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for src/utils</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../index.html">All files</a> src/utils</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">52.23% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>35/67</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">37.2% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>16/43</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">53.84% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>7/13</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">51.56% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>33/64</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line medium'></div>
|
|
65
|
-
<div class="pad1">
|
|
66
|
-
<table class="coverage-summary">
|
|
67
|
-
<thead>
|
|
68
|
-
<tr>
|
|
69
|
-
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
70
|
-
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
71
|
-
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
72
|
-
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
73
|
-
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
74
|
-
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
75
|
-
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
76
|
-
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
77
|
-
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
78
|
-
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
79
|
-
</tr>
|
|
80
|
-
</thead>
|
|
81
|
-
<tbody><tr>
|
|
82
|
-
<td class="file medium" data-value="helpers.ts"><a href="helpers.ts.html">helpers.ts</a></td>
|
|
83
|
-
<td data-value="52.23" class="pic medium">
|
|
84
|
-
<div class="chart"><div class="cover-fill" style="width: 52%"></div><div class="cover-empty" style="width: 48%"></div></div>
|
|
85
|
-
</td>
|
|
86
|
-
<td data-value="52.23" class="pct medium">52.23%</td>
|
|
87
|
-
<td data-value="67" class="abs medium">35/67</td>
|
|
88
|
-
<td data-value="37.2" class="pct low">37.2%</td>
|
|
89
|
-
<td data-value="43" class="abs low">16/43</td>
|
|
90
|
-
<td data-value="53.84" class="pct medium">53.84%</td>
|
|
91
|
-
<td data-value="13" class="abs medium">7/13</td>
|
|
92
|
-
<td data-value="51.56" class="pct medium">51.56%</td>
|
|
93
|
-
<td data-value="64" class="abs medium">33/64</td>
|
|
94
|
-
</tr>
|
|
95
|
-
|
|
96
|
-
</tbody>
|
|
97
|
-
</table>
|
|
98
|
-
</div>
|
|
99
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
100
|
-
</div><!-- /wrapper -->
|
|
101
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
|
-
Code coverage generated by
|
|
103
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2026-03-09T03:44:16.153Z
|
|
105
|
-
</div>
|
|
106
|
-
<script src="../../prettify.js"></script>
|
|
107
|
-
<script>
|
|
108
|
-
window.onload = function () {
|
|
109
|
-
prettyPrint();
|
|
110
|
-
};
|
|
111
|
-
</script>
|
|
112
|
-
<script src="../../sorter.js"></script>
|
|
113
|
-
<script src="../../block-navigation.js"></script>
|
|
114
|
-
</body>
|
|
115
|
-
</html>
|
|
116
|
-
|
package/docs/SPOKE_GUIDE.md
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
# Building a New AIReady Spoke
|
|
2
|
-
|
|
3
|
-
This guide explains how to build a new analysis tool ("spoke") and integrate it into the AIReady ecosystem. AIReady uses a hub-and-spoke architecture where independent tools are coordinated by a central CLI and Hub (@aiready/core).
|
|
4
|
-
|
|
5
|
-
## 🚀 Getting Started
|
|
6
|
-
|
|
7
|
-
### 1. Create Package Structure
|
|
8
|
-
|
|
9
|
-
If you are contributing to the monorepo:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
mkdir -p packages/your-tool/src
|
|
13
|
-
cd packages/your-tool
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
### 2. Create `package.json`
|
|
17
|
-
|
|
18
|
-
Your tool should depend on `@aiready/core` for shared types and utilities.
|
|
19
|
-
|
|
20
|
-
```json
|
|
21
|
-
{
|
|
22
|
-
"name": "@aiready/your-tool",
|
|
23
|
-
"version": "0.1.0",
|
|
24
|
-
"description": "Brief description of what this tool does",
|
|
25
|
-
"main": "./dist/index.js",
|
|
26
|
-
"module": "./dist/index.mjs",
|
|
27
|
-
"types": "./dist/index.d.ts",
|
|
28
|
-
"bin": {
|
|
29
|
-
"aiready-yourtool": "./dist/cli.js"
|
|
30
|
-
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts",
|
|
33
|
-
"dev": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --watch",
|
|
34
|
-
"test": "vitest run",
|
|
35
|
-
"lint": "eslint src",
|
|
36
|
-
"clean": "rm -rf dist"
|
|
37
|
-
},
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"@aiready/core": "workspace:*",
|
|
40
|
-
"commander": "^12.1.0"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"tsup": "^8.3.5"
|
|
44
|
-
},
|
|
45
|
-
"keywords": ["aiready", "your-keywords"],
|
|
46
|
-
"license": "MIT"
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 3. Implement the Analysis Logic
|
|
51
|
-
|
|
52
|
-
Create `src/analyzer.ts` to contain your core logic.
|
|
53
|
-
|
|
54
|
-
```typescript
|
|
55
|
-
import { scanFiles, readFileContent } from '@aiready/core';
|
|
56
|
-
import type {
|
|
57
|
-
AnalysisResult,
|
|
58
|
-
Issue,
|
|
59
|
-
ScanOptions,
|
|
60
|
-
SpokeOutput,
|
|
61
|
-
} from '@aiready/core';
|
|
62
|
-
|
|
63
|
-
export async function analyzeYourTool(
|
|
64
|
-
options: ScanOptions
|
|
65
|
-
): Promise<SpokeOutput> {
|
|
66
|
-
const files = await scanFiles(options);
|
|
67
|
-
const results: AnalysisResult[] = [];
|
|
68
|
-
|
|
69
|
-
// Your analysis logic here
|
|
70
|
-
// 1. Iterate through files
|
|
71
|
-
// 2. Detect issues
|
|
72
|
-
// 3. Return standardized AnalysisResult[]
|
|
73
|
-
|
|
74
|
-
return {
|
|
75
|
-
results,
|
|
76
|
-
summary: {
|
|
77
|
-
totalFiles: files.length,
|
|
78
|
-
totalIssues: results.reduce((acc, r) => acc + r.issues.length, 0),
|
|
79
|
-
// ... other summary stats
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### 4. Implement ToolProvider and Register
|
|
86
|
-
|
|
87
|
-
Every spoke must implement the `ToolProvider` interface and register with the global `ToolRegistry` so that it is automatically discovered by the unified CLI.
|
|
88
|
-
|
|
89
|
-
1. **Create `src/provider.ts`**:
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
import {
|
|
93
|
-
ToolProvider,
|
|
94
|
-
ToolName,
|
|
95
|
-
SpokeOutput,
|
|
96
|
-
ScanOptions,
|
|
97
|
-
ToolScoringOutput,
|
|
98
|
-
} from '@aiready/core';
|
|
99
|
-
import { analyzeYourTool } from './analyzer';
|
|
100
|
-
|
|
101
|
-
export const YourToolProvider: ToolProvider = {
|
|
102
|
-
id: ToolName.YourToolID, // Use an existing ToolName or request a new one
|
|
103
|
-
alias: ['your-alias'],
|
|
104
|
-
|
|
105
|
-
async analyze(options: ScanOptions): Promise<SpokeOutput> {
|
|
106
|
-
const output = await analyzeYourTool(options);
|
|
107
|
-
return {
|
|
108
|
-
...output,
|
|
109
|
-
metadata: { toolName: ToolName.YourToolID, version: '0.1.0' },
|
|
110
|
-
};
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
score(output: SpokeOutput, options: ScanOptions): ToolScoringOutput {
|
|
114
|
-
// Implement scoring logic (0-100)
|
|
115
|
-
return {
|
|
116
|
-
score: 100, // Example
|
|
117
|
-
metrics: output.summary,
|
|
118
|
-
};
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
defaultWeight: 10,
|
|
122
|
-
};
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
2. **Register in `src/index.ts`**:
|
|
126
|
-
|
|
127
|
-
```typescript
|
|
128
|
-
import { ToolRegistry } from '@aiready/core';
|
|
129
|
-
import { YourToolProvider } from './provider';
|
|
130
|
-
|
|
131
|
-
// Register with global registry for automatic CLI discovery
|
|
132
|
-
ToolRegistry.register(YourToolProvider);
|
|
133
|
-
|
|
134
|
-
export { YourToolProvider };
|
|
135
|
-
export * from './analyzer';
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### 5. Create Standalone CLI (`src/cli.ts`)
|
|
139
|
-
|
|
140
|
-
```typescript
|
|
141
|
-
#!/usr/bin/env node
|
|
142
|
-
import { Command } from 'commander';
|
|
143
|
-
import { analyzeYourTool } from './analyzer';
|
|
144
|
-
import chalk from 'chalk';
|
|
145
|
-
|
|
146
|
-
const program = new Command();
|
|
147
|
-
|
|
148
|
-
program
|
|
149
|
-
.name('aiready-yourtool')
|
|
150
|
-
.description('Description of your tool')
|
|
151
|
-
.version('0.1.0')
|
|
152
|
-
.argument('<directory>', 'Directory to analyze')
|
|
153
|
-
.action(async (directory, options) => {
|
|
154
|
-
console.log(chalk.blue('🔍 Analyzing...\n'));
|
|
155
|
-
const output = await analyzeYourTool({ rootDir: directory });
|
|
156
|
-
console.log(JSON.stringify(output, null, 2));
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
program.parse();
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
## 📋 Standard Specs to Follow
|
|
163
|
-
|
|
164
|
-
To ensure your tool integrates perfectly with the AIReady ecosystem, it must follow these rules:
|
|
165
|
-
|
|
166
|
-
1. **Standard Options**: Support `--include`, `--exclude`, and `--output` (standardized via `ScanOptions`).
|
|
167
|
-
2. **No Direct Dependencies**: Spokes should never depend on other spokes. Only depend on `@aiready/core`.
|
|
168
|
-
3. **Standard Issue Types**: Use `IssueType` from `@aiready/core` whenever possible.
|
|
169
|
-
4. **Severity Levels**: Use `critical`, `major`, `minor`, and `info`.
|
|
170
|
-
5. **Non-Blocking**: The `analyze` function should be asynchronous and handle large codebases efficiently.
|
|
171
|
-
|
|
172
|
-
## 🧪 Testing
|
|
173
|
-
|
|
174
|
-
Use `vitest` for unit and integration tests. Ensure you test your `ToolProvider` implementation using the `validateSpokeOutput` utility from `@aiready/core`.
|
|
175
|
-
|
|
176
|
-
```typescript
|
|
177
|
-
import { validateSpokeOutput } from '@aiready/core/types/contract';
|
|
178
|
-
|
|
179
|
-
test('output matches AIReady contract', async () => {
|
|
180
|
-
const output = await analyzeYourTool({ rootDir: './test' });
|
|
181
|
-
const validation = validateSpokeOutput('your-tool', output);
|
|
182
|
-
expect(validation.valid).toBe(true);
|
|
183
|
-
});
|
|
184
|
-
```
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"summary": {
|
|
3
|
-
"totalIssues": 0,
|
|
4
|
-
"criticalIssues": 0,
|
|
5
|
-
"majorIssues": 0,
|
|
6
|
-
"totalFiles": 0,
|
|
7
|
-
"toolsRun": ["pattern-detect"],
|
|
8
|
-
"executionTime": 5,
|
|
9
|
-
"config": {
|
|
10
|
-
"scan": {
|
|
11
|
-
"tools": ["patterns"]
|
|
12
|
-
},
|
|
13
|
-
"tools": {
|
|
14
|
-
"pattern-detect": {
|
|
15
|
-
"minSimilarity": 0.5,
|
|
16
|
-
"minLines": 6,
|
|
17
|
-
"approx": true,
|
|
18
|
-
"minSharedTokens": 10,
|
|
19
|
-
"maxCandidatesPerBlock": 100,
|
|
20
|
-
"severity": "all"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"toolConfigs": {
|
|
25
|
-
"pattern-detect": {
|
|
26
|
-
"minSimilarity": 0.5,
|
|
27
|
-
"minLines": 6,
|
|
28
|
-
"approx": true,
|
|
29
|
-
"minSharedTokens": 10,
|
|
30
|
-
"maxCandidatesPerBlock": 100,
|
|
31
|
-
"severity": "all"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"pattern-detect": {
|
|
36
|
-
"results": [],
|
|
37
|
-
"summary": {
|
|
38
|
-
"totalFiles": 0,
|
|
39
|
-
"totalIssues": 0,
|
|
40
|
-
"duplicates": [],
|
|
41
|
-
"clusters": [],
|
|
42
|
-
"config": {
|
|
43
|
-
"rootDir": "/Users/pengcao/projects/aiready/packages/cli/packages/core/src",
|
|
44
|
-
"minSimilarity": 0.5,
|
|
45
|
-
"minLines": 6,
|
|
46
|
-
"approx": true,
|
|
47
|
-
"minSharedTokens": 10,
|
|
48
|
-
"maxCandidatesPerBlock": 100,
|
|
49
|
-
"severity": "all"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"metadata": {
|
|
53
|
-
"toolName": "pattern-detect",
|
|
54
|
-
"version": "0.12.5",
|
|
55
|
-
"timestamp": "2026-03-14T05:11:45.606Z",
|
|
56
|
-
"config": {
|
|
57
|
-
"minSimilarity": 0.5,
|
|
58
|
-
"minLines": 6,
|
|
59
|
-
"approx": true,
|
|
60
|
-
"minSharedTokens": 10,
|
|
61
|
-
"maxCandidatesPerBlock": 100,
|
|
62
|
-
"severity": "all",
|
|
63
|
-
"includeTests": false
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"patterns": {
|
|
68
|
-
"results": [],
|
|
69
|
-
"summary": {
|
|
70
|
-
"totalFiles": 0,
|
|
71
|
-
"totalIssues": 0,
|
|
72
|
-
"duplicates": [],
|
|
73
|
-
"clusters": [],
|
|
74
|
-
"config": {
|
|
75
|
-
"rootDir": "/Users/pengcao/projects/aiready/packages/cli/packages/core/src",
|
|
76
|
-
"minSimilarity": 0.5,
|
|
77
|
-
"minLines": 6,
|
|
78
|
-
"approx": true,
|
|
79
|
-
"minSharedTokens": 10,
|
|
80
|
-
"maxCandidatesPerBlock": 100,
|
|
81
|
-
"severity": "all"
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"metadata": {
|
|
85
|
-
"toolName": "pattern-detect",
|
|
86
|
-
"version": "0.12.5",
|
|
87
|
-
"timestamp": "2026-03-14T05:11:45.606Z",
|
|
88
|
-
"config": {
|
|
89
|
-
"minSimilarity": 0.5,
|
|
90
|
-
"minLines": 6,
|
|
91
|
-
"approx": true,
|
|
92
|
-
"minSharedTokens": 10,
|
|
93
|
-
"maxCandidatesPerBlock": 100,
|
|
94
|
-
"severity": "all",
|
|
95
|
-
"includeTests": false
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"duplicates": {
|
|
100
|
-
"results": [],
|
|
101
|
-
"summary": {
|
|
102
|
-
"totalFiles": 0,
|
|
103
|
-
"totalIssues": 0,
|
|
104
|
-
"duplicates": [],
|
|
105
|
-
"clusters": [],
|
|
106
|
-
"config": {
|
|
107
|
-
"rootDir": "/Users/pengcao/projects/aiready/packages/cli/packages/core/src",
|
|
108
|
-
"minSimilarity": 0.5,
|
|
109
|
-
"minLines": 6,
|
|
110
|
-
"approx": true,
|
|
111
|
-
"minSharedTokens": 10,
|
|
112
|
-
"maxCandidatesPerBlock": 100,
|
|
113
|
-
"severity": "all"
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
"metadata": {
|
|
117
|
-
"toolName": "pattern-detect",
|
|
118
|
-
"version": "0.12.5",
|
|
119
|
-
"timestamp": "2026-03-14T05:11:45.606Z",
|
|
120
|
-
"config": {
|
|
121
|
-
"minSimilarity": 0.5,
|
|
122
|
-
"minLines": 6,
|
|
123
|
-
"approx": true,
|
|
124
|
-
"minSharedTokens": 10,
|
|
125
|
-
"maxCandidatesPerBlock": 100,
|
|
126
|
-
"severity": "all",
|
|
127
|
-
"includeTests": false
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
"duplication": {
|
|
132
|
-
"results": [],
|
|
133
|
-
"summary": {
|
|
134
|
-
"totalFiles": 0,
|
|
135
|
-
"totalIssues": 0,
|
|
136
|
-
"duplicates": [],
|
|
137
|
-
"clusters": [],
|
|
138
|
-
"config": {
|
|
139
|
-
"rootDir": "/Users/pengcao/projects/aiready/packages/cli/packages/core/src",
|
|
140
|
-
"minSimilarity": 0.5,
|
|
141
|
-
"minLines": 6,
|
|
142
|
-
"approx": true,
|
|
143
|
-
"minSharedTokens": 10,
|
|
144
|
-
"maxCandidatesPerBlock": 100,
|
|
145
|
-
"severity": "all"
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
"metadata": {
|
|
149
|
-
"toolName": "pattern-detect",
|
|
150
|
-
"version": "0.12.5",
|
|
151
|
-
"timestamp": "2026-03-14T05:11:45.606Z",
|
|
152
|
-
"config": {
|
|
153
|
-
"minSimilarity": 0.5,
|
|
154
|
-
"minLines": 6,
|
|
155
|
-
"approx": true,
|
|
156
|
-
"minSharedTokens": 10,
|
|
157
|
-
"maxCandidatesPerBlock": 100,
|
|
158
|
-
"severity": "all",
|
|
159
|
-
"includeTests": false
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"patternDetect": {
|
|
164
|
-
"results": [],
|
|
165
|
-
"summary": {
|
|
166
|
-
"totalFiles": 0,
|
|
167
|
-
"totalIssues": 0,
|
|
168
|
-
"duplicates": [],
|
|
169
|
-
"clusters": [],
|
|
170
|
-
"config": {
|
|
171
|
-
"rootDir": "/Users/pengcao/projects/aiready/packages/cli/packages/core/src",
|
|
172
|
-
"minSimilarity": 0.5,
|
|
173
|
-
"minLines": 6,
|
|
174
|
-
"approx": true,
|
|
175
|
-
"minSharedTokens": 10,
|
|
176
|
-
"maxCandidatesPerBlock": 100,
|
|
177
|
-
"severity": "all"
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
"metadata": {
|
|
181
|
-
"toolName": "pattern-detect",
|
|
182
|
-
"version": "0.12.5",
|
|
183
|
-
"timestamp": "2026-03-14T05:11:45.606Z",
|
|
184
|
-
"config": {
|
|
185
|
-
"minSimilarity": 0.5,
|
|
186
|
-
"minLines": 6,
|
|
187
|
-
"approx": true,
|
|
188
|
-
"minSharedTokens": 10,
|
|
189
|
-
"maxCandidatesPerBlock": 100,
|
|
190
|
-
"severity": "all",
|
|
191
|
-
"includeTests": false
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"results": [],
|
|
196
|
-
"scoring": {
|
|
197
|
-
"overall": 100,
|
|
198
|
-
"rating": "Excellent",
|
|
199
|
-
"timestamp": "2026-03-14T05:11:45.608Z",
|
|
200
|
-
"toolsUsed": ["pattern-detect"],
|
|
201
|
-
"breakdown": [
|
|
202
|
-
{
|
|
203
|
-
"toolName": "pattern-detect",
|
|
204
|
-
"score": 100,
|
|
205
|
-
"rawMetrics": {
|
|
206
|
-
"totalDuplicates": 0,
|
|
207
|
-
"totalTokenCost": 0,
|
|
208
|
-
"highImpactDuplicates": 0,
|
|
209
|
-
"totalFilesAnalyzed": 0
|
|
210
|
-
},
|
|
211
|
-
"factors": [],
|
|
212
|
-
"recommendations": []
|
|
213
|
-
}
|
|
214
|
-
],
|
|
215
|
-
"calculation": {
|
|
216
|
-
"formula": "[(100 × 22)] / 22 = 100",
|
|
217
|
-
"weights": {
|
|
218
|
-
"pattern-detect": 22
|
|
219
|
-
},
|
|
220
|
-
"normalized": "[(100 × 22)] / 22 = 100"
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
"repository": {}
|
|
224
|
-
}
|