@agent-lint/cli 0.1.0
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/LICENSE +21 -0
- package/README.md +127 -0
- package/dist/index.js +19406 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Agent Lint Contributors
|
|
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
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# @agent-lint/cli
|
|
2
|
+
|
|
3
|
+
CLI for AI agent context artifact analysis and quality scoring.
|
|
4
|
+
|
|
5
|
+
**Zero LLM dependencies.** Fully deterministic. Local-first. No database. No auth.
|
|
6
|
+
|
|
7
|
+
## What It Does
|
|
8
|
+
|
|
9
|
+
Static analysis tool that evaluates AI-agent context artifacts from the command line:
|
|
10
|
+
|
|
11
|
+
- `AGENTS.md` / `CLAUDE.md`
|
|
12
|
+
- Skills, Rules, Workflows, Plans
|
|
13
|
+
|
|
14
|
+
Reproducible quality scoring across **12 metrics** — perfect for CI/CD pipelines and local development.
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Analyze a single artifact
|
|
20
|
+
npx @agent-lint/cli analyze AGENTS.md
|
|
21
|
+
|
|
22
|
+
# Scan entire workspace
|
|
23
|
+
npx @agent-lint/cli scan .
|
|
24
|
+
|
|
25
|
+
# Get numeric score
|
|
26
|
+
npx @agent-lint/cli score AGENTS.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Commands
|
|
30
|
+
|
|
31
|
+
### `analyze <path>`
|
|
32
|
+
|
|
33
|
+
Full analysis of a single artifact file.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
agent-lint analyze AGENTS.md
|
|
37
|
+
agent-lint analyze AGENTS.md --type agents --verbose
|
|
38
|
+
agent-lint analyze AGENTS.md --json
|
|
39
|
+
agent-lint analyze AGENTS.md --watch
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### `scan [dir]`
|
|
43
|
+
|
|
44
|
+
Scan a directory for all AI agent artifacts and analyze them.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
agent-lint scan .
|
|
48
|
+
agent-lint scan . --json --fail-below 70
|
|
49
|
+
agent-lint scan ./docs --max-files 50
|
|
50
|
+
agent-lint scan . --watch
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### `score <path>`
|
|
54
|
+
|
|
55
|
+
Output only the numeric quality score (useful for scripting).
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
agent-lint score AGENTS.md # prints: 82
|
|
59
|
+
agent-lint score AGENTS.md --json # prints JSON with score + dimensions
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Options
|
|
63
|
+
|
|
64
|
+
| Flag | Description |
|
|
65
|
+
| ------------------ | ------------------------------------------------- |
|
|
66
|
+
| `--json` | Output as JSON |
|
|
67
|
+
| `--verbose` | Show all metric details |
|
|
68
|
+
| `--quiet` | Suppress operational logs |
|
|
69
|
+
| `--fail-below <n>` | Exit with code 1 if score < n (CI mode) |
|
|
70
|
+
| `--type <type>` | Artifact type: `agents` `skills` `rules` `workflows` `plans` |
|
|
71
|
+
| `--watch` | Watch for file changes and re-analyze |
|
|
72
|
+
|
|
73
|
+
## CI/CD Integration
|
|
74
|
+
|
|
75
|
+
### GitHub Actions
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
name: Agent Lint
|
|
79
|
+
on:
|
|
80
|
+
pull_request:
|
|
81
|
+
paths:
|
|
82
|
+
- "AGENTS.md"
|
|
83
|
+
- "CLAUDE.md"
|
|
84
|
+
- ".cursor/rules/**"
|
|
85
|
+
- ".windsurf/rules/**"
|
|
86
|
+
|
|
87
|
+
jobs:
|
|
88
|
+
lint:
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v4
|
|
92
|
+
- uses: actions/setup-node@v4
|
|
93
|
+
with:
|
|
94
|
+
node-version: "20"
|
|
95
|
+
- run: npx -y @agent-lint/cli scan . --json --fail-below 70
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Exit Codes
|
|
99
|
+
|
|
100
|
+
| Code | Meaning |
|
|
101
|
+
| ---- | ---------------------------------------- |
|
|
102
|
+
| `0` | Success — all artifacts passed |
|
|
103
|
+
| `1` | At least one artifact below threshold |
|
|
104
|
+
| `2` | Configuration or usage error |
|
|
105
|
+
|
|
106
|
+
## Quality Metrics (12)
|
|
107
|
+
|
|
108
|
+
`clarity` · `specificity` · `scope-control` · `completeness` · `actionability` · `verifiability` · `safety` · `injection-resistance` · `secret-hygiene` · `token-efficiency` · `platform-fit` · `maintainability`
|
|
109
|
+
|
|
110
|
+
## Supported Artifact Types
|
|
111
|
+
|
|
112
|
+
| Type | File Patterns |
|
|
113
|
+
| --------- | ----------------------------------------------------------- |
|
|
114
|
+
| Agents | `AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md` |
|
|
115
|
+
| Rules | `.cursor/rules/*.md`, `.windsurf/rules/*.md` |
|
|
116
|
+
| Skills | `skills/*.md` |
|
|
117
|
+
| Workflows | `workflows/*.md`, `docs/workflows/*.md` |
|
|
118
|
+
| Plans | `plans/*.md`, `docs/plans/*.md` |
|
|
119
|
+
|
|
120
|
+
## Related
|
|
121
|
+
|
|
122
|
+
- [`@agent-lint/mcp`](https://www.npmjs.com/package/@agent-lint/mcp) — MCP server for IDE integration
|
|
123
|
+
- [Repository](https://gitlab.com/bsamilozturk/agentlint)
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
MIT
|