judgelint 0.1.1-aarch64-linux → 0.1.5-aarch64-linux

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42bcf351875ac39720d5a4721f55c58ce024cf2fd83c8582dcdc83bbbf42eb2d
4
- data.tar.gz: 33975d773a0363ab0861f0a31a1be3f7eae7f3bcc105cf5a782ce812f992a06a
3
+ metadata.gz: d7c0f0bfa265c9e179b8fd32a007061644a4765b80dce31b1fca07da74563ba2
4
+ data.tar.gz: 694fda3bb7386eceeab3db51294a44d0f23eb6681b461af058f8a7320f6fe4ba
5
5
  SHA512:
6
- metadata.gz: b813f42cc6fc08aa5a94937e80c5531694e5538a6792ddc475e7a4f4c9c5ff63e9c5e8a7357c5f80d074973bb5ca74edc8eb4c37e299ccda437e5d31715987db
7
- data.tar.gz: df2da7db05119dac2880a8a992e74ba704cb17c6026e7e3b62a4ea7c692f345171f2f7decc2899fa8a3c8b544769e506d0023d07711bde28733073cb3a3f09ef
6
+ metadata.gz: eede5f57ad9040f0ebc4e0c7c987b1fe42c6599254c8570a425b14d14d906089c6a0744540c04b282a1e2726ce649abdbc5997b147ddab8e7a458ddee9805c7a
7
+ data.tar.gz: c5f0300a8fbf211f7d2191f3eee3b47cf370dba391ef415a4a23af93036e7b68644b4ee7cbd2cb9be4440ba32e215152629762cd5c47335868494209f1162e26
data/CHANGELOG.md CHANGED
@@ -1,32 +1,67 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.5 (2026-10-26)
4
+
5
+ - The text report is in color in a terminal: errors in red, warnings and
6
+ uncertain findings in yellow, and file names in bold. `judgelint test`
7
+ marks hits green and misses red. `NO_COLOR` turns color off and
8
+ `FORCE_COLOR` turns it on. Piped output is unchanged.
9
+
10
+ ## 0.1.4 (2026-10-24)
11
+
12
+ - `Bad:` and `Good:` code blocks under a bullet are examples. The model reads
13
+ them with the spec, and `judgelint test` judges each one, along with the
14
+ files in `.judgelint/examples/`.
15
+ - `judgelint init` writes a `CONVENTIONS.md` with examples in it.
16
+ - `examples/conventions` has complete specs for Ruby, TypeScript, Python, and
17
+ Postgres migrations.
18
+
19
+ ## 0.1.3 (2026-10-24)
20
+
21
+ - No setup beyond `TYPESAFE_API_KEY`. A `CONVENTIONS.md` of bullets is a
22
+ spec with no frontmatter, and it covers the files in its directory and
23
+ below, except Markdown and lockfiles. A README still needs `paths:`.
24
+ - The cost line names the model.
25
+ - Full runs skip files git ignores, and binary files.
26
+ - `judgelint init` no longer writes `.judgelint.yml`.
27
+ - A run the cache answers in full needs no API key.
28
+
29
+ ## 0.1.2 (2026-10-24)
30
+
31
+ - Each bullet is one choice between breaking the rule, following it, and the
32
+ rule not applying, in place of two yes/no questions. On the demo app, Jev
33
+ finds 13 of 14 known violations, up from 12, with half the questions.
34
+ - Findings name the line that breaks the rule, or the file in a directory,
35
+ when the model is sure of one.
36
+ - Both the System One and OpenAI Decisions protocols send choice questions.
37
+
3
38
  ## 0.1.1 (2026-10-23)
4
39
 
5
- - `judgehint:` comments replace `judgelint:disable`. A hint says why the code
6
- is the way it is; each rule asks whether it gives a reason the code may
7
- break that rule, and reports the finding as excused if so.
8
- - Native binaries for macOS and Linux on each GitHub release, installable
40
+ - `judgehint:` comments replace `judgelint:disable`. A hint explains why code
41
+ breaks a rule. judgelint asks each rule whether the hint gives a reason that
42
+ applies to it, and reports the finding as excused if it does.
43
+ - Each GitHub release has native binaries for macOS and Linux. Install them
9
44
  with Homebrew (`brew install jpcamara/tap/judgelint`) or `install.sh`.
10
45
 
11
46
  ## 0.1.0 (2026-10-23)
