yontu 0.1.0__tar.gz

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.
Files changed (81) hide show
  1. yontu-0.1.0/LICENSE +21 -0
  2. yontu-0.1.0/PKG-INFO +255 -0
  3. yontu-0.1.0/README.md +224 -0
  4. yontu-0.1.0/pyproject.toml +54 -0
  5. yontu-0.1.0/setup.cfg +4 -0
  6. yontu-0.1.0/skills/yontu/SKILL.md +156 -0
  7. yontu-0.1.0/skills/yontu/references/ai-oruntuleri.md +175 -0
  8. yontu-0.1.0/skills/yontu/references/asiri-duzeltme.md +125 -0
  9. yontu-0.1.0/skills/yontu/references/baglaclar.md +106 -0
  10. yontu-0.1.0/skills/yontu/references/cumle-turleri.md +97 -0
  11. yontu-0.1.0/skills/yontu/references/kaynaklar.md +89 -0
  12. yontu-0.1.0/skills/yontu/references/noktalama-yazim.md +175 -0
  13. yontu-0.1.0/skills/yontu/references/ornekler.md +162 -0
  14. yontu-0.1.0/skills/yontu/references/turler/akademik-giris.md +18 -0
  15. yontu-0.1.0/skills/yontu/references/turler/akademik-ozet.md +20 -0
  16. yontu-0.1.0/skills/yontu/references/turler/akademik-tartisma.md +20 -0
  17. yontu-0.1.0/skills/yontu/references/turler/basin-bulteni.md +19 -0
  18. yontu-0.1.0/skills/yontu/references/turler/blog.md +34 -0
  19. yontu-0.1.0/skills/yontu/references/turler/changelog.md +17 -0
  20. yontu-0.1.0/skills/yontu/references/turler/commit.md +17 -0
  21. yontu-0.1.0/skills/yontu/references/turler/dilekce.md +19 -0
  22. yontu-0.1.0/skills/yontu/references/turler/e-ticaret.md +27 -0
  23. yontu-0.1.0/skills/yontu/references/turler/edebi.md +18 -0
  24. yontu-0.1.0/skills/yontu/references/turler/haber.md +17 -0
  25. yontu-0.1.0/skills/yontu/references/turler/hukuk.md +20 -0
  26. yontu-0.1.0/skills/yontu/references/turler/instagram.md +27 -0
  27. yontu-0.1.0/skills/yontu/references/turler/is-eposta.md +17 -0
  28. yontu-0.1.0/skills/yontu/references/turler/kose.md +18 -0
  29. yontu-0.1.0/skills/yontu/references/turler/linkedin.md +40 -0
  30. yontu-0.1.0/skills/yontu/references/turler/readme.md +20 -0
  31. yontu-0.1.0/skills/yontu/references/turler/reklam.md +39 -0
  32. yontu-0.1.0/skills/yontu/references/turler/resmi-eposta.md +18 -0
  33. yontu-0.1.0/skills/yontu/references/turler/resmi-yazi.md +21 -0
  34. yontu-0.1.0/skills/yontu/references/turler/sohbet.md +19 -0
  35. yontu-0.1.0/skills/yontu/references/turler/sunum.md +17 -0
  36. yontu-0.1.0/skills/yontu/references/turler/teknik-dok.md +26 -0
  37. yontu-0.1.0/skills/yontu/references/turler/tez.md +18 -0
  38. yontu-0.1.0/skills/yontu/references/turler/ui-bos.md +17 -0
  39. yontu-0.1.0/skills/yontu/references/turler/ui-buton.md +17 -0
  40. yontu-0.1.0/skills/yontu/references/turler/ui-hata.md +17 -0
  41. yontu-0.1.0/skills/yontu/references/turler/x.md +24 -0
  42. yontu-0.1.0/skills/yontu/references/turler.md +82 -0
  43. yontu-0.1.0/skills/yontu/references/yogunlastirma.md +311 -0
  44. yontu-0.1.0/skills/yontu/scripts/yontu/__init__.py +36 -0
  45. yontu-0.1.0/skills/yontu/scripts/yontu/__main__.py +11 -0
  46. yontu-0.1.0/skills/yontu/scripts/yontu/cli.py +350 -0
  47. yontu-0.1.0/skills/yontu/scripts/yontu/data/lexicon.json +2769 -0
  48. yontu-0.1.0/skills/yontu/scripts/yontu/data/ozel_adlar.json +274 -0
  49. yontu-0.1.0/skills/yontu/scripts/yontu/data/profiles.json +1310 -0
  50. yontu-0.1.0/skills/yontu/scripts/yontu/data/rules_ai.json +2527 -0
  51. yontu-0.1.0/skills/yontu/scripts/yontu/data/rules_tdk.json +2325 -0
  52. yontu-0.1.0/skills/yontu/scripts/yontu/engine.py +571 -0
  53. yontu-0.1.0/skills/yontu/scripts/yontu/fidelity.py +390 -0
  54. yontu-0.1.0/skills/yontu/scripts/yontu/hook.py +489 -0
  55. yontu-0.1.0/skills/yontu/scripts/yontu/mcp.py +546 -0
  56. yontu-0.1.0/skills/yontu/scripts/yontu/metrics.py +63 -0
  57. yontu-0.1.0/skills/yontu/scripts/yontu/ozel.py +585 -0
  58. yontu-0.1.0/skills/yontu/scripts/yontu/paths.py +61 -0
  59. yontu-0.1.0/skills/yontu/scripts/yontu/profiller.py +192 -0
  60. yontu-0.1.0/skills/yontu/scripts/yontu/textutil.py +269 -0
  61. yontu-0.1.0/skills/yontu/scripts/yontu.egg-info/PKG-INFO +255 -0
  62. yontu-0.1.0/skills/yontu/scripts/yontu.egg-info/SOURCES.txt +79 -0
  63. yontu-0.1.0/skills/yontu/scripts/yontu.egg-info/dependency_links.txt +1 -0
  64. yontu-0.1.0/skills/yontu/scripts/yontu.egg-info/entry_points.txt +3 -0
  65. yontu-0.1.0/skills/yontu/scripts/yontu.egg-info/top_level.txt +1 -0
  66. yontu-0.1.0/tests/test_api.py +53 -0
  67. yontu-0.1.0/tests/test_cli.py +177 -0
  68. yontu-0.1.0/tests/test_duzeltme.py +45 -0
  69. yontu-0.1.0/tests/test_entegrasyon.py +149 -0
  70. yontu-0.1.0/tests/test_fixtures.py +101 -0
  71. yontu-0.1.0/tests/test_hook.py +373 -0
  72. yontu-0.1.0/tests/test_inceleme.py +304 -0
  73. yontu-0.1.0/tests/test_kurallar.py +111 -0
  74. yontu-0.1.0/tests/test_mcp.py +263 -0
  75. yontu-0.1.0/tests/test_metin.py +62 -0
  76. yontu-0.1.0/tests/test_paths.py +50 -0
  77. yontu-0.1.0/tests/test_profiller.py +84 -0
  78. yontu-0.1.0/tests/test_sadakat.py +104 -0
  79. yontu-0.1.0/tests/test_seviyeler.py +158 -0
  80. yontu-0.1.0/tests/test_surum.py +54 -0
  81. yontu-0.1.0/tests/test_yanlis_alarm.py +126 -0
