sloplint 0.9.0 → 0.11.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +173 -0
- data/README.md +162 -129
- data/docs/SPEC.md +8 -3
- data/lib/sloplint/cli.rb +42 -10
- data/lib/sloplint/engine.rb +8 -0
- data/lib/sloplint/output.rb +1 -1
- data/lib/sloplint/rules.rb +303 -39
- data/lib/sloplint/split.rb +44 -13
- data/lib/sloplint/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9fcbd473bcbc2f8372ac78cfbb6ecebfefb9bc38596f752721a08e3ec2689bfd
|
|
4
|
+
data.tar.gz: 3e5b841dfd1fe4f779da1d12b660d9aa7dbdbc2ad4722ddff71e39f2f4858475
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d51f08a4b7e97bedf2190a40b9f0c0a988a94b72be68f9ab69a6f11a226753a3f64f1fd9c27eb68f02ebf841abd17756135441fab80b1bed6baec9f84c20c991
|
|
7
|
+
data.tar.gz: 5955146ff1666298971a5d31cc165a33cba522c7c9eb325c570e8394759d388911d9890a5229e37eebc71afb8cddb037a3b64d9431d3355f942534fd29c3772f
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,110 @@ follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
5
5
|
|
|
6
6
|
## sloplint-judge
|
|
7
7
|
|
|
8
|
+
### [0.3.0] - 2026-11-23
|
|
9
|
+
|
|
10
|
+
- A default `--judge` run now asks the sentence rules about a long paragraph
|
|
11
|
+
that no paragraph rule flagged when a triage question, asked in the same
|
|
12
|
+
paragraph request, finds a sentence doing one of the things they look for.
|
|
13
|
+
Before, a stock figure, an unnamed authority or a verdict in the middle of
|
|
14
|
+
an otherwise plain paragraph was never asked about. The triage question is
|
|
15
|
+
not a rule and makes no note. Default runs send more sentence requests;
|
|
16
|
+
how many more depends on the prose (see docs/JUDGE.md "Cost and speed").
|
|
17
|
+
- `stock-figure` and `device-before-claim` no longer flag a quotation that
|
|
18
|
+
reports what someone said. `device-before-claim` also passes a sentence
|
|
19
|
+
that reports an event or a result, even when it sets two sides against
|
|
20
|
+
each other. Both narrowings cut the notes the triage question added on
|
|
21
|
+
human news by more than half.
|
|
22
|
+
- `stock-figure`'s suggestion now says to keep a figure when the literal
|
|
23
|
+
words lose something, or when the reader's field uses it as the plain name
|
|
24
|
+
for the thing.
|
|
25
|
+
- New paragraph rule `set-piece` (`info`, `medium`): a paragraph with a
|
|
26
|
+
sentence anywhere in it that makes its point through a device -- a
|
|
27
|
+
reversal or mirror built as a line, a slogan, a maxim, a coined figure
|
|
28
|
+
or a payoff line. A line in quotation marks counts when the document
|
|
29
|
+
writes it for someone to say; a quotation reporting what someone already said
|
|
30
|
+
does not.
|
|
31
|
+
|
|
32
|
+
### [0.2.0] - 2026-10-13
|
|
33
|
+
|
|
34
|
+
- New sentence rule `positive-form` (`info`, `low`, off by default): a claim
|
|
35
|
+
made by denial instead of a plain positive statement (Strunk and White,
|
|
36
|
+
rule 15) --
|
|
37
|
+
a correction with "not", "nothing" or "nobody" as subject or object, or an
|
|
38
|
+
instruction not to do something. A negative outside the claim passes: a
|
|
39
|
+
condition, a bound, a fixed name, a standard's MUST NOT, quoted speech, or
|
|
40
|
+
a denied option a decision names on its way to a different one. A verb
|
|
41
|
+
that performs an absence ("publishes no salary band") still flags; an
|
|
42
|
+
absence stated as a property of the thing ("has no salary band", "without
|
|
43
|
+
a salary band") passes, and so does an expected behavior denied on its own
|
|
44
|
+
("does not retry") with nothing set against it. A routing instruction
|
|
45
|
+
(which tool to use for which job) and a design choice given with its
|
|
46
|
+
reason also pass. Off by default because reference documentation states
|
|
47
|
+
limits as negatives on purpose.
|
|
48
|
+
- New sentence rule `name-the-thing` (`info`, `low`, off by default): referring to a
|
|
49
|
+
thing by anything other than its name when a name is available --
|
|
50
|
+
a position (the latter, the second one), a stand-in noun or figure (the
|
|
51
|
+
engine for a named service), an allusion to a divide it never names, or
|
|
52
|
+
the document pointing at itself ("this entire writeup"). A position that
|
|
53
|
+
is the thing's own name (step 4, the second retry, Q3), a which-clause
|
|
54
|
+
about named things, and a pronoun pointing at something just named pass.
|
|
55
|
+
- New sentence rule `device-before-claim` (`info`, `medium`): a sentence
|
|
56
|
+
that makes its claim through a device -- a mirror or matched pair, a
|
|
57
|
+
riddle, a held-back answer, a singled-out position in a list, a coined
|
|
58
|
+
figure, or a maxim -- instead of stating it plainly. Detection only; the
|
|
59
|
+
calling model decides whether the device earns its keep.
|
|
60
|
+
- New sentence rule `maxim` (`info`, `medium`): a sentence that states a
|
|
61
|
+
general saying in place of the fact the case needs, often as a
|
|
62
|
+
paragraph's closing line.
|
|
63
|
+
- New sentence rule `dressed-pair` (`info`, `low`, off by default): one
|
|
64
|
+
fact said as if it were two -- a second clause that echoes the first
|
|
65
|
+
clause's verb, or a "both" / "those two things" summing up an earlier
|
|
66
|
+
pair and handed a verdict. It catches pairs that `matched-shape` and
|
|
67
|
+
`name-the-thing` miss.
|
|
68
|
+
- New sentence rule `mirrored-opposites` (`info`, `low`, off by default):
|
|
69
|
+
opposite words joining two separate claims so they read as a contrast
|
|
70
|
+
("identical everywhere it runs and documented nowhere"). Opposites that
|
|
71
|
+
compare one thing across two cases ("runs in staging and never in
|
|
72
|
+
production") pass. The narrow case of `matched-shape`.
|
|
73
|
+
- `no-news` also flags a sentence that tells the reader, in the second
|
|
74
|
+
person, about their own past actions or their own past words. A fact is
|
|
75
|
+
not news to the reader who lived it, even when the sentence is specific.
|
|
76
|
+
- `names-nothing` judges each sentence with its paragraph. A sentence
|
|
77
|
+
passes when its paragraph makes the claim checkable, and so does a short
|
|
78
|
+
label or verbless fragment that the next sentence spells out. Pointing
|
|
79
|
+
back at things the paragraph named ("these", "this design") does not by
|
|
80
|
+
itself make a new general claim checkable.
|
|
81
|
+
- `stock-figure` passes names the writer chose: a command or identifier in
|
|
82
|
+
code, one of a set of options, statuses or modes the paragraph lists, and
|
|
83
|
+
a term the paragraph defines, the defining sentence included. Bold counts
|
|
84
|
+
only when the paragraph sets the phrase up as a name. A stock figure
|
|
85
|
+
elsewhere in the same sentence still flags.
|
|
86
|
+
- `unnamed-authority` also flags a claim called known with no source ("a
|
|
87
|
+
known cause", "it is well known that"). A known fact passes when the
|
|
88
|
+
sentence or its paragraph cites a source for it. In an abstract, a result
|
|
89
|
+
the field is said to know is prior work and passes; a person described as
|
|
90
|
+
well known is a reputation, not a claim.
|
|
91
|
+
- Graveyard: `stand-in-verb`, a rule for a verb of holding, carrying or
|
|
92
|
+
keeping standing in for a plain verb ("holds the history of a job"), was
|
|
93
|
+
added and reverted. Its only real specimens were two labelled rows, and
|
|
94
|
+
the maintainer ruled that their verbs are worn figures in their own
|
|
95
|
+
trades, not this tell. A version widened to any figurative main verb
|
|
96
|
+
read as ornate prose (`stock-figure`'s job) rather than a stand-in for
|
|
97
|
+
who knows, wrote or decides.
|
|
98
|
+
- The default `--register` is now "the reader this document is written
|
|
99
|
+
for", in place of "an engineer on the team reading a design document".
|
|
100
|
+
The model infers the reader from the text, so a run without `--register`
|
|
101
|
+
can flag different sentences than before. Name the reader when you know
|
|
102
|
+
it.
|
|
103
|
+
- `script/calibrate run --reader TEXT` asks every register's questions for
|
|
104
|
+
one reader, to measure a candidate default against each register's own
|
|
105
|
+
reader.
|
|
106
|
+
- `script/calibrate` retries API errors with backoff, including the
|
|
107
|
+
compare calls, and gains a `blogs` register (HAP-E) alongside RAID's news
|
|
108
|
+
and abstracts. A failed HAP-E download now stops with an error. `script/score-labels`
|
|
109
|
+
is a new script that scores a rule against a synthetic or real label set
|
|
110
|
+
by name.
|
|
111
|
+
|
|
8
112
|
### [0.1.0] - 2026-09-21
|
|
9
113
|
|
|
10
114
|
- New sentence rule `unnamed-authority` (`info`, `medium`): a claim handed to
|
|
@@ -81,6 +185,75 @@ follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
81
185
|
|
|
82
186
|
## sloplint
|
|
83
187
|
|
|
188
|
+
## [0.11.0] - 2026-11-23
|
|
189
|
+
|
|
190
|
+
### Added
|
|
191
|
+
|
|
192
|
+
- New rule `x-not-y` (false-correction, `warning`, `medium`): the reversed
|
|
193
|
+
corrective, with the true half first and the rejected half after a comma
|
|
194
|
+
("That's a gap, not a failure."). `not-x-but-y` and `isnt-x-its-y` only
|
|
195
|
+
see the other order.
|
|
196
|
+
|
|
197
|
+
### Changed
|
|
198
|
+
|
|
199
|
+
- `cleanly` (self-rating, `warning`) now flags every use of the adverb, at
|
|
200
|
+
`high` confidence, including the engineering idiom ("applies cleanly",
|
|
201
|
+
"exited cleanly"). Before, it flagged only some frames, and each
|
|
202
|
+
narrowing missed the next frame.
|
|
203
|
+
|
|
204
|
+
### Fixed
|
|
205
|
+
|
|
206
|
+
- Under `--markdown`, a line made only of HTML character references, with
|
|
207
|
+
or without tags among them (" ", "<br> "), is dropped. It holds
|
|
208
|
+
no words, so it is not a sentence, and the judge no longer sends it to
|
|
209
|
+
the model. An entity inside running text stays part of its sentence.
|
|
210
|
+
|
|
211
|
+
## [0.10.0] - 2026-10-13
|
|
212
|
+
|
|
213
|
+
### Added
|
|
214
|
+
|
|
215
|
+
- New rule `the-x-is-not-the-x` (cadence, `warning`, `medium`): one head noun on both sides of
|
|
216
|
+
a negated copula, split in two by a clause and never told apart ("the
|
|
217
|
+
one you want is not the one that runs the studio"). The negated twin of
|
|
218
|
+
`the-x-is-the-x`.
|
|
219
|
+
- New rule `negative-subject` (cadence, `warning`, `medium`): a negative pronoun (Nothing,
|
|
220
|
+
Nobody, No one, None) standing as the subject of a clause, dressed up
|
|
221
|
+
with a second negative-subject clause joined by "and", or a negated
|
|
222
|
+
relative clause on the object ("nothing gets merged that
|
|
223
|
+
does not get reviewed."). Bare "Nothing happened." and "No one knows."
|
|
224
|
+
are left alone.
|
|
225
|
+
|
|
226
|
+
### Changed
|
|
227
|
+
|
|
228
|
+
- Full output (`-o full`) shows each note's confidence next to its
|
|
229
|
+
severity. The `--strict` help, in `sloplint check` and `sloplint-judge check`,
|
|
230
|
+
says it also reports low-confidence notes, and that those are places to
|
|
231
|
+
look, not findings.
|
|
232
|
+
- `--register` under `--judge` now defaults to "the reader this document
|
|
233
|
+
is written for" instead of a design-document reader, and its help asks
|
|
234
|
+
you to name the real reader. The check skill passes one.
|
|
235
|
+
- `sloplint explain ID` also explains the judge's rules when sloplint-judge
|
|
236
|
+
is installed, so every rule id in a `check --judge` note explains from
|
|
237
|
+
one command. `--help` and the check skill say so.
|
|
238
|
+
- Under `--strict`, a run that reports low-confidence notes says on stderr
|
|
239
|
+
how many there are and that they are places to look, not findings.
|
|
240
|
+
stdout is unchanged, so JSON output still parses. The check skill no
|
|
241
|
+
longer adds `--strict` unless asked, and puts a low-confidence note to
|
|
242
|
+
the person as a question instead of editing on it.
|
|
243
|
+
|
|
244
|
+
### Fixed
|
|
245
|
+
|
|
246
|
+
- `rule-of-three` no longer flags the last three words of a longer list,
|
|
247
|
+
including a list hard-wrapped onto an indented line. A real triad after
|
|
248
|
+
an introductory comma ("in a word, fast, cheap, and simple") is now
|
|
249
|
+
missed too: a regex cannot tell a list comma from any other comma.
|
|
250
|
+
- `negative-subject`'s frames now accept a clause break (a comma before a
|
|
251
|
+
coordinating conjunction, or a bare comma, semicolon or colon) as well
|
|
252
|
+
as the end of the sentence, so a real clause followed by more of the
|
|
253
|
+
same sentence still matches; and its relative-clause tail now allows one
|
|
254
|
+
to ten words instead of at most three, so a real "that does not X" tail
|
|
255
|
+
isn't cut short.
|
|
256
|
+
|
|
84
257
|
## [0.9.0] - 2026-09-21
|
|
85
258
|
|
|
86
259
|
### Added
|