ci-perf-lint 0.0.6 → 0.1.1
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/README.md +236 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,16 +1,246 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CI Perf Lint
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://codspeed.io/yoshi-taka/ci-perf-lint?utm_source=badge)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Repository-first CI audit across major CI platforms.
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- https://github.com/yoshi-taka/ci-perf-lint
|
|
7
|
+
CI Perf Lint scans workflows plus repository context, prioritizes CI waste, and produces a shareable improvement plan with measurement hints and AI-ready handoff instructions.
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
It does not just list warnings. It tells you what to fix first.
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
Run once against a repository:
|
|
11
14
|
|
|
12
15
|
```sh
|
|
16
|
+
# recommended (faster startup)
|
|
13
17
|
bunx ci-perf-lint
|
|
14
18
|
# or
|
|
15
19
|
npx ci-perf-lint
|
|
16
20
|
```
|
|
21
|
+
|
|
22
|
+
Pipe directly into AI tools:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
bunx ci-perf-lint | opencode
|
|
26
|
+
bunx ci-perf-lint | claude -p "Apply the findings above to fix workflows"
|
|
27
|
+
bunx ci-perf-lint | gemini
|
|
28
|
+
bunx ci-perf-lint | codex exec
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Install globally for repeated use:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
bun install -g ci-perf-lint
|
|
35
|
+
# or
|
|
36
|
+
npm install -g ci-perf-lint
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## What You Get
|
|
40
|
+
|
|
41
|
+
Each run returns:
|
|
42
|
+
|
|
43
|
+
- Top findings
|
|
44
|
+
- What to fix first
|
|
45
|
+
- Measurement hints
|
|
46
|
+
- AI-ready handoff
|
|
47
|
+
|
|
48
|
+
The output is designed to be:
|
|
49
|
+
|
|
50
|
+
- readable by humans
|
|
51
|
+
- directly usable by AI
|
|
52
|
+
- easy to paste into Slack, issues, or PRs
|
|
53
|
+
|
|
54
|
+
## When To Use This
|
|
55
|
+
|
|
56
|
+
Use CI Perf Lint when:
|
|
57
|
+
|
|
58
|
+
- CI has become slow
|
|
59
|
+
- runner cost needs review
|
|
60
|
+
- PR feedback loops are too long
|
|
61
|
+
- workflows have accumulated over time
|
|
62
|
+
- you need a quick CI improvement report
|
|
63
|
+
- you want to safely delegate fixes to AI
|
|
64
|
+
|
|
65
|
+
This is not a daily lint tool. It is a high-value audit tool for CI owners.
|
|
66
|
+
|
|
67
|
+
## Example Output
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
CI Perf Lint
|
|
71
|
+
Repository: acme/api
|
|
72
|
+
Workflows scanned: 5
|
|
73
|
+
|
|
74
|
+
Top findings
|
|
75
|
+
|
|
76
|
+
1. missing-path-ignore-for-non-code
|
|
77
|
+
Context: docs/, *.md, and *.txt changes trigger full CI in 3 workflows
|
|
78
|
+
Why it matters: avoidable runs increase runner cost and PR latency
|
|
79
|
+
Suggested action: add paths-ignore for non-code files
|
|
80
|
+
Measurement hint: confirm docs-only PR skips all heavy workflows
|
|
81
|
+
|
|
82
|
+
2. duplicate-install-or-lint
|
|
83
|
+
Context: npm install runs in both ci.yml and lint.yml
|
|
84
|
+
Why it matters: repeated dependency installs add cost and delay feedback
|
|
85
|
+
Suggested action: consolidate into a shared job or reuse artifacts
|
|
86
|
+
Measurement hint: compare total workflow duration before and after
|
|
87
|
+
|
|
88
|
+
3. missing-dependency-cache
|
|
89
|
+
Context: actions/setup-node used without cache in 2 workflows
|
|
90
|
+
Why it matters: install cost is paid on every run
|
|
91
|
+
Suggested action: enable package-manager-aware caching
|
|
92
|
+
Measurement hint: compare install step duration
|
|
93
|
+
|
|
94
|
+
4. avoid-svg-component-imports (src/icons.tsx:12:1 +3 more) [repository-wide source/tooling]
|
|
95
|
+
Context: avoid-svg-component-imports appears in 4 source/tooling locations; apply one consistent fix pattern where appropriate.
|
|
96
|
+
Why it matters: SVG component imports can increase transform cost and module count when plain asset URLs would be enough.
|
|
97
|
+
Suggested action: replace ordinary SVG component imports with asset URL imports where dynamic component behavior is not needed
|
|
98
|
+
Measurement hint: compare transform time, bundle/module counts, and build output before and after
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Repository-First Approach
|
|
102
|
+
|
|
103
|
+
CI Perf Lint is designed as a repository-level audit tool.
|
|
104
|
+
|
|
105
|
+
Default scope:
|
|
106
|
+
|
|
107
|
+
- workflows under `.github/workflows/`
|
|
108
|
+
- repository-level context such as configuration, structure, and cross-workflow patterns
|
|
109
|
+
|
|
110
|
+
Repository context includes signals such as:
|
|
111
|
+
|
|
112
|
+
- duplicated logic across workflows
|
|
113
|
+
- inconsistent caching strategies
|
|
114
|
+
- repo-level tool usage
|
|
115
|
+
- trigger patterns across workflows
|
|
116
|
+
|
|
117
|
+
Typical flow:
|
|
118
|
+
|
|
119
|
+
1. scan the repository and workflows
|
|
120
|
+
2. identify repository-wide waste patterns
|
|
121
|
+
3. prioritize top improvements
|
|
122
|
+
4. optionally drill down per workflow
|
|
123
|
+
|
|
124
|
+
CI inefficiencies are often repository-wide:
|
|
125
|
+
|
|
126
|
+
- docs changes trigger multiple workflows
|
|
127
|
+
- similar lint or setup logic is duplicated across files
|
|
128
|
+
- caching strategy differs between workflows
|
|
129
|
+
- only some workflows use concurrency controls
|
|
130
|
+
|
|
131
|
+
## Human + AI Workflow
|
|
132
|
+
|
|
133
|
+
CI Perf Lint separates CI optimization into two phases:
|
|
134
|
+
|
|
135
|
+
1. Deterministic audit
|
|
136
|
+
2. AI-driven implementation
|
|
137
|
+
|
|
138
|
+
Typical usage:
|
|
139
|
+
|
|
140
|
+
1. run the audit
|
|
141
|
+
2. review top findings
|
|
142
|
+
3. pipe output to AI or copy and paste it
|
|
143
|
+
4. apply fixes
|
|
144
|
+
5. verify using measurement hints
|
|
145
|
+
|
|
146
|
+
## Why Not Just Ask AI?
|
|
147
|
+
|
|
148
|
+
You can.
|
|
149
|
+
|
|
150
|
+
CI Perf Lint improves that workflow by:
|
|
151
|
+
|
|
152
|
+
- avoiding repeated context reconstruction
|
|
153
|
+
- providing deterministic findings
|
|
154
|
+
- separating higher-confidence issues from broader suggestions
|
|
155
|
+
- including measurement steps for verification
|
|
156
|
+
|
|
157
|
+
AI becomes more reliable when given structured constraints.
|
|
158
|
+
|
|
159
|
+
## Usage
|
|
160
|
+
|
|
161
|
+
Default run:
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
ci-perf-lint
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Render AI handoff:
|
|
168
|
+
|
|
169
|
+
```sh
|
|
170
|
+
ci-perf-lint . --format handoff
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Include exploratory suggestions:
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
ci-perf-lint . --mode exploratory
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Markdown output:
|
|
180
|
+
|
|
181
|
+
```sh
|
|
182
|
+
ci-perf-lint . --format markdown
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
JSON output:
|
|
186
|
+
|
|
187
|
+
```sh
|
|
188
|
+
ci-perf-lint . --format json --top 10
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Focus modes:
|
|
192
|
+
|
|
193
|
+
```sh
|
|
194
|
+
ci-perf-lint . --workflow-only
|
|
195
|
+
ci-perf-lint . --repository-only
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Show selected workflows:
|
|
199
|
+
|
|
200
|
+
```sh
|
|
201
|
+
ci-perf-lint . --show-workflows
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Strict mode shows higher-confidence warnings by default. Exploratory mode also includes broader suggestions.
|
|
205
|
+
|
|
206
|
+
## Current Scope
|
|
207
|
+
|
|
208
|
+
CI Perf Lint includes dozens of rules covering:
|
|
209
|
+
|
|
210
|
+
- trigger conditions
|
|
211
|
+
- concurrency
|
|
212
|
+
- dependency caching
|
|
213
|
+
- checkout patterns
|
|
214
|
+
- duplicate steps
|
|
215
|
+
- Docker build patterns
|
|
216
|
+
- language-specific CI optimizations
|
|
217
|
+
- AI-oriented migration suggestions
|
|
218
|
+
|
|
219
|
+
See https://ci-perf-lint.veritycost.com/rules/ for the current rule index.
|
|
220
|
+
|
|
221
|
+
## Positioning
|
|
222
|
+
|
|
223
|
+
CI Perf Lint is:
|
|
224
|
+
|
|
225
|
+
- not a correctness linter
|
|
226
|
+
- not a runtime profiler
|
|
227
|
+
- not a generic AI wrapper
|
|
228
|
+
|
|
229
|
+
It is a static analyzer for CI/CD waste, designed to produce actionable, shareable improvement plans.
|
|
230
|
+
|
|
231
|
+
## Development
|
|
232
|
+
|
|
233
|
+
```sh
|
|
234
|
+
bun run lint
|
|
235
|
+
bun run audit:static
|
|
236
|
+
bun test --parallel
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Summary
|
|
240
|
+
|
|
241
|
+
CI Perf Lint tells you:
|
|
242
|
+
|
|
243
|
+
- what to fix
|
|
244
|
+
- what to fix first
|
|
245
|
+
- how to verify it
|
|
246
|
+
- how to safely apply it with AI
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ci-perf-lint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Static analysis tool for CI workflow performance",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"ci-perf-lint": "cli.mjs"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@yoshi-taka/ci-perf-lint": "
|
|
11
|
+
"@yoshi-taka/ci-perf-lint": "0.1.1"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|