yontu-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 senrecep
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.
yontu-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,255 @@
1
+ Metadata-Version: 2.4
2
+ Name: yontu
3
+ Version: 0.1.0
4
+ Summary: Türkçe metin denetleyicisi: TDK yazım ve noktalama, yapay zekâ izleri, tür üslubu, yoğunlaştırma.
5
+ Author: senrecep
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/senrecep/yontu
8
+ Project-URL: Repository, https://github.com/senrecep/yontu
9
+ Project-URL: Issues, https://github.com/senrecep/yontu/issues
10
+ Project-URL: Changelog, https://github.com/senrecep/yontu/blob/main/CHANGELOG.md
11
+ Keywords: türkçe,turkish,linter,tdk,yazım,noktalama,mcp,claude
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: End Users/Desktop
16
+ Classifier: Natural Language :: Turkish
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Topic :: Text Processing :: Linguistic
27
+ Requires-Python: >=3.9
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Dynamic: license-file
31
+
32
+ # yontu
33
+
34
+ <!-- mcp-name: io.github.senrecep/yontu -->
35
+
36
+ **Turkish humanizer, TDK linter and style guide for AI agents. Türkçe metni yontar: biçim verir, inceltir.**
37
+
38
+ yontu is a Turkish humanizer (Türkçe humanizer) and TDK spelling and punctuation linter, shipped as an agent skill, an offline CLI and an MCP server. It flags AI and translation patterns in Turkish text, checks spelling and punctuation against the Türk Dil Kurumu (TDK) rules, and fits wording to the genre the text is written for. It works with Claude Code, Codex, Cursor, Gemini CLI and any MCP client. English humanizers do little for Turkish, so every rule here was written for Turkish.
39
+
40
+ [Türkçe README](README.tr.md)
41
+
42
+ ## Why
43
+
44
+ Most humanizers target English. Their rules come from lists such as Wikipedia's "Signs of AI writing", built on English words like "delve" and "tapestry". Run them on Turkish and they find almost nothing. A few patterns, such as the em dash, carry over, but only with a Turkish rule behind them (TDK allows the dash for dialogue only). Most Turkish AI text fails in other ways:
45
+
46
+ - `-mAktAdIr` at the end of every sentence, and long `-ArAk` chains
47
+ - calques such as `önemli bir rol oynamaktadır` and `bu bağlamda`
48
+ - wrappers that replace a case suffix: "konusunda", "hususunda", "bir şekilde"
49
+ - chatbot leftovers: `Umarım bu e-posta sizi iyi bulur`, `Umarım yardımcı olur`
50
+ - spelling and punctuation errors that a careful Turkish writer would not make: `herşey`, a comma before "ve", `Türkçe'de`
51
+
52
+ Turkish also changes shape with context. An academic abstract, an ad, a blog post, a README, a commit message and a court petition each have their own sentence length, formality, pronouns and connectives. A rule that fixes one breaks another: `-mAktAdIr` is normal in an abstract and a tell in a blog post. Word choice matters as much: `hızlı bir şekilde` is usually just "hızla".
53
+
54
+ yontu encodes these as rules with sources, per-genre profiles and a word list, and gives the agent a workflow that keeps the meaning intact.
55
+
56
+ ## What's in the box
57
+
58
+ | Part | What it is |
59
+ |---|---|
60
+ | Skill | `skills/yontu/`: `SKILL.md`, nine reference files and one guide per genre in `references/turler/`. Works without Python |
61
+ | Linter | Python 3.9+, standard library only, no network. Layers `tdk`, `ai-iz`, `stil`, `yogunluk` |
62
+ | Profiles | 28 genres (tür) under 17 registers: sentence length, density, formality, pronouns, mood and tense, connectives, vocabulary, punctuation, structure |
63
+ | Fidelity gate | `yontu compare OLD NEW` fails when a rewrite adds a number, date, name, URL or code span, and warns when it drops one or changes negation or modality |
64
+ | MCP server | `yontu mcp`, stdio, hand-written JSON-RPC, no SDK |
65
+ | Hooks | Post-edit or stop hooks, depending on the agent: Claude Code, Codex, Cursor, Gemini CLI, Copilot, Antigravity. Details in `integrations/` |
66
+
67
+ ## Before and after
68
+
69
+ From `skills/yontu/references/ornekler.md` (README genre):
70
+
71
+ > yontu: Türkçe Metinler İçin Modern Ve Güçlü Bir Linter
72
+ >
73
+ > yontu, Türkçe metinlerinizi analiz ederek yazım hatalarını, noktalama sorunlarını ve yapay zekâ izlerini tespit eden, modern, güçlü ve kullanıcı dostu bir araçtır. Projenin temel amacı, yazım kalitenizi bir üst seviyeye taşımaktır!
74
+ >
75
+ > Kullanım: Analiz işlemini gerçekleştirmek için aşağıdaki komutu kolayca çalıştırabilirsiniz: `yontu lint metin.md`
76
+
77
+ ```text
78
+ yontu: Türkçe metinler için linter
79
+
80
+ yontu, Türkçe metindeki yazım hatalarını, noktalama sorunlarını ve yapay zekâ izlerini bulan
81
+ bir linterdir.
82
+
83
+ Kullanım: `yontu lint metin.md`
84
+ ```
85
+
86
+ Kept: the name, the three things it finds, the command. Dropped: the adjective triad, the exclamation, "kolayca". The title moved to sentence case. Nothing was added.
87
+
88
+ ## Quick start
89
+
90
+ ### Claude Code (skill, MCP server, hooks)
91
+
92
+ ```
93
+ /plugin marketplace add senrecep/yontu
94
+ /plugin install yontu@yontu
95
+ ```
96
+
97
+ This is the only install path that also adds hooks. Commands: `/yontu:turkcelestir`, `/yontu:yontu-lint`.
98
+
99
+ ### Any agent that reads skill folders
100
+
101
+ ```
102
+ npx skills add senrecep/yontu
103
+ ```
104
+
105
+ This copies the skill only: no MCP server, no hooks.
106
+
107
+ ### CLI
108
+
109
+ ```
110
+ pipx install yontu # puts yontu and trlint on PATH
111
+ uvx yontu lint metin.md # no install
112
+ ```
113
+
114
+ From a checkout, without installing: `python3 skills/yontu/scripts/yontu lint metin.md`.
115
+
116
+ ### MCP server
117
+
118
+ ```bash
119
+ claude mcp add yontu -- uvx yontu mcp
120
+ ```
121
+
122
+ Other clients:
123
+
124
+ ```json
125
+ {
126
+ "mcpServers": {
127
+ "yontu": { "command": "uvx", "args": ["yontu", "mcp"] }
128
+ }
129
+ }
130
+ ```
131
+
132
+ ### Per agent
133
+
134
+ | Agent | Skill | MCP | Hooks |
135
+ |---|---|---|---|
136
+ | Claude Code | plugin | plugin | plugin |
137
+ | Codex CLI | `~/.agents/skills` | `codex mcp add yontu -- yontu mcp` | `hooks.json` |
138
+ | Gemini CLI | extension | extension | settings file |
139
+ | Cursor | `~/.cursor/skills` | `mcp.json` | `hooks.json` |
140
+ | claude.ai (web, mobile) | zip upload, see [folder](integrations/claude-ai/README.md) | planned for v0.2 | none |
141
+ | OpenCode, Hermes, Windsurf, Copilot, Cline, Zed, Claude Desktop, Antigravity | see folder | see folder | partial |
142
+
143
+ Config files, exact paths and what was tested on which version: [integrations/](integrations/README.md).
144
+
145
+ ### Install profiles
146
+
147
+ | Profile | What loads | Claude Code | Other agents |
148
+ |---|---|---|---|
149
+ | `lite` | the skill; it runs the linter through the shell | `/plugin install yontu-lite@yontu` | `scripts/install.sh --<agent> --profile lite --apply` |
150
+ | `standard` | `lite` plus hooks | use `full` | `--profile standard` also prints the hook config to merge |
151
+ | `full` | `standard` plus the MCP server | `/plugin install yontu@yontu` | `--profile full` prints the hook and MCP configs |
152
+
153
+ `install.sh` is a dry run without `--apply` and writes only the skill folder. In Claude Code, install one of the two plugins, not both.
154
+
155
+ Context cost: about 150 tokens always on for the full plugin before its MCP tools, about 130 for lite, and about 3,900 tokens for a whole blog rewrite. Numbers, method and what loads when: [docs/CONTEXT.md](docs/CONTEXT.md).
156
+
157
+ ## Tools
158
+
159
+ | MCP tool | What it does |
160
+ |---|---|
161
+ | `lint_text` | Findings with layer, rule id, level, span and suggestion (`detail: true` returns every field) |
162
+ | `compare_texts` | Fidelity gate between two versions |
163
+ | `get_style_guide` | Guidance for one genre by tür id, or a reference file: its section list first, then one section |
164
+ | `fix_text` | Applies safe `tdk` fixes only |
165
+ | `text_stats` | Sentence length, readability, density |
166
+ | `explain_rule` | Message, source and examples for a rule id |
167
+ | `list_profiles` | All registers and genres |
168
+ | `get_profile` | Thresholds for one genre or register |
169
+
170
+ The server lists the first three tools by default. Set `YONTU_MCP_TOOLS=full` in its env to list all eight. It answers the other five either way, but most clients show the model only listed tools.
171
+
172
+ Prompts: `turkcelestir` (translate or adapt into Turkish), `yogunlastir` (tighten a text).
173
+
174
+ ## CLI
175
+
176
+ `yontu` and `trlint` are the same command.
177
+
178
+ ```
179
+ yontu lint FILE [--register SLUG] [--tur ID] [--layer tdk,ai-iz] [--min-level warning] [--format json]
180
+ yontu lint FILE --fix [--write] # safe tdk fixes only; --write saves the file
181
+ yontu compare OLD NEW # fidelity gate
182
+ yontu stats FILE # sentence length, Ateşman readability, density
183
+ yontu rules [--layer tdk] # list rules
184
+ yontu explain AI-E6 # one rule with source and examples
185
+ yontu profiles [ID] # genres and registers
186
+ ```
187
+
188
+ `FILE` can be `-` for standard input. `lint` and `compare` exit with 1 when they report an `error`, and with 2 on a usage error.
189
+
190
+ Without `--register` or `--tur`, yontu guesses the register from the content and falls back to `notr`, where every style rule is `info`.
191
+
192
+ Project settings go in `.yontu.json` (keys `register`, `tur`, `enable`, `rules`). Silence a rule in place with `<!-- yontu-disable-next-line KS-01 -->`, or a range with `<!-- yontu-disable KS-01 -->` and `<!-- yontu-enable KS-01 -->`.
193
+
194
+ ## Profiles
195
+
196
+ `--register` picks the register, `--tur` the genre. A genre implies its register.
197
+
198
+ | Register | Genres (`--tur`) |
199
+ |---|---|
200
+ | `akademik` | `akademik-ozet`, `akademik-giris`, `akademik-tartisma`, `tez` |
201
+ | `resmi` | `dilekce`, `resmi-yazi` |
202
+ | `hukuk` | `hukuk` (contract, ruling, regulation, privacy notice) |
203
+ | `haber` | `haber` |
204
+ | `deneme` | `kose` |
205
+ | `blog` | `blog`, `linkedin` |
206
+ | `teknik` | `teknik-dok`, `readme`, `changelog` |
207
+ | `commit` | `commit` |
208
+ | `ui` | `ui-buton`, `ui-hata`, `ui-bos` |
209
+ | `pazarlama` | `reklam`, `e-ticaret` |
210
+ | `sosyal` | `x`, `instagram` |
211
+ | `kurumsal` | `resmi-eposta`, `basin-bulteni` |
212
+ | `is-eposta` | `is-eposta` |
213
+ | `sozlu` | `sunum` |
214
+ | `edebi` | `edebi` |
215
+ | `sohbet` | `sohbet` |
216
+ | `notr` | none: all style rules at `info` |
217
+
218
+ `hukuk` and `edebi` get the `tdk` layer and the fidelity gate only. The skill does not rewrite them unless asked.
219
+
220
+ ## Rule layers
221
+
222
+ | Layer | What it checks | Levels |
223
+ |---|---|---|
224
+ | `tdk` | Spelling and punctuation from the TDK Yazım Kılavuzu and Güncel Türkçe Sözlük | `error`, `warning`, `info`. The only layer with autofix |
225
+ | `ai-iz` | AI and translation patterns | `warning` or `info`, never fixed |
226
+ | `stil` | Fit to the genre profile | mostly `info` |
227
+ | `yogunluk` | Wordy phrasing, light verbs, wrappers | always `info` |
228
+
229
+ Every `tdk` rule names the TDK Yazım Kılavuzu section or Güncel Türkçe Sözlük entry it comes from. The links are in `skills/yontu/references/kaynaklar.md`. Autofix runs only on deterministic rules with near-zero false positives (`herşey` → "her şey", `Türkçe'de` → "Türkçede"). Dictionary redirects are never autofixed.
230
+
231
+ Every `ai-iz` rule carries an evidence label: `veri` (measured on a corpus), `hakem` (agreed by reviewers) or `hipotez` (observed, not measured). A `hipotez` rule never goes above `info`, and a `hakem` rule never goes above `warning`. The v0.1 rule set has no `veri` rules yet; see [ROADMAP.md](ROADMAP.md).
232
+
233
+ Run `yontu rules` for the full list and `yontu explain ID` for any rule.
234
+
235
+ ## Limitations
236
+
237
+ - Not an AI detector. yontu reports patterns. A finding does not mean a text was machine-written, and a clean report does not mean it was not. Passing a detector is not a goal.
238
+ - Heuristics. The `ai-iz`, `stil` and `yogunluk` rules are regular expressions and counts over surface forms, with no morphological analysis. Expect false positives, mostly at `info`.
239
+ - Uncalibrated thresholds. Sentence bands and density thresholds come from the literature and from review, not from a human baseline corpus. Until calibration they stay at `info` or `warning`.
240
+ - No dictionary. The linter catches known misspellings, not every misspelling.
241
+
242
+ ## Contributing
243
+
244
+ See [CONTRIBUTING.md](CONTRIBUTING.md). New rules need a source, an evidence label and fixtures. Turkish examples of clean human writing in any genre are the most useful contribution: they are what calibration needs.
245
+
246
+ ## Credits
247
+
248
+ - Türk Dil Kurumu: Yazım Kuralları and Güncel Türkçe Sözlük.
249
+ - [turkish-humanify](https://github.com/durmazoguzhan/turkish-humanify) by Oguzhan Durmaz (MIT) and [turkce-humanizer](https://github.com/bushrabeg/turkce-humanizer) by bushrabeg (MIT), whose ideas were rewritten and checked against TDK.
250
+ - Wikipedia's "Signs of AI writing", for the structure of the pattern catalog.
251
+ - Full source list: `skills/yontu/references/kaynaklar.md`.
252
+
253
+ ## License
254
+
255
+ MIT. See [LICENSE](LICENSE).
yontu-0.1.0/README.md ADDED
@@ -0,0 +1,224 @@
1
+ # yontu
2
+
3
+ <!-- mcp-name: io.github.senrecep/yontu -->
4
+
5
+ **Turkish humanizer, TDK linter and style guide for AI agents. Türkçe metni yontar: biçim verir, inceltir.**
6
+
7
+ yontu is a Turkish humanizer (Türkçe humanizer) and TDK spelling and punctuation linter, shipped as an agent skill, an offline CLI and an MCP server. It flags AI and translation patterns in Turkish text, checks spelling and punctuation against the Türk Dil Kurumu (TDK) rules, and fits wording to the genre the text is written for. It works with Claude Code, Codex, Cursor, Gemini CLI and any MCP client. English humanizers do little for Turkish, so every rule here was written for Turkish.
8
+
9
+ [Türkçe README](README.tr.md)
10
+
11
+ ## Why
12
+
13
+ Most humanizers target English. Their rules come from lists such as Wikipedia's "Signs of AI writing", built on English words like "delve" and "tapestry". Run them on Turkish and they find almost nothing. A few patterns, such as the em dash, carry over, but only with a Turkish rule behind them (TDK allows the dash for dialogue only). Most Turkish AI text fails in other ways:
14
+
15
+ - `-mAktAdIr` at the end of every sentence, and long `-ArAk` chains
16
+ - calques such as `önemli bir rol oynamaktadır` and `bu bağlamda`
17
+ - wrappers that replace a case suffix: "konusunda", "hususunda", "bir şekilde"
18
+ - chatbot leftovers: `Umarım bu e-posta sizi iyi bulur`, `Umarım yardımcı olur`
19
+ - spelling and punctuation errors that a careful Turkish writer would not make: `herşey`, a comma before "ve", `Türkçe'de`
20
+
21
+ Turkish also changes shape with context. An academic abstract, an ad, a blog post, a README, a commit message and a court petition each have their own sentence length, formality, pronouns and connectives. A rule that fixes one breaks another: `-mAktAdIr` is normal in an abstract and a tell in a blog post. Word choice matters as much: `hızlı bir şekilde` is usually just "hızla".
22
+
23
+ yontu encodes these as rules with sources, per-genre profiles and a word list, and gives the agent a workflow that keeps the meaning intact.
24
+
25
+ ## What's in the box
26
+
27
+ | Part | What it is |
28
+ |---|---|
29
+ | Skill | `skills/yontu/`: `SKILL.md`, nine reference files and one guide per genre in `references/turler/`. Works without Python |
30
+ | Linter | Python 3.9+, standard library only, no network. Layers `tdk`, `ai-iz`, `stil`, `yogunluk` |
31
+ | Profiles | 28 genres (tür) under 17 registers: sentence length, density, formality, pronouns, mood and tense, connectives, vocabulary, punctuation, structure |
32
+ | Fidelity gate | `yontu compare OLD NEW` fails when a rewrite adds a number, date, name, URL or code span, and warns when it drops one or changes negation or modality |
33
+ | MCP server | `yontu mcp`, stdio, hand-written JSON-RPC, no SDK |
34
+ | Hooks | Post-edit or stop hooks, depending on the agent: Claude Code, Codex, Cursor, Gemini CLI, Copilot, Antigravity. Details in `integrations/` |
35
+
36
+ ## Before and after
37
+
38
+ From `skills/yontu/references/ornekler.md` (README genre):
39
+
40
+ > yontu: Türkçe Metinler İçin Modern Ve Güçlü Bir Linter
41
+ >
42
+ > yontu, Türkçe metinlerinizi analiz ederek yazım hatalarını, noktalama sorunlarını ve yapay zekâ izlerini tespit eden, modern, güçlü ve kullanıcı dostu bir araçtır. Projenin temel amacı, yazım kalitenizi bir üst seviyeye taşımaktır!
43
+ >
44
+ > Kullanım: Analiz işlemini gerçekleştirmek için aşağıdaki komutu kolayca çalıştırabilirsiniz: `yontu lint metin.md`
45
+
46
+ ```text
47
+ yontu: Türkçe metinler için linter
48
+
49
+ yontu, Türkçe metindeki yazım hatalarını, noktalama sorunlarını ve yapay zekâ izlerini bulan
50
+ bir linterdir.
51
+
52
+ Kullanım: `yontu lint metin.md`
53
+ ```
54
+
55
+ Kept: the name, the three things it finds, the command. Dropped: the adjective triad, the exclamation, "kolayca". The title moved to sentence case. Nothing was added.
56
+
57
+ ## Quick start
58
+
59
+ ### Claude Code (skill, MCP server, hooks)
60
+
61
+ ```
62
+ /plugin marketplace add senrecep/yontu
63
+ /plugin install yontu@yontu
64
+ ```
65
+
66
+ This is the only install path that also adds hooks. Commands: `/yontu:turkcelestir`, `/yontu:yontu-lint`.
67
+
68
+ ### Any agent that reads skill folders
69
+
70
+ ```
71
+ npx skills add senrecep/yontu
72
+ ```
73
+
74
+ This copies the skill only: no MCP server, no hooks.
75
+
76
+ ### CLI
77
+
78
+ ```
79
+ pipx install yontu # puts yontu and trlint on PATH
80
+ uvx yontu lint metin.md # no install
81
+ ```
82
+
83
+ From a checkout, without installing: `python3 skills/yontu/scripts/yontu lint metin.md`.
84
+
85
+ ### MCP server
86
+
87
+ ```bash
88
+ claude mcp add yontu -- uvx yontu mcp
89
+ ```
90
+
91
+ Other clients:
92
+
93
+ ```json
94
+ {
95
+ "mcpServers": {
96
+ "yontu": { "command": "uvx", "args": ["yontu", "mcp"] }
97
+ }
98
+ }
99
+ ```
100
+
101
+ ### Per agent
102
+
103
+ | Agent | Skill | MCP | Hooks |
104
+ |---|---|---|---|
105
+ | Claude Code | plugin | plugin | plugin |
106
+ | Codex CLI | `~/.agents/skills` | `codex mcp add yontu -- yontu mcp` | `hooks.json` |
107
+ | Gemini CLI | extension | extension | settings file |
108
+ | Cursor | `~/.cursor/skills` | `mcp.json` | `hooks.json` |
109
+ | claude.ai (web, mobile) | zip upload, see [folder](integrations/claude-ai/README.md) | planned for v0.2 | none |
110
+ | OpenCode, Hermes, Windsurf, Copilot, Cline, Zed, Claude Desktop, Antigravity | see folder | see folder | partial |
111
+
112
+ Config files, exact paths and what was tested on which version: [integrations/](integrations/README.md).
113
+
114
+ ### Install profiles
115
+
116
+ | Profile | What loads | Claude Code | Other agents |
117
+ |---|---|---|---|
118
+ | `lite` | the skill; it runs the linter through the shell | `/plugin install yontu-lite@yontu` | `scripts/install.sh --<agent> --profile lite --apply` |
119
+ | `standard` | `lite` plus hooks | use `full` | `--profile standard` also prints the hook config to merge |
120
+ | `full` | `standard` plus the MCP server | `/plugin install yontu@yontu` | `--profile full` prints the hook and MCP configs |
121
+
122
+ `install.sh` is a dry run without `--apply` and writes only the skill folder. In Claude Code, install one of the two plugins, not both.
123
+
124
+ Context cost: about 150 tokens always on for the full plugin before its MCP tools, about 130 for lite, and about 3,900 tokens for a whole blog rewrite. Numbers, method and what loads when: [docs/CONTEXT.md](docs/CONTEXT.md).
125
+
126
+ ## Tools
127
+
128
+ | MCP tool | What it does |
129
+ |---|---|
130
+ | `lint_text` | Findings with layer, rule id, level, span and suggestion (`detail: true` returns every field) |
131
+ | `compare_texts` | Fidelity gate between two versions |
132
+ | `get_style_guide` | Guidance for one genre by tür id, or a reference file: its section list first, then one section |
133
+ | `fix_text` | Applies safe `tdk` fixes only |
134
+ | `text_stats` | Sentence length, readability, density |
135
+ | `explain_rule` | Message, source and examples for a rule id |
136
+ | `list_profiles` | All registers and genres |
137
+ | `get_profile` | Thresholds for one genre or register |
138
+
139
+ The server lists the first three tools by default. Set `YONTU_MCP_TOOLS=full` in its env to list all eight. It answers the other five either way, but most clients show the model only listed tools.
140
+
141
+ Prompts: `turkcelestir` (translate or adapt into Turkish), `yogunlastir` (tighten a text).
142
+
143
+ ## CLI
144
+
145
+ `yontu` and `trlint` are the same command.
146
+
147
+ ```
148
+ yontu lint FILE [--register SLUG] [--tur ID] [--layer tdk,ai-iz] [--min-level warning] [--format json]
149
+ yontu lint FILE --fix [--write] # safe tdk fixes only; --write saves the file
150
+ yontu compare OLD NEW # fidelity gate
151
+ yontu stats FILE # sentence length, Ateşman readability, density
152
+ yontu rules [--layer tdk] # list rules
153
+ yontu explain AI-E6 # one rule with source and examples
154
+ yontu profiles [ID] # genres and registers
155
+ ```
156
+
157
+ `FILE` can be `-` for standard input. `lint` and `compare` exit with 1 when they report an `error`, and with 2 on a usage error.
158
+
159
+ Without `--register` or `--tur`, yontu guesses the register from the content and falls back to `notr`, where every style rule is `info`.
160
+
161
+ Project settings go in `.yontu.json` (keys `register`, `tur`, `enable`, `rules`). Silence a rule in place with `<!-- yontu-disable-next-line KS-01 -->`, or a range with `<!-- yontu-disable KS-01 -->` and `<!-- yontu-enable KS-01 -->`.
162
+
163
+ ## Profiles
164
+
165
+ `--register` picks the register, `--tur` the genre. A genre implies its register.
166
+
167
+ | Register | Genres (`--tur`) |
168
+ |---|---|
169
+ | `akademik` | `akademik-ozet`, `akademik-giris`, `akademik-tartisma`, `tez` |
170
+ | `resmi` | `dilekce`, `resmi-yazi` |
171
+ | `hukuk` | `hukuk` (contract, ruling, regulation, privacy notice) |
172
+ | `haber` | `haber` |
173
+ | `deneme` | `kose` |
174
+ | `blog` | `blog`, `linkedin` |
175
+ | `teknik` | `teknik-dok`, `readme`, `changelog` |
176
+ | `commit` | `commit` |
177
+ | `ui` | `ui-buton`, `ui-hata`, `ui-bos` |
178
+ | `pazarlama` | `reklam`, `e-ticaret` |
179
+ | `sosyal` | `x`, `instagram` |
180
+ | `kurumsal` | `resmi-eposta`, `basin-bulteni` |
181
+ | `is-eposta` | `is-eposta` |
182
+ | `sozlu` | `sunum` |
183
+ | `edebi` | `edebi` |
184
+ | `sohbet` | `sohbet` |
185
+ | `notr` | none: all style rules at `info` |
186
+
187
+ `hukuk` and `edebi` get the `tdk` layer and the fidelity gate only. The skill does not rewrite them unless asked.
188
+
189
+ ## Rule layers
190
+
191
+ | Layer | What it checks | Levels |
192
+ |---|---|---|
193
+ | `tdk` | Spelling and punctuation from the TDK Yazım Kılavuzu and Güncel Türkçe Sözlük | `error`, `warning`, `info`. The only layer with autofix |
194
+ | `ai-iz` | AI and translation patterns | `warning` or `info`, never fixed |
195
+ | `stil` | Fit to the genre profile | mostly `info` |
196
+ | `yogunluk` | Wordy phrasing, light verbs, wrappers | always `info` |
197
+
198
+ Every `tdk` rule names the TDK Yazım Kılavuzu section or Güncel Türkçe Sözlük entry it comes from. The links are in `skills/yontu/references/kaynaklar.md`. Autofix runs only on deterministic rules with near-zero false positives (`herşey` → "her şey", `Türkçe'de` → "Türkçede"). Dictionary redirects are never autofixed.
199
+
200
+ Every `ai-iz` rule carries an evidence label: `veri` (measured on a corpus), `hakem` (agreed by reviewers) or `hipotez` (observed, not measured). A `hipotez` rule never goes above `info`, and a `hakem` rule never goes above `warning`. The v0.1 rule set has no `veri` rules yet; see [ROADMAP.md](ROADMAP.md).
201
+
202
+ Run `yontu rules` for the full list and `yontu explain ID` for any rule.
203
+
204
+ ## Limitations
205
+
206
+ - Not an AI detector. yontu reports patterns. A finding does not mean a text was machine-written, and a clean report does not mean it was not. Passing a detector is not a goal.
207
+ - Heuristics. The `ai-iz`, `stil` and `yogunluk` rules are regular expressions and counts over surface forms, with no morphological analysis. Expect false positives, mostly at `info`.
208
+ - Uncalibrated thresholds. Sentence bands and density thresholds come from the literature and from review, not from a human baseline corpus. Until calibration they stay at `info` or `warning`.
209
+ - No dictionary. The linter catches known misspellings, not every misspelling.
210
+
211
+ ## Contributing
212
+
213
+ See [CONTRIBUTING.md](CONTRIBUTING.md). New rules need a source, an evidence label and fixtures. Turkish examples of clean human writing in any genre are the most useful contribution: they are what calibration needs.
214
+
215
+ ## Credits
216
+
217
+ - Türk Dil Kurumu: Yazım Kuralları and Güncel Türkçe Sözlük.
218
+ - [turkish-humanify](https://github.com/durmazoguzhan/turkish-humanify) by Oguzhan Durmaz (MIT) and [turkce-humanizer](https://github.com/bushrabeg/turkce-humanizer) by bushrabeg (MIT), whose ideas were rewritten and checked against TDK.
219
+ - Wikipedia's "Signs of AI writing", for the structure of the pattern catalog.
220
+ - Full source list: `skills/yontu/references/kaynaklar.md`.
221
+
222
+ ## License
223
+
224
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1,54 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "yontu"
7
+ version = "0.1.0"
8
+ description = "Türkçe metin denetleyicisi: TDK yazım ve noktalama, yapay zekâ izleri, tür üslubu, yoğunlaştırma."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "senrecep" }]
14
+ keywords = ["türkçe", "turkish", "linter", "tdk", "yazım", "noktalama", "mcp", "claude"]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Environment :: Console",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: End Users/Desktop",
20
+ "Natural Language :: Turkish",
21
+ "Operating System :: OS Independent",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3 :: Only",
24
+ "Programming Language :: Python :: 3.9",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Programming Language :: Python :: 3.13",
29
+ "Programming Language :: Python :: 3.14",
30
+ "Topic :: Text Processing :: Linguistic",
31
+ ]
32
+ dependencies = []
33
+
34
+ [project.urls]
35
+ Homepage = "https://github.com/senrecep/yontu"
36
+ Repository = "https://github.com/senrecep/yontu"
37
+ Issues = "https://github.com/senrecep/yontu/issues"
38
+ Changelog = "https://github.com/senrecep/yontu/blob/main/CHANGELOG.md"
39
+
40
+ [project.scripts]
41
+ yontu = "yontu.cli:main"
42
+ trlint = "yontu.cli:main"
43
+
44
+ [tool.setuptools]
45
+ # yontu.skill carries SKILL.md and references/** so the MCP guide tools work from a wheel.
46
+ # yontu.paths finds them in either layout.
47
+ package-dir = { "" = "skills/yontu/scripts", "yontu.skill" = "skills/yontu" }
48
+ packages = ["yontu", "yontu.skill"]
49
+ # Only the package-data globs below; yontu.skill's directory also holds scripts/.
50
+ include-package-data = false
51
+
52
+ [tool.setuptools.package-data]
53
+ yontu = ["data/*.json"]
54
+ "yontu.skill" = ["SKILL.md", "references/*.md", "references/**/*.md"]
yontu-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+