-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatterns.json
More file actions
242 lines (228 loc) · 15.5 KB
/
Copy pathpatterns.json
File metadata and controls
242 lines (228 loc) · 15.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
{
"_comment": "hook_confidence marks which sets the Stop hook blocks on. The linter reports every set.",
"hook_confidence": ["banned_words", "banned_phrases", "sycophancy", "sycophancy_tone", "verbosity", "ambiguous_phrases", "structural"],
"_length_comment": "Word count at which the UserPromptSubmit tier notes the length. Never blocks: a report the reader asked for runs as long as it needs. Anthropic hard-capped Claude Code responses at 100 words in April 2026 and reverted it four days later after a 3% eval drop, so this stays a soft nudge, not a cap.",
"length_warning_words": 250,
"_phrase_sets_comment": "set -> {kind, tools}. An entry is a bare pattern or a [pattern, description] pair; the description replaces the matched text in the report, which matters when the match is two characters of punctuation.",
"_phrase_sets": {
"banned_phrases": { "kind": "phrase", "tools": ["lint", "hook"] },
"sycophancy": { "kind": "sycophancy", "tools": ["lint", "hook"] },
"sycophancy_tone": { "kind": "sycophancy", "tools": ["hook"] },
"verbosity": { "kind": "verbosity", "tools": ["hook"] },
"ambiguous_phrases": { "kind": "ambiguous", "tools": ["hook"], "soft": true }
},
"banned_words": [
"delve", "tapestry", "symphony", "lifeblood", "beacon", "multifaceted",
"spearhead", "bolster", "garner", "illuminate", "showcase", "vibrant",
"meticulous", "holistic", "transformative", "profound",
"moreover", "furthermore", "additionally", "notably", "fundamentally",
"leverage", "foster", "facilitate", "seamless", "intricate", "pivotal",
"crucial", "cornerstone", "paradigm", "interplay", "streamline"
],
"_ambiguous_comment": "Real technical words too. The linter flags them; the hook does not block.",
"ambiguous_words": [
"harness", "landscape", "realm", "backbone", "robust", "comprehensive",
"vital", "nuanced", "compelling", "underscore", "unpack", "importantly",
"elevate"
],
"_phrase_comment": "Apostrophes are straight. Both tools map the curly forms before matching. The contrast joins accept a semicolon, which is how the construction escapes a comma-only pattern.",
"banned_phrases": [
"load[- ]bearing",
"it'?s not (just |merely |simply |only )?[^,.;]{2,60}[,;] it'?s",
"that'?s not [^,.;]{2,60}[,;] that'?s",
"that'?s (a|an|the) [^,.;]{2,40}, not (a|an|the) ",
"this isn'?t (about )?[^,.;]{2,60}[,;] it'?s",
"\\w+ isn'?t just (a|an|the) ",
"\\w+ isn'?t just [^,.;]{2,60}[,;] it'?s",
"less [^,.]{2,40}, more ",
"not because [^,.;]{2,60}, but because",
"the real \\w+ (is|was)n'?t\\b",
"(is|are|was|were) not just\\b",
"(that|this|it)('?s| is| was) [^,.;!?]{1,60}, not\\b",
", not (a|an|the) \\w+",
"not (merely|simply|just) [^,.;]{2,60}, but",
"at the end of the day",
"stands as (a|an|the) ",
"underscores the importance",
"marks a shift",
"(^|[.!?] )in summary[,:]",
"(^|[.!?] )overall, ",
"battle[- ]tested",
"blazing[- ]fast",
"don'?t hesitate to",
"let me know your thoughts",
"plays a (crucial|vital|key|important) role",
"stands as a testament",
"it'?s worth noting",
"at its core",
"the reality is",
"in today'?s fast[- ]paced",
"when it comes to",
"say the word",
"just let me know",
"let me know if you'?(d|ll| would| will)",
"let me know (if|how|what|which|whether) you",
"let me know and i'?(ll| can)",
"i'?d be (happy|glad) to",
"happy to (help|assist|dig|take|do|add|walk|expand|adjust|elaborate|clarify|explore)",
"feel free to",
"hope (this|that) helps",
"if you'?d (like|prefer),? i (can|could|'?ll)",
"if you want,? i (can|could|'?ll)",
"shall i (proceed|continue|go ahead)",
"does that (work|sound good|make sense) for you",
"how (would you like|do you want) (me )?to proceed",
"let'?s dive in",
"i hope this finds you well",
"north star",
"deep dive",
"game[- ]changer"
],
"_sycophancy_comment": "Flattery, reflexive agreement, apology inflation. The regexes catch the surface. The judgment half lives in skills/anti-slop/references/sycophancy.md, where no linter reaches.",
"sycophancy": [
"(^|[.!?] )(great|good|excellent|interesting|fair|nice|smart) (question|point|call|catch|idea|observation|suggestion|thinking)\\b",
"your (approach|design|idea|point|instinct|solution|refactor|reading|question|concern) (is|was) (a )?(great|good|right|clean|correct|valid|fair|solid|elegant|smart)",
"(that'?s|this is|that is) (a|an) (great|good|excellent|fair|valid|interesting|nice|smart|clever|clean|elegant|solid) (point|question|call|catch|idea|observation|suggestion|approach|design|solution|refactor|way|instinct)\\b",
"you make (a|an) (great|good|valid|fair|excellent) point",
"(^|[.!?] )(good|great|nice) (catch|call)\\b",
"you'?(re| are) (absolutely|completely|exactly|totally|quite|so) (right|correct)\\b",
"you'?(re| are) (right|correct)[,.!]? (and )?(i'?ll|i will|let me|i'?ve|i have|good|great|thanks|my)",
"you'?(re| are) right to (push|question|ask|call|be|want|worry)",
"(^|[.!?] )(spot on|sounds good|fair enough|makes sense|well spotted)[.!]",
"(^|[.!?] )that makes (perfect )?sense[.!]",
"could ?n'?t agree more",
"(great|excellent|nice|solid) work\\b",
"i appreciate (you|your) (pointing|catching|raising|flagging|bringing)",
"thanks for (catching|pointing|flagging|raising|the correction)",
"i apologi[sz]e for (the|any|my) (confusion|inconvenience|oversight|mistake|error)",
"sorry (about|for) (that|the confusion|the mistake|the oversight)",
"(^|[.!?] )my (mistake|apologies|bad)[.,!]",
"i should have (caught|noticed|realized) (that|it|this)\\b"
],
"_verbosity_comment": "Preamble and narration. Each one delays the finding by a sentence and tells the reader something the tool calls already showed.",
"verbosity": [
["(^|[.!?] )(yes,? )?i (read|checked|looked at|went through|reviewed) (it|that|the|them)\\b", "narrating what you read"],
["(^|[.!?] )here'?s (the|what) (actual|real|full)? ?(shape|deal|situation|picture|story|breakdown|rundown)", "preamble before the finding"],
["(^|[.!?] )(one|another) thing (i (found|noticed|spotted)|worth)", "burying a finding behind a preamble"],
["(^|[.!?] )let me (walk|explain|break|start|first)", "announcing instead of saying"],
["(^|[.!?] )(so|basically|essentially|in short|in other words|what (this|that) means is)[,:]", "restating the previous sentence"],
["(^|[.!?] )(to (recap|summarize|reiterate)|as (i|we) (said|mentioned|noted) (earlier|above|before))", "repeating yourself"],
["(^|[.!?] )(before (i|we) (start|begin|answer)|first,? (some|a bit of) (context|background))", "preamble before the answer"],
["(^|[.!?] )(it'?s|that'?s) (important|worth) (to (note|understand)|noting|understanding)", "filler opener"],
["(^|[.!?] )(and )?that changes (my|the) earlier (wording|answer|framing)", "narrating a correction"],
["(^|[.!?] )(actually,? wait|wait,? no|on second thought|let me reconsider|scratch that)\\b", "thinking out loud instead of answering"],
["(^|[.!?] )here'?s (a|the) (quick |brief |short )?summary of (the |your )?(change|work|what)", "closing summary the reader did not ask for"]
],
"_ambiguous_phrases_comment": "Often legitimate: `use tabs, not spaces` is a plain corrective. Reported on the next turn, never blocked, so a real use costs one line and no rewrite.",
"ambiguous_phrases": [
["[^\\s—]+ — [^\\s—]+ — ", "em-dash pair; a comma or a colon usually reads better"],
[", not \\w+", "corrective list; check it is not the contrast construction"],
["\\brather than\\b", "rather than; check it is not the contrast construction"],
["\\b(clean|simple|elegant|powerful|fast|efficient|clear|concise|flexible|modern|intuitive|lightweight|straightforward|reliable|tidy|neat|minimal|quick|smart)\\b,?\\s+(and\\s+)?(clean|simple|elegant|powerful|fast|efficient|clear|concise|flexible|modern|intuitive|lightweight|straightforward|reliable|tidy|neat|minimal|quick|smart)\\b", "stacked adjectives; keep the one that carries the meaning"],
["(^|[.!?] )when it comes to ", "when it comes to; for or about is plainer"],
["(^|[.!?] )at its core[,;: ]", "at its core; say the thing"]
],
"_tone_comment": "Hook only. These fire on committed markdown too often to gate a commit: a README writes `Run make install!` and `Of course, the cache can be disabled`. In a chat reply they are the enthusiasm register.",
"sycophancy_tone": [
["(^|[.!?] )(absolutely|certainly|definitely|exactly|indeed|perfect|excellent|awesome|wonderful|fantastic|brilliant)[!.,]", "enthusiasm opener"],
["(^|[.!?] )(sure|of course)!", "enthusiasm opener"],
["^.{0,32}!(\\s|$)", "exclamation mark in technical prose"]
],
"_capitulation_comment": "Reflexive agreement needs both sides of the turn, so only the hook runs this. The rule fires when the user pushed back, the reply opens by agreeing, and the reply cites nothing. An agreement backed by a file, a line, a command or a number passes.",
"pushback_markers": [
"(^|[.!?] )(no|nope|nah)\\b",
"that'?s (not|wrong|incorrect|false)",
"\\b(wrong|incorrect|mistaken)\\b",
"actually[, ]+(the|it|its|it'?s|that|this|no|you|we|i )",
"you (missed|forgot|didn'?t|failed to|got .{0,20}wrong)",
"are you sure",
"why (did|would) you",
"isn'?t (it|that|this)",
"doesn'?t (that|it|this)",
"i (think|believe) you'?(re| are)",
"i disagree",
"that doesn'?t (work|make sense|look right)",
"\\bbut\\b.{0,60}\\?"
],
"agreement_markers": [
"you'?(re| are) (absolutely |completely |exactly |totally |quite |so )?(right|correct)",
"(^|[.!?] )(yes|yep|yeah|correct|agreed|true|right)\\b",
"(^|[.!?] )(indeed|fair enough)\\b",
"(good|great|nice|fair) (catch|call|point)",
"that'?s (right|correct|true|fair)",
"my (mistake|apologies|bad)\\b",
"i (was|got that|got it) wrong",
"i apologi[sz]e",
"i should have (caught|noticed|checked|realized)"
],
"evidence_markers": [
"[\\w/.-]+\\.\\w{1,5}:\\d+",
"\\b[\\w-]+\\.(js|ts|jsx|tsx|py|go|rs|rb|java|c|h|cc|cpp|cs|php|sh|sql|json|ya?ml|toml|md)\\b",
"\\blines? \\d+",
"```",
"`[^`]+`",
"\\$ \\w",
"\\b\\d+(\\.\\d+)?\\s*(ms|s|kb|mb|gb|%|x)\\b",
"\\b(returns?|exits?|prints?|logs?|fails?) with\\b"
],
"_code_comment_comment": "Applied by `lint.py --code` to comment and docstring text only, never to code. A comment states a fact about the code. These patterns state the author's confidence, or narrate, or defer.",
"code_comment_smells": [
["(^|[.!?] )(this|the) (function|method|class|block|line|code|loop|helper) (handles|does|is responsible for|takes care of|will|performs|manages)", "narrator comment"],
["^step \\d+\\s*[:.-]", "step numbering"],
["^(first|second|third|next|then|finally)\\s*[,:]", "step narration"],
["\\b(for now|for the moment|temporarily|temporary (fix|solution|workaround)|placeholder)\\b", "deferral language"],
["\\b(we (can|could|might|may)|you (can|could|would|might) (want|need)) (add|make|change|improve|refactor|extend|handle) (this|it|that)\\b", "deferral language"],
["\\b(should work|should be fine|hopefully|presumably|i think this|not sure if|might not work|in theory)\\b", "hedging"],
["\\b(in a real|in a production|in an actual) (implementation|system|app|scenario|setting)\\b", "placeholder prose"],
["\\b(dummy|fake|sample|example|placeholder) (data|value|implementation|response)\\b", "placeholder prose"],
["^(todo|fixme|hack|xxx)\\s*[:.-]?\\s*(handle|fix|implement|add|do|clean|improve)?\\s*(this|it|that|properly|later)?\\s*$", "unassigned marker"],
["\\b(as (you|we) (requested|discussed|pointed out|mentioned)|per your (request|comment|feedback))\\b", "comment addressed to a person"],
["\\b(originally|initially|at first) (we|i|this) (called|tried|had|used|thought)\\b", "investigation narrative"],
["\\b(note that (we|this|it)|it('s| is) (worth|important) (noting|to note))\\b", "filler opener"],
["^={4,}|^-{4,}\\s*$|^#{4,}\\s*$|^\\*{4,}", "section banner"]
],
"_code_vacuous_comment": "Applied by `lint.py --code` to code lines. Each construct runs and decides nothing. Kept narrow: every entry has to be wrong in every language that has the syntax.",
"code_vacuous": [
["\\bif\\s*\\(?\\s*(true|True)\\s*\\)?\\s*[:{]", "condition is always true"],
["\\bif\\s*\\(?\\s*(false|False)\\s*\\)?\\s*[:{]", "condition is always false"],
["[=!]=\\s*(true|True)\\b", "comparing a boolean to true"],
["[=!]=\\s*(false|False)\\b", "comparing a boolean to false"],
["\\bis\\s+(not\\s+)?(True|False)\\b", "comparing a boolean to a literal"],
["\\b(\\w+)\\s*==\\s*\\1\\b", "comparing a value to itself"],
["\\blen\\(\\s*\\w+\\s*\\)\\s*>=\\s*0\\b", "length is always non-negative"],
["\\.length\\s*>=\\s*0\\b", "length is always non-negative"],
["\\bexcept\\s+\\w+(\\s+as\\s+(\\w+))?\\s*:\\s*raise\\s+\\2\\s*$", "catch and re-raise unchanged"],
["\\bexcept\\b.*:\\s*pass\\s*$", "silent exception handler"],
["\\bcatch\\s*\\([^)]*\\)\\s*\\{\\s*\\}", "silent exception handler"],
["^\\s*(\\w+)\\s*=\\s*\\1\\s*$", "assigning a value to itself"]
],
"_code_test_comment": "Applied by `lint.py --code` to files whose path marks them as tests. An assertion that cannot fail is worse than no assertion, because a reader trusts it.",
"code_test_smells": [
["\\bassert\\s+(True|true)\\s*[,)]?\\s*$", "assertion that cannot fail"],
["\\bassert\\s+(\\S.{0,60}?)\\s*==\\s*\\1\\s*[,)]?\\s*$", "both sides of the assertion run the same code"],
["\\b(toBe|toEqual)\\((\\w+\\([^()]*\\))\\)", "expected value comes from calling the code under test"],
["\\bassertTrue\\(\\s*(True|true)\\s*\\)", "assertion that cannot fail"],
["\\bexpect\\(\\s*(true|True)\\s*\\)\\.(toBe|toEqual)\\(\\s*(true|True)\\s*\\)", "assertion that cannot fail"],
["\\.(assert_called|assert_called_once|assert_called_with|assert_called_once_with|assert_any_call|toHaveBeenCalled)\\b", "asserting on a mock instead of behaviour"],
["\\bassert\\s+\\w+\\.(called|call_count)\\b", "asserting on a mock instead of behaviour"],
["\\b(pytest\\.raises|assertRaises)\\(\\s*(Exception|BaseException)\\s*\\)", "catching any exception hides a typo"],
["@(pytest\\.mark\\.)?(skip|xfail)\\b(?!.*reason)", "skipped without a reason"],
["\\b(it|test)\\.(skip|todo)\\(", "skipped test"]
],
"structural": [
["^(two|three|four|\\d+) (things|reasons|points|takeaways|options|ways)\\b", "counting what follows"],
["there are (two|three|four|\\d+) (things|reasons|points|takeaways|ways)\\b", "counting what follows"],
["^(here'?s|here are) (the |a )?(two|three|four|\\d+)\\b", "counting what follows"],
["^(to be clear|quick framing|a quick note|let me be clear|for context)\\b", "meta-commentary"],
["^i don'?t want this (to be )?read as\\b", "meta-commentary"],
["^that said,", "transition scaffolding"],
["^#{1,6}\\s*[🌀-☀-➿]", "emoji as section marker"]
],
"_ste_comment": "Matched case-sensitively. The -ing rule anchors on a capital, so it needs the case; the tense rules opt back in with (?i).",
"ste_patterns": [
["(?i)\\b(has|have|had) been \\w+ing\\b", "perfect progressive tense"],
["(?i)\\b(has|have|had) been (\\w+ed|broken|written|built|sent|taken|given|seen|done|made|held|kept|left|lost|found|set|put|run|read|torn|drawn|thrown|shown|known|grown|blown)\\b", "perfect passive"],
["(?i)\\bwill have \\w+ed\\b", "future perfect"],
["^(?!(Nothing|Something|Anything|Everything|During|String|Spring|Bring|Thing|Ring|Wing|King|Sing)\\b)[A-Z]\\w+ing (the|a|an|\\w+)", "-ing sentence opener"]
]
}