12
47
 
13
- - Specs as praxis reads them: a README (or `*.judgelint.md`) with `paths:`
14
- frontmatter, each top-level bullet a rule. The model reads the spec's prose
15
- with the file and is asked whether the code breaks each bullet and whether
16
- it follows it; optional `violation:` and `compliant:` lines sharpen a
17
- bullet. Question rules in `.judgelint/rules/` for conventions a bullet
18
- can't carry.
19
- - Window, file, and directory scopes; `context:` files the model reads but
20
- never judges; line ranges on findings.
21
- - `check`, `test` (examples under `.judgelint/examples/`), `rules`,
22
- `providers`, and `init`; `--base` and `--pr` for changes; text, JSON,
23
- GitHub annotations, and SARIF.
24
- - Every request planned and priced before it's sent, with `max_cost_usd`; a
25
- cost line on every run; answers cached per model.
26
- - 16 provider presets over the System One and OpenAI Decisions protocols, and
27
- `models:` to average several.
28
- - Inline `judgelint:disable` comments, with a required reason.
29
- - No runtime dependencies; platform gems for macOS and Linux carry a native
30
- binary built with Spinel.
31
- - examples/scoop-society: praxis's TypeScript demo, checked against praxis's
32
- verdicts.
48
+ - Specs: a README or `*.judgelint.md` with `paths:` in its frontmatter,
49
+ where each top-level bullet is a rule. The model reads
50
+ the spec with the file, and each bullet is asked both ways and averaged.
51
+ `violation:` and `compliant:` lines under a bullet describe it more
52
+ precisely. Rules that don't fit in a bullet can be written as questions in
53
+ `.judgelint/rules/`.
54
+ - Rules can apply to every 40 lines, a whole file, or a whole directory.
55
+ `context:` adds files the model reads but doesn't judge.
56
+ - Commands: `check`, `test`, `rules`, `providers`, and `init`. `--base` and
57
+ `--pr` check only what changed. Output as text, JSON, GitHub annotations,
58
+ or SARIF.
59
+ - Requests are planned and priced before any are sent, and `max_cost_usd`
60
+ stops an expensive run. Every run prints its cost, and answers are cached
61
+ per model.
62
+ - 16 providers over the System One and OpenAI Decisions APIs. List more than
63
+ one in `models:` to average their answers.
64
+ - `judgelint:disable` comments, with a required reason.
65
+ - No runtime dependencies. The macOS and Linux gems include a native binary
66
+ built with Spinel.
67
+ - `examples/scoop-society`, a TypeScript demo app with known violations.
data/README.md CHANGED
@@ -1,58 +1,96 @@
1
1
  # judgelint
2
2
 
3
- Lint for the conventions a linter can't check.
3
+ judgelint checks code against conventions written in plain English. You write
4
+ them as bullets in a README. judgelint asks a decision model, such as
5
+ TypeSafe's Jev, whether each file breaks each bullet, and reports violations
6
+ with line numbers and an exit code like any other linter. Each answer takes a
7
+ few hundred milliseconds and costs a fraction of a cent.
4
8
 
