plainspeak-next 1.0.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 (171) hide show
  1. plainspeak_next-1.0.0/LICENSE +21 -0
  2. plainspeak_next-1.0.0/PKG-INFO +273 -0
  3. plainspeak_next-1.0.0/README.md +224 -0
  4. plainspeak_next-1.0.0/plainspeak/__init__.py +26 -0
  5. plainspeak_next-1.0.0/plainspeak/adapters/__init__.py +7 -0
  6. plainspeak_next-1.0.0/plainspeak/adapters/cli.py +695 -0
  7. plainspeak_next-1.0.0/plainspeak/adapters/web.py +1361 -0
  8. plainspeak_next-1.0.0/plainspeak/analyzer.py +40 -0
  9. plainspeak_next-1.0.0/plainspeak/cli.py +27 -0
  10. plainspeak_next-1.0.0/plainspeak/core/__init__.py +8 -0
  11. plainspeak_next-1.0.0/plainspeak/core/barriers.py +811 -0
  12. plainspeak_next-1.0.0/plainspeak/core/glossary.py +849 -0
  13. plainspeak_next-1.0.0/plainspeak/core/lexicon.py +200 -0
  14. plainspeak_next-1.0.0/plainspeak/core/metrics.py +345 -0
  15. plainspeak_next-1.0.0/plainspeak/core/morphology.py +281 -0
  16. plainspeak_next-1.0.0/plainspeak/core/suggestions.py +329 -0
  17. plainspeak_next-1.0.0/plainspeak/core/syllable_data.bin +0 -0
  18. plainspeak_next-1.0.0/plainspeak/core/syllables.py +23 -0
  19. plainspeak_next-1.0.0/plainspeak/core/tokenize.py +360 -0
  20. plainspeak_next-1.0.0/plainspeak/core/transform.py +117 -0
  21. plainspeak_next-1.0.0/plainspeak/desktop/__init__.py +53 -0
  22. plainspeak_next-1.0.0/plainspeak/desktop/app.py +81 -0
  23. plainspeak_next-1.0.0/plainspeak/desktop/main_window.py +651 -0
  24. plainspeak_next-1.0.0/plainspeak/desktop/models.py +250 -0
  25. plainspeak_next-1.0.0/plainspeak/desktop/selftest.py +182 -0
  26. plainspeak_next-1.0.0/plainspeak/desktop/session.py +377 -0
  27. plainspeak_next-1.0.0/plainspeak/desktop/workers.py +167 -0
  28. plainspeak_next-1.0.0/plainspeak/document/__init__.py +9 -0
  29. plainspeak_next-1.0.0/plainspeak/document/detect.py +71 -0
  30. plainspeak_next-1.0.0/plainspeak/document/docx.py +26 -0
  31. plainspeak_next-1.0.0/plainspeak/document/html.py +52 -0
  32. plainspeak_next-1.0.0/plainspeak/document/load.py +51 -0
  33. plainspeak_next-1.0.0/plainspeak/document/model.py +555 -0
  34. plainspeak_next-1.0.0/plainspeak/document/parse_markdown.py +500 -0
  35. plainspeak_next-1.0.0/plainspeak/document/parse_text.py +97 -0
  36. plainspeak_next-1.0.0/plainspeak/document/pdf.py +33 -0
  37. plainspeak_next-1.0.0/plainspeak/document/text.py +20 -0
  38. plainspeak_next-1.0.0/plainspeak/glossary.py +19 -0
  39. plainspeak_next-1.0.0/plainspeak/grammar.py +24 -0
  40. plainspeak_next-1.0.0/plainspeak/integrity/__init__.py +74 -0
  41. plainspeak_next-1.0.0/plainspeak/integrity/compare.py +100 -0
  42. plainspeak_next-1.0.0/plainspeak/integrity/extract.py +237 -0
  43. plainspeak_next-1.0.0/plainspeak/integrity/model.py +152 -0
  44. plainspeak_next-1.0.0/plainspeak/integrity/policy.py +342 -0
  45. plainspeak_next-1.0.0/plainspeak/integrity/protected.py +88 -0
  46. plainspeak_next-1.0.0/plainspeak/morphology/__init__.py +47 -0
  47. plainspeak_next-1.0.0/plainspeak/morphology/casing.py +57 -0
  48. plainspeak_next-1.0.0/plainspeak/morphology/forms.py +230 -0
  49. plainspeak_next-1.0.0/plainspeak/morphology/policy.py +278 -0
  50. plainspeak_next-1.0.0/plainspeak/pipeline/__init__.py +142 -0
  51. plainspeak_next-1.0.0/plainspeak/pipeline/analysis.py +242 -0
  52. plainspeak_next-1.0.0/plainspeak/pipeline/apply.py +190 -0
  53. plainspeak_next-1.0.0/plainspeak/pipeline/audit.py +225 -0
  54. plainspeak_next-1.0.0/plainspeak/pipeline/plan.py +153 -0
  55. plainspeak_next-1.0.0/plainspeak/pipeline/planner.py +745 -0
  56. plainspeak_next-1.0.0/plainspeak/pipeline/present.py +270 -0
  57. plainspeak_next-1.0.0/plainspeak/pipeline/projection.py +338 -0
  58. plainspeak_next-1.0.0/plainspeak/pipeline/review.py +740 -0
  59. plainspeak_next-1.0.0/plainspeak/pipeline/rules_api.py +37 -0
  60. plainspeak_next-1.0.0/plainspeak/pipeline/sources.py +42 -0
  61. plainspeak_next-1.0.0/plainspeak/pipeline/style_guard.py +140 -0
  62. plainspeak_next-1.0.0/plainspeak/pipeline/style_plan.py +803 -0
  63. plainspeak_next-1.0.0/plainspeak/pipeline/style_review.py +375 -0
  64. plainspeak_next-1.0.0/plainspeak/pipeline/styling.py +199 -0
  65. plainspeak_next-1.0.0/plainspeak/reader.py +32 -0
  66. plainspeak_next-1.0.0/plainspeak/reporter.py +40 -0
  67. plainspeak_next-1.0.0/plainspeak/reporting/__init__.py +3 -0
  68. plainspeak_next-1.0.0/plainspeak/reporting/console.py +110 -0
  69. plainspeak_next-1.0.0/plainspeak/reporting/html.py +521 -0
  70. plainspeak_next-1.0.0/plainspeak/reporting/json.py +119 -0
  71. plainspeak_next-1.0.0/plainspeak/reporting/labels.py +43 -0
  72. plainspeak_next-1.0.0/plainspeak/rules/__init__.py +63 -0
  73. plainspeak_next-1.0.0/plainspeak/rules/bundled/RULESET.yaml +35 -0
  74. plainspeak_next-1.0.0/plainspeak/rules/bundled/ambiguous/migrated_ambiguous_01.yaml +788 -0
  75. plainspeak_next-1.0.0/plainspeak/rules/bundled/ambiguous/migrated_ambiguous_02.yaml +788 -0
  76. plainspeak_next-1.0.0/plainspeak/rules/bundled/ambiguous/migrated_ambiguous_03.yaml +34 -0
  77. plainspeak_next-1.0.0/plainspeak/rules/bundled/clarity/reductions.yaml +347 -0
  78. plainspeak_next-1.0.0/plainspeak/rules/bundled/framing/openers.yaml +201 -0
  79. plainspeak_next-1.0.0/plainspeak/rules/bundled/lexical/migrated_nouns_01.yaml +527 -0
  80. plainspeak_next-1.0.0/plainspeak/rules/bundled/lexical/migrated_others_01.yaml +1059 -0
  81. plainspeak_next-1.0.0/plainspeak/rules/bundled/lexical/migrated_others_02.yaml +254 -0
  82. plainspeak_next-1.0.0/plainspeak/rules/bundled/lexical/migrated_verbs_01.yaml +1119 -0
  83. plainspeak_next-1.0.0/plainspeak/rules/bundled/lexical/migrated_verbs_02.yaml +1119 -0
  84. plainspeak_next-1.0.0/plainspeak/rules/bundled/lexical/migrated_verbs_03.yaml +157 -0
  85. plainspeak_next-1.0.0/plainspeak/rules/bundled/lexical/substitutions.yaml +418 -0
  86. plainspeak_next-1.0.0/plainspeak/rules/bundled/protected/terms_of_art.yaml +183 -0
  87. plainspeak_next-1.0.0/plainspeak/rules/bundled/stylefix/transitions.yaml +301 -0
  88. plainspeak_next-1.0.0/plainspeak/rules/bundled/voice/constructions.yaml +118 -0
  89. plainspeak_next-1.0.0/plainspeak/rules/canonical.py +132 -0
  90. plainspeak_next-1.0.0/plainspeak/rules/explain.py +135 -0
  91. plainspeak_next-1.0.0/plainspeak/rules/loader.py +311 -0
  92. plainspeak_next-1.0.0/plainspeak/rules/matcher.py +311 -0
  93. plainspeak_next-1.0.0/plainspeak/rules/schema.py +896 -0
  94. plainspeak_next-1.0.0/plainspeak/simplifier.py +102 -0
  95. plainspeak_next-1.0.0/plainspeak/style/__init__.py +135 -0
  96. plainspeak_next-1.0.0/plainspeak/style/analyze.py +146 -0
  97. plainspeak_next-1.0.0/plainspeak/style/interpret.py +115 -0
  98. plainspeak_next-1.0.0/plainspeak/style/metrics.py +234 -0
  99. plainspeak_next-1.0.0/plainspeak/style/model.py +373 -0
  100. plainspeak_next-1.0.0/plainspeak/style/patterns.py +775 -0
  101. plainspeak_next-1.0.0/plainspeak/style/policy.py +443 -0
  102. plainspeak_next-1.0.0/plainspeak/style/profiles/__init__.py +80 -0
  103. plainspeak_next-1.0.0/plainspeak/style/profiles/bundled/academic.yaml +224 -0
  104. plainspeak_next-1.0.0/plainspeak/style/profiles/bundled/government.yaml +207 -0
  105. plainspeak_next-1.0.0/plainspeak/style/profiles/bundled/natural.yaml +218 -0
  106. plainspeak_next-1.0.0/plainspeak/style/profiles/bundled/plain.yaml +206 -0
  107. plainspeak_next-1.0.0/plainspeak/style/profiles/bundled/technical.yaml +206 -0
  108. plainspeak_next-1.0.0/plainspeak/style/profiles/canonical.py +88 -0
  109. plainspeak_next-1.0.0/plainspeak/style/profiles/loader.py +420 -0
  110. plainspeak_next-1.0.0/plainspeak/style/profiles/model.py +210 -0
  111. plainspeak_next-1.0.0/plainspeak/style/report.py +45 -0
  112. plainspeak_next-1.0.0/plainspeak/syllable_data.py +15 -0
  113. plainspeak_next-1.0.0/plainspeak/web.py +19 -0
  114. plainspeak_next-1.0.0/plainspeak_next.egg-info/PKG-INFO +273 -0
  115. plainspeak_next-1.0.0/plainspeak_next.egg-info/SOURCES.txt +169 -0
  116. plainspeak_next-1.0.0/plainspeak_next.egg-info/dependency_links.txt +1 -0
  117. plainspeak_next-1.0.0/plainspeak_next.egg-info/entry_points.txt +4 -0
  118. plainspeak_next-1.0.0/plainspeak_next.egg-info/requires.txt +25 -0
  119. plainspeak_next-1.0.0/plainspeak_next.egg-info/top_level.txt +1 -0
  120. plainspeak_next-1.0.0/pyproject.toml +113 -0
  121. plainspeak_next-1.0.0/setup.cfg +4 -0
  122. plainspeak_next-1.0.0/tests/test_acceptance_corpus.py +118 -0
  123. plainspeak_next-1.0.0/tests/test_analyzer.py +440 -0
  124. plainspeak_next-1.0.0/tests/test_architecture.py +781 -0
  125. plainspeak_next-1.0.0/tests/test_bundled_rules.py +338 -0
  126. plainspeak_next-1.0.0/tests/test_classifiers.py +85 -0
  127. plainspeak_next-1.0.0/tests/test_cli.py +213 -0
  128. plainspeak_next-1.0.0/tests/test_desktop_session.py +527 -0
  129. plainspeak_next-1.0.0/tests/test_desktop_ui.py +659 -0
  130. plainspeak_next-1.0.0/tests/test_document_ir.py +370 -0
  131. plainspeak_next-1.0.0/tests/test_glossary.py +93 -0
  132. plainspeak_next-1.0.0/tests/test_glossary_migration.py +350 -0
  133. plainspeak_next-1.0.0/tests/test_grammar.py +80 -0
  134. plainspeak_next-1.0.0/tests/test_install_guidance.py +100 -0
  135. plainspeak_next-1.0.0/tests/test_integrity_corpus.py +139 -0
  136. plainspeak_next-1.0.0/tests/test_integrity_equivalence.py +127 -0
  137. plainspeak_next-1.0.0/tests/test_integrity_extraction.py +376 -0
  138. plainspeak_next-1.0.0/tests/test_integrity_pipeline.py +541 -0
  139. plainspeak_next-1.0.0/tests/test_integrity_policy.py +192 -0
  140. plainspeak_next-1.0.0/tests/test_morphology.py +311 -0
  141. plainspeak_next-1.0.0/tests/test_offline.py +316 -0
  142. plainspeak_next-1.0.0/tests/test_packaging.py +210 -0
  143. plainspeak_next-1.0.0/tests/test_pipeline_analysis.py +372 -0
  144. plainspeak_next-1.0.0/tests/test_planner_index.py +124 -0
  145. plainspeak_next-1.0.0/tests/test_present.py +362 -0
  146. plainspeak_next-1.0.0/tests/test_profile_corpus.py +313 -0
  147. plainspeak_next-1.0.0/tests/test_profile_interpretation.py +478 -0
  148. plainspeak_next-1.0.0/tests/test_projection.py +405 -0
  149. plainspeak_next-1.0.0/tests/test_reader.py +94 -0
  150. plainspeak_next-1.0.0/tests/test_release_tools.py +55 -0
  151. plainspeak_next-1.0.0/tests/test_release_workflow.py +89 -0
  152. plainspeak_next-1.0.0/tests/test_reporter.py +195 -0
  153. plainspeak_next-1.0.0/tests/test_review_bundle.py +377 -0
  154. plainspeak_next-1.0.0/tests/test_rule_application.py +375 -0
  155. plainspeak_next-1.0.0/tests/test_rule_planning.py +508 -0
  156. plainspeak_next-1.0.0/tests/test_rules_cli.py +201 -0
  157. plainspeak_next-1.0.0/tests/test_rules_loader.py +325 -0
  158. plainspeak_next-1.0.0/tests/test_rules_matching.py +349 -0
  159. plainspeak_next-1.0.0/tests/test_rules_schema.py +455 -0
  160. plainspeak_next-1.0.0/tests/test_simplifier.py +297 -0
  161. plainspeak_next-1.0.0/tests/test_style_corpus.py +193 -0
  162. plainspeak_next-1.0.0/tests/test_style_determinism.py +213 -0
  163. plainspeak_next-1.0.0/tests/test_style_diagnostics.py +537 -0
  164. plainspeak_next-1.0.0/tests/test_style_policy.py +318 -0
  165. plainspeak_next-1.0.0/tests/test_style_profiles.py +537 -0
  166. plainspeak_next-1.0.0/tests/test_style_review.py +571 -0
  167. plainspeak_next-1.0.0/tests/test_style_transformations.py +568 -0
  168. plainspeak_next-1.0.0/tests/test_suggestion_fixes.py +274 -0
  169. plainspeak_next-1.0.0/tests/test_suggestion_review.py +182 -0
  170. plainspeak_next-1.0.0/tests/test_v1_quality.py +330 -0
  171. plainspeak_next-1.0.0/tests/test_web.py +61 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PlainSpeak
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.
@@ -0,0 +1,273 @@
1
+ Metadata-Version: 2.4
2
+ Name: plainspeak-next
3
+ Version: 1.0.0
4
+ Summary: Deterministic, integrity-protected presentation of prose: readability analysis, governed rewriting and human review
5
+ Author: PlainSpeak Project
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/hourwise/PlainSpeak-Next
8
+ Project-URL: Documentation, https://github.com/hourwise/PlainSpeak-Next/blob/main/HOW_IT_WORKS.md
9
+ Project-URL: Changelog, https://github.com/hourwise/PlainSpeak-Next/blob/main/CHANGELOG.md
10
+ Project-URL: Issues, https://github.com/hourwise/PlainSpeak-Next/issues
11
+ Keywords: readability,plain-language,accessibility,text-analysis,deterministic,integrity,review
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Education
14
+ Classifier: Intended Audience :: Healthcare Industry
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Text Processing
22
+ Classifier: Topic :: Text Processing :: Linguistic
23
+ Classifier: Natural Language :: English
24
+ Classifier: Environment :: Console
25
+ Classifier: Environment :: X11 Applications :: Qt
26
+ Requires-Python: >=3.10
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: click>=8.0
30
+ Requires-Dist: markdown-it-py>=3.0
31
+ Requires-Dist: PyYAML>=6.0
32
+ Provides-Extra: desktop
33
+ Requires-Dist: PySide6<6.12,>=6.8; extra == "desktop"
34
+ Provides-Extra: dev
35
+ Requires-Dist: pytest>=7.0; extra == "dev"
36
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
37
+ Requires-Dist: trove-classifiers; extra == "dev"
38
+ Provides-Extra: web
39
+ Requires-Dist: flask>=3.0; extra == "web"
40
+ Provides-Extra: docx
41
+ Requires-Dist: python-docx>=0.8; extra == "docx"
42
+ Provides-Extra: pdf
43
+ Requires-Dist: pypdf>=3.0; extra == "pdf"
44
+ Provides-Extra: all
45
+ Requires-Dist: flask>=3.0; extra == "all"
46
+ Requires-Dist: python-docx>=0.8; extra == "all"
47
+ Requires-Dist: pypdf>=3.0; extra == "all"
48
+ Dynamic: license-file
49
+
50
+ # PlainSpeak Next
51
+
52
+ **A deterministic presentation engine for prose.** PlainSpeak reads a document,
53
+ measures where it is hard going, and makes the changes it can prove are safe —
54
+ while refusing any change that would alter protected information such as a
55
+ number, a date, an amount, an identifier, a negation or an obligation.
56
+
57
+ > This is a **descendant** of [hourwise/Project-PlainSpeak](https://github.com/hourwise/Project-PlainSpeak),
58
+ > created from commit `74ecd51` with its full history preserved. Development here is
59
+ > independent and nothing syncs in either direction — see [UPSTREAM.md](UPSTREAM.md).
60
+
61
+ The upstream system — a person, a model, an agent — decides what a text means.
62
+ PlainSpeak decides how that meaning may safely be presented, and says exactly
63
+ what it changed, what it left for a person to decide, and what it refused.
64
+
65
+ - **Deterministic.** The same input, profile and ruleset give byte-identical
66
+ output on every platform. No model, no randomness, no synonym roulette.
67
+ - **Integrity-protected.** Every change passes a firewall that refuses anything
68
+ touching numbers, dates, money, units, identifiers, negation, modal verbs or
69
+ comparators. It cannot be switched off.
70
+ - **Reviewable.** Mechanical changes are marked `SAFE`. Style suggestions are
71
+ marked `REVIEW` and never happen without a person accepting them. Refusals are
72
+ marked `REFUSED` and cannot be overridden.
73
+ - **Inspectable.** Rules are versioned YAML with hashes. Every result names the
74
+ rule, policy and profile versions that produced it.
75
+ - **Offline.** No network on any path. No telemetry, no accounts.
76
+
77
+ It is not an AI detector, not a grammar checker and not a paraphrasing model.
78
+ See [V1_SCOPE.md](V1_SCOPE.md) for exactly what it does and does not promise.
79
+
80
+ ## Status
81
+
82
+ **Version 1.0.0.** Phases 0–10, the V1 blockers and the pre-release acceptance
83
+ review are accepted on `main`; the certification evidence is in
84
+ [RELEASE_READINESS.md](RELEASE_READINESS.md), what 1.0 promises is in
85
+ [V1_SCOPE.md](V1_SCOPE.md), and what reading its output on real writing found
86
+ is in [V1_ACCEPTANCE_REVIEW.md](V1_ACCEPTANCE_REVIEW.md).
87
+
88
+ New here? [WALKTHROUGH.md](WALKTHROUGH.md) takes you from installation to a
89
+ reviewed document in about ten minutes, and [HOW_IT_WORKS.md](HOW_IT_WORKS.md)
90
+ explains what PlainSpeak does and guarantees in plain terms.
91
+
92
+ ## Install
93
+
94
+ ```bash
95
+ python -m pip install "plainspeak-next[desktop]"
96
+ python -m pip install plainspeak-next # no Qt
97
+ ```
98
+
99
+ Three names, on purpose:
100
+
101
+ | | name |
102
+ |---|---|
103
+ | install from PyPI | `pip install plainspeak-next` |
104
+ | import in Python | `import plainspeak` |
105
+ | run on the command line | `plainspeak` (and `plainspeak-desktop`, `plainspeak-web`) |
106
+
107
+ > **`plainspeak-next` is the only PyPI name for this project.** The PyPI
108
+ > distribution called `plainspeak` is an unrelated project (it turns English
109
+ > into terminal commands) that also installs a Python package named
110
+ > `plainspeak`. Do not install it for PlainSpeak Next. The two are not
111
+ > supported side by side in the same Python environment: whichever was
112
+ > installed last owns `import plainspeak`. Use a separate virtual environment
113
+ > if you need both.
114
+
115
+ To install the development version from the repository instead:
116
+ `python -m pip install "plainspeak-next[desktop] @ git+https://github.com/hourwise/PlainSpeak-Next"`.
117
+
118
+ Python 3.10 or later. Tested on Windows, Linux and macOS. Portable desktop
119
+ builds for Windows and Linux, which need no Python, are produced for each
120
+ release — see [RELEASING.md](RELEASING.md). From a checkout, use
121
+ `pip install -e ".[desktop,dev]"`.
122
+
123
+ ## Desktop application
124
+
125
+ ```bash
126
+ plainspeak-desktop
127
+ ```
128
+
129
+ A native window with the original document on the left and the revised version
130
+ on the right.
131
+
132
+ > **PlainSpeak does not overwrite the document you open.** There is no Save
133
+ > command — only **Save As** — and Save As refuses any destination that
134
+ > resolves to the file you opened.
135
+
136
+ **Supported files.** `.txt`, `.md` and `.markdown`. DOCX, PDF and HTML are
137
+ refused with an explanation rather than opened: they currently load as
138
+ undifferentiated text, which is an honest fallback for analysis and a poor
139
+ foundation for editing.
140
+
141
+ **Profiles.** Natural, Plain, Technical, Government and Academic. The same
142
+ document is read against different expectations: a specification that repeats a
143
+ defined term forty times is doing its job, and the identical measurement in an
144
+ essay is a writer with a tic. Changing profile clears your review decisions,
145
+ because a decision belongs to the profile it was made under.
146
+
147
+ | | |
148
+ |---|---|
149
+ | `SAFE` | A mechanically safe change. Already applied; you can inspect it. |
150
+ | `REVIEW` | A style suggestion for the profile you chose. **Nothing happens until you accept it.** |
151
+ | `REFUSED` | PlainSpeak will not make this change. There is no override. |
152
+
153
+ Rejecting a suggestion keeps your wording and leaves the observation standing —
154
+ you disagreed about what to do, not about what was measured.
155
+
156
+ Not yet: manual editing (both panes are read-only), Accept All, structured DOCX
157
+ or PDF, custom profiles, installers. See [DESKTOP_MVP.md](DESKTOP_MVP.md).
158
+
159
+ ## Command line
160
+
161
+ ### `present`: the governed transformation
162
+
163
+ ```bash
164
+ plainspeak present document.md --profile natural # JSON contract
165
+ plainspeak present document.md --profile natural --format summary # readable account
166
+ plainspeak present document.md --profile plain --format text -o presented.md
167
+ cat reply.md | plainspeak present --stdin --profile technical
168
+ ```
169
+
170
+ `present` applies every `SAFE` change and nothing else. `REVIEW` suggestions are
171
+ reported and left unapplied — only a person, in the desktop application, can
172
+ accept one — and `REFUSED` changes are reported with the reason. The input file
173
+ is never written; `-o` refuses an existing file unless given `--overwrite`, and
174
+ refuses the input file always.
175
+
176
+ The default output is the versioned **`plainspeak.present.v1`** JSON contract:
177
+ input and output SHA-256, every engine identity, the applied changes, the pending
178
+ reviews, the refusals, the protected facts with their source offsets, and the
179
+ style observations. It contains no timestamps, paths or host details, so the
180
+ same input gives the same bytes anywhere. Exit status is 0 when presented, 1
181
+ when the input cannot be presented (the JSON carries an error `code`), and 2 for
182
+ invalid usage. `--format` also accepts `text`, `marked` and `summary`, which
183
+ are for people and carry no layout guarantee.
184
+
185
+ ### Inspecting the engine
186
+
187
+ ```bash
188
+ plainspeak style preview document.md --profile natural # suggestions, read-only
189
+ plainspeak rules list # the bundled ruleset
190
+ plainspeak rules explain PS.CLARITY.001 # one rule, in full
191
+ plainspeak profiles list # the five profiles
192
+ plainspeak profiles explain technical # one profile's margins
193
+ ```
194
+
195
+ Readability measurement:
196
+
197
+ ```bash
198
+ plainspeak analyze document.txt --output report.html
199
+ plainspeak score document.txt
200
+ ```
201
+
202
+ ### `simplify` and `web`
203
+
204
+ `plainspeak simplify` is a deprecated alias for `present --format marked`. The
205
+ web interface (`plainspeak web`) shows the same governed presentation under the
206
+ Natural profile. Both once used the inherited substitution engine, which had no
207
+ integrity firewall; neither can reach it any more, and a test enforces that no
208
+ interface can.
209
+
210
+ The readability *suggestions* in `analyze` reports and on the web page come from
211
+ the inherited glossary through a reviewed overlay: 71 suggestions that were
212
+ wrong in ordinary prose were withdrawn and 5 corrected ("leverages" used to be
213
+ offered "borrowed money"). They are advice for a person and are never applied.
214
+
215
+ ## Tests
216
+
217
+ ```bash
218
+ pip install -e ".[desktop,dev]"
219
+ QT_QPA_PLATFORM=offscreen python -m pytest -q
220
+ ```
221
+
222
+ The suite runs on Windows, Linux and macOS in CI, with and without the desktop
223
+ extra. Architecture rules — which layer may import which, and that Qt stays in
224
+ the desktop — are enforced by tests, not by convention.
225
+
226
+ ## Limitations
227
+
228
+ - English only.
229
+ - Word- and phrase-level rules. PlainSpeak does not restructure sentences, so it
230
+ will not make every text read as though a person wrote it.
231
+ - The firewall protects the categories it names. A change that alters meaning
232
+ without touching one of them is not detected.
233
+ - Readability formulas are proxies for comprehension, and no study has yet shown
234
+ that PlainSpeak's changes help readers.
235
+ - Not validated for legal, medical, financial or safety-critical documents
236
+ without qualified human review.
237
+
238
+ The full accounting is in [LIMITATIONS.md](LIMITATIONS.md) and
239
+ [V1_SCOPE.md](V1_SCOPE.md).
240
+
241
+ ## Documentation
242
+
243
+ - [HOW_IT_WORKS.md](HOW_IT_WORKS.md) — what PlainSpeak changes, what it refuses to change, and why you can rely on it
244
+ - [WALKTHROUGH.md](WALKTHROUGH.md) — install, present, review and save your first document
245
+ - [V1_SCOPE.md](V1_SCOPE.md) — what 1.0 guarantees, what it does not, and what counts as breaking
246
+ - [V1_ACCEPTANCE_REVIEW.md](V1_ACCEPTANCE_REVIEW.md) — what running PlainSpeak on 27 real documents found, and what changed
247
+ - [RELEASING.md](RELEASING.md) and [RELEASE_READINESS.md](RELEASE_READINESS.md) — how a release is built and certified, and the evidence for this one
248
+ - [ROADMAP.md](ROADMAP.md) — accepted phases, V1 blockers, and what comes after
249
+ - [ARCHITECTURE.md](ARCHITECTURE.md) — the layers, and what each may depend on
250
+ - [DESKTOP_MVP.md](DESKTOP_MVP.md) — the desktop application: architecture, file safety, review semantics, build evidence
251
+ - [STYLE_CALIBRATION.md](STYLE_CALIBRATION.md) — where the style thresholds came from, and which are not yet supported by evidence
252
+ - [STYLE_PROFILES.md](STYLE_PROFILES.md) — the five profiles and their margins
253
+ - [STYLE_TRANSFORMATIONS.md](STYLE_TRANSFORMATIONS.md) — what a style fix may propose, and what it may never do
254
+ - [GLOSSARY_MIGRATION.md](GLOSSARY_MIGRATION.md) — how 706 inherited terms were reconciled
255
+ - [LIMITATIONS.md](LIMITATIONS.md) — known gaps
256
+ - [SECURITY.md](SECURITY.md) — threat model and privacy
257
+ - [ACCESSIBILITY.md](ACCESSIBILITY.md) — checklist and known gaps
258
+ - [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) — data provenance and licences
259
+ - [UPSTREAM.md](UPSTREAM.md) — lineage, and why nothing syncs
260
+ - [CHANGELOG.md](CHANGELOG.md) — version history
261
+
262
+ Records of the original experiment, kept as historical evidence and not
263
+ updated: [MISSION.md](MISSION.md), [DECISIONS.md](DECISIONS.md),
264
+ [PROGRESS.md](PROGRESS.md), [FINAL_REPORT.md](FINAL_REPORT.md),
265
+ [Experiment Report.md](Experiment%20Report.md),
266
+ [QUALITY_PHASE_REPORT.md](QUALITY_PHASE_REPORT.md),
267
+ [VALIDATION_FINDINGS.md](VALIDATION_FINDINGS.md).
268
+
269
+ ## Licence
270
+
271
+ MIT — see [LICENSE](LICENSE).
272
+
273
+ Repository: [github.com/hourwise/PlainSpeak-Next](https://github.com/hourwise/PlainSpeak-Next)
@@ -0,0 +1,224 @@
1
+ # PlainSpeak Next
2
+
3
+ **A deterministic presentation engine for prose.** PlainSpeak reads a document,
4
+ measures where it is hard going, and makes the changes it can prove are safe —
5
+ while refusing any change that would alter protected information such as a
6
+ number, a date, an amount, an identifier, a negation or an obligation.
7
+
8
+ > This is a **descendant** of [hourwise/Project-PlainSpeak](https://github.com/hourwise/Project-PlainSpeak),
9
+ > created from commit `74ecd51` with its full history preserved. Development here is
10
+ > independent and nothing syncs in either direction — see [UPSTREAM.md](UPSTREAM.md).
11
+
12
+ The upstream system — a person, a model, an agent — decides what a text means.
13
+ PlainSpeak decides how that meaning may safely be presented, and says exactly
14
+ what it changed, what it left for a person to decide, and what it refused.
15
+
16
+ - **Deterministic.** The same input, profile and ruleset give byte-identical
17
+ output on every platform. No model, no randomness, no synonym roulette.
18
+ - **Integrity-protected.** Every change passes a firewall that refuses anything
19
+ touching numbers, dates, money, units, identifiers, negation, modal verbs or
20
+ comparators. It cannot be switched off.
21
+ - **Reviewable.** Mechanical changes are marked `SAFE`. Style suggestions are
22
+ marked `REVIEW` and never happen without a person accepting them. Refusals are
23
+ marked `REFUSED` and cannot be overridden.
24
+ - **Inspectable.** Rules are versioned YAML with hashes. Every result names the
25
+ rule, policy and profile versions that produced it.
26
+ - **Offline.** No network on any path. No telemetry, no accounts.
27
+
28
+ It is not an AI detector, not a grammar checker and not a paraphrasing model.
29
+ See [V1_SCOPE.md](V1_SCOPE.md) for exactly what it does and does not promise.
30
+
31
+ ## Status
32
+
33
+ **Version 1.0.0.** Phases 0–10, the V1 blockers and the pre-release acceptance
34
+ review are accepted on `main`; the certification evidence is in
35
+ [RELEASE_READINESS.md](RELEASE_READINESS.md), what 1.0 promises is in
36
+ [V1_SCOPE.md](V1_SCOPE.md), and what reading its output on real writing found
37
+ is in [V1_ACCEPTANCE_REVIEW.md](V1_ACCEPTANCE_REVIEW.md).
38
+
39
+ New here? [WALKTHROUGH.md](WALKTHROUGH.md) takes you from installation to a
40
+ reviewed document in about ten minutes, and [HOW_IT_WORKS.md](HOW_IT_WORKS.md)
41
+ explains what PlainSpeak does and guarantees in plain terms.
42
+
43
+ ## Install
44
+
45
+ ```bash
46
+ python -m pip install "plainspeak-next[desktop]"
47
+ python -m pip install plainspeak-next # no Qt
48
+ ```
49
+
50
+ Three names, on purpose:
51
+
52
+ | | name |
53
+ |---|---|
54
+ | install from PyPI | `pip install plainspeak-next` |
55
+ | import in Python | `import plainspeak` |
56
+ | run on the command line | `plainspeak` (and `plainspeak-desktop`, `plainspeak-web`) |
57
+
58
+ > **`plainspeak-next` is the only PyPI name for this project.** The PyPI
59
+ > distribution called `plainspeak` is an unrelated project (it turns English
60
+ > into terminal commands) that also installs a Python package named
61
+ > `plainspeak`. Do not install it for PlainSpeak Next. The two are not
62
+ > supported side by side in the same Python environment: whichever was
63
+ > installed last owns `import plainspeak`. Use a separate virtual environment
64
+ > if you need both.
65
+
66
+ To install the development version from the repository instead:
67
+ `python -m pip install "plainspeak-next[desktop] @ git+https://github.com/hourwise/PlainSpeak-Next"`.
68
+
69
+ Python 3.10 or later. Tested on Windows, Linux and macOS. Portable desktop
70
+ builds for Windows and Linux, which need no Python, are produced for each
71
+ release — see [RELEASING.md](RELEASING.md). From a checkout, use
72
+ `pip install -e ".[desktop,dev]"`.
73
+
74
+ ## Desktop application
75
+
76
+ ```bash
77
+ plainspeak-desktop
78
+ ```
79
+
80
+ A native window with the original document on the left and the revised version
81
+ on the right.
82
+
83
+ > **PlainSpeak does not overwrite the document you open.** There is no Save
84
+ > command — only **Save As** — and Save As refuses any destination that
85
+ > resolves to the file you opened.
86
+
87
+ **Supported files.** `.txt`, `.md` and `.markdown`. DOCX, PDF and HTML are
88
+ refused with an explanation rather than opened: they currently load as
89
+ undifferentiated text, which is an honest fallback for analysis and a poor
90
+ foundation for editing.
91
+
92
+ **Profiles.** Natural, Plain, Technical, Government and Academic. The same
93
+ document is read against different expectations: a specification that repeats a
94
+ defined term forty times is doing its job, and the identical measurement in an
95
+ essay is a writer with a tic. Changing profile clears your review decisions,
96
+ because a decision belongs to the profile it was made under.
97
+
98
+ | | |
99
+ |---|---|
100
+ | `SAFE` | A mechanically safe change. Already applied; you can inspect it. |
101
+ | `REVIEW` | A style suggestion for the profile you chose. **Nothing happens until you accept it.** |
102
+ | `REFUSED` | PlainSpeak will not make this change. There is no override. |
103
+
104
+ Rejecting a suggestion keeps your wording and leaves the observation standing —
105
+ you disagreed about what to do, not about what was measured.
106
+
107
+ Not yet: manual editing (both panes are read-only), Accept All, structured DOCX
108
+ or PDF, custom profiles, installers. See [DESKTOP_MVP.md](DESKTOP_MVP.md).
109
+
110
+ ## Command line
111
+
112
+ ### `present`: the governed transformation
113
+
114
+ ```bash
115
+ plainspeak present document.md --profile natural # JSON contract
116
+ plainspeak present document.md --profile natural --format summary # readable account
117
+ plainspeak present document.md --profile plain --format text -o presented.md
118
+ cat reply.md | plainspeak present --stdin --profile technical
119
+ ```
120
+
121
+ `present` applies every `SAFE` change and nothing else. `REVIEW` suggestions are
122
+ reported and left unapplied — only a person, in the desktop application, can
123
+ accept one — and `REFUSED` changes are reported with the reason. The input file
124
+ is never written; `-o` refuses an existing file unless given `--overwrite`, and
125
+ refuses the input file always.
126
+
127
+ The default output is the versioned **`plainspeak.present.v1`** JSON contract:
128
+ input and output SHA-256, every engine identity, the applied changes, the pending
129
+ reviews, the refusals, the protected facts with their source offsets, and the
130
+ style observations. It contains no timestamps, paths or host details, so the
131
+ same input gives the same bytes anywhere. Exit status is 0 when presented, 1
132
+ when the input cannot be presented (the JSON carries an error `code`), and 2 for
133
+ invalid usage. `--format` also accepts `text`, `marked` and `summary`, which
134
+ are for people and carry no layout guarantee.
135
+
136
+ ### Inspecting the engine
137
+
138
+ ```bash
139
+ plainspeak style preview document.md --profile natural # suggestions, read-only
140
+ plainspeak rules list # the bundled ruleset
141
+ plainspeak rules explain PS.CLARITY.001 # one rule, in full
142
+ plainspeak profiles list # the five profiles
143
+ plainspeak profiles explain technical # one profile's margins
144
+ ```
145
+
146
+ Readability measurement:
147
+
148
+ ```bash
149
+ plainspeak analyze document.txt --output report.html
150
+ plainspeak score document.txt
151
+ ```
152
+
153
+ ### `simplify` and `web`
154
+
155
+ `plainspeak simplify` is a deprecated alias for `present --format marked`. The
156
+ web interface (`plainspeak web`) shows the same governed presentation under the
157
+ Natural profile. Both once used the inherited substitution engine, which had no
158
+ integrity firewall; neither can reach it any more, and a test enforces that no
159
+ interface can.
160
+
161
+ The readability *suggestions* in `analyze` reports and on the web page come from
162
+ the inherited glossary through a reviewed overlay: 71 suggestions that were
163
+ wrong in ordinary prose were withdrawn and 5 corrected ("leverages" used to be
164
+ offered "borrowed money"). They are advice for a person and are never applied.
165
+
166
+ ## Tests
167
+
168
+ ```bash
169
+ pip install -e ".[desktop,dev]"
170
+ QT_QPA_PLATFORM=offscreen python -m pytest -q
171
+ ```
172
+
173
+ The suite runs on Windows, Linux and macOS in CI, with and without the desktop
174
+ extra. Architecture rules — which layer may import which, and that Qt stays in
175
+ the desktop — are enforced by tests, not by convention.
176
+
177
+ ## Limitations
178
+
179
+ - English only.
180
+ - Word- and phrase-level rules. PlainSpeak does not restructure sentences, so it
181
+ will not make every text read as though a person wrote it.
182
+ - The firewall protects the categories it names. A change that alters meaning
183
+ without touching one of them is not detected.
184
+ - Readability formulas are proxies for comprehension, and no study has yet shown
185
+ that PlainSpeak's changes help readers.
186
+ - Not validated for legal, medical, financial or safety-critical documents
187
+ without qualified human review.
188
+
189
+ The full accounting is in [LIMITATIONS.md](LIMITATIONS.md) and
190
+ [V1_SCOPE.md](V1_SCOPE.md).
191
+
192
+ ## Documentation
193
+
194
+ - [HOW_IT_WORKS.md](HOW_IT_WORKS.md) — what PlainSpeak changes, what it refuses to change, and why you can rely on it
195
+ - [WALKTHROUGH.md](WALKTHROUGH.md) — install, present, review and save your first document
196
+ - [V1_SCOPE.md](V1_SCOPE.md) — what 1.0 guarantees, what it does not, and what counts as breaking
197
+ - [V1_ACCEPTANCE_REVIEW.md](V1_ACCEPTANCE_REVIEW.md) — what running PlainSpeak on 27 real documents found, and what changed
198
+ - [RELEASING.md](RELEASING.md) and [RELEASE_READINESS.md](RELEASE_READINESS.md) — how a release is built and certified, and the evidence for this one
199
+ - [ROADMAP.md](ROADMAP.md) — accepted phases, V1 blockers, and what comes after
200
+ - [ARCHITECTURE.md](ARCHITECTURE.md) — the layers, and what each may depend on
201
+ - [DESKTOP_MVP.md](DESKTOP_MVP.md) — the desktop application: architecture, file safety, review semantics, build evidence
202
+ - [STYLE_CALIBRATION.md](STYLE_CALIBRATION.md) — where the style thresholds came from, and which are not yet supported by evidence
203
+ - [STYLE_PROFILES.md](STYLE_PROFILES.md) — the five profiles and their margins
204
+ - [STYLE_TRANSFORMATIONS.md](STYLE_TRANSFORMATIONS.md) — what a style fix may propose, and what it may never do
205
+ - [GLOSSARY_MIGRATION.md](GLOSSARY_MIGRATION.md) — how 706 inherited terms were reconciled
206
+ - [LIMITATIONS.md](LIMITATIONS.md) — known gaps
207
+ - [SECURITY.md](SECURITY.md) — threat model and privacy
208
+ - [ACCESSIBILITY.md](ACCESSIBILITY.md) — checklist and known gaps
209
+ - [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) — data provenance and licences
210
+ - [UPSTREAM.md](UPSTREAM.md) — lineage, and why nothing syncs
211
+ - [CHANGELOG.md](CHANGELOG.md) — version history
212
+
213
+ Records of the original experiment, kept as historical evidence and not
214
+ updated: [MISSION.md](MISSION.md), [DECISIONS.md](DECISIONS.md),
215
+ [PROGRESS.md](PROGRESS.md), [FINAL_REPORT.md](FINAL_REPORT.md),
216
+ [Experiment Report.md](Experiment%20Report.md),
217
+ [QUALITY_PHASE_REPORT.md](QUALITY_PHASE_REPORT.md),
218
+ [VALIDATION_FINDINGS.md](VALIDATION_FINDINGS.md).
219
+
220
+ ## Licence
221
+
222
+ MIT — see [LICENSE](LICENSE).
223
+
224
+ Repository: [github.com/hourwise/PlainSpeak-Next](https://github.com/hourwise/PlainSpeak-Next)
@@ -0,0 +1,26 @@
1
+ """
2
+ PlainSpeak — deterministic, integrity-protected presentation of prose.
3
+
4
+ Makes only the changes it can show preserve the facts a text states, and
5
+ reports what it changed, what needs a person and what it refused. All
6
+ processing is offline and local. See HOW_IT_WORKS.md.
7
+ """
8
+
9
+ __version__ = "1.0.0"
10
+ __all__ = [
11
+ # Layers
12
+ "core",
13
+ "document",
14
+ "integrity",
15
+ "reporting",
16
+ "adapters",
17
+ # Deprecated flat modules, kept as compatibility shims
18
+ "analyzer",
19
+ "simplifier",
20
+ "glossary",
21
+ "grammar",
22
+ "reader",
23
+ "reporter",
24
+ "cli",
25
+ "web",
26
+ ]
@@ -0,0 +1,7 @@
1
+ """Interfaces onto the engine.
2
+
3
+ An adapter translates between the outside world and `plainspeak.core`. It
4
+ must never contain analysis or rewriting logic of its own: the whole point
5
+ of the split is that the CLI, the desktop application and the MCP server
6
+ cannot give different answers for the same input.
7
+ """