@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
package/CONTRIBUTING.md
CHANGED
|
@@ -39,15 +39,100 @@ The CLI follows a **hub-and-spoke** pattern:
|
|
|
39
39
|
- **Spoke integration**: Each analysis tool is independent and imported as needed
|
|
40
40
|
- **Unified interface**: Consistent CLI options across all tools
|
|
41
41
|
|
|
42
|
+
## � Development Setup
|
|
43
|
+
|
|
44
|
+
1. Clone the [monorepo](https://github.com/caopengau/aiready):
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
git clone https://github.com/caopengau/aiready.git
|
|
48
|
+
cd aiready
|
|
49
|
+
pnpm install
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
2. The CLI is located in `packages/cli/`
|
|
53
|
+
|
|
54
|
+
3. Build and develop:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Build the CLI
|
|
58
|
+
pnpm build
|
|
59
|
+
|
|
60
|
+
# Watch mode for development
|
|
61
|
+
pnpm dev
|
|
62
|
+
|
|
63
|
+
# Run tests
|
|
64
|
+
pnpm test
|
|
65
|
+
|
|
66
|
+
# Run linter
|
|
67
|
+
pnpm lint
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 🔧 Making Changes
|
|
71
|
+
|
|
72
|
+
1. Create a feature branch from `main`:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
git checkout -b feat/your-feature-name
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
2. Make your changes and write tests if applicable
|
|
79
|
+
|
|
80
|
+
3. Run tests and linter:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pnpm test
|
|
84
|
+
pnpm lint
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
4. Commit with [Conventional Commits](https://www.conventionalcommits.org/):
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
git commit -m "feat: add new feature"
|
|
91
|
+
git commit -m "fix: resolve issue"
|
|
92
|
+
git commit -m "docs: update guide"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
5. Push to your fork and open a Pull Request
|
|
96
|
+
|
|
97
|
+
## 📋 Pull Request Guidelines
|
|
98
|
+
|
|
99
|
+
- Ensure all tests pass
|
|
100
|
+
- Update documentation if needed
|
|
101
|
+
- Link related issues
|
|
102
|
+
- Keep PRs focused on a single feature or fix
|
|
103
|
+
- Use clear, descriptive commit messages
|
|
104
|
+
|
|
105
|
+
## 📦 Publishing
|
|
106
|
+
|
|
107
|
+
Publishing is handled automatically via the monorepo's release process:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# From monorepo root
|
|
111
|
+
make sync # Syncs all spokes and publishes
|
|
112
|
+
make npm-publish SPOKE=cli # Publish CLI individually
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
For more details, see [Release Management](../../.github/sub-instructions/release-management.md)
|
|
116
|
+
|
|
42
117
|
## 🐛 Reporting Issues
|
|
43
118
|
|
|
44
|
-
Found a bug or have a feature request? [Open an issue](https://github.com/caopengau/aiready
|
|
119
|
+
Found a bug or have a feature request? [Open an issue on GitHub](https://github.com/caopengau/aiready/issues) with:
|
|
45
120
|
|
|
46
121
|
- Clear description of the problem or feature
|
|
47
122
|
- Steps to reproduce (for bugs)
|
|
48
123
|
- Expected vs actual behavior
|
|
49
124
|
- Your environment (Node version, OS)
|
|
50
125
|
|
|
126
|
+
## ❓ Questions?
|
|
127
|
+
|
|
128
|
+
- Review the [README.md](./README.md)
|
|
129
|
+
- Check [AIReady documentation](https://getaiready.dev/)
|
|
130
|
+
- Browse existing [discussions and issues](https://github.com/caopengau/aiready/discussions)
|
|
131
|
+
|
|
132
|
+
## 📄 License
|
|
133
|
+
|
|
134
|
+
All contributions are licensed under the MIT License.
|
|
135
|
+
|
|
51
136
|
## 🔧 Development Setup
|
|
52
137
|
|
|
53
138
|
```bash
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 AIReady Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,93 +1,193 @@
|
|
|
1
1
|
# @aiready/cli
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Assess and improve your codebase's AI-readiness. Get an AI Readiness Score (0-100) and detect issues that confuse AI models.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@aiready/cli)
|
|
6
|
+
[](https://marketplace.visualstudio.com/items?itemName=pengcao.aiready)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://github.com/caopengau/aiready-cli/actions)
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
# @aiready/cli
|
|
10
|
+
## 🚀 Quick Start
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
```bash
|
|
13
|
+
# Install globally
|
|
14
|
+
npm install -g @aiready/cli
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
# Scan your codebase
|
|
17
|
+
aiready scan .
|
|
18
|
+
|
|
19
|
+
# Get detailed analysis
|
|
20
|
+
aiready scan . --output report.json
|
|
13
21
|
```
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
|
24
|
-
│
|
|
25
|
-
▼
|
|
26
|
-
🏢 @aiready/core
|
|
23
|
+
## 🤖 Why AIReady?
|
|
24
|
+
|
|
25
|
+
As AI becomes deeply integrated into software development, codebases become harder for AI models to understand due to:
|
|
26
|
+
|
|
27
|
+
- **Knowledge cutoff limitations** in AI models
|
|
28
|
+
- **Context fragmentation** that breaks AI understanding
|
|
29
|
+
- **Duplicated patterns** AI doesn't recognize
|
|
30
|
+
- **Inconsistent naming** across the codebase
|
|
27
31
|
|
|
28
|
-
|
|
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
|
|
32
|
+
AIReady helps teams **assess, visualize, and prepare** repositories for better AI adoption.
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
## 🌟 The AIReady Ecosystem
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
| Integration | Package | Description |
|
|
37
|
+
| ----------------- | -------------------------------------------------------------------------------- | ----------------------------------------------- |
|
|
38
|
+
| **CLI** | [`@aiready/cli`](https://www.npmjs.com/package/@aiready/cli) | Unified command-line interface |
|
|
39
|
+
| **VS Code** | [`aiready`](https://marketplace.visualstudio.com/items?itemName=pengcao.aiready) | Real-time AI readiness analysis in VS Code |
|
|
40
|
+
| **GitHub Action** | [`aiready-action`](https://github.com/marketplace/actions/aiready-action) | CI/CD integration for automated scans |
|
|
41
|
+
| **MCP Server** | [`@aiready/mcp-server`](https://www.npmjs.com/package/@aiready/mcp-server) | Model Context Protocol server for AI assistants |
|
|
42
|
+
| **Skills** | [`@aiready/skills`](https://github.com/caopengau/aiready-skills) | AI-friendly coding practices for agents |
|
|
43
|
+
| **Docker** | [`aiready/cli`](https://hub.docker.com/r/aiready/cli) | Containerized CLI |
|
|
44
|
+
| **Homebrew** | `brew install caopengau/aiready/aiready` | macOS package |
|
|
38
45
|
|
|
39
|
-
|
|
46
|
+
## ✨ Features
|
|
40
47
|
|
|
41
|
-
|
|
48
|
+
- **AI Readiness Score** - Get a 0-100 score indicating how AI-ready your codebase is
|
|
49
|
+
- **Semantic Duplicate Detection** - Find duplicate patterns that waste AI context window tokens
|
|
50
|
+
- **Context Analysis** - Analyze context window costs, import depth, and dependency fragmentation
|
|
51
|
+
- **Consistency Checks** - Ensure naming conventions and pattern consistency
|
|
52
|
+
- **Documentation Drift** - Track documentation freshness vs code churn
|
|
53
|
+
- **Testability Assessment** - Measure code testability for AI agents
|
|
54
|
+
- **Agent Grounding** - Evaluate how well code aids AI agents
|
|
55
|
+
- **Interactive Visualization** - Generate force-directed graph visualizations
|
|
56
|
+
- **CI/CD Integration** - Quality gates for AI readiness in your pipeline
|
|
42
57
|
|
|
43
|
-
|
|
58
|
+
## 📋 Commands
|
|
44
59
|
|
|
45
|
-
|
|
60
|
+
### Unified Scan
|
|
61
|
+
|
|
62
|
+
Run all analysis tools at once:
|
|
46
63
|
|
|
47
64
|
```bash
|
|
48
|
-
# Scan a codebase
|
|
49
65
|
aiready scan .
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
aiready patterns . --similarity 0.6
|
|
66
|
+
aiready scan . --output report.json
|
|
67
|
+
aiready scan . --threshold 70
|
|
53
68
|
```
|
|
54
69
|
|
|
55
|
-
|
|
70
|
+
### Individual Tools
|
|
56
71
|
|
|
57
|
-
|
|
72
|
+
| Command | Description |
|
|
73
|
+
| --------------------- | ------------------------------------------ |
|
|
74
|
+
| `aiready patterns` | Detect semantic duplicates and patterns |
|
|
75
|
+
| `aiready context` | Analyze context window cost & dependencies |
|
|
76
|
+
| `aiready consistency` | Check naming conventions |
|
|
77
|
+
| `aiready testability` | Assess code testability |
|
|
78
|
+
| `aiready visualize` | Generate interactive visualizations |
|
|
79
|
+
| `aiready upload` | Upload results to AIReady platform |
|
|
58
80
|
|
|
59
|
-
##
|
|
81
|
+
## 📦 Installation
|
|
60
82
|
|
|
83
|
+
### npm / pnpm / yarn
|
|
61
84
|
|
|
62
|
-
|
|
85
|
+
```bash
|
|
86
|
+
# npm
|
|
87
|
+
npm install -g @aiready/cli
|
|
63
88
|
|
|
64
|
-
|
|
89
|
+
# pnpm
|
|
90
|
+
pnpm add -g @aiready/cli
|
|
91
|
+
|
|
92
|
+
# yarn
|
|
93
|
+
yarn global add @aiready/cli
|
|
94
|
+
```
|
|
65
95
|
|
|
66
|
-
|
|
96
|
+
### Docker
|
|
67
97
|
|
|
68
98
|
```bash
|
|
69
|
-
|
|
70
|
-
|
|
99
|
+
# Pull from Docker Hub
|
|
100
|
+
docker pull aiready/cli
|
|
101
|
+
|
|
102
|
+
# Run
|
|
103
|
+
docker run aiready/cli scan .
|
|
71
104
|
|
|
72
|
-
|
|
105
|
+
# Or use the image directly
|
|
106
|
+
docker run -v $(pwd):/app aiready/cli scan /app
|
|
107
|
+
```
|
|
73
108
|
|
|
74
|
-
|
|
109
|
+
### Homebrew
|
|
75
110
|
|
|
76
111
|
```bash
|
|
77
|
-
|
|
112
|
+
brew install caopengau/aiready/aiready
|
|
78
113
|
```
|
|
79
114
|
|
|
80
|
-
###
|
|
115
|
+
### VS Code Extension
|
|
81
116
|
|
|
82
|
-
|
|
83
|
-
- `--api-key <key>`: Your platform API key (or set `AIREADY_API_KEY`)
|
|
84
|
-
- `--server <url>`: Custom platform URL (optional)
|
|
117
|
+
Install from [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=pengcao.aiready) or search for "AIReady" in VS Code extensions.
|
|
85
118
|
|
|
86
|
-
|
|
119
|
+
### GitHub Action
|
|
87
120
|
|
|
88
|
-
|
|
121
|
+
```yaml
|
|
122
|
+
- name: AIReady Code Analysis
|
|
123
|
+
uses: caopengau/aiready-action@v1
|
|
124
|
+
with:
|
|
125
|
+
threshold: 70
|
|
126
|
+
```
|
|
89
127
|
|
|
128
|
+
### MCP Server
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npm install -g @aiready/mcp-server
|
|
132
|
+
aiready-mcp
|
|
90
133
|
```
|
|
91
134
|
|
|
135
|
+
## 🔧 Configuration
|
|
136
|
+
|
|
137
|
+
Create an `aiready.json` config file:
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"scan": {
|
|
142
|
+
"exclude": ["**/dist/**", "**/node_modules/**"]
|
|
143
|
+
},
|
|
144
|
+
"tools": {
|
|
145
|
+
"pattern-detect": { "minSimilarity": 0.5 },
|
|
146
|
+
"context-analyzer": { "maxContextBudget": 15000 }
|
|
147
|
+
},
|
|
148
|
+
"output": { "format": "json", "directory": ".aiready" }
|
|
149
|
+
}
|
|
92
150
|
```
|
|
93
|
-
|
|
151
|
+
|
|
152
|
+
## 🌐 Language Support
|
|
153
|
+
|
|
154
|
+
**Currently Supported (95% market coverage):**
|
|
155
|
+
|
|
156
|
+
- ✅ TypeScript / JavaScript
|
|
157
|
+
- ✅ Python
|
|
158
|
+
- ✅ Java
|
|
159
|
+
- ✅ Go
|
|
160
|
+
- ✅ C#
|
|
161
|
+
|
|
162
|
+
## 🏗️ Architecture
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
🎯 USER
|
|
166
|
+
│
|
|
167
|
+
▼
|
|
168
|
+
🎛️ @aiready/cli (orchestrator)
|
|
169
|
+
│ │ │ │ │
|
|
170
|
+
▼ ▼ ▼ ▼ ▼
|
|
171
|
+
[PAT] [CTX] [CON] [DOC] [TEST]
|
|
172
|
+
│ │ │ │ │
|
|
173
|
+
└─────┴─────┴─────┴─────┘
|
|
174
|
+
│
|
|
175
|
+
▼
|
|
176
|
+
🏢 @aiready/core
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## 🤝 Contributing
|
|
180
|
+
|
|
181
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
|
|
182
|
+
|
|
183
|
+
## 📄 License
|
|
184
|
+
|
|
185
|
+
MIT License - see [LICENSE](./LICENSE) for details.
|
|
186
|
+
|
|
187
|
+
## 🔗 Related Links
|
|
188
|
+
|
|
189
|
+
- 🌐 [Website](https://getaiready.dev)
|
|
190
|
+
- 📖 [Documentation](https://docs.getaiready.dev)
|
|
191
|
+
- 📦 [npm](https://www.npmjs.com/package/@aiready/cli)
|
|
192
|
+
- 📊 [GitHub Actions](https://github.com/marketplace/actions/aiready-action)
|
|
193
|
+
- 🔌 [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=pengcao.aiready)
|
package/dist/cli.js
CHANGED
|
@@ -1039,29 +1039,64 @@ async function initAction(options) {
|
|
|
1039
1039
|
// Tool-specific configurations
|
|
1040
1040
|
tools: {
|
|
1041
1041
|
[import_core7.ToolName.PatternDetect]: {
|
|
1042
|
-
|
|
1042
|
+
// Core detection thresholds
|
|
1043
|
+
minSimilarity: 0.4,
|
|
1044
|
+
// Jaccard similarity threshold (0-1)
|
|
1043
1045
|
minLines: 5,
|
|
1044
|
-
|
|
1046
|
+
// Minimum lines to consider a duplicate
|
|
1047
|
+
minSharedTokens: 8,
|
|
1048
|
+
// Minimum shared tokens for candidate matching
|
|
1045
1049
|
approx: true,
|
|
1050
|
+
// Use approximate matching for performance
|
|
1051
|
+
// Performance tuning
|
|
1052
|
+
batchSize: 100,
|
|
1053
|
+
// Batch size for comparisons
|
|
1054
|
+
maxCandidatesPerBlock: 100,
|
|
1055
|
+
// Max candidates per code block
|
|
1056
|
+
maxResults: 10,
|
|
1057
|
+
// Max results in console output
|
|
1058
|
+
// Cluster reporting
|
|
1059
|
+
minClusterFiles: 3,
|
|
1060
|
+
// Min files for cluster reporting
|
|
1061
|
+
minClusterTokenCost: 1e3,
|
|
1062
|
+
// Min token cost for cluster reporting
|
|
1063
|
+
// Output
|
|
1064
|
+
outputFormat: "console",
|
|
1065
|
+
// Output format (console, json, html)
|
|
1046
1066
|
...options.full ? {
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
minClusterFiles: 3,
|
|
1050
|
-
minClusterTokenCost: 1e3
|
|
1067
|
+
// Advanced options (only included with --full)
|
|
1068
|
+
// Add any additional advanced options here
|
|
1051
1069
|
} : {}
|
|
1052
1070
|
},
|
|
1053
1071
|
[import_core7.ToolName.ContextAnalyzer]: {
|
|
1054
|
-
|
|
1055
|
-
|
|
1072
|
+
// Smart defaults are generated dynamically based on repository size
|
|
1073
|
+
// These are fallback values for when smart defaults can't be calculated
|
|
1074
|
+
maxContextBudget: 25e3,
|
|
1075
|
+
// Max acceptable token budget for a single context
|
|
1076
|
+
minCohesion: 0.4,
|
|
1077
|
+
// Minimum acceptable cohesion score (0-1)
|
|
1056
1078
|
maxDepth: 7,
|
|
1057
|
-
|
|
1079
|
+
// Maximum acceptable import depth
|
|
1080
|
+
maxFragmentation: 0.7,
|
|
1081
|
+
// Maximum acceptable fragmentation score (0-1)
|
|
1082
|
+
// Analysis focus
|
|
1058
1083
|
focus: "all",
|
|
1084
|
+
// Analysis focus: fragmentation, cohesion, depth, or all
|
|
1059
1085
|
includeNodeModules: false
|
|
1086
|
+
// Whether to include node_modules in analysis
|
|
1060
1087
|
},
|
|
1061
1088
|
[import_core7.ToolName.NamingConsistency]: {
|
|
1089
|
+
// Core checks
|
|
1062
1090
|
checkNaming: true,
|
|
1091
|
+
// Check naming conventions and quality
|
|
1063
1092
|
checkPatterns: true,
|
|
1093
|
+
// Check code pattern consistency
|
|
1064
1094
|
checkArchitecture: true,
|
|
1095
|
+
// Check architectural consistency
|
|
1096
|
+
// Minimum severity to report
|
|
1097
|
+
minSeverity: "info",
|
|
1098
|
+
// Severity filter: critical, major, minor, info
|
|
1099
|
+
// Custom vocabulary
|
|
1065
1100
|
shortWords: ["id", "db", "ui", "ai"],
|
|
1066
1101
|
acceptedAbbreviations: [
|
|
1067
1102
|
"API",
|
|
@@ -1098,34 +1133,60 @@ async function initAction(options) {
|
|
|
1098
1133
|
...options.full ? { disableChecks: [] } : {}
|
|
1099
1134
|
},
|
|
1100
1135
|
[import_core7.ToolName.AiSignalClarity]: {
|
|
1136
|
+
// All signal clarity checks enabled by default
|
|
1101
1137
|
checkMagicLiterals: true,
|
|
1138
|
+
// Detect magic numbers and strings
|
|
1102
1139
|
checkBooleanTraps: true,
|
|
1140
|
+
// Detect boolean trap parameters
|
|
1103
1141
|
checkAmbiguousNames: true,
|
|
1142
|
+
// Detect ambiguous function/variable names
|
|
1104
1143
|
checkUndocumentedExports: true,
|
|
1144
|
+
// Detect exports without documentation
|
|
1105
1145
|
checkImplicitSideEffects: true,
|
|
1146
|
+
// Detect functions with hidden side effects
|
|
1106
1147
|
checkDeepCallbacks: true,
|
|
1148
|
+
// Detect deeply nested callbacks
|
|
1107
1149
|
checkOverloadedSymbols: true,
|
|
1150
|
+
// Detect overloaded function signatures
|
|
1108
1151
|
checkLargeFiles: true
|
|
1152
|
+
// Detect files that are too large
|
|
1109
1153
|
},
|
|
1110
1154
|
[import_core7.ToolName.AgentGrounding]: {
|
|
1111
|
-
|
|
1112
|
-
|
|
1155
|
+
// Structure clarity
|
|
1156
|
+
maxRecommendedDepth: 4,
|
|
1157
|
+
// Max directory depth before flagging as "too deep"
|
|
1158
|
+
// Documentation freshness
|
|
1159
|
+
readmeStaleDays: 90,
|
|
1160
|
+
// Days after which README is considered stale
|
|
1161
|
+
// File naming
|
|
1113
1162
|
additionalVagueNames: ["stuff", "misc", "temp", "test"]
|
|
1163
|
+
// Custom vague file names
|
|
1114
1164
|
},
|
|
1115
1165
|
[import_core7.ToolName.TestabilityIndex]: {
|
|
1116
|
-
|
|
1166
|
+
// Coverage thresholds
|
|
1167
|
+
minCoverageRatio: 0.3,
|
|
1168
|
+
// Minimum acceptable test/source ratio
|
|
1169
|
+
// Test file patterns
|
|
1117
1170
|
testPatterns: ["**/*.test.ts", "**/__tests__/**", "**/*.spec.ts"],
|
|
1171
|
+
// Scan depth
|
|
1118
1172
|
maxDepth: 10
|
|
1173
|
+
// Maximum scan depth
|
|
1119
1174
|
},
|
|
1120
1175
|
[import_core7.ToolName.DocDrift]: {
|
|
1176
|
+
// Drift detection
|
|
1121
1177
|
maxCommits: 50,
|
|
1178
|
+
// Maximum commit distance to check for drift
|
|
1122
1179
|
staleMonths: 3
|
|
1180
|
+
// Consider comments older than this as outdated
|
|
1123
1181
|
},
|
|
1124
1182
|
[import_core7.ToolName.DependencyHealth]: {
|
|
1183
|
+
// Training cutoff for AI knowledge assessment
|
|
1125
1184
|
trainingCutoffYear: 2023
|
|
1185
|
+
// Year cutoff for AI training data
|
|
1126
1186
|
},
|
|
1127
1187
|
[import_core7.ToolName.ChangeAmplification]: {
|
|
1128
1188
|
// Change amplification primarily relies on global scan settings
|
|
1189
|
+
// No additional tool-specific configuration required
|
|
1129
1190
|
}
|
|
1130
1191
|
},
|
|
1131
1192
|
// Visualizer settings (interactive graph)
|
package/dist/cli.mjs
CHANGED
|
@@ -776,29 +776,64 @@ async function initAction(options) {
|
|
|
776
776
|
// Tool-specific configurations
|
|
777
777
|
tools: {
|
|
778
778
|
[ToolName2.PatternDetect]: {
|
|
779
|
-
|
|
779
|
+
// Core detection thresholds
|
|
780
|
+
minSimilarity: 0.4,
|
|
781
|
+
// Jaccard similarity threshold (0-1)
|
|
780
782
|
minLines: 5,
|
|
781
|
-
|
|
783
|
+
// Minimum lines to consider a duplicate
|
|
784
|
+
minSharedTokens: 8,
|
|
785
|
+
// Minimum shared tokens for candidate matching
|
|
782
786
|
approx: true,
|
|
787
|
+
// Use approximate matching for performance
|
|
788
|
+
// Performance tuning
|
|
789
|
+
batchSize: 100,
|
|
790
|
+
// Batch size for comparisons
|
|
791
|
+
maxCandidatesPerBlock: 100,
|
|
792
|
+
// Max candidates per code block
|
|
793
|
+
maxResults: 10,
|
|
794
|
+
// Max results in console output
|
|
795
|
+
// Cluster reporting
|
|
796
|
+
minClusterFiles: 3,
|
|
797
|
+
// Min files for cluster reporting
|
|
798
|
+
minClusterTokenCost: 1e3,
|
|
799
|
+
// Min token cost for cluster reporting
|
|
800
|
+
// Output
|
|
801
|
+
outputFormat: "console",
|
|
802
|
+
// Output format (console, json, html)
|
|
783
803
|
...options.full ? {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
minClusterFiles: 3,
|
|
787
|
-
minClusterTokenCost: 1e3
|
|
804
|
+
// Advanced options (only included with --full)
|
|
805
|
+
// Add any additional advanced options here
|
|
788
806
|
} : {}
|
|
789
807
|
},
|
|
790
808
|
[ToolName2.ContextAnalyzer]: {
|
|
791
|
-
|
|
792
|
-
|
|
809
|
+
// Smart defaults are generated dynamically based on repository size
|
|
810
|
+
// These are fallback values for when smart defaults can't be calculated
|
|
811
|
+
maxContextBudget: 25e3,
|
|
812
|
+
// Max acceptable token budget for a single context
|
|
813
|
+
minCohesion: 0.4,
|
|
814
|
+
// Minimum acceptable cohesion score (0-1)
|
|
793
815
|
maxDepth: 7,
|
|
794
|
-
|
|
816
|
+
// Maximum acceptable import depth
|
|
817
|
+
maxFragmentation: 0.7,
|
|
818
|
+
// Maximum acceptable fragmentation score (0-1)
|
|
819
|
+
// Analysis focus
|
|
795
820
|
focus: "all",
|
|
821
|
+
// Analysis focus: fragmentation, cohesion, depth, or all
|
|
796
822
|
includeNodeModules: false
|
|
823
|
+
// Whether to include node_modules in analysis
|
|
797
824
|
},
|
|
798
825
|
[ToolName2.NamingConsistency]: {
|
|
826
|
+
// Core checks
|
|
799
827
|
checkNaming: true,
|
|
828
|
+
// Check naming conventions and quality
|
|
800
829
|
checkPatterns: true,
|
|
830
|
+
// Check code pattern consistency
|
|
801
831
|
checkArchitecture: true,
|
|
832
|
+
// Check architectural consistency
|
|
833
|
+
// Minimum severity to report
|
|
834
|
+
minSeverity: "info",
|
|
835
|
+
// Severity filter: critical, major, minor, info
|
|
836
|
+
// Custom vocabulary
|
|
802
837
|
shortWords: ["id", "db", "ui", "ai"],
|
|
803
838
|
acceptedAbbreviations: [
|
|
804
839
|
"API",
|
|
@@ -835,34 +870,60 @@ async function initAction(options) {
|
|
|
835
870
|
...options.full ? { disableChecks: [] } : {}
|
|
836
871
|
},
|
|
837
872
|
[ToolName2.AiSignalClarity]: {
|
|
873
|
+
// All signal clarity checks enabled by default
|
|
838
874
|
checkMagicLiterals: true,
|
|
875
|
+
// Detect magic numbers and strings
|
|
839
876
|
checkBooleanTraps: true,
|
|
877
|
+
// Detect boolean trap parameters
|
|
840
878
|
checkAmbiguousNames: true,
|
|
879
|
+
// Detect ambiguous function/variable names
|
|
841
880
|
checkUndocumentedExports: true,
|
|
881
|
+
// Detect exports without documentation
|
|
842
882
|
checkImplicitSideEffects: true,
|
|
883
|
+
// Detect functions with hidden side effects
|
|
843
884
|
checkDeepCallbacks: true,
|
|
885
|
+
// Detect deeply nested callbacks
|
|
844
886
|
checkOverloadedSymbols: true,
|
|
887
|
+
// Detect overloaded function signatures
|
|
845
888
|
checkLargeFiles: true
|
|
889
|
+
// Detect files that are too large
|
|
846
890
|
},
|
|
847
891
|
[ToolName2.AgentGrounding]: {
|
|
848
|
-
|
|
849
|
-
|
|
892
|
+
// Structure clarity
|
|
893
|
+
maxRecommendedDepth: 4,
|
|
894
|
+
// Max directory depth before flagging as "too deep"
|
|
895
|
+
// Documentation freshness
|
|
896
|
+
readmeStaleDays: 90,
|
|
897
|
+
// Days after which README is considered stale
|
|
898
|
+
// File naming
|
|
850
899
|
additionalVagueNames: ["stuff", "misc", "temp", "test"]
|
|
900
|
+
// Custom vague file names
|
|
851
901
|
},
|
|
852
902
|
[ToolName2.TestabilityIndex]: {
|
|
853
|
-
|
|
903
|
+
// Coverage thresholds
|
|
904
|
+
minCoverageRatio: 0.3,
|
|
905
|
+
// Minimum acceptable test/source ratio
|
|
906
|
+
// Test file patterns
|
|
854
907
|
testPatterns: ["**/*.test.ts", "**/__tests__/**", "**/*.spec.ts"],
|
|
908
|
+
// Scan depth
|
|
855
909
|
maxDepth: 10
|
|
910
|
+
// Maximum scan depth
|
|
856
911
|
},
|
|
857
912
|
[ToolName2.DocDrift]: {
|
|
913
|
+
// Drift detection
|
|
858
914
|
maxCommits: 50,
|
|
915
|
+
// Maximum commit distance to check for drift
|
|
859
916
|
staleMonths: 3
|
|
917
|
+
// Consider comments older than this as outdated
|
|
860
918
|
},
|
|
861
919
|
[ToolName2.DependencyHealth]: {
|
|
920
|
+
// Training cutoff for AI knowledge assessment
|
|
862
921
|
trainingCutoffYear: 2023
|
|
922
|
+
// Year cutoff for AI training data
|
|
863
923
|
},
|
|
864
924
|
[ToolName2.ChangeAmplification]: {
|
|
865
925
|
// Change amplification primarily relies on global scan settings
|
|
926
|
+
// No additional tool-specific configuration required
|
|
866
927
|
}
|
|
867
928
|
},
|
|
868
929
|
// Visualizer settings (interactive graph)
|