5
- Write your team's conventions as bullets in a README. judgelint asks a System
6
- One decision model, such as TypeSafe's Jev, whether each file breaks each
7
- one, and reports violations with line ranges and exit codes, like a linter.
8
- Answers take a few hundred milliseconds and cost a fraction of a cent.
9
-
10
- Inspired by [praxis](https://github.com/zarpay/praxis-cli), which reads the
11
- same kind of specs with chat models. judgelint trades praxis's written
12
- findings for speed and cost, and reads praxis's specs as they are. Written in
13
- Ruby with no dependencies, and compiled to a native binary with
14
- [Spinel](https://github.com/matz/spinel), so it doesn't need Ruby to run.
15
-
16
- ## Quick start
9
+ ## Install
17
10
 
18
11
  ```sh
19
12
  brew install jpcamara/tap/judgelint
20
- # or: curl -fsSL https://raw.githubusercontent.com/jpcamara/judgelint/main/install.sh | sh
21
- # or: gem install judgelint
13
+ # or
14
+ curl -fsSL https://raw.githubusercontent.com/jpcamara/judgelint/main/install.sh | sh
15
+ ```
16
+
17
+ The script installs to `~/.local/bin`, or to `$JUDGELINT_INSTALL_DIR`. The
18
+ binaries are on the [releases page](https://github.com/jpcamara/judgelint/releases)
19
+ for macOS and Linux, on arm64 and x86_64. Linux needs glibc 2.35 or newer
20
+ (Ubuntu 22.04, Debian 12). `gem install judgelint` works too, and runs as
21
+ plain Ruby on Windows.
22
+
23
+ ## Getting started
24
+
25
+ Write your conventions as bullets in a `CONVENTIONS.md`:
26
+
27
+ ```markdown
28
+ - **No silent rescues.** A rescue logs the error, re-raises it, or returns a
29
+ failure the caller sees.
30
+ - **Error messages say what to do next.** A raised error names what was wrong
31
+ and what would work instead.
32
+ ```
22
33
 
23
- judgelint init # .judgelint.yml and an example spec
34
+ Then set your TypeSafe API key and run it:
35
+
36
+ ```sh
24
37
  export TYPESAFE_API_KEY=...
25
- judgelint test # judge the spec's examples
26
- judgelint --base main # check what changed since main
27
- judgelint # or every file the specs govern
38
+ judgelint # checks every file
39
+ judgelint --base main # checks only what changed since main
28
40
  ```
29
41
 
30
- On [praxis's demo](examples/scoop-society) (long messages cut here):
42
+ ```text
43
+ lib/profile.rb
44
+ x error root/no-silent-rescues 5 0.99 No silent rescues.
45
+ x error root/error-messages-say-what-to-do 9 0.97 Error messages say what to do next.
46
+
47
+ 1 file, 2 violations
48
+ judgelint: 1 request, 940 input tokens, $0.0000, typesafe:jev-latest
49
+ ```
50
+
51
+ That's all the setup there is. A `CONVENTIONS.md` covers the files in its
52
+ directory and below, except Markdown and lockfiles. In a git repository,
53
+ judgelint skips what git ignores. It also skips binary files.
54
+
55
+ judgelint asks Jev on TypeSafe. To use another provider, set `models` in
56
+ `.judgelint.yml` (see [Configuration](#configuration)).
57
+
58
+ Here's a run on the [demo app](examples/scoop-society), with the messages shortened:
31
59
 
32
60
  ```text
33
61
  $ judgelint src/services/apply-refund.ts src/features/flavor-of-day
34
62
  src/services/apply-refund.ts
35
- x error src/services/domain-failures-are-values-never-exceptions 1-21 0.95 Domain failures are values, never exceptions.
36
- x error src/services/error-messages-are-written-for-the 1-21 0.94 Error messages are written for the API consumer.
37
- x error src/services/every-service-has-a-doc-comment 1-21 0.97 Every service has a doc comment …
63
+ ? uncertain src/services/a-service-module-exports-exactly-one 1-21 0.47 A service module exports exactly one entry point.
64
+ x error src/services/domain-failures-are-values-never-exceptions 13 1.00 Domain failures are values, never exceptions.
65
+ x error src/services/error-messages-are-written-for-the 13 1.00 Error messages are written for the API consumer.
66
+ ? uncertain src/services/input-is-validated-before-any-work 10 0.51 Input is validated before any work happens.
67
+ x error src/services/every-service-has-a-doc-comment 1-21 1.00 Every service has a doc comment …
38
68
  src/features/flavor-of-day
39
- x error src/features/exactly-one-entry-point-index-ts 0.81 Exactly one entry point, `index.ts`, …
40
- x error src/features/logic-files-are-verb-first-kebab 0.87 Logic files are verb-first kebab-case …
41
- ? uncertain src/features/no-orphaned-files 0.60 No orphaned files.
42
- ? uncertain src/features/the-feature-s-name-describes-the 0.44 The feature's name describes the capability …
69
+ x error src/features/exactly-one-entry-point-index-ts old-rotation.ts 1.00 Exactly one entry point, `index.ts`, …
70
+ ? uncertain src/features/types-live-in-a-dedicated-feature flavor.ts 0.53 Types live in a dedicated `<feature>-types.ts` file.
71
+ x error src/features/logic-files-are-verb-first-kebab flavor.ts 0.99 Logic files are verb-first kebab-case …
72
+ x error src/features/no-orphaned-files old-rotation.ts 0.79 No orphaned files.
43
73
 
44
- 2 files, 5 violations, 2 uncertain
45
- judgelint: 2 requests, 3,320 input tokens, $0.0001
74
+ 2 files, 6 violations, 3 uncertain
75
+ judgelint: 2 requests, 6,437 input tokens, $0.0003, typesafe:jev-latest
46
76
  ```
47
77
 
48
- Exit status: 0 clean, 1 violations (or misjudged examples for `judgelint
49
- test`), 2 for usage, configuration, or model errors. Everything that can be
50
- checked is checked before the first paid request.
78
+ A finding names the line that breaks the rule, or the file in a directory,
79
+ when the model is sure of one. Otherwise it shows the lines it was asked
80
+ about.
81
+
82
+ It exits 1 when there are violations, and 2 on a usage, config, or model
83
+ error. Config problems are caught before any request is sent.
51
84
 
52
- ## Specs
85
+ In a terminal, the report is in color. Set `NO_COLOR` to turn color off, or
86
+ `FORCE_COLOR` to keep it when the output is piped.
53
87
 
54
- A README, or any `*.judgelint.md`, whose frontmatter has `paths:` is a spec.
55
- Each top-level bullet is a rule.
88
+ ## Writing specs
89
+
90
+ A spec is a `CONVENTIONS.md`, a file ending in `.judgelint.md`, or a README
91
+ with `paths:` in its frontmatter. Each top-level bullet is a rule. Put a spec
92
+ in a subdirectory for conventions that apply only there, or use `paths:` to
93
+ choose the files:
56
94
 
57
95
  ```markdown
58
96
  ---
@@ -66,16 +104,13 @@ excludes: ["src/services/legacy-import.ts"]
66
104
  - **No I/O except through the injected Store.** No timers, no fetch, no console.
67
105
  ```
68
106
 
69
- The model reads the spec's prose and the whole file, with numbered lines, and
70
- is asked each bullet two ways: "Do lines 1-40 of the file clearly violate the
71
- following team rule?" and "Do they follow it, or does it not apply?" The two
72
- answers lean opposite ways, so their average is steadier than either. Rules
73
- are named from their lead words (`src/services/no-i-o-except-through-the`),
74
- and a bullet that says "should" or "prefer" is a warning, anything else an
75
- error.
107
+ The model gets the spec and the numbered file. For each bullet, it chooses
108
+ whether the code breaks it, follows it, or isn't covered by it, and which line
109
+ breaks it most clearly. A rule's id comes from the spec's directory and the start of its bullet, like
110
+ `src/services/no-i-o-except-through-the`. Bullets that say "should" or
111
+ "prefer" are warnings, and the rest are errors.
76
112
 
77
- To sharpen a bullet, say what breaking and following it look like, on
78
- indented lines under it:
113
+ If the model misreads a bullet, describe breaking and following it:
79
114
 
80
115
  ```markdown
81
116
  - **No I/O except through the injected Store.** No timers, no fetch, no console.
@@ -83,22 +118,51 @@ indented lines under it:
83
118
  compliant: reads and writes only through the Store it's given
84
119
  ```
85
120
 
86
- They make the model more decisive, and like any wording, they're worth
87
- checking against examples.
121
+ They make the model more decisive. A loose description can also flag code
122
+ you meant to allow, so check them against examples.
123
+
124
+ ### Examples
125
+
126
+ Show the model what breaking and following a rule looks like. Under a bullet,
127
+ put code blocks after a `Bad:` or `Good:` line:
128
+
129
+ ````markdown
130
+ - **Jobs take ids, not records.** Arguments to `perform_later` are ids and
131
+ plain values. A record can change or disappear before the job runs.
132
+
133
+ Bad:
134
+
135
+ ```ruby
136
+ WelcomeEmailJob.perform_later(user)
137
+ ```
138
+
139
+ Good:
140
+
141
+ ```ruby
142
+ WelcomeEmailJob.perform_later(user.id, locale: user.locale)
143
+ ```
144
+ ````
145
+
146
+ The model reads them with the rest of the spec, and `judgelint test` checks
147
+ that it gets each one right. [examples/conventions](examples/conventions) has
148
+ complete specs for Ruby, TypeScript, Python, and Postgres migrations, with
149
+ code to run them on.
88
150
 
89
- | Frontmatter | |
151
+ | Frontmatter | What it does |
90
152
  |---|---|
91
- | `paths`, `excludes` | Globs for the files the spec governs, from the project root. |
92
- | `context` | Files the model reads alongside, such as shared types, but never judges. |
93
- | `scope` | `window` (default) asks about each 40 lines, so findings name lines; `file` asks once per file; `directory` asks once per directory `paths` matches, with every file in it. Praxis's `cohort: by_file` and `by_directory` work too. |
94
- | `severity`, `threshold` | Override the wording's severity, or the config's threshold, for every rule in the spec. |
153
+ | `paths`, `excludes` | Globs for the files the spec covers, relative to the project root. A README needs `paths`. |
154
+ | `context` | Files the model reads along with each file, like shared types. They're never judged. |
155
+ | `scope` | `window`, the default, asks about every 40 lines so findings have line numbers. `file` asks once per file. `directory` asks once per directory, shows the model every file in it, and names the file that breaks the rule. |
156
+ | `severity`, `threshold` | Set the severity or threshold for every rule in the spec. |
95
157
 
96
- A rule's answer is the probability the code breaks it: at or above the
97
- threshold (0.7) it's a violation, within 0.3 below it's uncertain (reported,
98
- never failing).
158
+ Each answer is the probability that the code breaks the rule. At 0.7 or above
159
+ it's a violation. Between 0.4 and 0.7 it's reported as uncertain, which
160
+ doesn't fail the run.
99
161
 
100
- **When a bullet isn't enough**, write that rule as a question in
101
- `.judgelint/rules/<id>.md`, with criteria the model weighs its answer against:
162
+ ### Rules written as questions
163
+
164
+ When a convention doesn't fit in a bullet, write it as a question in
165
+ `.judgelint/rules/<id>.md`:
102
166
 
103
167
  ```markdown
104
168
  ---
@@ -111,90 +175,92 @@ paths: ["src/features/*"]
111
175
  Every file in a feature is reachable from index.ts.
112
176
  ```
113
177
 
114
- `fail_when: no` inverts a question like "Does this service validate its
115
- input first?".
178
+ Add `fail_when: no` when a "no" is the violation, as in "Does this service
179
+ validate its input first?"
180
+
181
+ ## Explaining exceptions
116
182
 
117
- **Explain an exception** with a `judgehint:` comment, in any comment style:
183
+ When code breaks a rule on purpose, explain why in a `judgehint:` comment. Any
184
+ comment style works.
118
185
 
119
186
  ```ts
120
187
  // judgehint: throwing is intentional. Only the nightly job calls this, after
121
188
  // checking the review, so a bad id here is a programmer error.
122
189
  ```
123
190
 
124
- For each rule, code with a hint in its 40 lines is also asked whether the
125
- hint gives a reason it may break that rule. If so, the finding is reported as
126
- excused rather than as a violation. A hint excuses only the rule its reason
127
- is about, and one with no reason ("this is intentional") excuses nothing.
191
+ For each rule, judgelint asks whether a hint in the same 40 lines gives a
192
+ reason the code can break it. If it does, the finding is reported as excused
193
+ and doesn't fail the run. A hint only excuses the rule it explains, and a hint
194
+ with no reason, like "this is intentional", doesn't excuse anything.
128
195
 
129
- ## Examples
196
+ ## Testing rules
130
197
 
131
- Decision models classify well and apply policies less well, so the way to
132
- know a rule works is to try it. Put examples under
133
- `.judgelint/examples/<rule id>/pass/` (must not be violations) and `fail/`
134
- (must be), and `judgelint test` reports what the model gets wrong:
198
+ `judgelint test` judges each rule's examples and shows which ones the model
199
+ gets wrong:
135
200
 
136
201
  ```text
137
- lib/no-silent-rescues 9/10
138
- ok pass 0.03 .judgelint/examples/lib/no-silent-rescues/pass/logs_and_reraises.rb
139
- MISS pass 0.79 .judgelint/examples/lib/no-silent-rescues/pass/retries_then_raises.rb
140
- ok fail 0.94 .judgelint/examples/lib/no-silent-rescues/fail/assigns_default.rb
202
+ root/jobs-take-ids-not-records 2/2
203
+ ok fail 1.00 CONVENTIONS.md:67
204
+ ok pass 0.00 CONVENTIONS.md:73
205
+ root/no-silent-rescues 2/3
206
+ ok pass 0.03 .judgelint/examples/root/no-silent-rescues/pass/logs_and_reraises.rb
207
+ MISS pass 0.79 .judgelint/examples/root/no-silent-rescues/pass/retries_then_raises.rb
208
+ ok fail 0.94 .judgelint/examples/root/no-silent-rescues/fail/assigns_default.rb
141
209
  ```
142
210
 
143
- A miss means the bullet needs rewording or the convention is too broad for
144
- one question. (Saying a retry that eventually raises is fine took this repo's
145
- own rule, in [lib/README.md](lib/README.md), to 10/10.) The model sees each
146
- example's path relative to `pass/` or `fail/`, so the directory never gives
147
- the answer away. For a directory rule, each example is a directory.
211
+ `Bad:` and `Good:` blocks in the spec are the quickest examples to write. The
212
+ model also reads them during every check, so passing them shows it
213
+ understands the rule, not that it gets the rule right on code it hasn't seen.
214
+ For that, and for longer examples, put whole files that follow the rule in
215
+ `.judgelint/examples/<rule id>/pass/` and files that break it in `fail/`. The
216
+ model doesn't see the `pass/` or `fail/` part of the path. For a directory
217
+ rule, each example is a directory.
218
+
219
+ When an example fails, reword the bullet or split it into narrower rules.
220
+ `judgelint init` writes a spec with examples to start from.
148
221
 
149
- ## In CI
222
+ ## CI
150
223
 
151
224
  ```sh
152
- judgelint --base main # since the merge base with main, uncommitted work included
153
- judgelint --pr # the pull request's base branch
154
- judgelint --pr --format github # annotations on the changed lines (also: json, sarif)
225
+ judgelint --base main # changes since the merge base with main, plus uncommitted work
226
+ judgelint --pr # changes in the current pull request
227
+ judgelint --pr --format github # GitHub annotations on the changed lines (json and sarif work too)
155
228
  ```
156
229
 
157
- `--base` asks only about the 40-line windows a change touched, and about
158
- directories with a changed file, so old code can't block new work. `--pr`
159
- reads the base branch from the CI (GitHub Actions, GitLab, Buildkite,
160
- Bitbucket, Azure Pipelines, or `JUDGELINT_BASE_BRANCH`), then `gh`. Check out
161
- enough history for the merge base.
230
+ These only ask about the 40-line windows that changed, so existing code
231
+ doesn't block a new pull request. `--pr` gets the base branch from GitHub
232
+ Actions, GitLab, Buildkite, Bitbucket, Azure Pipelines,
233
+ `JUDGELINT_BASE_BRANCH`, or `gh`. Fetch enough history for git to find the
234
+ merge base.
162
235
 
163
236
  ## Configuration
164
237
 
165
- `.judgelint.yml` has four settings:
238
+ judgelint runs without a config file. `.judgelint.yml` has four settings:
166
239
 
167
240
  ```yaml
168
- models: [typesafe] # a model is provider[:model]; list two to average their answers
241
+ models: [typesafe] # provider or provider:model; list two to average them
169
242
  threshold: 0.7
170
- ignore: ["vendor/**"] # files no rule judges, and READMEs that are never specs
171
- max_cost_usd: 1.00 # refuse a run estimated over this, unless --yes
243
+ ignore: ["vendor/**"] # files no rule checks, and READMEs that aren't specs
244
+ max_cost_usd: 1.00 # refuse a run estimated to cost more, unless --yes
172
245
  ```
173
246
 
174
- Flags: `--base`, `--pr`, `--format`, `--model` (replaces `models` for one
175
- run), `--no-cache`, `--yes`, `--config`.
247
+ Every run prints what it cost. Answers are cached in `.judgelint/cache.json`,
248
+ so a file that hasn't changed costs nothing. Commit the cache to share it.
249
+ `judgelint --help` lists the flags.
176
250
 
177
- Every run ends with its cost. Answers are cached in `.judgelint/cache.json`
178
- by file, question, and model, so an unchanged file costs nothing; commit the
179
- cache to share it.
180
-
181
- **Two models are more certain than one.** On praxis's demo, Jev alone leaves
182
- 9 to 11 findings uncertain; averaging Jev and Cloudflare's Clef leaves 4, with
183
- the same 12 of 14 violations found and none false, for $0.02 a run
184
- (`models: [typesafe, cloudflare]`). Each model's answers are cached on their
185
- own, and all of a file's requests go out at once. The
186
- [example](examples/scoop-society) compares the models one at a time.
251
+ List two models to average their answers, like `models: [typesafe,
252
+ cloudflare]`. Each model's answers are cached separately.
187
253
 
188
254
  ### Providers
189
255
 
190
- `judgelint providers` lists them. Live-tested: `typesafe` (Jev, the default),
191
- `openrouter`, `celeris`, `cloudflare`, and `openai` (its Decisions API). From
192
- their docs: `perplexity`, `vercel`, `digitalocean`, `upstage`, `hanzo`,
193
- `foundry`, `databricks`, and local `ollama`, `llamacpp`, `vllm`, and
194
- `litellm`. Each reads its key from the usual variable (`TYPESAFE_API_KEY`,
195
- `CLOUDFLARE_API_TOKEN`, and so on).
256
+ `judgelint providers` lists them. Tested against the live APIs: `typesafe`
257
+ (Jev, the default), `openrouter`, `celeris`, `cloudflare`, and `openai`.
258
+ Set up from their docs: `perplexity`, `vercel`, `digitalocean`, `upstage`,
259
+ `hanzo`, `foundry`, `databricks`, `ollama`, `llamacpp`, `vllm`, and
260
+ `litellm`. Each one reads its key from the provider's usual variable, like
261
+ `TYPESAFE_API_KEY`.
196
262
 
197
- Any other System One or Decisions endpoint is a mapping in `models`:
263
+ For any other System One or Decisions endpoint, add a mapping to `models`:
198
264
 
199
265
  ```yaml
200
266
  models:
@@ -205,36 +271,26 @@ models:
205
271
  # headers: {} provider_options: {} price_per_million: 0.04 batch_size: 32
206
272
  ```
207
273
 
208
- ## Native binary
274
+ ## Building from source
209
275
 
210
- ```sh
211
- git clone https://github.com/matz/spinel && (cd spinel && make deps && make)
212
- SPINEL=../spinel/bin/spinel rake spinel # build/judgelint
213
- SPINEL=../spinel/bin/spinel rake test:spinel # the tests, against it too
214
- ```
215
-
216
- Homebrew and `install.sh` (which installs to `~/.local/bin`, or
217
- `$JUDGELINT_INSTALL_DIR`, and takes `JUDGELINT_VERSION=v0.1.0`) install the
218
- binary from the [releases](https://github.com/jpcamara/judgelint/releases),
219
- for macOS and Linux on arm64 and x86_64; the Linux builds need glibc 2.35 or
220
- newer. On those platforms `gem install` picks a platform gem with the same
221
- binary inside and links the `judgelint` command straight to it; elsewhere,
222
- Windows included, the gem runs as plain Ruby. The binary starts in
223
- 4 ms against CRuby's 110, and in a 300-file benchmark it was 1.4x faster than
224
- CRuby on one thread and 2x on eight. Under Bundler, `bundle exec` spends about
225
- 100 ms loading Bundler first; to skip it, link the binary
226
- (`ln -s "$(bundle info judgelint --path)/libexec/judgelint" bin/judgelint`). The code stays inside what Spinel
227
- compiles: plain classes instead of `Data.define`, a hand-written option
228
- parser, no gems.
229
-
230
- ## Development
276
+ judgelint is written in Ruby and compiled with
277
+ [Spinel](https://github.com/matz/spinel).
231
278
 
232
279
  ```sh
233
280
  bundle install
234
281
  bundle exec rake test
235
- bundle exec rake example # re-ask Jev about praxis's demo and check it
282
+ git clone https://github.com/matz/spinel ../spinel && (cd ../spinel && make deps && make)
283
+ SPINEL=../spinel/bin/spinel bundle exec rake spinel # builds build/judgelint
284
+ SPINEL=../spinel/bin/spinel bundle exec rake test:spinel # runs the tests against the binary
285
+ bundle exec rake example # asks Jev about the demo app again
236
286
  ```
237
287
 
288
+ ## Credits
289
+
290
+ judgelint was inspired by [praxis](https://github.com/zarpay/praxis-cli), and
291
+ it reads praxis specs, including `cohort: by_file` and `by_directory`. The
292
+ demo app in [examples/scoop-society](examples/scoop-society) comes from praxis.
293
+
238
294
  ## License
239
295
 
240
- MIT
296
+ MIT. The demo app keeps praxis's MIT license.